/* LessonEcho cabinet: the few rules the prototype did not need (real states, the compact
   feedback toggle, own comments). Colours ONLY through the design tokens of lessonecho.css
   (generated from design/prototype/build/tokens.py, WCAG AA checked there). */

/* E9 H: v4 date/minutes, whole-card link, one line of equally marked themes. */
.e9-index{display:grid;gap:24px}.e9-index .phead{margin:0}.e9-index .row{flex-wrap:wrap}
.e9-card{container-type:inline-size;position:relative;display:grid;grid-template-columns:minmax(0,1fr) auto;gap:12px 14px;background:var(--s);border:1px solid var(--hair);border-radius:18px;padding:16px 48px 16px 18px;text-decoration:none;min-width:0}
.e9-card:hover{border-color:var(--ink)}.e9-date{font:700 21px/1.3 Unbounded,sans-serif;letter-spacing:-.012em;overflow-wrap:anywhere}.e9-min{display:flex;align-items:center;gap:6px;color:var(--mut);font-size:14px;white-space:nowrap}.e9-min .ic{width:15px;height:15px}
.e9-arrow{position:absolute;right:16px;top:50%;transform:translateY(-50%);display:grid;place-items:center;color:var(--mut)}.e9-arrow .ic{width:20px;height:20px}
.e9-chips{grid-column:1/-1;display:flex;align-items:center;gap:6px;min-width:0;white-space:nowrap}.e9-chip{display:inline-flex;align-items:center;gap:5px;min-width:0;max-width:30%;padding:3px 8px;border:1px solid var(--hair);border-radius:999px;height:30px;font-size:12px;line-height:1;font-weight:600}.e9-chip>span{overflow:hidden;text-overflow:ellipsis}.e9-chip i{width:7px;height:7px;border-radius:50%;background:var(--info);flex:none}
.e9-more{display:grid;place-items:center;flex:none;width:30px;height:30px;border:1px dashed var(--field);border-radius:50%;font-size:14px;font-weight:700;line-height:1;color:var(--mut)}.e9-narrow{display:none}
@media(max-width:620px){.e9-chips .e9-chip{flex:none;max-width:none}}
.e9-chips [hidden]{display:none!important}
.e9-topic{max-width:860px;min-width:0;gap:28px;overflow-wrap:anywhere}.e9-topic:has(.lwrap){max-width:1060px}.e9-topic>.t-lead,.e9-topic>.sys{max-width:760px}.e9-topic .sec{min-width:0;gap:16px}.e9-topic .ex{padding:0;list-style:none}.e9-topic .ex li{min-width:0}
.e9-table{max-width:100%;overflow-x:auto}.e9-table table{width:100%;border-collapse:collapse;background:var(--s);border:1px solid var(--hair)}.e9-table caption{text-align:left;padding:12px;font-weight:700}.e9-table th,.e9-table td{text-align:left;padding:10px 14px;border-bottom:1px solid var(--hair)}
.e9-hl{color:var(--ink);background:var(--warnbg);box-shadow:inset 0 -2px var(--warn);font-weight:800;border-radius:2px}
.e9-supplement>.t-over{color:var(--mut);font-size:13px;border-left:3px solid var(--warn);padding-left:10px}.e9-words{list-style:none;display:grid;gap:12px;padding:0}.e9-words li{display:grid;grid-template-columns:minmax(0,1fr) minmax(0,1fr);gap:12px}
.e9-exercise{display:grid;gap:12px;padding:20px 0;border-top:1px solid var(--hair)}.e9-exercise label{display:grid;gap:6px}.e9-exercise label b{font-size:18px;line-height:1.5}.e9-exercise .inp{min-width:0;width:100%}.e9-source-lessons{display:flex;flex-wrap:wrap;gap:12px 24px;list-style:none;padding:0}
.e9-topic .t-body{font-size:16px;line-height:1.65}.e9-table td{color:var(--ink);font-size:15px;font-weight:500}.e9-table td:first-child{color:var(--mut);font-size:13px;font-weight:400}
@media(max-width:620px){.e9-topic .ex li{grid-template-columns:minmax(0,1fr)}.e9-topic .ex li>.row{justify-content:flex-start}}
@media(max-width:560px){.e9-card{padding:14px 40px 14px 16px;gap:10px}.e9-date{font-size:19px}.e9-min{grid-column:1}.e9-arrow{right:12px}}
.e9-themes{list-style:none;display:grid;gap:12px}.e9-themes li{padding:18px;background:var(--s);border:1px solid var(--hair);border-radius:18px;overflow-wrap:anywhere}.e9-themes li>a{display:flex;align-items:center;justify-content:space-between;gap:16px;min-height:44px;text-decoration:none}.e9-themes .ic{flex:none}.e9-lesson{margin:24px 0}.e9-lesson ul{list-style:none;display:grid;gap:8px}.e9-lesson li>a{display:inline-block;padding:8px 0;overflow-wrap:anywhere}

/* no prototype review strip above the page: full-height layouts */
.cmp{max-width:1480px;padding-bottom:80px}
.cmp-head{display:grid;gap:12px;margin:22px 0 28px;max-width:860px}
.cmp-controls{display:flex;align-items:end;gap:16px;flex-wrap:wrap;margin:20px 0}
.cmp-controls .field{flex:1;min-width:220px;display:grid;gap:8px;font-weight:600}
.cmp select{width:100%;min-width:0;max-width:100%;min-height:44px;background:var(--s);color:var(--ink);border:1px solid var(--field);border-radius:10px;padding:9px 12px;font:inherit}
.lhead .field > .lmeta{min-width:0}
#result-version{width:100%;min-width:0;max-width:100%}
.cmp-findings,.cmp-overview{border:1px solid var(--hair);background:var(--s);border-radius:18px;padding:22px;margin:28px 0}
.cmp-notes{display:grid;grid-template-columns:repeat(auto-fit,minmax(240px,1fr));gap:24px;margin-top:18px}
.cmp-notes article{border-left:3px solid var(--acc);padding-left:16px;display:grid;gap:10px;align-content:start}
.cmp-notes h3{font-size:17px;font-weight:650}.cmp-notes p{line-height:1.65;white-space:pre-line}
.cmp-overview summary{cursor:pointer;font-weight:600}.cmp-overview table{margin:20px 0}
.cmp-toolbar{display:flex;align-items:center;justify-content:space-between;gap:20px;margin:28px 0 12px;flex-wrap:wrap}
.cmp-toolbar label{display:flex;align-items:center;gap:10px;font-weight:600}
.cmp-toolbar select{width:auto}.cmp-jump{display:flex;gap:8px;flex-wrap:wrap;margin:24px 0 34px}
.cmp-section{margin:36px 0;scroll-margin-top:90px}.cmp-section h2{margin-bottom:16px}
.cmp-section h2 small{font-family:Onest,sans-serif;font-size:14px;font-weight:400;white-space:nowrap}
.cmp-scroll{overflow-x:auto;border:1px solid var(--hair);border-radius:14px}
.cmp-section .cmp-scroll{max-height:78vh;overflow:auto}
.cmp-table thead th{position:sticky;top:0;z-index:2}
.cmp-table,.cmp-metrics{width:100%;border-collapse:collapse;background:var(--s);table-layout:fixed;min-width:760px}
.cmp-table th,.cmp-table td,.cmp-metrics th,.cmp-metrics td{text-align:left;vertical-align:top;padding:20px;border-bottom:1px solid var(--hair);overflow-wrap:anywhere}
.cmp-table thead th,.cmp-metrics thead th{background:var(--tint);font-size:14px}
.cmp-table .cmp-meaning{width:22%}.cmp-table tbody th{font-size:15px;font-weight:500}
.cmp-table td+td{border-left:1px solid var(--hair)}.cmp-table tr[hidden]{display:none}
.cmp-state{display:block;font-size:12px;line-height:1.6;margin-top:12px;color:var(--mut)}
.cmp-state-changed{color:var(--acct)}.cmp-state-left,.cmp-state-right{color:var(--info)}
.cmp-cell{display:grid;gap:16px;line-height:1.65}.cmp-cell p{white-space:pre-line}
.cmp-label{display:block;font-size:11px;font-weight:650;text-transform:uppercase;letter-spacing:.06em;color:var(--mut);margin-bottom:4px}
.cmp-cell mark{background:var(--warnbg,var(--tint));color:var(--ink);border-bottom:1px solid var(--acc);border-radius:2px;padding:1px 0}
.ctx mark{background:var(--warnbg,var(--tint));color:var(--ink);border-bottom:1px solid var(--acc);border-radius:2px;padding:1px 0}
.cmp-cell blockquote{font-size:13px;border-left:2px solid var(--hair);padding-left:10px;margin-top:12px;color:var(--mut)}
.cmp-cell details summary{cursor:pointer;font-size:13px;color:var(--info)}.cmp-absent{color:var(--mut);font-size:14px;line-height:1.6}
@media(max-width:650px){.cmp-controls{gap:12px}.cmp-controls .field{flex-basis:100%;min-width:0}.cmp-controls .btn{width:100%}.cmp-table{min-width:720px}.cmp-table th,.cmp-table td{padding:14px}.cmp-toolbar{align-items:stretch}.cmp-toolbar label{width:100%;min-width:0;display:grid}.cmp-toolbar select{width:100%}.cmp-findings,.cmp-overview{padding:16px}.cmp-notes{grid-template-columns:1fr;min-width:0}}

.auth{min-height:100vh}
.trw{min-height:100vh}
@media (max-width:560px){.auth{min-height:0}}

a.me{color:var(--ink);border-radius:12px;padding:4px 4px 4px 8px}
a.me:hover{background:var(--tint)}
a.tl-m{text-decoration:none}
.tl-marks a.tl-m:hover{background:var(--errbg)}

/* compact «Отзыв» for small items (word, phrase, example, table, exercise): an icon that
   opens a small popover with the same three buttons */
.fbm{position:relative;display:inline-flex}
.fbm-t{min-height:30px;width:30px;padding:0;justify-content:center;border-radius:9px}
.fbm-t .ic{width:16px;height:16px}
.fbm-t[data-set="ok"]{color:var(--ok);background:var(--okbg)}
.fbm-t[data-set="no"]{color:var(--err);background:var(--errbg)}
.fbm-t[aria-expanded="true"]{background:var(--tint);color:var(--ink)}
.fbm-p{position:absolute;right:0;top:calc(100% + 4px);z-index:35;background:var(--s2);border:1px solid var(--hair);border-radius:12px;box-shadow:0 14px 34px -14px var(--shadow);padding:6px}
.fbm-p .fbk{flex-wrap:nowrap}
.ex-r{justify-content:flex-end}
/* a topic of a newer result without examples says so and why (lock Э5) */
.ex-none{font-size:14.5px;color:var(--mut);font-style:italic;padding:11px 0;border-top:1px solid var(--hair);border-bottom:1px solid var(--hair)}
.rt-f{display:flex;justify-content:flex-end;padding:4px 8px;border-top:1px solid var(--hair)}
.q{position:relative}
.q-h{display:flex;justify-content:space-between;align-items:center;gap:8px;min-height:24px}
.q-h .fbm-t{margin:-4px -6px -4px 0}
.conj-h .fbm-t{min-height:26px;width:26px;margin:-4px -6px -4px 2px}
.aid .row{align-items:center}
.lnew .lrow .lside{display:none}

a.chip[aria-current="true"]{background:var(--inv);color:var(--oninv);border-color:var(--inv)}

/* the author's own comments under an item */
.myfb{display:grid;gap:4px}
.myfb p{display:flex;gap:6px;align-items:flex-start;font-size:13.5px;line-height:1.45;color:var(--mut)}
.myfb p .ic{width:14px;height:14px;margin-top:2px;color:var(--info)}
.myfb b{color:var(--ink);font-weight:600}

/* one-tap assign: «Новый ученик» opens an inline name field */
.assign-new summary{cursor:pointer}
.assign-new summary::-webkit-details-marker{display:none}
.assign-new[open] summary{background:var(--inv);color:var(--oninv);border-color:var(--inv)}
.assign.is-done{background:var(--okbg)}

/* the shared (no account) view: no tab bar */
body.is-share{padding-bottom:0}

/* the real voice recorder: level meter driven by the microphone */
.vr .lvl.live i{animation:none;transform:scaleY(var(--lv,.2));transform-origin:center;transition:transform .08s linear}
.vr-err-note{font-size:13px;color:var(--err)}

/* mini player of a real clip / moment: progress fills the bars */
.mp[aria-busy="true"] .mp-b{cursor:progress}
.mp.is-error .mp-b{background:var(--errbg);color:var(--err)}
.tc[aria-busy="true"]{cursor:progress}

/* the consent text variants and the settings theme switch reuse .seg */
.seg button:focus-visible{outline:2px solid var(--focus);outline-offset:2px}

@media print{.appbar,.tabbar,.railbar,.rail,.fbk,.fbm,.vr,.lacts,.lfoot{display:none!important}}

/* «Ещё» on a lesson page: «Удалить урок» with the danger zone's two-step confirmation */
.lmore{position:relative;display:inline-flex}
.lmore > summary{list-style:none}
.lmore > summary::-webkit-details-marker{display:none}
.lmore-p{position:absolute;right:0;top:calc(100% + 6px);z-index:35;width:min(340px,86vw);background:var(--s2);box-shadow:0 14px 34px -14px var(--shadow)}
.lhead-pend{display:flex;justify-content:space-between;align-items:flex-start;gap:12px}
/* phones: the «Ещё» popover would start off-screen to the left — a sheet above the tab bar */
@media (max-width:640px){.lmore-p{position:fixed;left:12px;right:auto;top:auto;bottom:calc(84px + env(safe-area-inset-bottom));width:calc(100vw - 24px);z-index:60}}
/* sign-in by e-mail code: the 6-digit field */
.inp-code{font-size:26px;font-weight:700;letter-spacing:.32em;text-align:center;font-variant-numeric:tabular-nums}

/* owner's analytics (launch L3): numbers right-aligned, filters with a gap, tables stacked */
.an .rt-wrap{margin-top:16px}
.an .rt th.n,.an .rt td.n{text-align:right;font-variant-numeric:tabular-nums;white-space:nowrap}
.an .rt td:first-child{color:var(--ink)}
.an-f{margin-top:10px}
.an-sep{width:12px}
.an-mut{color:var(--mut)}
.an-k{margin-top:16px}

/* the owner's counter on «Заявки» (menu on a computer, tab bar on a phone) */
.nbadge{display:inline-grid;place-items:center;min-width:20px;height:20px;padding:0 6px;border-radius:999px;background:var(--inv);color:var(--oninv);font-size:12px;font-weight:700;line-height:1;font-variant-numeric:tabular-nums}
.tabbar span.tb-i{position:relative}
.tabbar .nbadge{position:absolute;top:-4px;right:2px;min-width:18px;height:18px;font-size:11px;padding:0 5px;box-shadow:0 0 0 2px var(--s)}

/* «Попросить доступ» (the server's own form) and the owner's «Заявки» */
.ar-page .auth-card{width:min(580px,100%)}
fieldset.field{border:0;padding:0;margin:0;min-width:0}
fieldset.field legend{padding:0;margin-bottom:6px}
.ar-hp{position:absolute!important;left:-10000px;top:auto;width:1px;height:1px;overflow:hidden}
.ar-roles{grid-template-columns:repeat(auto-fit,minmax(min(100%,150px),1fr));gap:10px}
.ar-roles .rcard{padding:13px 12px 13px 46px}
.ar-roles .rcard .rdot{left:14px;top:14px}
.ar-devs{display:grid;gap:10px}
.ar-top{display:flex;gap:12px;justify-content:space-between;align-items:flex-start}
.ar-name{font-size:16.5px;font-weight:700;overflow-wrap:anywhere}
.ar-mail{font-size:14px;color:var(--mut);overflow-wrap:anywhere}
.ar-facts{display:grid;grid-template-columns:repeat(auto-fit,minmax(min(100%,130px),1fr));gap:8px 16px;margin:0}
.ar-facts dt{font-size:12.5px;color:var(--mut);font-weight:600}
.ar-facts dd{margin:0;font-size:14.5px;overflow-wrap:anywhere}
.ar-comment{background:var(--tint);border-radius:12px;padding:10px 12px;font-size:14.5px;line-height:1.55;overflow-wrap:anywhere}
.ar-acts{display:flex;flex-wrap:wrap;gap:8px;align-items:flex-start}
.ar-rej{position:relative}
.ar-rej > summary{list-style:none}
.ar-rej > summary::-webkit-details-marker{display:none}
.ar-rej[open] > summary{background:var(--tint)}
.ar-pop{position:absolute;left:0;top:calc(100% + 6px);z-index:35;width:min(300px,80vw);background:var(--s2);box-shadow:0 14px 34px -14px var(--shadow)}
.ar-note > summary{cursor:pointer;display:inline-flex;gap:6px;align-items:center;list-style:none}
.ar-note > summary::-webkit-details-marker{display:none}
.ar-note > summary .ic{width:14px;height:14px}
/* the phone: the search on its own line, the role and «Применить» under it; the labels stay for
   screen readers, «Сбросить» is the status chip «Все» / the empty state's button there */
@media (max-width:760px){
  .ar-flt{display:grid;grid-template-columns:minmax(0,1fr) auto;gap:8px;padding:12px;align-items:center}
  .ar-flt .lbl{position:absolute!important;width:1px;height:1px;overflow:hidden;clip:rect(0 0 0 0);white-space:nowrap}
  .ar-flt > label:first-of-type{grid-column:1/-1}
  .ar-flt .row .btn-ghost{display:none}
  .ar-flt .row .btn{min-height:46px}
}

/* iPhone: the tab bar grows by the home-indicator inset — the page's last lines stay above it */
@media (max-width:760px){body.has-tabbar{padding-bottom:calc(78px + env(safe-area-inset-bottom,0px))}}

/* ---- tablets and phones (iPad 768 / 1024, iPhone 390) ------------------------------------
   the top menu between phone and desktop: nothing in the bar shrinks or wraps — the name block
   goes first, then the menu icons, the logo never squeezes (it did at 768: «Мои отзывы» on two
   lines, the avatar off-screen) */
.appbar .logo{flex:none}
.nav a{white-space:nowrap}
.nav a .nbadge{margin-left:-2px}
@media (min-width:761px) and (max-width:1180px){.appbar-in{gap:14px}.me .who{display:none}.nav a{padding:8px 10px}}
@media (min-width:761px) and (max-width:960px){.appbar-in{padding:0 20px}.nav a .ic{display:none}.nav a{font-size:14.5px;padding:8px 9px}}
/* iOS Safari: 100vh is the height WITHOUT the collapsing toolbars — the trainer's footer and the
   sign-in card sat under the address bar; dvh is the visible height (older browsers keep vh) */
.auth{min-height:100dvh}
.trw{min-height:100dvh}
body.trb{min-height:100dvh}
@media (max-width:560px){.auth{min-height:0}}
/* iOS Safari zooms the page into any input under 16 px (the exercise gaps were 15.5 px) */
.gap{font-size:16px}
/* touch screens: no grey flash on tap, and the ▶ / feedback targets stay at least 40 px */
@media (hover:none) and (pointer:coarse){
  a,button,summary,label{-webkit-tap-highlight-color:transparent}
  .fbm-t{min-height:40px;width:40px}
}

/* «Оценить урок»: one card at a time; on a phone the two sides of a pair stack */
.ev{max-width:760px}
.ev-head{display:grid;gap:10px;margin:18px 0 6px}
.ev-card{padding:18px;display:grid;gap:14px;margin-top:12px;min-width:0}
.ev-body{display:grid;gap:6px;min-width:0;overflow-wrap:anywhere}
.ev-es{font-family:"Unbounded",sans-serif;font-weight:700;font-size:clamp(20px,4.6vw,26px);line-height:1.2}
.ev-list{display:grid;gap:4px;padding-left:20px}
.ev-pair{display:grid;gap:12px}
@media (min-width:640px){.ev-pair{grid-template-columns:minmax(0,1fr) minmax(0,1fr)}}
.ev-side{border:1px solid var(--hair);border-radius:12px;padding:12px;display:grid;gap:8px;align-content:start;min-width:0}
.ev-ans .tr-opt{min-height:52px;font-size:16px}
.ev-ans .tr-opt[aria-pressed="true"]{border-color:var(--ink);background:var(--infobg)}
.card[data-eval-v2] fieldset{border:0;padding:0;margin:0;min-width:0}.card[data-eval-v2] .row{flex-wrap:wrap;gap:6px}.card[data-eval-v2] .chip:has(:checked){background:var(--inv);color:var(--oninv);border-color:var(--inv)}.card[data-eval-v2] input[type=radio]{margin:0;accent-color:var(--ink)}
/* R16 T1: topic page by v4 — rail, one supplement block, compact form cards, safe rich explanation */
/* grid items of the topic article may shrink: the railbar's nowrap chips (~850px) must scroll inside it, not widen the page */
.e9-topic>*,.e9-topic .lwrap{min-width:0}
.e9-topic .lwrap{margin-top:4px}.e9-topic .lmain{gap:40px}.e9-explain{display:grid;gap:36px;min-width:0}.e9-topic .lmain>section,.e9-explain>section{scroll-margin-top:84px}
.e9-text{display:grid;gap:10px;font-size:17px;line-height:1.7}.e9-text p,.e9-text ul,.e9-text ol{margin:0}.e9-text ul,.e9-text ol{padding-left:22px;display:grid;gap:4px}.e9-text b{font-weight:600}
.e9-forms{display:grid;grid-template-columns:minmax(0,1fr);gap:14px;align-items:start}@media(min-width:720px){.e9-forms{grid-template-columns:repeat(2,minmax(0,1fr))}}
.e9-conj{min-width:0}.e9-conj .conj-h{align-items:start;gap:6px}.e9-conj .conj-h .v{display:flex;flex-wrap:wrap;align-items:center;gap:7px}.e9-conj .conj-h a{color:inherit;text-underline-offset:3px}
.e9-conj table{width:100%;border-collapse:collapse}.e9-conj th,.e9-conj td{padding:7px 12px;text-align:left;border-top:1px solid var(--hair);overflow-wrap:anywhere}.e9-conj th{color:var(--mut);font-size:13px;font-weight:400;width:53%}.e9-conj td{font-size:15px;font-weight:500;color:var(--ink)}.e9-conj .e9-note{padding:8px 12px;border-top:1px solid var(--hair)}
.e9-supp{padding-top:18px;border-top:1px solid var(--hair);gap:18px}.e9-supp>.t-body{margin-top:-8px}
.e9-train{justify-self:start}
/* words: v4 card grid (the lesson page's .words/.wc), search in the heading row */
.e9-topic .w-h{display:flex;flex-wrap:wrap;gap:10px 20px;align-items:center;justify-content:space-between}
.srch{position:relative;display:block;min-width:0}.srch .ic{position:absolute;left:14px;top:50%;transform:translateY(-50%);width:18px;height:18px;color:var(--mut);pointer-events:none}.srch .inp{padding-left:42px}.w-h .srch{flex:1 1 240px;max-width:340px}
.e9-topic .wc b a{color:inherit;text-underline-offset:3px;overflow-wrap:anywhere}.e9-topic .words{list-style:none;padding:0}
@media(max-width:560px){.e9-topic .words.w2{grid-template-columns:repeat(2,minmax(0,1fr))}.e9-topic .words.w2 .wc{padding:12px}}
@media(max-width:400px){.tabbar[style*="--n:6"] a{font-size:10.5px}}
@media(max-width:560px){.e9-text{font-size:16px;line-height:1.65}}
