@font-face{font-family:Overpass;font-style:normal;font-weight:400;font-display:swap;src:url(../fonts/overpass-latin-400-normal.woff2) format('woff2');unicode-range:U+0000-00B6,U+00B8-00FF,U+0131,U+0152-0153,U+02BB-02BC,U+02C6,U+02DA,U+02DC,U+0304,U+0308,U+0329,U+2000-206F,U+20AC,U+2122,U+2191,U+2193,U+2212,U+2215,U+FEFF,U+FFFD}
@font-face{font-family:Overpass;font-style:normal;font-weight:500;font-display:swap;src:url(../fonts/overpass-latin-500-normal.woff2) format('woff2');unicode-range:U+0000-00B6,U+00B8-00FF,U+0131,U+0152-0153,U+02BB-02BC,U+02C6,U+02DA,U+02DC,U+0304,U+0308,U+0329,U+2000-206F,U+20AC,U+2122,U+2191,U+2193,U+2212,U+2215,U+FEFF,U+FFFD}
@font-face{font-family:Overpass;font-style:normal;font-weight:600;font-display:swap;src:url(../fonts/overpass-latin-600-normal.woff2) format('woff2');unicode-range:U+0000-00B6,U+00B8-00FF,U+0131,U+0152-0153,U+02BB-02BC,U+02C6,U+02DA,U+02DC,U+0304,U+0308,U+0329,U+2000-206F,U+20AC,U+2122,U+2191,U+2193,U+2212,U+2215,U+FEFF,U+FFFD}
@font-face{font-family:Overpass;font-style:normal;font-weight:700;font-display:swap;src:url(../fonts/overpass-latin-700-normal.woff2) format('woff2');unicode-range:U+0000-00B6,U+00B8-00FF,U+0131,U+0152-0153,U+02BB-02BC,U+02C6,U+02DA,U+02DC,U+0304,U+0308,U+0329,U+2000-206F,U+20AC,U+2122,U+2191,U+2193,U+2212,U+2215,U+FEFF,U+FFFD}
@font-face{font-family:Overpass;font-style:normal;font-weight:800;font-display:swap;src:url(../fonts/overpass-latin-800-normal.woff2) format('woff2');unicode-range:U+0000-00B6,U+00B8-00FF,U+0131,U+0152-0153,U+02BB-02BC,U+02C6,U+02DA,U+02DC,U+0304,U+0308,U+0329,U+2000-206F,U+20AC,U+2122,U+2191,U+2193,U+2212,U+2215,U+FEFF,U+FFFD}
@font-face{font-family:Overpass;font-style:normal;font-weight:900;font-display:swap;src:url(../fonts/overpass-latin-900-normal.woff2) format('woff2');unicode-range:U+0000-00B6,U+00B8-00FF,U+0131,U+0152-0153,U+02BB-02BC,U+02C6,U+02DA,U+02DC,U+0304,U+0308,U+0329,U+2000-206F,U+20AC,U+2122,U+2191,U+2193,U+2212,U+2215,U+FEFF,U+FFFD}
@font-face{font-family:Overpass;font-style:normal;font-weight:400;font-display:swap;src:url(../fonts/overpass-latin-ext-400-normal.woff2) format('woff2');unicode-range:U+0100-02BA,U+02BD-02C5,U+02C7-02CC,U+02CE-02D7,U+02DD-02FF,U+0304,U+0308,U+0329,U+1D00-1DBF,U+1E00-1E9F,U+1EF2-1EFF,U+2020,U+20A0-20AB,U+20AD-20C0,U+2113,U+2C60-2C7F,U+A720-A7FF}
@font-face{font-family:Overpass;font-style:normal;font-weight:600;font-display:swap;src:url(../fonts/overpass-latin-ext-600-normal.woff2) format('woff2');unicode-range:U+0100-02BA,U+02BD-02C5,U+02C7-02CC,U+02CE-02D7,U+02DD-02FF,U+0304,U+0308,U+0329,U+1D00-1DBF,U+1E00-1E9F,U+1EF2-1EFF,U+2020,U+20A0-20AB,U+20AD-20C0,U+2113,U+2C60-2C7F,U+A720-A7FF}
@font-face{font-family:Overpass;font-style:normal;font-weight:700;font-display:swap;src:url(../fonts/overpass-latin-ext-700-normal.woff2) format('woff2');unicode-range:U+0100-02BA,U+02BD-02C5,U+02C7-02CC,U+02CE-02D7,U+02DD-02FF,U+0304,U+0308,U+0329,U+1D00-1DBF,U+1E00-1E9F,U+1EF2-1EFF,U+2020,U+20A0-20AB,U+20AD-20C0,U+2113,U+2C60-2C7F,U+A720-A7FF}
@font-face{font-family:Overpass;font-style:normal;font-weight:800;font-display:swap;src:url(../fonts/overpass-latin-ext-800-normal.woff2) format('woff2');unicode-range:U+0100-02BA,U+02BD-02C5,U+02C7-02CC,U+02CE-02D7,U+02DD-02FF,U+0304,U+0308,U+0329,U+1D00-1DBF,U+1E00-1E9F,U+1EF2-1EFF,U+2020,U+20A0-20AB,U+20AD-20C0,U+2113,U+2C60-2C7F,U+A720-A7FF}
@font-face{font-family:Overpass;font-style:normal;font-weight:400;font-display:swap;src:url(../fonts/overpass-cyrillic-400-normal.woff2) format('woff2');unicode-range:U+0301,U+0400-045F,U+0490-0491,U+04B0-04B1,U+2116}
@font-face{font-family:Overpass;font-style:normal;font-weight:600;font-display:swap;src:url(../fonts/overpass-cyrillic-600-normal.woff2) format('woff2');unicode-range:U+0301,U+0400-045F,U+0490-0491,U+04B0-04B1,U+2116}
@font-face{font-family:Overpass;font-style:normal;font-weight:700;font-display:swap;src:url(../fonts/overpass-cyrillic-700-normal.woff2) format('woff2');unicode-range:U+0301,U+0400-045F,U+0490-0491,U+04B0-04B1,U+2116}
@font-face{font-family:Overpass;font-style:normal;font-weight:800;font-display:swap;src:url(../fonts/overpass-cyrillic-800-normal.woff2) format('woff2');unicode-range:U+0301,U+0400-045F,U+0490-0491,U+04B0-04B1,U+2116}
@font-face{font-family:'Big Shoulders Display';font-style:normal;font-weight:800;font-display:swap;src:url(../fonts/big-shoulders-display-latin-800-normal.woff2) format('woff2');unicode-range:U+0000-00FF,U+0131,U+0152-0153,U+02BB-02BC,U+02C6,U+02DA,U+02DC,U+0304,U+0308,U+0329,U+2000-206F,U+20AC,U+2122,U+2191,U+2193,U+2212,U+2215,U+FEFF,U+FFFD}
@font-face{font-family:'Big Shoulders Display';font-style:normal;font-weight:900;font-display:swap;src:url(../fonts/big-shoulders-display-latin-900-normal.woff2) format('woff2');unicode-range:U+0000-00FF,U+0131,U+0152-0153,U+02BB-02BC,U+02C6,U+02DA,U+02DC,U+0304,U+0308,U+0329,U+2000-206F,U+20AC,U+2122,U+2191,U+2193,U+2212,U+2215,U+FEFF,U+FFFD}
@font-face{font-family:'JetBrains Mono';font-style:normal;font-weight:700;font-display:swap;src:url(../fonts/jetbrains-mono-latin-700-normal.woff2) format('woff2');unicode-range:U+0000-00FF,U+0131,U+0152-0153,U+02BB-02BC,U+02C6,U+02DA,U+02DC,U+0304,U+0308,U+0329,U+2000-206F,U+20AC,U+2122,U+2191,U+2193,U+2212,U+2215,U+FEFF,U+FFFD}
@font-face{font-family:'JetBrains Mono';font-style:normal;font-weight:700;font-display:swap;src:url(../fonts/jetbrains-mono-cyrillic-700-normal.woff2) format('woff2');unicode-range:U+0301,U+0400-045F,U+0490-0491,U+04B0-04B1,U+2116}
/* The Launch faces, self-hosted.

   "NE Sans" is one family made of two typefaces, joined by unicode-range:
   Barlow for Latin, Overpass for Cyrillic. Barlow ships no Cyrillic at all,
   and Russian and Kazakh are two of the six interface languages, so Barlow
   alone would have handed those students the phone's default sans. Split
   this way, a Russian sentence with an English brand name in it gets the
   right face for each character on the same line, and nothing else in the
   app has to know.

   "NE Mono" is JetBrains Mono, which carries its own Cyrillic.
   Persian falls through to the system stack, as the brief expects. */
@font-face{font-family:"NE Sans";font-style:normal;font-display:swap;font-weight:300;src:url(../fonts/barlow-latin-ext-300-normal.woff2) format("woff2");unicode-range:U+0100-02BA,U+02BD-02C5,U+02C7-02CC,U+02CE-02D7,U+02DD-02FF,U+0304,U+0308,U+0329,U+1D00-1DBF,U+1E00-1E9F,U+1EF2-1EFF,U+2020,U+20A0-20AB,U+20AD-20C0,U+2113,U+2C60-2C7F,U+A720-A7FF}
@font-face{font-family:"NE Sans";font-style:normal;font-display:swap;font-weight:400;src:url(../fonts/barlow-latin-ext-400-normal.woff2) format("woff2");unicode-range:U+0100-02BA,U+02BD-02C5,U+02C7-02CC,U+02CE-02D7,U+02DD-02FF,U+0304,U+0308,U+0329,U+1D00-1DBF,U+1E00-1E9F,U+1EF2-1EFF,U+2020,U+20A0-20AB,U+20AD-20C0,U+2113,U+2C60-2C7F,U+A720-A7FF}
@font-face{font-family:"NE Sans";font-style:normal;font-display:swap;font-weight:500;src:url(../fonts/barlow-latin-ext-500-normal.woff2) format("woff2");unicode-range:U+0100-02BA,U+02BD-02C5,U+02C7-02CC,U+02CE-02D7,U+02DD-02FF,U+0304,U+0308,U+0329,U+1D00-1DBF,U+1E00-1E9F,U+1EF2-1EFF,U+2020,U+20A0-20AB,U+20AD-20C0,U+2113,U+2C60-2C7F,U+A720-A7FF}
@font-face{font-family:"NE Sans";font-style:normal;font-display:swap;font-weight:600;src:url(../fonts/barlow-latin-ext-600-normal.woff2) format("woff2");unicode-range:U+0100-02BA,U+02BD-02C5,U+02C7-02CC,U+02CE-02D7,U+02DD-02FF,U+0304,U+0308,U+0329,U+1D00-1DBF,U+1E00-1E9F,U+1EF2-1EFF,U+2020,U+20A0-20AB,U+20AD-20C0,U+2113,U+2C60-2C7F,U+A720-A7FF}
@font-face{font-family:"NE Sans";font-style:normal;font-display:swap;font-weight:300;src:url(../fonts/barlow-latin-300-normal.woff2) format("woff2");unicode-range:U+0000-00FF,U+0131,U+0152-0153,U+02BB-02BC,U+02C6,U+02DA,U+02DC,U+0304,U+0308,U+0329,U+2000-206F,U+20AC,U+2122,U+2191,U+2193,U+2212,U+2215,U+FEFF,U+FFFD}
@font-face{font-family:"NE Sans";font-style:normal;font-display:swap;font-weight:400;src:url(../fonts/barlow-latin-400-normal.woff2) format("woff2");unicode-range:U+0000-00FF,U+0131,U+0152-0153,U+02BB-02BC,U+02C6,U+02DA,U+02DC,U+0304,U+0308,U+0329,U+2000-206F,U+20AC,U+2122,U+2191,U+2193,U+2212,U+2215,U+FEFF,U+FFFD}
@font-face{font-family:"NE Sans";font-style:normal;font-display:swap;font-weight:500;src:url(../fonts/barlow-latin-500-normal.woff2) format("woff2");unicode-range:U+0000-00FF,U+0131,U+0152-0153,U+02BB-02BC,U+02C6,U+02DA,U+02DC,U+0304,U+0308,U+0329,U+2000-206F,U+20AC,U+2122,U+2191,U+2193,U+2212,U+2215,U+FEFF,U+FFFD}
@font-face{font-family:"NE Sans";font-style:normal;font-display:swap;font-weight:600;src:url(../fonts/barlow-latin-600-normal.woff2) format("woff2");unicode-range:U+0000-00FF,U+0131,U+0152-0153,U+02BB-02BC,U+02C6,U+02DA,U+02DC,U+0304,U+0308,U+0329,U+2000-206F,U+20AC,U+2122,U+2191,U+2193,U+2212,U+2215,U+FEFF,U+FFFD}
@font-face{font-family:"NE Sans";font-style:normal;font-display:swap;font-weight:300;src:url(../fonts/overpass-cyrillic-ext-300-normal.woff2) format("woff2");unicode-range:U+0460-052F,U+1C80-1C8A,U+20B4,U+2DE0-2DFF,U+A640-A69F,U+FE2E-FE2F}
@font-face{font-family:"NE Sans";font-style:normal;font-display:swap;font-weight:400;src:url(../fonts/overpass-cyrillic-ext-400-normal.woff2) format("woff2");unicode-range:U+0460-052F,U+1C80-1C8A,U+20B4,U+2DE0-2DFF,U+A640-A69F,U+FE2E-FE2F}
@font-face{font-family:"NE Sans";font-style:normal;font-display:swap;font-weight:500;src:url(../fonts/overpass-cyrillic-ext-500-normal.woff2) format("woff2");unicode-range:U+0460-052F,U+1C80-1C8A,U+20B4,U+2DE0-2DFF,U+A640-A69F,U+FE2E-FE2F}
@font-face{font-family:"NE Sans";font-style:normal;font-display:swap;font-weight:600;src:url(../fonts/overpass-cyrillic-ext-600-normal.woff2) format("woff2");unicode-range:U+0460-052F,U+1C80-1C8A,U+20B4,U+2DE0-2DFF,U+A640-A69F,U+FE2E-FE2F}
@font-face{font-family:"NE Sans";font-style:normal;font-display:swap;font-weight:300;src:url(../fonts/overpass-cyrillic-300-normal.woff2) format("woff2");unicode-range:U+0301,U+0400-045F,U+0490-0491,U+04B0-04B1,U+2116}
@font-face{font-family:"NE Sans";font-style:normal;font-display:swap;font-weight:400;src:url(../fonts/overpass-cyrillic-400-normal.woff2) format("woff2");unicode-range:U+0301,U+0400-045F,U+0490-0491,U+04B0-04B1,U+2116}
@font-face{font-family:"NE Sans";font-style:normal;font-display:swap;font-weight:500;src:url(../fonts/overpass-cyrillic-500-normal.woff2) format("woff2");unicode-range:U+0301,U+0400-045F,U+0490-0491,U+04B0-04B1,U+2116}
@font-face{font-family:"NE Sans";font-style:normal;font-display:swap;font-weight:600;src:url(../fonts/overpass-cyrillic-600-normal.woff2) format("woff2");unicode-range:U+0301,U+0400-045F,U+0490-0491,U+04B0-04B1,U+2116}
@font-face{font-family:"NE Mono";font-style:normal;font-display:swap;font-weight:400;src:url(../fonts/jetbrains-mono-cyrillic-400-normal.woff2) format("woff2");unicode-range:U+0301,U+0400-045F,U+0490-0491,U+04B0-04B1,U+2116}
@font-face{font-family:"NE Mono";font-style:normal;font-display:swap;font-weight:500;src:url(../fonts/jetbrains-mono-cyrillic-500-normal.woff2) format("woff2");unicode-range:U+0301,U+0400-045F,U+0490-0491,U+04B0-04B1,U+2116}
@font-face{font-family:"NE Mono";font-style:normal;font-display:swap;font-weight:600;src:url(../fonts/jetbrains-mono-cyrillic-600-normal.woff2) format("woff2");unicode-range:U+0301,U+0400-045F,U+0490-0491,U+04B0-04B1,U+2116}
@font-face{font-family:"NE Mono";font-style:normal;font-display:swap;font-weight:400;src:url(../fonts/jetbrains-mono-latin-ext-400-normal.woff2) format("woff2");unicode-range:U+0100-02BA,U+02BD-02C5,U+02C7-02CC,U+02CE-02D7,U+02DD-02FF,U+0304,U+0308,U+0329,U+1D00-1DBF,U+1E00-1E9F,U+1EF2-1EFF,U+2020,U+20A0-20AB,U+20AD-20C0,U+2113,U+2C60-2C7F,U+A720-A7FF}
@font-face{font-family:"NE Mono";font-style:normal;font-display:swap;font-weight:500;src:url(../fonts/jetbrains-mono-latin-ext-500-normal.woff2) format("woff2");unicode-range:U+0100-02BA,U+02BD-02C5,U+02C7-02CC,U+02CE-02D7,U+02DD-02FF,U+0304,U+0308,U+0329,U+1D00-1DBF,U+1E00-1E9F,U+1EF2-1EFF,U+2020,U+20A0-20AB,U+20AD-20C0,U+2113,U+2C60-2C7F,U+A720-A7FF}
@font-face{font-family:"NE Mono";font-style:normal;font-display:swap;font-weight:600;src:url(../fonts/jetbrains-mono-latin-ext-600-normal.woff2) format("woff2");unicode-range:U+0100-02BA,U+02BD-02C5,U+02C7-02CC,U+02CE-02D7,U+02DD-02FF,U+0304,U+0308,U+0329,U+1D00-1DBF,U+1E00-1E9F,U+1EF2-1EFF,U+2020,U+20A0-20AB,U+20AD-20C0,U+2113,U+2C60-2C7F,U+A720-A7FF}
@font-face{font-family:"NE Mono";font-style:normal;font-display:swap;font-weight:400;src:url(../fonts/jetbrains-mono-latin-400-normal.woff2) format("woff2");unicode-range:U+0000-00FF,U+0131,U+0152-0153,U+02BB-02BC,U+02C6,U+02DA,U+02DC,U+0304,U+0308,U+0329,U+2000-206F,U+20AC,U+2122,U+2191,U+2193,U+2212,U+2215,U+FEFF,U+FFFD}
@font-face{font-family:"NE Mono";font-style:normal;font-display:swap;font-weight:500;src:url(../fonts/jetbrains-mono-latin-500-normal.woff2) format("woff2");unicode-range:U+0000-00FF,U+0131,U+0152-0153,U+02BB-02BC,U+02C6,U+02DA,U+02DC,U+0304,U+0308,U+0329,U+2000-206F,U+20AC,U+2122,U+2191,U+2193,U+2212,U+2215,U+FEFF,U+FFFD}
@font-face{font-family:"NE Mono";font-style:normal;font-display:swap;font-weight:600;src:url(../fonts/jetbrains-mono-latin-600-normal.woff2) format("woff2");unicode-range:U+0000-00FF,U+0131,U+0152-0153,U+02BB-02BC,U+02C6,U+02DA,U+02DC,U+0304,U+0308,U+0329,U+2000-206F,U+20AC,U+2122,U+2191,U+2193,U+2212,U+2215,U+FEFF,U+FFFD}
/* Native Elite Student Platform — design system
   The look borrows from American road signage: guide-sign green for "go on", interstate blue and red
   for stages, warning yellow for things that need attention. One typeface (Overpass, drawn from
   Highway Gothic). Light surfaces throughout. */
:root{
  color-scheme:light;
  --paper:#F2F4F3; --card:#FFFFFF; --ink:#0A0B2E; --ink2:#353E44; --mute:#5A666F; --faint:#5F6C74;
  --line:#DAE0DD; --exit-off:#4E5A63; --line2:#C2CBC6; --soft:#EEF1EF; --soft2:#E4E9E6;
  --green:#0A6B4B; --green2:#0E8660; --green3:#075239; --green-t:#E2F2EB;
  --blue:#12499B; --blue2:#1C5FC4; --blue3:#0C3676; --blue-t:#E5EDF9; --blue-hov:#1C5FC4;
  --red:#D21030; --red2:#B30926; --red-t:#FDECEE; --red-hov:#B30926;
  --yellow:#FFC629; --yellow2:#E5A800; --yellow-t:#FFF5D1; --yellow-ink:#5E4300;
  --orange:#E8611A; --orange-t:#FDECDF; --orange-ink:#9A3D0B;
  --brown:#6B4A33; --brown-t:#F2EBE4;
  --flap:#1B2024; --flap-ink:#F7F3E3;
  --r:12px; --r-s:8px; --r-sign:16px;
  --ease:cubic-bezier(.2,.8,.2,1); --ease-in:cubic-bezier(.5,0,.9,.4); --spring:cubic-bezier(.34,1.4,.5,1);
  --top:60px; --tab:64px;
  --sat:env(safe-area-inset-top,0px); --sab:env(safe-area-inset-bottom,0px);
  --shadow:0 1px 0 rgba(1,0,76,.04), 0 10px 24px -18px rgba(1,0,76,.35);
  --shadow-up:0 18px 50px -20px rgba(1,0,76,.45), 0 2px 8px rgba(1,0,76,.08);
}
*,*::before,*::after{box-sizing:border-box}
html{-webkit-text-size-adjust:100%;text-size-adjust:100%}
body{margin:0;background:var(--paper);color:var(--ink);font-family:"Overpass",system-ui,-apple-system,"Segoe UI",Roboto,sans-serif;
  font-size:15.5px;line-height:1.5;-webkit-font-smoothing:antialiased;font-feature-settings:"tnum" 0;
  -webkit-tap-highlight-color:transparent;overscroll-behavior-y:none;min-height:100dvh}
h1,h2,h3,h4,p{margin:0}
h1{font-size:clamp(24px,3.4vw,32px);line-height:1.12;font-weight:800;letter-spacing:-.012em}
h2{font-size:20px;line-height:1.2;font-weight:800;letter-spacing:-.008em}
h3{font-size:16.5px;line-height:1.25;font-weight:700}
button,input,select,textarea{font:inherit;color:inherit}
button{cursor:pointer;border:0;background:none;padding:0;touch-action:manipulation;-webkit-user-select:none;user-select:none}
a{color:var(--blue2);text-decoration:none}
img,svg{display:block}
[hidden]{display:none!important}
.num{font-variant-numeric:tabular-nums}
.mute{color:var(--mute)} .small{font-size:13px} .b{font-weight:700} .nowrap{white-space:nowrap}
.row{display:flex;align-items:center;gap:10px} .row.wrap{flex-wrap:wrap} .grow{flex:1;min-width:0}
.stack{display:flex;flex-direction:column;gap:12px}
.sr{position:absolute;width:1px;height:1px;overflow:hidden;clip:rect(0 0 0 0);white-space:nowrap}
/* No border-radius here. It used to set 6px, which overrode whatever the
   focused element's own radius was — so a 10px button got an 8px ring round
   it, and a round one got a square-ish ring. The outline follows the element's
   own corners instead. */
:focus-visible{outline:2.5px solid var(--blue2);outline-offset:2px}
.ic{width:20px;height:20px;flex:none;stroke:currentColor;fill:none;stroke-width:1.9;stroke-linecap:round;stroke-linejoin:round}
.ic.s{width:16px;height:16px} .ic.l{width:24px;height:24px} .ic.xl{width:30px;height:30px}

/* ───────── buttons
   A filled button used to carry two rings: the fill colour at 2px and a
   white one at 3.5px. The white one sits INSIDE the edge, so its corners
   are drawn at (the button's radius minus 2px) — a tighter curve than the
   button's own. Against a dark page that mismatch reads as a white outline
   that cuts across the corner and breaks up, which is why it looked ragged
   in dark mode and fine in light, where the page is nearly the same colour
   as the ring.

   One ring now, at the edge, so it follows the button's own radius exactly
   and is the same width on all four sides. */
.btn{display:inline-flex;align-items:center;justify-content:center;gap:8px;min-height:44px;padding:0 18px;border-radius:10px;
  font-weight:700;font-size:15px;line-height:1;white-space:nowrap;background:var(--card);color:var(--ink);
  box-shadow:inset 0 0 0 1.5px var(--line2);transition:transform .16s var(--ease),background .16s,box-shadow .16s,opacity .16s}
.btn:active{transform:scale(.97)}
/* A FILLED BUTTON HAS ONE EDGE AND NOTHING ELSE.

   The ring used to be an inset box-shadow at 1.5px. A shadow is painted, not
   laid out: on a screen whose pixels do not line up with CSS pixels — most
   laptops — the outermost half pixel stayed full red while the 1.5px inside it
   went dark, and the result was a bright fringe running round the outside that
   broke up at the corners. It read as a ragged, cut-off outline, worst on a
   dark page where red against near-black has nowhere to hide.

   It is a real border now. A border is part of the box: it sits on the same
   pixel grid as the element, it follows the border-radius exactly, and it is
   the same width on all four sides at any zoom. No shadow, no outline, no
   second ring. */
.btn.go{background:var(--red);color:#fff;border:1px solid rgba(0,0,0,.22);box-shadow:none}
.btn.stop{background:var(--red);color:#fff;border:1px solid rgba(0,0,0,.22);box-shadow:none}
.btn.info{background:var(--blue);color:#fff;border:1px solid rgba(0,0,0,.22);box-shadow:none}
.btn.warn{background:var(--yellow);color:var(--ink);border:1px solid rgba(0,0,0,.22);box-shadow:none}
.btn.white{background:#fff;color:#8E0820;box-shadow:none}
.btn.ghost{box-shadow:none;background:transparent;color:var(--ink2)}
.btn.sm{min-height:40px;padding:0 13px;font-size:13.5px;border-radius:9px}
.btn.lg{min-height:52px;font-size:16.5px;padding:0 24px;border-radius:12px}
.btn.wide{width:100%}
.btn.icon{width:44px;padding:0} .btn.icon.sm{width:40px}
.btn[disabled]{opacity:.45;pointer-events:none}
.btn.busy{pointer-events:none;color:transparent!important;position:relative}
.btn.busy::after{content:"";position:absolute;width:18px;height:18px;border-radius:50%;border:2.5px solid rgba(255,255,255,.5);border-top-color:#fff;animation:spin .7s linear infinite}
.btn.busy:not(.go):not(.stop):not(.info)::after{border-color:var(--line2);border-top-color:var(--ink)}
@media (hover:hover){
  .btn:hover{box-shadow:inset 0 0 0 1.5px var(--ink2)}
  .btn.go:hover{background:#B30926;box-shadow:none}
  .btn.stop:hover{background:var(--red-hov);box-shadow:none}
  .btn.info:hover{background:var(--blue-hov);box-shadow:none}
  .btn.ghost:hover{background:var(--soft2);box-shadow:none}
  .btn.white:hover{box-shadow:none;background:#FFF5F6;color:#8E0820}
}
.link{color:var(--blue2);font-weight:700}
@keyframes spin{to{transform:rotate(360deg)}}

/* ───────── forms */
.field{display:flex;flex-direction:column;gap:6px}
.field>label,.label{font-size:13.5px;font-weight:700;color:var(--ink2)}
.input,select.input,textarea.input{width:100%;min-height:48px;padding:0 14px;border-radius:10px;border:1.5px solid var(--line2);background:var(--card);
  font-size:16px;font-weight:500;outline:0;transition:border-color .15s,box-shadow .15s;-webkit-appearance:none;appearance:none}
textarea.input{padding:12px 14px;min-height:110px;line-height:1.5;resize:vertical}
.input:focus{border-color:var(--red2);box-shadow:0 0 0 3.5px var(--red-t)}
.input::placeholder{color:var(--faint);font-weight:400}
.input.bad{border-color:var(--red2);box-shadow:0 0 0 3.5px var(--red-t)}
select.input{background-image:url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='20' height='20' fill='none' stroke='%2364707A' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='m5 8 5 5 5-5'/%3E%3C/svg%3E");background-repeat:no-repeat;background-position:right 12px center;padding-right:40px}
.help{font-size:13px;color:var(--mute)} .errtext{font-size:13.5px;color:var(--red2);font-weight:600}
.phone{display:flex;align-items:stretch;border-radius:10px;border:1.5px solid var(--line2);background:var(--card);overflow:hidden;transition:border-color .15s,box-shadow .15s}
.phone:focus-within{border-color:var(--red2);box-shadow:0 0 0 3.5px var(--red-t)}
.phone>span{display:flex;align-items:center;padding:0 12px;background:var(--soft);font-weight:700;color:var(--ink2);border-right:1.5px solid var(--line)}
.phone>input{flex:1;min-width:0;border:0;outline:0;min-height:48px;padding:0 12px;font-size:16px;font-weight:600;letter-spacing:.02em;background:transparent}
.pw{position:relative}.pw .input{padding-right:48px}.pw button{position:absolute;right:4px;top:4px;width:40px;height:40px;display:grid;place-items:center;color:var(--mute);border-radius:8px}
.switch{position:relative;width:46px;height:28px;border-radius:99px;background:var(--line2);transition:background .2s;flex:none}
.switch::after{content:"";position:absolute;left:3px;top:3px;width:22px;height:22px;border-radius:50%;background:#fff;box-shadow:0 1px 3px rgba(0,0,0,.25);transition:transform .28s var(--spring)}
.switch[aria-checked="true"]{background:var(--green2)}
.switch[aria-checked="true"]::after{transform:translateX(18px)}
.switch.red[aria-checked="true"]{background:var(--red)}
.check{width:22px;height:22px;border-radius:6px;border:1.75px solid var(--line2);background:var(--card);display:grid;place-items:center;flex:none;transition:.15s;color:transparent}
.check[aria-checked="true"]{background:var(--green);border-color:var(--green);color:#fff}
.check .ic{width:15px;height:15px;stroke-width:3}
.seg{display:inline-flex;padding:3px;border-radius:10px;background:var(--soft2);gap:2px;max-width:100%;overflow-x:auto;scrollbar-width:none}
.seg::-webkit-scrollbar{display:none}
.seg button{min-height:42px;padding:0 13px;border-radius:8px;font-weight:700;font-size:13.5px;color:var(--mute);white-space:nowrap;transition:color .15s,background .15s}
.seg button[aria-pressed="true"]{background:var(--card);color:var(--ink);box-shadow:0 1px 2px rgba(1,0,76,.14)}

/* ───────── plates (status labels) */
.plate{display:inline-flex;align-items:center;gap:5px;height:24px;padding:0 8px;border-radius:6px;font-size:12.5px;font-weight:700;white-space:nowrap;background:var(--soft2);color:var(--ink2)}
.plate.ok{background:var(--green-t);color:var(--green3)} .plate.bad{background:var(--red-t);color:var(--red2)}
.plate.warn{background:var(--yellow-t);color:var(--yellow-ink)} .plate.info{background:var(--blue-t);color:var(--blue3)}
.plate.work{background:var(--orange-t);color:var(--orange-ink)}
.plate .ic{width:14px;height:14px;stroke-width:2.4}

/* ───────── cards and lists */
.card{background:var(--card);border:1px solid var(--line);border-radius:var(--r)}
.card.pad{padding:18px}
.card.tap{transition:transform .18s var(--ease),border-color .18s}
.card.tap:active{transform:scale(.985)}
@media (hover:hover){.card.tap:hover{border-color:var(--line2);transform:translateY(-1px)}}
.sec-head{display:flex;align-items:baseline;justify-content:space-between;gap:12px;margin:28px 0 12px}
.sec-head:first-child{margin-top:0}
.list{background:var(--card);border:1px solid var(--line);border-radius:var(--r);overflow:hidden}
.list>*+*{border-top:1px solid var(--line)}
.li{display:flex;align-items:center;gap:12px;padding:12px 14px;width:100%;text-align:left;min-height:56px;transition:background .12s}
button.li:active,a.li:active{background:var(--soft)}
@media (hover:hover){button.li:hover,a.li:hover{background:#F8FAF9}}
.li .t{font-weight:700;line-height:1.25} .li .s{font-size:13px;color:var(--mute);line-height:1.3}
.av{width:40px;height:40px;border-radius:50%;display:grid;place-items:center;font-weight:800;font-size:14px;color:#fff;background:var(--blue);flex:none;position:relative;letter-spacing:.02em}
.av.sm{width:32px;height:32px;font-size:12px} .av.lg{width:64px;height:64px;font-size:22px}
/* A face is a plate: it carries white type, so it keeps its colour in both
   themes and every one of these holds white above 4.5. */
.av.c0{background:#12499B}.av.c1{background:#0A6B4B}.av.c2{background:#D21030}.av.c3{background:#0C3676}.av.c4{background:#6B4A33}.av.c5{background:#3C4850}
/* The active light belongs on the edge of the circle, not painted inside it.
   Offsetting from the corner put its centre a fraction INSIDE the edge, so on
   a 32px face most of the dot sat on top of the picture. 85.36% is where a
   circle's edge crosses the 45 degree line, so a hair past that puts the dot
   astride the edge at every size the avatar comes in. */
.av .on{position:absolute;left:90%;top:90%;right:auto;bottom:auto;transform:translate(-50%,-50%);
  width:clamp(9px,36%,15px);aspect-ratio:1;height:auto;border-radius:50%;
  background:#19B56B;border:2.5px solid var(--card);box-sizing:border-box;
  box-shadow:0 0 0 .5px rgba(0,0,0,.25)}
.empty{padding:36px 20px;text-align:center;color:var(--mute);display:flex;flex-direction:column;align-items:center;gap:10px}
.empty h3{color:var(--ink)} .empty .art{width:120px;height:120px;color:var(--line2)}
.skel{border-radius:10px;background:linear-gradient(90deg,var(--soft2) 0%,#F6F8F7 45%,var(--soft2) 90%);background-size:200% 100%;animation:shim 1.2s linear infinite}
@keyframes shim{to{background-position:-200% 0}}
.meter{height:8px;border-radius:99px;background:var(--soft2);overflow:hidden}
.meter>i{display:block;height:100%;border-radius:99px;background:var(--green2);transform-origin:left;transition:width .6s var(--ease)}

/* ───────── road signs */
.sign{position:relative;border-radius:var(--r-sign);padding:20px;color:#fff;background:var(--red);
  box-shadow:inset 0 0 0 3px var(--red),inset 0 0 0 5px rgba(255,255,255,.92),0 14px 28px -20px var(--red2)}
.sign.blue{background:var(--blue);box-shadow:inset 0 0 0 3px var(--blue),inset 0 0 0 5px rgba(255,255,255,.92),0 14px 28px -20px var(--blue3)}
.sign.brown{background:var(--brown);box-shadow:inset 0 0 0 3px var(--brown),inset 0 0 0 5px rgba(255,255,255,.92),0 14px 28px -20px #3d2a1c}
.sign.red{background:var(--red);box-shadow:inset 0 0 0 3px var(--red),inset 0 0 0 5px rgba(255,255,255,.92),0 14px 28px -20px var(--red2)}
.sign.yellow{background:var(--yellow);color:var(--ink);box-shadow:inset 0 0 0 3px var(--yellow),inset 0 0 0 5px var(--ink),0 14px 28px -20px var(--yellow2)}
.sign .way{font-size:12.5px;font-weight:800;letter-spacing:.08em;text-transform:uppercase;opacity:.92}
.sign .dest{font-size:clamp(24px,5.6vw,34px);font-weight:800;line-height:1.08;letter-spacing:-.01em;text-wrap:balance}
.exit-tab{position:absolute;right:22px;top:-25px;height:30px;padding:0 12px 0 13px;display:flex;align-items:center;gap:7px;border-radius:9px 9px 0 0;
  background:inherit;color:inherit;font-weight:800;font-size:13px;letter-spacing:.08em;
  box-shadow:inset 0 3px 0 var(--red),inset 3px 0 0 var(--red),inset -3px 0 0 var(--red),inset 0 5px 0 rgba(255,255,255,.92),inset 5px 0 0 rgba(255,255,255,.92),inset -5px 0 0 rgba(255,255,255,.92)}
.sign.blue .exit-tab{box-shadow:inset 0 3px 0 var(--blue),inset 3px 0 0 var(--blue),inset -3px 0 0 var(--blue),inset 0 5px 0 rgba(255,255,255,.92),inset 5px 0 0 rgba(255,255,255,.92),inset -5px 0 0 rgba(255,255,255,.92)}
.exit-tab b{font-size:17px;letter-spacing:0}
.has-tab{margin-top:25px}
.arrow-ne{width:44px;height:44px;flex:none}

/* small exit plaque used in lists */
.exit{display:inline-flex;flex-direction:column;align-items:center;justify-content:center;width:46px;height:46px;border-radius:9px;flex:none;
  background:var(--red);color:#fff;box-shadow:inset 0 0 0 2px var(--red),inset 0 0 0 3.2px rgba(255,255,255,.9);line-height:1}
.exit small{font-size:8.5px;font-weight:800;letter-spacing:.1em;opacity:.9}
.exit b{font-size:19px;font-weight:800;margin-top:1px}
.exit.off{background:var(--soft2);color:var(--exit-off);box-shadow:inset 0 0 0 2px var(--soft2),inset 0 0 0 3.2px #fff}
.exit.done{background:var(--card);color:var(--green3);box-shadow:inset 0 0 0 2.5px var(--green3)}

/* interstate shield */
.shield{width:52px;height:52px;flex:none;position:relative;display:grid;place-items:center}
.shield svg{position:absolute;inset:0;width:100%;height:100%}
.shield b{position:relative;color:#fff;font-weight:900;font-size:22px;line-height:1;margin-top:9px;letter-spacing:-.02em}
.shield.sm{width:38px;height:38px}.shield.sm b{font-size:16px;margin-top:7px}
.shield.lg{width:76px;height:76px}.shield.lg b{font-size:33px;margin-top:14px}
.shield.off{filter:grayscale(1);opacity:.45}

/* ───────── split-flap */
.board{display:inline-flex;gap:14px;flex-wrap:wrap;padding:12px 14px;border-radius:12px;background:#2A3137;box-shadow:inset 0 0 0 1px #3B444B,inset 0 2px 8px rgba(0,0,0,.35)}
.board .col{display:flex;flex-direction:column;gap:6px}
/* On a 320px screen the board's columns are narrower than the word LESSON,
   and the tracking pushed it out of its own column and across the caption
   beside it. It gives up its letter-spacing first, then truncates. */
.bcap{font-size:10.5px;font-weight:800;letter-spacing:.12em;text-transform:uppercase;color:#9FAAB1;
  max-width:100%;white-space:nowrap;overflow:hidden;text-overflow:clip}
@media (max-width:380px){.bcap{letter-spacing:.04em;font-size:9.5px}}
.flaps{display:flex;gap:2.5px}
.flap{position:relative;width:1.06em;height:1.56em;font-size:24px;font-weight:800;color:var(--flap-ink);perspective:160px;font-variant-numeric:tabular-nums}
.flap.gap{width:.5em;visibility:hidden}
.flap>span{position:absolute;left:0;width:100%;height:50%;overflow:hidden;background:var(--flap);display:block;text-align:center;backface-visibility:hidden}
.flap>span>i{display:block;font-style:normal;height:1.56em;line-height:1.62em}
.flap .t,.flap .ft{top:0;border-radius:4px 4px 0 0;box-shadow:inset 0 -1px 0 rgba(0,0,0,.55)}
.flap .b,.flap .fb{bottom:0;border-radius:0 0 4px 4px;background:#20262B}
.flap .b>i,.flap .fb>i{transform:translateY(-50%)}
.flap .ft{transform-origin:50% 100%;z-index:2}
.flap .fb{transform-origin:50% 0;transform:rotateX(90deg);z-index:2}
.board.sm .flap{font-size:18px}

/* ───────── blueprint panel */
.bp{position:relative;overflow:hidden;border-radius:var(--r-sign);background:var(--blue);color:#fff;
  background-image:linear-gradient(rgba(255,255,255,.11) 1px,transparent 1px),linear-gradient(90deg,rgba(255,255,255,.11) 1px,transparent 1px),
    linear-gradient(rgba(255,255,255,.05) 1px,transparent 1px),linear-gradient(90deg,rgba(255,255,255,.05) 1px,transparent 1px);
  background-size:80px 80px,80px 80px,16px 16px,16px 16px;background-position:-1px -1px}
.bp svg.art{color:#fff}
.art .m{stroke-width:1.6} .art .c{stroke-width:.8;opacity:.6;stroke-dasharray:.012 .012}
.art.draw .m,.art.draw .c{stroke-dasharray:1;stroke-dashoffset:1;animation:draw .7s var(--ease) forwards;animation-delay:calc(min(var(--i,0),6)*28ms)}
.art.draw .c{animation-duration:.7s}
@keyframes draw{to{stroke-dashoffset:0}}
.bp .title-block{position:absolute;right:12px;bottom:12px;padding:6px 10px;border:1px solid rgba(255,255,255,.55);font-size:11.5px;font-weight:700;line-height:1.3;letter-spacing:.04em;text-align:left;background:rgba(18,73,155,.7)}
.bp .title-block span{display:block;font-weight:500;opacity:.8}

/* ───────── kinetic type */
.kin{display:inline-block}
.kin .w{display:inline-block;overflow:hidden;vertical-align:bottom;padding-bottom:.08em;margin-bottom:-.08em}
.kin .w>i{display:inline-block;font-style:normal;transform:translateY(105%) rotate(4deg);transform-origin:0 100%;animation:kin .7s var(--ease) forwards;animation-delay:calc(min(var(--i),8)*70ms + var(--d,0ms))}
@keyframes kin{to{transform:none}}
.rise{animation:rise .5s var(--ease) both;animation-delay:calc(min(var(--i,0),6)*45ms)}
@keyframes rise{from{opacity:0;transform:translateY(10px)}}
.pop{animation:pop .45s var(--spring) both}
@keyframes pop{from{opacity:0;transform:scale(.9)}}
.shake{animation:shake .4s}
@keyframes shake{20%{transform:translateX(-6px)}40%{transform:translateX(5px)}60%{transform:translateX(-3px)}80%{transform:translateX(2px)}}

/* ───────── overlays */
.scrim{position:fixed;inset:0;z-index:80;background:rgba(1,0,76,.42);opacity:0;transition:opacity .25s;display:flex;align-items:flex-end;justify-content:center}
.scrim.in{opacity:1}
.sheet{width:100%;max-width:560px;max-height:calc(100dvh - 24px - var(--sat));background:var(--card);border-radius:20px 20px 0 0;display:flex;flex-direction:column;
  transform:translateY(100%);transition:transform .38s var(--ease);box-shadow:var(--shadow-up);padding-bottom:var(--sab)}
.scrim.in .sheet{transform:none}
.sheet-head{display:flex;align-items:center;gap:10px;padding:16px 18px 8px}
.sheet-head h2{flex:1;min-width:0}
.sheet-body{padding:8px 18px 20px;overflow-y:auto;overscroll-behavior:contain;-webkit-overflow-scrolling:touch}
.sheet-foot{padding:12px 18px 16px;border-top:1px solid var(--line);display:flex;gap:10px}
.sheet-foot .btn{flex:1}
@media (min-width:720px){.scrim{align-items:center}.sheet{border-radius:18px;transform:translateY(16px) scale(.98);opacity:0;transition:transform .28s var(--ease),opacity .2s;max-height:min(760px,calc(100dvh - 48px))}.scrim.in .sheet{opacity:1}.sheet.wide{max-width:760px}}
.toasts{position:fixed;left:50%;bottom:calc(var(--tab) + var(--sab) + 14px);z-index:95;transform:translateX(-50%);display:flex;flex-direction:column;gap:8px;align-items:center;pointer-events:none;width:max-content;max-width:calc(100vw - 24px)}
.toast{display:flex;align-items:center;gap:9px;padding:11px 15px;border-radius:11px;background:#0A0B2E;color:#F2F4F3;font-weight:600;font-size:14.5px;box-shadow:var(--shadow-up);animation:toast .35s var(--spring) both}
/* the same surface as the selection bar, and for the same reason: built
   from --ink on --paper it flipped to a white slab in a dark app */
:root[data-theme="dark"] .toast{background:#12154A;box-shadow:var(--shadow-up),inset 0 0 0 1px var(--line2)}
@media (prefers-color-scheme:dark){
  :root:not([data-theme="light"]) .toast{background:#12154A;box-shadow:var(--shadow-up),inset 0 0 0 1px var(--line2)}
}
.toast.out{animation:toastout .25s var(--ease-in) forwards}
.toast.bad{background:var(--red)} .toast .ic{width:18px;height:18px}
@keyframes toast{from{opacity:0;transform:translateY(14px) scale(.96)}} @keyframes toastout{to{opacity:0;transform:translateY(8px)}}
@media (min-width:900px){.toasts{bottom:24px}}
.banner{position:fixed;z-index:90;left:50%;top:calc(var(--sat) + 10px);width:min(440px,calc(100vw - 20px));transform:translate(-50%,-140%);transition:transform .45s var(--spring);
  background:var(--card);border-radius:14px;box-shadow:var(--shadow-up);border:1px solid var(--line);padding:12px 14px;display:flex;gap:12px;align-items:flex-start;text-align:left}
.banner.in{transform:translate(-50%,0)}
.banner .bi{width:40px;height:40px;border-radius:10px;display:grid;place-items:center;flex:none;background:var(--red);color:#fff}
.banner.pay .bi{background:var(--yellow);color:var(--ink)} .banner.lesson .bi{background:var(--green)} .banner.info .bi{background:var(--blue)}
.banner .t{font-weight:800;line-height:1.25} .banner .s{font-size:13.5px;color:var(--ink2);line-height:1.35;margin-top:2px}
.fxlayer{position:fixed;inset:0;z-index:99;pointer-events:none}

@media (prefers-reduced-motion:reduce){
  *,*::before,*::after{animation-duration:.01ms!important;animation-delay:0s!important;transition-duration:.01ms!important}
  .kin .w>i{transform:none}
}

/* ───── DARK ───── */

/* ─────────────────────────────────────────────────────────────────────────
   Dark. The paper goes to asphalt and the ink comes up out of it.

   A sign is a sign at night too: the green guide sign, the blue banner, the
   red shield and the yellow warning keep their colours and their white type.
   What inverts is the ink — the "3" and "2" variants, which were the darkest
   end on paper and become the lightest end here.
   ───────────────────────────────────────────────────────────────────────── */
:root[data-theme="dark"]{
  color-scheme:dark;
  --paper:#05061A; --card:#0C0E38; --ink:#E8EDEE; --ink2:#BFC9CD; --mute:#94A1A7; --faint:#7F8C94;
  --line:#272E32; --line2:#384247; --exit-off:#9AA7AE; --soft:#1B2124; --soft2:#222A2E;

  /* plates keep their hue, lifted just enough to sit on asphalt;
     the ink variants invert */
  --green:#0C7A56; --green2:#109A6E; --green3:#5FD6A6; --green-t:#0C2820;
  --blue:#1A5CBD; --blue2:#7FB2FF; --blue3:#A8CBFF; --blue-t:#122236; --blue-hov:#2E73D6;
  --red:#C8102E; --red2:#FF7083; --red-t:#2B1217; --red-hov:#E01539;
  --yellow:#FFC629; --yellow2:#FFD970; --yellow-t:#2C2412; --yellow-ink:#FFE4A3;
  --orange:#E8611A; --orange-t:#2C1810; --orange-ink:#FFBE92;
  --brown:#8A6448; --brown-t:#241C16;
  --flap:#07090A; --flap-ink:#F7F3E3;

  --shadow:0 1px 0 rgba(0,0,0,.5), 0 10px 26px -18px rgba(0,0,0,.9);
  --shadow-up:0 20px 54px -20px rgba(0,0,0,.95), 0 2px 8px rgba(0,0,0,.6);
}

/* a card lifts off asphalt by light, not by shadow */
:root[data-theme="dark"] .card,:root[data-theme="dark"] .panel,:root[data-theme="dark"] .sheet,
:root[data-theme="dark"] .q-card,:root[data-theme="dark"] .stage-card,:root[data-theme="dark"] .pass,
:root[data-theme="dark"] .tgprev,:root[data-theme="dark"] .notice{
  box-shadow:var(--shadow),inset 0 1px 0 rgba(255,255,255,.05);
}

/* ── the sixteen surfaces that were written as fixed light values ── */
:root[data-theme="dark"] .btn.white:hover{background:#191C5C}
:root[data-theme="dark"] button.li:hover,:root[data-theme="dark"] a.li:hover{background:#191C5C}
:root[data-theme="dark"] .skel{background:#1E2427}
:root[data-theme="dark"] .notice{background:#2C2412;border-color:#4A3D1C}
:root[data-theme="dark"] .notice.bad{background:#2E141A;border-color:#5A2630}
:root[data-theme="dark"] .scene{background:#16202C}
:root[data-theme="dark"] .tf .li.right{background:#0E2A20}
:root[data-theme="dark"] .tf .li.wrong{background:#2E141A}
:root[data-theme="dark"] .chip.in{background:#28435F}
:root[data-theme="dark"] .bitem.right,:root[data-theme="dark"] .sitem.right{background:#0E2A20}
:root[data-theme="dark"] .bitem.wrong,:root[data-theme="dark"] .sitem.wrong{background:#2E141A}
:root[data-theme="dark"] .btn.stopish{background:#4A2028}
:root[data-theme="dark"] .tg-convo{background:#12171A}
:root[data-theme="dark"] .bubble.mine{background:#123B2C}
:root[data-theme="dark"] .trow.sel{background:#102A20}
:root[data-theme="dark"] .tgprev{background:#1A232C}

/* glass bars: a white glass over asphalt is still white, so they are rebuilt
   dark. The blur is what makes them glass — without it the page simply shows
   through, and a card scrolling under the bar is read straight through it. */
:root[data-theme="dark"] .topbar{background:rgba(5,6,26,.9);-webkit-backdrop-filter:blur(14px) saturate(140%);backdrop-filter:blur(14px) saturate(140%)}
:root[data-theme="dark"] .tabbar{background:rgba(5,6,26,.94);-webkit-backdrop-filter:blur(14px) saturate(140%);backdrop-filter:blur(14px) saturate(140%)}
:root[data-theme="dark"] .tg-quick{background:rgba(12,14,56,.8)}

/* the page's own paper texture */
:root[data-theme="dark"] ::selection{background:var(--red);color:#fff}
:root[data-theme="dark"] img:not([src*=".svg"]){filter:brightness(.92)}

/* and the same again for anyone who has never touched the switch */
@media (prefers-color-scheme:dark){
:root:not([data-theme="light"]){
  color-scheme:dark;
  --paper:#05061A; --card:#0C0E38; --ink:#E8EDEE; --ink2:#BFC9CD; --mute:#94A1A7; --faint:#7F8C94;
  --line:#272E32; --line2:#384247; --exit-off:#9AA7AE; --soft:#1B2124; --soft2:#222A2E;

  /* plates keep their hue, lifted just enough to sit on asphalt;
     the ink variants invert */
  --green:#0C7A56; --green2:#109A6E; --green3:#5FD6A6; --green-t:#0C2820;
  --blue:#1A5CBD; --blue2:#7FB2FF; --blue3:#A8CBFF; --blue-t:#122236; --blue-hov:#2E73D6;
  --red:#C8102E; --red2:#FF7083; --red-t:#2B1217; --red-hov:#E01539;
  --yellow:#FFC629; --yellow2:#FFD970; --yellow-t:#2C2412; --yellow-ink:#FFE4A3;
  --orange:#E8611A; --orange-t:#2C1810; --orange-ink:#FFBE92;
  --brown:#8A6448; --brown-t:#241C16;
  --flap:#07090A; --flap-ink:#F7F3E3;

  --shadow:0 1px 0 rgba(0,0,0,.5), 0 10px 26px -18px rgba(0,0,0,.9);
  --shadow-up:0 20px 54px -20px rgba(0,0,0,.95), 0 2px 8px rgba(0,0,0,.6);
}

/* a card lifts off asphalt by light, not by shadow */
:root:not([data-theme="light"]) .card,:root:not([data-theme="light"]) .panel,:root:not([data-theme="light"]) .sheet,
:root:not([data-theme="light"]) .q-card,:root:not([data-theme="light"]) .stage-card,:root:not([data-theme="light"]) .pass,
:root:not([data-theme="light"]) .tgprev,:root:not([data-theme="light"]) .notice{
  box-shadow:var(--shadow),inset 0 1px 0 rgba(255,255,255,.05);
}

/* ── the sixteen surfaces that were written as fixed light values ── */
:root:not([data-theme="light"]) .btn.white:hover{background:#191C5C}
:root:not([data-theme="light"]) button.li:hover,:root:not([data-theme="light"]) a.li:hover{background:#191C5C}
:root:not([data-theme="light"]) .skel{background:#1E2427}
:root:not([data-theme="light"]) .notice{background:#2C2412;border-color:#4A3D1C}
:root:not([data-theme="light"]) .notice.bad{background:#2E141A;border-color:#5A2630}
:root:not([data-theme="light"]) .scene{background:#16202C}
:root:not([data-theme="light"]) .tf .li.right{background:#0E2A20}
:root:not([data-theme="light"]) .tf .li.wrong{background:#2E141A}
:root:not([data-theme="light"]) .chip.in{background:#28435F}
:root:not([data-theme="light"]) .bitem.right,:root:not([data-theme="light"]) .sitem.right{background:#0E2A20}
:root:not([data-theme="light"]) .bitem.wrong,:root:not([data-theme="light"]) .sitem.wrong{background:#2E141A}
:root:not([data-theme="light"]) .btn.stopish{background:#4A2028}
:root:not([data-theme="light"]) .tg-convo{background:#12171A}
:root:not([data-theme="light"]) .bubble.mine{background:#123B2C}
:root:not([data-theme="light"]) .trow.sel{background:#102A20}
:root:not([data-theme="light"]) .tgprev{background:#1A232C}

/* glass bars: a white glass over asphalt is still white, so they are rebuilt
   dark. The blur is what makes them glass — without it the page simply shows
   through, and a card scrolling under the bar is read straight through it. */
:root:not([data-theme="light"]) .topbar{background:rgba(5,6,26,.9);-webkit-backdrop-filter:blur(14px) saturate(140%);backdrop-filter:blur(14px) saturate(140%)}
:root:not([data-theme="light"]) .tabbar{background:rgba(5,6,26,.94);-webkit-backdrop-filter:blur(14px) saturate(140%);backdrop-filter:blur(14px) saturate(140%)}
:root:not([data-theme="light"]) .tg-quick{background:rgba(12,14,56,.8)}

/* the page's own paper texture */
:root:not([data-theme="light"]) ::selection{background:var(--red);color:#fff}
:root:not([data-theme="light"]) img:not([src*=".svg"]){filter:brightness(.92)}

}

/* Where the blur cannot be drawn there is no glass to see through, so the bars
   are solid instead of a window onto the page sliding under them. */
@supports not ((backdrop-filter:blur(1px)) or (-webkit-backdrop-filter:blur(1px))){
  :root[data-theme="dark"] .topbar,:root[data-theme="dark"] .tabbar,
  :root:not([data-theme="light"]) .topbar,:root:not([data-theme="light"]) .tabbar{background:var(--card)}
}
/* 23 Nov: pages move up and down only. Nothing wider than the screen may let a
   page be dragged sideways or wobble off its line (rows that scroll sideways,
   like the word chips, still scroll inside themselves). clip, not hidden, so
   sticky headers keep working. */
html,body{overflow-x:clip;overscroll-behavior-x:none}
#app,.page,.np-body,.np-run,.np-stage{overflow-x:clip}
/* ───────── staggers that do not grow with the list
   Every one of these delays an element by its position, which reads beautifully
   for the first few and then becomes a wait: a hundred and nine students at
   22ms each is two and a half seconds before the last row of the list exists,
   and a page of ten drawings at 1.1 seconds each took two and a half seconds to
   finish arriving. Measured on a throttled phone, not guessed at.

   The position is clamped, so the stagger still reads as a stagger on the first
   few rows and the hundredth row is no later than the seventh. Nothing is
   removed; it simply stops being charged by the row. */
/* ───────── shell */
/* The bar sits over the page, so anything scrolled into view has to stop
   below it — otherwise a heading lands underneath and reads as cut off. The
   views that hide the bar scroll to the top of the window instead. */
html{scroll-padding-top:calc(var(--top) + var(--sat) + 12px)}
html:has(body[data-tab="lesson"]),html:has(body[data-tab="study"]),html:has(body[data-tab="teach"]){scroll-padding-top:12px}
.topbar{position:sticky;top:0;z-index:40;display:flex;align-items:center;gap:14px;height:calc(var(--top) + var(--sat));padding:var(--sat) max(16px,env(safe-area-inset-right)) 0 max(16px,env(safe-area-inset-left));
  background:var(--card);border-bottom:1px solid var(--line)}
.brand{display:flex;align-items:center;gap:10px;color:var(--ink);font-weight:800;font-size:17px;letter-spacing:-.01em;cursor:pointer}
.brand svg{width:34px;height:34px;border-radius:9px}
.role-tag{font-size:11px;font-weight:800;letter-spacing:.08em;text-transform:uppercase;padding:3px 7px;border-radius:5px;background:var(--red);color:#fff}
/* a head teacher and a support teacher are teachers, so they take the
   teacher's colour; the word on the badge is what tells them apart */
.role-tag.teacher,.role-tag.head,.role-tag.support{background:var(--blue)} .role-tag.admin{background:var(--red)}
.nav{display:none;gap:4px;margin-left:10px;flex:1}
.nav a{position:relative;display:flex;align-items:center;gap:7px;height:var(--top);padding:0 12px;color:var(--mute);font-weight:700;font-size:14.5px;cursor:pointer;transition:color .15s}
.nav a::after{content:"";position:absolute;left:12px;right:12px;bottom:0;height:4px;border-radius:4px 4px 0 0;background:var(--red);transform:scaleX(0);transition:transform .3s var(--ease)}
.nav a.on{color:var(--ink)} .nav a.on::after{transform:none}
@media (hover:hover){.nav a:hover{color:var(--ink)}}
.top-r{margin-left:auto;display:flex;align-items:center;gap:2px}
.bell{position:relative}
.dot{position:absolute;min-width:18px;height:18px;padding:0 5px;border-radius:9px;background:var(--red);color:#fff;font-size:11px;font-weight:800;font-style:normal;display:grid;place-items:center;line-height:1;box-shadow:0 0 0 2px #fff}
.bell .dot{right:3px;top:3px} .nav a .dot{position:static;margin-left:2px;box-shadow:none}
.me-btn{margin-left:6px;border-radius:50%}
#main{display:block;outline:0;padding-bottom:calc(var(--tab) + var(--sab) + 28px)}
/* `backwards`, not `both`. `both` keeps the animation's TO frame applied for
   ever, and a filled `transform:none` computes to an identity matrix rather
   than to the keyword none — which still makes this element the containing
   block for anything `position:fixed` inside it. The selection bar on the
   students screen is fixed, so it was being pinned to the bottom of the PAGE
   instead of the bottom of the window: with 202 students that is 6,500px
   below the fold, and it looked as though selecting people did nothing.
   `backwards` keeps what this rule is actually for — holding the start frame
   so nothing flashes before the animation runs — and drops the fill that
   broke it. */
#main.enter>.page{animation:rise .35s var(--ease) backwards}
.page{max-width:1080px;margin:0 auto;padding:22px max(16px,env(safe-area-inset-right)) 0 max(16px,env(safe-area-inset-left))}
.page.narrow{max-width:640px}
.lead{margin:6px 0 20px;max-width:62ch}
.center-page{min-height:100dvh;display:grid;place-items:center;padding:24px 16px}
.tabbar{position:fixed;left:0;right:0;bottom:0;z-index:40;display:flex;height:calc(var(--tab) + var(--sab));padding:0 6px var(--sab);background:var(--card);border-top:1px solid var(--line)}
/* A head teacher does both jobs and so has the most tabs of anyone: nine.
   With a fixed 54px pill and no shrinking, nine of them wanted 492px and the
   last two fell off the side of a phone entirely — unreachable, not merely
   cramped. They share the width now, and the pill is a ceiling rather than a
   fixed size. */
.tabbar a{flex:1 1 0;min-width:0;padding:0 1px;display:flex;flex-direction:column;align-items:center;justify-content:center;gap:3px;color:var(--mute);font-size:11.5px;font-weight:700;cursor:pointer;-webkit-user-select:none;user-select:none}
.tabbar a>span:last-child{max-width:100%;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}
.tabbar .ti{position:relative;width:100%;max-width:54px;height:30px;border-radius:15px;display:grid;place-items:center;transition:background .25s var(--ease),color .2s,transform .2s var(--spring)}
/* eight or more of them on a narrow phone: the label is what gives way */
@media (max-width:420px){.tabbar a{font-size:10px;gap:2px} .tabbar .ti{height:28px}}
/* A student who has a support teacher has nine tabs, and on a small phone the
   longest labels were being cut off mid-word — "Progres", "Suppor" — which
   reads as a broken app rather than a narrow one. The type gives way instead,
   which keeps every word whole. */
@media (max-width:380px){.tabbar a{font-size:9px;padding:0}}
@media (max-width:340px){.tabbar a{font-size:8.5px;letter-spacing:-.2px}}
.tabbar a.on{color:var(--red2)} .tabbar a.on .ti{background:var(--red-t);color:var(--red2)}
/* The screens the phone's bar does not carry, as a row of tiles at the top of
   a student's Home. Same shape as the bar's pills, so they read as the same
   kind of thing. The desktop nav carries them all, so there the row is gone. */
.tiles{display:grid;grid-template-columns:repeat(6,minmax(0,1fr));gap:4px;margin:4px -6px 18px}
.tile{display:flex;flex-direction:column;align-items:center;gap:5px;padding:6px 0 2px;color:var(--ink2);font-size:11px;font-weight:700;text-decoration:none;border-radius:12px;cursor:pointer;-webkit-user-select:none;user-select:none;transition:transform .15s var(--spring)}
.tile:active{transform:scale(.94)}
.tile .ti{position:relative;width:46px;height:46px;border-radius:15px;display:grid;place-items:center;background:var(--card);box-shadow:inset 0 0 0 1px var(--line);color:var(--ink)}
.tile .dot{position:absolute;top:-4px;right:-4px;min-width:17px;height:17px;padding:0 4px;border-radius:9px;background:var(--red2);color:#fff;font-size:10px;line-height:17px;text-align:center;box-shadow:0 0 0 2px var(--paper)}
.tile>span:last-child{max-width:100%;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}
@media (max-width:380px){.tile{font-size:10px} .tile .ti{width:42px;height:42px;border-radius:13px}}
@media (min-width:900px){.tiles{display:none}}
.tabbar a:active .ti{transform:scale(.9)}
.tabbar .dot{right:4px;top:-3px}
body[data-tab="lesson"] .tabbar,body[data-tab="study"] .tabbar,body[data-tab="teach"] .tabbar,body[data-tab="teach"] .topbar{display:none}
body[data-tab="lesson"] #main,body[data-tab="study"] #main{padding-bottom:40px}
body[data-tab="teach"] #main{padding:0}
@media (min-width:900px){
  .nav{display:flex} .tabbar{display:none} #main{padding-bottom:60px} .page{padding-top:30px}
  .toasts{bottom:24px}
}
@media (max-width:899px){.brand .bw{display:none} .hide-s{display:none!important}}

/* ───────── sign-in */
.auth{min-height:100dvh;display:grid;grid-template-rows:minmax(250px,40dvh) 1fr;background:var(--card)}
.auth-art{border-radius:0;display:flex;align-items:flex-end;padding:22px 20px 20px;padding-top:calc(var(--sat) + 22px)}
canvas.torch{position:absolute;inset:0;width:100%;height:100%}
.auth-copy{position:relative;max-width:58%}
.auth-h{font-size:clamp(30px,6.4vw,56px);font-weight:900;line-height:1;letter-spacing:-.02em;text-wrap:balance}
.auth-copy p{margin-top:10px;font-weight:500;opacity:.9;max-width:34ch;line-height:1.4}
.auth-art .title-block{display:none}
.auth-form{display:flex;justify-content:center;padding:26px 20px calc(30px + var(--sab))}
.auth-box{width:100%;max-width:400px}
.auth-brand{display:flex;align-items:center;gap:12px;margin-bottom:22px}
.auth-brand svg{width:46px;height:46px;border-radius:12px}
.auth-brand b{display:block;font-size:19px;font-weight:800;line-height:1.1} .auth-brand span{font-size:13px;color:var(--mute);font-weight:600}
.auth-box .foot,.blocked .foot{margin-top:22px;text-align:center}
@media (min-width:900px){
  .auth{grid-template-rows:none;grid-template-columns:minmax(0,1.15fr) minmax(420px,.85fr)}
  .auth-art{padding:48px} .auth-copy{max-width:46%} .auth-art .title-block{display:block;bottom:48px;right:48px}
  .auth-form{align-items:center;padding:48px}
}
.blocked{width:100%;max-width:460px;display:flex;flex-direction:column;gap:14px}
.blocked .sign p{margin-top:10px;font-weight:500;opacity:.95}

/* account card */
.idcard{border-radius:16px;background:var(--card);border:1px solid var(--line);overflow:hidden;box-shadow:var(--shadow)}
.id-top{display:flex;justify-content:space-between;gap:10px;padding:9px 16px;background:var(--blue);color:#fff;font-size:11.5px;font-weight:800;letter-spacing:.08em;text-transform:uppercase}
.id-main{display:flex;align-items:center;gap:14px;padding:18px 16px}
.id-name{font-size:21px;font-weight:800;line-height:1.15} .id-sub{font-size:13.5px;color:var(--mute);margin-top:2px}
.id-stats{display:grid;grid-template-columns:repeat(3,1fr);border-top:1px solid var(--line)}
.id-stats div{padding:12px 8px;text-align:center} .id-stats div+div{border-left:1px solid var(--line)}
.id-stats b{display:block;font-size:22px;font-weight:800;line-height:1.1} .id-stats span{font-size:12px;color:var(--mute);font-weight:600}
.id-strip{padding:9px 16px;background:var(--soft);border-top:1px solid var(--line);font-size:12.5px;font-weight:600;letter-spacing:.14em;color:var(--mute);white-space:nowrap;overflow:hidden}
.li.notif .ni{width:38px;height:38px;border-radius:10px;display:grid;place-items:center;flex:none;background:var(--blue);color:#fff}
.ni.call{background:var(--red)} .ni.pay{background:var(--yellow);color:var(--ink)} .ni.lesson{background:var(--green)}
.li.notif.read{opacity:.62}

/* ───────── student home */
.hello{margin-bottom:18px} .hello .date{font-size:13.5px;font-weight:700;color:var(--mute);margin-bottom:4px}
.notice{display:flex;align-items:center;gap:12px;padding:12px 14px;border-radius:var(--r);background:var(--yellow-t);border:1px solid #F1DC96;color:var(--yellow-ink);margin-bottom:14px}
.notice.bad{background:var(--red-t);border-color:#F0BFC6;color:var(--red2)}
.notice .diamond{width:38px;height:38px;flex:none;display:grid;place-items:center;background:var(--yellow);color:var(--ink);border-radius:7px;transform:rotate(45deg);box-shadow:inset 0 0 0 2px var(--yellow),inset 0 0 0 3.2px var(--ink)}
.notice .diamond .ic{transform:rotate(-45deg);width:18px;height:18px}
.notice.bad .diamond{background:var(--red);color:#fff;box-shadow:inset 0 0 0 2px var(--red),inset 0 0 0 3.2px #fff}
.notice .small{color:inherit;opacity:.9}
.home-grid{display:grid;gap:16px;align-items:start}
@media (min-width:900px){.home-grid{grid-template-columns:minmax(0,1.5fr) minmax(0,1fr)}}
.next-sign{display:flex;flex-direction:column;gap:16px;cursor:pointer;transition:transform .2s var(--ease)}
.next-sign:active{transform:scale(.985)}
.next-sign .row.rtop{align-items:flex-start}
.sm-note{font-size:13.5px;font-weight:600;opacity:.92}
.lane{display:flex;gap:6px} .lane i{flex:1;height:8px;border-radius:2px;background:rgba(255,255,255,.28)}
.lane i.on{background:#fff;animation:lanein .5s var(--ease) both;animation-delay:calc(min(var(--i),5)*60ms + .25s)}
@keyframes lanein{from{transform:scaleX(0);transform-origin:left}}
.board-wrap{background:var(--card);border:1px solid var(--line);border-radius:var(--r-sign);padding:16px;display:flex;flex-direction:column;gap:12px}
.board-wrap .board{align-self:flex-start;max-width:100%}
a.li,a.rname{color:var(--ink)}
.bw-head h3{flex:1}
.bw-teacher{padding-top:12px;border-top:1px solid var(--line)}
.road{overflow-x:auto;scrollbar-width:none;margin:0 -16px;padding:4px 16px 8px;scroll-snap-type:x proximity}
.road::-webkit-scrollbar{display:none}
.road-in{display:flex;gap:0;position:relative;width:max-content;padding-top:8px}
.road-in::before{content:"";position:absolute;z-index:0;left:0;right:0;top:25px;height:14px;background:#3B444B;border-radius:7px}
.road-in::after{content:"";position:absolute;z-index:0;left:10px;right:10px;top:31px;height:2px;
  background:repeating-linear-gradient(90deg,#FFC629 0 14px,transparent 14px 26px);
  background-size:26px 2px;animation:roadrun 1.1s linear infinite}
/* The dashes run the way the student is travelling, so the road reads as a
   road rather than a drawn line. It is the background that moves, not the
   element, so nothing reflows and the stops stay where they are. */
@keyframes roadrun{from{background-position:0 0}to{background-position:-26px 0}}
@media (prefers-reduced-motion:reduce){.road-in::after{animation:none}}
.rstop{position:relative;z-index:1;width:104px;display:flex;flex-direction:column;align-items:center;gap:8px;text-align:center;scroll-snap-align:center;cursor:pointer;color:var(--ink)}
.rstop .st{font-size:12px;font-weight:700;line-height:1.25;padding:0 6px;display:-webkit-box;-webkit-line-clamp:2;-webkit-box-orient:vertical;overflow:hidden}
.rstop.off{cursor:default} .rstop.off .st{color:var(--faint)}
.rstop .exit{transition:transform .25s var(--spring)}
.rstop.cur .exit{transform:scale(1.14);box-shadow:inset 0 0 0 2px var(--red),inset 0 0 0 3.2px rgba(255,255,255,.9),0 0 0 4px var(--paper),0 0 0 6px var(--red)}
@media (hover:hover){a.rstop:hover .exit{transform:scale(1.1)}}
.stats{display:grid;grid-template-columns:repeat(3,1fr);gap:10px}
.stat{background:var(--card);border:1px solid var(--line);border-radius:var(--r);padding:14px 12px;color:var(--ink)}
.stat b{display:block;font-size:clamp(24px,6vw,32px);font-weight:800;line-height:1.05;letter-spacing:-.01em} .stat span{font-size:12.5px;font-weight:600;color:var(--mute);line-height:1.25;display:block;margin-top:3px}
.stat.tap{cursor:pointer}

/* ───────── lessons */
.stage-hero,.mat-hero{min-height:210px;display:flex;align-items:flex-end;padding:18px;margin-bottom:16px}
.sh-art{position:absolute;right:-6px;top:6px;bottom:6px;width:min(52%,260px)} .sh-art svg{width:100%;height:100%}
.sh-text{position:relative;display:flex;align-items:center;gap:14px} .sh-text h1,.sh-text h2{color:#fff} .sh-text p{font-weight:600;opacity:.9;font-size:14px}
@media (max-width:639px){.stage-hero,.mat-hero{min-height:236px}.sh-art{width:46%;right:2px}.sh-text{flex-direction:column;align-items:flex-start;gap:10px;max-width:54%}.sh-text .shield.lg{width:60px;height:60px}.sh-text .shield.lg b{font-size:26px;margin-top:11px}}
.bp-back{position:absolute;left:12px;top:12px;background:rgba(255,255,255,.14);color:#fff;box-shadow:inset 0 0 0 1.5px rgba(255,255,255,.5)}
.stage-hero .title-block,.mat-hero .title-block{display:none}
@media (min-width:640px){.stage-hero .title-block,.mat-hero .title-block{display:block;right:auto;left:18px;top:60px;bottom:auto}.mat-hero .title-block{top:18px}.sh-art{right:24px;width:260px}}
.lessons .li{padding:12px 14px} .li.locked{color:var(--faint)} .li.locked .t{color:var(--mute)}
.stage-list{display:grid;gap:14px;grid-template-columns:repeat(auto-fill,minmax(min(250px,100%),1fr))}
.stage-card{display:flex;flex-direction:column;background:var(--card);border:1px solid var(--line);border-radius:var(--r-sign);overflow:hidden;color:var(--ink);cursor:pointer;transition:transform .2s var(--ease),border-color .2s}
.stage-card:active{transform:scale(.98)}
@media (hover:hover){.stage-card:hover{transform:translateY(-2px);border-color:var(--line2)}}
.sc-art{height:150px;border-radius:0;display:grid;place-items:center} .sc-art svg{height:136px;width:136px}
.stage-card.ahead .sc-art{background-color:#7C8A93}
.sc-body{display:flex;align-items:center;gap:12px;padding:12px 14px}
.sc-body .t{font-weight:800;font-size:17px;line-height:1.2} .sc-body .s{font-size:13px;color:var(--mute)}
.stage-card .meter{border-radius:0;height:5px}

/* ───────── lesson book */
.lesson{max-width:820px}
.l-head{display:flex;align-items:center;gap:12px;margin-bottom:16px}
.l-head h1{font-size:clamp(20px,4.6vw,28px)} .l-kicker{font-size:12.5px;font-weight:700;color:var(--mute)}
.l-pct{text-align:right;line-height:1.1} .l-pct b{display:block;font-size:20px;font-weight:800;color:var(--green)} .l-pct span{font-size:12px;color:var(--mute);font-weight:700}
/* Stuck UNDER the header, not at the top of the window: the header is sticky
   at 0 and sits above this, so at top:0 the strip spent every scrolled-down
   moment hidden behind it — a student deep in a part had no tabs at all. The
   audio dock already offsets by the header; this now does the same. */
.ptabs{display:flex;gap:6px;overflow-x:auto;scrollbar-width:none;margin:0 -16px 18px;padding:2px 16px;position:sticky;top:calc(var(--top) + var(--sat));z-index:20;background:linear-gradient(var(--paper) 78%,transparent)}
.ptabs::-webkit-scrollbar{display:none}
.ptabs a{display:flex;align-items:center;gap:7px;height:42px;padding:0 14px;border-radius:10px;background:var(--card);box-shadow:inset 0 0 0 1px var(--line);color:var(--ink2);font-weight:700;font-size:14px;white-space:nowrap;cursor:pointer;transition:background .2s,color .2s,transform .15s}
.ptabs a:active{transform:scale(.96)}
.ptabs a.done .ic{color:var(--green3)}
.ptabs a[aria-selected="true"]{background:var(--ink);color:var(--paper);box-shadow:none} .ptabs a[aria-selected="true"] .ic{color:var(--paper)}
.part{display:block;min-height:40dvh}
.result{display:flex;align-items:center;gap:14px;flex-wrap:wrap;padding:16px;border-radius:var(--r-sign);background:var(--card);border:1.5px solid var(--line2);margin-top:14px}
.result.good{background:var(--green-t);border-color:#A9D9C4}
.r-score{display:flex;align-items:baseline;gap:4px} .r-score b{font-size:44px;font-weight:900;line-height:1;letter-spacing:-.02em} .r-score span{font-weight:700;color:var(--mute)}
.r-word{font-weight:800;font-size:18px} .r-act{display:flex;gap:8px;margin-left:auto}
/* on a phone the score, the words and two buttons will not share a line: the
   middle column was squeezed to four words wide */
@media (max-width:460px){
  .result>.grow{flex:1 1 100%;order:2}
  .r-act{flex:1 1 100%;order:3;margin-left:0}
  .r-act .btn{flex:1}
}
.done-sheet{display:flex;flex-direction:column;gap:14px;padding-top:26px}
.done-score{margin-top:14px;display:flex;align-items:baseline;gap:10px} .done-score b{font-size:54px;font-weight:900;line-height:1} .done-score span{font-weight:600;opacity:.9}
/* story */
.scene{position:relative;border-radius:var(--r-sign);overflow:hidden;background:#DCE6F0;aspect-ratio:16/9;min-height:180px;border:1px solid var(--line)}
.scene-art{position:absolute;inset:0;cursor:pointer} .scene-art svg{width:100%;height:100%;display:block}
.vsvg *{transform-box:fill-box}
.vsvg .mv{animation:vmv var(--d,2s) var(--e,ease-in-out) var(--t,0s) both}.vsvg .fi{animation:vfi var(--d,.6s) ease var(--t,0s) both}.vsvg .fo{animation:vfo var(--d,.6s) ease var(--t,0s) both}
.vsvg .pp{transform-origin:center;animation:vpp7 .62s linear var(--t,0s) both}.vsvg .shake{transform-origin:center;animation:vshk .1s linear var(--t,0s) var(--n,12) alternate}
.vsvg .jig{animation:vjig .5s ease-in-out infinite alternate;animation-delay:var(--t,0s)}.vsvg .bob{animation:vbob var(--d,.4s) ease-in-out infinite alternate}
.vsvg .spin{transform-box:view-box;transform-origin:0 0;animation:vspin var(--d,2s) linear infinite}.vsvg .draw{stroke-dasharray:var(--len,800);animation:vdraw var(--d,3s) linear var(--t,0s) both}
.vsvg .fall{animation:vfall .7s linear infinite;animation-delay:var(--t,0s)}.vsvg .flash{animation:vflash .9s ease var(--t,0s) both}.vsvg .puff{transform-origin:center;animation:vpuff 1.4s ease-out infinite;animation-delay:var(--t,0s)}
.vsvg .dash{stroke-dasharray:18 14;animation:vdash .8s linear infinite}.vsvg .flo{animation:vflo 2.1s ease-out infinite;animation-delay:var(--t,0s)}
@keyframes vdraw{from{stroke-dashoffset:var(--len,800)}to{stroke-dashoffset:0}}@keyframes vdash{to{stroke-dashoffset:-32}}@keyframes vshk{from{transform:rotate(-12deg)}to{transform:rotate(12deg)}}
@keyframes vpp7{0%{opacity:0;transform:scale(.3)}40%{opacity:1;transform:scale(1.12)}62%{transform:scale(.95)}80%{transform:scale(1.03)}100%{opacity:1;transform:scale(1)}}
@keyframes vfi{from{opacity:0}to{opacity:1}}@keyframes vspin{to{transform:rotate(360deg)}}@keyframes vflo{from{transform:translate(0,0);opacity:0}30%{opacity:1}to{transform:translate(24px,-70px);opacity:0}}
@keyframes vpuff{from{transform:translate(0,0) scale(.4);opacity:.9}to{transform:translate(-40px,-50px) scale(1.6);opacity:0}}@keyframes vmv{from{transform:translate(var(--x0,0px),var(--y0,0px))}to{transform:translate(var(--x1,0px),var(--y1,0px))}}
@keyframes vfall{from{transform:translate(0,-60px);opacity:0}20%{opacity:1}to{transform:translate(-12px,140px);opacity:.2}}@keyframes vflash{0%,100%{opacity:0}15%{opacity:.85}30%{opacity:.1}45%{opacity:.6}}
@keyframes vfo{from{opacity:1}to{opacity:0}}@keyframes vjig{to{transform:translateY(-2px)}}@keyframes vbob{to{transform:translateY(-4px)}}
.scene-tag{position:absolute;left:12px;top:12px;padding:4px 9px;border-radius:6px;background:rgba(1,0,76,.82);color:#fff;font-size:11.5px;font-weight:800;letter-spacing:.08em}
.scene-badge{position:absolute;right:12px;top:12px;padding:6px 10px;border-radius:9px;background:var(--yellow);color:var(--ink);box-shadow:inset 0 0 0 2px var(--yellow),inset 0 0 0 3px var(--ink);line-height:1.15;animation:pop .45s var(--spring) .25s both;max-width:60%}
.scene-badge small{display:block;font-size:10px;font-weight:800;letter-spacing:.08em;text-transform:uppercase} .scene-badge b{font-size:15px;font-weight:800}
.scene-bar{position:absolute;left:0;right:0;bottom:0;height:5px;background:rgba(1,0,76,.18)} .scene-bar i{display:block;height:100%;background:var(--red);transition:width .4s var(--ease)}
.cap{font-size:clamp(17px,3.6vw,21px);line-height:1.4;font-weight:500;margin:14px 2px;min-height:3.2em;text-wrap:pretty}
.cap b{font-weight:800;background:var(--hl-bg);background-repeat:var(--hl-rep);background-size:var(--hl-size);background-position:var(--hl-pos)}
.story-ctl{display:flex;align-items:center;gap:10px}
.q-start{margin-top:16px}
.quizwrap{display:flex;flex-direction:column;gap:14px;max-width:620px;margin:0 auto}
.q-prog{display:flex;align-items:center;gap:12px} .q-prog .meter{flex:1}
.q-card h2{font-size:clamp(22px,5vw,28px);margin:2px 0 6px} .q-ctx{font-size:15.5px;color:var(--ink2);margin-bottom:10px;padding:10px 12px;border-radius:10px;background:var(--soft)} .q-ctx b{font-weight:800}
.opts{display:flex;flex-direction:column;gap:8px;margin-top:12px}
.opt{display:flex;align-items:center;gap:10px;min-height:54px;padding:10px 14px;border-radius:11px;background:var(--card);box-shadow:inset 0 0 0 1.5px var(--line2);text-align:left;font-weight:600;line-height:1.3;transition:transform .15s,box-shadow .15s,background .15s}
.opt small{display:block;font-weight:500;color:var(--mute);font-size:13px}
.opt:active{transform:scale(.985)} @media (hover:hover){.opt:not([disabled]):hover{box-shadow:inset 0 0 0 1.5px var(--ink2)}}
.opt.right{background:var(--green-t);box-shadow:inset 0 0 0 2px var(--green2);color:var(--green3)} .opt.wrong{background:var(--red-t);box-shadow:inset 0 0 0 2px var(--red);color:var(--red2);animation:shake .4s} .opt.dim{opacity:.5}
/* words */
.w-actions{margin-bottom:6px} .w-actions > .grow{flex:1 1 auto}
/* the section a student is looking for on a long page of words */
.w-h{font-size:21px;font-weight:800;letter-spacing:-.01em;margin:30px 0 13px}
.wgrid{display:grid;gap:10px;grid-template-columns:repeat(auto-fill,minmax(min(250px,100%),1fr))}
.wtile{display:flex;flex-direction:column;gap:3px;padding:12px 14px;border-radius:var(--r);background:var(--card);box-shadow:inset 0 0 0 1px var(--line);text-align:left;animation:rise .45s var(--ease) both;animation-delay:calc(min(var(--i),6)*30ms);transition:box-shadow .2s;-webkit-user-select:text;user-select:text}
.wtile.open{box-shadow:inset 0 0 0 2px var(--green)}
.w-top{display:flex;align-items:center;gap:10px;font-size:16.5px;line-height:1.25} .w-top b{font-weight:800}
.w-n{font-size:12px;font-weight:800;color:var(--faint);min-width:22px}
.w-sig{font-size:12.5px;font-weight:700;color:var(--mute)} .w-sig.v{color:var(--blue2)} .w-sig.a{color:var(--orange)} .w-sig.n,.w-sig.u{color:var(--green2)}
.w-say{width:32px;height:32px;border-radius:50%;display:grid;place-items:center;color:var(--blue2);background:var(--blue-t);flex:none;cursor:pointer}
.w-pron{font-size:13px;color:var(--mute);font-weight:600;letter-spacing:.01em;padding-left:32px}
.w-more{display:none;flex-direction:column;gap:3px;padding:6px 0 0 32px} .wtile.open .w-more{display:flex;animation:rise .3s var(--ease) both}
.w-tr{font-weight:800;color:var(--green3)} .w-mean{font-size:14.5px} .w-ex{font-size:14px;color:var(--ink2);font-style:italic}
.wgrid.tight .w-more{padding-left:0}
.li.say .quo{font-size:34px;font-weight:900;line-height:.8;color:var(--red2);align-self:flex-start;margin-top:6px} .li .exm{font-style:italic}
.idioms{display:grid;gap:12px;grid-template-columns:repeat(auto-fill,minmax(240px,1fr))}
.idiom{overflow:hidden;display:flex;flex-direction:column} .idi-pic svg{width:100%;height:auto;display:block} .idi-b{padding:12px 14px;display:flex;flex-direction:column;gap:6px}
.reveal{display:flex;align-items:center;gap:7px;padding:9px 11px;border-radius:9px;background:var(--soft);font-weight:700;font-size:13.5px;color:var(--ink2);text-align:left}
.idi-m b{display:block} .idi-m p{font-size:14px;font-style:italic;color:var(--ink2);margin-top:4px}
.rs-t{font-size:17px;line-height:1.75;margin-top:8px} .rs-t b{color:var(--red2);font-weight:800;border-bottom:2px dotted var(--red2);cursor:pointer;border-radius:3px} .rs-t b.on{background:var(--red-t)}
.rs-why{margin-top:10px;padding:10px 12px;border-radius:10px;background:var(--yellow-t);font-size:14.5px} .rs details{margin-top:12px;font-size:14.5px;color:var(--ink2)} .rs summary{cursor:pointer;font-weight:700}
/* reading */
.rd{max-width:66ch} .rd h2{font-size:24px;margin:2px 0 12px} .rd-k{font-size:12.5px;font-weight:800;color:var(--red2);letter-spacing:.04em}
.rd p+p{margin-top:12px} .rd p{font-size:17px;line-height:1.62} .rd p b{font-weight:700;background:var(--hl-bg);background-repeat:var(--hl-rep);background-size:var(--hl-size);background-position:var(--hl-pos)}
.tf .li{align-items:center;flex-wrap:wrap} .tf .li.right{background:#F3FAF7} .tf .li.wrong{background:#FDF4F5}
.tfb{display:flex;gap:6px;margin-left:auto} .tfb button{height:38px;padding:0 14px;border-radius:9px;font-weight:700;font-size:14px;background:var(--card);box-shadow:inset 0 0 0 1.5px var(--line2);transition:.15s}
.tfb button.on{background:var(--ink);color:var(--paper);box-shadow:none} .tf .right .tfb button.on{background:var(--green)} .tf .wrong .tfb button.on{background:var(--red)}
.reading>.btn{margin-top:14px}
/* practice */
.practice,.writing{display:flex;flex-direction:column;gap:16px}
.ex{padding:16px;display:flex;flex-direction:column;gap:14px;scroll-margin-top:60px}
.ex-head{display:flex;align-items:flex-start;gap:12px}
.ex-l{width:34px;height:34px;border-radius:8px;display:grid;place-items:center;background:var(--ink);color:var(--paper);font-weight:800;flex:none}
.ex>.btn{align-self:flex-start}
.ex-res{display:flex;align-items:center;gap:12px;padding:10px 12px;border-radius:11px;background:var(--soft);font-weight:600;animation:pop .4s var(--spring) both} .ex-res b{font-size:22px;font-weight:900} .ex-res.good{background:var(--green-t);color:var(--green3)}
.bank,.pool,.built,.chips,.wchips{display:flex;flex-wrap:wrap;gap:7px}
.chip{min-height:38px;padding:0 12px;border-radius:9px;background:var(--card);box-shadow:inset 0 0 0 1.5px var(--line2);font-weight:700;font-size:15px;transition:transform .15s var(--spring),opacity .2s,background .15s}
.chip:active{transform:scale(.93)} .chip.used{opacity:.28} .chip.in{background:var(--blue-t);box-shadow:inset 0 0 0 1.5px #B9CCEB;color:var(--blue3);animation:pop .25s var(--spring)}
.gtext{font-size:17.5px;line-height:2.3}
.gap{display:inline-block;min-width:74px;height:36px;padding:0 10px;margin:0 2px;border-radius:8px;background:var(--soft);box-shadow:inset 0 -2.5px 0 var(--line2);font-weight:800;font-size:16px;vertical-align:middle;line-height:36px;transition:.15s}
.gap.sel{background:var(--yellow-t);box-shadow:inset 0 0 0 2px var(--yellow2)} .gap.full{background:var(--blue-t);box-shadow:none;color:var(--blue3);animation:pop .25s var(--spring)}
.gap.right{background:var(--green-t);color:var(--green3)} .gap.wrong{background:var(--red-t);color:var(--red2);text-decoration:line-through}
.fixed{font-weight:800;color:var(--green3);margin:0 4px;white-space:nowrap}
.bitem,.sitem{display:flex;gap:12px;padding:12px;border-radius:11px;background:var(--soft)} .bn{width:24px;font-weight:800;color:var(--mute);padding-top:7px;flex:none}
.bitem .built{min-height:42px;padding:2px 0 8px;margin-bottom:8px;border-bottom:2px dashed var(--line2);align-items:center} .ph{color:var(--faint);font-size:14px}
.bitem.right,.sitem.right{background:#EAF6F0} .bitem.wrong,.sitem.wrong{background:#FCEEF0}
.fixline{display:flex;align-items:center;gap:6px;font-weight:700;color:var(--green3);margin-top:8px;font-size:15px} .fixline .ic{flex:none}
.swords{line-height:2.2;font-size:17px} .sw{padding:5px 7px;margin:0 -1px;border-radius:7px;font-weight:600;transition:background .15s;-webkit-user-select:none;user-select:none}
@media (hover:hover){.sw:not([disabled]):hover{background:var(--yellow-t)}}
.sw.bad{background:var(--green-t);color:var(--green3);text-decoration:line-through;font-weight:800} .sw.miss{background:var(--red-t);color:var(--red2)}
.match{display:grid;grid-template-columns:1fr 1fr;gap:10px} .mcol{display:flex;flex-direction:column;gap:7px}
.mi{min-height:46px;padding:8px 10px;border-radius:10px;background:var(--card);box-shadow:inset 0 0 0 1.5px var(--line2);font-weight:700;font-size:14.5px;line-height:1.25;text-align:left;transition:.15s}
.mi.sel{background:var(--yellow-t);box-shadow:inset 0 0 0 2px var(--yellow2)} .mi.ok{background:var(--green-t);box-shadow:none;color:var(--green3);opacity:.75} .mi.wrong{background:var(--red-t)}
/* writing */
.dlg{display:flex;flex-direction:column;gap:9px}
.dline{display:flex;gap:9px;align-items:flex-end;max-width:92%} .dline.me{align-self:flex-end;flex-direction:row-reverse}
.dav{width:30px;height:30px;border-radius:50%;background:var(--soft2);display:grid;place-items:center;font-weight:800;font-size:13px;flex:none} .dline.me .dav{background:var(--blue);color:#fff}
.dbub{padding:9px 13px;border-radius:15px 15px 15px 5px;background:var(--soft)} .dline.me .dbub{background:var(--blue-t);border-radius:15px 15px 5px 15px}
.dbub b{font-size:12px;font-weight:800;color:var(--mute)} .dbub p{font-size:16.5px;line-height:1.9} .dbub u{text-decoration:none;font-weight:700}
.gin{height:34px;padding:0 8px;border-radius:8px;border:0;background:var(--card);box-shadow:inset 0 0 0 1.5px var(--line2);font-size:16px;font-weight:700;color:var(--blue3);outline:0;text-align:center;max-width:46vw}
.gin:focus{box-shadow:inset 0 0 0 2px var(--blue2)} .gin.right{background:var(--green-t);box-shadow:none;color:var(--green3)} .gin.wrong{background:var(--red-t);box-shadow:none;color:var(--red2);text-decoration:line-through}
.task{font-size:16.5px} .ideas{margin:0;padding-left:20px;color:var(--ink2);font-size:15px;display:grid;gap:3px}
textarea.essay{min-height:200px;font-size:17px;font-weight:400}
.goals{display:flex;flex-wrap:wrap;gap:8px} .goal{display:inline-flex;align-items:center;gap:6px;padding:6px 10px;border-radius:9px;background:var(--soft);font-size:13.5px;font-weight:600;color:var(--ink2);transition:.25s}
.goal b{font-weight:800} .goal.on{background:var(--green-t);color:var(--green3)} .goal .ic{width:17px;height:17px}
.wchip{padding:4px 9px;border-radius:7px;background:var(--soft);font-size:13.5px;font-weight:600;color:var(--mute);transition:.25s var(--spring)} .wchip.say{font-style:italic}
.wchip.on{background:var(--green);color:#fff;transform:scale(1.04)}
.model{padding:14px;border-radius:11px;background:var(--soft);font-size:16px;line-height:1.6} .model b{background:var(--hl-bg);background-repeat:var(--hl-rep);background-size:var(--hl-size);background-position:var(--hl-pos)} .model i{color:var(--green3);font-weight:700}

/* ───────── word bank */
.wb-stages{display:flex;gap:10px;overflow-x:auto;scrollbar-width:none;margin:0 -16px 16px;padding:4px 16px}
.wb-stages::-webkit-scrollbar{display:none}
.wb-st{position:relative;display:flex;flex-direction:column;align-items:center;gap:6px;min-width:84px;padding:12px 10px 10px;border-radius:14px;background:var(--card);box-shadow:inset 0 0 0 1px var(--line);color:var(--mute);font-size:13px;font-weight:700;cursor:pointer;transition:transform .2s var(--spring),box-shadow .2s}
.wb-st:active{transform:scale(.95)} .wb-st .shield{transition:transform .3s var(--spring)}
.wb-st[aria-selected="true"]{box-shadow:inset 0 0 0 2.5px var(--ink);color:var(--ink)} .wb-st[aria-selected="true"] .shield{transform:scale(1.1) rotate(-4deg)}
.wb-st em{position:absolute;right:6px;top:6px;font-style:normal;font-size:11px;font-weight:800;background:var(--soft2);color:var(--ink2);padding:1px 6px;border-radius:8px}
.myshield{width:52px;height:52px;border-radius:12px;display:grid;place-items:center;background:var(--blue-t);color:var(--blue2)}
.wb-sum{display:flex;flex-direction:column;gap:14px;margin-bottom:16px} .wb-sum .meter{background:rgba(255,255,255,.25)} .wb-sum .meter i{background:var(--card)}
/* A white button keeps its white background in both themes — base.css sets
   it to #fff, not to a token — so the ink on it has to be a fixed dark
   colour too. These three took a themed one, which in dark mode turned into
   the pale ink meant for dark cards: "Add words" and "Flashcards" were light
   blue on white, at 1.66:1. */
.wb-sum .btn.white{color:#6B4A33} .mywords-top{display:flex;flex-direction:column;gap:12px;margin-bottom:16px} .mywords-top .btn.white{color:#0C3676}
.wb-lessons{display:flex;flex-direction:column;gap:10px} .wb-l{overflow:hidden} .wb-l>.li .ic:last-child{transition:transform .3s var(--ease)} .wb-l.open>.li .ic:last-child{transform:rotate(180deg)}
.wb-words{display:grid;grid-template-columns:repeat(auto-fill,minmax(150px,1fr));gap:8px;padding:4px 14px 14px}
.wbw{display:flex;flex-direction:column;gap:2px;padding:9px 11px;border-radius:10px;background:var(--soft);text-align:left;line-height:1.25;animation-delay:calc(min(var(--i),8)*22ms);transition:transform .15s}
.wbw:active{transform:scale(.96)} .wbw b{font-weight:800;font-size:14.5px} .wbw span{font-size:12.5px;color:var(--mute);display:-webkit-box;-webkit-line-clamp:2;-webkit-box-orient:vertical;overflow:hidden}
.wbw.known{background:var(--green-t)} .wbw.known b{color:var(--green3)} .wbw.idi{background:var(--brown-t)}
.wb-act{grid-column:1/-1;padding-top:6px} .wdetail{display:flex;flex-direction:column;gap:8px;font-size:16.5px} .wdetail .w-pron{padding:0} .wd-tr{font-size:22px;font-weight:800;color:var(--green3)}
.mw-prev{display:flex;flex-wrap:wrap;gap:6px;align-items:center}
/* study */
.study{max-width:560px} #study{display:flex;flex-direction:column;gap:16px}
.deck{position:relative;height:min(52dvh,420px);perspective:1200px;touch-action:pan-y}
.fc{position:absolute;inset:0;border-radius:20px;transform-style:preserve-3d;transition:transform .5s var(--ease);cursor:pointer;-webkit-user-select:none;user-select:none}
.fc.under{transform:scale(.94) translateY(14px);opacity:.6} .fc.under .fc-face{box-shadow:none}
.fc.flip{transform:rotateY(180deg)}
.fc-face{position:absolute;inset:0;border-radius:20px;background:var(--card);border:1.5px solid var(--line2);box-shadow:var(--shadow-up);backface-visibility:hidden;-webkit-backface-visibility:hidden;display:flex;flex-direction:column;align-items:center;justify-content:center;gap:10px;padding:26px;text-align:center}
.fc-face.back{transform:rotateY(180deg);background:var(--red);border-color:var(--red2);color:#fff;box-shadow:inset 0 0 0 5px var(--red),inset 0 0 0 7px rgba(255,255,255,.9),var(--shadow-up)}
.fc-w{font-size:clamp(28px,7.5vw,40px);font-weight:900;line-height:1.1;letter-spacing:-.01em;text-wrap:balance} .fc-face .w-pron{padding:0}
.fc-hint{position:absolute;top:16px;left:0;right:0;display:flex;justify-content:center;align-items:center;gap:6px;font-size:12.5px;font-weight:700;color:var(--faint)}
.fc-say{position:absolute;bottom:16px;width:46px;height:46px;border-radius:50%;display:grid;place-items:center;background:var(--blue-t);color:var(--blue2)}
.fc-tr{font-size:clamp(24px,6.4vw,32px);font-weight:900;line-height:1.15} .fc-face.back p{font-size:16px;line-height:1.45;font-weight:500} .fc-face.back .w-ex{color:#fff;opacity:.9}
.stamp{position:absolute;top:18px;padding:5px 12px;border-radius:8px;font-weight:900;font-size:18px;letter-spacing:.04em;text-transform:uppercase;opacity:0;transition:opacity .15s;border:3px solid;background:var(--card);z-index:3}
.stamp.yes{left:18px;color:var(--green3);transform:rotate(-12deg)} .stamp.no{right:18px;color:var(--red2);transform:rotate(12deg)}
.fc.say-yes .stamp.yes,.fc.say-no .stamp.no{opacity:1}
.fc-ctl{display:grid;grid-template-columns:1fr 1fr;gap:12px} .btn.stopish{color:var(--red2);box-shadow:inset 0 0 0 1.5px #EBB9C1}
.center{text-align:center} .study-end{display:flex;flex-direction:column;align-items:center;gap:12px;text-align:center} .study-end .art{width:130px;height:130px;color:var(--blue)}

/* ───────── chat */
.tg{display:flex;flex-direction:column;height:calc(100dvh - var(--top) - var(--sat) - var(--tab) - var(--sab));background:var(--card)}
.tg-list{flex:1}
.tg-convo{flex:1}
.view-chat{padding-bottom:0!important}
/* the divider between the two columns, which on one column is a line down
   the outside edge of the phone */
.tg-list{display:flex;flex-direction:column;min-height:0}
@media (min-width:900px){.tg-list{border-right:1px solid var(--line)}}
.tg-search{padding:12px 14px;border-bottom:1px solid var(--line)}
.srch{display:flex;align-items:center;gap:8px;height:42px;padding:0 12px;border-radius:10px;background:var(--soft);color:var(--mute);min-width:0}
.srch input{flex:1;min-width:0;border:0;outline:0;background:transparent;font-size:16px;font-weight:500;-webkit-appearance:none}
.srch.big{height:50px;margin-bottom:12px}
.cl{overflow-y:auto;flex:1;overscroll-behavior:contain}
/* Extra's conversation row: a large round face, a name and a time on one line,
   the last words underneath. The rows have to carry the page on their own —
   a chat list is three or four of them on a tall screen — so they are given
   the height to do it. */
.cl-row{display:flex;gap:13px;align-items:center;padding:12px 14px;color:var(--ink);cursor:pointer;transition:background .12s;border-radius:12px;position:relative}
.cl-row+.cl-row{box-shadow:inset 0 1px 0 var(--line)}
/* On a phone the list runs edge to edge, and a row drawn as a rounded
   box there has its corners cut off by the screen: the divider curved
   away into both edges, which is the "borders going into the end of the
   phone". Full width, square, and the line starts where the words do. */
@media (max-width:899px){
  .cl-row{border-radius:0;padding-left:16px;padding-right:16px}
  .cl-row+.cl-row{box-shadow:none}
  .cl-row+.cl-row::before{content:"";position:absolute;left:79px;right:0;top:0;height:1px;background:var(--line)}
}
.cl-row.on{background:var(--blue-t)} @media (hover:hover){.cl-row:not(.on):hover{background:var(--soft)}}
.cl-row .av.lg{width:50px;height:50px;font-size:17px;flex:none}
.cl-row .av.lg .ic{width:23px;height:23px}
.cl-main{flex:1;min-width:0;display:flex;flex-direction:column;gap:4px}
.cl-top,.cl-bot{display:flex;gap:8px;align-items:center} .cl-top b{flex:1;min-width:0;white-space:nowrap;overflow:hidden;text-overflow:ellipsis;font-weight:800;font-size:15.5px} .cl-top time{font-size:12px;color:var(--mute);font-weight:600;flex:none}
.cl-row.unread .cl-top b{color:var(--blue2)}
.cl-last{flex:1;min-width:0;white-space:nowrap;overflow:hidden;text-overflow:ellipsis;font-size:14px;color:var(--mute)} .cl-last .ic{display:inline;vertical-align:-3px} .you{color:var(--blue2);font-weight:600}
/* unread: who it is from and how many, not what they said */
.cl-last.held{display:flex;align-items:center;gap:6px}
.cl-who{color:var(--ink);font-weight:700;flex:none}
.cl-new{display:inline-flex;align-items:center;gap:4px;font-style:normal;font-weight:800;color:var(--red2);flex:none}
.cl-new .ic{width:14px;height:14px}
.badge{min-width:22px;height:22px;padding:0 6px;border-radius:11px;background:var(--red);color:#fff;font-size:12px;font-weight:800;font-style:normal;display:grid;place-items:center;flex:none}
.av.grp{background:var(--red)} .av.ne{background:none} .av.ne svg{width:100%;height:100%;border-radius:50%}
.tg-convo{display:none;flex-direction:column;min-height:0;min-width:0;background:#EEF2F0;background-image:radial-gradient(rgba(18,73,155,.07) 1.2px,transparent 1.2px);background-size:22px 22px}
.tg.has-conv .tg-list{display:none} .tg.has-conv .tg-convo{display:flex}
.tg-head{display:flex;align-items:center;gap:10px;padding:8px 12px;background:var(--card);border-bottom:1px solid var(--line);min-height:56px}
.tg-head b{display:block;font-weight:800;line-height:1.2} .tg-sub{font-size:12.5px;color:var(--mute);display:flex;align-items:center;gap:5px}
.live{width:8px;height:8px;border-radius:50%;background:#19B56B;display:inline-block}
.tg-msgs{flex:1;overflow-y:auto;padding:14px 14px 10px;display:flex;flex-direction:column;gap:4px;overscroll-behavior:contain;-webkit-overflow-scrolling:touch}
.daysep{align-self:center;margin:10px 0 6px} .daysep span{padding:4px 11px;border-radius:12px;background:rgba(1,0,76,.5);color:#fff;font-size:12px;font-weight:700}
.bubble{position:relative;max-width:min(78%,520px);padding:7px 11px 6px;border-radius:16px;background:var(--card);box-shadow:0 1px 1px rgba(1,0,76,.1);align-self:flex-start;cursor:pointer;animation:bub .28s var(--ease) both;word-break:break-word;-webkit-user-select:text;user-select:text}
@keyframes bub{from{opacity:0;transform:translateY(8px) scale(.97)}}
.bubble.first{margin-top:6px} .bubble.theirs{border-bottom-left-radius:5px} .bubble.mine{align-self:flex-end;background:#DDF3E7;border-bottom-right-radius:5px}
.bubble .who{display:block;font-size:12.5px;font-weight:800;color:var(--blue2);margin-bottom:1px} .bubble .who i{font-style:normal;font-weight:600;color:var(--mute);font-size:11.5px}
.bubble .txt{white-space:pre-wrap;font-size:15.5px;line-height:1.38} .bubble .meta{float:right;display:flex;align-items:center;gap:3px;margin:6px 0 -2px 10px;font-size:11px;color:var(--mute);font-weight:600}
.ticks{display:flex;color:var(--mute)} .ticks.seen{color:var(--blue2)} .bubble.gone{opacity:.6;font-style:italic;cursor:default}
.bubble .quote{display:block;padding:3px 8px;margin-bottom:4px;border-left:3px solid var(--blue2);background:rgba(18,73,155,.08);border-radius:4px;font-size:13px;max-height:3.1em;overflow:hidden} .bubble .quote b{display:block;color:var(--blue2)}
.kindline{display:flex;align-items:center;gap:5px;font-size:12px;font-weight:800;letter-spacing:.04em;text-transform:uppercase;margin-bottom:2px}
/* a teacher's feedback, arriving in the chat as feedback */
.fbline{text-decoration:none;color:inherit;flex-wrap:wrap;padding-bottom:5px;margin-bottom:5px;
  border-bottom:1px solid rgba(128,128,128,.25);cursor:pointer}
.fbline em{font-style:normal;margin-left:auto;padding:1px 7px;border-radius:99px;
  background:rgba(128,128,128,.18);letter-spacing:0}
.bubble.call{background:var(--red);color:#fff} .bubble.call .meta,.bubble.call .ticks{color:rgba(255,255,255,.8)} .bubble.pay{background:var(--yellow);color:var(--ink)} .bubble.pay .meta{color:var(--yellow-ink)}
.tg-empty{margin:auto;padding:8px 14px;border-radius:12px;background:rgba(1,0,76,.45);color:#fff;font-size:14px;font-weight:600}
.tg-none{margin:auto} .tg-none .art{color:var(--line2);width:150px;height:150px}
.tg-quick{display:flex;gap:6px;overflow-x:auto;padding:7px 12px;scrollbar-width:none;background:rgba(255,255,255,.7);
  scroll-padding:12px;scroll-snap-type:x proximity;
  /* the row scrolls, so the last one fades out rather than being sliced
     off square against the edge of the screen */
  -webkit-mask-image:linear-gradient(90deg,#000 0,#000 calc(100% - 28px),transparent 100%);
  mask-image:linear-gradient(90deg,#000 0,#000 calc(100% - 28px),transparent 100%)}
.tg-quick::-webkit-scrollbar{display:none}
.tg-quick button{scroll-snap-align:start}
.tg-quick button{flex:none;padding:7px 11px;border-radius:14px;background:var(--card);box-shadow:inset 0 0 0 1px var(--line2);font-size:13px;font-weight:600;max-width:260px;white-space:nowrap;overflow:hidden;text-overflow:ellipsis}
.tg-reply{display:flex;align-items:center;gap:10px;padding:7px 12px;background:var(--card);border-top:1px solid var(--line);color:var(--blue2)} .tg-reply span span{display:block;color:var(--ink2);font-size:13.5px;white-space:nowrap;overflow:hidden;text-overflow:ellipsis} .tg-reply b{font-size:13px}
.tg-input{display:flex;align-items:flex-end;gap:8px;padding:8px 10px calc(8px + var(--sab));background:var(--card);border-top:1px solid var(--line)}
.tg-input textarea{flex:1;min-width:0;min-height:44px;max-height:140px;padding:11px 14px;border-radius:22px;border:0;outline:0;background:var(--soft);resize:none;font-size:16px;line-height:1.35}
.tg-input .btn{border-radius:50%;flex:none}
/* A conversation on a phone covers the tab bar and reaches the very bottom of
   the screen, so the composer is the thing standing on the home indicator —
   and this rule used to take its safe-area padding away unconditionally,
   which put the Send button and the edge of the text box about 26px inside
   the gesture area on any phone that has one. Measured, not guessed.

   The padding is only dropped when the keyboard is actually up, because then
   the keyboard occupies that strip and the indicator is not drawn. */
body[data-tab="chat"] .tg.has-conv .tg-input{padding-bottom:calc(8px + var(--sab))}
.kb-up body[data-tab="chat"] .tg.has-conv .tg-input{padding-bottom:8px}
.tg-menu{position:fixed;z-index:85;min-width:160px;padding:5px;border-radius:12px;background:var(--card);box-shadow:var(--shadow-up);border:1px solid var(--line)}
.tg-menu button{display:flex;align-items:center;gap:9px;width:100%;padding:10px 12px;border-radius:8px;font-weight:700;font-size:14.5px} .tg-menu button.bad{color:var(--red2)}
@media (hover:hover){.tg-menu button:hover{background:var(--soft)}}
.tg-convo.insheet{display:flex;height:min(60dvh,520px);border-radius:12px;overflow:hidden;border:1px solid var(--line)}
/* A conversation fills the phone, so it is the thing that has to give the
   keyboard its room: --kb is how much of the window the keyboard is
   covering, measured in ui.js, and zero when there is none. Without it
   the box you type into sits under the keys. */
/* The height is taken from what the browser says is visible rather than from
   the window, because on a phone those are different numbers whenever the
   address bar is sliding or the keyboard is open. --vvh is the visible height,
   kept up to date in ui.js; 100dvh is what it falls back to. */
/* While a conversation is open on a phone the document itself is pinned, so
   that iOS has nothing to scroll when the keyboard comes up. Without this it
   scrolls the page to reveal the box you type in, drags this fixed panel off
   the top of the screen with it, and the conversation goes blank. */
html.conv-lock,html.conv-lock body{height:100%;overflow:hidden;overscroll-behavior:none}
@media (max-width:899px){
  body[data-tab="chat"] .tg.has-conv{
    position:fixed;left:0;right:0;top:0;z-index:45;
    /* exactly the strip the phone can actually show ... */
    height:var(--vvh,100dvh);
    /* ... wherever that strip currently sits inside the page */
    transform:translateY(var(--vvtop,0px));
    padding-top:var(--sat)}
  /* The tab bar lives at the bottom of the page, which with the keyboard up is
     somewhere behind it. It was the thing showing through the blank chat. You
     cannot reach it while typing anyway. */
  .kb-up .tabbar{display:none}
}
/* Extra's scheme: messages are one column at every width. The list is the page,
   and opening a conversation replaces it rather than sitting beside it, so the
   same thing happens on a laptop as on a phone. */
@media (min-width:900px){
  .tg{height:calc(100dvh - var(--top));max-width:720px;margin:0 auto;
      border-left:1px solid var(--line);border-right:1px solid var(--line)}
}
.tg-head-page{padding:18px 16px 10px}
.tg-head-page h1{margin:0 0 2px;font-size:26px}
.tg-head-page p{margin:0}
.tg.has-conv .tg-head-page{display:none}

/* ───────── teacher */
.class-grid{display:grid;gap:14px;grid-template-columns:repeat(auto-fill,minmax(min(320px,100%),1fr))}
.class{padding:16px;display:flex;flex-direction:column;gap:14px}
.class-top{display:flex;align-items:center;gap:12px} .class-next{display:flex;align-items:center;gap:12px;padding:10px 12px;border-radius:11px;background:var(--soft)}
.class-next .t{font-weight:700;line-height:1.25} .class-next .s{font-size:13px;color:var(--mute)}
.class-ses{display:flex;flex-direction:column;gap:7px;padding:10px 12px;border-radius:11px;border:1px dashed var(--line2)}
.secbar{display:flex;gap:3px} .secbar i{flex:1;height:8px;border-radius:2px;background:var(--soft2)} .secbar i.on{background:var(--green2)}
.board.big{display:flex;flex-direction:column;gap:8px;margin-bottom:6px;max-width:100%;overflow-x:auto}
.brow{display:grid;grid-template-columns:5.6em 10.9em 2.4em 8.8em;gap:14px;font-size:22px;align-items:center} .brow .flap{font-size:22px} .brow.head{font-size:22px}
@media (max-width:640px){.brow,.brow .flap,.brow.head{font-size:15px}.brow{gap:8px}}
.teach{display:flex;flex-direction:column;height:100dvh}
.teach-bar{display:flex;align-items:center;gap:10px;padding:calc(var(--sat) + 8px) 12px 8px;background:var(--card);border-bottom:1px solid var(--line);min-height:58px}
.teach-bar .tt{display:block;font-weight:800;line-height:1.2;white-space:nowrap;overflow:hidden;text-overflow:ellipsis} .teach-bar .exit{width:38px;height:38px} .teach-bar .exit b{font-size:16px}
.teach-prog{display:flex;align-items:baseline;gap:4px;white-space:nowrap} .teach-prog b{font-size:20px;font-weight:900;color:var(--green)}
.teach-frame{flex:1;position:relative;background:var(--card);min-height:0} .teach-frame iframe{position:absolute;inset:0;width:100%;height:100%;border:0}
.teach-load{position:absolute;inset:0;display:flex;flex-direction:column;align-items:center;justify-content:center;gap:10px;background:var(--blue);color:#fff;font-weight:700} .teach-load .art{width:180px;height:180px}
.head-row{margin-bottom:14px} .head-row .srch{flex:1 1 220px;max-width:340px}
/* the search box, now sitting on top of the list it filters rather than in
   the page heading a dashboard away from its own results */
.stu-find{gap:10px;align-items:center;margin:0 0 10px}
.stu-find .srch{flex:1 1 240px}
.stu-found{flex:none;font-variant-numeric:tabular-nums;white-space:nowrap}
/* The heading keeps the width of its own word. `grow` is flex:1 from a basis
   of nothing, so on a narrow screen the row gave every pixel to the controls
   and squeezed "Staff" into 20px, where it printed itself across the button
   beside it. From its own width it wraps the row instead. */
.head-row > .grow{flex:1 1 auto;min-width:0}
.filters{display:flex;flex-wrap:wrap;gap:10px;margin-bottom:14px;align-items:center}
/* On a phone each of these took a line of its own, so four of them pushed the
   work itself off the bottom of the screen before a teacher had read a word of
   it. Two to a row, sharing the width evenly. */
@media (max-width:560px){
  .filters{display:grid;grid-template-columns:1fr 1fr;align-items:stretch}
  .filters > *{min-width:0;width:100%}
  .filters > .seg{grid-column:1 / -1}
} .input.slim{min-height:40px;width:auto;font-size:14.5px;font-weight:600;padding-top:0;padding-bottom:0}
.table{background:var(--card);border:1px solid var(--line);border-radius:var(--r);overflow:hidden}
.trow{display:flex;align-items:center;gap:12px;padding:8px 12px 8px 14px;min-height:60px;animation:rise .4s var(--ease) both;animation-delay:calc(min(var(--i),6)*22ms);transition:background .15s}
.trow+.trow{border-top:1px solid var(--line)} .trow.sel{background:#F1F8F5} .trow.inactive .tmain{opacity:.6}
.tmain{flex:1;min-width:0;display:flex;align-items:center;gap:11px;text-align:left;padding:4px 0}
.tmain .t{display:block;font-weight:700;line-height:1.25;white-space:nowrap;overflow:hidden;text-overflow:ellipsis} .tmain .s{display:block;font-size:12.5px;color:var(--mute);white-space:nowrap;overflow:hidden;text-overflow:ellipsis}
.tcell{flex:none;display:flex;align-items:center;gap:8px} .sw-cell{min-width:46px;justify-content:flex-end} .swl{font-size:12.5px;font-weight:700;color:var(--mute)}
@media (max-width:899px){.sw-cell .swl{display:none}}
.heat{display:inline-grid;place-items:center;min-width:46px;height:28px;padding:0 8px;border-radius:7px;font-weight:800;font-size:13.5px;background:var(--soft2);color:var(--ink2)}
.heat.hi{background:var(--green-t);color:var(--green3)} .heat.md{background:var(--yellow-t);color:var(--yellow-ink)} .heat.lo{background:var(--red-t);color:var(--red2)}
.bulk{position:fixed;z-index:60;left:10px;right:10px;bottom:calc(var(--tab) + var(--sab) + 10px);margin:0 auto;max-width:620px;display:flex;align-items:center;gap:8px;padding:8px 10px 8px 16px;border-radius:14px;background:#0A0B2E;color:#F2F4F3;box-shadow:var(--shadow-up)}
/* dark on dark needs an edge to read as a thing lying over the page */
:root[data-theme="dark"] .bulk{background:#12154A;box-shadow:var(--shadow-up),inset 0 0 0 1px var(--line2)}
@media (prefers-color-scheme:dark){
  :root:not([data-theme="light"]) .bulk{background:#12154A;box-shadow:var(--shadow-up),inset 0 0 0 1px var(--line2)}
}
.bulk>b{font-size:18px} .bulk .btn{box-shadow:none} .bulk>span{font-weight:600}
/* The bar is an inverted surface: --ink on --paper. That pair flips with the
   theme, so in dark mode the bar is LIGHT — and these buttons were white text
   on 14% white, which is a white pill on a white bar. "Call in" and "Move to
   a group" were there the whole time and could not be read.
   They take the bar's own foreground now, whichever way round it is, and the
   coloured ones are left alone so the real action still looks like one. */
.bulk .btn:not(.go):not(.warn):not(.stop){background:rgba(128,128,128,.26);color:inherit}
@supports (background:color-mix(in srgb, currentColor 14%, transparent)){
  .bulk .btn:not(.go):not(.warn):not(.stop){
    background:color-mix(in srgb, currentColor 16%, transparent);
    box-shadow:inset 0 0 0 1.5px color-mix(in srgb, currentColor 26%, transparent)}
}
.bulk .btn .ic{color:inherit}
/* The coloured buttons keep their own colours — .btn.warn is a soft red
   here, not the yellow in base.css — and gain an edge so the pill separates
   from a bar of nearly the same darkness. */
.bulk .btn.go,.bulk .btn.stop{color:#fff} .bulk .btn.go .ic,.bulk .btn.stop .ic{color:#fff}
/* only the soft-filled one needs an edge; a ring in currentColor on a
   solid button is the same white hairline being removed above */
.bulk .btn.warn{box-shadow:inset 0 0 0 1.5px currentColor}
@media (min-width:900px){.bulk{bottom:24px}}
.tgprev{border-radius:12px;background:#E7EEF5;padding:12px} .tgp-head{display:flex;align-items:center;gap:8px;color:var(--blue2);margin-bottom:8px}
.tgprev pre,.credmsg{margin:0;padding:10px 12px;border-radius:12px 12px 12px 4px;background:var(--card);font-family:inherit;font-size:14px;line-height:1.45;white-space:pre-wrap;word-break:break-word}
.profile{display:flex;flex-direction:column;gap:12px} .chips-row{margin-top:6px;gap:6px}
.p-actions{display:grid;grid-template-columns:repeat(3,1fr);gap:8px} .p-actions .btn{padding:0 8px;font-size:13.5px} .p-h{margin-top:8px}
details.pl>summary{list-style:none;cursor:pointer} details.pl>summary::-webkit-details-marker{display:none}
.pl-body{padding:4px 14px 14px} .ptable{display:flex;flex-direction:column} .pt-row{display:flex;align-items:center;gap:12px;padding:7px 0;font-size:14.5px} .pt-row+.pt-row{border-top:1px solid var(--line)}
.essay-read{margin-top:10px;padding:12px;border-radius:10px;background:var(--soft);font-size:15px;line-height:1.55} .essay-read p{white-space:pre-wrap;margin-top:4px}
.li.mat .t{line-height:1.25}
.rtable-wrap{overflow-x:auto} .rtable{border-collapse:collapse;width:100%} .rtable th,.rtable td{padding:6px 5px;text-align:center;border-bottom:1px solid var(--line)}
.rtable thead th{font-size:12px;color:var(--mute);font-weight:700;padding:10px 5px} .rtable th:first-child{text-align:left;position:sticky;left:0;background:var(--card);padding-left:12px;z-index:1;min-width:150px}
.rtable tr.inactive th{opacity:.55} .rtable tbody tr:last-child th,.rtable tbody tr:last-child td{border-bottom:0}
.rname{display:flex;align-items:center;gap:9px;text-align:left;font-weight:700;font-size:14px;line-height:1.2} .exit.sm{width:30px;height:30px;border-radius:7px;display:inline-flex} .exit.sm b{font-size:14px;margin:0}
.rc{display:inline-flex;flex-direction:column;align-items:center;justify-content:center;width:46px;height:40px;border-radius:8px;font-weight:800;font-size:14px;line-height:1} .rc small{font-size:10px;font-weight:700;opacity:.7;margin-top:2px}
.rc.none{color:var(--faint)} .rc.full{box-shadow:inset 0 0 0 2px currentColor} .legend{display:flex;align-items:center;gap:8px;flex-wrap:wrap;margin-top:10px} .legend .heat{height:22px;font-size:11.5px}
.pal{max-height:50dvh;overflow-y:auto}

/* ───────── admin */
.setup{display:flex;flex-direction:column;gap:6px;margin-bottom:18px} .steps{list-style:none;margin:10px 0 0;padding:0;display:flex;flex-direction:column;gap:8px}
.steps li{display:flex;align-items:center;gap:12px;padding:10px 12px;border-radius:11px;background:rgba(255,255,255,.12)}
.steps li>span{width:30px;height:30px;border-radius:50%;display:grid;place-items:center;background:var(--card);color:var(--blue);font-weight:900;flex:none} .steps li.done>span{background:var(--green2);color:#fff}
.steps b{display:block;line-height:1.25} .steps small{display:block;font-size:13px;opacity:.88;line-height:1.3} .setup .btn.white{color:#0C3676}
.kpis{display:grid;grid-template-columns:repeat(2,1fr);gap:10px} @media (min-width:760px){.kpis{grid-template-columns:repeat(4,1fr)}}
.kpi{display:flex;flex-direction:column;align-items:flex-start;gap:1px;padding:14px;border-radius:var(--r);background:var(--card);border:1px solid var(--line);color:var(--ink);text-align:left;cursor:pointer;border-top:4px solid var(--red);transition:transform .15s}
.kpi:active{transform:scale(.97)} .kpi b{font-size:32px;font-weight:900;line-height:1.05} .kpi span{font-weight:700;font-size:14px} .kpi small{font-size:12.5px;color:var(--mute);font-weight:600}
.kpi.warn{border-top-color:var(--yellow2)} .kpi.bad{border-top-color:var(--red2)}
.teach-list{overflow:hidden} .teach-row{display:flex;gap:14px;padding:13px 14px} .teach-row+.teach-row{border-top:1px solid var(--line)}
.tr-time{width:52px;flex:none;font-weight:800;font-size:16px;padding-top:1px} .tr-time.small{font-size:12.5px;color:var(--mute)} .tr-main{flex:1;min-width:0;display:flex;flex-direction:column;gap:6px} .tr-main .row{flex-wrap:wrap;gap:6px}
details.recent{margin-top:12px} details.recent summary{cursor:pointer;font-weight:700;color:var(--blue2);padding:6px 0;list-style-position:inside} details.recent .card{margin-top:8px}
.nlist{display:flex;flex-direction:column;gap:10px} .card.empty.slim{padding:22px}
.creds{display:grid;grid-template-columns:1fr 1fr;gap:10px} .creds div{padding:12px;border-radius:11px;background:var(--soft)} .creds span{display:block;font-size:12.5px;font-weight:700;color:var(--mute)} .creds b{font-size:19px;font-weight:800} .creds .secret{font-size:24px;letter-spacing:.08em;color:var(--green3)}
.credmsg{background:var(--soft);border-radius:11px}
.daypick{display:flex;gap:6px;flex-wrap:wrap} .daypick label{position:relative;cursor:pointer} .daypick input{position:absolute;opacity:0;inset:0}
.daypick span{display:grid;place-items:center;width:46px;height:42px;border-radius:9px;background:var(--card);box-shadow:inset 0 0 0 1.5px var(--line2);font-weight:700;font-size:14px;transition:.15s} .daypick input:checked+span{background:var(--green);color:#fff;box-shadow:none}
.daypick input:focus-visible+span{outline:2.5px solid var(--blue2);outline-offset:2px}
.li.staff .t{display:flex;flex-wrap:wrap;gap:6px;align-items:center}

/* fixes and additions */
.vsep{display:inline-block;width:1px;height:14px;background:var(--line2);margin:0 10px;vertical-align:-2px}
.hero-bp{display:flex;align-items:flex-end;min-height:150px;padding:20px;margin-bottom:18px}
.hb-art{position:absolute;right:8px;top:8px;bottom:8px;width:min(40%,170px)} .hb-art svg{width:100%;height:100%}
/* The artwork is absolutely placed, so it does not push the greeting around —
   it simply sits on top of it. On a 320px screen "Good morning," is long
   enough to run underneath, which "Good evening," is not, so the greeting was
   legible or not depending on the hour. Below 360px the art steps aside. */
@media (max-width:360px){.hb-art{display:none}}
.hb-text{position:relative;max-width:62%} .hb-text h1{color:#fff} .hb-text .date{font-size:13px;font-weight:700;opacity:.85;margin-bottom:4px} .hb-line{margin-top:6px;font-weight:600;opacity:.92;font-size:14.5px}
@media (min-width:900px){.hero-bp{min-height:170px;padding:26px 30px}.hb-art{right:30px;width:200px}}
@media (max-width:640px){.head-row .srch{flex:1 1 100%;max-width:none;order:3}
  .brow{grid-template-columns:5.6em 2.4em 8.8em;gap:10px;font-size:17px}.brow .flap,.brow.head{font-size:17px}.brow>:nth-child(2){display:none}}
.class-grid:has(.class:only-child){grid-template-columns:minmax(0,520px)}
.sc-body .t{white-space:nowrap} .sc-body .plate{flex:none}

/* ── THE STAGE ROAD, READ TOP TO BOTTOM ── */
/* Extra's roadmap scheme — a spine with numbered stops and cards falling
   alternately to either side of it — drawn in the road this app already speaks:
   asphalt down the middle, a dashed yellow centre line, an exit sign at every
   stop. On a phone the road moves to the left margin and the cards line up
   beside it, because a zig-zag needs width to read. */
.rmap{position:relative;margin:16px 0 0;padding:6px 0}
/* The asphalt and the centre line are explicitly the bottom layer, and every
   stop sits above them. They used to share a layer with the exit signs: the
   entrance animation puts a transform on each stop, a transform makes a
   stacking context, and the sign's own z-index was then trapped inside it —
   so the road and the yellow dashes painted straight through the sign and
   "EXIT 3" came out as "EX" on one side and "IT" on the other. */
.rmap::before{content:"";position:absolute;z-index:0;left:50%;top:10px;bottom:10px;width:14px;margin-left:-7px;border-radius:7px;background:#3B444B}
.rmap::after{content:"";position:absolute;z-index:0;left:50%;top:24px;bottom:24px;width:2px;margin-left:-1px;
  background:repeating-linear-gradient(180deg,#FFC629 0 14px,transparent 14px 26px)}
/* The entrance animation lives on the card, not on the stop. A transform on
   the stop makes it a stacking context, which locks the exit sign into the
   same layer as the asphalt however high its z-index is — that is what buried
   the signs in the road. The stop itself now carries no transform, so its
   z-index means what it says. */
.rmap-stop{position:relative;z-index:1;display:flex;align-items:center;gap:12px;width:50%;padding:10px 0;text-decoration:none;color:var(--ink)}
.rmap-txt{animation:rmapIn .45s var(--ease) backwards;animation-delay:calc(min(var(--i,0),6)*45ms)}
@keyframes rmapIn{from{opacity:0;transform:translateY(10px)}to{opacity:1;transform:none}}
.rmap-stop.l{flex-direction:row-reverse;text-align:right;padding-right:36px}
.rmap-stop.r{margin-left:50%;padding-left:36px}
.rmap-stop>.exit{position:absolute;top:50%;margin-top:-23px;z-index:1}
.rmap-stop.l>.exit{right:-23px}
.rmap-stop.r>.exit{left:-23px}
.rmap-txt{flex:1;min-width:0;background:var(--card);border:1px solid var(--line);border-radius:var(--r);
  padding:11px 13px;box-shadow:var(--shadow);transition:transform .2s var(--ease),box-shadow .2s var(--ease)}
.rmap-txt small{display:block;font-size:10.5px;font-weight:800;letter-spacing:.09em;text-transform:uppercase;color:var(--mute)}
.rmap-txt b{display:block;font-size:15px;font-weight:800;line-height:1.25;margin:3px 0 2px}
.rmap-txt .sub{display:block;font-size:12.5px;color:var(--mute);line-height:1.3}
.rmap-stop.next>.exit{transform:scale(1.12)}
.rmap-stop.next .rmap-txt{border:2px solid var(--red);box-shadow:0 12px 26px -14px rgba(210,16,48,.5)}
.rmap-stop.next .rmap-txt small{color:var(--red2)}
.rmap-stop.done .rmap-txt small{color:var(--green3)}
/* dim the card, never the sign: a translucent sign lets the centre line
   show straight through it */
.rmap-stop.locked .rmap-txt{opacity:.72}
.rmap-stop>.exit{box-shadow:0 0 0 4px var(--paper)}
@media (hover:hover){.rmap-stop:not(.locked):hover .rmap-txt{transform:translateY(-2px);box-shadow:var(--shadow-up)}}
@media (max-width:620px){
  .rmap::before{left:23px;margin-left:0}
  .rmap::after{left:29px;margin-left:0}
  .rmap-stop,.rmap-stop.l,.rmap-stop.r{width:100%;margin-left:0;flex-direction:row;text-align:left;padding:9px 0 9px 58px}
  .rmap-stop.l>.exit,.rmap-stop.r>.exit{left:0;right:auto}
}
@media (prefers-reduced-motion:reduce){.rmap-stop{animation:none}}

/* ── SIGN-IN, EXTRA'S SCHEME ── */
/* Extra's sign-in, in detail: three blurred orbs and a ruled grid behind
   everything, the mark with its own shadow, the wordmark and badge, the
   academy's promise, a glass card over the wash, and the contacts underneath.
   The colours are this app's — blue, green and the flag red — and each piece
   rises a beat after the one above it. */
.auth2{position:relative;min-height:100dvh;min-height:100vh;display:flex;align-items:flex-start;
  justify-content:center;padding:18px 16px 24px;background:var(--paper);overflow:hidden}
.auth-bg{position:fixed;inset:0;z-index:0;overflow:hidden;pointer-events:none}
.orb{position:absolute;border-radius:50%;filter:blur(60px);opacity:.55;animation:orbFloat 14s ease-in-out infinite}
.orb.o1{width:420px;height:420px;background:#C3D6F2;left:-120px;top:-80px}
.orb.o2{width:360px;height:360px;background:#F2CFD5;right:-120px;top:30%;animation-delay:-5s}
.orb.o3{width:300px;height:300px;background:#C7E3D5;left:30%;bottom:-140px;animation-delay:-9s}
.gridlines{position:absolute;inset:0;
  background-image:linear-gradient(rgba(1,0,76,.05) 1px,transparent 1px),
                   linear-gradient(90deg,rgba(1,0,76,.05) 1px,transparent 1px);
  background-size:40px 40px;
  -webkit-mask-image:radial-gradient(120% 90% at 50% 0%,#000 35%,transparent 78%);
  mask-image:radial-gradient(120% 90% at 50% 0%,#000 35%,transparent 78%)}
@keyframes orbFloat{0%,100%{transform:translate(0,0)}50%{transform:translate(30px,24px)}}

/* the column is the card's width; the contacts are allowed past it so the
   three of them sit on one line the way they do on Extra */
.auth2-in{position:relative;z-index:1;width:100%;max-width:580px;display:flex;flex-direction:column;align-items:center}
.auth2-in>.auth-lang,.auth2-in>.auth-hero,.auth2-in>.auth-card{width:100%;max-width:430px}
.auth2-in>*{animation:rise .7s var(--ease) backwards}
.auth2-in>.auth-card{animation-delay:.12s}
.auth2-in>.auth-contact{animation-delay:.24s}
@keyframes rise{from{opacity:0;transform:translateY(12px)}to{opacity:1;transform:none}}
@keyframes popIn{0%{transform:scale(.6);opacity:0}60%{transform:scale(1.08)}100%{transform:scale(1);opacity:1}}

.auth-lang{display:flex;align-items:center;justify-content:center;gap:8px;margin:0 auto 14px;color:var(--mute)}
.auth-lang .i{width:17px;height:17px}
.auth-lang .seg{background:rgba(255,255,255,.75);-webkit-backdrop-filter:blur(6px);backdrop-filter:blur(6px);box-shadow:0 0 0 1px var(--line)}
.auth-lang .seg button{padding:6px 11px;font-size:13px}
.auth-theme{background:rgba(255,255,255,.75);-webkit-backdrop-filter:blur(6px);backdrop-filter:blur(6px);
  box-shadow:0 0 0 1px var(--line);border-radius:10px;width:34px;height:34px;flex:none}
:root[data-theme="dark"] .auth-theme{background:rgba(12,14,56,.78)}
@media (prefers-color-scheme:dark){:root:not([data-theme="light"]) .auth-theme{background:rgba(12,14,56,.78)}}

.auth-hero{text-align:center;padding:2px 0 4px;display:flex;flex-direction:column;align-items:center}
.auth-logo{display:inline-flex;filter:drop-shadow(0 12px 20px rgba(1,0,76,.26));animation:popIn .7s var(--ease) both}
.auth-logo svg{width:58px;height:58px;border-radius:15px}
.brand-big{display:flex;align-items:center;justify-content:center;gap:9px;font-weight:800;
  letter-spacing:.2em;color:var(--ink);font-size:16px;margin-top:12px}
.brand-big em{font-style:normal;background:var(--red);color:#fff;padding:3px 9px;border-radius:5px;
  font-size:11px;letter-spacing:.18em;text-transform:uppercase}
.motto{font-weight:700;font-size:20px;line-height:1.3;letter-spacing:-.01em;margin:12px auto 0;max-width:340px;color:var(--ink)}

.auth-card{width:100%;margin-top:20px;background:rgba(255,255,255,.92);
  -webkit-backdrop-filter:blur(10px);backdrop-filter:blur(10px);
  border-radius:var(--r-sign);padding:18px;box-shadow:var(--shadow-up);
  border:1px solid rgba(255,255,255,.8);outline:1px solid var(--line);outline-offset:-1px}
.auth-tabs{display:flex;gap:4px;background:var(--soft);border-radius:11px;padding:4px;margin-bottom:16px}
.auth-tabs button{flex:1;padding:10px 8px;border-radius:8px;font-weight:700;font-size:14.5px;color:var(--mute);
  background:transparent;transition:background .2s var(--ease),color .2s var(--ease)}
.auth-tabs button.on{background:var(--card);color:var(--ink);box-shadow:0 1px 3px rgba(1,0,76,.14)}
.auth-card h1{font-size:21px;margin:0 0 2px}
.auth-card .lead{margin:0 0 14px}

.auth-contact{text-align:center;margin:18px 0 6px;color:var(--mute);font-size:13.5px}
.ac-links{display:flex;justify-content:center;gap:8px;flex-wrap:wrap;margin-top:8px}
.ac-links a{display:inline-flex;align-items:center;gap:7px;padding:8px 13px;border-radius:30px;
  background:var(--card);border:1px solid var(--line);color:var(--ink);font-weight:700;
  text-decoration:none;font-size:13.5px;transition:border-color .2s var(--ease),transform .2s var(--ease),box-shadow .2s var(--ease)}
.ac-links a:hover{border-color:var(--blue2);transform:translateY(-1px);box-shadow:var(--shadow)}
.ac-links .i{width:17px;height:17px;color:var(--red2)}

@media (max-width:520px){.auth2{padding-top:14px}.auth-logo svg{width:52px;height:52px}.motto{font-size:18px}}
@media (prefers-reduced-motion:reduce){.orb{animation:none}.auth2-in>*,.auth-logo{animation:none}}

/* the same wash after dark: the orbs deepen rather than glow, and the card
   becomes a dark glass so the type on it still holds */
:root[data-theme="dark"] .orb{opacity:.3;filter:blur(72px)}
:root[data-theme="dark"] .orb.o1{background:#1B3A6B}
:root[data-theme="dark"] .orb.o2{background:#5A1526}
:root[data-theme="dark"] .orb.o3{background:#13402F}
:root[data-theme="dark"] .gridlines{background-image:linear-gradient(rgba(190,210,230,.055) 1px,transparent 1px),linear-gradient(90deg,rgba(190,210,230,.055) 1px,transparent 1px)}
:root[data-theme="dark"] .auth-card{background:rgba(12,14,56,.9);border-color:rgba(255,255,255,.07)}
:root[data-theme="dark"] .auth-lang .seg{background:rgba(12,14,56,.78);box-shadow:0 0 0 1px var(--line)}
:root[data-theme="dark"] .auth-logo{filter:drop-shadow(0 12px 22px rgba(0,0,0,.7))}
@media (prefers-color-scheme:dark){
  :root:not([data-theme="light"]) .orb{opacity:.3;filter:blur(72px)}
  :root:not([data-theme="light"]) .orb.o1{background:#1B3A6B}
  :root:not([data-theme="light"]) .orb.o2{background:#5A1526}
  :root:not([data-theme="light"]) .orb.o3{background:#13402F}
  :root:not([data-theme="light"]) .gridlines{background-image:linear-gradient(rgba(190,210,230,.055) 1px,transparent 1px),linear-gradient(90deg,rgba(190,210,230,.055) 1px,transparent 1px)}
  :root:not([data-theme="light"]) .auth-card{background:rgba(12,14,56,.9);border-color:rgba(255,255,255,.07)}
  :root:not([data-theme="light"]) .auth-lang .seg{background:rgba(12,14,56,.78);box-shadow:0 0 0 1px var(--line)}
  :root:not([data-theme="light"]) .auth-logo{filter:drop-shadow(0 12px 22px rgba(0,0,0,.7))}
}

/* ── THE PROFILE ── */
/* Extra's profile, in this app's dress: a heading that says whose page this is,
   the pass, then the picture and what you have to say about yourself as two
   proper cards rather than a row of links. */
/* The profile header had no rule of its own at all, so the picture and the
   name stacked straight on top of one another with nothing between them.
   Picture, then who you are, then your stage. */
.me-head{display:flex;align-items:center;gap:18px;margin:4px 0 22px}
.me-head>.av{flex:none}
.me-head h1{display:flex;align-items:center;gap:8px;margin:0 0 4px;line-height:1.15;
  font-size:clamp(22px,5vw,30px)}
.me-head p{margin:0 0 2px}
.me-head p+p{margin-top:1px}
.me-head .me-edit{flex:none;color:var(--mute)}
@media (max-width:520px){.me-head{gap:14px} .me-head>.av.lg{width:56px;height:56px;font-size:19px}}

.pf-head{margin:2px 0 14px}
.pf-head .kicker{display:block;font-size:11px;font-weight:800;letter-spacing:.12em;
  text-transform:uppercase;color:var(--red2);margin-bottom:2px}
.pf-head h1{margin:2px 0 2px}
.pf-head .lead{margin:0}
.pf-card{margin-top:14px}
.pf-h{font-size:16px;font-weight:800;margin:0 0 12px}
.pf-pick{display:flex;gap:16px;align-items:flex-start;flex-wrap:wrap}
.pf-now{width:84px;height:84px;font-size:27px;flex:none;box-shadow:0 0 0 4px var(--card),0 10px 22px -12px rgba(1,0,76,.4)}
.pf-grid-wrap{flex:1;min-width:210px}
.pf-lab{font-size:11px;font-weight:800;letter-spacing:.1em;text-transform:uppercase;color:var(--mute);margin-bottom:9px}
/* five and five, so the set reads as a deliberate block rather than a row
   that happened to wrap */
/* Five columns that share whatever width there is, rather than five columns
   of exactly 46px. Fixed, they needed 266px; the wrapper shrinks below that on
   a 360 or 375px phone, and the grid kept laying out at its full width, so the
   last column sat outside the card and half off the screen. The cap keeps the
   original size everywhere there is room for it. */
.pf-grid{display:grid;grid-template-columns:repeat(5,minmax(0,1fr));gap:9px;margin-bottom:12px;max-width:266px}
.pf-char{width:100%;max-width:46px;aspect-ratio:1;border-radius:50%;display:grid;place-items:center;flex:none;
  background:var(--soft2);color:var(--ink2);border:2px solid transparent;
  transition:transform .18s var(--spring),border-color .18s var(--ease),background .18s var(--ease)}
.pf-char .ch{width:23px;height:23px}
/* Every character you have not picked is one thing, not two — an alternating fill
   reads as a state nobody chose. Only the pick is marked, and it is marked the way
   the picture will actually look: filled, beside the big one it is about to become. */
/* Ten characters, ten colours. Every one is pinned, like the avatar palette, because
   each carries a white glyph: a plate does not invert, and --ink would have turned
   white at night and taken the glyph with it. Deep flag tones, flat — no gradient and
   no orange, which is what this app was asked for.
   The unpicked chips wear the same colour at rest, dimmed, so the row reads as one
   set of choices; the pick comes forward in full and takes the ring. */
.pf-char{opacity:.55}
.pf-char.on{opacity:1;border-color:var(--red2);transform:scale(1.06)}
@media (hover:hover){.pf-char:hover{opacity:1}}
.av.ch-star   ,.pf-char.ch-star   {background:#0C3676;color:#fff}
.av.ch-bolt   ,.pf-char.ch-bolt   {background:#D21030;color:#fff}
.av.ch-globe  ,.pf-char.ch-globe  {background:#0F6B74;color:#fff}
.av.ch-crown  ,.pf-char.ch-crown  {background:#12499B;color:#fff}
.av.ch-rocket ,.pf-char.ch-rocket {background:#3B3570;color:#fff}
.av.ch-case   ,.pf-char.ch-case   {background:#6B4A33;color:#fff}
.av.ch-compass,.pf-char.ch-compass{background:#0A6B4B;color:#fff}
.av.ch-mic    ,.pf-char.ch-mic    {background:#3C4850;color:#fff}
.av.ch-heart  ,.pf-char.ch-heart  {background:#8C1F3D;color:#fff}
.av.ch-peak   ,.pf-char.ch-peak   {background:#1D5E8C;color:#fff}
@media (hover:hover){.pf-char:hover{transform:translateY(-2px) scale(1.04)}}
/* The character is drawn at 58% of the circle, so it never reaches the edge and
   there is nothing here to clip. Clipping the circle only ever caught the one
   thing that is MEANT to sit on its edge: the active light. Same fault as the
   photo avatars had, in the other branch. */
.av.has-ch .ch{width:58%;height:58%;color:#fff;border-radius:50%}
.pf-now.has-ch .ch{width:46px;height:46px}
.pf-card textarea.input{resize:vertical;min-height:84px;font:inherit;line-height:1.45;padding:11px 13px}
@media (max-width:560px){.pf-pick{gap:13px}.pf-now{width:70px;height:70px;font-size:23px}.pf-now.has-ch .ch{width:38px;height:38px}}

/* ── THE DAY AND NIGHT SWITCH ── */
/* The sun and moon swap places rather than cutting: the old one is already gone
   when this runs, so the new one swings in from behind the press and settles.
   Sized to sit with the bell beside it, not above it. */
[data-a="theme"] .ic{width:20px;height:20px;transform-origin:50% 50%}
[data-a="theme"].swap .ic{animation:themeSwap .46s var(--spring) both}
@keyframes themeSwap{
  from{transform:rotate(-140deg) scale(.45);opacity:0}
  60%{opacity:1}
  to{transform:rotate(0) scale(1);opacity:1}
}
@media (hover:hover){[data-a="theme"]:hover .ic{transform:rotate(-12deg)}}
[data-a="theme"] .ic{transition:transform .22s var(--spring)}
@media (prefers-reduced-motion:reduce){
  [data-a="theme"].swap .ic{animation:none}
  [data-a="theme"]:hover .ic{transform:none}
}

/* ── THE VOCABULARY TEST ──
   The gate, then the test itself. While it runs the lists behind it are blurred
   and inert: a test you can read the answers off is not a test. The blur is on a
   wrapper rather than on each card so there is no seam between them, and
   pointer-events go with it so a stray tap cannot open a word. */
.vq-gate{margin-top:22px;text-align:center}
.vq-gate-i{color:var(--red2);margin-bottom:4px}
.vq-gate h2{margin:0 0 6px}
.vq-gate p{margin:0 auto 10px;max-width:46ch}
.vq-gate .btn{margin-top:6px}
.words.vq-locked{filter:blur(9px) saturate(.6);opacity:.45;pointer-events:none;user-select:none;
  transform:scale(.985);transition:filter .45s var(--ease),opacity .45s var(--ease),transform .45s var(--ease)}

.vq{margin-bottom:18px}
.vq-bar{height:6px;border-radius:99px;background:var(--soft2);overflow:hidden;margin-bottom:10px}
.vq-bar>i{display:block;height:100%;background:var(--red);transition:width .35s var(--ease)}
.vq-meta{display:flex;align-items:center;gap:10px;margin-bottom:10px}
.vq-meta .num{font-weight:800;color:var(--mute)}
.vq-hintb{margin-left:auto}
.vq-card{text-align:center}
.vq-term{display:flex;align-items:center;justify-content:center;gap:10px;flex-wrap:wrap;margin-bottom:4px}
.vq-term b{font-size:clamp(26px,5.4vw,38px);font-weight:800;letter-spacing:-.015em;line-height:1.1}
.vq-pron{color:var(--mute);font-size:15px}
.vq-cols{display:grid;gap:12px;margin-top:16px}
@media(min-width:560px){.vq-cols:has(.vq-col+.vq-col){grid-template-columns:1fr 1fr}}
.vq-lab{font-size:11.5px;font-weight:800;letter-spacing:.09em;text-transform:uppercase;color:var(--faint);margin-bottom:6px}
.vq-opt{display:block;width:100%;margin-bottom:8px;padding:13px 14px;border-radius:var(--r);border:0;cursor:pointer;
  background:var(--card);color:var(--ink);font:inherit;font-weight:700;font-size:15.5px;text-align:center;
  box-shadow:inset 0 0 0 1.5px var(--line);transition:transform .14s var(--spring),box-shadow .14s var(--ease),background .14s var(--ease)}
@media(hover:hover){.vq-opt:not(:disabled):hover{box-shadow:inset 0 0 0 2px var(--ink2);transform:translateY(-1px)}}
.vq-opt:active:not(:disabled){transform:scale(.975)}
/* the verdict: these are plates and carry white type, so they are pinned */
.vq-opt.ok{background:#0A6B4B;color:#fff;box-shadow:inset 0 0 0 1.5px rgba(0,0,0,.2)}
.vq-opt.bad{background:#D21030;color:#fff;box-shadow:inset 0 0 0 1.5px rgba(0,0,0,.2)}
.vq-opt.dim{opacity:.4}
.vq-say{margin:14px 0 0;color:var(--red2);font-weight:700}
.vq-mid,.vq-end{text-align:center}
.vq-round{display:inline-block;font-size:12px;font-weight:800;letter-spacing:.08em;text-transform:uppercase;color:var(--faint);margin-bottom:4px}
.vq-trophy{color:var(--yellow2)}
.vq-end h2{margin:4px 0 4px}
.vq-end .row{justify-content:center;margin-top:12px}

/* ── THE LESSON'S PLAYER ──
   A film, not a slideshow. The artwork drifts for the length of its own scene;
   a flashback is sepia, as it is on the lesson page. */
.vp{margin-bottom:16px}
.vp-stage{position:relative;aspect-ratio:16/9;border-radius:var(--r-sign);overflow:hidden;background:var(--flap);
  box-shadow:var(--shadow);display:grid;place-items:center}
/* A LENS, NOT A WINDOW.
   Flat vector art fills the frame evenly to the corners, which is what makes
   it read as a diagram. Every real frame is a shade darker at its edges than
   at its centre; this puts that back, in one layer that nothing has to think
   about and no pointer can catch. */
.vp-stage::after{content:'';position:absolute;inset:0;pointer-events:none;z-index:2;
  background:radial-gradient(118% 92% at 50% 46%, rgba(0,0,0,0) 52%, rgba(10,22,44,.10) 82%, rgba(10,22,44,.24) 100%)}
/* The frames stack, so one can be brought up over another (see vrShow). */
.vp-art{position:absolute;inset:0;width:100%;height:100%;display:grid;place-items:center;
  transition:opacity .55s var(--ease)}
.vp-art.out{opacity:0}
.vp-art svg{width:100%;height:100%;display:block}
.vp-art.past{filter:sepia(.75) contrast(.92)}
.vp .vp-bar{height:5px;border-radius:99px;background:var(--soft2);overflow:hidden;margin:9px 0 0}
.vp .vp-bar>i{display:block;height:100%;width:0;background:var(--red)}
.vp-cap{margin:11px 0 0;font-size:16.5px;line-height:1.45;min-height:1.45em;text-wrap:balance}
.vp-cap b{background:var(--hl-bg);background-repeat:var(--hl-rep);background-size:var(--hl-size);background-position:var(--hl-pos)}
/* The line the narrator is reading. It sits under the caption rather than
   replacing it, set a shade quieter and in the reading face, because the
   caption is the lesson's own words on the picture and this is speech being
   followed along with. `min-height` holds the space so the controls below do
   not jump every time a longer or shorter line comes round. */
.vp-say{margin:7px 0 0;font-size:15.5px;line-height:1.5;color:var(--mute);
  min-height:1.5em;text-wrap:pretty}
.vp.playing .vp-say{color:var(--ink)}
.vp-dl{margin:2px 0 0}
.vp-head{display:flex;flex-wrap:wrap;align-items:baseline;gap:8px;margin:8px 0 12px}
.vp-head b{font-size:18px;font-weight:800}
.vp-ctl{display:flex;align-items:center;gap:9px}
.vp-ctl .num{flex:none;min-width:52px;text-align:center}
/* THE CAMERA MOVE THE LESSON PICKS PER SCENE
 *
 * Three things were wrong with this and all three showed.
 *
 * It ran at a constant speed. Nothing with a camera operator behind it moves
 * at a constant speed: a move starts, carries, and settles. The curve below
 * is a fluid head — slow away, pace through the middle, slow into the stop.
 *
 * It was given nine seconds whatever the scene's length, and `--kb` was never
 * set, so the duration was always the fallback. A short scene cut away
 * mid-move and a long narrated one froze for its last five seconds. vrShow
 * now sets `--kb` to how long this scene is really up.
 *
 * And the four moves were nearly the same move: a small push, ±1.5% across.
 * They have range now, and two of them carry a fraction of a degree of roll,
 * which is the thing that separates a camera from a CSS zoom. Every end state
 * keeps its scale above the travel it asks for, so no move can ever drift the
 * artwork off its own frame. */
.playing .vp-art{will-change:transform}
.playing .vp-art.kb0{animation:kb0 var(--kb,9s) cubic-bezier(.4,.04,.5,.96) both}
.playing .vp-art.kb1{animation:kb1 var(--kb,9s) cubic-bezier(.4,.04,.5,.96) both}
.playing .vp-art.kb2{animation:kb2 var(--kb,9s) cubic-bezier(.4,.04,.5,.96) both}
.playing .vp-art.kb3{animation:kb3 var(--kb,9s) cubic-bezier(.4,.04,.5,.96) both}
/* straight in, on the middle of the frame */
@keyframes kb0{from{transform:scale(1.035)}to{transform:scale(1.15)}}
/* pulling back off a detail, drifting right to left, settling level */
@keyframes kb1{from{transform:scale(1.16) translate(1.8%,-.8%) rotate(.3deg)}
  to{transform:scale(1.065) translate(-1.6%,.6%) rotate(0deg)}}
/* pushing in and rising */
@keyframes kb2{from{transform:scale(1.06) translate(-1.2%,1.8%)}
  to{transform:scale(1.165) translate(.8%,-1.6%)}}
/* pulling back the other way, with the roll coming out of it */
@keyframes kb3{from{transform:scale(1.175) translate(-1.8%,.8%) rotate(-.28deg)}
  to{transform:scale(1.075) translate(1.6%,-.6%) rotate(0deg)}}
/* Nobody who asked their phone to stop moving things gets a drifting camera.
   The dissolve stays: a cross-fade carries no motion to be unsettled by. */
@media (prefers-reduced-motion:reduce){.vp-art{animation:none !important;will-change:auto}}

/* ── SPEAKING: THE FOUR MOVES ── */
.ap{margin-bottom:18px}
.ap-top{display:flex;align-items:center;gap:10px;margin-bottom:7px}
.ap-label{font-size:11.5px;font-weight:800;letter-spacing:.09em;text-transform:uppercase;color:var(--red2)}
.ap-top .num{margin-left:auto}
.ap-stage{position:relative;aspect-ratio:16/9;border-radius:var(--r-sign);overflow:hidden;background:var(--flap);color:#F7F3E3;
  box-shadow:var(--shadow);display:grid;place-items:center;padding:16px}
.ab-sc{display:grid;gap:14px;width:100%;height:100%;align-items:center}
@media(min-width:620px){.ab-sc:has(.ab-art){grid-template-columns:1.1fr 1fr}}
.ab-center{place-items:center;text-align:center;align-content:center}
.ab-big{font-size:clamp(34px,7vw,58px);font-weight:800;letter-spacing:.16em}
.ab-sub{font-size:clamp(15px,2.4vw,20px);opacity:.88}.ab-sub.b{font-weight:800}
.ab-row{display:flex;flex-wrap:wrap;gap:10px;justify-content:center}
.ab-row span{display:flex;gap:6px;align-items:baseline;font-size:13.5px;opacity:.9}
.ab-row b{color:var(--yellow)}
.ab-note{font-size:13px;opacity:.75}
.ab-art{display:grid;place-items:center;height:100%}
.ab-art svg{width:100%;height:100%;max-height:230px}
.ab-h{display:flex;gap:9px;align-items:baseline;font-weight:800;font-size:17px;margin-bottom:6px}
.ab-h b{color:var(--yellow);font-size:22px}
.ab-cap{font-size:14.5px;opacity:.9;margin:2px 0}
.ab-q{margin-top:8px;font-weight:700;color:var(--yellow)}
.ab-vv{margin-top:6px;font-size:12.5px;opacity:.75}
.ab-vv small{font-weight:800;letter-spacing:.08em}
.ap-bar{height:5px;border-radius:99px;background:var(--soft2);overflow:hidden;margin:9px 0}
.ap-bar>i{display:block;height:100%;width:0;background:var(--red)}
.ap-ctl{display:flex;gap:9px;align-items:center}
.ap-how{margin:9px 0 0}
.ab-cards{display:grid;gap:12px}
@media(min-width:720px){.ab-cards{grid-template-columns:1fr 1fr}}
.ab-ch{display:flex;align-items:center;gap:10px;margin-bottom:8px}
.ab-l{width:34px;height:34px;border-radius:9px;display:grid;place-items:center;flex:none;
  background:var(--red);color:#fff;font-weight:800;font-size:18px}
.ab-ch h3{margin:0;font-size:17px}
.ab-st{margin:0 0 10px;padding-left:18px}.ab-st li{margin:3px 0}
.ab-words{display:flex;flex-wrap:wrap;gap:6px;margin-bottom:9px}
.ab-task{margin:0;font-size:14.5px;color:var(--ink2)}
.ab-run{margin-top:14px}
.ab-clock{font-size:24px;font-weight:800;font-variant-numeric:tabular-nums;margin-right:10px}
.cue-cards{display:grid;gap:12px}
@media(min-width:720px){.cue-cards{grid-template-columns:1fr 1fr}}
.cue-card h3{margin:4px 0 8px;font-size:18px}
.cue-say{margin:6px 0 0;padding-left:18px}.cue-say li{margin:3px 0}
.dq .dq-n{width:24px;flex:none;font-weight:800;color:var(--faint)}
.dq-w{display:flex;flex-wrap:wrap;gap:5px;margin-top:6px}

/* the listening-speed slider, in the app's own dress rather than the device's */
.rng{-webkit-appearance:none;appearance:none;width:170px;max-width:48vw;height:22px;background:none;cursor:pointer}
.rng::-webkit-slider-runnable-track{height:6px;border-radius:99px;background:var(--soft2)}
.rng::-moz-range-track{height:6px;border-radius:99px;background:var(--soft2)}
.rng::-webkit-slider-thumb{-webkit-appearance:none;appearance:none;width:22px;height:22px;margin-top:-8px;border-radius:50%;
  background:var(--red);box-shadow:inset 0 0 0 3px rgba(255,255,255,.9),var(--shadow);transition:transform .14s var(--spring)}
.rng::-moz-range-thumb{width:22px;height:22px;border:0;border-radius:50%;background:var(--red);
  box-shadow:inset 0 0 0 3px rgba(255,255,255,.9),var(--shadow)}
.rng:active::-webkit-slider-thumb{transform:scale(1.14)}

/* ── THE APP'S OWN DROPDOWN ──
   The real select stays in the form and keeps working; it is simply never the
   thing anybody sees, so no device ever puts its own wheel over this app. */
select.nsel-real{position:absolute;width:1px;height:1px;opacity:0;pointer-events:none;clip-path:inset(50%);overflow:hidden}
.nsel{display:flex;align-items:center;gap:8px;width:100%;min-height:46px;padding:0 12px 0 14px;border:0;cursor:pointer;
  border-radius:var(--r-s);background:var(--card);color:var(--ink);font:inherit;font-weight:700;font-size:15.5px;text-align:left;
  box-shadow:inset 0 0 0 1.5px var(--line);transition:box-shadow .15s var(--ease)}
.nsel.slim{min-height:38px;font-size:14.5px}
.nsel-v{flex:1;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}
.nsel .ic{color:var(--mute);flex:none}
.nsel:disabled{opacity:.55;cursor:default}
@media(hover:hover){.nsel:not(:disabled):hover{box-shadow:inset 0 0 0 2px var(--ink2)}}
.nsel[aria-expanded="true"]{box-shadow:inset 0 0 0 2px var(--red),0 0 0 3.5px var(--red-t)}
/* It opens unhurriedly and without a bounce. At .15s on a spring it snapped
   open and the overshoot read as the page twitching. */
.nsel-pop{position:fixed;z-index:120;overflow:auto;border-radius:var(--r);background:var(--card);
  box-shadow:var(--shadow-up);padding:5px;opacity:0;transform:translateY(-5px);
  transition:opacity .22s var(--ease),transform .22s var(--ease)}
@media (prefers-reduced-motion:reduce){.nsel-pop{transition:none}}
.nsel-pop.on{opacity:1;transform:none}
.nsel-g{padding:9px 11px 5px;font-size:11.5px;font-weight:800;letter-spacing:.08em;text-transform:uppercase;color:var(--faint)}
.nsel-o{display:block;width:100%;padding:10px 12px;border:0;border-radius:var(--r-s);cursor:pointer;
  background:none;color:var(--ink);font:inherit;font-size:15px;font-weight:600;text-align:left}
@media(hover:hover){.nsel-o:hover{background:var(--soft)}}
.nsel-o[aria-selected="true"]{background:var(--red);color:#fff;font-weight:800}
.nsel-o:disabled{opacity:.45;cursor:default}

/* ── THE PRESS ──
   It gives a little under the finger and comes back. That is all: the ripple
   and the glow that used to follow a tap were weather, not an answer. */
.pressing{transform:scale(.985) !important;transition:transform .08s var(--ease) !important}
/* overflow stays: it is what rounds the blueprint on a stage card */
.btn,.vq-opt,.nsel,.wtile,.pf-char,.stage-card{position:relative;overflow:hidden}
@media (prefers-reduced-motion:reduce){.pressing{transform:none !important}}


/* ── THE HIGHLIGHTER ──
   The marked words are highlighted in four places — the story caption, the
   player caption, the reading and the model answer — and each of those sets a
   different line-height. A gradient with a percentage stop lands somewhere
   different in each, which is why the bar looked detached in one place and
   right in another.

   So the bar is measured in em: a third of the type's own size, sitting just
   under the baseline. It is then the same stroke at every size, in every one of
   the four, and it rides along when the type scales. `clone` keeps it whole
   when a highlighted phrase wraps onto a second line. */
:root{
  --hl-bg:linear-gradient(var(--yellow),var(--yellow));
  --hl-rep:no-repeat;
  --hl-size:100% .34em;
  --hl-pos:0 .96em;
}
.cap b,.rd p b,.model b,.vp-cap b{
  -webkit-box-decoration-break:clone;box-decoration-break:clone;
  padding:0 .06em;margin:0 -.06em;border-radius:1px}

/* ───────────────────────── the microphone
   Three states in one strip, only ever one of them showing: an invitation, a
   live take with its level, and the take that is already with the teacher.
   Recording is the one place in the app that uses a steady pulsing red: it is
   the state a student must never be in by accident. */
.rec{margin-top:12px}
.rec-no{display:flex;gap:7px;align-items:flex-start;margin:10px 0 0}
.rec-no .ic{flex:none;margin-top:1px;color:var(--mute)}
.rec-go{width:100%;justify-content:center}
.rec-live{display:flex;align-items:center;gap:10px;padding:8px 10px;border-radius:12px;
  background:var(--red-t);box-shadow:inset 0 0 0 1.5px var(--red)}
.rec-dot{width:11px;height:11px;border-radius:50%;background:var(--red);flex:none;animation:recpulse 1.3s var(--ease) infinite}
@keyframes recpulse{0%,100%{opacity:1;transform:scale(1)}50%{opacity:.35;transform:scale(.78)}}
.rec-t{font-weight:800;color:var(--red2);font-variant-numeric:tabular-nums;min-width:38px}
.rec-meter{flex:1;height:8px;border-radius:99px;background:rgba(210,16,48,.18);overflow:hidden;min-width:40px}
.rec-meter>i{display:block;height:100%;width:100%;border-radius:99px;background:var(--red);
  transform:scaleX(0);transform-origin:left center;transition:transform .07s linear}
.rec-have{display:flex;align-items:center;gap:9px;flex-wrap:wrap}
.rec-sent{display:inline-flex;align-items:center;gap:4px;font-size:12.5px;font-weight:700;color:var(--green3)}
.rec-sent .ic{width:15px;height:15px}
.rec-play.on{background:var(--red);color:#fff;box-shadow:inset 0 0 0 2px var(--red)}
@media (prefers-reduced-motion:reduce){.rec-dot{animation:none}}

/* a student's takes, as their teacher sees them */
.tk{display:flex;align-items:center;gap:10px;padding:11px 0}
.tk+.tk{border-top:1px solid var(--line)}
.tk-w{min-width:0;flex:1}
.tk-p{font-weight:700;font-size:14.5px}
.tk-m{color:var(--mute);font-size:12.5px}
.rec-hear.on{background:var(--red);color:#fff;box-shadow:inset 0 0 0 2px var(--red)}

/* ───────────────────────── the profile, after Extra's
   One panel of settings with a steady rhythm, rather than a section heading and
   a card for every single choice. A row is label and control side by side; a row
   that marks itself `.col` puts the control underneath, which is what a segment
   or a slider needs on a phone. */
.settings-list{padding:2px 16px}
.set-row{display:flex;align-items:center;gap:14px;padding:15px 0}
.set-row+.set-row{border-top:1px solid var(--line)}
.set-row>div:first-child{flex:1;min-width:0}
.set-row b{display:block;font-size:15px;font-weight:700}
.set-row small{display:block;color:var(--mute);font-size:12.5px;line-height:1.45;margin-top:2px}
.set-row.col{flex-direction:column;align-items:stretch;gap:10px}
.set-row.col .seg,.set-row.col .rng{width:100%}
.pf-actions{display:flex;flex-direction:column;gap:9px;margin-top:18px}
.pf-actions .btn{justify-content:flex-start;gap:10px}
.btn.danger{color:var(--red2)}
.btn.danger .ic{color:var(--red2)}
@media (hover:hover){.btn.danger:hover{background:var(--red-t);box-shadow:inset 0 0 0 1.5px var(--red)}}

/* a photograph fills the circle it is shown in, at every size */
.av.has-ph{background:var(--soft2)}
.av.has-ph>img{width:100%;height:100%;object-fit:cover;display:block;border-radius:50%}
.pf-now.has-ph>img{border-radius:50%}
.pf-foot{display:flex;flex-wrap:wrap;gap:8px}
.pf-tel{margin-left:auto;font-style:normal;color:var(--mute);font-weight:600;font-size:13px}
/* Removing a photo is a step back, not a third way to choose one, so it sits
   apart from the two that set a picture rather than queuing beside them. */
.pf-foot [data-a="photo-off"]{margin-left:auto}

/* ───────────────────────── E — write the conversation
   The bank is the scoreboard. A word lights the moment it is used, which is why
   there is no Check button on this one: the feedback is the writing itself. */
.tb-bank{margin-bottom:14px}
.tb-bank .chip{transition:background .2s var(--ease),color .2s,box-shadow .2s}
.tb-bank .chip.hit{background:var(--green-t);color:var(--green3);box-shadow:inset 0 0 0 1.5px var(--green2);font-weight:700}
.tb-bank .chip.hit .ic{width:14px;height:14px;margin-right:4px;vertical-align:-2px}
@keyframes tbpop{0%{transform:scale(1)}42%{transform:scale(1.13)}100%{transform:scale(1)}}
.tb-bank .chip.pop{animation:tbpop .34s var(--spring)}
.tb-lines{display:flex;flex-direction:column;gap:9px}
.tb-line{display:flex;align-items:flex-start;gap:9px}
.tb-who{flex:none;width:30px;height:30px;border-radius:50%;display:grid;place-items:center;
  font-weight:800;font-size:13px;color:#fff;margin-top:9px}
.tb-who.a{background:var(--blue)} .tb-who.b{background:var(--red)}
.tb-in{flex:1;min-height:52px;padding:11px 12px;line-height:1.45;resize:vertical}
.tb-foot{margin-top:14px;gap:10px;flex-wrap:wrap}
@media (prefers-reduced-motion:reduce){.tb-bank .chip.pop{animation:none}}

/* ───────────────────────── the dictionary
   Every word the academy teaches, in one alphabet. The entries are dense on
   purpose — someone looking a word up is scanning, not reading. */
.dict-head{display:flex;flex-direction:column;gap:10px;margin-bottom:14px}
.dict-find{position:relative;display:flex;align-items:center}
.dict-find>.ic{position:absolute;left:12px;color:var(--mute);pointer-events:none}
.dict-find .input{padding-left:38px;padding-right:40px}
.dict-find .input::-webkit-search-cancel-button{display:none}
.dict-x{position:absolute;right:6px;width:32px;height:32px;display:grid;place-items:center;
  border-radius:8px;color:var(--mute)}
@media (hover:hover){.dict-x:hover{background:var(--soft2);color:var(--ink)}}
.dict-g{margin-bottom:18px}
.dict-l{position:sticky;top:calc(var(--top) + var(--sat));z-index:2;background:var(--paper);
  font-weight:800;font-size:13px;letter-spacing:.1em;color:var(--mute);padding:6px 2px;border-bottom:1.5px solid var(--line)}
.dict-e{background:var(--card);border-radius:var(--r);padding:12px 14px;margin-top:9px;box-shadow:var(--shadow)}
.de-top{display:flex;align-items:center;gap:8px}
.de-top b{font-size:16px}
.de-k{font-style:normal;font-size:11px;font-weight:700;letter-spacing:.06em;text-transform:uppercase;
  color:var(--brown);background:var(--brown-t);padding:2px 7px;border-radius:99px}
.de-pr{color:var(--mute);font-size:12.5px;margin-top:1px}
.de-m{font-size:14px;margin-top:5px;line-height:1.45}
.de-tr{font-size:14px;margin-top:3px;color:var(--blue3);font-weight:600}
.de-ex{font-size:13.5px;margin-top:5px;color:var(--ink2);font-style:italic}
.de-at{display:flex;flex-wrap:wrap;gap:6px;margin-top:9px}
.de-at .chip{font-size:11.5px;padding:3px 9px;min-height:0;height:auto;line-height:1.5}

/* ───────────────────────── the notebook
   Pages on a shelf, each showing the drawing that is on it. */
.nb-new{margin-bottom:14px}
.nb-grid{display:grid;grid-template-columns:repeat(auto-fill,minmax(146px,1fr));gap:12px}
.nb-card{display:flex;flex-direction:column;align-items:stretch;gap:0;padding:0;overflow:hidden;
  background:var(--card);border-radius:var(--r);box-shadow:var(--shadow);text-align:left}
.nb-thumb{display:block;height:96px;background:var(--soft);border-bottom:1px solid var(--line);
  background-image:linear-gradient(var(--line) 1px,transparent 1px);background-size:100% 18px}
.nb-thumb svg{width:100%;height:100%;display:block}
.nb-t{padding:9px 11px 2px;font-weight:700;font-size:14px;line-height:1.35;
  display:-webkit-box;-webkit-line-clamp:2;-webkit-box-orient:vertical;overflow:hidden}
.nb-d{padding:0 11px 10px;color:var(--mute);font-size:12px}

.nb-edit{display:flex;flex-direction:column;gap:11px}
.nb-title{font-weight:700}
.nb-body{min-height:120px;line-height:1.5;resize:vertical;padding:12px}
.nb-tools{display:flex;align-items:center;gap:7px;flex-wrap:wrap;margin-bottom:8px}
.nb-ink{width:28px;height:28px;border-radius:50%;background:var(--c);flex:none;
  box-shadow:0 0 0 2px var(--card),0 0 0 3px transparent;transition:box-shadow .15s,transform .15s var(--spring)}
.nb-ink.on{box-shadow:0 0 0 2px var(--card),0 0 0 3.5px var(--ink);transform:scale(1.12)}
.nb-pad{position:relative;height:300px;border-radius:var(--r);background:var(--card);
  box-shadow:inset 0 0 0 1.5px var(--line2);overflow:hidden;touch-action:none;cursor:crosshair;
  background-image:linear-gradient(var(--line) 1px,transparent 1px);background-size:100% 25px}
.nb-pad svg{width:100%;height:100%;display:block}
.btn.tool-on{background:var(--ink);color:var(--paper);box-shadow:inset 0 0 0 2px var(--ink)}
.nb-ink{overflow:hidden}
/* the language names are always written in their own language, never translated */
.lang-seg button{font-size:14px}

/* ───────────────────────── seeing how the work was done
   A row per question: what was asked, what they put, and the right answer when
   those differ. Right and wrong are carried by a mark and a rule down the left,
   never by colour alone. */
.pt-row.open{cursor:pointer;user-select:none}
.pt-row.open>.ic{color:var(--mute);transition:transform .2s var(--ease);flex:none}
.pt-row.open.on>.ic{transform:rotate(180deg)}
@media (hover:hover){.pt-row.open:hover{background:var(--soft)}}
.mk{padding:2px 0 10px}
.mk-row{display:flex;align-items:flex-start;gap:9px;padding:7px 10px;border-radius:8px;
  border-left:3px solid var(--line2);background:var(--soft);margin-top:6px;font-size:13.5px;line-height:1.45}
.mk-row.ok{border-left-color:var(--green2)}
.mk-row.no{border-left-color:var(--red2)}
.mk-n{flex:none;color:var(--mute);font-size:12px;min-width:16px;padding-top:1px}
.mk-v{flex:none;display:grid;place-items:center;width:20px;height:20px;border-radius:50%}
.mk-v.ok{background:var(--green-t);color:var(--green3)}
.mk-v.no{background:var(--red-t);color:var(--red2)}
.mk-v .ic{width:13px;height:13px}
.mk-fix{display:flex;align-items:center;gap:4px;margin-top:3px;color:var(--green3);font-weight:600}
.mk-fix .ic{width:14px;height:14px;flex:none}
.mk-blank{color:var(--mute);font-style:italic}
.mk-tap{text-decoration-color:var(--red2);text-decoration-thickness:2px;text-underline-offset:3px}
.mk-all,.mk-none{color:var(--mute);font-size:13px;padding:8px 10px;margin:6px 0 0;
  background:var(--soft);border-radius:8px}
.mk-text{white-space:pre-wrap;background:var(--soft);border-radius:8px;padding:10px 12px;
  margin-top:6px;font-size:13.5px;line-height:1.5}

/* ───────────────────────── Review
   Native Elite Extra's review system, on this platform's work: a queue the
   teacher filters, then one piece of work on its own page with the exercise
   on the left and the box to write in on the right. */
.list-h{display:flex;justify-content:space-between;align-items:center;gap:10px;
  padding:10px 14px 8px;font-size:12.5px;color:var(--mute);font-weight:700;border-bottom:1px solid var(--line)}
.sub-row{display:flex;align-items:center;gap:12px;padding:11px 14px;border-bottom:1px solid var(--line);
  text-decoration:none;color:var(--ink);transition:background .2s}
.sub-row:last-child{border-bottom:0}
@media (hover:hover){.sub-row:hover{background:var(--soft)}}
.sr-i{width:36px;height:36px;border-radius:10px;display:grid;place-items:center;
  background:var(--blue-t);color:var(--blue3);flex:none}
.sr-i .ic{width:19px;height:19px}
.sr-i.p-speaking{background:var(--red-t);color:var(--red2)}
.sr-i.p-writing{background:var(--yellow-t);color:var(--yellow-ink)}
/* listening is neither red nor yellow nor the green of a good score, so the
   tile cannot be misread as the mark the app already gave it */
.sr-i.p-listening{background:var(--brown-t);color:var(--brown)}
/* a listening row carries two things: the app's score and whether a teacher
   has been. Stacked, they stay legible in the narrow end of a phone row. */
.sr-two{display:flex;flex-direction:row;align-items:center;gap:6px}
.sr-main{flex:1;min-width:0}
.sr-main b{display:block;font-weight:700}
.sr-main small{display:block;color:var(--mute);font-size:13px;white-space:nowrap;overflow:hidden;text-overflow:ellipsis}
.sr-end{display:flex;align-items:center;gap:8px;flex:none;flex-wrap:wrap;justify-content:flex-end}
.sr-end small{color:var(--mute);font-size:12.5px}
.rv-badge{display:inline-flex;align-items:baseline;gap:1px;padding:4px 9px;border-radius:99px;
  background:var(--soft2);color:var(--ink2);font-weight:800;font-size:13px;white-space:nowrap}
.rv-badge small{font-weight:700;opacity:.7}
.rv-badge.good{background:var(--green-t);color:var(--green3)}
.rv-badge.mid{background:var(--yellow-t);color:var(--yellow-ink)}
.rv-badge.low{background:var(--red-t);color:var(--red2)}
.rv-badge.lg{font-size:19px;padding:8px 14px}
/* The key's verdict with no figure on it: a round badge holding one icon,
   which is why it needs none of the pill's padding. It wore the global `dot`
   for this and inherited a notification bubble — position:absolute, 18px, a
   white ring — so it left the row and landed on the plate beside it. */
.rv-badge.rvb-dot{width:28px;height:28px;padding:0;border-radius:50%;
  align-items:center;justify-content:center;flex:none}
.rv-badge.rvb-dot .ic{width:17px;height:17px}
.rv-badge.lg.rvb-dot{width:38px;height:38px}
.rv-badge.lg.rvb-dot .ic{width:23px;height:23px}


.view-review .filters .nsel{max-width:260px}
.review-top{display:flex;justify-content:space-between;align-items:center;gap:10px;margin-bottom:14px}
.qnav{display:flex;gap:6px}
.rev-head{display:flex;justify-content:space-between;align-items:flex-start;gap:12px;flex-wrap:wrap;margin-bottom:16px}
.rev-head h2{font-size:clamp(20px,4.4vw,26px);margin:2px 0 8px}
.kicker{display:block;font-size:11px;font-weight:800;letter-spacing:.12em;color:var(--mute)}
.rev-who{display:flex;align-items:center;gap:8px;flex-wrap:wrap}
.rev-grid{display:grid;grid-template-columns:minmax(0,1fr) 350px;gap:16px;align-items:start}
.rv-side.sticky{position:sticky;top:calc(var(--top) + var(--sat) + 12px)}
.rv-side h3{margin:0 0 8px}
.rv-side .btn.wide{margin-top:8px}
.rv-quick{margin:10px 0}
.rv-quick .btn{font-size:12.5px;font-weight:600}
/* LABELS CARRY MORE WEIGHT NOW. Mr. Karim: take the important labels,
   give them a better highlight and make them bigger. These were 11.5px in
   the muted grey, which is the colour the app uses for things that do not
   matter — so every field label on every form read as an aside. They are
   the ink colour at 13px, with the letter-spacing eased off because wide
   tracking at a larger size reads as shouting rather than as a label. */
.lbl{font-size:13px;font-weight:800;letter-spacing:.055em;text-transform:uppercase;color:var(--ink);margin-top:4px}
.score-pick{display:flex;flex-wrap:wrap;gap:5px}
.sp{width:36px;height:36px;border-radius:9px;background:var(--card);box-shadow:inset 0 0 0 1.5px var(--line2);
  font-weight:800;font-size:14.5px;color:var(--ink2);transition:transform .15s,background .2s,color .2s,box-shadow .2s}
@media (hover:hover){.sp:hover{box-shadow:inset 0 0 0 1.5px var(--ink2)}}
.sp.on{background:var(--blue);box-shadow:none;color:#fff;transform:scale(1.07)}
.rv-check{display:flex;align-items:center;gap:9px;font-size:13.5px;color:var(--ink2);margin:4px 0 2px}
.rv-check input{width:18px;height:18px;flex:none;accent-color:var(--blue)}
.rv-body{min-height:130px;line-height:1.5;resize:vertical;padding:12px}
.rv-prev{background:var(--soft);border-radius:var(--r);padding:11px 13px;margin-bottom:10px}
.rv-prev b{margin-right:8px}
.rv-prev p{margin:6px 0 0;font-size:14px;line-height:1.5;white-space:pre-wrap}
@media (max-width:900px){
  .rev-grid{grid-template-columns:minmax(0,1fr)}
  .rv-side.sticky{position:static}
}

/* what the student sees, above the part it is about — Extra's feedback block */
.feedback{background:var(--blue-t);border-left:4px solid var(--blue);border-radius:var(--r);
  padding:13px 15px;margin-bottom:14px}
.fb-head{display:flex;align-items:center;gap:7px;flex-wrap:wrap;font-weight:800;font-size:14.5px}
.fb-head .ic{color:var(--blue3)}
.fb-by{margin-left:auto;font-weight:600}
.rv-got-body{margin:9px 0 0;font-size:14.5px;line-height:1.55;white-space:pre-wrap}
.rv-on::before{content:"\00b7";margin:0 6px;opacity:.6}
.rv-on{font-style:normal;font-weight:600;color:var(--mute)}

/* the student's work, shown as the exercise itself and not to be played with */
.mk-ro{margin-top:8px}
.mk-ro button,.mk-ro input,.mk-ro select,.mk-ro a{pointer-events:none}
/* A textarea holds the student's own writing, and it was in this list — which
   made a long answer unreadable past whatever fitted in the box: no wheel, no
   touch drag, no scrollbar. It is readonly in the markup, so taking the mouse
   away bought nothing and cost the teacher the rest of the essay. They can
   scroll it, and select from it to quote a line back. */
.mk-ro textarea{pointer-events:auto;overflow:auto;-webkit-overflow-scrolling:touch;
  resize:none;cursor:text}
.mk-ro .ex{box-shadow:none;border:1px solid var(--line);margin-bottom:10px}
.mk-ro .practice,.mk-ro .writing{display:flex;flex-direction:column;gap:10px}
.quizwrap-all{display:flex;flex-direction:column;gap:12px}
.quizwrap-all .q-prog{display:none}
.quizwrap-all .q-card{animation:none}
.mk-ro .rise{animation:none}
/* nothing in here can be acted on, so the buttons that invite action go */
.mk-ro [data-a$="-again"],.mk-ro [data-a="story-back"],.mk-ro [data-a="rv-again"],
.mk-ro [data-a="tb-save"],.mk-ro [data-a="e-save"],.mk-ro [data-a="e-model"],
.mk-ro [data-a$="-check"],.mk-ro .rec,.mk-ro .vq-gate{display:none}
/* why a button is not available yet — a disabled control with no reason is the
   same as a broken one to the person pressing it */
.why{margin:7px 0 0}


/* ───────────────────────── Open hours
   A teacher's timetable and the windows a student can take. Rows are the same
   shape on both sides, so a teacher recognises what their students are seeing. */
.hr-who{display:flex;align-items:center;gap:12px}
.hr-switch,.hr-head{display:flex;align-items:center;gap:12px;margin-bottom:10px}
.hr-list{display:flex;flex-direction:column;gap:8px}
.hr-slot{display:flex;align-items:center;gap:12px}
.hr-time{flex:none;width:76px;display:flex;flex-direction:column;line-height:1.2}
.hr-time b{font-size:13px;font-weight:800}
.hr-time span{font-size:19px;font-weight:800;font-variant-numeric:tabular-nums}
.hr-slot .b{font-weight:700}
.hr-slot.mine{box-shadow:inset 0 0 0 2px var(--green);background:var(--green-t)}
.hr-slot.mine .hr-time span{color:var(--green3)}
.hr-slot.taken{background:var(--soft)}
.hr-week{display:flex;flex-direction:column;gap:2px}
.hr-row{display:flex;flex-direction:column;gap:1px;padding:9px 0;border-bottom:1px solid var(--line)}
.hr-row:last-child{border-bottom:0}
.hr-row.on{padding-left:10px;border-left:3px solid var(--blue);margin-left:-13px}
.hr-g{display:flex;align-items:center;gap:8px}
.hr-g em{font-style:normal;font-size:11.5px;font-weight:800;letter-spacing:.06em;text-transform:uppercase;
  color:var(--blue3);background:var(--blue-t);padding:2px 7px;border-radius:99px}
/* the preview of the students' own screen: their layout, nothing pressable */
.hr-prev{padding-bottom:6px}
.hr-prev-h{width:100%;text-align:left;gap:10px;align-items:center;background:none;padding:0}
.hr-prev-h .b{display:block;font-weight:700}
.hr-prev-h .ic{color:var(--mute);flex:none}
.hr-prev-none{margin:10px 0 6px}
.hr-prev-in{margin-top:12px;padding:12px;border-radius:var(--r);background:var(--soft);
  border:1px dashed var(--line2)}
.hr-prev-in>*:first-child{margin-top:0}
.hr-prev-in button,.hr-prev-in a{pointer-events:none}
.hr-prev-in .sec-head h2{font-size:15px}
.hr-prev-in .card{box-shadow:none;border:1px solid var(--line)}

@media (max-width:520px){
  .hr-time{width:66px}
  .hr-time span{font-size:17px}
  .hr-switch,.hr-head,.hr-slot{flex-wrap:wrap}
}


/* ───────────────────────── pointer and selection
   The interface is not a document. Dragging across a card, a tab or a heading
   used to start a text selection and leave the pointer as an I-beam, which
   reads as if the app is a page that half-loaded. Text a person might actually
   want to copy — what they wrote, what their teacher wrote, a word and its
   meaning, a message — keeps selection on. */
.topbar,.tabbar,.nav,.sec-head,.ptabs,.seg,.filters,.board,.board-wrap,.hello,
.l-head,.stats,.lane,.road,.exit,.plate,.kpi,.shield,.hr-time,.rv-badge,.sr-end,
.li,.trow,.class,.stage-card,.sign,.rstop,.ex .eh,.q-prog,.result,.hr-prev-h{
  -webkit-user-select:none;user-select:none}
input,textarea,[contenteditable],
.wtile,.bubble,.w-mean,.w-ex,.de-m,.de-ex,.de-tr,.rv-got-body,.rv-prev p,.mk-text,.fb-b,
.model,.essay-read,.rs,.story-cap,.dq,.cue-card,.nb-body,.tg-msgs{
  -webkit-user-select:text;user-select:text}


/* ───────────────────────── Speaking: kick-off, the big speech, class games */
.warm-q{margin:0;padding-left:20px;display:flex;flex-direction:column;gap:8px;font-size:15.5px;line-height:1.45}
.idea-cards{display:flex;flex-direction:column;gap:8px;margin-top:10px}
.idea summary{display:flex;align-items:baseline;gap:9px;cursor:pointer;list-style:none;font-size:15px}
.idea summary::-webkit-details-marker{display:none}
.idea summary::after{content:"";margin-left:auto;width:8px;height:8px;border-right:2px solid var(--mute);
  border-bottom:2px solid var(--mute);transform:rotate(45deg);transition:transform .2s}
.idea[open] summary::after{transform:rotate(-135deg)}
.idea-q{margin:10px 0 8px;font-size:15.5px;line-height:1.45}
.idea-w{display:flex;flex-wrap:wrap;gap:6px;margin-bottom:9px}
.idea-p{margin:0;padding-left:18px;font-size:14.5px;line-height:1.6;color:var(--ink2)}
.idea-p li{font-style:italic}

.speech .task{margin-bottom:8px}
.sp-clock{margin:14px 0;padding:14px;border-radius:var(--r);background:var(--soft);
  border:1.5px solid var(--line);transition:border-color .25s,background .25s}
.sp-clock.band{background:var(--green-t);border-color:var(--green)}
.sp-time{font-size:34px;font-weight:800;line-height:1;font-variant-numeric:tabular-nums;text-align:center}
.sp-clock.band .sp-time{color:var(--green3)}
.sp-bar{position:relative;height:8px;border-radius:99px;background:var(--line2);margin:12px 0 10px;overflow:hidden}
.sp-bar i{display:block;height:100%;border-radius:99px;background:var(--blue);transition:width .9s linear}
.sp-clock.band .sp-bar i{background:var(--green)}
.sp-mark{position:absolute;top:-3px;width:2px;height:14px;background:var(--ink2);opacity:.55}
.sp-ctl{align-items:center;gap:12px}
.sp-words{margin-top:4px}
.sp-n{font-size:16px;font-weight:800;color:var(--mute)}
.sp-n.on{color:var(--green3)}
.sp-words .wchip{cursor:pointer;transition:background .18s,color .18s,transform .12s}
.sp-words .wchip:active{transform:scale(.95)}
.wchip.pop{animation:wpop .42s var(--ease)}
@keyframes wpop{0%{transform:scale(1)}36%{transform:scale(1.16)}100%{transform:scale(1)}}
@media (prefers-reduced-motion:reduce){.wchip.pop{animation:none}}

.games .game{align-items:flex-start;gap:12px}
.games .gi{width:34px;height:34px;border-radius:9px;display:grid;place-items:center;flex:none;
  background:var(--yellow-t);color:var(--yellow-ink)}
.games .s{line-height:1.5;white-space:normal}
@media (max-width:520px){.sp-time{font-size:28px}}

/* ───────── progress: the student's own numbers, and the review section */
/* Three across suits the six-tile boards; a four-tile row says so and gets
   four, so neither is ever left with one tile stranded on a line of its own.
   Two across on a phone for both. */
.kpis{display:grid;grid-template-columns:repeat(3,1fr);gap:10px;margin:14px 0 4px}
.kpis.four,.ht-kpis{grid-template-columns:repeat(4,1fr)}
@media (max-width:860px){.kpis.four,.ht-kpis{grid-template-columns:repeat(2,1fr)}}
@media (max-width:560px){.kpis{grid-template-columns:repeat(2,1fr)}}
.kpi{background:var(--card);border:1px solid var(--line);border-radius:var(--r);padding:12px 11px 11px;
  box-shadow:var(--shadow);position:relative;overflow:hidden}
.kpi-i{width:28px;height:28px;border-radius:8px;display:grid;place-items:center;background:var(--soft2);color:var(--ink2);margin-bottom:8px}
.kpi-i .ic{width:17px;height:17px}
.kpi b{display:block;font-size:clamp(21px,5.4vw,28px);font-weight:800;line-height:1.05;letter-spacing:-.015em}
.kpi-l{display:block;font-size:12px;font-weight:700;color:var(--ink2);line-height:1.2;margin-top:2px}
.kpi-s{display:block;font-size:11px;font-weight:600;color:var(--mute);line-height:1.25;margin-top:3px}
.kpi.hot .kpi-i{background:var(--orange-t);color:var(--orange)}
.kpi.good .kpi-i{background:var(--green-t);color:var(--green3)}
.kpi.mid .kpi-i{background:var(--yellow-t);color:var(--yellow-ink)}
.kpi.low .kpi-i{background:var(--red-t);color:var(--red2)}
@media (max-width:420px){.kpis{grid-template-columns:repeat(2,1fr)}}

.act{position:relative}
.act-top{display:block;font-size:11px;font-weight:700;color:var(--mute);margin-bottom:4px}
.act-svg{display:block;width:100%;height:128px}
.ac-base{stroke:var(--line2);stroke-width:1}
.ac-bar{fill:var(--green2)}
.ac-bar.today{fill:var(--red)}
.ac-zero{fill:var(--line2)}
.act-x{display:flex;margin-top:6px}
.act-x span{flex:1;text-align:center;font-size:10.5px;font-weight:700;color:var(--mute);white-space:nowrap}
.act-x span.now{color:var(--red2)}

.skills{padding:4px 0}
.skill{display:flex;align-items:center;gap:12px;padding:11px 14px;border-bottom:1px solid var(--line)}
.skill:last-child{border-bottom:0}
.sk-i{width:34px;height:34px;flex:none;border-radius:9px;display:grid;place-items:center;background:var(--blue-t);color:var(--blue3)}
.sk-i .ic{width:19px;height:19px}
.sk-m{flex:1;min-width:0}
.sk-t{display:flex;justify-content:space-between;gap:10px;align-items:baseline;margin-bottom:6px}
.sk-t b{font-weight:700;font-size:14.5px}

.sbars{padding:4px 0}
.sbar{display:flex;align-items:center;gap:12px;padding:9px 14px;border-bottom:1px solid var(--line);
  text-decoration:none;color:var(--ink)}
.sbar:last-child{border-bottom:0}
.sbar .sb-m{flex:1;min-width:0}
.sbar.zero .meter>i{background:var(--line2)}
@media (hover:hover){.sbar:hover{background:var(--soft)}}

.fblist{display:flex;flex-direction:column;gap:10px}
.fbcard{background:var(--card);border:1px solid var(--line);border-left:4px solid var(--line2);
  border-radius:var(--r);padding:12px 14px;box-shadow:var(--shadow)}
.fbcard.new{border-left-color:var(--blue)}
.fb-h{display:flex;align-items:flex-start;gap:10px}
.fb-h b{display:block;font-weight:800;font-size:14.5px}
.fb-h small{display:block;font-size:12.5px;margin-top:1px}
/* .heat is an inline grid, so a score and its "/10" become two rows unless the
   flow is told to run across */
.fb-h .heat{grid-auto-flow:column;gap:1px;align-items:baseline}
.fb-b{margin:9px 0 0;font-size:14.5px;line-height:1.55;white-space:pre-wrap}
.fb-f{display:flex;align-items:center;gap:10px;flex-wrap:wrap;margin-top:10px}
/* the byline moves to a line of its own rather than breaking across two */
.fb-f .mute{flex:1 1 150px;white-space:nowrap}

/* the lesson's own progress, on the lesson in the list */
.rm-bar{display:block;margin-top:8px}
.rm-bar .meter{height:5px}
.rm-fb{display:inline-flex;align-items:center;gap:3px;font-style:normal;color:var(--blue2)}
.rm-fb::before{content:"\00b7";margin:0 5px;color:var(--mute)}
.rm-fb .ic{width:12px;height:12px}

/* ───────── the word quiz: stopping, and what was missed */
.qz-back{text-align:center}
.qz-back .art{max-width:160px;margin:0 auto 10px}
.qz-back h2{margin:0 0 4px}
.qz-back .row{justify-content:center;margin-top:14px}
.qz-leave{margin-top:12px}
.qz-clean{display:flex;align-items:center;gap:14px;margin-top:14px}
.qz-clean .ic{color:var(--green2);flex:none}
.qz-clean b{font-size:15.5px}
.qz-clean p{margin:2px 0 0}
.qz-miss .li .s b{color:var(--green3)}
.qz-said{display:block;font-style:normal;margin-top:1px;color:var(--mute)}
.qz-miss-act{margin-top:12px}

/* ───────── voice messages */
.tg-rec{display:flex;align-items:center;gap:10px;padding:10px 12px calc(10px + var(--sab));
  background:var(--card);border-top:1px solid var(--line)}
body[data-tab="chat"] .tg.has-conv .tg-rec{padding-bottom:calc(10px + var(--sab))}
.kb-up body[data-tab="chat"] .tg.has-conv .tg-rec{padding-bottom:10px}
.tg-rec .rec-meter{min-width:50px}
.tg-mic{background:var(--soft);color:var(--ink2)}
@media (hover:hover){.tg-mic:hover{background:var(--soft2)}}

/* ───────── a voice message you can move about inside
   The bars are drawn twice: once in the quiet colour for the whole message,
   and once in the loud one clipped to how far you have listened. That is what
   fills in behind the sound rather than drawing a line across it. */
.vmsg{display:flex;align-items:center;gap:10px;min-width:210px;max-width:min(300px,62vw);padding:2px 0 1px}
.vm-play{flex:none;background:var(--green2);color:#fff;border:0}
.vm-play.on,.vm-play:disabled{opacity:1}
@media (hover:hover){.vm-play:hover{background:var(--green)}}
.vmsg.loading .vm-play{opacity:.6}
.vm-mid{flex:1;min-width:0;display:flex;flex-direction:column;gap:1px}
.vm-wave{position:relative;display:block;height:26px;min-width:60px;
  cursor:pointer;touch-action:none;-webkit-user-select:none;user-select:none}
.vm-wave:focus-visible{outline:2px solid var(--blue2);outline-offset:3px;border-radius:4px}
.vm-bars{position:absolute;inset:0;display:flex;align-items:center;gap:2px}
.vm-bars>i{flex:1;min-width:2px;border-radius:99px;background:var(--line2);transition:height .12s linear}
/* Clipped rather than narrowed: a copy made narrow would squeeze its own bars
   into the played portion instead of revealing them, so the waveform appeared
   to compress as it played. The copy is full width and simply masked. */
.vm-done{position:absolute;inset:0;pointer-events:none;
  -webkit-clip-path:inset(0 100% 0 0);clip-path:inset(0 100% 0 0)}
.vm-done>.vm-bars>i{background:var(--green2);transition:none}
.bubble.mine .vm-bars>i{background:rgba(10,107,75,.34)}
.bubble.mine .vm-done>.vm-bars>i{background:#0A6B4B}
:root[data-theme="dark"] .vm-bars>i{background:#49555B}
:root[data-theme="dark"] .bubble.mine .vm-bars>i{background:rgba(255,255,255,.28)}
:root[data-theme="dark"] .vm-done>.vm-bars>i,
:root[data-theme="dark"] .bubble.mine .vm-done>.vm-bars>i{background:#fff}
.vm-foot{display:flex;align-items:center;gap:8px}
.vm-t{flex:none;font-size:12.5px;font-weight:700;color:var(--mute);font-variant-numeric:tabular-nums}
.vm-rate{flex:none;margin-left:auto;padding:1px 7px;min-height:0;height:19px;
  font-size:11px;font-weight:800;line-height:1;border-radius:99px;
  border:1px solid var(--line);background:transparent;color:var(--mute);
  font-variant-numeric:tabular-nums;cursor:pointer}
@media (hover:hover){.vm-rate:hover{color:var(--fg);border-color:var(--line2)}}
.vmsg.playing .vm-rate{color:var(--fg);border-color:var(--line2)}
.vmsg.sending{color:var(--mute);gap:6px}
.vmsg.sending .ic{color:var(--mute)}

/* ───────── the notification sheet, split into new and read */
.nf-h{display:flex;align-items:center;justify-content:space-between;gap:10px;
  margin:14px 2px 7px;font-size:12px;font-weight:800;letter-spacing:.07em;text-transform:uppercase;color:var(--mute)}
.nf-h:first-child{margin-top:2px}
.nf-h .btn{letter-spacing:0;text-transform:none}

/* ───────── work a teacher has set */
.asg{margin-top:10px;padding-top:10px;border-top:1px solid var(--line)}
.asg-h{display:flex;align-items:baseline;justify-content:space-between;gap:10px;margin-bottom:8px}
.asg-h b{font-size:13.5px}
.asg-chips{gap:6px}
.asg-c{display:inline-flex;align-items:center;gap:6px;border:1.5px solid var(--line2);background:transparent;color:var(--ink2)}
.asg-c.set{background:var(--green-t);border-color:var(--green2);color:var(--green3)}
.asg-c.must{background:var(--red-t);border-color:var(--red2);color:var(--red2);font-weight:800}
.asg-key{margin:8px 0 10px}
.asg-shut{display:flex;align-items:center;gap:6px;margin:10px 0 0;padding-top:10px;border-top:1px solid var(--line)}
.asg-list .li.col{display:block}
.asg-list .li.col .row{display:flex;align-items:center;gap:12px}

/* the tab of a part that has been set */
.ptabs a .tab-asg{position:absolute;top:5px;right:7px;width:7px;height:7px;border-radius:50%;background:var(--green2)}
.ptabs a.must .tab-asg{background:var(--red)}
.ptabs a{position:relative}

.hw .li{align-items:center}
.hw-i{width:30px;height:30px;flex:none;border-radius:9px;display:grid;place-items:center;background:var(--green-t);color:var(--green3)}
.hw-i.must{background:var(--red-t);color:var(--red2)}
.hw-i .ic{width:17px;height:17px}
.hw-must{font-style:normal;font-size:11px;font-weight:800;letter-spacing:.04em;text-transform:uppercase;
  color:var(--red2);background:var(--red-t);border-radius:5px;padding:1px 5px;margin-left:6px}

/* ───────── THE HOMEWORK ITSELF (student.js)
   Its own thing on the home page rather than a list of links: everything their
   teacher has set, in the order to do it, with what must be done marked as
   such and what is finished ticked off. Then the bar that stays with them
   through the lesson, and the sheet between one piece and the next. */
.hw-panel{background:var(--card);border:1px solid var(--line);border-radius:var(--r-sign);
  box-shadow:var(--shadow);padding:15px 16px 16px;margin-bottom:16px}
.hw-panel.has-must{border-color:var(--line2)}
.hwp-head{display:flex;align-items:center;gap:12px}
.hwp-head h2{font-size:17.5px;font-weight:900;letter-spacing:-.01em;margin:0}
.hwp-mark{flex:none;width:38px;height:38px;border-radius:11px;display:grid;place-items:center;
  background:var(--green-t);color:var(--green3)}
.hw-panel.has-must .hwp-mark,.hws-next.must .hwp-mark{background:var(--red-t);color:var(--red2)}
.hwp-mark .ic{width:21px;height:21px}
.hwp-sum{margin:3px 0 0;font-size:13px;line-height:1.35;display:flex;align-items:baseline;flex-wrap:wrap;gap:0 6px}
.hwp-must-n{color:var(--red2);font-weight:800}
.hwp-set-n{font-weight:700;color:var(--ink2)}
.hwp-dot{color:var(--line2)}
.hwp-count{flex:none;text-align:right;line-height:1.1}
.hwp-count b{display:block;font-size:19px;font-weight:900;font-variant-numeric:tabular-nums;letter-spacing:-.02em}
.hwp-count b span{font-size:13px;font-weight:700;color:var(--mute)}
.hwp-count>span{font-size:10.5px;font-weight:700;letter-spacing:.06em;text-transform:uppercase;color:var(--mute)}
.hwp-meter{height:5px;border-radius:99px;background:var(--soft2);overflow:hidden;margin:13px 0 2px}
.hwp-meter>i{display:block;height:100%;border-radius:99px;background:var(--green2);
  transition:width .5s var(--ease)}
.hwp-meter.big{height:7px;margin:0 0 12px}
.hwp-list{display:flex;flex-direction:column}
.hwp-row{display:flex;align-items:center;gap:11px;min-height:56px;padding:9px 0;
  border-bottom:1px solid var(--line);text-decoration:none;color:inherit}
.hwp-row:first-child{border-top:1px solid var(--line)}
.hwp-row:last-child{border-bottom:0}
@media (hover:hover){.hwp-row:hover .hwp-go{color:var(--ink)}.hwp-row:hover .hwp-t b{text-decoration:underline}}
.hwp-n{flex:none;width:28px;height:28px;border-radius:50%;display:grid;place-items:center;
  background:var(--soft2);color:var(--ink2);font-size:13px;font-weight:800;font-variant-numeric:tabular-nums}
.hwp-n .ic{width:19px;height:19px}
.hwp-row.must .hwp-n{background:var(--red-t);color:var(--red2)}
.hwp-row.done .hwp-n{background:var(--green-t);color:var(--green3)}
.hwp-t{display:flex;align-items:center;gap:6px;flex-wrap:wrap}
.hwp-t b{font-size:15px;font-weight:800}
.hwp-t>.ic{color:var(--mute);flex:none}
/* one line, so a long lesson title does not make one row twice the height of
   the one above it */
.hwp-s{display:block;margin-top:1px;font-size:12.5px;color:var(--mute);line-height:1.35;
  white-space:nowrap;overflow:hidden;text-overflow:ellipsis}
.hwp-must{font-style:normal;font-size:10px;font-weight:800;letter-spacing:.07em;text-transform:uppercase;
  color:var(--red2);background:var(--red-t);border-radius:5px;padding:2px 6px}
.hwp-row.done .hwp-t b{color:var(--mute);font-weight:700}
.hwp-ok{flex:none;font-size:11px;font-weight:800;letter-spacing:.06em;text-transform:uppercase;color:var(--green3)}
/* the speaking tasks the teacher set: prepared, not handed in, so listed
   under their own heading and never counted */
.hwp-prep{margin-top:10px;padding-top:10px;border-top:1px dashed var(--line)}
.hwp-prep-h{display:flex;align-items:baseline;gap:8px;margin:0 0 6px 2px;font-size:14px}
.hwp-prep-h b{font-weight:800}
.hwp-row.prep .hwp-n{background:var(--card);box-shadow:inset 0 0 0 1px var(--line);color:var(--ink2)}
.hwp-row.prep.must .hwp-n{background:var(--red-t);color:var(--red2);box-shadow:none}
/* the mark on the speaking section itself */
.hw-set-mark{display:inline-flex;align-items:center;gap:4px;margin-left:8px;font-style:normal;font-size:11px;font-weight:800;letter-spacing:.05em;text-transform:uppercase;color:var(--green3);background:color-mix(in srgb,var(--green3) 14%,transparent);border-radius:6px;padding:3px 8px;vertical-align:middle}
.hw-set-mark.must{color:var(--red2);background:var(--red-t)}
/* the four speaking tasks under one heading on the teacher's chips */
.asg-speak{margin-top:8px;padding:8px 10px 10px;border-radius:12px;background:color-mix(in srgb,var(--line) 35%,transparent)}
.asg-speak-h{display:flex;align-items:baseline;gap:6px;margin-bottom:6px;font-size:13px;font-weight:800}
.asg-speak-h small{font-weight:600;color:var(--mute);font-size:12px}
.hwp-go{flex:none;display:inline-flex;align-items:center;gap:2px;font-size:13px;font-weight:800;color:var(--mute)}
.hwp-foot{display:flex;align-items:center;gap:12px;flex-wrap:wrap;margin-top:14px}
.hwp-btn{flex:none}
.hwp-foot .small{flex:1;min-width:150px;line-height:1.35}
/* homework with nothing left in it: one line, not a panel */
.hw-clear{display:flex;align-items:center;gap:10px;padding:12px 14px;margin-bottom:16px;
  background:var(--green-t);border-radius:12px;color:var(--green3)}
.hw-clear>.ic{flex:none}
.hw-clear b{font-weight:800}
.hw-clear .mute{color:var(--green3)}

/* the bar inside the lesson, while the homework is being worked through */
.hwrun{display:flex;align-items:center;gap:10px;flex-wrap:wrap;margin:0 0 10px;padding:0 8px 0 12px;
  min-height:46px;background:var(--soft);border:1px solid var(--line);border-radius:12px}
.hwb-tag{display:inline-flex;align-items:center;gap:5px;font-size:10.5px;font-weight:900;
  letter-spacing:.08em;text-transform:uppercase;color:var(--mute)}
.hwb-tag .ic{width:15px;height:15px}
.hwb-of{font-size:12.5px;font-weight:700;color:var(--ink2)}
.hwb-of b{font-weight:900;color:var(--ink)}
.hwb-of em{font-style:normal;font-weight:800;color:var(--red2)}
.hwb-dots{display:inline-flex;align-items:center;gap:4px}
.hwb-dots i{width:7px;height:7px;border-radius:50%;background:var(--line2)}
.hwb-dots i.on{background:var(--green2)}
.hwb-dots i.cur{background:var(--ink);transform:scale(1.3)}
/* 44 wide as well as 44 tall: "Leave" is a short word and was a 39px target */
.hwb-skip,.hwb-quit{display:inline-flex;align-items:center;justify-content:center;align-self:stretch;
  min-height:44px;min-width:44px;padding:0 6px;border:0;background:none;font-size:12.5px;font-weight:800;cursor:pointer}
/* the two of them sit together at the far end, whatever is to their left */
.hwb-skip{color:var(--blue2);text-decoration:none;margin-left:auto}
.hwb-quit{color:var(--mute)}
@media (hover:hover){.hwb-skip:hover,.hwb-quit:hover{text-decoration:underline}}
/* On a phone the bar has to stay one line, so the dots and the name of the
   piece being skipped to go; what is left still says where they are, offers
   the way on, and the way out. */
@media (max-width:520px){.hwrun{gap:8px;padding:0 10px}.hwrun .hwb-dots,.hwb-to{display:none}}
@media (max-width:370px){.hwb-tag span{display:none}}

/* between one piece and the next */
.hw-sheet .hws-count{margin:0 0 12px;font-size:14px;color:var(--mute)}
.hw-sheet .hws-count b{color:var(--ink);font-weight:800}
.hws-next{display:flex;align-items:center;gap:11px;margin-top:12px;padding:12px 13px;
  background:var(--soft);border:1px solid var(--line);border-radius:12px}
.hws-next b{display:block;font-size:15px;font-weight:800}
.hws-next .hwp-must{display:inline-block;margin-top:3px}

/* ───────── looking a word up outside the course */
.dol-ask,.dol-out{margin-top:14px}
.dol-h{display:flex;align-items:flex-start;gap:11px}
.dol-h>.ic{flex:none;color:var(--blue2);width:24px;height:24px;margin-top:1px}
.dol-h b{display:block;font-size:15.5px;font-weight:800}
.dol-h .grow>span{display:block;margin-top:2px}
.dol-h .de-pr{margin-top:2px}
.dol-note{margin:10px 0 12px;line-height:1.45}
.dol-tr{display:flex;align-items:baseline;gap:9px;margin:12px 0 4px;padding:9px 12px;
  background:var(--green-t);border-radius:var(--r);flex-wrap:wrap}
.dol-tr b{font-size:16px;color:var(--green3)}
.dol-lbl{font-size:10.5px;font-weight:800;letter-spacing:.08em;text-transform:uppercase;color:var(--green3);opacity:.8}
.dol-p{margin-top:12px}
.dol-p ol{margin:6px 0 0;padding-left:20px}
.dol-p li{margin-bottom:6px;line-height:1.5}
.dol-ex{display:block;font-style:italic;color:var(--mute);margin-top:2px}
.dol-out .btn.ghost{margin-top:2px}

/* ───────── a word from the stage ahead */

/* ───────── thumbs
   A few controls are smaller than a fingertip: a text link in a section
   heading, the lesson chips under a dictionary entry, a selection box in a
   list. Making them visually bigger would be wrong — a link that looks like a
   button is a button — so each keeps its size and grows an invisible area
   around it instead. Nothing here moves anything on the page.

   The words in "spot the mistake" are deliberately left alone: they sit in a
   paragraph two lines apart, and an area tall enough to help would reach into
   the line above and take taps meant for the word there. A short word being a
   short word is how reading works. */
   Measured again on launch day, every page as every role at 320 / 390 / 768
   and 1280 — 132 page views. The list below is what that found, and the
   heights are 44px rather than the 34 this section started with, because 34
   is still short of a thumb. Every link got this, not only the ones beside a
   heading: "Ask for help" under a group card was 20px tall. */
.sec-head .link,.link,.de-at .chip.sm,.check{position:relative}
.sec-head .link::after,.link::after,.de-at .chip.sm::after,.check::after{
  content:"";position:absolute;left:0;right:0;top:50%;height:44px;transform:translateY(-50%)}
/* only the selection box is narrow as well as short */
.check::after{left:-11px;right:-11px}
/* The day switch and the task tick are the same case: small on purpose, but a
   thumb is not. ::after is already the switch's knob, so this one takes
   ::before. */
.switch{position:relative}
.switch::before{content:"";position:absolute;left:-6px;right:-6px;top:50%;height:44px;transform:translateY(-50%)}
.task-tick{position:relative}
.task-tick::after{content:"";position:absolute;left:-7px;right:-7px;top:50%;height:44px;transform:translateY(-50%)}

/* The rest of what the launch-day measurement turned up. Same rule as above:
   each keeps the size it is drawn at and grows an invisible 44x44 around it,
   so nothing on any page moves. ::after is free on all of these — the only
   one where it is taken is the switch, which is handled above with ::before,
   and a busy button, whose spinner is ::after and which cannot be tapped
   anyway. Left out on purpose: the top-bar tabs and the schedule grid, whose
   cells sit edge to edge — a target wider than the cell would start taking
   taps meant for the cell beside it. */
/* Narrow as well as short — an icon, a tick, a round avatar. These need the
   area in both directions, and they all sit with space around them. */
.btn.icon.sm,.me-btn,.w-say,.rv-tick,.pf-char{position:relative}
.btn.icon.sm:not(.busy)::after,.me-btn::after,.w-say::after,.rv-tick::after,.pf-char::after{
  content:"";position:absolute;left:50%;top:50%;transform:translate(-50%,-50%);
  width:100%;height:100%;min-width:44px;min-height:44px}

/* Wide enough already, just short. These grow upward and downward only: they
   sit in rows touching their neighbours, and a wider target would reach into
   the control beside them and take the tap meant for it. */
.btn.sm,.reveal,.chip,.rname,.gcard-wait,.nsel.slim,.pf-initials,
.seg button,.brand,.tmain,.ptabs a{position:relative}
.btn.sm:not(.busy)::after,.reveal::after,.chip::after,.rname::after,.gcard-wait::after,
.nsel.slim::after,.pf-initials::after,.seg button::after,.brand::after,.tmain::after{
  content:"";position:absolute;left:0;right:0;top:50%;transform:translateY(-50%);
  height:100%;min-height:44px}

/* The part tabs inside a lesson were 42px — two short of a thumb, and the
   most-tapped thing in the app. */
.ptabs a{height:46px}
/* The search bar is 42px tall; the field inside it was 26px, so a third of the
   bar did nothing when tapped. */
.srch input{align-self:stretch}

/* ───────── reviews gathered by lesson */
.fbl{background:var(--card);border:1px solid var(--line);border-radius:var(--r);box-shadow:var(--shadow);overflow:hidden}
.fbl.new{border-left:4px solid var(--blue)}
.fbl>summary{display:flex;align-items:center;gap:12px;padding:11px 13px;cursor:pointer;list-style:none}
.fbl>summary::-webkit-details-marker{display:none}
.fbl>summary b{display:block;font-weight:800;font-size:14.5px}
.fbl>summary small{display:block;font-size:12.5px;margin-top:1px}
.fbl>summary .ic{flex:none;color:var(--mute);transition:transform .2s var(--ease)}
.fbl[open]>summary .ic{transform:rotate(180deg)}
.fbl[open]>summary{border-bottom:1px solid var(--line)}
@media (hover:hover){.fbl>summary:hover{background:var(--soft)}}
.fbl-body{padding:12px 13px;display:flex;flex-direction:column;gap:10px;background:var(--soft)}
.fbl-body .fbcard{box-shadow:none}
/* a score and its "/10" are one thing: .heat is an inline grid, so without
   this they stack into two rows */
.fbl>summary .heat{grid-auto-flow:column;gap:1px;align-items:baseline;flex:none}
/* the switch sits beside the heading on a wide screen and under it on a
   narrow one, rather than squeezing the words into two lines */
.page .sec-head{flex-wrap:wrap}
.page .sec-head .seg{flex:none}
@media (max-width:460px){.page .sec-head .seg{flex:1 1 100%;margin-top:6px}}

/* a mark kept from before answers were stored */
.ex-old{display:flex;align-items:flex-start;gap:7px;margin:0 0 12px;padding:9px 11px;
  background:var(--yellow-t);border-radius:var(--r-s);color:var(--yellow-ink);
  font-size:13px;line-height:1.45}
.ex-old .ic{flex:none;margin-top:1px}
/* the home banner is a thing you tap, so it should not select like text */
.notice{-webkit-user-select:none;user-select:none}

/* ───────── listening */
.ls-top h3{margin:0 0 2px;font-size:17px}
.ls-how{margin:12px 0;font-size:14px;line-height:1.5;color:var(--ink2)}
.ls-player{margin:4px 0 12px}

/* ── THE APP'S OWN AUDIO PLAYER ──
   The real <audio> is in the page doing the decoding; nothing of the device's
   own control strip is ever drawn. Same reasoning as the dropdown and the
   speed slider: one app, the same on every phone. */
.au{display:flex;align-items:center;gap:13px;padding:12px 14px;border-radius:var(--r-s);
  background:var(--soft);box-shadow:inset 0 0 0 1.5px var(--line)}
.au-el{display:none}
.au-play{flex:none;width:50px;height:50px;border:0;border-radius:50%;cursor:pointer;
  display:grid;place-items:center;background:var(--red);color:#fff;box-shadow:var(--shadow);
  transition:transform .16s var(--spring),filter .16s var(--ease)}
.au-play .ic{width:25px;height:25px;margin-left:2px}      /* the triangle sits right of centre */
.au.on .au-play .ic{margin-left:0}
@media (hover:hover){.au-play:hover{filter:brightness(1.08)}}
.au-play:active{transform:scale(.93)}
.au-mid{flex:1;min-width:0;display:flex;flex-direction:column;gap:3px}

/* the bar, wearing the same dress as the speed slider */
.au-seek{-webkit-appearance:none;appearance:none;width:100%;height:20px;background:none;cursor:pointer;display:block}
.au-seek::-webkit-slider-runnable-track{height:6px;border-radius:99px;
  background:linear-gradient(to right,var(--red) var(--p,0%),var(--soft2) var(--p,0%))}
.au-seek::-moz-range-track{height:6px;border-radius:99px;background:var(--soft2)}
.au-seek::-moz-range-progress{height:6px;border-radius:99px;background:var(--red)}
.au-seek::-webkit-slider-thumb{-webkit-appearance:none;appearance:none;width:16px;height:16px;margin-top:-5px;
  border-radius:50%;background:var(--red);box-shadow:inset 0 0 0 3px rgba(255,255,255,.92),var(--shadow);
  transition:transform .14s var(--spring)}
.au-seek::-moz-range-thumb{width:16px;height:16px;border:0;border-radius:50%;background:var(--red);
  box-shadow:inset 0 0 0 3px rgba(255,255,255,.92),var(--shadow)}
.au-seek:active::-webkit-slider-thumb{transform:scale(1.2)}
.au-seek:focus-visible{outline:2px solid var(--red);outline-offset:3px;border-radius:99px}

.au-row{display:flex;align-items:center;gap:3px}
.au-t{font-size:13px;color:var(--mute);font-variant-numeric:tabular-nums;white-space:nowrap}
.au-t b{color:var(--ink);font-weight:800}
.au-b{flex:none;min-width:32px;height:32px;padding:0 7px;border:0;border-radius:9px;cursor:pointer;
  display:grid;place-items:center;background:none;color:var(--mute);
  font:inherit;font-size:12.5px;font-weight:800;transition:background .15s var(--ease),color .15s var(--ease)}
.au-b .ic{width:19px;height:19px}
@media (hover:hover){.au-b:hover{background:var(--soft2);color:var(--ink)}}
.au-b:active{background:var(--soft2)}
.au-rate{letter-spacing:.01em}
.au-rate.on{background:var(--red-t);color:var(--red2)}   /* anything but normal speed says so */

/* the teacher's review page gives it less room */
.mk-ro .au,.rev-grid .au{padding:10px 12px;gap:11px}
.mk-ro .au-play,.rev-grid .au-play{width:44px;height:44px}
.mk-ro .au-play .ic,.rev-grid .au-play .ic{width:22px;height:22px}
/* …and it is the one control there that is not read-only */
.mk-ro .au button,.mk-ro .au input{pointer-events:auto}
.ls-read{display:flex;align-items:center;gap:12px;flex-wrap:wrap}
.ls-ctl{margin-top:2px}
.ls-script{margin-top:12px;display:flex;flex-direction:column;gap:12px;transition:filter .25s var(--ease)}
/* "listen first" is the point of the exercise: the script starts hidden and
   the gaps stay usable, so a student can type what they hear before reading */
.ls-script.blur{-webkit-user-select:none;user-select:none}
/* one blurred layer for the whole script rather than one per line: the
   gaps are lifted back out of it so they stay sharp and typeable */
.ls-script.blur .ls-line p{filter:blur(4.5px)}
.ls-script.blur .ls-line p .lsg{filter:blur(0)}
.ls-script.blur .lsg{filter:none}
.ls-line{display:flex;gap:10px;align-items:flex-start}
.ls-who{flex:none;min-width:74px;font-size:11px;font-weight:800;letter-spacing:.07em;text-transform:uppercase;
  color:var(--blue2);padding-top:4px}
.ls-line.b .ls-who{color:var(--red2)}
.ls-line p{margin:0;flex:1;min-width:0;font-size:15.5px;line-height:2}
/* the listening gap. NOT `lg`: that is the size modifier `av lg`,
   `shield lg` and `rv-badge lg` have carried for far longer, and taking
   the name knocked every large avatar and stage shield out of centre. */
.lsg{display:inline-flex;align-items:baseline;gap:5px}
.lsg-in{font:inherit;font-weight:700;color:var(--ink);background:var(--soft);border:0;
  border-bottom:2px solid var(--line2);border-radius:6px 6px 0 0;padding:1px 6px;min-width:5ch;outline:0}
.lsg-in:focus{background:var(--blue-t);border-bottom-color:var(--blue2)}
.lsg.ok .lsg-in{background:var(--green-t);border-bottom-color:var(--green2);color:var(--green3)}
.lsg.bad .lsg-in{background:var(--red-t);border-bottom-color:var(--red2);color:var(--red2);text-decoration:line-through}
.lsg-a{font-style:normal;font-weight:800;color:var(--green3);font-size:14px}
.ls-foot{margin-top:14px}
.listening .ex-res{margin-top:14px}
@media (max-width:520px){
  .ls-line{flex-direction:column;gap:2px}
  .ls-who{padding-top:0}
  .ls-line p{line-height:2.1}
}

/* ─────────────────────────────────────────────────────────────────────────
   Long pages, on a phone.

   The dictionary is the worst of them: for a student four stages in it is six
   hundred entries, nine thousand elements and a page a hundred and eighteen
   thousand pixels tall; for a teacher it is three times that. The browser was
   laying out and painting every one of them on every scroll frame, which is
   what the stutter was.

   content-visibility lets it skip everything outside the viewport entirely.
   The paired intrinsic size is what each item is roughly worth, so the
   scrollbar and the page height stay honest instead of jumping about as
   entries come into view. A browser that does not know the property ignores
   both lines and renders exactly as before.
   ───────────────────────────────────────────────────────────────────────── */
.dict-e{content-visibility:auto;contain-intrinsic-size:auto 132px}
.idiom{content-visibility:auto;contain-intrinsic-size:auto 300px}
.wtile{content-visibility:auto;contain-intrinsic-size:auto 86px}
.ls-line{content-visibility:auto;contain-intrinsic-size:auto 78px}
.fbcard{content-visibility:auto;contain-intrinsic-size:auto 150px}
/* Not the roadmap. content-visibility brings paint containment with it, which
   clips a child to its parent's box — and the exit sign hangs 23px outside
   its stop, straddling the road on purpose. Containment sliced every sign in
   half, which is why the numbers looked welded into the asphalt. A stage has
   twelve stops; it was never what made scrolling heavy anyway. */
/* a blurred script must stay blurred while it is skipped, so the gaps above
   are the only part lifted out of it */
.ls-script.blur .ls-line{content-visibility:visible}
.dict-more{margin-top:14px}

/* ───────── THE STUDENT'S OWN PAGE (stu.js)
   A page, not a sheet: a teacher reads it on a phone between classes, so it
   is one column of plain cards and nothing scrolls inside anything else. */
.page-stu .back-link{margin-bottom:12px}
.stu-head{display:flex;flex-direction:column;gap:14px}
.stu-top{display:flex;align-items:center;gap:14px}
.stu-top h1{margin:0 0 5px;font-size:clamp(21px,5vw,27px);line-height:1.15}
.stu-top .chips-row{gap:6px}
.stu-acts{display:flex;flex-wrap:wrap;gap:8px}
.stu-acts .btn{flex:1 1 auto;min-width:fit-content}
@media (max-width:520px){.stu-acts .btn{flex:1 1 calc(50% - 4px)}}

/* the facts a teacher would otherwise ring the office for */
.stu-facts-card{margin-top:12px}
.facts-grid{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:2px 14px}
@media (min-width:720px){.facts-grid{grid-template-columns:repeat(4,minmax(0,1fr))}}
@media (max-width:400px){.facts-grid{grid-template-columns:1fr}}
.fact-cell{display:flex;align-items:center;gap:9px;padding:9px 0;min-width:0;border-bottom:1px solid var(--line)}
.facts-grid .fact-cell:last-child,.facts-grid .fact-cell:nth-last-child(2){border-bottom:0}
@media (max-width:400px){.facts-grid .fact-cell:nth-last-child(2){border-bottom:1px solid var(--line)}}
.fact-cell > .ic{color:var(--mute);flex:none}
.fact-cell > div{min-width:0;flex:1}
.fact-cell small{display:block;font-size:11.5px;font-weight:700;color:var(--mute);letter-spacing:.01em}
.fact-cell b{display:block;font-size:14.5px;font-weight:700;color:var(--ink);overflow:hidden;text-overflow:ellipsis;white-space:nowrap}
.fact-cell b a{color:inherit;text-decoration:none}
@media (hover:hover){.fact-cell b a:hover{text-decoration:underline}}
.stu-active-row{margin-top:12px}
.page-stu .p-h{margin:22px 0 10px;font-size:18px}
.page-stu .sec-head{margin-top:18px}
/* the board is the student's own, so it keeps its own top margin in check here */
.page-stu .kpis{margin-top:4px}

/* ───────── the words this student keeps (stu.js)
   Their own words, newest or oldest first, and the course words lesson by
   lesson. The word chips are the student's own Word Bank chips — same look,
   without the tap, because a teacher is reading rather than studying. */
.stu-voc{display:flex;flex-direction:column;gap:12px}
.voc-head{display:flex;flex-wrap:wrap;gap:10px 22px}
.voc-n{line-height:1.1}
.voc-n b{display:block;font-size:22px;font-weight:900;letter-spacing:-.02em;font-variant-numeric:tabular-nums}
.voc-n span{font-size:11.5px;font-weight:700;color:var(--mute)}
.voc-bar{display:flex;align-items:center;gap:10px;flex-wrap:wrap;margin-bottom:8px}
.voc-bar .chips{flex:1;min-width:0}
.voc-none{margin:4px 0}
.voc-own .li .t{font-weight:800}
.voc-when{flex:none;white-space:nowrap}
.voc-ls{display:flex;flex-direction:column}
.voc-l > .li{width:100%;border:0;background:none;font:inherit;color:inherit;text-align:left;cursor:pointer}
.voc-l.open > .li .ic:last-child{transform:rotate(180deg)}
.voc-l > .li .ic:last-child{transition:transform .2s var(--ease)}
.voc-words{padding:2px 0 10px}
/* a word a teacher is reading, not tapping */
.voc-words .wbw{cursor:default}
.voc-words .wbw:active{transform:none}
.wbw.learning{background:var(--yellow-t)} .wbw.learning b{color:var(--yellow-ink)}
.wbw.dim{background:none;box-shadow:inset 0 0 0 1px var(--line)} .wbw.dim b{color:var(--mute);font-weight:700}
.voc-key{grid-column:1/-1;margin:2px 0 0}

/* ───────── a review row has two destinations
   The student, and the work. One row, two targets, so neither has to guess
   which one a tap meant. */
.rv-row{display:flex;align-items:stretch;gap:0;padding:0}
.rv-who-btn{flex:1;min-width:0;display:flex;align-items:center;gap:12px;padding:11px 4px 11px 14px;
  border:0;background:none;font:inherit;color:inherit;text-align:left;cursor:pointer;border-radius:var(--r-s)}
.rv-open{flex:none;display:flex;align-items:center;gap:4px;padding:11px 12px 11px 6px;
  text-decoration:none;color:inherit;border-radius:var(--r-s)}
.rv-open .ic{color:var(--mute);flex:none}
@media (hover:hover){.rv-who-btn:hover,.rv-open:hover{background:var(--soft)}}
.rv-who-btn:active,.rv-open:active{background:var(--soft2)}
.rv-rows .rv-row{border-bottom:1px solid var(--line)}
.rv-rows .rv-row:last-child{border-bottom:0}

/* the same on the marking page: the name is a way back to the person */
button.rev-who{display:flex;align-items:center;gap:9px;flex-wrap:wrap;border:0;background:none;
  font:inherit;color:inherit;text-align:left;cursor:pointer;padding:6px 8px;margin:4px -8px 0;border-radius:var(--r-s)}
@media (hover:hover){button.rev-who:hover{background:var(--soft)}}
button.rev-who .ic{color:var(--mute)}

/* the dashboard's waiting-for-review block */
.wait-clear{display:flex;align-items:center;gap:12px}
.wait-clear > .ic{color:var(--green3);flex:none}
/* waiting for review, by the group the homework was set to */
.wait-gs .wait-g{border-bottom:1px solid var(--line)}
.wait-gs .wait-g:last-child{border-bottom:0}
.wait-sum{display:flex;align-items:center;gap:12px;padding:12px 14px;cursor:pointer;
  list-style:none;-webkit-tap-highlight-color:transparent}
.wait-sum::-webkit-details-marker{display:none}
@media (hover:hover){.wait-sum:hover{background:var(--soft)}}
.wait-sum:focus-visible{outline:2px solid var(--blue2);outline-offset:-2px;border-radius:8px}
.wait-g .wg-i{flex:none;display:grid;place-items:center;width:36px;height:36px;border-radius:10px;
  background:var(--soft2);color:var(--ink2)}
.wait-g .wg-main{flex:1;min-width:0;display:flex;flex-direction:column;gap:1px}
.wait-g .wg-main b{font-weight:700;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}
.wait-g .wg-main small{font-size:12.5px;color:var(--mute)}
.wait-g .wg-n{flex:none;min-width:24px;padding:2px 7px;border-radius:999px;background:var(--red-t);
  color:var(--red2);font-size:12.5px;font-weight:800;text-align:center;font-variant-numeric:tabular-nums}
.wait-g > .wait-sum > .ic{flex:none;color:var(--mute);transition:transform .18s var(--ease)}
.wait-g[open] > .wait-sum > .ic{transform:rotate(180deg)}
/* A closed <details> is supposed to hide its own content, and in this app it
   does not — the rows kept their layout, 200-odd pixels of them, sitting
   underneath the next class and over its avatars. Hidden outright instead of
   trusting the default: it is one line, it works in every browser, and it
   means a shut class costs nothing to draw. */
.wait-g:not([open]) > .wait-in,
.wait-s:not([open]) > .wait-sin{display:none}
.wait-in{border-top:1px solid var(--line);background:var(--soft)}
.wait-s{border-bottom:1px solid var(--line)}
.wait-s:last-child{border-bottom:0}
.wait-ssum{padding-left:22px;gap:10px}
.wait-s[open] > .wait-ssum > .ic{transform:rotate(180deg)}
.wait-s .wg-n.sm{min-width:20px;padding:1px 6px;font-size:11.5px;background:var(--soft2);color:var(--ink2)}
.wait-sin{background:var(--card);border-top:1px solid var(--line)}
.wait-sin .sub-row{padding-left:34px}
.wait-sin .sub-row:last-child{border-bottom:0}
@media (max-width:560px){
  /* on a phone the indent was costing the row the words in it: "Speaking, the
     big speech" over three lines and the lesson cut off. The nesting is
     already clear from the two headings above it, so it is worth far less
     than the width. The "to review" plate goes too — every row under a
     heading that says Waiting for review is to review. */
  .wait-ssum{padding-left:12px;gap:9px}
  .wait-sin .sub-row{padding-left:14px;gap:9px}
  .wait-sin .plate.work{display:none}
}
.wait-old{display:flex;align-items:center;gap:6px;margin:-4px 0 8px;color:var(--red2)}
.wait-old .ic{flex:none}

/* ───────── a mark arriving in the chat
   The one message a student waits for, so it is a card with the score drawn
   in a ring rather than a grey line that reads like a system notice. */
.bubble .fbmsg{display:flex;flex-direction:column;gap:9px;min-width:210px;margin:-2px 0 2px}
.fb-head{display:flex;align-items:center;gap:5px;font-size:11.5px;font-weight:800;
  letter-spacing:.04em;text-transform:uppercase;opacity:.78}
.fb-head .ic{flex:none}
.fb-body{display:flex;align-items:center;gap:12px}
.fb-what{min-width:0;display:flex;flex-direction:column;gap:1px}
.fb-what b{font-size:15px;font-weight:800;line-height:1.2}
.fb-what small{font-size:12.5px;opacity:.72;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}

.fb-ring{position:relative;width:52px;height:52px;flex:none;display:grid;place-items:center}
.fb-ring svg{position:absolute;inset:0;width:100%;height:100%;transform:rotate(-90deg)}
.fb-ring circle{fill:none;stroke-width:4;stroke-linecap:round}
.fb-trk{stroke:currentColor;opacity:.2}
.fb-arc{stroke:currentColor;transition:stroke-dashoffset 1.05s cubic-bezier(.22,1,.36,1) .12s}
/* one item in the middle of the ring, so a two-digit score sits where a
   one-digit score does */
.fb-n{position:relative;display:flex;flex-direction:column;align-items:center;justify-content:center;line-height:1}
.fb-ring b{font-size:18px;font-weight:900;line-height:1;letter-spacing:-.02em}
.fb-ring small{font-size:9px;font-weight:800;opacity:.68;line-height:1;margin-top:1px}
.fb-ring.good{color:var(--green3)} .fb-ring.mid{color:var(--yellow-ink)} .fb-ring.low{color:var(--red2)}
/* in the student's own outgoing bubble the ring sits on a dark ground */
.bubble.mine .fb-ring.good,.bubble.mine .fb-ring.mid,.bubble.mine .fb-ring.low{color:#fff}
.fb-ring.pop b{animation:fbpop .5s var(--spring) .3s both}
@keyframes fbpop{0%{transform:scale(.6);opacity:0}60%{transform:scale(1.14)}100%{transform:scale(1);opacity:1}}

.fb-go{display:flex;align-items:center;gap:5px;text-decoration:none;color:inherit;
  font-size:13.5px;font-weight:800;padding:7px 10px;border-radius:9px;
  background:rgba(127,127,127,.14);transition:background .15s var(--ease)}
.fb-go .ic{flex:none} .fb-go .ic:last-child{margin-left:auto}
@media (hover:hover){.fb-go:hover{background:rgba(127,127,127,.24)}}
.fb-go:active{background:rgba(127,127,127,.3)}
.fbmsg.noscore .fb-body{display:none}
@media (prefers-reduced-motion:reduce){.fb-arc{transition:none}.fb-ring.pop b{animation:none}}

/* a class in the chart is a way into its group */
.tt-b.tt-go{pointer-events:auto;cursor:pointer;border:0;font:inherit;text-align:left;text-decoration:none;
  transition:filter .15s var(--ease),transform .15s var(--ease)}
.tt-b.tt-go:focus-visible{outline:2px solid var(--yellow);outline-offset:1px}
@media (hover:hover){.tt-b.tt-go:hover{filter:brightness(1.12);transform:translateY(-1px)}}
.tt-b.tt-go:active{filter:brightness(.95)}

/* a statistic you can open: same tile, plus a chevron and something to press */
.kpi-go{cursor:pointer;text-align:left;font:inherit;position:relative;width:100%;
  border:1px solid transparent;transition:border-color .15s var(--ease),transform .15s var(--ease)}
.kpi-go>.ic:last-child{position:absolute;right:10px;top:12px;color:var(--faint)}
@media (hover:hover){.kpi-go:hover{border-color:var(--line2);transform:translateY(-1px)}
  .kpi-go:hover>.ic:last-child{color:var(--mute)}}

/* ───────── THE WEEK AS A WALL CHART (hours.js)
   Days across, hours down, classes as blocks. What a teacher is really
   looking for is the space between the blocks, so the empty cells are the
   quietest thing here and every one of them is a button. */
/* The week is a panel, not a disclosure: it is open, and it has the three
   states a window has — normal, minimised to its own bar, and maximised over
   the page. Everything that acts on the week sits in its header. */
.tt-card{margin-bottom:14px;overflow:hidden}
.tt-top{display:flex;align-items:center;gap:10px;width:100%;padding:11px 10px 11px 14px;
  font:inherit;color:inherit;text-align:left;flex-wrap:wrap}
.tt-top b{font-size:16px;font-weight:800}
.tt-top .ic{color:var(--mute);flex:none}
.tt-sum{white-space:nowrap;overflow:hidden;text-overflow:ellipsis}
.tt-tools{display:flex;align-items:center;gap:6px;flex:none;margin-left:auto}
.tt-card.tt-min{padding-bottom:0}

.tt-key{display:flex;align-items:center;gap:5px;font-size:11.5px;font-weight:700;color:var(--mute);padding:0 14px 8px}
.tt-key i{width:10px;height:10px;border-radius:3px;display:inline-block;margin-left:7px}
.tt-key i:first-child{margin-left:0}
.k-class{background:var(--blue3)} .k-booked{background:var(--red)}
.k-free{background:var(--card);box-shadow:inset 0 0 0 1.5px var(--yellow2)}
/* The whole day is drawn and you move around inside it, both ways. The day
   names stay put at the top and the hours down the left, or you lose your
   place the moment you scroll into the evening. */
.tt-scroll{overflow:auto;-webkit-overflow-scrolling:touch;padding:0 14px 4px;max-height:430px;overscroll-behavior:contain}
.tt{display:grid;grid-template-columns:42px repeat(7,minmax(74px,1fr));gap:0;min-width:600px;position:relative}
.tt-corner{grid-column:1;grid-row:1;position:sticky;left:0;top:0;z-index:4;background:var(--card)}
.tt-d{grid-row:1;display:grid;place-items:center;font-size:12px;font-weight:800;color:var(--mute);
  padding-bottom:5px;border-bottom:1.5px solid var(--line);position:sticky;top:0;z-index:3;background:var(--card)}
.tt-d.today{color:var(--red2)}
.tt-h{grid-column:1;display:flex;align-items:flex-start;justify-content:flex-end;padding-right:7px;
  font-size:10.5px;font-weight:700;color:var(--mute);font-variant-numeric:tabular-nums;
  position:sticky;left:0;z-index:2;background:var(--card)}
.tt-cell{border:0;background:none;padding:0;margin:0;cursor:pointer;
  border-top:1px solid var(--line);border-left:1px solid var(--line);border-radius:0}
.tt-cell:nth-child(7n){border-right:1px solid var(--line)}
.tt-cell.today{background:var(--soft)}
@media (hover:hover){.tt-cell:hover{background:var(--blue-t);box-shadow:inset 0 0 0 1.5px var(--blue2)}}
.tt-cell:active{background:var(--blue-t)}

.tt-b{margin:1px 2px;padding:3px 6px;border-radius:6px;overflow:hidden;pointer-events:none;
  display:flex;flex-direction:column;justify-content:center;min-width:0;z-index:1}
.tt-b b{font-size:11.5px;font-weight:800;line-height:1.15;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}
.tt-b small{font-size:10px;font-weight:600;opacity:.8;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}
/* --blue3 is the darkest blue on paper and the LIGHTEST in the dark theme —
   it is an ink colour, and the "3" variants invert. Used as a background with
   white type it therefore reads fine by day and nearly vanishes at night,
   which is what the class blocks were doing. Each theme gets a block colour
   chosen as a block colour. */
.tt-class{background:var(--blue3);color:#fff}
:root[data-theme="dark"] .tt-class{background:#1B4F96;color:#EAF1FB}
@media (prefers-color-scheme:dark){:root:not([data-theme="light"]) .tt-class{background:#1B4F96;color:#EAF1FB}}
.tt-booked{background:var(--red);color:#fff}
.tt-free{background:var(--card);color:var(--yellow-ink);box-shadow:inset 0 0 0 1.5px var(--yellow2)}
.tt-foot{padding:2px 14px 12px;margin:0}
.tt-none{display:flex;align-items:center;gap:12px;margin-bottom:14px}
.tt-none > .ic{color:var(--mute);flex:none}

/* ───────── THE GROUP CARD (group.js)
   One loud thing — the action a teacher came to press. Each fact said once.
   The whole top is a door into the group. */
.gcard{padding:0;overflow:hidden;display:flex;flex-direction:column}
.gcard-top{position:relative;display:flex;align-items:center;gap:12px;padding:14px;text-decoration:none;color:inherit}
.gcard-top > span.grow{min-width:0;display:flex;flex-direction:column;gap:1px}
.gcard-top b{font-size:16.5px;font-weight:800;line-height:1.2;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}
.gcard-top small{font-size:12.5px;color:var(--mute);font-weight:600;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}
.gcard-top > .ic{color:var(--mute);flex:none}
/* The head of the card used to take the hover colour across its whole box,
   which ran it edge to edge and put its bottom edge hard against the counts
   band — the same colour, touching, reading as one block. The highlight is
   drawn as its own inset panel instead, lined up with the band and the next
   box and standing clear of both. */
.gcard-top::before{content:"";position:absolute;inset:6px 14px;border-radius:11px;
  background:transparent;transition:background .15s var(--ease);pointer-events:none}
.gcard-top > *{position:relative;z-index:1}
@media (hover:hover){.gcard-top:hover::before{background:var(--soft)}}

.gcard-next{display:flex;align-items:center;gap:11px;margin:0 14px;padding:10px 12px;border-radius:11px;background:var(--soft)}
.gn-l{flex:none;font-size:10px;font-weight:900;letter-spacing:.09em;text-transform:uppercase;color:var(--mute)}
.gcard-next > span.grow{min-width:0;display:flex;flex-direction:column;gap:0}
.gcard-next b{font-size:14px;font-weight:800;line-height:1.2}
.gcard-next small{font-size:12px;color:var(--mute);overflow:hidden;text-overflow:ellipsis;white-space:nowrap}
.gn-n{flex:none;display:flex;align-items:baseline;gap:3px}
.gn-n b{font-size:17px;font-weight:900} .gn-n small{font-size:11px;color:var(--mute);font-weight:700}

.gcard-wait{display:flex;align-items:center;gap:7px;margin:10px 14px 0;padding:8px 11px;border-radius:10px;
  background:var(--red-t);color:var(--red2);text-decoration:none;font-size:13px;font-weight:800}
.gcard-wait .ic{flex:none}
@media (hover:hover){.gcard-wait:hover{filter:brightness(.97)}}
.gcard-act{display:flex;gap:8px;padding:12px 14px 14px;margin-top:auto}
.gcard-act .btn.icon{flex:none}

/* ───────── THE GROUP PAGE */
.page-grp .back-link{margin-bottom:12px}
.grp-head{display:flex;flex-direction:column;gap:14px}
.grp-top{display:flex;align-items:center;gap:13px}
.grp-top h1{margin:0 0 3px;font-size:clamp(20px,4.6vw,26px);line-height:1.15}
.grp-acts{display:flex;flex-wrap:wrap;gap:8px}
.grp-acts .btn{flex:1 1 auto}
.btn.warn{background:var(--red-t);color:var(--red2)}
.grp-kpis{grid-template-columns:repeat(2,1fr);margin-top:14px}
@media (min-width:720px){.grp-kpis{grid-template-columns:repeat(4,1fr)}}
.grp-stu{width:100%;border:0;background:none;font:inherit;color:inherit;text-align:left;cursor:pointer;
  display:flex;align-items:center;gap:12px;padding:11px 14px}
.grp-stu > .ic{color:var(--mute);flex:none}
.grp-stu b i{font-style:normal;font-weight:600;font-size:12px}
@media (hover:hover){.grp-stu:hover{background:var(--soft)}}
.grp-tabs{display:flex;flex-direction:column;gap:2px;padding:4px 0}
.grp-tab{display:flex;align-items:center;gap:11px;padding:7px 2px}

/* ───────── hover physics on the statistics
   The tiles lift and the meters brighten under a pointer; a touch gets the
   press instead, since a finger has no hover to give. */
.kpi{transition:transform .22s var(--spring),box-shadow .22s var(--ease),border-color .2s var(--ease)}
@media (hover:hover){
  .kpi:hover{transform:translateY(-3px);box-shadow:0 10px 24px -12px rgba(0,0,0,.3),var(--shadow);border-color:var(--line2)}
  .kpi:hover .kpi-i{transform:scale(1.1) rotate(-5deg)}
  .skill:hover .meter > i,.sbar:hover .meter > i{filter:saturate(1.25) brightness(1.06)}
  .sbar:hover{background:var(--soft)}
  .sbar:hover .shield{transform:scale(1.07) rotate(-3deg)}
}
.kpi:active{transform:translateY(-1px) scale(.985)}
.kpi-i{transition:transform .22s var(--spring)}
.skill .meter > i,.sbar .meter > i{transition:filter .2s var(--ease),width .6s var(--spring)}
.sbar,.sbar .shield{transition:background .18s var(--ease),transform .22s var(--spring)}
@media (prefers-reduced-motion:reduce){
  .kpi,.kpi-i,.sbar,.sbar .shield,.skill .meter > i,.sbar .meter > i{transition:none}
  .kpi:hover,.kpi:active{transform:none}
}
.facts-h{margin:-2px 0 6px}
.facts-h b{font-size:14px;font-weight:800}

/* ───────── choosing several pieces of work at once */
.rv-bar{margin:10px 0 8px;align-items:center;gap:8px}
.rv-tick{flex:none;width:40px;display:grid;place-items:center;border:0;background:none;cursor:pointer;color:var(--mute);padding:0}
.rv-tick.off{width:40px}
.rv-tick .ic{width:21px;height:21px}
@media (hover:hover){.rv-tick:hover{color:var(--ink)}}
.rv-row.on{background:var(--blue-t)}
.rv-row.on .rv-tick{color:var(--blue3)}
.rv-rows .rv-row.on + .rv-row.on{border-top-color:transparent}
.rv-bulk{position:sticky;bottom:calc(var(--tabbar,64px) + 10px);z-index:30;margin-top:12px}
.rv-bulk-in{display:flex;align-items:center;gap:9px;padding:10px 12px;border-radius:var(--r);
  background:var(--ink);color:var(--card);box-shadow:0 12px 30px -10px rgba(0,0,0,.5);flex-wrap:wrap}
.rv-bulk-in b{font-size:17px;font-weight:900}
/* The bar holds four things now, and on a phone they do not fit across it:
   the labels were squeezed into each other until "Clear" was printed over
   the word "selected". The count keeps the first line and the buttons take
   the second, each wide enough to read. */
.rv-bulk-in>.grow{flex:1 1 60px;min-width:0}
.rv-bulk-in .btn{background:rgba(255,255,255,.14);color:inherit;border:0;flex:0 1 auto;min-width:0}
/* On a narrow screen the buttons start their own line, below the count —
   this is the line break, and it is nothing at all on a wide one. */
.rvb-br{display:none}
@media (max-width:620px){
  .rv-bulk-in{gap:8px}
  .rvb-br{display:block;flex:0 0 100%;height:0;margin:0}
  .rv-bulk-in .btn{flex:1 1 auto;padding:0 12px;white-space:nowrap}
}
.rv-bulk-in .btn.go{background:var(--red);color:#fff}
@media (hover:hover){.rv-bulk-in .btn:hover{background:rgba(255,255,255,.24)}.rv-bulk-in .btn.go:hover{filter:brightness(1.08)}}

/* ───────── PHONE: the things a finger notices
   Measured on a 390px viewport with touch, not guessed. */

/* iOS zooms the whole page in when a text field it focuses is under 16px.
   A listening has thirty of these, so every single answer yanked the page
   about. 16px exactly, which is the same size it looked before. */
.lsg-in{font-size:16px}

/* 44px is the size of a fingertip. These were all under it. */
.me-btn{width:40px;height:40px;display:grid;place-items:center}
.me-btn .av{width:34px;height:34px;font-size:13px}
.au-b{min-width:40px;height:40px;border-radius:11px}
.au-b .ic{width:20px;height:20px}
.wchip{min-height:38px;padding-top:7px;padding-bottom:7px}
.chip.sm,a.chip.sm{min-height:32px;display:inline-flex;align-items:center}
/* the exit badge's kicker — still a stylised label, just readable */
.exit small{font-size:9.5px}

/* A tap should never leave a grey box behind on a phone, and a long press on
   a control should not offer to select its label. Text the student is meant
   to read and copy from is left alone. */
button,.btn,.nsel,.tabbar a,.nav a,[data-a],[data-go]{-webkit-tap-highlight-color:transparent}
button,.btn,.tabbar a,.nav a{-webkit-touch-callout:none}

/* Momentum scrolling inside the few places that scroll on their own. */
.tt-scroll,.rtable-wrap,.tg-msgs,.wb-stages,.ptabs,.filters,.chips{-webkit-overflow-scrolling:touch}

/* ───────── THE HEAD TEACHER (head.js) */
.ht-kpis{grid-template-columns:repeat(2,1fr)}
@media (min-width:760px){.ht-kpis{grid-template-columns:repeat(4,1fr)}}
.ht-one-kpis{grid-template-columns:repeat(2,1fr)}
@media (min-width:760px){.ht-one-kpis{grid-template-columns:repeat(3,1fr)}}
.ht-row{display:flex;align-items:center;gap:12px;padding:11px 14px;text-decoration:none;color:inherit}
.ht-row > .ic{color:var(--mute);flex:none}
.ht-row b i{font-style:normal;font-weight:600;font-size:12px}
@media (hover:hover){.ht-row:hover{background:var(--soft)}}
.ht-nums{display:flex;align-items:center;gap:12px;flex:none}
.ht-n{display:flex;flex-direction:column;align-items:center;line-height:1.1}
.ht-n b{font-size:15px;font-weight:800} .ht-n b.bad{color:var(--red2)}
.ht-n small{font-size:10px;font-weight:700;color:var(--mute)}
@media (max-width:620px){.ht-nums .ht-n:nth-child(2){display:none}}
@media (max-width:460px){.ht-nums .plate{display:none}}
.page-ht .back-link{margin-bottom:12px}
.ht-head{display:flex;flex-direction:column;gap:14px}

.task-row{display:flex;align-items:flex-start;gap:11px;padding:11px 14px}
.task-row.done .sr-main b{text-decoration:line-through;opacity:.6}
.task-tick{flex:none;width:30px;display:grid;place-items:center;border:0;background:none;cursor:pointer;color:var(--mute);padding:2px 0 0}
.task-tick .ic{width:21px;height:21px}
@media (hover:hover){.task-tick:hover{color:var(--ink)}}
.task-row.late .sr-i,.task-row.late .task-tick{color:var(--red2)}
.task-body{display:block;margin-top:3px;white-space:pre-wrap}
.sr-i.p-ok{background:var(--green-t);color:var(--green3)}
.sr-i.p-late{background:var(--red-t);color:var(--red2)}
.sr-i.p-urgent{background:var(--red-t);color:var(--red2)}
.task-none{display:flex;align-items:center;gap:12px}
.task-none > .ic{color:var(--green3);flex:none}

.hp-row{display:flex;align-items:flex-start;gap:11px;padding:12px 14px;flex-wrap:wrap}
.hp-row.closed{opacity:.6}
.hp-body{display:block;margin-top:3px;white-space:pre-wrap}
.hp-act{display:flex;align-items:center;gap:7px;flex-wrap:wrap;margin-left:auto}
.grant-row{margin-bottom:0}
.warn-seg{width:100%}

/* ───────── A WARNING
   Over everything, blurred behind. The sign breathes rather than flashes:
   a flashing red square reads as an error, and this is not an error — it is
   a person being spoken to. The button arrives only when the seconds are up,
   because the seconds are the whole point. */
#app.warn-blurred{filter:blur(7px) saturate(.7);pointer-events:none;transition:filter .45s var(--ease)}
.warnwrap{position:fixed;inset:0;z-index:9000;display:grid;place-items:center;padding:24px;
  background:rgba(8,6,14,.55);opacity:0;transition:opacity .26s var(--ease)}
.warnwrap.in{opacity:1}
.warnbox{width:min(440px,100%);text-align:center;padding:30px 24px 24px;border-radius:22px;
  background:var(--card);box-shadow:0 30px 80px -20px rgba(0,0,0,.6);
  transform:translateY(14px) scale(.97);transition:transform .32s var(--spring)}
.warnwrap.in .warnbox{transform:none}
.warnsign{width:84px;height:84px;margin:0 auto 16px;border-radius:50%;display:grid;place-items:center;
  background:var(--red-t);color:var(--red2);animation:warnbreathe 2.4s ease-in-out infinite}
.warnsign .ic{width:46px;height:46px;stroke-width:2.1}
@keyframes warnbreathe{
  0%,100%{box-shadow:0 0 0 0 rgba(210,16,48,.42),0 0 26px 2px rgba(210,16,48,.3);transform:scale(1)}
  50%    {box-shadow:0 0 0 16px rgba(210,16,48,0),0 0 46px 8px rgba(210,16,48,.5);transform:scale(1.045)}}
.warnwrap.final .warnsign{background:var(--red);color:#fff}
.warnwrap.note .warnsign{background:var(--yellow-t);color:var(--yellow-ink);animation-duration:3.4s}
.warnkick{font-size:12px;font-weight:900;letter-spacing:.11em;text-transform:uppercase;color:var(--red2)}
.warnwrap.note .warnkick{color:var(--yellow-ink)}
.warnmsg{margin:9px 0 22px;font-size:17.5px;font-weight:600;line-height:1.45;color:var(--ink);white-space:pre-wrap}
.warngo{min-height:50px;font-size:16px}
.warngo:disabled{opacity:1;background:var(--soft2);color:var(--mute);cursor:default}
.warngo .warncount{font-variant-numeric:tabular-nums}
.warngo.ready{animation:warnpop .34s var(--spring)}
@keyframes warnpop{0%{transform:scale(.92);opacity:.5}100%{transform:scale(1);opacity:1}}
@media (prefers-reduced-motion:reduce){
  .warnsign{animation:none;box-shadow:0 0 0 6px rgba(210,16,48,.25)}
  .warnbox,.warngo.ready{transition:none;animation:none;transform:none}}

/* ───────── THE CURTAIN (curtain.js)
   The seam between being outside the app and being inside it. About a second,
   skipped by any press, and not drawn at all under reduced motion — the
   JavaScript declines it there, so these rules never run. */
.curtain{position:fixed;inset:0;z-index:300;display:grid;place-items:center;
  background:var(--blue3);color:#fff;opacity:0;transition:opacity .2s var(--ease)}
:root[data-theme="dark"] .curtain{background:#0A1A33}
@media (prefers-color-scheme:dark){:root:not([data-theme="light"]) .curtain{background:#0A1A33}}
.curtain.on{opacity:1}
.curtain.out{opacity:0;transition:opacity .26s var(--ease)}
.ct-in{display:flex;flex-direction:column;align-items:center;gap:10px;padding:24px;text-align:center}
.ct-mark{width:64px;height:64px;display:block;opacity:0;transform:scale(.86)}
.ct-mark svg{width:100%;height:100%}
.curtain.on .ct-mark{animation:ctMark .5s var(--ease) forwards}
@keyframes ctMark{to{opacity:1;transform:none}}
.ct-word{font-size:21px;font-weight:900;letter-spacing:.015em;opacity:0}
.curtain.on .ct-word{animation:ctUp .44s var(--ease) .1s forwards}
.ct-line{font-size:14.5px;font-weight:700;opacity:0;color:rgba(255,255,255,.82)}
.curtain.on .ct-line{animation:ctUp .44s var(--ease) .2s forwards}
@keyframes ctUp{from{opacity:0;transform:translateY(7px)}to{opacity:1;transform:none}}
/* a rule that draws itself across, the way the road's centre line does */
.ct-rule{display:block;width:132px;height:2px;margin-top:4px;background:rgba(255,255,255,.22);border-radius:2px;overflow:hidden}
.ct-rule i{display:block;height:100%;width:100%;background:var(--red);transform:scaleX(0);transform-origin:left}
.curtain.on .ct-rule i{animation:ctRule .72s var(--ease) .16s forwards}
@keyframes ctRule{to{transform:scaleX(1)}}
.curtain.out .ct-in{transform:scale(.985);transition:transform .26s var(--ease)}

/* ───────── THE TASKS BOARD (head.js) */
.bd-tabs{align-items:center;gap:8px;margin:14px 0 10px}
.bd-tabs .chip.on{background:var(--blue);color:#fff}
.bd-row .sr-main small{display:flex;align-items:center;gap:6px;flex-wrap:wrap}
.bd-row .sr-main small .av{width:20px;height:20px;font-size:9px}
.bd-row.settled{opacity:.62}
.sr-i.p-warn{color:var(--yellow-ink)}

/* the optional half of the warning sheet: shut until it is wanted */
.wn-when{border:1px solid var(--line);border-radius:var(--r);padding:0 12px;background:var(--soft)}
.wn-when>summary{display:flex;align-items:center;gap:8px;cursor:pointer;padding:11px 0;
  font-weight:700;font-size:14px;list-style:none}
.wn-when>summary::-webkit-details-marker{display:none}
.wn-when>summary .ic{color:var(--mute)}
.wn-when[open]>summary{border-bottom:1px solid var(--line);margin-bottom:10px}
.wn-when .help{display:block;margin:2px 0 11px}

/* ── a support teacher's windows: asked for, not taken ─────────────────────
   Drawn as a week rather than a list of what happens to be free. A student
   should be able to see that Tuesday is busy, not that Tuesday is missing —
   so the gone times stay on the page, faded and not pressable. */
.sup-how{margin:-4px 0 10px}
.sup-pick{margin-bottom:14px}
.sup-week{display:flex;flex-direction:column;gap:2px}
.sup-day{display:flex;gap:12px;align-items:flex-start;padding:10px 0;border-bottom:1px solid var(--line)}
.sup-day:last-child{border-bottom:0}
.sup-dn{flex:none;width:92px;padding-top:5px;font-size:13px;font-weight:800;line-height:1.25}
.sup-times{display:flex;flex-wrap:wrap;gap:6px;flex:1;min-width:0}
.sup-c{display:inline-flex;flex-direction:column;align-items:center;gap:1px;min-width:62px;padding:6px 10px;
  border-radius:9px;background:var(--soft);color:var(--ink);font-weight:800;font-size:15px;
  font-variant-numeric:tabular-nums;border:1px solid transparent;transition:background .18s var(--ease),transform .12s var(--ease)}
.sup-c em{font-style:normal;font-size:9.5px;font-weight:800;letter-spacing:.07em;text-transform:uppercase;opacity:.75}
button.sup-c{cursor:pointer}
button.sup-c.free{background:var(--blue-t);color:var(--blue3);border-color:var(--blue)}
/* only where there is a real pointer: on a touch screen :hover sticks to the
   last thing tapped, so a time the student had just pressed stayed lit as
   though it were selected */
@media (hover:hover){button.sup-c.free:hover{background:var(--blue);color:#fff}}
button.sup-c:active{transform:scale(.96)}
.sup-c.gone{opacity:.42;background:var(--soft);color:var(--mute);cursor:default}
.sup-c.asked{background:var(--orange-t);color:var(--ink);border-color:var(--orange);border-style:dashed}
.sup-c.yours{background:var(--green-t);color:var(--green3);border-color:var(--green)}
.hr-slot.asked{box-shadow:inset 0 0 0 1px var(--line);background:var(--soft)}
@media (max-width:560px){
  .sup-day{flex-direction:column;gap:5px}
  .sup-dn{width:auto;padding-top:0}
  .sup-c{min-width:58px;font-size:14px}
}

/* ── deadlines on a warning ────────────────────────────────────────────── */
.warnnote{display:flex;align-items:center;justify-content:center;gap:7px;margin:-4px 0 14px;
  font-size:13.5px;font-weight:600;opacity:.82;text-align:center}
.warnnote svg{flex:none}
.due-row{display:flex;align-items:center;gap:12px}
.due-row .t{font-weight:700;line-height:1.35}
.due-i{flex:none;width:34px;height:34px;border-radius:10px;display:grid;place-items:center;
  background:var(--soft);color:var(--ink2)}
.due-i.warn{background:var(--yellow-t);color:var(--yellow-ink)}
.due-i.final{background:var(--red-t);color:var(--red2)}
.due-row.over .due-i{background:var(--red-t);color:var(--red2)}
.due-row.over .s{color:var(--red2);font-weight:700}

/* ── the words board ───────────────────────────────────────────────────── */

/* ── looking in on a conversation ──────────────────────────────────────── */
.tg-seg{margin:0 10px 8px}
/* This one is switched by a class rather than aria-pressed, so it had no
   selected state at all — both halves looked the same whichever you were on.
   And the eye was breaking onto its own line above the words, because an icon
   here is a block element. */
.tg-seg button{display:inline-flex;align-items:center;justify-content:center;gap:6px}
/* a safety net for any switch still driven by a class rather than the attribute */
.seg button.on{background:var(--card);color:var(--ink);box-shadow:0 1px 2px rgba(1,0,76,.14)}
[data-theme="dark"] .seg button.on{box-shadow:0 1px 2px rgba(0,0,0,.4)}
/* A search field draws its own clear button, which sat next to the one the app
   draws: two crosses side by side, doing the same thing. The app keeps its own,
   because the browser's is a different shape in every browser. */
.srch input[type="search"]::-webkit-search-cancel-button,
.srch input[type="search"]::-webkit-search-decoration{-webkit-appearance:none;appearance:none;display:none}
.av.watch{background:var(--soft2);color:var(--ink2)}
.cl-row.watch .cl-bot{font-size:13px}
.tg-watch{display:flex;align-items:center;gap:10px;padding:13px 16px;margin:0;
  background:var(--soft);border-top:1px solid var(--line);color:var(--ink2);font-size:13.5px;line-height:1.4}
.tg-watch svg{flex:none;color:var(--mute)}

/* ── the constant week ─────────────────────────────────────────────────── */
.wk-grid{display:grid;grid-template-columns:repeat(7,minmax(0,1fr));gap:6px;margin-bottom:12px}
.wk-day{display:flex;flex-direction:column;gap:2px;padding:9px 6px;border-radius:10px;background:var(--soft);text-align:center}
.wk-day.on{background:var(--blue-t)}
.wk-dn{font-size:11.5px;font-weight:800;letter-spacing:.06em;text-transform:uppercase;color:var(--mute)}
.wk-day.on .wk-dn{color:var(--blue3)}
.wk-t{font-size:12.5px;font-weight:700;font-variant-numeric:tabular-nums;line-height:1.3}
.wk-m{font-size:10.5px}
.wk-set{width:100%}
.wk-rows{display:flex;flex-direction:column;gap:6px}
.wk-row{display:flex;align-items:center;gap:10px;padding:8px 10px;border-radius:10px;background:var(--soft);opacity:.6;transition:opacity .15s var(--ease),background .15s var(--ease)}
.wk-row.on{opacity:1;background:var(--blue-t)}
.wk-pick{display:flex;align-items:center;gap:9px;min-width:124px;font-weight:700;cursor:pointer}
.wk-times{display:flex;align-items:center;gap:7px;flex:1;min-width:0}
.wk-times i{font-style:normal;color:var(--mute);font-size:13px}
.input.sm{height:38px;padding:0 9px;font-size:14.5px}
@media (max-width:620px){
  .wk-grid{grid-template-columns:repeat(4,minmax(0,1fr))}
  .wk-row{flex-wrap:wrap}.wk-pick{min-width:0;width:100%}
}

/* ── a picture in a chat ───────────────────────────────────────────────── */
.tg-input .tg-pic{flex:none}
.bubble.photo{padding:4px;max-width:min(78%,320px)}
.pmsg{display:block;width:100%;padding:0;border-radius:11px;overflow:hidden;background:var(--soft2);cursor:zoom-in;line-height:0}
.pmsg img{width:100%;height:100%;object-fit:cover;display:block}
.pmsg.sending{display:flex;align-items:center;gap:8px;padding:10px 12px;line-height:1.3;cursor:default}
.bubble.photo .meta{padding:2px 6px 1px}
.ph-full{display:block;width:100%;height:auto;border-radius:var(--r)}

/* ── a final warning should not look like a note ───────────────────────────
   A note, a warning and a final warning were the same sign in three colours.
   The last one is the one before something happens, so it carries: the room
   goes darker, the card is bordered in red and shot through with hazard
   stripes, the sign is solid and beats harder, and the whole thing lands with
   a jolt instead of a fade. Reduced motion keeps the weight and drops the
   movement. */
.warnwrap.final{background:rgba(52,2,10,.88);backdrop-filter:blur(7px) saturate(.7)}
.warnwrap.final .warnbox{
  border:2px solid var(--red);padding:0 24px 24px;overflow:hidden;
  box-shadow:0 0 0 7px rgba(210,16,48,.16),0 40px 80px -30px rgba(0,0,0,.85);
  /* the hazard stripe along the bottom only: the top edge is the band */
  background:
    repeating-linear-gradient(135deg, rgba(210,16,48,.10) 0 14px, transparent 14px 28px) bottom/100% 10px no-repeat,
    var(--card);
}
/* the band is the top edge of the card, not something sitting on it */
.warnband{margin:0 -24px 22px;padding:12px 16px;background:var(--red);color:#fff;
  background-image:repeating-linear-gradient(135deg,rgba(255,255,255,.15) 0 10px,transparent 10px 20px)}
.warnband b{font-size:13.5px;font-weight:900;letter-spacing:.22em;text-transform:uppercase}
/* named, because a final warning is addressed to a person */
.warnname{margin:10px 0 0;font-size:20px;font-weight:800;line-height:1.25;color:var(--red2)}
.warnnote.stern{color:var(--red2);font-weight:700}
.warnwrap.final.in .warnbox{animation:warnslam .5s var(--spring) both}
.warnwrap.final .warnsign{
  width:96px;height:96px;background:var(--red);color:#fff;
  box-shadow:0 0 0 0 rgba(210,16,48,.55);
  animation:warnbeat 1.25s ease-in-out infinite}
.warnwrap.final .warnsign .ic{width:54px;height:54px;stroke-width:2.3}
.warnwrap.final .warnsign{box-shadow:0 0 0 6px rgba(255,255,255,.12)}
.warnwrap.final .warnkick{font-size:13px;letter-spacing:.15em;color:var(--red2)}
.warnwrap.final .warnmsg{font-size:19px;font-weight:700}
.warnwrap.final .warngo{background:var(--red);color:#fff;box-shadow:inset 0 0 0 1.5px rgba(0,0,0,.2)}
.warnwrap.final .warngo:disabled{background:var(--soft2);color:var(--mute);box-shadow:none}
@keyframes warnslam{0%{transform:scale(.82) translateY(14px);opacity:0}
  55%{transform:scale(1.03) translateY(0);opacity:1}100%{transform:none;opacity:1}}
@keyframes warnbeat{
  0%,100%{box-shadow:0 0 0 0 rgba(210,16,48,.5);transform:scale(1)}
  18%{transform:scale(1.07)}
  36%{transform:scale(1)}
  70%{box-shadow:0 0 0 22px rgba(210,16,48,0);transform:scale(1)}}
@media (prefers-reduced-motion:reduce){
  .warnwrap.final .warnsign{animation:none;box-shadow:0 0 0 9px rgba(210,16,48,.3)}
  .warnwrap.final.in .warnbox{animation:none}}

/* ── picking several teachers to assist ────────────────────────────────── */
.asl{display:flex;flex-direction:column;gap:5px;max-height:230px;overflow:auto;
  padding:5px;border:1px solid var(--line);border-radius:var(--r);background:var(--soft)}
.asl-row{display:flex;align-items:center;gap:10px;padding:7px 9px;border-radius:9px;cursor:pointer;background:var(--card)}
.asl-row.on{background:var(--blue-t)}
.asl-row b{font-weight:700}
.asl-row i{font-style:normal;font-size:12.5px}

/* ── feedback a teacher writes about a student ─────────────────────────── */
.gfb-card{gap:12px}
.gfb-card>svg{color:var(--blue2);flex:none}
.gfb-list{display:flex;flex-direction:column;gap:4px;max-height:320px;overflow:auto;
  border:1px solid var(--line);border-radius:var(--r);padding:5px;background:var(--soft)}
.gfb-row{display:flex;align-items:center;gap:11px;width:100%;padding:9px 10px;border-radius:10px;
  background:var(--card);text-align:left;cursor:pointer}
.gfb-row b{display:block;font-weight:700;line-height:1.3}
.gfb-row small{display:block;font-size:12.5px;color:var(--mute)}
@media (hover:hover){.gfb-row:hover{background:var(--blue-t)}}
.gfb-who{gap:12px;padding-bottom:4px}
.gfb-past{border:1px solid var(--line);border-radius:var(--r);background:var(--soft);padding:0 12px}
.gfb-past>summary{display:flex;align-items:center;gap:8px;padding:10px 0;cursor:pointer;font-weight:700;font-size:14px}
.gfb-past>summary::-webkit-details-marker{display:none}
.gfb-past-in{padding-bottom:10px;display:flex;flex-direction:column;gap:9px;max-height:210px;overflow:auto}
.gfb-old .s{font-size:12px;font-weight:700;color:var(--mute)}
.gfb-old p{margin:2px 0 0;font-size:14px;line-height:1.45}
.gfb-mine{gap:8px}
.gfb-note.fresh{box-shadow:inset 0 0 0 2px var(--red)}
.gfb-head{gap:10px;margin-bottom:8px}
.gfb-body{margin:0;font-size:16px;line-height:1.55;white-space:pre-wrap}

/* ── the week, held back until it is asked for ─────────────────────────── */
.tt-card.tt-veil{position:relative}
.tt-card.tt-veil .tt-scroll{filter:blur(3px) saturate(.6);opacity:.55;pointer-events:none;user-select:none}
.tt-wake{position:absolute;inset:0;z-index:3;display:grid;place-items:center;width:100%;
  border-radius:inherit;background:transparent;cursor:pointer}
.tt-wake>span{display:flex;flex-direction:column;align-items:center;gap:5px;padding:16px 22px;
  border-radius:14px;background:var(--card);box-shadow:0 14px 34px -14px rgba(0,0,0,.55),inset 0 0 0 1px var(--line)}
.tt-wake b{font-size:15.5px;font-weight:800}
.tt-wake i{font-style:normal;font-size:12.5px;color:var(--mute)}
.tt-wake svg{color:var(--blue2)}
@media (hover:hover){.tt-wake:hover>span{transform:translateY(-1px)}}

/* ── who is in a window ────────────────────────────────────────────────── */
.sw-head{margin-bottom:4px}
.sw-in{display:flex;align-items:center;gap:11px}
.sw-list{display:flex;flex-direction:column;gap:4px;max-height:260px;overflow:auto;
  border:1px solid var(--line);border-radius:var(--r);padding:5px;background:var(--soft);margin:8px 0 12px}
.sw-row{display:flex;align-items:center;gap:10px;padding:7px 9px;border-radius:9px;background:var(--card);cursor:pointer}
.sw-row.on{background:var(--blue-t)}
.sw-row b{font-weight:700;display:block;line-height:1.25}
.sw-row small{display:block;font-size:12px;color:var(--mute)}

/* ── homework on the group page ────────────────────────────────────────── */
.hw-row{display:flex;align-items:center;gap:11px}
.hw-i{flex:none;width:34px;height:34px;border-radius:10px;display:grid;place-items:center;
  background:var(--soft2);color:var(--ink2)}
.hw-i.must{background:var(--red-t);color:var(--red2)}
.hw-row .t{font-weight:700}
.hw-must{font-style:normal;font-size:10.5px;font-weight:800;letter-spacing:.07em;text-transform:uppercase;
  color:var(--red2);margin-left:6px}
.hw-bar{height:4px;border-radius:99px;background:var(--soft2);overflow:hidden;margin-top:6px;max-width:260px}
.hw-bar>i{display:block;height:100%;background:var(--green2);border-radius:99px}
.hw-list.done .hw-bar>i{background:var(--green)}
.hw-list.done .hw-i{background:var(--green-t);color:var(--green3)}
.gs-row{display:flex;align-items:center;gap:11px}

/* ─────────────────────────────────────────────────────────────────────────
   A notification opened in full, and the standing ask to turn them on.
   ───────────────────────────────────────────────────────────────────────── */
.nf-full,.nf-ask{text-align:center;padding:6px 2px 2px}
.nf-full .ni,.nf-ask .ni{width:56px;height:56px;border-radius:16px;display:grid;place-items:center;margin:0 auto 14px}
.nf-full h3,.nf-ask h3{margin:0 0 8px;font-size:19px;line-height:1.3}
.nf-text{margin:0 0 12px;font-size:15.5px;line-height:1.5;color:var(--ink2);white-space:pre-wrap;word-break:break-word}
.nf-ask p{margin:0 0 10px;line-height:1.5}
.only-s{display:none}
@media (max-width:899px){.only-s{display:inline}}
.block{display:block}

/* ─────────────────────────────────────────────────────────────────────────
   The notepad on a lesson.
   ───────────────────────────────────────────────────────────────────────── */
.pad-gs{margin:0 0 10px}
.pad-body{width:100%;min-height:180px;resize:vertical;font:inherit;line-height:1.5;padding:12px 13px}
.pad-meta{align-items:center;gap:10px;margin:8px 0 2px}
.pad-or{text-align:center;margin:10px 0 8px}
.teach-bar [data-a="pad-open"]{flex:none}

/* ─────────────────────────────────────────────────────────────────────────
   Feedback, and the answer to it.
   ───────────────────────────────────────────────────────────────────────── */
.gfb-note{display:block;width:100%;text-align:left;border:1px solid var(--line);cursor:pointer;font:inherit;color:inherit}
@media (hover:hover){.gfb-note:hover{border-color:var(--line2);transform:translateY(-1px)}}
.gfb-note{transition:transform .16s var(--spring),border-color .16s}
.gfb-foot{align-items:center;gap:8px;margin-top:10px;padding-top:9px;border-top:1px solid var(--line);color:var(--mute)}
.gfb-body.big{font-size:16px;line-height:1.55;white-space:pre-wrap}
.gfb-one .gfb-body{margin:10px 0 2px}
.gfb-none{margin-top:12px}
.gfb-replies{margin-top:14px;padding-top:12px;border-top:1px solid var(--line);display:flex;flex-direction:column;gap:9px}
.gfb-rep{background:var(--soft);border-radius:11px;padding:9px 11px;line-height:1.45}
.gfb-rep.mine{background:var(--blue-t)}
.gfb-rep-who{display:block;font-weight:700;font-size:12.5px;color:var(--blue2);margin-bottom:2px}
.gfb-rep-b{display:block;white-space:pre-wrap;word-break:break-word}
.gfb-rep time{display:block;margin-top:3px}
.gfb-old .gfb-rep{margin-top:8px}
.gfb-back{margin-top:9px}
.gfb-send{padding:0}

/* ─────────────────────────────────────────────────────────────────────────
   Finding a time in a support teacher's week.
   ───────────────────────────────────────────────────────────────────────── */
.sup-find{margin:0 0 12px}
.sup-hits{margin:0 0 10px}
.sup-none{margin:0;padding:10px 2px}

/* ─────────────────────────────────────────────────────────────────────────
   Whose conversation it is, above the list a head teacher looks in on.
   ───────────────────────────────────────────────────────────────────────── */
.wstaff{display:flex;gap:7px;overflow-x:auto;padding:9px 10px 11px;border-bottom:1px solid var(--line);
  scrollbar-width:none;-webkit-overflow-scrolling:touch}
.wstaff::-webkit-scrollbar{display:none}
.wst{flex:none;display:flex;flex-direction:column;align-items:center;gap:4px;width:70px;padding:7px 4px 6px;
  border:1px solid transparent;border-radius:12px;background:none;cursor:pointer;font:inherit;color:var(--mute)}
.wst .av{margin:0}
.wst .av.all{background:var(--soft2);color:var(--ink2)}
.wst-n{font-size:11.5px;font-weight:700;max-width:100%;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}
.wst .num{font-size:11px;font-weight:800;color:var(--mute)}
.wst.on{background:var(--blue-t);border-color:var(--blue2);color:var(--blue2)}
.wst.on .num{color:var(--blue2)}
@media (hover:hover){.wst:hover{background:var(--soft)}.wst.on:hover{background:var(--blue-t)}}

/* ─────────────────────────────────────────────────────────────────────────
   A group card's three facts, and narrowing a long list of them.

   Which stage, when it meets, and whose it is: these are what somebody scans
   a list of groups for, and they used to be one run of small grey text under
   the name — with the teacher shown only to the administration. Each is its
   own fact now, at a readable size.
   ───────────────────────────────────────────────────────────────────────── */
.av.xs{width:20px;height:20px;font-size:9px;letter-spacing:0}
.gc-facts{display:flex;flex-wrap:wrap;align-items:center;gap:5px 7px;margin-top:5px}
.gc-f{display:inline-flex;align-items:center;gap:4px;font-size:12.5px;font-weight:700;line-height:1.5;
  color:var(--ink2);background:var(--soft);border-radius:999px;padding:2px 9px 2px 7px;white-space:nowrap}
.gc-f .ic{width:13px;height:13px;color:var(--mute);flex:none}
.gc-f .av{margin-right:1px}
.gc-f.stage{background:var(--blue-t);color:var(--blue2)}
.gc-f.stage .ic{color:var(--blue2)}
/* green3 is the ink that goes on green-t — the pair .plate.ok already uses.
   green2 is a fill, and on the dark theme's green-t it came to 4.38:1. */
.gc-f.who.mine{background:var(--green-t);color:var(--green3)}
.gc-f.none{background:var(--red-t,var(--soft));color:var(--red2)}
.gc-f.none .ic{color:var(--red2)}
.gcard-top>.grow{min-width:0}
.gcard-top>.grow>b{display:block;font-size:16.5px;line-height:1.25}

.grp-filters{display:flex;flex-direction:column;gap:9px;margin:0 0 14px}
.grp-chips{display:flex;gap:7px;overflow-x:auto;padding-bottom:2px;scrollbar-width:none;flex-wrap:nowrap}
.grp-chips::-webkit-scrollbar{display:none}
.grp-chips .chip{flex:none;display:inline-flex;align-items:center;gap:5px}
.grp-chips .chip em{font-style:normal;font-weight:800;font-size:11px;opacity:.6}
.gq-none{text-align:center}
.gq-none .btn{margin-top:8px}

/* ─────────────────────────────────────────────────────────────────────────
   The pointer, everywhere something is clickable.

   Cursor was set component by component, so anything the app made clickable
   without its own rule — a div or a span carrying data-go or data-a — showed
   the text I-beam over its own words, which reads as "this is text, not a
   button". Cursor inherits, so one rule on the element covers the words
   inside it.
   ───────────────────────────────────────────────────────────────────────── */
[data-go],[data-a],[data-seg],[role="button"],[role="option"],[role="checkbox"],[role="tab"],
summary,label.sw-row,label.asl-row{cursor:pointer}
/* and nothing pretends to be clickable when it is not */
[disabled],[aria-disabled="true"],.btn[disabled],button:disabled{cursor:default}

/* ─────────────────────────────────────────────────────────────────────────
   Cards slide in when you arrive, and not when the page is merely redrawn.

   Every few seconds the app reloads its state and rebuilds the page under
   you. Each rebuild used to restart every entry animation on screen at once
   — twenty cards sliding and every number counting up again — which on a
   busy page is the jerking. #main.enter marks an actual arrival, so the
   animation only runs then. Sheets keep theirs: they are always an arrival.
   ───────────────────────────────────────────────────────────────────────── */
#main .rise{animation:none}
/* same reason as above: `backwards` holds the start frame through the
   stagger delay without leaving an identity transform behind afterwards */
#main.enter .rise{animation:rise .5s var(--ease) backwards;animation-delay:calc(min(var(--i,0),6)*45ms)}

/* ─────────────────────────────────────────────────────────────────────────
   The academy's week reads sideways.

   A week you cannot act on is a picture, and a picture should not need
   scrolling down through an empty night to read. It is cropped to the hours
   that hold something (see hrGrid), so there is no vertical scroll left — and
   the days are given room to be readable, so the one way left to move is
   across them. A week somebody opens windows in is unchanged: they have to be
   able to reach an hour that is currently empty.
   ───────────────────────────────────────────────────────────────────────── */
.tt-card.tt-read .tt-scroll{max-height:none;overflow-x:auto;overflow-y:hidden}
.tt-card.tt-read .tt{min-width:860px;grid-template-columns:48px repeat(7,minmax(112px,1fr))}
@media (max-width:860px){.tt-card.tt-read .tt{min-width:760px}}

/* ─────────────────────────────────────────────────────────────────────────
   A support teacher's week, three ways.
   ───────────────────────────────────────────────────────────────────────── */
.run-seg{margin:0 0 12px;display:inline-flex}
.run-seg button{display:inline-flex;align-items:center;gap:6px}
.run-day{margin-top:18px}
.run-day:first-of-type{margin-top:6px}
.sc-card{padding:12px 0 4px}
.sc-scroll{max-height:none;overflow-x:auto;overflow-y:hidden}
.sc-grid{position:relative}
.sc-b{display:flex;flex-direction:column;justify-content:center;align-items:flex-start;gap:1px;
  margin:1px 2px;padding:2px 7px;border-radius:7px;border:0;font:inherit;text-align:left;
  overflow:hidden;cursor:pointer;transition:transform .14s var(--spring),filter .14s}
.sc-b b{font-size:11.5px;font-weight:800;line-height:1.1}
.sc-b small{font-size:10px;font-weight:700;opacity:.85;line-height:1.1}
.sc-b:disabled{cursor:default}
@media (hover:hover){.sc-b:not(:disabled):hover{transform:translateY(-1px);filter:brightness(1.1)}}
/* An open window is the paper this is printed on: a wash, no outline, the
   time in a weight you read past. Three hundred ruled boxes each saying 0/1
   was the "skeleton". */
.sc-b.open{background:var(--soft);color:var(--mute);box-shadow:none}
.sc-b.open b{font-weight:600;opacity:.75}
@media (hover:hover){.sc-b.open:not(:disabled):hover{background:var(--blue-t);color:var(--blue3)}}
/* and the ones with somebody in them carry the weight */
.sc-b.asked{background:var(--yellow-t);color:var(--yellow-ink);box-shadow:inset 0 0 0 1.5px var(--yellow)}
.sc-b.part{background:var(--blue-t);color:var(--blue3);box-shadow:inset 0 0 0 1.5px var(--blue2)}
.sc-b.full{background:var(--blue);color:#fff;box-shadow:0 1px 3px rgba(12,54,118,.3)}
.tt-key .k-asked{background:var(--yellow)}
.tt-key .k-part{background:var(--blue-t);box-shadow:inset 0 0 0 1.5px var(--blue2)}
.tt-key .k-full{background:var(--blue)}
/* ten-minute rows make for short blocks: the time alone, with the count only
   when there is height for it */
.sc-grid .tt-h{align-items:flex-start;font-size:11px}
.sc-b{min-height:0}
/* the second line only where there is height for it, and only when it says
   something — a name, or who is waiting */
.sc-b small{display:none}
.sc-b.tall small{display:block;font-size:10px;font-weight:700;line-height:1.1;
  overflow:hidden;text-overflow:ellipsis;white-space:nowrap;max-width:100%}
.sc-b.full small,.sc-b.part small{opacity:1}
.sc-top{align-items:center;padding:0 14px 8px;gap:10px}
.sc-sum b{color:var(--ink)}
.sc-b[style*="span 2"] small,.sc-b[style*="span 3"] small,.sc-b[style*="span 4"] small,
.sc-b[style*="span 5"] small,.sc-b[style*="span 6"] small,.sc-b[style*="span 9"] small{display:block}
.sc-b{padding:1px 6px;justify-content:flex-start}
.sc-b b{font-size:11px;letter-spacing:-.01em}
/* the block is exactly as tall as its window; the time sits on one line in it */
.sc-b{line-height:1;overflow:hidden}
.sc-b b{display:block;white-space:nowrap;overflow:hidden;text-overflow:ellipsis;max-width:100%}
/* one of you at a time, on a question asked of the office */
.tg-held{display:flex;align-items:center;gap:10px;padding:12px 14px;border-top:1px solid var(--line);
  background:var(--yellow-t);color:var(--yellow-ink);font-weight:600}
.tg-held .ic{flex:none}
.hp-act .btn.held{opacity:.75}

/* ─── a code of your own ───────────────────────────────────────────────────
   The code is meant to be read aloud across a desk, so it is set as large as
   a sign and spaced like a registration plate. Everything else on the card is
   quiet around it. */
.notice.go{background:var(--green-t);border-color:#A9D9C4;color:var(--green3)}
.notice.go .diamond{background:var(--green);color:#fff;box-shadow:inset 0 0 0 2px var(--green),inset 0 0 0 3.2px #fff}
.codecard{display:flex;flex-direction:column;gap:12px}
.codecard .row.acts{gap:8px}
.codebig{display:flex;align-items:center;gap:12px;flex-wrap:wrap;padding:14px 16px;border-radius:var(--r);
  background:var(--soft);border:1px solid var(--line)}
.codecard.has-code .codebig{background:var(--green-t);border-color:#A9D9C4}
.codebig b{font-size:clamp(28px,8vw,38px);font-weight:800;letter-spacing:.16em;line-height:1;color:var(--ink);
  font-variant-numeric:tabular-nums;flex:1 1 auto;word-break:break-all}
.codecard.has-code .codebig b{color:var(--green3)}
.codeleft{margin:0}
.pad-x{padding:0 16px 14px}
/* a row for somebody nobody has placed yet */
.tag-wait{display:inline-flex;align-items:center;gap:4px;margin-left:6px;padding:1px 7px 1px 5px;border-radius:30px;
  background:var(--green-t);color:var(--green3);font-size:11.5px;font-weight:800;font-style:normal;white-space:nowrap;vertical-align:1px}
.tag-wait .ic{width:13px;height:13px}
/* three doors instead of two: the labels are shorter, so they still fit a phone */
.auth-tabs.three button{font-size:13.5px;padding:10px 4px}

/* a row on the board that nobody chose to put there */
.bd-row.bd-missed{background:var(--red-t)}
.bd-row.bd-missed .sr-i{background:var(--red);color:#fff}
.bd-row.bd-missed.settled{background:transparent}

/* ─── grades ───────────────────────────────────────────────────────────────
   A letter is a judgement, so it is set like one: large, flat, and in one of
   three bands rather than a continuous heat scale. A B should not look like a
   near-miss on an A, which is what a percentage gradient made of it. */
.gchip{display:inline-flex;align-items:baseline;gap:7px;padding:5px 11px;border-radius:30px;
  background:var(--soft);border:1px solid var(--line);white-space:nowrap}
.gchip b{font-size:17px;font-weight:800;letter-spacing:.01em}
.gchip em{font-style:normal;font-size:12.5px;font-weight:700;color:var(--mute);font-variant-numeric:tabular-nums}
.gchip.hi{background:var(--green-t);border-color:#A9D9C4} .gchip.hi b{color:var(--green3)}
.gchip.md{background:var(--yellow-t);border-color:#F1DC96} .gchip.md b{color:var(--yellow-ink)}
.gchip.lo{background:var(--red-t);border-color:#F0BFC6} .gchip.lo b{color:var(--red2)}
.gchip.none{color:var(--mute);font-weight:700;padding:5px 13px}
.gchip.sm{padding:3px 8px} .gchip.sm b{font-size:14px} .gchip.sm em{display:none}
.gchip.lg b{font-size:26px}

/* the picker: every letter at once, because a teacher grading a class should
   not open thirty dropdowns */
.gpick{display:flex;flex-wrap:wrap;gap:5px}
.gpick .gp{min-width:40px;padding:8px 9px;border-radius:9px;border:1px solid var(--line);background:var(--card);
  font-weight:800;font-size:14px;color:var(--ink);transition:background .14s var(--ease),border-color .14s var(--ease)}
.gpick .gp:hover{border-color:var(--blue2)}
.gpick .gp.on{background:var(--blue3);border-color:var(--blue3);color:#fff}
.gpick .gp.clear{min-width:34px;color:var(--mute);padding:8px 7px}
.gpick .gp.clear.on{background:var(--soft2);border-color:var(--line);color:var(--mute)}
.gpick .gp.clear .ic{width:15px;height:15px;display:block}

/* the grid */
/* 44 each way: this is the thing a teacher taps to grade somebody, and it
   was 42x38 — under a fingertip in both directions. */
.gtable .gcell{min-width:44px;min-height:44px;padding:7px 6px;border-radius:9px;background:var(--soft);color:var(--mute);
  font-weight:800;font-size:14.5px;position:relative;border:1px solid transparent}
.gtable .gcell:hover{border-color:var(--blue2)}
/* An ungraded square was a full stop on a grey tile: nothing about it said it
   could be tapped, so grading one student meant opening a whole lesson and
   finding them in it. Empty squares now read as somewhere a letter goes, and
   say so under a finger or a cursor. */
.gtable .gcell:not(.has):not(.off){border-style:dashed;border-color:var(--line2);background:transparent}
.gtable .gcell:not(.has):not(.off):hover{border-style:solid;border-color:var(--blue2);background:var(--blue-t);color:var(--blue2)}
.gtable .gcell:not(.has):not(.off):hover::after{content:"+";position:absolute;inset:0;display:grid;place-items:center;
  background:var(--blue-t);border-radius:8px;font-size:17px;font-weight:900;color:var(--blue2)}
.gtable .gcell:active{transform:scale(.94)}
.gtable .gcell.has.hi{background:var(--green-t);color:var(--green3)}
.gtable .gcell.has.md{background:var(--yellow-t);color:var(--yellow-ink)}
.gtable .gcell.has.lo{background:var(--red-t);color:var(--red2)}
.gtable .gcell.off,.gtable .gcell i{color:var(--mute)}
.gtable .gcell i{position:absolute;top:1px;right:4px;font-style:normal;font-size:9.5px;font-weight:800;opacity:.75}
.gtable tr.gpa-off{opacity:.55}
.legend .lg-l{display:inline-flex;gap:4px;align-items:baseline;margin-right:10px;font-weight:800;color:var(--ink)}
.legend .lg-l em{font-style:normal;font-weight:600;color:var(--mute);font-variant-numeric:tabular-nums}

/* grading a whole lesson */
.gclist{max-height:46vh;overflow:auto;gap:4px}
.gclist .li.col{flex-direction:column;align-items:stretch;gap:8px;padding:11px 10px}
.gclist .li.col .row{align-items:center;gap:9px}
/* the ladder, as the head teacher edits it */
.gladder{display:grid;grid-template-columns:repeat(auto-fill,minmax(104px,1fr));gap:8px;margin:4px 0 10px}
.gl{display:flex;align-items:center;gap:7px;padding:5px 6px 5px 10px;border-radius:10px;background:var(--soft);border:1px solid var(--line)}
.gl span{font-weight:800;font-size:14px;min-width:22px}
.gl .input{padding:6px 8px;font-size:14px;text-align:right;font-variant-numeric:tabular-nums}

/* ─── the red list ─────────────────────────────────────────────────────────
   Not a table. Each student is a card, because a support teacher is about to
   do something about this one person rather than scan a column of numbers. */
.redlist{display:flex;flex-direction:column;gap:12px}
.redcard{gap:12px;display:flex;flex-direction:column}
.redcard .rname{display:flex;align-items:center;gap:11px;text-align:left;min-width:0}
.redcard .rname b{display:block;font-size:15.5px;font-weight:800}
.redcard .rname small{display:block;font-size:12.5px;line-height:1.35}
.redfacts{display:grid;grid-template-columns:repeat(2,1fr);gap:8px}
@media (min-width:620px){.redfacts{grid-template-columns:repeat(4,1fr)}}
.rf{padding:9px 11px;border-radius:12px;background:var(--soft);border:1px solid var(--line);min-width:0}
.rf b{display:block;font-size:17px;font-weight:800;line-height:1.1;color:var(--ink)}
.rf small{display:block;font-size:11.5px;color:var(--mute);font-weight:600;margin-top:1px}
.rf.low{background:var(--red-t);border-color:#F0BFC6} .rf.low b{color:var(--red2)}
.redtaught{display:flex;flex-direction:column;gap:7px}
.redtaught .chips{gap:5px}
.redtaught .chip.off{opacity:.55}
.redtaught .chip.ghost{background:transparent;border:1px dashed var(--line);color:var(--mute)}
.redline{align-items:center}
.redline .input{width:92px;text-align:right;font-variant-numeric:tabular-nums}
/* A row of buttons. It is NOT called "gap": .gap is already the blank in a
   fill-in-the-blank exercise — a grey inline pill with a 74px minimum — so
   every row that borrowed the name was being painted as a cloze blank, which
   is the grey bar that ran the width of the card behind the buttons. */
.row.acts{display:flex;flex-wrap:wrap;align-items:center;gap:8px}
.row.acts > *{flex:0 0 auto;max-width:100%}
.redcard .row.acts .btn.ghost{margin-left:auto}
@media (max-width:560px){.redcard .row.acts .btn.ghost{margin-left:0}}

/* ─── you can see what you have chosen ────────────────────────────────────
   The group filters are drawn as .chip.on, and outside the Tasks board there
   was no rule for .chip.on anywhere in this stylesheet — so clicking a filter
   changed what was listed and changed nothing you could see. A selected
   control is now filled, not merely a slightly lighter grey. */
/* --blue is a mid-dark blue in BOTH themes, so white sits on it safely.
   --blue3 is navy in light and pale blue in dark: white on it is unreadable
   the moment the board is switched, which is exactly what happened. */
.chip.on,.chip[aria-pressed="true"]{background:var(--blue);color:#fff;
  box-shadow:inset 0 0 0 1.5px var(--blue)}
.chip.on .ic,.chip[aria-pressed="true"] .ic{color:#fff}
.chip.on em,.chip[aria-pressed="true"] em{color:#fff;opacity:.8}
.chip.on .av,.chip[aria-pressed="true"] .av{box-shadow:0 0 0 1.5px rgba(255,255,255,.55)}
/* and the same for a segmented switch, which was a card-coloured pill on a
   grey track — almost invisible in dark mode */
.seg button[aria-pressed="true"],.seg button.on{background:var(--blue);color:#fff;
  box-shadow:0 1px 2px rgba(1,0,76,.2)}
[data-theme="dark"] .seg button[aria-pressed="true"],
[data-theme="dark"] .seg button.on{box-shadow:0 1px 3px rgba(0,0,0,.5)}
.seg button[aria-pressed="true"] .ic,.seg button.on .ic{color:#fff}
/* a dropdown that is filtering something says so, rather than looking the
   same as the one that is not */
select.input.set{box-shadow:inset 0 0 0 2px var(--blue3);font-weight:700;color:var(--ink)}

/* ─── a review row is one target, so it has to be laid out as one ─────────
   .rv-open was built as the small right-hand end of a split row: flex:none,
   which is right for an end cap and wrong for the whole row. Left that way the
   row could not size itself, and the time, the badge and the chevron piled up
   on each other whenever the window changed width. */
.rv-open.whole{flex:1;min-width:0;gap:12px;padding:11px 12px 11px 14px}
.rv-open.whole .sr-main{flex:1;min-width:0}
.rv-open.whole .sr-end{flex:none;flex-wrap:nowrap;white-space:nowrap;text-align:right}
.rv-open.whole .sr-end small{white-space:nowrap}
.sr-end{min-width:0}
/* at a narrow width the time is the first thing worth losing — never the
   grade, and never by overlapping it */
@media (max-width:560px){.rv-open.whole .sr-end small{display:none}}

/* ─── the top bar stops pushing the page sideways ─────────────────────────
   .nav was flex:1 with no minimum and nothing to do when it ran out of room,
   so a head teacher's nine tabs made the BAR wider than the window and every
   page scrolled sideways with the last tab cut off mid-word. Two things stop
   that: the bar's parts may shrink, and the nav scrolls inside itself rather
   than shoving everything else along. */
.topbar{min-width:0}
.nav{min-width:0;overflow-x:auto;overflow-y:hidden;scrollbar-width:none;-ms-overflow-style:none}
.nav::-webkit-scrollbar{display:none}
.nav a{flex:none}
.top-r{flex:none}
/* When the words do not fit, the icons carry it — and navFit() in main.js is
   what decides, by measuring, because how many tabs there are depends on who
   is signed in. Each link still names itself on hover and to a screen reader,
   and the red underline still says where you are. */
.nav.snug a{padding:0 8px;font-size:13.5px;gap:5px}
.nav.snug a::after{left:8px;right:8px}
.nav.snug a .ic{width:17px;height:17px}
.nav.tight a span{display:none}
.nav.tight a{padding:0 11px}
.nav.tight a::after{left:8px;right:8px}

/* The native select behind a custom dropdown is meant to be invisible and one
   pixel wide. `select.nsel-real` is less specific than `.input.slim`, which
   the markup also carries, so the browser used .input's width and sized the
   element to its longest option — and once a group's label grew to "Stage 1
   evening — stage 4, Mon / Wed / Fri 18:00, room 3 · Jasur T. Tursunov ·
   Novza" that was 611px inside a 390px phone, and the page scrolled sideways.
   Specificity, not a new idea. */
select.input.nsel-real{position:absolute;width:1px;height:1px;min-width:0;max-width:1px;
  opacity:0;pointer-events:none;clip-path:inset(50%);overflow:hidden;padding:0;border:0}

/* ─── the standing, on a student's page ───────────────────────────────────
   First thing under the name, because it is the first thing a teacher opens
   a student to find out. */
.stu-gpa{display:flex;flex-direction:column;gap:12px}
.stu-gpa.is-off{opacity:.75}
.stu-gls{display:flex;flex-direction:column;gap:5px;max-height:340px;overflow:auto;
  border:1px solid var(--line);border-radius:var(--r);padding:5px;background:var(--soft)}
.stu-gl{display:flex;align-items:center;gap:10px;width:100%;padding:9px 10px;border-radius:10px;
  background:var(--card);text-align:left;border:1px solid transparent}
.stu-gl:hover{border-color:var(--blue2)}
.stu-gl .grow{min-width:0}
.stu-gl b{display:block;font-weight:700;font-size:14.5px;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}
/* the line under the lesson's name — not the stage kicker inside the badge,
   which this rule used to reach as well and repaint grey-on-red at 1.08:1,
   leaving "S1" unreadable on every one of these chips */
.stu-gl .grow small{display:block;color:var(--mute);font-size:12px}
.stu-gl.prov{border-style:dashed;border-color:var(--yellow2)}
/* a grade that is not settled yet is drawn as an outline, not a solid block */
.gchip.prov{background:transparent;border-style:dashed;border-width:1.5px}
.gchip.prov b{opacity:.85}
/* the part table: what they did, and a way into it */
.pt-see{display:inline-flex;align-items:center;gap:5px;color:var(--blue3);font-weight:700;font-size:12.5px;white-space:nowrap}
.pt-see .ic{width:14px;height:14px}
@media (max-width:620px){.pt-see span,.pt-see{font-size:0;gap:0} .pt-see .ic{font-size:0}}
.pl-go{text-decoration:none;display:inline-flex;align-items:center;gap:5px}
.pl-go .ic{width:14px;height:14px}
/* a grade that is not settled is an outline, not a block */
.gtable .gcell.prov{background:transparent;border:1.5px dashed var(--line2);color:var(--mute)}
.gtable .gcell.has.prov.hi{border-color:#A9D9C4;color:var(--green3)}
.gtable .gcell.has.prov.md{border-color:#F1DC96;color:var(--yellow-ink)}
.gtable .gcell.has.prov.lo{border-color:#F0BFC6;color:var(--red2)}
.g-open{display:block;margin-top:3px;font-size:11px;color:var(--mute);font-weight:700}
.g-key{display:flex;align-items:center;gap:6px;margin-top:6px}
.gcell.mini{display:inline-grid;place-items:center;min-width:26px;padding:3px 5px;font-size:11.5px}
/* a letter the work earned, where the lesson has no letter of its own: the
   same colour, marked underneath so the two are never mistaken for each other */
.gtable .gcell.has.fromwork{text-decoration:underline dotted currentColor 1.5px;text-underline-offset:3px}
/* a teacher's contacts, in the open rather than behind a Call button */
.ht-phone{margin:5px 0 0;font-size:14px}
.ht-facts{display:grid;grid-template-columns:repeat(auto-fit,minmax(170px,1fr));gap:12px}
.ht-facts .fact{display:flex;flex-direction:column;gap:3px;min-width:0}
.ht-facts .fl{display:flex;align-items:center;gap:6px;font-size:12px;font-weight:700;color:var(--mute)}
.ht-facts .fl .ic{width:14px;height:14px}
.ht-facts b{font-size:15.5px;font-weight:700;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}
.ht-facts .fact:first-child{flex-direction:row;align-items:center;gap:8px;flex-wrap:wrap}
.li.staff{padding:0}
.staff-main{display:flex;align-items:center;gap:12px;flex:1;min-width:0;padding:11px 4px 11px 14px;
  text-decoration:none;color:inherit;border-radius:var(--r-s)}
@media (hover:hover){.staff-main:hover{background:var(--soft)}}
.staff-main .grow{min-width:0}

/* ─── choosing a group instead of reading every group ─────────────────────
   A dropdown of a hundred names is a list you have to read all of. */
.mv{gap:12px}
.mv-row{display:flex;align-items:center;gap:10px;min-width:0}
.mv-l{flex:none;width:58px;font-size:12px;font-weight:800;color:var(--mute);text-transform:uppercase;letter-spacing:.06em}
.mv-chips{flex:1;min-width:0;overflow-x:auto;scrollbar-width:none;flex-wrap:nowrap;gap:6px;padding-bottom:2px}
.mv-chips::-webkit-scrollbar{display:none}
.mv-chips .chip{flex:none}
.mv-list{max-height:46vh;overflow:auto;gap:4px}
.mv-g{display:flex;align-items:center;gap:11px;width:100%;text-align:left;padding:9px 10px;border-radius:10px;
  background:var(--card);border:1.5px solid transparent;min-width:0}
.mv-g:hover{border-color:var(--blue2)}
.mv-g.on{border-color:var(--blue3);background:var(--blue-t)}
.mv-g.on .ic{color:var(--blue3)}
.mv-g .grow{min-width:0}
.mv-g .t{font-weight:700;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}
.mv-g .s{font-size:12.5px;color:var(--mute);overflow:hidden;text-overflow:ellipsis;white-space:nowrap}
.mv-g.here{opacity:.6}
.mv-now{font-style:normal;font-size:11px;font-weight:800;color:var(--mute)}

/* ─── a grade arriving in a chat ──────────────────────────────────────────
   An A celebrates. A B is a nod. A D or an F lands heavy and still — dark,
   slow and weighty, so it reads as "this is serious" and never as the app
   laughing at somebody. Nothing flashes, and under reduced motion none of it
   moves at all: the colour and the weight carry it instead. */
.gradepop{position:relative;overflow:hidden}
.gradepop .gp-l{display:inline-flex;align-items:baseline;gap:8px;padding:7px 14px;border-radius:30px;font-weight:800}
.gradepop .gp-l b{font-size:21px;line-height:1}
.gradepop .gp-l em{font-style:normal;font-size:12px;font-weight:700;opacity:.8}
.gradepop.top .gp-l{background:var(--green-t);color:var(--green3)}
.gradepop.good .gp-l{background:var(--green-t);color:var(--green3)}
.gradepop.mid .gp-l{background:var(--yellow-t);color:var(--yellow-ink)}
.gradepop.low .gp-l{background:var(--red-t);color:var(--red2)}
.gradepop.bad .gp-l{background:var(--red);color:#fff}
/* the top grade: a rise and a settle, and a few sparks that fall away */
.gradepop.top .gp-l{animation:gpRise .62s var(--spring) both}
.gradepop.good .gp-l{animation:gpRise .5s var(--spring) both}
@keyframes gpRise{0%{transform:translateY(10px) scale(.86);opacity:0}60%{transform:translateY(0) scale(1.06);opacity:1}100%{transform:none;opacity:1}}
.gp-spark{position:absolute;width:6px;height:6px;border-radius:2px;background:var(--green);opacity:0;
  animation:gpSpark 1.05s var(--ease) both}
@keyframes gpSpark{0%{opacity:0;transform:translate(0,0) scale(.4) rotate(0)}
  25%{opacity:1}100%{opacity:0;transform:translate(var(--dx),var(--dy)) scale(1) rotate(180deg)}}
/* the middle: a single quiet nod, no more */
.gradepop.mid .gp-l{animation:gpNod .5s var(--ease) both}
@keyframes gpNod{0%{transform:translateY(-5px);opacity:0}70%{transform:translateY(1px);opacity:1}100%{transform:none}}
/* the bottom: it arrives slowly, settles with weight, and stays still */
.gradepop.low .gp-l,.gradepop.bad .gp-l{animation:gpFall .85s cubic-bezier(.3,.9,.3,1) both}
@keyframes gpFall{0%{transform:translateY(-14px) scale(1.02);opacity:0}
  55%{transform:translateY(2px);opacity:1}75%{transform:translateY(0)}100%{transform:none}}
.gradepop.bad::after{content:"";position:absolute;inset:0;border-radius:inherit;pointer-events:none;
  box-shadow:inset 0 0 0 0 rgba(210,16,48,.45);animation:gpWeight 1.1s var(--ease) both}
@keyframes gpWeight{0%{box-shadow:inset 0 0 0 0 rgba(210,16,48,.45)}
  40%{box-shadow:inset 0 0 0 3px rgba(210,16,48,.45)}100%{box-shadow:inset 0 0 0 0 rgba(210,16,48,0)}}
@media (prefers-reduced-motion:reduce){
  .gradepop .gp-l,.gradepop.bad::after{animation:none}
  .gp-spark{display:none}}

/* ═══════════ Room to read ═════════════════════════════════════════════════
   A two-line row — a name over a phone number, a task over its deadline —
   was set at 1.25 and 1.3. That is heading spacing applied to sentences, and
   at 13px it closes the lines until the row reads as one grey block. The
   measurement across 132 page views found three classes doing it, and they
   are the three that carry nearly every sentence in the app.

   Sentences get sentence spacing. Headings keep theirs: a heading is one line
   and opening it up only pushes the thing it introduces away. */
.li .t{line-height:1.38}
.li .s,.banner .s{line-height:1.45}
.li .exm{line-height:1.5}
h2{line-height:1.28}
h3{line-height:1.34}

/* and a little more air around and between the blocks themselves */
.card.pad{padding:20px}
.stack{gap:14px}
.li{padding:13px 15px}
.sec-head{margin:30px 0 14px}

/* ═══════════ The top bar at a narrow window ═══════════════════════════════
   Measured at 320 and 360: the bar carried 345px of fixed content — a brand
   with a role badge on one side, four round buttons on the other — inside a
   320px window, so every page under a head teacher, a support teacher or the
   office scrolled sideways and the last button sat off the edge. That is the
   "symbols and interface get mixed up when I minimise" of the earlier
   report: the tabs were taught to fit, the two ends of the bar were not.

   Under 420px the badge goes. The role is already written across the whole
   screen — which tabs exist, what the pages say — and a word that costs 71px
   there is not earning it. The buttons close up rather than shrink: a
   smaller target is the thing being fixed everywhere else in this file. */
@media (max-width:419px){
  .topbar{gap:8px;padding-left:max(12px,env(safe-area-inset-left));padding-right:max(12px,env(safe-area-inset-right))}
  .role-tag{display:none}
  .brand{font-size:16px;gap:8px}
  .top-r{gap:0}
}
/* and below 360 the brand wordmark goes too, leaving the logo */
@media (max-width:359px){
  .brand .bw{display:none}
}

/* ═══════════ The last two that would not fit 320 ═════════════════════════
   The board row and the group card each held about 336px of fixed content,
   so the three staff pages still scrolled sideways on the narrowest phone.
   Both are fixed the same way: the columns stop being measured in ems of a
   type size that does not shrink any further, and take the width that is
   actually there. */
@media (max-width:379px){
  /* 5.6em + 2.4em + 8.8em at 17px is 286px before the gaps — more than the
     page has once the card is padded. The lesson column gives way first; it
     is the one that can be read from the row beside it. */
  .brow{grid-template-columns:minmax(0,5.2em) minmax(0,2.2em) minmax(0,1fr);gap:8px;font-size:16px}
  .brow .flap,.brow.head{font-size:16px}
  .brow>*{min-width:0}
  /* and the group card's own row stops forcing a width its card has not got */
  .gcard,.gcard-top{min-width:0}
  .gcard-top > span.grow{min-width:0}
  .gcard-top .plate,.gcard-wait{min-width:0;white-space:normal}
}

/* A column that cannot be narrower than 320px inside a window that is 320px
   wide pushes the whole page sideways: the card keeps its floor and the page
   grows to fit it. min(320px,100%) keeps the floor wherever there is room
   for it and drops it on the one phone where there is not. */

/* ═══════════ A group card you can read across a desk ══════════════════════
   The time was three grey words sharing a chip with the days, on a card
   whose loudest thing was a red button. "When is this group" is the question
   a list of groups exists to answer, so the time now stands on its own at
   the end of the row and nothing else on the card is that size. */
/* It sits on its own line under the name rather than beside it: put in the
   title's row it took the width the group's name needed, and a card headed
   "Stag..." is worse than a quiet clock. */
.gc-clock{display:flex;align-items:baseline;gap:8px;margin:3px 0 1px;line-height:1.1}
.gc-clock b{font-size:clamp(20px,2.4vw,25px);font-weight:800;letter-spacing:-.01em;
  font-variant-numeric:tabular-nums;color:var(--ink)}
.gc-clock span{font-size:12.5px;font-weight:700;color:var(--mute);white-space:nowrap}
/* On the day it actually runs, it reads in the brand's own colour — but
   --red on a dark card is 2.95:1, just under the floor for text this size.
   --red2 is the lighter red in dark and the deeper one in light, so it
   clears in both. */
.gc-clock.today b,.gc-clock.today span{color:var(--red2)}
.gc-clock.today span{opacity:.88}
@media (max-width:379px){
  .gc-clock b{font-size:19px}
  .gc-clock span{font-size:11.5px}
}
/* whole teacher names wrap rather than being cut to a title */
.gc-f.who{white-space:normal}
.grp-chips .chip{white-space:normal;text-align:left}

/* ═══════════ A chosen filter you cannot miss ══════════════════════════════
   Filled blue was already the rule, and on a dark board at arm's length it
   still read as "slightly different grey". A chosen chip now carries a ring
   that the unchosen ones have nothing like, and sits a shade brighter in
   dark mode where the fill had the least to work with. */
/* The ring I added here sat OUTSIDE the chip, and a row of chips scrolls
   sideways — so the container clipped it, leaving an outline that was there
   on the right and bottom and gone on the left and top. An outline that
   exists on two sides is worse than none.

   The ring is inside the chip now: even on all four sides, following the
   chip's own radius, with nothing to clip. The fill already says which one
   is chosen; the ring only has to be clean. */
.chip.on,.chip[aria-pressed="true"]{box-shadow:inset 0 0 0 1.5px rgba(0,0,0,.18);font-weight:800}
:root[data-theme="dark"] .chip.on,:root[data-theme="dark"] .chip[aria-pressed="true"]{
  background:var(--blue-hov);box-shadow:inset 0 0 0 1.5px rgba(0,0,0,.22)}
@media (prefers-color-scheme:dark){
  :root:not([data-theme="light"]) .chip.on,:root:not([data-theme="light"]) .chip[aria-pressed="true"]{
    background:var(--blue-hov);box-shadow:inset 0 0 0 1.5px rgba(0,0,0,.22)}
}

/* ═══════════ One area ends before the next begins ═════════════════════════
   Section after section ran together down the page with nothing between
   them but a heading, so "Other days" and "Your tasks" read as one long
   column of cards. A heading that opens a new area now carries a hairline
   above it and more room around it, which is enough: a line costs nothing
   and does the whole job. */
/* The room above the line is PADDING, not margin. Several of these headings
   are mounted inside a wrapper of their own — "Your tasks", "The words
   board" — and a top margin there collapses away to nothing, so the line
   was drawn hard against the bottom of the cards above it while the same
   heading elsewhere on the page had 34px. Measured: 0px in two places, 34
   in three, 6 in another. Padding cannot collapse, so every divider now has
   the same air above it wherever it is mounted.

   And more above the line than below it: the line belongs to the heading
   under it, not to the cards over it. */
.sec-head{position:relative;margin-top:0;padding-top:56px}
.sec-head::before{content:"";position:absolute;left:0;right:0;top:36px;height:1px;background:var(--line)}
/* the first heading on a page opens nothing, so it gets neither */
.page>.sec-head:first-of-type,.page>h1+.sec-head,.sec-head.bare{margin-top:22px;padding-top:0}
.page>.sec-head:first-of-type::before,.page>h1+.sec-head::before{top:0}
.page>.sec-head:first-of-type::before,.page>h1+.sec-head::before,.sec-head.bare::before{display:none}
/* the Ask for help button, now that it sits under the list rather than
   floating off the heading */
.task-foot{margin-top:10px;justify-content:flex-end}

/* the notice a head teacher gets when their account has no branch */
.branch-gap{padding-top:14px;padding-bottom:0}
.branch-gap .notice{margin:0}

/* what the group will read, shown before it is sent */
.hw-prev{display:flex;flex-direction:column;gap:5px;padding:12px 14px;background:var(--soft);border-color:var(--line)}
.hw-prev-l{display:flex;align-items:center;gap:6px;font-size:11.5px;font-weight:800;letter-spacing:.07em;text-transform:uppercase;color:var(--mute)}
.hw-prev-b{font-size:14px;font-weight:600;line-height:1.45;color:var(--ink)}
.hw-prev-b.mute{font-weight:500;color:var(--mute)}

/* ───────── THE GROUPS TAB (group.js)

   Rebuilt around the two questions a teacher actually arrives with: which of
   these are mine, and what am I teaching this week. Your own groups are the
   default and the scope switch is the first thing under the title; the week
   is drawn as a week, because "when" is a shape and a list of cards cannot
   make that shape; and the counts a teacher used to open a group to find —
   how many students, how many coming, who assists — are on the face of it. */
.page-groups .lead{margin-bottom:12px}
.gq-scope{margin:2px 0 10px}
.gq-scope button{gap:7px}
.gq-scope em{font-style:normal;font-weight:900;font-size:11.5px;padding:1px 6px;border-radius:99px;
  background:var(--soft2);color:var(--ink2)}
.gq-scope button[aria-pressed="true"] em{background:rgba(255,255,255,.22);color:#fff}

/* the filters, labelled so a row of chips says what it is narrowing */
.gf-row{display:flex;align-items:center;gap:10px;min-width:0}
.gf-l{flex:none;width:58px;font-size:11px;font-weight:800;letter-spacing:.06em;text-transform:uppercase;color:var(--mute)}
.gf-row .chips{flex:1;min-width:0}
@media (max-width:560px){
  .gf-row{display:block}
  .gf-l{display:block;width:auto;margin:0 0 3px}
}

/* ── the week ── */
.wk{margin:4px 0 20px}
.wk-head{display:flex;align-items:baseline;gap:10px;flex-wrap:wrap;margin-bottom:8px}
.wk-head h2{font-size:18px;margin:0}
.wk-wrap{overflow-x:auto;-webkit-overflow-scrolling:touch;border:1px solid var(--line);border-radius:var(--r);background:var(--card)}
.wk-grid{display:grid;grid-template-columns:62px repeat(var(--cols),minmax(150px,1fr));min-width:100%}
.wk-c{border-right:1px solid var(--line);border-bottom:1px solid var(--line);padding:6px}
.wk-grid > .wk-c:nth-child(-n+calc(var(--cols) + 1)){position:sticky;top:0;z-index:2;background:var(--soft)}
.wk-day{font-size:12px;font-weight:800;letter-spacing:.05em;text-transform:uppercase;color:var(--mute);
  text-align:center;padding:9px 6px}
.wk-day.today{color:var(--red2)}
.wk-day em{display:block;font-style:normal;font-size:9.5px;font-weight:800;letter-spacing:.08em;color:var(--red2)}
.wk-corner{background:var(--soft)}
.wk-t{display:flex;align-items:flex-start;justify-content:flex-end;padding:9px 8px 6px;background:var(--soft);
  position:sticky;left:0;z-index:1}
.wk-t b{font-size:13.5px;font-weight:900;font-variant-numeric:tabular-nums;color:var(--ink2)}
.wk-cell{display:flex;flex-direction:column;gap:5px;min-height:56px}
/* today is marked at the head of its column; tinting every square of it as
   well read as a day blocked out rather than a day you are on */
.wk-cell.today{background:var(--soft)}
.wk-grid > .wk-c:last-child,.wk-grid > .wk-day:last-child{border-right:0}
/* a class in the square where its time and its day meet */
.wk-b{display:block;padding:7px 9px;border-radius:9px;background:var(--soft2);color:inherit;text-decoration:none;
  border-left:3px solid var(--line2);line-height:1.25;transition:transform .12s var(--ease)}
.wk-b b{display:block;font-size:12.5px;font-weight:800;white-space:nowrap;overflow:hidden;text-overflow:ellipsis}
.wk-b .wk-f{display:block;font-size:11px;color:var(--mute);white-space:nowrap;overflow:hidden;text-overflow:ellipsis}
.wk-b .wk-f.who{color:var(--blue2);font-weight:700}
.wk-b .wk-w{display:inline-block;margin-top:3px;font-style:normal;font-size:10px;font-weight:800;
  letter-spacing:.04em;text-transform:uppercase;color:var(--red2)}
.wk-b.mine{background:var(--blue-t);border-left-color:var(--blue2)}
@media (hover:hover){.wk-b:hover{transform:translateY(-1px);box-shadow:var(--shadow)}}
.wk-b:active{transform:scale(.98)}
/* on a phone the grid scrolls sideways, so the columns are narrow enough for
   three days to be on screen at once and the times stay pinned to the left */
@media (max-width:640px){
  .wk-grid{grid-template-columns:50px repeat(var(--cols),minmax(124px,1fr))}
  .wk-t{padding:8px 6px 6px} .wk-t b{font-size:12px}
  .wk-b{padding:6px 8px}
}

/* ── what a card says without being opened ── */
/* flex:none, or the card's column layout hands this band the leftover height
   and a wrapped flex box spreads its rows to fill it — the counts drifted to
   opposite ends of a tall empty box. align-content keeps the rows together
   whatever height it is given. */
/* The band used to run edge to edge while the box under it was inset by
   14px, so its rounded corners were cut off by the card and the two sat
   flush — and hovering the head of the card painted it the band's own
   colour, which made the three of them read as one grey block. It is inset
   like the rest now, with a gap under it. */
.gcard-band{display:flex;align-items:center;align-content:flex-start;gap:16px;flex-wrap:wrap;flex:none;
  margin:0 14px 8px;padding:10px 12px;border-radius:11px;background:var(--soft)}
.gb-n{display:flex;align-items:baseline;gap:5px}
.gb-n b{font-size:19px;font-weight:900;letter-spacing:-.02em;font-variant-numeric:tabular-nums}
/* not `.part`: that is the lesson's part container, 40dvh tall, and wearing
   it stretched this little number to 400px and pushed the rest of the band
   apart. The fourth time a bare English word has been both a component and a
   modifier — see the build's own warning for the others. */
.gb-n.gb-part b{color:var(--red2)}
.gb-n small{font-size:11.5px;font-weight:700;color:var(--mute)}
.gb-s{display:flex;align-items:center;gap:7px;margin-left:auto;min-width:0}
.gb-s > .ic{flex:none;color:var(--mute)}
.gb-s small{display:block;font-size:10px;font-weight:800;letter-spacing:.06em;text-transform:uppercase;color:var(--mute)}
.gb-s b{display:block;font-size:12.5px;font-weight:700;white-space:nowrap;overflow:hidden;text-overflow:ellipsis}

/* ───────── WHAT PEOPLE USE (usage.js) */
.page-usage .filters{gap:10px;flex-wrap:wrap;margin-bottom:14px}
.uz-top{margin-bottom:14px}
.uz-sec{margin-bottom:14px}
.uz-sec h2{font-size:17px;margin:0 0 10px}
.uz-list{display:flex;flex-direction:column}
.uz-row{display:flex;align-items:center;gap:12px;padding:7px 0;border-top:1px solid var(--line)}
.uz-row:first-child{border-top:0}
.uz-what{flex:0 0 clamp(120px,32%,260px);min-width:0;font-weight:700;font-size:14px;
  white-space:nowrap;overflow:hidden;text-overflow:ellipsis}
.uz-bar{flex:1;min-width:40px;height:9px;border-radius:99px;background:var(--soft2);overflow:hidden}
.uz-bar>i{display:block;height:100%;border-radius:99px;background:var(--blue2)}
.uz-n{flex:none;min-width:58px;text-align:right;font-weight:800;font-variant-numeric:tabular-nums}
/* the shape of a month, one bar a day */
.uz-days{display:flex;align-items:flex-end;gap:2px;height:84px;padding:4px 0}
.uz-d{flex:1;min-width:3px;display:flex;align-items:flex-end;height:100%}
.uz-d>i{display:block;width:100%;border-radius:2px;background:var(--green2)}
.uz-dates{margin-top:2px}
.uz-foot{display:flex;align-items:center;gap:7px;margin-top:4px}
.uz-foot .ic{flex:none;color:var(--mute)}
.uz-link{text-decoration:none;color:inherit}

/* ───────── TODAY, IN AMERICA (student.js)
   Four real stories on the home page. They are the one thing here nobody
   set, nobody marks and nobody has to do, so they are drawn as something to
   read rather than something to finish. */
.news{display:grid;gap:10px;grid-template-columns:repeat(auto-fill,minmax(min(270px,100%),1fr));margin-bottom:18px}
.nw{display:flex;flex-direction:column;gap:5px;padding:13px 15px;border-radius:var(--r);
  background:var(--card);border:1px solid var(--line);text-decoration:none;color:inherit;
  animation-delay:calc(min(var(--i),6)*40ms);transition:transform .14s var(--ease),box-shadow .14s var(--ease)}
.nw-top{display:flex;align-items:center;gap:7px}
.nw-k{font-style:normal;font-size:10px;font-weight:900;letter-spacing:.08em;text-transform:uppercase;
  color:var(--blue2);background:var(--blue-t);border-radius:5px;padding:2px 7px}
.nw-new{font-style:normal;font-size:10px;font-weight:900;letter-spacing:.08em;text-transform:uppercase;
  color:var(--red2);background:var(--red-t);border-radius:5px;padding:2px 7px}
.nw-src{font-size:11px;font-weight:800;color:var(--mute)}
.nw b{font-size:15.5px;font-weight:800;line-height:1.3}
.nw-s{font-size:13.5px;line-height:1.45;color:var(--ink2)}
.nw-go{display:inline-flex;align-items:center;gap:4px;margin-top:2px;font-size:12.5px;font-weight:800;color:var(--blue2)}
@media (hover:hover){.nw:hover{transform:translateY(-2px);box-shadow:var(--shadow);border-color:var(--line2)}}
.nw:active{transform:scale(.99)}

/* ───────── A SECOND COURSE (group.js, admin.js, student.js)
   Logistics Speaking is taught to companies, so a group carries a company
   and a code of its own, and its students see whose course it is. */

/* the code a group hands out */
.grp-code{margin-bottom:14px;display:flex;flex-direction:column;gap:10px}
.gcode-i{flex:none;width:40px;height:40px;border-radius:11px;display:grid;place-items:center;
  background:var(--blue-t);color:var(--blue2)}
.gcode{flex:none;border:0;background:var(--soft);border-radius:10px;padding:8px 14px;cursor:pointer;
  font-size:21px;font-weight:900;letter-spacing:.16em;font-variant-numeric:tabular-nums;color:var(--ink)}
@media (hover:hover){.gcode:hover{background:var(--soft2)}}
.gcode:active{transform:scale(.98)}
.gcode-act{gap:8px}

/* the company on the group form */
.co-logo{display:flex;align-items:center;gap:10px;flex-wrap:wrap}
.co-prev{display:grid;place-items:center;min-width:92px;height:56px;padding:6px 10px;border-radius:10px;
  background:var(--soft);border:1px dashed var(--line2)}
.co-prev img{max-width:120px;max-height:44px;object-fit:contain}
.seg.wide-seg{display:flex;width:100%}
.seg.wide-seg button{flex:1;justify-content:center;gap:7px}

/* and the company on their students' own home page */
.co-band{display:flex;align-items:center;gap:13px;padding:11px 15px;margin-bottom:14px;
  border-radius:var(--r);background:var(--card);border:1px solid var(--line)}
.co-logo-img{max-width:108px;max-height:38px;object-fit:contain;flex:none}
.co-band b{display:block;font-size:15px;font-weight:800;line-height:1.2}
.co-band small{display:block;font-size:12px;color:var(--mute);font-weight:700}
.co-band > .ic{flex:none;color:var(--line2)}

/* the door between a student's groups, on their profile */
.portal{padding:14px;display:flex;flex-direction:column;gap:10px}
.po-h{display:flex;flex-direction:column;gap:2px}
.po-h b{font-size:15px;font-weight:800}
.po-h small{font-size:12.5px;color:var(--mute);line-height:1.4}
.po-g{display:flex;align-items:center;gap:11px;width:100%;padding:10px 12px;border:0;border-radius:11px;
  background:var(--soft);color:inherit;text-align:left;cursor:pointer;font:inherit;transition:background .15s var(--ease)}
.po-g > span.grow{min-width:0;display:flex;flex-direction:column;gap:1px}
.po-g b{font-size:14.5px;font-weight:800;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}
.po-g small{font-size:12px;color:var(--mute);overflow:hidden;text-overflow:ellipsis;white-space:nowrap}
.po-g.on{background:transparent;box-shadow:inset 0 0 0 1px var(--line);cursor:default}
.po-go{display:flex;align-items:center;gap:5px;flex:none;font-size:12.5px;font-weight:800;color:var(--blue2)}
@media (hover:hover){.po-g:not(.on):hover{background:var(--line)}}

/* every group a student comes to, on their page */
.stu-groups{display:flex;flex-wrap:wrap;gap:8px;margin-top:8px}
.sg{display:flex;align-items:center;gap:9px;min-width:0;max-width:100%;padding:7px 11px;border-radius:11px;background:var(--soft)}
.sg > span.grow{min-width:0;display:flex;flex-direction:column;gap:0}
.sg b{font-size:13.5px;font-weight:800;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}
.sg small{font-size:11.5px;color:var(--mute);overflow:hidden;text-overflow:ellipsis;white-space:nowrap}
.sg-m{flex:none;font-size:10.5px;font-weight:800;letter-spacing:.06em;text-transform:uppercase;color:var(--mute);font-style:normal}
.sg-x{flex:none;display:inline-flex;align-items:center;padding:2px;border:0;border-radius:6px;background:none;color:var(--mute);cursor:pointer}
@media (hover:hover){.sg-x:hover{color:var(--red2)}}

/* a language is chosen from a list, not from a row of buttons that runs out
   of room as soon as there is more than three of them */
/* The language dropdown, sized against the row it sits in.

   Two things were wrong here. It was sized against the WINDOW — max-width:52vw
   — which on a laptop is half the screen and far more than the row has. And
   the rule was on the <select>, which this app hides at one pixel and replaces
   with a button of its own; the real control is that button, and it carries
   width:100%, so it took the whole row. The label beside it was squeezed to
   one word per line — "Interface / language" — with the sentence under it
   broken up a word at a time.

   The button is the select's next sibling, which is where ui.js puts it, so
   that is what is sized. */
.sel-lang + .nsel{flex:0 1 auto;width:auto;min-width:9.5em;max-width:min(260px,46%)}
.set-row:has(.sel-lang)>div:first-child{min-width:11em}
@media (max-width:560px){.set-row:has(.sel-lang){flex-direction:column;align-items:stretch;gap:8px}
  .sel-lang + .nsel{max-width:none;width:100%}
  .set-row:has(.sel-lang)>div:first-child{min-width:0}}

/* the vocabulary test, as the person marking it reads it */
.wq-rev .wq-n{display:flex;gap:18px;flex-wrap:wrap;margin:10px 0 12px}
.wq-rev .wq-n > span{display:flex;flex-direction:column;gap:1px}
.wq-rev .wq-n b{font-size:20px;font-weight:900;letter-spacing:-.02em;font-variant-numeric:tabular-nums}
.wq-rev .wq-n small{font-size:11.5px;font-weight:700;color:var(--mute)}

/* ───────── handing practice in
   Checking marks an exercise; this is the one thing that sends it. It sits at
   the foot of the tab so it is the last thing read, after every exercise, and
   it says what is waiting rather than only offering a button. */
.pr-foot{display:flex;align-items:center;gap:12px;margin:4px 0 0;padding:14px;
  border:1px solid var(--line);border-radius:14px;background:var(--card)}
.pr-foot > .grow{display:flex;flex-direction:column;gap:2px;min-width:0}
.pr-foot b{font-size:15px}
.pr-foot small{line-height:1.35}
.pr-foot .btn{flex:none}
.pr-foot.in{border-color:var(--okline,var(--line));background:var(--soft)}
.pr-foot .exit-tab{flex:none;display:grid;place-items:center;width:34px;height:34px;
  border-radius:10px;background:var(--ok,var(--blue2));color:#fff}
.ex-wait{display:flex;align-items:center;gap:5px;margin-top:3px;
  font-style:normal;font-size:12.5px;color:var(--mute)}
.ex-wait svg{flex:none}
@media (max-width:420px){
  .pr-foot{flex-wrap:wrap}
  .pr-foot .btn{width:100%}
}

/* ───────── the student's grades */
.gr-top{margin-bottom:12px}
.gr-les{margin-bottom:10px;overflow:hidden}
.gr-lhead{display:flex;align-items:center;gap:10px;padding:12px 14px;border-bottom:1px solid var(--line)}
.gr-lhead > .grow{display:flex;flex-direction:column;gap:1px;min-width:0}
.gr-lhead b{font-size:16px;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}
.gr-list{display:flex;flex-direction:column}
.gr-row{display:flex;align-items:flex-start;gap:11px;padding:11px 14px}
.gr-row + .gr-row{border-top:1px solid var(--line)}
.gr-row > .grow{display:flex;flex-direction:column;gap:2px;min-width:0}
.gr-row .gchip{flex:none;margin-top:1px}
.gr-why{margin:5px 0 0;font-size:13px;line-height:1.45;color:var(--mute)}
.gr-how{margin-top:14px}
.gr-how .b{margin-bottom:4px}
.gr-how p{margin:0 0 6px}
.gr-how p:last-child{margin-bottom:0}

/* ───────── choosing a lesson to teach
   A finished topic is greyed out and still perfectly selectable: going back
   over a hard point is deliberate, not a mistake to be guarded against. */
.st-list{display:flex;flex-direction:column;border:1px solid var(--line);border-radius:14px;overflow:hidden}
.st-l{display:flex;align-items:center;gap:11px;width:100%;padding:11px 13px;text-align:left;
  background:var(--card);border:0;border-radius:0;color:var(--fg);cursor:pointer;font:inherit}
.st-l + .st-l{border-top:1px solid var(--line)}
.st-l > .grow{display:flex;flex-direction:column;gap:1px;min-width:0}
.st-l b{font-size:14.5px;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}
.st-l small{font-size:12px;color:var(--mute)}
.st-l .exit{flex:none}
.st-l.done{color:var(--mute)}
.st-l.done b{font-weight:600}
.st-l.done .exit{opacity:.55}
.st-l.on{background:var(--soft)}
.st-l.on b{color:var(--fg)}
.st-tick,.st-on{flex:none;display:grid;place-items:center;color:var(--mute)}
.st-on{color:var(--blue2)}
@media (hover:hover){.st-l:hover{background:var(--soft)}}
.st-more{margin-top:2px}
.st-more summary{padding:8px 2px;font-size:13.5px;font-weight:700;color:var(--mute);cursor:pointer}
.st-more .st-list{margin-top:6px;max-height:46vh;overflow:auto}
.te-done{align-items:flex-start;gap:10px}
.te-done span{display:flex;flex-direction:column;gap:2px}
.te-done small{line-height:1.4}
.gl-done{padding:9px 0 2px;border-top:1px solid var(--line);margin-top:8px}
.gl-done .t{font-size:13.5px;font-weight:700}
.gl-done .s{font-size:12px;color:var(--mute)}

/* ─────────────────────────────────────────────────────────────────────────
   Ranks and coins — the design from the preview, built for real.

   This is the first part of the platform in the new voice, and it is meant to
   be looked at as a sample of it: navy and red on warm paper, headings in a
   heavy condensed face, small labels in a mono with wide letter-spacing, cards
   with a soft deep shadow rather than a hairline box, and figures set large
   enough to be the point of the card.

   Two things are the platform's rather than the preview's, deliberately. It
   works in the dark theme, because students use the app at night and a page
   that stays white would be the only one that does. And it keeps the app's own
   spacing scale, so the page sits inside the platform instead of looking like
   a window onto a different product.
   ───────────────────────────────────────────────────────────────────────── */
.page-rank{
  --nv:#01004C; --nv2:#0D0D55; --nv3:#1B1A6E;
  --rd:#B22234; --rd2:#D43A4C; --bl:#2742D6;
  --gold:#8A6200; --silver:#6E7486;
  --pp:#F5F3EC; --pp2:#ECE8DC; --ln:#DDD9CB;
  --disp:'Big Shoulders Display','Overpass',system-ui,sans-serif;
  --mono:'JetBrains Mono',ui-monospace,monospace;
  /* #6B6A86 cleared 4.5:1 on the lighter paper and came in at 4.32:1 on the
     darker one — which is where most of it actually sits: the place numbers,
     the experience figures, "of 109". Darkened until it clears on the darkest
     of the three backgrounds it is used on (4.66:1 on --pp2). */
  --rk-card:#fff; --rk-ink:var(--nv); --rk-mute:#65647E;
  --rk-sh:0 1px 0 rgba(1,0,76,.04),0 18px 40px -26px rgba(1,0,76,.35);
}
/* The dark half is written twice, exactly as base.css writes every other
   theme override: once for somebody who chose dark, and once inside a
   prefers-color-scheme query for somebody who never touched the switch. The
   second half MUST stay inside that query — `:root:not([data-theme="light"])`
   on its own matches everybody with no preference saved, which is most people,
   and it turned the light page's cards black. */
:root[data-theme="dark"] .page-rank{
  --nv:#C9CCF5; --nv2:#A8ADE8; --nv3:#8E95DC;
  --rd:#FF6B7C; --rd2:#FF8491; --bl:#8FA2FF;
  --gold:#E3B341; --silver:#AEB3C0;
  --pp:#12131C; --pp2:#1A1B26; --ln:#2A2C3A;
  --rk-card:#171B24; --rk-ink:#E8EAF6; --rk-mute:#9AA0BD;
  --rk-sh:0 1px 0 rgba(0,0,0,.3),0 18px 40px -26px rgba(0,0,0,.9);
}
@media (prefers-color-scheme:dark){
:root:not([data-theme="light"]) .page-rank{
  --nv:#C9CCF5; --nv2:#A8ADE8; --nv3:#8E95DC;
  --rd:#FF6B7C; --rd2:#FF8491; --bl:#8FA2FF;
  --gold:#E3B341; --silver:#AEB3C0;
  --pp:#12131C; --pp2:#1A1B26; --ln:#2A2C3A;
  --rk-card:#171B24; --rk-ink:#E8EAF6; --rk-mute:#9AA0BD;
  --rk-sh:0 1px 0 rgba(0,0,0,.3),0 18px 40px -26px rgba(0,0,0,.9);
}
}
/* the faint drafting grid the design sits on */
.page-rank{position:relative}
.page-rank::before{content:"";position:absolute;inset:-22px 0 0;pointer-events:none;z-index:-1;
  background-image:linear-gradient(var(--grid,rgba(1,0,76,.045)) 1px,transparent 1px),
    linear-gradient(90deg,var(--grid,rgba(1,0,76,.045)) 1px,transparent 1px);
  background-size:26px 26px;
  -webkit-mask-image:linear-gradient(#000,transparent 420px);mask-image:linear-gradient(#000,transparent 420px)}
:root[data-theme="dark"] .page-rank{--grid:rgba(201,204,245,.05)}
@media (prefers-color-scheme:dark){:root:not([data-theme="light"]) .page-rank{--grid:rgba(201,204,245,.05)}}

/* ── the voice ──────────────────────────────────────────────────────────── */
.cn-head{margin:4px 0 18px}
.cn-kick{display:block;font-family:var(--mono);font-size:11.5px;font-weight:700;
  letter-spacing:.17em;text-transform:uppercase;color:var(--rk-ink);opacity:.8}
.cn-h1{font-family:var(--disp);font-weight:900;font-size:clamp(34px,8vw,52px);
  line-height:.92;letter-spacing:.01em;text-transform:uppercase;color:var(--rk-ink);margin:6px 0 0}
.cn-h1 em{font-style:normal;color:var(--rd)}
.cn-mono{font-family:var(--mono);font-size:12px;font-weight:700;color:var(--bl)}
.page-rank .card{background:var(--rk-card);border:1px solid var(--ln);border-radius:18px;
  box-shadow:var(--rk-sh);color:var(--rk-ink)}
.page-rank .mute,.page-rank .mute.small,.page-rank .desc{color:var(--rk-mute)}
.page-rank .seg{margin-bottom:14px}

/* ── the insignia ───────────────────────────────────────────────────────── */
.cn-badge{flex:none;display:flex;flex-direction:column;align-items:center;justify-content:center;gap:2px;
  width:62px;height:62px;border-radius:15px;background:var(--nv);color:#fff}
.cn-badge .cn-b-art{display:block;width:30px;height:30px}
.cn-badge svg{width:100%;height:100%;display:block}
.cn-badge b{font-family:var(--mono);font-size:9.5px;font-weight:700;letter-spacing:.1em;line-height:1}
.cn-badge.lg{width:84px;height:84px;border-radius:19px;gap:3px}
.cn-badge.lg .cn-b-art{width:42px;height:42px}
.cn-badge.lg b{font-size:11px}
.cn-of .cn-badge,.cn-badge.cn-of{background:var(--bl)}
.cn-hf .cn-badge,.cn-badge.cn-hf{background:var(--gold)}
:root[data-theme="dark"] .cn-badge{color:#0E1016}
@media (prefers-color-scheme:dark){:root:not([data-theme="light"]) .cn-badge{color:#0E1016}}
.rk.locked .cn-badge{background:var(--pp2);color:var(--rk-mute)}
.rk.locked .cn-badge svg{opacity:.4}

/* ── where you stand ────────────────────────────────────────────────────── */
.cn-top{position:relative;padding:18px 16px;margin-bottom:16px;overflow:hidden}
.cn-stripe{position:absolute;left:0;right:0;bottom:0;height:4px;
  background:linear-gradient(90deg,var(--nv) 0 34%,var(--rd) 34% 67%,var(--bl) 67% 100%)}
.cn-top-row{display:flex;align-items:center;gap:15px}
.cn-rank{font-family:var(--disp);font-weight:800;font-size:clamp(26px,6vw,34px);
  line-height:.95;text-transform:uppercase;color:var(--rk-ink);margin-top:2px}
.cn-have{display:flex;gap:22px;margin-top:11px;flex-wrap:wrap}
.cn-fig{display:flex;flex-direction:column;gap:0}
.cn-fig b{font-family:var(--disp);font-weight:800;font-size:30px;line-height:1;color:var(--rk-ink);
  font-variant-numeric:tabular-nums}
.cn-fig.coin b{color:var(--rd)}
.cn-fig small{font-family:var(--mono);font-size:9.5px;font-weight:700;letter-spacing:.14em;
  text-transform:uppercase;color:var(--rk-mute);margin-top:3px}
.cn-next{margin-top:15px;padding-top:14px;border-top:1px solid var(--ln)}
.cn-next .row{align-items:flex-end}
.cn-nn{display:block;font-family:var(--disp);font-weight:800;font-size:21px;line-height:1;
  text-transform:uppercase;color:var(--rk-ink);margin-top:3px}
.cn-bar{height:10px;margin:10px 0 11px;border-radius:99px;background:var(--pp2);overflow:hidden}
.cn-bar > i{display:block;height:100%;border-radius:99px;
  background:linear-gradient(90deg,var(--rd),#FF5A6E);transition:width 1s var(--ease)}
.cn-need{list-style:none;margin:0;padding:0;display:flex;flex-direction:column;gap:6px}
.cn-need li{display:flex;align-items:center;gap:7px;font-size:13px;color:var(--rk-mute)}
.cn-need li.got{color:var(--rk-ink)}
.cn-need li.got svg{color:var(--ok,#1F7A4D)}
:root[data-theme="dark"] .cn-need li.got svg{color:#4ED08A}
@media (prefers-color-scheme:dark){:root:not([data-theme="light"]) .cn-need li.got svg{color:#4ED08A}}

/* ── the ladder ─────────────────────────────────────────────────────────── */
.cn-tier{display:flex;align-items:center;gap:12px;margin:22px 0 10px;grid-column:1/-1}
.cn-tier span{font-family:var(--mono);font-size:10.5px;font-weight:700;letter-spacing:.2em;
  text-transform:uppercase;color:var(--rk-mute)}
.cn-tier::after{content:"";flex:1;height:1px;background:var(--ln)}
.cn-ladder{display:grid;grid-template-columns:repeat(auto-fill,minmax(150px,1fr));gap:12px}
.rk{position:relative;padding:16px 14px 14px;overflow:hidden}
.rk .rk-no{position:absolute;right:12px;top:8px;font-family:var(--disp);font-weight:900;
  /* --pp2 is the page behind the card, so on the card itself this came out at
     1.23:1 in light and 1.01:1 in dark — a watermark nobody could see. --ln is
     the line colour, which is what a watermark on a card should be. */
  font-size:38px;line-height:1;color:var(--ln)}
.rk .cn-badge{margin-bottom:12px}
.rk h4{font-family:var(--disp);font-weight:800;font-size:19px;line-height:1;
  text-transform:uppercase;color:var(--rk-ink);margin:0}
.rk .rk-xp{font-family:var(--mono);font-size:11px;font-weight:700;color:var(--bl);margin-top:6px}
.rk p{font-size:12.5px;line-height:1.4;color:var(--rk-mute);margin:6px 0 0}
.rk.locked h4{color:var(--rk-mute)}
.rk.locked .rk-xp{opacity:.6}
.rk.past{opacity:.92}
.rk.now{border-color:var(--rd);padding-bottom:32px;
  box-shadow:0 0 0 3px rgba(178,34,52,.12),0 20px 40px -24px rgba(178,34,52,.55)}
.rk.now::after{content:"YOU ARE HERE";position:absolute;left:0;right:0;bottom:0;
  background:var(--rd);color:#fff;font-family:var(--mono);font-size:9.5px;font-weight:700;
  letter-spacing:.2em;text-align:center;padding:5px 2px}
@media (hover:hover){.rk{transition:transform .3s var(--ease)} .rk:hover{transform:translateY(-3px)}}

/* ── the group, and the record ──────────────────────────────────────────── */
.cn-grp,.cn-log,.cn-ord{margin-top:14px;overflow:hidden}
.cn-h{padding:13px 15px 10px}
.cn-row{display:flex;align-items:center;gap:11px;padding:11px 15px}
.cn-row + .cn-row{border-top:1px solid var(--ln)}
.cn-row > .grow{display:flex;flex-direction:column;gap:1px;min-width:0}
.cn-row b{font-size:14.5px;color:var(--rk-ink)}
.cn-row small{font-size:12px;line-height:1.35;color:var(--rk-mute)}
.cn-grp .cn-row.me{background:var(--pp2)}
.cn-pos{flex:none;display:grid;place-items:center;width:26px;height:26px;border-radius:8px;
  background:var(--pp2);font-family:var(--mono);font-size:11px;font-weight:700;color:var(--rk-mute)}
.cn-pos.in{color:var(--ok,#1F7A4D)}
.cn-at{flex:none;font-family:var(--mono);font-size:12px;font-weight:700;color:var(--rk-mute)}
.cn-note{padding:2px 15px 13px;margin:0;font-size:12px}
.cn-delta{flex:none;display:flex;align-items:center;gap:3px;font-family:var(--mono);
  font-size:13px;font-weight:700}
.cn-delta.in{color:var(--ok,#1F7A4D)}
.cn-delta.out{color:var(--rk-mute)}
:root[data-theme="dark"] .cn-delta.in,:root[data-theme="dark"] .cn-pos.in{color:#4ED08A}
@media (prefers-color-scheme:dark){
:root:not([data-theme="light"]) .cn-delta.in,:root:not([data-theme="light"]) .cn-pos.in{color:#4ED08A}}
.page-rank .plate.sm{font-family:var(--mono);font-size:10px;letter-spacing:.08em;
  background:var(--pp2);color:var(--rk-mute)}

/* ── the shop ───────────────────────────────────────────────────────────── */
/* The app's own segmented control and chips are its blue. On this page they
   would be the only thing still speaking the old language, so they take the
   navy and the mono of this one. */
.page-rank .seg{background:var(--pp2);border-radius:12px}
.page-rank .seg button{font-family:var(--mono);font-size:11px;font-weight:700;
  letter-spacing:.08em;text-transform:uppercase;color:var(--rk-mute);border-radius:9px}
.page-rank .seg button[aria-pressed="true"]{background:var(--nv);color:var(--rk-card);box-shadow:none}
.cn-kinds{margin-bottom:12px;display:flex;gap:7px;overflow-x:auto;flex-wrap:nowrap;
  scrollbar-width:none;padding-bottom:2px}
.cn-kinds::-webkit-scrollbar{display:none}
.page-rank .chip{flex:none;border-radius:9px;background:transparent;color:var(--rk-mute);
  box-shadow:inset 0 0 0 1px var(--ln);font-family:var(--mono);font-size:10.5px;font-weight:700;
  letter-spacing:.08em;text-transform:uppercase;padding:7px 11px}
.page-rank .chip.on{background:var(--nv);color:var(--rk-card);box-shadow:none}
.cn-shop{display:grid;grid-template-columns:repeat(auto-fill,minmax(168px,1fr));gap:12px}
.item{padding:14px;display:flex;flex-direction:column}
.item .art{position:relative;height:104px;border-radius:13px;display:grid;place-items:center;
  overflow:hidden;background:linear-gradient(160deg,var(--pp),var(--pp2));color:var(--nv)}
.item .art::before{content:"";position:absolute;inset:0;
  background-image:radial-gradient(var(--grid,rgba(1,0,76,.12)) 1px,transparent 1px);background-size:10px 10px}
.item .art > svg{position:relative;width:52px;height:52px}
.item .tag,.item .stock{position:absolute;top:9px;font-family:var(--mono);font-size:9px;
  font-weight:700;letter-spacing:.1em;padding:3px 6px;border-radius:6px;z-index:1}
.item .tag{left:9px;background:var(--rk-card);color:var(--nv)}
.item .stock{right:9px;background:var(--nv);color:var(--rk-card)}
.item .stock.low{background:var(--rd);color:#fff}
.item h5{font-size:15px;font-weight:700;margin:12px 0 0;color:var(--rk-ink)}
.item .desc{font-size:12.5px;line-height:1.4;margin:3px 0 0;flex:1}
.item{min-width:0}
.item .buy{display:flex;align-items:center;justify-content:space-between;gap:8px;margin-top:12px;flex-wrap:wrap}
.item .buy .btn{min-width:0;max-width:100%;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}
.item .price{display:flex;align-items:center;gap:5px;font-family:var(--disp);font-weight:800;
  font-size:24px;line-height:1;color:var(--rk-ink);font-variant-numeric:tabular-nums}
.item .price svg{width:18px;height:18px;color:var(--rd)}
.item.gone{opacity:.6}
.page-rank .btn.pri{background:var(--rd);color:#fff;border:0;
  box-shadow:0 10px 22px -10px rgba(178,34,52,.8)}
@media (hover:hover){.page-rank .btn.pri:hover{background:var(--rd2)}}
.page-rank .btn.sec{background:transparent;color:var(--rk-mute);border:1px solid var(--ln);box-shadow:none}
.page-rank .btn[disabled]{opacity:.5}
.page-rank .btn{border-radius:11px;font-size:13px;padding:9px 12px;min-height:0;height:auto}
@media (hover:hover){.item{transition:transform .3s var(--ease)} .item:hover{transform:translateY(-3px)}
  .item .art > svg{transition:transform .4s var(--ease)} .item:hover .art > svg{transform:scale(1.1) rotate(-4deg)}}

/* ── THE GAME LOOK: medal, sky, energy bar, tiles ─────────────────────────
   Mr. Karim: "constant 3-D animations, video game style … it looks super
   boring, super plain." Everything below is drawn in CSS over the same
   markup, stops for prefers-reduced-motion, and keeps the three tier colours.
   The standing panel goes dark in both themes: a HUD is dark. */
.page-rank{--hud:#06063A;--hud2:#0E0E5C;--hud-ink:#FFFFFF;--hud-mute:#B9BCEB;
  --ring:#E8E6F8;--ring2:#8C8FBE;--ring3:#FFFFFF;
  --glow:rgba(39,66,214,.55);--glow-en:rgba(39,66,214,.55);--glow-of:rgba(143,162,255,.6);--glow-hf:rgba(227,179,65,.6);
  --gold2:#FFD66B;--gold3:#B8860B;perspective:900px}
.page-rank .cn-h1{letter-spacing:-.01em}

/* the medal */
.cn-badge.med{background:none;color:#fff;width:72px;height:72px;border-radius:50%;overflow:visible;position:relative;transform-style:preserve-3d}
.cn-badge.med.lg{width:118px;height:118px}
.med-3d{position:absolute;inset:0;transform-style:preserve-3d;border-radius:50%;
  filter:drop-shadow(0 14px 22px rgba(1,0,76,.45))}
.med-ring{position:absolute;inset:0;border-radius:50%;pointer-events:none;
  background:conic-gradient(from 210deg,var(--ring2) 0 8%,var(--ring3) 14%,var(--ring2) 22%,var(--ring) 36%,var(--ring2) 50%,var(--ring3) 58%,var(--ring2) 70%,var(--ring) 84%,var(--ring2) 100%);
  box-shadow:inset 0 0 0 1px rgba(255,255,255,.55),inset 0 -3px 6px rgba(0,0,0,.35),0 0 0 1px rgba(0,0,0,.15)}
.med-ring::after{content:"";position:absolute;inset:7%;border-radius:50%;
  box-shadow:inset 0 2px 4px rgba(255,255,255,.25),inset 0 -6px 12px rgba(0,0,0,.45)}
.cn-of .med-disc,.med.cn-of .med-disc{background-color:#2742D6}
.cn-hf .med-ring{background:conic-gradient(from 210deg,var(--gold3) 0 8%,var(--gold2) 14%,var(--gold3) 22%,#F3C85A 36%,var(--gold3) 50%,#FFF0B8 58%,var(--gold3) 70%,#F3C85A 84%,var(--gold3) 100%)}
.cn-hf .med-disc,.med.cn-hf .med-disc{background-color:#8A6200}
.med-disc{position:absolute;inset:7%;border-radius:50%;z-index:2;display:flex;flex-direction:column;align-items:center;justify-content:center;gap:2px;transform:translateZ(8px);color:#fff;
  background-color:#01004C;background-image:radial-gradient(circle at 35% 30%,rgba(255,255,255,.35),transparent 55%)}
.med-disc .cn-b-art{width:44%;height:44%;filter:drop-shadow(0 1px 0 rgba(0,0,0,.4))}
.med-disc b{font-family:var(--mono);font-size:9px;font-weight:700;letter-spacing:.12em;line-height:1;opacity:.95}
.cn-badge.med.lg .med-disc b{font-size:11px}
.med-shine{position:absolute;inset:0;border-radius:50%;overflow:hidden;pointer-events:none;z-index:3;transform:translateZ(10px)}
.med-shine::before{content:"";position:absolute;top:-30%;bottom:-30%;left:-60%;width:38%;
  background:linear-gradient(100deg,transparent 0,rgba(255,255,255,.0) 30%,rgba(255,255,255,.55) 50%,rgba(255,255,255,0) 70%,transparent 100%);
  transform:skewX(-18deg)}
.rk.locked .cn-badge.med{opacity:.55;filter:grayscale(1)}
.rk.locked .med-disc{background-color:#5c5f78}
:root[data-theme="dark"] .cn-badge.med{color:#fff}
@media (prefers-color-scheme:dark){:root:not([data-theme="light"]) .cn-badge.med{color:#fff}}

/* the standing panel: a dark HUD */
.page-rank .card.cn-hero{background-color:var(--hud);background-image:radial-gradient(120% 90% at 20% 10%,var(--hud2),var(--hud) 60%);color:var(--hud-ink);border-color:transparent;
  box-shadow:0 30px 60px -30px rgba(1,0,76,.8),inset 0 0 0 1px rgba(255,255,255,.08);padding:22px 18px 20px}
.cn-hero .cn-kick,.cn-hero .cn-fig small,.cn-hero .cn-need li{color:var(--hud-mute)}
.cn-hero .cn-rank,.cn-hero .cn-fig b,.cn-hero .cn-nn,.cn-hero .cn-need li.got{color:var(--hud-ink)}
.cn-hero .cn-fig.coin b{color:#FFD66B}
.cn-hero .cn-mono{color:var(--hud-mute)}
.cn-hero .cn-next{border-top-color:rgba(255,255,255,.12)}
.cn-hero .cn-stripe{opacity:.9}
.cn-hero .cn-top-row{position:relative;z-index:1;gap:20px}
.cn-hero .cn-next{position:relative;z-index:1}
.cn-hero .cn-need li.got svg{color:#4ED08A}
.cn-rank{text-shadow:0 2px 0 rgba(0,0,0,.35)}
.cn-hero .cn-rank{color:#fff;text-shadow:0 2px 0 rgba(0,0,0,.35),0 0 18px rgba(201,204,245,.35)}
/* the sky */
.cn-sky{position:absolute;inset:0;overflow:hidden;pointer-events:none;z-index:0}
.cn-sky i{position:absolute;left:var(--x);top:var(--y);width:var(--s);height:var(--s);border-radius:50%;background:#fff;opacity:.55;
  box-shadow:0 0 6px 1px rgba(255,255,255,.5)}
.cn-aura{position:absolute;left:-20px;top:-40px;width:260px;height:260px;border-radius:50%;filter:blur(40px);background:var(--glow-en);opacity:.7}
.cn-hero.cn-of .cn-aura{background:var(--glow-of)} .cn-hero.cn-hf .cn-aura{background:var(--glow-hf)}
/* the energy bar */
.cn-hero .cn-bar{position:relative;height:14px;background:rgba(255,255,255,.1);box-shadow:inset 0 1px 2px rgba(0,0,0,.5),inset 0 0 0 1px rgba(255,255,255,.08);overflow:hidden}
.cn-hero .cn-bar > i{position:relative;background:linear-gradient(90deg,#B22234,#FF5A6E 60%,#FFB4BE);box-shadow:0 0 14px rgba(255,90,110,.75),inset 0 1px 0 rgba(255,255,255,.5)}
.cn-hero .cn-bar > i > s{position:absolute;top:0;bottom:0;left:-40%;width:40%;
  background:linear-gradient(90deg,transparent,rgba(255,255,255,.65),transparent)}
.cn-ticks{position:absolute;inset:0;background-image:repeating-linear-gradient(90deg,transparent 0 calc(10% - 1px),rgba(0,0,0,.35) calc(10% - 1px) 10%);pointer-events:none;mix-blend-mode:multiply}
/* the ladder tiles */
.cn-ladder{gap:14px;perspective:1000px}
.page-rank .card.rk{background-color:var(--rk-card);background-image:linear-gradient(165deg,var(--rk-card),color-mix(in srgb,var(--rk-card) 86%,var(--pp2)));
  border:1px solid var(--ln);box-shadow:0 1px 0 rgba(255,255,255,.6) inset,0 16px 30px -22px rgba(1,0,76,.45);transform-style:preserve-3d}
.rk .cn-badge{margin-bottom:12px}
.page-rank .card.rk.now{border-color:transparent;background-color:var(--hud);background-image:radial-gradient(120% 100% at 0 0,var(--hud2),var(--hud) 70%);color:#fff;
  box-shadow:0 0 0 2px var(--rd),0 0 28px -4px rgba(212,58,76,.7),0 24px 44px -24px rgba(1,0,76,.8)}
.rk.now h4,.rk.now p{color:#fff} .rk.now .rk-xp{color:#C9CCF5} .rk.now .rk-no{color:rgba(255,255,255,.1)}
.rk.now::after{letter-spacing:.24em;background:linear-gradient(90deg,var(--rd),#FF5A6E)}
.rk.past{opacity:1}
.rk-stamp{position:absolute;right:-6px;top:14px;transform:rotate(12deg);padding:3px 8px;border:2px solid #1F7A4D;color:#1F7A4D;border-radius:6px;
  font-family:var(--mono);font-size:9px;font-weight:700;letter-spacing:.2em;text-transform:uppercase;opacity:.8}
:root[data-theme="dark"] .rk-stamp{border-color:#4ED08A;color:#4ED08A}
@media (prefers-color-scheme:dark){:root:not([data-theme="light"]) .rk-stamp{border-color:#4ED08A;color:#4ED08A}}
.rk-lock{position:absolute;right:12px;top:12px;width:24px;height:24px;border-radius:50%;display:grid;place-items:center;background:var(--pp2);color:var(--rk-mute);box-shadow:inset 0 0 0 1px var(--ln)}
.rk.locked .rk-no{display:none}
@media (hover:hover){
  .rk:hover{transform:translateY(-4px) rotateX(4deg) rotateY(-3deg)}
  .rk{transition:transform .35s var(--spring),box-shadow .35s}
  .rk:hover{box-shadow:0 1px 0 rgba(255,255,255,.6) inset,0 28px 40px -22px rgba(1,0,76,.55)}
}
/* motion, for anyone who has not asked for less */
@media (prefers-reduced-motion:no-preference){
  @keyframes medTilt{0%{transform:rotateY(-14deg) rotateX(6deg)}50%{transform:rotateY(14deg) rotateX(-6deg)}100%{transform:rotateY(-14deg) rotateX(6deg)}}
  @keyframes medSpin{to{transform:rotate(360deg)}}
  @keyframes medShine{0%,70%{left:-60%}100%{left:130%}}
  @keyframes skyDrift{0%{transform:translateY(0);opacity:.2}50%{opacity:.9}100%{transform:translateY(-18px);opacity:.2}}
  @keyframes auraBreathe{0%,100%{transform:scale(1);opacity:.6}50%{transform:scale(1.15);opacity:.85}}
  @keyframes barShine{0%{left:-40%}100%{left:120%}}
  @keyframes tileFloat{0%,100%{transform:translateY(0)}50%{transform:translateY(-4px)}}
  @keyframes nowPulse{0%,100%{box-shadow:0 0 0 2px var(--rd),0 0 20px -4px rgba(212,58,76,.6),0 24px 44px -24px rgba(1,0,76,.8)}50%{box-shadow:0 0 0 2px var(--rd),0 0 36px 0 rgba(212,58,76,.8),0 24px 44px -24px rgba(1,0,76,.8)}}
  .cn-badge.med.lg .med-3d{animation:medTilt 7s ease-in-out infinite}
  .cn-badge.med .med-ring{animation:medSpin 18s linear infinite}
  .cn-hf .med-ring{animation-duration:12s}
  .med-shine::before{animation:medShine 5.5s ease-in-out infinite}
  .rk .med-shine::before{animation-delay:calc(var(--i,0) * -.7s)}
  .cn-sky i{animation:skyDrift var(--d) ease-in-out infinite;animation-delay:calc(var(--w) * -1)}
  .cn-aura{animation:auraBreathe 6s ease-in-out infinite}
  .cn-hero .cn-bar > i > s{animation:barShine 2.6s ease-in-out infinite}
  .rk{animation:tileFloat 5s ease-in-out infinite;animation-delay:calc(var(--i,0) * -.55s)}
  .rk.now{animation:tileFloat 5s ease-in-out infinite,nowPulse 2.8s ease-in-out infinite}
  @media (hover:hover){.rk:hover{animation-play-state:paused}}
}
/* the shop, in the same world: tilting tiles, a sheen crossing the art, a
   coin that turns, and a stock badge that pulses when there are few left */
.cn-shop{perspective:1000px}
.page-rank .card.item{transform-style:preserve-3d;background-color:var(--rk-card);background-image:linear-gradient(165deg,var(--rk-card),color-mix(in srgb,var(--rk-card) 88%,var(--pp2)));
  box-shadow:0 1px 0 rgba(255,255,255,.6) inset,0 18px 34px -24px rgba(1,0,76,.5)}
.item .art{box-shadow:inset 0 0 0 1px rgba(1,0,76,.06),inset 0 -18px 30px -24px rgba(1,0,76,.35)}
.item .art::after{content:"";position:absolute;top:-40%;bottom:-40%;left:-70%;width:45%;transform:skewX(-20deg);pointer-events:none;
  background:linear-gradient(100deg,transparent,rgba(255,255,255,.55) 50%,transparent)}
.item .art svg{filter:drop-shadow(0 6px 10px rgba(1,0,76,.25))}
.item .price{perspective:200px}
.item .price svg{width:22px;height:22px;border-radius:50%;padding:3px;color:#5A3B00;
  background:conic-gradient(from 200deg,#B8860B,#FFD66B 25%,#E3B341 50%,#FFF0B8 65%,#B8860B 100%);
  box-shadow:inset 0 0 0 1.5px rgba(90,59,0,.35),0 2px 4px rgba(0,0,0,.25);transform-style:preserve-3d}
.item .stock.low{transform-origin:center}
@media (hover:hover){
  .page-rank .card.item{transition:transform .35s var(--spring),box-shadow .35s}
  .page-rank .card.item:hover{transform:translateY(-5px) rotateX(4deg) rotateY(-4deg);box-shadow:0 1px 0 rgba(255,255,255,.6) inset,0 30px 44px -22px rgba(1,0,76,.6)}
}
@media (prefers-reduced-motion:no-preference){
  @keyframes coinTurn{0%{transform:rotateY(0)}40%{transform:rotateY(0)}70%{transform:rotateY(540deg)}100%{transform:rotateY(540deg)}}
  @keyframes artSheen{0%,60%{left:-70%}100%{left:140%}}
  @keyframes lowPulse{0%,100%{transform:scale(1)}50%{transform:scale(1.08)}}
  .item .price svg{animation:coinTurn 6s ease-in-out infinite}
  .item:nth-child(2n) .price svg{animation-delay:-2s} .item:nth-child(3n) .price svg{animation-delay:-4s}
  .item .art::after{animation:artSheen 7s ease-in-out infinite;animation-delay:calc(var(--i,0) * -.9s)}
  .item .stock.low{animation:lowPulse 1.8s ease-in-out infinite}
}
/* the rank card on Home: the same HUD, so the game starts on Home */
.rk-home .cn-badge.med{width:62px;height:62px}
.rk-home.page-rank{background-color:var(--hud);background-image:radial-gradient(120% 120% at 10% 0,var(--hud2),var(--hud) 70%);border-color:transparent;color:#fff;
  box-shadow:0 24px 44px -26px rgba(1,0,76,.8),inset 0 0 0 1px rgba(255,255,255,.08)}
.rk-home .rkh-kick,.rk-home .rkh-nums,.rk-home .rkh-next{color:#B9BCEB}
.rk-home .rkh-name{color:#fff;text-shadow:0 1px 0 rgba(0,0,0,.35)}
.rk-home .rkh-nums .num{color:#FFD66B} .rk-home .rkh-nums em,.rk-home .rkh-next b{color:#fff}
.rk-home .rkh-bar{background:rgba(255,255,255,.12);height:8px;box-shadow:inset 0 1px 2px rgba(0,0,0,.5)}
.rk-home .rkh-bar i{background:linear-gradient(90deg,#B22234,#FF5A6E 60%,#FFB4BE);box-shadow:0 0 10px rgba(255,90,110,.7)}
.rk-home > .ic{color:#B9BCEB}
.rk-home::after{background:linear-gradient(105deg,transparent 35%,rgba(255,255,255,.08) 50%,transparent 65%)}

/* ── how you earn it ────────────────────────────────────────────────────── */
.cn-how{margin-top:14px}
.cn-how .cn-kick{margin-bottom:9px}
.cn-earn{list-style:none;margin:0 0 11px;padding:0;display:flex;flex-direction:column;gap:10px}
.cn-earn li{display:flex;align-items:flex-start;gap:10px}
.cn-earn li svg{flex:none;margin-top:2px;color:var(--rd)}
.cn-earn span{display:flex;flex-direction:column;gap:1px}
.cn-earn b{font-size:14px;color:var(--rk-ink)}
.cn-earn small{font-size:12.5px;color:var(--rk-mute);line-height:1.4}
.co-card{width:100%;text-align:left}
@media (max-width:420px){
  .cn-ladder{grid-template-columns:1fr 1fr}
  /* minmax(0,1fr), not 1fr: a bare 1fr will not shrink below the card's
     min-content, and the price row — "1,500" beside "1,466 short", neither
     allowed to wrap — is 233px wide. Two of those are wider than any phone,
     so the grid spilled out of the page and the whole screen above it
     shifted sideways. */
  .cn-shop{grid-template-columns:minmax(0,1fr) minmax(0,1fr)}
  .rk{padding:13px 11px 12px}
  .rk h4{font-size:16px}
  .rk .rk-no{font-size:30px;right:9px}
  .cn-badge{width:52px;height:52px;border-radius:13px}
  .cn-badge .cn-b-art{width:25px;height:25px}
}

/* ───────── right to left, for the things that are not language

   Persian runs right to left and the whole app mirrors with it, which is
   right for words. It is wrong for everything that is not a word: a clock
   reads 09:00 in every language, a room is 403 everywhere, and a split-flap
   board spelling FRI must not come out as IRF. Those are isolated back to
   left-to-right so the characters keep their own order inside a mirrored
   page, without disturbing how the page as a whole is laid out. */
[dir="rtl"] .flaps,
[dir="rtl"] .num,
[dir="rtl"] .phone,
[dir="rtl"] .codebig,
[dir="rtl"] .exit,
[dir="rtl"] .shield,
[dir="rtl"] time,
[dir="rtl"] .tr-time,
[dir="rtl"] .vm-t,
[dir="rtl"] .rk-xp,
[dir="rtl"] .cn-mono{direction:ltr;unicode-bidi:isolate}
/* a figure sitting inside a sentence keeps the sentence's direction but its
   own character order, which is what isolate alone gives it */
[dir="rtl"] .cn-fig b,[dir="rtl"] .cn-at,[dir="rtl"] .gchip{unicode-bidi:isolate}

/* ───────── the review queue, bundled by student and lesson
   A card is one student's one lesson. Closed it reads as a row; open it holds
   every piece they did, indented under the name so the grouping is visible
   without a line drawn round it. */
.rv-bundle{border:1px solid var(--line);border-radius:var(--r);background:var(--card);overflow:hidden}
.rv-bundle + .rv-bundle{margin-top:8px}
.rv-bundle.open{border-color:var(--line2)}
.rv-bundle.some{box-shadow:inset 3px 0 0 var(--blue)}
.rv-bhead{display:flex;align-items:stretch}
.rv-bhead .rv-tick{flex:none;align-self:center;margin-left:10px}
.rv-btoggle{flex:1;min-width:0;display:flex;align-items:center;gap:11px;padding:11px 13px;
  background:none;border:0;text-align:left;color:var(--ink);cursor:pointer;font:inherit}
.rv-btoggle:hover{background:var(--soft)}
.rv-bmain{flex:1;min-width:0;display:flex;flex-direction:column;gap:1px}
.rv-bmain b{font-weight:800;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}
.rv-bmain small{font-size:12.5px;line-height:1.35;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}
.rv-bend{flex:none;display:flex;align-items:center;gap:8px}
.rv-bend .ic{color:var(--mute)}
.rv-bpieces{border-top:1px solid var(--line);padding:4px 0 4px 14px;background:var(--soft)}
.rv-bpieces .rv-row{border-radius:8px}
.rv-bpieces .sr-main b{overflow:hidden;text-overflow:ellipsis;white-space:nowrap;display:block}
.rv-bpieces .rv-row.owed .sr-main b{font-weight:800}
.rv-bpieces .rv-row:not(.owed) .sr-main b{font-weight:600;color:var(--mute)}
/* a letter the app wrote, said so rather than passed off as a teacher's */
.gchip.byapp{opacity:.95}
.gchip.byapp .ic{width:12px;height:12px;margin-left:3px;opacity:.75}
.rv-byapp{border:1px dashed var(--line2);border-radius:10px;padding:10px 11px;margin:0 0 12px;
  display:flex;flex-direction:column;gap:6px}
.rv-byapp p{margin:0}
.rv-apptag{display:inline-flex;align-items:center;gap:5px;flex:1;
  font-size:10.5px;font-weight:800;letter-spacing:.06em;text-transform:uppercase;color:var(--mute)}
.rv-apptag .ic{width:14px;height:14px}
.qpos{flex:none;padding:0 4px;font-variant-numeric:tabular-nums}
@media (max-width:420px){
  .rv-btoggle{gap:9px;padding:10px 11px}
  .rv-bpieces{padding-left:8px}
  .rv-bend .plate{font-size:10px}
}

/* ───────── across the academy
   Same navy/red/paper language as the rest of the rank page. The standing is
   the loud thing — a place out of a number, big enough to read across a room,
   because that is what a student came to this section for. */
.page-rank .cn-acad{padding:0;overflow:hidden}
.cn-standing{display:flex;align-items:center;gap:16px;padding:16px 16px 14px;
  border-bottom:1px solid var(--ln)}
.cn-place{flex:none;display:flex;flex-direction:column;align-items:center;justify-content:center;
  min-width:84px;padding:10px 12px;border-radius:12px;background:var(--pp2)}
.cn-place b{font-family:var(--disp);font-size:38px;line-height:.95;font-weight:900;
  color:var(--rd);font-variant-numeric:tabular-nums}
.cn-place small{margin-top:2px;font-size:10.5px;font-weight:800;letter-spacing:.08em;
  text-transform:uppercase;color:var(--rk-mute)}
.cn-saying{flex:1;min-width:0;display:flex;flex-direction:column;gap:3px}
.cn-saying b{font-size:16px;font-weight:800;line-height:1.2}
.cn-saying small{font-size:12.5px;line-height:1.45;color:var(--rk-mute)}
.cn-sub{padding:13px 16px 7px;font-size:12px;font-weight:800;letter-spacing:.06em;
  text-transform:uppercase;color:var(--rk-ink)}
.cn-acad .cn-row{padding-left:16px;padding-right:16px}
.cn-acad .cn-note{padding:8px 16px 12px;margin:0}
.cn-acad .cn-note + .cn-note{padding-top:0}
@media (max-width:420px){
  .cn-standing{gap:12px;padding:14px 13px 12px}
  .cn-place{min-width:72px}
  .cn-place b{font-size:32px}
  .cn-saying b{font-size:15px}
}

/* ───────── the rank card on the home page
   It carries `page-rank` so it inherits that section's whole palette: a
   student sees the same navy, the same red and the same insignia here as they
   do on the rank page itself, and tapping it is visibly the same place. */
.rk-home{display:flex;align-items:center;gap:14px;padding:14px 15px;margin-bottom:14px;
  border-radius:var(--r-sign);color:var(--rk-ink);text-decoration:none;
  background:linear-gradient(135deg,var(--pp) 0%,var(--pp2) 100%);
  border:1px solid var(--ln);box-shadow:var(--rk-sh);
  position:relative;overflow:hidden;
  animation:rkhin .5s var(--ease) both}
@keyframes rkhin{from{opacity:0;transform:translateY(8px)}}
/* a slow sweep of light across the plate — movement without anything moving */
.rk-home::after{content:"";position:absolute;inset:0;pointer-events:none;
  background:linear-gradient(105deg,transparent 35%,rgba(255,255,255,.14) 50%,transparent 65%);
  transform:translateX(-120%);animation:rkhsweep 6.5s ease-in-out 1.2s infinite}
@keyframes rkhsweep{0%{transform:translateX(-120%)}55%,100%{transform:translateX(120%)}}
.rk-home:active{transform:scale(.99)}
.rk-home > .ic{flex:none;color:var(--rk-mute)}
.rkh-badge{flex:none}
.rkh-main{flex:1;min-width:0;display:flex;flex-direction:column;gap:2px}
.rkh-kick{font-size:9.5px;font-weight:800;letter-spacing:.14em;text-transform:uppercase;color:var(--rk-mute)}
.rkh-name{font-family:var(--disp);font-size:23px;line-height:1;font-weight:900;
  letter-spacing:.01em;text-transform:uppercase;color:var(--rk-ink)}
.rkh-nums{font-size:12.5px;font-weight:700;color:var(--rk-mute);font-variant-numeric:tabular-nums}
.rkh-nums .num{color:var(--rd);font-weight:900}
.rkh-nums em{font-style:normal;color:var(--rk-ink);font-weight:900}
.rkh-bar{display:block;height:6px;border-radius:3px;background:var(--ln);overflow:hidden;margin-top:5px}
.rkh-bar i{display:block;height:100%;border-radius:3px;
  background:linear-gradient(90deg,var(--rd),var(--rd2));
  animation:rkhfill 1s var(--ease) both .25s;transform-origin:left}
@keyframes rkhfill{from{transform:scaleX(0)}}
.rkh-next{font-size:11.5px;font-weight:600;color:var(--rk-mute)}
.rkh-next b{color:var(--rk-ink);font-weight:800}
@media (prefers-reduced-motion:reduce){
  .rk-home,.rkh-bar i{animation:none}
  .rk-home::after{display:none}
}
@media (max-width:420px){
  .rk-home{gap:11px;padding:12px 13px}
  .rkh-name{font-size:20px}
}

/* ───────── the top of the home page
   The same drifting light the sign-in page has, kept after somebody signs in:
   slower, fainter, and bounded to the top of the page rather than fixed to the
   window, so it does not follow a student down a long scroll. */
/* No negative margins here, and no negative inset sideways.
   The first version bled the hero 16px past the page on each side and the
   glow another 16px past that, which made the home page 16px wider than the
   window at every width it was measured at — the whole page could be dragged
   sideways. The glow is 64px of blur behind a fade-out mask, so keeping it
   inside the content width costs nothing visible. */
.home-hero{position:relative}
/* The .home-glow block that used to live here — three blurred orbs behind the
   greeting, their own mask, their own float animation and their own wide-screen
   placement — has been removed at Mr. Karim's request: no gradient on the home
   page or on the desktop. `.orb` itself stays, because the sign-in screen still
   uses it. */
.home-hero .hello,.home-hero #rk-home{position:relative;z-index:1}

/* ───────── the question that opened a help thread
   It is the first message rather than a panel above the messages, because
   that is where somebody about to answer is already reading — and it scrolls
   with the conversation instead of eating the top of it. Wider than an
   ordinary bubble: it is a whole question, not a line of chat. */
.bubble.helpq{max-width:min(92%,640px)}
.bubble.helpq .helpq-s{display:block;font-size:15.5px;font-weight:800;line-height:1.3;margin:2px 0 6px}
.bubble.helpq .helpq-b{white-space:pre-wrap;line-height:1.5}
.bubble.helpq .kindline.urgent{color:var(--red2);font-weight:800}
/* and in the Help list, the detail is not cut off at one line any more:
   .sr-main small clips with an ellipsis, which is right for a subtitle and
   wrong for the thing you came to read. */
.hp-body{display:block;margin-top:3px;white-space:pre-wrap;overflow:visible;text-overflow:clip;
  display:-webkit-box;-webkit-line-clamp:3;-webkit-box-orient:vertical;overflow:hidden}

/* ───────── when a piece of homework closes
   Quiet until it is close, then red: a deadline a week away is information,
   and a deadline this evening is the reason to open the app. */
.hwp-due{display:inline-flex;align-items:center;gap:3px;font-style:normal;font-weight:700;
  margin-left:8px;color:var(--mute)}
.hwp-due .ic{width:13px;height:13px}
.hwp-due.soon{color:var(--red2)}
/* MISSED, NOT CLOSED
   A must-do that the class has already been and gone on is the only thing in
   this list the student is behind on. It is said in words, not in a shade of
   grey, and the row carries a red edge so the eye lands on it first. */
.hwp-due.late{color:var(--red2);background:var(--red-t);border-radius:5px;padding:2px 6px 2px 5px;
  font-size:11px;font-weight:800;letter-spacing:.01em}
.hwp-row.late{box-shadow:inset 3px 0 0 var(--red2);padding-left:9px}
.hwp-row.late .hwp-n{background:var(--red2);color:#fff}
.hwp-when{font-weight:700;color:var(--mute)}
.hwp-when.soon{color:var(--red2)}

/* when a piece of homework closes, on the teacher's list */
.hw-when{font-style:normal;font-size:10.5px;font-weight:800;letter-spacing:.04em;
  text-transform:uppercase;margin-left:7px;padding:1px 6px;border-radius:5px;
  background:var(--soft);color:var(--mute);white-space:nowrap}
.hw-when.soon{background:var(--red-t);color:var(--red2)}
.hw-when.over{background:var(--line2);color:var(--mute)}
.hw-when.none{background:transparent;color:var(--mute);padding-left:0}
/* THE REGISTER FOR A PREPARED SPEAKING TASK
   A row the teacher taps while the student is still talking, so the target is
   the whole row and the state is readable at a glance across the room. */
.hw-tick{text-align:left;width:100%}
.hw-tick .s.warn{color:var(--red2);font-weight:700}
.hw-box{flex:none;width:26px;height:26px;border-radius:50%;display:grid;place-items:center;
  border:2px solid var(--line2);background:var(--card);transition:background .15s var(--ease),border-color .15s var(--ease)}
.hw-box .ic{width:20px;height:20px}
.hw-tick.on .hw-box{border-color:var(--green3);background:var(--green-t);color:var(--green3)}
.hw-tick.busy{opacity:.55;pointer-events:none}
@media (hover:hover){.hw-tick:hover .hw-box{border-color:var(--ink2)}}

/* ───────── the academy at a glance, on the Students tab
   Four numbers across the top, two breakdowns under them, and the groups
   below that — read in the order somebody actually asks the questions: how
   many are there, are they turning up, are they working, who do I ring. */
.dash{display:flex;flex-direction:column;gap:12px;margin:0 0 18px}
.dash-tiles{display:grid;grid-template-columns:repeat(4,minmax(0,1fr));gap:10px}
.dash-t{background:var(--card);border:1px solid var(--line);border-radius:var(--r);
  padding:14px 14px 12px;display:flex;flex-direction:column;gap:2px;min-width:0}
.dash-t b{font-size:30px;font-weight:900;line-height:1;font-variant-numeric:tabular-nums}
.dash-t span{font-size:12.5px;font-weight:700;line-height:1.25}
.dash-t small{font-size:11.5px;color:var(--mute);line-height:1.3}
/* the ink variants, not the plate colours: a plate red is made to be read as
   white-on-red, and at 30px on a dark card it comes in under the floor */
.dash-t.good b{color:var(--green3)} .dash-t.mid b{color:var(--orange-ink)} .dash-t.bad b{color:var(--red2)}
.dash-split{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:10px}
.dash-box{background:var(--card);border:1px solid var(--line);border-radius:var(--r);padding:14px}
.dash-box.wide{grid-column:1 / -1}
.dash-box .cn-kick{display:block;margin-bottom:10px;font-size:10.5px;font-weight:800;
  letter-spacing:.08em;text-transform:uppercase;color:var(--mute)}
.dash-bar{display:flex;align-items:center;gap:10px;padding:4px 0}
.dash-bar span{flex:0 0 11em;font-size:12.5px;font-weight:600}
.dash-bar i{flex:1;height:8px;border-radius:4px;background:var(--soft);overflow:hidden;min-width:0}
.dash-bar u{display:block;height:100%;border-radius:4px;background:var(--mute);
  animation:dashfill .7s var(--ease) both;transform-origin:left}
@keyframes dashfill{from{transform:scaleX(0)}}
.dash-bar.good u{background:var(--green)} .dash-bar.mid u{background:var(--orange)} .dash-bar.bad u{background:var(--red)}
.dash-bar b{flex:0 0 2.6em;text-align:right;font-size:13px;font-weight:800;font-variant-numeric:tabular-nums}
.dash-note{margin:10px 0 0}
.dash-tbl{display:flex;flex-direction:column}
/* the columns are in px, not em: the heading row and the rows under it are set
   at different sizes, so an em column came out two different widths and the
   headings sat over the wrong numbers */
.dash-hd,.dash-row{display:grid;grid-template-columns:minmax(0,1fr) 42px 56px 66px 58px;
  align-items:center;gap:8px;padding:9px 6px}
.dash-hd{font-size:10.5px;font-weight:800;letter-spacing:.04em;text-transform:uppercase;
  color:var(--mute);border-bottom:1px solid var(--line);white-space:nowrap}
.dash-hn{display:none} .dash-hw,.dash-hn{font-style:normal}
.dash-hd span:not(:first-child),.dash-row>.num,.dash-row>span:last-child{text-align:right}
.dash-row{color:var(--ink);text-decoration:none;border-bottom:1px solid var(--line);border-radius:8px}
.dash-row:last-child{border-bottom:0}
.dash-row:hover{background:var(--soft)}
.dash-row.cold{box-shadow:inset 3px 0 0 var(--red2)}
.dash-g{display:flex;flex-direction:column;min-width:0}
.dash-g b{font-weight:700;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}
.dash-g small{font-size:11.5px;color:var(--mute);overflow:hidden;text-overflow:ellipsis;white-space:nowrap}
.dash-row .num{font-weight:800;font-variant-numeric:tabular-nums}
.dash-row .num.none{color:var(--red2)}
.dash-row em{font-style:normal}
@media (prefers-reduced-motion:reduce){.dash-bar u{animation:none}}
@media (max-width:900px){
  .dash-tiles{grid-template-columns:repeat(2,minmax(0,1fr))}
  .dash-split{grid-template-columns:minmax(0,1fr)}
  .dash-bar span{flex:0 0 8.5em;font-size:12px}
}
@media (max-width:560px){
  .dash-t b{font-size:25px}
  .dash-hd,.dash-row{grid-template-columns:minmax(0,1fr) 30px 40px 36px 40px;gap:5px;padding:9px 3px}
  .dash-hd{font-size:9.5px;letter-spacing:.03em}
  .dash-hw{display:none} .dash-hn{display:inline}
}

/* ───────── the native reading on the Pronunciation page
   The line being read lights up, and the numbers jump to it. Both are the
   same control in two shapes, so they are lit together. */
.rsa{margin-top:14px}
.rsa-h{display:flex;align-items:center;gap:7px;font-size:16px;margin:0 0 4px}
/* A block, not a flex row: as a flex parent it would not let the player
   shrink below its natural width, and at 320px that pushed the whole page
   sideways. The loading line keeps its own row. */
.rsa-slot{min-height:44px;margin:10px 0}
.rsa-slot>span{display:inline-flex;align-items:center;gap:8px}
.rsa-slot .au{min-width:0}
.rsa-n{display:flex;flex-wrap:wrap;gap:6px;margin:12px 0 10px}
.rsa-b{min-width:34px;height:34px;padding:0 9px;border-radius:9px;background:var(--soft);
  color:var(--ink2);font-weight:800;font-size:13.5px;font-variant-numeric:tabular-nums;
  border:1.5px solid transparent;transition:background .15s var(--ease),color .15s var(--ease)}
@media (hover:hover){.rsa-b:hover{background:var(--soft2)}}
.rsa-b.on{background:var(--red-t);color:var(--red2);border-color:var(--red2)}
.rsa-lines{list-style:none;margin:0;padding:0;display:flex;flex-direction:column;gap:2px;counter-reset:rsa}
.rsa-lines li{counter-increment:rsa;position:relative;padding:7px 10px 7px 30px;border-radius:9px;
  font-size:15.5px;line-height:1.5;color:var(--mute);transition:background .2s var(--ease),color .2s var(--ease)}
.rsa-lines li::before{content:counter(rsa);position:absolute;left:9px;top:8px;font-size:11px;
  font-weight:800;color:var(--faint);font-variant-numeric:tabular-nums}
.rsa-lines li.on{background:var(--soft);color:var(--ink);font-weight:600}
.rsa-lines li.on::before{color:var(--red2)}
@media (prefers-reduced-motion:reduce){.rsa-lines li,.rsa-b{transition:none}}
.say-hear{gap:8px;margin:10px 0 2px}
#mk-model-slot:not(:empty){margin:10px 0 4px}

/* The player at phone widths. Inside the Pronunciation card, at 320px, the
   speed button was pushed out of its own box by ten pixels — and the speed
   button is the point of it there: a student slows the native reading down to
   copy it. So the parts around it give up their room first. */
@media (max-width:380px){
  .au{gap:9px;padding:10px 11px}
  .au-play{width:42px;height:42px}
  .au-play .ic{width:21px;height:21px}
  .au-t{font-size:12px}
  .au-b{min-width:28px;height:28px;padding:0 4px}
  .au-b .ic{width:17px;height:17px}
}

/* ───────── the chat readout (five taps on a conversation's title) */
.vvdbg{position:fixed;z-index:9500;left:10px;right:10px;top:calc(var(--vvtop,0px) + var(--sat) + 10px);
  padding:12px 14px;border-radius:14px;background:#0A0B2E;color:#F2F4F3;
  font-size:13px;font-weight:600;box-shadow:var(--shadow-up);display:grid;gap:5px}
.vvdbg div{display:flex;gap:10px} .vvdbg b{flex:none;width:130px;color:#9AA5AD;font-weight:700}
.vvdbg span{flex:1;min-width:0;font-variant-numeric:tabular-nums}
.vvdbg button{margin-top:6px;padding:9px;border-radius:10px;background:#2A3137;color:#F2F4F3;font-weight:700}

/* ───────── the first thing on the screen
   Before this there was a 46px grey square in the middle of an empty page,
   and on a phone connection that is what you looked at for several seconds
   with nothing to say whether anything was happening at all. It is in the
   page itself rather than drawn by JavaScript, so it is there at the first
   paint, and it goes the moment the app has something to put in its place.
   There is no minimum: on a fast connection it is gone before it is read. */
.boot{min-height:100dvh;display:flex;flex-direction:column;align-items:center;
  justify-content:center;gap:11px;padding:24px;text-align:center;color:var(--ink)}
.boot-mark{width:58px;height:58px;border-radius:14px;animation:bootMark .5s var(--ease) both}
.boot b{font-size:19px;font-weight:900;letter-spacing:.015em;animation:bootUp .45s var(--ease) .08s both}
@keyframes bootMark{from{opacity:0;transform:scale(.88)}}
@keyframes bootUp{from{opacity:0;transform:translateY(7px)}}
/* a rule that runs back and forth: it says "still working", which a bar that
   fills to a made-up percentage does not */
.boot-rule{display:block;width:132px;height:2px;border-radius:2px;overflow:hidden;
  background:var(--line2);animation:bootUp .45s var(--ease) .16s both}
.boot-rule i{display:block;width:40%;height:100%;border-radius:2px;background:var(--red);
  animation:bootRun 1.15s var(--ease) .3s infinite}
@keyframes bootRun{0%{transform:translateX(-110%)}100%{transform:translateX(360%)}}
@media (prefers-reduced-motion:reduce){
  .boot-mark,.boot b,.boot-rule{animation:none;opacity:1;transform:none}
  .boot-rule i{animation:none;width:100%}
}

/* ───────── a recording on its way down */
.dl{display:flex;flex-direction:column;gap:7px;padding:10px 0}
.dl-t{font-size:13.5px;font-weight:700;color:var(--mute)}
.dl-pc{font-style:normal;font-variant-numeric:tabular-nums}
.dl-track{display:block;height:4px;border-radius:2px;background:var(--line2);overflow:hidden}
.dl-fill{display:block;height:100%;width:0;border-radius:2px;background:var(--red);
  transition:width .18s linear}
/* no content-length to go on: say "working", do not invent a number */
.dl-fill.indet{width:38%;transition:none;animation:dlRun 1.15s var(--ease) infinite}
@keyframes dlRun{0%{transform:translateX(-110%)}100%{transform:translateX(370%)}}
@media (prefers-reduced-motion:reduce){.dl-fill.indet{animation:none;width:100%;opacity:.5}}

/* ───────── taking homework back */
/* The row already carries a deadline button and a done count; this is the
   third and least used, so it is quiet until the row is under the pointer. */
.hw-undo{color:var(--mute)}
.hw-undo:hover,.hw-undo:focus-visible{color:var(--red2)}
@media (hover:hover){.hw-list .hw-undo{opacity:.45;transition:opacity .15s}
  .hw-row:hover .hw-undo,.hw-undo:focus-visible{opacity:1}}
.sec-head .btn.sm{margin-left:auto}
/* homework that has closed: still on the record, off every home page */
.hw-list.shut .hw-row{opacity:.62}
.hw-list.shut .hw-bar>i{background:var(--mute)}

/* ───────── correcting a piece of writing
   The teacher's editor sits under the student's own work; the difference
   between the two is drawn the way a correction on paper reads — what came
   out struck through, what went in underlined. */
.mk-corr{display:block;margin-top:14px}
.mk-corr-h{align-items:center;gap:8px;margin-bottom:6px}
.mk-corr-h b{display:flex;align-items:center;gap:7px;font-size:15.5px}
.mk-corr-t{width:100%;min-height:150px;resize:vertical;line-height:1.5;font-size:15.5px}
.mk-corr-sum{margin:9px 0 2px}
.wd{padding:12px 14px;border-radius:12px;background:var(--soft);line-height:1.62;
  font-size:15.5px;white-space:pre-wrap;word-break:break-word}
.wd del{text-decoration:line-through;text-decoration-thickness:1.5px;
  color:var(--red2);background:var(--red-t);border-radius:3px;padding:0 1px}
.wd ins{text-decoration:none;color:var(--green3);background:var(--green-t);
  border-radius:3px;padding:0 1px;box-shadow:inset 0 -1.5px 0 var(--green2)}
.wd-plain{white-space:pre-wrap}
.rv-fixchip:not(:empty){margin:10px 0 4px}

/* the student's side of it */
.rv-fix{margin-top:10px}
.rv-fix .lbl{margin-top:12px}
.rv-fix-seg{margin-bottom:10px}
.rv-mine{padding:12px 14px;border-radius:12px;background:var(--soft);
  line-height:1.6;font-size:15.5px;white-space:pre-wrap;word-break:break-word}

/* ───────── one tab per group, across the top of the chats
   The same row the Mine / Other chats switch sits on, so there is one way of
   dividing this list rather than two. It scrolls sideways when the groups
   outrun the screen, and the last one fades rather than being cut off. */
.ctabs{display:flex;gap:6px;overflow-x:auto;padding:10px 14px;scrollbar-width:none;
  border-bottom:1px solid var(--line);scroll-padding:14px;
  -webkit-mask-image:linear-gradient(90deg,#000 0,#000 calc(100% - 26px),transparent 100%);
  mask-image:linear-gradient(90deg,#000 0,#000 calc(100% - 26px),transparent 100%)}
.ctabs::-webkit-scrollbar{display:none}
.ctab{flex:none;display:flex;align-items:center;gap:6px;scroll-snap-align:start;
  padding:7px 12px;border-radius:14px;background:var(--card);
  box-shadow:inset 0 0 0 1px var(--line2);color:var(--ink2);
  font-size:13.5px;font-weight:700;white-space:nowrap;max-width:230px;cursor:pointer;
  transition:background .15s,color .15s}
.ctab>*:first-child{min-width:0;overflow:hidden;text-overflow:ellipsis}
@media (hover:hover){.ctab:not(.on):hover{background:var(--soft)}}
.ctab.on{background:var(--blue);color:#fff;box-shadow:none}
.ctab-n{font-weight:600;opacity:.62;font-variant-numeric:tabular-nums}
.ctab.on .ctab-n{opacity:.8}
.ctab .badge{min-width:18px;height:18px;font-size:11px}

/* ───────── a student asking for support lessons */
.sup-offer{text-align:center}
.sup-offer h3{margin:10px 0 6px}
.sup-offer p{max-width:46ch;margin:0 auto 10px}
.sup-art{width:120px;height:120px;margin:0 auto;color:var(--line2)}
.sup-offer .btn{margin-top:6px}
.sup-asked .row{align-items:flex-start;gap:11px}
.sup-asked .hw-i{background:var(--green-t);color:var(--green3)}
.sup-said{margin:10px 0 8px;padding:10px 12px;border-radius:10px;background:var(--soft);
  white-space:pre-wrap;font-size:14.5px}
.sup-why{margin-top:2px}
.sup-why .chip{text-align:left;white-space:normal}
.sup-why .chip.on{background:var(--blue-t);color:var(--blue2);box-shadow:inset 0 0 0 1.5px var(--blue2)}

/* ───────── handing groups to another teacher */
.hd .hd-h{margin:14px 0 6px;font-size:14px;font-weight:800;color:var(--mute);
  text-transform:uppercase;letter-spacing:.06em}
.hd-pickall{gap:7px;align-items:center;margin-bottom:8px}
.hd-list,.hd-who{gap:6px}
.hd-g.on,.hd-t.on{border-color:var(--blue);background:var(--blue-t)}
.hd-t[disabled]{opacity:.5}
.hd-t .gi{width:30px;height:30px;border-radius:50%;background:var(--soft2);
  display:grid;place-items:center;flex:none}
.p-h .btn.sm{margin-left:8px;vertical-align:middle}

/* ───────── the recording follows the scroll
   A student filling in nine gaps, or reading the Real Speak passage, was
   scrolling back to the top of the part for every replay. The player stays
   with them instead, pinned just under the bar.

   It docks below the top bar rather than at the very top, because the bar is
   sticky at 0 and sits above everything at z-index 40. The part tabs stick at
   0 too and pass behind it, so this sits clear of both at a lower z-index
   than the bar — the bar still wins, which is right. */
.au-stick{position:sticky;top:calc(var(--top) + var(--sat) + 8px);z-index:18;
  background:var(--card);border:1px solid var(--line);border-radius:15px;
  padding:4px 11px;box-shadow:0 7px 24px rgba(10,31,68,.11)}
.au-stick .au{margin:0}
@media (prefers-reduced-motion:reduce){.au-stick{box-shadow:0 2px 8px rgba(10,31,68,.14)}}
/* the Real Speak heading now sits above the player rather than inside the card */
.p-h.rsa-h{display:flex;align-items:center;gap:7px}
.rsa-intro{margin:-6px 0 10px}

/* ───────── NEWS — the head teacher's board
   A column of posts, read top to bottom, that has to look like something
   worth stopping on rather than a settings list. The one the reader has not
   seen carries a left edge in the academy's red and a "New" mark; a pinned
   one sits in a warmer card so the eye knows before it reads why that post is
   above a newer one. */
.nt-new{margin-bottom:14px}
.nt-list{display:flex;flex-direction:column;gap:13px}
.card.nt{padding:15px 16px 14px}
.card.nt.fresh{box-shadow:inset 4px 0 0 var(--red2),var(--shadow)}
.card.nt.pin{background:var(--soft);border-color:var(--line2)}
.card.nt.draft{border-style:dashed;opacity:.92}
.nt-h{display:flex;align-items:center;gap:10px;flex-wrap:wrap}
.nt-h .av{flex:none;width:36px;height:36px}
.nt-by{display:flex;align-items:baseline;gap:6px;flex-wrap:wrap}
.nt-by b{font-size:14.5px;font-weight:800}
.nt-by em{font-style:normal;font-size:11.5px;font-weight:700;color:var(--mute)}
.nt-when{display:block;margin-top:1px;font-size:12px;color:var(--mute)}
.nt-tag{flex:none;display:inline-flex;align-items:center;gap:3px;font-size:10px;font-weight:800;
  letter-spacing:.07em;text-transform:uppercase;border-radius:6px;padding:3px 7px;
  background:var(--soft2);color:var(--ink2)}
.nt-tag .ic{width:13px;height:13px}
.nt-tag.new{background:var(--red2);color:#fff}
.nt-tag.pin{background:var(--blue-t);color:var(--blue2)}
.nt-tag.draft{background:var(--line2);color:var(--mute)}
.nt-t{font-size:19px;font-weight:900;letter-spacing:-.015em;line-height:1.2;margin:11px 0 0}
/* Reading length, not card width: a notice that runs the full width of a
   laptop is read at the first line and skipped at the second. */
.nt-b{margin-top:7px;font-size:14.5px;line-height:1.55;max-width:62ch}
.nt-b p{margin:0 0 8px}
.nt-b p:last-child{margin-bottom:0}
.nt-b ul{margin:0 0 8px;padding-left:20px}
.nt-b li{margin:2px 0}
.nt-until{display:flex;align-items:center;gap:5px;margin:10px 0 0;font-size:12.5px;
  font-weight:700;color:var(--mute)}
.nt-until .ic{width:15px;height:15px}
.nt-f{display:flex;align-items:center;gap:7px;flex-wrap:wrap;margin-top:13px;
  padding-top:11px;border-top:1px solid var(--line)}
.nt-f .btn.icon.ghost{margin-left:auto}
.nt-edit .check{display:flex;align-items:center;gap:9px;font-size:14px;font-weight:700}
@media (max-width:420px){.nt-t{font-size:17.5px}.card.nt{padding:13px 14px 12px}}

/* ───────── ONE SPEAKING TASK AT A TIME
   The speaking tab holds four exercises and a teacher sets one of them. When
   one is set the others are not drawn at all, and this line says why the page
   is short — otherwise a student who knows the page is left wondering what
   broke. Said once, at the top, in the colour the rest of the app uses for
   "your teacher asked for this". */
.sp-only{display:flex;align-items:flex-start;gap:8px;margin:0 0 16px;padding:11px 13px;
  border-radius:13px;background:var(--red-t);color:var(--ink);font-size:13.5px;line-height:1.45}
.sp-only .ic{flex:none;width:17px;height:17px;margin-top:2px;color:var(--red2)}
.sp-only b{font-weight:800}

/* ───────── A SUPPORT TEACHER'S CONSTANT WEEK
   The stretches she is free, one line each — not a seven-day grid with four
   empty days in it. The day and the hours read as one block on the left, the
   same shape as a window row below, so the two lists feel like the same
   thing at two scales. */
.hr-rule{display:flex;align-items:center;gap:12px;flex-wrap:wrap}
.hr-rule .hr-time{width:92px}
.hr-rule .hr-time span{font-size:15px;letter-spacing:-.01em}
.hr-rule .b{font-weight:700}
.hr-rule .grow{min-width:120px}
.hr-week-acts{display:flex;gap:8px;flex-wrap:wrap;margin-top:11px}
.hr-week-acts .btn{flex:1 1 auto;justify-content:center}
.hw-count,.hwr-count{margin:7px 0 0;font-weight:700}
/* the day heading's own clear button sits at the end of the heading row */
.sec-head.run-day{flex-wrap:wrap}
.sec-head.run-day .btn.sm{margin-left:auto}
@media (max-width:420px){
  .hr-rule .hr-time{width:100%;flex-direction:row;align-items:baseline;gap:7px}
  .hr-rule .hr-time span{font-size:14px}
  .hr-rule .btn.sm{flex:1 1 auto;justify-content:center}
  .hr-rule .btn.icon.sm{flex:0 0 auto}
}

/* the one phone change, once it is used */
.pf-used{display:inline-flex;align-items:center;gap:4px;font-weight:700;white-space:nowrap}
.pf-used .ic{width:16px;height:16px;color:var(--green3)}
.stu-phone-was{display:block;margin-top:2px;font-size:11.5px;font-weight:600}

/* ───────── THE LEADERBOARD
   A ranked column that has to stay readable at four hundred rows and still
   feel like a competition at the top of it. The top three carry a medal
   colour; your own row is pinned out in the academy's red so you can find
   yourself by eye while scrolling. */
.page-league .cn-head{margin-bottom:14px}
.lg-seg{margin:14px 0 13px}
/* the class picker, for a member of staff with more than one to look at */
.lg-pick{display:flex;align-items:center;gap:9px;margin:0 2px 11px}
.lg-pick > span{flex:none}
.lg-pick select{flex:1;min-width:0}
.lg-board{padding:5px 6px;overflow:hidden}
.lg-row{display:flex;align-items:center;gap:10px;padding:9px 9px;border-radius:12px;
  border-bottom:1px solid var(--line)}
.lg-row:last-child{border-bottom:0}
.lg-pos{flex:none;width:30px;text-align:center;font-weight:800;font-variant-numeric:tabular-nums;
  color:var(--mute);font-size:13.5px}
.lg-row .cn-badge.xs{flex:none}
.lg-who{min-width:0}
.lg-who b{display:block;font-size:14.5px;font-weight:800;letter-spacing:-.01em;
  overflow:hidden;text-overflow:ellipsis;white-space:nowrap}
.lg-who small{display:block;font-size:11.5px;color:var(--mute);font-weight:600;
  overflow:hidden;text-overflow:ellipsis;white-space:nowrap}
.lg-xp{flex:none;text-align:right}
.lg-xp b{display:block;font-size:16px;font-weight:900;font-variant-numeric:tabular-nums;letter-spacing:-.02em}
.lg-xp small{display:block;font-size:10px;font-weight:800;letter-spacing:.08em;color:var(--mute)}
/* your own row, findable by eye */
.lg-row.me{background:var(--red-t);box-shadow:inset 3px 0 0 var(--red2)}
.lg-row.me .lg-who b{color:var(--red2)}
/* the medals */
/* A SOLID COLOUR UNDER EVERY GRADIENT.
   The metal is a gradient, and a gradient is not a colour anything can read
   back: in dark mode the medal's dark lettering was being measured against
   the dark card behind it and came out at 1.2:1. The background-color is the
   gradient's own mid-tone, so what is measured is what is seen — and it is
   also what shows if the gradient ever fails to paint. */
.lg-m{display:inline-grid;place-items:center;min-width:24px;height:24px;padding:0 5px;border-radius:7px;
  font-size:11px;font-weight:900;letter-spacing:.02em;color:#3a2a00;
  background-color:#E8B531;
  background-image:linear-gradient(160deg,#FFE9A3,#E8B531 55%,#B98A16);
  box-shadow:inset 0 1px 0 rgba(255,255,255,.65),0 1px 2px rgba(0,0,0,.18)}
.lg-m.second{color:#2b3138;background-color:#C3CCD6;
  background-image:linear-gradient(160deg,#F4F7FA,#C3CCD6 55%,#95A1AE)}
.lg-m.third{color:#3a2414;background-color:#C78A5A;
  background-image:linear-gradient(160deg,#F0C9A6,#C78A5A 55%,#9A6435)}
.lg-m.big{min-width:46px;height:38px;font-size:16px;border-radius:11px}
.lg-row.top1{background:linear-gradient(90deg,rgba(232,181,49,.14),transparent 62%)}
.lg-row.top2{background:linear-gradient(90deg,rgba(149,161,174,.13),transparent 62%)}
.lg-row.top3{background:linear-gradient(90deg,rgba(154,100,53,.12),transparent 62%)}
.lg-row.top1.me,.lg-row.top2.me,.lg-row.top3.me{background:var(--red-t)}
.lg-gap{text-align:center;color:var(--mute);letter-spacing:.3em;padding:5px 0 2px;font-weight:800}
.lg-note{margin:10px 2px 0}
/* what holding a place pays */
.lg-prize{margin-bottom:0}
.lg-pay{list-style:none;margin:9px 0 0;padding:0;display:flex;flex-direction:column;gap:8px}
.lg-pay li{display:flex;align-items:center;gap:9px;flex-wrap:wrap}
.lg-pay li b{font-size:14px;font-weight:800}
.lg-pay li small{color:var(--mute);font-weight:600;font-size:11.5px;flex:1 1 140px}
.lg-won-row{display:flex;align-items:center;gap:12px}
.lg-won-h{display:block;font-size:15.5px;font-weight:900;letter-spacing:-.015em}
.lg-won-pay{flex:none;text-align:right}
.lg-won-pay b{display:block;font-size:22px;font-weight:900;font-variant-numeric:tabular-nums;
  letter-spacing:-.025em;color:var(--gold3,#B98A16)}
.lg-won-pay small{display:block;font-size:10px;font-weight:800;letter-spacing:.07em;color:var(--mute)}
@media (max-width:420px){
  .lg-row{gap:8px;padding:8px 6px}
  .lg-pos{width:24px;font-size:12.5px}
  .lg-xp b{font-size:15px}
}

/* ───────── THE MOMENT THE WORK IS DONE
   A full-screen HUD that lands when the last piece of homework goes in. The
   card is the same navy world as the Rank page so it reads as that screen
   arriving rather than a notification. Every spark is a div on its own arc;
   nothing here is a video or an image. */
.xpw{position:fixed;inset:0;z-index:300;display:grid;place-items:center;padding:20px;
  opacity:0;transition:opacity .22s var(--ease)}
.xpw.in{opacity:1}
.xpw-scrim{position:absolute;inset:0;background:rgba(2,6,23,.72);backdrop-filter:blur(3px)}
.xpw-card{position:relative;width:min(400px,100%);border-radius:24px;padding:26px 22px 20px;
  text-align:center;overflow:hidden;color:#fff;
  background-color:var(--hud,#01004C);
  background-image:radial-gradient(120% 80% at 50% -10%,rgba(255,255,255,.16),transparent 60%);
  box-shadow:0 30px 80px rgba(0,0,0,.5),inset 0 1px 0 rgba(255,255,255,.18);
  transform:scale(.94) translateY(8px);transition:transform .3s cubic-bezier(.2,1.1,.3,1)}
.xpw.in .xpw-card{transform:none}
.xpw-sound{position:absolute;top:12px;right:12px;z-index:3;width:34px;height:34px;border:0;
  border-radius:50%;display:grid;place-items:center;cursor:pointer;color:#fff;
  background:rgba(255,255,255,.14)}
.xpw-sound .ic{width:18px;height:18px}
.xpw-sky{position:absolute;inset:0;pointer-events:none}
.xpw-sky i{position:absolute;left:var(--x);top:var(--y);width:var(--s);height:var(--s);
  border-radius:50%;background:rgba(255,255,255,.7)}
.xpw-kick{font-size:10.5px;font-weight:900;letter-spacing:.16em;text-transform:uppercase;
  color:rgba(255,255,255,.62)}
.xpw-badge{margin:14px 0 6px;display:grid;place-items:center}
.xpw-up{font-size:11px;font-weight:900;letter-spacing:.2em;text-transform:uppercase;
  color:#FFD775;margin-bottom:2px}
.xpw-rank{font-size:26px;font-weight:900;letter-spacing:-.03em;line-height:1.1}
.xpw-xp{margin:14px 0 9px}
.xpw-xp b{display:block;font-size:40px;font-weight:900;letter-spacing:-.04em;line-height:1;
  font-variant-numeric:tabular-nums;text-shadow:0 0 22px rgba(255,255,255,.3)}
.xpw-xp small{display:block;margin-top:3px;font-size:10px;font-weight:800;letter-spacing:.14em;
  text-transform:uppercase;color:rgba(255,255,255,.6)}
.xpw-bar{position:relative;overflow:visible}
.xpw-sparks{position:absolute;inset:0;pointer-events:none;overflow:visible}
.xpw-sparks i{position:absolute;left:var(--x);top:50%;width:var(--sz);height:var(--sz);
  border-radius:50%;background:#FFE3A3;box-shadow:0 0 6px 1px rgba(255,200,90,.9);
  animation:xpwSpark var(--ms) linear forwards}
@keyframes xpwSpark{
  from{transform:translate(0,0) scale(1);opacity:1}
  to{transform:translate(var(--dx),var(--dy)) scale(.2);opacity:0}}
.xpw-next{margin-top:9px;font-size:12.5px;font-weight:700;color:rgba(255,255,255,.72)}
.xpw-ok{margin-top:16px}
/* the promotion hit */
.xpw.up .xpw-card.bang,.xpw-card.bang{animation:xpwBang .5s cubic-bezier(.2,1.3,.3,1)}
@keyframes xpwBang{
  0%{transform:scale(1)} 18%{transform:scale(1.045) rotate(-.5deg)}
  42%{transform:scale(.99) rotate(.3deg)} 100%{transform:scale(1)}}
.xpw.up.done .xpw-badge{animation:xpwMedal .7s cubic-bezier(.2,1.2,.3,1)}
@keyframes xpwMedal{
  0%{transform:scale(.4) rotate(-22deg);filter:brightness(2.4)}
  55%{transform:scale(1.14) rotate(4deg)}
  100%{transform:none;filter:none}}
@media (prefers-reduced-motion:no-preference){
  .xpw-sky i{animation:skyDrift var(--d) linear infinite}
}
/* asked for less motion: the numbers, and nothing that moves or flies */
.xpw.calm .xpw-card{transition:none;transform:none;animation:none !important}
.xpw.calm .xpw-badge,.xpw.calm .xpw-sky i{animation:none !important}
.xpw.calm .xpw-sparks{display:none}
@media (max-width:420px){
  .xpw-card{padding:22px 16px 16px;border-radius:20px}
  .xpw-rank{font-size:22px}
  .xpw-xp b{font-size:34px}
}

/* ───────── THE MEDAL AT ROW SIZE
   .med was built at 72px and 118px, and every size inside it that is not a
   percentage was tuned for those: the rank code is a fixed 9px of mono with
   wide letter-spacing. Dropped into a 30px badge on a leaderboard row, that
   word is nearly as wide as the medal itself and crushes the chevron it sits
   under — which is the disproportion Mr. Karim circled.

   At this diameter the word is also redundant: the row says the rank in full,
   in words, right beside the name. So the small medal is the chevron and the
   metal, and nothing else. */
.cn-badge.med.xs{width:30px;height:30px}
.cn-badge.med.xs .med-disc{gap:0}
.cn-badge.med.xs .med-disc b{display:none}
.cn-badge.med.xs .med-disc .cn-b-art{width:54%;height:54%;filter:none}
.cn-badge.med.xs .med-ring::after{inset:9%}
.cn-badge.med.xs .med-shine{opacity:.5}
/* a reader who is not on the board yet: their own row, with a dash for a place */
.lg-row.nil .lg-pos{color:var(--mute);font-weight:800}
.lg-row.nil .lg-xp b{color:var(--mute)}

/* ── the rank gives light off, on Home ──────────────────────────────────────
   Mr. Karim: "there should be a radiant glowing off the rank in the homepage
   as well."

   The medal was lit from the front only — a turning ring, a raised disc, a
   sweep of shine across it — and it sat on that dark plate giving nothing
   off. Light that never leaves the object is not radiance.

   So there is a halo behind it now, in the metal's own colour: red for the
   enlisted ranks, blue for an officer, gold for the general, which are the
   three metals the medal is already cast in, so the glow reads as the medal's
   own light rather than something stuck on behind it. It breathes, slowly
   enough that you notice it rather than watch it.

   Two things keep it honest. It is painted at z-index 0, under the ring, the
   disc and the shine, so nothing on the card gets harder to read; and it is
   142% of a 62px medal, which is 13px of spill into a 15px gutter, because
   .rk-home is overflow:hidden and a halo that reached the edge would be cut
   off in a straight line. */
.rk-home .cn-badge.med{--halo:rgba(255,96,116,.72);--halo2:rgba(255,160,175,.9)}
.rk-home .cn-badge.med.cn-of{--halo:rgba(132,162,255,.74);--halo2:rgba(190,210,255,.9)}
.rk-home .cn-badge.med.cn-hf{--halo:rgba(255,206,92,.78);--halo2:rgba(255,238,180,.95)}
.rk-home .cn-badge.med::before{content:"";position:absolute;left:50%;top:50%;
  width:160%;height:160%;transform:translate(-50%,-50%);border-radius:50%;
  pointer-events:none;z-index:0;
  background:radial-gradient(closest-side,var(--halo) 38%,rgba(0,0,0,0) 88%)}
/* the ring sits over the halo, not in it */
.rk-home .med-ring{z-index:1}
/* and the rim itself picks the colour up, so the edge reads as hot metal:
   a tight bright one for the rim, a wide soft one for the air around it */
.rk-home .cn-badge.med .med-3d{filter:drop-shadow(0 0 3px var(--halo2)) drop-shadow(0 0 9px var(--halo))}
@media (prefers-reduced-motion:no-preference){
  @keyframes rkhGlow{0%,100%{opacity:.78;transform:translate(-50%,-50%) scale(.96)}
    50%{opacity:1;transform:translate(-50%,-50%) scale(1.04)}}
  .rk-home .cn-badge.med::before{animation:rkhGlow 3.8s ease-in-out infinite}
}

/* ── the editor a teacher marks in ───────────────────────────────────────
   Three fields instead of one message box (see review.js). The fields grow as
   they are typed into and never scroll inside themselves, because a teacher
   re-reading what they wrote should not have to scroll a box inside a pane
   inside a page. */
.rv-ed .rv-mode{margin-bottom:12px}
.rv-f-wrap{margin-bottom:13px}
.rv-f-wrap .lbl{margin-bottom:5px}
.rv-f{display:block;width:100%;resize:none;overflow:hidden;min-height:62px;line-height:1.5}
.rv-f.rv-body{min-height:150px}
.rv-f-wrap .rv-quick,.rv-ed #rv-ed-body > .rv-quick{margin-top:7px}
/* These sit in a pane about 300px wide and the lines are whole sentences, so
   a chip that refuses to wrap runs straight out of the side of the page. They
   wrap, and they are left-aligned, because a wrapped sentence centred in a
   button reads as two fragments. */
.rv-quick{flex-wrap:wrap;gap:6px}
.rv-quick .btn{font-weight:600;white-space:normal;text-align:left;
  max-width:100%;height:auto;min-height:0;padding:6px 10px;line-height:1.35}
.rv-count{margin:2px 2px 12px;text-align:right;font-variant-numeric:tabular-nums}
/* the grade is the lesson's, so it is set apart from the writing about one
   piece of it rather than sitting in the same run of fields */
.rv-grade{margin:4px 0 2px;padding:12px 13px;border:1px solid var(--line);
  border-radius:var(--r-sign);background:var(--soft)}
.rv-grade .lbl{margin-bottom:3px}
.rv-grade p{margin:0 0 9px}
/* the lesson's letter on the queue card, beside what is still owed */
.rv-bend .gchip{margin-right:7px}

/* ── down to the vocabulary test ─────────────────────────────────────────
   Mr. Karim asked for a neon red arrow on the vocabulary tab saying the test
   is below, and for it to jump you there. Neon here means the academy's own
   red lit from behind, not a colour from somewhere else: the same --rd the
   rest of the app uses, with a glow under it so it reads as the one live
   thing on a page of word lists. */
.w-totest{position:relative;background:var(--red);border-color:transparent;color:#fff;
  font-weight:800;letter-spacing:.01em;
  box-shadow:0 0 0 1px rgba(210,16,48,.5),0 6px 18px -6px rgba(210,16,48,.85),
    0 0 22px -4px rgba(255,60,96,.75)}
.w-totest:hover{background:#E4133C}
.w-totest .ic{color:#fff}
.w-totest-a{display:inline-flex;margin-left:-3px}
/* the card it lands on says so for a moment */
.vq-gate.flash{animation:vqFlash 1.5s ease-out 1}
@keyframes vqFlash{0%{box-shadow:0 0 0 0 rgba(210,16,48,.55)}
  35%{box-shadow:0 0 0 7px rgba(210,16,48,.22)}
  100%{box-shadow:0 0 0 0 rgba(210,16,48,0)}}
@media (prefers-reduced-motion:no-preference){
  @keyframes wTotestNudge{0%,88%,100%{transform:translateY(0)}94%{transform:translateY(3px)}}
  .w-totest-a{animation:wTotestNudge 2.6s ease-in-out infinite}
}

/* ── a stretch's own windows ─────────────────────────────────────────────
   NOTE ON COLOURS: --ln, --pp, --bl and --gold are the RANK PAGE's own
   palette and are only defined inside it. Used anywhere else they resolve to
   nothing, the whole declaration is thrown away, and you get a borderless
   transparent box that looks like plain text. The global tokens live in
   base.css: --line, --soft, --blue, --orange, --red.
   A support teacher taps the window count on a stretch and gets the windows
   themselves, one chip per time, grouped by date (see hours.js). Tap to take
   one down, tap again to put it back. */
.hr-wbtn{display:inline-flex;align-items:center;gap:3px;margin:0;padding:2px 0;
  border:0;background:none;font:inherit;font-size:12.5px;font-weight:700;
  color:var(--blue);cursor:pointer;text-align:left}
.hr-wbtn .ic{opacity:.75}
@media (hover:hover){.hr-wbtn:hover{text-decoration:underline}}
.hr-wbtn:focus-visible{outline:2px solid var(--yellow);outline-offset:2px;border-radius:4px}

.hw-day{margin-bottom:13px}
.hw-day .lbl{margin-bottom:6px}
.hw-chips{display:flex;flex-wrap:wrap;gap:6px}
.hw-win{min-width:62px;padding:7px 9px;border-radius:9px;border:1px solid var(--line);
  background:var(--soft);color:var(--ink);font:inherit;font-size:13px;font-weight:700;
  font-variant-numeric:tabular-nums;cursor:pointer;transition:transform .12s,opacity .12s}
@media (hover:hover){.hw-win:hover{transform:translateY(-1px)}}
.hw-win:focus-visible{outline:2px solid var(--yellow);outline-offset:2px}
/* up, taken down, and spoken for — three states a teacher must tell apart at
   a glance on a grid of thirty, so they differ by more than colour: the one
   that is down is struck through, the one with a person on it is ringed */
.hw-win.on{border-color:var(--blue);box-shadow:inset 0 0 0 1px var(--blue)}
.hw-win.off{opacity:.5;text-decoration:line-through;background:transparent}
.hw-win.held{border-color:var(--orange);box-shadow:inset 0 0 0 2px var(--orange)}
.hw-win.busy{opacity:.45;pointer-events:none}
.hw-sum{margin:2px 0 0}

/* ── the Exam Room, in a frame ───────────────────────────────────────────
   Exam Room is served as itself at /exam/ and given the whole page, so that
   it stays exactly the room Mr. Karim built rather than a version of it
   re-drawn inside this stylesheet. While it is open the app's own chrome
   steps out of the way. */
   The frame is NOT inside #main. repaint() rewrites #main.innerHTML, and a
   replaced iframe starts its page again from nothing — which is what made
   the room reload itself over and over on a server where something is always
   changing. It hangs on <body> instead and is only shown and hidden, so an
   exam in progress survives both a repaint and a trip to another tab. */
.page-exam{padding:0;max-width:none;margin:0;min-height:100vh;min-height:100dvh}
#exam-host{display:none}
body.in-exam #exam-host{display:block;position:fixed;inset:0;z-index:40}
.exam-frame{display:block;width:100%;height:100%;border:0;background:#F5F3EE}
body.in-exam .tabs,body.in-exam .topbar,body.in-exam .tabbar{display:none}
body.in-exam #main{padding:0;max-width:none}
body.in-exam{overflow:hidden}

/* ── the door to the Exam Room ───────────────────────────────────────────
   It borrows .notice for its shape, but not its colour: .notice is the
   academy's yellow caution strip, and an invitation to go and examine a
   student is not a warning. Navy, like the room it opens. */
.exam-door{text-decoration:none;background:var(--blue-t);border-color:#C6D2EE;color:var(--ink)}
.exam-door .diamond{background:var(--blue);color:#fff;
  box-shadow:inset 0 0 0 2px var(--blue),inset 0 0 0 3.2px #fff}
.exam-door .small{opacity:.78}
@media (hover:hover){.exam-door:hover{border-color:var(--blue);
  box-shadow:0 2px 10px -4px rgba(18,73,155,.4)}}

/* ───────── letting somebody go (head.js)
   Global tokens only: --line, --soft, --red, --red-t, --ink2, --mute, --r-s. */
.sg-box{border:1px solid var(--line);border-radius:var(--r-s);
  background:var(--soft);padding:10px 12px}
.sg-h{display:flex;align-items:center;gap:7px;font-weight:650;
  font-size:.88rem;color:var(--ink2);margin-bottom:7px}
.sg-holds{list-style:none;margin:0;padding:0;display:grid;gap:7px}
.sg-holds li{display:flex;align-items:flex-start;gap:8px;
  font-size:.88rem;line-height:1.45}
.sg-holds li .ic{flex:none;margin-top:2px;color:var(--mute)}
.sg-holds b{font-weight:650}
/* Apart from the row of ordinary buttons, because it is not an ordinary one. */
.sg-btn{margin-left:auto}
@media (max-width:520px){.sg-btn{margin-left:0;width:100%;justify-content:center}}
/* XP 2: the small "+30 XP · 2 more to do" kicker on the bar overlay */
.xpw-kick small.xpw-left{display:block;margin-top:4px;font-size:10px;letter-spacing:.1em;opacity:.75}
/* 20 Nov: the exact reason a student cannot get in */
.blocked .why-main{font-size:15px;line-height:1.5}
.why-fix p{margin:0;line-height:1.5}
.why-you{display:grid;gap:2px;padding:10px 12px;border-radius:12px;background:var(--soft,rgba(0,0,0,.05))}
.why-you small{font-size:11px;letter-spacing:.08em;text-transform:uppercase;opacity:.7}
/* 20 Nov: the "Sign out" link under the paused / SoffCRM screens had lost its
   position, so its 44px tap area (.link::after) was laid over the middle of the
   whole card — pressing "Qayta tekshirish" could sign the student out. */
.blocked .foot .link,.auth-box .foot .link,.center-page .foot .link{position:relative}
/* ═══════════════════════════════════════════════════════════════════════════
   THE LAUNCH MATERIALS — stage two of the port

   The shell passed its route walk (620 visits, five roles, five widths, both
   themes), so the Launch values now move up to :root, where every one of the
   55 screens picks them up at once: paper, ink, navy, the one red, the soft
   navy shadows, Barlow and the mono labels.

   This file is loaded after base.css and app.css and before shell.css. It
   holds, in order:
     1. the tokens, light and dark
     2. type
     3. the components every screen is made of (button, card, plate, chip,
        segmented, input, tile, list, meter, sheet)
   Screen-by-screen layout changes follow below those, one block per screen.

   The old token NAMES stay (--green, --blue, --yellow…) because 4,700 lines
   of screen CSS speak them. Their VALUES are the Launch ones:
     --green  → ok      --blue → info      --yellow → warn
     --orange → warn    (Launch has no orange)
   and the new names (--navy, --ok, --warn, --info…) are added beside them for
   everything written from here on.

   Two values are NOT the brief's, on purpose, because the brief also says
   contrast is measured and not eyeballed:
     --mute   brief #7C7FA3 = 3.47:1 on paper  →  #5E628B = 5.2:1, and 4.7:1
              on the soft tracks, where the first try (#666A93) fell to 4.4
     --faint  brief #A9ABC6 = 2.25:1 on white  →  #5E628B
     --blue   as text on its own tint, #2563FF = 4.27:1  →  #1F57E8 = 5.1:1
     dark --faint  brief #6B6FB0 = 3.99:1      →  #8489C6
   Both are used for real text all over the app (helper lines, placeholders).
   ═══════════════════════════════════════════════════════════════════════════ */

:root {
  --paper: #F1F2F9; --card: #FFFFFF;
  --ink: #0A0B2E; --ink2: #3A3C66; --mute: #5E628B; --faint: #5E628B;
  --line: #E6E7EF; --line2: #CFD1DF; --soft: #F5F6FA; --soft2: #ECEEF5;
  --exit-off: #5E628B;

  --navy: var(--panel, #111A7C); --navy2: #1A2494; --navy3: #2530AC; --navy-t: #EEEEF8;
  --on-navy: #FFFFFF; --on-navy2: #C9CCEC; --on-navy3: #8B8FC4;

  --red: #E31937; --red2: #9E1024; --red-t: #FDECEF; --red-hov: #C7142F; --red-ink: #9E1024;

  --ok: #0E8A5F; --ok-t: #E6F5EE; --ok-ink: #0A5E42;
  --warn: #E9A100; --warn-t: #FFF5DB; --warn-ink: #6A4B00;
  --info: #2563FF; --info-t: #EAF0FF; --info-ink: #163FA8;
  --gold: #F2B705;

  /* the old names, now carrying Launch values */
  --green: #0B7A54; --green2: #0E8A5F; --green3: #0A5E42; --green-t: #E6F5EE;
  --blue: #1F57E8; --blue2: #1F57E8; --blue3: #163FA8; --blue-t: #EAF0FF; --blue-hov: #1B50D8;
  --yellow: #E9A100; --yellow2: #E9A100; --yellow-t: #FFF5DB; --yellow-ink: #6A4B00;
  --orange: #E9A100; --orange-t: #FFF5DB; --orange-ink: #6A4B00;
  --flap: #2430A6; --flap-ink: #FFFFFF;

  --r: 10px; --r-s: 8px; --r-l: 16px; --r-sign: 16px;
  --top: 64px; --tab: 66px;
  --shadow: 0 1px 2px rgba(1,0,76,.05), 0 14px 34px -16px rgba(1,0,76,.2);
  --shadow-up: 0 2px 6px rgba(1,0,76,.07), 0 28px 56px -20px rgba(1,0,76,.34);

  --f: "NE Sans", system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
  --mono: "NE Mono", ui-monospace, Menlo, monospace;
}

:root[data-theme="dark"] {
  --paper: #0B0E36; --card: #151A58; --soft: #1B216A; --soft2: #232A7E;
  --ink: #F2F3FF; --ink2: #C9CCEC; --mute: #9499CF; --faint: #8489C6;
  --line: #2A3085; --line2: #3D44A8; --exit-off: #9499CF;

  --navy: #1C2496; --navy2: #2530AC; --navy3: #2F3BC2; --navy-t: #1E2472;

  --red: #E31937; --red2: #FF8A9A; --red-t: #3A0F18; --red-hov: #F03350; --red-ink: #FF8A9A;
  --ok: #109A6E; --ok-t: #0B2A20; --ok-ink: #5FD6A6;
  --warn: #E9A100; --warn-t: #2C2412; --warn-ink: #FFE4A3;
  --info: #4D7DFF; --info-t: #122236; --info-ink: #A8CBFF;

  --green: #0C7A56; --green2: #109A6E; --green3: #5FD6A6; --green-t: #0B2A20;
  --blue: #2563FF; --blue2: #8FB0FF; --blue3: #A8CBFF; --blue-t: #122236; --blue-hov: #3D74FF;
  --yellow: #E9A100; --yellow2: #FFD970; --yellow-t: #2C2412; --yellow-ink: #FFE4A3;
  --orange: #E9A100; --orange-t: #2C2412; --orange-ink: #FFE4A3;
  --flap: #2430A6; --flap-ink: #FFFFFF;

  /* a card lifts by light at night, not by shadow */
  --shadow: inset 0 1px 0 rgba(255,255,255,.05), 0 18px 40px -20px rgba(0,0,0,.8);
  --shadow-up: inset 0 1px 0 rgba(255,255,255,.07), 0 26px 56px -20px rgba(0,0,0,.9);
}

/* ─────────── 2. type ─────────── */
body {
  font-family: var(--f); font-size: 16px; line-height: 1.5; letter-spacing: .004em;
}
button, input, select, textarea { font-family: inherit; }

/* thin phrase + one bold word: the <b> inside a heading carries the weight */
h1 { font-size: clamp(30px, 4.6vw, 48px); line-height: 1.04; font-weight: 400; letter-spacing: -.03em; text-wrap: balance; }
h2 { font-size: clamp(21px, 2.6vw, 26px); line-height: 1.12; font-weight: 400; letter-spacing: -.022em; text-wrap: balance; }
h3 { font-size: 17px; line-height: 1.25; font-weight: 500; letter-spacing: -.008em; }
h1 b, h1 strong, h2 b, h2 strong { font-weight: 600; }
/* inside a card or a sheet a heading is a title, not a headline */
.card h1, .sheet h1, .auth-card h1, .panel h1 { font-size: 22px; font-weight: 500; letter-spacing: -.015em; line-height: 1.15; }

/* the mono label */
.lbl, .eyebrow, .hello .date, .kpi-l, .sec-head .lbl {
  font: 500 11px/1.7 var(--mono); letter-spacing: .16em; text-transform: uppercase; color: var(--mute);
}
code, kbd { font-family: var(--mono); }

/* ─────────── 3. components ─────────── */

/* Button. Primary is navy now; red is kept for stop and destroy. Labels may
   wrap to two lines and never clip. */
.btn {
  min-height: 46px; padding: 6px 18px; border-radius: var(--r);
  font: 500 12px/1.25 var(--f); letter-spacing: .16em; text-transform: uppercase;
  white-space: normal; overflow-wrap: anywhere; max-width: 100%; text-align: center;
  transition: transform .18s var(--ease), background .2s, color .2s, box-shadow .2s, border-color .2s;
}
.btn:active { transform: scale(.98); }
.btn.go { background: var(--navy); color: #fff; border: 1px solid var(--navy); }
.btn.stop { background: var(--red); color: #fff; border: 1px solid var(--red); }
.btn.info { background: var(--info); color: #fff; border: 1px solid var(--info); }
.btn.warn { background: var(--warn-t); color: var(--warn-ink); border: 1px solid var(--warn); }
.btn.white { background: #fff; color: var(--panel, #111A7C); }
.btn.sm { min-height: 38px; padding: 4px 13px; font-size: 11px; letter-spacing: .13em; border-radius: 9px; }
.btn.lg { min-height: 54px; font-size: 13px; padding: 8px 26px; border-radius: 12px; }
.btn.icon { width: 46px; padding: 0; } .btn.icon.sm { width: 38px; }
@media (hover: hover) {
  .btn.go:hover { background: var(--navy2); border-color: var(--navy2); }
  .btn.stop:hover { background: var(--red-hov); border-color: var(--red-hov); }
}
:root[data-theme="dark"] .btn.go { background: #fff; color: var(--panel, #111A7C); border-color: #fff; }
:root[data-theme="dark"] .btn.go.busy::after { border-color: rgba(1,0,76,.3); border-top-color: var(--panel, #111A7C); }
@media (hover: hover) { :root[data-theme="dark"] .btn.go:hover { background: #E4E6FA; border-color: #E4E6FA; } }

/* Card */
.card, .list, .panel { border-radius: var(--r-l); box-shadow: var(--shadow); }
.kpi { border-radius: var(--r-l); box-shadow: var(--shadow); border-top-width: 1px; border-top-color: var(--line); }
.kpi b { font-weight: 500; letter-spacing: -.045em; font-size: clamp(26px, 5.4vw, 36px); }
.kpi-s { font-weight: 400; }

/* Plate */
.plate {
  height: auto; min-height: 22px; padding: 3px 8px; border-radius: 6px;
  font: 500 10px/1.3 var(--mono); letter-spacing: .12em; text-transform: uppercase;
  white-space: normal;
}
.plate.ok { background: var(--ok-t); color: var(--ok-ink); }
.plate.bad { background: var(--red-t); color: var(--red-ink); }
.plate.warn { background: var(--warn-t); color: var(--warn-ink); }
.plate.info { background: var(--info-t); color: var(--info-ink); }
.plate.work { background: var(--navy); color: #fff; }

/* Segmented: a soft track with a white raised pill */
.seg { border-radius: 13px; padding: 4px; }
.seg button { border-radius: 10px; font-weight: 500; font-size: 14px; }
/* a switch whose buttons carry an icon (the group editor's Course): icon and
   word on one line, centred, instead of the icon stacking above the word */
.wide-seg { display: flex; }
.wide-seg button { flex: 1 1 0; display: inline-flex; align-items: center; justify-content: center; gap: 8px; min-width: 0; }
.wide-seg button svg { flex: none; display: block; }
/* the selected option is light now, so its icon takes the text colour (an
   older rule painted it white for the old coloured selection) */
.seg button[aria-pressed="true"] .ic, .seg button.on .ic, .seg button[aria-selected="true"] .ic { color: inherit; }
.seg button[aria-pressed="true"], .seg button.on { box-shadow: 0 1px 2px rgba(1,0,76,.12), 0 4px 10px -6px rgba(1,0,76,.3); }

/* Input: 16px always, navy focus */
.input, select.input, textarea.input { font-size: 16px; border-width: 1px; border-radius: var(--r); font-weight: 400; }
.input:focus { border-color: var(--navy); box-shadow: 0 0 0 3.5px var(--navy-t); }
:root[data-theme="dark"] .input:focus { border-color: #8F93E6; }

/* List rows */
.li { min-height: 60px; gap: 14px; padding: 14px 18px; }
.li .t { font-weight: 500; }

/* Meter: a fine navy line, green once it is complete */
.meter { height: 4px; }
.meter > i { background: var(--navy); }
.meter.done > i, .meter > i.done { background: var(--ok); }
:root[data-theme="dark"] .meter > i { background: #8F93E6; }

/* Sheet */
.sheet { border-radius: 22px 22px 0 0; }
@media (min-width: 720px) { .sheet { border-radius: 20px; } }

/* Page proportions */
.page { max-width: 1120px; padding-top: 28px; }
.page.narrow { max-width: 760px; }
@media (min-width: 1000px) { .page { padding: 44px 48px 0; } }

/* Links and the focus ring take navy */
.link { color: var(--info-ink); }
:focus-visible { outline: 2px solid var(--navy); outline-offset: 2px; }
:root[data-theme="dark"] :focus-visible { outline-color: #A9ADF5; }

/* the sidebar is navy in both themes, whatever --navy does at night */
.sidebar { background: var(--panel, #111A7C); }

/* ═══════════════════════════════════════════════════════════════════════════
   STUDENT · HOME — matched to the concept demo, screen against screen
   ═══════════════════════════════════════════════════════════════════════════ */
.lh {
  position: relative; overflow: hidden; isolation: isolate;
  background: var(--panel, #111A7C); color: #fff;
  /* the faint drawing-paper grid of the concept's hero */
  background-image: linear-gradient(rgba(255,255,255,.035) 1px, transparent 1px), linear-gradient(90deg, rgba(255,255,255,.035) 1px, transparent 1px);
  background-size: 44px 44px;
  border-radius: 22px; padding: 30px 22px 104px;
}
/* the N, enormous and barely there, behind the right half */
.lh-wm { position: absolute; z-index: -1; right: -6%; top: -14%; height: 150%; width: auto; opacity: .06; pointer-events: none; transform: rotate(-8deg); }
.lh-date { font: 500 10.5px/1.7 var(--mono); letter-spacing: .22em; text-transform: uppercase; color: #8B8FC4; margin: 0 0 12px; }
.lh h1 { color: #fff; font-size: clamp(38px, 7vw, 60px); font-weight: 400; line-height: .98; letter-spacing: -.035em; text-wrap: initial; }
.lh h1 b { font-weight: 600; }
.lh-meta { margin: 16px 0 0; color: #C9CCEC; font-size: 15px; line-height: 1.45; overflow-wrap: anywhere; }
.lh-stats { display: flex; flex-wrap: wrap; gap: 14px 0; margin-top: 26px; }
.lh-stat { display: block; min-width: 0; padding: 0 clamp(18px, 4vw, 44px) 0 0; margin-right: clamp(18px, 4vw, 44px); border-right: 1px solid rgba(255,255,255,.16); color: #fff; }
.lh-stat:last-child, .lh-stat[hidden] + .lh-stat:last-child { border-right: 0; margin-right: 0; }
.lh-stat b { display: block; font: 500 clamp(26px, 6vw, 34px)/1.05 var(--f); letter-spacing: -.045em; }
.lh-stat span { display: block; margin-top: 8px; font: 500 9.5px/1.5 var(--mono); letter-spacing: .18em; text-transform: uppercase; color: #8B8FC4; }
/* the short red underline beneath the first number */
.lh-stat:first-child { position: relative; padding-bottom: 14px; }
.lh-stat:first-child::after { content: ""; position: absolute; left: 0; bottom: 0; width: 34px; height: 2px; background: var(--accent, #E31937); }

/* The next lesson: a white card riding up over the hero's lower edge. */
.next-card {
  position: relative; z-index: 1; display: block;
  margin: -72px 12px 26px; padding: 18px;
  background: var(--card); color: var(--ink);
  border: 1px solid var(--line); border-radius: var(--r-l); box-shadow: var(--shadow-up);
  transition: transform .3s var(--ease), box-shadow .3s;
}
@media (hover: hover) { a.next-card:hover { transform: translateY(-3px); } }
.nc-top { display: flex; align-items: flex-start; gap: 16px; }
.nc-num {
  flex: none; display: flex; flex-direction: column; align-items: flex-start; justify-content: center;
  width: 62px; height: 68px; padding: 0 12px; border-radius: 12px; background: var(--panel, #111A7C); color: #fff; position: relative;
}
.nc-num::after { content: ""; position: absolute; left: 12px; right: 12px; bottom: 9px; height: 2px; background: var(--accent, #E31937); }
.nc-num small { font: 500 7.5px/1 var(--mono); letter-spacing: .18em; text-transform: uppercase; color: #8B8FC4; margin-bottom: 4px; }
.nc-num b { font: 500 30px/1 var(--f); letter-spacing: -.04em; margin-bottom: 6px; }
.nc-main { flex: 1 1 160px; min-width: 0; display: block; }
.nc-way { display: flex; align-items: center; gap: 8px; font: 500 10px/1.7 var(--mono); letter-spacing: .2em; text-transform: uppercase; color: var(--mute); }
.nc-way i { width: 5px; height: 5px; border-radius: 50%; background: var(--accent, #E31937); flex: none; }
.nc-title { display: block; margin-top: 2px; font-size: clamp(21px, 3.2vw, 27px); font-weight: 500; letter-spacing: -.022em; line-height: 1.12; overflow-wrap: anywhere; }
.nc-parts { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 10px; }
.nc-parts .ic { width: 26px; height: 26px; padding: 6px; border-radius: 7px; background: var(--soft2); color: var(--mute); stroke-width: 1.7; }
.nc-note { display: block; margin-top: 6px; font-size: 13.5px; color: var(--mute); }
.nc-foot { display: flex; flex-wrap: wrap; align-items: center; gap: 12px 16px; margin-top: 16px; }
.nc-meter { flex: 1 1 140px; min-width: 0; }
.nc-count { flex: none; font: 500 10px/1 var(--mono); letter-spacing: .16em; text-transform: uppercase; color: var(--mute); }
.nc-go { flex: none; }
.nc-go .ic { transition: transform .25s var(--spring); }
@media (hover: hover) { a.next-card:hover .nc-go .ic { transform: translateX(4px); } }
@media (max-width: 560px) { .nc-go { width: 100%; } .nc-count { margin-left: auto; } }

.home-grid { grid-template-columns: minmax(0, 1fr) !important; margin-top: 16px; }
@media (min-width: 900px) { .home-grid > .board-wrap { width: fit-content; max-width: 100%; } }
#rk-home:not(:empty) { margin: 14px 0 16px; }

@media (min-width: 720px) {
  .lh { border-radius: 28px; padding: 44px 40px 120px; }
  .next-card { margin: -84px 28px 30px; padding: 22px 24px; }
  .nc-num { width: 80px; height: 88px; padding: 0 16px; }
  .nc-num::after { left: 16px; right: 16px; bottom: 12px; }
  .nc-num b { font-size: 42px; }
}
@media (min-width: 1000px) { .lh { padding: 56px 48px 124px; } .next-card { margin-inline: 32px; } }

/* The shortcut row stays on the desktop too, as it does in the concept:
   round-cornered icon tiles with a mono label under each. */
@media (min-width: 900px) {
  .tiles { display: flex !important; flex-wrap: wrap; gap: 8px 26px; margin: 0 0 26px 36px; }
  .tiles .tile { width: 72px; }
}
.tile { font: 500 9px/1.4 var(--mono); letter-spacing: .08em; text-transform: uppercase; color: var(--mute); }
.tile .ti { background: var(--card); color: var(--ink2); margin: 0 auto 8px; }

/* Section heads: a 22px red rule and a mono label, not a headline. */
.sec-head { align-items: center; padding-top: 44px; margin-bottom: 16px; }
.sec-head::before { display: none; }
.sec-head h2 {
  display: flex; align-items: center; gap: 12px; min-width: 0;
  font: 500 11px/1.7 var(--mono); letter-spacing: .2em; text-transform: uppercase; color: var(--ink2);
}
.sec-head h2::before { content: ""; flex: none; width: 22px; height: 2px; background: var(--accent, #E31937); }
.sec-head .link { font: 500 10.5px/1.7 var(--mono); letter-spacing: .16em; text-transform: uppercase; color: var(--ink2); }

/* the three numbers at the foot of the page */
.stat { border-radius: var(--r-l); box-shadow: var(--shadow); padding: 18px 20px; }
.stat b { font-weight: 500; letter-spacing: -.045em; font-size: clamp(28px, 6vw, 38px); }
.stat span { font: 500 9.5px/1.5 var(--mono); letter-spacing: .16em; text-transform: uppercase; margin-top: 8px; }

/* The road: numbered circles on a hairline, the current one navy with a red
   ring — the concept's road, with the same stops and the same taps. */
.road-in::before { top: 34px; height: 1px; background: var(--line2); border-radius: 0; }
.road-in::after { display: none; }
.rstop .exit { width: 46px; height: 46px; border-radius: 50%; background: var(--card); color: var(--ink); box-shadow: inset 0 0 0 1px var(--line2); }
.rstop .exit small { display: none; }
.rstop .exit b { font: 400 15px/1 var(--mono); margin: 0; }
.rstop .exit.done { background: var(--card); color: var(--ink); box-shadow: inset 0 0 0 1px var(--line2); }
.rstop .exit.off { background: transparent; color: var(--faint); box-shadow: inset 0 0 0 1px var(--line); }
.rstop.cur .exit { background: var(--panel, #111A7C); color: #fff; transform: none; box-shadow: 0 0 0 3px var(--paper), 0 0 0 5px var(--accent, #E31937); }
.rstop .st { font-weight: 400; font-size: 12px; color: var(--ink2); margin-top: 4px; }
.rstop.cur .st { font-weight: 600; color: var(--ink); }

/* ─────────── phone bars in Launch materials ─────────── */
.topbar { background: var(--card); border-bottom: 1px solid var(--line); }
.tabbar { background: var(--card); }
.tabbar a, .tabbar button { position: relative; }
/* active = ink and a red rule along the top edge; no filled pill */
.tabbar a.on, .tabbar button.on { color: var(--ink); }
.tabbar a.on .ti, .tabbar button.on .ti { background: none; color: var(--ink); }
.tabbar a.on::before, .tabbar button.on::before {
  content: ""; position: absolute; top: 0; left: 26%; right: 26%; height: 2px; background: var(--accent, #E31937); border-radius: 0 0 2px 2px;
}
/* Phone home shortcuts: four across, never a clipped word */
.tiles { grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 10px 4px; margin: 0 0 24px; }
.tile { overflow-wrap: anywhere; text-align: center; line-height: 1.2; }
.tile .ti { border-radius: 14px; box-shadow: var(--shadow); border: 1px solid var(--line); }

/* ─────────── the board and the staff hero are navy, in both themes ─────────── */
.board {
  background: var(--panel, #111A7C); border-radius: 16px; padding: 16px 18px;
  box-shadow: inset 0 0 0 1px rgba(255,255,255,.08), 0 24px 48px -30px rgba(1,0,76,.6);
}
.bp { background: var(--panel, #111A7C); border-radius: 22px; }
.bp .title-block { background: rgba(1,0,76,.7); }
@media (min-width: 720px) { .bp { border-radius: 28px; } }
.bp h1 { color: #fff; font-weight: 400; }

/* ─────────── lesson badge, part tabs, the play button ─────────── */
/* The lesson number: a navy rounded square with a mono numeral and the red
   underline. Done turns green, locked goes soft — nothing is red by default. */
.exit { background: var(--panel, #111A7C); color: #fff; border-radius: 12px; box-shadow: inset 0 -3px 0 var(--accent, #E31937); }
.exit small { font: 500 8px/1 var(--mono); letter-spacing: .14em; color: #8B8FC4; opacity: 1; }
.exit b { font: 500 19px/1.1 var(--mono); }
.exit.off { background: var(--soft2); color: var(--exit-off); box-shadow: none; }
.exit.off small { color: inherit; }
.exit.done { background: var(--ok-t); color: var(--ok-ink); box-shadow: inset 0 -3px 0 var(--ok); }
.exit.done small { color: inherit; }

.ptabs a { font-weight: 500; border-radius: 12px; }
.ptabs a[aria-selected="true"] { background: var(--navy); color: #fff; }
.ptabs a[aria-selected="true"] .ic { color: #fff; }
:root[data-theme="dark"] .ptabs a[aria-selected="true"] { background: #fff; color: var(--panel, #111A7C); }
:root[data-theme="dark"] .ptabs a[aria-selected="true"] .ic { color: var(--panel, #111A7C); }

/* "info" buttons were the blue primary of the road-sign system (Play the
   story, Start class). Primary is navy now; blue is left for the teacher's
   mark, which is a plate and a tint, never a button. */
.btn.info { background: var(--navy); border-color: var(--navy); color: #fff; }
@media (hover: hover) { .btn.info:hover { background: var(--navy2); border-color: var(--navy2); } }
:root[data-theme="dark"] .btn.info { background: #fff; border-color: #fff; color: var(--panel, #111A7C); }

/* at desktop width there is no top bar, so nothing sticky needs to clear one */
@media (min-width: 1000px) { :root { --top: 0px; } }

/* Chip: selected is a navy fill; at night, white with navy text. */
.chip.on, .chip[aria-pressed="true"], .bd-tabs .chip.on { background: var(--navy); color: #fff; box-shadow: none; font-weight: 500; }
:root[data-theme="dark"] .chip.on, :root[data-theme="dark"] .chip[aria-pressed="true"], :root[data-theme="dark"] .bd-tabs .chip.on { background: #fff; color: var(--panel, #111A7C); box-shadow: none; }
:root[data-theme="dark"] .chip.on .ic, :root[data-theme="dark"] .chip[aria-pressed="true"] .ic, :root[data-theme="dark"] .chip.on em, :root[data-theme="dark"] .chip[aria-pressed="true"] em { color: var(--panel, #111A7C); }
.chip { font-weight: 500; border-radius: 999px; padding: 0 14px; }
/* the count inside a selected scope: it was white on a translucent white,
   written for a pill that used to be dark */
.gq-scope button[aria-pressed="true"] em { background: var(--navy); color: #fff; }

/* The rank strip on Home is a white card in the concept: medal, tier in mono,
   the rank's name, and one red line for the way to the next rung. */
.rk-home.page-rank { background: var(--card); background-image: none; color: var(--ink); border: 1px solid var(--line); border-radius: var(--r-l); box-shadow: var(--shadow); padding: 20px 22px; }
.rk-home::after { display: none; }
.rk-home .rkh-kick { font: 500 9.5px/1.7 var(--mono); letter-spacing: .2em; color: var(--mute); }
.rk-home .rkh-name { color: var(--ink); text-shadow: none; font: 500 20px/1.2 var(--f); letter-spacing: -.015em; text-transform: none; }
.rk-home .rkh-nums, .rk-home .rkh-next { color: var(--mute); font-size: 13.5px; }
.rk-home .rkh-nums .num { color: var(--ink2); }
.rk-home .rkh-nums em, .rk-home .rkh-next b { color: var(--ink); font-style: normal; font-weight: 500; }
.rk-home .rkh-bar { height: 3px; background: var(--soft2); box-shadow: none; margin: 8px 0 6px; }
.rk-home .rkh-bar i { background: var(--accent, #E31937); box-shadow: none; }
.rk-home > .ic { color: var(--ink2); }

/* News on Home: the read-on link is a mono label, not a blue link */
#news .link, .nw-more { font: 500 10px/1.7 var(--mono); letter-spacing: .16em; text-transform: uppercase; color: var(--ink2); }

/* ═══════════════════════════════════════════════════════════════════════════
   STUDENT · LESSONS — the stage rows
   ═══════════════════════════════════════════════════════════════════════════ */
.pg-lbl { margin: 0 0 10px; letter-spacing: .26em; }
.page > h1 + .lead, .page > h1 + .mute { margin-top: 12px; font-size: 16px; }
.stage-rows { display: grid; gap: 12px; margin-top: 22px; }
.stage-row {
  display: flex; flex-wrap: wrap; align-items: center; gap: 12px 18px; padding: 20px 18px;
  background: var(--card); color: var(--ink); border: 1px solid var(--line);
  border-radius: var(--r-l); box-shadow: var(--shadow);
  transition: transform .3s var(--ease), box-shadow .3s;
}
@media (hover: hover) { .stage-row:hover { transform: translateY(-3px); box-shadow: var(--shadow-up); } }
.sr-badge {
  flex: none; display: grid; place-items: center; width: 40px; height: 40px; border-radius: 10px;
  background: var(--panel, #111A7C); color: #fff; font: 500 15px/1 var(--mono); box-shadow: inset 0 -3px 0 var(--accent, #E31937);
}
.sr-main { flex: 1 1 180px; min-width: 0; display: block; }
.sr-t { display: block; font-size: 19px; font-weight: 500; letter-spacing: -.012em; line-height: 1.2; overflow-wrap: anywhere; }
.sr-t em { font-style: normal; font-weight: 400; font-size: 13.5px; color: var(--mute); margin-left: 10px; letter-spacing: 0; }
.sr-s { display: block; margin-top: 4px; font-size: 14.5px; color: var(--ink2); overflow-wrap: anywhere; }
.sr-s .ic { display: inline-block; width: 13px; height: 13px; vertical-align: -1px; margin: 0 3px; color: var(--mute); }
.sr-meter { display: block; max-width: 180px; margin-top: 12px; }
.stage-row.ahead { box-shadow: none; background: color-mix(in srgb, var(--card) 55%, transparent); }
.stage-row.ahead .sr-badge { background: transparent; color: var(--faint); box-shadow: inset 0 0 0 1px var(--line2); }
.stage-row.ahead .sr-t, .stage-row.ahead .sr-s { color: var(--mute); }
@media (min-width: 720px) { .stage-row { padding: 22px 20px; } }

/* ═══════════════════════════════════════════════════════════════════════════
   STUDENT · ONE STAGE — a narrow column: back link, navy block, lesson cards
   ═══════════════════════════════════════════════════════════════════════════ */
.back-link { display: inline-flex; align-items: center; gap: 10px; min-height: 44px; margin-bottom: 8px; cursor: pointer;
  font: 500 10.5px/1.7 var(--mono); letter-spacing: .2em; text-transform: uppercase; color: var(--ink2); }
.back-link .ic { transition: transform .25s var(--spring); }
@media (hover: hover) { .back-link:hover { color: var(--ink); } .back-link:hover .ic { transform: translateX(-4px); } }
.stage-top { position: relative; overflow: hidden; display: flex; align-items: center; gap: 20px;
  background: var(--panel, #111A7C); color: #fff; border-radius: var(--r-l); padding: 26px 24px; margin-bottom: 24px;
  box-shadow: 0 26px 50px -30px rgba(1,0,76,.6); }
.st-badge { flex: none; display: grid; place-items: center; width: 64px; height: 64px; border-radius: 14px; background: #fff; color: var(--panel, #111A7C);
  font: 500 30px/1 var(--f); letter-spacing: -.03em; box-shadow: inset 0 -4px 0 #fff, inset 10px -6px 0 -4px #fff; position: relative; }
.st-badge::after { content: ""; position: absolute; left: 12px; right: 12px; bottom: 9px; height: 2px; background: var(--accent, #E31937); }
.st-text { flex: 1 1 160px; min-width: 0; position: relative; z-index: 1; }
.st-text h1 { color: #fff; font-size: clamp(30px, 5vw, 42px); font-weight: 400; }
.st-text p { margin-top: 6px; color: #C9CCEC; font-size: 16px; }
.st-art { position: absolute; right: 14px; top: 10px; bottom: 10px; width: 150px; opacity: .32; pointer-events: none; }
.st-art svg { width: 100%; height: 100%; color: #fff; }
.st-land { position: absolute; right: 16px; bottom: 10px; font: 500 8.5px/1.4 var(--mono); letter-spacing: .18em; text-transform: uppercase; color: #8B8FC4; }
@media (max-width: 520px) { .st-art { width: 96px; opacity: .2; } .st-land { display: none; } }

/* the lesson list: no road down the middle, one card to a lesson */
.page-stage .rmap { margin: 0; padding: 0; display: grid; gap: 12px; }
.page-stage .rmap::before, .page-stage .rmap::after { display: none; }
.page-stage .rmap-stop, .page-stage .rmap-stop.l, .page-stage .rmap-stop.r {
  width: 100%; margin: 0; flex-direction: row; align-items: flex-start; text-align: left; gap: 16px;
  padding: 18px 44px 18px 18px; background: var(--card); border: 1px solid var(--line);
  border-radius: var(--r-l); box-shadow: var(--shadow); transition: transform .3s var(--ease), box-shadow .3s;
}
@media (hover: hover) { .page-stage a.rmap-stop:hover { transform: translateY(-3px); box-shadow: var(--shadow-up); } }
.page-stage .rmap-stop::after { content: ""; position: absolute; right: 20px; top: 24px; width: 7px; height: 7px;
  border-right: 1.6px solid var(--ink2); border-top: 1.6px solid var(--ink2); transform: rotate(45deg); }
.page-stage .rmap-stop.locked::after { display: none; }
.page-stage .rmap-stop > .exit, .page-stage .rmap-stop.l > .exit, .page-stage .rmap-stop.r > .exit {
  position: static; margin: 0; transform: none; flex: none; width: 46px; height: 46px; border-radius: 10px;
  background: var(--card); color: var(--ink); box-shadow: inset 0 0 0 1.4px var(--ink);
}
.page-stage .rmap-stop > .exit small { color: var(--mute); font-size: 6.5px; letter-spacing: .16em; }
.page-stage .rmap-stop > .exit b { font: 400 18px/1.1 var(--f); }
.page-stage .rmap-stop.next > .exit { box-shadow: inset 0 0 0 1.6px var(--accent, #E31937); }
.page-stage .rmap-stop.done > .exit { box-shadow: inset 0 0 0 1.4px var(--ok); color: var(--ok-ink); background: var(--ok-t); }
.page-stage .rmap-stop.locked > .exit { box-shadow: inset 0 0 0 1px var(--line2); color: var(--faint); }
.page-stage .rmap-txt, .page-stage .rmap-stop.next .rmap-txt { flex: 1; min-width: 0; background: none; border: 0; box-shadow: none; padding: 0; opacity: 1; transform: none !important; }
.page-stage .rmap-txt small { font: 500 9.5px/1.7 var(--mono); letter-spacing: .2em; color: var(--mute); }
.page-stage .rmap-stop.next .rmap-txt small { color: var(--accent, #E31937); }
:root[data-theme="dark"] .page-stage .rmap-stop.next .rmap-txt small { color: var(--red-ink); }
.page-stage .rmap-txt b { font-size: 18px; font-weight: 500; letter-spacing: -.01em; margin: 2px 0 6px; overflow-wrap: anywhere; }
.page-stage .rmap-txt .sub { font-size: 14.5px; color: var(--mute); }
.page-stage .rm-bar { display: block; max-width: 220px; margin-top: 12px; }
.page-stage .rmap-stop.locked { box-shadow: none; background: color-mix(in srgb, var(--card) 55%, transparent); }
.page-stage .rmap-stop.locked .rmap-txt b { color: var(--mute); }

/* ═══════════════════════════════════════════════════════════════════════════
   STUDENT · THE LESSON SHELL
   ═══════════════════════════════════════════════════════════════════════════ */
.l-head { gap: 14px; margin-bottom: 14px; }
.l-head .exit { background: var(--card); color: var(--ink); border-radius: 10px; box-shadow: inset 0 0 0 1.4px var(--ink); }
.l-head .exit small { color: var(--mute); font-size: 6.5px; letter-spacing: .16em; }
.l-head .exit b { font: 400 18px/1.1 var(--f); }
.l-kicker { font: 500 10px/1.7 var(--mono); letter-spacing: .22em; text-transform: uppercase; color: var(--mute); }
.l-head h1 { font-size: clamp(24px, 4.4vw, 34px); font-weight: 500; letter-spacing: -.022em; line-height: 1.08; }
.l-pct b { font: 500 clamp(26px, 5vw, 36px)/1 var(--f); letter-spacing: -.045em; color: var(--ink); }
.l-pct span { font: 500 10px/1.6 var(--mono); letter-spacing: .1em; color: var(--mute); }

/* The eight part tabs: mono words on a hairline, the current one underlined
   in ink; a dot after the word says the teacher set it (navy) or that it must
   be done (red). The row scrolls sideways and fades at its end. */
.ptabs { gap: 0; border-bottom: 1px solid var(--line); padding-bottom: 0; background: var(--paper);
  -webkit-mask-image: linear-gradient(90deg, #000 calc(100% - 32px), transparent); mask-image: linear-gradient(90deg, #000 calc(100% - 32px), transparent); padding-right: 34px; }
.ptabs a, .ptabs a[aria-selected="true"], :root[data-theme="dark"] .ptabs a[aria-selected="true"] {
  position: relative; height: 46px; padding: 0 14px; border-radius: 0; background: none; box-shadow: none; flex: none;
  font: 500 11px/1 var(--mono); letter-spacing: .18em; text-transform: uppercase; color: var(--mute);
}
.ptabs a .ic { display: none; }
.ptabs a.done { color: var(--ok-ink); }
.ptabs a.done::before { content: ""; width: 9px; height: 5px; margin-right: 2px; border-left: 1.6px solid var(--ok); border-bottom: 1.6px solid var(--ok); transform: rotate(-45deg) translateY(-2px); }
.ptabs a[aria-selected="true"], :root[data-theme="dark"] .ptabs a[aria-selected="true"] { color: var(--ink); }
.ptabs a[aria-selected="true"]::after { content: ""; position: absolute; left: 14px; right: 14px; bottom: -1px; height: 2px; background: var(--ink); }
.ptabs a .tab-asg { position: static; flex: none; width: 5px; height: 5px; margin-left: 2px; background: var(--navy); }
:root[data-theme="dark"] .ptabs a .tab-asg { background: #A9ADF5; }
.ptabs a.must .tab-asg { background: var(--accent, #E31937); }
.page-stage .rmap-txt, .page-stage .rmap-stop .rmap-txt { box-shadow: none !important; background: none !important; border: 0 !important; }
.page-stage .rm-bar .meter, .sr-meter, .nc-meter { display: block; }
.exit small { text-transform: uppercase; }

/* ═══════════════════════════════════════════════════════════════════════════
   STUDENT · WORDS
   ═══════════════════════════════════════════════════════════════════════════ */
.page-words > h1 { font-size: clamp(38px, 7vw, 60px); line-height: .98; letter-spacing: -.035em; }
.wb-tabs { gap: 0; margin: 26px 0 22px; padding: 0 34px 0 0; border-bottom: 1px solid var(--line);
  -webkit-mask-image: linear-gradient(90deg, #000 calc(100% - 32px), transparent); mask-image: linear-gradient(90deg, #000 calc(100% - 32px), transparent); }
.wb-tabs .wb-st, .wb-tabs .wb-st[aria-selected="true"] {
  position: relative; flex: none; flex-direction: row; align-items: center; gap: 10px; min-width: 0; height: 52px; padding: 0 16px 0 0; margin-right: 16px;
  border-radius: 0; background: none; box-shadow: none;
  font: 500 11px/1 var(--mono); letter-spacing: .2em; text-transform: uppercase; color: var(--mute);
}
.wb-tabs .wb-st[aria-selected="true"] { color: var(--ink); }
.wb-tabs .wb-st[aria-selected="true"]::after { content: ""; position: absolute; left: 0; right: 16px; bottom: -1px; height: 2px; background: var(--accent, #E31937); }
.wb-n { flex: none; display: grid; place-items: center; width: 30px; height: 30px; border-radius: 8px; background: var(--panel, #111A7C); color: #fff;
  font: 500 12px/1 var(--mono); font-style: normal; letter-spacing: 0; box-shadow: inset 0 -2.5px 0 var(--accent, #E31937); }
.wb-tabs .wb-st em { position: static; padding: 2px 6px; border-radius: 6px; font: 500 10px/1.2 var(--mono); letter-spacing: 0; }

/* the navy progress block */
.wb-sum { background: var(--panel, #111A7C); color: #fff; border-radius: var(--r-l); padding: 26px 24px; gap: 18px; box-shadow: 0 26px 50px -30px rgba(1,0,76,.6); }
.wb-sum .way { font: 500 10.5px/1.7 var(--mono); letter-spacing: .22em; text-transform: uppercase; color: #8B8FC4; }
.wb-sum .dest { font-size: clamp(26px, 4.6vw, 36px); font-weight: 400; letter-spacing: -.03em; line-height: 1.1; margin-top: 6px; }
.wb-sum .meter { height: 2px; background: rgba(255,255,255,.2); }
.wb-sum .meter i { background: #fff; }
.wb-sum .btn.white { color: var(--panel, #111A7C); align-self: flex-start; }
.wb-sum > .row > .ic { color: #fff; }

/* a lesson row: outlined numeral, title, count, chevron */
.wb-l .exit { background: var(--card); color: var(--ink); border-radius: 10px; width: 40px; height: 40px; box-shadow: inset 0 0 0 1.4px var(--ink); }
.wb-l .exit small { display: none; }
.wb-l .exit b { font: 400 15px/1 var(--mono); margin: 0; }
.wb-l .exit.done { background: var(--ok-t); color: var(--ok-ink); box-shadow: inset 0 0 0 1.4px var(--ok); }
.wb-l .li .t { font-size: 17px; font-weight: 500; }
.wb-l .li .s { font-size: 14px; color: var(--mute); margin-top: 2px; }
.wb-lessons { display: grid; gap: 12px; }

/* ═══════════════════════════════════════════════════════════════════════════
   ME — the navy identity card, the four tiles, Settings and Account
   ═══════════════════════════════════════════════════════════════════════════ */
.me-card { display: flex; align-items: center; gap: 18px; flex-wrap: wrap; background: var(--panel, #111A7C); color: #fff;
  border-radius: var(--r-l); padding: 24px; margin-bottom: 14px; box-shadow: 0 26px 50px -30px rgba(1,0,76,.6); }
.me-card > .grow { flex: 1 1 180px; min-width: 0; }
.me-card .me-lbl { font: 500 10px/1.7 var(--mono); letter-spacing: .22em; text-transform: uppercase; color: #8B8FC4; margin: 0 0 4px; }
.me-card h1 { color: #fff; font-size: clamp(24px, 4.4vw, 30px); font-weight: 600; letter-spacing: -.02em; line-height: 1.1; overflow-wrap: anywhere; }
.me-card .me-ph { margin-top: 6px; color: #fff; font-size: 15px; }
.me-card .me-grp { margin-top: 2px; color: #C9CCEC; font-size: 14px; overflow-wrap: anywhere; }
.me-card .me-edit { flex: none; background: #fff; color: var(--panel, #111A7C); border-radius: 10px; }
.me-tiles { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 12px; margin-bottom: 6px; }
@media (min-width: 620px) { .me-tiles.n4 { grid-template-columns: repeat(4, minmax(0, 1fr)); } .me-tiles.n3 { grid-template-columns: repeat(3, minmax(0, 1fr)); } }
.me-tile { position: relative; display: block; min-width: 0; padding: 18px 18px 16px; background: var(--card); color: var(--ink);
  border: 1px solid var(--line); border-radius: var(--r-l); box-shadow: var(--shadow); transition: transform .3s var(--ease), box-shadow .3s; }
@media (hover: hover) { a.me-tile:hover { transform: translateY(-3px); box-shadow: var(--shadow-up); } }
.me-tile i { position: absolute; right: 14px; top: 14px; display: grid; place-items: center; width: 30px; height: 30px; border-radius: 9px; background: var(--soft2); color: var(--ink2); }
.me-tile b { display: block; padding-right: 34px; font: 500 clamp(26px, 5vw, 36px)/1.05 var(--f); letter-spacing: -.045em; overflow-wrap: anywhere; }
.me-tile b.me-rank { font-size: clamp(19px, 3.4vw, 24px); letter-spacing: -.025em; padding-top: 6px; }
.me-tile span { display: block; margin-top: 8px; font: 500 9.5px/1.6 var(--mono); letter-spacing: .18em; text-transform: uppercase; color: var(--ink2); }
.me-tile small { display: block; margin-top: 4px; font-size: 13px; color: var(--mute); }
.me-tile.ok b { color: var(--ok-ink); } .me-tile.ok i { background: var(--ok-t); color: var(--ok-ink); }
.me-tile.warn b { color: var(--warn-ink); } .me-tile.warn i { background: var(--warn-t); color: var(--warn-ink); }
.me-tile.bad b { color: var(--red-ink); } .me-tile.bad i { background: var(--red-t); color: var(--red-ink); }
.page-me .sec-head { padding-top: 30px; }
.me-list .li.danger, .me-list .li.danger .ic { color: var(--red-ink); }
.me-list .pf-tel { font-style: normal; color: var(--mute); font-size: 14px; }
.set-row b { font-weight: 500; font-size: 16px; }
.settings-list { padding: 4px 18px; }
.me-tiles { margin-bottom: 16px; }
.seg button.on, .seg button[aria-pressed="true"], .seg button[aria-selected="true"] { background: var(--card); color: var(--ink); }
:root[data-theme="dark"] .seg button.on, :root[data-theme="dark"] .seg button[aria-pressed="true"], :root[data-theme="dark"] .seg button[aria-selected="true"] { background: #fff; color: var(--panel, #111A7C); }

/* ═══════════════════════════════════════════════════════════════════════════
   STUDENT · RANK — the page had its own palette and a condensed display face.
   Both are pointed at the Launch tokens here, so the page keeps every rule it
   had and simply speaks in the same materials as everything else.
   ═══════════════════════════════════════════════════════════════════════════ */
.page-rank {
  --disp: var(--f); --mono: "NE Mono", ui-monospace, Menlo, monospace;
  --pp: var(--paper); --pp2: var(--soft2); --ln: var(--line);
  --rk-card: var(--card); --rk-ink: var(--ink); --rk-mute: var(--mute);
  --rd: var(--accent, #E31937); --rd2: var(--accent, #E31937); --bl: #2563FF; --nv: var(--panel, #111A7C); --nv2: #1A2494; --nv3: #2530AC;
  --hud: var(--panel, #111A7C); --hud2: var(--panel, #111A7C); --rk-sh: var(--shadow);
}
:root[data-theme="dark"] .page-rank { --rk-ink: var(--ink); --rk-card: var(--card); --rk-mute: var(--mute); }
.page.page-rank { max-width: 760px; }
.page-rank::before { display: none; }
.page-rank .cn-kick { font: 500 10.5px/1.7 var(--mono); letter-spacing: .24em; opacity: 1; color: var(--mute); }
.page-rank .cn-h1 { font: 400 clamp(38px, 7vw, 60px)/1 var(--f); letter-spacing: -.035em; text-transform: none; color: var(--ink); margin-top: 8px; }
.page-rank .cn-h1 em { font-style: normal; font-weight: 600; color: var(--ink); }

/* the navy card */
.page-rank .cn-hero { background: var(--panel, #111A7C); background-image: none; border: 0; border-radius: var(--r-l); padding: 28px 26px 22px; color: #fff; box-shadow: 0 26px 50px -30px rgba(1,0,76,.6); }
.page-rank .cn-sky, .page-rank .cn-stripe { display: none; }
.page-rank .cn-hero .cn-kick { color: #8B8FC4; }
.page-rank .cn-rank { font: 500 clamp(36px, 7vw, 52px)/1.02 var(--f); letter-spacing: -.035em; text-transform: none; color: #fff; text-shadow: none; }
.page-rank .cn-have { margin-top: 16px; gap: 26px; }
.page-rank .cn-fig b, .page-rank .cn-fig .num, .page-rank .cn-have b { font: 500 clamp(26px, 5vw, 34px)/1.05 var(--f); letter-spacing: -.045em; color: #fff; text-shadow: none; }
.page-rank .cn-fig.coin b, .page-rank .cn-fig.coin .num { color: #fff; }
.page-rank .cn-fig span, .page-rank .cn-have span { font: 500 9.5px/1.6 var(--mono); letter-spacing: .2em; text-transform: uppercase; color: #8B8FC4; }
.page-rank .cn-next { border-top: 1px solid rgba(255,255,255,.14); margin-top: 22px; padding-top: 18px; }
.page-rank .cn-next .cn-kick { color: #8B8FC4; }
.page-rank .cn-nn { font: 600 11px/1.6 var(--mono); letter-spacing: .22em; text-transform: uppercase; color: #fff; }
.page-rank .cn-mono { font-family: var(--mono); color: #fff; }
.page-rank .cn-bar { height: 2px; background: rgba(255,255,255,.2); box-shadow: none; border-radius: 0; }
.page-rank .cn-bar i { background: #fff; box-shadow: none; border-radius: 0; }
.page-rank .cn-ticks { display: none; }
.page-rank .cn-need { display: flex; flex-wrap: wrap; gap: 6px 22px; margin-top: 14px; }
.page-rank .cn-need li { color: #C9CCEC; font-size: 14.5px; }
.page-rank .cn-need li.got { color: #5FD6A6; }

/* the tabs: the soft track with a white raised pill, wrapping onto a second row */
.page-rank .cn-seg { display: flex; flex-wrap: wrap; width: 100%; background: var(--soft2); border-radius: 13px; padding: 4px; margin: 14px 0 6px; }
.page-rank .cn-seg button { flex: 1 1 auto; min-height: 42px; border-radius: 10px; font: 500 10.5px/1.3 var(--mono); letter-spacing: .2em; text-transform: uppercase; color: var(--mute); background: none; }
.page-rank .cn-seg button[aria-pressed="true"], .page-rank .cn-seg button.on { background: var(--card); color: var(--ink); box-shadow: 0 1px 2px rgba(1,0,76,.12), 0 4px 10px -6px rgba(1,0,76,.3); }

/* the ladder */
.page-rank .cn-tier { margin: 26px 0 12px; }
.page-rank .cn-tier span { display: flex; align-items: center; gap: 12px; background: none; padding: 0; font: 500 11px/1.7 var(--mono); letter-spacing: .22em; text-transform: uppercase; color: var(--ink2); }
.page-rank .cn-tier span::before { content: ""; width: 22px; height: 2px; background: var(--accent, #E31937); flex: none; }
.page-rank .cn-tier::after, .page-rank .cn-tier::before { display: none; }
.page-rank .cn-ladder { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 12px; }
@media (min-width: 620px) { .page-rank .cn-ladder { grid-template-columns: repeat(3, minmax(0, 1fr)); } }
.page-rank .cn-ladder .cn-tier { grid-column: 1 / -1; }
.page-rank .rk { width: auto; min-width: 0; padding: 18px 16px 16px; border-radius: var(--r-l); background: var(--card); color: var(--ink); border: 1px solid var(--line); box-shadow: var(--shadow); text-align: left; }
.page-rank .rk h4 { font: 500 17px/1.2 var(--f); letter-spacing: -.01em; text-transform: none; color: var(--ink); margin: 12px 0 4px; }
.page-rank .rk .rk-xp { font: 400 11px/1.6 var(--mono); letter-spacing: .08em; color: var(--mute); }
.page-rank .rk p { font-size: 14.5px; line-height: 1.4; color: var(--ink2); margin-top: 8px; }
.page-rank .rk .rk-no, .page-rank .rk .rk-lock { display: none; }
.page-rank .rk.now { background: var(--card); color: var(--ink); border-color: var(--accent, #E31937); box-shadow: var(--shadow-up); }
.page-rank .rk.now h4, .page-rank .rk.now p { color: var(--ink); }
.page-rank .rk.now::after { background: var(--red-t); color: var(--red-ink); font: 500 9.5px/1.3 var(--mono); letter-spacing: .16em; position: static; display: inline-block; margin-top: 12px; padding: 4px 8px; border-radius: 6px; }
.page-rank .rk.locked { box-shadow: none; background: color-mix(in srgb, var(--card) 55%, transparent); }
.page-rank .rk.locked h4, .page-rank .rk.locked p { color: var(--mute); }
.page-rank .rk .cn-badge.med { width: 40px; height: 40px; }

/* the boards under the ladder */
.page-rank .cn-grp, .page-rank .cn-acad, .page-rank .cn-how { margin-top: 16px; border-radius: var(--r-l); }
.page-rank .cn-row { min-height: 52px; }
.page-rank .cn-row.me { background: var(--navy-t); }
.page-rank .cn-pos { font-family: var(--mono); background: var(--soft2); color: var(--ink2); }
.page-rank .cn-sub { font: 500 10.5px/1.7 var(--mono); letter-spacing: .2em; text-transform: uppercase; color: var(--ink2); }
.page-rank .cn-ladder .rk.now { background: var(--card) !important; background-image: none !important; color: var(--ink) !important; }
.page-rank .cn-ladder .rk.now h4, .page-rank .cn-ladder .rk.now p { color: var(--ink) !important; text-shadow: none; }
.page-rank .cn-ladder .rk.now .rk-xp { color: var(--mute) !important; }

/* ═══════════════════════════════════════════════════════════════════════════
   TILES, everywhere: the number first, a mono label, one line of context,
   and the small tinted icon in the top right corner.
   ═══════════════════════════════════════════════════════════════════════════ */
.kpi { position: relative; padding: 18px 18px 16px; }
.kpi .kpi-i { position: absolute; right: 14px; top: 14px; margin: 0; width: 32px; height: 32px; border-radius: 9px; }
.kpi b { padding-right: 40px; }
.kpi-l { margin-top: 8px; color: var(--ink2); }
.kpi-s { font-size: 13.5px; margin-top: 4px; }
.kpi.good b, .kpi.hot b { color: var(--ok-ink); }
.kpi.hot .kpi-i { background: var(--ok-t); color: var(--ok-ink); }
.kpi.low b { color: var(--red-ink); }
.kpi.kpi-go > .ic:last-child { display: none; }

/* ═══════════════════════════════════════════════════════════════════════════
   STUDENT · REVIEW and STATS
   ═══════════════════════════════════════════════════════════════════════════ */
.page-review .hello h1, .page-stats .hello h1 { font-size: clamp(36px, 6.4vw, 56px); line-height: 1; letter-spacing: -.035em; }
.hello .date { margin-bottom: 8px; letter-spacing: .26em; }
.page-stats .kpis { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 12px; }
@media (min-width: 620px) { .page-stats .kpis { grid-template-columns: repeat(3, minmax(0, 1fr)); } }
/* the fortnight: navy bars, today in red */
.ac-bar { fill: var(--navy); }
:root[data-theme="dark"] .ac-bar { fill: #8F93E6; }
.ac-bar.today { fill: var(--accent, #E31937); }
.act-top, .act-x span { font: 500 9.5px/1.6 var(--mono); letter-spacing: .1em; text-transform: uppercase; }
/* the parts: a plain icon, the name, the count, a fine line */
.sk-i { background: none; color: var(--ink2); width: 26px; height: 26px; }
/* the small stage badge, for the whole road */
.sr-badge.sm { width: 30px; height: 30px; border-radius: 8px; font-size: 12px; box-shadow: inset 0 -2.5px 0 var(--accent, #E31937); }
.sr-badge.off { background: transparent; color: var(--faint); box-shadow: inset 0 0 0 1px var(--line2); }
.heat { font-family: var(--mono); font-size: 12px; background: none; }
.heat.good, .heat.ok { color: var(--ok-ink); } .heat.low { color: var(--red-ink); }

/* ═══════════════════════════════════════════════════════════════════════════
   THE LEADERBOARD (every role)
   ═══════════════════════════════════════════════════════════════════════════ */
.page.page-league { max-width: 760px; }
.page-league::before { display: none; }
.page-league .cn-kick { font: 500 10.5px/1.7 var(--mono); letter-spacing: .24em; text-transform: uppercase; opacity: 1; color: var(--mute); }
.page-league .cn-h1 { font: 400 clamp(38px, 7vw, 60px)/1 var(--f); letter-spacing: -.035em; text-transform: none; color: var(--ink); margin: 8px 0 18px; }
.page-league .cn-h1 em { font-style: normal; font-weight: 600; color: var(--ink); }
/* what a place pays: three figures on one line, mono numerals */
.lg-pay { display: flex; flex-wrap: wrap; gap: 8px 30px; align-items: baseline; }
.lg-pay li { display: flex; flex-wrap: wrap; align-items: baseline; gap: 8px; }
.lg-m, .lg-m.first, .lg-m.second, .lg-m.third { background: none; background-image: none; box-shadow: none; color: var(--ink); min-width: 0; height: auto; padding: 0; border-radius: 0; font: 400 20px/1.2 var(--mono); text-shadow: none; }
.lg-pay b { font-weight: 400; font-size: 14px; color: var(--mute); }
.lg-pay small { flex-basis: 100%; font-size: 13.5px; color: var(--mute); }
.lg-seg button, .page-league .seg button { font: 500 10.5px/1.3 var(--mono); letter-spacing: .18em; text-transform: uppercase; }
/* the board: a two-digit mono place, the person, the experience */
.lg-board { padding: 0; border-radius: var(--r-l); }
.lg-row { padding: 14px 18px; border-radius: 0; gap: 14px; min-height: 56px; border-bottom: 1px solid var(--line); background: none !important; }
.lg-pos { width: 34px; text-align: left; font: 400 19px/1 var(--mono); color: var(--mute); }
.lg-row.top .lg-pos, .lg-row.top .lg-pos .lg-m { color: var(--ink); font: 400 19px/1 var(--mono); }
.lg-who b { font-size: 16.5px; font-weight: 400; letter-spacing: 0; }
.lg-xp b { font: 400 19px/1.1 var(--mono); letter-spacing: 0; }
.lg-xp small { font: 500 9px/1.5 var(--mono); letter-spacing: .14em; }
.lg-row.me { background: var(--navy-t) !important; box-shadow: none; }
.lg-row.me .lg-who b { color: var(--ink); font-weight: 500; }
.lg-won-pay b { font: 500 30px/1 var(--f); letter-spacing: -.04em; color: var(--ink); }
.lg-won-pay small { font: 500 9px/1.6 var(--mono); letter-spacing: .14em; text-transform: uppercase; }
.lg-won-h { font-weight: 500; }

/* ── Support: ask for a time ─────────────────────────────────────────── */
.page-sup .hr-time { width: 84px; }
.page-sup .hr-time b { font: 500 9px/1.4 var(--mono); letter-spacing: .14em; text-transform: uppercase; color: var(--mute); }
.page-sup .hr-time span { font: 400 24px/1.1 var(--mono); letter-spacing: -.02em; color: var(--ink); }
.page-sup .hr-slot .b { font-weight: 600; }
.page-sup .hr-slot.mine { background: var(--card); box-shadow: var(--sh1), inset 2px 0 0 var(--navy); }
.page-sup .hr-slot.mine .hr-time span { color: var(--ink); }
.page-sup .hr-slot.asked { background: var(--card); box-shadow: none; border: 1px dashed var(--line2); }
.page-sup .sup-find { background: var(--card); border: 1px solid var(--line2); border-radius: var(--r); }
.page-sup .sup-week { gap: 0; }
.page-sup .sup-day { flex-direction: column; gap: 10px; padding: 16px 0; }
.page-sup .sup-day:first-child { padding-top: 2px; }
.page-sup .sup-day:last-child { padding-bottom: 2px; }
.page-sup .sup-dn { width: auto; padding: 0; font: 500 9.5px/1.4 var(--mono); letter-spacing: .16em; text-transform: uppercase; color: var(--mute); }
.page-sup .sup-times { gap: 6px; }
.page-sup .sup-c { flex-direction: row; align-items: center; gap: 8px; min-width: 68px; min-height: 40px; padding: 0 13px;
  border: 1px solid var(--line2); border-radius: 4px; background: var(--card); color: var(--ink);
  font: 500 14px/1 var(--mono); letter-spacing: 0; }
.page-sup .sup-c em { font: 500 8.5px/1 var(--mono); letter-spacing: .14em; opacity: 1; color: inherit; }
.page-sup button.sup-c.free { background: var(--card); color: var(--ink); border-color: var(--line2); }
@media (hover:hover) { .page-sup button.sup-c.free:hover { background: var(--navy); color: #fff; border-color: var(--navy); } }
.page-sup .sup-c.gone { opacity: 1; background: transparent; color: var(--faint); border-color: var(--line); }
.page-sup .sup-c.asked { background: var(--card); color: var(--ink); border: 1px dashed var(--ink); }
.page-sup .sup-c.yours { background: var(--navy); color: #fff; border-color: var(--navy); }
[data-theme="dark"] .page-sup .sup-c.yours { background: #fff; color: var(--navy); border-color: #fff; }
[data-theme="dark"] .page-sup .hr-slot.mine { box-shadow: inset 2px 0 0 #fff; }
@media (max-width: 560px) { .page-sup .hr-slot { flex-wrap: wrap; } .page-sup .hr-slot .grow { flex: 1 1 0; min-width: 0; } .page-sup .hr-slot > .btn { width: 100%; } }

/* ── Grades ──────────────────────────────────────────────────────────── */
.page-grades .hello h1 .w:last-child { font-weight: 700; }
.page-grades .gr-how .b { font: 500 9.5px/1.4 var(--mono); letter-spacing: .2em; text-transform: uppercase; color: var(--mute); margin-bottom: 12px; }
.page-grades .gr-how p { font-size: 13.5px; line-height: 1.55; max-width: 62ch; }

/* ── News ────────────────────────────────────────────────────────────── */
.page-news .hello h1 .w:last-child { font-weight: 700; }
.page-news .card.nt { padding: 20px 22px; background: var(--card); }
.page-news .card.nt.pin { border: 1px solid var(--navy); background: var(--card); }
[data-theme="dark"] .page-news .card.nt.pin { border-color: #fff; }
.page-news .nt-h .av { width: 24px; height: 24px; font-size: 8.5px; }
.page-news .nt-h .grow { display: flex; align-items: baseline; gap: 10px; flex-wrap: wrap; flex: 0 1 auto; }
.page-news .nt-by b { font-size: 13.5px; font-weight: 400; color: var(--mute); }
.page-news .nt-by em { font-size: 11.5px; font-weight: 400; }
.page-news .nt-when { margin: 0; font-size: 13px; }
.page-news .nt-when::before { content: "·"; margin-right: 10px; }
.page-news .nt-tag { font: 500 8.5px/1 var(--mono); letter-spacing: .16em; text-transform: uppercase; padding: 6px 8px; border-radius: 3px; }
.page-news .nt-tag .ic { display: none; }
.page-news .nt-tag.pin { background: var(--navy); color: #fff; }
[data-theme="dark"] .page-news .nt-tag.pin { background: #fff; color: var(--navy); }
.page-news .nt-tag.new { background: var(--red); color: #fff; }
.page-news .nt-t { font-size: 24px; font-weight: 400; letter-spacing: -.025em; margin-top: 12px; }
.page-news .nt-b { font-size: 16px; line-height: 1.5; margin-top: 8px; }
@media (max-width: 420px) { .page-news .nt-t { font-size: 21px; } .page-news .card.nt { padding: 16px; } }
.page-news .nt-h .grow { flex: 1 1 0; min-width: 0; }
.page-news .nt-h .grow + .nt-tag { margin-left: 0; }

/* ── Chat: a fixed-height room ───────────────────────────────────────── */
.tg { background: var(--paper); }
.tg-head-page { padding: 20px 16px 12px; }
.tg-head-page .date { margin: 0 0 8px; font: 500 9.5px/1.4 var(--mono); letter-spacing: .24em; text-transform: uppercase; color: var(--mute); }
.tg-head-page h1 { font-size: clamp(30px, 4.6vw, 52px); font-weight: 400; letter-spacing: -.04em; line-height: 1; margin: 0; }
.tg-head-page h1 .w:last-child { font-weight: 700; }
.tg-head-page .lead { margin-top: 10px; font-size: 14.5px; }
.tg-list { background: var(--card); }
.tg-search { padding: 10px 12px; }
.tg-search .srch { background: var(--soft); border-radius: var(--r); }
.cl-row { border-radius: 0; gap: 14px; padding: 14px 16px; }
.cl-row .av.lg { width: 34px; height: 34px; font: 500 10px/1 var(--mono); letter-spacing: .04em; }
.cl-row .av.lg .ic { width: 16px; height: 16px; }
.av.grp { background: var(--navy); }
.cl-top b { font-weight: 500; font-size: 16px; letter-spacing: -.01em; }
.cl-top time { font-weight: 400; font-size: 12.5px; }
.cl-row.unread .cl-top b { color: var(--ink); font-weight: 600; }
.cl-row.on { background: var(--navy-t); }
.cl-row.on::after { content: ""; position: absolute; left: 0; top: 10px; bottom: 10px; width: 3px; border-radius: 3px; background: var(--navy); }
[data-theme="dark"] .cl-row.on::after { background: #fff; }
.cl-new, .you { color: var(--ink); }
.cl-new { color: var(--red); }
.tg-convo, :root[data-theme="dark"] .tg-convo, :root:not([data-theme="light"]) .tg-convo { background: var(--paper); background-image: none; }
.tg-head { padding: 10px 16px; min-height: 64px; }
.tg-head b { font-weight: 600; font-size: 16px; }
.tg-msgs { gap: 8px; padding: 16px 16px 12px; }
.tg-msgs::before { content: ""; margin-top: auto; }
.bubble { padding: 11px 14px 9px; border-radius: 18px 18px 18px 6px; border: 1px solid var(--line); box-shadow: 0 1px 2px rgba(1,0,76,.05); }
.bubble.theirs { border-bottom-left-radius: 6px; }
.bubble.mine, :root[data-theme="dark"] .bubble.mine, :root:not([data-theme="light"]) .bubble.mine {
  background: var(--navy); color: #fff; border-color: var(--navy); border-radius: 18px 18px 6px 18px; }
.bubble .txt { font-size: 16px; line-height: 1.4; }
.bubble .who { color: var(--mute); font: 500 9.5px/1.6 var(--mono); letter-spacing: .1em; }
.bubble .meta { font: 400 9.5px/1 var(--mono); letter-spacing: .08em; font-weight: 400; }
.bubble.mine .meta, .bubble.mine .ticks, .bubble.mine .ticks.seen { color: #C9CCEC; }
.bubble.mine .quote { border-left-color: #C9CCEC; background: rgba(255,255,255,.1); color: #fff; }
.bubble.mine .vm-bars > i { background: rgba(255,255,255,.3); }
.bubble.mine .vm-done > .vm-bars > i { background: #fff; }
.tg-quick { gap: 8px; padding: 10px 14px; background: var(--card); border-top: 1px solid var(--line);
  -webkit-mask-image: linear-gradient(to right, #000 calc(100% - 30px), transparent); mask-image: linear-gradient(to right, #000 calc(100% - 30px), transparent); }
.tg-quick button { border-radius: 99px; font-weight: 400; font-size: 13px; padding: 7px 12px; }
.tg-quick button:last-child { margin-right: 30px; }
.tg-input { gap: 10px; padding-left: 14px; padding-right: 14px; }
.tg-input textarea { min-height: 46px; border-radius: 23px; padding: 12px 18px; background: var(--card); box-shadow: inset 0 0 0 1px var(--line2); }
.tg-input .btn { width: 46px; height: 46px; min-height: 46px; }
.tg-empty { background: transparent; color: var(--mute); font: 500 9.5px/1 var(--mono); letter-spacing: .2em; text-transform: uppercase; }
@media (max-width: 899px) { .tg.has-conv { background: var(--paper); } }
@media (min-width: 900px) {
  .tg { display: grid; grid-template-columns: minmax(260px, 340px) minmax(0, 1fr); grid-template-rows: auto auto; gap: 0 20px;
    height: auto; max-width: 1120px; margin: 0 auto; padding: 28px 32px 0; border: 0; background: transparent; }
  .tg-head-page, .tg.has-conv .tg-head-page { display: block; grid-column: 1 / -1; padding: 0 0 22px; }
  .tg-head-page .lead { display: none; }
  .tg .tg-list, .tg .tg-convo, .tg.has-conv .tg-list, .tg.has-conv .tg-convo { display: flex; min-height: 0;
    height: max(460px, calc(100dvh - var(--top) - var(--tab) - 250px));
    border: 1px solid var(--line); border-radius: var(--r-l, 14px); box-shadow: var(--sh1); overflow: hidden; }
  .tg-convo { background: var(--paper); }
  .tg-back { display: none; }
  .cl-row + .cl-row { box-shadow: inset 0 1px 0 var(--line); }
}
@media (min-width: 1000px) { .tg .tg-list, .tg .tg-convo, .tg.has-conv .tg-list, .tg.has-conv .tg-convo { height: max(460px, calc(100dvh - 232px)); } }
.daysep span { background: transparent; color: var(--mute); padding: 0; font: 500 9.5px/1 var(--mono); letter-spacing: .22em; text-transform: uppercase; }
@media (max-width: 899px) { .cl-row + .cl-row::before { left: 64px; } }

/* ── Notebook ────────────────────────────────────────────────────────── */
.page-nb { position: relative; }
.page-nb .hello h1 .w:last-child { font-weight: 700; }
.page-nb > .lead { margin: -4px 0 18px; font-size: 14.5px; max-width: 56ch; }
@media (min-width: 720px) {
  .page-nb .nb-new { position: absolute; top: 62px; right: max(16px, env(safe-area-inset-right)); left: auto; width: auto; margin: 0; transform: none !important; }
}
@media (min-width: 1000px) { .page-nb .nb-new { right: 48px; top: 78px; } }

/* ── Lesson: the story player is the navy block ──────────────────────── */
.story .vp { background: var(--navy); color: #fff; border-radius: var(--r-l, 14px); overflow: hidden; box-shadow: var(--sh2, 0 18px 40px -18px rgba(1,0,76,.45)); padding: 0 0 20px; margin-bottom: 18px; }
.story .vp-stage { border-radius: 0; box-shadow: none; }
.story .vp .vp-bar { height: 2px; border-radius: 0; margin: 0; background: rgba(255,255,255,.18); }
.story .vp .vp-bar > i { background: #fff; }
.story .vp-cap, .story .vp-say, .story .vp-head, .story .vp-dl, .story .vp-ctl { margin-left: 20px; margin-right: 20px; }
.story .vp-cap { margin-top: 16px; color: #fff; font-size: 15px; text-wrap: pretty; }
.story .vp-cap b { color: #fff; }
.story .vp-say { color: #C9CCEC; }
.story .vp.playing .vp-say { color: #fff; }
.story .vp-head { margin-top: 12px; margin-bottom: 14px; }
.story .vp-head b { font-size: 16px; font-weight: 500; text-transform: uppercase; letter-spacing: .01em; }
.story .vp-head .mute { color: #C9CCEC; font-size: 13px; text-transform: uppercase; }
.story .vp-ctl .btn { background: #fff; color: var(--ink-fixed, var(--panel, #111A7C)); border-color: #fff; box-shadow: none; }
.story .vp-ctl .btn .ic { color: var(--panel, #111A7C); }
.story .vp-ctl .btn span { color: var(--panel, #111A7C); }
.story .vp-ctl .vp-n { color: #C9CCEC; }
@media (hover:hover) { .story .vp-ctl .btn:hover { background: #E9EAF7; } }
@media (max-width: 560px) { .story .vp-cap, .story .vp-say, .story .vp-head, .story .vp-dl, .story .vp-ctl { margin-left: 14px; margin-right: 14px; } .story .vp { padding-bottom: 14px; } }
@media (max-width: 560px) { .story .vp-play { padding: 0 8px; letter-spacing: .08em; white-space: nowrap; gap: 6px; } .story .vp-ctl { gap: 6px; } .story .vp-ctl .num { min-width: 44px; } }

/* ── Lesson parts: one accent, not four ──────────────────────────────── */
.w-sig, .w-sig.v, .w-sig.a, .w-sig.n, .w-sig.u { color: var(--mute); font-weight: 500; }
.w-say { color: var(--ink); background: var(--navy-t); }
[data-theme="dark"] .w-say { color: #fff; }
.au { --au: var(--navy); --au-on: #fff; }
[data-theme="dark"] .au { --au: #fff; --au-on: var(--panel, #111A7C); }
.au-play { background: var(--au); color: var(--au-on); }
.au-seek::-webkit-slider-runnable-track { height: 3px; background: linear-gradient(to right, var(--au) var(--p,0%), var(--line2) var(--p,0%)); }
.au-seek::-moz-range-track { height: 3px; background: var(--line2); }
.au-seek::-moz-range-progress { height: 3px; background: var(--au); }
.au-seek::-webkit-slider-thumb { background: var(--au); margin-top: -6.5px; box-shadow: 0 0 0 3px var(--card); }
.au-seek::-moz-range-thumb { background: var(--au); box-shadow: 0 0 0 3px var(--card); }
.ls-who { font: 500 9.5px/1.9 var(--mono); letter-spacing: .16em; color: var(--mute); }
.ls-line.b .ls-who { color: var(--ink); }

/* ── Staff: greeting on paper, the board, group cards ────────────────── */
.staff-hello { margin: 0 0 26px; }
.staff-hello .date { margin: 0 0 12px; font: 500 9.5px/1.4 var(--mono); letter-spacing: .26em; text-transform: uppercase; color: var(--mute); }
.staff-hello h1 { margin: 0; font-size: clamp(34px, 5.4vw, 60px); font-weight: 400; letter-spacing: -.045em; line-height: 1; color: var(--ink); }
.staff-hello h1 .w:last-child { font-weight: 700; }
.staff-hello .hb-line { margin: 14px 0 0; font-size: 16px; color: var(--mute); }
.board.big { padding: 20px; margin-bottom: 30px; }
.board.big .brow { grid-template-columns: 5.6em minmax(10.9em, 1fr) 2.4em 8.8em; }
.board.big .brow.head { padding-bottom: 12px; border-bottom: 1px solid rgba(255,255,255,.12); margin-bottom: 4px; }
@media (max-width: 640px) { .board.big .brow { grid-template-columns: 5.6em 3.9em minmax(0, 1fr); } .board.big { padding: 16px; } }
.gc-clock b { font-size: clamp(24px, 2.6vw, 30px); font-weight: 500; letter-spacing: -.04em; color: var(--ink); flex: none; overflow: visible; max-width: none; }
.gc-clock span { font: 500 9.5px/1 var(--mono); letter-spacing: .16em; text-transform: uppercase; }
.gc-clock.today b { color: var(--ink); }
.gc-clock.today span { color: var(--mute); opacity: 1; }
.gc-f, .gc-f.stage, .gc-f.who.mine { background: transparent; color: var(--mute); font-weight: 400; font-size: 13.5px; padding-left: 0; padding-right: 10px; }
.gc-f.stage .ic { color: var(--mute); }
.gc-f.none { background: transparent; color: var(--red); padding-left: 0; }

.staff-hello .hb-text { max-width: none; }
.bcap { font: 500 9px/1.4 var(--mono); letter-spacing: .2em; color: #8B8FC4; }
.kin .w.hb { font-weight: 700; }
h1 .kin { text-wrap: balance; }
.page > h1:has(.kin), .head-row > h1:has(.kin), .page-groups > .row > h1 { font-size: clamp(30px, 4.4vw, 52px); font-weight: 400; letter-spacing: -.04em; line-height: 1.02; }
.gc-clock { flex-wrap: wrap; }
.page > h1:has(.kin) { margin: 0 0 24px; }
.head-row:has(h1 .kin) { margin-bottom: 22px; align-items: flex-end; gap: 14px; }
@media (min-width: 900px) {
  .view-review .filters { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 16px; }
  .view-review .filters > * { min-width: 0; width: 100%; }
  .view-review .filters .nsel { max-width: none; }
}

/* ── Staff lists: students, teachers ─────────────────────────────────── */
.switch[aria-checked="true"] { background: var(--navy); }
[data-theme="dark"] .switch[aria-checked="true"] { background: #4B50D6; }
.swl { font: 500 9px/1 var(--mono); letter-spacing: .16em; text-transform: uppercase; }
.heat { background: transparent; font: 500 13px/1 var(--mono); min-width: 40px; padding: 0; }
.heat.hi { background: transparent; color: var(--ok-ink, #0A6B4B); } .heat.md { background: transparent; } .heat.lo { background: transparent; }
.dash-tiles, .dash-split { gap: 12px; margin-bottom: 12px; }
.dash-t { padding: 18px; border-radius: var(--r-l, 14px); box-shadow: var(--sh1); }
.dash-t b, .dash-t.good b { font-size: 38px; font-weight: 500; letter-spacing: -.04em; color: var(--ink); }
.dash-t span { font: 500 9.5px/1.5 var(--mono); letter-spacing: .16em; text-transform: uppercase; margin-top: 8px; }
.dash-t small { font-size: 12.5px; }
.dash-box { border-radius: var(--r-l, 14px); padding: 18px; box-shadow: var(--sh1); }
.dash-bar i { height: 3px; border-radius: 0; background: var(--line); }
.dash-bar u { border-radius: 0; background: var(--navy) !important; }
[data-theme="dark"] .dash-bar u { background: #fff !important; }
.filters .seg button { font: 500 10px/1.3 var(--mono); letter-spacing: .16em; text-transform: uppercase; }
.stu-find .srch, .page > .srch, .filters .srch { background: var(--card); box-shadow: inset 0 0 0 1px var(--line2); border-radius: var(--r); height: 46px; }
.tag-wait { font: 500 9px/1 var(--mono); letter-spacing: .14em; }

/* ── Support teacher: the constant week. Two different things were both
   called .wk-grid; the Groups timetable's rule (which needs --cols) was
   winning here and collapsing the seven days into one column. ───────── */
#rules .wk-grid { grid-template-columns: repeat(7, minmax(0, 1fr)); min-width: 0; gap: 6px; }
@media (max-width: 620px) { #rules .wk-grid { grid-template-columns: repeat(4, minmax(0, 1fr)); } }
#rules .wk-day { position: static; border: 0; border-radius: 8px; background: var(--soft); padding: 12px 6px; }
#rules .wk-day.on { background: var(--navy-t); }
#rules .wk-dn, #rules .wk-day.on .wk-dn { font: 500 9.5px/1.4 var(--mono); letter-spacing: .16em; color: var(--mute); }
#rules .wk-day.on .wk-dn { color: var(--ink); }
#rules .wk-t { font: 500 12.5px/1.4 var(--mono); background: none; }
.l-head h1:has(.kin) { font-size: clamp(30px, 4.4vw, 52px); font-weight: 400; letter-spacing: -.04em; line-height: 1.02; }
.kpis { margin-bottom: 14px; }
.kpi > span:not([class]) { font: 500 9.5px/1.5 var(--mono); letter-spacing: .16em; text-transform: uppercase; color: var(--ink2); margin-top: 8px; }
.kpi > small { font-size: 13.5px; font-weight: 400; margin-top: 4px; }
.kpi.bad { border-top-color: var(--line); } .kpi.bad b { color: var(--red-ink, #9E1024); }
.kpi.warn { border-top-color: var(--line); }
.wk-b.mine, .wk-b { border-left-color: var(--navy); }
.wk-b.mine { background: var(--navy-t); }
.wk-b .wk-f.who { color: var(--ink); }

/* ── contrast fixes from the measured pass ───────────────────────────── */
.staff-hello .date, .staff-hello .hb-line { opacity: 1; color: var(--mute); }
.ctab-n { color: inherit; opacity: 1; font-weight: 400; }
.ctab.on { background: var(--navy); color: #fff; }
.ctab.on .ctab-n { opacity: 1; }
.ctab { font: 500 10px/1.3 var(--mono); letter-spacing: .14em; text-transform: uppercase; }
.dash-box .cn-kick { color: var(--mute); opacity: 1; }
.hr-wbtn { color: var(--ink2); }
[data-theme="dark"] .cl-new { color: #FF7A8C; }

/* ── The stage badge: a navy square with the number, not a highway sign ─ */
.shield.stg { width: 44px; height: 44px; border-radius: 11px; background: var(--panel, #111A7C); box-shadow: inset 0 0 0 1px rgba(255,255,255,.1); }
.shield.stg b { margin: 0; font: 500 18px/1 var(--mono); letter-spacing: 0; color: #fff; padding-bottom: 5px; background: linear-gradient(var(--accent, #E31937), var(--accent, #E31937)) center bottom / 14px 2px no-repeat; }
.shield.stg.sm { width: 34px; height: 34px; border-radius: 9px; } .shield.stg.sm b { font-size: 14px; margin: 0; padding-bottom: 4px; background-size: 11px 2px; }
.shield.stg.lg { width: 68px; height: 68px; border-radius: 16px; } .shield.stg.lg b { font-size: 28px; margin: 0; padding-bottom: 7px; background-size: 22px 3px; }
[data-theme="dark"] .shield.stg { background: #14177E; }
.bp .shield.stg { background: #fff; } .bp .shield.stg b { color: var(--panel, #111A7C); }
.wb-st[aria-selected="true"] .shield { transform: none; }
.stu-acts-card .stu-acts { margin: 0; }
.page-stu .stu-head { margin-bottom: 12px; } .page-stu .stu-facts-card, .page-stu .stu-acts-card { margin-bottom: 12px; }

/* ── Rank: the real 3D insignia, and an XP bar you can see across a room ─ */
.rk3d { position: relative; flex: none; width: 150px; height: 170px; display: grid; place-items: center; }
.rk3d-c { position: absolute; inset: -14px; width: calc(100% + 28px); height: calc(100% + 28px); display: none; cursor: grab; touch-action: pan-y; }
.rk3d-c:active { cursor: grabbing; }
.rk3d.has3d .rk3d-c { display: block; }
.rk3d.has3d .cn-badge { visibility: hidden; }
@media (min-width: 720px) { .rk3d { width: 190px; height: 210px; } }
@media (max-width: 480px) { .rk3d { width: 118px; height: 136px; } }
.page-rank .cn-next { padding-top: 22px; }
.page-rank .cn-next .cn-mono { font: 500 30px/1 var(--f); letter-spacing: -.03em; color: #fff; }
.page-rank .cn-nn { font-size: 13px; }
.page-rank .cn-bar { position: relative; height: 20px; margin: 16px 0 16px; border-radius: 99px; overflow: hidden;
  background: rgba(255,255,255,.1); box-shadow: inset 0 1px 3px rgba(0,0,0,.55), inset 0 0 0 1px rgba(255,255,255,.1); }
.page-rank .cn-bar i { position: relative; border-radius: 99px; min-width: 20px;
  background: linear-gradient(90deg, #B01229, var(--accent, #E31937) 45%, #FF6B81 85%, #FFD0D7);
  box-shadow: 0 0 22px rgba(227,25,55,.85), inset 0 1px 0 rgba(255,255,255,.55), inset 0 -3px 6px rgba(0,0,0,.25); }
.page-rank .cn-ticks { display: block; }
@media (max-width: 480px) { .page-rank .cn-bar { height: 16px; } .page-rank .cn-next .cn-mono { font-size: 22px; } }

/* ── Lessons: the wireframe landmark is back on every stage ──────────── */
.stage-row { position: relative; overflow: hidden; }
.sr-art { flex: none; width: 112px; height: 84px; margin: -10px 4px -10px 0; color: var(--navy); opacity: .9; display: grid; place-items: center; }
.sr-art svg { width: 100%; height: 100%; }
[data-theme="dark"] .sr-art { color: #C9CCEC; }
.stage-row.ahead .sr-art { opacity: .32; }
@media (min-width: 900px) { .sr-art { width: 150px; height: 104px; margin: -16px 12px -16px 0; } }
@media (max-width: 720px) { .sr-art { position: absolute; right: 10px; top: 50%; transform: translateY(-50%); width: 84px; height: 76px; margin: 0; opacity: .5; }
  .stage-row { padding-right: 100px; } .stage-row > .plate { display: none; } .stage-row.ahead .sr-art { opacity: .22; } }
[data-theme="dark"] .sr-art svg { filter: invert(1) hue-rotate(180deg) brightness(1.5); }
[data-theme="dark"] .sr-art { opacity: 1; } [data-theme="dark"] .stage-row.ahead .sr-art { opacity: .45; }

/* ── Me: one modest pen beside the name opens name + picture together ── */
.me-pen { display: inline-grid; place-items: center; width: 30px; height: 30px; margin-left: 8px; vertical-align: middle; border-radius: 50%;
  color: #C9CCEC; background: rgba(255,255,255,.08); position: relative; }
.me-pen::after { content: ""; position: absolute; inset: -7px; }
.me-pen .ic { width: 15px; height: 15px; }
@media (hover:hover) { .me-pen:hover { background: rgba(255,255,255,.18); color: #fff; } }
.pf-in-sheet { margin-top: 18px; padding-top: 16px; border-top: 1px solid var(--line); }
.pf-in-sheet .pf-card { padding: 0; border: 0; box-shadow: none; background: none; margin: 0; }
.pf-in-sheet .pf-h { font: 500 9.5px/1.4 var(--mono); letter-spacing: .2em; text-transform: uppercase; color: var(--mute); margin: 0 0 12px; }

/* ── Start class: "a lesson from another stage" is a door, not a footnote ─ */
.st-more { margin-top: 14px; }
.st-more summary { list-style: none; display: flex; align-items: center; gap: 12px; padding: 14px 16px; border-radius: var(--r, 12px);
  border: 1.5px dashed var(--navy); background: var(--navy-t); color: var(--ink); font-size: 15px; font-weight: 600; cursor: pointer; }
.st-more summary::-webkit-details-marker { display: none; }
.st-more summary::before { content: "+"; flex: none; width: 28px; height: 28px; border-radius: 8px; display: grid; place-items: center;
  background: var(--navy); color: #fff; font: 500 18px/1 var(--mono); }
.st-more summary::after { content: ""; margin-left: auto; width: 9px; height: 9px; border-right: 2px solid currentColor; border-bottom: 2px solid currentColor; transform: rotate(45deg); transition: transform .2s; }
.st-more[open] summary::after { transform: rotate(-135deg); }
.st-more[open] summary::before { content: "–"; }
.st-more[open] summary { border-style: solid; }
[data-theme="dark"] .st-more summary { border-color: #8B8FC4; } [data-theme="dark"] .st-more summary::before { background: #fff; color: var(--panel, #111A7C); }
.hw-bar i { background: var(--navy); } [data-theme="dark"] .hw-bar i { background: #fff; }

/* ── Voice message: hold to talk, slide up to lock, slide left to cancel ─ */
.tg-mic { touch-action: none; -webkit-touch-callout: none; -webkit-user-select: none; user-select: none; }
.tg-rec { position: relative; gap: 12px; background: var(--card); border-top: 1px solid var(--line); min-height: 66px; -webkit-user-select: none; user-select: none; }
.tg-rec .rec-t { font: 500 15px/1 var(--mono); min-width: 44px; }
.tg-rec .rec-dot { width: 10px; height: 10px; background: var(--red); animation: recBeat 1.1s ease-in-out infinite; }
.tg-rec .rec-meter { height: 3px; border-radius: 0; background: var(--line); }
.tg-rec .rec-meter > i { border-radius: 0; background: var(--red); }
.rec-hint, .rec-lock, .rec-orb { display: none; }
.tg-rec.holding .rec-x, .tg-rec.holding .rec-go, .tg-rec.holding .rec-meter { display: none; }
.tg-rec.holding .rec-hint { display: inline-flex; align-items: center; gap: 4px; flex: 1; justify-content: center; color: var(--mute); font-size: 14px;
  transform: translateX(calc(var(--dx, 0px) * .5)); opacity: calc(1 + var(--dx, 0) / 160px); animation: recNudge 1.6s ease-in-out infinite; }
.tg-rec.holding .rec-hint .ic { width: 16px; height: 16px; }
.tg-rec.holding .rec-orb { display: grid; place-items: center; flex: none; width: 58px; height: 58px; margin: -10px -4px -10px 0; border-radius: 50%;
  background: var(--red); color: #fff; position: relative; transform: translate(var(--dx, 0px), var(--dy, 0px)) scale(calc(1 + var(--lv, 0) * .35));
  box-shadow: 0 8px 22px -6px rgba(227,25,55,.7); transition: transform .06s linear; }
.tg-rec.holding .rec-orb .ic { width: 26px; height: 26px; }
.tg-rec.holding .rec-orb::before, .tg-rec.holding .rec-orb::after { content: ""; position: absolute; inset: 0; border-radius: 50%; border: 2px solid var(--red); opacity: 0; animation: recRing 1.1s ease-out infinite; }
.tg-rec.holding .rec-orb::after { animation-delay: .22s; }
.tg-rec.holding .rec-lock { display: flex; flex-direction: column; align-items: center; gap: 2px; position: absolute; right: 22px; bottom: 84px; z-index: 3;
  width: 40px; padding: 10px 0 6px; border-radius: 20px; background: var(--card); color: var(--ink2); border: 1px solid var(--line2); box-shadow: var(--sh1, 0 6px 18px -8px rgba(1,0,76,.4));
  transform: translateY(calc(var(--dy, 0px) * .35)); }
.tg-rec.holding .rec-lock .ic { width: 16px; height: 16px; }
.tg-rec.holding .rec-lock .ic:last-child { animation: recUp 1.2s ease-in-out infinite; opacity: .6; }
.tg-rec.locked-in .rec-go { animation: recPop .45s var(--spring, cubic-bezier(.3,1.6,.5,1)); }
@keyframes recBeat { 0%, 100% { transform: scale(1); } 14% { transform: scale(1.45); } 28% { transform: scale(1); } 42% { transform: scale(1.3); } 60% { transform: scale(1); } }
@keyframes recRing { 0% { transform: scale(1); opacity: .55; } 100% { transform: scale(1.9); opacity: 0; } }
@keyframes recNudge { 0%, 100% { margin-left: 0; } 50% { margin-left: -8px; } }
@keyframes recUp { 0%, 100% { transform: translateY(0); } 50% { transform: translateY(-4px); } }
@keyframes recPop { 0% { transform: scale(.8); } 60% { transform: scale(1.12); } 100% { transform: scale(1); } }
@media (prefers-reduced-motion: reduce) { .tg-rec .rec-dot, .tg-rec.holding .rec-orb::before, .tg-rec.holding .rec-orb::after, .tg-rec.holding .rec-hint, .tg-rec.holding .rec-lock .ic:last-child { animation: none; } }

/* ── Speaking: choose what to work on ────────────────────────────────── */
.sp-choose .hello h1 { font-size: clamp(28px, 4.2vw, 44px); font-weight: 400; letter-spacing: -.035em; line-height: 1.05; }
.sp-choose .lead { margin: 6px 0 20px; }
.sp-opts { display: grid; gap: 10px; grid-template-columns: repeat(auto-fill, minmax(min(300px, 100%), 1fr)); }
.sp-opt { display: flex; align-items: center; gap: 14px; text-align: left; padding: 16px; border-radius: var(--r-l, 14px); background: var(--card);
  border: 1.5px solid var(--line); color: var(--ink); min-height: 76px; transition: border-color .15s, background .15s, transform .15s; }
.sp-opt b { display: block; font-weight: 600; font-size: 16px; } .sp-opt small { display: block; margin-top: 2px; color: var(--mute); font-size: 13px; line-height: 1.35; }
.sp-oi { flex: none; width: 40px; height: 40px; border-radius: 11px; display: grid; place-items: center; background: var(--navy-t); color: var(--ink); }
.sp-tick { flex: none; width: 24px; height: 24px; border-radius: 50%; display: grid; place-items: center; border: 1.5px solid var(--line2); color: transparent; }
.sp-opt.on { border-color: var(--navy); background: var(--navy-t); }
.sp-opt.on .sp-oi { background: var(--navy); color: #fff; }
.sp-opt.on .sp-tick { background: var(--navy); border-color: var(--navy); color: #fff; }
[data-theme="dark"] .sp-opt.on { border-color: #fff; } [data-theme="dark"] .sp-opt.on .sp-tick, [data-theme="dark"] .sp-opt.on .sp-oi { background: #fff; border-color: #fff; color: var(--panel, #111A7C); }
.sp-opt:active { transform: scale(.985); }
.sp-go { margin-top: 18px; gap: 10px; }
.spk-bar { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; margin: 0 0 20px; padding: 12px 14px; border-radius: var(--r, 12px); background: var(--card); border: 1px solid var(--line); }
.spk-l { font: 500 9.5px/1 var(--mono); letter-spacing: .2em; text-transform: uppercase; color: var(--mute); margin-right: 4px; }
.sp-chip { display: inline-flex; align-items: center; gap: 6px; min-height: 34px; padding: 0 8px 0 12px; border-radius: 99px; background: var(--navy); color: #fff; font-size: 13.5px; font-weight: 500; }
.sp-chip .ic { width: 14px; height: 14px; opacity: .75; }
[data-theme="dark"] .sp-chip { background: #fff; color: var(--panel, #111A7C); }
.spk-bar .sp-edit { margin-left: auto; }

/* ── The board's cells: each letter sits inside one whole tile ──────────
   The top half of a cell was painted the board's own navy, so only the
   bottom half showed and the letters looked taller than their boxes. */
.board .flap > span { background: #2B38B4; }
.board .flap .t, .board .flap .ft { border-radius: 5px 5px 0 0; box-shadow: inset 0 -1px 0 rgba(0,0,0,.45), inset 0 1px 0 rgba(255,255,255,.1); }
.board .flap .b, .board .flap .fb { background: #2430A6; border-radius: 0 0 5px 5px; }
.board .flap { font-weight: 600; width: 1.1em; height: 1.7em; }
.board .flap > span > i { height: 1.7em; line-height: 1.72em; }
.board .flaps { gap: 3px; }
.board.big .brow { row-gap: 0; } .board.big { gap: 10px; }

/* ── Every rank badge is the turning 3D shield ───────────────────────── */
.cn-badge { position: relative; }
.rk3d-m { position: absolute; left: 50%; top: 50%; width: 150%; height: 150%; transform: translate(-50%, -50%); display: none; cursor: grab; touch-action: pan-y; z-index: 1; }
.cn-badge.has3d > .rk3d-m { display: block; }
.cn-badge.has3d > .med-3d { visibility: hidden; }
.cn-badge.has3d { background: none !important; box-shadow: none !important; animation: none !important; }
.rk3d .rk3d-m { display: none !important; }
.rk.locked .cn-badge.has3d > .rk3d-m { filter: grayscale(1); opacity: .45; }
.lg-row .cn-badge.xs { width: 46px; height: 50px; margin: -6px 2px; }
.rkh-badge .cn-badge { width: 64px; height: 70px; }


/* ─────────── 11 Nov tune: lighter navy, more white and red, heavier type ─────────── */
.lh, .bp, .board, .st-hero { box-shadow: inset 0 3px 0 var(--accent, #E31937), inset 0 0 0 1px rgba(255,255,255,.14), var(--shadow); }
.lh h1 .w.hb, .lh h1 b, .lh-stat b { color: #fff; }
.meter { height: 6px; border-radius: 3px; }
.meter > i { background: var(--accent, #E31937); border-radius: 3px; }
.sec-head h2 { font-weight: 600; color: var(--ink); }
.sec-head h2::before { width: 28px; height: 3px; border-radius: 2px; }
.nc-title { font-weight: 600; }
.gc-clock b { font-weight: 600; }
.staff-hello .hb-line { font-weight: 500; color: var(--ink2); }
.card h3, .row b, .tile b { font-weight: 600; }
.tabbar a > span:last-child, .tabbar button > span:last-child { font-weight: 600; }
:root[data-theme="dark"] .meter > i { background: var(--accent, #E31937); }
.bubble.mine .vm-t, .bubble.mine .vm-rate { color: #fff; border-color: rgba(255,255,255,.45); }

/* ─────────── 11 Nov, second tune (light theme): grey is the main colour, red the accent, writing in blue ─────────── */
:root[data-theme="light"] {
  --paper: #F4F5F8; --soft: #EEF0F4; --soft2: #E6E8EE; --line: #DDE0E8; --line2: #C6CAD6;
  --ink: #14228F; --ink2: #2A3AA6; --mute: #55609F; --faint: #55609F; --exit-off: #55609F;
  --flap: #FFFFFF; --flap-ink: #14228F;
}
:root[data-theme="light"] .btn.go { background: var(--accent, #E31937); border-color: var(--accent, #E31937); color: #fff; }
@media (hover: hover) { :root[data-theme="light"] .btn.go:hover { background: #C7142F; border-color: #C7142F; } }
/* the student hero: grey panel, blue writing */
:root[data-theme="light"] .lh { background-color: #E6E8EE; color: var(--ink);
  background-image: linear-gradient(rgba(20,34,143,.05) 1px, transparent 1px), linear-gradient(90deg, rgba(20,34,143,.05) 1px, transparent 1px);
  box-shadow: inset 0 3px 0 var(--accent, #E31937), inset 0 0 0 1px var(--line2); }
:root[data-theme="light"] .lh h1, :root[data-theme="light"] .lh h1 b, :root[data-theme="light"] .lh h1 .w.hb,
:root[data-theme="light"] .lh-stat, :root[data-theme="light"] .lh-stat b { color: var(--ink); }
:root[data-theme="light"] .lh-meta { color: var(--ink2); }
:root[data-theme="light"] .lh-date, :root[data-theme="light"] .lh-stat span { color: var(--mute); }
:root[data-theme="light"] .lh-stat { border-right-color: var(--line2); }
:root[data-theme="light"] .lh-wm { opacity: .4; }
/* the board: grey panel, white tiles, blue letters */
:root[data-theme="light"] .board { background: #E6E8EE; box-shadow: inset 0 3px 0 var(--accent, #E31937), inset 0 0 0 1px var(--line2); }
:root[data-theme="light"] .board .bcap { color: var(--mute); }
:root[data-theme="light"] .board .brow { border-color: var(--line2); }
:root[data-theme="light"] .board .flap > span, :root[data-theme="light"] .board .flap .b, :root[data-theme="light"] .board .flap .fb { background: #fff; color: var(--ink); }
:root[data-theme="light"] .board .flap .t, :root[data-theme="light"] .board .flap .ft { box-shadow: inset 0 -1px 0 rgba(20,34,143,.18); }
:root[data-theme="light"] .board .flap { color: var(--ink); }


/* ─────────── 11 Nov, third tune (dark theme): charcoal grey, not blue ─────────── */
:root[data-theme="dark"] {
  --panel: #24262B;
  --paper: #121316; --card: #1C1E22; --soft: #24262B; --soft2: #2C2F35;
  --ink: #F3F4F6; --ink2: #CDD0D6; --mute: #A0A5AF; --faint: #9499A4; --exit-off: #A0A5AF;
  --line: #32353C; --line2: #484C55;
  --navy: #2E3138; --navy2: #383C44; --navy3: #444852; --navy-t: #26282D;
  --on-navy2: #CDD0D6; --on-navy3: #A0A5AF;
  --flap: #383C44; --flap-ink: #FFFFFF;
}
:root[data-theme="dark"] .btn.go { background: var(--accent, #E31937); border-color: var(--accent, #E31937); color: #fff; }
/* 20 Nov: hovering the main button in dark mode turned it near-white (#E4E6FA, an older
   rule) while its text stayed white — the button all but vanished. Hover now keeps the
   button's own colour and just lifts it a little. */
@media (hover: hover) { :root[data-theme="dark"] .btn.go:not(:disabled):hover { background: var(--accent, #E31937); border-color: var(--accent, #E31937); color: #fff; filter: brightness(1.14); } }
:root[data-theme="dark"] .board .flap > span { background: #3A3E46; }
:root[data-theme="dark"] .board .flap .b, :root[data-theme="dark"] .board .flap .fb { background: #33373E; }
:root[data-theme="dark"] .lh-date, :root[data-theme="dark"] .lh-stat span, :root[data-theme="dark"] .exit small { color: #A0A5AF; }
:root[data-theme="dark"] .lh-meta { color: #CDD0D6; }
:root[data-theme="dark"] .topbar, :root[data-theme="dark"] .tabbar { background: #1C1E22; }

/* 11 Nov: in dark mode the accent is blue, not red */
:root[data-theme="dark"] { --accent: #2B62F0; --red: #2B62F0; --red-hov: #3D74FF; }
:root[data-theme="dark"] .sb-role i { box-shadow: 0 0 10px 2px rgba(43,98,240,.8); }
/* 11 Nov: dark mode keeps a few red touches beside the blue */
:root[data-theme="dark"] .lh, :root[data-theme="dark"] .bp, :root[data-theme="dark"] .board, :root[data-theme="dark"] .st-hero { box-shadow: inset 0 3px 0 #E31937, inset 0 0 0 1px rgba(255,255,255,.14), var(--shadow); }
:root[data-theme="dark"] .sec-head h2::before, :root[data-theme="dark"] .lh-stat:first-child::after { background: #E31937; }
:root[data-theme="dark"] .exit { box-shadow: inset 0 -3px 0 #E31937; }
:root[data-theme="dark"] .exit.off { box-shadow: none; }
:root[data-theme="dark"] .dot, :root[data-theme="dark"] .sb-nav .dot, :root[data-theme="dark"] .sb-role i { background: #E31937; }
:root[data-theme="dark"] .sb-role i { box-shadow: 0 0 10px 2px rgba(227,25,55,.8); }

/* ─────────── SoffCRM gate (13 Nov) ─────────── */
.crm-slot { display: grid; gap: 10px; margin: 0 0 22px; }
.crm-slot:empty { display: none; }
.crm-health { display: flex; align-items: center; gap: 10px; font-size: 13.5px; font-weight: 500; color: var(--ink2); }
.crm-health i { width: 9px; height: 9px; border-radius: 50%; background: #1E9E61; flex: none; }
.crm-health.bad { color: var(--red-ink); font-weight: 600; }
.crm-health.bad i { background: #E31937; box-shadow: 0 0 0 4px rgba(227,25,55,.18); }
.crm-health small { display: block; font-weight: 400; color: var(--mute); }
.crm-card { width: 100%; text-align: left; cursor: pointer; align-items: center; gap: 14px; box-shadow: inset 4px 0 0 #E31937, var(--shadow); }
.crm-n { font: 600 30px/1 var(--f-display, inherit); color: #E31937; min-width: 34px; text-align: center; font-variant-numeric: tabular-nums; }
.crm-row { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; padding: 12px 0; border-top: 1px solid var(--line); }
.crm-row:first-of-type { border-top: 0; }
.crm-why { color: var(--red-ink); margin-top: 2px; }
.crm-left b { color: var(--ink); }
.crm-row .chip { white-space: nowrap; }
.crm-newno { font: 600 26px/1.2 var(--mono, monospace); letter-spacing: .02em; color: var(--ink); margin: 6px 0 4px; font-variant-numeric: tabular-nums; }
/* a word, not a number: smaller, and never broken mid-word ("Оплачен / о") */
.me-tile b.word { font-size: clamp(17px, 4.6vw, 28px); letter-spacing: -.02em; overflow-wrap: normal; word-break: keep-all; hyphens: none; padding: 30px 0 0; white-space: nowrap; }
.crm-pair { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; margin-top: 8px; }
.crm-pair select { flex: 1 1 220px; min-width: 0; }
.crm-paired { margin-top: 14px; }
.crm-paired summary { cursor: pointer; font-weight: 600; color: var(--ink2); padding: 8px 0; }
.latin-warn { margin: 6px 0 0; font-size: 13px; line-height: 1.4; color: var(--red, #E31937); font-weight: 600; }
.input[aria-invalid="true"] { border-color: var(--red, #E31937); }

/* the curtain while it waits: the rule becomes a running bar, the mark breathes,
   and after a moment a line says what is happening */
.curtain.wait .ct-rule i { width: 38%; transform: none; animation: ctRun 1.05s cubic-bezier(.45,.05,.55,.95) infinite; }
@keyframes ctRun { from { transform: translateX(-110%); } to { transform: translateX(290%); } }
.curtain.wait .ct-mark { animation: ctBreath 1.6s ease-in-out infinite; opacity: 1; transform: none; }
@keyframes ctBreath { 0%, 100% { transform: scale(1); } 50% { transform: scale(1.06); } }
.ct-sub { min-height: 18px; font-size: 13px; font-weight: 600; color: rgba(255,255,255,.7); opacity: 0; transition: opacity .3s ease; }
.curtain.slow .ct-sub { opacity: 1; }
@media (prefers-reduced-motion: reduce) { .curtain.wait .ct-rule i, .curtain.wait .ct-mark { animation: none; } }
/* the phone cell carries two buttons: give it room so the number is never cut to "+9…" */
.stu-facts-card .facts-grid .fact-cell:first-child { grid-column: span 2; }
@media (max-width: 400px) { .stu-facts-card .facts-grid .fact-cell:first-child { grid-column: auto; } }
.stu-facts-card .fact-cell b .num { white-space: nowrap; }

/* SoffCRM check, split into categories */
.crm-tabs { display: flex; flex-wrap: wrap; margin: 14px 0 6px; }
.crm-tabs button { flex: 1 1 auto; display: inline-flex; align-items: center; justify-content: center; gap: 8px; }
.crm-tabs em { font-style: normal; font-size: 11.5px; min-width: 22px; padding: 1px 7px; border-radius: 999px; background: var(--soft2); color: var(--ink2); }
.crm-tabs em.hot { background: #E31937; color: #fff; }
.crm-reason { margin-top: 18px; }
.crm-rhead { display: flex; align-items: center; gap: 10px; }
.crm-rhead b { font-size: 15px; }
.crm-rhead .num { font-size: 12px; color: var(--mute); }
.crm-rwhy { margin: 3px 0 8px; }
.crm-grp { border: 1px solid var(--line); border-radius: 12px; padding: 0 14px; margin-top: 8px; }
.crm-grp summary { display: flex; align-items: center; gap: 10px; padding: 11px 0; cursor: pointer; list-style: none; font-weight: 600; font-size: 13.5px; color: var(--ink2); }
.crm-grp summary::-webkit-details-marker { display: none; }
.crm-grp summary .num { font-size: 12px; color: var(--mute); }
.crm-grp summary .ic { transition: transform .2s; }
.crm-grp:not([open]) summary .ic { transform: rotate(-90deg); }
.crm-grp .crm-row { padding: 10px 0; }
.crm-grp .crm-row:first-of-type { border-top: 1px solid var(--line); }
.crm-empty { margin-top: 14px; }
@media (max-width: 560px) { .crm-tabs button { flex: 1 1 45%; } }

/* Today: Waiting for review folds away behind its heading */
.wait-head { align-items: center; }
.wait-tog { display: inline-flex; align-items: center; gap: 12px; flex: 1 1 auto; min-width: 0; padding: 6px 0; text-align: left; cursor: pointer; color: inherit; background: none; border: 0; }
.wait-tog h2 { margin: 0; }
.wait-tog .wait-sumline { white-space: nowrap; }
.wait-tog > .ic { flex: none; transition: transform .2s; }
.wait-tog[aria-expanded="false"] > .ic { transform: rotate(-90deg); }
@media (max-width: 560px) { .wait-tog .wait-sumline { display: none; } }
.wait-head > .link { position: relative; flex: none; }
.wait-tog { position: relative; z-index: 1; }

/* Leads (sign-ups from the join page) */
.ld-stats { display: grid; grid-template-columns: repeat(5, minmax(0, 1fr)); gap: 10px; margin: 6px 0 14px; }
.ld-stat { padding: 14px 16px; display: flex; flex-direction: column; gap: 2px; }
.ld-stat b { font-size: 26px; line-height: 1.1; }
.ld-stat span { font-size: 12px; color: var(--mute); }
.ld-filters { display: flex; flex-wrap: wrap; gap: 10px; align-items: flex-end; margin-bottom: 12px; }
.ld-filters label { display: flex; flex-direction: column; gap: 4px; font-size: 12px; color: var(--mute); min-width: 130px; }
.ld-filters label.grow { flex: 1 1 180px; }
.ld-table th, .ld-table td { text-align: left; white-space: nowrap; font-size: 13px; padding: 9px 10px; vertical-align: middle; }
.ld-table td small { display: block; }
.ld-table tr.ld-red th:first-child { box-shadow: inset 3px 0 0 #E31937; }
.ld-table .plate { margin-left: 4px; }
.ld-st { min-width: 128px; }
.ld-note { max-width: 180px; overflow: hidden; text-overflow: ellipsis; }
.ld-log .row { gap: 10px; padding: 6px 0; border-top: 1px solid var(--line); align-items: baseline; }
@media (max-width: 760px) { .ld-stats { grid-template-columns: repeat(2, minmax(0, 1fr)); } }

/* ───────── THE PROMOTION (21 Nov) — rankup.js */
body.ru-on { overflow: hidden; }
.ru { --c1: #E31937; --c2: #2563FF; --gl: rgba(37, 99, 255, .55);
  position: fixed; inset: 0; z-index: 9000; display: flex; flex-direction: column; align-items: center; justify-content: center;
  padding: max(24px, env(safe-area-inset-top)) 24px max(28px, env(safe-area-inset-bottom));
  background: radial-gradient(120% 80% at 50% 34%, #101a5c 0%, #070a24 55%, #03040f 100%); color: #fff; overflow: hidden;
  opacity: 0; transition: opacity .35s ease-out; text-align: center; }
.ru.ru-of { --gl: rgba(37, 99, 255, .7); }
.ru.ru-hf { --c2: #FFD34D; --gl: rgba(255, 196, 40, .6); background: radial-gradient(120% 80% at 50% 34%, #3a2a05 0%, #140d02 55%, #060400 100%); }
.ru.in { opacity: 1; }
.ru.out { opacity: 0; transition-duration: .3s; }
.ru-sky, .ru-sparks { position: absolute; inset: 0; pointer-events: none; }
.ru-sparks { width: 100%; height: 100%; z-index: 3; }
.ru-rays { position: absolute; left: 50%; top: 36%; width: 220vmax; height: 220vmax; transform: translate(-50%, -50%) scale(.2); opacity: 0;
  background: repeating-conic-gradient(from 0deg, rgba(255,255,255,.075) 0 6deg, transparent 6deg 18deg);
  -webkit-mask: radial-gradient(circle, #000 0, transparent 48%); mask: radial-gradient(circle, #000 0, transparent 48%);
  transition: transform 1.1s cubic-bezier(.16,1,.3,1), opacity .6s; }
.ru-glow { position: absolute; left: 50%; top: 36%; width: 520px; height: 520px; border-radius: 50%; transform: translate(-50%, -50%) scale(.3);
  background: radial-gradient(circle, var(--gl) 0, transparent 62%); opacity: 0; transition: transform 1s cubic-bezier(.16,1,.3,1), opacity .6s; }
.ru.s-drop .ru-rays { opacity: 1; transform: translate(-50%, -50%) scale(1); animation: ruSpin 26s linear infinite; }
.ru.s-drop .ru-glow { opacity: 1; transform: translate(-50%, -50%) scale(1); }
@keyframes ruSpin { to { transform: translate(-50%, -50%) rotate(360deg); } }

.ru-stage { position: relative; z-index: 2; width: 240px; height: 250px; display: grid; place-items: center; margin-top: -4vh; }
.ru-stage > * { grid-area: 1 / 1; }
.ru-old { transform: scale(1.5); animation: ruShake .7s ease-in-out .1s both; }
@keyframes ruShake { 0%,100% { transform: scale(1.5) } 15% { transform: scale(1.5) translate(-3px,1px) rotate(-2deg) } 30% { transform: scale(1.53) translate(4px,-1px) rotate(2deg) }
  45% { transform: scale(1.5) translate(-5px,2px) rotate(-3deg) } 60% { transform: scale(1.56) translate(6px,-2px) rotate(3deg) } 80% { transform: scale(1.58) translate(-6px,1px) rotate(-4deg) } }
.ru.s-break .ru-old { animation: none; transform: scale(2.3); opacity: 0; filter: blur(8px) brightness(3); transition: transform .35s cubic-bezier(.3,0,.8,.2), opacity .3s, filter .3s; }
.ru-flash { width: 40px; height: 40px; border-radius: 50%; background: #fff; opacity: 0; transform: scale(.2); }
.ru.s-break .ru-flash { animation: ruFlash .6s ease-out both; }
@keyframes ruFlash { 0% { opacity: 1; transform: scale(.4) } 40% { opacity: .95 } 100% { opacity: 0; transform: scale(28) } }
.ru-wave { width: 120px; height: 120px; border-radius: 50%; border: 3px solid rgba(255,255,255,.85); opacity: 0; }
.ru.s-drop .ru-wave { animation: ruWave .9s cubic-bezier(.16,1,.3,1) both; }
@keyframes ruWave { 0% { opacity: .95; transform: scale(.4); border-width: 10px } 100% { opacity: 0; transform: scale(4.2); border-width: 1px } }
.ru-new { opacity: 0; transform: scale(2.6) translateY(-30px); filter: blur(10px); }
.ru.s-drop .ru-new { animation: ruDrop .75s cubic-bezier(.2,1.5,.35,1) both; }
@keyframes ruDrop { 0% { opacity: 0; transform: scale(2.6) translateY(-40px); filter: blur(10px) } 55% { opacity: 1; filter: blur(0) } 100% { opacity: 1; transform: none; filter: none } }
.ru-new .rk3d { width: 200px; height: 220px; }
.ru-new .cn-badge.lg { transform: scale(1.7); }

.ru-word { position: relative; z-index: 4; margin: 6px 0 0; display: flex; gap: .04em; justify-content: center;
  font-weight: 900; font-size: clamp(48px, 14vw, 104px); line-height: 1; letter-spacing: .02em; text-transform: uppercase; }
.ru-word span { display: inline-block; opacity: 0; transform: scale(3) translateY(-10px); filter: blur(6px);
  background: linear-gradient(180deg, #fff 30%, #c9d4ff); -webkit-background-clip: text; background-clip: text; color: transparent;
  text-shadow: 0 0 0 transparent; }
.ru.ru-hf .ru-word span { background-image: linear-gradient(180deg, #FFF6CC 20%, #FFC42E); }
.ru.s-word .ru-word span { animation: ruSlam .42s cubic-bezier(.2,1.3,.4,1) calc(var(--k) * 55ms) both; }
@keyframes ruSlam { 0% { opacity: 0; transform: scale(3) translateY(-12px); filter: blur(6px) } 60% { opacity: 1; filter: blur(0) } 100% { opacity: 1; transform: none; filter: none } }
.ru-word::after { content: ""; position: absolute; left: 50%; bottom: -10px; height: 4px; width: 0; transform: translateX(-50%); border-radius: 4px;
  background: linear-gradient(90deg, var(--c1), #fff, var(--c2)); transition: width .6s cubic-bezier(.16,1,.3,1) .45s; }
.ru.s-word .ru-word::after { width: min(78%, 420px); }

.ru-info { position: relative; z-index: 4; margin-top: 26px; opacity: 0; transform: translateY(14px); transition: opacity .5s, transform .6s cubic-bezier(.16,1,.3,1); }
.ru.s-info .ru-info { opacity: 1; transform: none; }
.ru-to { margin: 0; font-size: clamp(26px, 7vw, 40px); font-weight: 800; letter-spacing: -.01em; }
.ru-path { display: inline-flex; align-items: center; gap: 8px; margin: 10px 0 0; padding: 7px 14px; border-radius: 99px; background: rgba(255,255,255,.08);
  font-weight: 700; font-size: 13px; line-height: 1; font-family: var(--mono, ui-monospace, monospace); letter-spacing: .14em; color: rgba(255,255,255,.75); }
.ru-path b { color: #fff; } .ru-path i { opacity: .4; font-style: normal; }
.ru-req { margin: 14px auto 0; max-width: 32ch; color: rgba(255,255,255,.7); font-size: 15px; }
.ru-go { position: relative; z-index: 4; margin-top: 28px; min-width: 240px; min-height: 52px; opacity: 0; transform: translateY(10px); pointer-events: none;
  transition: opacity .4s, transform .5s cubic-bezier(.16,1,.3,1); }
.ru.s-go .ru-go { opacity: 1; transform: none; pointer-events: auto; }

/* less motion: no shake, no sparks, no slam — it simply appears, settled */
.ru.calm .ru-old, .ru.calm .ru-flash, .ru.calm .ru-wave { display: none; }
.ru.calm .ru-new, .ru.calm .ru-word span { animation: none !important; opacity: 1; transform: none; filter: none; }
.ru.calm .ru-rays { animation: none; }
@media (prefers-reduced-motion: reduce) { .ru *, .ru::after { animation-duration: .01ms !important; } }
/* ═══════════════════════════════════════════════════════════════════════════
   THE LAUNCH SHELL

   Stage one of the port: the sidebar, the phone bars and the More sheet in
   the Launch design, while the 55 screens inside them are still the ones
   that are live today.

   Why it is done this way. The brief says to bring the Launch stylesheet in
   as the new base — and that is right, at the end. But doing it now would
   leave every screen unstyled until it is redrawn, and the brief also says
   not to touch a single screen until the shell's route walk passes. Those
   two cannot both be true at once, so: the shell takes its Launch values
   HERE, written out rather than taken from :root, and the global tokens are
   left alone. Every existing screen renders exactly as it does today, which
   is what makes the route walk mean anything.

   As each screen is redrawn, its colours come from these same values, and
   when the last one is done the values move up to :root and this file
   disappears into the base. Nothing here is meant to survive that.

   Launch values used below, from Part 2.1:
     navy var(--panel, #111A7C) · red var(--accent, #E31937) · on-navy #FFFFFF / #C9CCEC / #8B8FC4
     paper #F1F2F9 · card #FFFFFF · ink #0A0B2E · line #E6E7EF · mute #7C7FA3
   ═══════════════════════════════════════════════════════════════════════════ */

:root { --side: 264px; }

/* ─────────── the desktop sidebar ───────────
   Hidden below 1000px but always in the DOM, so the two navigations can
   never disagree about what exists. */
.sidebar { display: none; }

@media (min-width: 1000px) {
  .sidebar {
    display: flex; flex-direction: column;
    position: fixed; left: 0; top: 0; bottom: 0; width: var(--side);
    background: var(--panel, #111A7C); color: #fff;
    padding: 30px 22px 20px;
    z-index: 30; overflow-y: auto; scrollbar-width: none;
  }
  .sidebar::-webkit-scrollbar { display: none; }
  /* The top bar and the phone tabs are not drawn at this width at all —
     not hidden behind the sidebar, not rendered. */
  .topbar, .tabbar { display: none !important; }
  #main { margin-left: var(--side); padding-bottom: 70px; }
  .toasts { left: var(--side); bottom: 24px; }
  body.in-exam #exam-host { left: var(--side); }
}

.sb-brand {
  display: flex; align-items: center; gap: 13px;
  font: 500 10.5px var(--mono, ui-monospace); letter-spacing: .3em;
  text-transform: uppercase; color: #fff; white-space: nowrap;
}
.sb-brand svg, .sb-brand .ic { height: 26px; width: 26px; flex: none; }
.sb-role {
  font: 500 9.5px var(--mono, ui-monospace); letter-spacing: .24em;
  text-transform: uppercase; color: #8B8FC4; margin: 10px 0 28px 39px;
}
/* ─────────── the search field at the top of the list ───────────
   Open, always, rather than a magnifier that hides a sheet behind it. It is
   the first thing in the list because finding one student by name is the most
   common thing a teacher does, and it should not cost a click first.
   Only drawn at ≥1000px, where the sidebar itself is. */
.sb-search { display: none; }
@media (min-width: 1000px) {
  .sb-search { display: block; position: relative; margin: 0 0 18px; }
}
.sb-srch {
  display: flex; align-items: center; gap: 9px;
  height: 44px; padding: 0 11px;
  border-radius: 12px; border: 1px solid rgba(255,255,255,.16);
  background: rgba(255,255,255,.07);
  transition: border-color .2s, background .2s;
}
.sb-srch .ic { color: #8B8FC4; flex: none; transition: color .2s; }
.sb-srch input {
  flex: 1; min-width: 0;
  background: none; border: 0; outline: 0; padding: 0;
  color: #fff; font-size: 14px; font-family: inherit;
  -webkit-appearance: none; appearance: none;
}
.sb-srch input::placeholder { color: #8B8FC4; }
.sb-srch input::-webkit-search-cancel-button { -webkit-appearance: none; }
/* the hint key, which the keydown handler at the foot of teacher.js honours */
.sb-srch kbd {
  flex: none; display: grid; place-items: center;
  min-width: 19px; height: 19px; padding: 0 4px;
  border-radius: 5px; background: rgba(255,255,255,.12); color: #C9CCEC;
  font: 500 10px/1 var(--mono, ui-monospace);
  transition: opacity .2s;
}
.sb-srch:focus-within {
  border-color: rgba(255,255,255,.42); background: rgba(255,255,255,.12);
}
.sb-srch:focus-within .ic { color: #fff; }
.sb-srch:focus-within kbd { opacity: 0; }
@media (hover: hover) {
  .sb-srch:hover { border-color: rgba(255,255,255,.28); }
}

/* the results, as a card over the page rather than pushing the list down */
.sb-res {
  position: fixed; z-index: 34; max-height: 54vh; overflow-y: auto;
  padding: 6px; border-radius: 14px;
  background: var(--card, #fff); color: var(--ink, #0A0B2E);
  box-shadow: 0 1px 2px rgba(1,0,76,.1), 0 14px 38px rgba(1,0,76,.26), inset 0 0 0 1px var(--line, transparent);
}
.sb-res[hidden] { display: none; }
.sb-hit {
  display: flex; align-items: center; gap: 10px;
  padding: 9px 10px; border-radius: 10px; min-height: 48px;
  color: inherit; transition: background .15s;
}
.sb-hit .grow { min-width: 0; }
.sb-hit .hit-t {
  display: block; font-size: 14px; font-weight: 500;
  overflow: hidden; text-overflow: ellipsis; white-space: nowrap;
}
.sb-hit .hit-s {
  display: block; margin-top: 1px; font-size: 11.5px;
  color: var(--mute, #7C7FA3);
  overflow: hidden; text-overflow: ellipsis; white-space: nowrap;
}
.sb-hit-g {
  flex: none; display: grid; place-items: center;
  width: 32px; height: 32px; border-radius: 9px;
  background: var(--soft, #F1F2F9); color: var(--ink, #111A7C);
}
/* the first hit is what Enter takes, so it is marked as such */
.sb-res .sb-hit:first-child { background: var(--soft, #F1F2F9); }
@media (hover: hover) { .sb-hit:hover { background: var(--soft2, #E8EAF4); } }
.sb-none { padding: 13px 11px; margin: 0; font-size: 13px; color: var(--mute, #7C7FA3); }


.sb-nav { display: flex; flex-direction: column; gap: 2px; }
.sb-nav a {
  display: flex; align-items: center; gap: 13px;
  padding: 12px; margin: 0 -12px; border-radius: 12px;
  color: #A9ADDC; font-size: 15px; font-weight: 500; line-height: 1.2;
  transition: color .2s, background .2s, transform .3s var(--ease);
}
/* A long label in Russian or Kazakh wraps rather than pushing the dot off
   the edge — the ledger's rule that a button may wrap but never clip. */
.sb-nav a span { flex: 1; min-width: 0; overflow-wrap: anywhere; }
.sb-nav a .ic { opacity: .85; flex: none; transition: transform .3s var(--spring); }
@media (hover: hover) {
  .sb-nav a:hover { color: #fff; background: rgba(255,255,255,.07); transform: translateX(4px); }
  .sb-nav a:hover .ic { transform: scale(1.12); }
}
.sb-nav a.on { color: #fff; background: rgba(255,255,255,.12); }
.sb-nav a.on::after {
  content: ""; width: 7px; height: 7px; border-radius: 50%;
  background: var(--accent, #E31937); flex: none;
}
/* the unread mark sits in the row rather than floating over a corner */
.sb-nav .dot {
  position: static; border: 0; flex: none;
  min-width: 18px; height: 18px; line-height: 18px; padding: 0 5px;
  border-radius: 99px; background: var(--accent, #E31937); color: #fff;
  font: 600 10px/18px var(--mono, ui-monospace); text-align: center;
}
.sb-sep { height: 1px; background: rgba(255,255,255,.13); margin: 12px 0; }
.sb-foot { margin-top: auto; padding-top: 22px; }
.sb-tools { display: flex; gap: 4px; margin: 0 -6px 12px; flex-wrap: wrap; }
.sb-tools .btn.icon,
.sb-tools .btn.ghost {
  color: #C9CCEC; border-radius: 11px; box-shadow: none; background: none;
  transition: background .2s, transform .2s var(--spring), color .2s;
}
@media (hover: hover) {
  .sb-tools .btn.icon:hover, .sb-tools .btn.ghost:hover {
    background: rgba(255,255,255,.12); color: #fff; transform: translateY(-2px);
  }
}
.sb-me {
  display: flex; align-items: center; gap: 12px;
  padding: 12px; border-radius: 14px;
  background: rgba(255,255,255,.08); color: #fff;
  transition: background .2s;
}
@media (hover: hover) { .sb-me:hover { background: rgba(255,255,255,.15); } }
.sb-me .grow { min-width: 0; }
.sb-me b {
  display: block; font-size: 14px; font-weight: 500;
  overflow: hidden; text-overflow: ellipsis; white-space: nowrap;
}
.sb-me small {
  display: block; font: 500 9.5px var(--mono, ui-monospace); letter-spacing: .14em;
  text-transform: uppercase; color: #8B8FC4; margin-top: 3px;
  overflow: hidden; text-overflow: ellipsis; white-space: nowrap;
}

/* Farsi: the sidebar moves to the right edge and the page margin with it. */
:root[dir="rtl"] .sidebar { left: auto; right: 0; }
@media (min-width: 1000px) {
  :root[dir="rtl"] #main { margin-left: 0; margin-right: var(--side); }
  :root[dir="rtl"] .toasts { left: 0; right: var(--side); }
  :root[dir="rtl"] .sb-nav a:hover { transform: translateX(-4px); }
  :root[dir="rtl"] .sb-role { margin-left: 0; margin-right: 39px; }
}

/* ─────────── More ───────────
   The remaining destinations as a grid of real targets, two across, each
   one at least a 44px tap and able to wrap its own label. */
.more-grid {
  display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px;
}
@media (max-width: 360px) { .more-grid { grid-template-columns: 1fr; } }
.more-item {
  display: flex; align-items: center; gap: 12px;
  min-height: 56px; padding: 12px 14px;
  border: 1px solid var(--line); border-radius: var(--r, 12px);
  color: var(--ink); font-weight: 500; line-height: 1.25;
  min-width: 0; overflow-wrap: anywhere;
  transition: border-color .2s, background .2s;
}
@media (hover: hover) { .more-item:hover { border-color: var(--ink); background: var(--soft); } }
.more-item:active { transform: scale(.985); }
.more-ic { position: relative; flex: none; display: grid; place-items: center; color: var(--ink2); }
.more-ic .dot {
  position: absolute; right: -4px; top: -3px;
  min-width: 16px; height: 16px; line-height: 16px; padding: 0 4px;
  border-radius: 99px; background: var(--accent, #E31937); color: #fff;
  font: 600 9.5px/16px var(--mono, ui-monospace); text-align: center;
}

/* ─────────── the phone bar, now five across ───────────
   The bar sets --n itself from how many it is drawing, so four tabs and a
   More divide the width evenly without the count being written in twice. */
.tabbar { display: grid; grid-template-columns: repeat(var(--n, 5), minmax(0, 1fr)); padding-left: max(6px, env(safe-area-inset-left)); padding-right: max(6px, env(safe-area-inset-right)); }
.tabbar a, .tabbar button { min-width: 0; min-height: 48px; padding: 0 1px; margin: 0; width: 100%; height: 100%; -webkit-appearance: none; appearance: none; }
.tabbar a > span:last-child, .tabbar button > span:last-child { max-width: 100%; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
@media (max-width: 380px) { .tabbar a > span:last-child, .tabbar button > span:last-child { letter-spacing: .06em; font-size: 9px; } }
.tabbar button {
  display: flex; flex-direction: column; align-items: center; justify-content: center;
  gap: 3px; background: none; border: 0; color: inherit; font: inherit;
  position: relative; -webkit-tap-highlight-color: transparent;
}
/* the More button is a button, not a link, and needs the same treatment the
   links get for the label and the active mark */
.tabbar a > span:last-child, .tabbar button > span:last-child { font-size: 10px; line-height: 1.1; text-align: center; }
.tabbar a, .tabbar button { gap: 3px; }
@media (max-width: 380px) { .tabbar a > span:last-child, .tabbar button > span:last-child { font-size: 9px; } }
.tabbar button .ti { position: relative; display: grid; place-items: center; }

/* ─────────── Launch typography, on the shell only
   The screens inside still run on Overpass until each is redrawn, so the
   family is applied here rather than to body. When the last screen moves
   over, this goes up to :root as --f and the rule disappears. */
.sidebar, .tabbar, .more-grid, .topbar .role-tag {
  font-family: "NE Sans", system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
  letter-spacing: .004em;
}
.sb-brand, .sb-role, .sb-me small, .tabbar a > span:last-child,
.tabbar button > span:last-child, .topbar .role-tag {
  font-family: "NE Mono", ui-monospace, Menlo, monospace;
}
.tabbar a > span:last-child, .tabbar button > span:last-child {
  font-weight: 500; letter-spacing: .14em; text-transform: uppercase;
}

/* ═══════════════════════════════════════════════════════════════════════════
   THE ENTRY SCREEN

   Two panes from 880px: the navy hero holding still on the left while the
   sign-in column scrolls on the right. Below that the hero is a banner above
   the form. Nothing about signing in changes — the forms, the three tabs, the
   language row and the contacts are the ones that were already here; they
   have simply moved into the right-hand column.

   The hero is the one place in this stage that takes the Launch colours in
   full, because it is new rather than ported: #01002E → #1C1C9A, the red
   var(--accent, #E31937), the on-navy greys.
   ═══════════════════════════════════════════════════════════════════════════ */

.entry { min-height: 100dvh; background: var(--paper); }

.entry-top {
  position: relative; isolation: isolate; overflow: hidden;
  display: flex; flex-direction: column; justify-content: space-between;
  min-height: min(54dvh, 460px);
  padding: calc(var(--sat) + 22px) 24px 30px;
  background: linear-gradient(180deg, #01002E 0%, #0D1568 38%, #0B0B6E 78%, #1C1C9A 100%);
  color: #fff;
}
.entry-top::after {
  content: ""; position: absolute; left: 0; right: 0; bottom: 0;
  height: 2px; background: var(--accent, #E31937); z-index: 2;
}
.entry-top #e3d {
  position: absolute; inset: 0; width: 100%; height: 100%;
  display: block; z-index: -2; cursor: grab; touch-action: pan-y;
}
/* the flat mark: in the DOM from the first paint, hidden only once a real
   renderer has taken over */
.entry-top .e-mark {
  position: absolute; right: 6%; top: 50%; height: 62%;
  width: auto; max-width: none; margin: 0;
  transform: translateY(-50%); opacity: .92; z-index: -2;
  animation: eFloat 7s ease-in-out infinite;
}
.entry-top.has3d .e-mark { display: none; }   /* .live is the green online dot — see three3d.js */
@keyframes eFloat { 50% { transform: translateY(-53%) rotate(-2deg); } }
@media (prefers-reduced-motion: reduce) { .entry-top .e-mark { animation: none; } }

/* Two gradients, not one. The vertical alone left the label and the headline
   sitting on the bright band where the 3D floor catches the key light, and
   "AMERICAN ACADEMY · TASHKENT" in #8B8FC4 all but vanished into it. The
   second darkens the left edge, where every word on this pane lives, and
   fades out before it reaches the N. */
.e-vig {
  position: absolute; inset: 0; z-index: -1; pointer-events: none;
  background:
    linear-gradient(90deg, rgba(1,0,46,.74) 0%, rgba(1,0,46,.34) 48%, transparent 76%),
    linear-gradient(180deg, rgba(1,0,46,.35) 0%, transparent 22%,
              transparent 48%, rgba(4,4,70,.62) 100%);
}
.e-brand {
  display: flex; align-items: center; gap: 13px; pointer-events: none;
  font: 500 10.5px "NE Mono", ui-monospace, Menlo, monospace;
  letter-spacing: .32em; text-transform: uppercase; color: #fff;
}
.entry-top .e-brand img { height: 26px; width: auto; margin: 0; flex: none; }
.e-txt { pointer-events: none; margin-top: 40px; }
.e-lbl {
  display: flex; align-items: center; gap: 10px; margin: 0 0 14px;
  font: 500 10px "NE Mono", ui-monospace, Menlo, monospace;
  letter-spacing: .26em; text-transform: uppercase; color: #8B8FC4;
}
.e-lbl i { width: 6px; height: 6px; border-radius: 50%; background: var(--accent, #E31937); flex: none; }
.entry-top h1 {
  margin: 0; color: #fff;
  font-family: "NE Sans", system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
  font-size: clamp(52px, 13vw, 84px); line-height: .92;
  letter-spacing: -.035em; font-weight: 200;
  text-shadow: 0 2px 30px rgba(1,0,46,.6);
}
.entry-top h1 b { font-weight: 600; }
.entry-top .e-txt > p:last-child {
  color: #C9CCEC; font-size: 16px; line-height: 1.5; margin: 16px 0 0; max-width: 380px;
}

/* the sign-in column — it carries the pieces `.auth2-in` used to carry */
.entry-body { width: 100%; max-width: 520px; margin: 0 auto; padding: 28px 22px 48px; }
.entry-body > .auth-lang, .entry-body > .auth-card { width: 100%; max-width: 430px; margin-inline: auto; }
.entry-body > * { animation: rise .7s var(--ease) backwards; }
.entry-body > .auth-card { animation-delay: .12s; }
.entry-body > .auth-contact { animation-delay: .24s; }
@media (prefers-reduced-motion: reduce) { .entry-body > * { animation: none; } }

/* From 880px the hero is fixed to the left edge and the form scrolls past it.
   Fixed rather than sticky: Safari drops a sticky box inside overflow-x
   hidden, and this page has that. */
@media (min-width: 880px) {
  .entry { --ew: min(57vw, calc(100vw - 440px)); }
  .entry-top {
    position: fixed; left: 0; top: 0; bottom: 0; width: var(--ew);
    height: auto; min-height: 0; padding: 44px 52px 56px;
  }
  .entry-top h1 { font-size: clamp(72px, 8.4vw, 136px); }
  .entry-top .e-txt > p:last-child { font-size: 19px; max-width: 440px; margin-top: 26px; }
  .entry-top .e-mark { right: 8%; height: 56%; }
  .entry-body {
    /* width:auto, not the 100% of the narrow rule: 100% resolves against
       .entry, so with the margin added the column ran 780px off the right. */
    margin-left: var(--ew); width: auto; min-height: 100dvh; max-width: none;
    padding: 56px clamp(28px, 4vw, 64px); box-sizing: border-box;
  }
  .entry-body > * { max-width: 520px; margin-left: auto; margin-right: auto; width: 100%; }
  .entry-body > .auth-lang, .entry-body > .auth-card { max-width: 430px; }
}
/* Farsi: the hero takes the right edge and the form the left. */
:root[dir="rtl"] .entry-top { left: auto; right: 0; }
@media (min-width: 880px) {
  :root[dir="rtl"] .entry-body { margin-left: 0; margin-right: var(--ew); }
}

/* More's unread mark is a plain 8px light, not the 18px counter the links
   use: the dots icon is three specks, and a counter-sized pill sat on top of
   two of them, so the button read as a red blob with no icon. The button also
   takes the links' muted colour rather than inheriting ink. */
.tabbar button { color: var(--mute); cursor: pointer; }
.tabbar button.on { color: var(--red2); }
.tabbar button .dot { min-width: 8px; width: 8px; height: 8px; padding: 0; right: 9px; top: 1px; }

/* ─────────── the brand, with some weight to it ─────────── */
.sb-brand { gap: 14px; font: inherit; letter-spacing: 0; text-transform: none; }
.sb-logo { flex: none; width: 46px; height: 46px; border-radius: 13px; display: grid; place-items: center;
  background: linear-gradient(145deg, #1B1F92, #0A0A66 60%, #0D1568);
  box-shadow: inset 0 0 0 1px rgba(255,255,255,.14), inset 0 1px 0 rgba(255,255,255,.22), 0 10px 24px -10px rgba(0,0,0,.8), 0 0 28px -6px rgba(75,80,214,.75); }
.sb-brand .sb-logo svg, .sb-brand .sb-logo .ic { width: 30px; height: 30px; }
.sb-word { display: flex; flex-direction: column; gap: 3px; line-height: 1; }
.sb-word b { font: 700 17px/1 var(--f, sans-serif); letter-spacing: .26em; text-transform: uppercase;
  background: linear-gradient(180deg, #fff 30%, #B9BEF2); -webkit-background-clip: text; background-clip: text; color: transparent; }
.sb-word b + b { font-weight: 300; letter-spacing: .44em; }
.sb-role { display: inline-flex; align-items: center; gap: 9px; align-self: flex-start; margin: 18px 0 26px 0; padding: 9px 14px 9px 12px; border-radius: 99px;
  font: 600 10.5px/1 var(--mono, ui-monospace); letter-spacing: .24em; color: #fff;
  background: linear-gradient(90deg, rgba(227,25,55,.26), rgba(255,255,255,.06)); box-shadow: inset 0 0 0 1px rgba(255,255,255,.16); }
.sb-role i { width: 6px; height: 6px; border-radius: 50%; background: var(--accent, #E31937); box-shadow: 0 0 10px 2px rgba(227,25,55,.8); }
:root[dir="rtl"] .sb-role { margin-right: 0; }

/* ─────────── a narrow window on a computer: hamburger + drawer ─────────── */
.nav-burger, .nav-veil { display: none; }
@media (max-width: 999px) and (hover: hover) and (pointer: fine) {
  .nav-burger { display: inline-grid; margin-right: 6px; flex: none; }
  .tabbar { display: none !important; }
  #main { padding-bottom: 40px; }
  body.nav-open .sidebar { display: flex; flex-direction: column; position: fixed; left: 0; top: 0; bottom: 0; width: min(300px, 86vw);
    background: var(--panel, #111A7C); color: #fff; padding: 26px 20px 18px; z-index: 95; overflow-y: auto; scrollbar-width: none;
    box-shadow: 30px 0 60px -20px rgba(0,0,0,.6); animation: navIn .26s cubic-bezier(.2,.8,.2,1); }
  body.nav-open .nav-veil { display: block; position: fixed; inset: 0; z-index: 94; background: rgba(1,0,40,.5); -webkit-backdrop-filter: blur(3px); backdrop-filter: blur(3px); animation: veilIn .2s ease; }
  body.nav-open { overflow: hidden; }
}
@keyframes navIn { from { transform: translateX(-100%); } to { transform: none; } }
@keyframes veilIn { from { opacity: 0; } to { opacity: 1; } }
@media (prefers-reduced-motion: reduce) { body.nav-open .sidebar, body.nav-open .nav-veil { animation: none; } }

/* ─────────── sign-in, dark: the form side is the same navy as the hero ───────────
   It was the app's near-black paper, so the screen was cut in two: a navy
   picture and a black panel. In the dark the whole screen is one navy room. */
:root[data-theme="dark"] .entry { background: var(--panel, #111A7C); }
:root[data-theme="dark"] .entry-body { background: transparent; }
@media (min-width: 880px) {
  :root[data-theme="dark"] .entry { background: linear-gradient(90deg, var(--panel, #111A7C) 0%, var(--panel, #111A7C) 55%, #020246 100%); }
  :root[data-theme="dark"] .entry-top::after { content: ""; position: absolute; top: 0; bottom: 0; right: -1px; width: 140px; pointer-events: none;
    background: linear-gradient(90deg, rgba(1,0,76,0), var(--panel, #111A7C)); z-index: 3; }
}
:root[data-theme="dark"] .entry .auth-card { background: rgba(255,255,255,.055); border: 1px solid rgba(255,255,255,.14);
  box-shadow: 0 30px 70px -40px rgba(0,0,0,.9), inset 0 1px 0 rgba(255,255,255,.08); -webkit-backdrop-filter: blur(14px); backdrop-filter: blur(14px); }
:root[data-theme="dark"] .entry .auth-card .input, :root[data-theme="dark"] .entry .auth-card .phone { background: rgba(1,0,60,.55); border-color: rgba(255,255,255,.2); }
:root[data-theme="dark"] .entry .auth-card .seg { background: rgba(1,0,60,.5); }
:root[data-theme="dark"] .entry .auth-contact a, :root[data-theme="dark"] .entry .auth-lang .seg, :root[data-theme="dark"] .entry .auth-lang .btn { background: rgba(255,255,255,.06); border-color: rgba(255,255,255,.14); }
@media (min-width: 880px) {
  :root[data-theme="dark"] .entry { background: linear-gradient(180deg, #0C1362 0%, #0E166C 50%, #1B1D7C 56%, #15177A 100%); }
  :root[data-theme="dark"] .entry-top::after { display: none; }
  :root[data-theme="dark"] .entry-top { -webkit-mask-image: linear-gradient(90deg, #000 calc(100% - 220px), transparent); mask-image: linear-gradient(90deg, #000 calc(100% - 220px), transparent); }
}
@media (max-width: 879px) { :root[data-theme="dark"] .entry { background: linear-gradient(180deg, #15177A 0, var(--panel, #111A7C) 420px); } }

/* ─────────── sign-in, light: the same one navy room, with the form on a white card ─────────── */
:root:not([data-theme="dark"]) .entry { background: var(--panel, #111A7C); }
:root:not([data-theme="dark"]) .entry-body { background: transparent; }
@media (min-width: 880px) {
  :root:not([data-theme="dark"]) .entry { background: linear-gradient(180deg, #0C1362 0%, #0E166C 50%, #1B1D7C 56%, #15177A 100%); }
  :root:not([data-theme="dark"]) .entry-top { -webkit-mask-image: linear-gradient(90deg, #000 calc(100% - 220px), transparent); mask-image: linear-gradient(90deg, #000 calc(100% - 220px), transparent); }
}
@media (max-width: 879px) { :root:not([data-theme="dark"]) .entry { background: linear-gradient(180deg, #15177A 0, var(--panel, #111A7C) 420px); } }
:root:not([data-theme="dark"]) .entry .auth-card { box-shadow: 0 40px 80px -40px rgba(0,0,0,.75), 0 0 0 1px rgba(255,255,255,.5); }
:root:not([data-theme="dark"]) .entry .auth-lang .seg { background: rgba(255,255,255,.1); border: 1px solid rgba(255,255,255,.16); }
:root:not([data-theme="dark"]) .entry .auth-lang .seg button { color: #C9CCEC; }
:root:not([data-theme="dark"]) .entry .auth-lang .seg button.on, :root:not([data-theme="dark"]) .entry .auth-lang .seg button[aria-pressed="true"] { background: #fff; color: var(--panel, #111A7C); }
:root:not([data-theme="dark"]) .entry .auth-lang > .ic, :root:not([data-theme="dark"]) .entry .auth-lang .btn, :root:not([data-theme="dark"]) .entry .auth-lang svg { color: #C9CCEC; }
:root:not([data-theme="dark"]) .entry .auth-lang .seg button.on svg { color: var(--panel, #111A7C); }
:root:not([data-theme="dark"]) .entry .auth-contact { color: #C9CCEC; }
:root:not([data-theme="dark"]) .entry .auth-contact a { background: rgba(255,255,255,.08); border: 1px solid rgba(255,255,255,.16); color: #fff; box-shadow: none; }
:root:not([data-theme="dark"]) .entry .auth-contact a svg { color: #FF7A8C; }
:root:not([data-theme="dark"]) .entry .auth-contact p, :root:not([data-theme="dark"]) .entry .auth-contact .mute { color: #C9CCEC; }

/* ─────────── the wordmark on the sign-in hero: the same voice as the sidebar ─────────── */
.e-brand { gap: 16px; font: inherit; letter-spacing: 0; text-transform: none; }
.entry-top .e-brand img { height: 38px; }
.e-word { display: inline-flex; align-items: baseline; gap: .55em; line-height: 1; text-transform: uppercase; font-family: var(--f, sans-serif); font-size: 21px; }
.e-word b { font-weight: 700; letter-spacing: .26em; background: linear-gradient(180deg, #fff 30%, #B9BEF2); -webkit-background-clip: text; background-clip: text; color: transparent; }
.e-word i { font-style: normal; font-weight: 300; letter-spacing: .4em; color: #C9CCEC; }
@media (max-width: 879px) { .e-word { font-size: 17px; } .entry-top .e-brand img { height: 30px; } }


/* 11 Nov tune */
.sb-nav a { font-weight: 500; }
.sb-nav a.on { font-weight: 600; background: rgba(255,255,255,.16); box-shadow: inset 3px 0 0 var(--accent, #E31937); }
.sidebar { box-shadow: inset -1px 0 0 rgba(255,255,255,.12); }
.sb-me small { color: #C9CCEC; }

/* 11 Nov, second tune (light theme): grey sidebar, blue writing, red marker */
:root[data-theme="light"] .sidebar { background: #E9EBF0; color: #14228F; box-shadow: inset -1px 0 0 #D3D7E2; }
:root[data-theme="light"] .sb-word b { color: #14228F; }
:root[data-theme="light"] .sb-role { color: #14228F; background: #fff; border-color: #D3D7E2; }
:root[data-theme="light"] .sb-srch { background: #fff; border-color: #D3D7E2; }
:root[data-theme="light"] .sb-srch input { color: #14228F; }
:root[data-theme="light"] .sb-srch .ic, :root[data-theme="light"] .sb-srch input::placeholder, :root[data-theme="light"] .sb-srch kbd { color: #55609F; }
:root[data-theme="light"] .sb-nav a { color: #2A3AA6; }
:root[data-theme="light"] .sb-nav a.on { color: #14228F; background: #fff; box-shadow: inset 3px 0 0 var(--accent, #E31937), 0 1px 2px rgba(20,34,143,.08); }
@media (hover: hover) { :root[data-theme="light"] .sb-nav a:hover { color: #14228F; background: rgba(255,255,255,.7); } }
:root[data-theme="light"] .sb-sep { background: #D3D7E2; }
:root[data-theme="light"] .sb-tools .btn.icon, :root[data-theme="light"] .sb-tools .btn.ghost { color: #2A3AA6; }
:root[data-theme="light"] .sb-me { background: #fff; color: #14228F; }
:root[data-theme="light"] .sb-me small { color: #55609F; }

:root[data-theme="dark"] .sidebar { background: #1C1E22; }
:root[data-theme="dark"] .sb-nav a { color: #CDD0D6; }
:root[data-theme="dark"] .sb-role, :root[data-theme="dark"] .sb-me small, :root[data-theme="dark"] .sb-srch .ic, :root[data-theme="dark"] .sb-srch input::placeholder { color: #A0A5AF; }

/* ── sideways strips with a mouse (hscroll.js, 19 Nov): a fade where more is hidden, a thin scrollbar, a grab cursor */
@media (hover:hover) and (pointer:fine){
  .hs-on{scrollbar-width:thin !important;scrollbar-color:color-mix(in srgb,var(--ink2) 35%,transparent) transparent;cursor:grab}
  .hs-on::-webkit-scrollbar{display:block !important;height:6px}
  .hs-on::-webkit-scrollbar-thumb{background:color-mix(in srgb,var(--ink2) 35%,transparent);border-radius:6px}
  .hs-on::-webkit-scrollbar-track{background:transparent}
  .hs-on.hs-r{-webkit-mask-image:linear-gradient(90deg,#000 calc(100% - 56px),transparent);mask-image:linear-gradient(90deg,#000 calc(100% - 56px),transparent)}
  .hs-on.hs-l{-webkit-mask-image:linear-gradient(90deg,transparent,#000 56px);mask-image:linear-gradient(90deg,transparent,#000 56px)}
  .hs-on.hs-l.hs-r{-webkit-mask-image:linear-gradient(90deg,transparent,#000 56px,#000 calc(100% - 56px),transparent);mask-image:linear-gradient(90deg,transparent,#000 56px,#000 calc(100% - 56px),transparent)}
  .hs-on.hs-drag{cursor:grabbing;user-select:none}
  .hs-on.hs-drag *{pointer-events:none}
}
/* ───────── the new program (np.js). Uses the Launch tokens only. */
.np-soon{display:flex;gap:16px;align-items:center;padding:22px}
.np-soon h2{margin:0 0 4px}
.np-end .np-cls{width:100%}
.np-end .np-cls button{flex:1}
.np-h{display:flex;align-items:center;gap:6px;font-weight:800;font-size:13px;letter-spacing:.04em;text-transform:uppercase;color:var(--ink);margin-top:4px}
.np-h small{text-transform:none;letter-spacing:0;font-weight:500}
.np-picks{display:grid;gap:8px}
.np-pick{display:flex;align-items:center;gap:10px;min-height:48px;padding:10px 14px;border-radius:12px;border:1.5px solid var(--line);background:var(--card);color:var(--ink);text-align:left;font-weight:700;font-size:15px;transition:transform .09s ease-out,border-color .14s,background .14s}
.np-pick small{display:block;font-weight:500;font-size:12.5px;color:var(--mute)}
.np-pick .np-tick{width:22px;height:22px;border-radius:7px;border:1.5px solid var(--line);display:grid;place-items:center;flex:none;color:transparent;transition:background .14s,border-color .14s,color .14s}
.np-pick.on{border-color:var(--blue);background:color-mix(in srgb,var(--blue) 8%,var(--card))}
.np-pick.on .np-tick{background:var(--blue);border-color:var(--blue);color:#fff}
.np-pick:active:not(.dis){transform:scale(.97)}
.np-pick.dis{opacity:.55;cursor:not-allowed}
@media (hover:hover){.np-pick:not(.dis):hover{border-color:var(--blue);transform:translateY(-1px)}}
.np-pick:focus-visible{outline:2px solid var(--blue);outline-offset:2px}
.np-undo-row{display:flex;align-items:center;gap:10px;padding:12px 14px;margin-bottom:10px}
@media (prefers-reduced-motion:reduce){.np-pick{transition:none}}

/* ═════════ student side ═════════ */
.np-lp{max-width:760px}
.np-head{display:flex;align-items:center;gap:12px;margin:4px 0 18px}
.np-head h1{margin:0;font-size:clamp(24px,6vw,34px);line-height:1.1;overflow-wrap:anywhere}
.np-badge{display:grid;place-items:center;width:46px;height:46px;flex:none;border-radius:12px;background:var(--navy,#12499B);color:#fff;font-weight:800;font-size:22px}
.np-kick{font-size:12px;font-weight:800;letter-spacing:.08em;text-transform:uppercase;color:var(--red)}
.np-skel{display:grid;gap:12px;padding-top:20px}.np-skel i{display:block;height:74px;border-radius:16px;background:linear-gradient(90deg,var(--soft2),var(--soft),var(--soft2));background-size:200% 100%;animation:npSk 1.2s linear infinite}
@keyframes npSk{to{background-position:-200% 0}}
/* the four homework cards */
.np-hws{display:grid;gap:10px}
@media (min-width:700px){.np-hws{grid-template-columns:1fr 1fr}}
.np-hw{position:relative;overflow:hidden;display:flex;align-items:center;gap:14px;min-height:76px;padding:14px 16px;border-radius:16px;background:var(--card);border:1.5px solid var(--line);color:var(--ink);text-decoration:none;transition:transform .1s ease-out,border-color .15s,box-shadow .15s}
.np-hw-ic{display:grid;place-items:center;width:44px;height:44px;flex:none;border-radius:12px;background:var(--soft2);color:var(--ink)}
.np-hw-t{flex:1;min-width:0}.np-hw-t b{display:block;font-size:18px;font-weight:800}.np-hw-t small{display:block;color:var(--mute);font-size:13.5px;margin-top:2px}
.np-hw.todo{border-color:var(--blue)}.np-hw.todo .np-hw-ic{background:var(--blue);color:#fff}
.np-hw.late{border-color:var(--red)}.np-hw.late .np-hw-ic{background:var(--red)}.np-hw.late small{color:var(--red);font-weight:700}
.np-hw.done .np-hw-ic{background:var(--green,#0A6B4B);color:#fff}
.np-hw.locked{opacity:.72}.np-hw.locked .np-hw-ic{background:var(--soft2);color:var(--mute)}
.np-hw-score{font-size:26px;font-weight:800;color:var(--green,#0A6B4B)}.np-hw-score small{font-size:14px}
.np-hw:active{transform:scale(.98)}
@media (hover:hover){.np-hw:hover{transform:translateY(-2px);box-shadow:0 6px 18px rgba(1,0,76,.10)}}
.np-hw.soon{border-color:#E9B800}
.np-tape-strip{position:absolute;right:-30px;top:10px;width:150px;transform:rotate(18deg);background:repeating-linear-gradient(-45deg,#FFC629 0 12px,#111 12px 24px);height:18px;overflow:hidden;pointer-events:none}
.np-tape-strip span{display:block;white-space:nowrap;font:800 9px/18px var(--f,sans-serif);color:#111;background:#FFC629;width:max-content;padding:0 4px;letter-spacing:.06em;margin-left:20px}
/* words */
.np-sec{margin-top:28px}.np-sec h2{font-size:20px;margin:0 0 12px}.np-sec h2 small{font-size:12.5px;font-weight:500}
.np-words{list-style:none;margin:0;padding:0;display:grid;gap:0;border-radius:14px;overflow:hidden;background:var(--card);border:1px solid var(--line)}
.np-words li{display:grid;gap:2px;padding:12px 14px;border-top:1px solid var(--line)}.np-words li:first-child{border-top:0}
.np-words b{font-size:16.5px;overflow-wrap:anywhere}.np-words span{color:var(--ink2);overflow-wrap:anywhere}.np-words small{color:var(--mute);font-size:13px;overflow-wrap:anywhere}
.np-more{margin-top:10px}.np-more summary{cursor:pointer;font-weight:700;padding:10px 2px;min-height:44px;display:flex;align-items:center}
/* bonus shelf */
.np-bonus{display:grid;grid-template-columns:repeat(auto-fill,minmax(158px,1fr));gap:10px}
.np-bn{display:flex;align-items:center;gap:10px;min-height:64px;padding:12px;border-radius:14px;background:var(--card);border:1px solid var(--line);color:var(--ink);text-decoration:none;transition:transform .1s ease-out}
.np-bn b{display:block;font-size:14.5px}.np-bn small{display:block;color:var(--mute);font-size:12px}
.np-bn-ic{display:grid;place-items:center;width:36px;height:36px;flex:none;border-radius:10px;background:var(--soft2)}
.np-bn.done{border-color:color-mix(in srgb,var(--green,#0A6B4B) 50%,var(--line))}
.np-bn.boss{grid-column:1/-1;min-height:84px;background:linear-gradient(120deg,var(--navy,#12499B),#0A0B2E);color:#fff;border:0;box-shadow:0 0 0 2px var(--red) inset}
.np-bn.boss b{font-size:19px}.np-bn.boss small{color:rgba(255,255,255,.8)}.np-bn.boss .np-bn-ic{background:var(--red);color:#fff;width:48px;height:48px}
.np-bn:active{transform:scale(.97)}
@media (hover:hover){.np-bn:hover{transform:translateY(-1px)}}

/* ═════════ the runner: the whole screen, button pinned at the bottom ═════════ */
body.np-running .tabbar{display:none}
.np-stage{position:fixed;inset:0;z-index:60;background:var(--paper);display:flex;justify-content:center}
.np-run{display:flex;flex-direction:column;width:100%;max-width:720px;height:100%;height:100dvh}
.np-top{display:flex;align-items:center;gap:12px;padding:calc(10px + env(safe-area-inset-top)) max(16px,env(safe-area-inset-right)) 10px max(16px,env(safe-area-inset-left))}
.np-top-t{font-size:17px}
.np-bar{flex:1;height:10px;border-radius:99px;background:var(--soft2);overflow:hidden}
.np-bar i{display:block;height:100%;border-radius:inherit;background:var(--blue);transition:width .35s cubic-bezier(.2,.8,.2,1)}
.np-combo{display:flex;align-items:center;gap:4px;font-weight:800;color:var(--green,#0A6B4B)}
.np-lives{display:flex;gap:5px}.np-lives i{width:14px;height:14px;border-radius:50%;background:var(--soft2);box-shadow:inset 0 0 0 2px var(--line2)}
.np-lives i.on{background:var(--red);box-shadow:none}
.np-body{flex:1;overflow-y:auto;overflow-x:hidden;-webkit-overflow-scrolling:touch;padding:8px max(16px,env(safe-area-inset-right)) 24px max(16px,env(safe-area-inset-left));overscroll-behavior:contain}
.np-foot{display:flex;gap:10px;align-items:center;justify-content:flex-end;padding:12px max(16px,env(safe-area-inset-right)) calc(12px + env(safe-area-inset-bottom)) max(16px,env(safe-area-inset-left));border-top:1px solid var(--line);background:var(--card)}
.np-main{flex:1;min-height:52px;font-size:16px}
@media (min-width:600px){.np-main{flex:0 0 auto;min-width:220px}}
.np-half{flex:1;min-height:52px}
.np-tapnote{flex:1;text-align:center;min-height:52px;display:grid;place-items:center}
.np-part{display:flex;align-items:center;gap:8px;margin:6px 0 2px;font-size:15px}
.np-chip{font-size:11.5px;font-weight:800;letter-spacing:.05em;text-transform:uppercase;background:var(--soft2);border-radius:99px;padding:3px 9px}
.np-chip.boss{background:var(--red);color:#fff}
.np-instr{margin:0 0 14px;font-size:15px}
.np-stem{font-size:clamp(18px,5vw,22px);line-height:1.45;font-weight:600;margin:6px 0 18px;overflow-wrap:anywhere}
.np-gap{display:inline-block;min-width:4.5em;padding:0 6px;border-bottom:3px solid var(--blue);color:var(--blue);font-weight:800;transition:background .2s}
.np-gap.ok{color:var(--green,#0A6B4B);border-color:var(--green,#0A6B4B);animation:npDrop .3s cubic-bezier(.3,1.4,.6,1)}
.np-gap.no{color:var(--red);border-color:var(--red);animation:npDrop .3s cubic-bezier(.3,1.4,.6,1)}
@keyframes npDrop{from{transform:translateY(-10px);opacity:0}to{transform:none;opacity:1}}
.np-opts{display:grid;gap:10px}
.np-opt{display:flex;align-items:center;gap:12px;width:100%;min-height:56px;padding:12px 14px;border-radius:14px;border:1.5px solid var(--line);background:var(--card);color:var(--ink);text-align:left;font-size:16px;font-weight:600;line-height:1.35;transition:transform .09s ease-out,border-color .14s,background .14s;-webkit-tap-highlight-color:transparent}
.np-opt span{overflow-wrap:anywhere}
.np-opt-k{display:grid;place-items:center;width:28px;height:28px;flex:none;border-radius:8px;background:var(--soft2);font-size:13px;font-weight:800}
.np-opt:active:not([disabled]){transform:scale(.97);background:var(--soft2)}
@media (hover:hover){.np-opt:not([disabled]):hover{border-color:var(--blue);transform:translateY(-1px)}}
.np-opt:focus-visible{outline:2px solid var(--blue);outline-offset:2px}
.np-opt.right{border-color:var(--green,#0A6B4B);background:color-mix(in srgb,var(--green,#0A6B4B) 10%,var(--card))}
.np-opt.right .np-opt-k{background:var(--green,#0A6B4B);color:#fff}
.np-opt.wrong{border-color:var(--red);background:color-mix(in srgb,var(--red) 8%,var(--card))}
.np-opt.wrong .np-opt-k{background:var(--red);color:#fff}
.np-opt.dim{opacity:.5}
.np-opt[disabled]{cursor:default}
.np-tf{grid-template-columns:1fr 1fr}
.np-tr{display:grid;gap:4px;padding:16px;border-radius:14px;background:var(--card);border:1px solid var(--line);margin-bottom:14px}
.np-tr b{font-size:20px;overflow-wrap:anywhere}.np-tr span{color:var(--mute)}
.np-type{display:block}
.np-type input{width:100%;min-height:56px;font-size:18px;padding:12px 14px;border-radius:14px;border:2px solid var(--line2);background:var(--card);color:var(--ink)}
.np-type input:focus{outline:none;border-color:var(--blue)}
.np-type.ok input{border-color:var(--green,#0A6B4B);color:var(--green,#0A6B4B)}
.np-type.no input{border-color:var(--red);color:var(--red)}
.np-hint{min-height:22px;margin:10px 2px 0}
/* correct / wrong feedback: short, never in the way */
.np-good{animation:npPulse .45s ease-out}
.np-bad{animation:npShake .3s ease-in-out}
@keyframes npPulse{0%{box-shadow:0 0 0 0 color-mix(in srgb,var(--green,#0A6B4B) 50%,transparent)}100%{box-shadow:0 0 0 14px transparent}}
@keyframes npShake{0%,100%{transform:none}20%{transform:translateX(-8px)}40%{transform:translateX(7px)}60%{transform:translateX(-5px)}80%{transform:translateX(3px)}}
/* result */
.np-res-body{display:flex;flex-direction:column;align-items:center;text-align:center;padding-top:32px}
.np-ring{display:grid;place-items:center;align-content:center;width:170px;height:170px;border-radius:50%;border:10px solid var(--blue);margin-bottom:18px;animation:npPop .5s cubic-bezier(.3,1.4,.6,1)}
.np-ring.ok{border-color:var(--green,#0A6B4B)}.np-ring.no{border-color:var(--red)}
.np-ring b{font-size:44px;font-weight:800;line-height:1}.np-ring span{color:var(--mute);font-size:13px}
@keyframes npPop{from{transform:scale(.6);opacity:0}to{transform:none;opacity:1}}
.np-review{width:100%;text-align:left;margin-top:18px}.np-review h3{font-size:15px}
.np-rv{display:grid;gap:2px;padding:10px 12px;border-radius:12px;background:var(--card);border:1px solid var(--line);margin-bottom:8px}
.np-rv span{color:var(--mute);font-size:14px;overflow-wrap:anywhere}.np-rv b{overflow-wrap:anywhere}
/* writing */
.np-task p{font-size:17px;line-height:1.5;margin:0 0 8px}.np-task ul{margin:0;padding-left:20px}.np-task li{margin:4px 0}
.np-task{padding:16px}
.np-tips{margin:12px 0}.np-tips p{display:flex;gap:8px;color:var(--ink2);margin:6px 0}
.np-model{margin:10px 0 14px}.np-model summary{cursor:pointer;font-weight:700;min-height:44px;display:flex;align-items:center}
.np-model p{background:var(--card);border:1px solid var(--line);border-radius:12px;padding:14px;line-height:1.55}
.np-box textarea,.np-swt{width:100%;font-size:16px;line-height:1.5;padding:14px;border-radius:14px;border:2px solid var(--line2);background:var(--card);color:var(--ink);resize:vertical}
.np-box textarea:focus,.np-swt:focus{outline:none;border-color:var(--blue)}
.np-counts{display:flex;flex-wrap:wrap;gap:8px 16px;margin:10px 2px;color:var(--mute);font-size:14px}
.np-counts .ok{color:var(--green,#0A6B4B);font-weight:700}
.np-phr{display:flex;flex-wrap:wrap;gap:6px;margin-bottom:14px}
.np-ph{font-size:13px;padding:5px 10px;border-radius:99px;background:var(--soft2);color:var(--mute);transition:background .2s,color .2s}
.np-ph.on{background:var(--green,#0A6B4B);color:#fff}
.np-self{display:grid;gap:8px}.np-sc{display:flex;gap:10px;align-items:flex-start;min-height:44px;font-size:15px}
.np-sc input{width:22px;height:22px;flex:none;margin-top:1px;accent-color:var(--blue)}
.np-verdict{display:flex;gap:10px;align-items:flex-start;padding:14px;border-radius:14px;margin-top:14px}
.np-verdict ul{margin:6px 0 0;padding-left:18px}
.np-verdict.ok{background:color-mix(in srgb,var(--green,#0A6B4B) 12%,var(--card));color:var(--green,#0A6B4B)}
.np-verdict.no{background:color-mix(in srgb,var(--red) 9%,var(--card));color:var(--ink)}
.np-saved{flex:1}
/* speaking */
.np-spk{padding:16px;margin-bottom:12px}.np-spk h2{font-size:18px;margin:0 0 10px}
.np-pt{display:flex;gap:12px;padding:12px 0;border-top:1px solid var(--line)}.np-pt:first-child{border-top:0}
.np-pt-k{display:grid;place-items:center;width:34px;height:34px;flex:none;border-radius:10px;background:var(--red);color:#fff;font-weight:800}
.np-chips{display:flex;flex-wrap:wrap;gap:6px;margin:8px 0}.np-chips span{font-size:13.5px;padding:4px 10px;border-radius:99px;background:var(--soft2)}
.np-ex{font-style:italic;color:var(--ink2);margin:4px 0 0}
.np-list{margin:0;padding-left:22px}.np-list li{margin:8px 0;line-height:1.45}
/* flashcards */
.np-card3d{position:relative;height:min(52vh,320px);margin:10px 0;perspective:1200px;cursor:pointer;touch-action:pan-y;user-select:none;transition:transform .2s ease-out,opacity .18s}
.np-face{position:absolute;inset:0;display:flex;flex-direction:column;align-items:center;justify-content:center;gap:8px;padding:20px;text-align:center;border-radius:20px;background:var(--card);border:1.5px solid var(--line);box-shadow:0 10px 30px rgba(1,0,76,.08);backface-visibility:hidden;-webkit-backface-visibility:hidden;transition:transform .4s cubic-bezier(.2,.8,.2,1)}
.np-face b{font-size:clamp(22px,6vw,30px);overflow-wrap:anywhere}.np-face small,.np-face span{color:var(--mute)}
.np-face.back{transform:rotateY(180deg);background:var(--navy,#12499B);color:#fff;border:0}.np-face.back span{color:rgba(255,255,255,.85)}
.np-card3d.flip .front{transform:rotateY(-180deg)}.np-card3d.flip .back{transform:rotateY(0)}
.np-card3d.to-r .np-face,.np-swcard.to-r{box-shadow:0 0 0 3px var(--green,#0A6B4B)}
.np-card3d.to-l .np-face,.np-swcard.to-l{box-shadow:0 0 0 3px var(--red)}
.np-swipe-note{text-align:center}
/* matching */
.np-match{display:grid;gap:10px}
@media (min-width:768px){.np-match{grid-template-columns:1fr 1fr}}
.np-col{display:grid;gap:8px;align-content:start}
.np-tile{min-height:52px;padding:10px 12px;border-radius:12px;border:1.5px solid var(--line);background:var(--card);color:var(--ink);text-align:left;font-size:15px;font-weight:600;overflow-wrap:anywhere;transition:transform .09s ease-out,border-color .14s}
.np-tile.r{font-weight:500}
.np-tile.sel{border-color:var(--blue);background:color-mix(in srgb,var(--blue) 10%,var(--card));transform:scale(1.02)}
.np-tile:active{transform:scale(.97)}
/* speed round */
.np-timer{font-weight:800;min-width:44px;text-align:right}.np-timer.low{color:var(--red)}
.np-swcard{display:grid;place-items:center;min-height:min(40vh,260px);margin:10px 0;padding:22px;border-radius:20px;background:var(--card);border:1.5px solid var(--line);text-align:center;font-size:clamp(19px,5vw,24px);font-weight:700;user-select:none;transition:transform .2s ease-out,opacity .18s}
.np-swcard p{margin:0;overflow-wrap:anywhere}
.np-combo-big{text-align:center;font-weight:800;color:var(--red);animation:npPop .3s ease-out}
.np-f{background:var(--card)}
/* chat */
.np-phone{border-radius:22px;background:var(--soft);border:1px solid var(--line);padding:12px;margin-bottom:14px}
.np-thread{display:flex;flex-direction:column;gap:8px;max-height:44vh;overflow-y:auto}
.np-msg{max-width:84%;display:grid;gap:2px}
.np-msg span{padding:10px 13px;border-radius:18px;font-size:15.5px;line-height:1.4;overflow-wrap:anywhere}
.np-msg small{font-size:11.5px;color:var(--mute);padding:0 6px}
.np-msg.in span{background:var(--card);border-bottom-left-radius:6px}
.np-msg.out{align-self:flex-end;animation:npSend .25s ease-out}.np-msg.out span{background:var(--blue);color:#fff;border-bottom-right-radius:6px}
.np-msg.out.no span{background:var(--red)}
.np-msg.fix{align-self:flex-end}.np-msg.fix span{background:color-mix(in srgb,var(--green,#0A6B4B) 14%,var(--card));color:var(--ink)}
.np-msg.typing span{display:flex;gap:4px;width:60px}.np-msg.typing i{width:7px;height:7px;border-radius:50%;background:var(--mute);animation:npDot 1s infinite}
.np-msg.typing i:nth-child(2){animation-delay:.15s}.np-msg.typing i:nth-child(3){animation-delay:.3s}
@keyframes npDot{0%,60%,100%{opacity:.3;transform:none}30%{opacity:1;transform:translateY(-3px)}}
@keyframes npSend{from{transform:translateY(10px) scale(.96);opacity:0}to{transform:none;opacity:1}}
/* word order */
.np-built{display:flex;flex-wrap:wrap;gap:8px;min-height:64px;padding:12px;border-radius:14px;border:2px dashed var(--line2);margin-bottom:14px;align-items:center}
.np-built.ok{border-style:solid;border-color:var(--green,#0A6B4B)}.np-built.no{border-style:solid;border-color:var(--red)}
.np-pool{display:flex;flex-wrap:wrap;gap:8px}
.np-wt{min-height:46px;padding:8px 13px;border-radius:12px;border:1.5px solid var(--line);background:var(--card);color:var(--ink);font-size:16px;font-weight:600;animation:npPop .2s ease-out}
.np-wt.ph{background:color-mix(in srgb,var(--red) 10%,var(--card));border-color:var(--red)}
.np-wt:active{transform:scale(.95)}
.np-end{font-size:20px;font-weight:800}
/* open cloze */
.np-octext{font-size:17px;line-height:2.1;overflow-wrap:anywhere}
.np-ocg{display:inline-flex;align-items:center;gap:3px;white-space:nowrap}
.np-ocg small{font-size:11px;font-weight:800;color:var(--mute)}
.np-oc{width:7.5em;max-width:40vw;font-size:16px;padding:3px 8px;min-height:38px;border-radius:9px;border:2px solid var(--line2);background:var(--card);color:var(--ink)}
.np-oc:focus{outline:none;border-color:var(--blue)}.np-oc.ok{border-color:var(--green,#0A6B4B)}.np-oc.no{border-color:var(--red)}
.np-ocg em{font-style:normal;font-weight:800;color:var(--green,#0A6B4B);font-size:14px}
/* ordering */
.np-ord{display:grid;gap:10px}
.np-oc-card{display:flex;align-items:flex-start;gap:10px;padding:12px;border-radius:14px;border:1.5px solid var(--line);background:var(--card);transition:transform .15s,border-color .15s}
.np-oc-card.sel{border-color:var(--blue);transform:scale(1.01);box-shadow:0 8px 20px rgba(1,0,76,.10)}
.np-oc-card.ok{border-color:var(--green,#0A6B4B)}.np-oc-card.no{border-color:var(--red)}
.np-pos{display:grid;place-items:center;width:30px;height:30px;flex:none;border-radius:9px;background:var(--soft2);font-weight:800}
.np-oc-t{text-align:left;font-size:15px;line-height:1.45;color:var(--ink);background:none;border:0;padding:4px 0;min-height:44px}
.np-ord-mv{display:flex;flex-direction:column}
/* sentence writing */
.np-swi{margin-bottom:16px}.np-swi .row{display:flex;align-items:center;gap:8px}
.np-live{color:var(--line2);transition:color .2s,transform .2s}.np-live.on{color:var(--green,#0A6B4B);transform:scale(1.2)}
.np-swt{margin-top:6px}

/* ═════════ Listening: COMING SOON, police-line ═════════ */
.np-soon-scene{position:fixed;inset:0;z-index:70;overflow:hidden;background:radial-gradient(circle at 50% 45%,#1d2030 0%,#090a12 70%);color:#fff;display:grid;place-items:center;opacity:0;transition:opacity .25s}
.np-soon-scene.in{opacity:1}
.np-tape{position:absolute;left:-20%;width:140%;height:46px;background:#FFC629;box-shadow:0 6px 18px rgba(0,0,0,.45);overflow:hidden;display:flex;align-items:center;border-top:4px solid #111;border-bottom:4px solid #111;transition:transform .5s cubic-bezier(.2,.8,.2,1)}
.np-tape-in{display:flex;white-space:nowrap;animation:npTape 26s linear infinite}
.np-tape span{font:900 17px/1 var(--f,sans-serif);letter-spacing:.12em;color:#111;padding-right:4px}
.np-tape.t1{top:13%;transform:translateX(-110%) rotate(-12deg)}.np-tape.t2{bottom:7%;transform:translateX(110%) rotate(9deg)}.np-tape.t3{bottom:22%;transform:translateX(-110%) rotate(-4deg);opacity:.92}
.np-tape.t2 .np-tape-in{animation-direction:reverse;animation-duration:32s}.np-tape.t3 .np-tape-in{animation-duration:40s}
.np-soon-scene.in .np-tape.t1{transform:rotate(-12deg)}.np-soon-scene.in .np-tape.t2{transform:rotate(9deg)}.np-soon-scene.in .np-tape.t3{transform:rotate(-4deg)}
.np-soon-scene.snap .np-tape.t1{animation:npSnap1 .35s ease-out}.np-soon-scene.snap .np-tape.t2{animation:npSnap2 .35s ease-out}
@keyframes npSnap1{50%{transform:rotate(-12deg) scaleY(.82)}}@keyframes npSnap2{50%{transform:rotate(9deg) scaleY(.82)}}
@keyframes npTape{to{transform:translateX(-50%)}}
.np-soon-mid{position:relative;z-index:2;text-align:center;padding:24px;max-width:420px}
.np-sign{width:132px;height:120px;background:none;border:0;padding:0;margin:0 auto 10px;display:block;filter:drop-shadow(0 0 18px rgba(200,16,46,.65));animation:npSignIn .6s cubic-bezier(.3,1.5,.6,1) both .15s,npGlow 2.6s ease-in-out infinite 1s}
.np-sign svg{width:100%;height:100%}
.np-soon-scene.snap .np-sign{animation:npShake .35s ease-in-out}
@keyframes npSignIn{from{transform:translateY(-60px);opacity:0}to{transform:none;opacity:1}}
@keyframes npGlow{0%,100%{filter:drop-shadow(0 0 10px rgba(200,16,46,.45))}50%{filter:drop-shadow(0 0 26px rgba(200,16,46,.9))}}
.np-soon-mid h2{font-size:clamp(26px,8vw,38px);line-height:1.05;margin:6px 0 10px;letter-spacing:.04em;font-weight:900}
.np-soon-mid h2 span{color:#FFC629}
.np-soon-mid p{margin:4px 0;color:rgba(255,255,255,.82)}.np-soon-t{font-weight:700;color:#fff!important;margin-top:12px!important}
.np-beacon{position:absolute;width:150vmax;height:150vmax;left:50%;top:50%;margin:-75vmax 0 0 -75vmax;border-radius:50%;pointer-events:none;opacity:.22;animation:npSweep 3s linear infinite}
.np-beacon.b1{background:conic-gradient(from 0deg,transparent 0 300deg,rgba(255,40,40,.9) 340deg,transparent 360deg)}
.np-beacon.b2{background:conic-gradient(from 180deg,transparent 0 300deg,rgba(255,180,0,.85) 340deg,transparent 360deg);animation-duration:3.6s;animation-direction:reverse}
@keyframes npSweep{to{transform:rotate(360deg)}}
.np-soon-back{position:absolute;z-index:3;left:max(16px,env(safe-area-inset-left));top:calc(14px + env(safe-area-inset-top));background:#fff;color:#111}

/* less motion when the phone asks for it */
@media (prefers-reduced-motion:reduce){
  .np-tape-in,.np-beacon,.np-sign,.np-skel i,.np-msg.typing i{animation:none!important}
  .np-tape{transition:none}.np-hw,.np-bn,.np-opt,.np-face,.np-card3d,.np-swcard,.np-gap{transition:none!important;animation:none!important}
  .np-good,.np-bad{animation:none}
}
.np-spark{position:fixed;z-index:80;width:0;height:0;pointer-events:none}
.np-spark i{position:absolute;left:-4px;top:-4px;width:8px;height:8px;border-radius:50%;background:var(--green,#0A6B4B);animation:npSpark .5s ease-out forwards;transform:rotate(var(--a)) translateY(0)}
.np-spark i:nth-child(even){background:#FFC629}
@keyframes npSpark{to{transform:rotate(var(--a)) translateY(-46px) scale(.4);opacity:0}}
/* the runner covers the whole window; the page's entrance animation must not trap it inside #main */
body.np-running #main,body.np-running .main,body.np-running .content{transform:none!important;animation:none!important;filter:none!important;contain:none!important}
.np-stage{z-index:90}
/* word tabs */
.np-wtabs{display:flex;gap:6px;overflow-x:auto;scrollbar-width:none;margin:0 0 12px;padding:2px}
.np-wtabs::-webkit-scrollbar{display:none}
.np-wtab{flex:none;display:flex;align-items:center;gap:7px;min-height:44px;padding:8px 14px;border-radius:99px;border:1.5px solid var(--line);background:var(--card);color:var(--ink);font-weight:700;font-size:14.5px;transition:background .14s,border-color .14s,transform .09s ease-out}
.np-wtab span{font-size:12px;font-weight:800;min-width:22px;height:22px;display:grid;place-items:center;border-radius:99px;background:var(--soft2)}
.np-wtab.on{background:var(--navy,#12499B);border-color:var(--navy,#12499B);color:#fff}
.np-wtab.on span{background:rgba(255,255,255,.2)}
.np-wtab:active{transform:scale(.96)}
.np-wtab:focus-visible{outline:2px solid var(--blue);outline-offset:2px}
/* the student's language, under the English, smaller */
.np-trl{display:block;font-size:.82em;font-weight:500;color:var(--mute);margin-top:3px;line-height:1.35}
.np-stem .np-trl{font-size:15px;margin-top:6px}
.np-opt.right .np-trl,.np-opt.wrong .np-trl{color:inherit;opacity:.8}
/* words trainer */
.np-mode{display:flex;align-items:center;gap:14px;width:100%;min-height:72px;padding:14px 16px;margin-bottom:10px;border-radius:16px;border:1.5px solid var(--line);background:var(--card);color:var(--ink);text-align:left;transition:transform .1s ease-out,border-color .15s}
.np-mode b{display:block;font-size:17px}.np-mode small{display:block;color:var(--mute);font-size:13.5px}
.np-mode-ic{display:grid;place-items:center;width:44px;height:44px;flex:none;border-radius:12px;background:var(--blue);color:#fff}
.np-mode:active:not([disabled]){transform:scale(.98)}.np-mode[disabled]{opacity:.5}
@media (hover:hover){.np-mode:not([disabled]):hover{border-color:var(--blue);transform:translateY(-1px)}}
.np-wlist{display:grid;gap:0;margin-top:14px;border-radius:14px;overflow:hidden;border:1px solid var(--line);background:var(--card)}
.np-wlist div{display:grid;gap:2px;padding:10px 14px;border-top:1px solid var(--line)}.np-wlist div:first-child{border-top:0}
.np-wlist span{color:var(--ink2)}
.np-decks{margin:6px 0 10px}.np-decks em,.mw-decks em{font-style:normal;opacity:.7}
.mw-decks{margin:12px 0 4px}
.mw-set{font-style:normal;font-size:11.5px;font-weight:700;padding:2px 8px;border-radius:99px;background:var(--soft2);color:var(--mute);vertical-align:2px}
.mw-trrow{display:flex;gap:8px;flex-wrap:wrap}.mw-trrow select{flex:1;min-width:140px}

/* ═════════ the rank on Home: a medal case, not a list row ═════════ */
.rk-home.page-rank.rkx{position:relative;overflow:hidden;isolation:isolate;display:flex;align-items:center;gap:24px;min-height:156px;padding:24px 26px 22px;
  border:0;border-radius:22px;color:#fff;
  background:radial-gradient(70% 120% at 10% 50%,rgba(58,92,255,.45) 0%,transparent 60%),linear-gradient(135deg,#0B1458 0%,#14228A 52%,#080D36 100%);
  box-shadow:0 18px 40px rgba(8,14,70,.32),inset 0 1px 0 rgba(255,255,255,.14)}
.rkx::before{content:"";position:absolute;left:0;right:0;top:0;height:5px;z-index:2;
  background:linear-gradient(90deg,#C8102E 0 33.3%,#fff 33.3% 66.6%,#2B62F0 66.6%)}
.rk-home.rkx::after{display:block;z-index:1;background:linear-gradient(105deg,transparent 35%,rgba(255,255,255,.10) 50%,transparent 65%)}
.rkx-rays{position:absolute;left:-50px;top:50%;width:300px;height:300px;margin-top:-150px;z-index:-1;pointer-events:none;
  background:repeating-conic-gradient(from 0deg,rgba(255,214,107,.22) 0deg 6deg,transparent 6deg 18deg);
  -webkit-mask:radial-gradient(circle,#000 0 22%,transparent 62%);mask:radial-gradient(circle,#000 0 22%,transparent 62%);
  animation:rkxSpin 40s linear infinite}
@keyframes rkxSpin{to{transform:rotate(360deg)}}
.rkx .rkx-badge{flex:none;margin:0 6px 0 4px;
  filter:drop-shadow(0 0 14px rgba(255,214,107,.55)) drop-shadow(0 8px 14px rgba(0,0,0,.35));
  animation:rkxIn .7s cubic-bezier(.3,1.5,.5,1) both .1s,rkxFloat 4.5s ease-in-out infinite 1s}
.rk-home.rkx .rkh-badge .cn-badge{width:92px;height:100px}
@keyframes rkxIn{from{transform:scale(.6) rotate(-12deg);opacity:0}to{transform:none;opacity:1}}
@keyframes rkxFloat{0%,100%{transform:translateY(0)}50%{transform:translateY(-5px)}}
.rkx .rkh-main{gap:4px;position:relative;z-index:2}
.rk-home.rkx .rkh-kick{font:700 11px/1.4 var(--mono,monospace);letter-spacing:.28em;color:#FFD66B}
.rk-home.rkx .rkh-name{color:#fff;font:800 clamp(26px,4vw,36px)/1.05 var(--f);letter-spacing:-.02em;text-shadow:0 2px 12px rgba(0,0,0,.35)}
.rk-home.rkx .rkh-nums{color:rgba(255,255,255,.78);font-size:14px;display:flex;align-items:baseline;gap:6px;flex-wrap:wrap}
.rk-home.rkx .rkh-nums .num{color:#FFD66B;font:800 30px/1 var(--f);text-shadow:0 0 18px rgba(255,214,107,.45)}
.rkx .rkx-unit{font-weight:800;letter-spacing:.12em;color:#FFD66B;font-size:12px}
.rk-home.rkx .rkh-nums em{color:#fff;font-weight:800}
.rk-home.rkx .rkh-bar{height:12px;border-radius:99px;margin:10px 0 6px;background:rgba(255,255,255,.12);box-shadow:inset 0 1px 3px rgba(0,0,0,.45);overflow:visible;position:relative}
.rk-home.rkx .rkh-bar i{position:relative;height:100%;border-radius:99px;overflow:visible;
  background:linear-gradient(90deg,#FFB000,#FF7A3D 55%,#FF3B5C);box-shadow:0 0 14px rgba(255,140,60,.75);
  animation:rkhfill 1.2s cubic-bezier(.2,.8,.2,1) both .35s;transform-origin:left}
.rk-home.rkx .rkh-bar i::after{content:"";position:absolute;inset:0;border-radius:inherit;
  background:linear-gradient(90deg,transparent 0%,rgba(255,255,255,.55) 50%,transparent 100%);background-size:60px 100%;background-repeat:no-repeat;
  animation:rkxShine 2.8s ease-in-out infinite 1.6s}
@keyframes rkxShine{from{background-position:-60px 0}to{background-position:calc(100% + 60px) 0}}
.rkx .rkx-tip{position:absolute;right:-7px;top:50%;width:16px;height:16px;margin-top:-8px;border-radius:50%;background:#fff;
  box-shadow:0 0 0 4px rgba(255,214,107,.35),0 0 16px 4px rgba(255,214,107,.8);animation:rkxPulse 1.8s ease-in-out infinite 1.5s}
@keyframes rkxPulse{50%{box-shadow:0 0 0 8px rgba(255,214,107,0),0 0 22px 6px rgba(255,214,107,.9)}}
.rk-home.rkx .rkh-next{color:rgba(255,255,255,.75);font-size:13.5px}
.rk-home.rkx .rkh-next b{color:#fff;font-weight:800}
.rk-home.rkx > .ic{color:rgba(255,255,255,.7);position:relative;z-index:2}
@media (hover:hover){.rk-home.rkx{transition:transform .18s ease-out,box-shadow .18s}.rk-home.rkx:hover{transform:translateY(-2px);box-shadow:0 24px 50px rgba(8,14,70,.4),inset 0 1px 0 rgba(255,255,255,.14)}}
@media (max-width:600px){.rk-home.page-rank.rkx{gap:16px;padding:22px 16px 18px;min-height:140px}.rkx .rkx-badge{margin:0 2px}.rk-home.rkx .rkh-badge .cn-badge{width:74px;height:80px}.rkx-rays{left:-90px}.rk-home.rkx .rkh-nums .num{font-size:26px}}
@media (prefers-reduced-motion:reduce){.rkx-rays,.rkx .rkx-badge,.rk-home.rkx .rkh-bar i,.rk-home.rkx .rkh-bar i::after,.rkx .rkx-tip,.rk-home.rkx::after{animation:none!important}}

/* ═════════ room at the bottom ═════════ */
/* the exercise buttons sat flush on the window edge: lift them, and on a wide
   screen float them as a bar instead of a strip glued to the bottom */
.np-foot{padding-bottom:calc(18px + env(safe-area-inset-bottom))}
@media (min-width:700px){
  .np-run{height:100dvh;padding-bottom:28px}
  .np-foot{margin:0 16px;border:1px solid var(--line);border-radius:18px;padding:12px;box-shadow:0 10px 30px rgba(1,0,76,.08)}
}
/* every page ends with breathing room, not on the window's edge */
@media (min-width:900px){#main{padding-bottom:120px}}
/* listening */
.np-player{display:flex;align-items:center;gap:12px;padding:12px 14px;border-radius:16px;background:var(--navy,#12499B);color:#fff;margin:4px 0 8px;position:sticky;top:0;z-index:3;box-shadow:0 8px 20px rgba(1,0,76,.18)}
.np-play{display:grid;place-items:center;width:52px;height:52px;flex:none;border-radius:50%;border:0;background:#fff;color:var(--navy,#12499B);transition:transform .1s ease-out}
.np-play:active{transform:scale(.93)}.np-play.on{background:var(--red);color:#fff;box-shadow:0 0 0 6px rgba(200,16,46,.25)}
.np-pl-mid{min-width:0}.np-pl-mid b{display:block;font-size:15px;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}.np-pl-mid small{color:rgba(255,255,255,.75)!important}
.np-pl-bar{height:6px;border-radius:99px;background:rgba(255,255,255,.2);margin:6px 0 4px;overflow:hidden}.np-pl-bar i{display:block;height:100%;background:#FFD66B;border-radius:inherit;transition:width .3s}
.np-player .btn.icon{color:#fff}
.np-rate{min-width:44px;min-height:44px;border-radius:12px;border:1px solid rgba(255,255,255,.35);background:transparent;color:#fff;font-weight:800}
.np-prev-note{display:flex;align-items:center;gap:6px;font-size:13px;color:var(--mute);margin:0 2px 14px}
.np-script{display:grid;gap:10px}
.np-line{display:grid;gap:3px;padding:12px 14px;border-radius:14px;background:var(--card);border:1px solid var(--line);line-height:2}
.np-line b{font-size:12.5px;letter-spacing:.04em;color:var(--blue)}.np-line.spk-b b{color:var(--red)}
.np-line span{font-size:16px;overflow-wrap:anywhere}
.np-tfl{display:grid;gap:10px}
.np-tfi{padding:14px;border-radius:14px;background:var(--card);border:1.5px solid var(--line)}
.np-tfi p{margin:0 0 10px;font-size:16px;font-weight:600}.np-tfi .seg{width:100%}.np-tfi .seg button{flex:1;min-height:44px}
.np-tfi.ok{border-color:var(--green,#0A6B4B)}.np-tfi.no{border-color:var(--red)}.np-tfi small{display:block;margin-top:8px;font-weight:700;color:var(--red)}
.np-notes{display:grid;gap:10px}
.np-note{padding:14px;border-radius:14px;background:var(--card);border:1px solid var(--line);font-size:16px;line-height:2.1}
.np-note em{display:block;font-style:normal;font-weight:800;color:var(--green,#0A6B4B);font-size:14px;line-height:1.3}
/* the shield on "Homework done": room above and below, so its turning 3D picture never covers the words */
.xpw .xpw-badge{margin:34px 0 26px}
.xpw .xpw-badge .cn-badge.lg{width:110px;height:118px}
@media (max-height:700px){.xpw .xpw-badge{margin:24px 0 18px}.xpw .xpw-badge .cn-badge.lg{width:92px;height:100px}}
/* review of finished work */
.np-spect{display:flex;align-items:center;gap:8px;padding:10px 14px;border-radius:12px;background:color-mix(in srgb,var(--blue) 10%,var(--card));font-size:14px;margin:4px 0 14px}
.np-rvhead{display:flex;align-items:center;gap:16px;margin-bottom:16px}
.np-rvhead small{display:block;margin-top:2px}
.np-ring.sm{width:92px;height:92px;border-width:7px;margin:0;animation:none;flex:none}.np-ring.sm b{font-size:26px}.np-ring.sm b small{font-size:13px}
.np-rvl{display:grid;gap:8px}
.np-rvi{display:flex;gap:12px;align-items:flex-start;padding:12px 14px;border-radius:14px;background:var(--card);border:1.5px solid var(--line)}
.np-rvi.ok{border-color:color-mix(in srgb,var(--green,#0A6B4B) 45%,var(--line))}.np-rvi.no{border-color:color-mix(in srgb,var(--red) 45%,var(--line))}
.np-rvn{display:grid;place-items:center;width:26px;height:26px;flex:none;border-radius:50%;color:#fff;background:var(--green,#0A6B4B)}.np-rvi.no .np-rvn{background:var(--red)}
.np-rvi p{margin:2px 0 6px;font-size:15px;overflow-wrap:anywhere}
.np-rva{display:flex;flex-wrap:wrap;gap:8px;align-items:baseline}.np-rva b{color:var(--green,#0A6B4B)}
.np-rvg{text-decoration:line-through;color:var(--red);overflow-wrap:anywhere}
.np-rvtext p{line-height:1.6;margin:0 0 8px}.np-rvtext{padding:16px}
.np-stucard{display:flex;align-items:center;gap:12px;padding:14px 16px;margin:12px 0;text-decoration:none;color:var(--ink)}
.np-stucard b{display:block}.np-stucard small{display:block}
.np-ring b{display:flex;align-items:baseline;white-space:nowrap}

/* Lesson badge kicker ("LESSON" over the number): it was nearly as wide as the
   46px badge, so wider fonts or a phone's larger-text setting pushed it to the
   right edge. Smaller tracking, the trailing letter-space balanced with an equal
   indent so it sits dead centre, and if a phone forces bigger text it grows evenly on both sides instead of off to the right. */
.exit>small{font-size:7.5px;letter-spacing:.1em;padding-left:.1em;white-space:nowrap;text-align:center;line-height:1;align-self:center}
.exit.sm>small,.teach-bar .exit>small{font-size:6.5px}

/* Foundation: the speaking pattern under the lesson title, and the End class note */
.np-pattern{display:flex;align-items:center;gap:6px;margin-top:4px;font-size:13.5px;color:var(--mute)}
.np-pattern b{color:var(--ink)}
.np-fd-end{display:flex;gap:12px;align-items:flex-start}
.np-fd-end p{margin:4px 0 0}
.nc-fd{display:flex;align-items:center;gap:5px;margin-top:6px;flex-wrap:wrap}

/* Foundation: the instruction in the student's own language, the English under it;
   the Checkpoint label on lessons 12 and 24 */
.np-instr-en{font-size:12.5px;margin-top:-4px;opacity:.8}
.np-cp{display:inline-block;margin-left:8px;padding:1px 7px;border-radius:999px;font:700 10px/1.5 var(--mono, ui-monospace, monospace);letter-spacing:.06em;text-transform:uppercase;background:var(--red, #B22234);color:#fff;vertical-align:middle}

/* ───────── Update 6: Fill the Dialogue, Grow the Sentence (20 Nov) */
.np6-dlg{display:flex;flex-direction:column;gap:10px;margin:4px 0 14px}
.np6-dt{display:flex;align-items:center;gap:6px;margin:0 0 2px;font-weight:800;font-size:13px;letter-spacing:.04em;text-transform:uppercase;color:var(--mute)}
.np6-line{max-width:88%;align-self:flex-start;padding:10px 14px 12px;border-radius:4px 18px 18px 18px;background:var(--soft2)}
.np6-line.r{align-self:flex-end;border-radius:18px 4px 18px 18px;background:color-mix(in srgb,var(--navy,#12499B) 9%,var(--card));box-shadow:inset 0 0 0 1px color-mix(in srgb,var(--navy,#12499B) 16%,transparent)}
.np6-line b{display:block;font-size:12.5px;font-weight:800;color:var(--mute);margin-bottom:3px}
.np6-line p{margin:0;font-size:16.5px;line-height:2.35}
.np6-gapw{display:inline-flex;flex-direction:column;vertical-align:middle;line-height:1.2;margin:2px 1px}
.np6-gap{display:inline-flex;flex-direction:row;justify-content:flex-start;align-items:center;gap:6px;height:auto;min-height:44px;min-width:96px;padding:6px 12px 6px 6px;border-radius:12px;border:1.5px dashed var(--line2,var(--line));background:var(--card);color:var(--ink);font:inherit;font-weight:700;text-align:left;transition:border-color .14s,background .14s,transform .09s ease-out}
.np6-gap i{display:grid;place-items:center;flex:none;width:22px;height:22px;border-radius:99px;background:var(--soft2);color:var(--mute);font-size:11.5px;font-style:normal;font-weight:800}
.np6-gap.full{border-style:solid;border-color:var(--navy,#12499B)}
.np6-gap.sel{border-style:solid;border-color:var(--red);box-shadow:0 0 0 3px color-mix(in srgb,var(--red) 18%,transparent)}
.np6-gap:active:not(:disabled){transform:scale(.96)}
.np6-gap.ok{border-style:solid;border-color:var(--green,#1F9D55);background:color-mix(in srgb,var(--green,#1F9D55) 10%,var(--card))}
.np6-gap.ok i{background:var(--green,#1F9D55);color:#fff}
.np6-gap.no{border-style:solid;border-color:var(--red);background:color-mix(in srgb,var(--red) 8%,var(--card))}
.np6-gt{display:inline;white-space:normal}
.np6-gap.no .np6-gt{text-decoration:line-through;text-decoration-thickness:1.5px;color:var(--mute)}
.np6-gap.no i{background:var(--red);color:#fff}
.np6-gap:disabled{opacity:1;cursor:default}
.np6-fix{padding:3px 4px 0;font-size:13px;font-weight:800;color:var(--green,#1F9D55)}
.np6-bank{position:sticky;bottom:-24px;z-index:2;display:flex;flex-wrap:wrap;gap:8px;margin:0 -16px -24px;padding:12px 16px 16px;background:color-mix(in srgb,var(--card) 92%,transparent);-webkit-backdrop-filter:blur(12px);backdrop-filter:blur(12px);border-top:1px solid var(--line)}
.np6-chip{min-height:44px;padding:8px 14px;border-radius:12px;border:1.5px solid var(--line);background:var(--card);color:var(--ink);font:inherit;font-size:15.5px;font-weight:700;-webkit-touch-callout:none;user-select:none;transition:opacity .14s,background .14s,border-color .14s,transform .09s ease-out}
.np6-chip:active{transform:scale(.95)}
.np6-chip.sel{border-color:var(--red);background:color-mix(in srgb,var(--red) 10%,var(--card))}
.np6-chip.used{opacity:.35;background:var(--soft2);border-style:dashed;pointer-events:none}
.np6-chip:focus-visible,.np6-gap:focus-visible,.np6-caret:focus-visible{outline:2px solid var(--blue);outline-offset:2px}
.np6-tip{position:fixed;z-index:60;max-width:min(320px,90vw);padding:8px 12px;border-radius:10px;background:var(--ink);color:var(--card);font-size:14px;font-weight:600;box-shadow:0 8px 24px rgba(0,0,0,.18);pointer-events:none;animation:npPop .16s ease-out}
.np6-sum{margin:0}

.np6-gh{display:flex;align-items:center;gap:12px;margin:2px 0 14px}
.np6-meter{flex:1;display:flex;flex-direction:column;gap:4px}
.np6-meter i{display:block;height:6px;width:var(--w);border-radius:99px;background:var(--soft2);transition:background .2s}
.np6-meter i.cur{background:color-mix(in srgb,var(--navy,#12499B) 45%,var(--soft2))}
.np6-meter i.ok{background:var(--green,#1F9D55)}.np6-meter i.no{background:var(--red)}
.np6-built{min-height:64px;align-items:center}
.np6-caret{align-self:stretch;width:14px;min-height:44px;margin:0 -5px;padding:0;border:0;background:none;position:relative;flex:none}
.np6-caret::after{content:"";position:absolute;left:6px;top:8px;bottom:8px;width:2px;border-radius:2px;background:transparent;transition:background .12s}
@media (hover:hover){.np6-caret:hover::after{background:var(--line2,var(--line))}}
.np6-caret.on::after{background:var(--red);width:3px;left:5px;animation:np6Blink 1s steps(2) infinite}
@keyframes np6Blink{50%{opacity:.25}}
.np-wt.np6-bad{border-color:var(--red);background:color-mix(in srgb,var(--red) 10%,var(--card))}
.np-wt.np6-new{border-color:var(--navy,#12499B);box-shadow:0 0 0 3px color-mix(in srgb,var(--navy,#12499B) 14%,transparent)}
.np6-grow.fin{text-align:center;padding:20px 0 8px}
.np6-grow.fin .np6-meter{max-width:320px;margin:0 auto 22px;align-items:flex-start}
.np6-how{display:flex;gap:6px;align-items:flex-start;margin:-4px 0 12px}
.np6-full{color:var(--ink);margin:0 auto 16px;max-width:30ch;font-size:clamp(22px,4.6vw,30px);line-height:1.3;font-weight:800;letter-spacing:-.01em;text-wrap:balance;animation:npPop .3s ease-out}
.np6-say{margin:0 auto 10px}
@media (min-width:900px){.np6-line{max-width:72%}.np6-bank{bottom:-24px}}
@media (prefers-reduced-motion:reduce){.np6-caret.on::after,.np6-full,.np6-tip{animation:none}}

/* ───────── Update 7: Mixed Quiz, Key Words, Key words tab (20 Nov) */
.np7-label{display:inline-flex;margin:2px 0 8px;padding:4px 10px;border-radius:99px;background:color-mix(in srgb,var(--navy,#12499B) 9%,var(--card));color:var(--navy,#12499B);font-size:12.5px;font-weight:800;letter-spacing:.04em;text-transform:uppercase}
:root[data-theme="dark"] .np7-label{color:var(--ink)}
.np7-pos{display:inline-grid;place-items:center;min-width:30px;height:22px;padding:0 6px;border-radius:7px;background:var(--soft2);color:var(--mute);font-size:12px;font-weight:800;font-style:italic;letter-spacing:.02em;vertical-align:2px}
.np-words .np7-pos{margin-left:4px}
.np7-expl{display:flex;gap:9px;align-items:flex-start;margin:14px 0 0;padding:12px 14px;border-radius:14px;font-size:15px;font-weight:600;line-height:1.4;animation:npPop .2s ease-out}
.np7-expl .ic{flex:none;margin-top:2px}
.np7-expl.ok{background:color-mix(in srgb,var(--green,#0A6B4B) 10%,var(--card));color:var(--ink)}
.np7-expl.ok .ic{color:var(--green,#0A6B4B)}
.np7-expl.no{background:color-mix(in srgb,var(--red) 8%,var(--card));color:var(--ink)}
.np7-expl.no .ic{color:var(--red)}
@media (prefers-reduced-motion:reduce){.np7-expl{animation:none}}

/* 21 Nov: a picked True / False is unmistakable — solid blue, white text, a tick —
   and the card it belongs to shows it is answered */
.np-tfi .seg button[aria-pressed="true"]{background:var(--navy,#12499B);color:#fff;box-shadow:0 2px 8px -2px rgba(18,73,155,.55);font-weight:800}
:root[data-theme="dark"] .np-tfi .seg button[aria-pressed="true"]{background:#3D7BFF;color:#fff}
.np-tfi .seg button[aria-pressed="true"]::before{content:"✓";margin-right:6px;font-weight:900}
.np-tfi:has(button[aria-pressed="true"]):not(.ok):not(.no){border-color:color-mix(in srgb,var(--navy,#12499B) 45%,var(--line))}
.np-tfi .seg button:active:not(:disabled){transform:scale(.97)}
.np-ocg em.near,.np-note em.near{color:var(--green,#0A6B4B);font-style:normal;font-weight:700}
/* 21 Nov: Listen and type on a phone that cannot speak */
.np-cant{display:block;margin:10px auto 0;padding:8px 12px;min-height:40px;border:0;background:none;color:var(--blue,#12499B);font:inherit;font-size:14px;font-weight:700;text-decoration:underline;text-underline-offset:3px}
.np-listen small.np-deaf{display:block;margin-top:10px;font-size:18px;font-weight:800;color:var(--ink)}
/* 21 Nov: Words — the Quiz is the grade */
.np-wgrade{display:flex;gap:9px;align-items:flex-start;margin:4px 0 14px;padding:12px 14px;border-radius:14px;background:color-mix(in srgb,var(--navy,#12499B) 8%,var(--card));font-size:14.5px;line-height:1.4}
.np-wgrade .ic{flex:none;margin-top:1px;color:var(--navy,#12499B)}
:root[data-theme="dark"] .np-wgrade .ic{color:#7FA6FF}
.np-mode.graded{border-color:var(--navy,#12499B);box-shadow:0 0 0 2px color-mix(in srgb,var(--navy,#12499B) 18%,transparent)}
.np-gtag{display:inline-block;margin-left:6px;padding:2px 8px;border-radius:99px;background:var(--red);color:#fff;font-size:11px;font-weight:800;font-style:normal;letter-spacing:.06em;text-transform:uppercase;vertical-align:2px}
/* 21 Nov: the phrase box sits on the bottom edge with no negative offset, so an
   iPhone's bounce at the end of a scroll can't lift it and leave a gap under it */
.np-body:has(.np6-bank){padding-bottom:0}
.np6-bank{bottom:0;margin-bottom:0;padding-bottom:max(16px,env(safe-area-inset-bottom))}
@media (min-width:900px){.np6-bank{bottom:0}}
/* one-time homework (22 Nov): the word list to copy, the story gaps, the question above each answer */
.np-wl-note{display:flex;align-items:center;gap:8px;margin:2px 0 12px;padding:10px 14px;border-radius:12px;background:var(--soft,rgba(127,127,127,.08));font-size:15px}
.np-wl{display:grid;border:1px solid var(--line);border-radius:14px;overflow:hidden;background:var(--card)}
.np-wl-r{display:flex;gap:12px;padding:12px 14px;border-top:1px solid var(--line)}.np-wl-r:first-child{border-top:0}
.np-wl-n{flex:none;width:22px;font-size:13px;font-weight:800;color:var(--mute);padding-top:2px}
.np-wl-w{font-size:17px}.np-wl-w i{font-style:normal;font-size:12.5px;color:var(--mute);margin-left:4px}
.np-wl-tr{font-size:15px;font-weight:600;color:var(--ink);margin-top:1px}
.np-wl-m{font-size:14px;color:var(--ink2);margin-top:2px}
.np-wl-x{font-size:14px;color:var(--mute);font-style:italic;margin-top:4px}
.nps-story .np-ocg em{font-style:normal;font-size:13px;font-weight:800;color:var(--green,#0A6B4B);margin-left:2px}
.np-swq{margin:0 0 6px;font-size:16px;line-height:1.35}
/* UPDATE 8: listening v2 — a 1·2·3 step bar, a pinned player per part, transcripts */
.np2 .np-top{gap:10px}.np2-ttl{display:flex;flex-direction:column;line-height:1.15;min-width:0}.np2-ttl b{font-size:16px;white-space:nowrap;overflow:hidden;text-overflow:ellipsis}
.np2-steps{display:flex;align-items:center;gap:6px;padding:4px 16px 10px;flex-wrap:nowrap}
.np2-step{display:flex;align-items:center;gap:6px;border:1.5px solid var(--line);background:var(--card);border-radius:999px;padding:5px 10px 5px 5px;font:inherit;color:var(--ink);cursor:pointer}
.np2-step span{display:grid;place-items:center;width:24px;height:24px;border-radius:50%;background:var(--soft,rgba(127,127,127,.12));font-weight:800;font-size:13px}
.np2-step small{font-size:12.5px;font-weight:700}
.np2-step.on{border-color:var(--navy,#1F3A93);box-shadow:0 0 0 2px rgba(31,58,147,.15)}
.np2-step.done span{background:var(--green,#0A6B4B);color:#fff}
.np2-link{flex:1 1 8px;height:2px;background:var(--line);min-width:6px}
.np2-tabbtn{margin-left:auto;display:flex;align-items:center;gap:5px;border:0;background:none;font:inherit;font-size:13px;font-weight:700;color:var(--navy,#1F3A93);padding:6px 4px;cursor:pointer;white-space:nowrap}
.np2-tabbtn.off{color:var(--mute);cursor:default}.np2-tabbtn.on{text-decoration:underline;text-underline-offset:4px}
.np2-sum-bar{margin:0 16px 8px;padding:9px 12px;border-radius:12px;font-size:14px;display:flex;gap:7px;align-items:center}
.np2-sum-bar.ok{background:rgba(10,107,75,.1);color:var(--green,#0A6B4B)}.np2-sum-bar.no{background:rgba(179,38,30,.08);color:var(--red,#B3261E)}
.np2-head{margin-bottom:6px}.np2-set{display:flex;gap:6px;align-items:center;font-size:14px;margin-top:2px}
.np2-pin{position:sticky;top:-1px;z-index:6;background:var(--paper);padding:6px 0 8px;margin:0 -2px}
.np2-player{margin:0}.np2-seek{width:100%;accent-color:var(--navy,#1F3A93);margin:4px 0 0;height:22px}
.np2-b10{position:relative}.np2-b10 small{position:absolute;font-size:8px;font-weight:800;top:50%;left:50%;transform:translate(-50%,-38%)}
.np2-notes{margin:10px 0 0;padding-left:22px;display:grid;gap:12px;font-size:16px;line-height:1.9}
.np2-notes .np-oc,.np2-sum .np-oc{min-width:96px}
.np2-notes em,.np2-sum em{font-style:normal;font-size:13px;font-weight:800;color:var(--green,#0A6B4B);margin-left:4px}
.np2-sum{font-size:16px;line-height:2.1;margin-top:10px}
.np2-mcl{display:grid;gap:16px;margin-top:10px}.np2-mc p{margin:0 0 8px;font-size:16px}
.np2-opts{display:grid;gap:8px}
.np2-opt{text-align:left;border:1.5px solid var(--line);background:var(--card);border-radius:12px;padding:11px 13px;font:inherit;font-size:15px;color:var(--ink);cursor:pointer}
.np2-opt[aria-pressed="true"]{border-color:var(--navy,#1F3A93);background:rgba(31,58,147,.08);font-weight:700}
.np2-opt.ok{border-color:var(--green,#0A6B4B);background:rgba(10,107,75,.1)}.np2-opt.no{border-color:var(--red,#B3261E);background:rgba(179,38,30,.08);text-decoration:line-through}
.np2-opt:disabled{cursor:default;opacity:1}
.np2-foot{display:flex;gap:8px}.np2-foot .btn{flex:1}
.np2-tr{margin:0 0 22px}.np2-tr h3{display:flex;align-items:center;gap:8px;font-size:17px;margin:0}
.np2-n{display:grid;place-items:center;width:24px;height:24px;border-radius:50%;background:var(--navy,#1F3A93);color:#fff;font-size:13px}
.np2-line{margin:8px 0 0;font-size:15.5px;line-height:1.5}.np2-line b{margin-right:6px}
.np2-bleep{display:inline-block;background:#1b1b22;color:#fff;font-size:10.5px;font-weight:800;letter-spacing:.06em;text-transform:uppercase;border-radius:5px;padding:1px 6px;vertical-align:1px}
.np2-sfx{color:var(--mute);font-size:13px}
.np2-real{border:1px solid var(--line);border-radius:14px;padding:12px 14px;background:var(--card)}
.np2-real h3{display:flex;gap:6px;align-items:center;font-size:16px;margin:0 0 8px}
.np2-real dl{margin:0;display:grid;gap:8px}.np2-real dt{font-weight:800}.np2-real dd{margin:0;color:var(--ink2);font-size:14.5px}
.np2-player .np2-seek{accent-color:#fff}
.np2-step{padding:4px}.np2-step:has(small){padding-right:10px}
.np2-b10{font-size:12px;width:auto;padding:0 8px}
.np2-foot .np2-retry{flex:0 0 auto;padding-inline:16px}


/* SoffCRM, rebuilt 23 Nov 2026 (crm-ui2): a tile per case on the home screen, a folder per case in the sheet */
.crm-health { margin-bottom: 10px; }
.crm-health .btn { margin-left: auto; }
.crm-tiles { display: grid; grid-template-columns: repeat(auto-fill, minmax(200px, 1fr)); gap: 12px; margin: 4px 0 18px; }
.crm-tile { position: relative; display: grid; grid-template-columns: auto 1fr; grid-template-areas: "i n" "l l" "s s" "g g"; align-items: center;
  gap: 4px 12px; padding: 16px 16px 14px; text-align: left; cursor: pointer; border: 1px solid var(--line);
  transition: transform .15s ease, box-shadow .15s ease; }
.crm-tile:hover { transform: translateY(-2px); }
.crm-tile:active { transform: none; }
.crm-ti { grid-area: i; width: 38px; height: 38px; border-radius: 12px; display: grid; place-items: center; background: var(--soft2); color: var(--ink2); }
.crm-tile .crm-tn { grid-area: n; font-size: 36px; font-weight: 800; line-height: 1; color: var(--ink); justify-self: end; font-variant-numeric: tabular-nums; }
.crm-tl { grid-area: l; font-weight: 700; font-size: 15px; color: var(--ink); margin-top: 6px; }
.crm-ts { grid-area: s; font-size: 12.5px; color: var(--mute); }
.crm-tgo { grid-area: g; display: inline-flex; align-items: center; gap: 4px; margin-top: 8px; font-weight: 700; font-size: 13px; color: var(--ink2); }
.crm-tile.bad { box-shadow: inset 4px 0 0 #E31937, var(--shadow); }
.crm-tile.bad .crm-ti { background: rgba(227,25,55,.12); color: #E31937; }
.crm-tile.bad .crm-tn, .crm-tile.bad .crm-tgo { color: #E31937; }
.crm-tile.warn .crm-ti { background: rgba(232,150,20,.14); color: #B86E00; }
.crm-tile.good .crm-ti { background: rgba(30,158,97,.13); color: #1E9E61; }
.crm-tile.good .crm-tile .crm-tn { color: #1E9E61; }
.crm-tile.mute .crm-ti { background: var(--soft2); color: var(--ink2); }

.crm-folders { display: flex; flex-wrap: wrap; gap: 8px; margin: 2px 0 16px; }
.crm-folder { display: inline-flex; align-items: center; gap: 8px; padding: 9px 14px; border-radius: 12px; border: 1px solid var(--line);
  background: var(--card, transparent); color: var(--ink2); font-weight: 600; font-size: 13.5px; cursor: pointer; }
.crm-folder em { font-style: normal; font-size: 12px; min-width: 24px; padding: 1px 8px; border-radius: 999px; background: var(--soft2); color: var(--ink2); text-align: center; }
.crm-folder[aria-pressed="true"] { background: var(--ink); border-color: var(--ink); color: var(--bg, #fff); }
.crm-folder[aria-pressed="true"] em { background: rgba(255,255,255,.22); color: inherit; }
.crm-folder.bad em { background: #E31937; color: #fff; }

.crm-case { border: 1px solid var(--line); border-radius: 16px; padding: 16px; margin-bottom: 14px; box-shadow: inset 4px 0 0 var(--line); }
.crm-case.bad { box-shadow: inset 4px 0 0 #E31937; }
.crm-case.warn { box-shadow: inset 4px 0 0 #E89614; }
.crm-case.good { box-shadow: inset 4px 0 0 #1E9E61; }
.crm-ch { display: flex; align-items: center; gap: 12px; }
.crm-ch h3 { margin: 0; font-size: 18px; }
.crm-ch .crm-ti { width: 34px; height: 34px; }
.crm-case .crm-cn { font-size: 30px; font-weight: 800; line-height: 1; color: var(--ink); }
.crm-case.bad .crm-case .crm-cn { color: #E31937; }
.crm-what { margin: 12px 0 6px; color: var(--ink2); }
.crm-todo { margin: 0; color: var(--ink); }
.crm-bar { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 14px; }
.crm-none { display: flex; align-items: center; gap: 10px; padding: 18px; color: #1E9E61; font-weight: 600; }

.crm-list { display: flex; flex-direction: column; }
.crm-stu { display: flex; align-items: center; gap: 12px; flex-wrap: wrap; padding: 12px 0; border-top: 1px solid var(--line); }
.crm-list > .crm-stu:first-child { border-top: 0; }
.crm-grp .crm-list > .crm-stu:first-child { border-top: 1px solid var(--line); }
.crm-stu .grow { min-width: 180px; display: flex; flex-direction: column; gap: 2px; }
.crm-stu b { font-size: 15px; color: var(--ink); }
.crm-ph { font-variant-numeric: tabular-nums; font-size: 13px; color: var(--ink2); }
.crm-sub { font-size: 12.5px; color: var(--mute); }
.crm-acts { display: flex; flex-wrap: wrap; gap: 6px; }
@media (max-width: 560px) {
  .crm-tiles { grid-template-columns: 1fr 1fr; }
  .crm-acts { width: 100%; }
  .crm-acts .btn { flex: 1 1 auto; justify-content: center; }
  .crm-bar .btn { flex: 1 1 100%; justify-content: center; }
}
/* 24 Nov: the strict under-80% message */
.np-strict{display:flex;gap:12px;align-items:flex-start;text-align:left;margin:14px 0 6px;padding:14px 16px;border-radius:14px;background:#B3261E;color:#fff;box-shadow:0 6px 18px rgba(179,38,30,.25)}
.np-strict>svg,.np-strict>.ic{flex:none;width:26px;height:26px;margin-top:2px}
.np-strict b{display:block;font-size:17px;line-height:1.3}
.np-strict p{margin:6px 0 0;font-size:14.5px;line-height:1.4}
.np-strict .np-strict-o{opacity:.85;font-size:13px}
/* 24 Nov: a student's new-program homework, in their topic list */
.stu-npc{display:flex;flex-wrap:wrap;gap:5px;margin-top:5px}
.stu-npc i{font-style:normal;display:inline-flex;align-items:center;gap:4px;font-size:12px;font-weight:600;padding:3px 8px 3px 6px;border-radius:999px;line-height:1.2}
.stu-npc i.ok{background:rgba(10,107,75,.1);color:var(--green,#0A6B4B)}
.stu-npc i.no{background:rgba(179,38,30,.08);color:var(--red,#B3261E)}
.stu-npc i svg,.stu-npc i .ic{width:12px;height:12px}
.stu-np .np-pct{font-weight:800;font-size:15px;margin-right:4px}.np-pct.ok{color:var(--green,#0A6B4B)}.np-pct.no{color:var(--red,#B3261E)}
.bad-t{color:var(--red,#B3261E);font-weight:600}
.stu-npc i.none{background:rgba(127,127,127,.1);color:var(--mute)}.np-pct.none{color:var(--mute)}
.stu-npc i.prep{background:rgba(31,58,147,.08);color:var(--navy,#1F3A93)}
/* 26 Nov: speaking homework on the group page */
.hw-prep{display:flex;align-items:center;gap:5px;margin-top:4px;color:var(--navy,#1F3A93)}
.hw-forclass{display:inline-flex;align-items:center;justify-content:center;box-sizing:border-box;height:38px;width:92px;padding:0;border-radius:9px;background:rgba(31,58,147,.07);color:var(--navy,#1F3A93);font-size:11px;font-weight:600;letter-spacing:.13em;text-transform:uppercase;line-height:1;white-space:nowrap;flex:none}
.hw-row .btn.sm{flex:none}.hw-row .btn.sm[data-a="hw-who"]{width:92px;padding:0;justify-content:center}
.hw-old{margin-top:10px}.hw-old summary{cursor:pointer;list-style:none}.hw-old summary::-webkit-details-marker{display:none}
.hw-old[open] summary svg{transform:rotate(180deg)}.hw-orow .t{font-size:14.5px}

.hw-old{padding:0;overflow:hidden}.hw-old>summary{padding:16px 18px}.hw-old>.list{margin:0;padding:0;border:0;border-radius:0;box-shadow:none;background:none;border-top:1px solid var(--line,#E4E8F2)}.hw-old>.list>.li{padding:14px 18px}
@media (max-width:600px){
  .hw-row{flex-wrap:wrap;row-gap:10px}
  .hw-row>.grow{flex:1 1 calc(100% - 60px);min-width:0}
  .hw-row>.grow .t{display:flex;flex-wrap:wrap;align-items:center;gap:4px 8px}
  .hw-row>.btn[data-a="hw-when"]{margin-left:51px}
  .hw-row>.hw-undo{margin-left:auto;opacity:1}
  .hw-forclass,.hw-row .btn.sm[data-a="hw-who"]{width:auto;min-width:92px;padding:0 13px}
  .hw-old>.list>.li{padding:12px 14px}.hw-old>summary{padding:14px}
}
/* 28 Nov: the XP bar glides; one sheen runs along it while it fills, a soft glow when it lands */
.xpw .xpw-bar > i{will-change:width;overflow:hidden}
.xpw .xpw-bar > i > s{position:absolute;top:0;bottom:0;left:-45%;width:45%;background:linear-gradient(90deg,transparent,rgba(255,255,255,.55),transparent);opacity:0}
.xpw.fill .xpw-bar > i > s{animation:xpwSheen 1.3s cubic-bezier(.22,1,.36,1) .15s 1}
@keyframes xpwSheen{0%{left:-45%;opacity:0}15%{opacity:1}100%{left:110%;opacity:0}}
.xpw.done .xpw-bar > i{animation:xpwGlow .9s ease-out 1}
@keyframes xpwGlow{0%{filter:brightness(1)}35%{filter:brightness(1.35)}100%{filter:brightness(1)}}
.xpw.done .xpw-n{animation:xpwPop .45s cubic-bezier(.2,1.4,.4,1) 1}
@keyframes xpwPop{0%{transform:scale(1)}40%{transform:scale(1.08)}100%{transform:scale(1)}}
@media (prefers-reduced-motion:reduce){.xpw .xpw-bar > i > s,.xpw.done .xpw-bar > i,.xpw.done .xpw-n{animation:none}}
/* 28 Nov: listening — tighter, calmer spacing; inputs sit in the line instead of stretching it */
.np2 .np-oc{min-height:0;height:36px;padding:2px 10px;font-size:16px;line-height:1.2;vertical-align:middle;margin:2px 2px;border-width:1.5px;border-radius:10px;box-sizing:border-box}
.np2-notes{gap:10px;line-height:1.55;font-size:16px;margin-top:12px}
.np2-notes li{padding:2px 0}
.np2-notes .np-oc,.np2-sum .np-oc{min-width:0;width:9em;max-width:55vw}
.np2-sum{line-height:2.25;font-size:16px}
.np2-sum .np-ocg{gap:2px}
.np2-mcl{gap:20px;margin-top:12px}
.np2-mc p{margin:0 0 10px;line-height:1.4}
.np2-opts{gap:7px}
.np2-opt{padding:10px 14px;font-size:15px;line-height:1.35;border-radius:11px}
.np2-head{margin-bottom:4px}
.np2-pin{padding:6px 0 10px;margin-bottom:6px;box-shadow:0 8px 10px -10px rgba(0,0,0,.25)}
.np2 .np-body .np-instr,.np2 .np-body .np-ins{margin-top:6px}
.np2 .np-verdict{margin-top:16px;align-items:flex-start}
.np2 .np-verdict span{line-height:1.4}
.np2-strict{margin-top:10px}
.np2-step.fail span{background:var(--red,#B3261E);color:#fff}
.np2-step.fail{border-color:rgba(179,38,30,.45)}
.rv-appnote{display:flex;align-items:center;gap:12px;width:100%;text-align:left;padding:12px 16px;margin:0 0 10px;font:inherit;color:inherit;cursor:pointer;border:1px solid var(--line)}
.rv-appnote .grow{display:flex;flex-direction:column;gap:2px}
