/* Ported from ../platform/src/styles/globals.css. Two edits at the port: the
   `@import "tailwindcss"` line is gone (00-preflight.css and 20-utilities.css
   carry the two pieces of Tailwind the markup was written against), and the
   `@theme { … }` block below is a `:root { … }` block of the same custom
   properties, because Tailwind v4 exposed every theme entry as a CSS variable
   of the same name and that is all the markup ever used.

   One departure since, by decision (AGENTS.md section 11): the platform chose
   the dark world by SURFACE, and Tessera chooses light or dark by the person's
   MODE on every surface. The MODES AND SURFACES section is where that
   happens; everything below it is the platform's rules, unchanged.
   `test/styles/stylesheet_test.rb` holds the port to what it says here (no
   Tailwind left, no `var()` of a property nothing declares, no unspaced
   operator in a `calc()`, the one place the mode is decided); the mode
   blocks are tested by `test/styles/mode_test.rb`. The tokens are the
   institution's: `GET /theme.css` (Theme) emits a themes row's values after
   this file, and the values written here are the fallbacks it overrides, kept
   equal to the seeded `holy_cross` row by `test/models/theme/seed_test.rb`. */

/* ═══════════════════════════════════════════════════════════════════════════
   Tessera — College of the Holy Cross student experience platform

   Token values come from design_system/colors_and_type.css, not from
   invention. Product-specific extensions (availability states, the console
   world) are marked and are built from existing brand accents rather than new
   hues, per docs/housing_plan/15 §2.2.

   ── Two worlds, one system ───────────────────────────────────────────────

   The design position from 15 §1 — collegiate-modern, warm not corporate,
   editorial not app-like — describes the *student* surfaces, and it is right
   there: a student signing a binding contract or reading a lottery number is
   reading a document, not operating a machine.

   Staff are operating a machine. On selection day the console is open for
   eight hours in a lit office while 426 students transact against it, and the
   thing being watched is a handful of moving numbers on a mostly-static page.
   That is the opposite job, and it gets the opposite treatment: a dark plum
   console built from the brand's own deep purple, where the numbers are the
   only bright things on the screen.

   Both worlds are the same component set. Every component below reads
   semantic tokens — `--surface-raised`, `--fg2`, `--accent` — and never a
   brand hex directly. Light and dark re-point those tokens (MODES AND
   SURFACES, below) and the whole interface follows without a second
   stylesheet; the console is a surface, not a mode.

   Which world a page is in is decided in one place: `Shell`.
   ═══════════════════════════════════════════════════════════════════════════ */

@font-face {
  font-family: "Gelasio";
  src: url("/fonts/Gelasio-VariableFont_wght.woff2") format("woff2-variations");
  font-weight: 400 700;
  font-style: normal;
  font-display: swap;
}
@font-face {
  font-family: "Gelasio";
  src: url("/fonts/Gelasio-Italic-VariableFont_wght.woff2") format("woff2-variations");
  font-weight: 400 700;
  font-style: italic;
  font-display: swap;
}
@font-face {
  font-family: "Manrope";
  src: url("/fonts/Manrope-VariableFont_wght.woff2") format("woff2-variations");
  font-weight: 200 800;
  font-style: normal;
  font-display: swap;
}

/* Was `@theme { … }`. Tailwind emitted these as variables on `:root` inside
   `@layer theme`, where an unlayered declaration of the same name — the
   `--radius-sm: 4px` the light world declares further down — always won.
   Unlayered here, it wins by source order instead, so this block must stay
   ABOVE the `:root` that redeclares it. */
:root {
  /* ── Brand ─────────────────────────────────────────────────────────────── */
  --color-purple: #602d89;
  --color-purple-deep: #251230;
  --color-purple-bright: #7030a0;
  --color-lavender: #e6def0;
  --color-lavender-soft: #f4f0f8;

  --color-gold: #f1c46e;
  --color-gold-deep: #c89b4b;

  --color-blue: #698cc1;
  --color-blue-deep: #325385;

  --color-ivy: #175f4e;
  --color-ivy-deep: #0c4336;

  --color-warm: #f4edec;
  --color-warm-deep: #ac9e94;

  --color-ink: #1e1a19;
  --color-gray-900: #2d2826;
  --color-gray-700: #4d4744;
  --color-gray-500: #8e8884;
  --color-gray-300: #c9c0ba;
  --color-gray-200: #e0d8d4;
  --color-gray-100: #f4edec;

  --color-brick: #a03232;

  /* ── Type ──────────────────────────────────────────────────────────────── */
  --font-display: "Gelasio", "Source Serif Pro", Georgia, serif;
  --font-sans: "Manrope", -apple-system, BlinkMacSystemFont, "Segoe UI", Helvetica, sans-serif;
  --font-mono: ui-monospace, "SF Mono", Menlo, Consolas, monospace;

  --text-xs: 0.75rem;
  --text-sm: 0.875rem;
  --text-base: 1rem;
  --text-md: 1.125rem;
  --text-lg: 1.25rem;
  --text-xl: 1.5rem;
  --text-2xl: 2rem;
  --text-3xl: 2.5rem;
  --text-4xl: 3.25rem;
  --text-5xl: 4.5rem;

  --radius-sm: 3px;
  --radius-md: 6px;
  --radius-lg: 10px;

  /* ── Phone and Hotwire Native ───────────────────────────────────────────
     Structure and not color, so the same in every mode and on every surface.

     `--target-min` is the smallest a touch target may be, in CSS px: 44, the
     floor AGENTS.md section 11 sets for touch (WCAG 2.5.8's 24 is the floor
     for every pointer). It is px and not rem on purpose: it is the size of a
     fingertip, which does not grow with the reader's text size. Use it
     instead of a literal; 40-native.css applies it to controls on touch.

     `--safe-*` are the device's unsafe margins: the notch, the rounded
     corners, the home indicator and, in a Hotwire Native shell, whatever the
     native bars leave to the web view. `env()` is 0 until the layout says
     `viewport-fit=cover`, so every use of these is inert in a plain browser.
     They are PHYSICAL (top, right, bottom, left) and must stay so: a notch
     is on the left of the device in a right-to-left language too, so
     `padding-inline-start: var(--safe-left)` would pad the wrong edge. This
     is the one place the logical-properties rule does not apply. */
  --target-min: 44px;
  --safe-top: env(safe-area-inset-top, 0px);
  --safe-right: env(safe-area-inset-right, 0px);
  --safe-bottom: env(safe-area-inset-bottom, 0px);
  --safe-left: env(safe-area-inset-left, 0px);

  /* ── Layout ─────────────────────────────────────────────────────────────
     Structure and not color or type: the same in every mode and on every
     surface, and not a theme's to change (a theme "cannot change layout,
     density or markup", design-direction.md section 3; Theme::Contract refuses
     the keys). `--page-w` is the light shell's measure, `--page-w-wide` the
     console's, `--rail-w` the console's rail (the rail already read it with a
     258px fallback). Media queries cannot read custom properties, so the two
     breakpoints stay literal where they are used: 1080px, where the rail stops
     being a drawer and the masthead's menu stops being the only way to the
     account, and 860px, where the grids stack. */
  --page-w: 1180px;
  --page-w-wide: 1440px;
  --rail-w: 258px;

  /* ── Density ────────────────────────────────────────────────────────────
     How much room a list gives each of its rows. Structure and not color, so the same in every mode and on every surface.
     People read lists here, many rows at a time, so the rows are tight: a fact, a contact, a table row and a figure each take
     a line of text and a few pixels of padding. Reading is not touching: a row that is only read is as tight on a phone as on
     a desk, and a control in a row (a link, a button, a choice) keeps its own floor whatever the row around it does (24px for
     every pointer, `--target-min` on touch, in 40-native.css and the components' own coarse-pointer rules). A "comfortable"
     setting, if one is ever wanted, is these five values and nothing else. */
  --density-row: 0.25rem; /* the padding above and below what a row says */
  --density-cell: 0.4rem; /* the padding at the sides of a table cell */
  --density-gap: 0.5rem; /* the space between two rows of a list, and between the parts of a bar */
  --density-block: 0.75rem; /* the space between two blocks of a page, and between the columns of a row */
  --density-chip: 2rem; /* the least height of a choice or a small field for a mouse (24px is WCAG's floor); touch has --target-min */

  /* ── Space ──────────────────────────────────────────────────────────────
     The room BETWEEN the things on a page, as one scale. The Density tokens above are the room INSIDE a list's rows (a line and a few
     pixels), and a page built only of them is what looked thrown together: a heading, a sentence and a list each 0.5rem apart. A
     page, a section and a card are spaced by these, so every page breathes the same amount and a gap is a step on the scale and
     not a number in a rule. Structure and not color, so the same in every mode and on every surface, and not a theme's to change.

       --space-1  0.25rem  inside a line of badges, between a label and its value
       --space-2  0.5rem   between two lines of one thing
       --space-3  0.75rem  between a heading and what it heads; inside a compact card
       --space-4  1rem     a card's padding; between two blocks of one section
       --space-5  1.5rem   between a section's parts; a page's side padding on a wide screen
       --space-6  2rem     between two sections of a page
       --space-7  3rem     under the last thing on a page

     `--page-gutter` is the page's side padding: a phone's 1rem growing to 1.5rem, the console's old gutter, by a laptop's width. It stops there because the record pages' container
     queries (the person page's 56rem, the week's 44rem) were tuned to the room that gutter leaves, and a wider one moved their breakpoints. `--section-gap` is the room between two
     sections of a page, and it is what `.page-flow` (41-page-structure.css) puts between the things it holds. */
  --space-1: 0.25rem;
  --space-2: 0.5rem;
  --space-3: 0.75rem;
  --space-4: 1rem;
  --space-5: 1.5rem;
  --space-6: 2rem;
  --space-7: 3rem;
  --page-gutter: clamp(1rem, 0.4rem + 1.8vw, 1.5rem);
  --section-gap: var(--space-6);
}

/* ═══════════════════════════════════════════════════════════════════════════
   MODES AND SURFACES

   Two independent choices, kept apart in this file.

   A SURFACE is the product a person is in: the light shell (students, the
   front door) or the staff console. `data-surface="console"` picks it. It
   decides density and identity, and it does not decide light or dark.

   A MODE is light or dark, and it follows the person:

     light   the values on `:root` below, the default
     dark    `@media (prefers-color-scheme: dark)` on
             `:root:not([data-mode="light"])` — the system asks for dark and
             the person has not said otherwise — and `:root[data-mode="dark"]`
             — the person said dark, whatever the system says

   `data-mode` is the person's saved override. `shared/_mode_head` sets it from
   the `tessera_mode` cookie before the first paint and the `mode` Stimulus
   controller changes it live; no attribute means follow the system.

   Every color token is declared in the light block and in BOTH dark blocks.
   CSS has no way to share one declaration list between a media query and an
   attribute selector, so the two dark blocks are written out twice, and
   `test/styles/mode_test.rb` fails if they ever differ or if a token has a
   light value and no dark one. The dark blocks sit inside `@media screen` so
   print is always light: a dark page prints as white text on white paper.

   The page canvas, form controls and scrollbars follow the mode through
   `color-scheme`, which the markup also declares in `<meta name="color-scheme">`
   so the canvas is right before this file has loaded.
   ═══════════════════════════════════════════════════════════════════════════ */

/* ── Light ──────────────────────────────────────────────────────────────────
   The light shell: students, referrers and the front door, and the default
   for every surface.

   The page field is a warm off-white rather than paper white, so that a card
   at true white reads as lifted off it without needing a shadow to say so.
   Every elevation step below is a surface change first and a shadow second. */

:root {
  color-scheme: light dark;

  /* Surfaces, in elevation order */
  --surface: #fbf8f7;
  --surface-raised: #ffffff;
  --surface-sunken: #f4edec;
  --surface-inset: #ffffff;
  --surface-tint: #f6f2fa;
  --surface-header: #ffffff;
  --surface-invert: #251230;
  --fg-invert: #ffffff;

  /* Text */
  --fg1: #1e1a19;
  --fg2: #4d4744;
  /* Both muted grays were below AA on the warm page field — the old
     #8E8884 eyebrow measured 3.4:1, and eyebrows are the only label some
     tiles have. These are 6.1:1 and 5.0:1 against the field. `--fg-faint` is
     also held to 4.5:1 on the selected well (`--accent-soft`), where the
     current rail row's note sits: `config/contrast_pairs.yml` checks it on
     every surface in all four token sets. */
  --fg3: #635e5a;
  --fg-faint: #706a67;

  /* Lines */
  --rule: #e7dfdb;
  --rule-strong: #cfc5bf;
  /* The edge of a control a person has to find (WCAG 1.4.11 asks 3:1 against
     what it sits on). `--rule` and `--rule-strong` are structure, and at about
     1.7:1 they are too faint to be the only thing that marks a control out.
     3.4:1 on the field, 3.6:1 on white. */
  --control-line: #8f8681;

  /* Accent — the College's purple */
  --accent: #602d89;
  --accent-hover: #4a2169;
  --accent-fg: #ffffff;
  --accent-soft: #f1eaf8;
  --accent-line: #d8c8ea;
  --accent-text: #57277d;

  /* Gold is a highlight, never a surface */
  --gold: #c89b4b;
  --gold-bright: #f1c46e;

  --focus: #2b6ef5;

  /* The browser's own chrome (address bar, the native shells' status bar).
     `shared/_mode_head` emits one theme-color meta for each mode from the
     `chrome` token of the installation's theme, and a test fails if the
     holy_cross profile's two values (config/institution_profiles/holy_cross.yml)
     and these two disagree. */
  --chrome: #602d89;

  /* Tone pairs — every status pill, badge and callout draws from these.
     Never color-only: the callers pair each with a word. */
  --tone-good-bg: #e4efe9;
  --tone-good-fg: #0c4336;
  --tone-good-line: #b9d3cb;
  --tone-warn-bg: #fbf1dd;
  --tone-warn-fg: #6b4e15;
  --tone-warn-line: #e5d2a8;
  --tone-bad-bg: #f9e9e9;
  --tone-bad-fg: #7d2626;
  --tone-bad-line: #e3c4c4;
  --tone-info-bg: #eaf0f8;
  --tone-info-fg: #2b4570;
  --tone-info-line: #c8d6ea;
  --tone-accent-bg: #efe6f7;
  --tone-accent-fg: #4a2169;
  --tone-accent-line: #d8c8ea;
  --tone-mute-bg: #f2ece9;
  --tone-mute-fg: #5c5551;
  --tone-mute-line: #e0d8d4;

  /* Spine tones — a row of the spine is tinted by its compartment's tone
     (Timeline::Tones, config/compartment_tones.yml). Eight tones, a tint for the
     row (`-bg`) and the bar at its start (`-line`, a graphical object held to
     3:1). Text on a tint is the page's own text colors, measured on every tint
     in config/contrast_pairs.yml. Never the only signal: a row says its office
     in words. */
  --spine-plum-bg: #f3edf9;
  --spine-plum-line: #6d3fa8;
  --spine-green-bg: #ebf3e8;
  --spine-green-line: #3f7d2e;
  --spine-teal-bg: #e6f3f1;
  --spine-teal-line: #1f7a6c;
  --spine-blue-bg: #e9eef9;
  --spine-blue-line: #3d55a8;
  --spine-amber-bg: #f8efe0;
  --spine-amber-line: #a86a1f;
  --spine-rose-bg: #f9e9ee;
  --spine-rose-line: #b03a5c;
  --spine-slate-bg: #eeebf1;
  --spine-slate-line: #6b5c7a;
  --spine-neutral-bg: #f2eeec;
  --spine-neutral-line: #7a716c;

  /* Writing together (docs/editing_plan/09-every-screen.md, "Light and dark"). Each person in a shared draft has one of eight colors
     (Editing::PersonColor, from their party id): `--editing-person-N` is their caret and the fill of their face and their caret's label,
     whose words are `--fg-invert` (4.5:1), and it is 3:1 against every surface a field sits on; `-tint` is their selection, under the
     page's own text (4.5:1). A suggestion is underlined (an insertion) or struck through (a deletion) in its `-line` over its `-bg`,
     and a comment's words are marked in `--editing-comment-mark` (`-active` for the thread that has the focus). Never the only signal:
     a caret carries the person's name, a suggestion is <ins> or <del> with its author in words, and a mark is linked to its thread.
     Every pair is in config/contrast_pairs.yml. */
  --editing-person-1: #1d4ed8;
  --editing-person-1-tint: #dbe6fd;
  --editing-person-2: #b91c1c;
  --editing-person-2-tint: #fde2e2;
  --editing-person-3: #15803d;
  --editing-person-3-tint: #dcf3e4;
  --editing-person-4: #7e22ce;
  --editing-person-4-tint: #efe3fb;
  --editing-person-5: #c2410c;
  --editing-person-5-tint: #fde7d9;
  --editing-person-6: #0f766e;
  --editing-person-6-tint: #d9f2ee;
  --editing-person-7: #be185d;
  --editing-person-7-tint: #fbe1ec;
  --editing-person-8: #a16207;
  --editing-person-8-tint: #f8ecd2;
  --editing-insertion-bg: #dff3e4;
  --editing-insertion-line: #1f7a3a;
  --editing-deletion-bg: #fbe3e3;
  --editing-deletion-line: #b42323;
  --editing-comment-mark: #fbefc4;
  --editing-comment-mark-active: #f5dd8a;

  /* Product status tokens [extension] — 15 §2.2.
     There is deliberately no token for a hidden accommodation hold. Defining
     a color for that state would be the first step toward it appearing. */
  --st-available: #175f4e;
  --st-held-own: #602d89;
  --st-held-other: #c9c0ba;
  --st-taken: #e0d8d4;
  --st-ineligible: #f4edec;
  --st-attention: #a2701a;
  --st-error: #a03232;
  --st-confirmed: #0c4336;

  /* Meters */
  --meter-track: #ece4e0;
  --meter-fill: #602d89;

  /* The floor plan (FloorPlanComponent). A drawing is dark lines on white, and it is a document whose colors mean something
     (Facilities' hatching, a scanned page), so it sits on a white sheet in light and in dark and is never inverted: the two
     tokens are the same in both modes on purpose, and a theme that made the paper dark would hide the drawing's own lines.
     `--plan-marker` is the room's marker, 3:1 against the paper in every mode (config/contrast_pairs.yml), and the marker has
     a ring of paper around it so it is also apart from the lines it lies on. */
  --plan-paper: #ffffff;
  --plan-marker: #7030a0;

  /* ── The tesserae ────────────────────────────────────────────────────────
     Ten areas, ten tiles. The product is named for the tessera — the mosaic
     fragment, and the broken token a host and guest each kept — and the
     wordmark is already a grid of colored squares, so the rail extends the
     identity rather than decorating itself with it.

     The color is a MEMORY AID, never the only signal: every area also carries
     its name, its count and its position, so a reader who cannot separate the
     teal from the green loses nothing. Same rule the rail's current-item
     styling already follows — three signals, none of them hue alone.

     Keyed on `NavSection.id`, which is a stable key rather than the heading,
     because a heading is copy and copy gets rewritten. */
  --tess-people: #6d3fa8;
  --tess-housing: #a86a1f;
  --tess-arrival: #1f7a6c;
  --tess-support: #b03a5c;
  --tess-standards: #3d55a8;
  --tess-campus: #3f7d2e;
  --tess-events: #1f6f99;
  --tess-risk: #b03a28;
  --tess-reporting: #8a7420;
  --tess-admin: #6b5c7a;

  /* Pieces that were written into rules as literals, now tokens. */
  --on-error: #ffffff;
  --backdrop-console: #ffffff;
  --ribbon-console: #251230;
  --rail-hover: rgb(30 26 25 / 0.045);
  --photo-hairline: rgb(0 0 0 / 0.08);
  --avatar-bg: 34% 93%;
  --avatar-fg: 44% 30%;
  --avatar-line: 26% 84%;
  --avatar-staff-bg: 20% 92%;
  --avatar-staff-fg: 26% 28%;
  --avatar-staff-line: 18% 82%;
  --tsr-tile-a: #602d89;
  --tsr-tile-b: #e6def0;
  --tsr-tile-gold: #f1c46e;

  --plum: #251230;
  --on-plum: #ffffff;
  --scrim: rgb(0 0 0 / 0.55);
  --scrim-soft: rgb(0 0 0 / 0.4);
  --tsr-tile-a-inverse: #ffffff;
  --tsr-tile-b-inverse: rgb(255 255 255 / 0.28);
  --hero-panel-bg: rgb(30 14 40 / 0.82);
  --hero-panel-bg-compact: rgb(30 14 40 / 0.9);
  --hero-panel-bg-fallback: rgb(30 14 40 / 0.93);
  --hero-panel-bg-solid: rgb(30 14 40 / 0.97);
  --hero-panel-line: rgb(241 196 110 / 0.22);
  --hero-panel-rule: rgb(241 196 110 / 0.18);
  --hero-panel-shadow: 0 24px 60px -20px rgb(12 4 18 / 0.75);
  --hero-vignette: linear-gradient(180deg, rgb(20 9 27 / 0.45) 0%, rgb(20 9 27 / 0) 28%, rgb(20 9 27 / 0) 62%, rgb(20 9 27 / 0.72) 100%),
    radial-gradient(120% 90% at 62% 45%, rgb(20 9 27 / 0) 40%, rgb(20 9 27 / 0.5) 100%);

  --shadow-soft: 0 1px 2px rgb(30 26 25 / 0.04), 0 4px 14px rgb(30 26 25 / 0.05);
  --shadow-lift: 0 2px 4px rgb(30 26 25 / 0.05), 0 14px 34px rgb(30 26 25 / 0.1);
  --shadow-header: 0 1px 0 var(--rule);

  --ring-accent: 0 0 0 1px var(--accent-line);

  /* Aliases for the surface names this codebase used before the two worlds
     existed. They are declared here, on the same element as the tokens they
     point at, so a mode block that re-declares a token re-points its alias
     too. A surface that re-declares tokens on a DESCENDANT (the console) must
     declare the aliases again beside them: a custom property resolves where it
     is declared, and an alias written once up here would carry the root's
     value into the console. New code should use the `--surface-*` names. */
  --bg: var(--surface);
  --bg-soft: var(--surface-sunken);
  --bg-tint: var(--surface-tint);

  /* Thirteen more of the same, and these had never been defined at all.
     `var(--radius)` appears 68 times, `--warn` 43, `--good` 24, `--bad` 20 —
     around 250 call sites resolving to nothing, so every rule that says "a
     white card with a rounded corner" was saying nothing and the cards were
     square and transparent. Nobody saw it because a `var()` that cannot
     resolve does not warn, it just omits the declaration. */
  --radius: 6px;
  --radius-sm: 4px;
  --surface-1: var(--surface);
  --surface-2: var(--surface-sunken);
  --ink-1: var(--fg1);
  --ink-2: var(--fg2);
  --ink-3: var(--fg3);
  --mono: var(--font-mono);
  --rule-soft: var(--rule);
  --good: var(--tone-good-fg);
  --warn: var(--tone-warn-fg);
  --bad: var(--tone-bad-fg);
}

/* The person said light on a system that says dark: the browser's own
   controls and scrollbars go light with the tokens. */
:root[data-mode="light"] {
  color-scheme: light;
}

/* ── Dark ───────────────────────────────────────────────────────────────────
   The light shell in dark: a cool graphite with no warmth in it, lifted a step
   for each elevation, so a student's page in dark is a quiet neutral and not
   the console's plum. Purple is kept for what it means: the masthead is the
   brand's Deep Purple (#251230), the tints and selected wells are plum, and
   the accent is raised to #b083e0 because #602D89 on a dark field is
   invisible; the accents that carry meaning (ivy, gold, brick) are lifted to
   the same degree so they keep their identity and their contrast. The neutrals
   lean a few degrees toward violet so the purple sits in them; none leans
   warm, because a warm dark gray reads as brown beside the brand's purple.

   The two blocks below are the same declarations; edit both (the test fails
   if they differ). The console's own dark values follow them. */

/* Dark, because the system says so and the person has not said otherwise. */
@media screen and (prefers-color-scheme: dark) {
  :root:not([data-mode="light"]) {
    color-scheme: dark;

    --surface: #17171b;
    --surface-raised: #202126;
    --surface-sunken: #111114;
    --surface-inset: #0d0d10;
    --surface-tint: #292236;
    --surface-header: #251230;
    --surface-invert: #f3f2f6;
    --fg-invert: #1a1a1f;

    --fg1: #f3f2f6;
    --fg2: #cacad0;
    --fg3: #a5a5ac;
    --fg-faint: #96969e;

    --rule: #313137;
    --rule-strong: #45464d;
    --control-line: #83848d;

    --accent: #b083e0;
    --accent-hover: #c8a3ee;
    --accent-fg: #1a0f24;
    --accent-soft: #312143;
    --accent-line: #523b6d;
    --accent-text: #cbaaea;

    --gold: #f1c46e;
    --gold-bright: #f8dba2;
    --focus: #7fb0ff;
    --chrome: #251230;

    --tone-good-bg: #12291f;
    --tone-good-fg: #6fd6ae;
    --tone-good-line: #235a44;
    --tone-warn-bg: #2e2410;
    --tone-warn-fg: #f1c46e;
    --tone-warn-line: #5d4a1e;
    --tone-bad-bg: #331519;
    --tone-bad-fg: #ff9d9d;
    --tone-bad-line: #6a2b31;
    --tone-info-bg: #16223a;
    --tone-info-fg: #9fbde8;
    --tone-info-line: #2f4570;
    --tone-accent-bg: #2a1b3a;
    --tone-accent-fg: #cbaaea;
    --tone-accent-line: #4a3260;
    --tone-mute-bg: #242429;
    --tone-mute-fg: #b3b3ba;
    --tone-mute-line: #36363c;

    --spine-plum-bg: #2a1d38;
    --spine-plum-line: #b083e0;
    --spine-green-bg: #1a2a17;
    --spine-green-line: #86c96f;
    --spine-teal-bg: #14292a;
    --spine-teal-line: #4fb8a8;
    --spine-blue-bg: #19213a;
    --spine-blue-line: #8fa4e0;
    --spine-amber-bg: #2e2412;
    --spine-amber-line: #e0a458;
    --spine-rose-bg: #331a22;
    --spine-rose-line: #e07a9a;
    --spine-slate-bg: #231f29;
    --spine-slate-line: #a897b8;
    --spine-neutral-bg: #242429;
    --spine-neutral-line: #97979e;

    --editing-person-1: #93b4fb;
    --editing-person-1-tint: #1c2a4a;
    --editing-person-2: #f7a1a1;
    --editing-person-2-tint: #3d1d1f;
    --editing-person-3: #7ed9a0;
    --editing-person-3-tint: #173323;
    --editing-person-4: #cfabfa;
    --editing-person-4-tint: #2f2142;
    --editing-person-5: #f9b27a;
    --editing-person-5-tint: #3a2516;
    --editing-person-6: #6fd6c6;
    --editing-person-6-tint: #143330;
    --editing-person-7: #f4a3c8;
    --editing-person-7-tint: #3a1b2a;
    --editing-person-8: #e8c26a;
    --editing-person-8-tint: #352a12;
    --editing-insertion-bg: #163322;
    --editing-insertion-line: #5cd08a;
    --editing-deletion-bg: #3d1a1c;
    --editing-deletion-line: #f08a8a;
    --editing-comment-mark: #3a3014;
    --editing-comment-mark-active: #5a4818;

    --st-available: #4fbf9b;
    --st-held-own: #b083e0;
    --st-held-other: #626369;
    --st-taken: #36363c;
    --st-ineligible: #242429;
    --st-attention: #f1c46e;
    --st-error: #ff8a8a;
    --st-confirmed: #4fbf9b;

    --meter-track: #2e2e34;
    --meter-fill: #b083e0;

    --plan-paper: #ffffff;
    --plan-marker: #7030a0;

    --tess-people: #b083e0;
    --tess-housing: #e0a458;
    --tess-arrival: #4fb8a8;
    --tess-support: #e07a9a;
    --tess-standards: #8fa4e0;
    --tess-campus: #86c96f;
    --tess-events: #5aa9d6;
    --tess-risk: #e37b68;
    --tess-reporting: #d0bb63;
    --tess-admin: #a897b8;

    --shadow-soft: 0 1px 2px rgb(0 0 0 / 0.4), 0 6px 20px rgb(0 0 0 / 0.35);
    --shadow-lift: 0 2px 6px rgb(0 0 0 / 0.45), 0 18px 44px rgb(0 0 0 / 0.5);
    --shadow-header: 0 1px 0 var(--rule), 0 8px 24px rgb(0 0 0 / 0.35);

    --good: #6fd6ae;
    --warn: #e5b567;
    --bad: #e88b8b;

    --on-error: #2b0d0d;
    --backdrop-console: #0c0611;
    --ribbon-console: #cbaaea;
    --rail-hover: rgb(255 255 255 / 0.045);
    --photo-hairline: rgb(255 255 255 / 0.12);
    --avatar-bg: 28% 21%;
    --avatar-fg: 62% 78%;
    --avatar-line: 24% 32%;
    --avatar-staff-bg: 18% 20%;
    --avatar-staff-fg: 40% 76%;
    --avatar-staff-line: 16% 30%;
    --tsr-tile-a: #ffffff;
    --tsr-tile-b: rgb(255 255 255 / 0.28);
    --tsr-tile-gold: #f1c46e;

    --plum: #251230;
    --on-plum: #ffffff;
    --scrim: rgb(0 0 0 / 0.55);
    --scrim-soft: rgb(0 0 0 / 0.4);
    --tsr-tile-a-inverse: #ffffff;
    --tsr-tile-b-inverse: rgb(255 255 255 / 0.28);
    --hero-panel-bg: rgb(30 14 40 / 0.82);
    --hero-panel-bg-compact: rgb(30 14 40 / 0.9);
    --hero-panel-bg-fallback: rgb(30 14 40 / 0.93);
    --hero-panel-bg-solid: rgb(30 14 40 / 0.97);
    --hero-panel-line: rgb(241 196 110 / 0.22);
    --hero-panel-rule: rgb(241 196 110 / 0.18);
    --hero-panel-shadow: 0 24px 60px -20px rgb(12 4 18 / 0.75);
    --hero-vignette: linear-gradient(180deg, rgb(20 9 27 / 0.45) 0%, rgb(20 9 27 / 0) 28%, rgb(20 9 27 / 0) 62%, rgb(20 9 27 / 0.72) 100%),
      radial-gradient(120% 90% at 62% 45%, rgb(20 9 27 / 0) 40%, rgb(20 9 27 / 0.5) 100%);
  }

  /* The console, in dark. */
  :root:not([data-mode="light"]) [data-surface="console"] {
    --surface: #150c1c;
    --surface-raised: #1e1329;
    --surface-sunken: #120a18;
    --surface-inset: #0f0814;
    --surface-tint: #241734;
    --surface-header: #0c0611;
    --surface-invert: #f4edec;
    --fg-invert: #1e1a19;
    --fg1: #f6f1f8;
    --fg2: #c6b9d1;
    --fg3: #9c8cab;
    --fg-faint: #92839f;
    --rule: #2e2039;
    --rule-strong: #45344f;
    --control-line: #7a6a88;
    --accent-soft: #2a1b3a;
    --accent-line: #4a3260;
    --tone-mute-bg: #221830;
    --tone-mute-fg: #b3a5be;
    --tone-mute-line: #362745;
    --st-held-other: #6b5c78;
    --st-taken: #3a2c48;
    --st-ineligible: #221830;
    --meter-track: #2a1c38;

    /* The aliases, beside the tokens they name (see the note on the aliases above). */
    --bg: var(--surface);
    --bg-soft: var(--surface-sunken);
    --bg-tint: var(--surface-tint);
    --surface-1: var(--surface);
    --surface-2: var(--surface-sunken);
    --ink-1: var(--fg1);
    --ink-2: var(--fg2);
    --ink-3: var(--fg3);
    --rule-soft: var(--rule);
    --ring-accent: 0 0 0 1px var(--accent-line);
    --shadow-header: 0 1px 0 var(--rule), 0 8px 24px rgb(0 0 0 / 0.35);
  }
}

/* Dark, because the person said so. */
@media screen {
  :root[data-mode="dark"] {
    color-scheme: dark;

    --surface: #17171b;
    --surface-raised: #202126;
    --surface-sunken: #111114;
    --surface-inset: #0d0d10;
    --surface-tint: #292236;
    --surface-header: #251230;
    --surface-invert: #f3f2f6;
    --fg-invert: #1a1a1f;

    --fg1: #f3f2f6;
    --fg2: #cacad0;
    --fg3: #a5a5ac;
    --fg-faint: #96969e;

    --rule: #313137;
    --rule-strong: #45464d;
    --control-line: #83848d;

    --accent: #b083e0;
    --accent-hover: #c8a3ee;
    --accent-fg: #1a0f24;
    --accent-soft: #312143;
    --accent-line: #523b6d;
    --accent-text: #cbaaea;

    --gold: #f1c46e;
    --gold-bright: #f8dba2;
    --focus: #7fb0ff;
    --chrome: #251230;

    --tone-good-bg: #12291f;
    --tone-good-fg: #6fd6ae;
    --tone-good-line: #235a44;
    --tone-warn-bg: #2e2410;
    --tone-warn-fg: #f1c46e;
    --tone-warn-line: #5d4a1e;
    --tone-bad-bg: #331519;
    --tone-bad-fg: #ff9d9d;
    --tone-bad-line: #6a2b31;
    --tone-info-bg: #16223a;
    --tone-info-fg: #9fbde8;
    --tone-info-line: #2f4570;
    --tone-accent-bg: #2a1b3a;
    --tone-accent-fg: #cbaaea;
    --tone-accent-line: #4a3260;
    --tone-mute-bg: #242429;
    --tone-mute-fg: #b3b3ba;
    --tone-mute-line: #36363c;

    --spine-plum-bg: #2a1d38;
    --spine-plum-line: #b083e0;
    --spine-green-bg: #1a2a17;
    --spine-green-line: #86c96f;
    --spine-teal-bg: #14292a;
    --spine-teal-line: #4fb8a8;
    --spine-blue-bg: #19213a;
    --spine-blue-line: #8fa4e0;
    --spine-amber-bg: #2e2412;
    --spine-amber-line: #e0a458;
    --spine-rose-bg: #331a22;
    --spine-rose-line: #e07a9a;
    --spine-slate-bg: #231f29;
    --spine-slate-line: #a897b8;
    --spine-neutral-bg: #242429;
    --spine-neutral-line: #97979e;

    --editing-person-1: #93b4fb;
    --editing-person-1-tint: #1c2a4a;
    --editing-person-2: #f7a1a1;
    --editing-person-2-tint: #3d1d1f;
    --editing-person-3: #7ed9a0;
    --editing-person-3-tint: #173323;
    --editing-person-4: #cfabfa;
    --editing-person-4-tint: #2f2142;
    --editing-person-5: #f9b27a;
    --editing-person-5-tint: #3a2516;
    --editing-person-6: #6fd6c6;
    --editing-person-6-tint: #143330;
    --editing-person-7: #f4a3c8;
    --editing-person-7-tint: #3a1b2a;
    --editing-person-8: #e8c26a;
    --editing-person-8-tint: #352a12;
    --editing-insertion-bg: #163322;
    --editing-insertion-line: #5cd08a;
    --editing-deletion-bg: #3d1a1c;
    --editing-deletion-line: #f08a8a;
    --editing-comment-mark: #3a3014;
    --editing-comment-mark-active: #5a4818;

    --st-available: #4fbf9b;
    --st-held-own: #b083e0;
    --st-held-other: #626369;
    --st-taken: #36363c;
    --st-ineligible: #242429;
    --st-attention: #f1c46e;
    --st-error: #ff8a8a;
    --st-confirmed: #4fbf9b;

    --meter-track: #2e2e34;
    --meter-fill: #b083e0;

    --plan-paper: #ffffff;
    --plan-marker: #7030a0;

    --tess-people: #b083e0;
    --tess-housing: #e0a458;
    --tess-arrival: #4fb8a8;
    --tess-support: #e07a9a;
    --tess-standards: #8fa4e0;
    --tess-campus: #86c96f;
    --tess-events: #5aa9d6;
    --tess-risk: #e37b68;
    --tess-reporting: #d0bb63;
    --tess-admin: #a897b8;

    --shadow-soft: 0 1px 2px rgb(0 0 0 / 0.4), 0 6px 20px rgb(0 0 0 / 0.35);
    --shadow-lift: 0 2px 6px rgb(0 0 0 / 0.45), 0 18px 44px rgb(0 0 0 / 0.5);
    --shadow-header: 0 1px 0 var(--rule), 0 8px 24px rgb(0 0 0 / 0.35);

    --good: #6fd6ae;
    --warn: #e5b567;
    --bad: #e88b8b;

    --on-error: #2b0d0d;
    --backdrop-console: #0c0611;
    --ribbon-console: #cbaaea;
    --rail-hover: rgb(255 255 255 / 0.045);
    --photo-hairline: rgb(255 255 255 / 0.12);
    --avatar-bg: 28% 21%;
    --avatar-fg: 62% 78%;
    --avatar-line: 24% 32%;
    --avatar-staff-bg: 18% 20%;
    --avatar-staff-fg: 40% 76%;
    --avatar-staff-line: 16% 30%;
    --tsr-tile-a: #ffffff;
    --tsr-tile-b: rgb(255 255 255 / 0.28);
    --tsr-tile-gold: #f1c46e;

    --plum: #251230;
    --on-plum: #ffffff;
    --scrim: rgb(0 0 0 / 0.55);
    --scrim-soft: rgb(0 0 0 / 0.4);
    --tsr-tile-a-inverse: #ffffff;
    --tsr-tile-b-inverse: rgb(255 255 255 / 0.28);
    --hero-panel-bg: rgb(30 14 40 / 0.82);
    --hero-panel-bg-compact: rgb(30 14 40 / 0.9);
    --hero-panel-bg-fallback: rgb(30 14 40 / 0.93);
    --hero-panel-bg-solid: rgb(30 14 40 / 0.97);
    --hero-panel-line: rgb(241 196 110 / 0.22);
    --hero-panel-rule: rgb(241 196 110 / 0.18);
    --hero-panel-shadow: 0 24px 60px -20px rgb(12 4 18 / 0.75);
    --hero-vignette: linear-gradient(180deg, rgb(20 9 27 / 0.45) 0%, rgb(20 9 27 / 0) 28%, rgb(20 9 27 / 0) 62%, rgb(20 9 27 / 0.72) 100%),
      radial-gradient(120% 90% at 62% 45%, rgb(20 9 27 / 0) 40%, rgb(20 9 27 / 0.5) 100%);
  }

  /* The console, in dark. */
  :root[data-mode="dark"] [data-surface="console"] {
    --surface: #150c1c;
    --surface-raised: #1e1329;
    --surface-sunken: #120a18;
    --surface-inset: #0f0814;
    --surface-tint: #241734;
    --surface-header: #0c0611;
    --surface-invert: #f4edec;
    --fg-invert: #1e1a19;
    --fg1: #f6f1f8;
    --fg2: #c6b9d1;
    --fg3: #9c8cab;
    --fg-faint: #92839f;
    --rule: #2e2039;
    --rule-strong: #45344f;
    --control-line: #7a6a88;
    --accent-soft: #2a1b3a;
    --accent-line: #4a3260;
    --tone-mute-bg: #221830;
    --tone-mute-fg: #b3a5be;
    --tone-mute-line: #362745;
    --st-held-other: #6b5c78;
    --st-taken: #3a2c48;
    --st-ineligible: #221830;
    --meter-track: #2a1c38;

    /* The aliases, beside the tokens they name (see the note on the aliases above). */
    --bg: var(--surface);
    --bg-soft: var(--surface-sunken);
    --bg-tint: var(--surface-tint);
    --surface-1: var(--surface);
    --surface-2: var(--surface-sunken);
    --ink-1: var(--fg1);
    --ink-2: var(--fg2);
    --ink-3: var(--fg3);
    --rule-soft: var(--rule);
    --ring-accent: 0 0 0 1px var(--accent-line);
    --shadow-header: 0 1px 0 var(--rule), 0 8px 24px rgb(0 0 0 / 0.35);
  }
}

/* ── The console surface ─────────────────────────────────────────────────────
   Staff are operating a machine, and the console is the same component set at
   working size: dense, the numbers the only bright things on the page. It
   paints its own field and carries its own neutrals in each mode: plum-black
   in dark (the platform's own values, unchanged) and the brand's lavender in
   light, so the two products can still be told apart across a room.

   It overrides only the neutrals (surfaces, text, lines, the soft accent
   wells, the mute tone and the neutral status colors). Accent, gold, focus,
   the tones and the rest are the mode's, so a change there lands on both
   surfaces. The three blocks (light, and dark under each of its two
   selectors) declare the SAME tokens, because the dark selectors out-rank the
   light one and a token declared only in the light block would leak into
   dark. A custom property resolves where it is declared, so each block also
   re-declares the aliases beside the tokens they name.

   The light block is the bare `[data-surface="console"]` rule (it applies
   unless a dark rule below beats it); never add a color-scheme or a mode
   decision to it. The surface goes on <body>, which Turbo Drive replaces on
   navigation, so it cannot go stale on <html>. */
[data-surface="console"] {
  --surface: #f4f0f8;
  --surface-raised: #ffffff;
  --surface-sunken: #ebe5f2;
  --surface-inset: #ffffff;
  --surface-tint: #ede6f6;
  --surface-header: #ffffff;
  --surface-invert: #251230;
  --fg-invert: #ffffff;
  --fg1: #1f1826;
  --fg2: #4a4254;
  --fg3: #5f566a;
  --fg-faint: #6d6378;
  --rule: #ddd4e8;
  --rule-strong: #c4b8d4;
  --control-line: #857a95;
  --accent-soft: #ece3f6;
  --accent-line: #d1bfe6;
  --tone-mute-bg: #efe9f4;
  --tone-mute-fg: #574e61;
  --tone-mute-line: #ddd4e8;
  --st-held-other: #c4b8d4;
  --st-taken: #ddd4e8;
  --st-ineligible: #ebe5f2;
  --meter-track: #e4dbee;

  /* The aliases, beside the tokens they name (see the note on the aliases above). */
  --bg: var(--surface);
  --bg-soft: var(--surface-sunken);
  --bg-tint: var(--surface-tint);
  --surface-1: var(--surface);
  --surface-2: var(--surface-sunken);
  --ink-1: var(--fg1);
  --ink-2: var(--fg2);
  --ink-3: var(--fg3);
  --rule-soft: var(--rule);
  --ring-accent: 0 0 0 1px var(--accent-line);
  --shadow-header: 0 1px 0 var(--rule);

  background: var(--surface);
  color: var(--fg1);
}

/* The console paints its own field, but the document behind it is painted by
   `body` — without this the overscroll gutter and any area past the shell
   flashes the other surface's field. `:has()` keeps the decision in the one
   place that already made it, rather than requiring the root layout to know
   the route. (With `data-surface` on <body> itself, `body` already paints the
   console's `--surface` and this rule is idle.) */
body:has([data-surface="console"]) {
  background: var(--backdrop-console);
}

/* ── Reset ────────────────────────────────────────────────────────────────── */

*,
*::before,
*::after {
  box-sizing: border-box;
}

html {
  -webkit-text-size-adjust: 100%;
}

body {
  margin: 0;
  background: var(--surface);
  color: var(--fg1);
  font-family: var(--font-sans);
  font-size: 1rem;
  line-height: 1.55;
  font-variant-ligatures: common-ligatures;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}

/* ── Typography ───────────────────────────────────────────────────────────
   Sentence case headlines, per brand standard. "Your room is confirmed."
   Not "Your Room Is Confirmed." */

h1,
h2,
h3,
h4 {
  font-family: var(--font-display);
  font-weight: 500;
  letter-spacing: -0.02em;
  line-height: 1.05;
  text-wrap: balance;
  color: var(--fg1);
  margin: 0;
}

h1 {
  font-size: clamp(2rem, 1.2rem + 2.6vw, 3.25rem);
}
h2 {
  font-size: clamp(1.5rem, 1.1rem + 1.3vw, 2rem);
}
h3 {
  font-size: 1.5rem;
}
h4 {
  font-size: 1.125rem;
}

p {
  margin: 0;
}

a {
  color: var(--accent-text);
  text-underline-offset: 0.18em;
  text-decoration-thickness: 1px;
}
a:hover {
  color: var(--accent-hover);
}

/* The brand's signature typographic moment. Gelasio italic is what makes the
   match reveal read as a letter rather than a database record. In a product
   where the alternative is a compatibility percentage, an italic serif
   sentence is the more humane choice. */
.lede {
  font-family: var(--font-display);
  font-style: italic;
  font-weight: 400;
  font-size: clamp(1.125rem, 1rem + 0.55vw, 1.4rem);
  line-height: 1.5;
  letter-spacing: 0;
  color: var(--fg2);
  text-wrap: pretty;
}

/* Raised from 0.6875rem/#8E8884 — an eyebrow that a marker can't read is
   decoration, and these carry the only label some tiles have. */
.eyebrow {
  font-family: var(--font-sans);
  font-size: 0.72rem;
  font-weight: 700;
  letter-spacing: 0.13em;
  text-transform: uppercase;
  color: var(--fg3);
}

.eyebrow-accent {
  color: var(--accent-text);
}

/* Tabular numerals everywhere numbers matter — lottery numbers, occupancy
   counts, hold countdowns, charge amounts. A countdown that shifts width as it
   ticks is a small, constant irritation at the worst possible moment. */
.tnum {
  font-variant-numeric: tabular-nums;
  font-feature-settings: "tnum" 1;
}

.prose-body {
  max-width: 66ch;
  color: var(--fg2);
  line-height: 1.62;
}

/* Numbers set in the display face, which is where the editorial character of
   this interface actually lives. Used for every headline figure. */
.figure {
  font-family: var(--font-display);
  font-weight: 500;
  letter-spacing: -0.025em;
  line-height: 0.95;
  font-variant-numeric: tabular-nums;
  color: var(--fg1);
}

/* ── The brand rule ───────────────────────────────────────────────────────
   With no glyph in the lock-up, this hairline is the mark. It appears above
   the wordmark, above section heads, and nowhere else — a rule that shows up
   in arbitrary places stops reading as identity. */
.brand-rule {
  display: block;
  width: 26px;
  height: 2px;
  background: var(--gold);
  border-radius: 2px;
}

/* ── The wordmark ────────────────────────────────────────────────────────── */

.hc-wordmark {
  display: inline-block;
  line-height: 1.05;
}
.hc-wordmark-rule {
  display: block;
  width: 24px;
  height: 2px;
  margin-bottom: 0.42rem;
  border-radius: 2px;
  background: var(--gold-bright);
  transition: width 260ms cubic-bezier(0.16, 1, 0.3, 1);
}
.hc-brandlink {
  color: inherit;
  text-decoration: none;
  display: inline-block;
}
/* The one flourish the mark gets: the rule draws out to the width of the
   wordmark on hover. Nothing moves, nothing reflows. */
.hc-brandlink:hover .hc-wordmark-rule,
.hc-brandlink:focus-visible .hc-wordmark-rule {
  width: 100%;
}
.hc-brandlink:hover {
  color: inherit;
}

/* ── Focus. Deliberately off-brand so it is never mistaken for decoration. ── */
:focus-visible {
  outline: 2px solid var(--focus);
  outline-offset: 2px;
  border-radius: 3px;
}
:focus:not(:focus-visible) {
  outline: none;
}

/* ═══════════════════════════════════════════════════════════════════════════
   COMPONENTS

   Every rule below reads semantic tokens only. That is what lets the console
   exist without a second stylesheet — and it is also the reason a new status
   color has to be added to the tone scale rather than dropped inline.
   ═══════════════════════════════════════════════════════════════════════════ */

/* ── Buttons ─────────────────────────────────────────────────────────────── */

.btn {
  --btn-bg: var(--accent);
  --btn-fg: var(--accent-fg);
  --btn-border: transparent;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
  padding: 0.62rem 1.3rem;
  border-radius: 999px;
  border: 1px solid var(--btn-border);
  background: var(--btn-bg);
  color: var(--btn-fg);
  font-family: var(--font-sans);
  font-size: 0.875rem;
  font-weight: 650;
  line-height: 1.2;
  cursor: pointer;
  text-decoration: none;
  transition:
    background-color 140ms ease,
    border-color 140ms ease,
    color 140ms ease,
    box-shadow 140ms ease,
    transform 140ms ease;
  white-space: nowrap;
}
.btn:hover:where(:not(:disabled, [aria-disabled="true"])) {
  background: var(--accent-hover);
  color: var(--btn-fg);
  box-shadow: var(--shadow-soft);
}
.btn:active {
  transform: translateY(1px);
  box-shadow: none;
}
.btn:disabled,
.btn[aria-disabled="true"] {
  background: var(--tone-mute-bg);
  color: var(--fg-faint);
  border-color: transparent;
  cursor: not-allowed;
  transform: none;
  box-shadow: none;
}

.btn-secondary {
  --btn-bg: transparent;
  --btn-fg: var(--accent-text);
  --btn-border: var(--rule-strong);
}
.btn-secondary:hover:where(:not(:disabled, [aria-disabled="true"])) {
  background: var(--accent-soft);
  color: var(--accent-text);
  border-color: var(--accent-line);
  box-shadow: none;
}

.btn-quiet {
  --btn-bg: transparent;
  --btn-fg: var(--fg2);
  --btn-border: transparent;
  padding: 0.42rem 0.72rem;
  font-weight: 550;
}
.btn-quiet:hover:where(:not(:disabled, [aria-disabled="true"])) {
  background: var(--surface-sunken);
  color: var(--fg1);
  box-shadow: none;
}

.btn-danger {
  --btn-bg: var(--st-error);
  --btn-fg: var(--on-error);
}
.btn-danger:hover:where(:not(:disabled, [aria-disabled="true"])) {
  background: var(--st-error);
  filter: brightness(0.88);
  box-shadow: var(--shadow-soft);
}

/* In the console, break-glass is not the primary action.
   A solid salmon slab on a near-black field is the brightest object on the
   page, which puts "pause everything" in permanent visual competition with
   the live figures the page exists to show. Bordered at rest, solid the
   moment the pointer or keyboard is on it — still unmistakably the red
   button, no longer the loudest thing in the room. */
[data-surface="console"] .btn-danger {
  --btn-bg: var(--tone-bad-bg);
  --btn-fg: var(--tone-bad-fg);
  --btn-border: var(--tone-bad-line);
}
[data-surface="console"] .btn-danger:is(:hover, :focus-visible):where(:not(:disabled, [aria-disabled="true"])) {
  background: var(--st-error);
  color: var(--on-error);
  border-color: var(--st-error);
  filter: none;
}

.btn-sm {
  padding: 0.36rem 0.9rem;
  font-size: 0.8125rem;
}
.btn-lg {
  padding: 0.82rem 1.8rem;
  font-size: 0.95rem;
}

/* ── Surfaces ────────────────────────────────────────────────────────────── */

.card {
  background: var(--surface-raised);
  border: 1px solid var(--rule);
  border-radius: var(--radius-md);
}

.card-soft {
  background: var(--surface-sunken);
  border: 1px solid transparent;
  border-radius: var(--radius-md);
}

/* A club that has its own mark gets it at full bleed: the figure runs to the
   card's top, bottom and left edges, and the details sit to its right. The
   source images are 100px squares, so the column is sized to show them at
   their own size rather than upscaled — and the same image, blurred and
   enlarged, fills the column behind so a square logo reaches the edges without
   being cropped. A club with no mark of its own keeps the plain card. */
.club-card {
  display: grid;
  grid-template-columns: 6.5rem minmax(0, 1fr);
  overflow: hidden;
}
.club-card-figure {
  position: relative;
  min-height: 6.5rem;
  overflow: hidden;
  background: var(--surface-sunken);
  border-right: 1px solid var(--rule);
}
.club-card-figure img {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: contain;
  padding: 0.6rem;
  box-sizing: border-box;
}
.club-card-figure .club-card-backdrop {
  object-fit: cover;
  padding: 0;
  transform: scale(1.4);
  filter: blur(14px) saturate(1.3);
  opacity: 0.55;
}
.club-card-body {
  display: flex;
  flex-direction: column;
  min-width: 0;
  padding: 1.05rem 1.25rem 1.05rem 1.1rem;
}

/* The finder above the shelves: one search field, then rows of toggles. Chips
   are buttons, so they take focus and announce their state; `aria-pressed`
   drives the on-state rather than a class alone. */
.club-finder {
  display: grid;
  gap: 0.6rem;
  margin: 0 0 2rem;
}
.club-finder-input {
  width: 100%;
  box-sizing: border-box;
  font: inherit;
  font-size: 1rem;
  padding: 0.8rem 1rem;
  color: var(--fg1);
  background: var(--surface-raised);
  border: 1px solid var(--rule);
  border-radius: var(--radius-md);
}
.club-finder-input:focus {
  outline: 2px solid var(--accent);
  outline-offset: 1px;
}
.club-finder-row {
  display: flex;
  flex-wrap: wrap;
  gap: 0.4rem;
  align-items: center;
}
.club-finder-sep {
  width: 1px;
  height: 1.2rem;
  background: var(--rule);
  margin: 0 0.3rem;
}
.club-finder-chip {
  font: inherit;
  font-size: 0.8125rem;
  line-height: 1;
  padding: 0.45rem 0.7rem;
  color: var(--fg2);
  background: var(--surface-raised);
  border: 1px solid var(--control-line);
  border-radius: 999px;
  cursor: pointer;
}
.club-finder-chip:hover {
  color: var(--fg1);
  border-color: var(--fg3);
}
.club-finder-chip.is-on {
  color: var(--accent-fg);
  background: var(--accent);
  border-color: var(--accent);
}
.club-finder-n {
  opacity: 0.7;
  margin-left: 0.25rem;
}

/* ── What's on: lanes of event cards ─────────────────────────────────────────
   A lane scrolls sideways and snaps a card at a time. Cards are a fixed width
   so the lane reads as a row of the same thing; the photo is the listing's own
   on the source's host, at the 720×380 CampusGroups uses, so the aspect ratio
   is fixed rather than measured. A card with no photo gets a band in the
   lane's colour so the row keeps its rhythm. */
.lane {
  display: flex;
  gap: 0.85rem;
  overflow-x: auto;
  scroll-snap-type: x proximity;
  padding: 0.15rem 0.15rem 0.9rem;
  margin: 0 -0.15rem;
  scrollbar-width: thin;
}
.event-card {
  flex: 0 0 15.5rem;
  min-width: 0;
  display: flex;
  flex-direction: column;
  overflow: hidden;
  scroll-snap-align: start;
  text-decoration: none;
  color: inherit;
}
.event-card:hover {
  border-color: var(--fg3);
}
.event-card-img,
.event-card-band {
  display: block;
  width: 100%;
  aspect-ratio: 720 / 380;
  object-fit: cover;
  background: var(--surface-sunken);
  border-bottom: 1px solid var(--rule);
}
.event-card-band {
  background: linear-gradient(135deg, var(--accent) 0%, var(--surface-sunken) 140%);
  opacity: 0.35;
}
.event-card-body {
  padding: 0.8rem 0.95rem 0.9rem;
  display: flex;
  flex-direction: column;
  gap: 0.3rem;
  flex: 1;
}
.event-card-when {
  font-size: 0.75rem;
  color: var(--fg3);
  letter-spacing: 0.02em;
}
.event-card-title {
  font-size: 0.9375rem;
  font-weight: 650;
  line-height: 1.3;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}
.event-card-meta {
  font-size: 0.75rem;
  color: var(--fg2);
  line-height: 1.45;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}
.lane-today .event-card {
  flex-basis: 13rem;
}
.lane-more {
  margin-left: auto;
  font-size: 0.8125rem;
  white-space: nowrap;
}

.panel {
  background: var(--surface-raised);
  border: 1px solid var(--rule);
  border-radius: var(--radius-md);
  box-shadow: var(--shadow-soft);
}

/* A card that is also a link. The arrow moves, the surface lifts, and the
   whole thing is one hit target — three affordances that the old flat card
   left to the cursor to discover. */
.tile {
  position: relative;
  display: grid;
  gap: 0.5rem;
  align-content: start;
  padding: 1.35rem 1.4rem 1.45rem;
  background: var(--surface-raised);
  border: 1px solid var(--rule);
  border-radius: var(--radius-md);
  text-decoration: none;
  color: inherit;
  overflow: hidden;
  transition:
    transform 180ms cubic-bezier(0.16, 1, 0.3, 1),
    box-shadow 180ms ease,
    border-color 180ms ease;
}
/* The accent edge is the hover signal that survives greyscale and low vision:
   it changes size, not just color. */
.tile::before {
  content: "";
  position: absolute;
  left: 0;
  top: 0;
  bottom: 0;
  width: 3px;
  background: var(--accent);
  transform: scaleY(0);
  transform-origin: 50% 0;
  transition: transform 220ms cubic-bezier(0.16, 1, 0.3, 1);
}
.tile:hover,
.tile:focus-visible {
  transform: translateY(-2px);
  box-shadow: var(--shadow-lift);
  border-color: var(--accent-line);
}
.tile:hover::before,
.tile:focus-visible::before {
  transform: scaleY(1);
}
.tile-title {
  font-family: var(--font-display);
  font-size: 1.28rem;
  font-weight: 500;
  letter-spacing: -0.015em;
  line-height: 1.15;
  color: var(--fg1);
}
.tile-body {
  font-size: 0.8125rem;
  color: var(--fg2);
  line-height: 1.5;
}
.tile-more {
  margin-top: 0.2rem;
  font-size: 0.75rem;
  font-weight: 650;
  color: var(--accent-text);
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
}
.tile-more::after {
  content: "→";
  transition: transform 200ms cubic-bezier(0.16, 1, 0.3, 1);
}
.tile:hover .tile-more::after {
  transform: translateX(3px);
}
/* Only spans once there is more than one column to span. At phone width the
   grid is a single column and `span 2` would push the tile out of the grid. */
.tile-wide {
  grid-column: span 1;
}
@media (min-width: 860px) {
  .tile-wide {
    grid-column: span 2;
  }
}

/* ── Persona cards (sign-in) ─────────────────────────────────────────────
   Twelve cards that were visually identical, for two products that are not.
   The ribbon along the top edge is the destination's own color: purple for
   the student surfaces, the console's near-black plum for staff. */

.persona-card {
  position: relative;
  display: grid;
  gap: 0.75rem;
  align-content: start;
  text-align: left;
  padding: 1.3rem 1.3rem 1.35rem;
  background: var(--surface-raised);
  border: 1px solid var(--rule);
  border-radius: var(--radius-md);
  font: inherit;
  color: inherit;
  cursor: pointer;
  overflow: hidden;
  transition:
    transform 180ms cubic-bezier(0.16, 1, 0.3, 1),
    box-shadow 180ms ease,
    border-color 180ms ease;
}
.persona-card:disabled {
  cursor: wait;
}
.persona-ribbon {
  position: absolute;
  inset: 0 0 auto 0;
  height: 3px;
  background: var(--accent);
  transform: scaleX(0.18);
  transform-origin: 0 50%;
  transition: transform 260ms cubic-bezier(0.16, 1, 0.3, 1);
}
.persona-card[data-kind="staff"] .persona-ribbon {
  background: var(--ribbon-console);
}
.persona-card:hover,
.persona-card:focus-visible {
  transform: translateY(-3px);
  box-shadow: var(--shadow-lift);
  border-color: var(--accent-line);
}
.persona-card:hover .persona-ribbon,
.persona-card:focus-visible .persona-ribbon {
  transform: scaleX(1);
}
.persona-head {
  display: flex;
  align-items: center;
  gap: 0.8rem;
}
.persona-situation {
  display: block;
  font-size: 0.8125rem;
  color: var(--fg2);
  line-height: 1.5;
  border-top: 1px solid var(--rule);
  padding-top: 0.75rem;
}
.persona-cta {
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
  font-size: 0.75rem;
  font-weight: 700;
  color: var(--fg-faint);
  transition: color 180ms ease;
}
.persona-cta::after {
  content: "→";
  transition: transform 200ms cubic-bezier(0.16, 1, 0.3, 1);
}
.persona-card:hover .persona-cta,
.persona-card:focus-visible .persona-cta {
  color: var(--accent-text);
}
.persona-card:hover .persona-cta::after {
  transform: translateX(3px);
}

/* ── Stat tiles ──────────────────────────────────────────────────────────
   The staff KPI row and the hero figures. The number leads at display size,
   the label sits under it in small caps, and an optional note explains the
   number rather than making the reader infer it. */

.stat {
  display: grid;
  gap: 0.3rem;
  align-content: start;
  padding: 1.1rem 1.2rem 1.15rem;
  background: var(--surface-raised);
  border: 1px solid var(--rule);
  border-radius: var(--radius-md);
  position: relative;
  overflow: hidden;
}
.stat-value {
  font-family: var(--font-display);
  font-size: clamp(1.75rem, 1.4rem + 1.1vw, 2.3rem);
  font-weight: 500;
  letter-spacing: -0.03em;
  line-height: 1;
  font-variant-numeric: tabular-nums;
  color: var(--fg1);
}
.stat-label {
  font-size: 0.7rem;
  font-weight: 700;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--fg3);
}
.stat-note {
  font-size: 0.75rem;
  color: var(--fg-faint);
  line-height: 1.4;
}
/* Tone variants tint the value and lay a hairline along the top edge, so a
   row of five tiles reads its own priority order at a glance. */
.stat-good .stat-value {
  color: var(--tone-good-fg);
}
.stat-warn .stat-value {
  color: var(--tone-warn-fg);
}
.stat-bad .stat-value {
  color: var(--tone-bad-fg);
}
.stat-accent .stat-value {
  color: var(--accent-text);
}
.stat-good::after,
.stat-warn::after,
.stat-bad::after,
.stat-accent::after {
  content: "";
  position: absolute;
  inset: 0 0 auto 0;
  height: 2px;
}
.stat-good::after {
  background: var(--tone-good-fg);
}
.stat-warn::after {
  background: var(--tone-warn-fg);
}
.stat-bad::after {
  background: var(--tone-bad-fg);
}
.stat-accent::after {
  background: var(--accent);
}

/* ── Avatars ─────────────────────────────────────────────────────────────
   The hue arrives from the component as `--av-h`; the saturation and
   lightness that make it legible are the `--avatar-*` tokens (a pair such as
   `34% 93%`), which the MODE decides: pale in light, deep in dark, on either
   surface. The monogram holds 4.5:1 at every hue in both modes. */

.avatar {
  flex-shrink: 0;
  border-radius: 50%;
  display: grid;
  place-items: center;
  font-weight: 700;
  letter-spacing: 0.01em;
  background: hsl(var(--av-h) var(--avatar-bg));
  color: hsl(var(--av-h) var(--avatar-fg));
  border: 1px solid hsl(var(--av-h) var(--avatar-line));
}
.avatar-staff {
  background: hsl(var(--av-h) var(--avatar-staff-bg));
  color: hsl(var(--av-h) var(--avatar-staff-fg));
  border-color: hsl(var(--av-h) var(--avatar-staff-line));
}

/* ── Photographic avatars ────────────────────────────────────────────────
   Local development only (`ATRIUM_PHOTOS=1`); the shipped product renders the
   monogram above. The treatment is deliberately quiet: a card photograph is
   evidence, not decoration, so it gets a circle, a hairline, and nothing else.

   `overflow: hidden` on a circle plus `object-fit: cover` is what stops a
   4:3 ID photo from being squashed into an oval — the single most common way
   this goes wrong. `object-position: 50% 30%` favors the upper third, because
   an ID photograph puts the face high in the frame and a center crop takes the
   chin off. */

.avatar-photo {
  overflow: hidden;
  /* --bg2 has never existed, so this declaration was dropped and the avatar
     sat on whatever was behind it. Visible only while a photograph is loading
     or missing, which is why nobody caught it. */
  background: var(--bg-soft);
  border-color: var(--rule);
  /* The monogram's grid centering would letterbox the image. */
  display: block;
  position: relative;
}
.avatar-photo img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: 50% 30%;
  display: block;
  border-radius: inherit;
}
/* An inner hairline over the photograph itself. Without it a pale background in
   the picture bleeds into a pale page and the circle loses its edge. */
.avatar-photo::after {
  content: "";
  position: absolute;
  inset: 0;
  border-radius: inherit;
  box-shadow: inset 0 0 0 1px var(--photo-hairline);
  pointer-events: none;
}

/* The one face a page is about — a student's own photo on their own record.
   Gold, because that is the accent this product uses to say "this one". */
.avatar-ring {
  box-shadow:
    0 0 0 2px var(--bg),
    0 0 0 3px var(--gold-bright);
}

/* ── Pills ───────────────────────────────────────────────────────────────
   Never color-only. Every state carries a text label, and the callers pair
   these with an icon — roughly 8% of the student body cannot rely on hue. */

.pill {
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
  padding: 0.22rem 0.62rem;
  border-radius: 999px;
  border: 1px solid transparent;
  font-size: 0.75rem;
  font-weight: 650;
  line-height: 1.4;
  letter-spacing: 0.01em;
  white-space: nowrap;
}

.pill-available {
  background: var(--tone-good-bg);
  color: var(--tone-good-fg);
  border-color: var(--tone-good-line);
}
.pill-held {
  background: var(--tone-accent-bg);
  color: var(--tone-accent-fg);
  border-color: var(--tone-accent-line);
}
.pill-taken {
  background: var(--tone-mute-bg);
  color: var(--tone-mute-fg);
  border-color: var(--tone-mute-line);
}
.pill-attention {
  background: var(--tone-warn-bg);
  color: var(--tone-warn-fg);
  border-color: var(--tone-warn-line);
}

/* Same tone as .pill-attention, and it exists because .pill-warn did not.
   /staff/crm/integration and the risk-appetite pills both used it, so an
   unstyled gray pill was rendering where a warning tone was intended — on the
   risk register that inverted the reading, because `averse`, the strongest
   safety posture, came out gray while `cautious` came out green. */
.pill-warn {
  background: var(--tone-warn-bg);
  color: var(--tone-warn-fg);
  border-color: var(--tone-warn-line);
}
.pill-error {
  background: var(--tone-bad-bg);
  color: var(--tone-bad-fg);
  border-color: var(--tone-bad-line);
}
.pill-info {
  background: var(--tone-info-bg);
  color: var(--tone-info-fg);
  border-color: var(--tone-info-line);
}
.pill-neutral {
  background: var(--tone-mute-bg);
  color: var(--tone-mute-fg);
  border-color: var(--tone-mute-line);
}

/* ── Callout ─────────────────────────────────────────────────────────────
   The bordered notice that pages were building by hand out of five hardcoded
   hexes each. One class, four tones, both worlds. */

.callout {
  --callout-bg: var(--tone-mute-bg);
  --callout-fg: var(--tone-mute-fg);
  --callout-line: var(--tone-mute-line);
  display: grid;
  gap: 0.45rem;
  padding: 1rem 1.15rem;
  border-radius: var(--radius-md);
  border: 1px solid var(--callout-line);
  border-left-width: 3px;
  background: var(--callout-bg);
  color: var(--callout-fg);
  font-size: 0.875rem;
  line-height: 1.55;
}
.callout-good {
  --callout-bg: var(--tone-good-bg);
  --callout-fg: var(--tone-good-fg);
  --callout-line: var(--tone-good-line);
}
.callout-warn {
  --callout-bg: var(--tone-warn-bg);
  --callout-fg: var(--tone-warn-fg);
  --callout-line: var(--tone-warn-line);
}
.callout-bad {
  --callout-bg: var(--tone-bad-bg);
  --callout-fg: var(--tone-bad-fg);
  --callout-line: var(--tone-bad-line);
}
.callout-info {
  --callout-bg: var(--tone-info-bg);
  --callout-fg: var(--tone-info-fg);
  --callout-line: var(--tone-info-line);
}
.callout-accent {
  --callout-bg: var(--tone-accent-bg);
  --callout-fg: var(--tone-accent-fg);
  --callout-line: var(--tone-accent-line);
}
.callout strong {
  font-weight: 700;
}

/* ── Meters ──────────────────────────────────────────────────────────────
   Occupancy fill, round progress, hall capacity. Rounded track, rounded fill,
   and a minimum fill width so "1 of 400" is still visible as a sliver rather
   than reading as zero. */

.meter {
  /* display:block, and it was missing. A <span class="meter"> is inline, so
     the height below is ignored and the bar paints nothing at all. Every call
     site until now happened to be a grid or flex child, which blockified it by
     accident — the first one that was not rendered an invisible meter. */
  display: block;
  position: relative;
  height: 6px;
  border-radius: 999px;
  background: var(--meter-track);
  overflow: hidden;
}
.meter > span {
  display: block;
  height: 100%;
  min-width: 2px;
  border-radius: 999px;
  background: var(--meter-fill);
  transition: width 420ms cubic-bezier(0.16, 1, 0.3, 1);
}
.meter-good > span {
  background: var(--st-available);
}
.meter-warn > span {
  background: var(--st-attention);
}
.meter-bad > span {
  background: var(--st-error);
}
.meter-lg {
  height: 10px;
}

/* ── Section heads ───────────────────────────────────────────────────────
   Title, an optional count, a rule that eats the remaining width, and an
   action parked at the far end. Repeated on nine pages; was hand-built with
   inline flex on each of them. */

.section-head {
  display: flex;
  align-items: baseline;
  gap: 0.9rem;
  margin-bottom: 1.15rem;
}
.section-head > h2,
.section-head > h3 {
  font-size: 1.3rem;
}
.section-head-rule {
  flex: 1;
  border-top: 1px solid var(--rule);
  transform: translateY(-0.3em);
}
.section-head-count {
  font-size: 0.75rem;
  font-weight: 650;
  color: var(--fg-faint);
  font-variant-numeric: tabular-nums;
}

/* ── Tables ──────────────────────────────────────────────────────────────── */

table.data {
  width: 100%;
  border-collapse: collapse;
  font-size: 0.875rem;
  color: var(--fg1);
}
table.data th {
  text-align: left;
  font-size: 0.68rem;
  font-weight: 700;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--fg3);
  padding: 0.6rem 0.75rem;
  border-bottom: 1px solid var(--rule-strong);
  white-space: nowrap;
  background: var(--surface);
  position: sticky;
  top: 0;
  z-index: 1;
}
table.data td {
  padding: 0.68rem 0.75rem;
  border-bottom: 1px solid var(--rule);
  vertical-align: top;
}
table.data tbody tr {
  transition: background-color 120ms ease;
}
table.data tbody tr:hover {
  background: var(--surface-tint);
}
table.data td.num,
table.data th.num {
  text-align: right;
  font-variant-numeric: tabular-nums;
}
/* A table inside a panel gets the panel's surface behind its sticky header,
   otherwise the header goes transparent as rows scroll under it. */
.panel table.data th,
.card table.data th {
  background: var(--surface-raised);
}

/* ── Forms ───────────────────────────────────────────────────────────────── */

/* Every text-like control, including an <input> with no type attribute and
   the date, time and telephone kinds. The first version of this list named
   four types, so a bare <input> and every date picker rendered with no border
   and no inset — the record's Subject field read as a line of plain text.
   The shared min-height is what lets a select sit level with an input. The
   edge is `--control-line`, 3:1 against every ground in both modes and on both
   surfaces (WCAG 1.4.11): `--rule-strong` is for structure, and measured 1.7
   to 2.0 to 1 as a control's edge. test/styles/control_edges_test.rb holds it. */
input:not([type]),
input[type="text"],
input[type="email"],
input[type="search"],
input[type="number"],
input[type="tel"],
input[type="url"],
input[type="password"],
input[type="date"],
input[type="datetime-local"],
input[type="time"],
input[type="month"],
textarea,
select {
  font-family: var(--font-sans);
  font-size: 0.9375rem;
  line-height: 1.3;
  color: var(--fg1);
  background: var(--surface-inset);
  border: 1px solid var(--control-line);
  border-radius: var(--radius-sm);
  padding: 0.55rem 0.75rem;
  min-height: 2.5rem;
  width: 100%;
  transition:
    border-color 140ms ease,
    box-shadow 140ms ease;
}
textarea {
  resize: vertical;
  min-height: 4.5rem;
}
input[type="file"] {
  font-family: var(--font-sans);
  font-size: 0.8125rem;
  color: var(--fg2);
}
input::placeholder,
textarea::placeholder {
  color: var(--fg-faint);
}
input:focus,
textarea:focus,
select:focus {
  border-color: var(--accent);
  box-shadow: var(--ring-accent);
}
input[type="checkbox"],
input[type="radio"] {
  accent-color: var(--accent);
}

/* The clean-up menu beside a compose textarea. A popover of five rewrites;
   the status line afterwards carries Undo. Global because the component is
   shared across the record, the views and the parties console. */
.rw {
  position: relative;
  display: inline-flex;
  gap: 0.5rem;
  align-items: center;
  flex-wrap: wrap;
}
.rw-menu {
  position: absolute;
  top: calc(100% + 0.3rem);
  left: 0;
  /* Above the tables' sticky header rows (which sit at 10–20) and below the
     assistant's pill (45), so the menu is never cut by a column heading. */
  z-index: 40;
  min-width: 17rem;
  background: var(--surface-raised);
  border: 1px solid var(--rule);
  border-radius: var(--radius-md);
  box-shadow: var(--shadow-soft);
  padding: 0.35rem;
  display: grid;
  gap: 0.1rem;
}
/* The sheet animates in with a transform, which leaves it a stacking context
   of its own at z-index auto — so a popover inside it, whatever its own
   z-index, paints under the timeline's sticky column headings (30) that sit
   in the page's context. While a menu is open the host is lifted above them;
   the moment it closes the host drops back and the headings stick as before. */
.sheet:has(.rw-menu),
.fade-up:has(.rw-menu) {
  position: relative;
  z-index: 41;
}
.rw-item {
  display: grid;
  gap: 0.1rem;
  text-align: left;
  padding: 0.45rem 0.6rem;
  border: 0;
  background: transparent;
  border-radius: var(--radius-sm);
  color: var(--fg1);
  font: inherit;
  font-size: 0.875rem;
  cursor: pointer;
}
.rw-item:hover,
.rw-item:focus-visible {
  background: var(--surface-inset);
}
.rw-item span {
  font-size: 0.75rem;
  color: var(--fg3);
}

hr {
  border: 0;
  border-top: 1px solid var(--rule);
  margin: 0;
}

/* Tailwind's preflight strips list markers from every ol and ul, which is
   right for the dozen lists here that are really layout. It was silently wrong
   for the three that are prose — the selection-day runbook rendered as five
   unnumbered sentences, which is not a runbook. */
.list-marked {
  list-style: revert;
}
.list-marked li::marker {
  color: var(--fg-faint);
  font-weight: 600;
}

code {
  font-family: var(--font-mono);
  color: var(--fg1);
}

/* ── Scrollbars in the console ───────────────────────────────────────────
   A default light scrollbar down the side of a dark console is the single
   loudest thing on the page. */
[data-surface="console"] * {
  scrollbar-color: var(--rule-strong) transparent;
  scrollbar-width: thin;
}

/* ── Motion. Used where it clarifies state, never as decoration. ────────── */
@keyframes hc-fade-up {
  from {
    opacity: 0;
    transform: translateY(8px);
  }
  to {
    opacity: 1;
    transform: none;
  }
}
.fade-up {
  animation: hc-fade-up 480ms cubic-bezier(0.16, 1, 0.3, 1) both;
}

@keyframes hc-pulse {
  0%,
  100% {
    opacity: 1;
  }
  50% {
    opacity: 0.35;
  }
}
.live-dot {
  animation: hc-pulse 2s ease-in-out infinite;
}

/* A live figure that has just changed. Used by the selection-day console,
   which repaints every five seconds — without this the numbers change while
   nobody is looking at them. */
@keyframes hc-tick {
  from {
    background: var(--tone-accent-bg);
  }
  to {
    background: transparent;
  }
}
.tick {
  animation: hc-tick 1.2s ease-out both;
  border-radius: 3px;
}

@media (prefers-reduced-motion: reduce) {
  *,
  *::before,
  *::after {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
    scroll-behavior: auto !important;
  }
}

/* ── Utility ─────────────────────────────────────────────────────────────── */
.sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}

/* Off the START edge, which is the side of the page that never scrolls in either direction. `left: -9999px` was off the left edge, which in a right-to-left page is the END, where overflow
   scrolls: the page was 11,000px wide and a keyboard user's skip link had made it scroll sideways (WCAG 1.4.10). */
.skip-link {
  position: absolute;
  inset-inline-start: -9999px;
  inset-block-start: 0;
  z-index: 100;
  background: var(--accent);
  color: var(--accent-fg);
  padding: 0.75rem 1.25rem;
  border-end-end-radius: 4px;
}
.skip-link:focus {
  inset-inline-start: 0;
}
/* Same override as `.ap-go`, and it matters more here: this is the control a
   keyboard user lands on first. It is reachable by pointer once focused. */
.skip-link:hover {
  background: var(--accent-hover);
  color: var(--accent-fg);
}

::selection {
  background: var(--tone-accent-bg);
  color: var(--tone-accent-fg);
}

/* ── Layout primitives ────────────────────────────────────────────────────
   Mobile-first for student surfaces, desktop-first for staff, per 15 §5.1.
   These exist as classes rather than inline styles specifically because the
   collapse is a media query, and inline styles cannot express one. */

.split {
  display: grid;
  gap: clamp(1.5rem, 4vw, 3rem);
  align-items: start;
  grid-template-columns: 1fr;
}

.cards {
  display: grid;
  gap: 1rem;
  grid-template-columns: 1fr;
}

.stats {
  display: grid;
  gap: 1rem;
  grid-template-columns: repeat(2, minmax(0, 1fr));
}

.filters {
  display: flex;
  gap: 0.75rem;
  align-items: flex-end;
  flex-wrap: wrap;
}

/* Editorial asymmetry is a desktop affordance. Below 860px everything stacks,
   because a 1.6fr/1fr split at 390px is two unreadable columns. */
@media (min-width: 860px) {
  .split {
    grid-template-columns: minmax(0, 1.55fr) minmax(0, 1fr);
  }
  .split-wide {
    grid-template-columns: minmax(0, 1.9fr) minmax(0, 1fr);
  }
  .split-even {
    grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
  }
  .split-reverse {
    grid-template-columns: minmax(0, 1fr) minmax(0, 1.4fr);
  }
  .cards {
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  }
  .stats {
    grid-template-columns: repeat(auto-fit, minmax(170px, 1fr));
  }
}

@media (max-width: 859px) {
  /* Sticky elements eat a phone screen. */
  .panel-sticky {
    position: static !important;
  }
  /* Dense staff tables get a horizontal scroll rather than a squeezed grid. */
  table.data {
    min-width: 640px;
  }
  /* A sticky header inside a sideways scroller sticks to the wrong axis. */
  table.data th {
    position: static;
  }
}

/* A row that becomes a stack: used by the room list and the review queue,
   where four columns at desktop is one legible block at phone width. */
.row-4 {
  display: grid;
  grid-template-columns: 1fr;
  gap: 0.5rem;
  align-items: start;
}
@media (min-width: 720px) {
  .row-4 {
    grid-template-columns: auto minmax(0, 1fr) auto auto;
    align-items: center;
    gap: 1rem;
  }
}

/* ── Overflow containment ─────────────────────────────────────────────────
   Wide content — tables, the status tracker, code blocks — scrolls inside its
   own container. The page body never scrolls sideways.

   Three properties, and all three are load-bearing:

   `min-width: 0` — a grid or flex child defaults to `min-width: auto`, which
   means it refuses to shrink below its content and pushes the overflow up to
   the document instead of scrolling inside itself.

   `width: 100%` — without a *definite* width, the scroller's min-content
   contribution still propagates up through block ancestors, so the document
   grows even though the scroller itself is visually clipped. This is the one
   that actually fixed the status tracker.

   `max-width: 100%` — belt to the braces. */
.scroll-x {
  overflow-x: auto;
  -webkit-overflow-scrolling: touch;
  width: 100%;
  max-width: 100%;
  min-width: 0;
}

main {
  min-width: 0;
  overflow-x: clip;
}

nav[aria-label="Your housing progress"] {
  max-width: 100%;
  overflow-x: auto;
}

/* Long hashes and identifiers wrap rather than widen their container. */
code {
  overflow-wrap: anywhere;
  min-width: 0;
}

/* ── The student masthead ─────────────────────────────────────────────────
   One row at every width: brand, tabs, menu, account.

   It used to be brand + every destination + account on one line, which fitted
   when the student surface was a housing application with five places to go.
   At seven it stopped fitting: 714px of tabs in 687px of room on a 1440px
   screen, so "Your record" ran underneath the account block, and at 390px the
   bar broke into two rows — a wrapped institutional descriptor over a sideways
   nav showing four of seven — for a total header height of 128px.

   The fix is not a wider row, because more applications are coming. The row
   holds the destinations a student returns to; the menu holds all of them and
   costs one line per new one. Reasoning in `student-masthead.tsx`.

   Below 1080px the row is brand and menu only. Nothing scrolls sideways, and
   the account moves into the menu where its name and role fit in full. */

.smast {
  /* Sticky, and therefore also the containing block the panel positions
     against — which is how the panel spans the full window width while the
     bar inside it stops at the page's 1180px measure. */
  position: sticky;
  top: 0;
  z-index: 30;
  /* Pinned to the top edge, and to the sides in landscape: clear of the notch. */
  padding: var(--safe-top) var(--safe-right) 0 var(--safe-left);
  background: var(--surface-header);
  border-bottom: 1px solid var(--rule);
  box-shadow: var(--shadow-header);
}

/* ── The way back up ──────────────────────────────────────────────────────
   One line above the page head on every student route that sits behind a hub.
   Sized and colored like an eyebrow rather than like a control, because it is
   answering "where am I" and only incidentally offering a click. Sentence case
   and NOT the eyebrow's uppercase, because it sits directly above one: two
   stacked small-caps lines read as a doubled eyebrow rather than as a trail
   above a heading. Its own
   `:hover` color is restated: the global `a:hover` is a type-and-pseudo-class
   selector and outranks a single class (see `verify-styles.ts` case 5). */
.trail {
  padding: 1.5rem 0 0;
  font-size: 0.8125rem;
  font-weight: 500;
}
.trail-up {
  color: var(--fg3);
  text-decoration: none;
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  padding: 0.25rem 0.5rem 0.25rem 0;
  border-radius: 4px;
}
.trail-up:hover {
  color: var(--accent-text);
  text-decoration: underline;
  text-underline-offset: 0.25em;
}

.smast-bar {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  align-items: center;
  gap: 1rem;
  margin: 0 auto;
  padding: 0.55rem 1.25rem;
}

.smast-brand {
  display: flex;
  align-items: center;
  min-width: 0;
}

.smast-tools {
  display: flex;
  align-items: center;
  gap: 0.85rem;
}

/* The row's own account block. Below 1080 it is not hidden to save pixels but
   because the menu shows it better: 32px of avatar, a name, a role and a
   Switch button want ~200px, and on a 390px screen that is the brand's half of
   the row. */
.smast-account {
  display: none;
}

/* ── The tabs ─────────────────────────────────────────────────────────────
   Tabs rather than pills. The current item is marked by a 2px underline in the
   accent plus a weight change — two signals, neither of them hue alone. */

.smast-tabs {
  display: none;
  align-items: stretch;
  min-width: 0;
}

.smast-tab {
  position: relative;
  display: inline-flex;
  align-items: center;
  padding: 0.95rem 0.15rem;
  margin: 0 0.42rem;
  color: var(--fg2);
  text-decoration: none;
  font-size: 0.8125rem;
  font-weight: 550;
  white-space: nowrap;
  transition: color 140ms ease;
}
.smast-tab::after {
  content: "";
  position: absolute;
  left: 0;
  right: 0;
  bottom: -1px;
  height: 2px;
  border-radius: 2px 2px 0 0;
  background: var(--accent);
  transform: scaleX(0);
  transition: transform 200ms cubic-bezier(0.16, 1, 0.3, 1);
}
.smast-tab:hover {
  color: var(--fg1);
}
.smast-tab:hover::after {
  transform: scaleX(0.55);
}
.smast-tab[aria-current="page"] {
  color: var(--fg1);
  font-weight: 700;
}
.smast-tab[aria-current="page"]::after {
  transform: scaleX(1);
}

/* ── The menu trigger ─────────────────────────────────────────────────────
   A <details>, so it opens, closes, takes the keyboard and announces its
   expanded state with no JavaScript at all. */

.smast-menu {
  position: static;
}

.smast-trigger {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.42rem 0.8rem;
  border: 1px solid var(--control-line);
  border-radius: 999px;
  background: var(--surface-raised);
  color: var(--fg1);
  font-size: 0.8125rem;
  font-weight: 650;
  cursor: pointer;
  list-style: none;
  user-select: none;
  transition: background 140ms ease, border-color 140ms ease;
}
.smast-trigger::-webkit-details-marker {
  display: none;
}
.smast-trigger:hover {
  background: var(--surface-tint);
  border-color: var(--accent-line);
}
.smast-menu[open] > .smast-trigger {
  background: var(--accent-soft);
  border-color: var(--accent-line);
  color: var(--accent-text);
}

/* Nine dots with the fifth in gold — the mosaic mark at control size. The way
   to the rest of the product carries the product's own mark, and the gold tile
   is the thing that makes it legible at 12px, exactly as in the mark itself. */
.smast-glyph {
  display: grid;
  grid-template-columns: repeat(3, 3px);
  grid-template-rows: repeat(3, 3px);
  gap: 2.5px;
  flex-shrink: 0;
}
.smast-glyph > span {
  border-radius: 0.5px;
  background: currentColor;
  opacity: 0.45;
}
.smast-glyph > span:nth-child(5) {
  background: var(--gold);
  opacity: 1;
}

/* ── The panel ────────────────────────────────────────────────────────────
   Positioned against the header rather than the bar, so it spans the full
   width at any page width, and it drops *below* the row rather than over it —
   the masthead stays readable while you are choosing where to go. */
.smast-panel {
  position: absolute;
  top: 100%;
  left: 0;
  right: 0;
  background: var(--surface-raised);
  border-bottom: 1px solid var(--rule);
  box-shadow: var(--shadow-lift);
  max-height: calc(100svh - 4rem);
  overflow-y: auto;
  overscroll-behavior: contain;
  transition: opacity 160ms ease, transform 220ms cubic-bezier(0.16, 1, 0.3, 1);
}
@starting-style {
  .smast-menu[open] .smast-panel {
    opacity: 0;
    transform: translateY(-8px);
  }
}

.smast-panel-in {
  margin: 0 auto;
  padding: 1.35rem 1.25rem 1.6rem;
}

.smast-group + .smast-group {
  margin-top: 1.4rem;
}
/* The same hierarchy correction the rail needed: the group heading was an 11px
   uppercase whisper in muted ink over links set larger and darker, so the child
   outranked its parent here too. Sentence case, larger, at full contrast, with
   the group's tessera beside it — and a hairline under it, so a group reads as
   a block that CONTAINS things rather than as a caption floating above them. */
.smast-group-label {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  margin: 0 0 0.55rem;
  padding-bottom: 0.4rem;
  border-bottom: 1px solid var(--rule);
  font-size: 0.9375rem;
  font-weight: 650;
  letter-spacing: 0;
  text-transform: none;
  color: var(--fg1);
}
.smast-group-label::before {
  content: "";
  flex: none;
  width: 9px;
  height: 9px;
  border-radius: 2px;
  background: var(--tess, var(--accent));
}
.smast-group[data-tess="belonging"] { --tess: var(--tess-campus); }
.smast-group[data-tess="whats-on"] { --tess: var(--tess-events); }
.smast-group[data-tess="yours"] { --tess: var(--tess-housing); }
.smast-group[data-tess="record"] { --tess: var(--tess-people); }

.smast-links {
  list-style: none;
  margin: 0;
  padding: 0;
  display: grid;
  gap: 0.4rem;
  grid-template-columns: repeat(auto-fill, minmax(228px, 1fr));
}

.smast-link {
  display: flex;
  align-items: center;
  gap: 0.6rem;
  padding: 0.8rem 0.95rem;
  border: 1px solid transparent;
  border-radius: 10px;
  color: var(--fg1);
  text-decoration: none;
  font-size: 0.9375rem;
  font-weight: 600;
  transition: background 140ms ease, border-color 140ms ease;
}
/* The tile sits in the row whether or not it is the current page, so the
   labels stay on one left edge and the row does not jump as you navigate. */
.smast-link::before {
  content: "";
  width: 6px;
  height: 6px;
  flex-shrink: 0;
  background: var(--rule-strong);
}
.smast-link:hover {
  background: var(--surface-tint);
  border-color: var(--accent-line);
}
.smast-link[aria-current="page"] {
  background: var(--accent-soft);
  border-color: var(--accent-line);
  font-weight: 700;
}
.smast-link[aria-current="page"]::before {
  background: var(--gold);
}

.smast-panel-account {
  margin-top: 1.4rem;
  padding-top: 1.1rem;
  border-top: 1px solid var(--rule);
}

/* ── Above 1080: the row carries tabs and the account ─────────────────────
   The same breakpoint the console uses to turn its drawer back into a rail.
   Below it, neither product tries to keep a full navigation on the row. */
@media (min-width: 1080px) {
  .smast-bar {
    grid-template-columns: auto minmax(0, 1fr) auto;
    gap: 1.5rem;
    padding: 0 1.5rem;
    /* The tabs set the row's height and they are 13px type; the wordmark is
       39px of mark and descriptor and ends up with six pixels of air above it.
       The floor gives the brand the same margin the phone bar gives it. */
    min-height: 60px;
  }
  .smast-tabs {
    display: flex;
    margin: 0 -0.42rem;
  }
  .smast-account {
    display: flex;
    padding: 0.6rem 0;
  }
  /* Matched to the bar's padding at this breakpoint, so the first destination
     in the panel starts on the same left edge as the first tab above it. */
  .smast-panel-in {
    padding-left: 1.5rem;
    padding-right: 1.5rem;
  }
  .smast-panel-account {
    display: none;
  }
}

/* The descriptor is ~200px of tracked small caps and it is what the row runs
   out of room for first. Below 1280 the brand is the mark and the name, which
   is still the College's — the institution is on the sign-in page, in the
   footer of every page, and under the mark again the moment there is room. */
@media (max-width: 1279px) {
  .smast .tsr-descriptor {
    display: none;
  }
}

@media (prefers-reduced-motion: reduce) {
  .smast-panel,
  .smast-trigger,
  .smast-tab,
  .smast-tab::after,
  .smast-link {
    transition: none;
  }
}

/* At 390px the console bar wants wordmark + "Staff console" badge + avatar +
   name + role + Switch, which is about 430px of content. Two of those are the
   ones that can go: the badge is redundant beside a console that is already
   black, and the avatar is decorative. The name and the role stay — knowing
   which role you are acting as is the whole point on a shared device. */
@media (max-width: 899px) {
  .shell-badge,
  [data-surface="console"] .shell-avatar {
    display: none;
  }
}

/* The subtitle is what wraps first, and "RESIDENCE\nLIFE" over two lines
   pushes the bar to three rows. */
.hc-wordmark {
  white-space: nowrap;
}

/* No `overflow: hidden` on html or body.
   It was tried, and it breaks the sticky app bar — body becomes a scroll
   container and the header stops sticking. The right fix for a page that
   scrolls sideways is to stop the content overflowing, not to clip the
   viewport; see the status tracker below for the case that forced this. */

/* ── Status tracker ───────────────────────────────────────────────────────
   Seven steps at 156px each want about 1,100px. On a phone that intrinsic
   width propagated all the way up and gave the whole document a sideways
   scroll — and clipping it at the viewport was worse, because `overflow:
   hidden` on body breaks the sticky app bar.

   So on small screens the rail wraps into a grid instead of scrolling. Two
   tidy rows beat a horizontal scroller nobody notices is scrollable, and the
   overflow simply stops existing. Above 900px it is the single rail from
   15 §6.1. */
.track {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  list-style: none;
  margin: 0;
  padding: 0 0 0.5rem;
  gap: 0.25rem 0.75rem;
  width: 100%;
  max-width: 100%;
  min-width: 0;
}

.track-step {
  display: flex;
  align-items: center;
  min-width: 0;
}

/* The connector rule between steps only makes sense in a single row. */
.track-step > .track-rule {
  display: none;
}

@media (min-width: 620px) {
  .track {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }
}

@media (min-width: 900px) {
  .track {
    display: flex;
    gap: 0;
  }
  .track-step {
    flex: 1 1 0;
    min-width: 0;
  }
  .track-step > .track-rule {
    display: block;
  }
}

/* ── Plan beside its building ─────────────────────────────────────────────
   The portrait is context, not content: it goes under the plan on a phone and
   beside it once there is room, and it never takes space the drawing needs. */
.plan-with-portrait {
  display: grid;
  gap: 1.25rem;
  grid-template-columns: 1fr;
}
.plan-portrait {
  align-self: start;
}
@media (min-width: 1100px) {
  .plan-with-portrait {
    grid-template-columns: minmax(0, 1fr) 260px;
  }
}

/* ═══════════════════════════════════════════════════════════════════════════
   THE CONSOLE RAIL — 15 §6.2 [extension]

   The console outgrew its masthead. Ten destinations across six offices in a
   horizontal bar became a sideways scroller, and a scroller in the app bar is
   a navigation you have to discover rather than read. A rail reads top to
   bottom, carries section headings — which is the part the flat list could
   never do, because it could not say that "Occupancy" and "Partnerships"
   belong to different products — and grows without degrading.

   The student product keeps its masthead. Seven editorial destinations is a
   masthead; this is not.
   ═══════════════════════════════════════════════════════════════════════════ */

.console-frame {
  min-height: 100dvh;
  background: var(--surface);
}

.console-body {
  display: flex;
  flex-direction: column;
  min-height: 100dvh;
  min-width: 0;
}

/* The page: room above the title (it was flush with the top edge, and the first thing on every page looked cramped against it), the side
   gutter that grows with the window, and room under the last thing on the page. The page header adds its own padding above its title. */
.console-main {
  flex: 1;
  width: 100%;
  margin: 0 auto;
  padding: var(--space-4) var(--page-gutter) var(--space-7);
}

/* ── The rail itself ────────────────────────────────────────────────────── */

.rail {
  display: flex;
  flex-direction: column;
  gap: 0.25rem;
  width: var(--rail-w, 258px);
  /* Pinned to the left edge, full height: as a drawer below 1080px, and as a
     sticky column above it (a tablet in landscape has a home indicator). Clear
     of the notch, the corner and the indicator, on the rail's own background. */
  padding: var(--safe-top) 0 var(--safe-bottom) var(--safe-left);
  background: var(--surface-header);
  border-right: 1px solid var(--rule);
}

.rail-head {
  display: flex;
  flex-direction: column;
  gap: 0.6rem;
  align-items: flex-start;
  padding: 1.15rem 1.25rem 1rem;
}

.rail-nav {
  flex: 1;
  overflow-y: auto;
  padding: 0.25rem 0.75rem 1.25rem;
}

.rail-section + .rail-section {
  margin-top: 1.15rem;
}

/* The heading is the whole point of the rail, so it is legible rather than
   decorative: --fg3 clears 4.5:1 on the header field, where the --fg-faint
   this first used did not. */
.rail-section-label {
  margin: 0 0 0.4rem;
  padding: 0 0.55rem;
  font-size: 0.625rem;
  font-weight: 800;
  letter-spacing: 0.15em;
  text-transform: uppercase;
  color: var(--fg2);
}

/* ── The area: the rail's primary object ──────────────────────────────────
   The heading used to be a 10px uppercase whisper over links a third larger
   and a stop heavier, so the child outranked the parent and the categories
   read as decoration. Every axis is reversed here: the AREA is sentence case,
   larger, heavier and at full contrast; the links are smaller, lighter and
   physically inset behind a spine in the area's own color. */
.rail-area {
  border-radius: 9px;
}
.rail-area + .rail-area {
  margin-top: 0.15rem;
}
.rail-area-summary {
  display: flex;
  align-items: center;
  gap: 0.55rem;
  padding: 0.5rem 0.55rem;
  border-radius: 9px;
  cursor: pointer;
  list-style: none;
  color: var(--fg1);
  font-size: 0.875rem;
  font-weight: 650;
  line-height: 1.3;
  transition: background 120ms ease;
}
.rail-area-summary::-webkit-details-marker {
  display: none;
}
.rail-area-summary:hover {
  background: var(--surface-tint);
}
.rail-area[open] > .rail-area-summary {
  color: var(--fg1);
}

/* The tile. 9px, square, and it turns into a ring when the area is open — so
   the open area is marked without spending a chevron on it. */
.rail-tess {
  flex: none;
  width: 9px;
  height: 9px;
  border-radius: 2px;
  background: var(--tess, var(--accent));
  box-shadow: 0 0 0 0 transparent;
  transition:
    box-shadow 180ms ease,
    background 180ms ease;
}
.rail-area[open] > .rail-area-summary > .rail-tess {
  background: transparent;
  box-shadow: inset 0 0 0 2px var(--tess, var(--accent));
}
.rail-area[data-tess="people"] { --tess: var(--tess-people); }
.rail-area[data-tess="housing"] { --tess: var(--tess-housing); }
.rail-area[data-tess="arrival"] { --tess: var(--tess-arrival); }
.rail-area[data-tess="support"] { --tess: var(--tess-support); }
.rail-area[data-tess="standards"] { --tess: var(--tess-standards); }
.rail-area[data-tess="campus"] { --tess: var(--tess-campus); }
.rail-area[data-tess="events"] { --tess: var(--tess-events); }
.rail-area[data-tess="risk"] { --tess: var(--tess-risk); }
.rail-area[data-tess="reporting"] { --tess: var(--tess-reporting); }
.rail-area[data-tess="admin"] { --tess: var(--tess-admin); }

.rail-area-label {
  flex: 1;
  min-width: 0;
}
.rail-area-count {
  flex: none;
  font-size: 0.6875rem;
  font-weight: 600;
  color: var(--fg-faint);
}
.rail-area[open] > .rail-area-summary > .rail-area-count {
  opacity: 0;
}

/* The links hang off a spine tinted with the area's color, so an open area
   reads as one block rather than as more rail. */
.rail-area-body {
  margin-block: 0.1rem 0.5rem;
  margin-inline: 1.05rem 0;
  padding-inline-start: 0.5rem;
  border-inline-start: 1.5px solid color-mix(in srgb, var(--tess, var(--accent)) 45%, transparent);
}
.rail-area-body .rail-link {
  font-size: 0.8125rem;
  font-weight: 450;
  color: var(--fg3);
  padding: 0.34rem 0.5rem;
}
.rail-area-body .rail-link:hover {
  color: var(--fg1);
}
.rail-area-body .rail-link[aria-current="page"] {
  color: var(--fg1);
  font-weight: 650;
  background: var(--accent-soft);
}

/* A cluster is a CAPTION, not another thing to click. Three levels of
   disclosure is one too many, and the area accordion already earns its click. */
.rail-cluster {
  margin-top: 0.45rem;
}
.rail-cluster:first-child {
  margin-top: 0;
}
.rail-cluster-label {
  margin: 0 0 0.15rem;
  padding: 0 0.5rem;
  font-size: 0.5875rem;
  font-weight: 700;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--fg-faint);
}

/* Current item: a filled well plus a 2px accent bar at the leading edge and a
   weight change. Three signals, none of them hue alone — the same rule the
   tabs followed, restated for a vertical axis. */
.rail-link {
  position: relative;
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 0.5rem;
  padding: 0.42rem 0.55rem;
  border-radius: 7px;
  color: var(--fg2);
  text-decoration: none;
  font-size: 0.8375rem;
  font-weight: 500;
  line-height: 1.35;
  transition:
    background 120ms ease,
    color 120ms ease;
}
.rail-link::before {
  content: "";
  position: absolute;
  inset-inline-start: -0.75rem;
  top: 50%;
  transform: translateY(-50%) scaleY(0);
  width: 2px;
  height: 1.35rem;
  border-start-end-radius: 2px;
  border-end-end-radius: 2px;
  background: var(--accent);
  transition: transform 180ms cubic-bezier(0.16, 1, 0.3, 1);
}
.rail-link:hover {
  color: var(--fg1);
  background: var(--surface-tint);
}
.rail-link[aria-current="page"] {
  color: var(--fg1);
  font-weight: 700;
  background: var(--accent-soft);
}
.rail-link[aria-current="page"]::before {
  transform: translateY(-50%) scaleY(1);
}

.rail-link-note {
  font-family: var(--font-mono);
  font-size: 0.625rem;
  font-weight: 500;
  color: var(--fg-faint);
  white-space: nowrap;
}

.rail-foot {
  border-top: 1px solid var(--rule);
  padding: 0.85rem 1rem;
}

.shell-account {
  display: flex;
  align-items: center;
  gap: 0.7rem;
  min-width: 0;
}

/* In the header the account block is a row. In a 258px rail it is not: the
   avatar, "Director of Residence Life and Housing" and a Switch button want
   about 430px, and a flex row simply overlaps them. Two rows, and the role is
   allowed to wrap — knowing which role you are acting as is the whole point on
   a shared device, so it is the Switch button that moves, not the label. */
.rail-foot .shell-account {
  display: grid;
  grid-template-columns: auto minmax(0, 1fr);
  align-items: center;
  gap: 0.35rem 0.6rem;
}
.rail-foot .shell-account > :nth-child(3) {
  grid-column: 1 / -1;
  justify-self: start;
}

/* ── Desktop: the rail is a fixed column ────────────────────────────────── */

@media (min-width: 1080px) {
  .console-frame {
    display: grid;
    grid-template-columns: var(--rail-w, 258px) minmax(0, 1fr);
  }
  .rail {
    position: sticky;
    top: 0;
    height: 100dvh;
  }
  .rail-topbar,
  .rail-scrim {
    display: none;
  }
}

/* ── Below 1080: a drawer ───────────────────────────────────────────────── */

@media (max-width: 1079px) {
  .rail-topbar {
    position: sticky;
    top: 0;
    z-index: 30;
    display: flex;
    align-items: center;
    gap: 0.9rem;
    padding: calc(0.55rem + var(--safe-top)) calc(1rem + var(--safe-right)) 0.55rem calc(1rem + var(--safe-left));
    background: var(--surface-header);
    border-bottom: 1px solid var(--rule);
    box-shadow: var(--shadow-header);
  }
  .rail {
    position: fixed;
    inset: 0 auto 0 0;
    z-index: 50;
    transform: translateX(-100%);
    transition: transform 220ms cubic-bezier(0.16, 1, 0.3, 1);
    box-shadow: var(--shadow-lift);
    visibility: hidden;
  }
  .rail[data-open="true"] {
    transform: none;
    visibility: visible;
  }
  .rail-scrim {
    position: fixed;
    inset: 0;
    z-index: 40;
    border: 0;
    padding: 0;
    background: var(--scrim);
    cursor: pointer;
  }
  /* The badge is redundant beside a console that is already black, and at this
     width the rail head needs the line back. */
  .rail-head .shell-badge {
    display: none;
  }
}

/* ── Collapsed by choice: the same drawer, at 1080px and wider ──────────────
   A person can hide the column (`data-rail="collapsed"` on the frame, which the server draws from the `tessera_rail` cookie and the `drawer`
   controller sets: the button in the rail's head, Ctrl+\ or ⌘\). The console then uses the drawer it has below 1080px: the top bar with the
   Menu button, and the rail over the page when asked. These are the rules of the block above, for the wide window, and a change to one is a
   change to the other. The scrim keeps its `hidden` (the controller shows it while the drawer is open), so it is drawn only when it is not. */

@media (min-width: 1080px) {
  .console-frame[data-rail="collapsed"] {
    display: block;
  }
  .console-frame[data-rail="collapsed"] .rail-topbar {
    position: sticky;
    top: 0;
    z-index: 30;
    display: flex;
    align-items: center;
    gap: 0.9rem;
    padding: calc(0.55rem + var(--safe-top)) calc(1rem + var(--safe-right)) 0.55rem calc(1rem + var(--safe-left));
    background: var(--surface-header);
    border-bottom: 1px solid var(--rule);
    box-shadow: var(--shadow-header);
  }
  .console-frame[data-rail="collapsed"] .rail {
    position: fixed;
    inset: 0 auto 0 0;
    height: auto;
    z-index: 50;
    transform: translateX(-100%);
    transition: transform 220ms cubic-bezier(0.16, 1, 0.3, 1);
    box-shadow: var(--shadow-lift);
    visibility: hidden;
  }
  .console-frame[data-rail="collapsed"] .rail[data-open="true"] {
    transform: none;
    visibility: visible;
  }
  .console-frame[data-rail="collapsed"] .rail-scrim:not([hidden]) {
    position: fixed;
    inset: 0;
    z-index: 40;
    display: block;
    border: 0;
    padding: 0;
    background: var(--scrim);
    cursor: pointer;
  }
}

@media (prefers-reduced-motion: reduce) {
  .rail,
  .rail-link,
  .rail-link::before {
    transition: none;
  }
  .console-frame[data-rail="collapsed"] .rail {
    transition: none;
  }
}

.rail-toggle {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.4rem 0.7rem;
  border: 1px solid var(--control-line);
  border-radius: 8px;
  background: var(--surface-raised);
  color: var(--fg1);
  font: inherit;
  font-size: 0.8125rem;
  font-weight: 600;
  cursor: pointer;
}
.rail-toggle:hover {
  background: var(--surface-tint);
}
.rail-toggle-glyph {
  display: inline-flex;
  flex-direction: column;
  gap: 3px;
  width: 14px;
}
.rail-toggle-glyph span {
  display: block;
  height: 1.5px;
  border-radius: 1px;
  background: currentColor;
}

/* The button in the rail's head that hides the column, or keeps the menu open once it has been hidden (the `drawer` controller). Only where the
   column is a choice, 1080px and wider; below it the drawer is the only form and the top bar's Menu button is the way to it. Both names are in the
   markup and the one that is true is drawn, so a screen reader hears one. Tokens only; its focus ring is the page's. */
.rail-pin {
  display: none;
  align-items: center;
  gap: 0.5rem;
  min-block-size: 2rem;
  padding: 0.25rem 0.5rem;
  border: 0;
  border-radius: 8px;
  background: transparent;
  color: var(--fg2);
  font: inherit;
  font-size: 0.8125rem;
  font-weight: 600;
  cursor: pointer;
}
@media (min-width: 1080px) {
  .rail-pin {
    display: inline-flex;
  }
}
@media (pointer: coarse) {
  .rail-pin {
    min-block-size: var(--target-min);
  }
}
.rail-pin:hover {
  background: var(--rail-hover);
  color: var(--fg1);
}
.rail-pin-glyph {
  position: relative;
  inline-size: 14px;
  block-size: 12px;
  border: 1.5px solid currentColor;
  border-radius: 2px;
}
.rail-pin-glyph::before {
  content: "";
  position: absolute;
  inset-block: 0;
  inset-inline-start: 3px;
  border-inline-start: 1.5px solid currentColor;
}
.rail-pin-expand {
  display: none;
}
.console-frame[data-rail="collapsed"] .rail-pin-collapse {
  display: none;
}
.console-frame[data-rail="collapsed"] .rail-pin-expand {
  display: inline;
}

/* ── Queue strip ──────────────────────────────────────────────────────────
   `.cards` uses `auto-fit`, which collapses empty tracks and stretches a lone
   card across the full column. That is right for a set of equals and wrong for
   a queue, where having only one thing waiting on you is the normal case and
   should not render as a 1,100px billboard reading "1". `auto-fill` keeps the
   tracks, so one card is one card. */
@media (min-width: 860px) {
  .cards-fill {
    grid-template-columns: repeat(auto-fill, minmax(258px, 1fr));
  }
}

/* ── Sign-in hero ─────────────────────────────────────────────────────────
   The headline column and the stat column. This lived as an inline style on
   the element, which meant it could not be overridden by a media query, and a
   1.6fr/1fr split at 390px ran "13,042" past the right edge of the phone.
   Same rule as `.split`: editorial asymmetry is a desktop affordance. */
.hero-grid {
  display: grid;
  gap: clamp(2rem, 5vw, 4rem);
  align-items: end;
  grid-template-columns: minmax(0, 1fr);
}

@media (min-width: 860px) {
  .hero-grid {
    grid-template-columns: minmax(0, 1.6fr) minmax(0, 1fr);
  }
}

/* ── Work log: collapsible application panels ─────────────────────────────
   A native <details>, so the grouping works with JavaScript off. The default
   marker is replaced with a rotating chevron on the left of the heading. */
.worklog-apps details > summary::-webkit-details-marker {
  display: none;
}
.worklog-apps details > summary > div:first-child::before {
  content: "";
  display: inline-block;
  width: 0;
  height: 0;
  margin-right: 0.15rem;
  border-left: 5px solid var(--fg3);
  border-top: 4px solid transparent;
  border-bottom: 4px solid transparent;
  transform: translateY(-1px);
  transition: transform 160ms ease;
}
.worklog-apps details[open] > summary > div:first-child::before {
  transform: translateY(-1px) rotate(90deg);
}
.worklog-apps details > summary:focus-visible {
  outline: 2px solid var(--focus);
  outline-offset: 3px;
  border-radius: 4px;
}

/* The assistant's rules are in 38-shell.css (AssistantComponent): written again there with logical properties and tokens only, because these were the platform's,
   in physical properties and vw, and nothing in the Rails edition drew them. */

/* ── Touch: do not move a thing somebody is trying to tap ─────────────────
   Reported from a phone: persona cards on the sign-in page could not be
   tapped.

   The cause is sticky `:hover` on touch. A finger lands, the browser applies
   `:hover`, the card lifts by 3px on the transition, and the click that
   follows is dispatched at coordinates the card has just vacated. Nothing
   happens. Tap again and it works, because hover is already applied — which is
   exactly the "I have to tap twice" report, and why it never reproduces on a
   desktop with a mouse.

   `hover: none` is the correct query: it asks whether the primary input can
   hover at all, rather than guessing from viewport width. A small window on a
   laptop still gets the lift; a large tablet does not. */
@media (hover: none) {
  .persona-card:hover,
  .persona-card:focus-visible,
  .tile:hover,
  .assistant-fab:hover,
  .card:hover {
    transform: none;
  }
  /* The decorative slide on an arrow is harmless, but it costs a repaint on a
     device that will never see the animation finish. */
  .tile:hover .tile-more::after,
  .persona-card:hover .persona-cta::after {
    transform: none;
  }
}

/* Removes the legacy 300ms tap delay and tells the browser these are taps
   rather than the start of a double-tap zoom. */
.persona-card,
.tile,
.rail-link,
.assistant-fab,
.assistant-suggest button,
.btn,
button {
  touch-action: manipulation;
}

/* ── Integrations · IN 00 §5 ─────────────────────────────────────────────────
   The provisioning board. Tone is carried by a left rule rather than a filled
   card, because eighteen filled cards in five colors is a chart, and this is
   a list somebody reads a line at a time before a meeting. */

.int-critical {
  margin: 2rem 0 0;
  padding: 1.5rem 1.75rem;
  border: 1px solid var(--rule);
  border-radius: var(--radius);
  background: var(--surface-2);
}
.int-critical h2 { font-size: 1.05rem; margin: 0 0 0.35rem; }
.int-critical > p { margin: 0 0 1.15rem; color: var(--ink-2); max-width: 62ch; }
.int-critical ol { list-style: none; margin: 0; padding: 0; display: grid; gap: 0.9rem; }
.int-critical li { display: flex; gap: 0.85rem; align-items: baseline; }
.int-crit-n {
  flex: none;
  width: 1.6rem; height: 1.6rem;
  display: grid; place-items: center;
  border-radius: 50%;
  background: var(--accent-soft);
  color: var(--accent);
  font-size: 0.78rem; font-variant-numeric: tabular-nums;
}
.int-crit-owner { color: var(--ink-3); font-size: 0.82rem; margin-top: 0.15rem; }

.int-group { margin: 2.5rem 0 0; }
.int-group-head h2 {
  font-size: 1.05rem; margin: 0 0 0.3rem;
  display: flex; align-items: center; gap: 0.6rem;
}
.int-count {
  font-size: 0.72rem;
  font-variant-numeric: tabular-nums;
  color: var(--ink-3);
  border: 1px solid var(--rule);
  border-radius: 999px;
  padding: 0.05rem 0.45rem;
}
.int-group-head > p { margin: 0 0 1.1rem; color: var(--ink-2); max-width: 68ch; }

.int-cards { display: grid; gap: 0.85rem; }
@media (min-width: 900px) {
  .int-cards { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}

.int-card {
  border: 1px solid var(--rule);
  border-left: 3px solid var(--ink-3);
  border-radius: var(--radius);
  padding: 1.1rem 1.25rem;
  background: var(--surface-1);
  display: grid;
  gap: 0.5rem;
  align-content: start;
}
.int-card[data-tone="good"] { border-left-color: var(--good); }
.int-card[data-tone="warn"] { border-left-color: var(--warn); }
.int-card[data-tone="bad"]  { border-left-color: var(--bad); }
.int-card[data-tone="info"] { border-left-color: var(--accent); }
.int-card[data-tone="mute"] { border-left-color: var(--rule); }

.int-card header { display: flex; align-items: baseline; gap: 0.6rem; flex-wrap: wrap; }
.int-card h3 { font-size: 0.98rem; margin: 0; }
.int-vendor { color: var(--ink-3); font-size: 0.78rem; }

.int-dir { font-size: 0.83rem; color: var(--ink-2); }
.int-dir strong { color: var(--ink-1); font-weight: 500; }

.int-blocker { font-size: 0.85rem; color: var(--ink-1); }
.int-q {
  font-family: var(--mono, ui-monospace, monospace);
  font-size: 0.74rem;
  color: var(--accent);
  margin-right: 0.35rem;
}

.int-cannot {
  margin: 0;
  font-size: 0.83rem;
  color: var(--ink-2);
  border-left: 2px solid var(--rule);
  padding-left: 0.7rem;
}

.int-card footer {
  display: flex; flex-wrap: wrap; gap: 0.5rem 1rem;
  font-size: 0.75rem; color: var(--ink-3);
  padding-top: 0.35rem;
  border-top: 1px solid var(--rule);
}
.int-fixture { color: var(--accent); }
.int-spec { margin-left: auto; font-family: var(--mono, ui-monospace, monospace); }

.int-foot {
  margin: 2.5rem 0 0;
  padding-top: 1rem;
  border-top: 1px solid var(--rule);
  color: var(--ink-3);
  font-size: 0.83rem;
  max-width: 72ch;
}

/* ── The simulated marker ────────────────────────────────────────────────────
   IN 03 §1: a surface fed by a fixture says so, every time, wherever it
   appears. Not a debug affordance — it stays after launch for the integrations
   the College declines, and it is the difference between a demo and a lie. */

.sim {
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
  font-size: 0.7rem;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  color: var(--accent);
  background: var(--accent-soft);
  border-radius: 999px;
  padding: 0.1rem 0.55rem;
  vertical-align: middle;
  white-space: nowrap;
}
.sim::before {
  content: "";
  width: 0.4rem; height: 0.4rem;
  border-radius: 50%;
  background: currentColor;
  opacity: 0.8;
}
.sim-note {
  margin: 0.4rem 0 0;
  font-size: 0.8rem;
  color: var(--ink-3);
}

/* The channels that announced an event. Only rendered when more than one did —
   the interesting case, because it means identity resolution ran. */
.chan-line {
  margin: 0.6rem 0 0;
  font-size: 0.75rem;
  color: var(--fg3);
  display: flex;
  align-items: center;
  gap: 0.4rem;
  flex-wrap: wrap;
}

/* ── Wellbeing · SS 01, SS 05 ────────────────────────────────────────────────
   The visual hierarchy is the argument. The coverage gap is the largest thing
   on the page and the signal list is small, because the reverse arrangement is
   how this becomes a queue. */

.wb-headline {
  display: grid;
  gap: 1.5rem 2.5rem;
  align-items: start;
  margin: 2.25rem 0 0;
  padding: 2rem 2.25rem;
  border: 1px solid var(--rule);
  border-radius: var(--radius);
  background: var(--surface-2);
}
@media (min-width: 860px) {
  .wb-headline { grid-template-columns: minmax(0, 0.9fr) minmax(0, 1.4fr); }
}
.wb-big { display: grid; gap: 0.2rem; }
.wb-num {
  font-family: var(--font-display, inherit);
  font-size: clamp(3rem, 2rem + 5vw, 5rem);
  line-height: 0.95;
  font-variant-numeric: tabular-nums;
  color: var(--warn, var(--accent));
}
.wb-of { color: var(--fg3); font-size: 0.9rem; }
.wb-say p { margin: 0 0 0.85rem; max-width: 58ch; }
.wb-second { color: var(--fg2); font-size: 0.92rem; }

.wb-counts {
  display: grid;
  gap: 0.85rem;
  margin: 1rem 0 0;
}
@media (min-width: 760px) {
  .wb-counts { grid-template-columns: repeat(3, minmax(0, 1fr)); }
}
.wb-counts > div {
  border: 1px solid var(--rule);
  border-radius: var(--radius);
  padding: 1rem 1.15rem;
  display: grid;
  gap: 0.3rem;
  align-content: start;
}
.wb-counts > div[data-warn] { border-left: 3px solid var(--warn); }
.wb-n {
  font-size: 1.6rem;
  font-variant-numeric: tabular-nums;
  line-height: 1;
}
.wb-counts span:last-child { color: var(--fg3); font-size: 0.84rem; line-height: 1.5; }

.wb-spine, .wb-mine { margin: 2.5rem 0 0; }
.wb-spine h2, .wb-mine h2 {
  font-size: 1.05rem;
  margin: 0 0 0.75rem;
  display: flex; align-items: center; gap: 0.6rem;
}
.wb-spine p { margin: 0 0 0.85rem; max-width: 72ch; color: var(--fg2); }
.wb-count {
  font-size: 0.72rem; color: var(--fg3);
  border: 1px solid var(--rule); border-radius: 999px; padding: 0.05rem 0.45rem;
}
.wb-none, .wb-absent {
  color: var(--fg3); max-width: 68ch; line-height: 1.65;
  border-left: 2px solid var(--rule); padding-left: 0.9rem; margin: 1rem 0 0;
}

.wb-list { list-style: none; margin: 0; padding: 0; display: grid; gap: 0.85rem; }
.wb-list > li {
  border: 1px solid var(--rule);
  border-left: 3px solid var(--accent);
  border-radius: var(--radius);
  padding: 1.1rem 1.25rem;
}
.wb-who { display: flex; align-items: baseline; gap: 0.6rem; flex-wrap: wrap; }
.wb-rel { color: var(--fg3); font-size: 0.82rem; }
.wb-obs { margin: 0.55rem 0 0; line-height: 1.65; }
.wb-fp {
  margin: 0.65rem 0 0; color: var(--fg2); font-size: 0.88rem; line-height: 1.6;
  border-left: 2px solid var(--rule); padding-left: 0.8rem;
}
.wb-seen { margin: 0.65rem 0 0; color: var(--fg3); font-size: 0.8rem; }

.wb-foot {
  margin: 2.5rem 0 0; padding-top: 1rem;
  border-top: 1px solid var(--rule);
  color: var(--fg3); font-size: 0.85rem; max-width: 74ch; line-height: 1.65;
}
.wb-caveat {
  margin: 1rem 0 0;
  font-size: 0.86rem;
  line-height: 1.6;
  color: var(--fg2);
  border-left: 2px solid var(--warn);
  padding-left: 0.9rem;
}

/* ── Critical incident · RM 07 ───────────────────────────────────────────────
   Written for 03:14. No charts, no density, generous type — somebody is
   reading this having just been told something terrible. */

.inc-idle { margin: 2.25rem 0 0; max-width: 70ch; }
.inc-idle h2 { font-size: 1.05rem; margin: 0 0 0.6rem; }
.inc-idle p { margin: 0 0 0.9rem; color: var(--fg2); line-height: 1.7; }

.inc-live {
  margin: 2.25rem 0 0;
  border: 1px solid var(--rule);
  border-left: 3px solid var(--bad, var(--warn));
  border-radius: var(--radius);
  padding: 1.75rem 2rem;
  background: var(--surface-2);
}
.inc-live > header {
  display: flex; justify-content: space-between; align-items: flex-start;
  gap: 1.5rem; flex-wrap: wrap;
}
.inc-purpose {
  font-size: 0.72rem; letter-spacing: 0.06em; text-transform: uppercase;
  color: var(--bad, var(--warn));
}
.inc-live h2 { margin: 0.3rem 0 0; font-size: 1.6rem; }
.inc-clock { text-align: right; display: grid; gap: 0.15rem; }
.inc-mins { font-size: 1.3rem; font-variant-numeric: tabular-nums; }
.inc-clock span:last-child { font-size: 0.76rem; color: var(--fg3); }

.inc-reason {
  margin: 1.15rem 0 0; font-size: 1.02rem; line-height: 1.7;
  border-left: 2px solid var(--rule); padding-left: 1rem; color: var(--fg1);
}
.inc-by { margin: 0.6rem 0 0; font-size: 0.82rem; color: var(--fg3); }

.inc-grid { display: grid; gap: 1.5rem 2.5rem; margin: 1.75rem 0 0; }
@media (min-width: 880px) { .inc-grid { grid-template-columns: 1fr 1.2fr; } }
.inc-grid h3, .inc-contacts h3 {
  font-size: 0.78rem; letter-spacing: 0.05em; text-transform: uppercase;
  color: var(--fg3); margin: 0 0 0.7rem;
  display: flex; align-items: center; gap: 0.5rem;
}
.inc-chips { list-style: none; margin: 0; padding: 0; display: flex; flex-wrap: wrap; gap: 0.35rem; }
.inc-chips li {
  font-size: 0.76rem; padding: 0.15rem 0.5rem; border-radius: 4px;
  background: var(--accent-soft); color: var(--accent);
}
.inc-chips[data-no] li {
  background: transparent; color: var(--fg3);
  border: 1px dashed var(--rule); text-decoration: line-through;
}
.inc-vault {
  margin: 0.9rem 0 0; font-size: 0.84rem; line-height: 1.65; color: var(--fg2);
  border-left: 2px solid var(--rule); padding-left: 0.9rem;
}

.inc-contacts { margin: 1.75rem 0 0; padding-top: 1.25rem; border-top: 1px solid var(--rule); }
.inc-count {
  font-size: 0.7rem; color: var(--fg3); border: 1px solid var(--rule);
  border-radius: 999px; padding: 0.05rem 0.4rem; text-transform: none; letter-spacing: 0;
}
.inc-contacts ul { list-style: none; margin: 0; padding: 0; display: grid; gap: 0.5rem; }
.inc-contacts li {
  display: flex; align-items: baseline; gap: 0.6rem; flex-wrap: wrap;
  padding: 0.55rem 0.75rem; border: 1px solid var(--rule); border-radius: var(--radius);
}
.inc-contacts li[data-stale] { border-left: 3px solid var(--warn); }
.inc-rel { font-size: 0.8rem; color: var(--fg3); }
.inc-em {
  font-size: 0.7rem; text-transform: uppercase; letter-spacing: 0.04em;
  color: var(--accent); background: var(--accent-soft);
  border-radius: 999px; padding: 0.05rem 0.45rem;
}
.inc-age { margin-left: auto; font-size: 0.75rem; color: var(--fg3); }
.inc-none { color: var(--fg3); border-left: 2px solid var(--warn); padding-left: 0.9rem; margin: 0; }

.inc-foot {
  margin: 2.5rem 0 0; padding-top: 1rem; border-top: 1px solid var(--rule);
  color: var(--fg3); font-size: 0.85rem; max-width: 76ch; line-height: 1.7;
}

/* ── The rest of a student's record · XP 05 ──────────────────────────────────
   Editorial, not console: this is the student product, and the surface it sits
   on is light. Generous measure, quiet rules, nothing that reads as a dashboard
   about the person reading it. */

.rec-life { margin: 3rem 0 0; padding-top: 2rem; border-top: 1px solid var(--rule); }
.rec-life > h2 { font-size: 1.35rem; margin: 0 0 1.5rem; }
.rec-block { margin: 0 0 2.25rem; }
.rec-block h3 {
  font-size: 0.78rem; letter-spacing: 0.06em; text-transform: uppercase;
  color: var(--fg3); margin: 0 0 0.8rem;
  display: flex; align-items: center; gap: 0.5rem;
}
.rec-count {
  font-size: 0.72rem; border: 1px solid var(--rule);
  border-radius: 999px; padding: 0.05rem 0.45rem; letter-spacing: 0;
}
.rec-note {
  margin: 0.9rem 0 0; font-size: 0.86rem; line-height: 1.7;
  color: var(--fg3); max-width: 66ch;
}

.rec-orgs { list-style: none; margin: 0; padding: 0; display: grid; gap: 0.45rem; }
.rec-orgs li {
  display: flex; align-items: baseline; gap: 0.7rem; flex-wrap: wrap;
  padding: 0.5rem 0; border-bottom: 1px solid var(--rule);
}
.rec-orgs li[data-past] strong { color: var(--fg3); }
.rec-role {
  font-size: 0.72rem; text-transform: uppercase; letter-spacing: 0.04em;
  color: var(--accent);
}
.rec-dates { margin-left: auto; font-size: 0.78rem; color: var(--fg3); font-variant-numeric: tabular-nums; }

.rec-att { list-style: none; margin: 0; padding: 0; display: grid; gap: 0.3rem; }
.rec-att li {
  display: flex; align-items: baseline; gap: 0.8rem;
  padding: 0.4rem 0; border-bottom: 1px solid var(--rule);
}
.rec-when { font-size: 0.78rem; color: var(--fg3); font-variant-numeric: tabular-nums; flex: none; }
.rec-title { flex: 1 1 auto; }
.rec-tier {
  flex: none; font-size: 0.7rem; text-transform: uppercase; letter-spacing: 0.04em;
  padding: 0.05rem 0.45rem; border-radius: 999px;
  border: 1px solid var(--rule); color: var(--fg3);
}
.rec-tier[data-tier="attested"] { border-color: var(--good); color: var(--good); }
.rec-tier[data-tier="code"]     { border-color: var(--accent); color: var(--accent); }

.rec-signals ul { list-style: none; margin: 0; padding: 0; display: grid; gap: 1rem; }
.rec-signals li {
  border: 1px solid var(--rule); border-left: 3px solid var(--accent);
  border-radius: var(--radius); padding: 1.1rem 1.25rem;
}
.rec-obs { margin: 0; line-height: 1.7; }
.rec-fp {
  margin: 0.7rem 0 0; font-size: 0.87rem; line-height: 1.65; color: var(--fg2);
  border-left: 2px solid var(--rule); padding-left: 0.85rem;
}
.rec-told { margin: 0.7rem 0 0; font-size: 0.8rem; color: var(--fg3); }

/* ── Community standards · CS 01, CS 04 ──────────────────────────────────── */

.cs-thesis {
  margin: 2.25rem 0 0; padding: 1.25rem 1.5rem;
  border: 1px solid var(--rule); border-left: 3px solid var(--accent);
  border-radius: var(--radius); background: var(--surface-2);
}
.cs-thesis p { margin: 0; line-height: 1.7; max-width: 76ch; color: var(--fg2); }

.cs-block { margin: 2.5rem 0 0; }
.cs-block h2 {
  font-size: 1.05rem; margin: 0 0 0.5rem;
  display: flex; align-items: center; gap: 0.6rem;
}
.cs-count {
  font-size: 0.72rem; color: var(--fg3); border: 1px solid var(--rule);
  border-radius: 999px; padding: 0.05rem 0.5rem;
}
.cs-lede { margin: 0 0 1.1rem; color: var(--fg2); max-width: 74ch; line-height: 1.7; }
.cs-none { color: var(--fg3); }

.cs-matters { list-style: none; margin: 0; padding: 0; display: grid; gap: 0.35rem; }
.cs-matters li {
  display: flex; align-items: baseline; gap: 0.75rem; flex-wrap: wrap;
  padding: 0.6rem 0.85rem; border: 1px solid var(--rule); border-radius: var(--radius);
}
.cs-type { font-size: 0.8rem; color: var(--fg3); }
.cs-state, .cs-sstate {
  font-size: 0.7rem; text-transform: uppercase; letter-spacing: 0.04em;
  padding: 0.05rem 0.45rem; border-radius: 999px; border: 1px solid var(--rule); color: var(--fg3);
}
.cs-state[data-state="open"] { border-color: var(--warn); color: var(--warn); }
.cs-sstate[data-state="completed"] { border-color: var(--good); color: var(--good); }
.cs-owner { font-size: 0.8rem; color: var(--fg2); }
.cs-when { margin-left: auto; font-size: 0.78rem; color: var(--fg3); font-variant-numeric: tabular-nums; }

.cs-wall {
  margin: 1rem 0 0; font-size: 0.85rem; line-height: 1.7; color: var(--fg3);
  border-left: 2px solid var(--rule); padding-left: 0.9rem; max-width: 72ch;
}

.cs-sanctions { list-style: none; margin: 0; padding: 0; display: grid; gap: 0.85rem; }
.cs-sanctions li {
  border: 1px solid var(--rule); border-left: 3px solid var(--warn);
  border-radius: var(--radius); padding: 1rem 1.25rem;
}
.cs-sanctions li[data-state="completed"] { border-left-color: var(--good); }
.cs-srow { display: flex; align-items: baseline; gap: 0.7rem; flex-wrap: wrap; }
.cs-due { margin-left: auto; font-size: 0.78rem; color: var(--fg3); font-variant-numeric: tabular-nums; }
.cs-desc { margin: 0.5rem 0 0; line-height: 1.6; }
.cs-evidence, .cs-pending {
  margin: 0.6rem 0 0; font-size: 0.85rem; line-height: 1.65; color: var(--fg2);
  border-left: 2px solid var(--rule); padding-left: 0.85rem;
}
.cs-evidence code, .cs-pending code {
  font-family: var(--font-mono, ui-monospace, monospace); font-size: 0.85em;
}

.cs-foot {
  margin: 2.5rem 0 0; padding-top: 1rem; border-top: 1px solid var(--rule);
  color: var(--fg3); font-size: 0.85rem; max-width: 76ch; line-height: 1.7;
}
.wb-lever {
  margin: 1.25rem 0 0; padding: 1.25rem 1.5rem;
  border: 1px solid var(--rule); border-left: 3px solid var(--good);
  border-radius: var(--radius);
}
.wb-lever h2 { font-size: 1rem; margin: 0 0 0.6rem; }
.wb-lever p { margin: 0 0 0.7rem; max-width: 70ch; line-height: 1.7; }
.wb-lever-note { color: var(--fg2); font-size: 0.88rem; margin-bottom: 0 !important; }

/* ── Partnership readiness · SV 01 §3 ─────────────────────────────────────── */
.pr-readiness { margin: 0 0 1.75rem; }
.pr-readiness h2 {
  font-size: 1.05rem; margin: 0 0 0.4rem;
  display: flex; align-items: baseline; gap: 0.7rem; flex-wrap: wrap;
}
.pr-sub { font-size: 0.72rem; letter-spacing: 0.04em; text-transform: uppercase; color: var(--fg3); }
.pr-lede { margin: 0 0 1.1rem; color: var(--fg2); max-width: 74ch; line-height: 1.7; }
.pr-list { list-style: none; margin: 0; padding: 0; display: grid; gap: 0.6rem; }
.pr-list > li {
  border: 1px solid var(--rule); border-left: 3px solid var(--rule);
  border-radius: var(--radius); padding: 0.85rem 1.1rem;
}
.pr-list > li[data-readiness="ready"]    { border-left-color: var(--good); }
.pr-list > li[data-readiness="expiring"] { border-left-color: var(--warn); }
.pr-list > li[data-readiness="lapsed"]   { border-left-color: var(--bad); }
.pr-head { display: flex; align-items: baseline; gap: 0.7rem; flex-wrap: wrap; }
.pr-state {
  font-size: 0.7rem; text-transform: uppercase; letter-spacing: 0.04em;
  padding: 0.05rem 0.45rem; border-radius: 999px; border: 1px solid var(--rule); color: var(--fg3);
}
.pr-state[data-readiness="ready"]    { border-color: var(--good); color: var(--good); }
.pr-state[data-readiness="expiring"] { border-color: var(--warn); color: var(--warn); }
.pr-state[data-readiness="lapsed"]   { border-color: var(--bad); color: var(--bad); }
.pr-cap { margin-left: auto; font-size: 0.78rem; color: var(--fg3); }
.pr-why { list-style: none; margin: 0.55rem 0 0; padding: 0; display: grid; gap: 0.2rem; }
.pr-why li { font-size: 0.82rem; color: var(--fg3); padding-left: 0.85rem; position: relative; }
.pr-why li::before {
  content: ""; position: absolute; left: 0; top: 0.55em;
  width: 4px; height: 4px; border-radius: 50%; background: var(--fg3);
}
.pr-why li[data-signal="lapsed"]   { color: var(--bad); }
.pr-why li[data-signal="lapsed"]::before   { background: var(--bad); }
.pr-why li[data-signal="expiring"] { color: var(--warn); }
.pr-why li[data-signal="expiring"]::before { background: var(--warn); }
.pr-why li[data-signal="missing"]  { color: var(--fg2); }

/* ── The whole student · the platform thesis on one page ──────────────────── */
.ws-whole { margin: 3rem 0 0; padding-top: 2rem; border-top: 1px solid var(--rule); }
.ws-whole > h2 { font-size: 1.15rem; margin: 0 0 0.4rem; }
.ws-lede { margin: 0 0 1.4rem; color: var(--fg2); max-width: 76ch; line-height: 1.7; }
.ws-grid { display: grid; gap: 0.85rem; }
@media (min-width: 900px)  { .ws-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
@media (min-width: 1320px) { .ws-grid { grid-template-columns: repeat(3, minmax(0, 1fr)); } }
.ws-card {
  border: 1px solid var(--rule); border-radius: var(--radius);
  padding: 1rem 1.15rem; align-content: start;
}
.ws-card[data-withheld] { border-style: dashed; }
.ws-card h3 {
  font-size: 0.76rem; letter-spacing: 0.05em; text-transform: uppercase;
  color: var(--fg3); margin: 0 0 0.65rem;
  display: flex; align-items: baseline; gap: 0.5rem;
}
.ws-compartment {
  margin-left: auto; font-family: var(--font-mono, ui-monospace, monospace);
  font-size: 0.68rem; letter-spacing: 0; text-transform: none; opacity: 0.75;
}
.ws-rows { list-style: none; margin: 0; padding: 0; display: grid; gap: 0.4rem; }
.ws-rows li { display: flex; align-items: baseline; gap: 0.55rem; flex-wrap: wrap; font-size: 0.86rem; }
.ws-rows li.ws-stack { display: block; }
.ws-rows li.ws-stack strong { display: block; font-weight: 400; line-height: 1.55; }
.ws-role { font-size: 0.78rem; color: var(--fg3); }
.ws-dates { margin-left: auto; font-size: 0.75rem; color: var(--fg3); font-variant-numeric: tabular-nums; }
.ws-empty { margin: 0; font-size: 0.83rem; color: var(--fg3); }
.ws-withheld {
  margin: 0; font-size: 0.83rem; line-height: 1.6; color: var(--fg3);
  border-left: 2px solid var(--rule); padding-left: 0.75rem;
}

/* ── Recreation · RC 03 ───────────────────────────────────────────────────── */
.rc-frame {
  margin: 2.25rem 0 0; padding: 1.25rem 1.5rem;
  border: 1px solid var(--rule); border-left: 3px solid var(--accent);
  border-radius: var(--radius); background: var(--surface-2);
}
.rc-frame p { margin: 0 0 0.7rem; line-height: 1.7; max-width: 74ch; }
.rc-frame-note { color: var(--fg2); font-size: 0.9rem; margin-bottom: 0 !important; }
.rc-block { margin: 2.5rem 0 0; }
.rc-block h2 {
  font-size: 1.05rem; margin: 0 0 0.5rem;
  display: flex; align-items: baseline; gap: 0.7rem; flex-wrap: wrap;
}
.rc-sub { font-size: 0.72rem; letter-spacing: 0.04em; text-transform: uppercase; color: var(--fg3); }
.rc-lede { margin: 0 0 1.1rem; color: var(--fg2); max-width: 76ch; line-height: 1.7; }
.rc-list { list-style: none; margin: 0; padding: 0; display: grid; gap: 0.4rem; }
.rc-list li {
  display: flex; align-items: center; gap: 0.75rem; flex-wrap: wrap;
  padding: 0.6rem 0.9rem; border: 1px solid var(--rule); border-radius: var(--radius);
}
.rc-list li[data-full] { border-left: 3px solid var(--warn); }
.rc-when { font-variant-numeric: tabular-nums; color: var(--fg3); font-size: 0.85rem; flex: none; }
.rc-tag {
  font-size: 0.68rem; text-transform: uppercase; letter-spacing: 0.04em;
  color: var(--warn); border: 1px solid var(--warn); border-radius: 999px; padding: 0.02rem 0.4rem;
}
.rc-bar {
  flex: 1 1 120px; min-width: 90px; height: 5px; border-radius: 3px;
  background: var(--rule); overflow: hidden;
}
.rc-bar > span { display: block; height: 100%; background: var(--good); }
.rc-num { font-size: 0.78rem; color: var(--fg3); font-variant-numeric: tabular-nums; }
.rc-teams { list-style: none; margin: 0; padding: 0; display: grid; gap: 0.35rem; }
.rc-teams li {
  display: flex; align-items: baseline; gap: 0.7rem; flex-wrap: wrap;
  padding: 0.5rem 0.85rem; border: 1px solid var(--rule); border-radius: var(--radius);
}
.rc-roster { font-size: 0.8rem; color: var(--fg3); }
.rc-foot {
  margin: 2.5rem 0 0; padding-top: 1rem; border-top: 1px solid var(--rule);
  color: var(--fg3); font-size: 0.85rem; max-width: 78ch; line-height: 1.7;
}

/* ── Arrival · OR 01 §3 ───────────────────────────────────────────────────── */
.ar-frame {
  margin: 2.25rem 0 1.5rem; padding: 1.25rem 1.5rem;
  border: 1px solid var(--rule); border-left: 3px solid var(--accent);
  border-radius: var(--radius); background: var(--surface-2);
}
.ar-frame p { margin: 0 0 0.7rem; line-height: 1.7; max-width: 74ch; }
.ar-note { color: var(--fg2); font-size: 0.9rem; margin-bottom: 0 !important; }
.ar-list { list-style: none; margin: 0; padding: 0; display: grid; gap: 0.5rem; }
.ar-list > li {
  border: 1px solid var(--rule); border-left: 3px solid var(--warn);
  border-radius: var(--radius); padding: 0.8rem 1.1rem;
}
.ar-head { display: flex; align-items: baseline; gap: 0.7rem; flex-wrap: wrap; }
.ar-count { margin-left: auto; font-size: 0.78rem; color: var(--fg3); font-variant-numeric: tabular-nums; }
.ar-what { list-style: none; margin: 0.5rem 0 0; padding: 0; display: grid; gap: 0.2rem; }
.ar-what li {
  font-size: 0.84rem; color: var(--fg2); padding-left: 0.85rem; position: relative;
  display: flex; align-items: baseline; gap: 0.5rem;
}
.ar-what li::before {
  content: ""; position: absolute; left: 0; top: 0.55em;
  width: 4px; height: 4px; border-radius: 50%; background: var(--warn);
}
.ar-so {
  font-size: 0.66rem; text-transform: uppercase; letter-spacing: 0.04em;
  color: var(--fg3); border: 1px dashed var(--rule); border-radius: 999px; padding: 0 0.4rem;
}
.ar-foot {
  margin: 2.5rem 0 0; padding-top: 1rem; border-top: 1px solid var(--rule);
  color: var(--fg3); font-size: 0.85rem; max-width: 78ch; line-height: 1.7;
}
.rec-bg { border-left: 3px solid var(--warn); padding-left: 1rem; }
.rec-bg ul { list-style: none; margin: 0; padding: 0; display: grid; gap: 0.7rem; }
.rec-bg-head { display: flex; align-items: baseline; gap: 0.6rem; flex-wrap: wrap; }
.rec-bg-comp { font-size: 0.72rem; text-transform: uppercase; letter-spacing: 0.04em; color: var(--accent); }
.rec-bg-at { margin-left: auto; font-size: 0.76rem; color: var(--fg3); font-variant-numeric: tabular-nums; }
.rec-bg-why { margin: 0.35rem 0 0; font-size: 0.9rem; line-height: 1.65; color: var(--fg2); }
.rec-access { list-style: none; margin: 0; padding: 0; display: grid; gap: 0.3rem; }
.rec-access li {
  display: flex; align-items: baseline; gap: 0.7rem;
  padding: 0.4rem 0; border-bottom: 1px solid var(--rule); font-size: 0.88rem;
}
.rec-access li strong { text-transform: capitalize; }
.rec-purpose { color: var(--fg3); font-size: 0.82rem; }
.rec-times { margin-left: auto; font-size: 0.78rem; color: var(--fg3); font-variant-numeric: tabular-nums; }
.rec-bg-list { margin: 0.4rem 0 0; font-size: 0.76rem; color: var(--fg3); letter-spacing: 0.01em; }

/* ── Break-glass · DM 04 §7, DM 08 ────────────────────────────────────────────
   Small, reachable, and unglamorous. The friction that matters is not in the
   interface — it is that a named person reads what you wrote. */
.bg-wrap { margin-top: 0.7rem; }
.bg-open {
  font-size: 0.76rem; padding: 0.25rem 0.6rem;
  border: 1px dashed var(--warn); color: var(--warn);
  background: transparent; border-radius: var(--radius); cursor: pointer;
}
.bg-open:hover { background: color-mix(in srgb, var(--warn) 12%, transparent); }
.bg-form { display: grid; gap: 0.4rem; margin-top: 0.4rem; }
.bg-form label { font-size: 0.8rem; }
.bg-hint { margin: 0; font-size: 0.75rem; color: var(--fg3); line-height: 1.5; }
.bg-form textarea {
  width: 100%; font: inherit; font-size: 0.84rem; line-height: 1.5;
  padding: 0.5rem 0.6rem; border: 1px solid var(--control-line);
  border-radius: var(--radius); background: var(--surface-1); color: var(--fg1);
  resize: vertical;
}
.bg-actions { display: flex; gap: 0.5rem; }
.bg-go {
  font-size: 0.78rem; padding: 0.3rem 0.7rem; border-radius: var(--radius);
  border: 1px solid var(--warn); background: var(--warn); color: var(--surface);
  cursor: pointer;
}
.bg-go[disabled] { opacity: 0.6; cursor: default; }
.bg-cancel {
  font-size: 0.78rem; padding: 0.3rem 0.7rem; border-radius: var(--radius);
  border: 1px solid var(--rule); background: transparent; color: var(--fg3); cursor: pointer;
}
.bg-error { margin: 0; font-size: 0.78rem; color: var(--bad); line-height: 1.5; }
.bg-done {
  margin-top: 0.7rem; font-size: 0.8rem; line-height: 1.6; color: var(--fg2);
  border-left: 2px solid var(--good); padding-left: 0.7rem;
}
.ws-bg {
  margin: 0 0 0.6rem; font-size: 0.76rem; line-height: 1.55; color: var(--warn);
  border-left: 2px solid var(--warn); padding-left: 0.6rem;
}

/* ── Booking policy · EV 02 §5, DM 14 P3 ──────────────────────────────────── */
.bp-block { margin: 2.5rem 0 0; }
.bp-block h2 {
  font-size: 1.05rem; margin: 0 0 0.4rem;
  display: flex; align-items: baseline; gap: 0.7rem; flex-wrap: wrap;
}
.bp-sub { font-size: 0.72rem; letter-spacing: 0.04em; text-transform: uppercase; color: var(--fg3); }
.bp-lede { margin: 0 0 1.1rem; color: var(--fg2); max-width: 74ch; line-height: 1.7; }
.bp-list { list-style: none; margin: 0; padding: 0; display: grid; gap: 0.7rem; }
.bp-list > li {
  border: 1px solid var(--rule); border-left: 3px solid var(--rule);
  border-radius: var(--radius); padding: 0.9rem 1.15rem;
}
.bp-head { display: flex; align-items: baseline; gap: 0.65rem; flex-wrap: wrap; }
.bp-who { font-size: 0.8rem; color: var(--fg3); }
.bp-tag {
  margin-left: auto; font-size: 0.68rem; text-transform: uppercase; letter-spacing: 0.04em;
  border: 1px solid var(--rule); border-radius: 999px; padding: 0.02rem 0.45rem; color: var(--fg3);
}
.bp-tag[data-auto] { border-color: var(--good); color: var(--good); }
.bp-answer { margin: 0.5rem 0 0; font-size: 0.88rem; line-height: 1.6; }
.bp-why {
  margin: 0.5rem 0 0; font-size: 0.83rem; line-height: 1.65; color: var(--fg2);
  border-left: 2px solid var(--rule); padding-left: 0.8rem;
}
.bp-by { margin: 0.4rem 0 0; font-size: 0.74rem; color: var(--fg3); }
.cal-phases { margin: 0 0 1rem; display: flex; flex-wrap: wrap; gap: 0.5rem; }
.cal-phase {
  font-size: 0.78rem; color: var(--fg2); line-height: 1.4;
  border: 1px solid var(--rule); border-radius: var(--radius);
  padding: 0.25rem 0.6rem; display: inline-flex; align-items: baseline; gap: 0.5rem;
}
.cal-cycle { font-size: 0.68rem; text-transform: uppercase; letter-spacing: 0.04em; color: var(--fg3); }

/* ── Assignment workbench · HP 08 §2 ──────────────────────────────────────── */
.wbx-note {
  margin: 2.25rem 0 1.5rem; padding: 1.15rem 1.4rem;
  border: 1px solid var(--rule); border-left: 3px solid var(--accent);
  border-radius: var(--radius); background: var(--surface-2);
}
.wbx-note p { margin: 0 0 0.65rem; line-height: 1.7; max-width: 74ch; }
.wbx-second { color: var(--fg2); font-size: 0.9rem; margin-bottom: 0 !important; }
.wbx { display: grid; gap: 0.5rem; max-width: 62rem; }
.wbx-cols { display: grid; gap: 0.85rem; }
@media (min-width: 760px) { .wbx-cols { grid-template-columns: 1fr 1fr; } }
.wbx label { display: block; font-size: 0.8rem; margin-bottom: 0.25rem; }
.wbx select, .wbx textarea {
  width: 100%; font: inherit; font-size: 0.86rem;
  padding: 0.45rem 0.6rem; border: 1px solid var(--control-line);
  border-radius: var(--radius); background: var(--surface-1); color: var(--fg1);
}
.wbx textarea { line-height: 1.55; resize: vertical; }
.wbx-hint { margin: 0.1rem 0 0; font-size: 0.76rem; color: var(--fg3); }
.wbx-go {
  justify-self: start; margin-top: 0.5rem;
  font-size: 0.84rem; padding: 0.4rem 0.9rem; border-radius: var(--radius);
  border: 1px solid var(--accent); background: var(--accent); color: var(--surface);
  cursor: pointer;
}
.wbx-go[disabled] { opacity: 0.45; cursor: default; }
.wbx-ok { margin: 0.5rem 0 0; font-size: 0.84rem; color: var(--good); line-height: 1.6; }
.wbx-err { margin: 0.5rem 0 0; font-size: 0.84rem; color: var(--bad); line-height: 1.6; }
.wbx-empty { color: var(--fg3); max-width: 66ch; line-height: 1.7; border-left: 2px solid var(--rule); padding-left: 0.9rem; }

/* ── Metric catalog · HP 16 §2 ──────────────────────────────────────────── */
.mx-block { margin: 2.5rem 0 0; }
.mx-block h2 { font-size: 1.05rem; margin: 0 0 0.5rem; }
.mx-lede { margin: 0 0 1.1rem; color: var(--fg2); max-width: 74ch; line-height: 1.7; }
.mx-list { list-style: none; margin: 0; padding: 0; display: grid; gap: 0.7rem; }
.mx-list > li {
  border: 1px solid var(--rule); border-left: 3px solid var(--accent);
  border-radius: var(--radius); padding: 1rem 1.2rem;
}
.mx-list[data-waiting] > li { border-left-color: var(--rule); border-style: dashed; }
.mx-head { display: flex; align-items: baseline; gap: 0.7rem; flex-wrap: wrap; }
.mx-value { margin-left: auto; font-variant-numeric: tabular-nums; font-size: 1.05rem; }
.mx-target { margin-left: auto; font-size: 0.76rem; color: var(--fg3); }
.mx-def { margin: 0.4rem 0 0; font-size: 0.88rem; color: var(--fg2); line-height: 1.6; }
.mx-query {
  display: block; margin: 0.5rem 0 0; font-size: 0.75rem;
  font-family: var(--font-mono, ui-monospace, monospace);
  color: var(--fg3); background: var(--surface-2);
  padding: 0.35rem 0.55rem; border-radius: 4px; overflow-x: auto; white-space: pre;
}
.mx-meta { margin: 0.45rem 0 0; font-size: 0.75rem; color: var(--fg3); }
.mx-note {
  margin: 0.6rem 0 0; font-size: 0.83rem; line-height: 1.65; color: var(--fg2);
  border-left: 2px solid var(--warn); padding-left: 0.8rem;
}
.mx-alone {
  margin: 0.5rem 0 0; font-size: 0.8rem; color: var(--warn); line-height: 1.55;
}
.mx-waiting {
  margin: 0.5rem 0 0; font-size: 0.83rem; line-height: 1.65; color: var(--fg3);
  border-left: 2px solid var(--rule); padding-left: 0.8rem;
}
.mx-foot {
  margin: 2.5rem 0 0; padding-top: 1rem; border-top: 1px solid var(--rule);
  color: var(--fg3); font-size: 0.85rem; max-width: 76ch; line-height: 1.7;
}

/* ── Honest odds · HP 10 §7.3 ─────────────────────────────────────────────── */
.odds {
  margin: 2.5rem 0 0; padding: 1.4rem 1.6rem;
  border: 1px solid var(--rule); border-left: 3px solid var(--good);
  border-radius: var(--radius); background: var(--surface-2);
}
.odds[data-over] { border-left-color: var(--warn); }
.odds h2 { font-size: 1.05rem; margin: 0 0 0.9rem; display: flex; align-items: baseline; gap: 0.7rem; flex-wrap: wrap; }
.odds-sub { font-size: 0.72rem; letter-spacing: 0.04em; text-transform: uppercase; color: var(--fg3); }
.odds-figures { display: flex; gap: 2.5rem; flex-wrap: wrap; margin-bottom: 0.9rem; }
.odds-figures > div { display: grid; gap: 0.15rem; }
.odds-n { font-size: 2rem; line-height: 1; font-variant-numeric: tabular-nums; }
.odds-figures span:last-child { font-size: 0.8rem; color: var(--fg3); }
.odds-say { margin: 0; line-height: 1.7; max-width: 74ch; }
.odds-note {
  margin: 0.8rem 0 0; font-size: 0.82rem; line-height: 1.6; color: var(--fg3);
  border-left: 2px solid var(--rule); padding-left: 0.8rem; max-width: 72ch;
}

/* ── An organization's own 360 · DM 01 §2 ─────────────────────────────────── */
.org-360 { margin: 2.5rem 0 0; }
.org-360 h2 { font-size: 1.05rem; margin: 0 0 0.9rem; display: flex; align-items: baseline; gap: 0.7rem; flex-wrap: wrap; }
.org-360-sub { font-size: 0.72rem; letter-spacing: 0.04em; text-transform: uppercase; color: var(--fg3); }
.org-360 ul { list-style: none; margin: 0; padding: 0; display: grid; gap: 0.5rem; }
.org-360 li { border: 1px solid var(--rule); border-radius: var(--radius); padding: 0.7rem 1rem; }
.org-360-head { display: flex; align-items: baseline; gap: 0.6rem; flex-wrap: wrap; }
.org-360-head strong { text-transform: capitalize; }
.org-360-chan { font-size: 0.78rem; color: var(--fg3); }
.org-360-when { margin-left: auto; font-size: 0.76rem; color: var(--fg3); font-variant-numeric: tabular-nums; }
.org-360-body { margin: 0.4rem 0 0; font-size: 0.87rem; line-height: 1.6; color: var(--fg2); }
.org-360-spine { margin: 0.4rem 0 0; font-size: 0.8rem; color: var(--fg3); font-style: italic; }

/* ── Identity resolution · DM 01 §6 ───────────────────────────────────────── */
.mq-list { list-style: none; margin: 0; padding: 0; display: grid; gap: 0.7rem; }
.mq-list > li {
  border: 1px solid var(--rule); border-left: 3px solid var(--rule);
  border-radius: var(--radius); padding: 0.9rem 1.15rem;
}
.mq-list > li[data-likely] { border-left-color: var(--warn); }
.mq-pair { display: flex; align-items: baseline; gap: 0.6rem; flex-wrap: wrap; }
.mq-vs { color: var(--fg3); }
.mq-scores { display: flex; gap: 1.1rem; flex-wrap: wrap; margin-top: 0.4rem; font-size: 0.78rem; color: var(--fg3); }
.mq-scores b { color: var(--fg1); font-variant-numeric: tabular-nums; }
.mq-rows { margin-left: auto; }
.mq-false { margin: 0.5rem 0 0; font-size: 0.8rem; line-height: 1.55; color: var(--fg3); border-left: 2px solid var(--rule); padding-left: 0.7rem; }
.mq-open, .mq-cancel {
  margin-top: 0.6rem; font-size: 0.78rem; padding: 0.25rem 0.6rem;
  border: 1px solid var(--rule); background: transparent; color: var(--fg2);
  border-radius: var(--radius); cursor: pointer;
}
.mq-form { display: grid; gap: 0.5rem; margin-top: 0.7rem; }
.mq-form fieldset { border: 0; padding: 0; margin: 0; display: grid; gap: 0.2rem; }
.mq-form legend { font-size: 0.78rem; color: var(--fg3); padding: 0; }
.mq-form label { font-size: 0.84rem; }
.mq-form textarea {
  width: 100%; font: inherit; font-size: 0.84rem; line-height: 1.5;
  padding: 0.45rem 0.6rem; border: 1px solid var(--control-line);
  border-radius: var(--radius); background: var(--surface-1); color: var(--fg1); resize: vertical;
}
.mq-hint { margin: 0; font-size: 0.74rem; color: var(--fg3); line-height: 1.5; }
.mq-err { margin: 0; font-size: 0.78rem; color: var(--bad); }
.mq-actions { display: flex; gap: 0.5rem; }
.mq-go {
  font-size: 0.78rem; padding: 0.3rem 0.7rem; border-radius: var(--radius);
  border: 1px solid var(--warn); background: var(--warn); color: var(--surface); cursor: pointer;
}
.mq-go[disabled] { opacity: 0.5; cursor: default; }
.mq-done { border-left: 3px solid var(--good) !important; font-size: 0.85rem; line-height: 1.6; }
.mq-empty { color: var(--fg3); }
.mq-history { margin: 2.5rem 0 0; }
.mq-history h2 { font-size: 1.05rem; margin: 0 0 0.7rem; }
.mq-history ul { list-style: none; margin: 0; padding: 0; display: grid; gap: 0.5rem; }
.mq-history li { border: 1px solid var(--rule); border-radius: var(--radius); padding: 0.7rem 1rem; font-size: 0.86rem; }
.mq-history li p { margin: 0.3rem 0 0; color: var(--fg3); font-size: 0.82rem; line-height: 1.55; }
.mq-foot {
  margin: 2.5rem 0 0; padding-top: 1rem; border-top: 1px solid var(--rule);
  color: var(--fg3); font-size: 0.85rem; max-width: 76ch; line-height: 1.7;
}

/* ── Gender-inclusive housing · HP 10 §6 ──────────────────────────────────── */
.gih-floor {
  margin: 2.25rem 0 0; padding: 1.25rem 1.5rem;
  border: 1px solid var(--rule); border-left: 3px solid var(--bad);
  border-radius: var(--radius); background: var(--surface-2);
}
.gih-floor[data-holds] { border-left-color: var(--good); }
.gih-floor h2 { font-size: 1.05rem; margin: 0 0 0.4rem; }
.gih-floor > p { margin: 0 0 0.9rem; color: var(--fg2); max-width: 72ch; line-height: 1.7; }
.gih-floor ul { list-style: none; margin: 0; padding: 0; display: grid; gap: 0.55rem; }
.gih-floor li { display: grid; gap: 0.15rem; padding-left: 0.9rem; position: relative; }
.gih-floor li::before {
  content: ""; position: absolute; left: 0; top: 0.5em;
  width: 5px; height: 5px; border-radius: 50%; background: var(--bad);
}
.gih-floor li[data-ok]::before { background: var(--good); }
.gih-by { font-size: 0.76rem; color: var(--fg3); font-family: var(--font-mono, ui-monospace, monospace); }
.gih-state { font-size: 0.7rem; text-transform: uppercase; letter-spacing: 0.04em; color: var(--fg3); }
.gih-dims { margin: 2.5rem 0 0; }
.gih-dims h2 { font-size: 1.05rem; margin: 0 0 1rem; }
.gih-dims ul { list-style: none; margin: 0; padding: 0; display: grid; gap: 0.6rem; }
.gih-dims li { border: 1px dashed var(--rule); border-radius: var(--radius); padding: 0.85rem 1.1rem; }
.gih-q { display: flex; align-items: baseline; gap: 0.7rem; flex-wrap: wrap; }
.gih-unset {
  margin-left: auto; font-size: 0.68rem; text-transform: uppercase; letter-spacing: 0.04em;
  color: var(--fg3); border: 1px solid var(--rule); border-radius: 999px; padding: 0.02rem 0.45rem;
}
.gih-opts { margin: 0.4rem 0 0; font-size: 0.82rem; color: var(--fg3); }
.gih-note { margin: 0.4rem 0 0; font-size: 0.82rem; color: var(--fg2); border-left: 2px solid var(--rule); padding-left: 0.7rem; line-height: 1.6; }
.gih-tension {
  margin: 2.5rem 0 0; padding: 1.4rem 1.6rem;
  border: 1px solid var(--rule); border-left: 3px solid var(--warn); border-radius: var(--radius);
}
.gih-tension h2 { font-size: 1.05rem; margin: 0 0 0.8rem; }
.gih-tension blockquote {
  margin: 0 0 0.9rem; padding-left: 1rem; border-left: 2px solid var(--rule);
  font-style: italic; color: var(--fg1); line-height: 1.7;
}
.gih-tension p { margin: 0 0 0.7rem; line-height: 1.7; max-width: 74ch; color: var(--fg2); }
.gih-owner { font-size: 0.88rem; }
.gih-closing { margin-bottom: 0 !important; color: var(--fg1) !important; font-size: 1rem; }

/* ── The accessible room list · HP 07 §5 ──────────────────────────────────── */
.sl-floor { margin: 0 0 2.5rem; }
.sl-floor h2 { font-size: 1.05rem; margin: 0 0 0.8rem; }
.sl-rooms { list-style: none; margin: 0; padding: 0; display: grid; gap: 0.5rem; }
.sl-rooms > li {
  border: 1px solid var(--rule); border-left: 3px solid var(--good);
  border-radius: var(--radius); padding: 0.85rem 1.1rem;
}
.sl-rooms > li[data-state="taken"] { border-left-color: var(--rule); opacity: 0.72; }
.sl-rooms > li[data-state="held_other"] { border-left-color: var(--warn); }
.sl-rooms h3 { font-size: 0.95rem; margin: 0; display: flex; align-items: baseline; gap: 0.6rem; flex-wrap: wrap; }
.sl-type { font-size: 0.8rem; color: var(--fg3); font-weight: 400; }
.sl-state { margin-left: auto; font-size: 0.78rem; color: var(--fg3); font-weight: 400; }
.sl-facts { list-style: none; margin: 0.45rem 0 0; padding: 0; display: grid; gap: 0.15rem; }
.sl-facts li { font-size: 0.84rem; color: var(--fg2); padding-left: 0.85rem; position: relative; }
.sl-facts li::before {
  content: ""; position: absolute; left: 0; top: 0.55em;
  width: 3px; height: 3px; border-radius: 50%; background: var(--fg3);
}
.sl-take { display: inline-block; margin-top: 0.6rem; font-size: 0.84rem; }
.sl-foot {
  margin: 2.5rem 0 0; padding-top: 1rem; border-top: 1px solid var(--rule);
  color: var(--fg3); font-size: 0.85rem; max-width: 76ch; line-height: 1.7;
}
.sl-switch { margin: 1.25rem 0 0; font-size: 0.9rem; }

/* ── Selection-day runbook · HP 06 §8.4 ───────────────────────────────────── */
.rb-alarm {
  margin: 2rem 0 0; padding: 0.9rem 1.2rem; line-height: 1.6;
  border: 1px solid var(--bad); border-radius: var(--radius); color: var(--bad);
}
.rb-phase { margin: 2.25rem 0 0; }
.rb-phase h2 { font-size: 1.05rem; margin: 0 0 0.7rem; display: flex; align-items: baseline; gap: 0.7rem; }
.rb-when {
  font-size: 0.72rem; letter-spacing: 0.06em; text-transform: uppercase;
  color: var(--fg3); font-variant-numeric: tabular-nums;
}
.rb-phase ul { list-style: none; margin: 0; padding: 0; display: grid; gap: 0.4rem; }
.rb-phase li {
  border: 1px solid var(--rule); border-left: 3px solid var(--rule);
  border-radius: var(--radius); padding: 0.65rem 1rem;
}
.rb-phase li[data-kind="checked"] { border-left-color: var(--bad); }
.rb-phase li[data-kind="checked"][data-ok] { border-left-color: var(--good); }
.rb-phase li[data-kind="pending"] { border-left-color: var(--warn); border-style: dashed; }
.rb-phase li[data-kind="human"] { border-left-color: var(--accent); }
.rb-phase li[data-kind="external"] { border-style: dashed; }
.rb-head { display: flex; align-items: baseline; gap: 0.7rem; flex-wrap: wrap; }
.rb-text { font-size: 0.9rem; }
.rb-kind {
  margin-left: auto; font-size: 0.68rem; text-transform: uppercase;
  letter-spacing: 0.04em; color: var(--fg3);
}
.rb-finding { margin: 0.4rem 0 0; font-size: 0.82rem; line-height: 1.6; color: var(--fg2); }
.rb-dep { margin: 0.35rem 0 0; font-size: 0.78rem; color: var(--fg3); }
.rb-foot {
  margin: 2.5rem 0 0; padding-top: 1rem; border-top: 1px solid var(--rule);
  color: var(--fg3); font-size: 0.85rem; max-width: 76ch; line-height: 1.7;
}

/* ── The signing ceremony · HP 03 §4.2 ────────────────────────────────────── */
.sc {
  margin: 0 0 2rem; padding: 1.4rem 1.6rem; display: grid; gap: 0.55rem;
  border: 1px solid var(--rule); border-left: 3px solid var(--accent);
  border-radius: var(--radius); max-width: 62ch;
}
.sc h3 { margin: 0; font-size: 1.05rem; }
.sc-lede { margin: 0; color: var(--fg2); line-height: 1.7; }
.sc-guardian {
  margin: 0; font-size: 0.88rem; line-height: 1.65; color: var(--fg2);
  border-left: 2px solid var(--warn); padding-left: 0.8rem;
}
.sc label { font-size: 0.86rem; margin-top: 0.3rem; }
.sc input {
  font: inherit; font-size: 0.95rem; padding: 0.5rem 0.7rem;
  border: 1px solid var(--control-line); border-radius: var(--radius);
  background: var(--surface-1); color: var(--fg1);
}
.sc-go {
  justify-self: start; font-size: 0.9rem; padding: 0.45rem 1rem;
  border-radius: var(--radius); border: 1px solid var(--accent);
  background: var(--accent); color: var(--accent-fg); cursor: pointer;
}
.sc-go[disabled] { opacity: 0.45; cursor: default; }
.sc-err { margin: 0; font-size: 0.85rem; color: var(--bad); line-height: 1.6; }
.sc-note { margin: 0; font-size: 0.78rem; color: var(--fg3); line-height: 1.6; }
.sc-done {
  margin: 0 0 2rem; padding: 1.1rem 1.4rem; max-width: 62ch; line-height: 1.7;
  border: 1px solid var(--rule); border-left: 3px solid var(--good); border-radius: var(--radius);
}

/* ── The housing application · HP 03 §3 ───────────────────────────────────── */
.ap { max-width: 64ch; padding-bottom: 4rem; display: grid; gap: 2rem; }
.ap-step { display: grid; gap: 0.75rem; }
.ap-step h2 {
  margin: 0; font-size: 1.15rem; display: flex; align-items: baseline; gap: 0.6rem;
}
.ap-n {
  flex: none; width: 1.65rem; height: 1.65rem; border-radius: 50%;
  display: inline-grid; place-items: center; font-size: 0.8rem; font-weight: 700;
  background: var(--accent); color: var(--accent-fg);
}
.ap-lede { margin: 0; color: var(--fg2); line-height: 1.7; font-size: 0.92rem; }
.ap-choices { display: grid; gap: 0.6rem; }
.ap-choices label {
  display: flex; gap: 0.75rem; align-items: flex-start; cursor: pointer;
  padding: 0.9rem 1.05rem; border: 1px solid var(--control-line); border-radius: var(--radius);
  background: var(--surface-1);
}
.ap-choices label[data-on] { border-color: var(--accent); box-shadow: inset 0 0 0 1px var(--accent); }
.ap-choices span { display: grid; gap: 0.25rem; }
.ap-choices em { font-style: normal; font-size: 0.85rem; color: var(--fg2); line-height: 1.6; }
.ap textarea {
  font: inherit; font-size: 0.95rem; line-height: 1.6; padding: 0.7rem 0.85rem;
  border: 1px solid var(--control-line); border-radius: var(--radius);
  background: var(--surface-1); color: var(--fg1); resize: vertical;
}
.ap-count { margin: 0; font-size: 0.8rem; color: var(--fg3); }
.ap-acks { list-style: none; margin: 0; padding: 0; display: grid; gap: 0.5rem; }
.ap-acks li {
  border: 1px solid var(--rule); border-radius: var(--radius);
  background: var(--surface-1); transition: border-color 0.15s;
}
.ap-acks li[data-read] { border-color: var(--good); }
.ap-acks label {
  display: flex; gap: 0.75rem; align-items: flex-start; cursor: pointer;
  padding: 0.85rem 1rem; line-height: 1.65; font-size: 0.9rem;
}
.ap-acks input, .ap-choices input { margin-top: 0.25rem; flex: none; }
.ap-foot { display: grid; gap: 0.7rem; justify-items: start; }
.ap-save { font-size: 0.8rem; color: var(--fg3); }
.ap-saveerr { color: var(--bad); }
.ap-err { margin: 0; font-size: 0.87rem; color: var(--bad); line-height: 1.65; max-width: 58ch; }
.ap-note { margin: 0; font-size: 0.8rem; color: var(--fg3); }
.ap-go {
  display: inline-block; font: inherit; font-size: 0.92rem; padding: 0.55rem 1.15rem;
  border-radius: var(--radius); border: 1px solid var(--accent);
  background: var(--accent); color: var(--accent-fg); cursor: pointer; text-decoration: none;
}
/* `a:hover { color: var(--accent-hover) }` is a type-and-pseudo-class selector
   and outranks a single class, so a filled anchor loses its own text color on
   hover: --accent-fg on --accent is 9.40:1 in light, and --accent-hover on
   --accent is 1.30:1.
   Restating the color here (0-2-0) is how `.btn:hover` already answers it. */
.ap-go:hover { background: var(--accent-hover); color: var(--accent-fg); }
.ap-go[disabled] { opacity: 0.45; cursor: default; }
.ap-done { max-width: 62ch; display: grid; gap: 0.9rem; justify-items: start; padding-bottom: 4rem; }
.ap-done h2 { margin: 0; }
.ap-done p { margin: 0; line-height: 1.75; color: var(--fg2); }

/* At 375px the numbered heading and the choice cards must still work. */
@media (max-width: 480px) {
  .ap { gap: 1.6rem; }
  .ap-step h2 { font-size: 1.05rem; }
  .ap-choices label, .ap-acks label { padding: 0.8rem 0.9rem; }
  .ap-go { width: 100%; text-align: center; }
}

/* The signing button measured 39px tall at 375px — under the 44px minimum a
   thumb needs, on the one control the whole ceremony exists for. HP 03 §3.1
   asks that every field work at 375px; a button you have to aim at does not. */
@media (max-width: 480px) {
  .sc { padding: 1.1rem 1.15rem; }
  .sc-go { width: 100%; text-align: center; min-height: var(--target-min); }
  .sc input { min-height: var(--target-min); }
}

/* ── The accommodations desk · HP 10 §4 ───────────────────────────────────── */
.split-wide { display: grid; gap: 2.5rem; grid-template-columns: minmax(0, 1.35fr) minmax(0, 1fr); align-items: start; }
@media (max-width: 900px) { .split-wide { grid-template-columns: 1fr; } }
.vd-h2 { font-size: 1.05rem; margin: 0 0 0.9rem; }
.vd-note { margin: 0 0 0.9rem; font-size: 0.8rem; color: var(--fg3); line-height: 1.65; }
.vd-empty { color: var(--fg3); }
.vd-list { list-style: none; margin: 0; padding: 0; display: grid; gap: 0.6rem; }
.vd-list > li { border: 1px solid var(--rule); border-radius: var(--radius); padding: 1rem 1.15rem; background: var(--surface-1); }
.vd-head { display: flex; gap: 0.5rem; align-items: baseline; flex-wrap: wrap; }
.vd-meta { margin: 0.4rem 0 0.7rem; font-size: 0.78rem; color: var(--fg3); line-height: 1.6; }
.vd-open, .vd-go, .vd-cancel {
  font: inherit; font-size: 0.84rem; padding: 0.4rem 0.85rem; border-radius: var(--radius);
  border: 1px solid var(--control-line); background: var(--surface-2); color: var(--fg1); cursor: pointer;
}
.vd-go { border-color: var(--accent); background: var(--accent); color: var(--accent-fg); }
.vd-go[disabled] { opacity: 0.45; cursor: default; }
.vd-form { display: grid; gap: 0.5rem; margin-top: 0.3rem; }
.vd-form label { font-size: 0.82rem; font-weight: 600; }
.vd-form textarea {
  font: inherit; font-size: 0.88rem; line-height: 1.6; padding: 0.55rem 0.7rem;
  border: 1px solid var(--control-line); border-radius: var(--radius);
  background: var(--surface-2); color: var(--fg1); resize: vertical;
}
.vd-actions { display: flex; gap: 0.5rem; }
.vd-err { margin: 0; font-size: 0.82rem; color: var(--bad); line-height: 1.6; }
.vd-det { margin-top: 0.5rem; padding-left: 0.85rem; border-left: 2px solid var(--accent); display: grid; gap: 0.5rem; }
.vd-det p { margin: 0; font-size: 0.88rem; line-height: 1.7; }
.vd-decision { font-weight: 700; text-transform: capitalize; }
.vd-logged { font-size: 0.76rem !important; color: var(--fg3); }
.vd-log { list-style: none; margin: 0; padding: 0; display: grid; gap: 0.4rem; }
.vd-log > li { border-left: 2px solid var(--rule); padding: 0.15rem 0 0.15rem 0.75rem; }
.vd-log-head { display: flex; justify-content: space-between; gap: 0.6rem; font-size: 0.78rem; }
.vd-log-head span { color: var(--fg3); white-space: nowrap; }
.vd-log-purpose { margin: 0.15rem 0 0; font-size: 0.8rem; color: var(--fg2); line-height: 1.6; }

/* ── Signal loss · SO 05 §5 ───────────────────────────────────────────────── */
.sl-list { list-style: none; margin: 0 0 3rem; padding: 0; display: grid; gap: 0.7rem; max-width: 64ch; }
.sl-list > li {
  border: 1px solid var(--rule); border-left: 3px solid var(--accent);
  border-radius: var(--radius); padding: 1rem 1.2rem; background: var(--surface-1);
}
.sl-head { display: flex; gap: 0.6rem; align-items: baseline; flex-wrap: wrap; }
.sl-sentence { margin: 0.45rem 0 0; font-size: 0.9rem; line-height: 1.75; color: var(--fg2); }
.sl-caveat {
  margin: 0.55rem 0 0; font-size: 0.8rem; line-height: 1.65; color: var(--fg3);
  border-left: 2px solid var(--warn); padding-left: 0.7rem;
}
.sl-limits { max-width: 64ch; padding-bottom: 4rem; }
.sl-limits h2 { font-size: 1.05rem; margin: 0 0 0.9rem; }
.sl-limits ul { margin: 0 0 1rem; padding-left: 1.1rem; display: grid; gap: 0.55rem; }
.sl-limits li { font-size: 0.87rem; line-height: 1.7; color: var(--fg2); }
.sl-limits p { font-size: 0.82rem; line-height: 1.7; color: var(--fg3); margin: 0; }

/* ── The handover draft · SO 02 §5.1 ──────────────────────────────────────── */
.ho-flag {
  max-width: 64ch; margin: 0 0 1.5rem; padding: 1rem 1.25rem;
  border: 1px solid var(--rule); border-left: 3px solid var(--warn);
  border-radius: var(--radius);
}
.ho-flag h2 { margin: 0 0 0.5rem; font-size: 0.95rem; }
.ho-flag p { margin: 0.4rem 0 0; font-size: 0.87rem; line-height: 1.7; color: var(--fg2); }
.ho-doc {
  max-width: 78ch; margin: 0 0 2rem; padding: 1.5rem 1.75rem;
  border: 1px solid var(--rule); border-radius: var(--radius); background: var(--surface-1);
  overflow-x: auto;
}
.ho-doc pre {
  margin: 0; white-space: pre-wrap; word-break: break-word;
  font: inherit; font-size: 0.875rem; line-height: 1.75; color: var(--fg1);
}
.ho-note { max-width: 64ch; padding-bottom: 4rem; }
.ho-note h2 { font-size: 1rem; margin: 0 0 0.7rem; }
.ho-note p { margin: 0 0 0.8rem; font-size: 0.85rem; line-height: 1.75; color: var(--fg2); }

/* ── "How this is scored" · the matching methodology accordion ─────────────
   Closed by default and below the queue. A coordinator working the queue does
   not need it; the one who has to answer a parent, or defend a weight to
   Residence Life, needs it in the place they are already standing. */
.ho-method {
  max-width: 78ch; margin: 2.5rem 0 3rem;
  border-top: 1px solid var(--rule); padding-top: 1rem;
}
.ho-method > summary {
  cursor: pointer; font-size: 0.875rem; font-weight: 600; color: var(--fg1);
  list-style: none; display: flex; align-items: center; gap: 0.5rem;
}
.ho-method > summary::-webkit-details-marker { display: none; }
.ho-method > summary::before {
  content: "+"; color: var(--fg3); font-weight: 400;
  width: 1em; text-align: center;
}
.ho-method[open] > summary::before { content: "\2212"; }
.ho-method > summary:hover { color: var(--accent); }
.ho-method .mth-body { display: grid; gap: 1.6rem; padding: 1.4rem 0 0 1.5em; }
.ho-method h3 {
  font-size: 0.8125rem; font-weight: 600; color: var(--fg1);
  margin: 0 0 0.5rem; letter-spacing: 0.01em;
}
.ho-method p, .ho-method li {
  margin: 0 0 0.7rem; font-size: 0.85rem; line-height: 1.75; color: var(--fg2);
}
.ho-method p:last-child, .ho-method li:last-child { margin-bottom: 0; }
.ho-method ul { margin: 0; padding-left: 1.1rem; }
.ho-method li { margin-bottom: 0.5rem; }
.ho-method strong { color: var(--fg1); font-weight: 600; }
.ho-method .mth-refusals {
  list-style: none; padding: 0; margin: 0;
  display: grid; gap: 0.35rem;
}
.ho-method .mth-refusals li {
  margin: 0; padding-left: 1.1rem; position: relative;
}
.ho-method .mth-refusals li::before {
  content: "\00d7"; position: absolute; left: 0; color: var(--fg3);
}


/* ── The board view · AS 04 §6 ────────────────────────────────────────────── */
.bv-figures {
  display: grid; gap: 1rem; margin: 0 0 2.5rem;
  grid-template-columns: repeat(auto-fit, minmax(190px, 1fr)); max-width: 68ch;
}
.bv-fig {
  display: grid; gap: 0.2rem; padding: 1.2rem 1.35rem;
  border: 1px solid var(--rule); border-radius: var(--radius); background: var(--surface-1);
}
.bv-n { font-size: 2.1rem; font-weight: 700; line-height: 1.1; letter-spacing: -0.02em; }
.bv-l { font-size: 0.85rem; color: var(--fg2); line-height: 1.5; }
.bv-t { font-size: 0.75rem; color: var(--fg3); line-height: 1.5; margin-top: 0.2rem; }
.bv-failed, .bv-note { max-width: 64ch; padding-bottom: 2rem; }
.bv-failed h2, .bv-note h2 { font-size: 1.05rem; margin: 0 0 0.7rem; }
.bv-failed p, .bv-note p { font-size: 0.87rem; line-height: 1.75; color: var(--fg2); margin: 0 0 0.8rem; }
.bv-failed ul { list-style: none; margin: 0; padding: 0; display: grid; gap: 0.6rem; }
.bv-failed li {
  font-size: 0.88rem; line-height: 1.7; border-left: 2px solid var(--warn);
  padding-left: 0.85rem;
}
.bv-why { display: block; font-size: 0.78rem; color: var(--fg3); margin-top: 0.2rem; }
.bv-note { padding-bottom: 4rem; }

/* ── The projection · DM 07 §11 ───────────────────────────────────────────── */
.pj-state {
  max-width: 64ch; margin: 0 0 2rem; padding: 1rem 1.25rem;
  border: 1px solid var(--rule); border-left: 3px solid var(--good);
  border-radius: var(--radius);
}
.pj-state[data-stale] { border-left-color: var(--warn); }
.pj-state p { margin: 0; font-size: 0.9rem; line-height: 1.7; }
.pj-since { margin-top: 0.4rem !important; font-size: 0.82rem !important; color: var(--fg2); }
.pj-table { width: 100%; border-collapse: collapse; font-size: 0.86rem; }
.pj-table th {
  text-align: left; font-size: 0.72rem; text-transform: uppercase; letter-spacing: 0.06em;
  color: var(--fg3); font-weight: 600; padding: 0 0.6rem 0.5rem 0;
  border-bottom: 1px solid var(--rule);
}
.pj-table td { padding: 0.5rem 0.6rem 0.5rem 0; border-bottom: 1px solid var(--rule-soft, var(--rule)); }
.pj-table code { font-size: 0.82rem; }

/* ── The housing hub ──────────────────────────────────────────────────────── */
/* ── A group invitation's facts ────────────────────────────────────────────
   A definition list, because who-is-in-it / what-they-want / when-you-were-
   asked are label-and-value pairs and a <dl> says so to a screen reader. */
.inv-facts { display: grid; gap: 0.75rem; margin: 0; }
.inv-facts > div { display: grid; gap: 0.15rem; }
.inv-facts dt {
  font-size: 0.6875rem;
  letter-spacing: 0.07em;
  text-transform: uppercase;
  font-weight: 700;
  color: var(--fg3);
}
.inv-facts dd { margin: 0; font-size: 0.9375rem; color: var(--fg1); line-height: 1.5; }

/* ── The housing hub: a sequence, not a grid ───────────────────────────────
   Eight equal cards said "these are peers", and they are not: a room cannot be
   chosen before a lottery number exists. What replaced them is an ordered list
   whose status is carried by a WORD, a GLYPH and a COLOR — three channels,
   because the previous version signaled "this needs you" with a 3px accent
   border and nothing else, which is color alone (WCAG 1.4.1) on the one
   distinction the page exists to draw. */

.hprog {
  display: grid;
  gap: 0.9rem;
  margin: 1.25rem 0 2rem;
  max-width: 62ch;
}
.hprog-say {
  margin: 0;
  font-size: 1.125rem;
  font-weight: 600;
  color: var(--fg1);
  line-height: 1.45;
}
.hprog-meter {
  display: flex;
  align-items: center;
  gap: 0.85rem;
}
.hprog-track {
  flex: 1;
  height: 8px;
  min-width: 0;
  border-radius: 999px;
  background: var(--rule);
  overflow: hidden;
}
.hprog-track > span {
  display: block;
  height: 100%;
  background: var(--accent);
  border-radius: 999px;
  transition: width 320ms ease;
}
.hprog-count {
  margin: 0;
  font-size: 0.8125rem;
  font-weight: 600;
  color: var(--fg2);
  white-space: nowrap;
}
.hprog-go {
  justify-self: start;
}

.steps {
  list-style: none;
  margin: 0 0 2.5rem;
  padding: 0;
  display: grid;
  gap: 0.4rem;
  max-width: 68ch;
  counter-reset: step;
}
.steps > li {
  border: 1px solid var(--rule);
  border-radius: var(--radius);
  background: var(--surface-1);
}
.steps > li a {
  /* 44px floor on the row itself, not only on the text inside it. */
  display: grid;
  grid-template-columns: auto minmax(0, 1fr);
  gap: 0.35rem 0.9rem;
  align-items: center;
  min-height: 56px;
  padding: 0.75rem 1rem;
  text-decoration: none;
  color: inherit;
  border-radius: var(--radius);
}
.steps > li a:hover { background: var(--surface-2); }
.steps > li a:focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: 2px;
}
.steps-n {
  width: 1.75rem;
  height: 1.75rem;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border-radius: 999px;
  font-size: 0.75rem;
  font-weight: 700;
  background: var(--surface-sunken);
  color: var(--fg2);
  border: 1px solid var(--rule);
}
.steps-body { display: grid; gap: 0.12rem; min-width: 0; }
.steps-title { font-weight: 650; font-size: 0.95rem; color: var(--fg1); }
.steps-state { font-size: 0.8125rem; color: var(--fg2); line-height: 1.45; }
.steps-status {
  grid-column: 2;
  justify-self: start;
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
  padding: 0.18rem 0.55rem;
  border-radius: 999px;
  font-size: 0.75rem;
  font-weight: 650;
  white-space: nowrap;
  border: 1px solid var(--tone-mute-line);
  background: var(--tone-mute-bg);
  color: var(--tone-mute-fg);
}
.steps-glyph { font-size: 0.7rem; line-height: 1; }

/* The four states. Each sets the pill AND the row's left edge, so the status
   survives being read at a glance and being read one row at a time. */
.steps > li[data-tone="done"] { border-left: 3px solid var(--tone-good-fg); }
.steps > li[data-tone="done"] .steps-status {
  background: var(--tone-good-bg); color: var(--tone-good-fg); border-color: var(--tone-good-line);
}
.steps > li[data-tone="opt"] { border-left: 3px solid var(--rule-strong); }
.steps > li[data-tone="you"] { border-left: 3px solid var(--accent); background: var(--surface-tint); }
.steps > li[data-tone="you"] .steps-status {
  background: var(--accent); color: var(--accent-fg); border-color: var(--accent);
}
.steps > li[data-tone="you"] .steps-n { background: var(--accent); color: var(--accent-fg); border-color: var(--accent); }
.steps > li[data-tone="us"] { border-left: 3px solid var(--tone-info-fg); }
.steps > li[data-tone="us"] .steps-status {
  background: var(--tone-info-bg); color: var(--tone-info-fg); border-color: var(--tone-info-line);
}
.steps > li[data-tone="shut"] { border-left: 3px solid var(--rule-strong); }
.steps > li[data-tone="shut"] .steps-title { color: var(--fg2); }

/* At 560px and up the status moves to its own column and the row is one line
   of information rather than two. Below that it wraps under the title, which
   is the only arrangement that fits a status pill and a title on a 320px
   screen without either of them truncating. */
@media (min-width: 560px) {
  .steps > li a {
    grid-template-columns: auto minmax(0, 1fr) auto;
  }
  .steps-status { grid-column: 3; justify-self: end; }
}

.steps-aside { max-width: 68ch; margin: 0 0 4rem; }
.steps-aside h2 { font-size: 1rem; margin: 0 0 0.6rem; }
.steps-aside a {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  flex-wrap: wrap;
  min-height: 48px;
  padding: 0.75rem 1rem;
  border: 1px solid var(--rule);
  border-radius: var(--radius);
  background: var(--surface-1);
  text-decoration: none;
  color: inherit;
  font-size: 0.9rem;
  font-weight: 600;
}
.steps-aside a:hover { background: var(--surface-2); color: inherit; }
.steps-aside a > span:last-child { font-weight: 400; font-size: 0.8125rem; color: var(--fg2); }

/* ── A student's whole life, on their landing page ────────────────────────── */
.life {
  list-style: none; margin: 0; padding: 0; display: grid; gap: 0.6rem;
  grid-template-columns: repeat(auto-fill, minmax(215px, 1fr));
}
.life > li { border: 1px solid var(--rule); border-radius: var(--radius); background: var(--surface-1); }
.life > li[data-need] { border-left: 3px solid var(--accent); }
.life a {
  display: grid; gap: 0.3rem; padding: 1rem 1.15rem; text-decoration: none; color: inherit;
  min-height: 82px; align-content: center;
}
.life a:hover { background: var(--surface-2); }
.life-title { font-weight: 650; font-size: 0.95rem; }
.life-state { font-size: 0.82rem; color: var(--fg2); line-height: 1.45; }

/* ── Sign-in hero: the campus as a mosaic ──────────────────────────────────
   The artwork is an aerial of the quad rendered entirely in tesserae, which is
   the product's own name read literally — so the treatment lets the tiles be
   seen rather than tinting them into a brand color.

   That rules out the approach the previous hero used. Flat purple multiplied
   into a photograph is a good way to make type safe over open sky, and it is
   the wrong tool here: this image has no open sky, the tile grain is the
   subject, and a multiply blend turns 6,000 individually-colored tiles into
   one purple field.

   So the contrast comes from a surface instead of from the image. The type
   sits on a frosted panel with a known background, which means its contrast is
   a property of the panel and does not change if the artwork is ever swapped —
   the measured numbers below hold against the panel's own floor color, not
   against a photograph.

   Against --hero-panel-bg (rgb 30 14 40 at 0.82) over the darkest region of the artwork, worst
   case: 9.4:1 for the gold eyebrow, 14.6:1 for the headline, 9.1:1 for the
   lede and 7.8:1 for the stat labels. All clear WCAG AA, and the headline and
   eyebrow clear AAA. */
.mosaic-hero {
  position: relative;
  overflow: hidden;
  background-color: var(--plum);
}

/* ── Two mosaics, crossfading ──────────────────────────────────────────────
   The aerial of the quad and the Hoval on a spring afternoon, both rendered in
   tesserae. Each holds for eighteen seconds and takes two and a half to cross,
   which is ambient rather than a slideshow: a ten-second swap on a page people
   spend six seconds on reads as a carousel, and a carousel on a front door is
   the thing that makes a product look like it is trying.

   It is CSS and not JavaScript — two stacked layers on one keyframe track,
   opposite phases. Nothing to hydrate, nothing to schedule, and no layout
   shift, so the panel above it never moves.

   The reason this is safe to do at all is the panel. Type sits on an opaque
   surface with its own floor color, so contrast is a property of the panel and
   not of whatever is behind it. Swapping the artwork needs no re-measurement —
   which was the argument for the panel in the first place, arriving useful. */
/* The artwork layers sit UNDER the vignette (::before, below) and under the
   content, which is why both carry an explicit z-index rather than relying on
   document order — a positioned pseudo-element would otherwise paint over an
   unpositioned sibling and the vignette would land beneath the artwork. */
/* Child selectors, and not bare class selectors, because `.mosaic-hero > *`
   below sets `position: relative` on every child and appears later in the
   file. At equal specificity the later rule wins, so the layers were relative
   and zero-tall and the hero rendered flat purple with both images loaded and
   painting nothing. */
.mosaic-hero > .mosaic-hero-a,
.mosaic-hero > .mosaic-hero-b {
  position: absolute;
  inset: 0;
  background-size: cover;
  pointer-events: none;
  z-index: 0;
  animation: mosaic-cross 41s ease-in-out infinite;
}
/* 62% horizontally puts the courtyard medallion in the open space beside the
   panel rather than behind it. The Hoval is centered: its subject is the people
   on the grass, and they sit right of center already. */
.mosaic-hero > .mosaic-hero-a {
  background-image: url("/hero/mosaic.webp");
  background-position: 62% center;
}
.mosaic-hero > .mosaic-hero-b {
  background-image: url("/hero/hoval.webp");
  background-position: 58% 62%;
  animation-delay: -20.5s;
}

@keyframes mosaic-cross {
  0%,
  44% { opacity: 1; }
  50%,
  94% { opacity: 0; }
  100% { opacity: 1; }
}

/* Held, not faded. Somebody who has asked for less motion gets one mosaic and
   no transition, rather than a slower version of the thing they switched off. */
@media (prefers-reduced-motion: reduce) {
  .mosaic-hero > .mosaic-hero-a { animation: none; opacity: 1; }
  .mosaic-hero > .mosaic-hero-b { animation: none; opacity: 0; }
}

.mosaic-hero {
  padding: clamp(2rem, 3.5vw, 3.25rem) 0 clamp(2.25rem, 4vw, 3.75rem);
}

/* A vignette, not a scrim. It seats the artwork against the cream page below
   and darkens the extreme edges where the crop lands mid-building, without
   flattening the middle where the tiles are worth looking at. */
.mosaic-hero::before {
  content: "";
  position: absolute;
  inset: 0;
  pointer-events: none;
  z-index: 1;
  background: var(--hero-vignette);
}

.mosaic-hero > * {
  position: relative;
  z-index: 2;
}

.mosaic-panel {
  /* Explicit, and not inherited. The section this replaced carried the white
     on the <section>; moving the type onto a panel dropped it, and the only
     casualty was the one element with no color of its own — the stat <dt>,
     which rendered in the page's dark body color on a near-black panel and
     disappeared. The labels beside it were fine because they set their own. */
  color: var(--on-plum);
  background: var(--hero-panel-bg);
  /* Progressive: without backdrop-filter the panel is simply more opaque,
     which is a slightly heavier look and never an unreadable one. */
  backdrop-filter: blur(14px) saturate(115%);
  -webkit-backdrop-filter: blur(14px) saturate(115%);
  border: 1px solid var(--hero-panel-line);
  border-radius: 4px;
  padding: clamp(1.6rem, 3vw, 2.4rem) clamp(1.6rem, 3vw, 2.6rem);
  box-shadow: var(--hero-panel-shadow);
  max-width: 46rem;
}

@supports not ((backdrop-filter: blur(1px)) or (-webkit-backdrop-filter: blur(1px))) {
  .mosaic-panel {
    background: var(--hero-panel-bg-fallback);
  }
}

/* The stat column joins the panel below the lede rather than sitting out over
   the artwork, where its contrast would depend on which tiles it landed on. */
.mosaic-stats {
  display: grid;
  gap: 1.25rem;
  margin: 1.6rem 0 0;
  padding-top: 1.4rem;
  border-top: 1px solid var(--hero-panel-rule);
  grid-template-columns: minmax(0, 1fr);
}

@media (min-width: 620px) {
  .mosaic-stats {
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 1.5rem;
  }
}

/* Under about 700px the crop keeps almost none of the composition, so the
   artwork stops earning its bandwidth as an image and earns it as texture:
   scaled up and pushed behind a heavier panel. */
@media (max-width: 700px) {
  .mosaic-hero {
    background-position: 58% 42%;
  }
  .mosaic-panel {
    background: var(--hero-panel-bg-compact);
  }
}

@media (prefers-reduced-transparency: reduce) {
  .mosaic-panel {
    background: var(--hero-panel-bg-solid);
    backdrop-filter: none;
    -webkit-backdrop-filter: none;
  }
}

/* ── The mosaic mark — wordmark concepts 3A and 3B ─────────────────────────
   Nine tiles taking their color from three custom properties, so the light
   and the dark forms are one component rather than two assets that drift.

   3A, in light: purple, pale purple, one gold tile.
   3B, in dark and on plum: white at full and at 28%, gold held.

   The gold never changes. It is the tile that makes the mark legible at 16px,
   and inverting it would leave a field of squares with nothing to catch. */
.tsr-tile-a { background: var(--tsr-tile-a); }
.tsr-tile-b { background: var(--tsr-tile-b); }
.tsr-tile-gold { background: var(--tsr-tile-gold); }

/* Any region that is dark whatever the mode — the plum masthead, the hero
   panel — sets the inverse palette for every mark inside it. One declaration
   rather than a prop threaded through every call site. The console is not one
   of them: it is a surface, and its marks follow the mode. */
.on-plum .tsr-mark,
.mosaic-panel .tsr-mark,
[data-tone="dark"] .tsr-mark {
  --tsr-tile-a: var(--tsr-tile-a-inverse);
  --tsr-tile-b: var(--tsr-tile-b-inverse);
}

/* The institution under the product name. Tracked small caps, never wrapped:
   at 390px "COLLEGE OF THE HOLY CROSS" broke to two lines and took the whole
   masthead to 128px tall. It is dropped rather than wrapped when a bar runs
   out of room — see `.smast`. */
.tsr-descriptor {
  font-size: 0.6rem;
  font-weight: 700;
  letter-spacing: 0.17em;
  text-transform: uppercase;
  opacity: 0.66;
  line-height: 1.2;
  white-space: nowrap;
}

.hc-brandlink {
  color: inherit;
  text-decoration: none;
  display: inline-flex;
}
.hc-brandlink:hover .tsr-wordmark {
  opacity: 0.92;
}

/* ── Groups inside a rail area ─────────────────────────────────────────────
   An area that many offices fill (Navigation, "GROUPS") is a heading per office
   rather than one long list. A native <details>, like the area around it, so
   the disclosure is the browser's: it opens with JavaScript off, it is reached
   and pressed with the keyboard, and a screen reader announces it expanded or
   collapsed. The server draws it open when the page is in it or the area is
   short; `rail_groups_controller.js` keeps the person's own choice. */
.rail-group {
  margin-block: 0.1rem;
}

.rail-group-summary {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  /* 24px for every pointer (WCAG 2.5.8); touch has --target-min (40-native.css). */
  min-block-size: 1.5rem;
  padding: 0.3rem 0.5rem;
  border-radius: 7px;
  cursor: pointer;
  list-style: none;
  user-select: none;
  /* A subheading under the area's name and over its links: smaller than the
     area, in capitals, and quieter than the links only in weight. */
  color: var(--fg2);
  font-size: 0.6875rem;
  font-weight: 700;
  letter-spacing: 0.08em;
  line-height: 1.3;
  text-transform: uppercase;
  transition:
    background 120ms ease,
    color 120ms ease;
}
/* Safari draws a disclosure triangle from a pseudo-element `list-style: none` does not reach. */
.rail-group-summary::-webkit-details-marker {
  display: none;
}
.rail-group-summary:hover {
  background: var(--rail-hover);
  color: var(--fg1);
}

/* A drawn triangle, not a glyph: it scales with the type and needs no font. It
   points to the inline end while closed, so it mirrors in right-to-left. */
.rail-group-chevron {
  flex: none;
  inline-size: 0;
  block-size: 0;
  border-inline-start: 4px solid currentColor;
  border-block: 3.5px solid transparent;
  transition: transform 140ms ease;
}
.rail-group[open] > .rail-group-summary .rail-group-chevron {
  transform: rotate(90deg);
}
.rail-group[open] > .rail-group-summary .rail-group-chevron:dir(rtl) {
  transform: rotate(-90deg);
}

.rail-group-label {
  flex: 1;
  min-inline-size: 0;
}

/* How many links are behind a closed group, so it is worth opening or not. Open,
   the links answer that themselves. */
.rail-group-count {
  flex: none;
  color: var(--fg3);
  font-weight: 600;
  letter-spacing: 0;
}
.rail-group[open] > .rail-group-summary .rail-group-count {
  visibility: hidden;
}

/* A gold tile on the group the page is in, seen when the person has closed it,
   so a closed rail still says where you are. The link itself says it to a
   screen reader (aria-current). */
.rail-group-here {
  flex: none;
  inline-size: 5px;
  block-size: 5px;
  border-radius: 1px;
  background: var(--tsr-tile-gold);
}
.rail-group[open] > .rail-group-summary .rail-group-here {
  display: none;
}

/* Indented, on a hairline the links hang off, so they read as the group's. */
.rail-group-links {
  margin-block: 0.1rem 0.35rem;
  margin-inline-start: 0.7rem;
  padding-inline-start: 0.5rem;
  border-inline-start: 1px solid var(--accent-line);
}

@media (prefers-reduced-motion: reduce) {
  .rail-group-chevron {
    transition: none;
  }
}

/* ── Table primitives the density pass needed ──────────────────────────────
   Requested with the reason for each, rather than added speculatively. */

/* Tone as text, INSIDE a cell. `table.data td.bad` colors a whole column;
   these color a phrase within one. */
.dk-bad { color: var(--tone-bad-fg); }
.dk-warn { color: var(--tone-warn-fg); }
.dk-good { color: var(--tone-good-fg); }

/* The column that takes the leftover width. Without it the nowrap columns
   share the surplus evenly, and a prose column wraps to four lines beside an
   inch of empty date column. */
table.data th.flex,
table.data td.flex {
  width: 100%;
}

/* A group header inside a tbody — deliberately a <td> and not a <th>, because
   `table.data th` is sticky and a sticky th in the body overlaps the rows it
   is introducing. */
table.data tr.dk-group > td {
  background: var(--surface-tint);
  border-top: 1px solid var(--rule-strong);
  border-bottom: 1px solid var(--rule-strong);
  padding: 0.4rem 0.7rem;
}

/* A continuation line under a row: one sentence too long for any column but
   still belonging to the record above it. Pair with `.dk-norule` on that row
   so the two read as one. */
table.data td.dk-sub {
  padding-top: 0;
  font-size: 0.75rem;
  color: var(--fg3);
  line-height: 1.5;
}
table.data tr.dk-norule > td {
  border-bottom: 0;
}

/* A figure that is also a filter — the work log's counts double as its tabs. */
.dk-figs > button {
  appearance: none;
  background: transparent;
  border: 0;
  padding: 0;
  font: inherit;
  color: inherit;
  text-align: left;
  cursor: pointer;
}
.dk-figs > button[aria-pressed="true"] {
  box-shadow: inset 0 -2px 0 var(--accent);
  padding-bottom: 0.3rem;
}

/* A cue that repeats down a column. `.dk-cue` is uppercase, which is right for
   one cue in a row and shouting when it appears on 420 of them. */
.dk-cue-plain {
  text-transform: none;
  letter-spacing: 0;
}

/* ── The finder — CE 01 §2 ──────────────────────────────────────────────────
   Opens over the page on `/`; nothing else moves. Cards, not rows: each one
   answers "is this the one?" from directory facts the viewer already holds. */
.finder-scrim {
  position: fixed;
  inset: 0;
  z-index: 70;
  background: color-mix(in srgb, var(--fg1) 28%, transparent);
  border: 0;
  padding: 0;
  cursor: default;
}
.finder {
  position: fixed;
  top: max(12dvh, calc(var(--safe-top) + 0.5rem));
  left: 50%;
  transform: translateX(-50%);
  z-index: 71;
  width: min(640px, calc(100vw - 2rem));
  display: flex;
  flex-direction: column;
  background: var(--surface-raised);
  border: 1px solid var(--rule);
  border-radius: 8px;
  box-shadow: var(--shadow-lift);
  overflow: hidden;
  animation: assistant-in 160ms cubic-bezier(0.16, 1, 0.3, 1);
}
.finder-input {
  font: inherit;
  font-size: 1.05rem;
  padding: 0.9rem 1.1rem;
  border: 0;
  border-bottom: 1px solid var(--rule);
  background: transparent;
  color: var(--fg1);
  outline: none;
}
.finder-list {
  max-height: 60dvh;
  overflow-y: auto;
  display: flex;
  flex-direction: column;
}
.finder-eyebrow { margin: 0.6rem 1.1rem 0.2rem; }
.finder-empty {
  margin: 0;
  padding: 0.9rem 1.1rem;
  font-size: 0.875rem;
  color: var(--fg3);
}
.finder-card {
  display: flex;
  gap: 0.85rem;
  align-items: center;
  text-align: left;
  padding: 0.6rem 1.1rem;
  border: 0;
  border-bottom: 1px solid var(--rule);
  background: transparent;
  color: var(--fg1);
  font: inherit;
  cursor: pointer;
}
.finder-card.is-active { background: var(--bg-tint); }
.finder-photo {
  width: 40px;
  height: 40px;
  border-radius: 50%;
  object-fit: cover;
  flex: none;
  background: var(--surface-inset);
}
.finder-photo-blank { display: inline-block; }
.finder-text { display: grid; gap: 0.1rem; min-width: 0; }
.finder-name { font-weight: 600; font-size: 0.9375rem; }
.finder-line { font-size: 0.8125rem; }
.finder-dim { color: var(--fg3); font-weight: 400; }
.finder-badge {
  display: inline-block;
  margin-left: 0.5rem;
  padding: 0 0.4rem;
  border-radius: 3px;
  font-size: 0.6875rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  background: var(--surface-inset);
  color: var(--fg3);
  vertical-align: middle;
}
.finder-keys {
  margin: 0;
  padding: 0.5rem 1.1rem;
  font-size: 0.75rem;
  color: var(--fg3);
  border-top: 1px solid var(--rule);
}
.finder-keys kbd {
  font: inherit;
  padding: 0 0.3rem;
  margin-right: 0.15rem;
  border: 1px solid var(--rule);
  border-radius: 3px;
}

/* ── The card — CE 13 §2.2 ───────────────────────────────────────────────────
   Every line is a column of the row that will be written; the model's text
   never becomes one. Confirm is the person's write. */
.assistant-card {
  margin-top: 0.5rem;
  padding: 0.85rem 1rem;
  border: 1px solid var(--accent-line);
  border-radius: 6px;
  background: var(--bg-tint);
  display: grid;
  gap: 0.5rem;
}
.assistant-card-lines {
  margin: 0;
  display: grid;
  gap: 0.25rem;
  font-size: 0.8125rem;
}
.assistant-card-lines div { display: grid; grid-template-columns: 7rem 1fr; gap: 0.5rem; }
.assistant-card-lines dt { color: var(--fg3); }
.assistant-card-lines dd { margin: 0; }
.assistant-card-student { margin: 0; font-size: 0.8125rem; color: var(--fg2); font-style: italic; }
.assistant-card-warn { margin: 0; font-size: 0.8125rem; color: var(--tone-warn-fg, var(--fg2)); }
.assistant-card-actions { display: flex; gap: 0.5rem; }
