/* Ledger Board (27 Nov 2026): the website in the look of the desktop
   (CSEXAM) and mobile apps — registrar green and ink, brass accents, a dark
   anchor (the top bar and the sidebar), white cards on a soft sage board,
   Archivo type and tabular figures.

   Linked LAST in the <head> of every page frame, after skin.css. It changes
   no markup and no behaviour. Stylesheets linked later in the <body>
   (teacher/portal.css, admin-home.css, admin-shell.css, student-access.css)
   write `html body …`; the rules here that must outrank them start with
   `html:root`, the page headers with `html:root:root`.

   Themes: the type, the brass accent and the dark anchor apply to every
   theme and follow its primary colour (--green). Only the default "Green"
   theme (no data-theme, or "aust") takes the Ledger Board greens and its
   green-grey neutrals; the other themes keep skin.css's greys, and Midnight
   keeps its dark board.

   Roll back: remove this file's <link> from the frames. */

@import url("https://fonts.googleapis.com/css2?family=Archivo:wght@400;500;600;700;800&display=swap");

/* ---- tokens ------------------------------------------------------------ */
:root:root:root {
  --tb-font: "Archivo", system-ui, -apple-system, "Segoe UI", Roboto, Arial, sans-serif;
  --lb-brass: #C9A227;
  --lb-brass-hi: #E3C766;
  --lb-brass-soft: #F7F0D8;
  --lb-primary: var(--green, #1E5B45);
  --lb-deep: color-mix(in srgb, var(--lb-primary) 70%, #050a08);
  --lb-night: color-mix(in srgb, var(--lb-primary) 18%, #0a0f0d);
  --lb-anchor: linear-gradient(180deg, var(--lb-deep) 0%, var(--lb-night) 68%);
  --lb-bar: linear-gradient(90deg, var(--lb-night) 0%, var(--lb-deep) 100%);
  --lb-hero: linear-gradient(125deg, var(--lb-deep) 0%, var(--lb-night) 78%);
  --lb-rule: color-mix(in srgb, var(--ink, #13221C) 80%, transparent);
}
:root:root:root:not([data-theme]), :root:root:root[data-theme="aust"] {
  --green: #1E5B45; --green-d: #14402F; --green-l: #2B7A5E;
  --gold: #C9A227;
  --accent-rgb: 30, 91, 69;
  --ground: #EDF1EE;
  --paper: #FFFFFF;
  --paper-2: #F9FBF9;
  --field: #FFFFFF;
  --row: #F4F7F5;
  --ink: #13221C;
  --ink-2: #2E3D36;
  --muted: #5E6D66;
  --line: #DCE3DF;
  --line-2: #EAEFEC;
  --tb-line-strong: #C4CEC8;
  --tb-head: #F3F6F4;
  --ok: #1B7A4B; --ok-soft: #E7F3EC; --ok-line: #BCDDC9;
  --bad: #B3402E; --bad-soft: #FBECE9; --bad-line: #EEC4BC;
  --warn: #8A6D1B; --warn-soft: #FBF3DD;
  --shadow: 0 1px 2px rgba(19, 34, 28, .07), 0 1px 1px rgba(19, 34, 28, .03);
  --tb-shadow-lg: 0 12px 30px rgba(19, 34, 28, .11), 0 2px 6px rgba(19, 34, 28, .06);
}

/* ---- type -------------------------------------------------------------- */
html:root body { -webkit-font-smoothing: antialiased; -moz-osx-font-smoothing: grayscale; }
html:root h1 { font-weight: 800; letter-spacing: -.015em; }
html:root :is(h2, h3) { letter-spacing: -.01em; }
html:root :is(table, .stat, .stats, .dash-kpi, .tp-kpi, .tp-figs, .course-figs) { font-variant-numeric: tabular-nums; }
html:root ::selection { background: color-mix(in srgb, var(--lb-brass) 38%, transparent); }

/* ---- the top bar (every page): the dark anchor -------------------------- */
html:root .aust-site-nav {
  background: var(--lb-bar);
  border-bottom: 2px solid var(--lb-brass);
  box-shadow: 0 6px 22px rgba(10, 20, 15, .22);
  color: #fff;
  -webkit-backdrop-filter: none; backdrop-filter: none;
  font-family: var(--tb-font);
}
html:root .aust-site-nav .aust-nav-home { color: #fff; }
html:root .aust-site-nav .aust-nav-home b { color: #fff; letter-spacing: .05em; font-weight: 800; }
html:root .aust-site-nav .aust-nav-home small { color: var(--lb-brass-hi); font-weight: 600; }
/* Three :root: the student pages colour every link with
   `html body:has([data-access-theme]) a:not(.btn):not(…):not(…)` (0,4,3). */
html:root:root:root .aust-site-nav .aust-nav-links a { color: rgba(255, 255, 255, .80); border-radius: 8px; font-weight: 600; box-shadow: none; }
/* A little tighter than before, so the links and Install app fit one line on a laptop. */
@media (min-width: 1001px) {
  html:root:root:root .aust-site-nav .aust-nav-links a { padding-left: 10px; padding-right: 10px; font-size: 13.5px; }
}
html:root:root:root .aust-site-nav .aust-nav-links a:hover { background: rgba(255, 255, 255, .08); color: #fff; box-shadow: none; }
html:root:root:root .aust-site-nav .aust-nav-links a[aria-current="page"] {
  background: rgba(255, 255, 255, .10); color: #fff;
  box-shadow: inset 0 -3px 0 var(--lb-brass);
}
html:root .aust-site-nav .aust-nav-history button {
  background: transparent; color: rgba(255, 255, 255, .88);
  border: 1px solid rgba(255, 255, 255, .24); border-radius: 8px;
}
html:root .aust-site-nav .aust-nav-history button:hover:not(:disabled) { background: rgba(255, 255, 255, .10); color: #fff; }
html:root .aust-site-nav .aust-nav-history button:disabled,
html:root .aust-site-nav .aust-nav-history button:disabled:hover { background: transparent; color: rgba(255, 255, 255, .5); border-color: rgba(255, 255, 255, .14); }
html:root .aust-site-nav :is([data-aust-install], .aust-install-button) {
  background: var(--lb-brass); border-color: var(--lb-brass); color: #13221C;
  font: 700 13.5px/1.15 var(--tb-font); border-radius: 8px;
  align-self: center; padding: 7px 12px;
}
html:root .aust-site-nav :is([data-aust-install], .aust-install-button):hover { background: #D9B43F; border-color: #D9B43F; color: #13221C; }
html:root .aust-site-nav .aust-theme-btn { background: rgba(255, 255, 255, .10); border-color: rgba(255, 255, 255, .26); color: #fff; }
html:root .aust-site-nav .aust-theme-btn:hover { background: rgba(255, 255, 255, .18); color: #fff; }
/* The theme panel opens under the bar on its own white card. */
html:root .aust-site-nav .aust-theme-panel { color: var(--ink, #13221C); background: var(--paper, #fff); }

/* ---- the sidebar (admin panel, teacher portal): the dark anchor --------- */
html:root .side {
  background: var(--lb-anchor);
  color: #fff;
  border-right: 0;
  box-shadow: 6px 0 26px rgba(10, 20, 15, .14);
  scrollbar-color: rgba(255, 255, 255, .25) transparent;
}
html:root .side .side-head { border-bottom: 1px solid rgba(255, 255, 255, .10); padding-bottom: 12px; }
html:root .side .side-brand, html:root .side .side-brand:hover { color: #fff; background: transparent; }
html:root .side .side-brand b { color: #fff; font-weight: 800; letter-spacing: .01em; }
html:root .side .side-brand small { color: var(--lb-brass-hi); }
html:root .side .side-nav { padding-top: 6px; }
html:root .side .side-label {
  color: var(--lb-brass-hi);
  font-size: 10.5px; font-weight: 700; letter-spacing: .14em; text-transform: uppercase; opacity: .92;
}
html:root .side .side-link { color: rgba(255, 255, 255, .82); border-radius: 8px; font-weight: 500; }
html:root .side .side-link svg { color: rgba(255, 255, 255, .6); }
html:root .side .side-link:hover { background: rgba(255, 255, 255, .07); color: #fff; }
html:root .side .side-link:hover svg { color: #fff; }
html:root .side .side-link[aria-current="page"] {
  background: rgba(255, 255, 255, .12); color: #fff; font-weight: 700;
  box-shadow: inset 3px 0 0 var(--lb-brass);
}
html:root .side .side-link[aria-current="page"] svg { color: var(--lb-brass); }
html:root .side .side-foot { border-top: 1px solid rgba(255, 255, 255, .10); background: rgba(0, 0, 0, .14); }
html:root .side :is(.side-account, .side-who b) { color: #fff; }
html:root .side :is(.side-who small, .side-idle-note) { color: rgba(255, 255, 255, .6); }
html:root .side .side-avatar { background: var(--lb-brass); color: #13221C; font-weight: 800; }
html:root .side .side-account svg { color: rgba(255, 255, 255, .72); }
html:root .side .tp-side-account { color: #fff; }
html:root .side .tp-side-account:hover { background: rgba(255, 255, 255, .08); color: #fff; }
html:root .side .side-logout {
  background: rgba(255, 255, 255, .06); color: #fff;
  border: 1px solid rgba(255, 255, 255, .22); border-radius: 8px;
}
html:root .side .side-logout:hover { background: var(--bad, #B3402E); border-color: var(--bad, #B3402E); color: #fff; }
html:root .side .side-logout:focus-visible { outline-color: var(--lb-brass); }
html:root .side .side-icon { color: rgba(255, 255, 255, .8); }
html:root .side .side-icon:hover, html:root .side .side-icon[aria-current="page"] { background: rgba(255, 255, 255, .12); color: #fff; }
html:root .side .side-close { background: rgba(255, 255, 255, .08); border-color: rgba(255, 255, 255, .24); color: #fff; }
html:root .side .side-close:hover { background: rgba(255, 255, 255, .16); color: #fff; }
html:root .side :is(a, button):focus-visible { outline: 2px solid var(--lb-brass); outline-offset: 2px; }
/* Phones: the bar with the Menu button, under the site bar. */
html:root .side-mobilebar { background: var(--lb-bar); color: #fff; border-bottom: 2px solid var(--lb-brass); }
html:root .side-mobilebar b { color: #fff; }
html:root body .side-mobilebar .side-open { background: rgba(255, 255, 255, .10); color: #fff; border-color: rgba(255, 255, 255, .26); }
html:root body .side-mobilebar .side-open:hover { background: rgba(255, 255, 255, .18); color: #fff; }

/* ---- page headers: deep gradient, white type, a brass rule ------------- */
html:root:root :is(.tp-welcome, .dash-head, .admin-welcome, .home-welcome, .masthead) {
  position: relative;
  overflow: hidden;
  background: var(--lb-hero);
  color: #fff;
  border: 0;
  border-radius: 14px;
  box-shadow: inset 0 -3px 0 var(--lb-brass), 0 14px 34px rgba(10, 20, 15, .16);
}
html:root:root :is(.tp-welcome, .dash-head, .admin-welcome, .home-welcome, .masthead) > * { position: relative; z-index: 1; }
html:root:root :is(.tp-welcome, .dash-head, .admin-welcome, .home-welcome, .masthead)::after {
  content: ""; display: block; position: absolute; inset: auto -70px -110px auto;
  width: 260px; height: 260px; border-radius: 50%;
  background: radial-gradient(circle, color-mix(in srgb, var(--lb-brass) 26%, transparent) 0%, transparent 70%);
  pointer-events: none;
}
html:root:root .tp-welcome::before { background: linear-gradient(115deg, rgba(255, 255, 255, .07) 0%, transparent 55%); }
html:root:root :is(.tp-welcome, .dash-head, .admin-welcome, .home-welcome, .masthead) :is(h1, h2, h3, b, strong) { color: #fff; }
html:root:root :is(.tp-welcome, .dash-head, .admin-welcome, .home-welcome, .masthead) :is(p, small, .tp-sub) { color: rgba(255, 255, 255, .8); }
html:root:root :is(.tp-welcome, .dash-head, .admin-welcome, .home-welcome, .masthead) :is(.tp-eyebrow, .dash-pretitle, .admin-eyebrow, .inst) {
  color: var(--lb-brass-hi); letter-spacing: .12em; text-transform: uppercase; font-weight: 700; font-size: 11.5px;
}
html:root:root :is(.tp-welcome, .dash-head, .admin-welcome, .home-welcome, .masthead) a:not(.btn):not(.tp-btn) { color: #fff; }
html:root:root :is(.tp-welcome, .dash-head, .admin-welcome, .home-welcome) :is(.btn, .tp-btn, button):not(.ghost) {
  background: var(--lb-brass); border-color: var(--lb-brass); color: #13221C; box-shadow: 0 1px 0 rgba(0, 0, 0, .18);
}
html:root:root :is(.tp-welcome, .dash-head, .admin-welcome, .home-welcome) :is(.btn, .tp-btn, button):not(.ghost):hover {
  background: #D9B43F; border-color: #D9B43F; color: #13221C;
}
html:root:root :is(.tp-welcome, .dash-head, .admin-welcome, .home-welcome) :is(.btn, .tp-btn, button).ghost {
  background: rgba(255, 255, 255, .08); border-color: rgba(255, 255, 255, .30); color: #fff; box-shadow: none;
}
html:root:root :is(.tp-welcome, .dash-head, .admin-welcome, .home-welcome) :is(.btn, .tp-btn, button).ghost:hover {
  background: rgba(255, 255, 255, .16); border-color: rgba(255, 255, 255, .45); color: #fff;
}
html:root:root :is(.tp-welcome, .dash-head, .admin-welcome, .home-welcome) :is(.btn, .tp-btn, button) svg { color: currentColor; }
html:root:root .tp-welcome .tp-avatar { background: var(--lb-brass); color: #13221C; }
html:root:root .dash-head { padding: 22px 24px; align-items: center; margin: 2px 0 18px; }
html:root:root .dash-head h1 { margin: 4px 0 0; font-size: clamp(21px, 2.4vw, 26px); }

/* ---- teacher page headers --------------------------------------------- */
html:root .tp-head { padding-bottom: 14px; border-bottom: 2px solid var(--lb-rule); }
html:root .tp-eyebrow { letter-spacing: .1em; font-weight: 700; }

/* ---- figures ----------------------------------------------------------- */
html:root :is(a.dash-kpi, .tp-kpi, .stat) { border-top: 3px solid var(--lb-primary); }
html:root :is(a.dash-kpi.is-alert, .tp-kpi.is-bad, .stat.warn) { border-top-color: var(--bad); }
html:root .tp-kpi.is-warn { border-top-color: var(--warn); }
html:root :is(.dash-kpi-text b, .tp-kpi-text b, .stat b) { font-weight: 800; letter-spacing: -.01em; }
html:root .dash-kpi-label { letter-spacing: .06em; font-size: 11px; font-weight: 700; }
html:root :is(.dash-kpi:not(.is-alert) .dash-kpi-icon, .tp-kpi:not(.is-warn):not(.is-bad) .tp-kpi-ico, .svc:not(.soon) .svc-avatar) {
  background: var(--lb-deep); color: var(--lb-brass-hi);
}

/* ---- tables: the ledger rule under the head row ------------------------- */
html:root table:not(.tm-table) > thead > tr:last-child > th,
html:root table:not(.tm-table) > thead > tr > th[rowspan] { border-bottom: 2px solid var(--lb-rule); }

/* ---- badges ------------------------------------------------------------ */
html:root :is(.tag, .pill) { border-radius: 999px; }

/* ---- admin dashboard --------------------------------------------------- */
html:root .dash-group-head {
  text-transform: uppercase; letter-spacing: .09em; font-size: 12.5px; font-weight: 700; color: var(--ink-2);
  border-bottom: 2px solid var(--lb-rule);
}
html:root .dash-group-head span { background: var(--lb-brass-soft); border-color: color-mix(in srgb, var(--lb-brass) 35%, transparent); color: #6B5512; }
html:root .dash-row-icon { background: var(--sage); color: var(--lb-primary); }
html:root .dash-row-go { color: var(--lb-brass); }

/* ---- the home page ----------------------------------------------------- */
html:root .home-step b { background: var(--lb-deep); color: var(--lb-brass-hi); }
html:root .home-foot { background: var(--lb-bar); border-top: 2px solid var(--lb-brass); }
html:root .home-foot :is(.home-foot-in, .home-foot-links a) { color: rgba(255, 255, 255, .78); }
html:root .home-foot .home-foot-links a:hover { color: #fff; }

/* ---- Midnight: the anchor and the headers a shade deeper --------------- */
html[data-theme="midnight"]:root .side, html[data-theme="midnight"]:root .aust-site-nav,
html[data-theme="midnight"]:root .side-mobilebar { background: linear-gradient(180deg, #10201a, #0b1410); }
html[data-theme="midnight"]:root:root :is(.tp-welcome, .dash-head, .admin-welcome, .home-welcome, .masthead) { background: linear-gradient(125deg, #173a2c, #0e1813); }

/* ---- phones ------------------------------------------------------------ */
@media (max-width: 760px) {
  html:root:root :is(.tp-welcome, .dash-head, .admin-welcome, .home-welcome, .masthead) { border-radius: 12px; }
  html:root:root .dash-head { padding: 18px; }
}
@media (prefers-reduced-motion: reduce) { html:root .aust-site-nav, html:root .side { transition: none; } }
@media print {
  html:root:root :is(.tp-welcome, .dash-head, .admin-welcome, .home-welcome, .masthead) { background: none; color: #000; box-shadow: none; border: 1px solid #999; }
  html:root:root :is(.tp-welcome, .dash-head, .admin-welcome, .home-welcome, .masthead) :is(h1, h2, h3, p, b, small, .inst, .tp-eyebrow, .dash-pretitle) { color: #000; }
  html:root:root :is(.tp-welcome, .dash-head, .admin-welcome, .home-welcome, .masthead)::after { display: none; }
}
