/* ==========================================================================
   ACUdemy · Metro UI design system
   A custom, dependency-free take on Microsoft's Metro/Fluent language:
   flat surfaces, bold typography, live tiles, high-contrast accent blocks.
   Single source of truth for the whole app's look & feel.
   ========================================================================== */

:root {
    /* ---- Metro accent palette (bold, saturated blocks) ---- */
    --acu-accent:        #0a7cff;   /* primary brand accent */
    --acu-accent-600:    #0067e0;
    --acu-accent-700:    #0052b4;
    --tile-blue:   #0a7cff;
    --tile-teal:   #00a3a3;
    --tile-green:  #16a34a;
    --tile-lime:   #65a30d;
    --tile-amber:  #d97706;
    --tile-orange: #ea580c;
    --tile-red:    #dc2626;
    --tile-pink:   #db2777;
    --tile-purple: #7c3aed;
    --tile-indigo: #4f46e5;
    --tile-slate:  #475569;
    --tile-cocoa:  #78350f;

    /* ---- Neutrals / surfaces (light theme) ---- */
    --bg:        #eef1f5;
    --surface:   #ffffff;
    --surface-2: #f5f7fa;
    --ink:       #14181f;
    --ink-soft:  #5b6472;
    --line:      #dce1e8;
    --sidebar:   #12161d;
    --sidebar-ink: #c7cede;
    --sidebar-hover: #1c2330;

    --ok:   #16a34a;
    --warn: #d97706;
    --err:  #dc2626;

    --radius: 4px;              /* Metro is nearly-square; keep corners tight */
    --shadow-1: 0 1px 2px rgba(16,24,40,.06), 0 1px 3px rgba(16,24,40,.10);
    --shadow-2: 0 4px 12px rgba(16,24,40,.12);
    --topbar-h: 60px;
    --sidebar-w: 248px;

    --font: "Segoe UI", "Selawik", system-ui, -apple-system, Roboto, "Helvetica Neue", Arial, sans-serif;
}

:root[data-theme="dark"] {
    --bg:        #0c0f14;
    --surface:   #151a22;
    --surface-2: #1b212b;
    --ink:       #e7ecf3;
    --ink-soft:  #9aa5b5;
    --line:      #262d38;
    --sidebar:   #0a0d12;
    --sidebar-ink: #aab4c5;
    --sidebar-hover: #171d27;
}

* { box-sizing: border-box; }
html, body { height: 100%; }
body {
    margin: 0;
    font-family: var(--font);
    background: var(--bg);
    color: var(--ink);
    font-size: 15px;
    line-height: 1.5;
    -webkit-font-smoothing: antialiased;
    text-rendering: optimizeLegibility;
}
a { color: var(--acu-accent); text-decoration: none; }
a:hover { text-decoration: underline; }
h1,h2,h3,h4 { font-weight: 600; letter-spacing: -.01em; margin: 0 0 .4em; }
h1 { font-size: 2rem; font-weight: 300; }   /* Metro loves thin large headings */
h2 { font-size: 1.4rem; }
.text-light { font-weight: 300; }
.muted { color: var(--ink-soft); }
.mono { font-family: "Cascadia Code", Consolas, monospace; }

/* ---- App shell -------------------------------------------------------- */
.app-shell { display: grid; grid-template-columns: var(--sidebar-w) 1fr; min-height: 100vh; }

/* Nav backdrop lives out of flow at all sizes; only shown as an overlay on mobile. */
.scrim { position: fixed; inset: 0; background: rgba(0,0,0,.4); z-index: 55; display: none; }

.sidebar {
    background: var(--sidebar);
    color: var(--sidebar-ink);
    display: flex; flex-direction: column;
    position: sticky; top: 0; height: 100vh;
    overflow-y: auto;
}
.sidebar__brand {
    display: flex; align-items: center; gap: .65rem;
    padding: 16px 18px; color: #fff; font-size: 1.05rem; line-height: 1.2; font-weight: 700;
}
/* White chip so any logo — the ACUdemy icon or a school's own (which may be
   dark or transparent) — stays readable on the dark sidebar. */
.sidebar__app-icon {
    width: 42px; height: 42px; flex: 0 0 42px;
    object-fit: contain; background: #fff; border-radius: 10px;
    padding: 4px; box-shadow: 0 1px 3px rgba(0,0,0,.18);
}
.nav-section { padding: 6px 12px; }
.nav-section__label {
    font-size: .68rem; text-transform: uppercase; letter-spacing: .12em;
    color: #5c6678; padding: 14px 10px 6px;
}
.nav-item {
    display: flex; align-items: center; gap: .75rem;
    padding: 10px 12px; border-radius: var(--radius);
    color: var(--sidebar-ink); font-weight: 500; font-size: .95rem;
    transition: background .12s ease, color .12s ease;
}
.nav-item:hover { background: var(--sidebar-hover); color: #fff; text-decoration: none; }
.nav-item.is-active { background: var(--acu-accent); color: #fff; }
.nav-item .ico { width: 20px; text-align: center; font-size: 1.05rem; flex: none; }

/* ---- Collapsible nav groups ------------------------------------------- */
/* <details>/<summary> keeps this keyboard-accessible and working without JS;
   the script only persists which groups the user left open. */
.nav-group { margin: 0; }
.nav-group__head { cursor: pointer; list-style: none; user-select: none; }
.nav-group__head::-webkit-details-marker { display: none; }   /* Safari's arrow */
.nav-group__label { flex: 1 1 auto; }
.nav-group__chev { font-size: .7rem; opacity: .6; transition: transform .18s ease; }
.nav-group[open] > .nav-group__head > .nav-group__chev { transform: rotate(180deg); }
/* Rail marks the group as one visual unit while it is expanded. */
.nav-group__body { margin: 2px 0 6px; padding-left: 22px; border-left: 1px solid rgba(255,255,255,.09); margin-left: 21px; }
.nav-item--sub { font-size: .89rem; padding: 8px 10px; }
.nav-item--sub .ico { font-size: .95rem; width: 18px; }

/* ---- Top bar ---------------------------------------------------------- */
.main { display: flex; flex-direction: column; min-width: 0; }
.topbar {
    height: var(--topbar-h);
    background: var(--surface);
    border-bottom: 1px solid var(--line);
    display: flex; align-items: center; gap: 1rem;
    padding: 0 20px; position: sticky; top: 0; z-index: 30;
}
.topbar__title { font-size: 1.15rem; font-weight: 600; }
.topbar__spacer { flex: 1; }
.topbar__search {
    display: flex; align-items: center; gap: .5rem;
    background: var(--surface-2); border: 1px solid var(--line);
    border-radius: var(--radius); padding: 8px 12px; min-width: 220px;
}
.topbar__search input { border: 0; background: transparent; outline: 0; color: var(--ink); width: 100%; }
.icon-btn {
    width: 40px; height: 40px; border-radius: var(--radius);
    display: grid; place-items: center; background: transparent;
    border: 1px solid transparent; color: var(--ink-soft); cursor: pointer;
}
.icon-btn:hover { background: var(--surface-2); color: var(--ink); }
.avatar {
    width: 38px; height: 38px; border-radius: 50%;
    background: var(--acu-accent); color: #fff; display: grid; place-items: center;
    font-weight: 600; font-size: .9rem; overflow: hidden;
}
.avatar img { width: 100%; height: 100%; object-fit: cover; }

/* ---- Full-screen school screensaver --------------------------------- */
.screensaver {
    position: fixed; inset: 0; z-index: 10000; display: grid; place-items: center;
    overflow: hidden; color: #fff; background: #061225;
    opacity: 0; visibility: hidden; pointer-events: none;
    transition: opacity .35s ease, visibility 0s linear .35s;
}
.screensaver.is-active { opacity: 1; visibility: visible; pointer-events: auto; transition: opacity .35s ease; }
.screensaver__slides { position: absolute; inset: 0; }
.screensaver__image { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; opacity: 0; transform: scale(1.025); transition: opacity 1.2s ease; }
.screensaver__image.is-active { opacity: 1; }
.screensaver::before { content: ""; position: absolute; inset: 0; background: linear-gradient(180deg, rgba(2,10,25,.45), rgba(2,10,25,.16) 42%, rgba(2,10,25,.72)), radial-gradient(circle at 50% 44%, rgba(28,111,255,.18), transparent 45%); }
.screensaver__content { position: relative; z-index: 1; width: min(920px, calc(100% - 48px)); text-align: center; text-shadow: 0 2px 24px rgba(0,0,0,.6); }
.screensaver__school { display: inline-flex; align-items: center; gap: .75rem; max-width: 100%; padding: .55rem 1rem .55rem .65rem; border: 1px solid rgba(255,255,255,.3); border-radius: 999px; background: rgba(6,18,37,.4); backdrop-filter: blur(10px); font-size: clamp(.85rem, 1.5vw, 1.05rem); font-weight: 700; letter-spacing: .08em; text-transform: uppercase; }
.screensaver__school img { width: 38px; height: 38px; flex: 0 0 38px; object-fit: contain; padding: 3px; border-radius: 9px; background: #fff; }
.screensaver__school span { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.screensaver__time { display: block; margin: 1.2rem 0 .25rem; font-size: clamp(5rem, 15vw, 12.5rem); font-weight: 300; line-height: .9; letter-spacing: -.075em; font-variant-numeric: tabular-nums; }
.screensaver__seconds { display: inline-block; margin-left: .1em; font-size: .3em; font-weight: 600; letter-spacing: -.03em; vertical-align: .45em; }
.screensaver__period { display: inline-block; margin-left: .35em; font-size: .18em; font-weight: 800; letter-spacing: .05em; vertical-align: .55em; }
.screensaver__date { font-size: clamp(1rem, 2.2vw, 1.45rem); font-weight: 600; letter-spacing: .09em; text-transform: uppercase; color: rgba(255,255,255,.9); }
.screensaver__close { position: absolute; z-index: 2; top: 22px; right: 24px; width: 42px; height: 42px; border: 1px solid rgba(255,255,255,.36); border-radius: 50%; background: rgba(6,18,37,.42); color: #fff; cursor: pointer; opacity: .72; transition: opacity .16s ease, background .16s ease; }
.screensaver__close:hover, .screensaver__close:focus-visible { opacity: 1; background: rgba(255,255,255,.18); outline: none; }
.screensaver__brief { position: absolute; z-index: 1; bottom: 68px; left: clamp(24px, 6vw, 88px); right: clamp(24px, 6vw, 88px); display: grid; grid-template-columns: minmax(260px, .8fr) minmax(340px, 1.2fr); gap: 18px; max-width: 1260px; margin: auto; }
.screensaver__quote, .screensaver__news { margin: 0; padding: 16px 18px; border: 1px solid rgba(255,255,255,.22); background: rgba(5,17,34,.5); box-shadow: 0 12px 32px rgba(0,0,0,.2); backdrop-filter: blur(12px); }
.screensaver__quote { border-radius: 16px 16px 16px 3px; }
.screensaver__quote > i { color: #8bc0ff; font-size: 1.05rem; }
.screensaver__quote p { margin: .55rem 0 .65rem; font-family: Georgia, serif; font-size: clamp(.98rem, 1.3vw, 1.15rem); font-style: italic; line-height: 1.45; }
.screensaver__quote footer { color: rgba(255,255,255,.7); font-size: .78rem; letter-spacing: .04em; }
.screensaver__news { border-radius: 16px 16px 3px 16px; }
.screensaver__brief-label { color: #cfe5ff; font-size: .74rem; font-weight: 800; letter-spacing: .13em; text-transform: uppercase; }
.screensaver__news ul { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: .65rem 1rem; margin: .65rem 0 0; padding: 0; list-style: none; }
.screensaver__news li { min-width: 0; }
.screensaver__news a { display: block; color: #fff; text-decoration: none; }
.screensaver__news a:hover span, .screensaver__news a:focus-visible span { color: #9dceff; text-decoration: underline; }
.screensaver__news span { display: block; overflow: hidden; font-size: .82rem; font-weight: 650; line-height: 1.25; text-overflow: ellipsis; white-space: nowrap; }
.screensaver__news small { display: block; margin-top: .15rem; overflow: hidden; color: rgba(255,255,255,.62); font-size: .7rem; text-overflow: ellipsis; white-space: nowrap; }
.screensaver__news-empty { margin: .55rem 0 0; color: rgba(255,255,255,.74); font-size: .82rem; }
.screensaver__hint { position: absolute; z-index: 1; bottom: 26px; left: 24px; right: 24px; margin: 0; color: rgba(255,255,255,.78); font-size: .85rem; letter-spacing: .03em; text-align: center; }
body.screensaver-active { overflow: hidden; }
@media (max-width: 560px) {
    .screensaver__content { width: min(100% - 32px, 560px); }
    .screensaver__school { max-width: 100%; font-size: .78rem; }
    .screensaver__school img { width: 34px; height: 34px; flex-basis: 34px; }
    .screensaver__time { margin-top: 1rem; font-size: clamp(4.1rem, 20vw, 6.2rem); }
    .screensaver__date { font-size: .9rem; line-height: 1.45; }
    .screensaver__close { top: 16px; right: 16px; }
    .screensaver__brief { bottom: 58px; left: 16px; right: 16px; grid-template-columns: 1fr; gap: 9px; }
    .screensaver__quote, .screensaver__news { padding: 12px 14px; }
    .screensaver__quote p { margin: .35rem 0 .45rem; font-size: .92rem; }
    .screensaver__news ul { grid-template-columns: 1fr; gap: .35rem; }
    .screensaver__news li:nth-child(n+3) { display: none; }
}
@media (prefers-reduced-motion: reduce) { .screensaver, .screensaver.is-active, .screensaver__image { transition: none; } }

.hamburger { display: none; }

/* ---- Content ---------------------------------------------------------- */
.content { padding: 24px; width: 100%; }
.page-head { display: flex; align-items: flex-end; justify-content: space-between; gap: 1rem; margin-bottom: 20px; flex-wrap: wrap; }
.page-head h1 { margin: 0; }
.breadcrumb { color: var(--ink-soft); font-size: .85rem; margin-bottom: 4px; }

/* Plan capacity: the same concise ledger appears before enrolment and on the
   Billing page, making the rule visible before a school reaches the guard. */
.student-capacity { margin:0 0 16px; padding:15px 16px; border:1px solid rgba(10,124,255,.28); border-radius:var(--radius); background:linear-gradient(105deg,rgba(10,124,255,.09),var(--surface) 62%); box-shadow:var(--shadow-1); }
.student-capacity--full { border-color:rgba(220,38,38,.42); background:linear-gradient(105deg,rgba(220,38,38,.095),var(--surface) 62%); }
.student-capacity--form { max-width:100%; }
.student-capacity__top { display:flex; align-items:flex-start; justify-content:space-between; gap:16px; }
.student-capacity__eyebrow { display:block; margin-bottom:3px; color:var(--acu-accent-700); font-size:.72rem; font-weight:800; letter-spacing:.065em; text-transform:uppercase; }
.student-capacity--full .student-capacity__eyebrow { color:var(--err); }
.student-capacity__top strong { display:inline-block; color:var(--ink); font-size:1.05rem; }
.student-capacity__plan { display:inline-flex; margin-left:7px; padding:2px 7px; border-radius:999px; background:rgba(10,124,255,.11); color:var(--acu-accent-700); font-size:.72rem; font-weight:750; vertical-align:2px; }
.student-capacity__remaining { flex:0 0 auto; padding:5px 9px; border-radius:999px; background:rgba(22,163,74,.12); color:#14733a; font-size:.76rem; font-weight:800; white-space:nowrap; }
.student-capacity__remaining.is-full { background:rgba(220,38,38,.12); color:var(--err); }
.student-capacity .progress { margin-top:11px; }
.student-capacity__note { margin:9px 0 0; color:var(--ink-soft); font-size:.78rem; line-height:1.42; }
.student-capacity__note a { font-weight:800; }
.student-capacity__upgrades { display:flex; align-items:center; flex-wrap:wrap; gap:7px; margin-top:13px; padding-top:12px; border-top:1px solid var(--line); }
.student-capacity__upgrades > span { margin-right:2px; color:var(--ink); font-size:.8rem; font-weight:800; }
.student-capacity__upgrades form { margin:0; }
.student-capacity__price-note { margin:7px 0 0; color:var(--ink-soft); font-size:.72rem; }
@media (max-width:560px) { .student-capacity { padding:13px; } .student-capacity__top { flex-direction:column; gap:8px; } .student-capacity__plan { margin-left:0; } .student-capacity__remaining { align-self:flex-start; } }

/* Bulk intake is a short, explicit hand-off: obtain the approved schema, then
   upload it. The numbered tabs describe the real order rather than decorate. */
.import-workbench { display:grid; grid-template-columns:minmax(0,.9fr) minmax(0,1.1fr); gap:16px; margin-bottom:16px; align-items:stretch; }
.import-workbench__step { overflow:hidden; }
.import-workbench__step .card__body { display:flex; flex-direction:column; height:calc(100% - 57px); }
.import-workbench__step p { margin-top:0; color:var(--ink-soft); line-height:1.5; }
.import-step-no { display:inline-grid; width:24px; height:24px; margin-right:7px; place-items:center; border-radius:50%; background:var(--acu-accent); color:#fff; font-size:.78rem; font-weight:800; vertical-align:1px; }
.import-downloads { display:flex; flex-wrap:wrap; gap:8px; margin-top:auto; }
.import-workbench__upload { border-color:rgba(10,124,255,.32); }
.import-dropzone { display:flex; min-height:142px; padding:21px; flex-direction:column; align-items:center; justify-content:center; gap:6px; border:1.5px dashed rgba(10,124,255,.48); border-radius:12px; background:linear-gradient(135deg,rgba(10,124,255,.075),rgba(10,124,255,.015)); color:var(--ink); cursor:pointer; text-align:center; transition:border-color .16s ease,background .16s ease,transform .16s ease; }
.import-dropzone:hover { border-color:var(--acu-accent); background:rgba(10,124,255,.11); transform:translateY(-1px); }
.import-dropzone:focus-within { outline:3px solid rgba(10,124,255,.26); outline-offset:3px; }
.import-dropzone i { color:var(--acu-accent); font-size:1.45rem; }
.import-dropzone strong { font-size:.94rem; }
.import-dropzone span { color:var(--ink-soft); font-size:.78rem; }
.import-workbench__upload .btn { align-self:flex-start; margin-top:12px; }
.import-guide .grid > div { padding:3px 0; }
.import-guide strong { color:var(--ink); font-size:.86rem; }
.import-guide .hint { margin:.32rem 0 0; }
.import-errors ul { margin:.5rem 0 0 1.1rem; padding:0; }
.import-errors li + li { margin-top:.22rem; }
@media (max-width:760px) { .import-workbench { grid-template-columns:1fr; } }

/* Compact page controls for paginated records inside the app shell. */
.content .pagination { display:flex; align-items:center; justify-content:center; flex-wrap:wrap; gap:.45rem; margin:0; }
.content .pagination__link { display:inline-flex; align-items:center; justify-content:center; gap:.4rem; min-width:2.35rem; min-height:2.35rem; padding:.4rem .68rem; border:1px solid var(--line); border-radius:8px; background:var(--surface-2); color:var(--ink); font-size:.85rem; font-weight:700; text-decoration:none; }
.content .pagination__link:hover { border-color:var(--acu-accent); background:var(--surface); color:var(--acu-accent); text-decoration:none; }
.content .pagination__link:focus-visible { outline:2px solid var(--acu-accent); outline-offset:2px; }
.content .pagination__link.is-current { border-color:var(--acu-accent); background:var(--acu-accent); color:#fff; cursor:default; }
.content .pagination__gap { padding:.35rem .12rem; color:var(--ink-soft); font-weight:700; }

/* Parent fee position: four ledger cards that open the calculation beneath. */
.fee-wallets { display:grid; grid-template-columns:repeat(4,minmax(0,1fr)); gap:12px; }
.fee-wallet { --wallet:#2563eb; --wallet-tint:rgba(37,99,235,.1); position:relative; display:grid; grid-template-columns:auto 1fr; column-gap:.7rem; overflow:hidden; min-height:142px; padding:17px 18px 15px; border:1px solid var(--line); border-radius:var(--radius); background:linear-gradient(135deg,var(--wallet-tint),var(--surface) 62%); color:var(--ink); font:inherit; text-align:left; cursor:pointer; box-shadow:var(--shadow-1); transition:transform .16s ease, box-shadow .16s ease, border-color .16s ease; }
.fee-wallet::before { position:absolute; top:0; right:0; bottom:0; width:4px; background:var(--wallet); content:""; }
.fee-wallet:hover { border-color:var(--wallet); box-shadow:var(--shadow-2); transform:translateY(-2px); }
.fee-wallet:focus-visible { outline:3px solid var(--wallet); outline-offset:2px; }
.fee-wallet__icon { display:grid; width:34px; height:34px; place-items:center; border-radius:10px; background:var(--wallet); color:#fff; font-size:.95rem; }
.fee-wallet__label { align-self:center; color:var(--ink-soft); font-size:.76rem; font-weight:800; letter-spacing:.055em; text-transform:uppercase; }
.fee-wallet__amount { grid-column:1 / -1; margin-top:13px; color:var(--ink); font-size:clamp(1.35rem,2.05vw,1.85rem); letter-spacing:-.045em; line-height:1.05; }
.fee-wallet__meta { grid-column:1 / -1; display:flex; align-items:center; justify-content:space-between; gap:.5rem; margin-top:8px; color:var(--ink-soft); font-size:.75rem; font-weight:600; }
.fee-wallet--paid { --wallet:#157f39; --wallet-tint:rgba(22,163,74,.1); }
.fee-wallet--owing { --wallet:#c75115; --wallet-tint:rgba(234,88,12,.11); }
.fee-wallet--advance { --wallet:#07835a; --wallet-tint:rgba(5,150,105,.1); }
.fee-balance { display:inline-flex; padding:3px 7px; border-radius:999px; font-size:.75rem; font-weight:800; white-space:nowrap; }
.fee-balance--owing { color:#a33f10; background:rgba(234,88,12,.13); }
.fee-balance--advance { color:#087154; background:rgba(5,150,105,.13); }
.fee-breakdown { width:min(980px,100%); }

/* Request feedback: navigation and valid form submits get an immediate state. */
.app-processing { position:fixed; inset:0; z-index:11000; display:grid; place-items:center; padding:20px; background:rgba(5,15,31,.3); backdrop-filter:blur(3px); opacity:0; visibility:hidden; pointer-events:none; transition:opacity .18s ease,visibility 0s linear .18s; }
.app-processing.is-active { opacity:1; visibility:visible; pointer-events:auto; transition:opacity .18s ease; }
.app-processing__card { display:flex; align-items:center; gap:13px; width:min(360px,100%); padding:16px 18px; border:1px solid rgba(255,255,255,.38); border-radius:15px; background:var(--surface); background:color-mix(in srgb,var(--surface) 92%,transparent); box-shadow:0 18px 48px rgba(0,0,0,.25); }
.app-processing__mark { display:grid; width:42px; height:42px; flex:0 0 42px; place-items:center; border-radius:12px; background:linear-gradient(135deg,var(--acu-accent),var(--acu-accent-700)); color:#fff; font-size:1.15rem; box-shadow:0 5px 12px rgba(10,124,255,.28); }
.app-processing.is-active .app-processing__mark i { animation:app-processing-spin .9s linear infinite; }
.app-processing__card strong,.app-processing__card span:not(.app-processing__mark) { display:block; }
.app-processing__card strong { color:var(--ink); font-size:.94rem; }
.app-processing__card span:not(.app-processing__mark) { margin-top:3px; color:var(--ink-soft); font-size:.8rem; }
@keyframes app-processing-spin { to { transform:rotate(360deg); } }
@media (max-width:1100px) { .fee-wallets { grid-template-columns:repeat(2,minmax(0,1fr)); } }
@media (max-width:560px) { .fee-wallets { grid-template-columns:1fr; } .fee-wallet { min-height:124px; } }
@media (prefers-reduced-motion:reduce) { .fee-wallet,.app-processing { transition:none; } .app-processing.is-active .app-processing__mark i { animation:none; } }

/* ---- Live tiles (the heart of Metro) --------------------------------- */
.tile-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(150px, 1fr));
    gap: 14px;
}
.tile {
    position: relative; display: flex; flex-direction: column; justify-content: space-between;
    min-height: 150px; padding: 16px; color: #fff;
    background: var(--tile-blue); border: 0; border-radius: var(--radius);
    text-decoration: none; overflow: hidden; cursor: pointer;
    transition: transform .12s ease, box-shadow .12s ease, filter .12s ease;
}
.tile:hover { transform: translateY(-2px); box-shadow: var(--shadow-2); filter: brightness(1.04); text-decoration: none; }
.tile:active { transform: scale(.98); }
.tile.tile--wide { grid-column: span 2; }
.tile.tile--tall { grid-row: span 2; }
.tile__icon { font-size: 2.4rem; line-height: 1; opacity: .95; }
.tile__count { font-size: 2.6rem; font-weight: 300; line-height: 1; }
.tile__label { font-size: 1rem; font-weight: 600; }
.tile__sub { font-size: .8rem; opacity: .85; }
/* colour variants */
.t-blue{background:var(--tile-blue)} .t-teal{background:var(--tile-teal)}
.t-green{background:var(--tile-green)} .t-lime{background:var(--tile-lime)}
.t-amber{background:var(--tile-amber)} .t-orange{background:var(--tile-orange)}
.t-red{background:var(--tile-red)} .t-pink{background:var(--tile-pink)}
.t-purple{background:var(--tile-purple)} .t-indigo{background:var(--tile-indigo)}
.t-slate{background:var(--tile-slate)} .t-cocoa{background:var(--tile-cocoa)}

/* ---- Dashboard: school pulse + workspace ---------------------------- */
/* The former launcher placed financial values in the same fixed-size box as
   action shortcuts.  A fee total can be substantially longer than a count,
   so it now has a dedicated flexible card and the shortcuts live separately. */
.dashboard-section { margin-bottom: 24px; }
.dashboard-section__head {
    display:flex; align-items:end; justify-content:space-between; gap:18px;
    margin: 0 0 12px;
}
.dashboard-section__eyebrow {
    margin:0 0 3px; color:var(--acu-accent); font-size:.72rem; font-weight:800;
    letter-spacing:.09em; text-transform:uppercase;
}
.dashboard-section__head h2 { margin:0; font-size:1.18rem; line-height:1.2; }
.dashboard-section__note { margin:0; color:var(--ink-soft); font-size:.84rem; text-align:right; }

.dashboard-kpi-grid {
    display:grid; grid-template-columns:repeat(5, minmax(0, 1fr)); gap:14px;
}
.dashboard-kpi {
    --kpi-tone: var(--acu-accent);
    position:relative; display:flex; min-width:0; min-height:146px; padding:18px;
    overflow:hidden; align-items:flex-start; gap:13px; color:var(--ink);
    background:var(--surface); border:1px solid var(--line); border-radius:14px;
    box-shadow:var(--shadow-1); text-decoration:none;
    transition:transform .16s ease, box-shadow .16s ease, border-color .16s ease;
}
.dashboard-kpi::before {
    position:absolute; inset:0 auto 0 0; width:4px; background:var(--kpi-tone); content:"";
}
.dashboard-kpi:hover { transform:translateY(-3px); border-color:var(--kpi-tone); box-shadow:var(--shadow-2); text-decoration:none; }
.dashboard-kpi:focus-visible, .dashboard-workspace:focus-visible { outline:3px solid rgba(10,124,255,.42); outline-offset:3px; }
.dashboard-kpi--students { --kpi-tone:var(--tile-blue); }
.dashboard-kpi--staff { --kpi-tone:var(--tile-teal); }
.dashboard-kpi--debtors { --kpi-tone:var(--tile-red); }
.dashboard-kpi--fees {
    --kpi-tone:#6ee7a1; grid-column:span 2; color:#fff;
    background:linear-gradient(122deg, #087143 0%, #16a34a 58%, #15803d 100%);
    border-color:transparent;
}
.dashboard-kpi--fees::after {
    position:absolute; width:180px; height:180px; right:-55px; bottom:-104px;
    border:24px solid rgba(255,255,255,.12); border-radius:50%; content:"";
}
.dashboard-kpi__icon {
    position:relative; z-index:1; display:grid; flex:0 0 42px; width:42px; height:42px;
    place-items:center; border-radius:12px; color:var(--kpi-tone);
    background:color-mix(in srgb, var(--kpi-tone) 13%, var(--surface)); font-size:1.12rem;
}
.dashboard-kpi--fees .dashboard-kpi__icon { color:#167542; background:rgba(255,255,255,.94); }
.dashboard-kpi__content { position:relative; z-index:1; display:flex; min-width:0; flex:1; flex-direction:column; align-self:stretch; }
.dashboard-kpi__label { color:var(--ink-soft); font-size:.8rem; font-weight:700; }
.dashboard-kpi__value {
    display:block; min-width:0; margin:8px 0 3px; color:var(--ink); font-size:2.25rem;
    font-weight:350; line-height:.98; letter-spacing:-.055em; font-variant-numeric:tabular-nums;
}
.dashboard-kpi--fees .dashboard-kpi__label, .dashboard-kpi--fees .dashboard-kpi__sub { color:rgba(255,255,255,.82); }
.dashboard-kpi--fees .dashboard-kpi__value {
    color:#fff; font-size:clamp(2rem, 3vw, 3.4rem); white-space:nowrap;
}
.dashboard-kpi__sub { color:var(--ink-soft); font-size:.78rem; }
.dashboard-kpi__arrow { position:relative; z-index:1; margin-left:auto; color:var(--ink-soft); font-size:.72rem; opacity:.7; }
.dashboard-kpi--fees .dashboard-kpi__arrow { color:#fff; }

.dashboard-workspace-grid {
    display:grid; grid-template-columns:repeat(auto-fit, minmax(205px, 1fr)); gap:12px;
}
.dashboard-workspace {
    --workspace-tone:var(--acu-accent); display:flex; align-items:center; min-width:0; min-height:92px;
    gap:12px; padding:14px; color:var(--ink); background:var(--surface); border:1px solid var(--line);
    border-radius:13px; box-shadow:var(--shadow-1); text-decoration:none;
    transition:transform .16s ease, box-shadow .16s ease, border-color .16s ease;
}
.dashboard-workspace.t-indigo { --workspace-tone:var(--tile-indigo); background:var(--surface); }
.dashboard-workspace.t-slate { --workspace-tone:var(--tile-slate); background:var(--surface); }
.dashboard-workspace.t-purple { --workspace-tone:var(--tile-purple); background:var(--surface); }
.dashboard-workspace.t-orange { --workspace-tone:var(--tile-orange); background:var(--surface); }
.dashboard-workspace.t-pink { --workspace-tone:var(--tile-pink); background:var(--surface); }
.dashboard-workspace.t-amber { --workspace-tone:var(--tile-amber); background:var(--surface); }
.dashboard-workspace:hover { transform:translateY(-2px); border-color:var(--workspace-tone); box-shadow:var(--shadow-2); text-decoration:none; }
.dashboard-workspace__icon {
    display:grid; flex:0 0 42px; width:42px; height:42px; place-items:center; border-radius:12px;
    color:#fff; background:var(--workspace-tone); font-size:1rem;
}
.dashboard-workspace__content { display:flex; min-width:0; flex:1; flex-direction:column; gap:3px; }
.dashboard-workspace__label { color:var(--ink); font-size:.93rem; font-weight:750; }
.dashboard-workspace__sub { color:var(--ink-soft); font-size:.76rem; line-height:1.25; }
.dashboard-workspace__count {
    display:grid; flex:0 0 auto; min-width:27px; height:27px; padding:0 7px; place-items:center;
    border-radius:99px; color:var(--workspace-tone); background:color-mix(in srgb, var(--workspace-tone) 13%, var(--surface));
    font-size:.79rem; font-variant-numeric:tabular-nums;
}
.dashboard-workspace__arrow { color:var(--ink-soft); font-size:.68rem; }

/* ---- Finance operations ------------------------------------------------ */
/* A school bursar needs to see the accounting sequence, not merely a list of
   forms. The compact rail mirrors the real control path of a school expense. */
.finance-flow {
    display:grid; grid-template-columns:1fr auto 1fr auto 1fr; align-items:center; gap:10px;
    padding:13px 16px; background:linear-gradient(90deg,rgba(10,124,255,.07),rgba(22,163,74,.07));
    border:1px solid var(--line); border-radius:14px;
}
.finance-flow > i { color:var(--acu-accent); font-size:1rem; }
.finance-flow__step { display:flex; align-items:center; min-width:0; gap:10px; }
.finance-flow__step > span {
    display:grid; flex:0 0 28px; width:28px; height:28px; place-items:center; border-radius:50%;
    background:var(--acu-accent); color:#fff; font-size:.78rem; font-weight:800;
}
.finance-flow__step strong,.finance-flow__step small { display:block; }
.finance-flow__step strong { color:var(--ink); font-size:.83rem; }
.finance-flow__step small { margin-top:2px; color:var(--ink-soft); font-size:.72rem; }
.finance-stat { overflow:hidden; border-left:4px solid var(--finance-tone,var(--acu-accent)); }
.finance-stat--amber { --finance-tone:var(--tile-amber); }
.finance-stat--blue { --finance-tone:var(--tile-blue); }
.finance-stat--green { --finance-tone:var(--tile-green); }
.finance-stat .card__body { display:flex; min-height:102px; flex-direction:column; justify-content:center; }
.finance-stat span { color:var(--ink-soft); font-size:.78rem; font-weight:700; }
.finance-stat strong { margin:5px 0 2px; color:var(--ink); font-size:1.65rem; line-height:1.05; letter-spacing:-.035em; font-variant-numeric:tabular-nums; }
.finance-stat small { color:var(--ink-soft); font-size:.75rem; }
.procurement-lines { margin-top:4px; border-top:1px solid var(--line); }
.procurement-lines__head { display:flex; align-items:center; justify-content:space-between; gap:10px; padding:12px 0 8px; color:var(--ink); font-size:.87rem; }
.procurement-line { display:grid; grid-template-columns:minmax(140px,2fr) minmax(100px,1fr) 76px 74px minmax(100px,1fr) 32px; gap:7px; align-items:center; margin:7px 0; }
.procurement-line .input { min-width:0; padding:9px 10px; }
.procurement-line__remove { width:32px; height:32px; color:var(--err); }
.inventory-row--low { background:rgba(217,119,6,.07); }
.inventory-row--low:hover { background:rgba(217,119,6,.12) !important; }

/* ---- Cards ------------------------------------------------------------ */
.card {
    background: var(--surface); border: 1px solid var(--line);
    border-radius: var(--radius); box-shadow: var(--shadow-1);
}
.card__head { padding: 16px 20px; border-bottom: 1px solid var(--line); display: flex; align-items: center; justify-content: space-between; gap: 1rem; }
.card__head h3 { margin: 0; font-size: 1.05rem; }
.card__body { padding: 20px; }
.grid { display: grid; gap: 16px; }
.grid-2 { grid-template-columns: repeat(2, 1fr); }
.grid-3 { grid-template-columns: repeat(3, 1fr); }
.grid-4 { grid-template-columns: repeat(4, 1fr); }

/* ---- Buttons ---------------------------------------------------------- */
.btn {
    display: inline-flex; align-items: center; gap: .5rem;
    padding: 10px 18px; font: inherit; font-weight: 600; font-size: .92rem;
    border: 1px solid var(--line); border-radius: var(--radius);
    background: var(--surface); color: var(--ink); cursor: pointer;
    transition: background .12s ease, border-color .12s ease, transform .06s ease;
}
/* Base hover is scoped to buttons with NO colour variant.
   `.btn:hover` (0-2-0) out-specifies `.btn--danger` (0-1-0), so an unscoped
   base hover repainted every filled button ash while its own `color:#fff`
   stayed — white text on a pale background, i.e. invisible. Each filled
   variant therefore owns its hover, and the neutral rule stays out of the way. */
.btn:hover { text-decoration: none; }
.btn:not([class*="btn--"]):hover,
.btn--sm:not(.btn--primary):not(.btn--danger):hover,
.btn--lg:not(.btn--primary):not(.btn--danger):hover,
.btn--block:not(.btn--primary):not(.btn--danger):hover {
    background: var(--surface-2); border-color: var(--ink-soft);
}
.btn:active { transform: translateY(1px); }

/* Keyboard focus must be visible — "highlighting" a button previously showed
   nothing, or the browser default which the custom background hid. */
.btn:focus-visible {
    outline: 3px solid rgba(10,124,255,.45); outline-offset: 2px;
}

.btn--primary { background: var(--acu-accent); border-color: var(--acu-accent); color: #fff; }
.btn--primary:hover,
.btn--primary:focus-visible { background: var(--acu-accent-600); border-color: var(--acu-accent-600); color: #fff; }
.btn--primary:active { background: var(--acu-accent-700); }

.btn--danger { background: var(--err); border-color: var(--err); color: #fff; }
/* Darken on hover rather than inheriting the neutral background. */
.btn--danger:hover,
.btn--danger:focus-visible { background: #b91c1c; border-color: #b91c1c; color: #fff; }
.btn--danger:active { background: #991b1b; }

.btn--ghost { background: transparent; }
.btn--ghost:hover, .btn--ghost:focus-visible { background: var(--surface-2); border-color: var(--ink-soft); color: var(--ink); }
.btn--lg { padding: 14px 24px; font-size: 1rem; }
/* Compact action button for table rows, where a full-size btn crowds the row. */
.btn--sm { padding: 6px 11px; font-size: .8rem; gap: .35rem; }
.btn--block { display: flex; width: 100%; justify-content: center; }
.btn[disabled] { opacity: .55; cursor: not-allowed; pointer-events: none; }

/* ---- Forms ------------------------------------------------------------ */
.field { margin-bottom: 16px; }
.label { display: block; font-weight: 600; font-size: .85rem; margin-bottom: 6px; color: var(--ink); }
.input, .select, .textarea {
    width: 100%; padding: 11px 13px; font: inherit;
    background: var(--surface); color: var(--ink);
    border: 1px solid var(--line); border-radius: var(--radius); outline: 0;
    transition: border-color .12s ease, box-shadow .12s ease;
}
.input:focus, .select:focus, .textarea:focus {
    border-color: var(--acu-accent); box-shadow: 0 0 0 3px rgba(10,124,255,.15);
}
.textarea { min-height: 110px; resize: vertical; }
.field .hint { font-size: .78rem; color: var(--ink-soft); margin-top: 4px; }
.field .err { font-size: .8rem; color: var(--err); margin-top: 4px; }
.input.is-invalid { border-color: var(--err); }

/* ---- Tables ----------------------------------------------------------- */
.table-wrap { overflow-x: auto; border: 1px solid var(--line); border-radius: var(--radius); background: var(--surface); }
table.data { width: 100%; border-collapse: collapse; font-size: .9rem; }
table.data th, table.data td { padding: 12px 14px; text-align: left; border-bottom: 1px solid var(--line); white-space: nowrap; }
table.data thead th { background: var(--surface-2); font-size: .72rem; text-transform: uppercase; letter-spacing: .06em; color: var(--ink-soft); position: sticky; top: 0; }
table.data tbody tr:hover { background: var(--surface-2); }
.thumb { width: 36px; height: 36px; border-radius: var(--radius); object-fit: cover; background: var(--surface-2); }

/* ---- Filter bar (class/subject/date selectors above a table) ---------- */
/* Declared as a class rather than an inline grid so the mobile breakpoint can
   actually override it — an inline style would always win over a media query,
   which is what pushed the submit button off-screen at 375px. */
.filter-bar { display: grid; gap: 10px; align-items: end; grid-template-columns: repeat(var(--cols, 2), 1fr) auto; }
@media (max-width: 720px) {
    .filter-bar { grid-template-columns: 1fr; }
    .filter-bar .btn { width: 100%; justify-content: center; }
}

/* ---- Dialogs + toasts (replace native alert/confirm) ------------------- */
.acu-dlg-backdrop {
    position: fixed; inset: 0; z-index: 10000; display: flex;
    align-items: center; justify-content: center; padding: 20px;
    background: rgba(9,18,33,.55); backdrop-filter: blur(3px);
    opacity: 0; transition: opacity .16s ease;
}
.acu-dlg-backdrop.is-open { opacity: 1; }
.acu-dlg {
    width: 100%; max-width: 420px; background: var(--surface); color: var(--ink);
    border-radius: 14px; box-shadow: 0 24px 60px rgba(9,18,33,.35);
    transform: translateY(8px) scale(.98); transition: transform .16s ease;
    overflow: hidden;
}
.acu-dlg-backdrop.is-open .acu-dlg { transform: none; }
.acu-dlg__body { padding: 26px 24px 20px; text-align: center; }
.acu-dlg__icon {
    width: 54px; height: 54px; border-radius: 50%; margin: 0 auto 14px;
    display: flex; align-items: center; justify-content: center; font-size: 22px;
}
.acu-dlg__icon--warn   { background: rgba(217,119,6,.15);  color: #a65a05; }
.acu-dlg__icon--danger { background: rgba(220,38,38,.13);  color: #b91c1c; }
.acu-dlg__icon--info   { background: rgba(10,124,255,.12); color: #0052b4; }
.acu-dlg__icon--ok     { background: rgba(22,163,74,.14);  color: #157f39; }
.acu-dlg__title { font-size: 1.12rem; font-weight: 700; margin: 0 0 6px; }
.acu-dlg__text  { color: var(--ink-soft); font-size: .92rem; margin: 0; line-height: 1.55; }
.acu-dlg__foot {
    display: flex; gap: 10px; padding: 16px 24px 22px; justify-content: center;
}
.acu-dlg__foot .btn { min-width: 116px; justify-content: center; }
@media (max-width: 480px) {
    .acu-dlg__foot { flex-direction: column-reverse; }
    .acu-dlg__foot .btn { width: 100%; }
}

/* Toasts */
#toast-host { position: fixed; right: 16px; bottom: 16px; display: flex; flex-direction: column; gap: 10px; z-index: 9999; }
.acu-toast {
    display: flex; align-items: flex-start; gap: 10px; min-width: 260px; max-width: 360px;
    background: var(--surface); color: var(--ink); padding: 13px 15px;
    border-radius: 10px; border-left: 4px solid var(--acu-accent);
    box-shadow: 0 10px 30px rgba(9,18,33,.20); font-size: .9rem;
    transform: translateX(12px); opacity: 0; transition: transform .2s ease, opacity .2s ease;
}
.acu-toast.is-in { transform: none; opacity: 1; }
.acu-toast--ok  { border-left-color: #16a34a; }
.acu-toast--err { border-left-color: #dc2626; }
.acu-toast__ico { flex: none; margin-top: 1px; }
.acu-toast--ok  .acu-toast__ico { color: #16a34a; }
.acu-toast--err .acu-toast__ico { color: #dc2626; }
.acu-toast--info .acu-toast__ico { color: var(--acu-accent); }

/* ---- Campus picker (login) + switcher (topbar) ------------------------ */
.campus-pick { display: grid; gap: 8px; max-height: 250px; overflow-y: auto; }
.campus-pick__opt { position: relative; cursor: pointer; display: block; }
.campus-pick__opt input { position: absolute; opacity: 0; width: 0; height: 0; }
.campus-pick__opt > span {
    display: block; padding: 11px 14px; border: 1.5px solid var(--line);
    border-radius: var(--radius); background: var(--surface);
    transition: border-color .12s ease, background .12s ease;
}
.campus-pick__opt strong { display: block; font-size: .92rem; }
.campus-pick__opt em { display: block; font-style: normal; font-size: .76rem; color: var(--ink-soft); margin-top: 1px; }
.campus-pick__opt:hover > span { border-color: var(--ink-soft); }
.campus-pick__opt input:checked + span {
    border-color: var(--acu-accent); background: rgba(10,124,255,.07);
    box-shadow: inset 0 0 0 1px var(--acu-accent);
}
.campus-pick__opt input:focus-visible + span { box-shadow: 0 0 0 3px rgba(10,124,255,.35); }
.campus-pick__opt--all > span { border-style: dashed; }

/* Topbar campus switcher for group-level admins. */
.campus-switch {
    display: inline-flex; align-items: center; gap: .4rem; flex: none;
    padding: 5px 10px 5px 12px; border-radius: 999px; font-size: .78rem; font-weight: 700;
    background: var(--surface-2); border: 1px solid var(--line); color: var(--ink);
}
.campus-switch select {
    border: 0; background: transparent; font: inherit; color: inherit;
    cursor: pointer; padding: 0; max-width: 150px;
}
.campus-switch select:focus-visible { outline: 2px solid rgba(10,124,255,.45); border-radius: 4px; }
@media (max-width: 760px) { .campus-switch { display: none; } }

/* ---- Subscription chip (topbar) --------------------------------------- */
.sub-chip {
    display: inline-flex; align-items: center; gap: .4rem; flex: none;
    padding: 6px 12px; border-radius: 999px; font-size: .78rem; font-weight: 700;
    border: 1px solid transparent; white-space: nowrap; text-decoration: none;
}
.sub-chip:hover { text-decoration: none; filter: brightness(.97); }
.sub-chip--ok   { background: rgba(22,163,74,.12);  border-color: rgba(22,163,74,.30);  color: #157f39; }
.sub-chip--info { background: rgba(10,124,255,.10); border-color: rgba(10,124,255,.28); color: #0052b4; }
.sub-chip--warn { background: rgba(217,119,6,.14);  border-color: rgba(217,119,6,.38);  color: #a65a05; }
.sub-chip--err  { background: rgba(220,38,38,.12);  border-color: rgba(220,38,38,.40);  color: #b91c1c; }
/* On phones the topbar is tight — keep the icon, drop the words. */
@media (max-width: 760px) { .sub-chip__text { display: none; } .sub-chip { padding: 6px 9px; } }

/* ---- Subscription countdown ------------------------------------------- */
.countdown { border-radius: var(--radius); padding: 14px 16px; margin-bottom: 14px; border: 1px solid; }
.countdown__num { font-size: 1.9rem; font-weight: 300; line-height: 1.1; }
.countdown__num span { font-size: .95rem; font-weight: 600; margin-left: .35rem; }
.countdown__label { font-size: .82rem; margin-top: 2px; opacity: .9; }
.countdown--ok   { background: rgba(22,163,74,.10);  border-color: rgba(22,163,74,.35);  color: #157f39; }
.countdown--info { background: rgba(10,124,255,.09); border-color: rgba(10,124,255,.30); color: #0052b4; }
.countdown--warn { background: rgba(217,119,6,.12);  border-color: rgba(217,119,6,.40);  color: #a65a05; }
.countdown--err  { background: rgba(220,38,38,.10);  border-color: rgba(220,38,38,.40);  color: #b91c1c; }

/* ---- Progress bar (fundraising, attendance rate) ---------------------- */
.progress {
    display: block; height: 8px; border-radius: 999px;
    background: var(--surface-2); overflow: hidden;
}
.progress > span {
    display: block; height: 100%; border-radius: 999px;
    background: linear-gradient(90deg, #38a3ff, #0a7cff);
    transition: width .3s ease;
}
.progress--green > span { background: linear-gradient(90deg, #38d996, #16a34a); }
.progress--amber > span { background: linear-gradient(90deg, #fbbf24, #d97706); }
.progress--red   > span { background: linear-gradient(90deg, #f87171, #dc2626); }

/* ---- Segmented control (attendance status) ---------------------------- */
.segmented { display: inline-flex; flex-wrap: wrap; gap: 4px; }
.segmented__opt { position: relative; cursor: pointer; }
.segmented__opt input { position: absolute; opacity: 0; width: 0; height: 0; }
.segmented__opt span {
    display: block; padding: 7px 12px; border: 1px solid var(--line); border-radius: var(--radius);
    font-size: .8rem; font-weight: 700; color: var(--ink-soft); background: var(--surface);
    transition: background .12s ease, color .12s ease, border-color .12s ease;
    white-space: nowrap;
}
.segmented__opt input:focus-visible + span { box-shadow: 0 0 0 3px rgba(10,124,255,.3); }
/* Each state carries its own colour so a full register is scannable at a glance. */
.segmented__opt--present input:checked + span { background: rgba(22,163,74,.14);  border-color: #16a34a; color: #157f39; }
.segmented__opt--absent  input:checked + span { background: rgba(220,38,38,.13);  border-color: #dc2626; color: #b91c1c; }
.segmented__opt--late    input:checked + span { background: rgba(217,119,6,.16);  border-color: #d97706; color: #a65a05; }
.segmented__opt--excused input:checked + span { background: rgba(100,116,139,.16); border-color: #64748b; color: #475569; }

@media (max-width: 720px) {
    /* Same stacked-card treatment as score entry — a register is unusable on a
       phone if three columns fight for 375px. */
    .attend-table, .attend-table tbody, .attend-table tr, .attend-table td { display: block; width: 100%; }
    .attend-table thead { display: none; }
    .attend-table tbody tr { padding: 14px 16px; border-bottom: 1px solid var(--line); }
    .attend-table tbody td { border: 0; padding: 0; white-space: normal; }
    .attend-table td.stu { margin-bottom: 8px; }
    .attend-table td[data-label] { margin-top: 8px; }
    .attend-table td[data-label]::before {
        content: attr(data-label); display: block; margin-bottom: 4px;
        font-size: .68rem; font-weight: 700; text-transform: uppercase;
        letter-spacing: .06em; color: var(--ink-soft);
    }
    .segmented { display: grid; grid-template-columns: repeat(4, 1fr); gap: 6px; width: 100%; }
    .segmented__opt span { padding: 10px 4px; text-align: center; font-size: .74rem; }
}

/* ---- Switch (on/off toggle) ------------------------------------------- */
.switch { display: inline-flex; align-items: center; gap: 10px; cursor: pointer; user-select: none; }
/* The real checkbox stays focusable for keyboard/screen readers, just unseen. */
.switch input { position: absolute; opacity: 0; width: 0; height: 0; }
.switch__track {
    position: relative; flex: none; width: 42px; height: 24px; border-radius: 999px;
    background: var(--line); transition: background .15s ease;
}
.switch__thumb {
    position: absolute; top: 3px; left: 3px; width: 18px; height: 18px; border-radius: 50%;
    background: #fff; box-shadow: 0 1px 3px rgba(0,0,0,.3); transition: transform .15s ease;
}
.switch input:checked + .switch__track { background: var(--acu-accent); }
.switch input:checked + .switch__track .switch__thumb { transform: translateX(18px); }
.switch input:focus-visible + .switch__track { box-shadow: 0 0 0 3px rgba(10,124,255,.35); }
.switch__label { font-size: .88rem; font-weight: 600; }

/* ---- Score entry grid (Report Sheet) ---------------------------------- */
/* Teachers enter marks on phones, so the score boxes must stay tappable at
   every width. The native number spinners are the first thing to steal room
   on a narrow screen (they can squeeze the field down to just the arrows),
   so they are removed and the field is sized/centred for thumb entry. */
.score-table .scoreInput {
    min-width: 64px; padding: 8px 6px; text-align: center; font-weight: 600;
    -moz-appearance: textfield; appearance: textfield;
}
.score-table .scoreInput::-webkit-outer-spin-button,
.score-table .scoreInput::-webkit-inner-spin-button { -webkit-appearance: none; margin: 0; }

@media (max-width: 640px) {
    /* Each student becomes a stacked card: name on top, the four score fields
       on one labelled row, running total underneath. */
    .score-table, .score-table tbody, .score-table tr, .score-table td { display: block; width: 100%; }
    .score-table thead { display: none; }
    .score-table tbody tr {
        display: grid; grid-template-columns: repeat(4, 1fr); gap: 10px;
        padding: 14px 16px; border-bottom: 1px solid var(--line);
    }
    .score-table tbody td { border: 0; padding: 0; white-space: normal; }
    .score-table td.stu { grid-column: 1 / -1; }
    .score-table td[data-label] { display: flex; flex-direction: column; gap: 4px; }
    .score-table td[data-label]::before {
        content: attr(data-label);
        font-size: .68rem; font-weight: 700; text-transform: uppercase;
        letter-spacing: .06em; color: var(--ink-soft);
    }
    .score-table .scoreInput {
        width: 100%; min-width: 0; padding: 12px 4px;
        font-size: 16px;   /* >=16px so iOS does not zoom the page on focus */
    }
    .score-table td.rowTotal {
        grid-column: 1 / -1; flex-direction: row; align-items: center;
        justify-content: space-between; gap: 8px;
        padding-top: 10px; border-top: 1px dashed var(--line);
    }
}

/* ---- Badges & pills --------------------------------------------------- */
.badge { display: inline-block; padding: 3px 9px; border-radius: 999px; font-size: .72rem; font-weight: 700; letter-spacing: .02em; }
.badge--ok { background: rgba(22,163,74,.14); color: #157f39; }
.badge--warn { background: rgba(217,119,6,.16); color: #a65a05; }
.badge--err { background: rgba(220,38,38,.14); color: #b91c1c; }
.badge--info { background: rgba(10,124,255,.14); color: var(--acu-accent-700); }

/* ---- Alerts / flash --------------------------------------------------- */
.alert { padding: 12px 16px; border-radius: var(--radius); border-left: 4px solid; margin-bottom: 16px; font-size: .92rem; }
.alert--ok { background: rgba(22,163,74,.10); border-color: var(--ok); }
.alert--err { background: rgba(220,38,38,.10); border-color: var(--err); }
.alert--info { background: rgba(10,124,255,.10); border-color: var(--acu-accent); }

/* ---- Modal ------------------------------------------------------------ */
.modal-backdrop { position: fixed; inset: 0; background: rgba(8,12,20,.55); display: none; place-items: center; z-index: 50; padding: 20px; }
.modal-backdrop.open { display: grid; }
.modal { background: var(--surface); border-radius: var(--radius); width: min(560px, 100%); box-shadow: var(--shadow-2); max-height: 90vh; overflow: auto; }
.modal__head { padding: 16px 20px; border-bottom: 1px solid var(--line); display: flex; justify-content: space-between; align-items: center; }
.modal__body { padding: 20px; }
.modal__foot { padding: 16px 20px; border-top: 1px solid var(--line); display: flex; gap: 10px; justify-content: flex-end; }

/* ---- Utilities -------------------------------------------------------- */
.flex { display: flex; } .items-center { align-items: center; } .justify-between { justify-content: space-between; }
.gap-1 { gap: .5rem; } .gap-2 { gap: 1rem; }
.mt-1{margin-top:.5rem}.mt-2{margin-top:1rem}.mt-3{margin-top:1.5rem}
.mb-0{margin-bottom:0}.mb-2{margin-bottom:1rem}.mb-3{margin-bottom:1.5rem}
.w-full{width:100%}.text-center{text-align:center}.text-right{text-align:right}
.hidden{display:none !important}
.stat { font-size: 1.9rem; font-weight: 300; line-height: 1; }
.pill-tabs { display: flex; gap: 6px; flex-wrap: wrap; margin-bottom: 16px; }
.pill-tabs a { padding: 8px 16px; border-radius: 999px; background: var(--surface); border: 1px solid var(--line); font-weight: 600; font-size: .85rem; color: var(--ink-soft); }
.pill-tabs a.is-active { background: var(--acu-accent); color: #fff; border-color: var(--acu-accent); }

/* ---- Auth (split-panel login) ---------------------------------------- */
.auth-split { min-height: 100vh; display: grid; grid-template-columns: 1.05fr .95fr; }
.auth-brand {
    position: relative; color: #fff; padding: 44px 48px; overflow: hidden;
    display: flex; flex-direction: column; justify-content: space-between;
    background: url("../img/login-school-community.png") center / cover no-repeat;
}
.auth-brand::before {
    content: ""; position: absolute; inset: 0; pointer-events: none;
    background:
        linear-gradient(118deg, rgba(0, 41, 106, .94) 0%, rgba(0, 83, 184, .84) 57%, rgba(0, 28, 76, .82) 100%),
        linear-gradient(0deg, rgba(0, 23, 70, .34), rgba(0, 23, 70, .08));
}
.auth-brand::after {
    content: ""; position: absolute; inset: 0;
    background-image: radial-gradient(rgba(255,255,255,.14) 1.4px, transparent 1.4px);
    background-size: 22px 22px; opacity: .35; pointer-events: none;
}
.auth-brand__top { position: relative; z-index: 1; }
.auth-brand__logo { width: 170px; height: auto; display: block; }
/* A school's own logo may be dark/coloured — a white card keeps it readable on
   the blue brand panel. */
.auth-brand__logochip { display: inline-block; background: #fff; border-radius: 12px; padding: 10px 14px; box-shadow: 0 6px 20px rgba(0,0,0,.18); }
.auth-brand__logochip img { width: auto; max-width: 150px; max-height: 56px; object-fit: contain; display: block; }
.auth-brand__mid { position: relative; z-index: 1; max-width: 620px; }
.auth-brand__headline { font-size: 2rem; font-weight: 300; line-height: 1.2; margin: 0 0 .5rem; }
.auth-brand__sub { opacity: .9; font-size: 1.02rem; margin: 0; }
.auth-brand__badges { list-style: none; padding: 0; margin: 0; display: flex; gap: 1.4rem; flex-wrap: wrap; position: relative; z-index: 1; font-size: .9rem; }
.auth-brand__badges li { display: flex; align-items: center; gap: .5rem; opacity: .95; }
.auth-brand__badges i { color: #ffd66b; }

.auth-form { display: grid; place-items: center; padding: 40px 24px; background: var(--bg); }
.auth-form__inner { width: min(400px, 100%); }
.auth-form__brandsm { display: none; justify-content: center; margin-bottom: 1.5rem; }
/* multiply drops the logo's white backing into the light page, so the mark
   reads as transparent instead of a white box on mobile. */
.auth-form__brandsm img { width: auto; max-width: min(180px, 62vw); max-height: 72px; object-fit: contain; display: block; mix-blend-mode: multiply; }

@media (max-width: 860px) {
    .auth-split { grid-template-columns: 1fr; }
    .auth-brand { display: none; }
    .auth-form__brandsm { display: flex; }
}

/* ---- Hero banner (dashboard) ----------------------------------------- */
.hero-banner {
    margin-bottom: 20px;
}
.hero-banner--clean {
    min-height: 116px; padding: 20px 24px; display: flex; align-items: center; gap: 16px;
    /* Use the theme surface instead of a fixed white panel so the dark-mode
       text variables always retain their intended contrast. */
    background: var(--surface); border: 1px solid var(--line); border-left: 4px solid var(--acu-accent);
    border-radius: var(--radius); box-shadow: var(--shadow-1); color: var(--ink);
}
.hero-banner__logo { width: 190px; max-width: 38%; height: auto; flex: 0 1 190px; display: block; }
.hero-banner__copy { min-width: 0; }
.hero-banner__eyebrow { margin: 0 0 3px; color: var(--acu-accent); font-size: .78rem; font-weight: 700; }
.hero-banner__copy h2 { margin: 0; color: var(--ink); font-size: 1.4rem; line-height: 1.25; }
.hero-banner__copy p:last-child { margin: 5px 0 0; color: var(--ink-soft); font-size: .93rem; }
/* Live clock / date / greeting on the right of the banner. */
.hero-clock { margin-left: auto; text-align: right; flex: 0 0 auto; padding-left: 12px; }
.hero-clock__time { font-size: 2.3rem; font-weight: 700; line-height: 1; color: var(--acu-accent); font-variant-numeric: tabular-nums; }
.hero-clock__sec { font-size: 1rem; font-weight: 600; color: var(--ink-soft); margin-left: 2px; }
.hero-clock__date { font-size: .9rem; color: var(--ink); margin-top: 4px; font-weight: 600; }
.hero-clock__greet { font-size: .85rem; color: var(--ink-soft); margin-top: 2px; }
.hero-clock__help { display: inline-block; margin-top: 6px; font-size: .8rem; }
@media (max-width: 720px) {
    .hero-clock { margin-left: 0; text-align: left; width: 100%; padding-left: 0; padding-top: 10px; border-top: 1px solid var(--line); }
    .hero-clock__time { font-size: 1.9rem; }
}
@media (max-width: 520px) {
    .hero-banner--clean { min-height: 0; padding: 18px; align-items: flex-start; flex-wrap: wrap; }
    .hero-banner__logo { width: 132px; max-width: 42%; }
    .hero-banner__copy h2 { font-size: 1.18rem; }
}

/* Printable report markup is also used for the PDF and result emails, where
   it deliberately carries print colours. On screen, show it on a white paper
   surface so those fixed dark text colours remain legible in dark mode. */
.report-sheet-preview {
    overflow-x: auto;
    padding: 20px;
    background: #fff;
    color: #1a1a1a;
    border-radius: 2px;
}
.report-sheet-preview > div { min-width: 760px; }
@media (max-width: 560px) {
    .report-sheet-preview { padding: 14px; }
}

/* ---- Module header with side image -----------------------------------
   The text panel sets the height naturally (so its buttons always fit); the
   image is absolutely positioned to fill its side, so it never balloons the
   row height or overflows onto the content below. */
.module-hero {
    display: grid; grid-template-columns: 1.7fr 1fr; gap: 16px;
    margin-bottom: 20px; align-items: stretch;
}
.module-hero__text {
    background: linear-gradient(135deg, #0a7cff, #0052b4); color: #fff;
    border-radius: var(--radius); padding: 18px 24px; display: flex;
    flex-direction: column; justify-content: center;
}
.module-hero__text h1 { color: #fff; margin: 0 0 .25rem; font-size: 1.6rem; }
.module-hero__text p { margin: 0 0 .7rem; opacity: .9; font-size: .9rem; }
.module-hero__text .btn--ghost:hover,
.module-hero__text .btn--ghost:focus-visible {
    background: rgba(255,255,255,.14); color: #fff !important;
    border-color: rgba(255,255,255,.78) !important;
}
.module-hero__img {
    position: relative; border-radius: var(--radius); overflow: hidden;
    box-shadow: var(--shadow-1); min-height: 130px;
}
.module-hero__img img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; display: block; }
@media (max-width: 760px) {
    .module-hero { grid-template-columns: 1fr; }
    .module-hero__img { min-height: 110px; max-height: 130px; }
}

/* ---- Empty states ----------------------------------------------------- */
.empty-state { text-align: center; padding: 40px 20px; }
.empty-state img { width: 180px; max-width: 60%; margin-bottom: 1rem; opacity: .95; }
.empty-state p { color: var(--ink-soft); margin: 0 0 1rem; }

/* ==========================================================================
   CBT runtime — MOBILE-FIRST. Large touch targets, high contrast, minimal
   scrolling, one question at a time. Everything below is tuned for phones and
   scales up on larger screens.
   ========================================================================== */
.cbt-shell { min-height: 100vh; background: var(--bg); display: flex; flex-direction: column; }

/* Sticky exam header: title, timer, progress */
.cbt-top {
    position: sticky; top: 0; z-index: 20; background: var(--surface);
    border-bottom: 1px solid var(--line); padding: 12px 16px;
    display: flex; align-items: center; gap: 12px;
}
.cbt-top__title { font-weight: 700; font-size: 1rem; flex: 1; min-width: 0;
    white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.cbt-timer {
    display: flex; align-items: center; gap: 6px; font-weight: 800; font-size: 1.05rem;
    background: var(--acu-accent); color: #fff; padding: 6px 12px; border-radius: 999px;
    font-variant-numeric: tabular-nums;
}
.cbt-timer.is-low { background: var(--err); animation: pulse 1s infinite; }
@keyframes pulse { 50% { opacity: .65; } }
.cbt-progress { height: 5px; background: var(--surface-2); }
.cbt-progress__bar { height: 100%; background: var(--acu-accent); transition: width .25s ease; }

/* Question card — big, readable, one per screen */
.cbt-body { flex: 1; padding: 18px 16px 120px; max-width: 720px; width: 100%; margin: 0 auto; }
.cbt-qmeta { display: flex; justify-content: space-between; align-items: center; margin-bottom: 10px; }
.cbt-qmeta .n { font-weight: 700; color: var(--acu-accent); }
.cbt-qmeta .marks { font-size: .8rem; color: var(--ink-soft); background: var(--surface-2); padding: 3px 10px; border-radius: 999px; }
.cbt-question { font-size: 1.25rem; line-height: 1.45; font-weight: 600; margin-bottom: 6px; }
.cbt-qimage { max-width: 100%; border-radius: 8px; margin: 10px 0; border: 1px solid var(--line); }

/* Options as large tappable cards */
.cbt-options { display: flex; flex-direction: column; gap: 12px; margin-top: 18px; }
.cbt-option {
    display: flex; align-items: center; gap: 14px; padding: 16px 18px; min-height: 60px;
    background: var(--surface); border: 2px solid var(--line); border-radius: 12px;
    cursor: pointer; transition: border-color .12s ease, background .12s ease, transform .06s ease;
    font-size: 1.08rem; -webkit-tap-highlight-color: transparent;
}
.cbt-option:active { transform: scale(.99); }
.cbt-option.is-selected { border-color: var(--acu-accent); background: rgba(10,124,255,.08); }
.cbt-option__key {
    flex: none; width: 38px; height: 38px; border-radius: 50%;
    display: grid; place-items: center; font-weight: 800; font-size: 1.05rem;
    background: var(--surface-2); color: var(--ink-soft); border: 2px solid var(--line);
}
.cbt-option.is-selected .cbt-option__key { background: var(--acu-accent); color: #fff; border-color: var(--acu-accent); }
.cbt-textarea { width: 100%; min-height: 160px; font-size: 1.1rem; padding: 14px; border-radius: 12px; border: 2px solid var(--line); }

/* Fixed bottom nav bar — thumb-friendly */
.cbt-nav {
    position: fixed; bottom: 0; left: 0; right: 0; z-index: 30;
    background: var(--surface); border-top: 1px solid var(--line);
    padding: 12px 16px calc(12px + env(safe-area-inset-bottom));
    display: flex; align-items: center; gap: 12px;
}
.cbt-nav .btn { flex: 1; justify-content: center; min-height: 52px; font-size: 1.05rem; border-radius: 12px; }
.cbt-nav .btn--icon { flex: none; width: 52px; }

/* Question navigator (grid of numbers) */
.cbt-navigator { display: grid; grid-template-columns: repeat(auto-fill, minmax(44px, 1fr)); gap: 8px; }
.cbt-dot {
    aspect-ratio: 1; border-radius: 10px; border: 2px solid var(--line); background: var(--surface);
    font-weight: 700; display: grid; place-items: center; cursor: pointer; font-size: 1rem;
}
.cbt-dot.answered { background: rgba(22,163,74,.15); border-color: var(--ok); color: #157f39; }
.cbt-dot.current { border-color: var(--acu-accent); box-shadow: 0 0 0 3px rgba(10,124,255,.2); }

.cbt-sheet-backdrop { position: fixed; inset: 0; background: rgba(0,0,0,.5); z-index: 40; display: none; }
.cbt-sheet-backdrop.open { display: block; }
.cbt-sheet {
    position: fixed; left: 0; right: 0; bottom: 0; z-index: 41; background: var(--surface);
    border-radius: 16px 16px 0 0; padding: 20px 16px calc(20px + env(safe-area-inset-bottom));
    transform: translateY(100%); transition: transform .25s ease; max-height: 70vh; overflow-y: auto;
}
.cbt-sheet.open { transform: translateY(0); }

@media (min-width: 720px) {
    .cbt-body { padding-top: 28px; }
    .cbt-nav { max-width: 720px; left: 50%; transform: translateX(-50%); border-radius: 14px 14px 0 0; border: 1px solid var(--line); border-bottom: 0; }
}

/* ---- Responsive ------------------------------------------------------- */
@media (max-width: 900px) {
    .app-shell { grid-template-columns: 1fr; }
    .sidebar {
        position: fixed; z-index: 60; width: 84%; max-width: 320px; height: 100vh;
        transform: translateX(-100%); transition: transform .2s ease;
    }
    .sidebar.open { transform: translateX(0); box-shadow: var(--shadow-2); }
    .hamburger { display: grid; }
    .grid-2, .grid-3, .grid-4 { grid-template-columns: 1fr; }
    .scrim.open { display: block; }
    .dashboard-kpi-grid { grid-template-columns:repeat(2, minmax(0, 1fr)); }
    .dashboard-kpi--fees { grid-column:span 2; }
    .finance-flow { grid-template-columns:1fr; gap:8px; }
    .finance-flow > i { display:none; }
    .procurement-line { grid-template-columns:1fr 1fr 74px 74px 1fr 32px; }
}
@media (max-width: 560px) {
    .content { padding: 16px; }
    .tile-grid { grid-template-columns: repeat(2, 1fr); }
    .topbar__search { display: none; }
    .dashboard-section { margin-bottom:20px; }
    .dashboard-section__head { align-items:flex-start; flex-direction:column; gap:5px; }
    .dashboard-section__note { text-align:left; }
    .dashboard-kpi-grid { grid-template-columns:1fr; gap:10px; }
    .dashboard-kpi, .dashboard-kpi--fees { grid-column:auto; min-height:124px; }
    .dashboard-kpi--fees .dashboard-kpi__value { font-size:clamp(1.85rem, 9vw, 2.65rem); }
    .dashboard-workspace-grid { grid-template-columns:1fr; gap:10px; }
    .procurement-line { grid-template-columns:1fr 1fr; }
    .procurement-line__remove { grid-column:2; justify-self:end; }
}

/* ---- Rich-text editor (CMS) ------------------------------------------- */
.rte__bar { display: flex; flex-wrap: wrap; gap: 4px; padding: 6px; background: var(--surface-2); border: 1px solid var(--line); border-bottom: 0; border-radius: var(--radius) var(--radius) 0 0; }
.rte__btn { min-width: 32px; height: 30px; padding: 0 8px; border: 1px solid var(--line); background: var(--surface); border-radius: 4px; cursor: pointer; font-size: .85rem; color: var(--ink); }
.rte__btn:hover { background: var(--acu-accent); color: #fff; border-color: var(--acu-accent); }
.rte { min-height: 220px; padding: 14px 16px; background: var(--surface); border: 1px solid var(--line); border-radius: 0 0 var(--radius) var(--radius); outline: 0; overflow-y: auto; max-height: 480px; }
.rte:focus { border-color: var(--acu-accent); box-shadow: 0 0 0 3px rgba(10,124,255,.14); }
.rte h2 { font-size: 1.4rem; margin: 1rem 0 .4rem; } .rte h3 { font-size: 1.15rem; margin: .8rem 0 .3rem; }
.rte p { margin: 0 0 .7rem; } .rte ul, .rte ol { padding-left: 1.4rem; margin: 0 0 .7rem; }

/* ---- Guide (in-app user manual) --------------------------------------- */
.guide-grid {
    display: grid; gap: 16px; margin-bottom: 4px;
    grid-template-columns: repeat(auto-fill, minmax(190px, 1fr));
}
.guide-tile {
    display: flex; flex-direction: column; align-items: center; gap: .55rem;
    padding: 26px 16px 20px; text-align: center; cursor: pointer;
    background: var(--surface); border: 1px solid var(--line); border-radius: 14px;
    color: var(--ink); font: inherit;
    transition: transform .16s ease, box-shadow .16s ease, border-color .16s ease;
}
.guide-tile:hover { transform: translateY(-3px); box-shadow: var(--shadow-2); border-color: transparent; }
.guide-tile:focus-visible { outline: 3px solid var(--acu-accent); outline-offset: 2px; }
/* Circular icon badge — the visual anchor of each module. */
.guide-tile__icon {
    width: 74px; height: 74px; border-radius: 50%;
    display: grid; place-items: center; font-size: 1.9rem; color: #fff;
    background: var(--g-tone, var(--acu-accent));
    box-shadow: 0 6px 18px -6px var(--g-tone, var(--acu-accent));
}
.guide-tile__name { font-weight: 700; font-size: 1rem; }
.guide-tile__tag  { font-size: .78rem; color: var(--ink-soft); line-height: 1.35; }
.guide-tile.is-open { border-color: var(--g-tone, var(--acu-accent)); box-shadow: var(--shadow-2); }

/* Per-module accent. Set once here, consumed by the badge above and the
   detail header, so a module keeps one identity across both. */
.guide-tile--blue   { --g-tone: #2f6fed; }
.guide-tile--indigo { --g-tone: #5b5bd6; }
.guide-tile--teal   { --g-tone: #0d9488; }
.guide-tile--green  { --g-tone: #16a34a; }
.guide-tile--amber  { --g-tone: #d97706; }
.guide-tile--purple { --g-tone: #7c3aed; }
.guide-tile--pink   { --g-tone: #db2777; }
.guide-tile--cyan   { --g-tone: #0891b2; }
.guide-tile--slate  { --g-tone: #475569; }

/* Slide-down detail */
.guide-panel { overflow: hidden; height: 0; transition: height .28s ease; margin-top: 18px; }
.guide-panel[hidden] { display: none; }
.guide-panel__inner {
    background: var(--surface); border: 1px solid var(--line);
    border-radius: 14px; overflow: hidden;
}
.guide-detail__head {
    display: flex; align-items: center; gap: 1rem; padding: 20px 24px;
    background: linear-gradient(135deg, var(--g-tone, var(--acu-accent)), color-mix(in srgb, var(--g-tone, var(--acu-accent)) 68%, #000));
    color: #fff;
}
.guide-detail__head .guide-tile__icon {
    width: 56px; height: 56px; font-size: 1.5rem; flex: none;
    background: rgba(255,255,255,.18); box-shadow: none;
}
.guide-detail__head h2 { margin: 0; font-size: 1.35rem; }
.guide-detail__head p  { margin: .15rem 0 0; opacity: .9; font-size: .88rem; }
.guide-close {
    margin-left: auto; background: rgba(255,255,255,.16); border: 0; color: #fff;
    width: 34px; height: 34px; border-radius: 8px; font-size: 1.4rem; line-height: 1; cursor: pointer;
}
.guide-close:hover { background: rgba(255,255,255,.3); }
.guide-about { margin: 0; padding: 20px 24px 4px; color: var(--ink-soft); line-height: 1.65; max-width: 78ch; }

/* Process flow chain */
.guide-flow { display: flex; flex-wrap: wrap; align-items: center; gap: .5rem; padding: 16px 24px 4px; }
.guide-flow__step {
    display: inline-flex; align-items: center; gap: .45rem;
    background: var(--surface-2); border: 1px solid var(--line);
    padding: 7px 13px; border-radius: 999px; font-size: .82rem; font-weight: 600;
}
.guide-flow__step b {
    width: 19px; height: 19px; border-radius: 50%; display: grid; place-items: center;
    background: var(--g-tone, var(--acu-accent)); color: #fff; font-size: .68rem;
}
.guide-flow__arrow { color: var(--ink-soft); font-size: .68rem; opacity: .6; }

.guide-cols { display: grid; grid-template-columns: 1.15fr 1fr; gap: 28px; padding: 18px 24px 26px; }
.guide-cols h3 { font-size: .92rem; text-transform: uppercase; letter-spacing: .06em; color: var(--ink-soft); margin: 0 0 .7rem; }
.guide-cols h3 i { color: var(--g-tone, var(--acu-accent)); margin-right: .35rem; }
.guide-steps { margin: 0; padding-left: 1.25rem; }
.guide-steps li { margin-bottom: .6rem; line-height: 1.6; }
.guide-links, .guide-tips { list-style: none; margin: 0; padding: 0; }
.guide-links li {
    padding: 9px 12px; margin-bottom: 7px; border-radius: 9px;
    background: var(--surface-2); border-left: 3px solid var(--g-tone, var(--acu-accent));
}
.guide-links b { display: block; font-size: .9rem; }
.guide-links span { font-size: .82rem; color: var(--ink-soft); }
.guide-tips li {
    position: relative; padding-left: 1.2rem; margin-bottom: .55rem;
    font-size: .86rem; color: var(--ink-soft); line-height: 1.55;
}
.guide-tips li::before { content: "•"; position: absolute; left: .25rem; color: var(--g-tone, var(--acu-accent)); font-weight: 700; }

@media (max-width: 780px) {
    .guide-cols { grid-template-columns: 1fr; gap: 20px; }
    .guide-grid { grid-template-columns: repeat(auto-fill, minmax(150px, 1fr)); gap: 12px; }
    .guide-tile__icon { width: 62px; height: 62px; font-size: 1.6rem; }
}

/* Student form: choose one guardian workflow without duplicating family records. */
.guardian-linker { display:grid; grid-template-columns:repeat(3, minmax(0, 1fr)); gap:10px; margin:0 0 16px; }
.guardian-linker__choice { position:relative; display:block; cursor:pointer; }
.guardian-linker__choice input { position:absolute; opacity:0; pointer-events:none; }
.guardian-linker__choice span { display:block; min-height:104px; padding:14px; border:1px solid var(--line); border-radius:10px; background:var(--surface); transition:border-color .18s ease, background-color .18s ease, box-shadow .18s ease; }
.guardian-linker__choice i { display:inline-grid; place-items:center; width:30px; height:30px; border-radius:8px; background:#e9f2ff; color:var(--acu-blue); font-size:.82rem; }
.guardian-linker__choice strong, .guardian-linker__choice small { display:block; }
.guardian-linker__choice strong { margin-top:9px; color:var(--ink); font-size:.88rem; }
.guardian-linker__choice small { margin-top:4px; color:var(--muted); font-size:.76rem; line-height:1.35; }
.guardian-linker__choice input:checked + span { border-color:var(--acu-blue); background:#f4f8ff; box-shadow:0 0 0 2px rgba(31,101,241,.12); }
.guardian-linker__choice input:focus-visible + span { outline:3px solid rgba(31,101,241,.3); outline-offset:2px; }
.guardian-linker__panel[hidden] { display:none !important; }
@media (max-width:760px) { .guardian-linker { grid-template-columns:1fr; } .guardian-linker__choice span { min-height:auto; } }

/* School settings: the next admission number is the evidence for the policy. */
.admission-policy__body { display:grid; grid-template-columns:minmax(230px, .7fr) minmax(0, 1.3fr); gap:22px; align-items:stretch; }
.admission-policy__preview { display:flex; flex-direction:column; justify-content:center; min-height:154px; padding:20px; border-radius:12px; color:#fff; background:linear-gradient(145deg, #123b73, #1f65f1); box-shadow:inset 0 1px 0 rgba(255,255,255,.22); }
.admission-policy__eyebrow { font-size:.68rem; font-weight:800; letter-spacing:.11em; opacity:.75; }
.admission-policy__preview strong { margin:8px 0 6px; font-family:ui-monospace, SFMono-Regular, Menlo, Consolas, monospace; font-size:clamp(1.2rem, 2vw, 1.75rem); letter-spacing:.02em; overflow-wrap:anywhere; }
.admission-policy__preview small { font-size:.76rem; opacity:.82; }
.admission-policy__form { display:grid; grid-template-columns:1fr auto; gap:12px 16px; align-content:center; }
.admission-policy__form .field, .admission-policy__tokens { grid-column:1 / -1; }
.admission-policy__tokens { display:flex; flex-wrap:wrap; gap:8px; }
.admission-policy__tokens span { padding:5px 8px; border:1px solid var(--line); border-radius:999px; color:var(--ink-soft); font-size:.76rem; background:var(--surface-2); }
.admission-policy__tokens code { color:var(--acu-blue); font-weight:800; }
@media (max-width:760px) { .admission-policy__body { grid-template-columns:1fr; } .admission-policy__form { grid-template-columns:1fr; } .admission-policy__form .btn { width:100%; justify-content:center; } }
