/* Generated by `php artisan assets:manifest --build` from css/console-v3.css. Do not edit by hand. */
/* CrestPoint Semester v3 - management console entry. */
/* CrestPoint Semester v3 — self-hosted display and mono faces.
   UI text uses the native system stack (PO 2026-11-04), so only the serif
   display face and the mono face are shipped. Never add a third family.
   Each face is a static, subset WOFF2 (~16 kB serif, ~12 kB mono); rebuild
   with `python scripts/subset-fonts.py` after changing the glyph set. */
@font-face { font-family: 'IBM Plex Mono'; font-style: normal; font-weight: 400; font-display: swap; src: url("../fonts/v3/IBMPlexMono-400.woff2?v=202611181") format('woff2'); }
@font-face { font-family: 'IBM Plex Mono'; font-style: normal; font-weight: 500; font-display: swap; src: url("../fonts/v3/IBMPlexMono-500.woff2?v=202611181") format('woff2'); }
@font-face { font-family: 'Source Serif 4'; font-style: normal; font-weight: 500; font-display: swap; src: url("../fonts/v3/SourceSerif4-500.woff2?v=202611181") format('woff2'); }
@font-face { font-family: 'Source Serif 4'; font-style: normal; font-weight: 600; font-display: swap; src: url("../fonts/v3/SourceSerif4-600.woff2?v=202611181") format('woff2'); }


/* ── Login page tokens (PO mockup 2026-11-06: editorial ridge + operational
   night). Existing semester tokens (navy-900, teal-800, ink-700, B8C6D4 rail
   ink) already cover navy/teal/muted, so only the pairs the shared palette
   lacked are declared here: the warm paper ground, the operational night
   surfaces, and the mint accent reserved for the staff sign-in. Note the
   staff grid is a 1px hairline pattern via an inline SVG data URI - the
   repo's zero-gradient gate forbids CSS gradients, not hairlines. */
:root {
  --auth-paper: #F3EFE6;
  --auth-paper-line: #E2DCCE;
  --auth-mint: #5CD6B0;
  --auth-mint-strong: #7FE0C0;
  --auth-mint-ink: #052016;
  --auth-night: #07121D;
  --auth-card-night: #0E2236;
  --auth-line-night: #2F4B66;
  --auth-grid-line: #12273A;
  --auth-sage: #D9E6DF;

  --auth-muted: var(--ink-700);
  --auth-muted-dark: #B8C6D4;

  /* Login layout constants (the prompt calls these out in pixels and they
     repeat across the two pages, so they live here instead of raw literals). */
  --auth-content-max: 1240px;
  --auth-gutter: max(48px, calc((100vw - var(--auth-content-max)) / 2));
  --auth-hero-pad-top: 96px;
  --auth-hero-pad-bottom: 56px;
  --auth-ridge-lift: -150px;
  --auth-slide-pad: 20px;
  --auth-pad-card: 36px;

  --auth-amber: #F5B74F;
  --auth-red: #FF7B72;

  --login-input-h: 50px;
  --login-button-h: 52px;
}

/* CrestPoint Semester — academic UI v3 tokens (design/05-academic-portal-ui-v3.md). */
:root {
  color-scheme: light;
  --navy-950: #0A1D2F;
  --navy-900: #102A43;
  --navy-800: #153B5B;
  --navy-700: #1D4E75;
  --navy-100: #D7E3EE;
  --navy-50: #EBF2F7;
  --ink-900: #15202B;
  --ink-700: #3B4A57;
  --ink-500: #64727C;
  --ink-400: #87949E;
  --neutral-500: #6B7A87;
  --line: #D6E0E8;
  --line-soft: #E4EBF1;
  --line-strong: #BCCAD5;
  --scrim: rgba(16, 42, 67, .45);
  --canvas: #EEF2F6;
  --surface: #FFFFFF;
  --surface-2: #F5F8FA;
  --surface-3: #E9EFF4;
  --row-alt: #F8FAFC;
  --row-hover: #E7F3F1;
  --teal-800: #124B48;
  --teal-700: #175A57;
  --teal-600: #1F6F6B;
  --teal-500: #2C8C86;
  --teal-200: #A9D4CF;
  --teal-100: #CDE7E4;
  --teal-50: #E7F3F1;
  --gold-700: #7E5F25;
  --gold-600: #A8843F;
  --gold-50: #FBF4E7;
  --burgundy-600: #7A3040;
  --burgundy-50: #F8EBEE;
  --green-700: #25654A;
  --green-600: #2F7D5A;
  --green-50: #E9F4EE;
  --amber-700: #8A5813;
  --amber-600: #A66B1A;
  --amber-50: #FBF2E2;
  --red-700: #962F3C;
  --red-600: #B23A48;
  --red-50: #FBEBED;
  --info-600: #2F6E9E;
  --info-50: #EAF2F8;

  --text: var(--ink-900);
  --text-2: var(--ink-700);
  --text-3: var(--ink-500);
  --text-inverse: #FFFFFF;
  --border: var(--line);
  --border-strong: var(--line-strong);
  --primary: var(--teal-600);
  --primary-hover: var(--teal-700);
  /* Subtle primary fill for applied filters, selections and tonal chips
     (mirrors the marketing surface's --primary-subtle). */
  --primary-subtle: var(--teal-50);
  --on-primary: #FFFFFF;
  --focus: var(--teal-600);
  --success-600: var(--green-600);
  --warning-600: var(--amber-600);
  --danger-600: var(--red-600);
  --table-head: var(--surface-2);
  --selection: var(--teal-50);

  /* Sidebar rails (PO 2026-11-04): navy console rail, canvas campus rail.
     Every rail value is a token so the shells never hardcode a colour. */
  --rail-console-bg: var(--navy-900);
  --rail-console-line: #1E3D59;
  --rail-console-ink: #C4D3E0;
  --rail-console-ink-strong: #FFFFFF;
  --rail-console-ink-muted: #93A9BC;
  --rail-console-hover: #17364F;
  --rail-console-active: #1F4668;
  --rail-console-accent: var(--teal-200);

  --rail-campus-bg: var(--canvas);
  --rail-campus-line: var(--line);
  --rail-campus-ink: var(--ink-700);
  --rail-campus-ink-strong: var(--ink-900);
  --rail-campus-ink-muted: var(--ink-500);
  --rail-campus-hover: var(--surface-3);
  --rail-campus-active: var(--surface);
  --rail-campus-accent: var(--teal-600);

  /* Searchable lookup combobox (PO 2026-11-04). */
  --combo-accent: var(--teal-600);
  --combo-accent-soft: var(--teal-50);
  --combo-bg: var(--surface);
  --combo-ink: var(--ink-900);
  --combo-muted: #5F6C77;
  --combo-line: var(--border-strong);
  --combo-hover: var(--row-hover);
  --combo-control-min: 40px;
  --combo-row-min: 34px;
  --combo-code-col: 58px;
  --combo-popup-max: 236px;

  --font-display: "Source Serif 4", Georgia, "Times New Roman", serif;
  /* PO 2026-11-04: native system UI text (no webfont request) + one mono.
     The serif display face stays self-hosted for headings only. */
  --font-sans: system-ui, -apple-system, "Segoe UI Variable Text", "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
  --font-ui: var(--font-sans);
  --font-mono: "IBM Plex Mono", ui-monospace, SFMono-Regular, Menlo, monospace;

  --text-display: 30px;
  --text-h1: 24px;
  --text-h2: 19px;
  --text-h3: 15px;
  --text-body: 13.5px;
  --text-sm: 12px;
  --text-xs: 11px;
  --text-stat: 24px;
  --text-reading: 15px;
  /* Dropdown standard (PO 2026-11-04). */
  --text-ui: 13px;
  --text-code: 11.5px;
  --text-meta: 11.5px;
  --text-group: 11px;

  /* Legacy aliases used by Breeze components */
  --text-display-xl: 30px;
  --text-display-lg: 27px;
  --text-display-md: 22px;
  --text-h1: 24px;
  --text-h2: 19px;
  --text-h3: 15px;
  --text-h4: 13.5px;
  --text-body-lg: 14px;
  --text-body: 13.5px;
  --text-sm: 12px;
  --text-xs: 11px;

  --radius-sm: 6px;
  --radius-md: 8px;
  --radius-lg: 12px;
  --radius-xl: 16px;
  --radius-full: 999px;
  /* Dropdown standard (PO 2026-11-04): control 7, popup 9, row 6. */
  --radius-control: 7px;
  --radius-popup: 9px;
  --radius-row: 6px;

  --shadow-xs: 0 1px 2px rgba(16, 42, 67, .06);
  --shadow-sm: 0 1px 3px rgba(16, 42, 67, .08), 0 1px 2px rgba(16, 42, 67, .04);
  --shadow-md: 0 8px 24px rgba(16, 42, 67, .10);
  --shadow-lg: 0 20px 48px rgba(16, 42, 67, .16);
  /* Offset ring: 2px surface gap + 2px solid focus colour (>= 3:1 on every surface). */
  --ring-focus: 0 0 0 2px var(--surface), 0 0 0 4px var(--teal-600);

  --s0: 2px;
  --s1: 4px;
  --s1-5: 6px;
  --s2: 8px;
  --s2-5: 10px;
  --s3: 12px;
  --s3-5: 14px;
  --s4: 16px;
  --s4-5: 18px;
  --s5: 20px;
  --s5-5: 22px;
  --s6: 24px;
  --s6-5: 28px;
  --s7: 32px;
  --s7-5: 36px;
  --s8: 40px;
  --s9: 48px;
  --s10: 64px;
  --s11: 80px;
  --s12: 96px;

  /* Semantic spacing - components use these, never a raw step. */
  --pad-card-head-y: var(--s4-5);
  --pad-card-head-x: var(--s6);
  --pad-card-body: var(--s6);
  --pad-card-foot-y: var(--s4);
  --pad-card-foot-x: var(--s6);
  --pad-compact-head-y: var(--s3);
  --pad-compact-head-x: var(--s4);
  --pad-compact-body: var(--s4);
  --pad-compact-foot-y: var(--s2-5);
  --pad-compact-foot-x: var(--s4);
  --pad-cell-y: var(--s3-5);
  --pad-cell-x: var(--s5);
  --pad-cell-y-compact: var(--s2-5);
  --pad-cell-x-compact: var(--s3-5);
  --pad-page-x: var(--s6);
  --pad-page-x-tight: var(--s4);
  --gap-grid: var(--s5);
  --gap-stack: var(--s4);
  --tracking-label: 0.07em;
  --tracking-eyebrow: 0.1em;
  --target-min: 40px;
  --target-touch: 44px;

  /* Shared native-select chevron. Stroke matches --ink-700 (#3B4A57). */
  --icon-chevron: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%233B4A57' stroke-width='1.75' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='m6 9 6 6 6-6'/%3E%3C/svg%3E");

  --z-base: 0;
  --z-raised: 10;
  --z-sticky: 20;
  --z-nav: 100;
  --z-drawer: 200;
  --z-modal: 300;
  --z-toast: 400;

  --dur-1: 120ms;
  --dur-2: 180ms;
  --dur-3: 240ms;
  --ease-out: cubic-bezier(.2, 0, 0, 1);
  --ease-entrance: cubic-bezier(.16, 1, .3, 1);
  --kpi-min-h: 120px;
  --card-max-h: 420px;
}

/* CrestPoint Semester — academic UI v3: base, components, campus shell and pages. */

*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
html { -webkit-text-size-adjust: 100%; }
body {
    min-height: 100dvh;
    background: var(--canvas);
    color: var(--text);
    font: 400 var(--text-body)/1.55 var(--font-sans);
    -webkit-font-smoothing: antialiased;
    font-variant-numeric: tabular-nums;
}
a { color: var(--teal-600); text-decoration: none; }
a:hover { text-decoration: underline; text-underline-offset: 3px; }
button { font: inherit; color: inherit; background: none; border: 0; cursor: pointer; }
img, svg { display: block; flex: none; }
ul, ol { list-style: none; }
[hidden] { display: none !important; }
.u-scroll-lock { overflow: hidden; }

h1, h2, h3, h4 { color: var(--ink-900); font-weight: 600; line-height: 1.25; }
h1, h2 { font-family: var(--font-display); font-weight: 600; letter-spacing: -0.01em; }
h1 { font-size: var(--text-h1); }
h2 { font-size: var(--text-h2); }
h3 { font-size: var(--text-h3); }
h4 { font-size: var(--text-h4); }
p { max-width: 72ch; }

:focus-visible { outline: none; box-shadow: var(--ring-focus); }

/* Native controls follow the palette (the console table checkboxes were the
   browser's default blue - PO 2026-11-04). */
input[type="checkbox"],
input[type="radio"] { accent-color: var(--teal-600); }

.u-sr-only {
    position: absolute; width: 1px; height: 1px; overflow: hidden;
    clip: rect(0 0 0 0); white-space: nowrap;
}
.u-skip-link {
    position: fixed; top: -100px; left: var(--s4); z-index: var(--z-toast);
    display: inline-flex; align-items: center; min-height: 40px; padding: 0 var(--s4);
    border-radius: var(--radius-sm); background: var(--teal-600); color: #fff;
    font-size: var(--text-sm); font-weight: 600;
}
.u-skip-link:focus { top: var(--s4); }
.u-mono { font-family: var(--font-mono); font-variant-numeric: tabular-nums; }
.u-muted { color: var(--text-2); }
.u-subtle { color: var(--text-3); }
.u-truncate { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.u-row { display: flex; align-items: center; gap: var(--s3); flex-wrap: wrap; }
.u-between { display: flex; align-items: center; justify-content: space-between; gap: var(--s4); }
.u-stack { display: flex; flex-direction: column; gap: var(--s4); }
.u-grow { flex: 1 1 auto; min-width: 0; }
.u-mt-2 { margin-top: var(--s2); }
.u-mt-3 { margin-top: var(--s3); }
.u-mt-4 { margin-top: var(--s4); }
.u-mt-5 { margin-top: var(--s5); }
.u-mt-6 { margin-top: var(--s6); }
.u-mb-0 { margin-bottom: 0; }
.u-mb-3 { margin-bottom: var(--s3); }
.u-mb-4 { margin-bottom: var(--s4); }
.u-w-full { width: 100%; }
.u-right { text-align: right; }
.u-center { text-align: center; }
.u-block { display: block; }
.u-flex { display: flex; }
.u-wrap { flex-wrap: wrap; }
.u-gap-2 { gap: var(--s2); }
.u-clamp-2 { display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
/* Two missing steps used by dense panels (1 = 4px, 5 = 20px, 1-5 = 6px). */
.u-mt-1 { margin-top: var(--s1); }
.u-mb-1 { margin-bottom: var(--s1); }
.u-mt-1-5 { margin-top: var(--s1-5); }
.s-stack { display: flex; flex-direction: column; gap: var(--s3); }
.s-fieldset { border: 0; padding: 0; margin: 0; min-width: 0; }

/* Brand */
.s-brand {
    display: inline-flex; align-items: center; gap: var(--s2-5);
    color: var(--ink-900); text-decoration: none; font-weight: 600;
    letter-spacing: -0.01em;
}
.s-brand:hover { text-decoration: none; }
.s-brand__mark { color: var(--navy-900); }
.s-brand__mark--white { color: #fff; }
.s-brand__name { font-size: var(--text-body-lg); line-height: 1.15; }
.s-brand__sub {
    display: block; color: var(--text-3); font-size: 10px; font-weight: 600;
    letter-spacing: .12em; text-transform: uppercase; margin-top: var(--s0);
}
.s-brand--on-dark { color: #fff; }
.s-brand--on-dark .s-brand__name { color: #fff; }
.s-brand--on-dark .s-brand__sub { color: #9FB0C0; }

/* Buttons */
.s-btn {
    display: inline-flex; align-items: center; justify-content: center; gap: var(--s2);
    min-height: 38px; padding: 0 var(--s4);
    border: 1px solid transparent; border-radius: var(--radius-md);
    background: var(--teal-600); color: #fff;
    font: 600 var(--text-body)/1 var(--font-sans); white-space: nowrap; text-decoration: none;
    transition: background-color var(--dur-1) linear, border-color var(--dur-1) linear, color var(--dur-1) linear, box-shadow var(--dur-1) linear;
}
.s-btn:hover { background: var(--teal-700); text-decoration: none; }
.s-btn:focus-visible { box-shadow: var(--ring-focus); }
.s-btn:active { transform: translateY(1px); }
.s-btn--secondary { background: var(--surface); border-color: var(--border-strong); color: var(--ink-900); }
.s-btn--secondary:hover { background: var(--surface-2); }
.s-btn--ghost { background: transparent; color: var(--ink-700); }
.s-btn--ghost:hover { background: var(--surface-2); color: var(--ink-900); }
.s-btn--danger { background: var(--red-600); color: #fff; }
.s-btn--danger:hover { background: #9A2F3C; }
.s-btn--danger-secondary { background: var(--surface); border-color: var(--red-600); color: var(--red-600); }
.s-btn--link { min-height: 0; padding: 0; border: 0; background: transparent; color: var(--teal-600); text-decoration: underline; text-underline-offset: 3px; }
.s-btn--link:hover { background: none; color: var(--teal-700); }
.s-btn--sm { min-height: 30px; padding: 0 var(--s3); font-size: var(--text-sm); }
.s-btn--lg { min-height: 44px; padding: 0 var(--s5); }
.s-btn--block { width: 100%; }
.s-btn--icon { width: 38px; padding: 0; }
.s-btn[disabled], .s-btn[aria-disabled="true"] { opacity: .5; pointer-events: none; }
.s-btn svg { width: 17px; height: 17px; }

/* Forms */
.s-field { display: flex; flex-direction: column; gap: var(--s1-5); min-width: 0; }
.s-label {
    color: var(--ink-700); font: 500 var(--text-sm)/1.4 var(--font-sans);
}
.s-label__required { color: var(--red-600); }
.s-input, .s-select, .s-textarea {
    width: 100%; min-height: 40px; padding: 0 var(--s3);
    border: 1px solid var(--border-strong); border-radius: var(--radius-control);
    background: var(--surface); color: var(--ink-900);
    font: 400 var(--text-body)/1.4 var(--font-sans);
    transition: border-color var(--dur-1) linear, box-shadow var(--dur-1) linear;
}
.s-textarea { min-height: 104px; padding: var(--s2-5) var(--s3); line-height: 1.55; resize: vertical; }
.s-select {
    appearance: none; padding-right: var(--s8); cursor: pointer;
    font-size: 13px;
    background-image: var(--icon-chevron);
    background-repeat: no-repeat;
    background-position: right 12px center;
    background-size: 16px;
    text-overflow: ellipsis;
    white-space: nowrap;
}
.s-input:hover, .s-select:hover, .s-textarea:hover { border-color: #A7B6C4; }
.s-input:focus, .s-select:focus, .s-textarea:focus { outline: none; border-color: var(--teal-600); box-shadow: var(--ring-focus); }
.s-input::placeholder, .s-textarea::placeholder { color: var(--ink-400); }
.s-input[aria-invalid="true"], .s-select[aria-invalid="true"], .s-textarea[aria-invalid="true"] { border-color: var(--red-600); }
.s-input--mono { font-family: var(--font-mono); text-transform: uppercase; letter-spacing: .03em; }
/* Native file pickers read as part of the form system. */
.s-input[type="file"] { padding-block: var(--s1); }
.s-input[type="file"]::file-selector-button {
    min-height: var(--s7-5);
    margin-right: var(--s3);
    padding: 0 var(--s3);
    border: 1px solid var(--border-strong);
    border-radius: var(--radius-sm);
    background: var(--surface-2);
    color: var(--ink-900);
    font: 600 var(--text-sm)/1 var(--font-sans);
    cursor: pointer;
}
.s-input[type="file"]::file-selector-button:hover { background: var(--surface-3); }
.s-help { color: var(--text-3); font-size: var(--text-xs); line-height: 1.5; }
.s-error { display: flex; gap: var(--s1); flex-wrap: wrap; margin: 0; color: var(--red-600); font-size: var(--text-xs); font-weight: 500; list-style: none; }
/* Compatibility aliases: markup shipped as s-field__label / s-field__error. */
.s-field__label { color: var(--ink-700); font: 500 var(--text-xs)/1.4 var(--font-sans); letter-spacing: .02em; }
.s-field__error { display: flex; gap: var(--s1); flex-wrap: wrap; margin: 0; color: var(--red-600); font-size: var(--text-xs); font-weight: 500; list-style: none; }
.s-check { display: flex; align-items: center; gap: var(--s2-5); min-height: 40px; color: var(--ink-700); font-size: var(--text-sm); cursor: pointer; }
.s-check input { appearance: none; display: grid; place-content: center; flex: none; width: 18px; height: 18px; border: 1px solid var(--border-strong); border-radius: 4px; background: var(--surface); }
.s-check input:checked { border-color: var(--teal-600); background: var(--teal-600); }
.s-check input:checked::before { content: ""; width: 10px; height: 10px; background: no-repeat center/contain url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='white' stroke-width='4' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M20 6 9 17l-5-5'/%3E%3C/svg%3E"); }
.s-form-grid { display: grid; grid-template-columns: 1fr; gap: var(--s4); }
.s-form-grid--2 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
.s-form-actions { display: flex; align-items: center; justify-content: flex-end; gap: var(--s3); margin-top: var(--s5); }

/* Badges and status */
.s-badge {
    display: inline-flex; align-items: center; gap: var(--s1-5); min-height: 22px;
    padding: 0 var(--s2); border-radius: var(--radius-full);
    font: 500 var(--text-xs)/1 var(--font-sans); letter-spacing: .01em; white-space: nowrap;
}
.s-badge--neutral { background: #EEF2F5; color: var(--ink-700); }
.s-badge--teal { background: var(--teal-50); color: var(--teal-700); }
.s-badge--green { background: var(--green-50); color: var(--green-700); }
.s-badge--amber { background: var(--amber-50); color: var(--amber-700); }
.s-badge--red { background: var(--red-50); color: var(--red-600); }
.s-badge--gold { background: var(--gold-50); color: var(--gold-700); }
.s-badge--navy { background: #EAF0F5; color: var(--navy-800); }
.s-badge--burgundy { background: var(--burgundy-50); color: var(--burgundy-600); }
.s-badge__dot { width: 5px; height: 5px; border-radius: 50%; background: currentColor; }
.s-code {
    display: inline-flex; align-items: center; padding: var(--s0) var(--s1-5);
    border: 1px solid var(--border); border-radius: 4px;
    background: var(--surface-2); color: var(--ink-700);
    font: 500 var(--text-xs)/1.4 var(--font-mono); letter-spacing: .03em; text-transform: uppercase;
}

/* Cards
   Contract (design/05 §7, PO 2026-10-30): a card is a flex column whose
   regions are content-sized. It is never taller than its content unless the
   parent stretches it or it opts into --fill. */
.s-card {
    display: flex; flex-direction: column;
    background: var(--surface); border: 1px solid var(--border);
    border-radius: var(--radius-lg); box-shadow: var(--shadow-xs);
    min-width: 0;
}
.s-card--flat { box-shadow: none; }
/* Compact card (PO 2026-10-30): dense form/detail surfaces. Content-sized,
   never inflated: padding drops to 12/16 and the head stays a single hairline. */
.s-card--compact .s-card__head { padding: var(--pad-compact-head-y) var(--pad-compact-head-x); min-height: 44px; }
.s-card--compact .s-card__body { padding: var(--pad-compact-body); }
.s-card--compact .s-card__foot { padding: var(--pad-compact-foot-y) var(--pad-compact-foot-x); }
.s-card--compact .s-card__title { font: 600 var(--text-h4)/1.3 var(--font-sans); }
/* Nested cards collapse (PO, 2026-10-27): an s-card inside an s-card drops
   its own border and shadow and separates by tint, so cards never stack
   double hairlines. Applies to console and campus alike. */
.s-card .s-card { border: 0; box-shadow: none; background: var(--surface-2); }
.s-card--interactive { transition: box-shadow var(--dur-1) linear, border-color var(--dur-1) linear, transform var(--dur-1) linear; }
.s-card--interactive:hover { border-color: var(--border-strong); box-shadow: var(--shadow-sm); transform: translateY(-1px); }
.s-card__head {
    flex: 0 0 auto;
    display: flex; align-items: center; justify-content: space-between; gap: var(--s4);
    min-height: 56px;
    padding: var(--pad-card-head-y) var(--pad-card-head-x);
    border-bottom: 1px solid var(--line-soft);
    border-radius: var(--radius-lg) var(--radius-lg) 0 0;
    background: var(--surface);
}
.s-card__head:only-child { border-bottom: 0; }
.s-card__title { display: flex; align-items: center; gap: var(--s2); margin: 0; font: 600 var(--text-h3)/1.35 var(--font-sans); color: var(--ink-900); }
.s-card__title svg { color: var(--teal-600); }
.s-card__body { flex: 0 0 auto; padding: var(--pad-card-body); min-height: 0; }
.s-card__foot {
    flex: 0 0 auto; margin-top: auto;
    padding: var(--pad-card-foot-y) var(--pad-card-foot-x);
    border-top: 1px solid var(--line-soft);
    background: var(--surface-2);
    border-radius: 0 0 var(--radius-lg) var(--radius-lg);
}
/* Opt-in: only a card that must fill a stretched track grows its body. */
.s-card--fill > .s-card__body { flex: 1 1 auto; }
.s-card--fill > .s-card__foot { margin-top: 0; }
.s-card__label { color: var(--text-3); font: 500 11px/1.4 var(--font-sans); letter-spacing: var(--tracking-label); text-transform: uppercase; }
.s-card__sub { margin: var(--s1) 0 0; color: var(--text-2); font-size: var(--text-sm); line-height: 1.5; max-width: 60ch; }

/* Stats */
.s-stat { display: flex; flex-direction: column; gap: var(--s1); padding: var(--s4-5) var(--s6); }
.s-stat + .s-stat { border-top: 1px solid var(--line-soft); }
.s-stat__value { color: var(--ink-900); font: 600 var(--text-stat)/1.1 var(--font-display); }
.s-stat__label { color: var(--text-3); font-size: var(--text-xs); }
.s-stat__meta { color: var(--text-2); font-size: var(--text-xs); }

/* Progress */
.s-progress { height: 6px; border-radius: var(--radius-full); background: #E7EDF2; overflow: hidden; }
.s-progress > i { display: block; height: 100%; border-radius: var(--radius-full); background: var(--teal-600); transition: width var(--dur-2) var(--ease-out); }
.s-progress--gold > i { background: var(--gold-600); }
.s-progress--burgundy > i { background: var(--burgundy-600); }

/* Tables - padded and framed: 1px container border, collapsed borders,
   --table-head header row, 1px row separators, zebra + hover tint. PO decision
   2026-10-30 replaces the earlier "borderless inside cards" rule. */
.s-table-wrap { background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius-md); overflow: hidden; }
.s-table-scroll { overflow-x: auto; border: 1px solid var(--border); border-radius: var(--radius-md); background: var(--surface); }

/* Long rosters opt into a capped scroll box so the sticky header engages.
   Below the desktop breakpoint the page scrolls and rows stack, so the cap is
   released. */
.s-table-scroll--capped { max-height: min(70dvh, 40rem); overflow: auto; overscroll-behavior: contain; }
@media (max-width: 1024px) {
    .s-table-scroll--capped { max-height: none; overflow-x: auto; overflow-y: visible; }
}
/* Tables inside a card keep their own frame and sit in the card gutter, at any
   depth (region wrappers included). PO 2026-10-30: tables ship padded and
   framed (1px container border), never borderless and never flush against the
   card edge. The card still owns the outer hairline, so the inner frame is one
   1px line with its own small radius. */
.s-card .s-table-scroll,
.s-card .s-table-wrap {
    margin: var(--pad-card-body) var(--pad-card-head-x);
    border: 1px solid var(--border);
    border-radius: var(--radius-md);
    background: var(--surface);
}
/* Only a region wrapper that touches a card edge inherits that edge's radius. */
.s-card > [data-cp-fragment]:first-child {
    border-top-left-radius: var(--radius-lg);
    border-top-right-radius: var(--radius-lg);
}
.s-card > [data-cp-fragment]:last-child {
    border-bottom-left-radius: var(--radius-lg);
    border-bottom-right-radius: var(--radius-lg);
}
/* A table inside a padded body already has the gutter: keep just the frame. */
.s-card__body .s-table-scroll,
.s-card__body .s-table-wrap { margin: 0; border: 1px solid var(--border); border-radius: var(--radius-md); }
@media (max-width: 768px) {
    .s-card .s-table-scroll,
    .s-card .s-table-wrap { margin-left: var(--s4); margin-right: var(--s4); }
}
.s-table { width: 100%; border-collapse: collapse; }
.s-table th {
    position: sticky; top: 0; z-index: 1;
    height: 42px; padding: 0 var(--s5); background: var(--table-head);
    border: 0; border-bottom: 1px solid var(--border); color: var(--text-3);
    font: 600 var(--text-xs)/1.4 var(--font-sans); letter-spacing: .07em; text-align: left; text-transform: uppercase;
    white-space: nowrap;
}
.s-table td { height: auto; padding: var(--s4) var(--s5); border: 0; border-bottom: 1px solid var(--line-soft); font-size: var(--text-sm); color: var(--ink-700); vertical-align: middle; }
.s-table th:first-child, .s-table td:first-child { padding-left: var(--s5); }
.s-table th:last-child, .s-table td:last-child { padding-right: var(--s5); }
.s-table tbody tr:nth-child(even) { background: var(--row-alt); }
.s-table tbody tr:hover { background: var(--row-hover); }
.s-table tbody tr { transition: background-color var(--dur-1) linear; }
.s-table tr:last-child td { border-bottom: 0; }
.s-table .num { text-align: right; font-family: var(--font-mono); font-variant-numeric: tabular-nums; }
/* Table selection control: one square, teal when checked. */
.s-table input[type="checkbox"] {
    appearance: none;
    display: grid;
    place-content: center;
    width: var(--s4-5);
    height: var(--s4-5);
    margin: 0;
    border: 1px solid var(--border-strong);
    border-radius: var(--radius-sm);
    background: var(--surface);
    cursor: pointer;
    transition: border-color var(--dur-1) linear, background-color var(--dur-1) linear;
}
.s-table input[type="checkbox"]:hover { border-color: var(--teal-600); }
.s-table input[type="checkbox"]:checked { border-color: var(--teal-600); background: var(--teal-600); }
.s-table input[type="checkbox"]:checked::before {
    content: "";
    width: var(--s2-5);
    height: var(--s2-5);
    background: no-repeat center / contain url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='white' stroke-width='4' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M20 6 9 17l-5-5'/%3E%3C/svg%3E");
}
.s-table input[type="checkbox"]:focus-visible { box-shadow: var(--ring-focus); }
.s-table__strong { color: var(--ink-900); font-weight: 600; }
.s-table__sub { display: block; color: var(--text-3); font-size: var(--text-sm); margin-top: var(--s0); }

/* Key / value pairs (checkout, verification, billing summaries). */
.s-key-value { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); column-gap: var(--s4); margin: 0; }
.s-key-value dt,
.s-key-value dd { padding: var(--s2-5) 0; border-bottom: 1px solid var(--line-soft); }
.s-key-value dt:nth-last-of-type(1),
.s-key-value dd:nth-last-of-type(1) { border-bottom: 0; }
.s-key-value dt { color: var(--text-3); font: 500 var(--text-sm)/1.5 var(--font-sans); }
.s-key-value dd { margin: 0; color: var(--ink-900); font-size: var(--text-body); text-align: right; }
@media (max-width: 768px) {
    .s-key-value dd { text-align: left; }
}

/* Tabs */
.s-tabs { display: flex; gap: var(--s1); padding: 0 var(--s0); border-bottom: 1px solid var(--line-soft); overflow-x: auto; scrollbar-width: thin; }
.s-tabs a { display: inline-flex; align-items: center; gap: var(--s2); min-height: 40px; padding: 0 var(--s3); border-bottom: 2px solid transparent; color: var(--text-2); font: 500 var(--text-body)/1 var(--font-sans); text-decoration: none; white-space: nowrap; transition: color var(--dur-1) linear, background-color var(--dur-1) linear; }
.s-tabs a:hover { color: var(--ink-900); background: var(--surface-2); text-decoration: none; }
.s-tabs a[aria-current="page"], .s-tabs a.is-active { color: var(--teal-700); border-bottom-color: var(--teal-600); font-weight: 600; }
.s-tabs__count { display: inline-flex; align-items: center; justify-content: center; min-height: 18px; padding: 0 var(--s1-5); border-radius: var(--radius-full); background: var(--surface-3); color: var(--text-3); font: 500 var(--text-xs)/1 var(--font-mono); }
.s-tabs a[aria-current="page"] .s-tabs__count, .s-tabs a.is-active .s-tabs__count { background: var(--teal-50); color: var(--teal-700); }

/* Alerts and empty states */
.s-alert { display: flex; align-items: flex-start; gap: var(--s2-5); padding: var(--s3-5) var(--s4); border: 1px solid var(--border); border-radius: var(--radius-md); background: var(--surface); font-size: var(--text-sm); }
.s-alert svg { margin-top: 1px; color: var(--teal-600); }
.s-alert--info { background: #F0F6FA; border-color: #CFE0EC; }
.s-alert--success { background: var(--green-50); border-color: #CBE4D7; }
.s-alert--warning { background: var(--amber-50); border-color: #EAD8B6; }
.s-alert--danger { background: var(--red-50); border-color: #EBC6CC; }
.s-empty { display: flex; flex-direction: column; align-items: center; gap: var(--s2); padding: var(--s7-5) var(--s6); text-align: center; color: var(--text-2); }
.s-empty svg { color: var(--ink-400); margin-bottom: var(--s1); }
.s-empty h3 { color: var(--ink-900); font-size: var(--text-h3); }
.s-empty p { margin: 0; max-width: 42ch; font-size: var(--text-sm); }
.s-empty__title { margin: 0; color: var(--ink-900); font: 600 var(--text-h3)/1.3 var(--font-sans); }
.s-empty__text { margin: 0; max-width: 42ch; color: var(--text-2); font-size: var(--text-sm); line-height: 1.5; }

/* Avatar */
.s-avatar {
    display: inline-grid; place-content: center; flex: none; width: 36px; height: 36px;
    border-radius: 50%; background: var(--navy-900); color: #fff;
    font: 600 12px/1 var(--font-sans); overflow: hidden;
}
.s-avatar--28 { width: 28px; height: 28px; font-size: 10px; }
.s-avatar--40 { width: 40px; height: 40px; font-size: 13px; }
.s-avatar--56 { width: 56px; height: 56px; font-size: 17px; }
.s-avatar--teal { background: var(--teal-600); }
.s-avatar--gold { background: var(--gold-600); }
.s-avatar--burgundy { background: var(--burgundy-600); }

/* Dropdown (JS: data-dropdown) — one visual contract for menus. */
.s-dropdown { position: relative; display: inline-flex; }
.s-dropdown__trigger { display: inline-flex; align-items: center; }
.s-dropdown__menu {
    position: absolute; top: calc(100% + 6px); right: 0; z-index: var(--z-nav);
    min-width: 240px; padding: var(--s1-5); border: 1px solid var(--border);
    border-radius: var(--radius-popup); background: var(--surface); box-shadow: var(--shadow-sm);
}
.s-dropdown__menu--start { left: 0; right: auto; }
.s-dropdown__item {
    display: flex; align-items: center; gap: var(--s2-5); width: 100%; min-height: 34px;
    padding: 0 var(--s2-5); border-radius: var(--radius-row); color: var(--ink-700);
    font: 500 13px/1.3 var(--font-sans); text-align: left; text-decoration: none;
}
.s-dropdown__item:hover { background: var(--row-hover); color: var(--ink-900); text-decoration: none; }
.s-dropdown__item:focus-visible { background: var(--row-hover); box-shadow: inset 2px 0 0 var(--teal-600); }
.s-dropdown__item[aria-current="true"],
.s-dropdown__item[aria-checked="true"] { color: var(--teal-700); font-weight: 600; }
.s-dropdown__item--danger { color: var(--red-600); }
.s-dropdown__sep { height: 1px; margin: var(--s1-5) 0; background: var(--border); }
.s-dropdown__header { padding: var(--s2-5); border-bottom: 1px solid var(--border); margin-bottom: var(--s1-5); }
.s-dropdown__header strong { display: block; font-size: 13px; color: var(--ink-900); }
.s-dropdown__header span { display: block; font-size: 12px; color: var(--text-3); margin-top: var(--s0); }

/* ---------------------------------------------------------
   Portal shell
   --------------------------------------------------------- */
.portal { display: grid; grid-template-columns: 248px minmax(0, 1fr); min-height: 100dvh; }

.portal-sidebar {
    position: sticky; top: 0; display: flex; flex-direction: column;
    height: 100dvh; padding: var(--s5) var(--s4) var(--s4);
    background: var(--rail-campus-bg); border-right: 1px solid var(--rail-campus-line);
}
.portal-brand { padding: 0 var(--s2) var(--s4); }
.portal-nav { flex: 1; overflow-y: auto; }
.portal-nav__group { margin-bottom: var(--s3); }
.portal-nav__group--core { padding-bottom: 0; margin-bottom: var(--s4); }
.portal-nav__label {
    margin: 0 var(--s2-5) var(--s1-5); color: var(--rail-campus-ink-muted);
    font: 600 10px/1.4 var(--font-sans); letter-spacing: .10em; text-transform: uppercase;
}
.portal-nav__link {
    position: relative; display: flex; align-items: center; gap: var(--s2-5);
    min-height: 40px; padding: 0 var(--s2-5); border-radius: var(--radius-sm);
    color: var(--rail-campus-ink); font: 500 13px/1.2 var(--font-sans); text-decoration: none;
}
.portal-nav__link svg { flex: none; width: 17px; height: 17px; color: var(--rail-campus-ink-muted); }
.portal-nav__link:hover { background: var(--rail-campus-hover); color: var(--rail-campus-ink-strong); text-decoration: none; }
.portal-nav__link:hover svg { color: var(--rail-campus-ink-strong); }
.portal-nav__link:focus-visible { outline: none; box-shadow: var(--ring-focus); }
.portal-nav__link.is-active { background: var(--rail-campus-active); color: var(--rail-campus-ink-strong); font-weight: 600; box-shadow: var(--shadow-xs); }
.portal-nav__link.is-active::before { content: ""; position: absolute; left: 0; top: 9px; bottom: 9px; width: 3px; border-radius: 0 2px 2px 0; background: var(--rail-campus-accent); }
.portal-nav__link.is-active svg { color: var(--rail-campus-accent); }
.portal-nav__count { margin-left: auto; color: var(--rail-campus-ink-muted); font-size: 11px; font-family: var(--font-mono); }

/* Unverified accounts: explain the block instead of offering dead links. */
.portal-nav__notice {
    display: flex; align-items: flex-start; gap: var(--s2);
    margin: 0 0 var(--s3); padding: var(--s2-5) var(--s3);
    border: 1px solid var(--amber-600); border-radius: var(--radius-md);
    background: var(--amber-50); color: var(--amber-700);
    font-size: var(--text-sm); line-height: 1.45; text-decoration: none;
}
.portal-nav__notice svg { flex: none; margin-top: var(--s0); }
.portal-nav__notice:hover { color: var(--amber-700); text-decoration: underline; }

/* Collapsible rail section (<details>): keyboard-operable, works without JS. */
.portal-nav__section { margin-bottom: var(--s2); margin-top: var(--s1); padding-top: 0; }
.portal-nav__section-summary {
    display: flex; align-items: center; justify-content: space-between; gap: var(--s2);
    min-height: 40px; padding: 0 var(--s2-5); border-radius: var(--radius-sm);
    color: var(--rail-campus-ink); font: 500 13px/1.2 var(--font-sans);
    cursor: pointer; list-style: none;
}
.portal-nav__section-summary::-webkit-details-marker { display: none; }
.portal-nav__section-summary::marker { content: ""; }
.portal-nav__section-summary:hover { background: var(--rail-campus-hover); color: var(--rail-campus-ink-strong); }
.portal-nav__section-summary:focus-visible { outline: none; box-shadow: var(--ring-focus); }
.portal-nav__section[open] > .portal-nav__section-summary { color: var(--rail-campus-ink-strong); font-weight: 600; }
.portal-nav__chevron { flex: none; width: 14px; height: 14px; color: var(--rail-campus-ink-muted); transition: transform var(--dur-1) var(--ease-out); }
.portal-nav__section[open] .portal-nav__chevron { transform: rotate(180deg); }
.portal-nav__section-body { display: grid; gap: var(--s0); margin: var(--s0) 0 var(--s1) var(--s4); padding-left: 0; }
.portal-nav__logout { margin-top: var(--s2); padding-top: var(--s2); }
.portal-user { display: flex; align-items: center; gap: var(--s2-5); padding: var(--s2) var(--s2) 0; margin-top: var(--s4); }
.portal-user__name { color: var(--ink-900); font-size: 13px; font-weight: 600; }
.portal-user__meta { color: var(--text-3); font-size: 11px; }

.portal-main { min-width: 0; }
.portal-topbar {
    position: sticky; top: 0; z-index: var(--z-nav);
    display: flex; align-items: center; gap: var(--s4); min-height: 64px; padding: 0 var(--s6);
    background: var(--surface); border-bottom: 1px solid var(--border);
}
.portal-crumbs { display: flex; align-items: center; gap: var(--s2); color: var(--text-3); font-size: 12px; }
.portal-crumbs a { color: var(--text-2); }
.portal-crumbs [aria-current="page"] { color: var(--ink-900); font-weight: 500; }
.portal-search {
    display: flex; align-items: center; gap: var(--s2); width: min(320px, 30vw);
    min-height: 36px; padding: 0 var(--s2-5); margin-left: auto;
    border: 1px solid var(--border); border-radius: var(--radius-md);
    background: var(--surface-2); color: var(--text-3); font-size: 12.5px; text-align: left;
}
.portal-search:hover { border-color: var(--border-strong); color: var(--text-2); }
.portal-search kbd { margin-left: auto; }
.portal-actions { display: flex; align-items: center; gap: var(--s1-5); }
.portal-icon-btn {
    position: relative; display: grid; place-content: center; width: 38px; height: 38px;
    border-radius: var(--radius-md); color: var(--ink-700);
}
.portal-icon-btn:hover { background: var(--surface-2); color: var(--ink-900); }
.portal-icon-btn .s-badge { position: absolute; top: 2px; right: 2px; min-height: 16px; padding: 0 var(--s1); font-size: 9px; }
.portal-menu-btn { display: none; }

.portal-content {
    width: min(1240px, 100% - var(--s9)); margin: 0 auto; padding: var(--s6-5) 0 var(--s10);
}
.portal-page-head { display: flex; align-items: flex-start; justify-content: space-between; gap: var(--s6); margin-bottom: var(--s6); }
.portal-page-head__main { min-width: 0; }
.portal-page-head h1 { margin: 0; }
.portal-page-head__sub { margin: var(--s1-5) 0 0; color: var(--text-2); font-size: var(--text-body); line-height: 1.55; }
.portal-page-head__actions { display: flex; align-items: center; gap: var(--s2-5); flex: none; }
.portal-eyebrow { color: var(--teal-700); font: 600 var(--text-xs)/1.4 var(--font-sans); letter-spacing: .08em; text-transform: uppercase; }

/* Portal drawer */
.portal-drawer { position: fixed; inset: 0; z-index: var(--z-drawer); display: flex; }
.portal-drawer__scrim { position: absolute; inset: 0; background: rgba(16, 42, 67, .45); border: 0; }
.portal-drawer__panel {
    position: relative; display: flex; flex-direction: column; width: min(300px, 86vw);
    height: 100%; padding: var(--s4-5) var(--s4); background: var(--surface); box-shadow: var(--shadow-lg);
    animation: portal-drawer-in var(--dur-2) var(--ease-out);
}
@keyframes portal-drawer-in { from { transform: translateX(-100%); } to { transform: translateX(0); } }
.portal-drawer__head { display: flex; align-items: center; justify-content: space-between; margin-bottom: var(--s3); }

/* ---------------------------------------------------------
   Campus dashboard
   --------------------------------------------------------- */
.greeting { margin-bottom: var(--s6); }
.greeting h1 { margin: 0; font-size: var(--text-display); line-height: 1.1; }
.greeting__meta { display: flex; align-items: center; flex-wrap: wrap; gap: var(--s2-5); margin-top: var(--s2); color: var(--text-3); font-size: 12px; }
.greeting__meta .dot { width: 3px; height: 3px; border-radius: 50%; background: var(--line-strong); }
.greeting-row { display: flex; align-items: flex-end; justify-content: space-between; gap: var(--s6); }
.greeting-actions { display: flex; gap: var(--s2-5); flex: none; }

/* One 12-column grid for campus and console. Content-sized cards:
   align-items: start, never stretch (PO 2026-10-30). */
.dash-grid,
.admin-grid {
    display: grid;
    grid-template-columns: repeat(12, minmax(0, 1fr));
    gap: var(--gap-grid);
    align-items: start;
}
.admin-grid { margin-bottom: var(--s6); }
.span-1, .admin-span-1 { grid-column: span 1; }
.span-2, .admin-span-2 { grid-column: span 2; }
.span-3, .admin-span-3 { grid-column: span 3; }
.span-4, .admin-span-4 { grid-column: span 4; }
.span-5, .admin-span-5 { grid-column: span 5; }
.span-6, .admin-span-6 { grid-column: span 6; }
.span-7, .admin-span-7 { grid-column: span 7; }
.span-8, .admin-span-8 { grid-column: span 8; }
.span-9, .admin-span-9 { grid-column: span 9; }
.span-10, .admin-span-10 { grid-column: span 10; }
.span-11, .admin-span-11 { grid-column: span 11; }
.span-12, .admin-span-12 { grid-column: span 12; }

.week-list { display: flex; flex-direction: column; }
.week-item { display: grid; grid-template-columns: 54px minmax(0, 1fr) auto; gap: var(--s3-5); align-items: center; padding: var(--s3-5) var(--s5); border-bottom: 1px solid var(--border); }
.week-item:last-child { border-bottom: 0; }
.week-item.is-today { background: var(--teal-50); box-shadow: inset 3px 0 0 var(--teal-600); }
.week-item__day { color: var(--text-3); font: 500 11px/1.3 var(--font-mono); text-transform: uppercase; }
.week-item__title { display: block; color: var(--ink-900); font-size: 14px; font-weight: 500; }
.week-item__meta { display: block; color: var(--text-3); font-size: 12px; margin-top: var(--s0); }
.week-item__time { color: var(--text-2); font: 500 11px/1.3 var(--font-mono); }

.glance { display: flex; flex-direction: column; }

.course-grid { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: var(--s4); align-items: stretch; }
.course-card { position: relative; display: flex; flex-direction: column; overflow: hidden; height: 100%; max-height: var(--card-max-h); }
.course-card__accent { height: var(--s1); background: var(--teal-600); }
.course-card[data-accent="data"] .course-card__accent { background: #4C6FA8; }
.course-card[data-accent="business"] .course-card__accent { background: var(--gold-600); }
.course-card[data-accent="communication"] .course-card__accent { background: var(--burgundy-600); }
.course-card__body { display: flex; flex-direction: column; gap: var(--s2); padding: var(--s4); flex: 1 1 auto; min-height: 0; }
.course-card__code { color: var(--text-3); font: 500 10px/1.3 var(--font-mono); letter-spacing: .08em; text-transform: uppercase; }
.course-card__title { margin: 0; color: var(--ink-900); font: 600 var(--text-h3)/1.35 var(--font-display); }
.course-card__instructor { color: var(--text-2); font-size: 12px; }
.course-card__progress { margin-top: var(--s3); padding-top: var(--s3); }
.course-card__progress-row { display: flex; align-items: center; justify-content: space-between; gap: var(--s2); margin-bottom: var(--s1-5); color: var(--text-3); font-size: 11px; }
.course-card__next { color: var(--text-2); font-size: 12px; margin-top: var(--s2-5); display: -webkit-box; -webkit-line-clamp: 3; -webkit-box-orient: vertical; overflow: hidden; }
.course-card__foot { display: flex; align-items: center; justify-content: space-between; gap: var(--s2); margin-top: auto; padding: var(--s3) var(--s4) var(--s4); border-top: 1px solid var(--border); }

.deadline-list { display: flex; flex-direction: column; }
.deadline { display: grid; grid-template-columns: minmax(0, 1fr) auto auto; gap: var(--s3); align-items: center; padding: var(--s3) var(--s5); border-bottom: 1px solid var(--border); }
.deadline:last-child { border-bottom: 0; }
.deadline__title { display: block; color: var(--ink-900); font-size: 13px; font-weight: 500; }
.deadline__meta { display: block; color: var(--text-3); font-size: 11px; margin-top: var(--s0); }
.deadline__date { color: var(--text-2); font: 500 11px/1.3 var(--font-mono); white-space: nowrap; }

.announcement { padding: var(--s3-5) var(--s5); border-bottom: 1px solid var(--border); }
.announcement:last-child { border-bottom: 0; }
.announcement__sender { color: var(--text-3); font-size: 11px; }
.announcement__title { margin: var(--s1) 0 var(--s0); color: var(--ink-900); font-size: 13px; font-weight: 600; }
.announcement__body { color: var(--text-2); font-size: 12px; }

/* Account */
.account-layout { display: grid; grid-template-columns: 220px minmax(0, 1fr); gap: var(--s6-5); align-items: start; }
.account-nav { position: sticky; top: 88px; display: flex; flex-direction: column; gap: var(--s0); }
.account-nav a { display: flex; align-items: center; min-height: 38px; padding: 0 var(--s3); border-radius: var(--radius-sm); color: var(--text-2); font-size: 13px; font-weight: 500; }
.account-nav a:hover { background: var(--surface-2); color: var(--ink-900); text-decoration: none; }
.account-nav a[aria-current="page"] { background: var(--teal-50); color: var(--teal-700); font-weight: 600; }

/* Auth split — the editorial ridge login (PO mockup 2026-11-06).
   Paper ground, the 42px serif hero, one tilted certificate, the form card,
   and layered ridges pinned to the bottom edge. */
.auth-shell {
    position: relative;
    display: grid;
    grid-template-columns: minmax(0, 1.2fr) minmax(0, 1fr);
    gap: var(--auth-slide-pad);
    max-width: calc(var(--auth-content-max) + (2 * var(--auth-gutter)));
    min-height: 100dvh;
    margin-inline: auto;
    padding-top: var(--s9);
    padding-inline: var(--auth-gutter);
    background: var(--auth-paper);
    overflow-x: clip;
}

.auth-mast {
    position: absolute;
    top: var(--s6);
    right: 0;
    left: 0;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: var(--s4);
}

.auth-mast .s-brand__sub { margin-top: 1px; }

.auth-mast__help {
    margin: 0;
    color: var(--auth-muted);
    font-size: var(--text-ui);
}

.auth-mast__help a { color: var(--teal-800); text-decoration: underline; text-underline-offset: 3px; }

.auth-hero {
    position: relative;
    z-index: 1;
    display: flex;
    flex-direction: column;
    justify-content: center;
    padding: var(--auth-hero-pad-top) var(--s8) var(--auth-hero-pad-bottom) 0;
}

.auth-eyebrow {
    margin: 0;
    color: var(--teal-800);
    font: 600 13px/1.4 var(--font-sans);
    letter-spacing: 0.16em;
    text-transform: uppercase;
}

.auth-hero__title {
    max-width: 12ch;
    margin: var(--s4) 0 0;
    color: var(--navy-900);
    font: 600 82px/0.98 var(--font-display);
    letter-spacing: -0.02em;
}

.auth-hero__title--static { font-weight: 500; }

.auth-lead {
    max-width: 46ch;
    margin: var(--s5) 0 0;
    color: var(--auth-muted);
    font-size: var(--text-reading);
    line-height: 1.6;
}

/* Tilted decorative certificate: the serial format here is CPA- (the platform
   prefix), rendered as mono with the Verified state. */
.auth-cert {
    position: relative;
    display: grid;
    grid-template-columns: minmax(0, 1fr) auto;
    align-items: center;
    gap: var(--s2) var(--s4);
    max-width: 420px;
    margin-top: var(--s8);
    padding: var(--s5);
    border: 1px solid var(--auth-paper-line);
    border-radius: var(--radius-md);
    background: var(--surface);
    box-shadow: var(--shadow-md);
    transform: rotate(-3deg);
}

.auth-cert__label {
    grid-column: 1;
    color: var(--ink-500);
    font: 600 var(--text-meta)/1.4 var(--font-sans);
    letter-spacing: 0.14em;
}

.auth-cert__holder {
    grid-column: 1;
    color: var(--navy-900);
    font: 600 24px/1.2 var(--font-display);
}

.auth-cert__serial {
    grid-column: 1;
    color: var(--ink-500);
    font-size: var(--text-code);
}

.auth-cert__qr {
    grid-row: 1 / span 3;
    grid-column: 2;
    justify-self: end;
    padding: var(--s1-5);
    border: 1px solid var(--auth-paper-line);
    border-radius: var(--radius-sm);
    background: var(--auth-paper);
    color: var(--navy-900);
}

.auth-cert__qr img,
.auth-cert__qr svg {
    width: 56px;
    height: 56px;
}

.auth-panel {
    position: relative;
    z-index: 1;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: var(--s9) 0 var(--s11);
}

.auth-card {
    position: relative;
    z-index: 1;
    width: min(430px, 100%);
    padding: var(--auth-pad-card);
    border-radius: 20px;
    background: var(--surface);
    box-shadow: 0 24px 48px rgba(16, 42, 67, 0.14);
}

.auth-card__bar {
    width: 40px;
    height: 4px;
    margin: 0 0 var(--s5);
    border-radius: var(--radius-full);
    background: var(--teal-800);
}

.auth-card__heading {
    margin: 0;
    color: var(--navy-900);
    font: 600 30px/1.2 var(--font-display);
    letter-spacing: -0.01em;
}

.auth-card__sub {
    margin: var(--s1-5) 0 var(--s6);
    color: var(--auth-muted);
    font-size: var(--text-ui);
}

/* Fields: 50px controls, 1.5px borders, 16px type (no iOS zoom). */
.login-field { display: flex; flex-direction: column; gap: var(--s1-5); }

.login-field__label-row {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: var(--s3);
}

.login-label {
    color: var(--ink-900);
    font-size: var(--text-ui);
    font-weight: 600;
}

.login-field__aside-link {
    color: var(--teal-800);
    font-size: var(--text-sm);
    text-decoration: underline;
    text-underline-offset: 3px;
}

.login-field__shell {
    position: relative;
    display: flex;
    align-items: center;
}

.login-field__input {
    width: 100%;
    height: var(--login-input-h);
    padding: 0 var(--s4);
    border: 1.5px solid var(--line-strong);
    border-radius: 10px;
    background: var(--surface);
    color: var(--ink-900);
    font: 400 16px/1.2 var(--font-sans);
    transition: border-color var(--dur-1) linear;
}

.login-field__input:hover { border-color: var(--ink-500); }

.login-field__input:focus {
    outline: none;
    border-color: var(--teal-800);
    box-shadow: var(--ring-focus);
}

.login-field__toggle {
    position: absolute;
    right: var(--s2);
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-height: 44px;
    padding: 0 var(--s2);
    border-radius: var(--radius-sm);
    color: var(--teal-800);
    font-size: var(--text-sm);
    font-weight: 600;
}

.login-field__toggle:hover { color: var(--teal-700); }
.login-field__toggle:focus-visible { outline: none; box-shadow: var(--ring-focus); }

.login-field__caps {
    margin: 0;
    color: var(--amber-700);
    font-size: var(--text-sm);
}

.login-field__check {
    display: flex;
    align-items: center;
    gap: var(--s2);
    min-height: 44px;
    color: var(--ink-900);
    font-size: var(--text-ui);
    font-weight: 500;
}

.login-btn {
    height: var(--login-button-h);
    background: var(--teal-800);
    font-size: 16px;
    font-weight: 600;
}

.login-btn:hover {
    background: var(--teal-700);
    text-decoration: none;
}

.login-btn:active { background: var(--teal-800); }
.login-btn:focus-visible { outline: none; box-shadow: var(--ring-focus); }
.login-btn[disabled] { opacity: 0.6; cursor: not-allowed; }

.auth-alt {
    margin: var(--s5) 0 0;
    color: var(--auth-muted);
    font-size: var(--text-ui);
    text-align: center;
}

.auth-alt a {
    color: var(--teal-800);
    font-weight: 600;
    text-decoration: underline;
    text-underline-offset: 3px;
}

/* Ridged horizon pinned to the bottom edge, behind both columns. */
.auth-ridges {
    position: absolute;
    inset: auto 0 0;
    z-index: 0;
    pointer-events: none;
}

.auth-ridges__ridge { width: 100%; height: 190px; }
.auth-ridges__ridge--back { margin-top: 0; }

.auth-ridges__ridge path { fill: var(--auth-sage); }

.auth-ridges__ridge--front path { fill: var(--teal-800); }
.auth-ridges__ridge--front {
    margin-top: var(--auth-ridge-lift);
    clip-path: polygon(0 62%, 100% 34%, 100% 100%, 0 100%);
}

.auth-foot { color: var(--text-3); font-size: var(--text-sm); }

/* The non-login auth pages (register, reset, confirm, verify) keep their own
   card heading with the same rhythm as the login card. */
.auth-head { margin: 0 0 var(--s5-5); }
.auth-head h1 { margin: 0; font-size: 30px; }
.auth-head p { margin: var(--s1-5) 0 0; color: var(--auth-muted); font-size: var(--text-ui); line-height: 1.5; }
.auth-links { display: flex; justify-content: space-between; gap: var(--s3); flex-wrap: wrap; margin-top: var(--s4-5); color: var(--auth-muted); font-size: var(--text-ui); font-weight: 500; }
.auth-links a { color: var(--teal-800); }
.auth-form { display: flex; flex-direction: column; gap: var(--s4); }
.auth-hero__copy { max-width: 640px; }

/* Responsive */
@media (max-width: 1280px) {
    .course-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
    .span-8, .span-4, .span-6 { grid-column: span 12; }
}
@media (max-width: 1024px) {
    .portal { grid-template-columns: minmax(0, 1fr); }
    .portal-sidebar { display: none; }
    .portal-menu-btn { display: inline-flex; }
    .portal-search { width: auto; flex: 1; }
    .portal-search span { display: none; }
    .portal-content { width: calc(100% - var(--s7)); padding-top: var(--s5); }
    .portal-topbar { padding: 0 var(--s4); }
    .portal-topbar__title { flex: 1 1 auto; }
    .portal-crumbs { display: none; }
    .account-layout { grid-template-columns: minmax(0, 1fr); }
    .account-nav { position: static; flex-direction: row; flex-wrap: wrap; }
}
@media (max-width: 768px) {
    .course-grid { grid-template-columns: minmax(0, 1fr); }
    .greeting-row { flex-direction: column; align-items: flex-start; }
    .greeting h1 { font-size: var(--text-display); }
    .portal-page-head { flex-direction: column; }
    .portal-page-head__actions { width: 100%; }

    /* Editorial ridge login: single centered column, hero decor hidden. */
    .auth-shell { grid-template-columns: minmax(0, 1fr); padding-top: var(--s7); }
    .auth-hero { display: none; }
    .auth-mast { position: static; padding: 0 var(--s5) var(--s6); }
    .auth-panel { padding: var(--s5) var(--auth-slide-pad) var(--s10); justify-content: flex-start; }
    .auth-card { padding: var(--s6); }
    .auth-ridges { display: none; }
    .s-form-grid--2 { grid-template-columns: 1fr; }
    .week-item { grid-template-columns: 44px minmax(0, 1fr) auto; }
    .deadline { grid-template-columns: minmax(0, 1fr) auto auto; row-gap: var(--s1); }
}

/* ---------------------------------------------------------
   Course index and player document
   --------------------------------------------------------- */
.dash-section__head {
    display: flex; align-items: flex-end; justify-content: space-between;
    gap: var(--s4); margin-bottom: var(--s4);
}
.dash-section__head h2 { margin: 0; }
.dash-section__link { color: var(--teal-700); font-size: var(--text-sm); font-weight: 600; white-space: nowrap; }
.dash-section__link:hover { text-decoration: underline; text-underline-offset: 3px; }

.course-card__title a { color: inherit; text-decoration: none; }
.course-card__title a:hover { color: var(--teal-700); text-decoration: none; }

.course-cover {
    display: flex; flex-direction: column; gap: var(--s0);
    padding: var(--s4-5) var(--s4) var(--s3-5);
    border-bottom: 1px solid var(--border);
    background: var(--surface-2);
}
.course-cover__code {
    color: var(--ink-900);
    font: 500 21px/1.2 var(--font-mono);
    letter-spacing: .03em;
}
.course-cover__subject {
    color: var(--text-3);
    font: 600 10px/1.4 var(--font-sans);
    letter-spacing: .1em; text-transform: uppercase;
}

/* Player: document reading surface */
.player-doc { display: flex; flex-direction: column; min-width: 0; }
.player-doc__bar { display: flex; align-items: center; gap: var(--s4); margin-bottom: var(--s4); }
.player-doc__back {
    display: inline-flex; align-items: center; justify-content: center;
    flex: none; width: 40px; height: 40px;
    border: 1px solid var(--border); border-radius: var(--radius-md);
    background: var(--surface); color: var(--ink-700);
}
.player-doc__back:hover { background: var(--surface-2); color: var(--ink-900); text-decoration: none; }
.player-doc__course { color: var(--text-3); font-size: var(--text-xs); }
.player-doc__lesson { color: var(--ink-900); font-size: var(--text-sm); font-weight: 600; }
.player-doc__actions { display: flex; align-items: center; gap: var(--s2); flex: none; }
.player-doc__progress {
    position: relative; height: 1px; margin-bottom: var(--s5);
    background: var(--border);
}
.player-doc__progress > i { position: absolute; inset: 0 auto 0 0; height: 1px; background: var(--teal-600); }
.player-doc__grid {
    display: grid; grid-template-columns: minmax(0, 1fr) 300px;
    gap: var(--s6); align-items: start;
}

.reading-surface {
    min-width: 0; padding: var(--s8) var(--s9);
    border: 1px solid var(--border); border-radius: var(--radius-lg);
    background: var(--surface); box-shadow: var(--shadow-xs);
}
.reading-surface__eyebrow {
    color: var(--teal-700);
    font: 600 11px/1.4 var(--font-sans);
    letter-spacing: .08em; text-transform: uppercase;
}
.reading-surface h1 { margin: var(--s2) 0 var(--s2-5); font-size: var(--text-display); }
.reading-meta {
    display: flex; flex-wrap: wrap; gap: var(--s1-5) var(--s4);
    color: var(--text-3); font: 500 12px/1.4 var(--font-mono);
}
.reading-prose { margin-top: var(--s6-5); color: var(--ink-700); font-size: var(--text-reading); line-height: 1.7; }
.reading-prose p { max-width: 68ch; }
.reading-prose p + p { margin-top: var(--s3-5); }
.reading-prose h2 { margin: var(--s7) 0 var(--s2-5); font-size: var(--text-h2); }
.reading-actions {
    display: flex; align-items: center; justify-content: space-between; gap: var(--s4);
    margin-top: var(--s7); padding-top: var(--s5); border-top: 1px solid var(--border);
}
.reading-actions .s-help { margin-top: var(--s1); }
.reading-nav {
    display: flex; align-items: center; justify-content: space-between;
    gap: var(--s3); margin-top: var(--s5);
}

.curriculum { position: sticky; top: 88px; min-width: 0; }
.curriculum__list { display: flex; flex-direction: column; }
.curriculum__item {
    display: grid; grid-template-columns: 20px minmax(0, 1fr) auto;
    gap: var(--s2-5); align-items: center;
    min-height: 48px; padding: var(--s2) var(--s5);
    border-bottom: 1px solid var(--border);
    color: var(--text-2); font-size: var(--text-sm);
}
.curriculum__item:last-child { border-bottom: 0; }
.curriculum__status { display: grid; place-content: center; color: var(--text-3); }
.curriculum__icon { display: inline-flex; align-items: center; justify-content: center; width: 20px; color: var(--text-3); }
.curriculum__title { min-width: 0; }
.curriculum__title .s-table__strong { display: block; }
.curriculum__title a { color: inherit; }
.curriculum__title a:hover { color: var(--teal-700); }
.curriculum__dur { color: var(--text-3); font: 500 11px/1.3 var(--font-mono); white-space: nowrap; }
.curriculum__item.is-done .curriculum__status { color: var(--green-600); }
.curriculum__item.is-current {
    background: var(--teal-50); color: var(--teal-700); font-weight: 600;
    box-shadow: inset 3px 0 0 var(--teal-600);
}
.curriculum__item.is-current .curriculum__status { color: var(--teal-600); }
.curriculum__item.is-locked { color: var(--text-3); }

@media (max-width: 1280px) {
    .player-doc__grid { grid-template-columns: minmax(0, 1fr); }
    .curriculum { position: static; }
}
@media (max-width: 768px) {
    .player-doc__bar { flex-wrap: wrap; }
    .player-doc__actions { width: 100%; margin-left: 0; }
    .player-doc__actions .s-btn { flex: 1 1 0; }
    .reading-surface { padding: var(--s6) var(--s5); }
    .reading-surface h1 { font-size: var(--text-h1); }
    .reading-actions { flex-direction: column; align-items: flex-start; }
    .reading-actions .s-btn { width: 100%; }
    .reading-nav .s-btn { flex: 1 1 0; }
}

@media (max-width: 1024px) {
    .portal-icon-btn { width: var(--target-touch); height: var(--target-touch); }
    .portal-nav__link, .account-nav a { min-height: var(--target-touch); }
}

.portal-nav form { margin: 0; }
.portal-nav form .portal-nav__link { width: 100%; text-align: left; }

/* Notification inbox (2026-10) */
.notification-list { display: flex; flex-direction: column; }
.notification-list__item {
    display: flex; align-items: flex-start; justify-content: space-between; gap: var(--s4);
    padding: var(--s4) var(--s5); border-top: 1px solid var(--border);
}
.notification-list__item:first-child { border-top: 0; }
.notification-list__item.is-unread { background: var(--teal-50); }
.notification-list__main { min-width: 0; }
.notification-list__title {
    display: flex; align-items: center; gap: var(--s2);
    color: var(--ink-900); font-weight: 600;
}
.notification-list__dot {
    width: 8px; height: 8px; flex: none; border-radius: var(--radius-full);
    background: var(--teal-600);
}
.notification-list__message { margin-top: var(--s1); color: var(--text-2); font-size: var(--text-sm); }
.notification-list__meta {
    display: flex; align-items: center; flex-wrap: wrap; gap: var(--s3);
    margin-top: var(--s2); color: var(--text-3); font-size: var(--text-xs);
}
.notification-list__actions { display: flex; align-items: center; gap: var(--s2); flex: none; }
.portal-bell { position: relative; }
.portal-bell__count {
    position: absolute; top: 2px; right: 2px; min-width: 16px; height: 16px;
    display: grid; place-items: center; padding: 0 var(--s1); border-radius: var(--radius-full);
    background: var(--burgundy-600); color: #fff; font-size: 10px; font-weight: 700;
}
@media (max-width: 768px) {
    .notification-list__item { flex-direction: column; }
    .notification-list__actions { width: 100%; }
    .notification-list__actions .s-btn { flex: 1 1 0; }
}

/* Text-first lesson media + code blocks (PO amendment, 2026-10-25) */
.code-frame {
    margin: var(--s4) 0;
    border: 1px solid var(--border);
    border-radius: var(--radius-md);
    background: var(--surface-2);
    overflow: hidden;
}
.code-frame__lang {
    padding: var(--s2) var(--s4);
    border-bottom: 1px solid var(--border);
    color: var(--teal-600);
    font: 600 11px/1.6 var(--font-mono);
    letter-spacing: 0.06em;
    text-transform: uppercase;
}
.code-frame__code {
    display: block;
    margin: 0;
    padding: var(--s4);
    border-radius: 0;
    background: var(--surface-2);
    color: var(--ink-900);
    font: 400 13px/1.65 var(--font-mono);
    overflow-x: auto;
    tab-size: 4;
    white-space: pre;
}
.code-frame__code.language-python, .code-frame__code.language-php, .code-frame__code.language-js, .code-frame__code.language-json, .code-frame__code.language-sql { color: var(--ink-900); }
.code-inline {
    padding: 1px var(--s1-5);
    border: 1px solid var(--border);
    border-radius: var(--radius-sm);
    background: var(--surface-2);
    font-family: var(--font-mono);
    font-size: 0.92em;
}
.reading-prose pre { margin: 0; }
.media-block {
    margin: var(--s4) 0;
    padding: var(--s4);
    border: 1px solid var(--border);
    border-radius: var(--radius-lg);
    background: var(--surface);
}
.media-block--video, .media-block--audio { background: var(--navy-50); }
.media-block video, .media-block audio { width: 100%; display: block; border-radius: var(--radius-md); background: var(--ink-900); }
.media-block audio { height: 44px; }
.media-caption { margin: var(--s2) 0 0; color: var(--text-3); font-size: var(--text-sm); }
.embed-frame {
    position: relative;
    aspect-ratio: 16 / 9;
    width: 100%;
    overflow: hidden;
    border-radius: var(--radius-md);
    border: 1px solid var(--border);
    background: var(--surface-2);
}
.embed-frame iframe { position: absolute; inset: 0; width: 100%; height: 100%; border: 0; }
.media-block--pending { display: flex; align-items: center; gap: var(--s2); color: var(--text-3); }

/* Verify center (2026-10) */
.verify-page { min-height: 100dvh; background: var(--canvas); }
.verify-topbar { padding-inline: var(--s6); }
.verify-main { max-width: 680px; margin-inline: auto; padding: var(--s9) var(--s6) var(--s11); }
.verify-hero { padding-bottom: var(--s6); }
.verify-hero__eyebrow {
    margin: 0; color: var(--teal-700);
    font: 700 11px/1.6 var(--font-sans);
    letter-spacing: 0.12em; text-transform: uppercase;
}
.verify-hero__title { margin: var(--s1-5) 0 0; font: 600 var(--text-display)/1.15 var(--font-display); letter-spacing: -0.015em; }
.verify-hero__sub { margin: var(--s3) 0 0; max-width: 56ch; color: var(--text-2); font-size: var(--text-body-lg); line-height: 1.6; }

.verify-card {
    padding: var(--s6-5); border: 1px solid var(--border); border-radius: var(--radius-lg);
    background: var(--surface); box-shadow: var(--shadow-md);
}
.verify-card__seal {
    display: grid; place-items: center; width: 48px; height: 48px;
    margin-bottom: var(--s3-5); border: 1px solid var(--border); border-radius: var(--radius-md);
    background: var(--teal-50); color: var(--teal-700);
}
.verify-card__title { margin: 0; font: 600 20px/1.3 var(--font-display); }
.verify-form { margin-top: var(--s4); }
.verify-form__label { display: block; margin-bottom: var(--s1-5); color: var(--ink-700); font: 500 12px/1.4 var(--font-sans); }
.verify-form__row { display: flex; gap: var(--s2); }
.verify-form__input {
    flex: 1 1 auto; min-width: 0; min-height: 48px; padding: 0 var(--s3-5);
    border: 1px solid var(--border-strong); border-radius: var(--radius-sm);
    background: var(--surface); color: var(--ink-900);
    font: 500 15px/1.2 var(--font-mono); letter-spacing: 0.06em; text-transform: uppercase;
}
.verify-form__input:focus { outline: none; border-color: var(--teal-600); box-shadow: var(--ring-focus); }
.verify-form__submit {
    flex: none; min-height: 48px; padding: 0 var(--s5);
    border: 0; border-radius: var(--radius-sm);
    background: var(--teal-700); color: #fff; cursor: pointer;
    font: 600 14px/1 var(--font-sans);
}
.verify-form__submit:hover { background: var(--teal-800); }
.verify-form__help { margin: var(--s2-5) 0 0; color: var(--text-3); font-size: 12px; line-height: 1.6; }
.verify-legend { display: flex; flex-wrap: wrap; gap: var(--s2) var(--s5); margin-top: var(--s4-5); padding-top: var(--s4); border-top: 1px solid var(--border); }
.verify-legend__item { display: inline-flex; align-items: center; gap: var(--s2); color: var(--text-2); font-size: 12px; }
.verify-legend__dot { width: 8px; height: 8px; border-radius: var(--radius-full); }
.verify-legend__dot--valid { background: var(--green-600); }
.verify-legend__dot--revoked { background: var(--red-600); }
.verify-legend__dot--unknown { background: var(--neutral-500); }

.verify-card--result { margin-top: var(--s1); }
.verify-status-band {
    display: flex; align-items: flex-start; gap: var(--s3);
    margin-bottom: var(--s5); padding: var(--s4) var(--s4-5);
    border: 1px solid var(--border); border-left: 3px solid var(--neutral-500);
    border-radius: var(--radius-md); background: var(--surface-2);
}
.verify-status-band--valid { border-left-color: var(--green-600); background: var(--green-50); }
.verify-status-band--valid .verify-status-band__icon { color: var(--green-600); }
.verify-status-band--revoked { border-left-color: var(--red-600); background: var(--red-50); }
.verify-status-band--revoked .verify-status-band__icon { color: var(--red-600); }
.verify-status-band__icon { color: var(--text-3); margin-top: var(--s0); }
.verify-status-band__copy { display: flex; flex-direction: column; gap: var(--s1); min-width: 0; }
.verify-status-band__copy strong { font: 600 var(--text-body-lg)/1.4 var(--font-sans); }
.verify-status-band__serial { font-size: var(--text-sm); letter-spacing: 0.04em; }
.verify-status-band__copy > span:not(.verify-status-band__serial) { color: var(--text-2); font-size: var(--text-sm); }

.verify-details {
    margin-top: var(--s6); padding-top: var(--s5);
    border-top: 1px solid var(--line-soft);
}
.verify-details__head {
    display: flex; align-items: center; justify-content: space-between;
    gap: var(--s3); margin-bottom: var(--s3);
}
.verify-details__title { margin: 0; font: 600 var(--text-h3)/1.35 var(--font-sans); color: var(--ink-900); }
.verify-facts {
    display: grid; grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: var(--s2-5); margin: 0;
}
.verify-fact {
    min-width: 0; padding: var(--s3) var(--s3-5);
    border: 1px solid var(--line-soft); border-radius: var(--radius-md);
    background: var(--surface-2);
}
.verify-fact--wide { grid-column: 1 / -1; }
.verify-fact dt {
    margin: 0; color: var(--text-3);
    font: 600 var(--text-xs)/1.3 var(--font-sans);
    letter-spacing: .07em; text-transform: uppercase;
}
.verify-fact dd {
    margin: var(--s1) 0 0; color: var(--ink-900);
    font-size: var(--text-body); line-height: 1.45;
    overflow-wrap: anywhere;
}
.verify-fact dd .s-badge { margin-top: var(--s0); }
.verify-result-again { margin-top: var(--s5); padding-top: var(--s4-5); border-top: 1px solid var(--line-soft); }

.verify-links {
    display: flex; flex-wrap: wrap; align-items: center; justify-content: center; gap: var(--s2-5);
    margin-top: var(--s6); color: var(--text-3); font-size: 13px;
}
.verify-links a { color: var(--teal-700); text-decoration: none; font-weight: 500; }
.verify-links a:hover { text-decoration: underline; text-underline-offset: 3px; }
.verify-note { margin: var(--s4-5) auto 0; max-width: 56ch; color: var(--text-3); font-size: 12px; text-align: center; }

@media (max-width: 640px) {
    .verify-form__row { flex-direction: column; }
    .verify-form__submit { width: 100%; }
    .verify-hero { padding-bottom: var(--s6); }
    .verify-hero__title { font-size: var(--text-h1); }
    .verify-card { padding: var(--s5); }
    .verify-facts { grid-template-columns: 1fr; }
    .verify-details__head { align-items: flex-start; flex-direction: column; gap: var(--s2); }
}

/* Dashboard band (2026-10) */
.dash-hero {
    border-bottom: 1px solid var(--border);
    background-color: var(--canvas);
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='24' height='24' viewBox='0 0 24 24'%3E%3Ccircle cx='1.5' cy='1.5' r='1.5' fill='%23102A43' fill-opacity='0.07'/%3E%3C/svg%3E");
    background-repeat: repeat;
    background-size: 24px 24px;
}
.dash-hero__inner {
    display: grid; grid-template-columns: minmax(0, 7fr) minmax(0, 5fr);
    gap: var(--s7); align-items: end;
    width: min(1240px, 100% - var(--s9)); margin-inline: auto;
    padding-block: var(--s7) var(--s6-5);
}
.dash-hero__title { margin: var(--s1) 0 0; font: 600 var(--text-display)/1.15 var(--font-display); letter-spacing: -0.01em; }
.dash-hero__sub { margin: var(--s2) 0 0; max-width: 52ch; color: var(--text-2); font-size: var(--text-body); line-height: 1.55; }
.dash-hero__actions { display: flex; flex-wrap: wrap; gap: var(--s2-5); margin-top: var(--s4); }

.dash-hero__kpis { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: var(--s2-5); }
.kpi {
    display: flex; gap: var(--s2); padding: var(--s2-5);
    border: 1px solid var(--border); border-radius: var(--radius-md);
    background: var(--surface); box-shadow: var(--shadow-xs); align-items: center;
}
.kpi__tile {
    display: grid; place-items: center; width: 30px; height: 30px; flex: none;
    border-radius: var(--radius-sm); background: var(--teal-50); color: var(--teal-700);
}
.kpi__body { display: flex; flex-direction: column; min-width: 0; }
.kpi__value { font: 600 var(--text-h3)/1.2 var(--font-sans); color: var(--ink-900); }
.kpi__label { color: var(--text-3); font-size: 11px; }

.dash-steps__grid { display: grid; gap: var(--s4); }
.dash-steps__item { display: flex; gap: var(--s3-5); padding: var(--s3-5) var(--s4); border: 1px solid var(--border); border-radius: var(--radius-md); background: var(--canvas); }
.dash-steps__num { color: var(--teal-700); font: 700 11px/2 var(--font-sans); letter-spacing: 0.08em; }
.dash-steps__body { display: flex; flex-direction: column; gap: var(--s1); font-size: var(--text-sm); }
.dash-steps__body strong { color: var(--ink-900); font-weight: 600; }
.dash-steps__body span { color: var(--text-2); }
.dash-steps__actions { display: flex; flex-wrap: wrap; gap: var(--s2-5); margin-top: var(--s4); }

.course-card__next { margin: var(--s2-5) 0 0; font-size: var(--text-sm); }
.course-card__next .s-help { margin-right: var(--s1); }

@media (max-width: 1024px) {
    .dash-hero__inner { grid-template-columns: 1fr; align-items: stretch; padding-block: var(--s6); width: min(1240px, 100% - var(--s7)); }
    .dash-hero__kpis { grid-template-columns: repeat(3, minmax(0, 1fr)); }
}
@media (max-width: 640px) {
    .kpi { flex-direction: row; align-items: center; }
    .dash-hero__kpis { grid-template-columns: 1fr; }
    .dash-hero__actions { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: var(--s2); }
    .dash-hero__actions > :first-child { grid-column: 1 / -1; }
    /* A ghost action is a real button on touch: no hover to reveal it. */
    .dash-hero__actions .s-btn--ghost {
        border: 1px solid var(--border-strong);
        background: var(--surface);
        color: var(--ink-900);
    }
}

/* ---------------------------------------------------------
   Tabbed async list regions (2026-10-29 density pass)
   --------------------------------------------------------- */
.portal-list { display: flex; flex-direction: column; gap: var(--s3); }
.portal-pagination {
    display: flex; align-items: center; justify-content: space-between; gap: var(--s3);
    padding: var(--s4) var(--s6); border-top: 1px solid var(--line-soft);
    background: var(--surface-2);
    border-radius: 0 0 var(--radius-lg) var(--radius-lg);
}

[data-cp-fragment][data-loading="true"] { opacity: .55; transition: opacity var(--dur-1) linear; }
[data-cp-fragment][data-loading="true"] a,
[data-cp-fragment][data-loading="true"] button { pointer-events: none; }

.portal-content ::selection { background: var(--teal-100); color: var(--ink-900); }

.course-card__foot { flex-direction: column; align-items: stretch; gap: var(--s3); }
.course-card__foot .s-badge { align-self: flex-start; }
.course-card__actions { width: 100%; margin-left: 0; gap: var(--s1-5); }
.course-card__actions .s-btn { flex: 1 1 auto; }
.course-card__actions form { display: flex; flex: 1 1 auto; margin: 0; }
.course-card__actions form .s-btn { width: 100%; }

@media (max-width: 768px) {
    .portal-pagination { flex-wrap: wrap; padding: var(--s3-5) var(--s4); }
}

/* ---------------------------------------------------------
   Responsive contract (2026-11 audit)
   Breakpoints: 1440 content max, 1280 span collapse, 1024 shell
   collapse, 768 two-column collapse, 640 single column + tab wrap,
   420 compact type. Add no other breakpoint without amending
   design/05 section 4.
   --------------------------------------------------------- */
@media (max-width: 1280px) {
    .span-8, .span-7, .span-6, .span-5, .span-4,
    .admin-span-8, .admin-span-7, .admin-span-6, .admin-span-5, .admin-span-4 {
        grid-column: span 12;
    }
}

/* Context without breadcrumbs: the current page title rides in the topbar. */
.portal-topbar__title,
.admin-topbar__title {
    display: none;
    min-width: 0;
    overflow: hidden;
    color: var(--ink-900);
    font: 600 var(--text-h4)/1.2 var(--font-sans);
    text-overflow: ellipsis;
    white-space: nowrap;
}
@media (max-width: 1024px) {
    .portal-topbar__title,
    .admin-topbar__title { display: block; }
    .portal-topbar .s-avatar,
    .admin-topbar .s-avatar { width: var(--target-touch); height: var(--target-touch); }
}

/* Tabs never hide a destination: below 640 they wrap to a second row. */
@media (max-width: 640px) {
    .s-tabs { flex-wrap: wrap; overflow-x: visible; }
    .admin-content .s-tabs { width: 100%; }
    .s-tabs a { flex: 0 0 auto; }
    .portal-content,
    .admin-content { width: calc(100% - var(--s6)); }
}

/* Coarse pointers get 44px targets regardless of viewport width. */
@media (pointer: coarse) {
    .s-btn, .s-btn--icon, .s-btn--sm,
    .portal-icon-btn, .portal-nav__link, .account-nav a,
    .admin-nav__link, .admin-chip, .admin-menu-btn,
    .s-tabs a, .portal-menu-btn { min-height: var(--target-touch); }
    .s-btn--icon, .portal-icon-btn { width: var(--target-touch); min-width: var(--target-touch); }
    .c-kbd { display: none; }
}

@media (max-width: 768px) {
    /* Icon-only search: the field cannot shrink below its content without
       colliding with the topbar actions. */
    .portal-search {
        flex: none;
        width: var(--target-touch);
        min-height: var(--target-touch);
        padding: 0;
        justify-content: center;
        border-color: transparent;
        background: transparent;
    }
    .portal-search span,
    .portal-search kbd,
    .portal-topbar .c-kbd,
    .admin-topbar .c-kbd { display: none; }
}

/* One mobile gutter: card heads, bodies and stacked table rows share it so
   labels and row content line up at every width. */
@media (max-width: 768px) {
    .s-card__head,
    .s-card__body,
    .s-card__foot { padding-inline: var(--pad-page-x-tight); }
    .admin-toolbar--card { padding-inline: var(--pad-page-x-tight); }
    .admin-table--stack tr { padding-inline: var(--pad-page-x-tight); }
}

/* Long words (serials, emails, course codes) can never widen a grid track. */
.admin-grid > *,
.dash-grid > *,
.course-grid > *,
.admin-role-grid > *,
.admin-health-grid > *,
.admin-settings-grid > * { min-width: 0; }

/* ---------------------------------------------------------
   Selection dock — shared bottom action bar for bulk table actions.
   Rendered by <x-selection-dock> outside the table, so it can never
   reflow or clip it (design/00 §11, PO 2026-10-29). One design for
   every surface: certificates (panel teleported in) and jobs (bulk form).
   --------------------------------------------------------- */
.selection-dock {
    position: fixed;
    left: 50%;
    bottom: max(var(--s5), env(safe-area-inset-bottom, 0px));
    z-index: var(--z-toast);
    width: min(760px, calc(100vw - var(--s7)));
    transform: translateX(-50%);
}

.selection-dock__bar {
    display: flex;
    flex-direction: column;
    gap: var(--s3);
    width: 100%;
    padding: var(--s4);
    border-radius: var(--radius-lg);
    background: var(--navy-900);
    box-shadow: var(--shadow-lg);
    color: #C9D6E1;
    animation: selection-dock-in var(--dur-2) var(--ease-out);
}

@keyframes selection-dock-in {
    from { opacity: 0; transform: translateY(var(--s1-5)); }
    to { opacity: 1; transform: translateY(0); }
}

.selection-dock__head { display: flex; align-items: center; gap: var(--s3); }

/* Serif count gives the dock a voice of its own instead of a shouting label. */
.selection-dock__count {
    color: #FFFFFF;
    font: 600 var(--text-h4)/1.3 var(--font-display);
    letter-spacing: 0;
}
/* Serials stay mono (design/00 §3.4) even inside the count line. */
.selection-dock__serial {
    margin-left: var(--s0);
    color: #B8C7D4;
    font: 500 var(--text-sm)/1 var(--font-mono);
    letter-spacing: .02em;
}

.selection-dock__close {
    display: grid;
    place-content: center;
    flex: none;
    width: var(--s8);
    height: var(--s8);
    margin-left: auto;
    border-radius: var(--radius-sm);
    color: #8FA6B8;
    font: 400 18px/1 var(--font-sans);
    cursor: pointer;
}
.selection-dock__close:hover { background: rgba(255, 255, 255, .08); color: #FFFFFF; }
.selection-dock__close:focus-visible { box-shadow: var(--ring-focus); }

.selection-dock__body {
    display: flex;
    flex-wrap: wrap;
    align-items: flex-start;
    gap: var(--s2) var(--s2-5);
    min-width: 0;
}
.selection-dock__body > form,
.selection-dock__body > .u-stack { flex: 1 0 100%; width: 100%; }

/* Dark-surface controls: compact, high contrast, no offset ring bulge.
   The .selection-dock__bar prefix outranks `.admin-content .s-input` so the
   dock keeps its own density on every surface. */
.selection-dock__bar .selection-dock__body .s-field { width: 100%; flex: 0 0 auto; gap: var(--s1); }
.selection-dock__bar .selection-dock__body .s-label,
.selection-dock__bar .selection-dock__body .s-field__label {
    color: #C9D6E1;
    font: 500 var(--text-sm)/1.4 var(--font-sans);
    letter-spacing: 0;
}
.selection-dock__bar .selection-dock__body .s-input,
.selection-dock__bar .selection-dock__body .s-select {
    min-height: var(--s7-5);
    padding: 0 var(--s3);
    border-color: transparent;
    font-size: var(--text-body);
}
.selection-dock__bar .selection-dock__body .s-input:focus,
.selection-dock__bar .selection-dock__body .s-select:focus {
    border-color: var(--teal-600);
    box-shadow: 0 0 0 2px var(--teal-600);
}
.selection-dock__bar .selection-dock__body .s-help {
    flex: 1 0 100%;
    order: 20;
    margin: 0;
    color: #B8C7D4;
    font-size: var(--text-xs);
}
/* Outranks `.admin-content .s-btn:not(.s-btn--link)` (0,3,0). */
.selection-dock .selection-dock__bar .selection-dock__body .s-btn { min-height: var(--s7-5); }
.selection-dock__bar .selection-dock__body .s-btn--secondary {
    background: rgba(255, 255, 255, .06);
    border-color: rgba(255, 255, 255, .25);
    color: #FFFFFF;
}
.selection-dock__bar .selection-dock__body .s-btn--secondary:hover { background: rgba(255, 255, 255, .12); }
.selection-dock__bar .selection-dock__body .s-btn--danger { border: 1px solid rgba(255, 255, 255, .25); }

/* Certificate panels teleport here: their card chrome is retired. */
.selection-dock__body .cert-flyout { display: contents; }
.selection-dock__body .cert-flyout__head { display: none; }
.selection-dock__body .cert-flyout__form .s-btn--danger { min-height: var(--s7-5); }
.selection-dock__body .cert-flyout__form > summary {
    min-height: var(--s7-5);
    padding: 0 var(--s3-5);
    border: 1px solid rgba(255, 255, 255, .25);
    border-radius: var(--radius-md);
    background: rgba(255, 255, 255, .06);
    color: #FFFFFF;
    font: 600 var(--text-sm)/1 var(--font-sans);
    cursor: pointer;
}
.selection-dock__body .cert-flyout__form > summary:hover { background: rgba(255, 255, 255, .12); }
.selection-dock__body .cert-flyout__form[open] > summary {
    background: var(--surface);
    border-color: var(--border);
    color: var(--ink-900);
}
/* An expanded form drops full-width below the inline controls, back on white. */
.selection-dock__body .cert-flyout__form[open] {
    flex: 1 0 100%;
    order: 10;
    width: 100%;
    padding: var(--s3-5) var(--s4);
    border-radius: var(--radius-md);
    background: var(--surface);
    box-shadow: var(--shadow-xs);
}
.selection-dock__body .cert-flyout__form[open] > summary {
    width: auto;
    min-height: var(--s6-5);
    padding: 0 var(--s3);
    margin: 0 0 var(--s3);
    align-self: flex-start;
    background: var(--surface-2);
    border: 1px solid var(--border);
    color: var(--teal-700);
    border-radius: var(--radius-md);
    font: 600 var(--text-sm)/1 var(--font-sans);
}
.selection-dock__body .cert-flyout__form[open] form { gap: var(--s3); padding: 0; }
.selection-dock__body .cert-flyout__form[open] form .s-btn { align-self: flex-start; min-width: 160px; }
/* The expanded panel sits on white: restore surface colours. */
.selection-dock__body .cert-flyout__form[open] .s-label,
.selection-dock__body .cert-flyout__form[open] .s-field__label { color: var(--ink-700); }
.selection-dock__body .cert-flyout__form[open] .s-input,
.selection-dock__body .cert-flyout__form[open] .s-select { border-color: var(--border-strong); }
.selection-dock__body .cert-flyout__form[open] .s-input:focus,
.selection-dock__body .cert-flyout__form[open] .s-select:focus {
    border-color: var(--teal-600);
    box-shadow: var(--ring-focus);
}

@media (max-width: 768px) {
    .selection-dock {
        left: var(--s3);
        right: var(--s3);
        width: auto;
        transform: none;
        bottom: max(var(--s3), env(safe-area-inset-bottom, 0px));
    }
    .selection-dock__bar { padding: var(--s3-5); }
    .selection-dock__count { font-size: var(--text-body); }
    .selection-dock__close { width: var(--target-touch); height: var(--target-touch); }
    .selection-dock__body > a,
    .selection-dock__body .cert-flyout__form > summary { min-height: var(--target-touch); }
    .selection-dock .selection-dock__bar .selection-dock__body .s-btn { min-height: var(--s8); }
}

@media (prefers-reduced-motion: reduce) {
    .selection-dock__bar { animation: none; }
}

/* Tinted card for internal notes and other inset content. */
.s-card--inset { background: var(--surface-2); border-color: var(--line-soft); }
.s-card--inset > .s-card__head { background: transparent; }

/* Denser vertical stack for compact card bodies and side panels. */
.u-stack--tight { display: flex; flex-direction: column; gap: var(--s3); }

/* ---------------------------------------------------------
   Choice pills — a small, known option set replaces a dropdown.
   Radios stay in the DOM for keyboard and no-JS; the label is the
   pill. Colours come from the --variant modifier (PO 2026-11-04).
   --------------------------------------------------------- */
.s-pills {
    display: flex;
    flex-wrap: wrap;
    gap: var(--s2);
    align-items: center;
}

.s-pill {
    position: relative;
    display: inline-flex;
    align-items: center;
}

.s-pill > input {
    position: absolute;
    inset: 0;
    margin: 0;
    opacity: 0;
    cursor: pointer;
}

.s-pill > span,
.s-pill-btn {
    display: inline-flex;
    align-items: center;
    gap: var(--s1-5);
    min-height: var(--s8);
    padding: 0 var(--s3-5);
    border: 1px solid var(--border-strong);
    border-radius: var(--radius-full);
    background: var(--surface);
    color: var(--ink-700);
    font: 500 var(--text-sm)/1 var(--font-sans);
    white-space: nowrap;
    cursor: pointer;
    transition:
        background-color var(--dur-1) linear,
        border-color var(--dur-1) linear,
        color var(--dur-1) linear,
        box-shadow var(--dur-1) linear;
}

/* The dot makes the pill read as a state, not a button label. */
.s-pill > span::before,
.s-pill-btn::before {
    content: "";
    width: var(--s1-5);
    height: var(--s1-5);
    border-radius: var(--radius-full);
    background: currentColor;
    opacity: .35;
    flex: none;
}

.s-pill > input:hover + span,
.s-pill-btn:hover { border-color: var(--teal-600); color: var(--ink-900); }
.s-pill > input:focus-visible + span,
.s-pill-btn:focus-visible { box-shadow: var(--ring-focus); outline: none; }

.s-pill > input:checked + span,
.s-pill-btn.is-current {
    border-color: var(--teal-600);
    background: var(--teal-50);
    color: var(--teal-700);
    font-weight: 600;
}

.s-pill > input:checked + span::before,
.s-pill-btn.is-current::before { opacity: 1; }

/* Colour variants, applied when the option is chosen. */
.s-pill--teal > input:checked + span,
.s-pill-btn.s-pill--teal.is-current { border-color: var(--teal-600); background: var(--teal-50); color: var(--teal-700); }
.s-pill--green > input:checked + span,
.s-pill-btn.s-pill--green.is-current { border-color: var(--green-600); background: var(--green-50); color: var(--green-700); }
.s-pill--amber > input:checked + span,
.s-pill-btn.s-pill--amber.is-current { border-color: var(--amber-600); background: var(--amber-50); color: var(--amber-700); }
.s-pill--red > input:checked + span,
.s-pill-btn.s-pill--red.is-current { border-color: var(--red-600); background: var(--red-50); color: var(--red-700); }
.s-pill--neutral > input:checked + span,
.s-pill-btn.s-pill--neutral.is-current { border-color: var(--ink-500); background: var(--surface-3); color: var(--ink-900); }

/* Unselected colour hint: the dot carries the semantic hue. */
.s-pill--teal > span::before { background: var(--teal-600); }
.s-pill--green > span::before { background: var(--green-600); }
.s-pill--amber > span::before { background: var(--amber-600); }
.s-pill--red > span::before { background: var(--red-600); }
.s-pill--neutral > span::before { background: var(--ink-400); }

.s-pills--sm > .s-pill > span,
.s-pills--sm > .s-pill-btn { min-height: var(--s7-5); padding: 0 var(--s3); font-size: var(--text-xs); }

.s-pill-btn[disabled] { opacity: .6; cursor: not-allowed; }

@media (max-width: 640px) {
    .s-pills { gap: var(--s1-5); }
    .s-pill > span,
    .s-pill-btn { min-height: var(--target-touch); }
}

/* A fieldset used as a form field keeps the field layout but not the UA frame. */
fieldset.s-field,
fieldset.s-fieldset { border: 0; padding: 0; margin: 0; min-width: 0; }

/* The current choice stays legible even though it cannot be re-submitted. */
.s-pill-btn[disabled].is-current { opacity: 1; }

/* Async navigation progress bar (Ch. 17). Purely visual; the page swaps in
   place and the bar hides on completion or full-load fallback. */
.cp-nav-progress {
    position: fixed;
    inset-block-start: 0;
    inset-inline: 0;
    block-size: var(--s0);
    z-index: var(--z-toast);
    overflow: hidden;
    pointer-events: none;
}

.cp-nav-progress::before {
    content: "";
    display: block;
    block-size: 100%;
    inline-size: 35%;
    background: var(--teal-600);
    animation: cp-nav-progress calc(var(--dur-3) * 4) var(--ease-out) infinite;
}

@keyframes cp-nav-progress {
    from { transform: translateX(-110%); }
    to { transform: translateX(320%); }
}

@media (prefers-reduced-motion: reduce) {
    .cp-nav-progress::before {
        animation: none;
        inline-size: 100%;
        opacity: .6;
    }
}

/* A table wrapper that closes a card must not add a second bottom gutter:
   the card padding already owns the inset (content-sized cards, PO 2026-10-30). */
.s-card > .s-table-scroll:last-child,
.s-card > .s-table-wrap:last-child {
    margin-block-end: 0;
}

/* ---------------------------------------------------------
   Card rhythm (design/06-ui-cleanliness-v1.md 2).
   Adjacent cards are separated by one container-level rule instead of
   per-card margin utilities. Grid children keep their gap and never inherit
   this margin.
   --------------------------------------------------------- */
.s-card + .s-card { margin-block-start: var(--s5); }
.admin-grid > .s-card,
.kpi-grid > .s-card,
.billing-kpis > .s-card,
.admin-settings-grid > .s-card,
.admin-role-grid > .s-card,
.admin-health-grid > .s-card,
.s-form-grid > .s-card,
.course-grid > .s-card,
.l-course-grid > .s-card,
.course-fallback-list > .s-card { margin-block-start: 0; }
/* Campus cards that follow a non-card block: the container supplies the space
   (design/06-ui-cleanliness-v1.md 2) without a margin utility on the card. */
.c-card-followup { margin-block-start: var(--s4); }
.c-card-lead { margin-block-end: var(--s4); }
/* Controls never touch (design/06-ui-cleanliness-v1.md §6). A submit button that
   follows a field keeps 16px of air; `.s-form-actions` already carries 20px. */
.s-card__body form > .s-field + .s-btn,
.s-card__body form > .s-field + button,
.s-card__body > form > .s-field + .s-btn,
.s-card__body > form > .s-field + button { margin-block-start: var(--s4); }
/* CrestPoint Semester — management console shell and pages. */

.admin { display: grid; grid-template-columns: 248px minmax(0, 1fr); min-height: 100dvh; }

.admin-sidebar {
    position: sticky; top: 0; display: flex; flex-direction: column;
    height: 100dvh; padding: var(--s4) var(--s3) var(--s3);
    background: var(--rail-console-bg); color: var(--rail-console-ink);
    border-right: 1px solid var(--rail-console-line);
}
.admin-brand { display: flex; align-items: center; gap: var(--s2-5); padding: var(--s1) var(--s2) var(--s3-5); }
.admin-brand .s-brand__name { color: var(--rail-console-ink-strong); }
.admin-brand .s-brand__sub { color: var(--rail-console-ink-muted); }
.admin-brand .s-brand__mark { color: var(--rail-console-ink-strong); }
.admin-search {
    display: flex; align-items: center; gap: var(--s2); min-height: 34px; margin: 0 var(--s1) var(--s3); padding: 0 var(--s2-5);
    border: 1px solid var(--rail-console-line); border-radius: var(--radius-md);
    background: transparent; color: var(--rail-console-ink-muted); font-size: 12.5px; text-align: left;
}
.admin-search:hover { background: var(--rail-console-hover); color: var(--rail-console-ink-strong); }
.admin-search kbd { margin-left: auto; border-color: var(--rail-console-line); background: transparent; color: var(--rail-console-ink-muted); }
/* Nav scrolls without a visible scrollbar (PO, 2026-10-27): wheel and
   keyboard scrolling still work, the gutter stays clean. */
.admin-nav { flex: 1; overflow-y: auto; scrollbar-width: none; -ms-overflow-style: none; }
.admin-nav::-webkit-scrollbar { width: 0; height: 0; display: none; }
.admin-drawer__panel .admin-nav::-webkit-scrollbar { width: 0; height: 0; display: none; }
.admin-nav__group { margin-bottom: var(--s3); }
.admin-nav__group--core { padding-bottom: 0; margin-bottom: var(--s4); }
.admin-nav__label { margin: 0 var(--s2-5) var(--s1); color: var(--rail-console-ink-muted); font: 600 10px/1.4 var(--font-sans); letter-spacing: .12em; text-transform: uppercase; }
.admin-nav__link {
    position: relative; display: flex; align-items: center; gap: var(--s2-5);
    min-height: 40px; padding: 0 var(--s2-5); border-radius: var(--radius-sm);
    color: var(--rail-console-ink); font: 500 12.5px/1.2 var(--font-sans); text-decoration: none;
}
.admin-nav__link svg { flex: none; width: 16px; height: 16px; color: var(--rail-console-ink-muted); }
.admin-nav__link:hover { background: var(--rail-console-hover); color: var(--rail-console-ink-strong); text-decoration: none; }
.admin-nav__link:hover svg { color: var(--rail-console-ink-strong); }
.admin-nav__link:focus-visible { outline: none; box-shadow: var(--ring-focus); }
.admin-nav__link.is-active { background: var(--rail-console-active); color: var(--rail-console-ink-strong); font-weight: 600; }
.admin-nav__link.is-active::before { content: ""; position: absolute; left: 0; top: 7px; bottom: 7px; width: 3px; border-radius: 0 2px 2px 0; background: var(--rail-console-accent); }
.admin-nav__link.is-active svg { color: var(--rail-console-accent); }
.admin-nav__count { margin-left: auto; min-width: 20px; padding: var(--s0) var(--s1-5); border-radius: var(--radius-full); background: var(--rail-console-active); color: var(--rail-console-ink-strong); font-size: 10px; text-align: center; }

/* Collapsible rail sections. <details> keeps them keyboard-operable and
   functional with JavaScript disabled; the open section follows the route. */
.admin-nav__section { margin-bottom: var(--s1); }
.admin-nav__section + .admin-nav__section { margin-top: var(--s1); }
.admin-nav__section-summary {
    display: flex; align-items: center; justify-content: space-between; gap: var(--s2);
    min-height: 40px; padding: 0 var(--s2-5); border-radius: var(--radius-sm);
    color: var(--rail-console-ink); font: 500 12.5px/1.2 var(--font-sans);
    cursor: pointer; list-style: none;
}
.admin-nav__section-summary::-webkit-details-marker { display: none; }
.admin-nav__section-summary::marker { content: ""; }
.admin-nav__section-summary:hover { background: var(--rail-console-hover); color: var(--rail-console-ink-strong); }
.admin-nav__section-summary:focus-visible { outline: none; box-shadow: var(--ring-focus); }
.admin-nav__section[open] > .admin-nav__section-summary { color: var(--rail-console-ink-strong); font-weight: 600; }
.admin-nav__chevron { flex: none; width: 14px; height: 14px; color: var(--rail-console-ink-muted); transition: transform var(--dur-1) var(--ease-out); }
.admin-nav__section[open] .admin-nav__chevron { transform: rotate(180deg); }
.admin-nav__section-body { display: grid; gap: var(--s0); margin: var(--s0) 0 var(--s1) var(--s4); padding-left: 0; }
.admin-user { display: flex; align-items: center; gap: var(--s2-5); margin-top: var(--s4); padding: var(--s2) var(--s1-5) var(--s1); }
.admin-user__name { color: var(--rail-console-ink-strong); font-size: 12.5px; font-weight: 600; }
.admin-user__role { color: var(--rail-console-ink-muted); font-size: 11px; }
.admin-user .s-avatar { background: var(--rail-console-active); color: var(--rail-console-ink-strong); }

.admin-main { min-width: 0; }
.admin-topbar {
    position: sticky; top: 0; z-index: var(--z-nav); display: flex; align-items: center; gap: var(--s4);
    min-height: 60px; padding: 0 var(--s6-5); background: var(--surface); border-bottom: 1px solid var(--border);
}
.admin-crumbs { display: flex; align-items: center; gap: var(--s2); color: var(--text-3); font-size: 12px; }
.admin-crumbs a { color: var(--text-2); }
.admin-crumbs [aria-current="page"] { color: var(--ink-900); font-weight: 500; }
.admin-topbar__search {
    display: flex; align-items: center; gap: var(--s2); width: min(360px, 32vw); min-height: 36px; margin-left: auto; padding: 0 var(--s2-5);
    border: 1px solid var(--border); border-radius: var(--radius-md); background: var(--surface-2);
    color: var(--text-3); font-size: 12.5px; text-align: left;
}
.admin-topbar__search kbd { margin-left: auto; }
.admin-topbar__actions { display: flex; align-items: center; gap: var(--s2); }
.admin-menu-btn { display: none; }
.admin-content { width: min(1520px, 100% - var(--s10)); margin: 0 auto; padding: var(--s7-5) 0 var(--s11); }

.admin-page-head { display: flex; align-items: flex-start; justify-content: space-between; gap: var(--s6); margin-bottom: var(--s6-5); }
.admin-page-head h1 { margin: 0; }
.admin-page-head__sub { margin: var(--s1-5) 0 0; color: var(--text-2); font-size: var(--text-body); }
.admin-page-head__actions { display: flex; gap: var(--s2-5); align-items: center; flex: none; }
.admin-live { display: inline-flex; align-items: center; gap: var(--s1-5); color: var(--text-3); font: 500 10.5px/1.4 var(--font-mono); text-transform: uppercase; letter-spacing: .04em; }
.admin-live__dot { width: 6px; height: 6px; border-radius: 50%; background: var(--green-600); }

.kpi-grid { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: var(--gap-grid); margin-bottom: var(--s6); align-items: start; }
.kpi-card { padding: var(--s5) var(--s6); min-height: var(--kpi-min-h); }
.kpi-card__label { display: flex; align-items: center; gap: var(--s1-5); color: var(--text-3); font-size: 10.5px; text-transform: uppercase; letter-spacing: .07em; }
.kpi-card__label .dot { width: 6px; height: 6px; border-radius: 50%; background: var(--teal-600); }
.kpi-card__value { margin-top: var(--s2); color: var(--ink-900); font: 600 var(--text-stat)/1.1 var(--font-display); }
.kpi-card__foot { display: flex; align-items: center; gap: var(--s2); margin-top: var(--s2-5); color: var(--text-3); font-size: 11.5px; }
.kpi-card__delta { display: inline-flex; align-items: center; gap: var(--s1); min-height: 20px; padding: 0 var(--s1-5); border-radius: 4px; font: 600 10px/1 var(--font-sans); }
.kpi-card__delta--up { background: var(--green-50); color: var(--green-600); }
.kpi-card__delta--down { background: var(--red-50); color: var(--red-600); }

/* 12-column grid and span utilities live in portal.css (shared by both surfaces). */
.admin-span-12 { grid-column: span 12; }

.db-dist { display: block; margin: 0 calc(var(--s1-5) * -1) var(--s2-5); padding: var(--s1-5); border-radius: 6px; color: inherit; text-decoration: none; }
.db-dist:hover { background: var(--surface-2); }
.db-dist:focus-visible { outline: none; box-shadow: var(--ring-focus); }

.db-page { font-size: var(--text-sm); }
.db-page .admin-page-head h1 { font-size: var(--text-h2); }
.db-page .kpi-card__value { font-size: 24px; }
.db-page .s-card__title { font-size: var(--text-h4); }
.db-page .s-card__body { padding: var(--s4); }
.db-page .s-table th { height: 40px; padding: 0 var(--s4-5); font-size: var(--text-xs); }
.db-page .s-table td { height: auto; padding: var(--s3) var(--s4-5); font-size: var(--text-sm); }
.db-page .s-table th.admin-table__row-head { height: 40px; font-size: 12px; }
.db-page .s-empty { padding: var(--s6) var(--s4); }
.db-page .s-empty h3 { font-size: var(--text-h4); }
.db-page .s-empty p { font-size: 12px; }
.db-page .s-tabs a { min-height: 40px; font-size: 13px; }
.db-page .s-badge { font-size: 10px; }
.db-filter-row { display: flex; flex-wrap: wrap; gap: var(--s2); }
#db-performance-region[data-loading="true"] { opacity: .6; }

.roles-page { font-size: var(--text-sm); }
.roles-page .s-tabs a { min-height: 40px; font-size: 13px; }
.roles-page .s-table th { height: 40px; padding: 0 var(--s4); font-size: var(--text-xs); }
.roles-page .s-table td { height: auto; padding: var(--s3) var(--s4); font-size: var(--text-sm); }
.roles-page .s-table th.admin-table__row-head { height: 38px; font-size: 12px; }
.roles-page .admin-matrix__permission { padding: var(--s2-5) var(--s3-5); }
.roles-page .admin-matrix__cell { width: 92px; padding: var(--s1) var(--s1-5); }
.roles-page .admin-matrix__yes { width: 22px; height: 22px; }
.role-perms { margin-top: var(--s3); }
.role-perms__groups { display: flex; flex-direction: column; gap: var(--s2-5); }
.role-perms__group { padding: var(--s2-5) var(--s3); border: 1px solid var(--border); border-radius: var(--radius-md); background: var(--surface); }
.role-perms__group .s-card__label { margin: 0 0 var(--s1-5); }
.role-perms__grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(220px, 1fr)); column-gap: var(--s4); }
.s-check--compact { min-height: 36px; gap: var(--s2); font-size: 12px; }
.s-check--compact input { width: 16px; height: 16px; }
.role-editor__roles .s-check { min-height: 36px; gap: var(--s2); font-size: 12px; }
.c-modal.db-modal .c-modal__panel { width: min(980px, 100%); }
.c-modal.db-modal .c-modal__body { display: flex; flex-direction: column; gap: var(--s3); }

.chart-bars { display: flex; align-items: flex-end; gap: var(--s1); height: 200px; padding: var(--s4) var(--s1-5) 0; border-bottom: 1px solid var(--border); }
.chart-bars i { flex: 1; min-width: 3px; border-radius: 2px 2px 0 0; background: var(--navy-800); opacity: .75; }
.chart-bars i.is-current { background: var(--teal-600); opacity: 1; }
.chart-axis { display: flex; justify-content: space-between; padding: var(--s2) var(--s0) 0; color: var(--text-3); font: 500 10px/1.3 var(--font-mono); }

.health-list { display: flex; flex-direction: column; }
.health-row { display: grid; grid-template-columns: minmax(0, 1fr) auto; gap: var(--s3); align-items: center; padding: var(--s3-5) var(--s6); border-bottom: 1px solid var(--line-soft); }
.health-row:last-child { border-bottom: 0; }
.health-row__label { display: flex; align-items: center; gap: var(--s2); color: var(--ink-700); font-size: 13px; }
.health-row__dot { width: 6px; height: 6px; border-radius: 50%; background: var(--green-600); }
.health-row__meta { display: block; color: var(--text-3); font-size: 10px; margin-top: var(--s0); }
.health-row__value { color: var(--ink-900); font: 500 12px/1 var(--font-mono); text-align: right; }
.health-row__meter { grid-column: 1 / -1; height: 4px; border-radius: 999px; background: #E7EDF2; margin-top: var(--s0); overflow: hidden; }
.health-row__meter i { display: block; height: 100%; border-radius: 999px; background: var(--teal-600); }

.revenue-list { display: flex; flex-direction: column; gap: var(--s3-5); padding: var(--s6); }
.revenue-row { display: grid; grid-template-columns: 96px minmax(0, 1fr) 64px; align-items: center; gap: var(--s3); font-size: 12px; }
.revenue-row__label { color: var(--ink-700); }
.revenue-row__track { height: 8px; border-radius: 999px; background: #E7EDF2; overflow: hidden; }
.revenue-row__fill { display: block; height: 100%; border-radius: 999px; background: var(--teal-600); }
.revenue-row:nth-child(2) .revenue-row__fill { background: #4C6FA8; }
.revenue-row:nth-child(3) .revenue-row__fill { background: var(--gold-600); }
.revenue-row:nth-child(4) .revenue-row__fill { background: var(--burgundy-600); }
.revenue-row__value { text-align: right; color: var(--ink-900); font-family: var(--font-mono); font-size: 11px; }

.attention-list { display: flex; flex-direction: column; }
.attention-row { display: flex; align-items: center; gap: var(--s3); padding: var(--s4) var(--s6); border-bottom: 1px solid var(--line-soft); }
.attention-row:last-child { border-bottom: 0; }
.attention-row__count { display: grid; place-items: center; width: 30px; height: 30px; border-radius: var(--radius-sm); background: var(--amber-50); color: var(--amber-600); font: 600 12px/1 var(--font-mono); flex: none; }
.attention-row__count--red { background: var(--red-50); color: var(--red-600); }
.attention-row__title { color: var(--ink-900); font-size: 13px; font-weight: 500; }
.attention-row__meta { color: var(--text-3); font-size: 11px; margin-top: var(--s0); }
.attention-row__link { margin-left: auto; color: var(--teal-600); font-size: 11px; font-weight: 500; }

.admin-toolbar { display: flex; align-items: center; gap: var(--s2-5); flex-wrap: wrap; margin-bottom: var(--s4); }
.admin-toolbar__search { width: min(300px, 100%); }
.admin-toolbar__spacer { flex: 1 1 auto; }
.admin-chip-row { display: flex; gap: var(--s1-5); flex-wrap: wrap; }
.admin-chip {
    min-height: 32px; padding: 0 var(--s3); border: 1px solid var(--border);
    border-radius: var(--radius-full); background: var(--surface); color: var(--ink-700);
    font: 500 12px/1 var(--font-sans);
}
.admin-chip.is-active { border-color: var(--teal-600); background: var(--teal-50); color: var(--teal-700); }
.admin-table-person { display: flex; align-items: center; gap: var(--s2-5); }
.admin-table-person__name { color: var(--ink-900); font-weight: 500; }
.admin-table-person__email { display: block; color: var(--text-3); font-size: var(--text-xs); }

.code-pattern { color: var(--ink-700); font: 400 11px/1.4 var(--font-mono); }

/* Console mobile drawer */
.admin-drawer { position: fixed; inset: 0; z-index: var(--z-drawer); display: flex; }
.admin-drawer__scrim { position: absolute; inset: 0; background: rgba(16, 42, 67, .5); border: 0; }
.admin-drawer__panel { position: relative; width: min(290px, 86vw); height: 100%; background: var(--navy-900); box-shadow: var(--shadow-lg); overflow-y: auto; }

@media (max-width: 1280px) {
    .kpi-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
    .admin-span-8, .admin-span-4, .admin-span-5, .admin-span-7 { grid-column: span 12; }
}
@media (max-width: 1024px) {
    .admin { grid-template-columns: minmax(0, 1fr); }
    .admin-sidebar { display: none; }
    .admin-menu-btn { display: inline-flex; }
    .admin-crumbs { display: none; }
    .admin-topbar { padding: 0 var(--s4); }
    .admin-topbar__search { width: auto; flex: 1; }
    .admin-topbar__search span { display: none; }
    .admin-content { width: calc(100% - var(--s7)); padding-top: var(--s6); }
}
@media (max-width: 768px) {
    .kpi-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
    .admin-page-head { flex-direction: column; }
    .admin-page-head__actions { width: 100%; }
    .revenue-row { grid-template-columns: 84px minmax(0, 1fr) 54px; }
    .admin-toolbar__search { width: 100%; }
}
@media (max-width: 420px) {
    .kpi-card { padding: var(--s3) var(--s4); }
    .kpi-card__value { font-size: var(--text-h2); }
    .kpi-card__label { font-size: var(--text-xs); }
}

/* ---------------------------------------------------------
   Console v3 page composition, targets and responsive chrome
   --------------------------------------------------------- */
.u-scroll-lock { overflow: hidden; }

.admin-nav button.admin-nav__link { width: 100%; text-align: left; }
.admin-search { min-height: 40px; }
.admin-topbar__search { min-width: 0; min-height: 40px; }
.admin-topbar__search span { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.admin-chip { min-height: 44px; }
/* Rail links keep the 40px target on desktop; the mobile drawer relaxes to
   44px because it is a touch surface. */
.admin-drawer__panel .admin-nav__link,
.admin-drawer__panel .admin-nav__section-summary { min-height: 44px; }
.admin-chip { display: inline-flex; align-items: center; gap: var(--s1); }
.admin-content .s-btn:not(.s-btn--link),
.admin-topbar .s-btn:not(.s-btn--link) { min-height: 40px; }
.admin-content .s-btn.s-btn--sm { min-height: 32px; }
.admin-content .s-btn--link { display: inline-flex; align-items: center; min-height: 40px; padding: 0 var(--s1); }
.admin-topbar .s-btn--icon { width: 40px; }
.admin-content .s-input,
.admin-content .s-select { min-height: 40px; }
.admin-topbar .s-avatar { width: 40px; height: 40px; font-size: 13px; }
.admin-page-head .admin-live { margin-top: var(--s2); }

/* Compact status link in the topbar: reads as a control, not a stray label. */
.admin-topbar .admin-live--link {
    min-height: 34px; padding: 0 var(--s2-5);
    border: 1px solid var(--line-soft); border-radius: var(--radius-full);
    background: var(--surface-2);
}
.admin-topbar .admin-live--link:hover {
    border-color: var(--line-strong); background: var(--surface-3); color: var(--ink-900);
    text-decoration: none;
}

/* Console tabs: segmented control inside the working surface. Keeps the
   underline treatment for campus but gives dense console pages a calmer,
   more scannable switch. */
.admin-content .s-tabs {
    gap: var(--s1); width: max-content; max-width: 100%; padding: var(--s1);
    border: 1px solid var(--line-soft); border-radius: var(--radius-md);
    background: var(--surface-2);
}
.admin-content .s-tabs a {
    min-height: 34px; padding: 0 var(--s3-5); border: 0; border-radius: var(--radius-sm);
    color: var(--text-2); font: 500 var(--text-sm)/1 var(--font-sans);
}
.admin-content .s-tabs a:hover { background: var(--surface); color: var(--ink-900); }
.admin-content .s-tabs a[aria-current="page"],
.admin-content .s-tabs a.is-active {
    background: var(--surface); color: var(--teal-700);
    box-shadow: var(--shadow-xs); font-weight: 600;
}
.admin-content .s-tabs__count { margin-left: var(--s0); background: var(--surface-3); }
.admin-content .s-tabs a[aria-current="page"] .s-tabs__count { background: var(--teal-50); color: var(--teal-700); }
.admin-content .s-tabs.u-mb-4, .admin-content .s-tabs + .admin-section-head { margin-bottom: var(--s4); }

.s-card .s-table th { height: 44px; }
.s-card .s-table tbody tr:last-child td { border-bottom: 0; }
.admin-table-person { min-width: 0; }
.admin-table-person > span:last-child { min-width: 0; }
.admin-table-person__email { max-width: 22ch; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }

.admin-chart-card { display: flex; flex-direction: column; }
.admin-chart-card .s-card__body { display: flex; flex-direction: column; }
/* Definite height: percentage bar heights resolve against it. A flex-grown
   auto-height track collapsed every bar to zero. */
.admin-chart-card .chart-bars { flex: 0 0 auto; height: 200px; }
.admin-chart-card .chart-axis { flex: none; }

.admin-revenue-card { display: flex; flex-direction: column; }
.admin-revenue-card .revenue-list { flex: 1 1 auto; justify-content: space-between; }

.admin-disclosure { border-top: 1px solid var(--line-soft); }
.admin-disclosure > summary {
    display: flex; align-items: center; gap: var(--s2); min-height: 48px; padding: 0 var(--s6);
    color: var(--text-2); font: 600 12px/1.4 var(--font-sans); cursor: pointer; list-style: none;
}
.admin-disclosure > summary::-webkit-details-marker { display: none; }
.admin-disclosure > summary svg { color: var(--text-3); transition: transform var(--dur-1) linear; }
.admin-disclosure[open] > summary svg { transform: rotate(90deg); }
.admin-disclosure__meta {
    margin-left: auto; color: var(--text-3);
    font: 400 11px/1.4 var(--font-mono); font-variant-numeric: tabular-nums;
}
/* Disclosures already draw a top hairline; nested frames and insets would
   double it. */
.admin-disclosure .s-table-scroll { margin: 0; border: 0; border-top: 1px solid var(--line-soft); border-radius: 0; }

.admin-toolbar--card { padding: var(--s4-5) var(--s6) var(--s3-5); margin-bottom: 0; }
.admin-toolbar--card:has(.s-tabs) { border-bottom: 1px solid var(--line-soft); }
.admin-search-field {
    display: flex; align-items: center; gap: var(--s2);
    color: var(--text-3); font-size: 13px; text-align: left;
}
.admin-search-field svg { flex: none; color: var(--text-3); }
.admin-search-field span { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.admin-search-field .c-kbd { margin-left: auto; }

.attention-row__title,
.attention-row__meta { display: block; }

/* Auth split on the campus bundle carries the ridge login; the console loads
   the same split with the dark operational restyle for /login. */
.auth-aside .s-brand__mark { color: #fff; }

/* Staff sign-in page — the operational night (PO mockup 2026-11-06).
   The 48px grid is a 1px hairline pattern via an inline SVG data URI (the
   repo's zero-gradient gate forbids CSS gradients, not hairlines), easily
   readable via tokens: grid line --auth-grid-line on --auth-night. */
.sauth {
    display: flex;
    flex-direction: column;
    min-height: 100dvh;
    background: var(--auth-night);
    color: #FFF;
}

.sauth::before {
    content: "";
    position: absolute;
    inset: 0;
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='48' height='48' viewBox='0 0 48 48'%3E%3Cpath d='M48 0H0v48' fill='none' stroke='%2312273A' stroke-width='1'/%3E%3C/svg%3E");
    background-size: 48px 48px;
    pointer-events: none;
}

.sauth__bar,
.sauth__wrap,
.sauth__foot { position: relative; }

.sauth__bar {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: var(--s3);
    padding: var(--s5) var(--s7);
    color: #B8C6D4;
    font: 400 var(--text-meta)/1.4 var(--font-mono);
    letter-spacing: 0.12em;
}

.sauth__bar-state {
    display: inline-flex;
    align-items: center;
    gap: var(--s2);
    color: var(--auth-mint-strong);
    letter-spacing: 0.08em;
}

.sauth__bar-state--degraded { color: var(--auth-muted-dark); }

.sauth-chip__dot {
    width: 6px;
    height: 6px;
    border-radius: var(--radius-full);
    background: var(--auth-mint);
}

.sauth-chip__dot--mint { background: var(--auth-mint-strong); }
.sauth-chip__dot--amber { background: var(--auth-amber); }
.sauth-chip__dot--red { background: var(--auth-red); }

.sauth__wrap {
    display: flex;
    flex: 1 1 auto;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: var(--s5);
    max-width: 440px;
    width: 100%;
    margin: 0 auto;
    padding: var(--s6) var(--s5);
}

.sauth__brand {
    display: flex;
    align-items: center;
    gap: var(--s2-5);
    margin: 0;
    color: var(--text-inverse);
    font: 600 17px/1.3 var(--font-sans);
}

.sauth-card {
    width: 100%;
    padding: var(--auth-pad-card);
    border: 1px solid var(--auth-line-night);
    border-top: 3px solid var(--auth-mint);
    border-radius: var(--radius-xl);
    background: var(--auth-card-night);
    color: #FFF;
    box-shadow: 0 32px 64px rgba(0, 0, 0, 0.45);
}

.sauth-card__title {
    margin: 0;
    color: var(--text-inverse);
    font: 600 28px/1.2 var(--font-sans);
    letter-spacing: -0.01em;
}

.sauth-card__lead {
    margin: var(--s2) 0 var(--s6);
    color: var(--auth-muted-dark);
    font-size: var(--text-ui);
    line-height: 1.6;
}

.sauth-card__campus {
    color: var(--auth-mint);
    text-decoration: underline;
    text-underline-offset: 3px;
}

.sauth-card__campus:hover { color: var(--auth-mint-strong); }
.sauth-card__campus:focus-visible { outline: none; box-shadow: var(--ring-focus); }

.login-label { display: block; margin: 0 0 var(--s1-5); }

.login-label--dark {
    color: #CBD5E1;
    font-size: var(--text-ui);
    font-weight: 600;
}

.login-label--dark + .login-field__shell { margin-top: var(--s2); }

/* Dark inputs: 50px tall, 1.5px hairline, 12px radius, 16px type. */
.login-field__input--dark {
    border-color: var(--auth-line-night);
    background: var(--auth-night);
    color: var(--text-inverse);
}

.login-field__input--dark:hover { border-color: #3D5A79; }

.login-field__input--dark:focus {
    border-color: var(--auth-mint);
}

.login-field__input--dark::placeholder { color: #7E95AB; }

.login-field__shell--dark .login-field__toggle--dark { color: var(--auth-mint); }
.login-field__shell--dark .login-field__toggle--dark:hover { color: var(--auth-mint-strong); }

.login-btn--mint {
    background: var(--auth-mint);
    color: var(--auth-mint-ink);
    font-weight: 600;
}

.login-btn--mint:hover {
    background: var(--auth-mint-strong);
    text-decoration: none;
}

.login-btn--mint:focus-visible { outline: none; box-shadow: 0 0 0 2px var(--auth-night), 0 0 0 4px var(--auth-mint); }

.sauth-card__error {
    margin: 0;
    color: var(--auth-red);
    font-size: var(--text-sm);
}

/* The error banner on the dark card: the light .s-alert palette is unreadable
   on --auth-card-night, so the night variant reuses the same shape (icon +
   text, never colour alone) with the dark surfaces. */
.sauth-card .s-alert--danger {
    border-color: rgba(255, 123, 114, 0.45);
    background: rgba(255, 123, 114, 0.09);
    color: #FFD1CC;
}

.sauth-card .s-alert--danger svg { color: var(--auth-red); }
.sauth-card .s-alert--danger strong { color: #FFDDD9; }
.sauth-card .s-alert--danger p { color: #FFDDD9; }
.sauth-card .s-alert--danger { text-shadow: none; }

.sauth__chips {
    display: flex;
    align-items: center;
    flex-wrap: wrap;
    gap: var(--s3);
    margin: 0;
    padding: 0;
    list-style: none;
}

.sauth-chip {
    display: inline-flex;
    align-items: center;
    gap: var(--s2);
    color: var(--auth-muted-dark);
    font: 400 var(--text-meta)/1.4 var(--font-mono);
    letter-spacing: 0.1em;
}

.sauth-chip__label { color: #E4EBF4; }
.sauth-chip--on .sauth-chip__label { color: #E4EBF4; }
.sauth-chip__state { color: var(--auth-muted-dark); letter-spacing: 0.04em; }

.sauth__foot {
    margin-top: auto;
    padding: var(--s6) var(--s5);
    color: #7E95AB;
    text-align: center;
    font: 400 var(--text-meta)/1.5 var(--font-mono);
}

@media (max-width: 768px) {
    /* The top bar stacks and the card becomes the centered column. */
    .sauth__bar { flex-direction: column; align-items: flex-start; gap: var(--s1); padding: var(--s4) var(--s5); }
    .sauth__wrap { padding: var(--s5) var(--auth-slide-pad) var(--s7); }
    .sauth__chips { justify-content: center; row-gap: var(--s1-5); }
}

/* Toasts raised by ui.js for data-coming-soon feedback. */
#toast-root {
    position: fixed; right: var(--s5); bottom: max(var(--s5), env(safe-area-inset-bottom, 0px)); z-index: var(--z-toast);
    display: flex; flex-direction: column; gap: var(--s2-5);
    width: min(380px, calc(100vw - var(--s7))); pointer-events: none;
}
#toast-root > * { pointer-events: auto; }
.c-toast {
    display: flex; align-items: flex-start; gap: var(--s3); padding: var(--s3) var(--s3-5);
    border: 1px solid var(--border); border-left: 3px solid var(--teal-600);
    border-radius: var(--radius-md); background: var(--surface);
    box-shadow: var(--shadow-md); color: var(--ink-900);
    animation: cp-toast-in var(--dur-2) var(--ease-out);
}
.c-toast--success { border-left-color: var(--green-600); }
.c-toast--warning { border-left-color: var(--amber-600); }
.c-toast--danger { border-left-color: var(--red-600); }
.c-toast--info { border-left-color: var(--teal-600); }
.c-toast__content { flex: 1 1 auto; min-width: 0; }
.c-toast__title { display: block; color: var(--ink-900); font: 600 var(--text-sm)/1.4 var(--font-sans); }
.c-toast__body { max-width: none; margin: var(--s0) 0 0; color: var(--text-2); font-size: var(--text-sm); line-height: 1.45; }
.c-toast__close {
    display: grid; place-content: center; flex: none; width: 28px; height: 28px;
    margin: calc(var(--s1) * -1) calc(var(--s1) * -1) 0 0; border-radius: var(--radius-sm); color: var(--text-3);
}
.c-toast__close:hover { background: var(--surface-2); color: var(--ink-900); }
.c-toast .c-icon-16 { width: 16px; height: 16px; }
@keyframes cp-toast-in { from { opacity: 0; transform: translateY(4px); } to { opacity: 1; transform: none; } }
@media (prefers-reduced-motion: reduce) { .c-toast { animation: none; } }

.admin-drawer__head { display: flex; align-items: center; justify-content: space-between; gap: var(--s3); padding: var(--s4-5) var(--s4) var(--s3); }
.admin-drawer__panel .s-brand__mark { color: #fff; }
.admin-drawer__panel .admin-nav { padding: 0 var(--s3-5); }
.admin-drawer__panel .admin-user { margin: var(--s3) var(--s3-5) 0; }
.admin-drawer__close { color: #C9D6E1; }
.admin-drawer__close:hover { background: rgba(255,255,255,.08); color: #fff; }

@media (max-width: 1024px) {
    .admin-drawer__panel .admin-nav__link { padding-left: var(--s3); }
}

@media (max-width: 768px) {
    .admin-topbar { gap: var(--s2); }
    .admin-topbar__actions { gap: var(--s1); flex: none; }
    /* Search becomes a 44px icon button: the field cannot shrink below its
       own content without colliding with the actions. */
    .admin-topbar__search {
        flex: none;
        width: var(--target-touch);
        min-height: var(--target-touch);
        padding: 0;
        justify-content: center;
        border-color: transparent;
        background: transparent;
    }
    .admin-topbar__search kbd,
    .admin-topbar .c-kbd { display: none; }
    .admin-topbar__title { flex: 1 1 auto; }
    .admin-create__label,
    .admin-topbar .admin-live__text { display: none; }
    /* Icon-only status control: never leave an empty padded pill. */
    .admin-topbar .admin-live--link {
        width: var(--target-touch); min-height: var(--target-touch); padding: 0;
        justify-content: center; border-radius: var(--radius-md);
        border-color: transparent; background: transparent;
    }
    .admin-topbar .admin-live--link:hover { background: var(--surface-2); }
    .admin-topbar .admin-live--link .admin-live__dot { width: var(--s2); height: var(--s2); }
    .admin-page-head__actions { flex-wrap: wrap; }
    .admin-page-head__actions .s-btn { flex: 1 1 auto; }
    .admin-toolbar--card { padding: var(--s3-5) var(--s4) var(--s2-5); }
    .admin-disclosure__meta { display: none; }
    .admin-disclosure > summary { padding: 0 var(--s4); }
    .admin-table-person__email { max-width: 22ch; }

    .admin-table--stack { display: block; }
    .admin-table--stack thead {
        position: absolute; width: 1px; height: 1px; overflow: hidden;
        clip: rect(0 0 0 0); white-space: nowrap; border: 0;
    }
    .admin-table--stack tbody,
    .admin-table--stack tr,
    .admin-table--stack td { display: block; width: 100%; }
    .admin-table--stack tr { padding: var(--s4) var(--s5); border-bottom: 1px solid var(--line-soft); }
    .admin-table--stack tr:last-child { border-bottom: 0; }
    .admin-table--stack tr:hover { background: transparent; }
    .admin-table--stack td { height: auto; padding: 0; border-bottom: 0; overflow-wrap: anywhere; }
    .admin-table--stack td + td { margin-top: var(--s2-5); }
    .admin-table--stack td[data-label]::before {
        content: attr(data-label); display: block; margin-bottom: var(--s0);
        color: var(--text-3); font: 600 10px/1.4 var(--font-sans);
        letter-spacing: .06em; text-transform: uppercase;
    }
    .admin-table--stack td.num { text-align: left; }
    .admin-table--stack .admin-table-person__email { max-width: none; }
}

/* ---------------------------------------------------------
   Console v3 page composition: roster, roles, audit, system
   --------------------------------------------------------- */
.admin-live--link { text-decoration: none; }
.admin-live--link:hover { color: var(--ink-900); text-decoration: none; }
.admin-live__dot--neutral { background: var(--ink-400); }
.health-row__dot--red { background: var(--red-600); }
.health-row__dot--amber { background: var(--amber-600); }
.attention-row__count--clear { background: var(--green-50); color: var(--green-600); }

a.admin-table-person__name { display: inline-flex; align-items: center; min-height: 44px; color: var(--ink-900); }
a.admin-table-person__name:hover { color: var(--teal-700); text-decoration: underline; text-underline-offset: 3px; }

.admin-pager { display: flex; align-items: center; gap: var(--s2); flex-wrap: wrap; }
.admin-filter-form { display: flex; align-items: flex-end; gap: var(--s2-5); flex-wrap: wrap; flex: 1 1 auto; }
.admin-filter-form .s-field { flex: 0 1 200px; min-width: 150px; }
.admin-filter-form .s-input { min-width: 0; }
.admin-filter-form > .s-btn { align-self: flex-end; }

.admin-section-head { display: flex; align-items: flex-end; justify-content: space-between; gap: var(--s4); margin-bottom: var(--s4-5); }
.admin-section-head h2 { margin: 0; }

.admin-progress-cell { display: flex; flex-direction: column; gap: var(--s1-5); min-width: 110px; }
.admin-progress-cell .s-progress { width: 110px; }
.admin-cell-note { display: -webkit-box; -webkit-line-clamp: 3; -webkit-box-orient: vertical; overflow: hidden; max-width: 34ch; color: var(--text-2); font-size: 12px; }

.admin-profile__body { display: flex; align-items: center; gap: var(--s4-5); padding: var(--s5-5) var(--s5); }
.admin-profile__identity { min-width: 0; }
.admin-profile__name { margin: 0; color: var(--ink-900); font: 600 24px/1.25 var(--font-display); }
.admin-profile__email { margin: var(--s0) 0 0; color: var(--text-3); font-size: 12px; }
.admin-profile__stats {
    display: grid; grid-template-columns: repeat(4, minmax(0, 1fr));
    border-top: 1px solid var(--border);
}
.admin-profile__stat {
    display: flex; flex-direction: column; gap: var(--s1);
    min-width: 0; padding: var(--s3-5) var(--s5); border-right: 1px solid var(--border);
}
.admin-profile__stat:last-child { border-right: 0; }
.admin-profile__stat-value { color: var(--ink-900); font-size: 13px; font-weight: 500; }
.admin-profile__stats--flush {
    margin-top: var(--s5); border: 1px solid var(--border);
    border-radius: var(--radius-md); overflow: hidden;
}
.admin-profile__stats--flush .admin-profile__stat { padding: var(--s3) var(--s4); }

.admin-progress-summary { display: flex; flex-direction: column; gap: var(--s2); }
.admin-progress-summary__head { display: flex; align-items: center; justify-content: space-between; gap: var(--s3); color: var(--text-2); font-size: 12px; }

.admin-pill-list { display: inline-flex; align-items: center; gap: var(--s1); flex-wrap: wrap; }

.admin-role-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: var(--gap-grid); align-items: start; }
.admin-role-card { display: flex; flex-direction: column; }
.admin-role-card .s-card__head { align-items: flex-start; }
.admin-role-card .s-card__title { font-family: var(--font-display); font-size: 19px; }
.admin-role-card__name { display: block; margin-top: var(--s1); color: var(--text-3); font-size: 11px; }
.admin-role-card__stats { display: flex; flex-wrap: wrap; gap: var(--s3-5); color: var(--text-3); font-size: 12px; }
.admin-role-card__stats strong { color: var(--ink-900); font-family: var(--font-mono); font-weight: 500; }
.admin-role-card__permissions { margin-top: var(--s3); font-size: 12px; line-height: 1.5; }
.admin-role-card__permissions .u-mono { white-space: nowrap; }

.admin-matrix th { text-align: left; }
.admin-matrix th.admin-matrix__role { text-align: center; white-space: nowrap; }
.admin-matrix__group th {
    height: 36px; padding: 0 var(--s4); background: var(--canvas); color: var(--ink-700);
    font: 600 11px/1.4 var(--font-sans); letter-spacing: .08em; text-transform: uppercase;
    border-bottom: 1px solid var(--line-soft);
}
.admin-matrix__permission {
    height: auto; padding: var(--s2-5) var(--s4); background: var(--surface);
    color: var(--ink-900); font: 500 12.5px/1.45 var(--font-sans);
    letter-spacing: 0; text-transform: none; white-space: normal;
}
.admin-matrix tbody tr:hover .admin-matrix__permission { background: var(--surface-2); }
.admin-matrix__cell { width: 108px; text-align: center; }
.admin-matrix__yes {
    display: inline-grid; place-content: center; width: 24px; height: 24px;
    border-radius: 50%; background: var(--green-50); color: var(--green-600);
}
.admin-matrix__no { color: var(--ink-400); font-family: var(--font-mono); }

.admin-health-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(300px, 1fr)); gap: var(--gap-grid); align-items: start; }
/* When the grid lives inside an outer card (health page), inset it so the
   tiles never touch the outer border (PO, 2026-10-27). */
.s-card > .admin-health-grid { padding: var(--s0) var(--pad-card-head-x) var(--s6); }
.admin-status-card__detail { display: block; margin-top: var(--s0); color: var(--text-3); font-size: 11px; }
.admin-metric-list { display: flex; flex-direction: column; }
.admin-metric-list__row { display: flex; align-items: center; justify-content: space-between; gap: var(--s3); padding: var(--s3) 0; border-bottom: 1px solid var(--border); font-size: 12.5px; }
.admin-metric-list__row:last-child { border-bottom: 0; padding-bottom: 0; }
.admin-metric-list dt { color: var(--text-3); }
.admin-metric-list dd { margin: 0; color: var(--ink-900); }

.s-table th.admin-table__row-head {
    height: 52px; background: var(--surface); color: var(--ink-700);
    font: 500 13px/1.4 var(--font-sans); letter-spacing: 0; text-transform: none;
    white-space: normal;
}

.admin-props summary {
    display: inline-flex; align-items: center; min-height: 32px;
    color: var(--teal-700); font: 600 12px/1.4 var(--font-sans); cursor: pointer;
}
.admin-props summary:hover { text-decoration: underline; text-underline-offset: 3px; }
.admin-props__list { display: flex; flex-direction: column; gap: var(--s1-5); margin-top: var(--s2); min-width: 220px; max-width: 420px; }
.admin-props__row { display: grid; grid-template-columns: minmax(90px, auto) minmax(0, 1fr); gap: var(--s2-5); }
.admin-props__row dt { color: var(--text-3); font-size: 11px; }
.admin-props__row dd { margin: 0; min-width: 0; color: var(--ink-700); font-size: 11px; overflow-wrap: anywhere; }
.admin-props__row code { font-family: var(--font-mono); font-size: 11px; color: var(--ink-900); }
/* Collapsed technical reference under a job's failure card. */
.admin-props__detail {
    margin: var(--s2) 0 0;
    padding: var(--s3);
    max-height: 320px;
    overflow: auto;
    border: 1px solid var(--border);
    border-radius: var(--radius-md);
    background: var(--surface-2);
    color: var(--ink-700);
    font-size: var(--text-xs);
    line-height: 1.55;
    white-space: pre-wrap;
    overflow-wrap: anywhere;
}

.admin-settings-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: var(--s4); align-items: start; }
/* An odd last card spans the row so the grid never leaves a void under a tall neighbour. */
.admin-settings-grid > :last-child:nth-child(odd) { grid-column: 1 / -1; }
.admin-settings-grid > form { min-width: 0; }
.settings-page .admin-page-head__sub { font-size: var(--text-sm); }
.settings-page .s-input,
.settings-page .s-select,
.settings-page .s-textarea { font-size: var(--text-sm); }
.settings-page .s-textarea { min-height: var(--s10); }
.settings-page .s-check { font-size: var(--text-sm); }
.admin-settings-save { display: grid; grid-template-columns: minmax(0, 1fr) auto; gap: var(--s4); align-items: end; }
.admin-settings-save .s-form-actions { margin: 0; }
@media (max-width: 768px) {
    .admin-settings-save { grid-template-columns: minmax(0, 1fr); }
    .admin-settings-save .s-form-actions { justify-content: stretch; }
    .admin-settings-save .s-form-actions .s-btn { flex: 1 1 auto; }
}

.s-empty h2 { color: var(--ink-900); font: 600 var(--text-h3)/1.3 var(--font-sans); }
.s-empty .s-btn { margin-top: var(--s2); }

@media (max-width: 1280px) {
    .admin-role-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
    .admin-profile__stats { grid-template-columns: repeat(2, minmax(0, 1fr)); }
    .admin-profile__stat:nth-child(2) { border-right: 0; }
    .admin-profile__stat:nth-child(-n+2) { border-bottom: 1px solid var(--border); }
}
@media (max-width: 768px) {
    .admin-role-grid, .admin-health-grid, .admin-settings-grid { grid-template-columns: minmax(0, 1fr); }
    .admin-profile__body { flex-direction: column; align-items: flex-start; }
    .admin-profile__stats { grid-template-columns: minmax(0, 1fr); }
    .admin-profile__stat { border-right: 0; border-bottom: 1px solid var(--border); }
    .admin-profile__stat:last-child { border-bottom: 0; }
    .admin-profile__stat:nth-child(2) { border-right: 0; }
    .admin-filter-form { width: 100%; }
    .admin-filter-form .s-field { flex: 1 1 100%; }
    .admin-filter-form .s-btn { width: 100%; }
    .admin-pager { width: 100%; }
    .admin-pager .s-btn { flex: 1 1 0; }
    .admin-props__row { grid-template-columns: minmax(0, 1fr); gap: var(--s0); }
    .admin-cell-note { max-width: none; }
}
.admin-chart-canvas { position: relative; display: flex; flex: 1 1 auto; flex-direction: column; min-height: 200px; }
.admin-chart-empty {
    position: absolute; inset: 0 0 34px; display: flex; flex-direction: column;
    align-items: center; justify-content: center; gap: var(--s0); margin: 0;
    color: var(--text-3); font-size: 13px; text-align: center;
}
.admin-chart-empty span { font-size: 11px; }
.health-row__dot--neutral { background: var(--ink-400); }
.admin-scroll-hint { display: none; margin: 0 0 var(--s2); padding-inline: var(--pad-card-head-x); color: var(--text-3); font-size: 11px; }
@media (max-width: 768px) {
    .admin-scroll-hint { display: block; }
}
/* Row / card action panel (design/00 §11, PO 2026-10-29).
   The panel is a fixed bottom sheet: it never reflows the table it was opened
   from and is never clipped by that table's scroll container. The native
   <details> toggle is the whole behaviour without JavaScript; ui.js adds
   Esc-to-close, outside-click close and single-open. */
.role-editor { position: static; display: inline-flex; }
.role-editor summary { display: inline-flex; list-style: none; cursor: pointer; }
.role-editor summary::-webkit-details-marker { display: none; }
.role-editor__form {
    position: fixed;
    left: var(--s4);
    right: var(--s4);
    bottom: max(var(--s4), env(safe-area-inset-bottom, 0px));
    z-index: var(--z-drawer);
    width: auto;
    max-width: 640px;
    margin-inline: auto;
    max-height: min(70dvh, 40rem);
    overflow-y: auto;
    overscroll-behavior: contain;
    padding: var(--s4);
    border: 1px solid var(--border);
    border-radius: var(--radius-lg);
    background: var(--surface);
    box-shadow: var(--shadow-lg);
    display: flex;
    flex-direction: column;
    gap: var(--s3);
    text-align: left;
}
.role-editor__roles { display: flex; flex-direction: column; gap: var(--s0); }
.role-editor[open] summary { border-color: var(--teal-600); color: var(--teal-700); }
.admin-stack { display: flex; flex-direction: column; gap: var(--s5); }

.admin-user__logout { padding: var(--s1) var(--s4) var(--s4-5); }
.admin-user__logout .s-btn { width: 100%; justify-content: flex-start; }

.role-editor__roles--scroll { max-height: 240px; overflow-y: auto; }

/* Command palette (design/00 section 9.23, console scope).
   Review pass (PO, 2026-10-27): roomier spacing, row icons, selected state,
   kbd chips in the footer, hidden results scrollbar. */

/* Self-contained palette layout: panel at 12dvh, w 640; results flex the
   remainder and scroll internally. */
.c-modal.palette { place-items: start center; padding-top: 12dvh; }
.c-modal.palette .c-modal__panel { display: flex; flex-direction: column; width: min(640px, 100%); max-height: 72dvh; overflow: hidden; border-radius: 12px; box-shadow: var(--shadow-lg); }

.palette__panel { display: flex; flex-direction: column; min-height: 220px; }
.palette__input-row { display: flex; align-items: center; gap: var(--s3-5); flex-shrink: 0; padding: var(--s5) var(--s6); border-bottom: 1px solid var(--border); color: var(--text-3); }
.palette__input-row svg { flex-shrink: 0; width: 20px; height: 20px; color: var(--text-3); }
.palette__input { flex: 1; min-width: 0; min-height: 30px; border: 0; background: transparent; color: var(--ink-900); font: 400 18px/1.4 var(--font-sans); outline: none; box-shadow: none; appearance: none; -webkit-appearance: none; }
.palette__input::placeholder { color: var(--ink-400); }
.palette__input:focus, .palette__input:focus-visible { outline: none; box-shadow: none; }
/* The row's teal underline is the focus indicator for this input. */
.palette__input-row:focus-within { box-shadow: inset 0 -2px 0 0 var(--teal-600); }
.palette__input-row:focus-within svg { color: var(--teal-600); }

.palette__results { flex: 1 1 auto; min-height: 110px; max-height: 460px; margin: 0; padding: var(--s2) var(--s2) var(--s3); list-style: none; overflow-y: auto; overscroll-behavior: contain; scrollbar-width: none; -ms-overflow-style: none; }
.palette__results::-webkit-scrollbar { width: 0; height: 0; display: none; }

.palette__group { padding: var(--s3) var(--s3-5) var(--s1-5); color: var(--text-3); font: 600 11px/1.4 var(--font-sans); letter-spacing: .1em; text-transform: uppercase; }

.palette__row { display: flex; align-items: center; gap: var(--s3); min-height: 46px; margin: var(--s0) var(--s1-5); padding: 0 var(--s3); border-radius: 8px; cursor: pointer; }
.palette__row:hover { background: var(--surface-2); }
.palette__row[aria-selected="true"] { background: var(--teal-50); box-shadow: inset 2px 0 0 0 var(--teal-600); }
.palette__row[aria-selected="true"] .palette__label { color: var(--ink-900); font-weight: 600; }
.palette__row[aria-selected="true"] .palette__icon { color: var(--teal-700); }

.palette__icon { display: inline-flex; align-items: center; justify-content: center; width: 20px; flex-shrink: 0; color: var(--text-3); }
.palette__label { flex: 1; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; font-size: var(--text-sm); color: var(--ink-900); }
.palette__mark { background: var(--teal-100, #CDE7E4); color: inherit; border-radius: 3px; padding: 0 1px; }
.palette__hint { color: var(--text-3); font-size: 12px; font-family: var(--font-mono); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; max-width: 40%; }

.palette__empty { padding: var(--s7) var(--s6); color: var(--text-3); font-size: var(--text-sm); text-align: center; }

.palette__footer { flex-shrink: 0; width: 100%; box-sizing: border-box; margin: 0; padding: var(--s3) var(--s5-5); border-top: 1px solid var(--border); background: var(--surface-2, #F5F7F9); color: var(--text-3); font-size: 11px; display: flex; align-items: center; gap: var(--s3-5); }
.palette__footer kbd { display: inline-block; margin: 0 var(--s1) 0 var(--s0); padding: var(--s0) var(--s1-5); border: 1px solid var(--border); border-bottom-width: 2px; border-radius: 5px; background: var(--surface); color: var(--ink-700); font: 500 10px/1.4 var(--font-mono); }
.palette__footer .palette__foot-right { margin-left: auto; }
a.admin-search, a.admin-topbar__search { text-decoration: none; }
a.admin-search:hover, a.admin-topbar__search:hover { text-decoration: none; }

/* Skeleton rows: console pages do not load components.css, so the loading
   state is styled here. `skeleton-pulse` is the sole named loop (design 05
   section 6.2); disabled under prefers-reduced-motion. */
.palette__row--skeleton { pointer-events: none; }
.palette__skeleton-bar { display: block; width: 60%; height: 12px; border-radius: var(--radius-sm); background: var(--surface-2); animation: skeleton-pulse 1.5s ease-in-out infinite; }
@keyframes skeleton-pulse {
    0%, 100% { opacity: 1; }
    50% { opacity: .55; }
}
@media (prefers-reduced-motion: reduce) {
    .palette__skeleton-bar { animation: none; opacity: .55; }
}

/* Certificate console: compact actions cell + preview modal */
.cert-preview__frame { flex: 1 1 auto; min-height: 0; }
.cert-preview__frame iframe { width: 100%; height: 100%; border: 0; }
/* Double-class selector outranks forms.css's later .c-modal__panel width,
   so the certificate preview stays document-wide and the page is legible. */
.c-modal__panel.cert-preview__panel { width: min(1240px, 96vw); height: 92dvh; }
.c-modal__panel.cert-preview__panel .c-modal__head { flex: none; }

/* Certificate row selection + floating action window (CSS :has(), no JS).
   The window is filtered server-side by permission and certificate state. */
.cert-select-cell { position: relative; }
.cert-select { display: inline-flex; align-items: center; justify-content: center; min-height: 44px; }
.cert-select__input {
    appearance: none; display: grid; place-content: center; flex: none;
    width: 18px; height: 18px; cursor: pointer;
    border: 1px solid var(--border-strong); border-radius: 4px; background: var(--surface);
    transition: border-color var(--dur-1) linear, background-color var(--dur-1) linear;
}
.cert-select__input:hover { border-color: var(--teal-600); }
.cert-select__input:checked { border-color: var(--teal-600); background: var(--teal-600); }
.cert-select__input:checked::before {
    content: ""; width: 10px; height: 10px;
    background: no-repeat center/contain url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='white' stroke-width='4' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M20 6 9 17l-5-5'/%3E%3C/svg%3E");
}
.cert-select__input:focus-visible { box-shadow: var(--ring-focus); }

tr:has(.cert-select__input:checked) td { background: var(--teal-50); }
tr:has(.cert-select__input:checked):hover td { background: var(--teal-50); }

/* Snapshot meta list */
.staff-meta-list { display: flex; flex-direction: column; }
.staff-meta-list > div {
    display: flex; align-items: center; justify-content: space-between; gap: var(--s3);
    padding: var(--s2-5) 0; border-bottom: 1px solid var(--border); font-size: 13px;
}
.staff-meta-list > div:last-child { border-bottom: 0; }
.staff-meta-list dt { color: var(--text-3); }
.staff-meta-list dd { margin: 0; color: var(--ink-900); }

@media (max-width: 768px) {
    .staff-head { flex-direction: column; align-items: flex-start; }
    .staff-head__actions { width: 100%; }
    .staff-role-list { grid-template-columns: minmax(0, 1fr); }
}

/* Danger zone: spaced, full-width delete action + password confirmation */
.staff-danger__button { margin-top: var(--s4); width: 100%; }
.staff-danger__error { margin: 0 0 var(--s2); }

/* ---------------------------------------------------------
   Billing page: key/value lists and form spacing
   --------------------------------------------------------- */
.billing-transition .s-btn,
.billing-domain .s-btn,
.billing-plan .s-btn { margin-top: var(--s4); }
.billing-domain .s-btn { width: 100%; }

/* ---------------------------------------------------------
   Certificates: outside-the-table action panels + fixed dock
   Panels are filtered server-side by permission and state.
   --------------------------------------------------------- */
/* JavaScript fallback only: when cert-actions.js takes over, the native
   disclosure list below the table is retired in favour of the dock. */
.cert-actions-list[data-cert-js="true"] { display: none; }

/* No-JS / shared panel chrome */
.cert-actions-entry { border-bottom: 1px solid var(--border); }
.cert-actions-entry:last-child { border-bottom: 0; }
.cert-actions-entry > summary {
    display: flex; align-items: center; gap: var(--s2-5); min-height: 48px;
    cursor: pointer; list-style: none;
}
.cert-actions-entry > summary::-webkit-details-marker { display: none; }
.cert-actions-entry__serial { color: var(--text-3); font-size: 12px; }
.cert-actions-entry__chevron { margin-left: auto; color: var(--text-3); transition: transform var(--dur-1) linear; }
.cert-actions-entry[open] > summary .cert-actions-entry__chevron { transform: rotate(180deg); }
.cert-actions-entry > summary:hover .s-table__strong { text-decoration: underline; text-underline-offset: 3px; }
.cert-actions-list__body { padding: var(--s1) var(--s6) var(--s5); }

/* The panel card: used inline (no-JS) and inside the dock (JS) */
.cert-flyout {
    display: flex; flex-direction: column; gap: var(--s1-5);
    width: min(320px, 100%); padding: var(--s3-5); margin-top: var(--s2);
    border: 1px solid var(--border); border-radius: var(--radius-lg);
    background: var(--surface); box-shadow: var(--shadow-md);
    text-align: left;
}
.cert-flyout--inline { width: 100%; }
.cert-flyout__head {
    display: flex; align-items: center; justify-content: space-between; gap: var(--s2-5);
    padding-bottom: var(--s2-5); margin-bottom: var(--s0); border-bottom: 1px solid var(--border);
}
.cert-flyout__title { color: var(--text-3); font: 600 11px/1.4 var(--font-sans); letter-spacing: .08em; text-transform: uppercase; }
.cert-flyout__serial { color: var(--ink-700); font-size: 11px; white-space: nowrap; }
.cert-flyout .s-btn { justify-content: center; }
.cert-flyout__form > summary {
    display: inline-flex; align-items: center; justify-content: center;
    min-height: 32px; list-style: none; cursor: pointer; width: 100%;
}
.cert-flyout__form > summary::-webkit-details-marker { display: none; }
.cert-flyout__form[open] > summary { background: var(--surface-2); border-color: var(--teal-600); color: var(--teal-700); }
.cert-flyout__form form { display: flex; flex-direction: column; gap: var(--s2-5); padding: var(--s2-5) 0 var(--s0); }

/* Card head: badge sits on the title's baseline row, not floating high. */
.cert-head__row { display: flex; align-items: center; gap: var(--s3); flex-wrap: wrap; }

/* Serial cell: masked fragment keeps its mono face, with copy + tooltip. */
.cert-serial { white-space: nowrap; }
.cert-serial__value { white-space: nowrap; }
.cert-serial .s-btn--ghost { color: var(--text-3); vertical-align: middle; }
.cert-serial .s-btn--ghost:hover { color: var(--ink-900); }

/* Score cell: score value + derived Distinction badge live together.
   Keep the <td> as a real table cell on desktop; only the stacked mobile
   card turns these cells into flex rows (see the <=760 block). */
.cert-score { white-space: nowrap; }
.cert-score > * { vertical-align: middle; }
.cert-score .s-badge { margin-left: var(--s1); }

/* Selection hint: visible on all breakpoints, WCAG-safe color; hidden by
   cert-actions.js once the user has selected a certificate once. */
.admin-scroll-hint.cert-table-hint { display: block; color: var(--text-2); }
.admin-scroll-hint.cert-table-hint[hidden] { display: none; }


/* Mobile: the stacked table turns each certificate into a legible card
   with an 8pt rhythm - holder band, then paired metadata columns:
   Course|Unit, Score|Issued, Serial|Status. */
@media (max-width: 768px) {
    .admin-table--stack tr[data-certificate-id] {
        display: flex; flex-wrap: wrap; align-items: center;
        gap: var(--s2-5) var(--s3); padding: var(--s3-5) var(--s4);
    }
    /* width:100% from the stacked-table base must go, or every cell wraps
       to its own line and detaches the checkbox from the holder band. */
    .admin-table--stack tr[data-certificate-id] > td {
        order: 5; flex: 1 1 calc(50% - 6px);
        max-width: calc(50% - 6px); width: auto; padding: 0;
        font-size: 13px; line-height: 1.4;
    }
    .admin-table--stack tr[data-certificate-id] > td[data-label] { margin: 0; }
    /* First band: tap target + holder identity share one line. */
    .admin-table--stack tr[data-certificate-id] > td.cert-select-cell {
        order: 0; flex: 0 0 40px; max-width: none; align-self: center;
        padding: 0; min-height: 44px;
    }
    .admin-table--stack tr[data-certificate-id] > td.cert-select-cell[data-label]::before { content: none; }
    .admin-table--stack tr[data-certificate-id] > td:nth-child(2) {
        order: 1; flex: 1 1 auto; max-width: none; min-width: 0;
    }
    /* Metadata pairing: Course|Unit, Score|Issued, Serial|Status. */
    .admin-table--stack tr[data-certificate-id] > td[data-label="Course"] { order: 10; }
    .admin-table--stack tr[data-certificate-id] > td[data-label="Unit"] { order: 11; }
    .admin-table--stack tr[data-certificate-id] > td[data-label="Score"] { order: 12; }
    .admin-table--stack tr[data-certificate-id] > td[data-label="Issued"] { order: 13; }
    .admin-table--stack tr[data-certificate-id] > td[data-label="Serial"] { order: 14; }
    .admin-table--stack tr[data-certificate-id] > td[data-label="Status"] { order: 15; }
    .cert-select { min-height: 44px; min-width: 44px; }
    .admin-table--stack tr[data-certificate-id] .s-table__strong {
        display: block; font-size: 14px; line-height: 1.35;
    }
    .admin-table--stack tr[data-certificate-id] .s-table__sub {
        display: block; margin-top: 1px; white-space: normal; font-size: 12px;
    }
    .admin-table--stack tr[data-certificate-id] td[data-label]::before {
        margin-bottom: 1px;
    }
    /* Selected card: tint plus a visible border ring beyond the checkbox. */
    .admin-table--stack tr[data-certificate-id]:has(.cert-select__input:checked) {
        box-shadow: inset 0 0 0 1px var(--teal-600);
    }
    .admin-table--stack tr[data-certificate-id] td[data-label="Score"],
    .admin-table--stack tr[data-certificate-id] td[data-label="Serial"] {
        display: flex; align-items: center; flex-wrap: wrap; gap: var(--s1-5);
    }
    .admin-table--stack tr[data-certificate-id] td[data-label="Score"] .s-table__strong {
        font-size: 14px;
    }
}

/* Share kit */
.share-qr-frame { display: grid; place-items: center; padding: var(--s5); border: 1px solid var(--line-soft); border-radius: var(--radius-lg); background: var(--surface-2); }
.share-qr-frame svg { width: min(260px, 100%); height: auto; }
.share-embed-code { margin: 0; padding: var(--s4); overflow-x: auto; border: 1px solid var(--line-soft); border-radius: var(--radius-md); background: var(--surface-2); color: var(--ink-700); font: 400 12px/1.6 var(--font-mono); white-space: pre-wrap; overflow-wrap: anywhere; }
.u-inline { display: inline-flex; align-items: center; gap: var(--s2); flex-wrap: wrap; }

/* ---------------------------------------------------------
   Console log reader (errors, files, retention)
   --------------------------------------------------------- */
/* Filter bands live inside the card body, so they take the card gutter instead
   of hugging the card border. Matches the head and the table frame. */
.log-filters { padding: var(--s4-5) var(--pad-card-head-x) var(--s2); }
@media (max-width: 768px) {
    .log-filters { padding-left: var(--s4); padding-right: var(--s4); }
}

/* Error log: dense but never cramped (PO 2026-10-30: 12-16px vertical,
   16px horizontal, 14px body). The card gutter carries the outer spacing. */
.logs-table th { height: 40px; padding: 0 var(--s4); font-size: var(--text-xs); }
.logs-table td { padding: var(--s3) var(--s4); font-size: var(--text-sm); line-height: 1.5; }
.logs-table td:first-child, .logs-table th:first-child { padding-left: var(--s4); }
.logs-table td:last-child, .logs-table th:last-child { padding-right: var(--s4); }
.log-nowrap { white-space: nowrap; }
.log-message { max-width: 36ch; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.log-entries { display: flex; flex-direction: column; }
.log-entry { border-top: 1px solid var(--line-soft); }
.log-entry summary {
    display: flex; align-items: center; gap: var(--s2-5); padding: var(--s2) var(--s5);
    cursor: pointer; list-style: none; color: var(--ink-700); font-size: var(--text-xs);
}
.log-entry summary::-webkit-details-marker { display: none; }
.log-entry summary:hover { background: var(--surface-2); }
.log-entry__time { flex: none; color: var(--text-3); }
.log-entry__preview { min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; color: var(--text-2); }
.log-entry .log-detail__pre { margin: 0 var(--s5) var(--s3); }
.log-detail__pre {
    margin: 0; padding: var(--s3) var(--s3-5); border: 1px solid var(--line-soft);
    border-radius: var(--radius-sm); background: var(--surface-2);
    color: var(--ink-700); font: 400 var(--text-xs)/1.55 var(--font-mono);
    white-space: pre-wrap; overflow-wrap: anywhere; overflow: auto; max-height: 340px;
}
.log-detail__label {
    margin: var(--s4-5) 0 var(--s1-5); color: var(--text-3);
    font: 600 var(--text-xs)/1.3 var(--font-sans); letter-spacing: .07em; text-transform: uppercase;
}
.log-detail__meta { margin-top: var(--s1); }
.log-detail__meta dt, .log-detail__meta dd { padding: var(--s2) 0; font-size: var(--text-xs); }
.log-detail__context { margin-top: var(--s4); border-top: 1px solid var(--line-soft); padding-top: var(--s3); }
.log-detail__context summary { color: var(--text-2); font-size: var(--text-sm); cursor: pointer; }
.c-modal__panel.log-detail { width: min(900px, calc(100vw - 32px)); }
.c-modal__panel.log-detail .c-modal__body { padding: 0 var(--s6) var(--s6); max-height: 70vh; overflow: auto; }

/* Platform billing manager */
.admin-grid--2 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
.admin-grid--3 { grid-template-columns: repeat(3, minmax(0, 1fr)); }
.billing-kpis { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: var(--s4); }
.billing-kpis .s-stat { min-height: 100%; }
.billing-bar-row { display: grid; grid-template-columns: minmax(0, 1fr) 100px 32px; gap: var(--s2-5); align-items: center; padding: var(--s2) 0; color: var(--text-2); font-size: var(--text-xs); }
.billing-bar { height: 6px; border-radius: var(--radius-full); background: var(--surface-3); overflow: hidden; }
.billing-bar > i { display: block; height: 100%; border-radius: var(--radius-full); background: var(--teal-600); }
.billing-plan__price { margin: var(--s1) 0 var(--s2); color: var(--ink-900); font: 600 var(--text-stat)/1.1 var(--font-display); }
@media (max-width: 1280px) {
    .billing-kpis { grid-template-columns: repeat(2, minmax(0, 1fr)); }
    .admin-grid--3 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}
@media (max-width: 768px) {
    .billing-kpis, .admin-grid--2, .admin-grid--3 { grid-template-columns: minmax(0, 1fr); }
}

/* ---------------------------------------------------------
   Staff editor (2026-11 audit): the role picker had no rules at
   all - bare checkboxes next to unstyled text. Whole-row cards.
   --------------------------------------------------------- */
.staff-crumbs { display: flex; align-items: center; gap: var(--s2); color: var(--text-3); font-size: var(--text-xs); }
.staff-head { display: flex; align-items: center; justify-content: space-between; gap: var(--s4); flex-wrap: wrap; }
.staff-head__identity { display: flex; align-items: center; gap: var(--s3); min-width: 0; }
.staff-head__avatar { width: var(--s10); height: var(--s10); font-size: var(--text-h3); }
.staff-head__eyebrow { margin: 0; color: var(--text-3); font: 600 var(--text-xs)/1.4 var(--font-sans); letter-spacing: var(--tracking-label); text-transform: uppercase; }
.staff-head__actions { display: flex; align-items: center; gap: var(--s2); flex-wrap: wrap; }

.staff-form-band { margin: var(--s4) 0 var(--s2); }
.staff-role-fieldset { border: 0; padding: 0; min-width: 0; }
.staff-role-list { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: var(--s2); }
.staff-role-option {
    position: relative; display: flex; align-items: center; gap: var(--s3);
    min-height: var(--target-touch); padding: var(--s3) var(--s4);
    border: 1px solid var(--border-strong); border-radius: var(--radius-md);
    background: var(--surface); cursor: pointer;
    transition: border-color var(--dur-1) linear, background-color var(--dur-1) linear;
}
.staff-role-option:hover { border-color: var(--teal-600); }
.staff-role-option:has(input:checked) { border-color: var(--teal-600); background: var(--teal-50); }
.staff-role-option:has(input:focus-visible) { box-shadow: var(--ring-focus); }
.staff-role-option__input { position: absolute; width: 1px; height: 1px; opacity: 0; }
.staff-role-option__check {
    display: grid; place-content: center; flex: none;
    width: var(--s4-5); height: var(--s4-5);
    border: 1px solid var(--border-strong); border-radius: var(--radius-sm);
    background: var(--surface); color: transparent;
}
.staff-role-option:has(input:checked) .staff-role-option__check {
    border-color: var(--teal-600); background: var(--teal-600); color: #fff;
}
.staff-role-option:has(input:disabled) { opacity: .7; cursor: not-allowed; }
.staff-role-option__body { display: flex; flex-direction: column; gap: var(--s0); min-width: 0; }
.staff-role-option__name { color: var(--ink-900); font-size: var(--text-sm); font-weight: 600; }
.staff-role-option__key { color: var(--text-3); font-size: var(--text-xs); }
.staff-role-option__meta { display: flex; align-items: center; justify-content: flex-end; gap: var(--s1); flex-wrap: wrap; margin-left: auto; }
.staff-danger__label { display: block; margin-bottom: var(--s2); color: var(--red-600); font: 600 var(--text-xs)/1.4 var(--font-sans); letter-spacing: var(--tracking-label); text-transform: uppercase; }
@media (max-width: 768px) {
    .staff-role-list { grid-template-columns: minmax(0, 1fr); }
}

@media (max-width: 640px) {
    .admin-chart-card .chart-bars { height: 160px; }
}

/* ---------------------------------------------------------
   Jobs console (PO 2026-11-04): the filter form had no rules at
   all, so each width:100% control claimed a full row and the
   selects rendered oversized. Compact toolbar controls instead.
   --------------------------------------------------------- */
.admin-filter-row {
    display: flex;
    flex: 1 1 100%;
    flex-wrap: wrap;
    align-items: center;
    gap: var(--s2);
    min-width: 0;
}
.admin-filter-row > .s-input { flex: 1 1 220px; min-width: 0; }
.admin-filter-row > .s-select { flex: 0 1 180px; width: auto; min-width: 150px; }
/* A wrapped field (label + control) sizes like a select. */
.admin-filter-row > .s-field { flex: 0 1 200px; min-width: 150px; }
.admin-filter-row .s-btn { flex: none; }

/* Selection column: one square control, no stray width. */
.jobs-table th:first-child,
.jobs-table td:first-child { width: var(--s9); padding-inline: var(--s4); }
.jobs-table input[type="checkbox"] { margin: 0; }
/* Selected rows read the same as the certificate table. */
.jobs-table tbody tr:has(input[type="checkbox"]:checked) { background: var(--teal-50); }

@media (max-width: 768px) {
    .admin-filter-row { flex-basis: 100%; min-width: 0; }
    .admin-filter-row > .s-input,
    .admin-filter-row > .s-select,
    .admin-filter-row > .s-field { flex: 1 1 100%; width: 100%; min-width: 0; }
    .admin-filter-row .s-btn { flex: 1 1 calc(50% - var(--s2)); }
    /* Two equal controls: the ghost needs an outline on touch. */
    .admin-filter-row .s-btn--ghost {
        border: 1px solid var(--border-strong);
        background: var(--surface);
        color: var(--ink-900);
    }
}

/* A checkbox cell needs no "SELECT" caption when rows stack. */
.jobs-table td:first-child[data-label]::before { content: none; }

/* ---------------------------------------------------------
   Ticket status band — the status is a state, so it lives at the
   top as coloured pills instead of a dropdown in a side card
   (PO 2026-11-04). One pill form; the reason is audited.
   --------------------------------------------------------- */
.support-status {
    display: flex;
    flex-wrap: wrap;
    align-items: flex-end;
    gap: var(--s4);
    margin-bottom: var(--s5);
    padding-bottom: var(--s4);
    border-bottom: 1px solid var(--border);
}

.support-status__pills {
    display: flex;
    flex-direction: column;
    gap: var(--s2);
}

.support-status__reason {
    display: flex;
    flex-direction: column;
    gap: var(--s1-5);
    width: min(340px, 100%);
    margin-left: auto;
}

@media (max-width: 768px) {
    .support-status { flex-direction: column; align-items: stretch; }
    .support-status__reason { width: 100%; margin-left: 0; }
}

/* A pill group that owns its own filter row. */
.filter-pills { flex: 1 0 100%; }


/* Filter bar: a wrapping row of pill groups that owns the second line. */
.filter-pills {
    display: flex;
    flex: 1 0 100%;
    flex-wrap: wrap;
    align-items: flex-end;
    gap: var(--s3) var(--s5);
}

/* Log filters: the search field owns the remaining width on its row. */
.log-filters .admin-search-field { flex: 1 1 260px; min-width: 0; }
.log-filters .admin-search-field .s-input { width: 100%; min-width: 0; }

/* Settings: one sticky save bar per tab (design/06-ui-cleanliness-v1.md 7.2). */
.settings-save-bar {
    position: sticky;
    bottom: var(--s4);
    z-index: 4;
    display: flex;
    align-items: end;
    gap: var(--s4);
    margin-top: var(--s5);
    padding: var(--s4) var(--s5);
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: var(--radius-lg);
    box-shadow: var(--shadow-md);
}

.settings-save-bar__reason { flex: 1 1 auto; margin: 0; }`n`n/* Keep the last card clear of the floating bar when scrolled to the end. */`n.settings-page form { padding-block-end: var(--s12); }

@media (max-width: 768px) {
    .settings-save-bar { flex-direction: column; align-items: stretch; }
}
/* CrestPoint Semester — v3 compatibility layer for Breeze c- markup. */

.c-field { display: flex; flex-direction: column; gap: var(--s1-5); min-width: 0; }
.c-label { color: var(--ink-700); font: 500 var(--text-sm)/1.4 var(--font-sans); }
.c-input, .c-select, .c-textarea {
    width: 100%; min-height: 40px; padding: 0 var(--s3);
    border: 1px solid var(--border-strong); border-radius: var(--radius-control);
    background: var(--surface); color: var(--ink-900);
    font: 400 14px/1.4 var(--font-sans);
}
.c-textarea { min-height: 104px; padding: var(--s2-5) var(--s3); line-height: 1.55; resize: vertical; }
.c-select {
    appearance: none; padding-right: var(--s8); cursor: pointer;
    font-size: 13px;
    background-image: var(--icon-chevron);
    background-repeat: no-repeat;
    background-position: right 12px center;
    background-size: 16px;
    text-overflow: ellipsis;
    white-space: nowrap;
}
.c-input:focus, .c-select:focus, .c-textarea:focus { outline: none; border-color: var(--teal-600); box-shadow: var(--ring-focus); }
.c-field-error { display: flex; flex-wrap: wrap; gap: var(--s1); margin: 0; color: var(--red-600); font-size: 12px; font-weight: 500; list-style: none; }
.c-help { color: var(--text-3); font-size: 12px; line-height: 1.5; }
.c-check { display: flex; align-items: center; gap: var(--s2); min-height: 40px; color: var(--ink-700); font-size: 13px; cursor: pointer; }
.c-check input { accent-color: var(--teal-600); }

.c-form-section { padding: var(--s6); border: 1px solid var(--border); border-radius: var(--radius-lg); background: var(--surface); box-shadow: var(--shadow-xs); }
.c-form-section__head { margin-bottom: var(--s5); }
.c-form-section__title { margin: 0; color: var(--ink-900); font: 600 18px/1.3 var(--font-sans); }
.c-form-section__sub { margin: var(--s1-5) 0 0; color: var(--text-2); font-size: 13px; max-width: 60ch; }
.c-form-section--danger { border-color: #EBC6CC; }
.c-form-section--danger .c-form-section__title { color: var(--red-600); }
.c-form-row { display: grid; grid-template-columns: 1fr; gap: var(--s4); }
.c-form-row--2 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
.c-form-actions { display: flex; align-items: center; justify-content: flex-end; gap: var(--s3); margin-top: var(--s5); }
.c-danger-zone { display: flex; align-items: flex-start; justify-content: space-between; gap: var(--s6); flex-wrap: wrap; }
.c-danger-zone p { margin: 0; max-width: 56ch; color: var(--text-2); font-size: 13px; }
.c-auth-status { margin-bottom: var(--s4); padding: var(--s2-5) var(--s3-5); border: 1px solid #CBE4D7; border-radius: var(--radius-md); background: var(--green-50); color: var(--green-600); font-size: 13px; }

.c-modal { position: fixed; inset: 0; z-index: var(--z-modal); display: grid; place-items: center; padding: var(--s6); }
.c-modal__scrim { position: absolute; inset: 0; background: rgba(16, 42, 67, .45); border: 0; }
.c-modal__panel { position: relative; display: flex; flex-direction: column; width: min(560px, 100%); max-height: calc(100dvh - 48px); border: 1px solid var(--border); border-radius: var(--radius-lg); background: var(--surface); box-shadow: var(--shadow-lg); overflow: hidden; }
.c-modal__panel > form { display: flex; flex-direction: column; min-height: 0; overflow: hidden; }
.c-modal__panel--sm { width: min(420px, 100%); }
.c-modal__panel--lg { width: min(720px, 100%); }
.c-modal__panel--xl { width: min(920px, 100%); }
.c-modal__header { display: flex; align-items: center; justify-content: space-between; gap: var(--s4); padding: var(--s4-5) var(--s6); border-bottom: 1px solid var(--border); }
.c-modal__header h2 { margin: 0; font: 600 20px/1.3 var(--font-display); }
.c-modal__head { display: flex; align-items: center; justify-content: space-between; gap: var(--s4); padding: var(--s4-5) var(--s6); border-bottom: 1px solid var(--border); }
.c-modal__title { margin: 0; color: var(--ink-900); font: 600 20px/1.3 var(--font-display); letter-spacing: -0.01em; }
.c-modal__footer--between { justify-content: space-between; gap: var(--s4); }
.c-modal__body { padding: var(--s6); overflow-y: auto; }
.c-modal__footer { display: flex; align-items: center; justify-content: flex-end; gap: var(--s2-5); padding: var(--s4) var(--s6); border-top: 1px solid var(--border); background: var(--surface-2); }
.c-dropdown { position: relative; display: inline-flex; }
.c-dropdown__trigger { display: inline-flex; align-items: center; }
.c-dropdown__menu { position: absolute; top: calc(100% + 6px); right: 0; z-index: var(--z-nav); min-width: 240px; padding: var(--s1-5); border: 1px solid var(--border); border-radius: var(--radius-popup); background: var(--surface); box-shadow: var(--shadow-sm); }
.c-dropdown__menu--start { left: 0; right: auto; }
.c-dropdown__item { display: flex; align-items: center; gap: var(--s2-5); width: 100%; min-height: 34px; padding: 0 var(--s2-5); border-radius: var(--radius-row); color: var(--ink-700); font: 500 13px/1.3 var(--font-sans); text-align: left; text-decoration: none; }
.c-dropdown__item:hover { background: var(--row-hover); color: var(--ink-900); text-decoration: none; }
.c-dropdown__item:focus-visible { background: var(--row-hover); box-shadow: inset 2px 0 0 var(--teal-600); }
.c-dropdown__item[aria-current="true"],
.c-dropdown__item[aria-checked="true"] { color: var(--teal-700); font-weight: 600; }
.c-dropdown__item--danger { color: var(--red-600); }
.c-dropdown__sep { height: 1px; margin: var(--s1-5) 0; background: var(--border); }
.c-dropdown__header { padding: var(--s2-5); border-bottom: 1px solid var(--border); margin-bottom: var(--s1-5); }
.c-dropdown__header strong { display: block; font-size: 13px; }
.c-dropdown__header span { display: block; color: var(--text-3); font-size: 12px; }
.c-kbd { display: inline-flex; align-items: center; justify-content: center; min-width: 22px; min-height: 22px; padding: 0 var(--s1-5); border: 1px solid var(--border); border-radius: 4px; background: var(--surface); color: var(--text-3); font: 500 10px/1 var(--font-mono); }

@media (max-width: 768px) {
    .c-form-row--2 { grid-template-columns: 1fr; }
    .c-modal { padding: var(--s3); }
}

.c-label__optional { color: var(--text-3); font-weight: 400; }

/* CrestPoint Semester — searchable lookup combobox (PO 2026-11-04).
   Canonical pattern: public/design/lookup-combobox.html.
   One accent, code/name/status rows, keyboard-first, no gradients. */

.c-combo-field { display: flex; flex-direction: column; gap: var(--s1-5); min-width: 0; }

/* The native select is the no-JS fallback. Enhancement hides it without
   removing it from the form; combo.js mirrors the chosen value back. */
.c-combo__native[data-enhanced="1"] {
    position: absolute;
    width: 1px; height: 1px;
    overflow: hidden;
    clip: rect(0 0 0 0);
    white-space: nowrap;
}

.c-combo {
    position: relative;
    width: 100%;
    min-width: 0;
}

.c-combo__control {
    display: flex; align-items: center; gap: var(--s1-5);
    min-height: var(--combo-control-min); padding: 0 var(--s2-5) 0 var(--s3);
    border: 1px solid var(--combo-line); border-radius: var(--radius-control);
    background: var(--combo-bg); color: var(--combo-ink);
    transition: border-color var(--dur-1) linear, box-shadow var(--dur-1) linear;
}
.c-combo__control:hover { border-color: #A7B6C4; }
.c-combo__control:focus-within {
    border-color: var(--combo-accent);
    box-shadow: var(--ring-focus);
}
.c-combo[data-invalid="true"] .c-combo__control { border-color: var(--red-600); }

.c-combo__input {
    flex: 1 1 auto;
    min-width: 0;
    min-height: 38px;
    padding: 0; border: 0; outline: none;
    background: transparent; color: var(--combo-ink);
    font: 400 var(--text-ui)/1.35 var(--font-sans);
    text-overflow: ellipsis;
}
.c-combo__input::placeholder { color: var(--combo-muted); }

.c-combo__clear,
.c-combo__chevron {
    display: inline-flex; flex: none; align-items: center; justify-content: center;
    width: var(--s6); height: var(--s6); padding: 0;
    border: 0; border-radius: var(--radius-row);
    background: transparent; color: var(--combo-muted); cursor: pointer;
}
.c-combo__clear:hover { background: var(--combo-hover); color: var(--combo-ink); }
.c-combo__clear:focus-visible,
.c-combo__chevron:focus-visible { box-shadow: var(--ring-focus); }
.c-combo__clear svg,
.c-combo__chevron svg { width: 15px; height: 15px; }
.c-combo__chevron { pointer-events: none; }
.c-combo__chevron svg { transition: transform var(--dur-2) var(--ease-out); }
.c-combo[data-open="true"] .c-combo__chevron svg { transform: rotate(180deg); }

.c-combo__popup {
    position: absolute; top: calc(100% + var(--s1)); left: 0; right: 0;
    z-index: var(--z-nav);
    display: none; flex-direction: column;
    max-height: var(--combo-popup-max); overflow: hidden;
    border: 1px solid var(--combo-line); border-radius: var(--radius-popup);
    background: var(--combo-bg); box-shadow: var(--shadow-sm);
    animation: c-combo-in var(--dur-2) var(--ease-out);
}
.c-combo[data-open="true"] .c-combo__popup { display: flex; }

.c-combo__listbox {
    flex: 1 1 auto;
    min-height: 0;
    padding: var(--s1-5);
    overflow-y: auto;
    overscroll-behavior: contain;
}

.c-combo__group + .c-combo__group { margin-top: var(--s1); }
.c-combo__group-label {
    padding: var(--s1-5) var(--s2-5) var(--s1);
    color: var(--combo-muted);
    font: 600 var(--text-group)/1.35 var(--font-sans);
}

.c-combo__option {
    position: relative;
    display: grid;
    grid-template-columns: var(--combo-code-col) minmax(0, 1fr) auto;
    align-items: center;
    gap: var(--s2-5);
    min-height: var(--combo-row-min);
    padding: var(--s1) var(--s2-5);
    border-radius: var(--radius-row);
    color: var(--combo-ink);
    cursor: pointer;
}
.c-combo__option::before {
    content: "";
    position: absolute; top: var(--s1); bottom: var(--s1); left: 0;
    width: 2px; border-radius: var(--radius-full);
    background: var(--combo-accent);
    opacity: 0;
}
.c-combo__option:hover,
.c-combo__option[data-active="true"] { background: var(--combo-hover); }
.c-combo__option[data-active="true"]::before { opacity: 1; }
.c-combo__option[aria-selected="true"] .c-combo__name { color: var(--combo-accent); font-weight: 600; }
.c-combo__option[aria-disabled="true"] { opacity: .55; cursor: not-allowed; }
.c-combo__option[aria-disabled="true"]:hover { background: transparent; }

.c-combo__code {
    overflow: hidden; text-overflow: ellipsis; white-space: nowrap;
    color: var(--combo-muted);
    font: 500 var(--text-code)/1.35 var(--font-mono);
    font-variant-numeric: tabular-nums;
    letter-spacing: -.01em;
}
.c-combo__body { min-width: 0; }
.c-combo__name,
.c-combo__meta { display: block; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.c-combo__name { font: 400 var(--text-ui)/1.35 var(--font-sans); }
.c-combo__meta { margin-top: var(--s0); color: var(--combo-muted); font: 400 var(--text-meta)/1.35 var(--font-sans); }

.c-combo__status {
    flex: none;
    padding: 0 var(--s1-5);
    border-radius: var(--radius-full);
    font: 500 var(--text-xs)/1.8 var(--font-sans);
    white-space: nowrap;
}
.c-combo__status--ok { background: var(--green-50); color: var(--green-700); }
.c-combo__status--warn { background: var(--amber-50); color: var(--amber-700); }
.c-combo__status--bad { background: var(--red-50); color: var(--red-600); }

.c-combo__empty {
    padding: var(--s4) var(--s2-5);
    color: var(--combo-muted);
    font: 400 var(--text-ui)/1.5 var(--font-sans);
}
.c-combo__empty strong { color: var(--combo-ink); font-weight: 600; }

.c-combo__footer {
    display: flex; flex: none; align-items: center; gap: var(--s2-5);
    min-height: var(--combo-row-min); padding: var(--s1-5) var(--s2-5);
    border-top: 1px solid var(--border);
    background: var(--combo-bg);
    color: var(--combo-muted);
    font: 400 var(--text-meta)/1.35 var(--font-sans);
}
.c-combo__count { margin-right: auto; font-variant-numeric: tabular-nums; }
.c-combo__keys { display: inline-flex; align-items: center; gap: var(--s1); }
.c-combo__key {
    display: inline-flex; align-items: center; justify-content: center;
    min-width: var(--s4-5); min-height: var(--s4-5); padding: 0 var(--s1);
    border: 1px solid var(--border); border-radius: var(--radius-sm);
    background: var(--surface); color: var(--combo-muted);
    font: 500 var(--text-xs)/1 var(--font-mono);
}
.c-combo__create {
    display: inline-flex; align-items: center; gap: var(--s1);
    padding: 0 var(--s1-5);
    border: 0; border-radius: var(--radius-row);
    background: transparent; color: var(--combo-accent);
    font: 600 var(--text-meta)/1.8 var(--font-sans);
    cursor: pointer;
}
.c-combo__create:hover { background: var(--combo-accent-soft); }
.c-combo__create:disabled { color: var(--combo-muted); cursor: default; background: transparent; }

.c-combo mark { background: var(--combo-accent-soft); color: inherit; border-radius: 2px; }

.c-combo__error {
    margin: 0;
    color: var(--red-600);
    font: 500 var(--text-sm)/1.4 var(--font-sans);
}

@keyframes c-combo-in {
    from { opacity: 0; transform: translateY(-2px); }
    to { opacity: 1; transform: translateY(0); }
}

@media (pointer: coarse) {
    .c-combo__control { min-height: 44px; }
    .c-combo__input { min-height: 42px; }
    .c-combo__option { min-height: 44px; }
}

@media (prefers-reduced-motion: reduce) {
    .c-combo__popup { animation: none; }
    .c-combo__chevron svg { transition: none; }
}

@media (max-width: 640px) {
    .c-combo__footer { flex-wrap: wrap; gap: var(--s1-5); }
    .c-combo__keys { display: none; }
}

/* CrestPoint Semester — console course catalogue and blueprint builder. */

.course-page-actions { display: flex; align-items: center; gap: var(--s3); flex-wrap: wrap; }

.course-toolbar {
    display: flex; align-items: center; gap: var(--s3); flex-wrap: wrap;
    padding: var(--s4-5) var(--s6) var(--s3-5); border-bottom: 1px solid var(--line-soft);
}
.course-search { display: flex; align-items: center; gap: var(--s2); flex: 1 1 320px; min-width: 0; }
.course-search .s-input { min-width: 0; }
.course-filters { flex: 2 1 auto; }
.course-filters.s-tabs { width: max-content; }
.course-filters .admin-chip { text-decoration: none; }
.course-filters .admin-chip:hover { border-color: var(--line-strong); color: var(--ink-900); text-decoration: none; }

.course-table-scroll { overflow-x: auto; }
.course-title-link { color: var(--ink-900); font-weight: 600; }
.course-title-link:hover { color: var(--teal-700); }
.course-slug { display: block; margin-top: var(--s0); color: var(--text-3); font: 400 11px/1.4 var(--font-mono); }
.course-owner { display: block; color: var(--ink-700); }
.course-owner__meta { display: block; color: var(--text-3); font-size: 11px; }
.course-counts { display: flex; flex-wrap: wrap; gap: var(--s3); }
.course-count { display: inline-flex; align-items: baseline; gap: var(--s1); color: var(--text-3); font-size: 11px; }
.course-count strong { color: var(--ink-900); font: 500 12px/1.2 var(--font-mono); font-variant-numeric: tabular-nums; }
.course-price { color: var(--ink-900); font: 500 12px/1.4 var(--font-mono); font-variant-numeric: tabular-nums; }
.course-price--free { color: var(--green-600); }
.course-updated { display: inline-flex; flex-direction: column; gap: 1px; color: var(--ink-700); font-size: 12px; }
.course-updated time { color: var(--text-3); font: 400 11px/1.4 var(--font-mono); }
.course-actions { display: flex; align-items: center; justify-content: flex-end; gap: var(--s1); flex-wrap: wrap; }
.course-actions form { display: inline-flex; }
.course-actions .s-btn { padding: 0 var(--s2-5); font-size: 12px; }
.course-action-danger { color: var(--red-600); }
.course-action-danger:hover { background: var(--red-50); color: var(--red-600); }

.course-badge--muted { background: var(--surface-2); color: var(--text-3); }

.course-archive-list { display: flex; flex-direction: column; gap: var(--s4); }
.course-archive-fallback {
    display: grid; grid-template-columns: minmax(0, 1fr) 220px auto; gap: var(--s3);
    align-items: end; padding: var(--s4); border: 1px solid var(--border);
    border-radius: var(--radius-md); background: var(--surface-2);
}
.course-archive-fallback__title { align-self: center; margin: 0; color: var(--ink-900); font-size: 13px; font-weight: 600; }

.course-pagination { display: flex; align-items: center; gap: var(--s1); flex-wrap: wrap; }
.course-pagination__link {
    display: inline-flex; align-items: center; justify-content: center;
    min-width: 36px; min-height: 36px; padding: 0 var(--s2);
    border: 1px solid var(--border); border-radius: var(--radius-sm);
    background: var(--surface); color: var(--ink-700);
    font: 500 12px/1 var(--font-sans); text-decoration: none;
}
.course-pagination__link:hover { border-color: var(--line-strong); color: var(--ink-900); text-decoration: none; }
.course-pagination__link.is-current { border-color: var(--teal-600); background: var(--teal-50); color: var(--teal-700); }
.course-pagination__link.is-disabled { color: var(--text-3); opacity: .6; pointer-events: none; }

.course-head {
    display: flex; align-items: center; gap: var(--s2); flex-wrap: wrap;
    margin-top: var(--s2); color: var(--text-3); font-size: 12px;
}
.course-head .s-badge { margin-right: var(--s0); }
.course-head__dot { width: 3px; height: 3px; border-radius: 50%; background: var(--line-strong); }
.course-publish { display: flex; align-items: center; gap: var(--s2); }
.course-publish .s-input { width: 190px; }

.course-error-summary { margin-bottom: var(--s5); }
.course-error-summary__title { margin: 0 0 var(--s2); color: var(--red-600); font: 600 14px/1.4 var(--font-sans); }
.course-error-summary ul { display: flex; flex-direction: column; gap: var(--s1); }
.course-error-summary a { color: var(--red-600); text-decoration: underline; text-underline-offset: 3px; }

.course-form__layout {
    display: grid; grid-template-columns: minmax(0, 1fr) 340px;
    gap: var(--s5); align-items: start;
}
.course-form__main { display: flex; flex-direction: column; gap: var(--s5); min-width: 0; }
.course-form__aside { position: sticky; top: 88px; display: flex; flex-direction: column; gap: var(--s5); min-width: 0; }
.course-form .c-form-section { min-width: 0; }
.course-form .s-form-grid { min-width: 0; }
.course-form .s-field { min-width: 0; }
.course-form .c-form-actions { padding-top: var(--s2); }

.course-section-head { display: flex; align-items: flex-start; justify-content: space-between; gap: var(--s4); }
.course-section-head__actions { display: flex; align-items: center; gap: var(--s2); flex: none; }

.course-unit {
    border: 1px solid var(--border); border-radius: var(--radius-lg);
    background: var(--surface); overflow: hidden;
}
.course-unit + .course-unit { margin-top: var(--s4); }
.course-unit__head {
    display: flex; align-items: center; justify-content: space-between; gap: var(--s3);
    padding: var(--s3) var(--s4); background: var(--surface-2); border-bottom: 1px solid var(--border);
}
.course-unit__heading { display: flex; align-items: center; gap: var(--s3); min-width: 0; }
.course-unit__eyebrow {
    color: var(--text-3); font: 600 10px/1.4 var(--font-sans);
    letter-spacing: .08em; text-transform: uppercase;
}
.course-unit__title { margin: 0; color: var(--ink-900); font: 600 16px/1.3 var(--font-sans); }
.course-unit__body { padding: var(--s4); }
.course-unit__body .s-textarea { min-height: 84px; }

.course-lessons { margin-top: var(--s4); padding-top: var(--s4); border-top: 1px solid var(--border); }
.course-lessons__head { display: flex; align-items: center; justify-content: space-between; gap: var(--s3); margin-bottom: var(--s3); }
.course-lessons__title { margin: 0; color: var(--ink-900); font: 600 13px/1.4 var(--font-sans); }
.course-lesson {
    padding: var(--s3-5); border: 1px solid var(--border); border-radius: var(--radius-md);
    background: var(--surface-2);
}
.course-lesson + .course-lesson { margin-top: var(--s3); }
.course-lesson__head {
    display: flex; align-items: center; justify-content: space-between; gap: var(--s3);
    margin-bottom: var(--s3);
}
.course-lesson__label {
    color: var(--ink-700); font: 600 11px/1.4 var(--font-sans);
    letter-spacing: .04em; text-transform: uppercase;
}
.course-lesson__body { grid-column: 1 / -1; }
.course-lesson .s-textarea { min-height: 96px; }

.course-evaluations { display: flex; flex-direction: column; gap: var(--s3); }
.course-evaluation {
    padding: var(--s3-5); border: 1px solid var(--border); border-radius: var(--radius-md);
    background: var(--surface);
}
.course-evaluation__head {
    display: flex; align-items: center; justify-content: space-between; gap: var(--s3);
    margin-bottom: var(--s3);
}
.course-evaluation__label {
    color: var(--ink-700); font: 600 11px/1.4 var(--font-sans);
    letter-spacing: .04em; text-transform: uppercase;
}

.course-lines__fallback { display: flex; flex-direction: column; gap: var(--s2); }
.course-lines__enhanced { display: none; }
.course-lines__enhanced textarea { min-height: 128px; }
.course-lines__hidden { display: none; }

[data-builder-ready] .course-lines__enhanced { display: block; }
[data-builder-ready] .course-lines__fallback { display: none; }
[data-builder-only] { display: none !important; }
[data-builder-ready] [data-builder-only] { display: inline-flex !important; }

.course-checklist { display: flex; flex-direction: column; }
.course-checklist__row {
    display: flex; align-items: flex-start; gap: var(--s2);
    padding: var(--s2-5) 0; border-bottom: 1px solid var(--border);
    color: var(--text-2); font-size: 12px; line-height: 1.5;
}
.course-checklist__row:last-child { border-bottom: 0; padding-bottom: 0; }
.course-checklist__row:first-child { padding-top: 0; }
.course-checklist__row svg { margin-top: var(--s0); width: 16px; height: 16px; }
.course-checklist__row.is-ok svg { color: var(--green-600); }
.course-checklist__row.is-todo svg { color: var(--amber-600); }
.course-checklist__row a { color: inherit; text-decoration: none; }
.course-checklist__row a:hover { color: var(--ink-900); text-decoration: underline; text-underline-offset: 3px; }
.course-checklist__row.is-todo a { color: var(--ink-900); }

.course-outline { display: flex; flex-direction: column; }
.course-outline__unit { padding: var(--s2-5) 0; border-bottom: 1px solid var(--border); }
.course-outline__unit:last-child { border-bottom: 0; }
.course-outline__row { display: flex; align-items: baseline; gap: var(--s2); min-width: 0; }
.course-outline__index { color: var(--text-3); font: 500 10px/1.4 var(--font-mono); }
.course-outline__title { color: var(--ink-900); font-size: 12px; font-weight: 600; }
.course-outline__lessons { display: flex; flex-direction: column; gap: var(--s1); margin-top: var(--s1); padding-left: var(--s5-5); }
.course-outline__lesson { display: flex; align-items: baseline; gap: var(--s2); color: var(--text-2); font-size: 11px; }
.course-outline__lesson span:last-child { margin-left: auto; color: var(--text-3); font-family: var(--font-mono); font-size: 10px; }
.course-outline__evaluations { margin-top: var(--s3); padding-top: var(--s3); border-top: 1px solid var(--border); }
.course-outline__evaluation { display: flex; align-items: baseline; gap: var(--s2); color: var(--text-2); font-size: 11px; }
.course-outline__evaluation + .course-outline__evaluation { margin-top: var(--s1); }
.course-outline__evaluation span:last-child { margin-left: auto; color: var(--text-3); font: 500 10px/1.4 var(--font-mono); }
.course-outline__empty { color: var(--text-3); font-size: 12px; }

.course-requirement-list { display: flex; flex-direction: column; gap: var(--s2); color: var(--text-2); font-size: 12px; line-height: 1.5; }
.course-requirement-list li { display: flex; gap: var(--s2); }
.course-requirement-list svg { flex: none; width: 14px; height: 14px; margin-top: var(--s0); color: var(--teal-600); }

.course-empty-actions { margin-top: var(--s2); }

@media (max-width: 1280px) {
    .course-form__layout { grid-template-columns: minmax(0, 1fr); }
    .course-form__aside { position: static; }
}

@media (max-width: 1024px) {
    .course-filters { flex-basis: 100%; }
    .course-publish .s-input { width: 150px; }
}

@media (max-width: 768px) {
    .course-archive-fallback { grid-template-columns: minmax(0, 1fr); align-items: stretch; }
    .course-archive-fallback__title { align-self: start; }
    .course-toolbar { padding: var(--s3-5) var(--s4) var(--s2-5); }
    .course-search { flex-basis: 100%; flex-wrap: wrap; gap: var(--s4); }
    .course-search .s-btn { flex: none; }
    .course-actions { justify-content: flex-start; }
    .course-page-actions { width: 100%; }
    .course-publish { width: 100%; }
    .course-publish .s-input { flex: 1 1 auto; width: auto; }
    .course-publish .s-btn { flex: none; }
    .course-unit__head { align-items: flex-start; }
    .course-section-head { flex-direction: column; }
    .course-section-head__actions { width: 100%; }
    .course-section-head__actions .s-btn { flex: 1 1 auto; }
    .course-pagination { justify-content: center; }
    .c-form-actions { flex-wrap: wrap; }
    .c-form-actions .s-btn { flex: 1 1 auto; }
}

@media (max-width: 420px) {
    .course-search { flex-direction: column; align-items: stretch; }
    .course-search .s-btn { width: 100%; }
    .course-actions { flex-direction: column; align-items: stretch; }
    .course-actions form,
    .course-actions .s-btn { width: 100%; }
    .course-unit__body { padding: var(--s3); }
    .course-lesson { padding: var(--s3); }
}

.admin-stack { display: flex; flex-direction: column; gap: var(--s4); }

/* Courses table selection + outside-the-table action panels
   (design/06-ui-cleanliness-v1.md 4.4/6). */
.course-select__cell { width: var(--s8); text-align: center; }
.course-select__input { width: var(--s4); height: var(--s4); accent-color: var(--teal-600); }

.course-fallback-list {
    display: grid;
    gap: var(--s3);
    padding: var(--s4) var(--pad-cell-x);
    border-top: 1px solid var(--line-soft);
}

[data-course-list][data-course-js="true"] { display: none; }

.course-fallback[open] {
    padding: var(--s3);
    background: var(--surface-2);
    border-radius: var(--radius-md);
}

.course-fallback summary {
    cursor: pointer;
    font: 600 var(--text-sm) / 1.4 var(--font-sans);
}

.course-action-panel { display: flex; flex-direction: column; gap: var(--s3); }
.course-action-panel__actions { display: flex; flex-wrap: wrap; align-items: end; gap: var(--s3); }
.course-action-panel__reasoned { display: flex; flex-wrap: wrap; align-items: end; gap: var(--s2); }
.course-action-panel__reasoned .s-field { flex: 1 1 240px; min-width: 0; }
/* CrestPoint Academy — cross-surface filter system (www, learn, manage).

   ONE stylesheet for every filter toolbar and facet popover, imported last by
   each surface entry point so the active surface's semantic tokens paint it:
   app.css (marketing), campus-v3.css and console-v3.css (Semester v3).

   Tokens only: --surface, --surface-2, --border, --border-strong, --text,
   --text-2, --text-3, --primary, --primary-subtle, --radius-*, --shadow-md,
   --shadow-lg, --s*, --target-*, --ring-focus, --dur-1, --z-drawer.
   Every one of those is declared in BOTH public/assets/css/tokens.css and
   public/assets/css/v3/tokens.css.

   Source: PO instruction 2026-11-13 ("Update cards, dropdowns filters to
   this"); design/00 section 9.3 (searchable listbox), 9.4 (checkbox row),
   9.5 (filter chip); design/05 for the campus/console palette. */

/* ---------------------------------------------------------------- toolbar */
.c-filter-bar { display: flex; flex-direction: row; flex-wrap: wrap; align-items: center; gap: var(--s2); }
.c-filter-bar__search { flex: 1 1 260px; min-width: 180px; }
.c-filter-bar__spacer { flex: 1 1 var(--s6); }

/* --------------------------------------------------------------- the pill */
.c-facet { position: relative; }

.c-facet__trigger {
    display: inline-flex;
    align-items: center;
    gap: var(--s2);
    min-height: var(--target-touch);
    padding: 0 var(--s4);
    border: 1px solid var(--border-strong);
    border-radius: var(--radius-full);
    background: var(--surface);
    color: var(--text);
    font-family: var(--font-sans);
    font-size: var(--text-sm);
    font-weight: 600;
    list-style: none;
    cursor: pointer;
    transition: border-color var(--dur-1) linear, background-color var(--dur-1) linear, color var(--dur-1) linear;
}
.c-facet__trigger::-webkit-details-marker { display: none; }
.c-facet__trigger:hover { border-color: var(--primary); }
.c-facet__trigger:focus-visible { outline: none; box-shadow: var(--ring-focus); }
.c-facet__trigger.is-on { background: var(--primary-subtle); border-color: var(--primary); color: var(--primary); }
.c-facet[open] .c-facet__trigger { border-color: var(--primary); }

.c-facet__label { max-width: 24ch; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.c-facet__chevron { transition: transform var(--dur-1) linear; }
.c-facet[open] .c-facet__chevron { transform: rotate(180deg); }

/* ------------------------------------------------------------ the popover */
.c-facet__panel {
    position: absolute;
    top: calc(100% + var(--s2));
    left: 0;
    z-index: var(--z-drawer);
    display: flex;
    flex-direction: column;
    gap: var(--s2);
    width: 300px;
    padding: var(--s3);
    border: 1px solid var(--border);
    border-radius: var(--radius-lg);
    background: var(--surface);
    box-shadow: var(--shadow-md);
}

/* Right-aligned variants (a facet at the end of a row must not overflow). */
.c-facet--end .c-facet__panel { left: auto; right: 0; }

.c-facet__grip { display: none; }

/* The in-panel search is styled here, not by a surface input class, so one
   markup works in the marketing, campus and console palettes. */
.c-facet__find {
    width: 100%;
    min-height: var(--target-min);
    padding: 0 var(--s3);
    border: 1px solid var(--border);
    border-radius: var(--radius-sm);
    background: var(--surface);
    color: var(--text);
    font-family: var(--font-sans);
    font-size: var(--text-sm);
}
.c-facet__find:focus-visible { outline: none; box-shadow: var(--ring-focus); }
.c-facet__options { max-height: 300px; overflow-y: auto; }

.c-facet__option {
    display: flex;
    align-items: center;
    gap: var(--s2);
    min-height: var(--target-touch);
    padding: 0 var(--s3);
    border-radius: var(--radius-sm);
    color: var(--text);
    font-size: var(--text-sm);
    cursor: pointer;
}
.c-facet__option:hover { background: var(--surface-2); }
.c-facet__option input { flex: none; margin: 0; accent-color: var(--primary); }
.c-facet__option input:focus-visible { outline: none; box-shadow: var(--ring-focus); }
.c-facet__option-label { flex: 1; }
.c-facet__count { color: var(--text-3); font-size: var(--text-xs); font-variant-numeric: tabular-nums; }
.c-facet__option--none { color: var(--text-3); }
.c-facet__option--none .c-facet__count { color: var(--text-3); }

.c-facet__empty { padding: var(--s3); color: var(--text-2); font-size: var(--text-sm); }

.c-facet__foot {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: var(--s2);
    padding-top: var(--s2);
    border-top: 1px solid var(--border);
}

/* Panel Clear is a JS affordance; chips carry the no-JS path. */
.c-facet__clear {
    display: none;
    align-items: center;
    min-height: var(--target-min);
    padding: 0 var(--s2);
    border-radius: var(--radius-sm);
    color: var(--text-2);
    font-family: var(--font-sans);
    font-size: var(--text-sm);
    font-weight: 600;
}
.c-facet__clear:hover { color: var(--text); }
[data-filter-ready="1"] .c-facet__clear { display: inline-flex; }

.c-facet__commit {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-height: var(--target-min);
    padding: 0 var(--s4);
    border: 1px solid var(--primary);
    border-radius: var(--radius-md);
    background: var(--primary);
    color: var(--on-primary);
    font-family: var(--font-sans);
    font-size: var(--text-sm);
    font-weight: 600;
    white-space: nowrap;
    cursor: pointer;
    transition: background-color var(--dur-1) linear;
}
.c-facet__commit:hover { background: var(--primary-hover); border-color: var(--primary-hover); }
.c-facet__commit:focus-visible { outline: none; box-shadow: var(--ring-focus); }

/* ------------------------------------------- short single-choice, native */
.c-filter-select {
    appearance: none;
    flex: 0 1 auto;
    max-width: 100%;
    min-height: var(--target-touch);
    padding: 0 var(--s7) 0 var(--s4);
    border: 1px solid var(--border-strong);
    border-radius: var(--radius-full);
    background-color: var(--surface);
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='16' height='16' viewBox='0 0 24 24' fill='none' stroke='%2364727C' stroke-width='1.75' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='m6 9 6 6 6-6'/%3E%3C/svg%3E");
    background-position: right var(--s3) center;
    background-repeat: no-repeat;
    color: var(--text);
    font-family: var(--font-sans);
    font-size: var(--text-sm);
    font-weight: 600;
    cursor: pointer;
    transition: border-color var(--dur-1) linear, background-color var(--dur-1) linear;
}
.c-filter-select:hover { border-color: var(--primary); }
.c-filter-select:focus-visible { outline: none; box-shadow: var(--ring-focus); }
.c-filter-select[data-applied="true"] { background-color: var(--primary-subtle); border-color: var(--primary); color: var(--primary); }

/* Quiet variant (a sort control that should not draw a border). */
.c-filter-select--quiet {
    border-color: transparent;
    background-color: transparent;
    background-position: right var(--s2) center;
    padding-left: var(--s2);
}
.c-filter-select--quiet:hover { border-color: transparent; color: var(--primary); }

/* --------------------------------------------------- checkbox as a pill */
.c-filter-toggle {
    position: relative;
    display: inline-flex;
    align-items: center;
    gap: var(--s2);
    min-height: var(--target-touch);
    padding: 0 var(--s4);
    border: 1px solid var(--border-strong);
    border-radius: var(--radius-full);
    background: var(--surface);
    color: var(--text);
    font-size: var(--text-sm);
    font-weight: 600;
    cursor: pointer;
    transition: border-color var(--dur-1) linear, background-color var(--dur-1) linear, color var(--dur-1) linear;
}
.c-filter-toggle:hover { border-color: var(--primary); }
.c-filter-toggle input { position: absolute; width: 1px; height: 1px; opacity: 0; pointer-events: none; }
.c-filter-toggle:has(input:checked) { background: var(--primary-subtle); border-color: var(--primary); color: var(--primary); }
.c-filter-toggle:has(input:focus-visible) { box-shadow: var(--ring-focus); }

/* ---------------------------------------------------------- active chips */
.c-filter-chips { display: flex; flex-wrap: wrap; align-items: center; gap: var(--s2); }
.c-filter-chip {
    display: inline-flex;
    align-items: center;
    gap: var(--s1-5);
    min-height: var(--s7);
    padding: 0 var(--s2) 0 var(--s3);
    border: 1px solid var(--border);
    border-radius: var(--radius-md);
    background: var(--surface);
    color: var(--text);
    font-size: var(--text-sm);
    font-weight: 600;
    text-decoration: none;
}
.c-filter-chip:hover { border-color: var(--primary); text-decoration: none; }
.c-filter-chip:focus-visible { outline: none; box-shadow: var(--ring-focus); }
.c-filter-chip--clear { padding: 0 var(--s3); border-style: dashed; color: var(--text-2); }

/* ------------------------------------------------ no-JS submit fallback */
[data-filter-ready="1"] .c-filter-bar__apply { display: none; }

/* -------------------------------------------------------------- phones */
@media (max-width: 640px) {
    .c-filter-bar__search { flex-basis: 100%; }
    .c-filter-bar__spacer { display: none; }

    /* The panel becomes a bottom sheet. */
    .c-facet { position: static; }
    .c-facet__panel,
    .c-facet--end .c-facet__panel {
        position: fixed;
        inset: auto 0 0;
        width: auto;
        max-height: 70dvh;
        overflow-y: auto;
        padding: var(--s4) var(--s4) calc(var(--s6) + env(safe-area-inset-bottom));
        border-radius: var(--radius-xl) var(--radius-xl) 0 0;
        box-shadow: var(--shadow-lg);
    }
    .c-facet__options { max-height: none; }
    .c-facet__grip {
        display: block;
        width: var(--s7);
        height: var(--s1);
        margin: 0 auto var(--s2);
        border-radius: var(--radius-full);
        background: var(--border-strong);
    }
}

@media (prefers-reduced-motion: reduce) {
    .c-facet__chevron { transition: none; }
}

/* CrestPoint Academy — shared pagination bar (www, learn, manage).

   One pager on every list: "Showing 1 to 15 of 2363 entries" on the left, a
   records-per-page selector, then the windowed page numbers with first/last
   steps on the right. Imported last by every surface entry so the surface's
   own tokens (blue on www, teal on learn/manage) paint it.

   Source: PO instruction 2026-11-14 (pagination reference); design/06
   section 5 (tables keep pagination in the foot); docs/COPY-STANDARD.md. */

.c-pagination {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: var(--s2);
    padding: var(--s2-5) var(--s4);
    border-top: 1px solid var(--border);
    background: var(--surface-2);
    color: var(--text-3);
    font-size: var(--text-sm);
}

.c-pagination__summary { margin: 0; color: var(--text-3); font-size: var(--text-sm); }

.c-pagination__spacer { flex: 1 1 auto; }

.c-pagination__per-page { display: inline-flex; align-items: center; gap: var(--s1-5); }
.c-pagination__per-page-label { color: var(--text-3); font-size: var(--text-sm); }

/* The per-page control is secondary chrome: a 32px pill, not a full-size field. */
.c-pagination__per-page .c-filter-select {
    min-height: var(--s7);
    padding: 0 var(--s6) 0 var(--s2);
    border-radius: var(--radius-sm);
    background-position: right var(--s2) center;
    font-size: var(--text-xs);
}

.c-pagination__nav { display: flex; align-items: center; gap: var(--s1); }

.c-pagination__page,
.c-pagination__step {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: var(--s7);
    height: var(--s7);
    padding: 0 var(--s1-5);
    border: 1px solid var(--border);
    border-radius: var(--radius-sm);
    background: var(--surface);
    color: var(--text-2);
    font-size: var(--text-xs);
    font-weight: 600;
    font-variant-numeric: tabular-nums;
    text-decoration: none;
    transition: border-color var(--dur-1) linear, background-color var(--dur-1) linear, color var(--dur-1) linear;
}
.c-pagination__page:hover,
.c-pagination__step:hover { border-color: var(--primary); color: var(--primary); text-decoration: none; }
.c-pagination__page:focus-visible,
.c-pagination__step:focus-visible { outline: none; box-shadow: var(--ring-focus); }

.c-pagination__page[aria-current="page"] {
    border-color: var(--primary);
    background: var(--primary);
    color: var(--on-primary);
}

.c-pagination__step[aria-disabled="true"] {
    opacity: 0.45;
    pointer-events: none;
}

.c-pagination__gap { padding: 0 var(--s1); color: var(--text-3); }

@media (max-width: 640px) {
    /* One compact strip: summary + per-page on the first line, the numbers
       below it. The visible "Per page" label is dropped (the select keeps its
       aria-label) so the control stays small. */
    .c-pagination { gap: var(--s1-5); padding: var(--s2) var(--s3); }
    .c-pagination__spacer { display: none; }
    .c-pagination__per-page { margin-left: auto; }
    .c-pagination__per-page-label { display: none; }
    .c-pagination__summary { font-size: var(--text-xs); }
    .c-pagination__nav { width: 100%; overflow-x: auto; }
}


