/* ============================================================
   AccentCoach — ADMIN SURFACE
   Depends on brand.css, which must load first: every colour,
   radius, shadow and font here comes from the brand tokens so
   the control room is visibly the same product as the app.

   Nothing in this file is functional. The admin panel reaches
   the DOM by id and by a handful of class names that admin.js
   both reads and writes (.nav-btn, .view, .toggle.on, .pill.on,
   .bar-fill, .ci-badge.pub, .ce-form …). Those names are load-
   bearing — restyle them, never rename them.
   ============================================================ */

:root{
  /* ---- aliases the ADMIN JS writes into inline styles ----
     admin.js injects markup carrying var(--rec), var(--navy),
     var(--line), var(--muted) … . Those names predate the brand
     token set, so they are kept alive as aliases rather than
     rewritten at ~40 call sites. Deleting one silently turns a
     bar or a score colourless. */
  --rec:var(--red);
  --navy:var(--violet);
  --line:var(--edge);
  --muted:var(--ink-2);
  --paper:var(--bg);
  --card:var(--bg-3);
  --panel:var(--bg-2);
  --teal-soft:var(--teal-dim);
  --ink-soft:var(--ink-2);
  --radius:var(--r);

  /* ---- admin chrome ---- */
  --nav-w:244px;
  --nav-ink:#F2F6F5;
  --nav-ink-2:rgba(242,246,245,.62);
  --nav-ink-3:rgba(242,246,245,.38);
  --nav-line:rgba(242,246,245,.12);
  --top-h:58px;
}

*{margin:0;padding:0;box-sizing:border-box;}

body{
  background:var(--bg);color:var(--ink);
  font-family:var(--font-body);
  font-size:15px;line-height:1.55;min-height:100vh;
  -webkit-font-smoothing:antialiased;
}

/* the same ambient studio glow the learner app carries */
body::before{
  content:"";position:fixed;inset:0;z-index:0;pointer-events:none;
  background:
    radial-gradient(720px 400px at 82% -10%, rgba(12,155,138,.06), transparent 60%),
    radial-gradient(640px 420px at 6% 106%, rgba(106,90,224,.05), transparent 60%);
}

.serif{font-family:var(--font-display);}
.mono{font-family:var(--font-mono);font-size:13px;}
a{color:var(--teal);}
button{font-family:inherit;}
:focus-visible{outline:2px solid var(--teal);outline-offset:2px;}

/* ============================================================
   SHELL — dark rail + content column
   ============================================================ */
#adminShell{display:flex;min-height:100vh;position:relative;z-index:1;}

#adminNav{
  width:var(--nav-w);flex-shrink:0;position:sticky;top:0;height:100vh;
  display:flex;flex-direction:column;overflow:hidden;
  /* v1.99.218 — the operator's menu palette (System Settings › Menu and
     panel colour): every colour here is a --menu-* token (login-panel.css). */
  background:linear-gradient(165deg,var(--menu-1) 0%,var(--menu-m) 46%,var(--menu-2) 100%);--teal:var(--menu-a);
  --nav-ink-2:var(--menu-ink-2);--nav-ink-3:var(--menu-ink-3);
  color:var(--nav-ink);
}
/* the palette's two glows */
#adminNav::before{
  content:"";position:absolute;inset:-30% -40% auto -40%;height:130%;
  background:radial-gradient(closest-side,var(--menu-g1),transparent 72%),
             radial-gradient(closest-side,var(--menu-g2),transparent 70%);
  background-position:16% 10%, 84% 78%;background-repeat:no-repeat;
  background-size:66% 58%, 62% 56%;filter:blur(8px);pointer-events:none;
}
@media (prefers-reduced-motion: no-preference){
  #adminNav::before{animation:navDrift 22s ease-in-out infinite alternate;}
}
@keyframes navDrift{
  0%{transform:translate3d(-3%,-2%,0) scale(1);}
  100%{transform:translate3d(4%,3%,0) scale(1.08);}
}

.nav-brand{
  position:relative;z-index:2;display:flex;align-items:center;gap:11px;
  padding:22px 18px 18px;
}
.nav-brand .brand-mark{width:32px;height:32px;flex-shrink:0;}
#adminNav svg.brand-mark rect{fill:var(--menu-mark);}
#adminNav svg.brand-mark g{stroke:var(--menu-mark);}
.nav-brand .nav-word{
  font-family:var(--font-display);font-weight:900;font-size:19px;
  letter-spacing:-.02em;line-height:1;color:#FFFFFF;
}
.nav-brand .nav-word .c{color:var(--teal);}
.nav-chip{
  display:inline-block;margin-top:4px;font-family:var(--font-mono);
  font-size:8.5px;letter-spacing:.22em;text-transform:uppercase;
  color:var(--teal);background:rgba(0,0,0,.18);
  border:1px solid color-mix(in srgb,var(--teal) 45%,transparent);border-radius:5px;padding:1px 6px;
}
.nav-mark-halo{border-radius:9px;}

.nav-scroll{
  position:relative;z-index:2;flex:1;overflow-y:auto;
  padding:6px 12px 12px;display:flex;flex-direction:column;gap:2px;
}
.nav-group{margin-top:14px;}
.nav-group:first-child{margin-top:2px;}
.nav-group-label{
  font-family:var(--font-mono);font-size:9.5px;letter-spacing:.2em;
  text-transform:uppercase;color:var(--nav-ink-3);padding:0 10px 7px;
}
.nav-btn{
  display:flex;align-items:center;gap:11px;width:100%;text-align:left;
  background:none;border:none;color:var(--nav-ink-2);cursor:pointer;
  padding:9px 11px;border-radius:10px;font-size:14px;font-weight:500;
  transition:background .16s var(--ease),color .16s var(--ease);
  position:relative;
}
.nav-btn .nav-ic{width:18px;height:18px;flex-shrink:0;opacity:.8;}
.nav-btn:hover{background:rgba(255,255,255,.07);color:var(--nav-ink);}
.nav-btn.active{background:rgba(255,255,255,.1);color:#FFFFFF;font-weight:600;}
.nav-btn.active .nav-ic{opacity:1;color:var(--teal);}
.nav-btn.active::before{
  content:"";position:absolute;left:-12px;top:50%;transform:translateY(-50%);
  width:3px;height:20px;border-radius:0 3px 3px 0;background:var(--teal);
  box-shadow:0 0 9px var(--menu-shine);
}

.nav-foot{
  position:relative;z-index:2;border-top:1px solid var(--nav-line);
  padding:14px 18px 18px;display:flex;flex-direction:column;gap:10px;
}
.nav-back{
  font-size:13px;color:var(--nav-ink-2);text-decoration:none;
  display:inline-flex;align-items:center;gap:7px;transition:color .16s;
}
.nav-back:hover{color:var(--nav-ink);}
.nav-foot .btn.ghost{
  border-color:var(--nav-line);color:var(--nav-ink-2);width:100%;
}
.nav-foot .btn.ghost:hover{
  border-color:rgba(242,246,245,.34);color:#FFFFFF;background:rgba(255,255,255,.06);
}

#adminBody{flex:1;min-width:0;display:flex;flex-direction:column;}
main{padding:34px clamp(20px,3.6vw,44px) 80px;max-width:1240px;width:100%;}
.view{display:none;}
.view.active{display:block;}

/* ---- mobile top bar + drawer (inert above 1000px) ---- */
#adminTop{display:none;}
.admin-hamb{
  width:38px;height:36px;flex-shrink:0;border-radius:10px;cursor:pointer;
  background:rgba(255,255,255,.08);border:1px solid var(--nav-line);
  color:var(--nav-ink);display:flex;align-items:center;justify-content:center;
}
.admin-hamb svg{width:18px;height:18px;}
#adminScrim{
  position:fixed;inset:0;z-index:70;background:rgba(10,20,24,.5);
  opacity:0;pointer-events:none;transition:opacity .25s var(--ease);
  backdrop-filter:blur(2px);
}

@media(max-width:1000px){
  /* the rail leaves the flow entirely — at rest it occupies no width,
     so a narrow viewport gets the full page, never a squeezed column */
  #adminNav{
    position:fixed;left:0;top:0;z-index:80;width:min(280px,84vw);
    transform:translateX(-100%);transition:transform .26s var(--ease);
    box-shadow:0 0 50px rgba(10,20,24,.4);
  }
  body.nav-open #adminNav{transform:translateX(0);}
  body.nav-open #adminScrim{opacity:1;pointer-events:auto;}
  #adminTop{
    display:flex;align-items:center;gap:12px;position:sticky;top:0;z-index:60;
    height:var(--top-h);padding:0 16px;
    background:linear-gradient(120deg,var(--menu-1),var(--menu-mt) 58%,var(--menu-2));--teal:var(--menu-a);
    --nav-ink-2:var(--menu-ink-2);--nav-ink-3:var(--menu-ink-3);
    border-bottom:1px solid rgba(10,20,24,.5);
  }
  .top-word{
    font-family:var(--font-display);font-weight:900;font-size:16px;
    letter-spacing:-.02em;color:#FFFFFF;line-height:1;
  }
  .top-word .c{color:var(--teal);}
  .top-spacer{margin-left:auto;}
  #adminTop .btn.ghost{
    border-color:var(--nav-line);color:var(--nav-ink-2);padding:5px 13px;
  }
  #adminTop .btn.ghost:hover{border-color:rgba(242,246,245,.34);color:#FFFFFF;}
  main{padding:24px 18px 72px;}
}

/* ============================================================
   PAGE HEADER — mono eyebrow + display title, one hairline rule
   ============================================================ */
.page-head{margin-bottom:24px;}
.page-head-row{
  display:flex;justify-content:space-between;align-items:flex-start;
  gap:16px;flex-wrap:wrap;
}
.page-head .sub{margin-top:8px;}
.page-head::after{
  content:"";display:block;height:2px;width:56px;margin-top:16px;border-radius:2px;
  background:linear-gradient(90deg,var(--teal),var(--violet));
}
.eyebrow{
  font-family:var(--font-mono);font-size:10.5px;letter-spacing:.22em;
  text-transform:uppercase;color:var(--teal);display:block;margin-bottom:8px;
}
h1{
  font-family:var(--font-display);font-weight:900;font-size:clamp(26px,3.4vw,34px);
  letter-spacing:-.02em;line-height:1.06;
}
h2{
  font-family:var(--font-display);font-weight:600;font-size:20px;
  letter-spacing:-.01em;margin:30px 0 12px;
}
.sub{color:var(--ink-2);font-size:14.5px;max-width:72ch;}

/* ============================================================
   CARDS
   ============================================================ */
.card{
  background:var(--bg-3);border:1px solid var(--edge);border-radius:var(--r);
  padding:20px;margin-bottom:14px;box-shadow:var(--shadow-sm);
}
.card-head{
  display:flex;justify-content:space-between;align-items:center;
  gap:12px;flex-wrap:wrap;margin-bottom:14px;
}
.card-head h2{margin:0;font-size:17px;}
.card-tag{
  font-family:var(--font-mono);font-size:10px;text-transform:uppercase;
  letter-spacing:.1em;color:var(--ink-2);background:var(--bg-2);
  border:1px solid var(--edge);padding:4px 10px;border-radius:99px;
}
.grid{display:grid;gap:14px;}
.row{display:flex;gap:10px;flex-wrap:wrap;align-items:center;}

/* ============================================================
   CONTROLS
   ============================================================ */
.btn{
  background:var(--teal);color:#FFFFFF;border:none;border-radius:99px;
  padding:10px 20px;font-size:14px;font-weight:700;cursor:pointer;
  box-shadow:0 10px 22px -12px rgba(12,155,138,.9);
  transition:filter .16s var(--ease),transform .12s var(--ease);
}
.btn:hover{filter:brightness(1.07);transform:translateY(-1px);}
.btn:active{transform:translateY(0) scale(.98);}
.btn.ghost{
  background:transparent;border:1px solid var(--edge-2);color:var(--ink);
  font-weight:600;box-shadow:none;
}
.btn.ghost:hover{border-color:var(--teal);background:var(--bg-2);filter:none;}
.btn.danger{
  background:transparent;border:1px solid var(--red-dim);color:var(--red);
  font-weight:600;box-shadow:none;
}
.btn.danger:hover{border-color:var(--red);background:var(--red-dim);filter:none;}
.btn.sm{padding:6px 13px;font-size:12.5px;box-shadow:none;}
a.btn{text-decoration:none;display:inline-block;}
button:disabled{opacity:.45;cursor:not-allowed;}

input,select,textarea{
  font-family:inherit;font-size:14px;color:var(--ink);
  background:var(--bg-2);border:1px solid var(--edge-2);
  border-radius:var(--r-sm);padding:10px 13px;
  transition:border-color var(--dur) var(--ease),box-shadow var(--dur) var(--ease),
             background var(--dur) var(--ease);
}
input:hover,select:hover,textarea:hover{border-color:var(--ink-3);}
input:focus,select:focus,textarea:focus{
  outline:none;background:var(--bg-3);border-color:var(--teal);
  box-shadow:0 0 0 4px var(--teal-dim);
}
textarea{resize:vertical;min-height:70px;}
select{cursor:pointer;}
label{
  font-family:var(--font-mono);font-size:10.5px;letter-spacing:.1em;
  text-transform:uppercase;color:var(--ink-2);display:block;margin:16px 0 6px;
}

/* toggle — admin.js flips .on, so both states must be styled here */
.toggle{
  position:relative;width:46px;height:26px;background:var(--edge-2);
  border-radius:99px;cursor:pointer;flex-shrink:0;
  transition:background .22s var(--ease);
}
.toggle.on{background:var(--teal);box-shadow:0 0 0 4px var(--teal-dim);}
.toggle::after{
  content:"";position:absolute;top:3px;left:3px;width:20px;height:20px;
  background:#fff;border-radius:50%;box-shadow:0 1px 3px rgba(28,36,54,.3);
  transition:left .22s var(--ease);
}
.toggle.on::after{left:23px;}

/* ============================================================
   STATUS: pills, messages, banners, meters
   ============================================================ */
.pill{
  display:inline-block;font-family:var(--font-mono);font-size:10.5px;
  font-weight:700;padding:3px 10px;border-radius:99px;letter-spacing:.06em;
  text-transform:uppercase;
}
/* TWO VOCABULARIES FOR ONE THING, ALIASED DELIBERATELY (v1.74.0).

   app.css names its pills by COLOUR (teal / gray / red / amber / violet) and
   this file names them by MEANING (on / off / fail / warn). Both are
   reasonable and both are entrenched, and the cost of the split was silent:
   markup written for one panel and reused in another kept its class and lost
   its colour, because a class matching no rule renders an unstyled element
   rather than failing.

   It had happened four times before tests/css-classes.js went looking:
     admin.js   the agency-ownership pill in the Users table (v1.64.2) and
                the whole agency status pill (v1.65.0) — `teal`, `gray`,
                `red`, `amber`, none of them defined here
     agency.js  a LIVE access code's pill (`teal`), so the live one had no
                colour while the spent one (`gray`) looked right — backwards
   Aliasing is the smallest change that makes every existing emitter correct
   and stops the next copied component losing its colour. */
.pill.on,.pill.ok,.pill.teal{background:var(--teal-dim);color:var(--teal-d);}
.pill.off,.pill.gray{background:var(--bg-2);border:1px solid var(--edge);color:var(--ink-3);}
.pill.fail,.pill.red{background:var(--red-dim);color:var(--red);}
.pill.amber{background:var(--amber-dim);color:#8A6224;}
/* v1.57.0 — the third login outcome: the password was right and the
   second factor stopped it. Amber rather than red because nothing was
   breached, and never green because nobody got in. Lower-cased and
   allowed to wrap, since it is a sentence rather than a status word. */
.pill.warn{background:var(--amber-dim);color:#8A6224;text-transform:none;letter-spacing:0;}

/* Panel-wide notice (v1.57.0): full width, above every view, and it
   stays until dismissed. */
.admin-notice{
  display:flex;gap:14px;align-items:center;justify-content:space-between;
  margin:0 0 18px;padding:14px 16px;line-height:1.5;
}
.admin-notice .btn{flex:0 0 auto;}

/* What needs the operator since they last signed in (v1.99.64). A card in the
   page above every view, like .admin-notice, and dismissed only by them. */
.attention-card{margin:0 0 18px;padding:16px 18px;background:var(--bg-3);border:1px solid var(--edge);
  border-radius:var(--r);box-shadow:0 0 0 3px var(--amber-dim);}
.attn-head{display:flex;align-items:baseline;justify-content:space-between;gap:12px;flex-wrap:wrap;margin-bottom:8px;}
.attn-head h2{margin:0;font-size:17px;}
.attn-when{font-size:13px;color:var(--ink-2);}
.attn-list{margin:0;padding-left:18px;display:flex;flex-direction:column;gap:10px;}
.attn-list li{line-height:1.5;}
.attn-meta{display:block;font-size:13px;color:var(--ink-2);}
.attn-flag{display:block;margin-top:2px;font-weight:600;color:var(--red);}
.attn-crit::marker{color:var(--red);}
.attn-note{margin:12px 0 0;font-size:13px;color:var(--ink-2);}
.attn-actions{display:flex;gap:10px;flex-wrap:wrap;margin-top:14px;}
/* the count of open security alerts, on the Security nav item */
.nav-badge{margin-left:auto;min-width:20px;height:20px;padding:0 6px;border-radius:99px;box-sizing:border-box;
  background:var(--red);color:#FFFFFF;font-size:11.5px;font-weight:700;line-height:20px;text-align:center;}

/* ---- the Sentinel Center (v1.60.0) ---- */
.sen-grid{display:flex;gap:26px;flex-wrap:wrap;margin-top:6px;}
.sen-grid > div{display:flex;flex-direction:column;}
.sen-n{font-family:var(--font-mono);font-size:26px;font-weight:700;line-height:1.1;}
.sen-n.is-bad{color:var(--red);}
.sen-l{font-size:11.5px;text-transform:uppercase;letter-spacing:.07em;color:var(--ink-3);margin-top:2px;}
.sen-alert{border-left:3px solid var(--edge);padding:10px 0 10px 14px;margin:12px 0;}
.sen-alert.critical{border-left-color:var(--red);}
.sen-alert.warn{border-left-color:var(--amber);}
.sen-alert-head{display:flex;gap:10px;align-items:center;flex-wrap:wrap;margin-bottom:4px;}
/* v1.99.159 — the overall risk card and grouped alerts. */
.sec-risk[hidden]{display:none;}
.sec-risk-row{display:flex;gap:12px;align-items:flex-start;flex-wrap:wrap;}
.risk-badge{font-size:14px;padding:5px 12px;}
.sec-risk-why{margin:2px 0 0;flex:1 1 260px;font-size:15px;line-height:1.5;}
.sen-h3{font-size:15px;margin:6px 0 4px;}
.sen-group{border-left:3px solid var(--edge);padding:10px 0 10px 14px;margin:12px 0;min-width:0;overflow-wrap:anywhere;}
.sen-group.act{border-left-color:var(--red);}
.sen-group.watch{border-left-color:var(--amber);}
.sen-group-head{display:flex;gap:10px;align-items:center;flex-wrap:wrap;margin-bottom:4px;}
.sen-group-facts{display:flex;flex-wrap:wrap;gap:4px 16px;font-size:14px;color:var(--ink-2);}
.sen-group-line{margin-top:6px;font-size:14px;}
.sen-did{margin:4px 0 0;padding-left:18px;}
.sen-explain,.sen-list{margin-top:8px;}
.sen-explain summary,.sen-list summary,.sen-noise summary{cursor:pointer;font-size:14px;color:var(--teal-d);}
.sen-explain p{margin:6px 0;font-size:14px;line-height:1.5;}
.sen-noise{margin-top:14px;padding-top:10px;border-top:1px solid var(--edge-2);}
.attn-risk{margin:0 0 10px;line-height:1.5;}
#sentinelFeed td{vertical-align:top;}
/* v1.99.160 — the security dashboard, release 2. */
.sen-archived summary{color:var(--ink-2);}
.sen-tidy{margin-top:16px;padding-top:10px;border-top:1px solid var(--edge-2);}
.sen-tidy-row{display:flex;gap:8px;align-items:center;flex-wrap:wrap;}
.sen-tidy-row label{margin:0;}
.sen-tidy-row select{width:auto;max-width:100%;}
.trend-legend{display:flex;gap:14px;flex-wrap:wrap;font-size:13px;color:var(--ink-2);margin:6px 0;}
.trend-key{display:inline-flex;align-items:center;gap:6px;}
.trend-key i{display:inline-block;width:12px;height:12px;border-radius:3px;}
.trend-svg{display:block;width:100%;height:160px;}
.trend-base{stroke:var(--edge);stroke-width:1;}
.trend-day:hover .trend-hit{fill:rgba(0,0,0,.05);}
.trend-axis{display:flex;justify-content:space-between;font-size:12px;color:var(--ink-3);margin-top:4px;}
.sen-src td{vertical-align:top;}
.sen-src-act{white-space:nowrap;}
.sen-src-act select{width:auto;padding:4px 6px;font-size:13px;}
.sen-tiles{display:grid;grid-template-columns:1fr;gap:12px;}
@media (min-width:760px){.sen-tiles{grid-template-columns:1fr 1fr;}}
.sen-tile{border:1px solid var(--edge);border-radius:var(--r);padding:12px 14px;min-width:0;overflow-wrap:anywhere;}
.sen-tile-head{display:flex;gap:8px;align-items:center;justify-content:space-between;flex-wrap:wrap;margin-bottom:6px;}
.sen-tile .sub{margin:4px 0;}
.sen-tile-act{margin-top:8px;}
.sen-email{width:100%;font-size:13px;margin-top:6px;}
.sen-email td{padding:3px 6px 3px 0;border-bottom:1px solid var(--edge-2);vertical-align:top;}

/* The "use a recovery code instead" swap on the login card. */
.gate-swap{margin:10px 0 0;font-size:12.5px;}
.gate-swap a{color:var(--ink-3);text-decoration:underline;text-underline-offset:2px;}
.gate-swap a:hover{color:var(--ink);}

.err{color:var(--red);font-size:13.5px;font-weight:600;min-height:18px;margin-top:8px;}
.okmsg{color:var(--teal-d);font-size:13.5px;font-weight:600;min-height:18px;margin-top:8px;}

.warnbox,.okbox{
  border-radius:var(--r-sm);padding:12px 15px;font-size:13.5px;
  display:flex;align-items:center;flex-wrap:wrap;gap:8px;
}
.warnbox{background:var(--amber-dim);border:1px solid #EBD3AC;color:#7A5A2A;}
.okbox{background:var(--teal-dim);border:1px solid #BFE3DC;color:var(--teal-d);}

/* .bar-fill's class list is REWRITTEN by admin.js
   (bar.className = "bar-fill " + …), so every variant must be a
   modifier of .bar-fill itself — an extra wrapper class would be
   wiped on the next render. */
.bar-track{
  height:10px;background:var(--bg-2);border:1px solid var(--edge);
  border-radius:99px;overflow:hidden;margin-top:10px;
}
.bar-fill{
  height:100%;border-radius:99px;
  background:linear-gradient(90deg,var(--teal),#14B8A2);
  transition:width .5s var(--ease);
}
.bar-fill.warn{background:linear-gradient(90deg,var(--amber),#E8A33F);}
.bar-fill.over{background:linear-gradient(90deg,var(--red),#E8635C);}

/* ============================================================
   TABLES
   ============================================================ */
table{width:100%;border-collapse:collapse;font-size:14px;}
th{
  text-align:left;font-family:var(--font-mono);font-size:10px;
  text-transform:uppercase;letter-spacing:.12em;color:var(--ink-3);
  font-weight:400;padding:0 12px 10px;border-bottom:1px solid var(--edge);
  white-space:nowrap;
}
td{padding:11px 12px;border-bottom:1px solid var(--edge);vertical-align:middle;}
tbody tr{transition:background .14s;}
tbody tr:hover{background:var(--bg-2);}
tr:last-child td{border-bottom:none;}
td.sub{font-size:13px;}
/* tables keep their columns and scroll inside the card rather than
   forcing the whole page sideways on a narrow screen */
.table-wrap{overflow-x:auto;margin:0 -4px;padding:0 4px;}
.okmsg + .table-wrap{margin-top:10px;}
td .row{flex-wrap:nowrap;gap:6px;}

/* ============================================================
   THE CHECKING STATE (v1.99.99) — first paint, before boot() decides
   admin.html starts with body.booting, and while it is there NEITHER the
   gate NOR the shell is shown: the gate used to be drawn first and flashed
   on every refresh of a signed-in panel, and hiding only the gate would
   flash the dashboard at a signed-out visitor instead. !important because
   admin.js writes the gate's display inline. boot() removes the class on
   every outcome, an error included, so the page cannot stay here. The note
   fades in late, so a quick answer shows a plain background, not a flicker.
   ============================================================ */
body.booting #gate, body.booting #adminShell{display:none !important;}
#bootNote{display:none;}
body.booting #bootNote{
  display:flex;position:fixed;inset:0;align-items:center;justify-content:center;padding:16px;
  background:var(--bg);color:var(--ink-2);font-size:15px;text-align:center;
}
@media (prefers-reduced-motion: no-preference){
  body.booting #bootNote{animation:boot-note-in .2s ease-out .4s both;}
  @keyframes boot-note-in{from{opacity:0;}to{opacity:1;}}
}

/* ============================================================
   LOGIN GATE — the same two-panel composition as the app login
   admin.js writes display "flex" / "none" inline, so flex must be the
   value declared here too: it is what the gate shows once body.booting
   is gone, if boot() has not hidden it.
   ============================================================ */
#gate{
  position:fixed;inset:0;z-index:100;background:var(--bg);display:flex;
  align-items:center;justify-content:center;padding:20px;overflow-y:auto;
}
.gate-shell{
  position:relative;display:grid;grid-template-columns:1.02fr .98fr;
  width:100%;max-width:900px;background:var(--bg-3);border:1px solid var(--edge);
  border-radius:var(--r-lg);overflow:hidden;box-shadow:0 28px 70px rgba(28,36,54,.18);
}
/* .gate-aside is the login panel since v1.99.214: login-panel.css draws it,
   shared with the agency portal's gate and the learner's sign-in box. */
.gate-aside{min-width:0;}
.gate-card{position:relative;z-index:2;background:var(--bg-3);padding:44px 40px;width:100%;}
.gate-card h1{font-size:28px;margin-top:2px;}
.gate-card .sub{font-size:14px;}
.gate-card input{width:100%;padding:13px 15px;font-size:15px;}
.gate-card .btn{
  width:100%;margin-top:20px;padding:14px 20px;font-size:15px;
  border-radius:var(--r-sm);box-shadow:0 10px 24px -10px rgba(12,155,138,.7);
}
.gate-note{
  display:flex;align-items:flex-start;gap:9px;margin-top:18px;
  font-size:12.5px;color:var(--ink-2);background:var(--bg-2);
  border:1px solid var(--edge);border-radius:var(--r-sm);padding:10px 12px;
}
/* Stacks at 900px, the same width as the learner's box, so the login panel
   turns into its phone strip (login-panel.css) exactly when the shell stacks.
   It was 840 until v1.99.214. */
@media(max-width:900px){
  #gate{align-items:flex-start;padding:0;}
  .gate-shell{grid-template-columns:1fr;grid-template-rows:auto 1fr;max-width:520px;margin:0 auto;
    border-radius:0;min-height:100%;border:none;box-shadow:none;}
  .gate-card{padding:28px 26px 40px;}
}

/* ============================================================
   OVERVIEW / COMMAND CENTER
   ============================================================ */
.dash-live{
  display:flex;align-items:center;gap:8px;font-family:var(--font-mono);
  font-size:10.5px;text-transform:uppercase;letter-spacing:.1em;flex-shrink:0;
  color:var(--teal-d);background:var(--teal-dim);
  border:1px solid rgba(12,155,138,.22);padding:7px 14px;border-radius:99px;
}
.dash-live-dot{
  width:7px;height:7px;border-radius:50%;background:var(--teal);
  box-shadow:0 0 0 3px rgba(12,155,138,.18);animation:dashblink 1.4s infinite;
}
@keyframes dashblink{0%,100%{opacity:1;}50%{opacity:.3;}}

/* ---- KPI hero cards ----
   Each variant sets --kpi-c once; the accent rule, the corner bloom, the
   icon tile and the numeral all read from it. */
.kpi-grid{display:grid;grid-template-columns:repeat(auto-fit,minmax(210px,1fr));gap:14px;margin-bottom:16px;}
.kpi{
  --kpi-c:var(--teal);
  background:var(--bg-3);border:1px solid var(--edge);border-radius:var(--r);
  padding:20px;position:relative;overflow:hidden;box-shadow:var(--shadow-sm);
  transition:transform .16s var(--ease),box-shadow .16s var(--ease),border-color .16s;
}
.kpi:hover{transform:translateY(-3px);border-color:var(--edge-2);box-shadow:0 16px 34px rgba(28,36,54,.1);}
/* hairline of brand colour along the top edge */
.kpi::before{
  content:"";position:absolute;left:0;top:0;width:100%;height:3px;
  background:linear-gradient(90deg,var(--kpi-c),transparent 78%);
}
/* soft corner bloom */
.kpi::after{
  content:"";position:absolute;right:-26px;top:-26px;width:88px;height:88px;
  border-radius:50%;background:var(--kpi-c);opacity:.09;
}
.kpi-teal{--kpi-c:var(--teal);} .kpi-violet{--kpi-c:var(--violet);}
.kpi-amber{--kpi-c:var(--amber);} .kpi-ink{--kpi-c:var(--ink);}

.kpi-top{display:flex;align-items:center;gap:8px;margin-bottom:12px;position:relative;z-index:1;}
.kpi-label{
  font-family:var(--font-mono);font-size:10px;text-transform:uppercase;
  letter-spacing:.12em;color:var(--ink-3);line-height:1.3;
}
.kpi-spark{flex:1;}
.kpi-ic{
  flex-shrink:0;width:30px;height:30px;border-radius:9px;display:flex;
  align-items:center;justify-content:center;color:var(--kpi-c);
  background:var(--bg-2);  /* fallback where color-mix is unsupported */
  background:color-mix(in srgb, var(--kpi-c) 12%, transparent);
}
.kpi-ic svg{width:16px;height:16px;}
.kpi-num{
  font-family:var(--font-display);font-weight:900;font-size:38px;line-height:1;
  letter-spacing:-.02em;color:var(--kpi-c);position:relative;z-index:1;
}
.kpi-unit{font-size:20px;margin-left:2px;}
.kpi-sub{font-size:12.5px;color:var(--ink-2);margin-top:9px;position:relative;z-index:1;}
.kpi-bar{height:6px;background:var(--bg-2);border-radius:99px;margin-top:9px;overflow:hidden;}
.kpi-bar span{
  display:block;height:100%;border-radius:99px;width:0;
  background:linear-gradient(90deg,var(--teal),var(--violet));
  transition:width .8s var(--ease);
}

.dash-grid{display:grid;grid-template-columns:2fr 1fr;gap:14px;margin-bottom:16px;}
@media(max-width:820px){.dash-grid{grid-template-columns:1fr;}}
/* the canvas carries width/height ATTRIBUTES that the drawing code reads —
   scale it with CSS only, never redeclare a fixed pixel height here */
.chart{width:100%;height:auto;display:block;}
.chart-donut{max-width:300px;margin:0 auto;}
.dist-legend{display:flex;justify-content:center;gap:14px;margin-top:14px;flex-wrap:wrap;}
.dist-leg{display:flex;align-items:center;gap:7px;font-size:12px;color:var(--ink-2);}
.dist-dot{width:9px;height:9px;border-radius:3px;flex-shrink:0;}

.mini-bars{display:flex;flex-direction:column;gap:11px;}
.mini-bar-row{display:grid;grid-template-columns:minmax(0,108px) 1fr 42px;align-items:center;gap:12px;font-size:13px;}
.mini-bar-row .mb-label{font-weight:600;white-space:nowrap;overflow:hidden;text-overflow:ellipsis;text-transform:capitalize;}
.mini-bar-track{height:8px;background:var(--bg-2);border:1px solid var(--edge);border-radius:99px;overflow:hidden;}
.mini-bar-fill{height:100%;border-radius:99px;min-width:3px;transition:width .7s var(--ease);}
.mini-bar-row .mb-val{text-align:right;font-family:var(--font-mono);font-size:12px;color:var(--ink-3);}

.sys-strip{display:grid;grid-template-columns:repeat(auto-fit,minmax(170px,1fr));gap:12px;margin-bottom:16px;}
.sys-item{
  background:var(--bg-3);border:1px solid var(--edge);border-radius:var(--r);
  padding:15px 16px;display:flex;align-items:center;gap:13px;box-shadow:var(--shadow-sm);
  transition:border-color .16s,box-shadow .16s;
}
.sys-item:hover{border-color:var(--edge-2);box-shadow:0 10px 24px rgba(28,36,54,.07);}
.sys-ic{
  flex-shrink:0;width:38px;height:38px;border-radius:11px;display:flex;
  align-items:center;justify-content:center;color:var(--teal);background:var(--teal-dim);
}
.sys-ic svg{width:19px;height:19px;}
.sys-ic-teal{color:var(--teal);background:var(--teal-dim);}
.sys-ic-violet{color:var(--violet);background:var(--violet-dim);}
.sys-ic-amber{color:var(--amber);background:var(--amber-dim);}
.sys-n{font-family:var(--font-display);font-weight:900;font-size:19px;line-height:1;}
.sys-l{font-size:11px;color:var(--ink-2);margin-top:4px;}

.recent-list{display:flex;flex-direction:column;}
.recent-row{
  display:grid;grid-template-columns:1fr auto auto;align-items:center;gap:12px;
  padding:11px 8px;border-bottom:1px solid var(--edge);font-size:13px;
  border-radius:8px;transition:background .14s;
}
.recent-row:hover{background:var(--bg-2);}
.recent-row:last-child{border-bottom:none;}
.recent-user{font-weight:600;}
.recent-mode{
  font-family:var(--font-mono);font-size:10px;text-transform:uppercase;
  letter-spacing:.08em;color:var(--ink-2);background:var(--bg-2);
  border:1px solid var(--edge);padding:3px 9px;border-radius:99px;white-space:nowrap;
}
.recent-score{font-family:var(--font-display);font-weight:900;font-size:16px;min-width:42px;text-align:right;}

.dash-meta{
  font-family:var(--font-mono);font-size:10.5px;letter-spacing:.1em;
  text-transform:uppercase;color:var(--ink-3);text-align:center;margin-top:20px;
}

@media(max-width:520px){
  .kpi-num{font-size:32px;}
  .mini-bar-row{grid-template-columns:minmax(0,84px) 1fr 34px;gap:9px;}
  .recent-row{grid-template-columns:1fr auto;row-gap:4px;}
  .recent-row .recent-mode{grid-column:1;justify-self:start;}
  .recent-score{grid-row:1;grid-column:2;}
}

/* ============================================================
   CONTENT CMS
   ============================================================ */
.content-grid{display:grid;grid-template-columns:repeat(auto-fill,minmax(215px,1fr));gap:13px;margin-top:4px;}
.ct-card{
  position:relative;overflow:hidden;
  background:var(--bg-3);border:1px solid var(--edge);border-radius:var(--r);
  padding:18px;cursor:pointer;box-shadow:var(--shadow-sm);
  transition:transform .14s var(--ease),border-color .14s,box-shadow .14s;
}
.ct-card:hover{transform:translateY(-3px);border-color:var(--teal);box-shadow:0 14px 30px -12px rgba(12,155,138,.4);}
.ct-card .ct-name{font-weight:700;font-size:15px;position:relative;z-index:1;}
.ct-card .ct-count{font-size:12.5px;color:var(--ink-2);margin-top:8px;position:relative;z-index:1;}
.ct-card .ct-count b{color:var(--teal);font-family:var(--font-display);font-size:15px;}
/* A specimen glyph per content type, keyed off the data-a attribute the
   click handler already carries — decoration only, no JS involved. */
.ct-card::after{
  content:"";position:absolute;right:12px;bottom:4px;
  font-family:var(--font-display);font-weight:900;font-size:52px;line-height:1;
  color:var(--teal);opacity:.09;pointer-events:none;user-select:none;
  transition:opacity .16s var(--ease),transform .16s var(--ease);
}
.ct-card:hover::after{opacity:.16;transform:translateY(-2px);}
.ct-card[data-a="phoneme"]::after{content:"θ";}
.ct-card[data-a="pair"]::after{content:"⇄";}
.ct-card[data-a="sentence_set"]::after{content:"¶";}
.ct-card[data-a="twister"]::after{content:"∿";}
.ct-card[data-a="tricky"]::after{content:"ʃ";}
.ct-card[data-a="stress"]::after{content:"ˈ";}
.ct-card[data-a="listening"]::after{content:"♪";}
.ct-card[data-a="ipa"]::after{content:"ɑ";}
.ct-card[data-a="ft_prompt"]::after{content:"❞";}

.ce-toolbar{
  display:flex;justify-content:space-between;align-items:center;
  gap:14px;flex-wrap:wrap;margin-bottom:4px;
}
.ce-toolbar h2{margin:0;font-size:21px;}
.ce-hint{font-size:13px;margin-bottom:16px;}

.ci-row{
  background:var(--bg-3);border:1px solid var(--edge);border-radius:var(--r-sm);
  padding:13px 15px;margin-bottom:8px;display:flex;align-items:center;gap:13px;
  transition:border-color .14s,box-shadow .14s,transform .14s var(--ease);
}
.ci-row:hover{border-color:var(--edge-2);box-shadow:var(--shadow-sm);transform:translateX(2px);}
.ci-row .ci-body{flex:1;min-width:0;}
.ci-row .ci-main{font-weight:600;font-size:14.5px;}
.ci-row .ci-sub{font-size:12.5px;color:var(--ink-2);margin-top:3px;word-break:break-word;}
.ci-row .ci-actions{display:flex;gap:6px;flex-shrink:0;flex-wrap:wrap;}
.ci-badge{
  font-family:var(--font-mono);font-size:9px;font-weight:700;padding:4px 9px;
  border-radius:6px;text-transform:uppercase;letter-spacing:.1em;flex-shrink:0;
}
.ci-badge.pub{background:var(--teal-dim);color:var(--teal-d);box-shadow:inset 2px 0 0 var(--teal);}
.ci-badge.draft{background:var(--amber-dim);color:#8A6224;box-shadow:inset 2px 0 0 var(--amber);}

/* .ce-form is BUILT BY admin.js as a flat run of label/input siblings and is
   found again via closest(".ce-form") — so the two-column layout has to come
   from the grid, not from wrapper markup. */
.ce-form{
  background:var(--bg-2);border:1px solid var(--teal);border-radius:var(--r);
  padding:20px;margin-bottom:14px;box-shadow:0 14px 34px -20px rgba(12,155,138,.75);
  display:grid;grid-template-columns:minmax(120px,180px) 1fr;gap:10px 18px;align-items:start;
}
.ce-form label{margin:0;padding-top:11px;}
.ce-form input,.ce-form textarea{width:100%;background:var(--bg-3);}
.ce-form > .row{grid-column:1 / -1;margin-top:8px;}
@media(max-width:680px){
  .ce-form{grid-template-columns:1fr;gap:2px;}
  .ce-form label{padding-top:12px;}
}

/* ============================================================
   LANDING PAGE CMS
   ============================================================ */
.lp-toolbar{
  position:sticky;top:0;z-index:20;
  display:flex;gap:10px;flex-wrap:wrap;align-items:center;
  margin:0 0 18px;padding:12px 0;
  background:linear-gradient(var(--bg) 72%,transparent);
  backdrop-filter:blur(4px);
}
.lp-toolbar .okmsg{margin-top:0;}
@media(max-width:1000px){.lp-toolbar{top:var(--top-h);}}

.lp-section{padding:20px 22px;}
/* The rule moved from the title to the head row so the visibility toggle sits
   on the same line as the section name rather than below the divider. */
.lp-section-head{
  display:flex;align-items:baseline;justify-content:space-between;gap:14px;
  flex-wrap:wrap;padding-bottom:12px;margin-bottom:4px;
  border-bottom:1px solid var(--edge);
}
.lp-section-title{margin:0;font-size:17px;}
.lp-toggle{
  display:flex;align-items:center;gap:7px;flex-shrink:0;
  font-size:12.5px;color:var(--ink-2);cursor:pointer;user-select:none;
}
.lp-toggle input{margin:0;cursor:pointer;}
.lp-section-note{
  margin:10px 0 0;font-size:12.5px;line-height:1.5;color:var(--ink-3);
}
/* The generic repeatable-list row. `.lg-item` (the legal editor's) was
   defined and this, its landing-editor sibling, never was — so the footer-link
   rows had no spacing at all. */
.lp-item{margin-bottom:10px;}
/* A hint under a field or a panel. `.lp-section-note` is the section-level
   version; this is the inline one admin.js has been emitting since v1.66.1. */
.lp-hint{font-size:12.5px;color:var(--ink-3);line-height:1.55;margin:8px 0 0;}
.lp-list{margin-bottom:2px;}
/* An empty list is a valid state (it hides the section), so it is labelled
   rather than left as a blank gap that reads as a rendering failure. */
.lp-empty{
  margin:0;padding:12px 14px;border:1px dashed var(--edge);border-radius:var(--r-sm);
  font-size:12.5px;color:var(--ink-3);background:var(--bg-2);
}
.lp-add{margin-top:8px;}

/* Subheading inside a landing section, for grouped field blocks. */
.lp-sub{
  margin:22px 0 0;font-size:13px;letter-spacing:.02em;color:var(--ink);
  padding-top:14px;border-top:1px solid var(--edge);
}
.lp-img-field{display:flex;align-items:center;gap:10px;flex-wrap:wrap;}
.lp-img-field select{flex:1;min-width:180px;}
.lp-field-shot{
  width:56px;height:40px;object-fit:cover;border-radius:4px;
  border:1px solid var(--edge);background:var(--bg-3);flex-shrink:0;
}

/* ---- image library (v1.36.0) ---- */
.lp-img-actions{display:flex;align-items:center;gap:8px;flex-shrink:0;}
.lp-upload{cursor:pointer;display:inline-flex;align-items:center;}
.lp-img-list{display:grid;gap:10px;margin-top:12px;}
.lp-img{
  display:flex;align-items:center;gap:13px;padding:10px 12px;
  border:1px solid var(--edge);border-radius:var(--r-sm);background:var(--bg-2);
}
.lp-img img{
  width:74px;height:52px;object-fit:cover;flex-shrink:0;border-radius:4px;
  background:var(--bg-3);border:1px solid var(--edge);
}
.lp-img-meta{min-width:0;flex:1;display:flex;flex-direction:column;gap:3px;}
.lp-img-path{
  font-family:var(--font-mono);font-size:11.5px;color:var(--ink-2);
  overflow:hidden;text-overflow:ellipsis;white-space:nowrap;
}
.lp-img-sub{font-size:12px;color:var(--ink-3);}
.lp-img-used{color:var(--teal);}
.lp-img-free{color:var(--ink-3);}
@media(max-width:600px){
  .lp-img{flex-wrap:wrap;}
  .lp-img-meta{flex-basis:100%;order:3;}
}
.lp-lbl{
  display:block;font-family:var(--font-mono);font-size:10.5px;letter-spacing:.1em;
  text-transform:uppercase;color:var(--ink-2);margin:14px 0 6px;
}
/* v1.99.226 — a field's limit, said beside its label (refused over it, never cut). */
.lp-lim{text-transform:none;letter-spacing:0;color:var(--ink-3);}
.lp-input,.lp-area{width:100%;}
.lp-area{min-height:64px;}
#landingForm input,#landingForm textarea{background:var(--bg-3);}
#landingForm .lp-repeat-row{
  display:flex;gap:8px;margin-bottom:8px;align-items:center;
}
#landingForm .lp-repeat-block{
  border:1px solid var(--edge);border-left:3px solid var(--teal);
  border-radius:var(--r-sm);padding:13px;margin-bottom:10px;background:var(--bg-2);
}
#landingForm .lp-repeat-block input,
#landingForm .lp-repeat-block textarea{background:var(--bg-3);}
#landingForm .btn.danger.sm{flex-shrink:0;padding:6px 11px;}
@media(max-width:600px){
  #landingForm .lp-repeat-row{flex-wrap:wrap;}
  #landingForm .lp-repeat-row input{min-width:130px;}
}

/* ============================================================
   SECTION HEADERS & SHARED FORM FURNITURE
   (Users · AI & Keys · Usage · Settings · Security)
   ============================================================ */
.sec-head{
  display:flex;align-items:baseline;gap:12px;flex-wrap:wrap;
  margin:32px 0 12px;padding-bottom:10px;border-bottom:1px solid var(--edge);
}
.sec-head h2{margin:0;font-size:19px;}
.sec-tag{
  font-family:var(--font-mono);font-size:9.5px;text-transform:uppercase;
  letter-spacing:.14em;color:var(--ink-3);margin-left:auto;white-space:nowrap;
}

/* a horizontal control strip that wraps cleanly instead of overflowing */
.form-inline{display:flex;gap:10px;flex-wrap:wrap;align-items:center;}
.form-inline-tight{margin-top:14px;}
.form-inline .grow{flex:1;min-width:200px;}
.form-inline .wide{min-width:240px;}
.form-inline input,.form-inline select{min-width:140px;}
@media(max-width:560px){
  .form-inline{flex-direction:column;align-items:stretch;}
  .form-inline input,.form-inline select,.form-inline .btn{width:100%;min-width:0;}
  .form-inline .grow{min-width:0;}
}

.block{width:100%;}
.hint{font-size:12.5px;color:var(--ink-3);}
.card-note{margin-top:14px;font-size:12.5px;color:var(--ink-3);}
.empty-note{padding:12px 0 2px;font-size:13px;}
.card-actions{display:flex;gap:12px;align-items:center;flex-wrap:wrap;margin-top:20px;}
.card-actions .okmsg,.card-actions .err{margin-top:0;}
.card-foot{
  display:flex;justify-content:space-between;align-items:center;gap:12px;
  flex-wrap:wrap;margin-top:18px;padding-top:16px;border-top:1px solid var(--edge);
}

/* label + description on the left, control hard right */
.set-row{display:flex;justify-content:space-between;align-items:center;gap:18px;}
.set-copy{min-width:0;}
.set-copy strong{font-size:15px;}
.set-desc{font-size:12.5px;margin-top:4px;}

/* ============================================================
   AI FEATURES
   ============================================================ */
.feat-row{
  display:flex;justify-content:space-between;align-items:center;gap:16px;
  flex-wrap:wrap;padding:15px 0;border-bottom:1px solid var(--edge);
}
#featureList .feat-row:last-child{border-bottom:none;padding-bottom:4px;}
#featureList .feat-row:first-child{padding-top:2px;}
.feat-main{flex:1;min-width:220px;}
.feat-name{display:flex;align-items:center;gap:9px;flex-wrap:wrap;font-size:15px;}
.feat-desc{font-size:12.5px;margin-top:4px;}
.feat-controls{display:flex;align-items:center;gap:10px;flex-wrap:wrap;}
.feat-controls select{font-size:13px;padding:8px 11px;max-width:190px;}
@media(max-width:640px){
  .feat-controls{width:100%;}
  .feat-controls select{flex:1;min-width:130px;max-width:none;}
}

/* ============================================================
   VOICE STUDIO
   ============================================================ */
.voice-status{margin-top:16px;}
.voice-status:empty{margin-top:0;}
.voice-list{margin-top:14px;}
.voice-row{
  display:flex;align-items:center;justify-content:space-between;gap:12px;
  flex-wrap:wrap;padding:11px 12px;border-radius:var(--r-sm);
  border:1px solid transparent;transition:background .14s,border-color .14s;
}
.voice-row + .voice-row{margin-top:2px;}
.voice-row:hover{background:var(--bg-2);border-color:var(--edge);}
.voice-id{flex:1;min-width:170px;display:flex;align-items:center;gap:9px;flex-wrap:wrap;}
.voice-id strong{font-size:14.5px;}
.voice-meta{font-size:12px;flex-basis:100%;margin-top:-2px;}
#currentVoice{background:var(--violet-dim);color:var(--violet-d);}

/* ============================================================
   USAGE & BUDGET
   ============================================================ */
.budget-set{display:flex;align-items:center;gap:9px;flex-wrap:wrap;}
.budget-set .sub{font-size:12.5px;white-space:nowrap;}
.budget-set input{width:88px;padding:7px 10px;font-size:13.5px;}
.spend-num{
  font-family:var(--font-display);font-weight:900;font-size:38px;
  letter-spacing:-.02em;line-height:1.1;margin-top:14px;color:var(--ink);
}
.spend-of{font-family:var(--font-body);font-weight:400;font-size:15px;color:var(--ink-2);}

/* ---- per-provider budgets (v1.24.0) ----
   One tile per provider, each capped in its own unit. .prov-bar re-uses
   .bar-fill's modifiers, so the same warn/over colours mean the same thing
   here as they do on the total above. */
.prov-grid{
  display:grid;grid-template-columns:repeat(auto-fit,minmax(258px,1fr));
  gap:12px;margin-top:14px;
}
.prov{
  border:1px solid var(--edge);border-radius:var(--r-sm);
  /* --bg-1 has never existed (v1.74.1). brand.css defines --bg, --bg-2 and
     --bg-3; this asked for a token in between and got nothing, so the
     per-provider budget cards have been transparent on the panel background
     rather than raised off it. The same failure as v1.69.1's `--indigo`
     airflow, which simply drew nothing. --bg-2 is the raised-panel token and
     is what a card inside a card wants. */
  padding:13px 14px 14px;background:var(--bg-2);
}
.prov-name{
  display:flex;align-items:baseline;justify-content:space-between;gap:8px;
  font-weight:700;font-size:14.5px;color:var(--ink);
}
.prov-unit{
  font-family:var(--font-mono);font-size:9.5px;text-transform:uppercase;
  letter-spacing:.11em;color:var(--ink-3);font-weight:400;
}
.prov-fig{
  font-family:var(--font-display);font-weight:900;font-size:24px;
  letter-spacing:-.02em;line-height:1.15;margin-top:9px;color:var(--ink);
}
.prov-fig .prov-of{font-family:var(--font-body);font-weight:400;font-size:13px;color:var(--ink-2);}
.prov-left{font-size:12.5px;color:var(--ink-2);margin-top:7px;}
.prov-left strong{color:var(--ink);}
.prov .bar-track{margin-top:9px;}
.prov-set{display:flex;align-items:center;gap:7px;margin-top:11px;}
.prov-set input{flex:1;min-width:0;padding:6px 9px;font-size:13px;}
.prov-note{font-size:11.5px;color:var(--ink-3);margin-top:9px;line-height:1.45;}
.prov-msg{font-size:11.5px;margin-top:6px;min-height:1em;}
.prov.is-out{border-color:#EBD3AC;background:var(--amber-dim);}
.prov.is-off .prov-fig{color:var(--ink-2);}

/* ============================================================
   SETTINGS
   ============================================================ */
/* v1.99.236: min(320px,100%), so on a screen narrower than 320 + the page's
   padding a column is never wider than its container (at 320 it asked for 320
   inside 284 and every card ran 18px past the edge, since before v1.99.234).
   At every width where 320px fits, the grid is exactly as before. */
.settings-cols{
  display:grid;grid-template-columns:repeat(auto-fit,minmax(min(320px,100%),1fr));
  gap:14px;align-items:start;max-width:900px;
}
.settings-cols .card{margin-bottom:0;}
.settings-cols label:first-of-type{margin-top:0;}

/* ============================================================
   ACCESS — plans & voucher codes (v1.41.0)
   ============================================================ */

/* The feature checkboxes. Built from the server's registry, so the
   count is not known here — auto-fit rather than a fixed column
   count means a fifth feature needs no CSS edit either. */
.plan-feats{
  display:grid;grid-template-columns:repeat(auto-fit,minmax(260px,1fr));
  gap:8px;margin-top:6px;
}
.plan-feat{
  display:flex;gap:10px;align-items:flex-start;
  border:1px solid var(--edge);border-radius:var(--r-sm);
  padding:10px 12px;background:var(--bg-2);cursor:pointer;
}
.plan-feat input{margin-top:3px;flex:none;}
.plan-feat strong{display:block;font-size:13.5px;}
.plan-feat .sub{font-size:12px;margin-top:2px;line-height:1.45;}

/* A code is read off a screen and typed by hand, so it is set in a
   monospace face with generous tracking — the grouping dashes are
   added at render time by formatCode(). */
.vcode{
  font-family:ui-monospace,SFMono-Regular,Menlo,Consolas,monospace;
  font-size:13.5px;letter-spacing:.06em;font-weight:600;white-space:nowrap;
}
.vcode-copy{cursor:pointer;}
/* The 2FA enrollment QR code (v1.99.46). Its colours are fixed black on white
   inside the SVG, deliberately not theme tokens — see qrSvg() in admin.js. A
   version-8 code is 57 modules + the 8-module quiet zone, so 220px gives each
   module ~3.4 CSS px: comfortably above what a phone camera needs. */
.twofa-qr{display:block;width:220px;max-width:100%;height:auto;margin:0 0 12px;border-radius:4px;}

/* The just-generated batch. Shown once, above the full table, because
   the whole point of generating fifty codes is copying them somewhere
   else immediately. */
.vfresh{
  border:1px solid var(--teal);border-radius:var(--r-sm);
  background:var(--teal-dim);padding:12px 14px;margin-top:12px;
}
.vfresh-head{
  display:flex;align-items:center;gap:10px;flex-wrap:wrap;
  font-weight:700;font-size:13.5px;color:var(--teal-d);margin-bottom:8px;
}
.vfresh-codes{
  display:grid;grid-template-columns:repeat(auto-fill,minmax(150px,1fr));
  gap:4px 12px;max-height:240px;overflow:auto;
}
/* Recovery codes are 19 characters with their separators — half again
   as long as a voucher code — and they are TRANSCRIBED BY HAND, often
   onto paper, by someone who has just lost their phone. At the voucher
   width they overflow their cell and run together, which is the one
   thing this block cannot afford. */
.vfresh-codes.wide{grid-template-columns:repeat(auto-fill,minmax(210px,1fr));}
.vfresh-codes.wide .vcode{font-size:14px;letter-spacing:.08em;}

/* Feature pills in the plans table: on-brand when carried, muted
   when not, and always carrying the feature's NAME — never colour
   alone, the same rule the printable report follows. */
.feat-pills{display:flex;gap:5px;flex-wrap:wrap;}

/* ============================================================
   AUDIT LOG (v1.50.0)
   ============================================================ */
/* An action name is an identifier, not prose — monospace so
   user.suspend and user.restore are told apart at a glance. */
.au-action{
  font-family:ui-monospace,SFMono-Regular,Menlo,Consolas,monospace;
  font-size:12.5px;white-space:nowrap;
}
/* The summary is one line; the full JSON is on hover. An audit table
   people actually scan has to stay one row per action. */
.au-detail{
  display:block;max-width:42ch;overflow:hidden;text-overflow:ellipsis;
  white-space:nowrap;cursor:help;
}
#auditTable td{vertical-align:top;}

/* ==================== LEGAL DOCUMENTS (v1.62.0) ====================
   Reuses the landing CMS's .lp-* form furniture — same editing pattern, so it
   should look like the same thing. Only what is genuinely different is here. */

/* The status line. It carries a WORD ("Draft" / "In force"), never colour
   alone: the same rule the printable report follows, and the difference
   between the documents being publishable or not is not something to encode
   in a hue. */
.lg-status{
  padding:14px 16px;margin:0 0 18px;
  border-left:4px solid var(--amber);
  font-size:14px;
}
.lg-status.on{border-left-color:var(--teal);}

.lg-hint{
  margin:4px 0 16px;font-size:12.5px;color:var(--ink-3);line-height:1.5;
}
.lg-hint code{font-family:var(--font-mono);font-size:11.5px;}
.lg-help .lp-section-note code{
  background:var(--bg);border:1px solid var(--edge);
  border-radius:4px;padding:1px 5px;font-family:var(--font-mono);font-size:11.5px;
  white-space:nowrap;
}
.lg-view{
  font-size:12.5px;font-weight:600;color:var(--ink-2);text-decoration:none;
  font-family:var(--font-mono);
}
.lg-view:hover{color:var(--teal);}

/* A legal section is mostly prose, so the box it is written in should be big
   enough to see a paragraph — the landing page's one-line fields are the
   wrong shape for this. */
.lg-item{margin-bottom:14px;}
.lg-area{
  min-height:170px;margin-top:8px;width:100%;
  font-family:var(--font-mono);font-size:12.5px;line-height:1.6;
  resize:vertical;
}
.lg-item .lp-item-row{display:flex;gap:6px;align-items:center;}
.lg-item .btn[disabled]{opacity:.35;cursor:not-allowed;}

/* ---- pick-lists in the content editor (v1.63.0) ----
   The first non-text control in this form. Real sounds, chosen from a list,
   because a typo'd phoneme id is a recommendation pointing at a drill that
   does not exist — and nothing reviews it now that languages are editable. */
.ct-picks{
  display:grid;grid-template-columns:repeat(auto-fit,minmax(215px,1fr));
  gap:6px;margin:2px 0 4px;
}
/* .ce-form label{padding-top:11px} is for the left-hand column; a pick box is
   also a <label> and inherited it, sitting its text off-centre. */
.ce-form .ct-pick{padding-top:8px;}
.ct-pick{
  display:flex;align-items:center;gap:9px;
  padding:8px 11px;border:1px solid var(--edge);border-radius:var(--r-sm);
  background:var(--bg-2);font-size:13px;cursor:pointer;
}
.ct-pick:hover{border-color:var(--edge-2);}
/* .ce-form sets `input{width:100%}` for its text fields, and a checkbox is an
   input — so each box was taking the whole 283px cell and squeezing its own
   label to a couple of characters. Found by looking at the rendered panel;
   nothing errored. */
.ct-pick input[type=checkbox]{margin:0;flex:none;width:16px;height:16px;min-width:16px;accent-color:var(--teal);}
.ct-pick > span{flex:1 1 auto;min-width:0;line-height:1.35;}
.ct-pick-sym{
  font-family:var(--font-mono);font-size:14px;color:var(--teal-d);
  min-width:1.3em;display:inline-block;
}
/* State carries a WORD as well as a colour — the same rule the report and the
   Sentinel feed follow. */
.ct-pick.is-draft{opacity:.75;}
.ct-pick-draft{font-size:11px;color:var(--amber);display:block;}
/* A neutral fact about an item in a picker — what KIND it is — as against
   .ct-pick-draft above, which is amber because it warns that learners cannot
   see the thing. Sharing that class made a rewrite exercise look like a
   problem, and made a drafted rewrite show the same colour twice for two
   unrelated reasons. */
.ct-pick-kind{font-size:11px;color:var(--ink-3);display:block;letter-spacing:.04em;}
.ct-pick.is-gone{border-color:var(--red);background:var(--red-dim);}
.ct-pick-gone{font-size:11px;color:var(--red);display:block;}
.ct-picks-wrap{min-width:0;}
.ct-pick-hint{font-size:12px;color:var(--ink-3);margin:6px 0 0;}

/* ---- agencies (v1.64.0) ---- */
.ag-admin{padding:16px 18px;margin-bottom:10px;}
.ag-admin.is-paused{border-left:3px solid var(--amber);}
.ag-admin-head{display:flex;justify-content:space-between;gap:16px;flex-wrap:wrap;align-items:flex-start;}
.ag-admin-name{font-size:15.5px;}
.ag-admin-sub{font-size:12.5px;color:var(--ink-3);margin-top:3px;}
/* v1.99.147 — the agency's WhatsApp line; Clear sits inline beside the number. */
.ag-admin-wa{display:flex;flex-wrap:wrap;align-items:center;gap:4px 8px;}
.ag-admin-wa .okmsg{margin-top:0;min-height:0;}
.ag-admin-usage{display:flex;gap:14px;font-family:var(--font-mono);font-size:12px;color:var(--ink-2);}
.ag-admin-usage .ag-over{color:var(--red);font-weight:700;}
.ag-admin-actions{display:flex;gap:7px;flex-wrap:wrap;margin-top:12px;}
.ag-pass-row{display:flex;gap:8px;align-items:center;}
.ag-pass-row .lp-input{flex:1;}
.ag-edit{margin-top:14px;padding-top:14px;border-top:1px solid var(--edge);}
.ag-edit-grid{display:grid;grid-template-columns:150px 1fr;gap:8px 14px;align-items:center;}
.ag-edit-grid .lp-lbl{margin:0;padding:0;}
.ag-edit-actions{display:flex;gap:8px;align-items:center;margin-top:12px;flex-wrap:wrap;}
@media(max-width:720px){ .ag-edit-grid{grid-template-columns:1fr;gap:4px;} }
.ag-plan-row{display:flex;gap:10px;align-items:center;flex-wrap:wrap;margin-top:12px;}
.ag-plan-row .lp-lbl{margin:0;min-width:150px;}
.ag-plan-row select{flex:1;min-width:180px;}
/* v1.99.215 — the renewal rule, said beside the button that does it. */
.ag-renew-rule{margin:0;flex-basis:100%;font-size:12.5px;}
/* v1.99.216 — the plan section's own confirmation line, under its buttons. */
.ag-plan-msg{margin:0;flex-basis:100%;font-size:13px;font-weight:600;color:var(--teal-d);min-height:0;}
.ag-plan-msg.is-bad{color:var(--red);}
.ag-plan-msg:empty{display:none;}
/* v1.99.216 — plans ending soon, one per line, in the Overview's agency banner. */
.ag-alert-list{margin:6px 0 4px;padding-left:18px;}
.ag-alert-list li{margin:3px 0;overflow-wrap:break-word;}
.ag-alert-wa{margin-left:6px;}
/* v1.81.0 — an agency may hold several plans, so the editor lists them with a
   Remove on each. One row per assignment, each carrying its own expiry in
   WORDS, because "which of these has run out" is the question this answers. */
.ag-plans{margin-top:12px;}
.ag-plan-list{list-style:none;margin:6px 0 0;padding:0;display:flex;flex-direction:column;gap:6px;}
/* v1.84.0 — the learner cap sits on the same row as the plan it limits, with
   the live count beside it in WORDS ("3 of 5 places"), because "am I full" is
   the question an operator opens this to answer. */
.ag-plan-use{color:var(--ink-3);}
.ag-plan-capset{display:inline-flex;align-items:center;gap:8px;flex-wrap:wrap;}
.ag-plan-capset .lp-lbl{margin:0;display:inline-flex;align-items:center;gap:6px;}
.lp-input.sm{width:86px;padding:5px 8px;font-size:13px;}
.lp-lbl.sm{font-size:12px;}

/* GENERATE CODES — a label beside each of the two number boxes (v1.99.35).

   The same shape .ag-plan-capset above already uses, deliberately: a micro
   label sitting BESIDE its field rather than above it, so the row keeps its
   single-line rhythm against the plan select, which .form-inline centres on
   the cross axis. Scoped by the view rather than given its own class, because
   there is nothing here that .lp-lbl does not already describe. The label
   wraps rather than clipping, and the phone rule in .form-inline still stacks
   the row and stretches the inputs. */
#view-vouchers .form-inline .lp-lbl{
  margin:0;display:inline-flex;align-items:center;gap:8px;flex-wrap:wrap;
}
.ag-plan-list li{display:flex;align-items:center;justify-content:space-between;gap:10px;
  padding:8px 11px;border:1px solid var(--edge);border-radius:var(--r-sm);background:var(--bg-2);
  font-size:13.5px;flex-wrap:wrap;}
/* The dashboard warning. A word, then the names — never a bare colour. */
.ag-alert{
  padding:14px 16px;margin:0 0 18px;border-radius:var(--r-sm);
  border:1px solid var(--amber);border-left-width:4px;background:var(--amber-dim);font-size:14px;
}
.ag-alert.is-expired{border-color:var(--red);background:var(--red-dim);}
.ag-alert b{display:block;margin-bottom:4px;}
.ag-alert a{color:inherit;text-decoration:underline;cursor:pointer;}

/* ---- branding review (v1.66.1) ----
   Built for a judgement, not a toggle: the submitted mark is shown as a
   learner would see it, beside the account's real name. */
.ag-brand-panel{padding-top:16px;}
.ag-brand-h{font-family:var(--font-display);font-size:16px;margin:0 0 12px;}
.brand-review{display:grid;grid-template-columns:minmax(220px,300px) 1fr;gap:18px;align-items:start;margin-bottom:12px;}
.brand-preview{
  border:1px solid var(--edge);border-radius:var(--r);background:var(--bg-2);
  padding:16px;text-align:center;
}
.brand-preview-label{
  font-family:var(--font-mono);font-size:9.5px;letter-spacing:.16em;
  text-transform:uppercase;color:var(--ink-3);margin-bottom:12px;
}
.brand-preview-mark{display:flex;align-items:center;justify-content:center;gap:10px;margin-bottom:14px;}
.brand-preview-mark img{width:34px;height:34px;object-fit:contain;border-radius:8px;}
.brand-preview-dot{width:34px;height:34px;border-radius:9px;background:var(--teal-dim);display:inline-block;}
.brand-preview-name{font-family:var(--font-display);font-weight:900;font-size:18px;}
.brand-preview-foot{
  font-family:var(--font-mono);font-size:9px;letter-spacing:.1em;
  text-transform:uppercase;color:var(--ink-3);
}
.brand-facts{display:flex;flex-direction:column;gap:8px;font-size:13.5px;}
.brand-facts > div{display:flex;justify-content:space-between;gap:12px;border-bottom:1px solid var(--edge);padding-bottom:6px;}
.brand-facts span{color:var(--ink-3);}
.brand-facts b{text-align:right;word-break:break-all;}
.brand-ok{color:var(--teal-d);}
.brand-wait{color:var(--amber);}
.brand-warn{border-left:3px solid var(--amber);padding-left:10px;}
.brand-warn:empty{display:none;}
@media(max-width:760px){ .brand-review{grid-template-columns:1fr;} }

/* ---- articulation editor (v1.69.3) ----
   Dropdowns over a fixed vocabulary, never a text box: the diagram is drawn
   from these values, so a typo would be a sound with no picture. */
.art-grid{display:grid;grid-template-columns:repeat(auto-fit,minmax(150px,1fr));gap:10px;
  padding:12px;border:1px solid var(--edge);border-radius:var(--r-sm);background:var(--bg-2);
  margin-bottom:10px;}
.art-f label{display:block;margin:0 0 4px;font-size:11px;}
.art-f select{width:100%;}
.art-note{font-family:var(--font-mono);font-size:9.5px;letter-spacing:.06em;
  text-transform:uppercase;color:var(--ink-3);}

/* Site identity previews (v1.99.16). A fixed box either way, so the card does
   not jump when an image is added or cleared — and "built-in" is a WORD, not
   an empty square, because an empty square reads as a failed load. */
.site-asset{
  width:52px;height:52px;flex:0 0 auto;border-radius:var(--r-sm);
  border:1px solid var(--line);background:var(--bg-2);
  display:flex;align-items:center;justify-content:center;overflow:hidden;
}
.site-asset img{max-width:100%;max-height:100%;display:block;}
.site-asset-none{font-size:10.5px;color:var(--ink-3);text-align:center;line-height:1.2;}

/* v1.99.89 — the CEFR estimate's shadow card. The banner says who can see
   it; the range is the one large thing on the card, as it will be for a
   learner. */
.cefr-shadow{background:var(--amber-dim);border-radius:10px;padding:10px 12px;margin-bottom:14px;font-size:14px;color:var(--ink-2);}
.cefr-range{font-size:30px;font-weight:800;letter-spacing:-.01em;margin:4px 0 6px;color:var(--ink);}


/* v1.99.93 — the CEFR calibration view. A level's row heads its sets, so it
   is shaded like a sub-heading; a set row is indented under it. */
.cal-level td{background:var(--bg-2);font-weight:600;}
.cal-set td:first-child{padding-left:22px;}

/* v1.99.140 — Word reports. */
.rpa-tabs{display:flex;gap:8px;margin:0 0 14px;}
.rpa-tabs .rpa-on{background:var(--ink);color:#fff;border-color:var(--ink);}
.rpa-band{font-size:16px;margin:18px 0 10px;}
.rpa-group{margin-bottom:12px;}
.rpa-head{display:flex;flex-wrap:wrap;align-items:center;gap:8px;margin-bottom:4px;}
.rpa-missing{color:var(--red);font-size:13.5px;font-weight:600;}
.rpa-reasons{font-size:13.5px;color:var(--ink);margin-top:8px;}
.rpa-notes{margin:8px 0 0;padding-left:18px;font-size:13.5px;}
.rpa-notes li{margin:4px 0;}
.rpa-note{color:var(--ink);}
.rpa-actions{display:flex;flex-wrap:wrap;align-items:center;gap:8px;margin-top:12px;}
.rpa-actions select{font:inherit;font-size:13px;padding:6px 8px;border:1px solid var(--edge-2);border-radius:8px;max-width:100%;}
.rpa-why{font-size:12.5px;}

/* v1.99.153 — the Notifications Sent list's tools and the details panel. */
.push-tools{display:flex;flex-wrap:wrap;gap:6px;min-width:150px;}
.push-row-hidden td{opacity:.62;}
.push-detail{border:1px solid var(--edge-2);border-radius:12px;padding:14px 16px;margin:0 0 14px;background:var(--bg-2);}
.push-detail h3{margin:0;font-size:15.5px;}
.push-detail-text{margin:10px 0;overflow-wrap:anywhere;}
.push-detail-text div{margin-top:4px;}
.push-detail-facts{display:grid;grid-template-columns:auto 1fr;gap:4px 14px;margin:0 0 10px;font-size:14px;}
.push-detail-facts dt{color:var(--ink-2);}
.push-detail-facts dd{margin:0;overflow-wrap:anywhere;}
.push-outcome{margin:8px 0;font-size:14px;overflow-wrap:anywhere;}

/* v1.99.154 — scheduling, and agency sending. */
.push-schedule{margin-top:10px;align-items:center;}
.push-schedule label{display:inline;margin:0;}
.push-schedule input[type="datetime-local"]{font:inherit;padding:8px 10px;border:1px solid var(--edge-2);border-radius:10px;background:#fff;max-width:100%;}
.push-row-scheduled td:first-child{font-weight:600;}
.push-filter{display:flex;flex-wrap:wrap;align-items:center;gap:8px;margin:0 0 12px;font-size:14px;}
.push-log{border:1px solid var(--edge-2);border-radius:12px;padding:12px 14px;margin:0 0 14px;}
.push-log h3{margin:0 0 6px;font-size:15px;}
.push-log ul{margin:0;padding-left:18px;font-size:14px;}
.push-log li{margin:6px 0;overflow-wrap:anywhere;}
.push-agency{border-top:1px solid var(--edge-2);padding:12px 0;}
.push-agency-head{display:flex;flex-wrap:wrap;align-items:center;gap:8px;margin-bottom:4px;}
.push-agency-tools{margin-top:8px;align-items:center;}
.push-agency-tools label{display:inline;margin:0;}
.push-cap{width:64px;font:inherit;padding:6px 8px;border:1px solid var(--edge-2);border-radius:8px;}

/* v1.99.155 — the learner page. One column below 1000px; at 1280 the section
   links sit in a sticky left column. The links row scrolls sideways inside
   itself on a tablet, never the page; on a phone it is hidden and each
   section is its own collapsible header. */
.lr-name{background:none;border:0;padding:0;font:inherit;font-weight:700;color:var(--teal-d);cursor:pointer;text-align:left;text-decoration:underline;text-underline-offset:3px;}
.lr-name:hover{color:var(--teal);}
.lr-back{margin-bottom:10px;}
.lr-head{margin-bottom:16px;}
/* v1.99.156 — the summary: four facts across, two by two on a phone. */
.lr-sum{display:grid;grid-template-columns:repeat(4,minmax(0,1fr));gap:14px 20px;font-size:14.5px;}
.lr-sum-cell{min-width:0;overflow-wrap:anywhere;}
.lr-sum-cell .sub{font-size:13px;margin-top:2px;}
.lr-k{display:block;font-family:var(--font-mono);font-size:10.5px;letter-spacing:.1em;text-transform:uppercase;color:var(--ink-2);margin-bottom:4px;}
.lr-prints{display:flex;flex-wrap:wrap;align-items:center;gap:10px;margin-top:16px;padding-top:14px;border-top:1px solid var(--edge-2);}
.lr-prints a.btn{text-decoration:none;}
.lr-nocert{font-size:13px;}
.lr-manage{display:flex;flex-wrap:wrap;gap:12px 22px;margin-top:14px;padding:14px;border:1px solid var(--edge-2);border-radius:12px;background:var(--bg-2);}
.lr-manage[hidden]{display:none;}
.lr-act{display:flex;flex-wrap:wrap;align-items:center;gap:8px;}
.lr-act label{display:inline;margin:0;}
.lr-act input,.lr-act select{font:inherit;font-size:14px;padding:7px 10px;border:1px solid var(--edge-2);border-radius:10px;background:#fff;max-width:100%;min-width:0;}
.lr-note{margin-top:10px;}
#lrActMsg:empty{display:none;}
/* The one navigation: a row of tabs that wraps (nothing hidden off screen),
   and a left column of the same tabs on a wide screen. */
.lr-layout{display:block;}
.lr-tabs{display:flex;flex-wrap:wrap;gap:6px;margin-bottom:12px;}
.lr-tab{font:inherit;font-size:13.5px;padding:7px 13px;border:1px solid var(--edge-2);border-radius:999px;background:#fff;color:var(--ink);cursor:pointer;white-space:nowrap;}
.lr-tab:hover{border-color:var(--teal);}
.lr-tab[aria-selected="true"]{background:var(--teal);border-color:var(--teal);color:#fff;font-weight:600;}
.lr-tab:focus-visible{outline:2px solid var(--teal-d);outline-offset:2px;}
.lr-panels{min-width:0;}
.lr-panel{padding:18px 20px;overflow-wrap:anywhere;max-width:900px;}
.lr-panel[hidden]{display:none;}
.lr-h2{font-size:18px;margin:0 0 12px;}
.lr-dl{display:grid;grid-template-columns:minmax(140px,auto) 1fr;gap:7px 16px;margin:0;font-size:14.5px;}
.lr-dl dt{color:var(--ink-2);}
.lr-dl dd{margin:0;}
.lr-h3{font-size:14.5px;margin:18px 0 6px;}
.lr-list{margin:0;padding-left:18px;font-size:14.5px;}
.lr-list li{margin:5px 0;}
.lr-need{list-style:none;padding:0;}
.lr-need li{padding:7px 0;border-bottom:1px solid var(--edge-2);}
.lr-cols{columns:2 220px;}
.lr-devs{list-style:none;padding:0;}
.lr-dev{display:flex;justify-content:space-between;align-items:center;gap:12px;padding:8px 0;border-bottom:1px solid var(--edge-2);}
.lr-dev a.btn{text-decoration:none;flex:0 0 auto;}
.lr-tl{list-style:none;margin:0;padding:0;font-size:14.5px;}
.lr-tl li{display:grid;grid-template-columns:170px 1fr;gap:12px;padding:7px 0;border-bottom:1px solid var(--edge-2);}
.lr-tl-at{color:var(--ink-2);font-size:13px;}
.lr-tl-signin_failed .lr-tl-text{color:var(--red);}
.lr-more{margin-top:12px;}
.lr-panel td.num,.lr-panel th.num{text-align:right;}
@media (min-width:1001px){
  .lr-layout{display:grid;grid-template-columns:200px minmax(0,1fr);gap:18px;align-items:start;}
  .lr-tabs{flex-direction:column;flex-wrap:nowrap;position:sticky;top:16px;margin:0;}
  .lr-tab{text-align:left;border-radius:10px;}
}
@media (max-width:700px){
  .lr-sum{grid-template-columns:repeat(2,minmax(0,1fr));gap:12px 14px;}
  .lr-prints{flex-direction:column;align-items:stretch;}
  .lr-prints .btn{width:100%;text-align:center;justify-content:center;}
  .lr-dl{grid-template-columns:1fr;gap:2px;}
  .lr-dl dd{margin-bottom:8px;}
  .lr-tl li{grid-template-columns:1fr;gap:2px;}
  .lr-panel{padding:14px 16px;}
  .lr-act{width:100%;}
  .lr-act input,.lr-act select{flex:1 1 160px;}
  .lr-manage{padding:12px;}
}

/* ============================================================
   MENU AND PANEL COLOUR (v1.99.214; the menus since v1.99.218) — System
   Settings' picker. The preview's panels are login-panel.css's own
   (.lgp-preview there). The little menu and top bar read the same --menu-*
   tokens the real menus read; login-panel.css's ":root,.lgp-preview" rule
   resolves them on the preview box, where SiteBrand.applyPanel paints the pick.
   ============================================================ */
.mp-row{display:grid;grid-template-columns:minmax(0,200px) minmax(0,1fr);gap:10px;}
.mp-rail{position:relative;overflow:hidden;border-radius:10px;padding:12px 10px 10px 12px;color:#F2F6F5;
  background:radial-gradient(160px 120px at 16% 8%,var(--menu-g1),transparent 70%),
             radial-gradient(160px 120px at 90% 92%,var(--menu-g2),transparent 70%),
             linear-gradient(165deg,var(--menu-1) 0%,var(--menu-m) 46%,var(--menu-2) 100%);}
.mp-brand{display:flex;align-items:center;gap:8px;margin:0 2px 10px;min-width:0;}
.mp-mark{width:18px;height:18px;border-radius:5px;flex:none;border:1.5px solid var(--menu-mark);
  background:color-mix(in srgb,var(--menu-mark) 16%,transparent);}
.mp-word{font-family:var(--font-display);font-weight:900;font-size:14px;color:#FFFFFF;min-width:0;
  overflow:hidden;text-overflow:ellipsis;white-space:nowrap;}
.mp-label{font-family:var(--font-mono);font-size:9px;letter-spacing:.2em;text-transform:uppercase;color:var(--menu-ink-3);margin:0 6px 5px;}
.mp-item{position:relative;display:flex;align-items:center;gap:8px;padding:6px 8px;border-radius:8px;font-size:12.5px;color:var(--menu-ink-2);}
.mp-item.is-on{background:rgba(255,255,255,.1);color:#FFFFFF;font-weight:600;}
.mp-item.is-on::before{content:"";position:absolute;left:-12px;top:50%;transform:translateY(-50%);width:3px;height:14px;
  border-radius:0 3px 3px 0;background:var(--menu-a);}
.mp-ic{width:10px;height:10px;border-radius:3px;border:1.5px solid currentColor;flex:none;opacity:.8;}
.mp-item.is-on .mp-ic{color:var(--menu-a);opacity:1;}
.mp-tag{margin-left:auto;font-family:var(--font-mono);font-size:8px;letter-spacing:.1em;padding:1px 5px;border-radius:5px;
  background:var(--menu-tag-bg);color:var(--menu-tag-ink);border:1px solid var(--menu-tag-line);}
.mp-out{margin:10px 8px 0;padding-top:8px;border-top:1px solid rgba(242,246,245,.12);font-size:12px;font-weight:600;color:var(--menu-out);}
.mp-phone{border:1px solid var(--edge);border-radius:12px;overflow:hidden;background:var(--bg);align-self:start;min-width:0;}
.mp-top{display:flex;align-items:center;gap:9px;height:40px;padding:0 12px;
  background:linear-gradient(120deg,var(--menu-1),var(--menu-mt) 58%,var(--menu-2));}
.mp-hamb{width:24px;height:22px;border-radius:6px;border:1px solid rgba(242,246,245,.12);background:rgba(255,255,255,.08);
  color:#F2F6F5;font-size:11px;display:flex;align-items:center;justify-content:center;flex:none;}
.mp-page{height:60px;}
@media(max-width:560px){.mp-row{grid-template-columns:minmax(0,1fr);}}
.lgp-swatches{display:flex;flex-wrap:wrap;gap:8px;margin-top:10px;}
.lgp-sw{display:inline-flex;align-items:center;gap:8px;padding:7px 12px 7px 8px;font:inherit;font-size:13px;
  color:var(--ink);background:var(--bg-3);border:1px solid var(--edge-2);border-radius:999px;cursor:pointer;}
.lgp-sw:hover{border-color:var(--ink-3);}
.lgp-sw[aria-pressed="true"]{border-color:var(--ink);box-shadow:0 0 0 1px var(--ink);font-weight:600;}
.lgp-sw:focus-visible{outline:2px solid var(--ink);outline-offset:2px;}
.lgp-sw-dot{position:relative;width:20px;height:20px;border-radius:50%;flex-shrink:0;}
.lgp-sw-acc{position:absolute;right:-1px;bottom:-1px;width:9px;height:9px;border-radius:50%;border:1.5px solid var(--bg-3);}

/* ---------- v1.99.231 — the course exam test bench ---------- */
.ex-off{margin:0;font-size:15px;color:var(--ink);}
.ex-small{font-size:12.5px;margin-top:2px;}
.ex-check{display:flex;gap:9px;align-items:flex-start;font-weight:500;margin-top:12px;cursor:pointer;
  text-transform:none;letter-spacing:0;font-family:inherit;font-size:14px;color:var(--ink);}
.ex-check input{margin-top:3px;flex:none;}
/* v1.99.235 — R6: the exam times card */
.ex-times{display:grid;grid-template-columns:repeat(auto-fill,minmax(min(240px,100%),1fr));gap:10px 16px;margin-top:8px;}
.ex-time label{display:block;font-weight:600;font-size:13px;}
.ex-time input{width:6em;font-size:16px;padding:6px 8px;margin:4px 8px 0 0;}
.ex-rules{margin:0;padding-left:20px;color:var(--ink-2);font-size:14px;line-height:1.55;}
.ex-rules li{margin:4px 0;}
.ex-secs{margin:6px 0 12px;padding-left:20px;font-size:14px;color:var(--ink-2);line-height:1.6;}
.ex-clock{font-size:20px;font-weight:700;color:var(--ink);padding:10px 12px;border-radius:10px;background:var(--bg-2);margin:4px 0 8px;}
.ex-clock.is-low{background:var(--amber-dim);color:#8A6224;}
.ex-clock.is-up{background:var(--red-dim);color:var(--red);font-size:16px;}
.ex-title{font-size:16px;margin:14px 0 6px;}
.ex-item{border-top:1px solid var(--edge);padding-top:6px;margin-top:10px;}
.ex-passage{font-size:15px;line-height:1.6;background:var(--bg-2);border-radius:10px;padding:10px 14px;overflow-wrap:break-word;}
.ex-passage p{margin:6px 0;}
.ex-writing{white-space:normal;}   /* R4: the learner's exam writing, read by a full admin */
.ex-q{padding:10px 0;border-bottom:1px dashed var(--edge);}
.ex-prompt{font-size:15px;line-height:1.5;margin-bottom:8px;overflow-wrap:break-word;}
.ex-n{font-weight:700;color:var(--ink-2);}
.ex-opts{display:flex;flex-wrap:wrap;gap:8px;}
.ex-opt{font:inherit;font-size:14.5px;min-height:44px;padding:8px 14px;border-radius:10px;border:1.5px solid var(--edge);
  background:var(--card,#fff);color:var(--ink);cursor:pointer;text-align:left;max-width:100%;overflow-wrap:break-word;}
.ex-opt:hover{border-color:var(--teal);}
.ex-opt[aria-pressed="true"]{border-color:var(--teal);background:var(--teal-dim);color:var(--teal-d);font-weight:600;}
.ex-blank{display:flex;gap:8px;align-items:center;}
.ex-blank input{flex:1;min-width:0;font-size:16px;}
.ex-saved{font-size:12.5px;color:var(--ink-3);margin-top:6px;min-height:16px;}
.ex-result{font-size:20px;margin:6px 0;}
.ex-result.is-met{color:var(--ink);}
.ex-result.is-not{color:var(--ink);}
@media (max-width:600px){
  .ex-opts{flex-direction:column;}
  .ex-opt{width:100%;}
}
.ex-atts{list-style:none;margin:0;padding:0;}
.ex-att{display:flex;gap:10px;align-items:center;justify-content:space-between;padding:10px 0;border-top:1px solid var(--edge);}
.ex-att:first-child{border-top:0;}
.ex-att-main{min-width:0;flex:1;font-size:14.5px;overflow-wrap:break-word;}
.ex-att .btn{flex:none;}
.ex-q:last-child{border-bottom:0;}

/* ---------- v1.99.234 — R5: the course exam's marking screen (exam-mark-draw.js) ----------
   Shared by the agency portal and the admin panel (both load admin.css). Calm:
   no animation at all (so nothing for reduced motion to stop), every control
   at least 48px tall, the writing at 16px and wrapping at 320px. A Pass is not
   coloured here: the marker is deciding, not being told how somebody did. */
.xmk-waiting .card-head h2{font-size:18px;}
.xmk-banner{background:var(--amber-dim,#FBF0DC);color:#6E4E14;border-radius:10px;padding:10px 12px;margin:8px 0;font-size:15px;line-height:1.45;overflow-wrap:break-word;}
.xmk-banner.is-firm{border-left:4px solid var(--amber,#D98A1F);}
.xmk-list,.xmk-done,.xmk-spoken-list,.xmk-reads{list-style:none;margin:8px 0;padding:0;}
.xmk-row{display:flex;align-items:center;gap:10px;justify-content:space-between;flex-wrap:wrap;padding:10px 0;border-top:1px solid var(--edge,#E5E1D6);}
.xmk-row.is-overdue .xmk-row-main .sub{color:#6E4E14;}
.xmk-row-main{flex:1 1 200px;min-width:0;overflow-wrap:break-word;}
.xmk-open,.xmk-play,.xmk-submit{min-height:48px;min-width:96px;}
.xmk-done li{padding:4px 0;overflow-wrap:break-word;}
.xmk-small{font-size:13px;}
.xmk-head .xmk-title{margin:8px 0 4px;font-size:20px;overflow-wrap:break-word;}
.xmk-auto{margin:6px 0;}
.xmk-table td,.xmk-table th{padding:6px 8px;}
.xmk-writing{background:var(--bg-2,#F2EEE3);border-radius:10px;padding:12px 14px;margin:10px 0;font-size:16px;line-height:1.6;overflow-wrap:break-word;white-space:normal;}
.xmk-writing p{margin:6px 0;}
.xmk-h4{margin:12px 0 4px;font-size:15px;}
.xmk-spoken{padding:8px 0;border-top:1px dashed var(--edge,#E5E1D6);overflow-wrap:break-word;}
.xmk-spoken p{margin:4px 0 8px;}
.xmk-player{margin-top:8px;min-height:4px;}
.xmk-audio{width:100%;max-width:420px;}
.xmk-details{margin:10px 0;}
.xmk-details summary{cursor:pointer;min-height:44px;display:flex;align-items:center;}
.xmk-reads li{padding:3px 0;font-size:14px;overflow-wrap:break-word;}
.xmk-mark{margin:14px 0 4px;}
.xmk-mark-label{display:block;font-weight:600;margin-bottom:6px;}
.xmk-seg{display:flex;gap:8px;flex-wrap:wrap;}
.xmk-btn{font:inherit;font-size:15px;min-height:48px;min-width:96px;flex:1 1 96px;padding:10px 12px;border-radius:12px;
  border:1.5px solid var(--edge,#E5E1D6);background:#fff;color:var(--ink,#1C2436);cursor:pointer;}
.xmk-btn[aria-pressed="true"]{border-color:var(--teal);background:var(--teal-dim);color:var(--teal-d);font-weight:700;}
.xmk-btn:disabled{opacity:.5;cursor:not-allowed;}
.xmk-blocked{background:var(--bg-2,#F2EEE3);border-radius:10px;padding:10px 14px;margin:8px 0 12px;font-size:15px;overflow-wrap:break-word;}
.xmk-blocked ul{margin:4px 0;padding-left:18px;}
.xmk-blocked p{margin:4px 0;}
.xmk-results{margin:8px 0 12px;}
.xmk-final h3{margin-top:0;}
.xmk-pass{font-weight:600;}
.xmk-note-label{display:block;font-weight:600;margin:6px 0 4px;}
.xmk-note{font-size:16px;line-height:1.5;width:100%;box-sizing:border-box;}
.xmk-submit{margin-top:12px;width:100%;max-width:360px;}
.xmk-msg{min-height:20px;margin:8px 0 0;font-size:15px;overflow-wrap:break-word;}
.xmk-msg.is-bad{color:var(--red);}
.xmk-decided{border-left:4px solid var(--edge,#E5E1D6);}
@media (max-width:420px){
  .xmk-btn{flex-basis:100%;}
}
/* v1.99.238 — Remove old certificates (System Settings). */
.oc-counts{margin:6px 0 10px;padding-left:18px;font-size:14px;}
.oc-counts li{margin:4px 0;}

/* v1.99.241 — C3: the certificate signatory in an agency's Branding panel. */
.ag-sig{margin-top:14px;padding-top:10px;border-top:1px solid var(--edge);}
.ag-sig .okmsg{display:block;}
