/* Newton Study UI kit — vanilla CSS, single sheet.
   Fonts to self-host: "Rubik" (400,500,600,700) and "Golos Text" (400,500,600) — both cover Cyrillic.
   Verify glyph coverage for U+02BB (ʻ) and U+02BC (ʼ) in your hosted subset. */

:root{
  /* --- Newton Study brand (sampled from the logo) --- */
  --navy:#12294B; --orange:#FF6B3D; --peach:#E0A98F; --sand:#C9C3B6;
  --navy-600:#1E3E6E; --navy-300:#4D5F78;
  --grad:linear-gradient(135deg,#12294B 0%,#1E3E6E 55%,#FF6B3D 100%);
  /* legacy aliases kept so older rules keep working */
  --blue:#1E4B8F; --purple:#8A3E9E; --pink:#FF6B3D; --coral:#FF8A63;
  /* warm cream ground, navy ink */
  --bg:#FBF8F4; --surface:#FFFFFF; --surface2:#F4F0E9;
  --ink:#12294B; --muted:#6E7A8C; --line:#E9E2D8; --line-strong:#D5CCBF;
  --ok:#177E4D; --ok-bg:#E4F6EC;
  --late:#9A5B00; --late-bg:#FDF1DC;
  --info:#1E4B8F; --info-bg:#E8EFF9;
  --bad:#C21F3A; --bad-bg:#FCE8EB;
  --accent:#FF6B3D;
  /* subjects: distinct, but in the brand family */
  --subj-en:#1E4B8F;  --subj-en-bg:#E8EFF9;
  --subj-math:#B5451C; --subj-math-bg:#FFEDE4;
  --subj-psy:#0E7C6B;  --subj-psy-bg:#DFF3EF;
  --subj-it:#5B4B9E;   --subj-it-bg:#ECEAF7;
  --subj-poch:#B84A86; --subj-poch-bg:#FBE8F2;
  --shadow:0 1px 2px rgba(18,41,75,.05),0 14px 30px -16px rgba(18,41,75,.22);
  --shadow-lift:0 2px 6px rgba(18,41,75,.07),0 20px 40px -18px rgba(18,41,75,.30);
  --r:20px; --r-sm:12px;
  --font-ui:"Manrope",-apple-system,"Segoe UI",system-ui,sans-serif;
  --font-head:"Manrope",var(--font-ui);
  color-scheme:light;
}

*{box-sizing:border-box}
html{scroll-behavior:smooth;scroll-padding-top:76px}
body{
  margin:0;background:var(--bg);color:var(--ink);
  font:400 15px/1.55 var(--font-ui);
  -webkit-font-smoothing:antialiased;
}
h1,h2,h3{font-family:var(--font-head);line-height:1.2;margin:0 0 .4em}
h2{font-size:20px;font-weight:600}
h3{font-size:16px;font-weight:600}
a{color:var(--blue);text-decoration:none}
a:hover{color:var(--pink);text-decoration:underline}
:focus-visible{outline:2px solid var(--blue);outline-offset:2px;border-radius:4px}
.muted{color:var(--muted);font-weight:400}
@media (prefers-reduced-motion:reduce){
  *,*::before,*::after{animation:none!important;transition:none!important}
  html{scroll-behavior:auto}
}

/* ---------- header ---------- */
header.top{
  position:sticky;top:0;z-index:40;
  display:flex;align-items:center;gap:20px;
  padding:10px 20px;
  background:color-mix(in srgb,var(--surface) 88%,transparent);
  backdrop-filter:blur(10px);
  border-bottom:1px solid var(--line);
}
.brand{display:flex;align-items:center;gap:10px;font-family:var(--font-head);font-weight:600;font-size:17px;color:var(--ink);letter-spacing:-.01em;white-space:nowrap}
.brand:hover{text-decoration:none;color:var(--ink)}
.logo{
  width:38px;height:38px;border-radius:50%;flex:none;
  background:linear-gradient(135deg,#3A6BD3,#8A3E9E 38%,#E0397B 70%,#EE7368);
  box-shadow:inset 0 0 0 2.5px #fff, inset 0 0 0 3.5px rgba(0,0,0,.08);
  display:grid;place-content:center;
  color:#fff;font-size:9.5px;line-height:1.05;font-weight:600;text-align:center;letter-spacing:.02em;
}
header.top nav{display:flex;gap:2px;flex:1;min-width:0;overflow-x:auto;scrollbar-width:none}
header.top nav::-webkit-scrollbar{display:none}
header.top nav a{
  padding:10px 13px;border-radius:10px;color:var(--muted);font-weight:500;font-size:14px;white-space:nowrap;
  min-height:44px;display:flex;align-items:center;
}
header.top nav a:hover{color:var(--ink);background:var(--surface2);text-decoration:none}
header.top nav a.on{color:var(--ink);background:var(--surface2);position:relative}
header.top nav a.on::after{
  content:"";position:absolute;left:13px;right:13px;bottom:5px;height:3px;border-radius:2px;
  background:var(--grad);
}
/* language dropdown (full self-name + flag) */
.lngdd{position:relative;flex:none;margin:0}
.lngdd > summary{list-style:none;cursor:pointer;display:inline-flex;align-items:center;gap:9px;min-height:44px;margin:0;padding:8px 12px;border:1px solid var(--line);border-radius:10px;background:var(--surface);font:600 13.5px var(--font-ui);color:var(--ink);user-select:none}
.lngdd > summary::-webkit-details-marker{display:none}
.lngdd > summary:hover{background:var(--surface2)}
.lngdd > summary .chev{margin-left:2px;color:var(--muted);transition:transform .15s}
.lngdd[open] > summary .chev{transform:rotate(180deg)}
.lngdd .flag{width:22px;height:15px;flex:none;border-radius:3px;box-shadow:0 0 0 1px rgba(0,0,0,.08);overflow:hidden;stroke:none}
.lngmenu{position:absolute;left:0;min-width:100%;background:var(--surface);border:1px solid var(--line);border-radius:11px;box-shadow:var(--shadow);padding:5px;z-index:60;display:grid;gap:2px;white-space:nowrap}
.lngdd:not([open]) .lngmenu{display:none}   /* abs-positioned menu leaks out of a closed <details> in Chrome — force-hide it */
.lngdd:not(.up) .lngmenu{top:calc(100% + 6px)}
.lngdd.up .lngmenu{bottom:calc(100% + 6px)}
.lngmenu a{display:flex;align-items:center;gap:10px;padding:8px 10px;border-radius:8px;text-decoration:none;color:var(--ink);font:500 13.5px var(--font-ui)}
.lngmenu a:hover{background:var(--surface2)}
.lngmenu a.on{background:color-mix(in srgb,var(--accent) 12%,transparent);color:var(--accent);font-weight:700}
.iconbtn{
  width:44px;height:44px;flex:none;border:1px solid var(--line);border-radius:10px;
  background:var(--surface);color:var(--muted);
  display:inline-flex;align-items:center;justify-content:center;cursor:pointer;
}
.iconbtn:hover{color:var(--ink);border-color:var(--line-strong)}
.icon{width:20px;height:20px;stroke:currentColor;fill:none;stroke-width:1.8;stroke-linecap:round;stroke-linejoin:round;flex:none}

/* ---------- layout ---------- */
.wrap{max-width:1080px;margin:0 auto;padding:30px 20px 56px}
section[id]{border-bottom:1px solid var(--line)}
.kitlabel{
  font:600 11px/1 var(--font-ui);letter-spacing:.14em;text-transform:uppercase;color:var(--muted);
  display:flex;align-items:center;gap:10px;margin:0 0 22px;
}
.kitlabel::after{content:"";flex:1;height:1px;background:var(--line)}

/* page hero — the Newton prism: a white beam refracts into the brand spectrum */
.wrap > h1:first-child{
  font-size:clamp(30px,4.5vw,42px);font-weight:700;letter-spacing:-.02em;
  margin:0 0 30px;padding-bottom:26px;position:relative;
}
.wrap > h1:first-child .muted{display:block;font-family:var(--font-ui);font-size:15px;letter-spacing:0;font-weight:400;margin-top:6px}
.wrap > h1:first-child::after{ /* short gradient dash under the title */
  content:"";position:absolute;left:0;bottom:8px;width:56px;height:5px;border-radius:99px;
  background:var(--grad);
}

/* ---------- stat cards ---------- */
.cards{display:grid;grid-template-columns:repeat(auto-fit,minmax(220px,1fr));gap:14px;margin:0 0 30px}
.card{
  background:var(--surface);border:1px solid var(--line);border-radius:var(--r);
  padding:18px 20px;box-shadow:var(--shadow);position:relative;overflow:hidden;
}
.card::before{content:"";position:absolute;inset:0 auto 0 0;width:4px;background:var(--grad)}
.card h3{font-size:13px;font-weight:500;color:var(--muted);margin:0 0 6px}
.card .num{
  display:block;font-family:var(--font-head);font-weight:700;font-size:38px;line-height:1;letter-spacing:-.02em;
  background:var(--grad);-webkit-background-clip:text;background-clip:text;color:transparent;
}
.card .sub{font-size:13px;color:var(--muted);margin-top:6px}

/* ---------- tables ---------- */
table{width:100%;border-collapse:separate;border-spacing:0;background:var(--surface);font-size:14px}
table{display:table}
.tablewrap{overflow-x:auto;background:var(--surface);border:1px solid var(--line);border-radius:var(--r);box-shadow:var(--shadow);margin:0 0 26px}
.tcap{font:600 16px/1.3 var(--font-head);margin:0 0 10px;color:var(--ink)}
th{
  text-align:left;font:600 12px/1.3 var(--font-ui);letter-spacing:.05em;text-transform:uppercase;color:var(--muted);
  padding:11px 14px;background:var(--surface2);border-bottom:1px solid var(--line);white-space:nowrap;
}
td{padding:11px 14px;border-bottom:1px solid var(--line);vertical-align:middle}
tr:last-child td{border-bottom:0}
tbody tr:hover{background:color-mix(in srgb,var(--surface2) 55%,transparent)}
tr.on td{background:var(--info-bg)}
tr.on td:first-child{box-shadow:inset 3px 0 var(--blue)}
tr.inactive td{color:var(--muted);opacity:.62}
tr.inactive td:first-child{text-decoration:line-through;text-decoration-color:var(--line-strong)}
tr.assess td{background:var(--late-bg);font-weight:500}
tr.assess td:first-child{box-shadow:inset 3px 0 var(--late)}
td.r,th.r{text-align:right}
.pts-pos{color:var(--ok);font-weight:600}
.pts-neg{color:var(--bad);font-weight:600}

/* badges */
.badge{
  display:inline-flex;align-items:center;gap:5px;padding:3px 9px;border-radius:99px;
  font-size:12px;font-weight:600;line-height:1.5;background:var(--surface2);color:var(--muted);
  border:1px solid var(--line);white-space:nowrap;
}
.badge.cefr{background:var(--info-bg);color:var(--info);border-color:transparent}
.badge.ok{background:var(--ok-bg);color:var(--ok);border-color:transparent}
.badge.grad{background:var(--grad);color:#fff;border:0}

/* ---------- buttons ---------- */
.btn{
  display:inline-flex;align-items:center;justify-content:center;gap:8px;
  min-height:44px;padding:10px 18px;border-radius:11px;border:1px solid transparent;
  font:600 14px/1 var(--font-ui);cursor:pointer;text-decoration:none;
  background:var(--ink);color:var(--bg);
}
.btn:hover{text-decoration:none;color:var(--bg);background:color-mix(in srgb,var(--ink) 86%,#fff);filter:none}
.btn.primary{background:var(--ink);color:var(--bg)}
.btn.primary:hover{color:var(--bg);background:color-mix(in srgb,var(--ink) 84%,#fff);filter:none}
.btn.ghost{background:transparent;color:var(--ink);border-color:var(--line-strong)}
.btn.ghost:hover{background:var(--surface2);filter:none}
.btn.small{min-height:36px;padding:7px 13px;font-size:13px;border-radius:9px}
.btn.danger{background:transparent;color:var(--bad);border-color:color-mix(in srgb,var(--bad) 40%,transparent)}
.btn.danger:hover{background:var(--bad-bg);filter:none}
.btn .icon{width:16px;height:16px;margin-left:-3px}

/* ---------- forms ---------- */
.form,.box{
  background:var(--surface);border:1px solid var(--line);border-radius:var(--r);
  padding:22px;box-shadow:var(--shadow);margin:0 0 26px;
}
.form label{display:block;font-weight:500;font-size:13.5px;margin:0 0 16px;color:var(--ink)}
.form label > input,.form label > select,.form label > textarea,
.inline-form input,.inline-form select{
  display:block;width:100%;margin-top:6px;
  min-height:44px;padding:10px 12px;border-radius:10px;
  border:1px solid var(--line-strong);background:var(--surface);color:var(--ink);
  font:400 15px/1.4 var(--font-ui);
}
.form label > select,.inline-form select{
  appearance:none;-webkit-appearance:none;
  padding-right:38px;
  background-image:url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='16' height='16' viewBox='0 0 24 24' fill='none' stroke='%235D6478' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='m6 9 6 6 6-6'/%3E%3C/svg%3E");
  background-repeat:no-repeat;background-position:right 14px center;
}
.form input:focus,.form select:focus,.inline-form input:focus,.inline-form select:focus{
  outline:2px solid var(--blue);outline-offset:0;border-color:var(--blue);
}
/* a control must never exceed its container — long <select> options were widening it past the box */
select,input,textarea{max-width:100%}
.box > label,form > label{min-width:0}
.form .grid2{display:grid;grid-template-columns:1fr 1fr;gap:0 16px}
.inline-form{display:flex;flex-wrap:wrap;gap:10px 14px;align-items:end;margin:0 0 26px}
/* cap field width so a lone field on a row can't stretch to full width (grow up to 300px, then wrap) */
.inline-form label{font-weight:500;font-size:13px;color:var(--muted);flex:1 1 170px;max-width:300px}
.inline-form label.wide{max-width:none;flex-basis:100%}   /* opt-in for fields that should span the row */
@media (max-width:600px){ .inline-form label{flex-basis:100%;max-width:none} .form .grid2{grid-template-columns:1fr} }
.inline-form input,.inline-form select{margin-top:5px}
.inline-form .btn{flex:none}

/* ---------- biglist ---------- */
.biglist{display:grid;grid-template-columns:repeat(auto-fit,minmax(200px,1fr));gap:12px;margin:0 0 28px;padding:0;list-style:none}
.biglist a{
  display:flex;align-items:center;gap:12px;min-height:64px;padding:14px 16px;
  background:var(--surface);border:1px solid var(--line);border-radius:var(--r);
  color:var(--ink);font-weight:600;font-size:15px;box-shadow:var(--shadow);
}
.biglist a:hover{text-decoration:none;border-color:var(--line-strong);transform:translateY(-1px)}
.biglist .icon{width:22px;height:22px;color:var(--purple)}
.biglist small{display:block;font-weight:400;font-size:12.5px;color:var(--muted)}

/* ---------- flash / warn / err ---------- */
.flash{
  display:flex;align-items:center;gap:10px;
  background:var(--ok-bg);color:var(--ok);border:1px solid color-mix(in srgb,var(--ok) 30%,transparent);
  border-radius:11px;padding:12px 16px;font-weight:600;font-size:14px;margin:0 0 20px;
}
.warn,.err{
  border-radius:11px;padding:14px 16px;font-size:14px;margin:0 0 20px;
  border:1px solid;display:flex;gap:10px;align-items:flex-start;
}
.warn{background:var(--late-bg);color:var(--late);border-color:color-mix(in srgb,var(--late) 30%,transparent)}
.err{background:var(--bad-bg);color:var(--bad);border-color:color-mix(in srgb,var(--bad) 30%,transparent)}
.warn strong,.err strong{font-weight:700}
.flash .icon,.warn .icon,.err .icon{width:19px;height:19px;margin-top:1px}

/* empty state */
.empty{
  text-align:center;padding:44px 20px;color:var(--muted);
}
.empty > .icon{width:34px;height:34px;stroke-width:1.4;color:var(--line-strong);margin-bottom:10px}
.empty p{margin:0 0 14px;font-size:14px}

/* ---------- login ---------- */
.loginbox{
  max-width:380px;margin:48px auto;padding:34px 30px 30px;
  background:var(--surface);border:1px solid var(--line);border-radius:20px;box-shadow:var(--shadow);
  text-align:center;position:relative;overflow:hidden;
}
.loginbox::before{content:"";position:absolute;top:0;left:0;right:0;height:5px;background:var(--grad)}
.loginbox .logo{width:64px;height:64px;margin:0 auto 14px;font-size:15px}
.loginbox h2{font-size:22px;margin-bottom:2px}
.loginbox .muted{font-size:13.5px;display:block;margin-bottom:22px}
.loginbox .form{border:0;padding:0;margin:0;box-shadow:none;background:none;text-align:left}
.loginbox .btn{width:100%;margin-top:4px}

/* ---------- attendance ---------- */
.attbar{display:flex;flex-wrap:wrap;gap:10px;align-items:center;margin:0 0 18px}
.attbar input[type=date]{
  min-height:44px;padding:9px 12px;border-radius:10px;border:1px solid var(--line-strong);
  background:var(--surface);color:var(--ink);font:500 15px var(--font-ui);
}
.attbar .spacer{flex:1}
.att td,.att th{padding:8px}
.att .av{display:inline-flex;width:30px;height:30px;border-radius:50%;align-items:center;justify-content:center;font:600 11.5px var(--font-ui);margin-right:9px;vertical-align:middle;letter-spacing:.02em}
.att th{font-size:11px}
.att td.name{font-weight:500;white-space:nowrap}
.att td.name small{display:block;font-weight:400;color:var(--muted)}
.att .stcell,.att td[class^="st-"]{text-align:center;width:96px}
.att td[class^="st-"] label{
  display:flex;align-items:center;justify-content:center;gap:7px;
  min-height:44px;padding:0 8px;border-radius:99px;cursor:pointer;
  font-size:13px;font-weight:600;color:var(--muted);
  background:var(--surface2);border:1.5px solid transparent;user-select:none;
  transition:background .12s,color .12s,border-color .12s;
}
.att td[class^="st-"] label:hover{background:var(--surface);border-color:var(--line-strong);color:var(--ink)}
.att td[class^="st-"] input{position:absolute;opacity:0;width:1px;height:1px}
.att td[class^="st-"] .dot{width:9px;height:9px;border-radius:50%;background:var(--line-strong);flex:none}
.att td.st-present .dot{background:var(--ok)}
.att td.st-late .dot{background:var(--late)}
.att td.st-excused .dot{background:var(--info)}
.att td.st-absent .dot{background:var(--bad)}
.att td.st-present:has(input:checked) label{background:var(--ok);color:#fff;border-color:var(--ok)}
.att td.st-late:has(input:checked) label{background:var(--late);color:#fff;border-color:var(--late)}
.att td.st-excused:has(input:checked) label{background:var(--info);color:#fff;border-color:var(--info)}
.att td.st-absent:has(input:checked) label{background:var(--bad);color:#fff;border-color:var(--bad)}
.att td.st-present:has(input:checked) .dot,.att td.st-late:has(input:checked) .dot,
.att td.st-excused:has(input:checked) .dot,.att td.st-absent:has(input:checked) .dot{background:#fff}
.att td[class^="st-"] label:focus-within{outline:2px solid var(--blue);outline-offset:2px}
.att tr:has(td.st-absent input:checked) td.name{color:var(--bad)}
.att td.month{white-space:nowrap;color:var(--muted);font-size:12.5px;font-weight:600}
.att .minidots{display:inline-flex;gap:2.5px;margin-right:7px;vertical-align:middle}
.att .minidots i{width:6px;height:6px;border-radius:99px;background:var(--line-strong)}
.att .minidots i.p{background:var(--ok)}
.att .minidots i.l{background:var(--late)}
.att .minidots i.e{background:var(--info)}
.att .minidots i.a{background:var(--bad)}
.attlegend{display:flex;flex-wrap:wrap;gap:14px;margin:12px 0 0;font-size:12.5px;color:var(--muted)}
.attlegend span{display:inline-flex;align-items:center;gap:6px}
.attlegend .dot{width:9px;height:9px;border-radius:50%}

/* ---------- lesson structure ---------- */
.stagebar{display:flex;height:14px;border-radius:99px;overflow:hidden;margin:0 0 18px;border:1px solid var(--line)}
.stagebar i{display:block}
.stagebar .s1{background:var(--blue)}.stagebar .s2{background:var(--purple)}
.stagebar .s3{background:var(--pink)}.stagebar .s4{background:var(--coral)}
.stagebar .s5{background:var(--late)}
.stageswatch{width:11px;height:11px;border-radius:3px;display:inline-block;margin-right:8px;vertical-align:-1px}

/* ---------- parent card ---------- */
.parentcard{
  max-width:400px;margin:0 auto 28px;border-radius:22px;overflow:hidden;
  background:var(--surface);border:1px solid var(--line);box-shadow:var(--shadow);
}
.parentcard .phead{
  background:var(--grad);color:#fff;padding:24px 22px 20px;position:relative;
}
.parentcard .phead .logo{position:absolute;top:18px;right:18px;width:34px;height:34px;font-size:8.5px;box-shadow:inset 0 0 0 2px #fff}
.parentcard .phead h2{color:#fff;font-size:23px;margin:0;padding-right:48px}
.parentcard .phead .muted{color:rgba(255,255,255,.85);font-size:13.5px}
.parentcard .phead .badge{background:rgba(255,255,255,.2);color:#fff;border-color:rgba(255,255,255,.35);margin-top:10px}
.parentcard .pstats{display:grid;grid-template-columns:1fr 1fr;gap:1px;background:var(--line)}
.parentcard .pstats div{background:var(--surface);padding:16px 20px}
.parentcard .pstats .num{display:block;font:700 26px/1.1 var(--font-head);letter-spacing:-.01em}
.parentcard .pstats small{color:var(--muted);font-size:12.5px}
.parentcard .plist{padding:16px 22px 20px}
.parentcard .plist h3{font-size:13px;text-transform:uppercase;letter-spacing:.08em;color:var(--muted);margin-bottom:10px}
.parentcard .plist ul{list-style:none;margin:0;padding:0}
.parentcard .plist li{display:flex;justify-content:space-between;gap:10px;padding:9px 0;border-bottom:1px solid var(--line);font-size:14px}
.parentcard .plist li:last-child{border-bottom:0}
.parentcard .plist b{font-weight:600}

/* ---------- tabbar (mobile) ---------- */
.tabbar{
  display:none;position:fixed;left:0;right:0;bottom:0;z-index:50;
  width:100vw;max-width:100vw;box-sizing:border-box;
  background:color-mix(in srgb,var(--surface) 92%,transparent);
  border-top:1px solid var(--line);
  /* In a browser, Safari already insets the viewport above its own toolbar, so adding
     env(safe-area-inset-bottom) here double-counts it and leaves a dead strip under the
     labels. The inset is only genuinely needed when installed to the home screen. */
  padding:4px max(8px,env(safe-area-inset-left)) 4px;
}
@media (display-mode:standalone){
  .tabbar{padding-bottom:max(4px,env(safe-area-inset-bottom))}
}
/* The blur lives on a pseudo-element, not on .tabbar itself: backdrop-filter would
   make the bar a containing block for its fixed children, trapping the More sheet
   inside a 56px-tall box. */
.tabbar::before{content:"";position:absolute;inset:0;z-index:-1;backdrop-filter:blur(10px)}
.tabbar a{
  flex:1 1 0;min-width:0;display:flex;flex-direction:column;align-items:center;gap:3px;
  min-height:52px;padding:7px 2px;border-radius:10px;
  font-size:10.5px;font-weight:600;color:var(--muted);
}
.tabbar a span{max-width:100%;line-height:1.1;text-align:center;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}
.tabbar a:hover{text-decoration:none}
.tabbar a .icon{width:22px;height:22px}
.tabbar a.on{color:var(--pink)}
.tabbar a.on .icon{color:var(--pink)}

/* ---------- responsive ---------- */
@media (max-width:900px){
  .form .grid2{grid-template-columns:1fr}
}
@media (max-width:860px){
  header.top{gap:10px;padding:8px 12px}
  header.top .iconbtn.opt{display:none}
  header.top nav{display:none}
  .tabbar{display:flex}
  body{padding-bottom:74px}
  .wrap{padding:22px 14px 44px}
  .wrap > h1:first-child{font-size:27px}
  .cards{grid-template-columns:1fr 1fr}
  .cards .card:first-child{grid-column:1 / -1}
  .card .num{font-size:32px}
  td,th{padding:9px 10px}
  .att .stcell,.att td[class^="st-"]{width:auto}
  .att td[class^="st-"] label span.txt{display:none} /* icons+dots only on phones — faster tapping */
  .att td.month{display:none}
  .parentcard{border-radius:18px}
}
@media (max-width:420px){
  .cards{grid-template-columns:1fr}
}

/* feature add-ons */
.checkpill{position:relative;display:inline-flex;align-items:center;gap:8px;min-height:44px;padding:0 14px;border-radius:99px;background:var(--surface2);border:1.5px solid transparent;font:600 13px var(--font-ui);color:var(--muted);cursor:pointer;user-select:none}
.checkpill input{position:absolute;opacity:0;width:1px;height:1px}
.checkpill:hover{background:var(--surface);border-color:var(--line-strong);color:var(--ink)}
.checkpill:has(input:checked){background:var(--info-bg);color:var(--info);border-color:var(--info)}
.checkpill:focus-within{outline:2px solid var(--blue);outline-offset:2px}
.att td.hw{text-align:center;width:64px}
.att td.hw .checkpill{padding:0 12px}
.att td.hw .checkpill:has(input:checked){background:var(--ok-bg);color:var(--ok);border-color:var(--ok)}
.latemin{display:block;text-align:center;font:600 11px var(--font-ui);color:var(--late);margin-top:3px}
.bars{display:grid;gap:10px}
.bar{display:grid;grid-template-columns:150px 1fr 48px;align-items:center;gap:12px;font-size:13px;font-weight:500}
.bar .track{height:10px;border-radius:99px;background:var(--surface2);overflow:hidden}
.bar .fill{display:block;height:100%;border-radius:99px;background:var(--blue)}
.bar.weak .fill{background:var(--coral)}
.bar b{text-align:right}
.toast{display:inline-flex;align-items:center;gap:12px;background:var(--ink);color:var(--bg);border-radius:12px;padding:13px 18px;font:600 14px var(--font-ui);box-shadow:var(--shadow);margin:0 0 20px}
.toast .undo{color:var(--coral);font-weight:700}
@media (max-width:480px){.bar{grid-template-columns:104px 1fr 40px}}

/* caption toolbar + CSV import */
.caprow{display:flex;align-items:center;flex-wrap:wrap;gap:10px;margin:0 0 10px}
.caprow .tcap{margin:0}
.caprow .spacer{flex:1}
.csvbox{display:flex;align-items:center;flex-wrap:wrap;gap:16px;border-style:dashed;border-color:var(--line-strong)}
.csvbox > .icon{width:26px;height:26px;stroke-width:1.5;color:var(--purple)}
.csvbox .csvtext{flex:1;min-width:220px;font-size:14px}
.csvbox .csvtext .muted{font-size:12.5px}
.csvsample{font-size:13px;font-weight:600}

/* footer */
.foot{display:flex;flex-direction:column;align-items:center;gap:4px;padding:44px 20px 40px;text-align:center}
.foot .logo{width:30px;height:30px;font-size:7.5px;margin-bottom:8px;box-shadow:inset 0 0 0 2px #fff}
.foot p{margin:0;font-size:14px}
.foot .muted{font-size:12.5px}
@media (max-width:860px){.foot{padding-bottom:26px}}


/* ================================================================
   App integration layer (added during hookup; kit CSS above intact)
   ================================================================ */

/* roadmap calendar view */
.caltoggle{display:inline-flex;background:var(--surface2);border-radius:10px;padding:4px;gap:4px;margin:0 0 18px}
.caltoggle a{padding:7px 16px;border-radius:8px;font:600 13.5px var(--font-ui);color:var(--muted);text-decoration:none}
.caltoggle a.on{background:var(--surface);color:var(--ink);box-shadow:0 1px 3px rgba(0,0,0,.08)}
.cal{display:grid;grid-template-columns:repeat(auto-fill,minmax(440px,1fr));gap:22px}
.cal-m{border:1px solid var(--line);border-radius:16px;overflow:hidden;background:var(--surface)}
.cal-mh{padding:14px 18px;font:700 17px var(--font-head);background:var(--surface2);text-transform:capitalize}
.cal-grid{display:grid;grid-template-columns:repeat(7,1fr)}
.cal-dow{padding:9px 0;text-align:center;font:600 12px var(--font-ui);color:var(--muted);border-bottom:1px solid var(--line);text-transform:uppercase}
.cal-d{min-height:92px;padding:8px 9px;border-right:1px solid var(--line);border-bottom:1px solid var(--line);position:relative;overflow:hidden}
.cal-d:nth-child(7n){border-right:0}
.cal-d .dn{font:700 13.5px var(--font-ui);color:var(--muted)}
.cal-d.blank{background:var(--surface2);opacity:.35}
.cal-d.les{background:color-mix(in srgb,var(--accent) 10%,transparent)}
.cal-d.les .dn{color:var(--ink)}
.cal-d.asmt{background:color-mix(in srgb,var(--accent) 26%,transparent)}
.cal-d.hol{background:color-mix(in srgb,#e2483d 12%,transparent)}
.cal-d.past{opacity:.5}
.cal-d.today{outline:2px solid var(--accent);outline-offset:-2px;border-radius:4px}
.cal-d .lno{display:inline-block;min-width:22px;height:22px;line-height:22px;text-align:center;background:var(--accent);color:#fff;border-radius:7px;font:700 12.5px var(--font-ui);margin-left:4px;padding:0 5px}
.cal-d .tp{margin-top:5px;font-size:13px;line-height:1.3;color:var(--ink);display:-webkit-box;-webkit-line-clamp:2;-webkit-box-orient:vertical;overflow:hidden}
.cal-d .hn{margin-top:5px;font-size:12px;line-height:1.25;color:#b0261d;display:-webkit-box;-webkit-line-clamp:2;-webkit-box-orient:vertical;overflow:hidden}
.cal-d .asl{margin-top:2px;font:700 12px var(--font-ui);color:var(--accent);text-transform:uppercase;letter-spacing:.03em}
.cal-d .dhead{display:flex;align-items:center;justify-content:space-between}
/* phones: one month per row (full width) so cells and text are comfortably large */
@media (max-width:760px){
  .cal{grid-template-columns:1fr;gap:18px}
  .cal-mh{font-size:16px}
  .cal-d{min-height:82px;padding:6px 6px}
  .cal-d .tp{font-size:12px}
  .cal-d .lno{min-width:20px;height:20px;line-height:20px;font-size:12px}
}

/* AI prompt display — a "fill these in" chip row + {placeholders} as subtle pills in the body */
.pvars{display:flex;align-items:center;gap:7px;flex-wrap:wrap;padding:0 0 10px;margin:0 0 10px;border-bottom:1px dashed var(--line-strong)}
.pvars .pvlbl{display:inline-flex;align-items:center;gap:5px;font:600 12px var(--font-ui);color:var(--muted)}
.pbody{font-size:13.5px;line-height:1.6;color:var(--muted);white-space:normal}
.ph{display:inline-block;background:color-mix(in srgb,var(--accent) 14%,transparent);color:var(--accent);font-weight:700;padding:0 7px;border-radius:6px;font-size:12.5px;white-space:nowrap}
/* interactive prompt controls (fill-in values, file mode, .docx) */
.promptcard .pbody{margin:0 0 12px}
.phf{display:inline-block;background:color-mix(in srgb,#12b76a 16%,transparent);color:#0a7d4e;font-weight:700;padding:0 7px;border-radius:6px;font-size:12.5px}
.pextra{display:block;margin-top:10px;padding-top:9px;border-top:1px dashed var(--line-strong);color:var(--accent)}
.pvinp{display:inline-flex;align-items:center;gap:6px;background:var(--surface);border:1px solid var(--line-strong);border-radius:9px;padding:3px 7px}
.pvinp input{border:0;outline:0;background:transparent;font:600 13px var(--font-ui);color:var(--ink);width:120px;min-height:0;padding:2px 0}
.pvinp input::placeholder{color:var(--muted);font-weight:400}
.pacts{display:flex;gap:8px;flex-wrap:wrap;align-items:center;margin-top:12px}
.pfile{display:inline-flex;align-items:center;gap:6px;flex-wrap:wrap}
.pflbl{font:700 12px var(--font-ui);color:var(--muted)}
.pf-btn{border:1px solid var(--line-strong);background:var(--surface);color:var(--muted);border-radius:8px;padding:6px 11px;font:600 12.5px var(--font-ui);cursor:pointer}
.pf-btn:hover{border-color:var(--ink);color:var(--ink)}
.pf-btn.on{background:var(--ink);color:#fff;border-color:var(--ink)}
.pdocx-l{display:inline-flex;align-items:center;gap:6px;font:600 12.5px var(--font-ui);color:var(--ink);cursor:pointer;user-select:none}
.pdocx-l input{width:16px;height:16px;min-height:0;accent-color:var(--accent);margin:0;cursor:pointer;flex:none}

/* row-action button groups in tables — consistent, matched pairs, no awkward stacking */
.rowbtns{display:inline-flex;gap:8px;flex-wrap:wrap;justify-content:flex-end;align-items:center}
.rowbtns > form{display:inline-flex;margin:0}
.rowbtns .btn.small{min-width:116px;justify-content:center;gap:6px;margin:0}
@media (max-width:520px){ .rowbtns{width:100%} .rowbtns .btn.small{flex:1} }

/* bare tables (PHP prints <table> without .tablewrap) */
.wrap > table, .wrap form > table, .wrap details table{
  border:1px solid var(--line);border-radius:var(--r);overflow:hidden;
  box-shadow:var(--shadow);margin:0 0 26px;
}
.tablewrap > table{border:0;border-radius:0;box-shadow:none;margin:0}
@media (max-width:860px){
  .wrap > table, .wrap form > table{display:block;overflow-x:auto}
}

/* plain <button> elements behave like .btn primary; variants keep working */
button{
  display:inline-flex;align-items:center;justify-content:center;gap:8px;
  min-height:44px;padding:10px 18px;border-radius:11px;border:1px solid transparent;
  font:600 14px/1 var(--font-ui);cursor:pointer;
  background:var(--ink);color:var(--bg);
}
button:hover{background:color-mix(in srgb,var(--ink) 86%,#fff);color:var(--bg)}
button.ghost{background:transparent;color:var(--ink);border-color:var(--line-strong)}
button.ghost:hover{background:var(--surface2)}
button.small{min-height:36px;padding:7px 13px;font-size:13px;border-radius:9px}
button.danger{background:transparent;color:var(--bad);border-color:color-mix(in srgb,var(--bad) 40%,transparent)}
button.danger:hover{background:var(--bad-bg)}

/* action button placed inside the page hero h1 */
.wrap > h1:first-child .btn{vertical-align:middle;margin-left:12px;font-size:14px;letter-spacing:0}

/* fieldset (group schedule days) */
fieldset{border:1px solid var(--line);border-radius:var(--r);background:var(--surface);
  padding:14px 16px;margin:0 0 16px;max-width:640px}
legend{font-weight:500;font-size:13px;color:var(--muted);padding:0 6px}
label.inline{display:inline-flex;align-items:center;gap:8px;min-height:40px;margin-right:14px;font-size:14.5px}
input[type=checkbox],input[type=radio]{accent-color:var(--accent);width:17px;height:17px}
/* checkboxes/radios inside forms were inheriting the text-field sizing (min-height:44 + padding) and rendering huge — reset to a tidy control */
.form input[type=checkbox],.form input[type=radio],
.inline-form input[type=checkbox],.inline-form input[type=radio],
.box input[type=checkbox],.box input[type=radio],
label.inline input[type=checkbox],label.inline input[type=radio]{
  width:18px;height:18px;min-height:0;padding:0;border:0;flex:none;accent-color:var(--accent);margin:0
}
/* single on/off "Active"-style checkbox → modern toggle switch (.inline.toggle) */
label.inline.toggle input[type=checkbox]{
  appearance:none;-webkit-appearance:none;width:42px;height:24px;border-radius:99px;background:var(--line-strong);
  position:relative;cursor:pointer;transition:background .18s
}
label.inline.toggle input[type=checkbox]::after{
  content:"";position:absolute;top:2px;left:2px;width:20px;height:20px;border-radius:50%;background:#fff;
  box-shadow:0 1px 2px rgba(0,0,0,.25);transition:transform .18s
}
label.inline.toggle input[type=checkbox]:checked{background:var(--accent)}
label.inline.toggle input[type=checkbox]:checked::after{transform:translateX(18px)}

details > summary{cursor:pointer;font-weight:600;color:var(--blue);padding:8px 0;margin:0 0 8px}
details{margin:0 0 20px}
code{background:var(--surface2);border:1px solid var(--line);border-radius:6px;
  padding:2px 7px;font-size:12px;color:var(--muted)}
h2{margin-top:34px}
.btns{display:flex;gap:10px;flex-wrap:wrap;margin-top:8px}

/* keep old simple-radio attendance usable if :has() unsupported */
@supports not (selector(:has(input))){
  .att td[class^="st-"] label{background:transparent;border:0}
  .att td[class^="st-"] input{position:static;opacity:1;width:18px;height:18px}
}

/* ================= print pages (client-facing: plain Times) ================= */
.printpage{max-width:none;padding:24px;font-family:"Times New Roman",Times,serif;background:#fff;color:#000}
.printpage table{border-radius:0;box-shadow:none;border-collapse:collapse;border:none}
.printpage th,.printpage td{border:1px solid #000;padding:4px 8px;font-size:13px}
.printpage th{background:#f2f2f2;color:#000;text-transform:none;letter-spacing:0;font-size:13px}
.printpage tr:hover{background:inherit}
.printpage tr.assess td{background:#f2f2f2;box-shadow:none;font-weight:normal}
.printhead{margin-bottom:14px}
.printhead .org{letter-spacing:3px;font-size:12px}
.printhead h1{margin:4px 0;font-size:24px;font-family:"Times New Roman",serif}
/* the plan on paper: plain black Times everywhere, no card frame, taught lessons not greyed or struck through */
.printpage .tcap{font:bold 15px/1.3 "Times New Roman",Times,serif;color:#000;margin:12px 0 8px}
.printpage .tablewrap{border:0;border-radius:0;box-shadow:none;background:none;overflow:visible;margin:0}
.printpage table{width:100%}
.printpage td,.printpage td.muted,.printpage .muted,.printpage tr.inactive td{color:#000;opacity:1;text-decoration:none;font-family:"Times New Roman",Times,serif}
.printpage tr.on td{background:none;box-shadow:none}
.printpage th{font-family:"Times New Roman",Times,serif;font-weight:bold}
.printpage th::first-letter{text-transform:uppercase}
.cert{display:flex;justify-content:center;padding:32px 16px;background:var(--bg);-webkit-print-color-adjust:exact;print-color-adjust:exact}
.cert-inner{position:relative;width:100%;max-width:720px;background:#fff;border-radius:24px;padding:54px 60px 42px;text-align:center;overflow:hidden;box-shadow:0 24px 70px rgba(28,33,48,.16)}
.cert-inner::before{content:"";position:absolute;left:0;right:0;top:0;height:11px;background:linear-gradient(90deg,var(--blue),var(--purple),var(--pink),var(--coral))}
.cert-frame{position:absolute;inset:17px;border:2px solid var(--surface2);border-radius:16px;pointer-events:none}
.cert .logo{position:relative;width:66px;height:66px;font-size:12px;margin:6px auto 16px;box-shadow:0 10px 24px rgba(224,57,123,.28)}
.cert-inner .org{position:relative;letter-spacing:5px;font:700 13px var(--font-ui);color:var(--purple);margin-bottom:8px;text-transform:uppercase}
.cert-inner h1{position:relative;font:800 40px var(--font-head);margin:0 0 20px;background:linear-gradient(90deg,var(--blue),var(--pink));-webkit-background-clip:text;background-clip:text;color:transparent}
.cert-name{position:relative;font:800 33px var(--font-head);color:var(--ink);margin:6px 0 4px}
.cert-group{position:relative;color:var(--muted);margin-bottom:18px;font-size:15px}
.cert-text{position:relative;font-size:16px;color:var(--ink);max-width:520px;margin:0 auto 22px;line-height:1.6}
.cert-badge{position:relative;display:inline-flex;align-items:center;gap:8px;padding:11px 22px;border-radius:99px;font:800 18px var(--font-ui);color:#fff;background:linear-gradient(135deg,var(--blue),var(--pink));box-shadow:0 10px 24px rgba(58,107,211,.26)}
.cert-foot{position:relative;display:flex;justify-content:space-between;align-items:flex-end;gap:26px;margin-top:38px}
.cert-foot .sig{flex:1;border-top:1.5px solid var(--line-strong);padding-top:7px;font-size:12.5px;color:var(--muted)}
.cert-foot .cert-date{font-size:12.5px;color:var(--muted);white-space:nowrap}
@media (max-width:560px){.cert-inner{padding:42px 26px}.cert-inner h1{font-size:30px}.cert-name{font-size:26px}.cert-foot{flex-direction:column;gap:14px}}
@media print{
  header.top,.tabbar,.flash,form,.btn,button,details,.lng,.attlegend,.attbar{display:none!important}
  body{background:#fff;color:#000}
  .wrap{max-width:none;padding:0}
  .wrap > h1:first-child::after{display:none}
  table{box-shadow:none;border-radius:0}
  th,td{padding:4px 7px;font-size:12px;border-bottom:1px solid #999}
}

/* ================= left sidebar (desktop) — replaces top nav on wide screens ================= */
.sidebar{display:none}
.sidebar .brand{display:flex;align-items:center;gap:11px;font:800 18px var(--font-head);letter-spacing:-.01em;color:var(--ink);text-decoration:none;padding:2px 8px 14px;margin-bottom:2px;border-bottom:1px solid var(--line)}
.sidebar .brand .logo{width:34px;height:34px;font-size:8px}
.sidebar nav{display:flex;flex-direction:column;gap:3px}
.sidebar nav a{position:relative;display:flex;align-items:center;gap:12px;padding:10px 13px;border-radius:11px;color:var(--muted);font:600 14px var(--font-ui);text-decoration:none;transition:background .15s ease,color .15s ease}
.sidebar nav a .icon{width:20px;height:20px;flex:none;color:var(--muted);transition:color .15s ease}
.sidebar nav a:hover{background:var(--surface2);color:var(--ink);text-decoration:none}
.sidebar nav a:hover .icon{color:var(--ink)}
.sidebar nav a.on{background:linear-gradient(90deg,rgba(58,107,211,.13),rgba(224,57,123,.09));color:var(--ink);font-weight:700;box-shadow:inset 3px 0 0 var(--pink)}
.sidebar nav a.on .icon{color:var(--pink)}
.sidebar .sb-sec{padding:14px 13px 5px;font:700 11px var(--font-ui);letter-spacing:.07em;text-transform:uppercase;color:var(--muted);opacity:.6}
.sidebar .sb-foot{margin-top:auto;display:flex;flex-direction:column;gap:12px;padding-top:14px;border-top:1px solid var(--line)}
.sidebar .sb-foot .lngdd{align-self:stretch}
.sidebar .sb-foot .lngdd > summary{justify-content:flex-start}
.sidebar .sb-logout{display:flex;align-items:center;gap:12px;padding:10px 13px;border-radius:11px;color:var(--muted);font:600 14px var(--font-ui);text-decoration:none;transition:background .15s ease,color .15s ease}
.sidebar .sb-logout .icon{width:20px;height:20px;flex:none}
.sidebar .sb-logout:hover{background:#FDEDEB;color:var(--coral);text-decoration:none}
@media (min-width:861px){
  body.has-sidebar .sidebar{display:flex;flex-direction:column;position:fixed;inset:0 auto 0 0;width:240px;background:var(--surface);box-shadow:1px 0 0 var(--line),5px 0 24px rgba(28,33,48,.035);padding:20px 16px;gap:14px;z-index:60;overflow-y:auto}
  body.has-sidebar header.top{display:none}
  body.has-sidebar{padding-left:240px}
}
@media print{ .sidebar{display:none!important} body{padding-left:0!important} }

@media (max-width:860px){ header.top .lngdd{margin-left:auto} }
/* very narrow phones: drop "Study" (keep "Newton") so the language switcher + logout never overflow */
@media (max-width:520px){ header.top .brand-study{display:none} }

/* sidebar unread badge */
.nav-badge{margin-left:auto;min-width:20px;height:20px;padding:0 6px;border-radius:99px;
  background:var(--pink);color:#fff;font:700 11px var(--font-ui);
  display:inline-flex;align-items:center;justify-content:center;flex:none}
.sidebar nav a .nav-badge{margin-left:auto;min-width:20px;height:20px;padding:0 6px;border-radius:99px;background:var(--pink);color:#fff;font:700 11px var(--font-ui);display:inline-flex;align-items:center;justify-content:center;flex:none}

/* sidebar top row (brand + bell), user identity, notification bell */
.sidebar .sb-top{display:flex;align-items:center;gap:8px;padding-bottom:14px;margin-bottom:2px;border-bottom:1px solid var(--line)}
.sidebar .sb-top .brand{flex:1;border-bottom:0;padding:0;margin:0}
.bell{position:relative;width:40px;height:40px;flex:none;border-radius:11px;display:inline-flex;align-items:center;justify-content:center;color:var(--muted);background:var(--surface2)}
.bell:hover{color:var(--ink);text-decoration:none}
.bell .icon{width:20px;height:20px}
.bell-pill{position:absolute;top:-4px;right:-4px;min-width:19px;height:19px;padding:0 5px;border-radius:99px;background:var(--pink);color:#fff;font:700 11px var(--font-ui);display:inline-flex;align-items:center;justify-content:center;box-shadow:0 0 0 2px var(--surface)}
.sidebar .sb-user{display:flex;align-items:center;gap:10px;padding:10px 4px;margin-bottom:4px}
.sidebar .sb-user .av{flex:none;font:700 12px var(--font-ui);border-radius:50%;display:inline-flex;align-items:center;justify-content:center}
.sidebar .sb-user-meta{min-width:0;line-height:1.25}
.sidebar .sb-user-meta b{display:block;font-size:13.5px;color:var(--ink);white-space:nowrap;overflow:hidden;text-overflow:ellipsis}
.sidebar .sb-user-meta small{display:block;font-size:11.5px;color:var(--muted)}

/* journal: star marks + history grid; profile link */
.stars{display:inline-flex;gap:1px}
.stars .star{border:0;background:none;padding:2px;font-size:19px;line-height:1;color:var(--line-strong);cursor:pointer}
.stars .star:hover{color:#E7B23a}
.stars .star.on{color:#F5B301}
.stars[data-readonly] .star{pointer-events:none;cursor:default}
.att.jrnl td:last-child{white-space:nowrap}
.jrnlgrid td.jcell{white-space:nowrap;font-size:12.5px}
.jrnlgrid .dot{display:inline-block;width:8px;height:8px;border-radius:50%;background:var(--line-strong);margin-right:3px;vertical-align:middle}
.jrnlgrid .dot.p{background:var(--ok)}.jrnlgrid .dot.l{background:var(--late)}.jrnlgrid .dot.e{background:var(--info)}.jrnlgrid .dot.a{background:var(--bad)}
.jstar{color:#C98A00;font-weight:700}
a.sb-user{text-decoration:none}
a.sb-user:hover{text-decoration:none;background:var(--surface2);border-radius:11px}

/* journal: compact attendance (dots only) so the star column fits */
.att.jrnl td[class^="st-"] label span.txt{display:none}
.att.jrnl td[class^="st-"]{width:56px}
.att.jrnl td.hw{width:52px}

/* journal v2: one clean row — uniform attendance segmented control */
.jrnl2 td,.jrnl2 th{padding:10px 14px}
.jrnl2 td.name .av{width:30px;height:30px;font:600 11.5px var(--font-ui);margin-right:9px;vertical-align:middle;display:inline-flex;align-items:center;justify-content:center;border-radius:50%}
.attseg{display:inline-flex;gap:6px}
.attseg .seg{width:38px;height:38px;flex:none;border:1.5px solid var(--line);border-radius:10px;background:var(--surface);cursor:pointer;display:inline-flex;align-items:center;justify-content:center;padding:0;transition:background .12s,border-color .12s}
.attseg .seg i{width:12px;height:12px;border-radius:50%;background:var(--line-strong);transition:transform .1s}
.attseg .seg-p i{background:var(--ok)}.attseg .seg-l i{background:var(--late)}.attseg .seg-e i{background:var(--info)}.attseg .seg-a i{background:var(--bad)}
.attseg .seg:hover{border-color:var(--line-strong)}
.attseg .seg.on{border-width:2px}
.attseg .seg.on.seg-p{background:var(--ok-bg);border-color:var(--ok)}
.attseg .seg.on.seg-l{background:var(--late-bg);border-color:var(--late)}
.attseg .seg.on.seg-e{background:var(--info-bg);border-color:var(--info)}
.attseg .seg.on.seg-a{background:var(--bad-bg);border-color:var(--bad)}
.attseg .seg.on i{transform:scale(1.2)}
.minidots{display:inline-flex;gap:2.5px;margin-right:7px;vertical-align:middle}
.minidots i{width:6px;height:6px;border-radius:99px;background:var(--line-strong)}
.minidots i.p{background:var(--ok)}.minidots i.l{background:var(--late)}.minidots i.e{background:var(--info)}.minidots i.a{background:var(--bad)}

/* journal v3: full-width LABELLED attendance buttons; page uses full width */
.attseg{display:flex;gap:8px;width:100%}
.attseg .seg{flex:1;min-width:0;height:44px;border:1.5px solid var(--line);border-radius:12px;background:var(--surface);cursor:pointer;display:inline-flex;align-items:center;justify-content:center;gap:8px;padding:0 8px;font:600 13px var(--font-ui);color:var(--muted);transition:background .12s,border-color .12s,color .12s}
.attseg .seg i{width:11px;height:11px;border-radius:50%;flex:none;background:var(--line-strong)}
.attseg .seg span{white-space:nowrap;overflow:hidden;text-overflow:ellipsis}
.attseg .seg-p i{background:var(--ok)}.attseg .seg-l i{background:var(--late)}.attseg .seg-e i{background:var(--info)}.attseg .seg-a i{background:var(--bad)}
.attseg .seg:hover{border-color:var(--line-strong);color:var(--ink)}
.attseg .seg.on{border-width:2px}
.attseg .seg.on.seg-p{background:var(--ok-bg);border-color:var(--ok);color:var(--ok)}
.attseg .seg.on.seg-l{background:var(--late-bg);border-color:var(--late);color:var(--late)}
.attseg .seg.on.seg-e{background:var(--info-bg);border-color:var(--info);color:var(--info)}
.attseg .seg.on.seg-a{background:var(--bad-bg);border-color:var(--bad);color:var(--bad)}
@media (min-width:861px){ body[data-p="journal"] .wrap{max-width:1400px} }
@media (max-width:560px){ .attseg .seg span{display:none} .attseg .seg{padding:0} }

/* fit the longest attendance label */
.attseg .seg{font-size:12.5px;gap:7px;padding:0 6px}
.attseg .seg span{overflow:visible;text-overflow:clip}

/* journal on mobile: each student becomes a compact card */
@media (max-width:600px){
  body[data-p="journal"] .tablewrap{overflow:visible;border:0;box-shadow:none;background:transparent}
  .jrnl2,.jrnl2 tbody{display:block}
  .jrnl2 thead{display:none}
  .jrnl2 tr{display:block;background:var(--surface);border:1px solid var(--line);border-radius:14px;box-shadow:var(--shadow);padding:12px 14px;margin-bottom:12px}
  .jrnl2 td{display:flex;align-items:center;gap:10px;border:0!important;padding:7px 0;width:auto!important;white-space:normal!important}
  .jrnl2 td.name{font:700 15px/1.2 var(--font-head);padding:0 0 10px;margin-bottom:6px;border-bottom:1px solid var(--line)!important}
  .jrnl2 td::before{content:attr(data-label);flex:none;width:96px;color:var(--muted);font:600 12px var(--font-ui)}
  .jrnl2 td.name::before{display:none}
  .jrnl2 td.dav{flex-direction:column;align-items:stretch;gap:8px}
  .jrnl2 td.dav::before{width:auto;margin-bottom:-2px}
  .attseg{display:grid;grid-template-columns:1fr 1fr;gap:8px;width:100%}
  .attseg .seg{height:48px}
  .attseg .seg span{display:inline}
  .jrnl2 .stars .star{font-size:24px;padding:3px}
}

/* mobile journal fix: attendance options as proper 2x2 full-width pills */
@media (max-width:600px){
  .attseg{display:grid;grid-template-columns:1fr 1fr;gap:8px;width:100%}
  .attseg .seg{width:100%!important;height:50px;justify-content:flex-start;gap:10px;padding:0 14px!important;font-size:13.5px}
  .attseg .seg i{width:12px;height:12px}
  .attseg .seg span{display:inline!important;overflow:visible;text-overflow:clip}
  .jrnl2 td{padding:8px 0}
  .jrnl2 td.hwcell,.jrnl2 td.markcell,.jrnl2 td.avgcell{align-items:center}
  .jrnl2 td.hwcell .checkpill{min-height:38px}
}

/* consistent inset dropdown chevron on ALL selects (wins over inline background) */
select{
  -webkit-appearance:none;-moz-appearance:none;appearance:none;
  background-image:url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='16' height='16' viewBox='0 0 24 24' fill='none' stroke='%235D6478' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='m6 9 6 6 6-6'/%3E%3C/svg%3E")!important;
  background-repeat:no-repeat!important;background-position:right 14px center!important;
  padding-right:40px!important;
}

/* ================================================================
   Workspace layout — entity pages (group, and pattern for the rest).
   Replaces: hero + tile-grid navigation + wall-of-stat-cards.
   Colour carries meaning here (status/subject), never decoration.
   ================================================================ */

/* --- context header: breadcrumb, title, meta, actions --- */
.pagehead{margin:0 0 4px}
.crumb{display:flex;align-items:center;gap:7px;font:600 12.5px var(--font-ui);color:var(--muted);margin:0 0 11px}
.crumb a{color:var(--muted)}
.crumb a:hover{color:var(--ink);text-decoration:none}
.crumb span{opacity:.45}
.pagehead-top{display:flex;align-items:flex-start;gap:16px;flex-wrap:wrap}
.pagehead h1{font:700 clamp(23px,2.6vw,29px)/1.15 var(--font-head);letter-spacing:-.022em;
  margin:0;padding:0;display:flex;align-items:center;gap:10px;flex-wrap:wrap}
.pagehead h1::after{display:none}          /* no decorative gradient dash */
.pagemeta{margin:8px 0 0;font-size:13.5px;color:var(--muted);display:flex;align-items:center;gap:9px;flex-wrap:wrap}
.pagemeta .sep{opacity:.4}
.pageacts{margin-left:auto;display:flex;gap:8px;flex-wrap:wrap;align-items:center}

/* --- sub-navigation: you are inside an entity --- */
.subnav{display:flex;gap:2px;margin:20px 0 0;border-bottom:1px solid var(--line);overflow-x:auto;scrollbar-width:none}
.subnav::-webkit-scrollbar{display:none}
.subnav a{padding:11px 15px;font:600 13.5px var(--font-ui);color:var(--muted);white-space:nowrap;
  border-bottom:2px solid transparent;margin-bottom:-1px;display:inline-flex;align-items:center;gap:7px}
.subnav a .icon{width:16px;height:16px}
.subnav a:hover{color:var(--ink);text-decoration:none;background:var(--surface2);border-radius:9px 9px 0 0}
.subnav a.on{color:var(--ink);border-bottom-color:var(--accent)}
.subnav a.on .icon{color:var(--accent)}

/* --- compact metric strip (replaces four hero cards) --- */
.metrics{display:flex;flex-wrap:wrap;margin:22px 0;background:var(--surface);
  border:1px solid var(--line);border-radius:var(--r);overflow:hidden;box-shadow:var(--shadow)}
.metrics > div{flex:1 1 148px;padding:13px 18px;border-right:1px solid var(--line);min-width:0}
.metrics > div:last-child{border-right:0}
.metrics dt{font:600 11px var(--font-ui);letter-spacing:.05em;text-transform:uppercase;color:var(--muted);margin:0 0 4px}
.metrics dd{margin:0;font:700 21px/1.15 var(--font-head);color:var(--ink);letter-spacing:-.015em;
  font-variant-numeric:tabular-nums;white-space:nowrap;overflow:hidden;text-overflow:ellipsis}
.metrics dd small{font:500 13px var(--font-ui);color:var(--muted);margin-left:4px}
@media (max-width:760px){ .metrics > div{flex-basis:50%;border-bottom:1px solid var(--line)} }

/* --- dense roster table --- */
.roster th{padding:9px 12px;font-size:11px}
.roster td{padding:7px 12px}
.roster .idx{width:32px;text-align:right;color:var(--muted);font-size:12.5px;font-variant-numeric:tabular-nums}
.roster .who{display:flex;align-items:center;gap:10px;min-width:0}
.roster .who b{font-weight:600}
.roster .who a{color:var(--ink)}
.roster .who a:hover{color:var(--accent);text-decoration:none}
.roster td.num{text-align:right;font-variant-numeric:tabular-nums;white-space:nowrap}
.roster .val{font-weight:700;color:var(--ink)}
.roster .val-ok{font-weight:700;color:var(--ok)}
.roster .val-warn{font-weight:700;color:var(--late)}
.roster .val-bad{font-weight:700;color:var(--bad)}
.roster .dash{color:var(--line-strong)}

/* attendance sparkline: one bar per session, newest on the right */
.spark{display:inline-flex;align-items:flex-end;gap:2px;height:18px;vertical-align:middle;margin-right:9px}
.spark i{width:4px;height:35%;border-radius:1.5px;background:var(--line-strong)}
.spark i.p{height:100%;background:var(--ok)}
.spark i.l{height:72%;background:var(--late)}
.spark i.e{height:56%;background:var(--info)}
.spark i.a{height:32%;background:var(--bad)}

/* compact icon actions (was: four full-width buttons per row) */
.iacts{display:inline-flex;gap:3px;justify-content:flex-end;align-items:center}
.iacts a,.iacts button{width:33px;height:33px;min-height:0;padding:0;border-radius:9px;
  background:transparent;border:1px solid transparent;color:var(--muted);
  display:inline-flex;align-items:center;justify-content:center}
.iacts a:hover{background:var(--surface2);color:var(--ink);border-color:var(--line);text-decoration:none}
.iacts button:hover{background:var(--bad-bg);color:var(--bad)}
.iacts .icon{width:17px;height:17px}
.iacts form{margin:0;display:inline-flex}

/* toolbar above a table */
.toolbar{display:flex;align-items:center;gap:10px;flex-wrap:wrap;margin:0 0 12px}
.toolbar h2{margin:0;font:600 15px var(--font-head);color:var(--ink)}
.toolbar .count{color:var(--muted);font-weight:500}
.toolbar .spacer{flex:1}
.toolbar select{min-height:36px;padding:6px 10px;border:1px solid var(--line-strong);border-radius:9px;
  background:var(--surface);color:var(--ink);font:400 13px var(--font-ui);max-width:210px}
.roster .who small{display:block;font-weight:400;font-size:12px;color:var(--muted);margin-top:1px;
  white-space:nowrap;overflow:hidden;text-overflow:ellipsis}
.roster .who b{display:block;white-space:nowrap;overflow:hidden;text-overflow:ellipsis}

/* --- student profile --- */
.sectitle{font:600 15px var(--font-head);color:var(--ink);margin:26px 0 11px}
.subjgrid{display:grid;grid-template-columns:repeat(auto-fit,minmax(310px,1fr));gap:14px;margin:0 0 4px}
.subjcard{background:var(--surface);border:1px solid var(--line);border-radius:var(--r);padding:15px 17px;box-shadow:var(--shadow)}
.subjcard .sc-head{display:flex;align-items:center;gap:8px;flex-wrap:wrap;margin-bottom:5px}
.subjcard .sc-head a{color:var(--ink);font-size:15px}
.subjcard .sc-head a:hover{color:var(--accent);text-decoration:none}
.subjcard .sc-meta{font-size:12.5px;color:var(--muted);margin-bottom:11px}
.subjcard .spark{height:22px;margin:0 0 12px}
.subjcard .spark i{width:5px}
.subjcard .sc-stats{display:flex;flex-wrap:wrap;gap:6px 18px;font-size:12.5px;color:var(--muted);
  border-top:1px solid var(--line);padding-top:11px}
.subjcard .sc-stats b{margin-left:5px;font-size:14px;font-variant-numeric:tabular-nums}

.profcols{display:grid;grid-template-columns:1fr 1fr;gap:0 22px;align-items:start}
@media (max-width:900px){ .profcols{grid-template-columns:1fr} }

/* attendance by month */
.mrow{display:grid;grid-template-columns:104px 1fr 46px;align-items:center;gap:12px;padding:5px 0;font-size:13px}
.mlabel{font-weight:600;color:var(--ink);white-space:nowrap;overflow:hidden;text-overflow:ellipsis}
.mlabel .muted{font-weight:400}
.mbar{display:flex;height:11px;border-radius:99px;overflow:hidden;background:var(--surface2)}
.mbar i{display:block;height:100%}
.mbar i.p{background:var(--ok)}.mbar i.l{background:var(--late)}
.mbar i.e{background:var(--info)}.mbar i.a{background:var(--bad)}
.mrow b{text-align:right;font-variant-numeric:tabular-nums}

/* event timeline (points, notes) */
.tl{list-style:none;margin:0;padding:0}
.tl li{display:flex;gap:12px;align-items:flex-start;padding:11px 0;border-bottom:1px solid var(--line)}
.tl li:last-child{border-bottom:0}
.tl-pts{flex:none;min-width:42px;height:26px;padding:0 9px;border-radius:8px;background:var(--surface2);
  display:inline-flex;align-items:center;justify-content:center;font:700 13.5px var(--font-ui);
  font-variant-numeric:tabular-nums}
.tl-body{min-width:0;font-size:13.5px;line-height:1.45}
.tl-body b{font-weight:600}
.tl-body small{display:block;color:var(--muted);font-size:12px;margin-top:2px}

/* ================================================================
   Warm & friendly pass — Newton is a children's learning centre,
   not an enterprise console. Rounder, softer, colour with meaning,
   the brand gradient used as a real element instead of decoration.
   ================================================================ */

/* --- cards lift on hover, rounder, warm shadow --- */
.box,.form,.tablewrap,.subjcard{border-radius:var(--r)}
.subjcard{transition:transform .16s ease,box-shadow .16s ease}
.subjcard:hover{transform:translateY(-2px);box-shadow:var(--shadow-lift)}

/* --- metric strip becomes friendly cards with coloured icon chips --- */
.metrics{border:0;background:transparent;box-shadow:none;gap:12px;display:grid;
  grid-template-columns:repeat(auto-fit,minmax(158px,1fr));overflow:visible}
.metrics > div{background:var(--surface);border:1px solid var(--line);border-radius:var(--r);
  box-shadow:var(--shadow);padding:15px 17px;border-right:1px solid var(--line);
  display:flex;flex-direction:column;gap:2px;position:relative;overflow:hidden;
  transition:transform .16s ease,box-shadow .16s ease}
.metrics > div:hover{transform:translateY(-2px);box-shadow:var(--shadow-lift)}
.metrics > div::after{content:"";position:absolute;right:-26px;top:-26px;width:74px;height:74px;
  border-radius:50%;background:var(--surface2);opacity:.75}
.metrics dt{font:700 11.5px var(--font-ui);letter-spacing:.045em;text-transform:uppercase;
  color:var(--muted);margin:0;position:relative;z-index:1}
.metrics dd{font:800 27px/1.1 var(--font-head);color:var(--ink);letter-spacing:-.025em;position:relative;z-index:1}
.metrics dd small{font:600 14px var(--font-ui);color:var(--muted);margin-left:3px}
/* first metric carries the brand */
.metrics > div:first-child::after{background:linear-gradient(135deg,rgba(58,107,211,.14),rgba(224,57,123,.12))}

/* --- subject identity: colour tells you English vs Math at a glance --- */
.badge{border-radius:99px;padding:4px 11px;font-weight:700}
.badge.cefr{background:var(--info-bg);color:var(--info)}
.subj-en   { background:var(--subj-en-bg);   color:var(--subj-en);   border-color:transparent }
.subj-math { background:var(--subj-math-bg); color:var(--subj-math); border-color:transparent }
.subj-psy  { background:var(--subj-psy-bg);  color:var(--subj-psy);  border-color:transparent }
.subj-it   { background:var(--subj-it-bg);   color:var(--subj-it);   border-color:transparent }
.subj-poch { background:var(--subj-poch-bg); color:var(--subj-poch); border-color:transparent }

/* --- tables: more air, rounded hover, warmer rules --- */
.roster td{padding:10px 14px}
.roster th{background:transparent;border-bottom:1.5px solid var(--line);color:var(--muted);
  font-weight:700;letter-spacing:.05em}
.roster tbody tr{transition:background .12s}
.roster tbody tr:hover{background:var(--surface2)}
.roster tbody tr:hover td:first-child{box-shadow:inset 3px 0 var(--accent)}
.roster td,.roster th{border-bottom:1px solid var(--line)}

/* --- avatars get a soft ring --- */
.who .av,.sb-user .av{box-shadow:0 0 0 2px var(--surface),0 0 0 3.5px var(--line)}

/* --- sparkline: rounder, friendlier bars --- */
.spark i{width:5px;border-radius:99px}
.spark{gap:2.5px;height:20px}

/* --- progress + month bars use the brand gradient, not flat blue --- */
.bar .fill{background:var(--grad)}
.bar.weak .fill{background:linear-gradient(135deg,var(--coral),var(--pink))}
.bar .track{height:11px;background:var(--surface2)}
.mbar{height:13px;border-radius:99px}

/* --- buttons: pill, warmer --- */
.btn,button{border-radius:99px}
.btn.small,button.small{border-radius:99px}
.btn:not(.ghost):not(.danger),button:not(.ghost):not(.danger):not(.star):not(.seg):not(.pf-btn){
  box-shadow:0 2px 8px -2px rgba(43,36,32,.28)}
.btn.ghost:hover{border-color:var(--accent);color:var(--accent)}

/* --- sub-nav: pill tabs instead of underline --- */
.subnav{border-bottom:1px solid var(--line);gap:4px}
.subnav a{border-radius:99px 99px 0 0;border-bottom:2.5px solid transparent}
.subnav a.on{background:linear-gradient(180deg,rgba(58,107,211,.09),transparent);
  border-bottom-color:var(--accent);color:var(--ink)}

/* --- page title: bring back a *little* brand, tastefully --- */
.pagehead h1{color:var(--ink)}
.crumb a:hover{color:var(--accent)}

/* --- empty states: warmer and less severe --- */
.empty{padding:52px 20px}
.empty > .icon{width:42px;height:42px;color:var(--line-strong);stroke-width:1.3}
.empty p{font-size:14.5px;color:var(--muted)}

/* --- toolbar heading --- */
.toolbar h2{font-size:16px;font-weight:700}
.toolbar .count{background:var(--surface2);color:var(--muted);border-radius:99px;
  padding:2px 10px;font-size:13px;font-weight:700;margin-left:4px}

/* --- sidebar: warmer active state --- */
.sidebar nav a.on{background:linear-gradient(90deg,rgba(58,107,211,.14),rgba(224,57,123,.10))}
.sidebar nav a{border-radius:12px}

/* --- real logo asset replaces the CSS-drawn placeholder --- */
.logo{width:38px;height:38px;border-radius:11px;background:none;box-shadow:none;
  display:block;object-fit:contain;flex:none}
.loginbox .logo{width:74px;height:74px;border-radius:20px;margin:0 auto 16px}
.sidebar .brand .logo{width:34px;height:34px;border-radius:10px}
.foot .logo,.parentcard .phead .logo,.cert .logo{border-radius:10px;box-shadow:none}
.parentcard .phead .logo{width:36px;height:36px}
.cert .logo{width:66px;height:66px;border-radius:18px;box-shadow:0 10px 24px rgba(18,41,75,.25)}

/* --- brand: navy is primary, orange is the accent --- */
.btn,button{background:var(--navy);color:#fff}
.btn:hover,button:hover{background:var(--navy-600);color:#fff}
.btn.primary,button.primary{background:var(--navy)}
.btn.ghost,button.ghost{background:transparent;color:var(--navy);border-color:var(--line-strong)}
.btn.ghost:hover,button.ghost:hover{background:var(--surface2);border-color:var(--navy);color:var(--navy)}
.sidebar nav a.on{background:linear-gradient(90deg,rgba(18,41,75,.10),rgba(255,107,61,.10));
  box-shadow:inset 3px 0 0 var(--orange)}
.sidebar nav a.on .icon{color:var(--orange)}
.tabbar a.on,.tabbar a.on .icon{color:var(--orange)}
.subnav a.on{border-bottom-color:var(--orange);
  background:linear-gradient(180deg,rgba(255,107,61,.10),transparent)}
.subnav a.on .icon{color:var(--orange)}
.metrics > div:first-child::after{background:linear-gradient(135deg,rgba(18,41,75,.12),rgba(255,107,61,.16))}
.roster tbody tr:hover td:first-child{box-shadow:inset 3px 0 var(--orange)}
.card::before{background:var(--grad)}
.loginbox::before{background:var(--grad)}
a{color:var(--navy)} a:hover{color:var(--orange)}
.crumb a:hover{color:var(--orange)}
.who a:hover,.subjcard .sc-head a:hover{color:var(--orange)}

/* --- full brand lockup replaces the text wordmark --- */
.brand .brandlogo{height:40px;width:auto;display:block;flex:none}
.sidebar .brand{padding:4px 6px 16px}
.sidebar .brand .brandlogo{height:50px}
header.top .brand{padding:0}
@media (max-width:860px){ .brand .brandlogo{height:34px} }
@media (max-width:400px){ .brand .brandlogo{height:30px} }

/* ================================================================
   Login — full-bleed split: brand panel + form.
   The orbs echo the logo's falling-apple motif.
   ================================================================ */
body[data-p="login"] header.top{display:none}
body[data-p="login"] main.wrap{max-width:none;padding:0}
.loginsplit{position:fixed;inset:0;z-index:60;display:grid;grid-template-columns:1.05fr .95fr;background:var(--bg)}

.ls-brand{position:relative;overflow:hidden;display:flex;flex-direction:column;justify-content:center;
  padding:clamp(34px,5vw,72px);color:#fff;
  background:radial-gradient(1100px 620px at 12% 8%, #21406F 0%, transparent 60%),
             radial-gradient(760px 520px at 88% 92%, #1B355C 0%, transparent 62%),
             linear-gradient(150deg,#0E2140 0%,#12294B 52%,#183459 100%)}
/* faint dot grid, like graph paper */
.ls-brand::before{content:"";position:absolute;inset:0;opacity:.5;
  background-image:radial-gradient(rgba(255,255,255,.13) 1px, transparent 1px);
  background-size:26px 26px}
.ls-brand .orb{position:absolute;border-radius:50%;pointer-events:none}
.ls-brand .o1{width:260px;height:260px;right:-70px;top:-60px;background:rgba(255,107,61,.20);filter:blur(6px)}
.ls-brand .o2{width:104px;height:104px;right:120px;top:210px;background:var(--orange);opacity:.92;
  box-shadow:0 20px 50px rgba(255,107,61,.45)}
.ls-brand .o3{width:26px;height:26px;right:186px;top:132px;background:rgba(224,169,143,.95)}
.ls-brand .o4{width:15px;height:15px;right:194px;top:88px;background:rgba(201,195,182,.85)}
.ls-brand .o5{width:420px;height:420px;left:-150px;bottom:-170px;background:rgba(255,255,255,.05)}
.ls-inner{position:relative;z-index:2;max-width:520px}
.ls-logo{width:min(300px,62%);height:auto;display:block;margin-bottom:26px}
.ls-tag{font:700 clamp(21px,2.3vw,30px)/1.28 var(--font-head);letter-spacing:-.02em;margin:0 0 30px;color:#fff}
.ls-feats{list-style:none;margin:0;padding:0;display:grid;gap:15px}
.ls-feats li{display:flex;align-items:center;gap:13px;font-size:15px;color:rgba(255,255,255,.9)}
.ls-feats .icon{width:19px;height:19px;flex:none;color:var(--orange)}
.ls-foot{position:relative;z-index:2;margin-top:auto;padding-top:34px;
  font:600 12.5px var(--font-ui);letter-spacing:.07em;text-transform:uppercase;color:rgba(255,255,255,.45)}

.ls-form{display:flex;align-items:center;justify-content:center;padding:32px 24px}
.ls-card{width:100%;max-width:392px}
.ls-mark{width:56px;height:56px;border-radius:16px;display:block;margin-bottom:20px;
  box-shadow:0 10px 26px -8px rgba(18,41,75,.42)}
.ls-card h1{font:800 29px/1.15 var(--font-head);letter-spacing:-.025em;margin:0 0 5px;color:var(--ink)}
.ls-sub{margin:0 0 26px;color:var(--muted);font-size:14.5px}
.ls-fields{display:grid;gap:16px}
.ls-fields label{display:grid;gap:7px;margin:0}
.ls-fields label span{font:700 12.5px var(--font-ui);color:var(--muted);letter-spacing:.02em}
.ls-fields input{width:100%;min-height:50px;padding:12px 16px;border-radius:14px;
  border:1.5px solid var(--line);background:var(--surface);color:var(--ink);
  font:500 15px var(--font-ui);transition:border-color .15s, box-shadow .15s}
.ls-fields input:hover{border-color:var(--line-strong)}
.ls-fields input:focus{outline:0;border-color:var(--navy);box-shadow:0 0 0 4px rgba(18,41,75,.10)}
.ls-fields button{width:100%;min-height:52px;margin-top:6px;border-radius:14px;
  font:700 15px var(--font-ui);gap:10px;
  background:var(--navy);color:#fff;box-shadow:0 10px 24px -10px rgba(18,41,75,.6)}
.ls-fields button:hover{background:var(--navy-600)}
.ls-fields button .icon{width:17px;height:17px}
.ls-card .err{margin:0 0 18px;border-radius:12px}
.ls-lang{margin-top:26px;display:flex;justify-content:center}
.ls-lang .lngdd > summary{border-radius:12px}

@media (max-width:940px){
  /* Phones used to drop the branded panel entirely and show a bare form on cream.
     Instead the navy world covers the whole screen and the form floats on it as a
     white card - the same identity as desktop, just stacked. */
  .loginsplit{
    grid-template-columns:1fr;grid-template-rows:auto 1fr;overflow-y:auto;
    background:radial-gradient(900px 520px at 10% 2%, #21406F 0%, transparent 62%),
               radial-gradient(680px 460px at 92% 96%, #1B355C 0%, transparent 62%),
               linear-gradient(160deg,#0E2140 0%,#12294B 54%,#183459 100%)}
  .ls-brand{
    display:flex;justify-content:flex-start;align-items:center;background:none;
    /* the panel is short here, and overflow:hidden was slicing the glow in half */
    overflow:visible;
    padding:max(26px,env(safe-area-inset-top)) 22px 6px}
  /* .ls-inner is a block, so gap does nothing here - the wordmark needs a real
     margin or the tagline sits flush against "STUDY" */
  .ls-brand .ls-inner{display:flex;flex-direction:column;align-items:center;gap:12px;text-align:center;max-width:100%}
  .ls-brand .ls-logo{width:186px;margin:0}
  .ls-brand .ls-tag{font-size:15.5px;line-height:1.4;max-width:32ch;margin:0 auto}
  .ls-brand .ls-feats,.ls-brand .ls-foot{display:none}   /* too much for one phone screen */
  /* one soft glow, sized to bleed off the corner instead of ending in a hard edge */
  .ls-brand .orb.o2,.ls-brand .orb.o3,.ls-brand .orb.o4,.ls-brand .orb.o5{display:none}
  .ls-brand .orb.o1{
    width:300px;height:300px;right:-130px;top:-150px;
    background:rgba(255,107,61,.22);filter:blur(26px)}

  .ls-form{min-height:auto;align-items:start;padding:18px 16px max(24px,env(safe-area-inset-bottom))}
  .ls-card{
    max-width:440px;background:var(--surface);border-radius:22px;
    padding:24px 20px 20px;
    box-shadow:0 28px 60px -24px rgba(6,14,28,.6),0 0 0 1px rgba(255,255,255,.06)}
  .ls-card > .ls-mark{display:none}          /* the wordmark above already brands it */
  .ls-card h1{font-size:24px}
  .ls-card .ls-sub{margin-bottom:20px}
}

/* --- sidebar brand: centre the lockup --- */
.sidebar .brand{justify-content:center;padding:10px 6px 18px}
.sidebar .brand .brandlogo{height:52px}

/* --- active nav item: clean solid tint + a properly rounded indicator --- */
.sidebar nav a{position:relative;border-radius:12px;transition:background .14s ease,color .14s ease}
.sidebar nav a.on{
  background:rgba(255,107,61,.10);      /* one flat tint, not a gradient */
  box-shadow:none;                       /* kill the square-cornered inset bar */
  color:var(--ink);
  font-weight:700;
}
.sidebar nav a.on::before{               /* indicator is its own rounded pill */
  content:"";position:absolute;left:0;top:50%;transform:translateY(-50%);
  width:3.5px;height:20px;border-radius:99px;background:var(--orange);
}
.sidebar nav a.on .icon{color:var(--orange)}
.sidebar nav a:hover:not(.on){background:var(--surface2)}

/* Journal/attendance: between the phone card layout (<600px) and a roomy
   desktop, the segmented labels collide. Show colour dots only in that band —
   the <600px card layout re-enables the labels with !important. */
@media (min-width:601px) and (max-width:1060px){
  .attseg .seg span{display:none}
  .attseg .seg{padding:0;gap:0}
}

/* ---------- staff self-registration (temporary intake) ---------- */
.ls-card.wide{max-width:660px}
.ls-fields.reg{grid-template-columns:1fr 1fr;gap:14px 16px}
.ls-fields.reg .full{grid-column:1/-1}
.ls-fields.reg select{width:100%;min-height:50px;padding:12px 16px;border-radius:14px;
  border:1px solid var(--line);background:var(--surface);color:var(--ink);
  font:400 15px var(--font-ui);appearance:none;
  background-image:url("data:image/svg+xml;charset=utf-8,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%236E7A8C' stroke-width='2' stroke-linecap='round'%3E%3Cpath d='m6 9 6 6 6-6'/%3E%3C/svg%3E");
  background-repeat:no-repeat;background-position:right 14px center;background-size:18px;padding-right:42px}
.ls-fields.reg select:focus{outline:0;border-color:var(--navy);box-shadow:0 0 0 4px rgba(18,41,75,.10)}
/* Dates and file pickers ship with native chrome that does not match the text
   fields, which is what made the grid look uneven. Give every control the same box. */
.ls-fields.reg input[type=date]{appearance:none;-webkit-appearance:none}
.ls-fields.reg input[type=date]::-webkit-datetime-edit{color:var(--ink);padding:0}
.ls-fields.reg input[type=date]:not(:focus):in-range::-webkit-datetime-edit-year-field,
.ls-fields.reg input[type=date]::-webkit-datetime-edit-text{color:inherit}
.ls-fields.reg input[type=date]::-webkit-calendar-picker-indicator{
  opacity:.4;cursor:pointer;transition:opacity .15s}
.ls-fields.reg input[type=date]::-webkit-calendar-picker-indicator:hover{opacity:.85}
.ls-fields.reg input[type=file]{display:flex;align-items:center;padding:9px 10px;
  font:400 13.5px var(--font-ui);color:var(--muted);cursor:pointer}
.ls-fields.reg input[type=file]::file-selector-button{
  appearance:none;-webkit-appearance:none;margin:0 12px 0 0;padding:9px 15px;border:0;
  border-radius:10px;background:var(--navy);color:#fff;
  font:600 13px var(--font-ui);cursor:pointer;transition:background .16s}
.ls-fields.reg input[type=file]::file-selector-button:hover{background:var(--navy-600)}
.ls-fields.reg label{align-content:start}
.ls-fields.reg label em{font:400 12px var(--font-ui);color:var(--muted);font-style:normal}
.ls-fields.reg button{grid-column:1/-1}
.ls-alt{margin:20px 0 0;font-size:14px;color:var(--muted);text-align:center}
.ls-alt a{color:var(--navy);font-weight:600;text-decoration:none}
.ls-alt a:hover{text-decoration:underline}
.regdone{width:58px;height:58px;border-radius:50%;display:grid;place-items:center;margin:0 0 18px;
  background:rgba(14,124,107,.12)}
.regdone .icon{width:28px;height:28px;color:#0E7C6B}
.ls-card code{font:600 14px ui-monospace,SFMono-Regular,Menlo,monospace;background:var(--surface2);
  padding:3px 8px;border-radius:7px;color:var(--ink)}

/* approval queue on the Users page */
.pendbox{border-left:3px solid var(--orange)}
.pendcount{display:inline-grid;place-items:center;min-width:22px;height:22px;padding:0 7px;margin-left:8px;
  border-radius:99px;background:var(--orange);color:#fff;font:700 12px var(--font-ui);vertical-align:middle}

@media (max-width:620px){
  .ls-card.wide{max-width:420px}
  .ls-fields.reg{grid-template-columns:1fr}
}

/* The split login/register shell is position:fixed at 100vh, so a form taller than
   the viewport had no way to scroll and its submit button was unreachable. Let the
   form column scroll; auto block-margins centre it when there IS room and collapse
   to 0 when there isn't, so the top never gets clipped the way align-items:center does. */
.ls-form{overflow-y:auto;min-height:0;align-items:flex-start}
.ls-form > .ls-card{margin-block:auto}

/* Confirmation screen: the way onward is the primary action, so it gets the
   same weight as the form's submit button instead of a small centred link. */
.ls-btn{display:flex;align-items:center;justify-content:center;gap:9px;
  width:100%;min-height:52px;margin-top:22px;border-radius:14px;
  background:var(--navy);color:#fff;text-decoration:none;
  font:700 15px var(--font-ui);letter-spacing:.01em;
  transition:background .16s,transform .16s}
.ls-btn:hover{background:var(--navy-600)}
.ls-btn:active{transform:translateY(1px)}
.ls-btn:focus-visible{outline:2px solid var(--orange);outline-offset:3px}
.ls-btn .icon{width:17px;height:17px}
.ls-cred{margin-top:20px;padding:13px 16px;border-radius:14px;
  background:var(--surface2);border:1px solid var(--line);display:grid;gap:3px}
.ls-cred span{font:700 11px var(--font-ui);letter-spacing:.09em;text-transform:uppercase;color:var(--muted)}
.ls-cred code{font:600 16.5px ui-monospace,SFMono-Regular,Menlo,monospace;
  background:none;padding:0;color:var(--ink);word-break:break-all}

/* ---------- teacher payroll ---------- */
.rateinput{width:130px;max-width:100%;min-height:38px;padding:7px 11px;text-align:right;
  border:1px solid var(--line);border-radius:10px;background:var(--surface);color:var(--ink);
  font:600 14px var(--font-ui);font-variant-numeric:tabular-nums}
.rateinput:hover{border-color:var(--line-strong)}
.rateinput:focus{outline:0;border-color:var(--navy);box-shadow:0 0 0 3px rgba(18,41,75,.10)}
.rateinput::placeholder{font-weight:400;font-size:12.5px;color:var(--muted)}
tr.totrow td{border-top:2px solid var(--line-strong);background:var(--surface2);
  font-variant-numeric:tabular-nums}

/* ---------- mobile: the "More" sheet ----------
   The sheet lives inside <nav class="tabbar">, so every rule here is scoped under
   .tabbar - otherwise .tabbar a (column layout, centred, 10.5px) wins and the menu
   renders as a tall stack of centred icons. */
/* A closed <details> still gives its content a box in Chrome, which stretched the
   whole bar to 88px and left dead space under every label. The sheet is
   position:fixed when open, so the details itself never needs to be taller than one
   tab; pinning its height keeps the bar honest. align-items stops the links being
   stretched to whatever the line happens to be. */
/* Chrome keeps giving the closed <details> content a box that inflates this line,
   so the bar's height is stated outright rather than derived: 52px of content plus
   the 4px padding top and bottom. Every item is 52px and centred, so there is no
   dead space under the labels. */
.tabbar{align-items:center;height:60px}
@media (display-mode:standalone){
  .tabbar{height:calc(60px + env(safe-area-inset-bottom))}
}
/* display:contents removes the <details> box from layout entirely, so its <summary>
   becomes a direct flex child of the bar and lines up with the other tabs by
   construction - no fighting min-height:auto or the closed details-content box.
   The sheet is position:fixed, so it is unaffected. */
.tabbar .moredd{display:contents}
nav.tabbar .moredd > summary{flex:1 1 0}
/* the closed details-content box still pushed the line taller; clip it. The open
   sheet is position:fixed and .moredd creates no containing block, so it is not
   affected by this. */
.tabbar .moredd:not([open]){overflow:hidden}
/* give the summary the same box as a tab so "Yana" lines up with its neighbours */
/* a generic summary rule sets margin-bottom:8px and uneven padding, which pushed
   "Yana" 10px above its neighbours - nav.tabbar outranks it */
nav.tabbar .moredd > summary{min-height:52px;height:52px;margin:0;padding:7px 2px;justify-content:flex-start}
/* ".tabbar a span" never matched the summary's label, so it kept line-height:normal
   and its text sat 2px below the other four. Same treatment for both. */
nav.tabbar .moredd > summary span{
  max-width:100%;line-height:1.1;text-align:center;
  overflow:hidden;text-overflow:ellipsis;white-space:nowrap}
.tabbar .moredd > summary{
  flex:1;min-width:0;display:flex;flex-direction:column;align-items:center;gap:3px;
  padding:7px 2px 5px;border-radius:12px;cursor:pointer;list-style:none;
  color:var(--muted);font:600 10.5px var(--font-ui);text-align:center}
.tabbar .moredd > summary::-webkit-details-marker{display:none}
.tabbar .moredd > summary .icon{width:22px;height:22px}
.tabbar .moredd[open] > summary,
.tabbar .moredd[data-on="1"] > summary,
.tabbar .moredd[open] > summary .icon,
.tabbar .moredd[data-on="1"] > summary .icon{color:var(--orange)}
/* tapping anywhere outside lands on this and closes the sheet */
.tabbar .moredd[open] > summary::before{
  content:"";position:fixed;inset:0;z-index:-1;background:rgba(10,20,38,.45)}

/* The sheet runs to the bottom edge and covers the bar: leaving the tabs showing
   dimmed underneath read as two competing menus. */
/* A closed <details> still lays its content out: the sheet was a 24x620 flex item
   inside the bar, inflating it to 88px and stretching every tab to 79px - the dead
   space under the labels and the oversized tap highlight. Take it out of flow. */
.tabbar .moredd:not([open]) .moresheet{display:none}
.tabbar .moresheet{
  position:fixed;left:0;right:0;bottom:0;
  z-index:70;max-height:min(78vh,620px);overflow-y:auto;-webkit-overflow-scrolling:touch;
  background:var(--surface);
  border-radius:20px 20px 0 0;
  padding:8px 12px max(14px,env(safe-area-inset-bottom));
  box-shadow:0 -22px 50px -22px rgba(18,41,75,.55);
  display:flex;flex-direction:column;gap:8px;text-align:left}
/* the global button rule sets min-height:44px, which turned this grab bar into a
   round blob - so the button stays a comfortable tap target and the bar itself is
   drawn inside it */
.tabbar .moresheet .ms-handle{
  align-self:center;width:56px;height:22px;min-height:0;flex:none;margin:0 0 2px;padding:0;
  border:0;border-radius:99px;background:none;cursor:pointer;
  display:flex;align-items:center;justify-content:center}
.tabbar .moresheet .ms-handle::before{
  content:"";display:block;width:42px;height:5px;border-radius:99px;
  background:var(--line-strong);opacity:.75;transition:opacity .15s}
.tabbar .moresheet .ms-handle:hover{background:none}
.tabbar .moresheet .ms-handle:hover::before{opacity:1}
.tabbar .moresheet .ms-handle:focus-visible{outline:2px solid var(--orange);outline-offset:3px}
/* header row: grab bar centred, a labelled close button on the right (the bar alone was not read as "close") */
.tabbar .moresheet .ms-head{display:flex;flex-direction:row;align-items:center;justify-content:space-between;margin:0 0 2px}
.tabbar .moresheet .ms-head .ms-handle{margin:0;box-shadow:none}
.tabbar .moresheet .ms-sp{width:96px;flex:none}
.tabbar .moresheet .ms-close{
  width:96px;flex:none;display:inline-flex;flex-direction:row;align-items:center;justify-content:center;gap:5px;
  min-height:0;height:34px;padding:0 12px;border:0;border-radius:99px;cursor:pointer;
  background:var(--surface2);color:var(--ink);font:600 13px var(--font-ui);box-shadow:none}
.tabbar .moresheet .ms-close .icon{width:16px;height:16px;stroke-width:2.4;color:inherit}
.tabbar .moresheet .ms-close:active{background:var(--line)}
.tabbar .moresheet .ms-close:focus-visible{outline:2px solid var(--orange);outline-offset:2px}
/* the NEW badge sits at the end of its row inside the sheet (absolute, it floated up to the sheet's top edge) */
.tabbar .moresheet .ms-links a .nav-new{position:static;margin-left:auto;flex:none;box-shadow:none}

.tabbar .moresheet .ms-user{
  display:flex;flex-direction:row;align-items:center;gap:12px;
  padding:10px 12px;border-radius:14px;background:var(--surface2);
  color:var(--ink);text-decoration:none;font:inherit;text-align:left}
.tabbar .moresheet .ms-user > div{flex:1;min-width:0}
.tabbar .moresheet .ms-user b{display:block;font:700 14.5px var(--font-ui);color:var(--ink);
  white-space:nowrap;overflow:hidden;text-overflow:ellipsis}
.tabbar .moresheet .ms-user small{display:block;font:500 12px var(--font-ui);color:var(--muted)}
.tabbar .moresheet .ms-user .ms-go{margin-left:auto;color:var(--muted);display:inline-flex;flex:none}
.tabbar .moresheet .ms-user .ms-go .icon{width:18px;height:18px}

.tabbar .moresheet .ms-links{display:flex;flex-direction:column;gap:1px}
.tabbar .moresheet .ms-links a{
  display:flex;flex-direction:row;align-items:center;gap:12px;
  padding:11px 12px;border-radius:11px;text-align:left;
  color:var(--ink);font:600 14.5px var(--font-ui);text-decoration:none}
.tabbar .moresheet .ms-links a .icon{width:20px;height:20px;flex:none;color:var(--muted)}
.tabbar .moresheet .ms-links a span{max-width:none;overflow:visible;text-overflow:clip;
  white-space:nowrap;text-align:left;line-height:1.2}
.tabbar .moresheet .ms-links a.on{background:rgba(255,107,61,.10)}
.tabbar .moresheet .ms-links a.on,.tabbar .moresheet .ms-links a.on .icon{color:var(--orange)}
.tabbar .moresheet .ms-foot{
  display:flex;flex-direction:row;align-items:center;justify-content:space-between;
  gap:8px;flex-wrap:nowrap;padding-top:10px;margin-top:4px;border-top:1px solid var(--line)}
.tabbar .moresheet .ms-foot .lngdd{flex:0 1 auto;min-width:0}
.tabbar .moresheet .ms-foot .lngdd > summary{padding:7px 10px;font-size:13px;gap:7px}
.tabbar .moresheet .ms-foot .lngdd .flag{width:18px;height:12px}
.tabbar .moresheet .ms-logout{
  display:inline-flex;flex-direction:row;align-items:center;gap:7px;flex:none;
  padding:8px 12px;border-radius:10px;text-align:left;
  color:#BA4A41;background:#FDEDEB;font:600 13px var(--font-ui);text-decoration:none}
.tabbar .moresheet .ms-logout .icon{width:16px;height:16px;color:inherit}
.tabbar .moresheet .ms-logout span{white-space:nowrap}

/* the sidebar user card is a link into Profile - make that visible, not a tooltip */
.sidebar .sb-user{border-radius:12px;text-decoration:none;transition:background .15s ease}
.sidebar .sb-user:hover{background:var(--surface2);text-decoration:none}
.sidebar .sb-user-go{margin-left:auto;color:var(--muted);display:inline-flex}
.sidebar .sb-user-go .icon{width:16px;height:16px}
.sidebar .sb-profile{display:flex;align-items:center;gap:12px;padding:10px 13px;border-radius:11px;
  color:var(--muted);font:600 14px var(--font-ui);text-decoration:none;transition:background .15s ease,color .15s ease}
.sidebar .sb-profile .icon{width:20px;height:20px;flex:none}
.sidebar .sb-profile:hover{background:var(--surface2);color:var(--ink);text-decoration:none}

/* ---------- date inputs ----------
   iOS Safari gives input[type=date] its own intrinsic height and centres the value
   box, so next to a text field it renders as a tall empty slab. Force it back onto
   the same metrics as every other control. */
.form label > input[type=date],
.form label > input[type=time],
.inline-form input[type=date],
.inline-form input[type=time]{
  -webkit-appearance:none;appearance:none;
  min-height:44px;height:44px;padding:10px 12px;
  font:400 15px/1.4 var(--font-ui);
  text-align:left;
}
input[type=date]::-webkit-date-and-time-value,
input[type=time]::-webkit-date-and-time-value{text-align:left;margin:0;min-height:1.4em}
input[type=date]::-webkit-datetime-edit,
input[type=time]::-webkit-datetime-edit{padding:0;line-height:1.4}
input[type=date]::-webkit-calendar-picker-indicator{opacity:.45;cursor:pointer}
input[type=date]::-webkit-calendar-picker-indicator:hover{opacity:.85}
/* Safari puts an inner shadow on date fields that reads as a second border */
input[type=date]::-webkit-inner-spin-button{display:none}

/* ---------- dashboard: tinted metric tiles ----------
   Four identical white cards told you nothing at a glance; the colour is the
   subject/semantic palette already in use elsewhere, not a new one. */
.metrics.tinted div{position:relative;overflow:hidden}
.metrics.tinted dt{display:flex;align-items:center;gap:7px}
.metrics.tinted dt .icon{width:15px;height:15px;flex:none}
.metrics.tinted .m-navy  {background:linear-gradient(180deg,#EEF2F9 0%,var(--surface) 62%);border-color:#DCE4F1}
.metrics.tinted .m-blue  {background:linear-gradient(180deg,#E9F0FA 0%,var(--surface) 62%);border-color:#D9E5F5}
.metrics.tinted .m-orange{background:linear-gradient(180deg,#FFF0E8 0%,var(--surface) 62%);border-color:#FADFD0}
.metrics.tinted .m-teal  {background:linear-gradient(180deg,#E4F4F0 0%,var(--surface) 62%);border-color:#CFE9E2}
.metrics.tinted .m-navy   dt .icon{color:var(--navy)}
.metrics.tinted .m-blue   dt .icon{color:var(--subj-en)}
.metrics.tinted .m-orange dt .icon{color:var(--orange)}
.metrics.tinted .m-teal   dt .icon{color:var(--subj-psy)}
.metrics.tinted .m-navy   dd{color:var(--navy)}
.metrics.tinted .m-blue   dd{color:var(--subj-en)}
.metrics.tinted .m-orange dd{color:#B5451C}
.metrics.tinted .m-teal   dd{color:var(--subj-psy)}

/* ---------- first-run guided tour ---------- */
.tour{position:fixed;inset:0;z-index:200}
.tour-veil{position:absolute;inset:0;background:rgba(9,20,38,.55);backdrop-filter:blur(1.5px)}
/* the spotlight is a hole punched with a huge shadow rather than a clip-path,
   so the highlighted control stays fully interactive-looking and crisp */
.tour-spot{position:fixed;border-radius:14px;pointer-events:none;
  box-shadow:0 0 0 9999px rgba(9,20,38,.55),0 0 0 2px var(--orange),0 0 0 7px rgba(255,107,61,.28);
  transition:top .22s cubic-bezier(.4,0,.2,1),left .22s cubic-bezier(.4,0,.2,1),
             width .22s cubic-bezier(.4,0,.2,1),height .22s cubic-bezier(.4,0,.2,1)}
/* the spotlight's own 9999px shadow does the dimming, so the veil steps back to
   an invisible click-catcher whenever a target is highlighted */
.tour.has-spot .tour-veil{background:transparent;backdrop-filter:none}

.tour-card{position:fixed;z-index:2;width:min(340px,calc(100vw - 24px));
  background:var(--surface);border-radius:18px;padding:18px 18px 14px;
  box-shadow:0 26px 60px -22px rgba(9,20,38,.55),0 0 0 1px rgba(255,255,255,.5);
  display:grid;gap:9px;outline:0;
  animation:tourIn .22s cubic-bezier(.34,1.3,.64,1)}
.tour-card.centred{top:50%;left:50%;transform:translate(-50%,-50%)}
@keyframes tourIn{from{opacity:0;transform:translateY(8px) scale(.98)}to{opacity:1}}
.tour-card.centred{animation:none}
.tour-card h3{margin:0;font:700 17px/1.25 var(--font-head);color:var(--ink);letter-spacing:-.01em}
.tour-card p{margin:0;font:400 14px/1.5 var(--font-ui);color:var(--muted)}
.tour-dots{display:flex;gap:5px;margin-bottom:2px}
.tour-dots i{width:6px;height:6px;border-radius:99px;background:var(--line-strong);transition:width .2s,background .2s}
.tour-dots i.on{width:18px;background:var(--orange)}
.tour-acts{display:flex;align-items:center;gap:8px;margin-top:5px}
.tour-grow{flex:1}
.tour-acts button{border:0;cursor:pointer;border-radius:10px;font:600 13.5px var(--font-ui);padding:9px 14px}
.tour-skip{background:none;color:var(--muted);padding-left:0!important}
.tour-skip:hover{color:var(--ink)}
.tour-back{background:var(--surface2);color:var(--ink)}
.tour-back:hover{background:var(--line)}
.tour-next{background:var(--navy);color:#fff}
.tour-next:hover{background:var(--navy-600)}
.tour-acts button:focus-visible{outline:2px solid var(--orange);outline-offset:2px}
/* the global button{display:inline-flex} overrides the [hidden] attribute */
.tour-acts button[hidden]{display:none}

@media (max-width:760px){
  /* on a phone the card is a sheet: pointing a 340px box at a 60px tab is hopeless */
  .tour-card,.tour-card.centred{
    top:auto;bottom:calc(64px + env(safe-area-inset-bottom));left:12px;right:12px;
    width:auto;transform:none;border-radius:18px}
}
@media (prefers-reduced-motion:reduce){
  .tour-spot,.tour-card{transition:none;animation:none}
}

/* ---------- dashboard: upcoming birthdays ---------- */
.metrics.tinted .m-peach{background:linear-gradient(180deg,#FBEDE6 0%,var(--surface) 62%);border-color:#F1DACE}
.metrics.tinted .m-peach dt .icon{color:#B5451C}
.metrics.tinted .m-peach dd{color:#B5451C}
.bdaybox .sectitle{display:flex;align-items:center;gap:8px}
.bdaybox .sectitle .icon{width:16px;height:16px;color:var(--orange)}
.bdaylist{list-style:none;margin:10px 0 0;padding:0;display:grid;gap:2px}
.bdaylist li{display:flex;align-items:center;gap:11px;padding:8px 10px;border-radius:11px}
.bdaylist li + li{border-top:1px solid var(--line)}
.bdaylist li.is-today{background:rgba(255,107,61,.09)}
.bd-who{flex:1;min-width:0;display:grid;gap:1px}
.bd-who b{font:600 14px var(--font-ui);color:var(--ink);white-space:nowrap;overflow:hidden;text-overflow:ellipsis}
.bd-who small{font:400 12px var(--font-ui);color:var(--muted)}
.bd-when{text-align:right;display:grid;gap:1px;flex:none}
.bd-when b{font:700 14px var(--font-ui);color:var(--ink);font-variant-numeric:tabular-nums}
.bd-when small{font:500 11.5px var(--font-ui);color:var(--muted)}
.bdaylist li.is-today .bd-when small{color:var(--orange);font-weight:700}

/* ---------- no horizontal page scroll on a phone ----------
   A table wider than the viewport widens <body>, which shifts the header, the
   fixed tab bar and everything else sideways. Tables scroll inside their own
   box instead of dragging the page with them. */
@media (max-width:900px){
  .box{overflow-x:auto}
  .wrap > table,.box > table{display:block;width:100%;overflow-x:auto;-webkit-overflow-scrolling:touch}
  .wrap > table > tbody,.box > table > tbody{display:table;width:100%;min-width:max-content}
  .wrap > table > thead,.box > table > thead{display:table;width:100%;min-width:max-content}
  .roster td,.roster th,table td,table th{white-space:nowrap}
  .roster .bd-who b,.roster .who span{white-space:normal}
}
html,body{max-width:100%}

/* ---------- stop the page zooming itself on a phone ----------
   iOS Safari zooms the whole page whenever a focused field's text is under 16px,
   which is what made tapping any input jump the layout. Every control goes to 16px
   on small screens - the one size iOS leaves alone. touch-action:manipulation also
   drops the double-tap-to-zoom gesture, the other way the page zoomed by accident.
   Pinch-to-zoom is deliberately left working: it is an accessibility affordance,
   and iOS has ignored user-scalable=no since iOS 10 anyway. */
@media (max-width:760px){
  input,select,textarea,
  .form label > input,.form label > select,.form label > textarea,
  .inline-form input,.inline-form select,
  .ls-fields input,.ls-fields.reg input,.ls-fields.reg select,
  .rateinput,.fld,.attbar input[type=date]{
    font-size:16px;
  }
}
html{-webkit-text-size-adjust:100%}
body{touch-action:manipulation}
@media (max-width:760px){
  /* when the tour highlights something inside the More sheet, the card moves up top
     so it is not sitting on the very thing it is pointing at */
  .tour-card.attop,.tour-card.centred.attop{
    top:calc(12px + env(safe-area-inset-top));bottom:auto}
}
@media (max-width:760px){
  /* "Oʻtkazib yuborish" is a long label; keep the row on one line */
  .tour-acts{gap:6px}
  .tour-acts button{padding:9px 11px;font-size:12.5px;min-height:40px;white-space:nowrap}
  .tour-skip{padding-right:2px!important;font-size:12px}
  .tour-card{padding:15px 15px 12px}
  .tour-card h3{font-size:16px}
  .tour-card p{font-size:13.5px}
}

/* ---------- .fld: the shared form control ----------
   Referenced from several pages but never defined, so those inputs rendered as raw
   browser defaults. Same metrics as .form controls. */
.fld{
  width:100%;min-height:44px;padding:10px 12px;border-radius:10px;
  border:1px solid var(--line-strong);background:var(--surface);color:var(--ink);
  font:400 15px/1.4 var(--font-ui);
}
.fld:hover{border-color:var(--muted)}
.fld:focus{outline:2px solid var(--navy);outline-offset:0;border-color:var(--navy)}
select.fld{
  appearance:none;-webkit-appearance:none;padding-right:38px;cursor:pointer;
  background-image:url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='16' height='16' viewBox='0 0 24 24' fill='none' stroke='%235D6478' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='m6 9 6 6 6-6'/%3E%3C/svg%3E");
  background-repeat:no-repeat;background-position:right 14px center;
}

/* ---------- syllabus: getting started ---------- */
.startcard{display:grid;gap:14px;justify-items:start;max-width:620px;padding:26px}
.startcard .startmark{
  width:46px;height:46px;border-radius:14px;display:grid;place-items:center;
  background:rgba(255,107,61,.11)}
.startcard .startmark .icon{width:23px;height:23px;color:var(--orange)}
.startcard h2{margin:0;font:700 19px/1.25 var(--font-head);color:var(--ink);letter-spacing:-.01em}
.startcard p{margin:0;font:400 14px/1.5 var(--font-ui);color:var(--muted);max-width:56ch}
.startform{display:grid;gap:12px;width:100%;margin-top:2px}
.startform .row{display:grid;grid-template-columns:1.4fr 1fr;gap:12px}
.startform label{display:grid;gap:6px;font:600 13px var(--font-ui);color:var(--muted);min-width:0}
@media (max-width:640px){ .startform .row{grid-template-columns:1fr} }

/* the module/topic editor */
.modbox{display:grid;gap:12px;margin-bottom:16px}
.modhead{display:flex;align-items:center;gap:10px;flex-wrap:wrap}
.modhead .modname{max-width:260px}
.tptable td{vertical-align:middle}
.tptable .lessonfld{width:84px;text-align:right;font-variant-numeric:tabular-nums}
.addtopic{display:flex;gap:10px;align-items:center;flex-wrap:wrap;
  padding-top:12px;border-top:1px dashed var(--line-strong)}
.addtopic .fld{flex:1;min-width:180px}
.addtopic .lessonfld{flex:none;width:84px}

/* The desktop scroll fix centres the login card with margin-block:auto. That rule is
   declared after the mobile block, so the override has to live here to win: on a
   phone the card sits directly under the wordmark rather than floating mid-screen. */
@media (max-width:940px){
  .ls-form > .ls-card{margin-block:0}
}

/* ---------- pending-accounts queue ----------
   The table is wider than its card, so without a scroller it spilled past the
   rounded corner and the approve/reject buttons were cut off at the edge. */
.pendbox{overflow-x:auto}
.pendbox > .sectitle{position:sticky;left:0}
.logincell{display:inline-block;max-width:150px;overflow:hidden;text-overflow:ellipsis;
  white-space:nowrap;vertical-align:middle}

/* duplicate-name flag in the pending-accounts queue */
.dupbadge{display:inline-flex;align-items:center;gap:4px;margin-left:6px;vertical-align:middle;
  padding:2px 8px;border-radius:99px;background:#FBECCB;color:#8A5A00;
  font:700 11px var(--font-ui);white-space:nowrap;cursor:help}
.dupbadge .icon{width:12px;height:12px}

/* ---------- roadmap: live plan picker ---------- */
.planpick{flex:1 1 100%;width:100%;display:grid;gap:8px;margin:4px 0}
.planpick-lbl{font:700 12.5px var(--font-ui);color:var(--muted);letter-spacing:.02em}
.planopts{display:grid;grid-template-columns:repeat(auto-fit,minmax(220px,1fr));gap:10px}
.planopt{position:relative;display:block;cursor:pointer;margin:0}
.planopt input{position:absolute;opacity:0;pointer-events:none}
.planopt-in{display:grid;gap:5px;padding:12px 14px;border:1.5px solid var(--line-strong);
  border-radius:13px;background:var(--surface);transition:border-color .15s,background .15s,box-shadow .15s}
.planopt-in b{font:700 14px var(--font-head);color:var(--ink);letter-spacing:-.005em}
.planopt-in .planstat{font:600 12.5px var(--font-ui);color:var(--muted);font-variant-numeric:tabular-nums}
.planopt-in .planstat.over{color:#B5451C}
.planopt input:checked + .planopt-in{border-color:var(--orange);background:rgba(255,107,61,.06);
  box-shadow:0 0 0 3px rgba(255,107,61,.12)}
.planopt input:focus-visible + .planopt-in{outline:2px solid var(--navy);outline-offset:2px}
.planopt:hover .planopt-in{border-color:var(--muted)}

/* roadmap: continue-from-today helper */
.conttoday{display:flex;align-items:center;gap:12px;flex-wrap:wrap;
  padding:10px 12px;border-radius:12px;background:var(--surface2);border:1px solid var(--line)}
.conttoday .btn.is-set{background:var(--orange);border-color:var(--orange);color:#fff}
.conttoday .muted{font-size:12.5px}

/* stale-roadmap call to rebuild the yearly plan (maths syllabus update, Sep 2026) */
.regen-alert{display:flex;gap:14px;align-items:flex-start;
  padding:18px 20px;margin:0 0 22px;border-radius:16px;
  background:linear-gradient(135deg,#fff4ec,#ffe6d6);
  border:1.5px solid var(--orange);box-shadow:0 6px 20px rgba(240,120,40,.16)}
.regen-alert > svg{flex:none;width:26px;height:26px;color:var(--orange);margin-top:2px}
.regen-alert .ra-body{flex:1;min-width:0}
.regen-alert h3{margin:0 0 4px;font:800 17px var(--font-head);color:var(--ink);letter-spacing:-.01em}
.regen-alert p{margin:0 0 10px;font:400 14px var(--font-ui);color:var(--ink);opacity:.85;line-height:1.5}
.regen-alert .ra-groups{display:flex;flex-wrap:wrap;gap:8px;margin:0}
.regen-alert .ra-groups a{display:inline-flex;align-items:center;gap:6px;
  padding:7px 13px;border-radius:999px;background:var(--orange);color:#fff;
  font:700 13px var(--font-ui);text-decoration:none;box-shadow:0 2px 8px rgba(240,120,40,.3)}
.regen-alert .ra-groups a:hover{filter:brightness(.94)}
.regen-alert .ra-groups a svg{width:15px;height:15px}
@media (max-width:520px){.regen-alert{padding:15px 16px;border-radius:14px}.regen-alert h3{font-size:15.5px}}

/* ---------- reports: month grid, day overview, clickable dashboard tiles ---------- */
.st{display:inline-grid;place-items:center;width:22px;height:22px;border-radius:6px;font:700 12px/1 var(--font-ui);
  color:#fff;font-style:normal;vertical-align:middle}
.st.p{background:var(--ok)}.st.l{background:var(--late)}.st.e{background:var(--info)}.st.a{background:var(--bad)}
.st.n{background:transparent;color:var(--line-strong)}
.replegend{display:flex;flex-wrap:wrap;gap:8px 18px;margin:0 0 12px;font:500 13px var(--font-ui);color:var(--muted)}
.replegend span{display:inline-flex;align-items:center;gap:7px}
.repgrid th.d{text-align:center;padding:8px 3px;min-width:32px;font-size:12px}
.repgrid th.d small{display:block;font-weight:500;color:var(--muted);font-size:10.5px;text-transform:none;letter-spacing:0}
.repgrid td.c{text-align:center;padding:5px 2px}
.repgrid .stick{position:sticky;left:0;background:var(--surface);z-index:1;min-width:170px}
.repgrid tfoot td{border-top:2px solid var(--line-strong);background:var(--surface)}
.monthnav{display:inline-flex;align-items:center;gap:10px}
.monthnav b{font:700 15px var(--font-head);min-width:118px;text-align:center}
.pageacts .monthnav b{min-width:54px}
.chips{display:flex;flex-wrap:wrap;gap:8px}
.chip{padding:6px 13px;border-radius:999px;border:1px solid var(--line);background:var(--surface);
  font:600 13px var(--font-ui);color:var(--muted);text-decoration:none}
.chip:hover{border-color:var(--line-strong);color:var(--ink)}
.chip.on{background:var(--navy);border-color:var(--navy);color:#fff}
.metrics dd.val-ok{color:var(--ok)}.metrics dd.val-bad{color:var(--bad)}
.branchcards{display:grid;grid-template-columns:repeat(auto-fit,minmax(220px,1fr));gap:12px;margin:0 0 8px}
.branchcard{display:grid;grid-template-columns:1fr auto;gap:6px 10px;align-items:center;padding:15px 17px;
  background:var(--surface);border:1px solid var(--line);border-radius:var(--r);text-decoration:none;color:var(--ink);
  transition:transform .12s,box-shadow .12s}
.branchcard:hover{transform:translateY(-2px);box-shadow:var(--shadow-lift)}
.branchcard > b{font:700 16px var(--font-head)}
.branchcard .bc-pct{font:800 22px var(--font-head);color:var(--muted)}
.branchcard .bc-pct.val-ok{color:var(--ok)}.branchcard .bc-pct.val-warn{color:var(--late)}.branchcard .bc-pct.val-bad{color:var(--bad)}
.branchcard .bc-line{grid-column:1/-1;font-size:13px;color:var(--muted)}
.branchcard .bc-stats{grid-column:1/-1;display:flex;gap:14px;font:600 14px var(--font-ui)}
.branchcard .bc-stats span{display:inline-flex;align-items:center;gap:6px}
.roster tr.grouprow td{background:var(--bg);font-size:13px;padding-top:8px;padding-bottom:8px}
.metrics .tile-link{position:absolute;inset:0;z-index:3;border-radius:inherit}
.metrics > div:has(.tile-link){cursor:pointer}
.metrics dd small.tile-sub{display:block;margin:3px 0 0;font:500 12px var(--font-ui)}
.dashsearch{display:flex;gap:8px;max-width:620px;margin:0 0 6px}
.dashsearch .fld{flex:1;min-width:0}
@media print{ .monthnav,.chips,.dashsearch{display:none!important} .repgrid .stick{position:static}
  .st{color:#000!important;background:transparent!important;border:1px solid #999} }

/* ---------- call log, teacher share bars, report view tabs ---------- */
.viewtabs{display:flex;flex-wrap:wrap;gap:6px;margin:0 0 14px;border-bottom:1px solid var(--line);padding-bottom:10px}
.viewtabs a{display:inline-flex;align-items:center;gap:7px;padding:7px 13px;border-radius:10px;font:600 13.5px var(--font-ui);
  color:var(--muted);text-decoration:none}
.viewtabs a .icon{width:16px;height:16px}
.viewtabs a:hover{background:var(--bg);color:var(--ink)}
.viewtabs a.on{background:var(--navy);color:#fff}
.sharebar{height:7px;border-radius:99px;background:var(--line);overflow:hidden;margin:2px 0 3px}
.sharebar i{display:block;height:100%;border-radius:99px;background:var(--muted)}
.sharebar i.val-ok{background:var(--ok)}.sharebar i.val{background:var(--info)}.sharebar i.val-warn{background:var(--late)}.sharebar i.val-bad{background:var(--bad)}
.callnote{margin:0 0 4px}.callnote .cn-text{font-size:13px;margin-top:3px}
.callform summary{cursor:pointer;font:600 12.5px var(--font-ui);color:var(--subj-en);list-style:none}
.callform summary::-webkit-details-marker{display:none}
.callform form{display:flex;flex-wrap:wrap;gap:6px;margin-top:6px}
.callform .fld{flex:1 1 200px;min-width:0;width:100%;min-height:36px;padding:6px 10px;font-size:13px}
.daychips{display:inline-flex;flex-wrap:wrap;gap:3px}
@media print{ .viewtabs,.callform{display:none!important} }

.roster td .btn.small{white-space:nowrap}

/* attendance buttons: size each one to its own label instead of four equal slots, so a long
   label (ru) can never spill over its neighbour; if a row still cannot fit, the labels are cut
   with an ellipsis rather than overlapping */
@media (min-width:1061px){
  .attseg{display:inline-flex;width:auto;flex-wrap:nowrap}
  .attseg .seg{flex:0 0 auto;width:auto;padding:0 12px;white-space:nowrap}   /* width:auto undoes the old 38px icon-button width */
  .attseg .seg span{overflow:visible}
}
.att td[class^="st-"] .txt{white-space:nowrap}
.att .stcell,.att td[class^="st-"]{width:auto}
/* laptops: tighter buttons so the whole journal row (stars + average) still fits without scrolling */
@media (min-width:1061px) and (max-width:1560px){
  .attseg{gap:5px}
  .attseg .seg{padding:0 8px;gap:5px;font-size:12px;height:40px}
  .jrnl2 td,.jrnl2 th{padding-left:8px;padding-right:8px}
  .jrnl2 .stars .star{font-size:19px;padding:1px}
}

/* parents-on-the-bot meter + small red badge */
.botmeter{display:flex;align-items:center;flex-wrap:wrap;gap:10px 14px;margin:0 0 14px;padding:11px 15px;border:1px solid var(--line);border-radius:var(--r);background:var(--surface)}
.botmeter .icon{width:18px;height:18px;color:var(--subj-en)}
.botmeter .sharebar{flex:1 1 160px;min-width:120px;margin:0}
.badge.bad{background:var(--bad-bg);color:var(--bad);border-color:transparent}
.pagemeta .val-ok,.who small .val-ok{color:var(--ok);font-weight:600}.who small .val-bad{color:var(--bad);font-weight:600}
@media print{ .botmeter{display:none!important} }

/* syllabus editor: bulk topic entry + the groups that study a module */
.bulkadd{margin:12px 0 4px;border:1px dashed var(--line-strong);border-radius:12px;padding:10px 14px;background:var(--bg)}
.bulkadd summary{cursor:pointer;font:600 13.5px var(--font-ui);color:var(--navy);display:flex;align-items:center;gap:7px;list-style:none}
.bulkadd summary::-webkit-details-marker{display:none}
.bulkadd summary .icon{width:15px;height:15px}
.bulkadd[open] summary{margin-bottom:10px}
.bulkadd textarea{width:100%;min-height:150px;resize:vertical;font:400 14px/1.5 var(--font-ui)}
.modgroups{display:flex;flex-wrap:wrap;align-items:center;gap:8px;margin:12px 0 2px;font-size:13px}
.pill.ok{background:var(--ok-bg);color:var(--ok);text-decoration:none;display:inline-flex;align-items:center;gap:5px}
.pill{display:inline-flex;align-items:center;gap:5px;padding:4px 11px;border-radius:99px;background:var(--surface2);color:var(--muted);font:600 12.5px var(--font-ui);white-space:nowrap}

.starval{display:inline-flex;align-items:center;gap:4px;font-weight:700;color:#B7791F}
.starval .icon{color:#E5A823;fill:#E5A823}

.starsnote{display:flex;align-items:center;flex-wrap:wrap;gap:10px 14px;margin:0 0 18px;padding:11px 15px;border:1px solid #F3E2B5;border-radius:var(--r);background:#FFFBEF;font-size:13.5px;color:var(--ink)}
.starsnote > .icon{width:18px;height:18px;color:#E5A823;fill:#E5A823;flex:none}
.starsnote span{flex:1 1 320px}
@media print{ .starsnote{display:none!important} }

/* dated site-wide announcement (render_site_banners) */
.sitebanner-wrap{padding-bottom:0;margin-bottom:-10px}
.sitebanner-wrap[hidden]{display:none}
.sitebanner{display:flex;align-items:center;gap:12px;flex-wrap:wrap;background:#FFF1EA;color:#12294B;border:1.5px solid #FF6B3D;border-radius:12px;padding:12px 14px 12px 16px;font-size:14.5px;font-weight:600;line-height:1.4}
.sitebanner>.icon{width:20px;height:20px;color:#FF6B3D;flex:0 0 auto}
.sitebanner .sb-text{flex:1 1 320px;min-width:0}
.sitebanner .btn{flex:0 0 auto}
.sitebanner .sb-close{flex:0 0 auto;width:30px;height:30px;padding:0;border:0;border-radius:8px;background:transparent;color:#12294B;font-size:22px;line-height:1;cursor:pointer;min-height:0}
.sitebanner .sb-close:hover{background:rgba(18,41,75,.08)}
@media print{.sitebanner-wrap{display:none!important}}

/* video guides (pages/videos.php) */
.vgrid{display:grid;grid-template-columns:repeat(auto-fill,minmax(340px,1fr));gap:18px;margin:0 0 30px}
.vcard{background:var(--surface);border:1px solid var(--line);border-radius:var(--r);box-shadow:var(--shadow);overflow:hidden}
.vcard video{display:block;width:100%;aspect-ratio:16/10;background:#12294B}
.vbody{display:flex;gap:14px;padding:14px 16px 16px}
.vnum{flex:0 0 34px;height:34px;border-radius:50%;background:#FFF1EA;color:#FF6B3D;font:700 15px var(--font-head);display:flex;align-items:center;justify-content:center}
.vbody h3{margin:4px 0 4px;font-size:16px;font-weight:600}.vbody p{margin:0 0 10px;font-size:13.5px}
.vlinks{display:flex;flex-wrap:wrap;gap:6px 12px;font-size:13px}.vlinks a{display:inline-flex;align-items:center;gap:5px}.vlinks .icon{width:14px;height:14px}
@media (max-width:600px){.vgrid{grid-template-columns:1fr}}
.vmore{margin:0 0 22px}.vmore>summary{cursor:pointer;display:flex;align-items:center;gap:8px;font-weight:600;font-size:15px;padding:12px 16px;background:var(--surface);border:1px solid var(--line);border-radius:var(--r);list-style:none}
.vmore>summary::-webkit-details-marker{display:none}.vmore>summary .icon{width:18px;height:18px;color:#FF6B3D}.vmore[open]>summary{margin-bottom:14px}

/* the Video guides entry: a soft brand tint so it is found, with a small "new" pill; stays calm next to the active item */
.sidebar nav a.nav-hi,.tabbar .ms-links a.nav-hi{background:linear-gradient(90deg,#FFF3EC,#FFF8F4);color:#12294B;box-shadow:inset 0 0 0 1px #FFD9C8}
.sidebar nav a.nav-hi .icon,.tabbar .ms-links a.nav-hi .icon{color:#FF6B3D}
.sidebar nav a.nav-hi:hover{background:linear-gradient(90deg,#FFE9DD,#FFF3EC)}
.sidebar nav a.nav-hi.on{background:linear-gradient(90deg,rgba(18,41,75,.10),rgba(255,107,61,.12));box-shadow:inset 3px 0 0 #FF6B3D}
.nav-new{position:absolute;top:-7px;right:12px;padding:1px 7px;border-radius:99px;background:#FF6B3D;color:#fff;font:700 9.5px/1.5 var(--font-ui);letter-spacing:.08em;text-transform:uppercase;box-shadow:0 1px 3px rgba(0,0,0,.15)}
.sidebar nav a.nav-hi,.tabbar .ms-links a.nav-hi{overflow:visible}
.sidebar nav a.on .nav-new{background:#12294B}
.sitebanner.sitebanner-bad{background:#FDEDEB;border-color:#BA4A41;color:#7A1F1A}.sitebanner.sitebanner-bad>.icon{color:#BA4A41}.sitebanner.sitebanner-bad small{font-weight:500;color:#9A5A55}

/* duplicate records (pages/duplicates.php) */
form.dup{background:var(--surface);border:1px solid var(--line);border-radius:var(--r);box-shadow:var(--shadow);padding:14px 16px 12px;margin:0 0 14px}
.dup-why{display:flex;align-items:center;gap:6px;font-size:13px;color:var(--muted);margin:0 0 10px}.dup-why .icon{color:#FF6B3D}
.dup-pair{display:grid;grid-template-columns:1fr 1fr;gap:12px}@media (max-width:700px){.dup-pair{grid-template-columns:1fr}}
.dup-card{display:block;border:1.5px solid var(--line);border-radius:12px;padding:12px 14px;cursor:pointer;position:relative}
.dup-card input{position:absolute;opacity:0;pointer-events:none}
.dup-card.on{border-color:#177E4D;background:#F2FBF6}.dup-card .dup-keep{display:none;margin-left:auto;font:700 11px var(--font-ui);letter-spacing:.06em;text-transform:uppercase;color:#177E4D;background:#E2F5EA;padding:3px 8px;border-radius:99px;white-space:nowrap}
.dup-card.on .dup-keep{display:inline-block}
.dup-head{display:flex;align-items:center;gap:10px;margin:0 0 8px}.dup-head b{font-size:15px}.dup-head small{display:block;font-size:12px}
.dup-facts{display:grid;grid-template-columns:1fr 1fr;gap:4px 12px;margin:0;font-size:13px}.dup-facts div{display:flex;gap:6px;min-width:0}.dup-facts dt{color:var(--muted);flex:none}.dup-facts dd{margin:0;min-width:0;overflow:hidden;text-overflow:ellipsis}
.dup-facts div:nth-child(2){grid-column:1/-1}
.dup-act{display:flex;align-items:center;gap:12px;margin-top:10px;font-size:13px}

/* since the child joined this group (student page): the refund numbers */
.since{margin:10px 0 4px;padding:10px 12px;border-radius:12px;background:var(--surface2);border:1px solid var(--line)}
.since-cap{display:flex;align-items:center;gap:6px;font-size:12.5px;color:var(--muted);margin:0 0 8px}.since-cap b{color:var(--ink);font-weight:600}.since-cap .icon{color:#FF6B3D}
.since-row{display:grid;grid-template-columns:repeat(3,1fr);gap:8px}
.since-row span{display:flex;flex-direction:column;align-items:center;padding:8px 6px;border-radius:10px;background:var(--surface);border:1px solid var(--line)}
.since-row b{font:700 22px/1 var(--font-head);color:var(--ink)}.since-row small{margin-top:4px;font-size:11.5px;color:var(--muted);text-align:center}
.since-row span.ok b{color:#177E4D}.since-row span.bad b{color:#BA4A41}

/* dashboard: all behind-plan groups in one card */
.warn.planwarn{align-items:flex-start}.warn.planwarn>div{flex:1;min-width:0}
.planwarn ul{list-style:none;margin:8px 0 0;padding:0;display:grid;gap:5px}
.planwarn li{font-size:14px;line-height:1.45}.planwarn li a{font-weight:700;color:inherit;text-decoration:underline;text-decoration-thickness:1px;text-underline-offset:2px}

/* Home carousel (inc/cheer.php): one vivid theme per slide, comic picture panel, confetti on celebrations */
.cheer{--dur:7000ms;position:relative;display:grid;margin:0 0 22px;border-radius:24px;overflow:hidden;min-height:220px;box-shadow:0 14px 34px -14px rgba(18,41,75,.45);isolation:isolate;transition:opacity .35s,transform .35s}
.cheer.bye{opacity:0;transform:scale(.97)}
.ch-slide{grid-area:1/1;position:relative;display:grid;grid-template-columns:minmax(0,1fr) 250px;align-items:center;gap:10px;padding:26px 34px 46px;overflow:hidden;
  background:linear-gradient(120deg,var(--g1),var(--g2) 55%,var(--g3));background-size:220% 220%;animation:chGrad 14s ease-in-out infinite alternate;
  opacity:0;visibility:hidden;transform:scale(1.03);transition:opacity .7s ease,transform .9s cubic-bezier(.2,.8,.2,1),visibility 0s .7s}
.ch-slide.on{opacity:1;visibility:visible;transform:none;transition:opacity .7s ease,transform .9s cubic-bezier(.2,.8,.2,1)}
@keyframes chGrad{0%{background-position:0% 40%}100%{background-position:100% 60%}}
.th-teachersday{--g1:#7B2FF7;--g2:#F107A3;--g3:#FF6B3D}
.th-holiday{--g1:#FF3D7F;--g2:#FF6B3D;--g3:#FFB627}
.th-birthday{--g1:#F15BB5;--g2:#FF6B3D;--g3:#FEC43F}
.th-stars{--g1:#FF8F1F;--g2:#F7B32B;--g3:#FF5E5B}
.th-check{--g1:#06A77D;--g2:#16C79A;--g3:#9BE15D}
.th-growth{--g1:#3A86FF;--g2:#5E60CE;--g3:#8338EC}
.th-chat{--g1:#0096C7;--g2:#26A5E4;--g3:#48CAE4}
.th-sunrise{--g1:#FF5F6D;--g2:#FF8C42;--g3:#FFC371}
.th-quote{--g1:#8338EC;--g2:#C04CFD;--g3:#FF5DA2}
.th-moon{--g1:#0B1A33;--g2:#1B2F6B;--g3:#3F2A7A}
.th-memory{--g1:#12294B;--g2:#1E3E6E;--g3:#2B4A7A}
.ch-blob{position:absolute;border-radius:50%;background:rgba(255,255,255,.16);pointer-events:none;animation:chBob 9s ease-in-out infinite}
.ch-blob.b1{width:260px;height:260px;right:-60px;top:-110px}.ch-blob.b2{width:140px;height:140px;left:38%;bottom:-80px;animation-delay:-3s;background:rgba(255,255,255,.12)}
.ch-blob.b3{width:70px;height:70px;left:-20px;top:20px;animation-delay:-6s}
.ch-spark{position:absolute;font-style:normal;color:#fff;opacity:.85;pointer-events:none;animation:chTwinkle 2.4s ease-in-out infinite;text-shadow:0 0 12px rgba(255,255,255,.9)}
.ch-spark.s1{left:52%;top:18px;font-size:20px}.ch-spark.s2{left:61%;bottom:30px;font-size:14px;animation-delay:-.8s}.ch-spark.s3{left:46%;top:46%;font-size:16px;animation-delay:-1.6s}
.th-memory .ch-spark{display:none}
@keyframes chBob{0%,100%{transform:translate(0,0)}50%{transform:translate(-14px,12px)}}
@keyframes chTwinkle{0%,100%{transform:scale(.6) rotate(0);opacity:.35}50%{transform:scale(1.15) rotate(20deg);opacity:1}}
.ch-body{position:relative;z-index:1;display:flex;flex-direction:column;align-items:flex-start;gap:8px;color:#fff}
.ch-body>*{opacity:0;transform:translateY(16px)}
.ch-slide.on .ch-body>*{animation:chRise .65s cubic-bezier(.2,.8,.2,1) forwards}
.ch-slide.on .ch-body>*:nth-child(2){animation-delay:.12s}.ch-slide.on .ch-body>*:nth-child(3){animation-delay:.24s}
@keyframes chRise{to{opacity:1;transform:none}}
.ch-kick{font:800 13px var(--font-ui);letter-spacing:.06em;color:var(--g2);background:#fff;padding:4px 12px;border-radius:999px;box-shadow:0 4px 0 rgba(0,0,0,.12)}
.cheer h2{margin:0;font:800 30px/1.12 "Rubik",var(--font-head);letter-spacing:-.01em;color:#fff;text-shadow:0 2px 0 rgba(0,0,0,.12),0 6px 18px rgba(0,0,0,.18)}
.cheer p{margin:0;font-size:16px;line-height:1.5;color:rgba(255,255,255,.95);max-width:58ch;text-shadow:0 1px 2px rgba(0,0,0,.15)}
.ch-pic{position:relative;z-index:1;justify-self:center;width:210px;aspect-ratio:1;border-radius:26px;background:#fff;border:4px solid #12294B;box-shadow:7px 7px 0 #12294B;overflow:hidden;transform:rotate(-3deg) scale(.6);opacity:0}
.ch-slide.on .ch-pic{animation:chPop .8s cubic-bezier(.34,1.56,.64,1) .15s forwards}
@keyframes chPop{0%{transform:rotate(-14deg) scale(.55);opacity:0}100%{transform:rotate(-3deg) scale(1);opacity:1}}
.ch-float{position:absolute;inset:0;animation:chFloat 4s ease-in-out infinite}
@keyframes chFloat{0%,100%{transform:translateY(0) scale(1.02)}50%{transform:translateY(-6px) scale(1.06)}}
.ch-float svg,.ch-float img{width:100%;height:100%;object-fit:cover;display:block}
.ch-dots{position:absolute;left:34px;bottom:18px;display:flex;gap:7px;z-index:3}
.ch-dots button{position:relative;width:10px;height:10px;min-height:0;padding:0;border:0;border-radius:999px;background:rgba(255,255,255,.45);cursor:pointer;overflow:hidden;transition:width .35s}
.ch-dots button.on{width:38px;background:rgba(255,255,255,.4)}
.ch-dots button i{position:absolute;inset:0;width:0;background:#fff;border-radius:999px}
.ch-dots button.on i{width:100%}
.ch-dots button.on.run i{width:0;animation:chFill var(--dur) linear forwards}
.cheer.paused .ch-dots button.on.run i{animation-play-state:paused}
@keyframes chFill{to{width:100%}}
.ch-close{position:absolute;top:12px;right:12px;z-index:4;width:30px;height:30px;min-height:0;padding:0;border:0;border-radius:999px;background:rgba(255,255,255,.25);color:#fff;font-size:20px;line-height:30px;cursor:pointer;backdrop-filter:blur(4px)}
.ch-close:hover{background:rgba(255,255,255,.4)}
.ch-confetti{position:absolute;inset:0;z-index:3;pointer-events:none;overflow:hidden}
.ch-confetti i{position:absolute;top:-14px;border-radius:2px;animation:chFall 2.2s cubic-bezier(.25,.6,.4,1) forwards}
@keyframes chFall{0%{transform:translate(0,0) rotate(0);opacity:1}85%{opacity:1}100%{transform:translate(var(--dx),260px) rotate(var(--r));opacity:0}}
/* slides with a generated picture: light base, the WHOLE picture on the right (object-fit:contain, never cropped;
   the pictures have white edges, so they melt into the white slide), text on the left */
.ch-slide.has-photo{background:#fff;animation:none;grid-template-columns:minmax(0,40%) minmax(0,60%);gap:14px;padding:18px 14px 18px 34px;min-height:0}
.ch-slide.has-photo::before{content:"";position:absolute;inset:0;background:linear-gradient(90deg,color-mix(in srgb,var(--g1) 11%,#fff) 0%,color-mix(in srgb,var(--g3) 7%,#fff) 26%,#fff 44%)}
.has-photo .ch-blob{background:color-mix(in srgb,var(--g2) 8%,transparent)}.has-photo .ch-blob.b1{right:auto;left:-80px;top:-150px}.has-photo .ch-blob.b2{left:18%;bottom:-100px}.has-photo .ch-blob.b3{display:none}
.has-photo .ch-spark{color:var(--g2);text-shadow:none;opacity:.7}.has-photo .ch-spark.s1{left:30%}.has-photo .ch-spark.s2{left:24%}.has-photo .ch-spark.s3{left:6%;top:14px}
.has-photo .ch-body{padding-bottom:26px}
.ch-photo{position:relative;z-index:1;width:100%;aspect-ratio:1600/663;
  -webkit-mask-image:linear-gradient(90deg,transparent,#000 7%,#000 93%,transparent),linear-gradient(180deg,transparent,#000 8%,#000 92%,transparent);-webkit-mask-composite:source-in;
  mask-image:linear-gradient(90deg,transparent,#000 7%,#000 93%,transparent),linear-gradient(180deg,transparent,#000 8%,#000 92%,transparent);mask-composite:intersect}
.ch-photo img{position:absolute;inset:0;width:100%;height:100%;object-fit:contain;display:block;opacity:0}
.ch-slide.on .ch-photo img{animation:chFade .7s ease-out forwards}
@keyframes chFade{to{opacity:1}}
.has-photo .ch-body{color:var(--navy)}
.has-photo h2{background:linear-gradient(95deg,var(--g1),var(--g2) 60%,var(--g3));-webkit-background-clip:text;background-clip:text;color:transparent;text-shadow:none;padding-bottom:2px}
.has-photo p{color:#3B4A60;text-shadow:none}
.has-photo .ch-kick{background:linear-gradient(95deg,var(--g1),var(--g2));color:#fff}
.cheer:has(.has-photo.on) .ch-dots button{background:color-mix(in srgb,var(--navy) 18%,transparent)}
.cheer:has(.has-photo.on) .ch-dots button i{background:var(--orange)}
.cheer:has(.has-photo.on) .ch-close{background:rgba(255,255,255,.9);color:var(--navy);box-shadow:0 2px 8px rgba(18,41,75,.15)}
.th-memory.has-photo h2{background:none;color:var(--navy)}
@media (max-width:640px){
  .cheer{border-radius:20px;min-height:0}
  .ch-slide{grid-template-columns:minmax(0,1fr) 104px;padding:18px 16px 38px 18px;gap:10px}
  .ch-pic{width:104px;border-width:3px;border-radius:18px;box-shadow:4px 4px 0 #12294B}
  .cheer h2{font-size:20px}.cheer p{font-size:14px}.ch-kick{font-size:11.5px}
  .ch-dots{left:18px;bottom:14px}.ch-spark.s1{left:60%}.ch-blob.b1{width:180px;height:180px}
  /* every slide is as tall as the longest one (they share one cell so the page never jumps): the picture keeps the top,
     and the text block is centred in whatever room is left, so a short text does not leave a hole at the bottom */
  .ch-slide.has-photo{grid-template-columns:1fr;grid-template-rows:auto 1fr;gap:14px;padding:12px 0 40px;align-content:stretch}
  .ch-photo{order:-1}
  .has-photo .ch-body{justify-content:center}
  .ch-slide.has-photo::before{background:linear-gradient(180deg,#fff 40%,color-mix(in srgb,var(--g1) 9%,#fff))}
  .has-photo .ch-blob{display:none}
  .has-photo .ch-body{padding:0 18px}
  .has-photo .ch-spark{display:none}
}
@media (prefers-reduced-motion:reduce){.ch-slide,.ch-slide.on,.ch-blob,.ch-spark,.ch-float,.ch-dots button,.ch-photo img{animation:none!important;transition:none!important}.ch-photo img{opacity:1!important;transform:none!important;animation:none!important}
  .ch-body>*,.ch-pic{opacity:1!important;transform:none!important;animation:none!important}.ch-pic{transform:rotate(-3deg)!important}}

/* inbox: answering a parent's note from the site (pages/messages.php) */
.msg-reply{margin-top:10px;padding:9px 12px;border-radius:10px;background:var(--surface2);border-left:3px solid var(--orange)}
.msg-reply.failed{border-left-color:#BA4A41;background:#FDEDEB}
.msg-replyform{margin-top:12px;display:grid;gap:8px}
.msg-replyform textarea{width:100%;box-sizing:border-box;padding:10px 12px;border:1px solid var(--line-strong);border-radius:9px;background:var(--surface);color:var(--ink);font:400 14px var(--font-ui);resize:vertical}
.msg-replyrow{display:flex;align-items:center;gap:10px;flex-wrap:wrap}.msg-replyrow .btn{margin-left:auto}
.msg-img{display:block;max-width:100%;height:auto;margin:6px 0 10px;border-radius:12px;border:1px solid var(--line)}

/* carousel heart (inc/cheer.php, pages/cheerlike.php): one tap = one like per slide kind per day */
.ch-like{position:absolute;right:16px;bottom:14px;z-index:4;display:inline-flex;align-items:center;gap:6px;min-height:0;height:34px;padding:0 12px;
  border:0;border-radius:999px;background:rgba(255,255,255,.92);color:#E0245E;font:700 13px var(--font-ui);cursor:pointer;box-shadow:0 3px 10px rgba(18,41,75,.18);transition:transform .15s}
.ch-like svg{width:18px;height:18px;fill:none;stroke:currentColor;stroke-width:2}
.ch-like b:empty{display:none}
.ch-like:hover,.ch-like:focus{transform:scale(1.06);background:#fff;color:#E0245E}
.ch-like.on,.ch-like.on:hover{background:#FFE4EC;color:#E0245E}
.ch-like.on svg{fill:currentColor}
.ch-like.pop svg{animation:chHeart .45s cubic-bezier(.34,1.56,.64,1)}
@keyframes chHeart{0%{transform:scale(1)}40%{transform:scale(1.45)}100%{transform:scale(1)}}
@media (prefers-reduced-motion:reduce){.ch-like.pop svg{animation:none}}

/* ===== Mini lessons (pages/learn.php + assets/learn.js): same language as the Home carousel ===== */
.th-violet{--g1:#7B2FF7;--g2:#C04CFD;--g3:#FF5DA2}.th-coral{--g1:#FF5F6D;--g2:#FF8C42;--g3:#FFC371}
.th-teal{--g1:#06A77D;--g2:#16C79A;--g3:#9BE15D}.th-sky{--g1:#3A86FF;--g2:#5E60CE;--g3:#48CAE4}
.ml-grid{display:grid;grid-template-columns:repeat(auto-fill,minmax(260px,1fr));gap:16px;margin:0 0 26px}
.ml-card{position:relative;background:var(--surface);border:1px solid var(--line);border-radius:20px;overflow:hidden;box-shadow:0 10px 26px -18px rgba(18,41,75,.45);transition:transform .2s,box-shadow .2s}
.ml-card:hover{transform:translateY(-3px);box-shadow:0 16px 30px -18px rgba(18,41,75,.55)}
.ml-card-link{position:absolute;inset:0;z-index:1}
.ml-card-band{height:78px;background:linear-gradient(120deg,var(--g1),var(--g2) 60%,var(--g3));display:flex;align-items:center;justify-content:space-between;padding:0 18px;color:#fff}
.ml-card-band .icon{width:30px;height:30px;opacity:.9}
.ml-no{font:800 30px/1 "Rubik",var(--font-head);opacity:.95}
.ml-card-body{padding:14px 18px 18px}.ml-card-body h3{margin:6px 0 6px;font:700 18px/1.25 var(--font-head);color:var(--ink)}
.ml-card-body p{margin:0;font-size:14px;line-height:1.5;color:#3B4A60}
.ml-card-meta{display:flex;gap:8px;align-items:center;font-size:12.5px;color:var(--muted)}
.ml-stars{color:#F5A623;letter-spacing:1px;font-size:15px}
.ml-tag{font:700 11px var(--font-ui);text-transform:uppercase;letter-spacing:.06em;padding:2px 8px;border-radius:99px}
.ml-tag.new{background:#FF6B3D;color:#fff}.ml-tag.draft{background:#FFF4D6;color:#8A6100}
.ml-review{position:relative;z-index:2;display:flex;flex-wrap:wrap;gap:8px;align-items:center;justify-content:space-between;margin-top:12px;padding-top:10px;border-top:1px dashed var(--line)}
.ml-review form{margin:0}
.ml-card.locked{opacity:.7}.ml-card.locked .ml-card-band{filter:grayscale(.6)}
/* player */
.ml-player{max-width:760px;margin:0 auto;padding-bottom:40px}
.ml-top{display:flex;align-items:center;gap:12px;margin:0 0 14px}
.ml-bar{flex:1;display:flex;gap:4px}.ml-bar i{flex:1;height:6px;border-radius:99px;background:var(--line)}
.ml-bar i.done{background:var(--g2)}.ml-bar i.on{background:linear-gradient(90deg,var(--g1),var(--g3))}
.ml-close{width:36px;height:36px;border-radius:99px;display:flex;align-items:center;justify-content:center;background:var(--surface2);color:var(--ink);font-size:22px;text-decoration:none;flex:none}
.ml-cardview,.ml-q,.ml-result{background:var(--surface);border:1px solid var(--line);border-radius:24px;padding:22px 22px 24px;box-shadow:0 14px 32px -22px rgba(18,41,75,.5);position:relative;overflow:hidden}
.ml-cardview::before,.ml-q::before,.ml-result::before{content:"";position:absolute;left:0;right:0;top:0;height:6px;background:linear-gradient(90deg,var(--g1),var(--g2),var(--g3))}
.ml-in{animation:mlIn .45s cubic-bezier(.2,.8,.2,1)}
@keyframes mlIn{from{opacity:0;transform:translateY(14px)}to{opacity:1;transform:none}}
.ml-title{margin:-2px 0 14px;padding:16px 18px;border-radius:16px;background:linear-gradient(120deg,var(--g1),var(--g2) 60%,var(--g3));color:#fff}
.ml-title span{font:700 12px var(--font-ui);text-transform:uppercase;letter-spacing:.08em;opacity:.9}
.ml-title h1{margin:4px 0 0;font:800 24px/1.2 "Rubik",var(--font-head);color:#fff}
.ml-chip{display:inline-block;font:700 12px var(--font-ui);text-transform:uppercase;letter-spacing:.07em;color:var(--g1);background:color-mix(in srgb,var(--g1) 10%,#fff);padding:4px 10px;border-radius:99px}
.ml-cardview h2,.ml-q h2,.ml-result h2{margin:10px 0 10px;font:800 23px/1.25 "Rubik",var(--font-head);color:var(--ink)}
.ml-body{font-size:17px;line-height:1.6;color:#2E3B52;margin:0 0 6px}
.ml-svg{margin:6px 0 14px}.ml-svg svg{width:100%;height:auto;display:block;border-radius:18px}
.ml-img{width:100%;border-radius:18px;margin:6px 0 14px;display:block}
.ml-list{margin:8px 0 0;padding-left:0;list-style:none;display:grid;gap:8px}
.ml-list li{position:relative;padding:10px 12px 10px 40px;background:var(--surface2);border-radius:12px;font-size:16px;line-height:1.45}
ul.ml-list li::before{content:"";position:absolute;left:15px;top:17px;width:10px;height:10px;border-radius:50%;background:var(--g2)}
ol.ml-list{counter-reset:s}ol.ml-list li{counter-increment:s}
ol.ml-list li::before{content:counter(s);position:absolute;left:9px;top:9px;width:24px;height:24px;border-radius:50%;background:linear-gradient(135deg,var(--g1),var(--g3));color:#fff;font:700 13px/24px var(--font-ui);text-align:center}
.ml-dodont{display:grid;grid-template-columns:1fr 1fr;gap:12px;margin-top:10px}
.ml-dodont>div{border-radius:16px;padding:12px 14px}.ml-dodont b{display:block;margin-bottom:6px;font:800 15px var(--font-head)}
.ml-dodont ul{margin:0;padding-left:18px;display:grid;gap:6px;font-size:15px;line-height:1.4}
.dd-do{background:#E6F8F1}.dd-do b{color:#077A58}.dd-dont{background:#FDECEC}.dd-dont b{color:#B8322A}
.k-tryit{background:linear-gradient(160deg,color-mix(in srgb,var(--g3) 16%,#fff),#fff 60%)}
.ml-nav{display:flex;justify-content:space-between;align-items:center;gap:10px;margin-top:16px}
.ml-nav .btn{min-width:130px;justify-content:center}
/* quiz */
.ml-hint{margin:0 0 12px;color:var(--muted);font-size:14px}
.ml-area{display:grid;gap:10px}
.ml-opt{display:flex;align-items:center;justify-content:flex-start;gap:8px;width:100%;min-height:52px;padding:12px 16px;border-radius:14px;border:2px solid var(--line);background:var(--surface);color:var(--ink);font:600 16px/1.35 var(--font-ui);text-align:left;cursor:pointer;box-shadow:none;transition:border-color .15s,background .15s,transform .1s}
.ml-opt:hover{border-color:var(--g2);background:var(--surface)}.ml-opt:active{transform:scale(.98)}
.ml-opt.sel{border-color:var(--navy);background:color-mix(in srgb,var(--navy) 6%,#fff)}
.ml-opt.right{border-color:#16A172;background:#E6F8F1;color:#0B5E43}.ml-opt.wrong{border-color:#D84A40;background:#FDECEC;color:#8E231C}
.ml-opt small{display:block;font-weight:500;font-size:13px;margin-left:auto;opacity:.85}
.q-tf .ml-area{grid-template-columns:1fr 1fr}.q-tf .ml-opt{justify-content:center;font-size:18px;min-height:64px}
.q-match .ml-area{grid-template-columns:1fr 1fr;align-items:start}.ml-col{display:grid;gap:10px}
.ml-opt.paired.p0{border-color:#7B2FF7;background:#F3EAFF}.ml-opt.paired.p1{border-color:#FF8C42;background:#FFF1E6}.ml-opt.paired.p2{border-color:#16C79A;background:#E6F8F1}
.ml-opt.paired.p3{border-color:#3A86FF;background:#EAF2FF}.ml-opt.paired.p4{border-color:#F107A3;background:#FFE8F6}
.ml-area .ml-opt.right{border-color:#16A172;background:#E6F8F1;color:#0B5E43}.ml-area .ml-opt.wrong{border-color:#D84A40;background:#FDECEC;color:#8E231C}
.ml-area .ml-l{flex-wrap:wrap}.ml-area .ml-l small{flex-basis:100%;margin:4px 0 0;font-size:13px;color:#0B5E43;font-weight:600}
.ml-pool:empty{display:none}
.ml-line{margin:0;padding:0;list-style:none;display:grid;gap:8px;counter-reset:o;min-height:20px}
.ml-line li{counter-increment:o;display:flex;align-items:center;gap:10px}.ml-line li::before{content:counter(o);flex:none;width:28px;height:28px;border-radius:50%;background:var(--navy);color:#fff;font:700 13px/28px var(--font-ui);text-align:center}
.ml-line li.right .ml-opt{border-color:#16A172;background:#E6F8F1}.ml-line li.wrong .ml-opt{border-color:#D84A40;background:#FDECEC}
.ml-pool{display:flex;flex-wrap:wrap;gap:8px;padding:12px;border-radius:14px;background:var(--surface2);min-height:30px}
.ml-pool .ml-opt{width:auto;min-height:44px}.ml-word.used{opacity:.3;pointer-events:none}
.ml-solution{margin:6px 0 0;padding:10px 14px 10px 32px;border-radius:12px;background:#E6F8F1;color:#0B5E43;font-size:14.5px}
.ml-sent{font-size:19px;line-height:2.2;margin:0 0 6px;color:var(--ink)}
.ml-slot{display:inline-flex;align-items:center;min-width:92px;min-height:40px;margin:0 4px;padding:4px 12px;border:0;border-bottom:3px solid var(--g2);border-radius:10px 10px 4px 4px;background:color-mix(in srgb,var(--g2) 10%,#fff);color:var(--ink);font:700 17px var(--font-ui);vertical-align:middle;box-shadow:none;cursor:pointer}
.ml-slot.right{border-color:#16A172;background:#E6F8F1}.ml-slot.wrong{border-color:#D84A40;background:#FDECEC}.ml-slot small{margin-left:6px;font-weight:600;font-size:13px;color:#0B5E43}
.ml-fb{margin-top:16px;padding:14px 16px;border-radius:16px}.ml-fb b{font:800 17px var(--font-head)}.ml-fb p{margin:6px 0 0;font-size:15.5px;line-height:1.5}
.ml-fb.ok{background:#E6F8F1;color:#0B5E43}.ml-fb.bad{background:#FFF1E6;color:#7A3A0C}
/* result */
.ml-result{text-align:center}
.ml-bigstars{font-size:58px;line-height:1;margin:6px 0 4px;letter-spacing:6px}
.ml-bigstars span{display:inline-block;color:var(--line-strong)}.ml-bigstars span.on{color:#F5B91E;animation:mlStar .55s cubic-bezier(.34,1.56,.64,1) both}
@keyframes mlStar{from{transform:scale(0) rotate(-40deg);opacity:0}to{transform:none;opacity:1}}
.ml-tryit{margin:14px auto 0;max-width:520px;text-align:left;padding:14px 16px;border-radius:16px;background:linear-gradient(135deg,color-mix(in srgb,var(--g1) 10%,#fff),color-mix(in srgb,var(--g3) 14%,#fff))}
.ml-tryit p{margin:6px 0 0;font-size:15px;line-height:1.5}
/* Home card */
.ml-home{display:flex;align-items:center;gap:14px;margin:0 0 20px;padding:14px 18px;border-radius:18px;color:#fff;text-decoration:none;background:linear-gradient(120deg,var(--g1),var(--g2) 60%,var(--g3));box-shadow:0 12px 26px -16px rgba(18,41,75,.5)}
.ml-home:hover{text-decoration:none;filter:brightness(1.04)}.ml-home .icon{width:34px;height:34px;flex:none}
.ml-home small{display:block;font:700 12px var(--font-ui);text-transform:uppercase;letter-spacing:.07em;opacity:.9}
.ml-home b{display:block;font:800 18px/1.25 "Rubik",var(--font-head)}.ml-home .go{margin-left:auto;font-size:26px}
@media (max-width:640px){
  .ml-cardview,.ml-q,.ml-result{padding:18px 16px 20px;border-radius:20px}
  .ml-cardview h2,.ml-q h2,.ml-result h2{font-size:20px}.ml-body{font-size:16px}
  .ml-dodont{grid-template-columns:1fr}.q-match .ml-area{grid-template-columns:1fr 1fr;gap:8px}.q-match .ml-opt{font-size:14px;padding:10px 10px}
  .ml-player{padding-bottom:110px}
  .ml-nav{position:sticky;bottom:calc(64px + env(safe-area-inset-bottom));background:linear-gradient(transparent,var(--bg) 30%);padding-top:14px;margin-top:8px}
  .ml-nav .btn{min-width:0;flex:1}
}
@media (prefers-reduced-motion:reduce){.ml-in,.ml-bigstars span.on{animation:none}}

/* ===== Mini lessons, conversation format (assets/learn.js chatMode): a mentor talking, not a slide deck ===== */
.mlc{max-width:640px;margin:0 auto;padding-bottom:120px}
.mlc-head{display:grid;grid-template-columns:auto 1fr auto;align-items:center;gap:6px 12px;padding:8px 2px 16px}
.mlc-head>div{flex:1;min-width:0}.mlc-head small{display:block;font:700 12px var(--font-ui);color:var(--muted);text-transform:uppercase;letter-spacing:.06em}
.mlc-head b{display:block;font:800 18px/1.25 "Rubik",var(--font-head);color:var(--ink)}
.mlc-bar{grid-column:1/-1;height:6px;border-radius:99px;background:var(--line);overflow:hidden}.mlc-bar i{display:block;height:100%;width:0;background:linear-gradient(90deg,var(--g1),var(--g3));transition:width .5s}
.mlc-av{width:36px;height:36px;border-radius:50%;object-fit:cover;flex:none;box-shadow:0 2px 6px rgba(18,41,75,.18)}.mlc-av.big{width:52px;height:52px}
.mlc-feed{display:grid;gap:14px;padding:6px 0}
.mlc-row{display:flex;align-items:flex-end;gap:8px;scroll-margin-bottom:150px}.mlc-row.u{justify-content:flex-end}
.mlc-bubble{max-width:88%;background:var(--surface);border:1px solid var(--line);border-radius:20px 20px 20px 6px;padding:13px 15px;box-shadow:0 6px 16px -12px rgba(18,41,75,.45);font-size:16px;line-height:1.55;color:#24324A}
.mlc-bubble p{margin:6px 0 0}.mlc-bubble p:first-child{margin-top:0}
.mlc-bubble.you{background:var(--navy);color:#fff;border-color:var(--navy);border-radius:20px 20px 6px 20px;font-weight:600}
.mlc-bubble.typing{display:flex;gap:5px;padding:14px 16px}.mlc-bubble.typing i{width:8px;height:8px;border-radius:50%;background:var(--muted);opacity:.5;animation:mlcDot 1s infinite}
.mlc-bubble.typing i:nth-child(2){animation-delay:.15s}.mlc-bubble.typing i:nth-child(3){animation-delay:.3s}
@keyframes mlcDot{0%,60%,100%{transform:none;opacity:.35}30%{transform:translateY(-4px);opacity:.9}}
.mlc-h{display:block;font:800 18px/1.3 "Rubik",var(--font-head);color:var(--ink);margin:0 0 4px}
.mlc-img{display:block;width:calc(100% + 30px);margin:-13px -15px 12px;border-radius:19px 19px 0 0;max-width:none}
.mlc-tag{display:inline-block;margin:0 0 8px;font:700 11.5px var(--font-ui);text-transform:uppercase;letter-spacing:.08em;color:var(--g1);background:color-mix(in srgb,var(--g1) 10%,#fff);padding:3px 9px;border-radius:99px}
/* the classroom scene inside a bubble */
.mlc-scene{margin:-2px 0 8px;padding:12px;border-radius:16px;background:repeating-linear-gradient(0deg,#FBF8F2 0 27px,#EFE8DA 27px 28px);border:1px solid #EADFCB}
.mlc-line{display:flex;align-items:flex-end;gap:8px;margin:8px 0}.mlc-line img{width:30px;height:30px;border-radius:50%;flex:none}
.mlc-line span{padding:8px 12px;border-radius:16px;font-size:15px;line-height:1.4;max-width:80%}
.mlc-line.teacher{flex-direction:row-reverse}.mlc-line.teacher span{background:#FFE9DC;color:#6B2E0F;border-radius:16px 16px 4px 16px}
.mlc-line.pupil span{background:#FFF6CC;color:#5A4300;border-radius:16px 16px 16px 4px}
/* the one rule, drawn with a marker */
.mlc-rule{font:800 22px/1.35 "Rubik",var(--font-head);color:var(--ink);margin:2px 0 8px}
.mlc-rule mark{background:linear-gradient(transparent 58%,#FFE066 58%) no-repeat 0 0/0% 100%;color:inherit;padding:0 2px;transition:background-size 1s ease}
.lit .mlc-rule mark{background-size:100% 100%}
.mlc-steps{margin:10px 0 0;padding:0;list-style:none;counter-reset:s;display:grid;gap:8px}
.mlc-steps li{counter-increment:s;position:relative;padding:10px 12px 10px 46px;border-radius:14px;background:var(--surface2);font-size:15.5px;line-height:1.45}
.mlc-steps li::before{content:counter(s);position:absolute;left:10px;top:9px;width:26px;height:26px;border-radius:50%;background:linear-gradient(135deg,var(--g1),var(--g3));color:#fff;font:800 14px/26px var(--font-ui);text-align:center}
.mlc-say{display:grid;gap:8px;margin-top:8px}
.mlc-say q{display:block;quotes:none;padding:10px 14px 10px 40px;position:relative;border-radius:14px;background:#EEF4FF;color:#16366B;font-weight:600;font-size:15.5px}
.mlc-say q::before{content:"";position:absolute;left:12px;top:12px;width:18px;height:18px;background:#3A86FF;
  -webkit-mask:url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'%3E%3Cpath d='M4 5h16v11H9l-5 4z'/%3E%3C/svg%3E") center/contain no-repeat;
  mask:url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'%3E%3Cpath d='M4 5h16v11H9l-5 4z'/%3E%3C/svg%3E") center/contain no-repeat}
.mlc-bubble.k-note{background:none;border:0;box-shadow:none;padding:6px 4px}
.mlc-sticky{position:relative;background:#FFF1A8;padding:18px 18px 16px;border-radius:4px 4px 18px 4px;transform:rotate(-1.4deg);box-shadow:0 12px 20px -14px rgba(90,67,0,.55);color:#4A3A00}
.mlc-sticky::before{content:"";position:absolute;top:-10px;left:50%;width:70px;height:20px;margin-left:-35px;background:rgba(255,255,255,.6);transform:rotate(2deg);box-shadow:0 1px 2px rgba(0,0,0,.08)}
.mlc-sticky b{font:800 16px var(--font-head)}.mlc-sticky p{margin:6px 0 0;font-size:16px}
.mlc-bubble.ok{border-color:#9ADFC4;background:#EFFBF6}.mlc-bubble.ok .mlc-h{color:#0B7A55}
.mlc-bubble.bad{border-color:#FFD1B3;background:#FFF6EF}.mlc-bubble.bad .mlc-h{color:#A5470F}
.mlc-bubble.q{width:88%}.mlc-check{margin-top:12px;width:100%;justify-content:center}
.mlc-bubble.result{text-align:center;width:88%}
.mlc-task{margin-top:12px;text-align:left;padding:12px 14px;border-radius:14px;background:linear-gradient(135deg,color-mix(in srgb,var(--g1) 12%,#fff),color-mix(in srgb,var(--g3) 16%,#fff))}
.mlc-task p{margin:4px 0 0}
.mlc-dock{position:sticky;bottom:12px;z-index:6;display:flex;justify-content:flex-end;gap:10px;margin-top:16px;padding-top:12px;background:linear-gradient(transparent,var(--bg) 35%)}
.mlc-reply{min-width:170px;justify-content:center;background:var(--orange);color:#fff;border:0;border-radius:99px;font:700 16px var(--font-ui);padding:12px 22px;box-shadow:0 8px 18px -8px rgba(255,107,61,.8);animation:mlIn .35s ease}
.mlc-reply:hover{background:#F25A2B;color:#fff}
.mlc .ml-area{margin-top:8px}.mlc .ml-opt{min-height:48px;font-size:15px}
@media (max-width:640px){.mlc{padding-bottom:150px}.mlc-dock{bottom:calc(72px + env(safe-area-inset-bottom))}.mlc-reply{flex:1}.mlc-bubble,.mlc-bubble.q,.mlc-bubble.result{max-width:92%;width:auto}.mlc-bubble.q,.mlc-bubble.result{width:92%}.mlc-row{scroll-margin-bottom:190px}}
@media (prefers-reduced-motion:reduce){.mlc-bubble.typing i,.mlc-reply{animation:none}.mlc-rule mark{transition:none}}

/* ===== Mini lessons list = a path (pages/learn.php) ===== */
.mlp-hero{position:relative;display:flex;align-items:center;gap:18px;margin:4px 0 22px;padding:20px 22px;border-radius:24px;color:#fff;overflow:hidden;
  background:linear-gradient(120deg,var(--g1),var(--g2) 60%,var(--g3))}
.mlp-hero::after{content:"";position:absolute;right:-60px;top:-80px;width:240px;height:240px;border-radius:50%;background:rgba(255,255,255,.12)}
.mlp-faces{display:flex;flex:none}.mlp-faces img{width:84px;height:84px;border-radius:50%;border:4px solid rgba(255,255,255,.85);box-shadow:0 8px 18px -8px rgba(0,0,0,.35);object-fit:cover}
.mlp-faces img+img{margin-left:-22px}
.mlp-hello{position:relative;z-index:1;min-width:0;flex:1}.mlp-hello small{font:700 12px var(--font-ui);text-transform:uppercase;letter-spacing:.08em;opacity:.9}
.mlp-hello h1{margin:2px 0 4px;font:800 26px/1.2 "Rubik",var(--font-head);color:#fff}.mlp-hello p{margin:0 0 10px;font-size:16px;opacity:.95}
.mlp-prog{height:8px;border-radius:99px;background:rgba(255,255,255,.3);overflow:hidden;max-width:320px;margin-bottom:4px}.mlp-prog i{display:block;height:100%;background:#fff;border-radius:99px}
.mlp-stats{position:relative;z-index:1;align-self:flex-start;display:inline-flex;align-items:center;gap:6px;padding:8px 14px;border-radius:99px;background:rgba(255,255,255,.2);color:#fff;font:700 13px var(--font-ui);text-decoration:none}
.mlp-stats:hover{background:rgba(255,255,255,.3);text-decoration:none}.mlp-stats .icon{width:16px;height:16px}
.mlp-sub{display:flex;align-items:center;gap:10px;margin:8px 0 12px;font:800 19px "Rubik",var(--font-head)}.mlp-sub img{width:34px;height:34px;border-radius:50%}
.mlp-path{list-style:none;margin:0 0 26px;padding:0 0 0 6px;position:relative}
.mlp-path::before{content:"";position:absolute;left:37px;top:30px;bottom:30px;border-left:4px dotted var(--line-strong)}
.mlp-node{position:relative;display:flex;gap:16px;align-items:flex-start;padding:10px 0}
.mlp-dot{position:relative;z-index:1;flex:none;width:64px;height:64px;border-radius:50%;display:flex;align-items:center;justify-content:center;
  background:linear-gradient(135deg,var(--g1),var(--g3));color:#fff;font:800 24px "Rubik",var(--font-head);text-decoration:none;box-shadow:0 8px 0 -2px color-mix(in srgb,var(--g1) 55%,#000),0 12px 20px -10px rgba(18,41,75,.5);transition:transform .15s}
.mlp-dot:hover{transform:translateY(-2px);text-decoration:none}.mlp-dot .icon{width:28px;height:28px;stroke-width:3}
.mlp-node.done .mlp-dot{background:linear-gradient(135deg,#16C79A,#06A77D);box-shadow:0 8px 0 -2px #04795A,0 12px 20px -10px rgba(18,41,75,.5)}
.mlp-node.current .mlp-dot::after{content:"";position:absolute;inset:-8px;border-radius:50%;border:3px solid var(--g2);animation:mlpPulse 1.6s ease-out infinite}
@keyframes mlpPulse{from{transform:scale(.9);opacity:1}to{transform:scale(1.25);opacity:0}}
.mlp-node.locked .mlp-dot{background:var(--surface2);color:var(--muted);box-shadow:none;border:3px dashed var(--line-strong)}
.mlp-info{flex:1;min-width:0;padding-top:6px}
.mlp-title{display:block;font:800 17px/1.3 "Rubik",var(--font-head);color:var(--ink);text-decoration:none}.mlp-title:hover{text-decoration:none;color:var(--g1)}
.mlp-node.locked .mlp-title{color:var(--muted)}
.mlp-meta{display:flex;gap:8px;align-items:center;margin-top:4px;font-size:13px;color:var(--muted)}
.mlp-node.current .mlp-info{background:var(--surface);border:1px solid var(--line);border-radius:18px;padding:14px 16px;box-shadow:0 12px 26px -18px rgba(18,41,75,.5)}
.mlp-node.current .mlp-info p{margin:8px 0 12px;color:#3B4A60;font-size:15px;line-height:1.5}
.mlp-go{min-width:140px;justify-content:center}
@media (max-width:640px){.mlp-hero{flex-direction:column;align-items:flex-start;padding:18px}.mlp-faces img{width:66px;height:66px}.mlp-hello h1{font-size:22px}.mlp-stats{position:absolute;top:16px;right:16px}}
@media (prefers-reduced-motion:reduce){.mlp-node.current .mlp-dot::after{animation:none}}

/* powers in mini lessons: the fonts have only ¹²³ as superscript glyphs, so learn.js turns every superscript run into <sup> */
.ml-player sup{font-size:.66em;line-height:0;vertical-align:.62em;font-weight:inherit;margin-left:.02em}
/* mini lessons: "where it was proven" card - place tag, finding, two animated bars, source */
.mlc-where{display:inline-flex;align-items:center;gap:6px}
.mlc-where svg{width:14px;height:14px;fill:none;stroke:currentColor;stroke-width:2}
.mlc-stats{display:grid;gap:10px;margin:14px 0 6px}
.mlc-stat{display:grid;grid-template-columns:1fr auto;gap:4px 10px;align-items:center;font-size:.92rem}
.mlc-stat span{grid-column:1/-1;color:var(--ink-2,#475569)}
.mlc-stat i{display:block;height:14px;border-radius:99px;background:rgba(18,41,75,.08);overflow:hidden}
.mlc-stat s{display:block;height:100%;width:0;border-radius:inherit;background:#94A3B8;transition:width 1.1s cubic-bezier(.2,.8,.2,1) .15s}
.mlc-stat.hi s{background:linear-gradient(90deg,#16C79A,#06A77D)}
.mlc-stat b{font-family:Rubik,sans-serif;font-size:1.15rem;min-width:3ch;text-align:right}
.mlc-stat.hi b{color:#06A77D}
.lit .mlc-stat s{width:var(--v)}
.mlc-src{display:block;margin-top:10px;font-size:.78rem;color:var(--muted,#64748B)}
@media (prefers-reduced-motion:reduce){.mlc-stat s{transition:none}}
.mlc-so{margin-top:12px;padding:10px 14px;border-radius:14px;background:rgba(6,167,125,.08);font-weight:600}
/* Teachers' Day greeting from the owner (inc/gift.php) */
html.tdg-on{overflow:hidden}
.tdg{position:fixed;inset:0;z-index:300;display:grid;place-items:center;padding:16px;background:rgba(18,41,75,.55);backdrop-filter:blur(3px);animation:tdgIn .35s ease both}
.tdg[hidden]{display:none}
.tdg.out{opacity:0;transition:opacity .3s}
.tdg-card{position:relative;width:min(480px,100%);max-height:calc(100vh - 32px);overflow:auto;background:var(--surface,#fff);border-radius:26px;box-shadow:0 30px 70px -20px rgba(18,41,75,.6);animation:tdgUp .5s cubic-bezier(.2,.8,.2,1) both}
.tdg-art{background:#FFF6EF;border-radius:26px 26px 0 0;overflow:hidden}
.tdg-art img{display:block;width:100%;aspect-ratio:21/9;object-fit:cover}
.tdg-ph{display:block;width:96px;height:96px;margin:-52px auto 0;position:relative;border-radius:50%;object-fit:cover;object-position:50% 30%;border:4px solid var(--surface,#fff);box-shadow:0 10px 24px -10px rgba(18,41,75,.5)}
.tdg-body{padding:14px 26px 24px;text-align:center}
.tdg-body h2{margin:6px 0 10px;font-family:Rubik,sans-serif;font-size:1.5rem;color:#12294B}
.tdg-body p{margin:0 0 10px;line-height:1.55;color:#33415C}
.tdg-hi{font-weight:700;color:#12294B!important;font-size:1.08rem}
.tdg-sign{margin-top:14px!important;font-size:.95rem}
.tdg-sign b{display:block;font-family:Rubik,sans-serif;color:#12294B;font-size:1.05rem;margin-top:2px}
.tdg-go{display:flex;flex-direction:column;gap:8px;margin-top:16px}
.tdg-go .btn{justify-content:center;width:100%}
@keyframes tdgIn{from{opacity:0}}
@keyframes tdgUp{from{opacity:0;transform:translateY(24px) scale(.97)}}
@media (prefers-reduced-motion:reduce){.tdg,.tdg-card{animation:none}}
.tdg-go{position:sticky;bottom:0;margin:12px -26px -24px;padding:16px 26px 20px;background:linear-gradient(rgba(255,255,255,0),var(--surface,#fff) 22%)}
@media (max-width:520px){.tdg{padding:10px}.tdg-card{max-height:calc(100vh - 20px)}.tdg-art img{aspect-ratio:5/2}.tdg-ph{width:84px;height:84px;margin-top:-46px}
 .tdg-body{padding:10px 20px 20px}.tdg-body h2{font-size:1.3rem}.tdg-body p{font-size:.95rem;line-height:1.5}.tdg-go{margin:10px -20px -20px;padding:14px 20px 16px}}
/* mini lessons: picture strip - one lesson moment in frames, each with a numbered one-line caption */
.mlc-strip{list-style:none;margin:12px 0 0;padding:0;display:grid;gap:14px}
.mlc-strip li{margin:0;border-radius:18px;overflow:hidden;background:#F7F8FC;border:1px solid var(--line,#E6E8EF);animation:mlcFrame .5s cubic-bezier(.2,.8,.2,1) both;animation-delay:var(--d,0s)}
.mlc-strip img{display:block;width:100%;aspect-ratio:16/9;object-fit:cover}
.mlc-strip p{display:flex;gap:10px;align-items:flex-start;margin:0;padding:10px 14px 12px;font-size:.95rem;line-height:1.45}
.mlc-strip p b{flex:none;display:grid;place-items:center;width:24px;height:24px;border-radius:50%;background:#12294B;color:#fff;font-size:.8rem;margin-top:1px}
@keyframes mlcFrame{from{opacity:0;transform:translateY(10px)}}
@media (min-width:720px){.mlc-strip{grid-template-columns:1fr 1fr}}
@media (prefers-reduced-motion:reduce){.mlc-strip li{animation:none}}
/* mini-lesson quiz buttons: the site-wide button:hover turns text white; keep each answer readable on hover */
.ml-player .ml-opt:hover{color:var(--ink)}
.ml-player .ml-opt.sel:hover{background:color-mix(in srgb,var(--navy) 6%,#fff)}
.ml-player .ml-opt.right:hover{color:#0B5E43;background:#E6F8F1}.ml-player .ml-opt.wrong:hover{color:#8E231C;background:#FDECEC}
.ml-player .ml-slot:hover{color:var(--ink);background:color-mix(in srgb,var(--g2) 18%,#fff)}
.ml-player .ml-slot.right:hover{background:#E6F8F1}.ml-player .ml-slot.wrong:hover{background:#FDECEC}
/* staff fines (pages/fines.php) */
.fineadd{max-width:780px;margin-bottom:22px}
.finegrid{display:grid;grid-template-columns:repeat(auto-fit,minmax(220px,1fr));gap:12px;margin-bottom:12px}
.finegrid label,.finenote{display:grid;gap:6px;font:600 13px var(--font-ui);color:var(--muted)}
.fineadd input,.fineadd select,.finerules input{min-height:44px;padding:9px 12px;border:1px solid var(--line-strong);border-radius:10px;background:var(--surface);color:var(--ink);font:400 15px var(--font-ui);width:100%}
.fineadd input:focus,.fineadd select:focus,.finerules input:focus{outline:0;border-color:var(--navy);box-shadow:0 0 0 3px rgba(18,41,75,.10)}
.finechips{display:flex;flex-wrap:wrap;gap:8px;margin:0 0 12px}
.finechips .chip{cursor:pointer;min-height:38px;box-shadow:none}
.finechips .chip b{margin-left:6px;color:var(--ink);font-weight:700}
.finechips .chip:hover{background:var(--surface);color:var(--ink);border-color:var(--line-strong)}
.finechips .chip.on,.finechips .chip.on:hover{background:var(--navy);border-color:var(--navy);color:#fff}
.finechips .chip.on b{color:#fff}
.fineact{display:flex;align-items:center;gap:12px;flex-wrap:wrap;margin-top:14px;font-size:13px}
.finelist tr.off td,.finerules tr.off td{opacity:.55}
.finelist tr.off td b{text-decoration:line-through}
.finerules .rateinput{width:140px}
.muted.sm{font-size:12.5px;margin-top:2px}
.nowrap{white-space:nowrap}
.warn.dupgroup{align-items:flex-start;max-width:720px;margin-bottom:18px}.warn.dupgroup p{margin:4px 0 0;font-size:14px;line-height:1.5}
.ctrreport{align-items:flex-start;margin-bottom:14px}.ctrreport p{margin:6px 0 0;font-size:13.5px;line-height:1.5}
