/* ═══════════════════════════════════════════════════════════════════════
   EuroKids hub — one stylesheet, built from Apple's Human Interface
   Guidelines (docs/hig-brief.md). The rules that shape everything here:

   · NavigationSplitView: a 240 px sidebar for navigation only, a detail
     pane with one large title, one toolbar, one primary action.
   · Form.grouped / insetGrouped list: caption → white rounded card →
     rows ≥ 44 px with hairline separators inset to the label → footnote.
   · Buttons say their importance by style, never by size: filled accent
     for the one primary, tinted grey for the rest, red only when the
     action destroys something.
   · Semantic colour: red = overdue / destructive, orange = attention,
     green = paid. Never colour alone — always a word beside it.
   · macOS type scale on desktop (13 px body), iOS Large scale on phones
     (17 px body). Tabular numerals for every figure. No weight under 400.
   · Content scrolls under a translucent bar; nothing important lives at
     the very bottom of a window.
   ═══════════════════════════════════════════════════════════════════════ */

:root{
  --font:-apple-system,BlinkMacSystemFont,"SF Pro Text","SF Pro Display","Helvetica Neue",Inter,system-ui,sans-serif;
  --mono:ui-monospace,"SF Mono",Menlo,"IBM Plex Mono",monospace;
  /* macOS scale */
  --fs-lt:28px; --lh-lt:34px;  --fs-t1:22px; --lh-t1:28px;  --fs-t2:17px; --lh-t2:22px;
  --fs-t3:15px; --lh-t3:20px;  --fs-hd:14px; --lh-hd:18px;  --fs-body:14px; --lh-body:20px;
  --fs-co:13px; --lh-co:18px;  --fs-sub:12.5px; --lh-sub:16px; --fs-fn:11.5px; --lh-fn:15px;
  /* semantic colour, light */
  --label:#1D1D1F; --label-2:#5F5F66; --label-3:#9A9AA3; --label-4:rgba(0,0,0,.1);
  --sep:rgba(60,60,67,.16); --sep-strong:rgba(60,60,67,.3);
  --bg:#fff; --bg-grouped:#F4F4F6; --bg-card:#fff; --bg-side:#EFEFF3;
  --fill:rgba(120,120,128,.10); --fill-2:rgba(120,120,128,.18); --fill-3:rgba(120,120,128,.28);
  --field:#F1F1F4; --field-focus:#fff;
  --shadow-card:0 0 0 1px rgba(0,0,0,.05),0 1px 2px rgba(0,0,0,.04),0 6px 20px -12px rgba(0,0,0,.12);
  --c-fees:#0A7AFF; --c-comm:#AF52DE; --c-ref:#2AA198; --c-setup:#8E8E93;
  /* The school's own blue, taken from the JMD Enclave logo, not Apple's.
     An admin tool in default iOS blue looks like every other admin tool;
     this one belongs to a particular school and should say so. */
  --accent:#2B4A9B; --accent-dk:#213B7E; --accent-wash:rgba(43,74,155,.10);
  /* Right, wrong, warm, cold — read the way people already read colour, in
     natural tones rather than the neon a dashboard reaches for. Each is dark
     enough to put text on and muted enough to sit beside the others. */
  --red:#C0392B; --red-wash:rgba(192,57,43,.10);
  --orange:#B9741A; --orange-wash:rgba(185,116,26,.13);
  --green:#1E7A45; --green-wash:rgba(30,122,69,.12);
  --brand:#E8352A;
  --r-card:12px; --r-ctl:8px; --r-sheet:14px;
  --focus:0 0 0 3px rgba(10,122,255,.4);
  --sidebar:240px; --tbar:52px;
  /* legacy aliases, so older inline styles keep their meaning */
  --ink:var(--label); --muted:var(--label-2); --faint:var(--label-3); --bone:var(--bg);
  --line:var(--sep); --line-2:var(--sep-strong); --card:var(--bg-card);
  --good:var(--green); --good-wash:var(--green-wash); --warn:var(--orange); --warn-wash:var(--orange-wash);
  --crit:var(--red); --crit-wash:var(--red-wash); --r:var(--r-card); --label2:var(--label-2);
  --ios-bg:var(--bg-grouped);
}
@media(max-width:767px){
  :root{ --fs-lt:34px; --lh-lt:41px; --fs-t1:28px; --lh-t1:34px; --fs-t2:22px; --lh-t2:28px; --fs-t3:20px; --lh-t3:25px;
         --fs-hd:17px; --lh-hd:22px; --fs-body:17px; --lh-body:22px; --fs-co:16px; --lh-co:21px;
         --fs-sub:15px; --lh-sub:20px; --fs-fn:13px; --lh-fn:18px; }
}

/* ── reset ── */
*{box-sizing:border-box}
html,body{height:100%}
body{margin:0;background:var(--bg-grouped);color:var(--label);font-family:var(--font);font-size:var(--fs-body);line-height:var(--lh-body);
     -webkit-font-smoothing:antialiased;font-variant-numeric:tabular-nums}
h1,h2,h3{margin:0;font-weight:700;letter-spacing:-.01em}
button,input,select,textarea{font:inherit;color:inherit}
button{cursor:pointer}
a{color:var(--accent)}
:focus-visible{outline:none;box-shadow:var(--focus);border-radius:var(--r-ctl)}
.num{font-variant-numeric:tabular-nums}
.code,.uin{font-family:var(--mono);font-size:var(--fs-fn);color:var(--label-3);letter-spacing:.01em}
code{background:var(--fill);padding:1px 5px;border-radius:4px;font-size:var(--fs-fn);font-family:var(--mono)}
@media(prefers-reduced-motion:reduce){*{transition:none!important;animation:none!important}}

/* ── type styles ── */
.t-lt{font-size:var(--fs-lt);line-height:var(--lh-lt);font-weight:700;letter-spacing:-.02em}
.t-t2{font-size:var(--fs-t2);line-height:var(--lh-t2);font-weight:700}
.t-hd{font-size:var(--fs-hd);line-height:var(--lh-hd);font-weight:600}
.hint,.t-fn{font-size:var(--fs-co);line-height:var(--lh-co);color:var(--label-2)}
.t-sub{font-size:var(--fs-sub);line-height:var(--lh-sub);color:var(--label-2)}

/* ══ app shell: sidebar + detail ══ */
.shell{display:grid;grid-template-columns:var(--sidebar) 1fr;height:100vh;height:100dvh}
.sb{background:var(--bg-side);border-right:1px solid var(--sep);display:flex;flex-direction:column;padding:14px 10px 10px;overflow:auto}
.sb-brand{display:flex;align-items:center;gap:9px;padding:6px 10px 14px;font-weight:600;font-size:var(--fs-t3)}
.sb-brand .dot{width:14px;height:14px;border-radius:50%;background:radial-gradient(circle at 34% 32%,#FF7A5C,var(--brand) 62%,#A81E12)}
.sb-h{font-size:11.5px;font-weight:600;color:var(--label-3);padding:16px 10px 4px;letter-spacing:.05em;text-transform:uppercase}
.sb-i{display:flex;align-items:center;gap:10px;width:100%;min-height:34px;padding:6px 10px;border:0;background:none;border-radius:8px;
      text-align:left;font-size:var(--fs-body);font-weight:500;color:var(--label);text-decoration:none;cursor:pointer}
.sb-i:hover{background:rgba(0,0,0,.05)}
.sb-i.on{background:#fff;color:var(--label);box-shadow:0 0 0 1px rgba(0,0,0,.05),0 1px 3px rgba(0,0,0,.08);font-weight:600}
.sb-i .ic{width:24px;height:24px;border-radius:7px;display:inline-flex;align-items:center;justify-content:center;flex:none;color:#fff;background:var(--tint,var(--accent))}
.sb-i .ic svg{width:14px;height:14px}
.sb-i[data-sect="Fees"]{--tint:var(--c-fees)} .sb-i[data-sect="Communication"]{--tint:var(--c-comm)}
.sb-i[data-sect="Reference"]{--tint:var(--c-ref)} .sb-i[data-sect="Enquiries"]{--tint:#FF6B3D} .sb-i[data-sect="Setup"],.sb-i[data-sect="Apps"]{--tint:var(--c-setup)}
.sb-i .ct{margin-left:auto;font-size:var(--fs-sub);color:var(--label-2)} .sb-i.on .ct{color:rgba(255,255,255,.85)}
.sb-foot{margin-top:auto;padding:12px 10px 4px;border-top:1px solid var(--sep);display:flex;justify-content:space-between;align-items:center;gap:8px;font-size:var(--fs-co);color:var(--label-2)}
.sb-foot a{cursor:pointer;color:var(--accent);text-decoration:none}
.main{display:flex;flex-direction:column;min-width:0;overflow:auto;position:relative}
.tbar{position:sticky;top:0;z-index:20;height:var(--tbar);display:grid;grid-template-columns:auto 1fr auto;align-items:center;gap:12px;
      padding:0 20px;background:rgba(242,242,247,.75);backdrop-filter:blur(20px) saturate(1.8);-webkit-backdrop-filter:blur(20px) saturate(1.8);
      border-bottom:1px solid transparent;transition:border-color .15s}
.tbar.edge{border-bottom-color:var(--sep)}
.tbar .tt{font-size:var(--fs-t3);font-weight:600;opacity:0;transition:opacity .15s;white-space:nowrap;overflow:hidden;text-overflow:ellipsis}
.tbar.edge .tt{opacity:1}
.tbar .ib{width:32px;height:32px;border:0;background:none;border-radius:7px;display:inline-flex;align-items:center;justify-content:center;color:var(--accent)}
.tbar .ib:hover{background:var(--fill)}
.tbar .ib svg{width:18px;height:18px}
.content{padding:10px 28px 80px;max-width:1240px;width:100%}
.ph{display:flex;justify-content:space-between;align-items:flex-end;gap:16px;flex-wrap:wrap;margin:10px 0 18px}
.ph h1{font-size:var(--fs-lt);line-height:var(--lh-lt);font-weight:700;letter-spacing:-.025em}
.ph .s{font-size:var(--fs-body);line-height:var(--lh-body);color:var(--label-2);margin-top:4px;max-width:72ch}
.ph-r{display:flex;gap:8px;align-items:center;flex-wrap:wrap}
.loading{color:var(--label-3);padding:26px 0;font-size:var(--fs-body)}
/* skeleton rows while a list loads */
.skel{height:14px;border-radius:6px;background:linear-gradient(90deg,var(--fill) 25%,var(--fill-2) 50%,var(--fill) 75%);background-size:200% 100%;animation:sk 1.2s infinite}
@keyframes sk{to{background-position:-200% 0}}

/* sign-in and chooser are plain centred pages */
.page{min-height:100vh;display:flex;flex-direction:column;align-items:center;justify-content:center;padding:24px}
.page .card{width:100%;max-width:400px;padding:28px 26px}
.chooser{max-width:960px;width:100%}
.hello{font-size:var(--fs-lt);font-weight:700;letter-spacing:-.02em}
.askline{color:var(--label-2);font-size:var(--fs-t3);margin-top:4px}
.deck{display:grid;grid-template-columns:repeat(auto-fit,minmax(260px,1fr));gap:14px;margin-top:26px}
.doorwrap{position:relative;display:flex}
.door{background:var(--bg-card);border:0;box-shadow:0 0 0 .5px rgba(0,0,0,.06),0 1px 2px rgba(0,0,0,.04);border-radius:var(--r-card);padding:20px 20px 16px;text-align:left;
      display:flex;flex-direction:column;gap:6px;width:100%;transition:box-shadow .15s,transform .15s}
.door:hover:not(.shut){box-shadow:0 0 0 .5px rgba(0,0,0,.06),0 8px 24px rgba(0,0,0,.08);transform:translateY(-1px)}
.door h3{font-size:var(--fs-t3);font-weight:600} .door p{margin:0;color:var(--label-2);font-size:var(--fs-co)}
.door .open{color:var(--accent);font-weight:500;margin-top:6px;font-size:var(--fs-co)}
.door.shut{background:transparent;box-shadow:inset 0 0 0 1px var(--sep);cursor:not-allowed}
.door.shut h3,.door.shut p,.door.shut .open{color:var(--label-3)}
.soon{position:absolute;top:14px;right:14px;font-size:var(--fs-fn);color:var(--label-2);background:var(--fill);border-radius:999px;padding:2px 9px}

/* ══ controls ══ */
.btn{display:inline-flex;align-items:center;justify-content:center;gap:6px;min-height:34px;padding:6px 16px;border:0;border-radius:var(--r-ctl);
     background:linear-gradient(180deg,#2B8EFF,#0A7AFF);color:#fff;font-weight:600;font-size:var(--fs-body);line-height:1.2;white-space:nowrap;
     box-shadow:0 1px 2px rgba(10,122,255,.3),inset 0 1px 0 rgba(255,255,255,.18);transition:filter .12s,transform .06s}
.btn:hover{filter:brightness(1.06)} .btn:active{transform:translateY(1px)}
.btn:disabled{opacity:.45;cursor:default;transform:none}
.btn.line,.btn.ghost{background:#fff;color:var(--label);box-shadow:0 0 0 1px rgba(0,0,0,.1),0 1px 2px rgba(0,0,0,.05)}
.btn.line:hover,.btn.ghost:hover{background:#FAFAFB;filter:none}
.btn.danger{background:transparent;color:var(--red)} .btn.danger:hover{background:var(--red-wash)}
.btn.sm{min-height:28px;padding:3px 11px;font-size:var(--fs-co)}
.btn.lg{min-height:44px;padding:10px 20px;font-size:var(--fs-t3)}
.in{width:100%;min-height:34px;padding:6px 10px;border:1px solid rgba(0,0,0,.12);border-radius:var(--r-ctl);background:var(--bg);font-size:var(--fs-body);color:var(--label);box-shadow:0 1px 2px rgba(0,0,0,.03)}
.in:focus{outline:none;box-shadow:var(--focus);border-color:var(--accent)}
.in::placeholder{color:var(--label-3)}
select.in{appearance:none;-webkit-appearance:none;padding-right:26px;
  background-image:url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='10' height='14' viewBox='0 0 10 14'%3E%3Cpath d='M2 5.5 5 2.5l3 3M2 8.5l3 3 3-3' fill='none' stroke='%236E6E73' stroke-width='1.6' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E");
  background-repeat:no-repeat;background-position:right 8px center}
textarea.in{min-height:80px;line-height:var(--lh-body);resize:vertical}
input[type=checkbox]:not(.sw){width:16px;height:16px;accent-color:var(--accent);margin:0}
.fld{display:flex;flex-direction:column;gap:5px;margin-bottom:12px}
.fld label,.lb{font-size:var(--fs-co);font-weight:500;color:var(--label-2);display:block;margin-bottom:4px}
/* search field */
.search{position:relative}
/* White with a border: a grey field on the grey page was invisible. Safari also
   needs appearance reset or a type=search input ignores every style below. */
.search .in{appearance:none;-webkit-appearance:none;padding-left:32px;border-radius:9px;background:#fff;border:1px solid rgba(0,0,0,.14);box-shadow:0 1px 2px rgba(0,0,0,.04)}
.search .in:focus{border-color:var(--accent)}
.search .in::-webkit-search-decoration,.search .in::-webkit-search-cancel-button{-webkit-appearance:none;appearance:none}
.search::before{content:'';position:absolute;left:9px;top:50%;width:13px;height:13px;transform:translateY(-50%);
  background:url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 16 16'%3E%3Ccircle cx='6.5' cy='6.5' r='4.5' fill='none' stroke='%236E6E73' stroke-width='1.6'/%3E%3Cpath d='m10 10 4 4' stroke='%236E6E73' stroke-width='1.6' stroke-linecap='round'/%3E%3C/svg%3E") no-repeat center/contain;pointer-events:none}
/* switch */
.sw{position:relative;width:42px;height:25px;flex:none;appearance:none;-webkit-appearance:none;background:#D1D1D6;border-radius:999px;cursor:pointer;transition:background .2s;margin:0;box-shadow:inset 0 0 0 1px rgba(0,0,0,.04)}
.sw::after{content:'';position:absolute;top:2px;left:2px;width:21px;height:21px;border-radius:50%;background:#fff;box-shadow:0 2px 4px rgba(0,0,0,.25),0 0 0 .5px rgba(0,0,0,.06);transition:transform .2s cubic-bezier(.32,.72,0,1)}
.sw:checked{background:#34C759} .sw:checked::after{transform:translateX(17px)}
.sw:disabled{opacity:.4}
@media(max-width:767px){.sw{width:51px;height:31px}.sw::after{width:27px;height:27px}.sw:checked::after{transform:translateX(20px)}}
/* segmented control */
.seg{display:inline-flex;background:var(--fill);border-radius:8px;padding:2px;gap:2px}
.seg button{background:none;border:0;padding:4px 12px;border-radius:6px;font-size:var(--fs-body);color:var(--label);min-height:24px}
.seg button.on{background:#fff;box-shadow:0 1px 3px rgba(0,0,0,.12),0 0 0 .5px rgba(0,0,0,.04);font-weight:600}
/* chips: status (static) and filter (pressable) */
.chip{display:inline-flex;align-items:center;gap:5px;border:0;font-size:var(--fs-sub);font-weight:600;padding:2px 8px;border-radius:999px;line-height:1.4;white-space:nowrap}
.c-good{background:var(--green-wash);color:#176138} .c-warn{background:var(--orange-wash);color:#8A5410}
.c-crit{background:var(--red-wash);color:#A32B20} .c-mute{background:var(--fill);color:var(--label-2)} .c-acc{background:var(--accent-wash);color:var(--accent)}
.chips{display:flex;flex-wrap:wrap;gap:6px}
.chips .chip{cursor:pointer;background:#fff;color:var(--label);font-weight:500;padding:5px 12px;min-height:30px;user-select:none;box-shadow:0 0 0 1px rgba(0,0,0,.1);font-size:var(--fs-co)}
.chips .chip:hover{background:#F5F5F7}
.chips .chip.on{background:var(--accent);color:#fff;box-shadow:none}
.chips .chip b{opacity:.6;font-weight:600}
.pill-row{display:flex;flex-wrap:wrap;gap:8px;align-items:center}
.pill{display:inline-block;padding:4px 10px;border-radius:999px;background:var(--fill);font-size:var(--fs-co);font-weight:500}
.pill.big{background:var(--label);color:#fff;font-weight:600}
.pill.warn{background:var(--orange-wash);color:#8A4B00}
/* A row of pills used as a filter: one is pressed, the rest are not. The
   pressed one has to be obvious at a glance, because the count beside the
   heading is read as the whole list unless it is clear a filter is on. */
.pills{display:flex;flex-wrap:wrap;gap:6px;align-items:center}
.pills .pill{border:0;cursor:pointer;font-family:inherit;line-height:1.5;padding:5px 12px;
  color:var(--muted);transition:background .12s,color .12s}
.pills .pill:hover{background:var(--line)}
.pills .pill.on{background:var(--label);color:#fff;font-weight:600}
.err,.ok{padding:9px 12px;border-radius:var(--r-ctl);font-size:var(--fs-body);margin-bottom:12px;line-height:1.45}
.err{background:var(--red-wash);color:#B3232A} .ok{background:var(--green-wash);color:#157A3A}
.money-due{color:var(--red);font-weight:600} .money-ok{color:#157A3A;font-weight:600} .money-disc{color:#157A3A}
/* row of filter controls under a title */
.tools{display:flex;gap:8px;align-items:center;flex-wrap:wrap;margin:0 0 14px}
.tools .search{flex:1;min-width:200px;max-width:340px}
.tools select.in{width:auto}

/* ══ cards, stats, panels ══ */
.card,.panel,.stat,.box{background:var(--bg-card);border-radius:var(--r-card);box-shadow:var(--shadow-card)}
.card{padding:16px} .panel{margin-bottom:16px;overflow:hidden}
.ptop{padding:11px 16px;border-bottom:1px solid var(--sep);display:flex;justify-content:space-between;align-items:center;gap:12px;flex-wrap:wrap}
.ptop h2{font-size:var(--fs-t3);font-weight:600} .pbody{padding:16px}
.stats{display:grid;grid-template-columns:repeat(auto-fit,minmax(160px,1fr));gap:12px;margin-bottom:16px}
.stat{padding:12px 14px}
.stat .k{font-size:var(--fs-sub);font-weight:500;color:var(--label-2)}
.stat .v{font-size:26px;line-height:32px;font-weight:700;letter-spacing:-.025em;margin-top:4px}
.stat .m{font-size:var(--fs-sub);color:var(--label-2);margin-top:3px}
.stat.crit .v{color:var(--red)} .stat.good .v{color:#157A3A} .stat.warn .v{color:var(--orange)}

/* ══ grouped list (Form.grouped) ══ */
.grp{margin-top:22px}
.grp>h3{font-size:var(--fs-hd);font-weight:600;color:var(--label);margin:0 0 8px 4px;letter-spacing:-.005em}
@media(max-width:767px){.grp>h3{font-size:13px;text-transform:uppercase;font-weight:500;letter-spacing:.05em;color:var(--label-2);margin-left:16px}}
.grp .foot{font-size:var(--fs-co);line-height:var(--lh-co);color:var(--label-2);margin:6px 16px 0}
.grp .foot.warn{color:#8A4B00;background:var(--orange-wash);border-radius:var(--r-ctl);padding:8px 12px;margin:8px 0 0}
.grp .foot.warn a{color:inherit;font-weight:600}
.box{overflow:hidden}
.row{display:flex;align-items:center;justify-content:space-between;gap:16px;min-height:50px;padding:9px 16px 9px 0;margin-left:16px;font-size:var(--fs-body)}
.row+.row,.row+.rowx,.rowx+.row,.row+.note,.note+.row{border-top:1px solid var(--sep)}
.rowx{margin-left:16px;padding:9px 16px 9px 0}
.row .l{flex:0 0 auto;max-width:60%;color:var(--label)} .row .l.grow{flex:1}
.row .l .sub{display:block;font-size:var(--fs-sub);color:var(--label-2);margin-top:1px;white-space:normal}
.row .v{text-align:right;white-space:nowrap;color:var(--label)}
.row .v.mute{color:var(--label-2)} .row .v.credit{color:#157A3A} .row .v.due{color:var(--red)}
.row.total{font-weight:700} .row.total .v{font-size:var(--fs-t3)}
.row .in{border:0;background:var(--field);text-align:right;padding:6px 10px;min-height:32px;width:180px;max-width:45vw;border-radius:8px;box-shadow:none;font-size:var(--fs-body)}
.row .in:hover{background:#EBEBEF}
.row .in:focus{background:#fff;box-shadow:var(--focus)}
.row .in[readonly]{font-weight:700;pointer-events:none;background:transparent;padding-right:0}
.row select.in{text-align:left;padding-right:28px;width:auto;max-width:280px;color:var(--label)}
.row .in.wide{flex:1 1 160px;width:auto;min-width:0;max-width:none;text-align:left}
.row .in::placeholder{color:var(--label-3)}
.row textarea.in{text-align:left;width:100%;max-width:none;min-height:0;line-height:var(--lh-body)}
.rowx textarea.in{background:var(--field);border-radius:8px;padding:10px 12px;border:0;box-shadow:none}
.rowx textarea.in:focus{background:#fff;box-shadow:var(--focus)}
.row .chips{flex:1;justify-content:flex-end}
.row .inst{display:flex;gap:8px;align-items:center;flex-wrap:wrap;justify-content:flex-end}
.linkrow{display:block;width:100%;text-align:left;background:none;border:0;color:var(--accent);font-weight:500;font-size:var(--fs-body);padding:11px 16px;border-top:1px solid var(--sep)}
.linkrow:hover{background:#FAFAFA} .linkrow:first-child{border-top:0}
.xbtn{width:22px;height:22px;border-radius:50%;background:var(--fill);border:0;color:var(--label-2);font-size:11px;display:inline-flex;align-items:center;justify-content:center;flex:none}
.xbtn:hover{background:var(--red-wash);color:var(--red)}
.note{padding:9px 16px 9px 0;margin-left:16px;font-size:var(--fs-body);white-space:pre-wrap}
.note .who{display:flex;justify-content:space-between;font-size:var(--fs-sub);color:var(--label-2);margin-top:3px;white-space:normal}
.note .who a{color:var(--label-2)}
.note-in{display:flex;gap:8px;align-items:flex-end;padding:8px 12px 8px 16px}
.note-in textarea.in{flex:1;border:0;background:transparent;padding:6px 0;min-height:0;resize:none;font-size:var(--fs-body)}
.note-in textarea.in:focus{box-shadow:none}
.hero{padding:16px 4px 2px}
.hero .k{font-size:var(--fs-sub);color:var(--label-2);font-weight:600;text-transform:uppercase;letter-spacing:.04em}
.hero .v{font-size:40px;font-weight:700;letter-spacing:-.035em;line-height:1.1;margin-top:2px}
.hero.due .v{color:var(--red)} .hero.paid .v,.hero.credit .v{color:#157A3A}
.hero .m{font-size:var(--fs-body);color:var(--label-2);margin-top:5px}
/* the same anatomy used as an empty state */
.empty{text-align:center;padding:40px 20px;color:var(--label-2)}
.empty .ic{font-size:40px;color:var(--label-3);line-height:1} .empty h3{font-size:var(--fs-t3);font-weight:600;color:var(--label);margin:10px 0 4px}

/* ══ tables ══ */
.tw{overflow-x:auto;-webkit-overflow-scrolling:touch}
table{width:100%;border-collapse:separate;border-spacing:0;font-size:var(--fs-body)}
thead th{position:sticky;top:0;z-index:1;text-align:left;font-size:var(--fs-sub);font-weight:600;color:var(--label-2);padding:10px 14px;
         background:var(--bg-card);border-bottom:1px solid var(--sep);white-space:nowrap}
thead th.sortable{cursor:pointer;user-select:none} thead th.sortable:hover{color:var(--label)}
thead th .arrow{font-size:9px;margin-left:4px}
tbody td{padding:10px 14px;border-bottom:1px solid var(--sep);vertical-align:middle;line-height:1.4;white-space:nowrap}
tbody tr:last-child td{border-bottom:0}
tbody tr:nth-child(even) td{background:rgba(0,0,0,.02)}
tbody tr:hover td{background:var(--accent-wash)}
td:first-child{white-space:normal;min-width:150px}
td strong{font-weight:600}
td.r,th.r{text-align:right}
tfoot td{font-weight:600;border-top:1px solid var(--sep-strong)}
/* actions in a row: quiet links */
a[onclick]{color:var(--accent);font-weight:500;text-decoration:none;cursor:pointer;padding:4px 0;display:inline-block}
a[onclick]:hover{text-decoration:underline;text-underline-offset:3px}
/* status tints: a stripe, never a colour wash, so the row stays readable */
tr.t-crit td:first-child{box-shadow:inset 3px 0 0 var(--red)}
tr.t-warn td:first-child{box-shadow:inset 3px 0 0 var(--orange)}
tr.t-good td:first-child{box-shadow:inset 3px 0 0 var(--green)}
td .in{min-height:26px;padding:2px 6px;font-size:var(--fs-co)}

/* ══ menus (pull-down) ══ */
.more{position:relative}
.menu{display:none;position:absolute;right:0;top:calc(100% + 6px);min-width:200px;padding:5px;background:rgba(255,255,255,.92);backdrop-filter:blur(30px);-webkit-backdrop-filter:blur(30px);
      border-radius:10px;box-shadow:0 10px 40px rgba(0,0,0,.18),0 0 0 .5px rgba(0,0,0,.08);z-index:40}
.menu.open{display:block}
.menu button{display:flex;align-items:center;gap:8px;width:100%;text-align:left;background:none;border:0;padding:5px 10px;min-height:28px;border-radius:6px;font-size:var(--fs-body);color:var(--label);white-space:nowrap}
.menu button:hover{background:var(--accent);color:#fff}
.menu button:hover .sub,.menu button:hover .chk{color:#fff}
.menu button .sub{font-size:var(--fs-sub);color:var(--label-2);margin-left:auto}
.menu button .chk{width:14px;color:var(--accent);font-weight:700}
.menu button[disabled]{color:var(--label-3)}
.menu .msep{border-top:1px solid var(--sep);margin:5px 4px}
.menu .mrow{display:flex;align-items:center;gap:9px;padding:6px 10px;font-size:var(--fs-body);cursor:pointer}
.menu .in{margin:2px 4px 4px;width:calc(100% - 8px)}
.menu.up{top:auto;bottom:calc(100% + 8px);left:0;right:auto;min-width:260px}
@media(max-width:767px){.menu button{min-height:44px;padding:8px 12px}.menu .mrow{min-height:44px}}

/* ══ sheet (the child drawer, the filter panel) ══ */
/* The scrim fades out but must also stop existing: an invisible full-screen
   layer was still catching every tap after the sheet closed, so the page
   underneath felt dead until a reload. */
.drawer-bg{position:fixed;inset:0;background:rgba(0,0,0,.28);z-index:60;opacity:0;visibility:hidden;pointer-events:none;transition:opacity .2s,visibility 0s .2s}
.drawer-bg.on{opacity:1;visibility:visible;pointer-events:auto;transition:opacity .2s}
.drawer{position:fixed;top:0;right:0;bottom:0;width:min(600px,100vw);background:var(--bg-grouped);z-index:61;display:flex;flex-direction:column;
        box-shadow:-1px 0 0 rgba(0,0,0,.05),-24px 0 60px rgba(0,0,0,.14);transform:translateX(100%);transition:transform .28s cubic-bezier(.32,.72,0,1)}
.drawer{visibility:hidden;transition:transform .28s cubic-bezier(.32,.72,0,1),visibility 0s .28s}
.drawer.on{transform:none;visibility:visible;transition:transform .28s cubic-bezier(.32,.72,0,1)}
.drawer.narrow{width:min(400px,100vw)}
.drawer-hd{padding:20px 24px 6px;display:flex;justify-content:space-between;align-items:center;gap:12px}
.drawer-hd h2{font-size:var(--fs-t1);line-height:var(--lh-t1);font-weight:700;letter-spacing:-.02em}
.drawer-hd .hint{margin-top:2px}
.drawer-x{width:28px;height:28px;border-radius:50%;background:var(--fill);border:0;color:#3C3C43;font-size:14px;font-weight:600;display:inline-flex;align-items:center;justify-content:center;flex:none}
.drawer-x:hover{background:var(--fill-2)}
.drawer-body{overflow:auto;padding:0 24px 28px;flex:1}
.drawer-foot{background:rgba(242,242,247,.85);backdrop-filter:blur(20px);-webkit-backdrop-filter:blur(20px);border-top:1px solid var(--sep);
             padding:12px 24px 14px;display:flex;gap:10px;align-items:center;flex-wrap:wrap}
.drawer-foot:empty,.drawer.narrow .drawer-foot{display:none}
.drawer-foot .btn{flex:1;min-width:120px;min-height:36px}
.drawer-foot .more{flex:1;display:flex;min-width:120px} .drawer-foot .more .btn{width:100%}
.drawer-foot #pf-msg{width:100%;order:-1} .drawer-foot #pf-msg:empty{display:none}
.drawer-foot .err,.drawer-foot .ok{margin-bottom:0}
.dsec{margin-top:22px} .dsec h3{font-size:var(--fs-sub);font-weight:600;color:var(--label-2);margin:0 0 6px 16px}
/* filter panel */
.fcard{background:#fff;border-radius:var(--r-card);box-shadow:0 0 0 .5px rgba(0,0,0,.06);padding:12px 16px;margin-top:10px}
.fcard .fhead{display:flex;justify-content:space-between;align-items:center;gap:8px}
.fcard .fname{font-weight:600;font-size:var(--fs-t3)}
.fcard .fop{background:none;border:0;color:var(--accent);font-size:var(--fs-body);padding:2px 0;display:inline-flex;align-items:center;gap:4px;appearance:auto}
.fcard .fdel{background:none;border:0;color:var(--label-2);font-size:13px;padding:4px 6px;border-radius:6px}
.fcard .fdel:hover{background:var(--red-wash);color:var(--red)}
.fcard .in{margin-top:8px}
.fand{display:flex;align-items:center;gap:10px;margin:12px 0 0;color:var(--label-2);font-size:var(--fs-co)}
.fand::before,.fand::after{content:'';flex:1;border-top:1px solid var(--sep)}
.flist{background:#fff;border-radius:var(--r-card);margin-top:8px;max-height:320px;overflow:auto;box-shadow:0 12px 40px rgba(0,0,0,.14),0 0 0 .5px rgba(0,0,0,.06)}
.flist button{display:flex;gap:10px;align-items:center;width:100%;text-align:left;background:none;border:0;padding:8px 12px;min-height:32px;font-size:var(--fs-body)}
.flist button:hover{background:var(--accent);color:#fff}
.flist .ic{width:18px;text-align:center;color:var(--label-2);font-size:12px}
.flist button:hover .ic{color:#fff}
.drawer.narrow #fadd{background:none;color:var(--accent);padding-left:0}

/* ══ views: a list of lists ══ */
.vwrap{display:grid;grid-template-columns:220px 1fr;gap:22px;align-items:start}
/* Sticky, and taller than the screen once a dozen saved views exist — so the
   bottom of the list sat permanently below the fold with no way to reach it.
   The page scrolls the table, not the sidebar, so the sidebar needs a height
   of its own and its own scroll. */
.side{position:sticky;top:calc(var(--tbar) + 8px);
  max-height:calc(100dvh - var(--tbar) - 28px);overflow-y:auto;overscroll-behavior:contain;
  padding-right:4px;scrollbar-width:thin;scrollbar-color:rgba(0,0,0,.2) transparent}
.side::-webkit-scrollbar{width:8px}
.side::-webkit-scrollbar-thumb{background:rgba(0,0,0,.18);border-radius:99px;border:2px solid transparent;background-clip:content-box}
.side::-webkit-scrollbar-thumb:hover{background:rgba(0,0,0,.32);background-clip:content-box}
.side::-webkit-scrollbar-track{background:transparent}
.side-h{font-size:var(--fs-sub);font-weight:600;color:var(--label-2);margin:14px 0 4px 10px}
.side-h:first-child{margin-top:0}
.side-i{display:flex;justify-content:space-between;align-items:center;gap:8px;width:100%;background:none;border:0;padding:5px 10px;min-height:30px;border-radius:7px;font-size:var(--fs-body);text-align:left;color:var(--label)}
.side-i:hover{background:var(--fill)} .side-i.on{background:var(--accent);color:#fff}
.side-i b{font-weight:500;font-size:var(--fs-sub);color:var(--label-2)} .side-i.on b{color:rgba(255,255,255,.85)}
.side-i .dot{width:8px;height:8px;border-radius:50%;flex:none}
.side-add{background:none;border:0;color:var(--accent);font-weight:500;font-size:var(--fs-body);padding:6px 10px;text-align:left;width:100%;border-radius:7px}
.side-add:hover{background:var(--fill)}
.vhead{display:flex;justify-content:space-between;align-items:flex-end;gap:14px;flex-wrap:wrap;margin-bottom:12px}
.vhead h2{font-size:var(--fs-t1);line-height:var(--lh-t1);font-weight:700;letter-spacing:-.02em}
.vhead .meta{font-size:var(--fs-co);color:var(--label-2);margin-top:2px}
.vtools{display:flex;gap:8px;align-items:center;flex-wrap:wrap}
.dirty{display:flex;gap:14px;align-items:center;flex-wrap:wrap;background:var(--accent-wash);color:var(--accent);border-radius:var(--r-ctl);padding:8px 14px;font-size:var(--fs-co);margin-bottom:12px}
.dirty a{color:var(--accent);font-weight:600;cursor:pointer;text-decoration:none} .dirty a:hover{text-decoration:underline} .dirty .sp{flex:1}
.fdesc{font-size:var(--fs-co);color:var(--label-2);margin:0 0 10px 2px} .fdesc:empty{display:none}

/* users & access */
#users-table td:nth-child(2){white-space:normal;max-width:520px}
#users-table td:nth-child(2) .chip{margin:2px 4px 2px 0}
.user-edit{background:var(--bg-grouped);padding:12px 16px}
.user-edit label{margin-right:14px}

/* ══ phones: tab bar instead of sidebar ══ */
.tabbar{display:none}
@media(max-width:767px){
  .shell{grid-template-columns:1fr;height:auto;min-height:100dvh}
  .sb{display:none}
  .main{overflow:visible;padding-bottom:calc(64px + env(safe-area-inset-bottom))}
  .tbar{padding:0 16px;height:44px}
  .content{padding:4px 16px 40px}
  .ph{margin:8px 0 16px}
  .tabbar{display:grid;grid-auto-flow:column;grid-auto-columns:1fr;position:fixed;left:0;right:0;bottom:0;z-index:30;height:calc(56px + env(safe-area-inset-bottom));
          padding:4px 0 env(safe-area-inset-bottom);background:rgba(242,242,247,.82);backdrop-filter:blur(20px) saturate(1.8);-webkit-backdrop-filter:blur(20px) saturate(1.8);border-top:1px solid var(--sep)}
  .tabbar button{background:none;border:0;display:flex;flex-direction:column;align-items:center;justify-content:center;gap:2px;font-size:10px;color:var(--label-2);min-height:48px}
  .tabbar button svg{width:22px;height:22px} .tabbar button.on{color:var(--accent)}
  .btn{min-height:44px;padding:10px 18px;font-size:var(--fs-body)} .btn.sm{min-height:36px;font-size:var(--fs-sub)}
  .in{min-height:44px;font-size:var(--fs-body)} td .in{min-height:36px}
  .stats{grid-template-columns:repeat(2,1fr);gap:10px}
  .stat .v{font-size:22px}
  [style*="grid-template-columns"]{grid-template-columns:1fr!important}
  .vwrap{grid-template-columns:1fr;gap:12px}
  .side{position:static;display:flex;gap:6px;overflow-x:auto;padding-bottom:4px;-webkit-overflow-scrolling:touch}
  .side-h{display:none}
  .side-i{width:auto;white-space:nowrap;background:var(--fill);padding:7px 12px;border-radius:999px;min-height:36px}
  .side-add{width:auto;white-space:nowrap}
  .drawer-foot .btn{flex:1 1 40%}
  .row{flex-wrap:wrap} .row .in{width:100%;max-width:none;text-align:left} .row select.in{width:100%;max-width:none}
  .row .inst{width:100%;justify-content:flex-start}
  .row .chips{justify-content:flex-start;width:100%}
  .tools .search{max-width:none}
  tbody td{padding:10px 12px}
}

/* ══ enquiries ══ */
.heat{display:inline-flex;gap:3px;vertical-align:middle}
.enq-row{border-top:1px solid var(--sep)} .enq-row:first-child{border-top:0}
.panel>.box{box-shadow:none;border-radius:0}

/* enquiry sentiment bar */
.heat{display:inline-block;width:64px;height:7px;border-radius:4px;background:var(--fill-2);overflow:hidden;vertical-align:middle}
.heat i{display:block;height:100%;border-radius:4px}
.heatn{font-size:var(--fs-sub);color:var(--label-2);margin-left:6px;font-weight:600}
#eq-table td{vertical-align:middle}
#eq-table td.eq-open{vertical-align:top}

/* ══ eight columns, one meaning per colour ══
   This was thirteen columns scrolling sideways with a pinned name, two
   bordered selects and two date boxes per row, a draggable slider in every
   row, and a row tint that encoded status and "follow-up overdue" at once —
   two different questions wearing the same colour, with nothing on screen
   saying so. Everything dropped from here still exists in the drawer.

   Colour now says one thing: green won, red lost. Overdue says the word. */
#eq-table tr.won  td:first-child{box-shadow:inset 3px 0 0 var(--green), 1px 0 0 var(--sep)}
#eq-table tr.lost td:first-child{box-shadow:inset 3px 0 0 var(--red),   1px 0 0 var(--sep)}
#eq-table tr.won  td{background:rgba(30,122,69,.055)}
#eq-table tr.lost td{background:rgba(192,57,43,.05)}
#eq-table tr.won:hover  td{background:rgba(30,122,69,.1)}
#eq-table tr.lost:hover td{background:rgba(192,57,43,.09)}

/* Heat: .hv, because .heat is already a 64x7px pill in this stylesheet and
   it clipped the digit to seven pixels. The number is the value; a dash is
   an honest "nobody has said". */
/* Widths. These used to live on the sticky first-column rule; removing the
   pinning took them with it and the name column grew until the table
   scrolled sideways again — which was the whole thing we were fixing.
   Rendering the real markup rather than the mockup is what caught it. */
#eq-table{table-layout:auto;width:100%}
#eq-table th:first-child,#eq-table td:first-child{min-width:170px;max-width:220px}
#eq-table th.eq-hv,#eq-table td.eq-hv{width:56px}
#eq-table td.eq-note,#eq-table th:nth-child(7){max-width:220px;width:220px}
/* The flag sits under the date, not beside it. Beside it the column needed
   247px — a date box plus a pill plus the gap — and that alone was what
   kept the table scrolling sideways at 1200px. */
#eq-table td.eq-fu{width:150px;white-space:normal}
#eq-table td.eq-fu .eq-flag{margin:4px 0 0;display:inline-block}

/* The status is ghosted into plain text, so it carries its meaning in colour
   and weight the way the old chip did — green won, red lost. */
#eq-table td.eq-st{width:140px}
#eq-table td.eq-st select.in{font-weight:600;max-width:134px;min-width:0}
#eq-table td.eq-st.won  select.in{color:#176138}
#eq-table td.eq-st.lost select.in{color:#A32B20}
#eq-table .hv{font-size:17px;font-weight:700;font-variant-numeric:tabular-nums}
#eq-table .hv.none{color:var(--label-3);font-weight:500;font-size:15px}

/* Overdue is a word, not a tint — colour is never the only encoding. */
#eq-table .eq-flag{display:inline-block;margin-left:7px;padding:1px 7px;border-radius:999px;
  background:var(--orange-wash);color:#8A5410;font-size:var(--fs-fn);font-weight:700;vertical-align:middle}

#eq-table td.eq-fu.is-due input.in{color:#8A5410;font-weight:600}
#eq-table td.eq-fu input.in{width:128px}
#eq-table th.eq-r,#eq-table td.eq-r{text-align:right}
/* Columns that were cut mid-word.
   "1st Premi", "Leadsqua" — the native select had no minimum width, so in a
   table with thirteen columns it collapsed until the dropdown arrow sat on
   top of its own text. A control you cannot read is not a control. These are
   floors, not fixed widths: the table still scrolls sideways, it just stops
   doing it by shredding the words. */
#eq-table select.in{min-width:150px;padding-right:30px;text-overflow:ellipsis}

/* ══ the inline editors read as text until you reach for them ══
   Status and Stage are <select>s on every row, and a bordered, shadowed,
   white box repeated eight times down two columns is the loudest thing on
   the screen — louder than the child's name, which is the only part anybody
   scans for. They are still selects and still one click from changing; they
   just stop shouting while you are reading.

   The box comes back on hover, on focus and on keyboard focus, so the
   affordance is there the moment the pointer is. */
/* Date cells get the same treatment as the selects, and for a worse reason.
   An empty datetime-local does not render empty — the browser draws its own
   greyed template, "27/10/2026, 12:30", in every row that has no visit
   booked. Eight rows of identical ghost dates read as eight families with a
   visit at half past twelve, which is the opposite of the truth. Boxing
   them made it worse by making the emptiness look filled in.

   So an empty one is a faint dash-width placeholder until you reach for it.
   The browser still owns the picker; we are only deciding when it looks
   like a control. */
#eq-table td input.in[type="date"],
#eq-table td input.in[type="datetime-local"]{
  background:transparent;border-color:transparent;box-shadow:none;color:var(--label)}
#eq-table td input.in[type="date"]:not([value=""]),
#eq-table td input.in[type="datetime-local"]:not([value=""]){color:var(--label)}
#eq-table td input.in.is-empty{color:transparent}
/* And the picker icon with it, or an empty cell still carries a little grey
   calendar floating in the middle of nothing. It comes back with the row. */
#eq-table td input.in.is-empty::-webkit-calendar-picker-indicator{opacity:0}
#eq-table tr:hover td input.in.is-empty::-webkit-calendar-picker-indicator{opacity:.5}
#eq-table tr:hover td input.in.is-empty{color:var(--label-3)}
#eq-table tr:hover td input.in[type="date"],
#eq-table tr:hover td input.in[type="datetime-local"],
#eq-table td input.in[type="date"]:hover,
#eq-table td input.in[type="datetime-local"]:hover,
#eq-table td input.in[type="date"]:focus,
#eq-table td input.in[type="datetime-local"]:focus{
  border-color:var(--sep);background:var(--bg);color:var(--label)}
#eq-table td input.in[type="date"]:focus,
#eq-table td input.in[type="datetime-local"]:focus{box-shadow:var(--focus);border-color:var(--accent)}

/* The notes column was setting the height of every row. Two lines, then an
   ellipsis; the whole note is in the drawer, which is where you are going if
   you care about it. */
#eq-table td.eq-note{max-width:230px}
#eq-table td.eq-note{white-space:normal}
#eq-table td.eq-note .eq-note-t{
  display:block;overflow:hidden;line-height:1.4;max-height:2.9em}

/* "Last worked" is a link into the history, not a label. */
#eq-table td.eq-trail{cursor:pointer}
#eq-table td.eq-trail:hover .eq-trail-when{text-decoration:underline}

#eq-table td select.in{
  background:transparent;border-color:transparent;box-shadow:none;
  color:var(--label);font-weight:500}
#eq-table tr:hover td select.in{border-color:var(--sep);background:var(--bg)}
#eq-table td select.in:hover,
#eq-table td select.in:focus{border-color:var(--sep);background:var(--bg)}
#eq-table td select.in:focus{box-shadow:var(--focus);border-color:var(--accent)}

/* The keenness bar is a judgement somebody made, so an unset one shows an
   empty track rather than a half-filled bar sitting next to a dash — which
   is what it did, and which reads as "5 out of 10" rather than "nobody has
   said". Thinner track and a smaller thumb: eight sliders down a column were
   competing with the data. */
#eq-table .keen-range{width:72px !important}
#eq-table .keen-range::-webkit-slider-runnable-track{height:4px}
#eq-table .keen-range::-moz-range-track{height:4px}
#eq-table .keen-range::-webkit-slider-thumb{width:13px;height:13px;margin-top:-4.5px}
#eq-table .keen-range::-moz-range-thumb{width:13px;height:13px}
#eq-table select.eq-stage{min-width:184px}
/* Sources are chips and there can be two of them ("Walk In", "Website"), so
   they wrap onto a second line rather than being clipped. */
#eq-table td.eq-src{white-space:normal;min-width:132px}
#eq-table .chip{margin:1px 2px 1px 0}



/* ══ the sentiment slider ══
   It was the browser's default: one blue bar for a 2 and for a 9. The number
   is the one judgement a coordinator makes about a family, so it carries its
   own colour — cold is red, warming is amber, keen is green — and the track
   fills to show how far along it is without needing to read the figure. */
input[type="range"].keen-range{
  -webkit-appearance:none;appearance:none;height:22px;background:transparent;cursor:pointer}
input[type="range"].keen-range::-webkit-slider-runnable-track{
  height:6px;border-radius:3px;
  background:linear-gradient(to right, var(--kc) 0 var(--kp), var(--fill-2) var(--kp) 100%)}
input[type="range"].keen-range::-moz-range-track{
  height:6px;border-radius:3px;
  background:linear-gradient(to right, var(--kc) 0 var(--kp), var(--fill-2) var(--kp) 100%)}
input[type="range"].keen-range::-webkit-slider-thumb{
  -webkit-appearance:none;appearance:none;width:16px;height:16px;margin-top:-5px;border-radius:50%;
  background:#fff;box-shadow:0 0 0 1px rgba(0,0,0,.14),0 1px 3px rgba(0,0,0,.25)}
input[type="range"].keen-range::-moz-range-thumb{
  width:16px;height:16px;border:0;border-radius:50%;
  background:#fff;box-shadow:0 0 0 1px rgba(0,0,0,.14),0 1px 3px rgba(0,0,0,.25)}
.keen-n{font-size:var(--fs-sub);font-weight:700;font-variant-numeric:tabular-nums;color:var(--kc);min-width:18px;display:inline-block;text-align:right}

/* ══ what to do about this family ══
   One colour per card. The status chip carries it; the stage, the programme
   and "on roll" are grey, because nobody scans for those. The headline is
   black unless something is actually late, which is the single thing on this
   screen that should pull the eye. The keenness bar keeps red-amber-green
   because that is a judgement rather than a label. Three colours, each
   meaning something — the version before this had six competing in one card
   and read as decoration.
   This replaced a tinted panel with a 22px headline and a blue progress bar —
   the shape every generated admin screen has, which says "a machine laid this
   out" before it says anything about the family. What a coordinator needs in
   the first second is three things: where this stands, what happens next, and
   the phone.

   That order still holds. What changed is that the three numbers worth
   knowing — how keen, how long this has been open, how many times we have
   reached out — were buried: keenness as a slider competing with its own
   label, the other two as a grey sentence in 13px that nobody reads. They
   are now tiles, because a number you are meant to judge should be large
   enough to judge at a glance, and because an enquiry open 26 days with
   nothing logged against it should be visible from the doorway. The slider
   survives inside its tile: the number is the display, the hairline under it
   is the control. */
.snap{padding:2px 0 18px;border-bottom:1px solid var(--sep);margin-bottom:4px}
.snap-pills{display:flex;gap:6px;flex-wrap:wrap;align-items:center}
.snap-next{margin:12px 0 2px;font-size:var(--fs-lt);line-height:var(--lh-lt);font-weight:600;
  letter-spacing:-.022em;color:var(--label);text-wrap:balance}
.snap-next.due{color:var(--red)}
.snap-meta{font-size:var(--fs-co);line-height:var(--lh-co);color:var(--label-2)}

/* Three tiles. Keen leads because it is the only one that is a judgement
   rather than a count, so it gets the ring, the colour and the control. */
.snap-tiles{display:grid;grid-template-columns:1.25fr 1fr 1fr;gap:8px;margin-top:16px}
.snap-tile{position:relative;padding:12px 14px 11px;border-radius:var(--r-card);
  background:var(--bg-card);box-shadow:0 0 0 1px rgba(0,0,0,.055),0 1px 2px rgba(0,0,0,.03)}
.snap-tile .cap{display:block;font-size:var(--fs-fn);line-height:var(--lh-fn);font-weight:600;
  letter-spacing:.055em;text-transform:uppercase;color:var(--label-3)}
.snap-tile .n{display:block;margin-top:5px;font-size:26px;line-height:30px;font-weight:650;
  letter-spacing:-.03em;font-variant-numeric:tabular-nums;color:var(--label)}
.snap-tile .n .u{font-size:13px;font-weight:600;letter-spacing:0;color:var(--label-3);margin-left:3px}
.snap-tile .n.none{color:var(--label-3);font-weight:500}
.snap-tile .sub{display:block;margin-top:1px;font-size:var(--fs-fn);line-height:var(--lh-fn);color:var(--label-3)}

.snap-tile.keen{background:var(--accent-wash);box-shadow:none;display:flex;align-items:center;gap:13px}
.snap-tile.keen .txt{min-width:0;flex:1}
.snap-tile.keen .word{display:block;margin-top:4px;font-size:var(--fs-t3);line-height:var(--lh-t3);
  font-weight:650;letter-spacing:-.015em;color:var(--kc)}
.snap-ring{position:relative;flex:0 0 auto;width:54px;height:54px}
.snap-ring svg{width:54px;height:54px;transform:rotate(-90deg);display:block}
.snap-ring circle{fill:none;stroke-width:3.4;stroke-linecap:round}
.snap-ring .rb{stroke:rgba(0,0,0,.075)}
.snap-ring .rf{stroke:var(--kc);transition:stroke-dasharray .18s ease}
.snap-ring b{position:absolute;inset:0;display:grid;place-items:center;font-size:20px;font-weight:650;
  letter-spacing:-.03em;font-variant-numeric:tabular-nums;color:var(--kc)}
/* The control, kept to a hairline so the number stays the loud part. */
.snap-tile.keen input[type=range]{-webkit-appearance:none;appearance:none;width:100%;margin:7px 0 0;
  height:14px;background:transparent;cursor:ew-resize;display:block}
.snap-tile.keen input[type=range]::-webkit-slider-runnable-track{height:3px;border-radius:999px;
  background:linear-gradient(90deg,var(--kc) var(--kp),rgba(0,0,0,.12) var(--kp))}
.snap-tile.keen input[type=range]::-moz-range-track{height:3px;border-radius:999px;background:rgba(0,0,0,.12)}
.snap-tile.keen input[type=range]::-moz-range-progress{height:3px;border-radius:999px;background:var(--kc)}
.snap-tile.keen input[type=range]::-webkit-slider-thumb{-webkit-appearance:none;appearance:none;
  width:13px;height:13px;margin-top:-5px;border-radius:50%;background:#fff;
  box-shadow:0 0 0 1px rgba(0,0,0,.1),0 1px 3px rgba(0,0,0,.25)}
.snap-tile.keen input[type=range]::-moz-range-thumb{width:13px;height:13px;border:0;border-radius:50%;
  background:#fff;box-shadow:0 0 0 1px rgba(0,0,0,.1),0 1px 3px rgba(0,0,0,.25)}
.snap-tile.keen input[type=range]:focus-visible{outline:none}
.snap-tile.keen input[type=range]:focus-visible::-webkit-slider-thumb{box-shadow:var(--focus)}

.snap-story{margin-top:12px;padding:11px 13px;border-radius:var(--r-ctl);background:var(--fill);
  font-size:var(--fs-co);line-height:1.5;color:var(--label)}
/* Not in the accent. On a grey panel, an accent that is now red turns an
   optional convenience into something that looks like it has gone wrong —
   which is the cost of a warm accent, and the reason to spend it only on
   the one button you actually want pressed. */
.snap-story .lnk{font-style:normal;color:var(--label-2);font-weight:600;text-decoration:none}
.snap-story .lnk:hover{color:var(--label);text-decoration:underline;text-underline-offset:3px}
.snap-bar{display:flex;gap:8px;flex-wrap:wrap;margin-top:14px}
.snap-bar a,.snap-bar button{display:inline-flex;align-items:center;gap:7px;font:inherit;
  font-size:var(--fs-co);font-weight:600;padding:8px 13px;border-radius:var(--r-ctl);border:0;cursor:pointer;
  text-decoration:none;background:var(--fill);color:var(--label);transition:background .12s}
.snap-bar a:hover,.snap-bar button:hover{background:var(--fill-2)}
.snap-bar .pri{background:var(--accent);color:#fff}
.snap-bar .pri:hover{background:var(--accent-dk)}
@media (max-width:520px){ .snap-tiles{grid-template-columns:1fr 1fr} .snap-tile.keen{grid-column:1 / -1} }

/* ══ a note ══
   Nobody could tell where to type. The box now says so, the button only
   wakes up when there is something to send, and every entry carries who
   wrote it and when — stamped on save, so nobody types a date again. */
.note-new{display:flex;flex-direction:column;gap:8px;padding:12px 16px 12px 0;margin-left:16px}
.note-new textarea{width:100%;min-height:62px;resize:vertical;background:var(--field);border:0;
  border-radius:var(--r-ctl);padding:10px 12px;font:inherit;font-size:var(--fs-body);color:var(--label)}
.note-new textarea:focus{background:#fff;box-shadow:var(--focus);outline:0}
.note-new .act{display:flex;align-items:center;justify-content:space-between;gap:10px}
.note-new .who{font-size:var(--fs-sub);color:var(--label-3)}
.note-item{padding:11px 16px 11px 0;margin-left:16px;border-top:1px solid var(--sep)}
.note-item:first-of-type{border-top:0}
.note-head{display:flex;align-items:baseline;gap:8px;font-size:var(--fs-sub);color:var(--label-2);margin-bottom:3px}
.note-head b{color:var(--label);font-weight:600}
.note-body{font-size:var(--fs-body);line-height:var(--lh-body);color:var(--label);white-space:pre-wrap}

/* ── the family's trail ───────────────────────────────────────────────────
   Everything that ever happened to a family used to be the same grey
   two-line block: a note somebody sat down and wrote looked exactly as
   important as a status dropdown being nudged, and the full date was
   stamped on every single row, so five changes in one hour read as five
   identical slabs saying "28 Oct at 05:42 PM".
   The day is now said once, on the rail. A note keeps its card because
   somebody wrote it. A thing that merely happened gets one line and a
   coloured dot. A run of fiddling folds itself away. */
.tl{position:relative;margin-left:16px;padding:2px 16px 6px 22px}
.tl::before{content:'';position:absolute;left:4px;top:16px;bottom:12px;width:1.5px;border-radius:2px;
  background:linear-gradient(var(--sep),var(--sep) 72%,transparent)}
.tl-day{display:flex;align-items:center;gap:8px;margin:16px 0 7px -22px;
  font-size:var(--fs-sub);font-weight:600;color:var(--label-3);letter-spacing:.05em;text-transform:uppercase}
.tl-day:first-child{margin-top:2px}
.tl-day i{width:9px;height:9px;border-radius:50%;background:var(--fill-3);flex:none;font-style:normal}
.tl-day s{flex:1;height:1px;background:var(--sep);text-decoration:none}
.tl-row{position:relative;padding:4px 0}
.tl-row>.dot{position:absolute;left:-22px;top:9px;width:9px;height:9px;border-radius:50%;
  background:var(--c,var(--fill-3));box-shadow:0 0 0 3px var(--bg-card)}
.tl-e{display:flex;gap:7px;align-items:baseline;flex-wrap:wrap;
  font-size:var(--fs-body);line-height:1.45;color:var(--label)}
.tl-t{font-size:var(--fs-sub);color:var(--label-3);font-variant-numeric:tabular-nums;flex:none}
.tl-who{font-size:var(--fs-sub);color:var(--label-3)}
.tl-n{background:var(--field);border-radius:11px;padding:9px 12px;margin-top:1px}
.tl-nh{display:flex;align-items:baseline;gap:8px;margin-bottom:2px}
.tl-nh b{font-size:var(--fs-sub);font-weight:600;color:var(--label-2)}
.tl-nh a{margin-left:auto;font-size:var(--fs-sub)}
.tl-nb{font-size:var(--fs-body);line-height:var(--lh-body);color:var(--label);white-space:pre-wrap}
.tl-fold{padding:2px 0}
.tl-fold>summary{cursor:pointer;font-size:var(--fs-sub);color:var(--label-2);list-style:none;
  display:inline-flex;align-items:center;gap:5px;padding:1px 8px;border-radius:999px;background:var(--fill)}
.tl-fold>summary::-webkit-details-marker{display:none}
.tl-fold>summary::after{content:'';width:5px;height:5px;flex:none;margin-left:1px;
  border-right:1.5px solid var(--label-2);border-bottom:1.5px solid var(--label-2);
  transform:rotate(-45deg) translate(-1px,-1px);transition:transform .15s}
.tl-fold[open]>summary::after{transform:rotate(45deg) translate(-1px,-1px)}
.tl-fold>summary:hover{background:var(--fill-2)}
.tl-sub{display:flex;gap:7px;align-items:baseline;flex-wrap:wrap;padding:3px 0 0 2px;
  font-size:var(--fs-sub);color:var(--label-2)}
.tl-empty{font-size:var(--fs-co);color:var(--label-2);padding:6px 0}

/* Saving happens on its own now, so the footer says so rather than asking.
   Deliberately quiet: it should be reassuring at a glance and invisible the
   rest of the time — the one state worth noticing is the one that failed. */
.savest{font-size:var(--fs-sub);color:var(--label-3);min-width:62px;text-align:right;
  align-self:center;transition:color .2s;font-variant-numeric:tabular-nums}
.savest[data-s=ok]{color:var(--green)}
.savest[data-s=ok]::before{content:'✓ '}
.savest[data-s=err]{color:var(--red);font-weight:600}

/* ══ things that fold away ══
   The duplicate suggestions sat open above the table and pushed the enquiry
   list off the screen — a helpful feature making the main job harder. It
   folds now, shut by default, with the count on the summary. */
details.fold{background:var(--bg-card);border-radius:var(--r-card);box-shadow:var(--shadow-card);margin:12px 0}
details.fold>summary{list-style:none;cursor:pointer;padding:12px 16px;display:flex;align-items:center;gap:10px;
  font-size:var(--fs-body);font-weight:600;color:var(--label)}
details.fold>summary::-webkit-details-marker{display:none}
details.fold>summary::after{content:"›";margin-left:auto;color:var(--label-3);font-size:17px;transition:transform .15s}
details.fold[open]>summary::after{transform:rotate(90deg)}
details.fold>summary:hover{background:var(--fill)}
details.fold[open]>summary{border-bottom:1px solid var(--sep)}
.fold-body{padding:4px 16px 14px}

/* `.lnk` is the only survivor of the old .ecard block — the drawer header it
   belonged to was rewritten as .snap*, and every one of those rules became
   unreachable. Deleted rather than left to be puzzled over later. */
.lnk{background:none;border:0;padding:0;font:inherit;font-style:normal;color:var(--accent);
  font-weight:600;cursor:pointer}
.lnk:hover{text-decoration:underline;text-underline-offset:3px}



/* the sheet can take the whole screen when a record needs room */
.drawer.wide{width:min(1100px,100vw)}
.drawer.narrow{width:min(400px,100vw)}
#drawer-wide{font-size:13px}
@media(max-width:767px){.drawer,.drawer.wide{width:100vw}#drawer-wide{display:none}}

/* filter cards: name on top, operator + value on one line under it */
.fcard .fhead{margin-bottom:8px}
.fcard .fdel{font-size:12px;width:24px;height:24px;border-radius:50%;background:var(--fill);display:inline-flex;align-items:center;justify-content:center}
.fcard .frow{display:flex;gap:8px;align-items:center;flex-wrap:wrap}
.fcard .frow select.fop{flex:0 0 auto;max-width:52%;border:1px solid rgba(0,0,0,.12);background:var(--field);border-radius:8px;padding:6px 8px;font-size:var(--fs-co);color:var(--label);appearance:auto}
.fcard .frow .in{flex:1 1 120px;min-width:0;margin-top:0}
.fcard .seg{margin-top:0}
.fand{font-size:var(--fs-sub);text-transform:uppercase;letter-spacing:.06em}

/* ══ the redesigned surfaces ══════════════════════════════════════════════
   Everything below is behind .ui2, which a shell or a drawer opts into. It
   is not global yet on purpose: the hub is in use every day, and a screen
   that has not been looked at properly is better left alone than half
   converted. Adding ui2 to an app is the whole switch.

   Two accents used to fight. The sidebar's app icons carry a colour per app
   and the content's accent was one fixed navy, so every selected chip and
   primary button sat in a different family from the icon three inches to its
   left. A second accent costs you the first one's meaning: "this is the
   thing to press" stops being a colour and becomes a guess.

   So the accent follows the app. Each is darkened from its icon colour until
   white text on it clears 4.5:1 — the raw icon colours are tuned to be seen
   at 16px, not to be sat on. */
.shell.ui2, .ui2{
  --accent:#CC3A26; --accent-dk:#B02F1D; --accent-wash:rgba(204,58,38,.09);
}
/* One hue per app, so where you are is answerable without reading the
   sidebar — and so the primary button, the selected chip and the focus ring
   in a given app all belong to each other.
   Every one is checked against white: the figure after each is the contrast
   ratio of white text on that colour, and none ships below 4.5:1. The raw
   icon colours were all under it — they are tuned to be seen at 16px, not to
   be sat on. */
.shell.ui2[data-app="admissions"], .ui2.d-admissions{      /* 5.96:1 */
  --accent:#0B61C4; --accent-dk:#084E9F; --accent-wash:rgba(11,97,196,.09) }
.shell.ui2[data-app="billing"], .ui2.d-billing{            /* 6.17:1 */
  --accent:#0F6E5C; --accent-dk:#0B5648; --accent-wash:rgba(15,110,92,.09) }
.shell.ui2[data-app="reimb"], .ui2.d-reimb{                /* 6.74:1 */
  --accent:#7A3DAF; --accent-dk:#63318D; --accent-wash:rgba(122,61,175,.09) }
.shell.ui2[data-app="staff"], .ui2.d-staff{                /* 4.87:1 */
  --accent:#B05A10; --accent-dk:#8E480C; --accent-wash:rgba(176,90,16,.10) }
.shell.ui2[data-app="letters"], .ui2.d-letters{            /* 6.70:1 */
  --accent:#1F6090; --accent-dk:#194E75; --accent-wash:rgba(31,96,144,.09) }
.shell.ui2[data-app="website"], .ui2.d-website{            /* 6.52:1 */
  --accent:#A33072; --accent-dk:#85275D; --accent-wash:rgba(163,48,114,.09) }
.shell.ui2[data-app="users"], .ui2.d-users{                /* 7.53:1 */
  --accent:#4A5568; --accent-dk:#3A4454; --accent-wash:rgba(74,85,104,.10) }
.shell.ui2[data-app="setup"], .ui2.d-setup{                /* 6.00:1 */
  --accent:#5A6472; --accent-dk:#48505C; --accent-wash:rgba(90,100,114,.10) }
/* Row hover at full accent-wash was a coral flood across eight columns.
   A table is read, not pressed. */
.shell.ui2 tbody tr:hover td{background:rgba(0,0,0,.035)}

/* Selection as a tint, not a fill.
   Eight stage pills and nine programme pills in solid navy made the chosen
   one shout at the same volume as the heading above it, and a card with
   three groups of them had three shouts. A wash plus a ring says "chosen"
   just as unambiguously at a fraction of the weight — which is what every
   one of those references does with its tags. */
/* Derived, not typed out. These were literal coral values, which meant the
   ring round a selected chip stayed EuroKids red in the blue app, the green
   app and the violet one — the exact failure the per-app accent exists to
   prevent, committed in the rule that was meant to express it. */
.ui2 .chips .chip.on{
  background:var(--accent-wash);color:var(--accent-dk);font-weight:600;
  box-shadow:inset 0 0 0 1px color-mix(in srgb, var(--accent) 45%, transparent)}
.ui2 .chips .chip.on:hover{background:color-mix(in srgb, var(--accent) 15%, transparent)}

/* Headings stop competing with the content under them. 14px semibold black
   sat at the same weight as the field labels it was introducing; small caps
   in grey read as a divider, which is all a section title is. */
.ui2 .grp{margin-top:28px}
.ui2 .grp>h3{font-size:var(--fs-fn);line-height:var(--lh-fn);font-weight:700;
  letter-spacing:.07em;text-transform:uppercase;color:var(--label-3);margin:0 0 9px 4px}
.ui2 .box{box-shadow:0 0 0 1px rgba(0,0,0,.055),0 1px 2px rgba(0,0,0,.03)}
.ui2 .row{min-height:54px;padding:11px 16px 11px 0}

/* ── the list ──
   Same product as the card it opens, which it did not look like. */
.shell.ui2 thead th{
  font-size:var(--fs-fn);font-weight:700;letter-spacing:.07em;text-transform:uppercase;
  color:var(--label-3);padding:11px 14px}
.shell.ui2 tbody td{padding:13px 14px}
.shell.ui2 tbody tr:nth-child(even) td{background:transparent}
.shell.ui2 tbody td{border-bottom:1px solid rgba(60,60,67,.09)}

/* Heat as a judgement you can read down the column, not eight loose digits
   of different colours floating in white space. */
#eq-table .hv{display:inline-grid;place-items:center;min-width:28px;height:28px;padding:0 7px;
  border-radius:999px;font-size:var(--fs-co);font-weight:700;font-variant-numeric:tabular-nums;
  background:color-mix(in srgb, currentColor 13%, transparent)}
#eq-table .hv.none{background:none;color:var(--label-3);font-weight:500}

/* The two inline controls were boxes drawn around every row of an eight-row
   table — sixteen borders doing nothing but marking where you may type.
   They are flat until pointed at. */
.shell.ui2 td .in{background:transparent;border-color:transparent;box-shadow:none}
.shell.ui2 td .in:hover{background:var(--field)}
.shell.ui2 td .in:focus{background:#fff;border-color:var(--accent);box-shadow:var(--focus)}
.shell.ui2 td .in.is-empty{color:var(--label-3)}

/* ── choosing one of a list ──
   The options used to live in the value column, right-aligned, which for a
   nine-item list means three ragged lines read right-to-left against the
   edge of the sheet. A label on its own line and the options under it, all
   starting at the same left edge, is both calmer and quicker to scan — and
   it leaves room for the shortlist to be a shortlist. */
.ui2 .pick .chip.hid{display:none}
.ui2 .pick.open .chip.hid{display:inline-flex}
.ui2 .pick.open .chip.more{display:none}
.ui2 .pick .chip.more{color:var(--label-2);box-shadow:inset 0 0 0 1px rgba(0,0,0,.1);
  background:transparent;font-weight:600;cursor:pointer}
.ui2 .pick .chip.more:hover{background:var(--fill);color:var(--label)}

/* ── fields as cells, not as a settings list ──
   Label-left-control-right gives the name and the value the same size and
   weight, so "Inquiry status" shouts as loudly as "In progress" and you read
   the word you already knew before the one you opened the card for. Small
   grey cap, large value underneath, editable where it stands — which also
   fits two facts on a line instead of one, and that is what lets the card be
   read without scrolling.

   The hairlines are a 1px grid gap over a grey ground rather than borders on
   the cells, so a cell that spans both columns still rules off correctly
   with no special casing. */
.ui2 .fgrid{display:grid;grid-template-columns:1fr 1fr;gap:1px;background:var(--sep)}
.ui2 .cell{background:var(--bg-card);padding:11px 16px 12px;min-width:0}
.ui2 .cell.wide{grid-column:1 / -1}
.ui2 .cell>.cap{display:block;font-size:11.5px;line-height:15px;font-weight:700;
  letter-spacing:.06em;text-transform:uppercase;color:var(--label-3);margin-bottom:4px}
.ui2 .cell>.sub{display:block;margin-top:3px;font-size:var(--fs-fn);line-height:var(--lh-fn);color:var(--label-3)}
.ui2 .cell>.sub:empty{display:none}

/* The control is the value: no box until you reach for it. */
.ui2 .cell .in{width:100%;max-width:none;min-height:30px;text-align:left;
  font-size:var(--fs-t3);line-height:var(--lh-t3);font-weight:600;letter-spacing:-.012em;
  background:transparent;border:0;box-shadow:none;border-radius:7px;
  padding:3px 7px;margin:0 -7px;color:var(--label)}
.ui2 .cell .in:hover{background:var(--field)}
.ui2 .cell .in:focus{background:#fff;box-shadow:var(--focus)}
.ui2 .cell .in::placeholder{font-weight:500;color:var(--label-3)}
.ui2 .cell select.in{padding-right:20px}
.ui2 .cell .inst{display:flex;align-items:center;gap:6px;justify-content:flex-start}
.ui2 .cell .inst .in{flex:1 1 auto;min-width:0}
/* Call and WhatsApp next to a number: small, quiet, and out of the way of
   the number itself, which is the thing being read. */
.ui2 .cell .inst .ic{flex:none;font-size:var(--fs-fn);font-weight:700;letter-spacing:.03em;
  padding:4px 8px;border-radius:999px;text-decoration:none;color:var(--label-2);
  box-shadow:inset 0 0 0 1px rgba(0,0,0,.1)}
.ui2 .cell .inst .ic:hover{background:var(--fill);color:var(--label)}
.ui2 .cell .seg{margin-top:1px}
.ui2 .cell .chips{justify-content:flex-start;gap:7px;margin-top:2px}
@media (max-width:460px){ .ui2 .fgrid{grid-template-columns:1fr} }

/* ── four cards, four tints ──
   A single grey box with eleven identical rows in it separates nothing: the
   father's phone, the child's birthday and the academic year all looked the
   same and you had to read the label to find out which you were in. They are
   not the same thing. So: one card per subject, each with its own wash, and
   the colour does the wayfinding before a word is read.

   The cells are frosted white over the gradient and the hairlines are the
   gradient itself showing through a 1px grid gap — which is why each card's
   rules pick up its own hue without a single extra rule, and why a cell
   spanning both columns still divides correctly. */
.ui2 .sec{margin-top:16px}
.ui2 .sec>h3{display:none}
/* The tint came off the cards.
   Washing a whole card in colour asked the colour to do too much. Rows in
   this application are inset sixteen pixels from the card's left edge, so
   the gradient showed through that gutter as a solid bar down the side of
   every section — which does not read as a tint, it reads as an error
   stripe. Tinted row backgrounds striped the fee block on top of that, and
   a fee block that looks striped is a fee block you stop trusting.
   White cards, and the section's colour lives in its label alone. That is
   enough to tell five sections apart — it was the labels doing that work the
   whole time — and it is what the designs this was drawn from actually do:
   white cards on a light ground, with colour spent on one thing at a time
   rather than spread across everything. */
.ui2 .sec>.box{
  background:var(--bg-card);
  border-radius:16px;overflow:hidden;
  box-shadow:0 0 0 1px rgba(0,0,0,.05), 0 1px 2px rgba(0,0,0,.03), 0 10px 26px -20px rgba(0,0,0,.25)}
.ui2 .sec .sechd{display:flex;align-items:center;gap:8px;padding:14px 17px 12px;
  font-size:11.5px;line-height:15px;font-weight:700;letter-spacing:.075em;text-transform:uppercase;color:var(--label-3)}
.ui2 .sec .sechd .dot{display:none}
/* The hairlines came from the gradient showing through a 1px grid gap. With
   no gradient they come from the gap itself, over the ordinary separator
   grey — same mechanism, same immunity to cells that span both columns. */
.ui2 .sec .fgrid{background:var(--sep);gap:1px}
.ui2 .sec .cell{background:var(--bg-card)}

/* A chosen chip belongs to the card it is standing in. The programme picked
   inside the child's card went on being the same coral as everything else,
   which undoes the point of tinting the card in the first place. */

.ui2 .sec .cell .in:hover{background:var(--field)}
.ui2 .sec .cell .in:focus{background:#fff}
.ui2 .sec .sechd{border-bottom:1px solid var(--sep)}

/* Pale enough that 15px semibold black still sits at full contrast on top of
   it, and distinct enough in hue that the four are told apart at a glance
   with the screen at arm's length. Mother is teal and father is indigo
   because the obvious pair would be pink and blue, and that is a stereotype
   doing a job that two neutral hues do just as well. */

/* The child sheet's sections.
   Money is not an attribute, so it does not become two-column cells: a fee,
   a concession and an agreed fee are read down a single column of
   right-aligned numerals, and splitting that across a grid would cost more
   than the tidier labels are worth. The rows stay rows. What they gain is
   the same thing the enquiry card gained — a card per subject, so the fee
   block, the people and the paperwork stop being one undifferentiated run. */

/* A section that still uses rows needs its own hairlines, because the grid
   gap that draws them in a cell layout is not there. */
.ui2 .sec .row + .row, .ui2 .sec .rowx + .row,
.ui2 .sec .row + .rowx, .ui2 .sec .rowx + .rowx{border-top:1px solid var(--sep)}
.ui2 .sec .row:first-child, .ui2 .sec .rowx:first-child{border-top:0}
/* The whole heading row is inside the card now, so the group's own h3 is
   hidden and .sechd draws it. Sections that have not been given a .sechd
   keep their h3, sitting on the tint. */
/* These sections keep their heading above the card rather than inside it,
   because here the h3 is a sibling of the box rather than a child of it.
   Same caps, same hue — it reads as the card's label either way. */
.ui2 .sec:not(:has(.sechd))>h3{display:block;margin:0 0 8px 6px;
  font-size:11.5px;line-height:15px;font-weight:700;letter-spacing:.075em;
  text-transform:uppercase;color:var(--label-3)}



/* The primary button follows the app.
   .btn ships a hardcoded blue gradient and a blue shadow, so every app's
   main action was iOS blue no matter what its accent said — the single
   control the per-app palette most needed to reach, and the one it was not
   reaching. Flat accent rather than a gradient: a gradient built from one
   custom property needs two more to shade it, and the flat fill is what all
   the work this was drawn from uses anyway. */
.shell.ui2 .btn:not(.line):not(.danger),
.ui2 .btn:not(.line):not(.danger){
  background:var(--accent);
  box-shadow:0 1px 2px color-mix(in srgb, var(--accent) 32%, transparent),
             inset 0 1px 0 rgba(255,255,255,.14)}
.shell.ui2 .btn:not(.line):not(.danger):hover,
.ui2 .btn:not(.line):not(.danger):hover{background:var(--accent-dk);filter:none}
.ui2 .lnk, .shell.ui2 .lnk, .shell.ui2 a[onclick]{color:var(--accent-dk)}


/* Concession keeps its tiles, not a colour. */
.ui2 .s-conc .snap-tiles{grid-template-columns:1fr 1fr 1fr;margin:0;padding:12px 13px 13px;gap:8px}
.ui2 .s-conc .snap-tile{background:var(--bg-grouped);box-shadow:none}

/* The academic year belongs to the whole app, so it sits with the app's name
   rather than in the top bar.
   In the bar it was a lone control floating in an otherwise empty strip,
   unlabelled, pushing every page down by its height to say one word. Here it
   is next to "Fees & Children", which is the thing it qualifies, and it is
   always on screen without costing the content any room. */
.sb-ay{margin:0 10px 10px}
.sb-ay label{display:block;font-size:10.5px;line-height:14px;font-weight:700;letter-spacing:.07em;
  text-transform:uppercase;color:var(--label-3);margin-bottom:4px}
.sb-ay select{width:100%;appearance:none;-webkit-appearance:none;cursor:pointer;
  font:inherit;font-size:var(--fs-co);font-weight:600;color:var(--label);
  padding:7px 26px 7px 10px;min-height:32px;border:0;border-radius:8px;
  background:rgba(255,255,255,.75);box-shadow:0 0 0 1px rgba(0,0,0,.07);
  background-image:url("data:image/svg+xml;charset=utf-8,%3Csvg xmlns='http://www.w3.org/2000/svg' width='10' height='6' viewBox='0 0 10 6'%3E%3Cpath d='M1 1l4 4 4-4' fill='none' stroke='%239A9AA3' stroke-width='1.6' stroke-linecap='round'/%3E%3C/svg%3E");
  background-repeat:no-repeat;background-position:right 9px center}
.sb-ay select:hover{background-color:#fff}
.sb-ay select:focus{outline:none;box-shadow:var(--focus)}
@media(max-width:767px){ .sb-ay{margin:0 0 8px;min-width:150px} .sb-ay label{display:none} }

/* Which academic year, asked before which app.
   It sits between the greeting and the doors because that is the order the
   decision happens in: you are working in a year, and then you open
   something inside it. */
.ay-ask{display:flex;align-items:center;gap:10px;flex-wrap:wrap;margin:18px 0 6px}
.ay-ask label{font-size:11.5px;font-weight:700;letter-spacing:.07em;text-transform:uppercase;color:var(--label-3)}
.ay-ask select{appearance:none;-webkit-appearance:none;cursor:pointer;font:inherit;
  font-size:var(--fs-t3);font-weight:650;letter-spacing:-.01em;color:var(--label);
  padding:8px 30px 8px 12px;min-height:38px;border:0;border-radius:10px;background:#fff;
  box-shadow:0 0 0 1px rgba(0,0,0,.09),0 1px 2px rgba(0,0,0,.04);
  background-image:url("data:image/svg+xml;charset=utf-8,%3Csvg xmlns='http://www.w3.org/2000/svg' width='10' height='6' viewBox='0 0 10 6'%3E%3Cpath d='M1 1l4 4 4-4' fill='none' stroke='%239A9AA3' stroke-width='1.6' stroke-linecap='round'/%3E%3C/svg%3E");
  background-repeat:no-repeat;background-position:right 11px center}
.ay-ask select:focus{outline:none;box-shadow:var(--focus)}
.ay-ask .hint{font-size:var(--fs-co)}

/* ── Next year ──────────────────────────────────────────────────────────
   One strip of numbers, not five boxes. Five tiles in a three-column grid
   wrapped 3 + 2 with a hole in the corner, and each spent a card's worth of
   chrome on a single figure. */
.ny-stats{display:grid;grid-template-columns:repeat(5,1fr);padding:0;overflow:hidden}
.ny-stat{padding:14px 18px 13px;border-left:1px solid var(--sep);min-width:0}
.ny-stat:first-child{border-left:0}
.ny-n{font-size:26px;line-height:1.05;font-weight:700;letter-spacing:-.02em;font-variant-numeric:tabular-nums}
.ny-l{font-size:var(--fs-co);color:var(--label-2);margin-top:3px}
.ny-s{font-size:11.5px;color:var(--label-3);margin-top:1px}
.ny-card>summary{font-size:var(--fs-body)}
.ny-card>summary strong{white-space:nowrap}
.ny-bar .seg button{white-space:nowrap;flex:none}
.ny-card>summary .hint{font-size:12.5px;white-space:nowrap;overflow:hidden;text-overflow:ellipsis;min-width:0}
.ny-bar{display:flex;gap:12px;align-items:center;justify-content:space-between;flex-wrap:wrap;
  padding:12px 16px;border-bottom:1px solid var(--sep)}
.ny-bar #ny-q{flex:1 1 260px;max-width:380px}
.ny-bar .seg{flex:none;max-width:100%;overflow-x:auto}
.ny-c{color:var(--label-3);font-weight:400;font-variant-numeric:tabular-nums;margin-left:2px}
.ny-t td{vertical-align:middle}
@media (max-width:760px){
  .ny-stats{grid-template-columns:1fr 1fr}
  .ny-stat{border-left:0;border-top:1px solid var(--sep)}
  .ny-stat:nth-child(-n+2){border-top:0}
  .ny-stat:nth-child(even){border-left:1px solid var(--sep)}
  .ny-stat:last-child:nth-child(odd){grid-column:1 / -1}
  .ny-bar #ny-q{max-width:none}
  .ny-card>summary .hint{display:none}
  .ny-card>summary strong{white-space:normal}
  .ny-bar .seg{width:100%}
}

/* ── Claude's reading of a family ──────────────────────────────────────
   The first thing on the card after who they are. A dial for the chance,
   the band in its colour, one sentence, the reasons for and against, and
   the next step — so the coordinator can ring them without scrolling. The
   colour is the band's, carried by --bc, so hot reads hot at a glance and
   cold reads cold without anyone having to read a number. */
.ai-card{--bc:#8E96A3;position:relative;display:grid;grid-template-columns:auto 1fr;gap:16px;align-items:start;
  margin-top:14px;padding:16px 16px 15px;border-radius:14px;background:var(--bg-card);isolation:isolate;
  box-shadow:0 0 0 1px color-mix(in srgb,var(--bc) 28%,transparent),0 10px 28px -14px color-mix(in srgb,var(--bc) 55%,transparent)}
.ai-card::before{content:"";position:absolute;inset:0;border-radius:inherit;z-index:-1;
  background:radial-gradient(120% 140% at 0% 0%,color-mix(in srgb,var(--bc) 16%,transparent) 0%,transparent 55%),
             linear-gradient(180deg,color-mix(in srgb,var(--bc) 5%,var(--bg-card)),var(--bg-card))}
.ai-card.is-empty{display:block;box-shadow:0 0 0 1px var(--sep);background:var(--fill)}
.ai-card.is-empty::before{display:none}
.ai-card.is-empty .ai-main{display:flex;gap:12px;align-items:center;justify-content:space-between;font-size:var(--fs-co)}
.ai-dial{position:relative;width:76px;height:76px;flex:none}
.ai-dial svg{width:100%;height:100%;transform:rotate(-90deg)}
.ai-dial circle{fill:none;stroke-width:5.5;stroke-linecap:round}
.ai-dial .t{stroke:color-mix(in srgb,var(--bc) 16%,var(--fill))}
.ai-dial .f{stroke:var(--bc);stroke-dasharray:var(--len) var(--cir);animation:ai-fill .9s cubic-bezier(.2,.8,.2,1) both;
  filter:drop-shadow(0 0 4px color-mix(in srgb,var(--bc) 45%,transparent))}
.ai-dial .f.spin{stroke:var(--label-3);animation:ai-spin 1.1s linear infinite;transform-origin:30px 30px;filter:none}
@keyframes ai-fill{from{stroke-dasharray:0 var(--cir)}}
@keyframes ai-spin{to{transform:rotate(360deg)}}
.ai-dial b{position:absolute;inset:0;display:grid;place-items:center;font-size:23px;font-weight:800;letter-spacing:-.03em;
  font-variant-numeric:tabular-nums;color:var(--label)}
.ai-dial b small{font-size:11px;font-weight:700;color:var(--label-2);margin-left:1px;align-self:center;position:relative;top:-6px}
.ai-dial b{grid-auto-flow:column;justify-content:center;align-items:center}
.ai-main{min-width:0}
.ai-top{display:flex;align-items:center;gap:8px;min-height:22px}
.ai-band{font-size:11px;font-weight:800;letter-spacing:.08em;text-transform:uppercase;color:#fff;
  background:var(--bc);padding:3px 8px 2px;border-radius:999px;box-shadow:0 2px 8px -2px color-mix(in srgb,var(--bc) 70%,transparent)}
.ai-card.is-reading .ai-band{background:var(--label-3);box-shadow:none}
.ai-when{font-size:12px;color:var(--label-3);flex:1;min-width:0;white-space:nowrap;overflow:hidden;text-overflow:ellipsis}
.ai-when .err-t{color:var(--crit)}
.ai-re{border:0;background:transparent;color:var(--label-3);font-size:15px;line-height:1;width:26px;height:26px;border-radius:50%;
  cursor:pointer;flex:none;transition:background .15s,color .15s,transform .3s}
.ai-re:hover{background:var(--fill);color:var(--label);transform:rotate(90deg)}
.ai-card.is-empty .ai-re{width:auto;height:auto;padding:6px 11px;border-radius:var(--r-ctl);background:var(--bg-card);
  font-size:var(--fs-co);font-weight:600;color:var(--label);box-shadow:0 0 0 1px var(--sep)}
.ai-card.is-empty .ai-re:hover{transform:none;background:var(--fill-2)}
.ai-card.is-refreshing .ai-main{opacity:.55;transition:opacity .2s}
.ai-sum{margin:7px 0 0;font-size:15px;line-height:1.45;color:var(--label);font-weight:500;letter-spacing:-.005em}
.ai-why{list-style:none;margin:10px 0 0;padding:0;display:flex;flex-wrap:wrap;gap:6px}
.ai-why li{display:inline-flex;align-items:center;gap:6px;font-size:12.5px;line-height:1.3;padding:5px 10px 5px 6px;
  border-radius:999px;background:var(--fill);color:var(--label)}
.ai-why li i{font-style:normal;font-weight:800;width:17px;height:17px;border-radius:50%;display:grid;place-items:center;font-size:12px;color:#fff;flex:none}
.ai-why li.up i{background:var(--green)}
.ai-why li.dn i{background:var(--red)}
.ai-next{margin-top:11px;display:flex;gap:9px;align-items:baseline;font-size:var(--fs-co);line-height:1.4;font-weight:600;color:var(--label)}
.ai-next span{flex:none;font-size:10.5px;font-weight:800;letter-spacing:.1em;text-transform:uppercase;color:var(--bc)}
.ai-sk{height:11px;border-radius:6px;margin-top:10px;width:92%;
  background:linear-gradient(90deg,var(--fill) 0%,var(--fill-2) 40%,var(--fill) 80%);background-size:250% 100%;animation:ai-sh 1.3s ease-in-out infinite}
.ai-sk.s2{width:74%} .ai-sk.s3{width:48%;height:22px;border-radius:999px}
@keyframes ai-sh{from{background-position:120% 0}to{background-position:-120% 0}}
@media (max-width:520px){ .ai-card{grid-template-columns:1fr} .ai-dial{width:64px;height:64px} }

/* the list's small dial */
#eq-table th.eq-ch,#eq-table td.eq-ch{width:64px;text-align:center}
.ai-pill{--bc:#8E96A3;display:inline-flex;align-items:center;gap:5px;font-weight:700;font-size:12.5px;font-variant-numeric:tabular-nums}
.ai-pill svg{width:18px;height:18px;transform:rotate(-90deg)}
.ai-pill circle{fill:none;stroke-width:3;stroke-linecap:round}
.ai-pill .t{stroke:var(--fill-2)} .ai-pill .f{stroke:var(--bc)}

/* society chip on the card */
.chip.soc{background:var(--fill);color:var(--label-2)}
.chip.soc-budget{background:#FFF1E6;color:#9A4B12}
.chip.soc-mid{background:#EEF4FF;color:#2A4E9B}
.chip.soc-upper_mid{background:#EAF7F0;color:#1F6B45}
.chip.soc-premium{background:#F6EEFF;color:#5B2C93}

/* a note being tidied */
textarea.is-tidying{background:linear-gradient(90deg,var(--field) 0%,var(--fill-2) 40%,var(--field) 80%);background-size:250% 100%;
  animation:ai-sh 1.3s ease-in-out infinite;color:var(--label-3)}

/* Setup → Societies */
.soc-list{display:flex;flex-direction:column}
.soc-row{display:grid;grid-template-columns:1fr auto auto;gap:12px;align-items:center;padding:10px 16px;border-bottom:1px solid var(--sep)}
.soc-row:last-child{border-bottom:0}
.soc-n{display:flex;flex-direction:column;min-width:0}
.soc-n .hint{font-size:12px}
.soc-tier button{font-size:12px;padding:3px 9px}
.soc-more{border:0;background:none;color:var(--label-3);font-size:18px;cursor:pointer;padding:0 4px}
.soc-add{display:flex;gap:8px;padding:12px 16px;border-top:1px solid var(--sep)}
.soc-add .in{flex:1}
.soc-loose{padding:12px 16px 14px;border-top:1px solid var(--sep);display:flex;flex-wrap:wrap;gap:6px}
.soc-loose .cap{width:100%;font-size:11px;font-weight:700;letter-spacing:.06em;text-transform:uppercase;color:var(--label-3);margin-bottom:2px}
.soc-cand{cursor:pointer;border:0;font:inherit;font-size:12.5px}
.soc-cand b{margin-left:4px;color:var(--label-3)}
@media (max-width:620px){ .soc-row{grid-template-columns:1fr auto} .soc-tier{grid-column:1 / -1;overflow-x:auto} }
