/* SLP · Sift. Learn. Plan. — LSU optical glass.
   Purple and gold carry identity and interaction. Clinical families retain
   their own colors; opaque data surfaces keep the chart and evidence clear. */

@font-face { font-family: 'Anton'; src: url('assets/fonts/anton-latin.woff2') format('woff2'); font-style: normal; font-weight: 400; font-display: swap; }
@font-face { font-family: 'Public Sans'; src: url('assets/fonts/public-sans-latin-wght-normal.woff2') format('woff2'); font-style: normal; font-weight: 100 900; font-display: swap; }
@font-face { font-family: 'IBM Plex Mono'; src: url('assets/fonts/ibm-plex-mono-latin-400-normal.woff2') format('woff2'); font-style: normal; font-weight: 400; font-display: swap; }
@font-face { font-family: 'IBM Plex Mono'; src: url('assets/fonts/ibm-plex-mono-latin-500-normal.woff2') format('woff2'); font-style: normal; font-weight: 500; font-display: swap; }

:root {
  color-scheme: dark;
  /* Surfaces */
  --lsu-purple: #461D7C;
  --lsu-gold: #FDD023;
  --bg: #10091c;
  --surface: #1b112a;
  --surface-2: #271b39;
  --surface-3: #37264b;
  --line: #483456;
  --line-strong: #77618c;
  /* Ink */
  --ink: #faf7ff;
  --ink-2: #d5cce2;
  --ink-3: #b9abc9;
  /* Identity */
  --accent: #FDD023;          /* interactive text */
  --accent-fill: #FDD023;     /* primary buttons */
  --accent-fill-2: #ffe16b;
  --accent-tint: #392742;
  --cursor: #FDD023;          /* the client-age cursor and the selected mark */
  --on-fill: #2c104a;
  /* Evidence status: glyph + label, never color alone */
  --ok: #87d3a7;
  --warn: #ffc067;
  --none: #ad9ebf;
  /* Clinical families (validated order: violet, orange, aqua, yellow, magenta, blue) */
  --fam-language: #9085e9;
  --fam-speech: #d95926;
  --fam-fluency: #199e70;
  --fam-early: #c98500;
  --fam-spanish: #d55181;
  --fam-adult: #3987e5;
  --famtext-language: #a89ff0; --famtext-speech: #e8743f; --famtext-fluency: #2fc48f; --famtext-early: #e0a21c; --famtext-spanish: #ec6f9b; --famtext-adult: #5ea0f2;
  /* Meter track and fill: neutral, so figures outrank them in the rows */
  --track: #2d2442;
  --meter-fill: color-mix(in srgb, var(--ink) 52%, transparent);
  /* Type */
  --f-ui: 'Public Sans', system-ui, -apple-system, 'Segoe UI', Roboto, sans-serif;
  --f-display: 'Anton', 'Public Sans', sans-serif;
  --f-mono: 'IBM Plex Mono', ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
  /* Shape */
  --r-sm: 4px; --r-md: 8px; --r-lg: 14px;
  --shadow: 0 10px 28px rgba(7,2,16,.16);
  --shadow-float: 0 18px 60px rgba(0,0,0,.55);
  --ease: cubic-bezier(.2, .8, .2, 1);
  --gutter: 28px;
  --max: 1320px;
  font-family: var(--f-ui);
  font-size: 15px;
  line-height: 1.5;
}
@media (prefers-color-scheme: light) {
  :root:not([data-theme="dark"]) {
    color-scheme: light;
    --bg: #f2eef8; --surface: #ffffff; --surface-2: #f4effa; --surface-3: #e9dff5; --line: #d6c9e4; --line-strong: #a08cb7;
    --ink: #241337; --ink-2: #4e3d62; --ink-3: #675876;
    --accent: #461D7C; --accent-fill: #FDD023; --accent-fill-2: #ffe16b; --accent-tint: #ece1fa; --cursor: #714c00; --on-fill: #2c104a;
    --ok: #287246; --warn: #805300; --none: #70637d;
    --fam-language: #4a3aa7; --fam-speech: #df6331; --fam-fluency: #189b6c; --fam-early: #b97d00; --fam-spanish: #c96b8e; --fam-adult: #2a78d6;
    --famtext-language: #4a3aa7; --famtext-speech: #b8451a; --famtext-fluency: #0f7a52; --famtext-early: #8a5f00; --famtext-spanish: #b43a73; --famtext-adult: #1f5fb0;
    --track: #e4ddf3; --meter-fill: color-mix(in srgb, var(--ink) 48%, transparent);
    --shadow: 0 1px 2px rgba(22,17,31,.05), 0 10px 30px rgba(22,17,31,.07);
    --shadow-float: 0 18px 60px rgba(22,17,31,.18);
  }
}
:root[data-theme="light"] {
  color-scheme: light;
  --bg: #f2eef8; --surface: #ffffff; --surface-2: #f4effa; --surface-3: #e9dff5; --line: #d6c9e4; --line-strong: #a08cb7;
  --ink: #241337; --ink-2: #4e3d62; --ink-3: #675876;
  --accent: #461D7C; --accent-fill: #FDD023; --accent-fill-2: #ffe16b; --accent-tint: #ece1fa; --cursor: #714c00; --on-fill: #2c104a;
  --ok: #287246; --warn: #805300; --none: #70637d;
  --fam-language: #4a3aa7; --fam-speech: #df6331; --fam-fluency: #189b6c; --fam-early: #b97d00; --fam-spanish: #c96b8e; --fam-adult: #2a78d6;
  --famtext-language: #4a3aa7; --famtext-speech: #b8451a; --famtext-fluency: #0f7a52; --famtext-early: #8a5f00; --famtext-spanish: #b43a73; --famtext-adult: #1f5fb0;
  --track: #e4ddf3; --meter-fill: color-mix(in srgb, var(--ink) 48%, transparent);
  --shadow: 0 1px 2px rgba(22,17,31,.05), 0 10px 30px rgba(22,17,31,.07);
  --shadow-float: 0 18px 60px rgba(22,17,31,.18);
}

/* ---------- Base ---------- */
* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body { margin: 0; min-width: 320px; color: var(--ink); background: var(--bg); -webkit-font-smoothing: antialiased; text-rendering: optimizeLegibility; }
body:has(dialog[open]) { overflow: hidden; }
button, input, select { font: inherit; color: inherit; }
button { cursor: pointer; -webkit-appearance: none; appearance: none; background: none; border: 0; padding: 0; }
button, a, summary { -webkit-tap-highlight-color: transparent; }
button, input, select, a { transition: background-color 140ms var(--ease), color 140ms var(--ease), border-color 140ms var(--ease), box-shadow 140ms var(--ease), opacity 140ms var(--ease); }
button:disabled { opacity: .35; cursor: not-allowed; }
[hidden] { display: none !important; }
:focus-visible { outline: 2px solid var(--cursor); outline-offset: 3px; border-radius: 2px; }
::selection { background: var(--accent-tint); color: var(--ink); }
input { caret-color: var(--accent); }
svg { flex: 0 0 auto; }
a { color: var(--accent); text-underline-offset: 3px; text-decoration-thickness: 1px; }
h1, h2, h3, h4 { margin: 0; font-weight: 700; letter-spacing: -.01em; line-height: 1.1; text-wrap: balance; }
p, dl, dd, figure { margin: 0; }
.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; }
.skip-link { position: absolute; left: 16px; top: -60px; z-index: 100; padding: 10px 14px; background: var(--accent-fill); color: var(--on-fill); border-radius: var(--r-sm); font-weight: 600; }
.skip-link:focus { top: 12px; }
.label { font-size: 13px; font-weight: 700; letter-spacing: .07em; text-transform: uppercase; color: var(--ink-2); }
.mono { font-family: var(--f-mono); }
.tabular { font-variant-numeric: tabular-nums; }

/* ---------- Controls ---------- */
.btn, .btn-primary, .btn-ghost, .btn-icon, .text-button { display: inline-flex; align-items: center; justify-content: center; gap: 8px; font-weight: 600; line-height: 1; white-space: nowrap; }
.btn-primary { min-height: 42px; padding: 0 18px; border-radius: var(--r-md); background: var(--accent-fill); color: var(--on-fill); font-size: 14px; }
.btn-primary:hover:not(:disabled) { background: var(--accent-fill-2); }
.btn { min-height: 42px; padding: 0 16px; border-radius: var(--r-md); border: 1px solid var(--line-strong); background: var(--surface); color: var(--ink); font-size: 14px; }
.btn:hover:not(:disabled) { border-color: var(--accent); color: var(--accent); }
.btn-ghost { min-height: 34px; padding: 0 10px; border-radius: 999px; border: 1px solid var(--line-strong); color: var(--ink-2); font-size: 12.5px; background: transparent; }
.btn-ghost:hover { border-color: var(--accent); color: var(--accent); }
.btn-ghost[aria-pressed="true"] { background: var(--accent-fill); border-color: var(--accent-fill); color: var(--on-fill); }
.btn-icon { width: 34px; height: 34px; border-radius: 999px; border: 1px solid var(--line-strong); color: var(--ink-2); background: transparent; }
.btn-icon:hover { border-color: var(--accent); color: var(--accent); }
.btn-icon[aria-pressed="true"] { background: var(--accent-fill); border-color: var(--accent-fill); color: var(--on-fill); }
.btn-icon svg, .btn-ghost svg, .btn svg, .btn-primary svg { width: 15px; height: 15px; }
.text-button { min-height: 34px; padding: 0 4px; color: var(--accent); font-size: 13.5px; }
.text-button:hover { text-decoration: underline; text-underline-offset: 4px; }
.icon-button { width: 40px; height: 40px; display: grid; place-items: center; border-radius: 50%; color: var(--ink-2); border: 1px solid var(--line-strong); background: var(--surface); }
.icon-button:hover { color: var(--ink); border-color: var(--ink-3); }
.icon-button svg { width: 18px; height: 18px; fill: none; stroke: currentColor; stroke-width: 1.8; stroke-linecap: round; }
.source-link { display: inline-flex; align-items: center; gap: 4px; font-size: 12.5px; font-weight: 600; color: var(--accent); text-decoration: none; border-bottom: 1px solid var(--line-strong); }
.source-link:hover { border-bottom-color: currentColor; }
.source-link svg { width: 11px; height: 11px; }
.source-link.offline { color: var(--ink-3); border-bottom-style: dashed; }
.receipt-link { font-size: 12px; font-weight: 600; color: var(--ink-2); border: 1px solid var(--line-strong); border-radius: 999px; padding: 3px 9px; }
.receipt-link:hover { color: var(--accent); border-color: var(--accent); }
.source-row { display: flex; flex-wrap: wrap; gap: 8px 12px; align-items: center; margin-top: 8px; }
input[type="search"], input[type="number"], select { min-height: 40px; padding: 0 12px; border-radius: var(--r-md); border: 1px solid var(--line-strong); background: var(--surface); color: var(--ink); font-size: 14px; }
input::placeholder { color: var(--ink-3); opacity: 1; }
input[type="search"]:focus, input[type="number"]:focus, select:focus { border-color: var(--accent); box-shadow: 0 0 0 3px var(--accent-tint); outline: none; }

/* Evidence status glyph: outlined ring, symbol inside, quiet. */
.glyph { display: inline-grid; place-items: center; width: 18px; height: 18px; border-radius: 50%; border: 1.5px solid var(--none); color: var(--none); font-size: 11px; font-weight: 800; line-height: 1; flex: 0 0 auto; }
.glyph.checked { border-color: var(--ok); color: var(--ok); }
.glyph.differs { border-color: var(--warn); color: var(--warn); }
.glyph.inherited { border-style: dashed; }
.status-line { display: inline-flex; align-items: center; gap: 7px; font-size: 12px; color: var(--ink-2); }
.fam-dot { display: inline-block; width: 8px; height: 8px; border-radius: 50%; background: var(--fam, var(--ink-3)); flex: 0 0 auto; }
[data-family='language'] { --fam: var(--fam-language); --fam-text: var(--famtext-language); }
[data-family='early'] { --fam: var(--fam-early); --fam-text: var(--famtext-early); }
[data-family='speech'] { --fam: var(--fam-speech); --fam-text: var(--famtext-speech); }
[data-family='spanish'] { --fam: var(--fam-spanish); --fam-text: var(--famtext-spanish); }
[data-family='adult'] { --fam: var(--fam-adult); --fam-text: var(--famtext-adult); }
[data-family='fluency'] { --fam: var(--fam-fluency); --fam-text: var(--famtext-fluency); }
/* Color is the clinical family's hue, everywhere a test appears. */
[data-family] { --test-color: var(--fam); }

/* ---------- Figures: the number is the typography ---------- */
.fig { display: flex; flex-direction: column; gap: 3px; min-width: 0; }
.fig .label { margin-bottom: 2px; }
.fig-value { font-size: 25px; font-weight: 800; letter-spacing: -.02em; line-height: 1; color: var(--ink); text-align: left; overflow-wrap: anywhere; }
.spec .fig-value { font-size: 24px; }
.spec .fig-age .fig-value, .spec .fig-time .fig-value, .spec .fig-norms .fig-value { font-size: 22px; }
.spec .fig-norms .fig-value { white-space: nowrap; overflow-wrap: normal; }
button.fig-value { border-bottom: 1px dotted transparent; border-radius: 0; padding-bottom: 2px; align-self: flex-start; }
button.fig-value:hover { color: var(--accent); border-bottom-color: var(--accent); }
.fig-value.none { color: var(--ink-3); font-weight: 600; }
.fig-value.na { color: var(--ink-2); font-weight: 700; letter-spacing: 0; }
.meter > i.range { opacity: .42; }
.meter-slot { height: 0; }
.fig-note { font-size: 14px; line-height: 1.5; color: var(--ink-2); overflow-wrap: anywhere; }
.fig-note.full { display: block; }
.meter { position: relative; height: 6px; margin: 8px 0 4px; border-radius: 3px; background: var(--track); overflow: hidden; }
.meter > i { position: absolute; top: 0; bottom: 0; border-radius: 3px; background: var(--meter-fill); min-width: 6px; }
.meter-scale { display: flex; justify-content: space-between; font-family: var(--f-mono); font-size: 12px; color: var(--ink-3); }
.acc { display: grid; grid-template-columns: auto 1fr auto; gap: 4px 8px; align-items: center; margin-top: 6px; font-size: 11.5px; color: var(--ink-2); }
.acc i { display: block; height: 6px; border-radius: 3px; background: var(--track); overflow: hidden; }
.acc i::after { content: ''; display: block; height: 100%; width: var(--w, 0%); border-radius: 3px; background: var(--meter-fill); }
.acc b { font-family: var(--f-ui); font-weight: 700; color: var(--ink); font-variant-numeric: tabular-nums; }

/* ---------- Shell ---------- */
.app-shell { min-height: 100dvh; display: flex; flex-direction: column; }
.site-header { position: sticky; top: 0; z-index: 30; display: flex; align-items: center; gap: 24px; height: 60px; padding: 0 var(--gutter); background: color-mix(in srgb, var(--bg) 82%, transparent); backdrop-filter: blur(14px) saturate(1.3); -webkit-backdrop-filter: blur(14px) saturate(1.3); border-bottom: 1px solid var(--line); }
.brand { display: flex; align-items: center; gap: 12px; text-decoration: none; color: var(--ink); }
.brand-mark { width: 28px; height: 28px; color: var(--accent-fill); }
.brand > span { display: flex; flex-direction: column; line-height: 1; }
.brand strong { font-size: 17px; font-weight: 800; letter-spacing: -.01em; }
.brand > span > span { margin-top: 3px; font-size: 11px; font-weight: 700; letter-spacing: .16em; text-transform: uppercase; color: var(--ink-3); }
.view-tabs { display: flex; align-items: center; gap: 2px; margin-left: auto; }
.view-tabs button { min-height: 36px; padding: 0 13px; border-radius: var(--r-md); color: var(--ink-2); font-size: 13.5px; font-weight: 600; }
.view-tabs button:hover { color: var(--ink); background: var(--surface-2); }
.view-tabs button[aria-current="page"] { color: var(--ink); background: var(--surface-3); }
.view-tabs .shortlist-nav { margin-left: 8px; gap: 8px; border: 1px solid var(--line-strong); }
.view-tabs .shortlist-nav svg { width: 14px; height: 14px; fill: currentColor; }
#shortlist-nav-count { display: inline-grid; place-items: center; min-width: 20px; height: 20px; padding: 0 6px; border-radius: 999px; background: var(--accent-fill); color: var(--on-fill); font-size: 11.5px; font-weight: 700; }
.theme-toggle { width: 36px; height: 36px; display: grid; place-items: center; border-radius: var(--r-md); color: var(--ink-2); }
.theme-toggle:hover { background: var(--surface-2); color: var(--ink); }
.theme-toggle svg { width: 17px; height: 17px; fill: none; stroke: currentColor; stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round; }
main { flex: 1; width: 100%; max-width: var(--max); margin: 0 auto; padding: 0 var(--gutter); }

/* ---------- Atlas ---------- */
.atlas-head { display: grid; grid-template-columns: minmax(0, .95fr) minmax(0, 1.05fr); gap: 16px 32px; align-items: center; padding: 26px 0 16px; }
.atlas-head h1 { font-family: var(--f-display); font-weight: 400; font-size: clamp(38px, 4.5vw, 64px); line-height: 1.06; letter-spacing: -.015em; max-width: 20ch; }
.atlas-head h1 > span { display: block; color: var(--accent); }
.atlas-head h1 em { font-style: italic; color: var(--accent); }
.atlas-head .lede { margin-top: 18px; max-width: 58ch; color: var(--ink-2); font-size: 15px; line-height: 1.65; }
.hero-figure { display: flex; flex-direction: row; align-items: center; gap: 12px; margin-top: 18px; text-align: left; }
.hero-figure strong { font-size: 24px; font-weight: 800; letter-spacing: -.02em; line-height: 1; color: var(--ink); font-variant-numeric: tabular-nums; }
.hero-figure strong small { font-size: 14px; font-weight: 500; color: var(--ink-3); letter-spacing: 0; margin-left: 3px; }
.hero-figure > span { font-size: 13px; color: var(--ink-2); max-width: 28ch; }

/* The transparent canvas shares the page background in either theme. */
.slp-motion { --motion-width-padding: 1.26; --motion-min-view-height: 9.2; position: relative; width: 100%; min-width: 0; height: clamp(280px, 28vw, 350px); background: transparent; cursor: pointer; touch-action: pan-y; }
.slp-motion canvas { display: block; width: 100%; height: 100%; }
.slp-motion[aria-disabled="true"] { cursor: default; }
.slp-motion-fallback { position: absolute; inset: 0; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 12px; color: var(--ink-2); text-align: center; padding: 20px; }
.slp-motion-fallback[hidden] { display: none; }
.slp-motion-fallback { animation: slp-fallback-in .4s ease 1.6s both; }
.slp-motion-fallback.is-error { animation: none; }
@keyframes slp-fallback-in { from { opacity: 0; } to { opacity: 1; } }
.slp-motion canvas { animation: slp-canvas-in .5s ease both; }
@keyframes slp-canvas-in { from { opacity: 0; } to { opacity: 1; } }
.slp-motion .fallback-letters { color: var(--accent); font-size: clamp(72px, 10vw, 120px); font-weight: 800; letter-spacing: -.035em; line-height: 1; }
.slp-motion .fallback-message { font-size: 13px; max-width: 34ch; }

.client-bar { margin: 0 0 18px; display: grid; grid-template-columns: auto auto minmax(0, 1fr) minmax(220px, 1fr); gap: 14px 22px; align-items: end; padding: 16px 20px; border: 1px solid var(--line); border-radius: var(--r-lg); background: var(--surface); box-shadow: var(--shadow); }
.client-bar > div { display: flex; flex-direction: column; gap: 6px; min-width: 0; }
.client-bar .legend { flex-wrap: wrap; justify-content: flex-start; }
.client-bar .age-inputs { display: flex; gap: 8px; }
.client-bar .age-inputs label { display: flex; align-items: center; gap: 6px; }
.client-bar .age-inputs input { width: 88px; font-weight: 700; font-size: 16px; text-align: center; }
.client-bar .age-inputs span { font-size: 13px; color: var(--ink-2); }
.client-bar select { min-width: 150px; }
.client-bar .search { position: relative; }
.client-bar .search svg { position: absolute; left: 12px; top: 50%; transform: translateY(-50%); width: 15px; height: 15px; fill: none; stroke: var(--ink-3); stroke-width: 1.8; stroke-linecap: round; pointer-events: none; }
.client-bar .search input { width: 100%; padding-left: 36px; }
.client-bar .search-heading { display: flex; align-items: center; justify-content: space-between; gap: 12px; }
.client-bar .search-heading .clear { min-height: 32px; padding: 0 10px; font-size: 13px; }
.client-bar > .area-row { flex-direction: row; flex-wrap: wrap; gap: 6px; padding: 14px 0 0; border-top: 1px solid var(--line); margin-top: 4px; }
.area-row .label { width: 100%; margin-bottom: 2px; }
.chip { display: inline-flex; align-items: center; gap: 6px; min-height: 32px; padding: 0 11px; border-radius: 999px; border: 1px solid var(--line-strong); color: var(--ink-2); font-size: 14px; font-weight: 600; }
.chip:hover { border-color: var(--accent); color: var(--accent); }
.chip[aria-pressed="true"] { background: var(--accent-fill); border-color: var(--accent-fill); color: var(--on-fill); }
.chip span { display: none; }

.atlas { margin-top: 0; border: 1px solid var(--line); border-radius: var(--r-lg); background: var(--surface); box-shadow: var(--shadow); overflow: clip; }
.atlas-toolbar { display: flex; align-items: center; justify-content: space-between; gap: 24px; padding: 14px 20px; border-bottom: 1px solid var(--line); }
.atlas-toolbar h2 { font-size: 20px; font-weight: 800; letter-spacing: -.015em; white-space: nowrap; }
.atlas-toolbar h2 span { font-weight: 500; color: var(--ink-2); font-size: 14px; }
.legend { display: flex; flex-wrap: nowrap; gap: 2px; justify-content: flex-end; }
.atlas-toolbar .legend { flex: 1 1 auto; min-width: 0; flex-wrap: wrap; }
.legend button { display: inline-flex; align-items: center; gap: 6px; min-height: 32px; padding: 0 9px; border-radius: 999px; font-size: 14px; font-weight: 600; color: var(--ink-2); white-space: nowrap; }
.legend button:hover { background: var(--surface-2); color: var(--ink); }
.legend button[aria-pressed="true"] { background: var(--surface-3); color: var(--ink); box-shadow: inset 0 0 0 1px var(--line-strong); }
.legend button b { font-family: var(--f-mono); font-weight: 500; color: var(--ink-3); }
.layer-picker { display: flex; flex-wrap: wrap; justify-content: center; gap: 4px; padding: 10px 20px; border-bottom: 1px solid var(--line); background: var(--surface-2); }
.layer-picker button { min-height: 34px; padding: 0 14px; border-radius: 999px; font-size: 13.5px; font-weight: 700; color: var(--ink-2); }
.layer-picker button:hover { color: var(--ink); background: var(--surface-3); }
.layer-picker button[aria-selected="true"] { background: var(--accent-fill); color: var(--on-fill); }
.atlas-chart .ref { stroke: var(--cursor); stroke-width: 1.25; opacity: .8; }
.atlas-chart .cap.none { font-family: var(--f-mono); font-size: 13px; font-weight: 500; fill: var(--ink-3); }
.atlas-chart { position: relative; padding: 10px 20px 16px; }
.atlas-chart svg { display: block; height: auto; overflow: visible; }
.atlas-grid { position: relative; }
.atlas-split { display: flex; align-items: flex-start; position: relative; }
.atlas-labels { flex: 0 0 auto; width: var(--labelw); }
.atlas-scroll { flex: 1 1 auto; min-width: 0; overflow-x: auto; overflow-y: hidden; -webkit-overflow-scrolling: touch; scrollbar-width: none; }
.atlas-scroll::-webkit-scrollbar { display: none; }
.chart-head, .chart-axis { display: flex; align-items: flex-start; position: sticky; z-index: 3; background: var(--surface); }
.chart-head { top: var(--header-h, 60px); }
.chart-axis { bottom: 0; border-top: 1px solid var(--line); }
.atlas-spacer { flex: 0 0 auto; width: var(--labelw); }
.atlas-pane { flex: 1 1 auto; min-width: 0; overflow: hidden; }
.atlas-pane > svg { will-change: transform; }
.atlas-grid.can-scroll .atlas-split::after, .atlas-grid.can-scroll .atlas-pane::after { content: ''; position: absolute; top: 0; right: 0; bottom: 0; width: 34px; pointer-events: none; background: linear-gradient(to right, transparent, var(--surface)); opacity: .95; transition: opacity 160ms var(--ease); }
.atlas-pane { position: relative; }
.atlas-grid.can-scroll.at-end .atlas-split::after, .atlas-grid.can-scroll.at-end .atlas-pane::after { opacity: 0; }
.atlas-chart .rowlabel.sm { font-size: 14px; }
.chart-head-cap { padding: 8px 0 6px; font-family: var(--f-ui); font-size: 14px; font-weight: 800; line-height: 1.3; color: var(--ink); }
.chart-axis-title { padding: 0 0 6px; text-align: center; font-family: var(--f-ui); font-size: 13px; font-weight: 700; letter-spacing: .07em; text-transform: uppercase; color: var(--ink-2); }
.atlas-chart .rowsub { font-family: var(--f-ui); font-size: 11.5px; font-weight: 700; letter-spacing: .02em; fill: var(--fam-text, var(--ink-2)); }
.atlas-chart .plot-bg { fill: color-mix(in srgb, var(--ink) 4%, transparent); }
.atlas-chart .ax { stroke: var(--ink-3); stroke-width: 1; opacity: .45; }
.atlas-chart .ax-strong { stroke: var(--ink-3); stroke-width: 1.25; }
.atlas-chart .tick { font-family: var(--f-ui); font-size: 13px; font-weight: 700; fill: var(--ink); font-variant-numeric: tabular-nums; }
.atlas-chart .axis-title { font-family: var(--f-ui); font-size: 11.5px; font-weight: 700; letter-spacing: .11em; text-transform: uppercase; fill: var(--ink-2); }
.atlas-chart .rowlabel { font-family: var(--f-ui); font-size: 15px; font-weight: 800; fill: var(--fam-text, var(--ink)); cursor: pointer; }
.atlas-chart .rowscope { font-family: var(--f-ui); font-size: 13px; font-weight: 500; fill: var(--ink-2); cursor: pointer; }
.atlas-chart .rowscope.dim { fill: var(--ink-3); }
.atlas-chart .swatch { stroke: var(--surface); stroke-width: 1.5; }
.atlas-chart .rowlabel.dim { fill: var(--ink-3); font-weight: 600; }
.atlas-chart .bar { rx: 4; cursor: pointer; transition: opacity 180ms var(--ease); }
.atlas-chart .bar.dim { opacity: .18; }
.atlas-chart .bar.on { stroke: var(--cursor); stroke-width: 2; }
.atlas-chart .hit { fill: transparent; cursor: pointer; }
.atlas-chart .hit:hover + .bar, .atlas-chart .row:hover .bar { filter: brightness(1.15); }
.atlas-chart .cursor { stroke: var(--cursor); stroke-width: 1.5; }
.atlas-chart .cursor-label { font-family: var(--f-ui); font-size: 12.5px; font-weight: 700; fill: var(--cursor); }
.atlas-chart .cap { font-family: var(--f-ui); font-size: 14px; font-weight: 800; fill: var(--ink); }
.atlas-tip { position: absolute; z-index: 5; pointer-events: none; min-width: 200px; max-width: 280px; padding: 10px 12px; border-radius: var(--r-md); background: var(--surface-3); color: var(--ink); border: 1px solid var(--line-strong); box-shadow: var(--shadow-float); font-size: 12.5px; line-height: 1.45; }
.atlas-tip strong { display: block; font-size: 15px; font-weight: 800; }
.atlas-tip em { font-style: normal; color: var(--ink-2); display: block; }
.atlas-tip dl { display: grid; grid-template-columns: auto 1fr; gap: 2px 10px; margin-top: 6px; }
.atlas-tip dt { color: var(--ink-3); }
.atlas-tip dd { font-weight: 700; }
.atlas-foot { display: flex; justify-content: space-between; gap: 16px; padding: 10px 20px 14px; font-size: 13px; color: var(--ink-2); border-top: 1px solid var(--line); }

/* ---------- Spec sheet ---------- */
.sheet-head { display: flex; align-items: baseline; justify-content: space-between; gap: 20px; padding: 36px 0 12px; }
.sheet-head h2 { font-size: 22px; font-weight: 800; letter-spacing: -.02em; }
.sheet-head h2 span { color: var(--ink-3); font-weight: 500; }
.sheet-head p { font-size: 14px; color: var(--ink-2); }
.sheet { display: grid; gap: 10px; padding-bottom: 72px; --sheet-grid: 244px minmax(0,95fr) minmax(0,95fr) minmax(0,106fr) minmax(0,98fr) minmax(0,134fr) minmax(0,84fr) minmax(0,112fr) 144px; }
.sheet-cols { display: none; }
.spec { display: grid; grid-template-columns: 216px minmax(0,.72fr) minmax(0,.72fr) minmax(0,1.1fr) minmax(0,1fr) minmax(0,.9fr) minmax(0,.82fr) minmax(0,.72fr) 172px; gap: 18px 16px; align-items: start; padding: 20px 22px 20px 26px; position: relative; border: 1px solid var(--line); border-radius: var(--r-lg); background: var(--surface); transition: border-color 140ms var(--ease), transform 180ms var(--ease), box-shadow 180ms var(--ease); }
.spec::before { content: none; }
.spec:hover { border-color: var(--line-strong); box-shadow: var(--shadow); }
.spec.selected { border-color: var(--cursor); }
.spec-id { display: flex; flex-direction: column; gap: 6px; min-width: 0; }
.spec-id h3 { font-size: 28px; font-weight: 900; letter-spacing: -.03em; line-height: 1; }
.spec-id h3 button { font: inherit; color: var(--fam-text, inherit); letter-spacing: inherit; text-align: left; border-radius: 0; }
.spec-id h3 button:hover { color: var(--accent); }
.spec-id p.scope { font-size: 14px; font-weight: 600; line-height: 1.3; color: var(--ink); }
.spec-id p.focus { font-size: 14px; line-height: 1.5; color: var(--fam-text, var(--ink-2)); }
.spec .fam-dot, .dossier-head .fam-dot { background: var(--test-color); }
.spec-id .fam { display: inline-flex; align-items: center; gap: 7px; font-size: 13px; font-weight: 600; color: var(--ink-3); margin-top: 2px; }
.spec-id .matched { font-size: 13px; color: var(--ink-3); }
.spec-id .matched b { color: var(--ink-2); font-weight: 600; }
.spec-side { display: flex; flex-direction: column; align-items: flex-end; gap: 10px; min-width: 0; }
.spec-side .actions { flex-wrap: nowrap; justify-content: flex-end; }
.spec-side .status-line { text-align: right; justify-content: flex-end; flex-wrap: wrap; }
.spec-side .status-line { color: var(--ink-3); font-size: 13px; }
.spec-side .actions { display: flex; gap: 6px; white-space: nowrap; }
.spec-side .actions .btn-ghost { font-size: 12px; min-height: 32px; }
.empty-state { display: flex; flex-direction: column; align-items: flex-start; gap: 8px; padding: 36px 0; color: var(--ink-2); }
.empty-state strong { font-size: 20px; font-weight: 800; color: var(--ink); }
.guidance-strip { margin-top: 16px; border: 1px solid var(--line); border-radius: var(--r-lg); background: var(--surface); }
.guidance-strip > summary { list-style: none; cursor: pointer; display: flex; align-items: center; gap: 10px; padding: 13px 18px; font-weight: 600; font-size: 13.5px; }
.guidance-strip > summary::-webkit-details-marker { display: none; }
.guidance-strip > summary::before { content: ''; width: 8px; height: 8px; border-radius: 50%; background: var(--cursor); }
.guidance-strip .guidance-grid { padding: 0 18px 18px; }
.guidance-strip .subtle { padding: 0 18px 14px; }
.subtle { font-size: 12px; color: var(--ink-3); line-height: 1.5; }
.guidance-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(300px, 1fr)); gap: 12px; }
.asha-panel { padding: 16px 18px; border: 1px solid var(--line); border-radius: var(--r-md); background: var(--surface-2); }
.asha-panel-heading { display: flex; align-items: flex-start; justify-content: space-between; gap: 12px; margin-bottom: 6px; }
.asha-panel h3 { font-size: 16px; font-weight: 700; }
.asha-label, .source-type { display: inline-flex; align-items: center; height: 20px; padding: 0 8px; border-radius: 999px; font-size: 11px; font-weight: 700; letter-spacing: .02em; background: var(--accent-tint); color: var(--accent); white-space: nowrap; }
.asha-panel > p { font-size: 13px; line-height: 1.5; color: var(--ink-2); }
.asha-links { display: flex; flex-wrap: wrap; gap: 14px; margin-top: 10px; }
.guidance-scope { margin-top: 10px; font-size: 12px; color: var(--ink-3); }
.guidance-components { margin: 12px 0 0; padding: 0; list-style: none; display: grid; gap: 8px; }
.guidance-components li { display: grid; gap: 2px; font-size: 12.5px; }
.guidance-components strong { color: var(--ink); font-weight: 600; }
.guidance-components span { color: var(--ink-2); }

/* ---------- Workspace views ---------- */
.workspace-view { padding: 40px 0 72px; }
.workspace-heading { display: flex; align-items: flex-end; justify-content: space-between; gap: 30px; margin-bottom: 24px; }
.workspace-heading h1 { font-family: var(--f-display); font-weight: 400; font-size: 52px; letter-spacing: -.015em; }
.workspace-heading p { margin-top: 10px; max-width: 62ch; color: var(--ink-2); font-size: 14.5px; }
.workspace-actions { display: flex; gap: 10px; }
.shortlist-toolbar { display: flex; align-items: center; justify-content: space-between; gap: 20px; padding: 12px 18px; margin-bottom: 14px; border-radius: var(--r-md); background: var(--surface-2); font-size: 13.5px; color: var(--ink-2); }
.spec .compare-check { display: inline-flex; align-items: center; gap: 8px; font-size: 12px; color: var(--ink-2); cursor: pointer; }
.spec .compare-check input { width: 18px; height: 18px; accent-color: var(--accent-fill); margin: 0; }
.coverage-region { margin-top: 40px; }
.coverage-heading h2 { font-size: 24px; font-weight: 800; letter-spacing: -.02em; }
.coverage-heading p { margin: 8px 0 18px; max-width: 70ch; color: var(--ink-2); font-size: 14px; }
.coverage-gaps { margin: 0 0 16px; padding: 0; list-style: none; display: grid; gap: 8px; }
.coverage-gaps li { padding: 11px 16px 11px 18px; border: 1px solid var(--line-strong); background: var(--surface-2); color: var(--ink); font-size: 13.5px; border-radius: var(--r-md); }

/* Evidence ledger */
.ledger-stats { display: flex; flex-wrap: wrap; gap: 40px; padding: 22px 0; border-top: 1px solid var(--line); border-bottom: 1px solid var(--line); margin-bottom: 22px; }
.ledger-stats div { display: flex; flex-direction: column; gap: 4px; }
.ledger-stats strong { font-size: 40px; font-weight: 900; letter-spacing: -.03em; line-height: 1; }
.ledger-stats span { font-size: 12.5px; color: var(--ink-2); }
.legend-row { display: flex; flex-wrap: wrap; gap: 8px; margin-bottom: 14px; }
.legend-row span { display: inline-flex; align-items: center; height: 24px; padding: 0 10px; border-radius: 999px; background: var(--surface-2); font-size: 12px; font-weight: 600; color: var(--ink-2); }
.research-explainer { max-width: 72ch; font-size: 14px; color: var(--ink-2); margin-bottom: 16px; }
.audit-note { margin-bottom: 20px; padding: 14px 18px; border: 1px solid var(--line-strong); border-radius: var(--r-md); background: var(--surface-2); font-size: 13.5px; line-height: 1.55; }
.ledger { display: grid; gap: 8px; }
.ledger > details { border: 1px solid var(--line); border-radius: var(--r-lg); background: var(--surface); overflow: hidden; box-shadow: none; }
.ledger > details > summary { list-style: none; cursor: pointer; display: grid; grid-template-columns: 24px 150px 1fr auto; align-items: center; gap: 16px; padding: 14px 20px; }
.ledger > details > summary::-webkit-details-marker { display: none; }
.ledger > details > summary::before { content: ''; width: 8px; height: 8px; border-right: 1.5px solid var(--ink-3); border-bottom: 1.5px solid var(--ink-3); transform: rotate(-45deg); transition: transform 160ms; margin-left: 4px; }
.ledger > details[open] > summary::before { transform: rotate(45deg); }
.ledger > details > summary:hover { background: var(--surface-2); }
.ledger > details > summary strong { font-size: 22px; font-weight: 900; letter-spacing: -.02em; }
.ledger > details > summary em { font-style: normal; font-size: 13px; color: var(--ink-2); }
.ledger > details > summary span { font-family: var(--f-mono); font-size: 11.5px; color: var(--ink-3); white-space: nowrap; }
.records { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 1px; background: var(--line); border-top: 1px solid var(--line); }
.record { display: flex; flex-direction: column; gap: 5px; padding: 14px 16px; background: var(--surface); text-align: left; min-width: 0; }
.record:hover { background: var(--surface-2); }
.record .label { display: flex; align-items: center; justify-content: space-between; gap: 8px; }
.record strong { font-size: 17px; font-weight: 800; letter-spacing: -.01em; line-height: 1.25; overflow-wrap: anywhere; }
.record small { font-family: var(--f-mono); font-size: 12px; color: var(--ink-3); }
.source-directory { display: grid; gap: 8px; padding: 14px 20px 18px; border-top: 1px solid var(--line); background: var(--surface-2); }
.source-directory p { display: flex; flex-wrap: wrap; align-items: center; gap: 10px; font-size: 12.5px; }
.research-subheading { margin: 44px 0 14px; font-size: 24px; font-weight: 800; letter-spacing: -.02em; }
.study-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(320px, 1fr)); gap: 12px; margin-top: 14px; }
.study-card { padding: 18px; border: 1px solid var(--line); border-radius: var(--r-md); background: var(--surface); }
.study-card h3 { font-size: 16px; font-weight: 700; margin-bottom: 8px; }
.study-card > p { margin-top: 10px; font-size: 13px; color: var(--ink-2); }
.study-card dl { display: grid; grid-template-columns: auto 1fr; gap: 6px 14px; margin: 12px 0; font-size: 12.5px; }
.study-card dt { color: var(--ink-3); }
.receipt-note { font-size: 13px; color: var(--ink-2); line-height: 1.55; }

/* ---------- Footer ---------- */
.site-footer { display: flex; align-items: center; justify-content: space-between; gap: 24px; width: 100%; max-width: var(--max); margin: 0 auto; padding: 26px var(--gutter) 40px; border-top: 1px solid var(--line); font-size: 12.5px; color: var(--ink-3); }
.site-footer > div { display: flex; flex-direction: column; gap: 2px; }
.site-footer strong { font-size: 14px; font-weight: 800; color: var(--ink); }
.site-footer > p { max-width: 44ch; text-align: center; }
.review-stamp { display: inline-flex; align-items: center; gap: 8px; padding: 6px 12px; border: 1px solid var(--line-strong); border-radius: 999px; font-family: var(--f-mono); font-size: 11px; color: var(--ink-2); white-space: nowrap; }
.review-stamp::before { content: ''; width: 6px; height: 6px; border-radius: 50%; background: var(--cursor); }

/* ---------- Compare tray ---------- */
.compare-tray { position: fixed; left: 50%; bottom: 20px; z-index: 40; transform: translateX(-50%); display: flex; align-items: center; justify-content: space-between; gap: 20px; width: min(760px, calc(100% - 40px)); padding: 10px 12px 10px 20px; border-radius: 999px; background: var(--surface-3); color: var(--ink); border: 1px solid var(--line-strong); box-shadow: var(--shadow-float); }
.compare-tray > div { display: flex; align-items: center; gap: 14px; min-width: 0; }
.tray-label { font-size: 12px; color: var(--ink-3); white-space: nowrap; }
.tray-tests { display: flex; gap: 6px; flex-wrap: wrap; }
.tray-tests button { display: inline-flex; align-items: center; gap: 6px; height: 28px; padding: 0 10px; border-radius: 999px; background: var(--surface); border: 1px solid var(--line-strong); font-size: 12.5px; font-weight: 700; }
.tray-tests button:hover { border-color: var(--accent); }
.tray-tests button svg { width: 12px; height: 12px; }
.tray-tests > span { font-size: 12.5px; color: var(--ink-3); align-self: center; }
.tray-actions { display: flex; align-items: center; gap: 8px; }
.compare-tray .btn-primary { min-height: 42px; background: var(--lsu-gold); color: var(--on-fill); }
.compare-tray .btn-primary span { font-family: var(--f-mono); font-size: 12px; opacity: .75; }

/* ---------- Dialogs ---------- */
dialog { border: 0; padding: 0; color: var(--ink); background: var(--surface); }
dialog::backdrop { background: rgba(8, 5, 14, .6); backdrop-filter: blur(4px); }
.dialog-titlebar { position: sticky; top: 0; z-index: 2; display: flex; align-items: center; justify-content: space-between; gap: 20px; margin: 0; padding: 16px 28px; background: color-mix(in srgb, var(--surface) 90%, transparent); backdrop-filter: blur(10px); border-bottom: 1px solid var(--line); }
.dialog-titlebar h2 { font-size: 15px; font-weight: 700; color: var(--ink-2); }
.dialog-titlebar h2 b { color: var(--ink); font-weight: 800; }
.modal { width: min(1120px, calc(100% - 40px)); max-height: calc(100dvh - 40px); border-radius: var(--r-lg); box-shadow: var(--shadow-float); overflow: auto; border: 1px solid var(--line-strong); }
@keyframes rise { from { transform: translateY(14px); opacity: 0; } to { transform: none; opacity: 1; } }
.modal[open] { animation: rise 220ms var(--ease); }

/* Profile dossier */
.dossier { padding: 32px 36px 48px; }
.dossier-head { display: grid; grid-template-columns: minmax(0,1fr) auto; gap: 16px 40px; align-items: end; padding-bottom: 24px; border-bottom: 1px solid var(--line); }
.dossier-head .fam { display: inline-flex; align-items: center; gap: 8px; font-size: 11.5px; font-weight: 700; letter-spacing: .1em; text-transform: uppercase; color: var(--ink-3); }
.dossier-head h3 { margin-top: 10px; font-size: clamp(44px, 6vw, 72px); font-weight: 900; letter-spacing: -.035em; line-height: .95; }
.dossier-head .fullname { margin-top: 10px; font-family: var(--f-ui); font-weight: 600; font-size: 22px; line-height: 1.25; color: var(--ink); max-width: 30ch; }
.dossier-head .meta { margin-top: 8px; font-size: 13px; color: var(--ink-2); }
.dossier-head .stamp { display: flex; flex-direction: column; align-items: flex-end; gap: 8px; }
.dossier-head .stamp time { font-family: var(--f-mono); font-size: 11.5px; color: var(--ink-3); }
.wall { display: grid; grid-template-columns: repeat(4, minmax(0,1fr)); gap: 1px; margin: 24px 0 0; background: var(--line); border: 1px solid var(--line); border-radius: var(--r-lg); overflow: hidden; }
.tile { position: relative; display: flex; flex-direction: column; gap: 6px; padding: 18px 20px 16px; background: var(--surface-2); text-align: left; min-width: 0; }
.tile:hover { background: var(--surface-3); }
.tile .label { padding-right: 22px; }
.tile .glyph { position: absolute; top: 14px; right: 14px; }
.tile .fig-value { font-size: 38px; }
.tile .fig-note { font-size: 12.5px; }
.tile .meter { margin-top: 10px; }
.dossier-nav { display: flex; gap: 20px; margin: 26px 0 6px; border-bottom: 1px solid var(--line); }
.dossier-nav a { padding: 10px 2px; font-size: 13px; font-weight: 700; color: var(--ink-3); text-decoration: none; border-bottom: 2px solid transparent; margin-bottom: -1px; }
.dossier-nav a:hover { color: var(--ink); }
.dossier section { padding: 22px 0 6px; }
.dossier section > h4 { font-size: 11.5px; font-weight: 700; letter-spacing: .12em; text-transform: uppercase; color: var(--ink-3); margin-bottom: 6px; }
.field { display: grid; grid-template-columns: 190px minmax(0,1fr); gap: 4px 24px; padding: 14px 0; border-bottom: 1px solid var(--line); }
.field h5 { grid-row: 1 / span 3; margin: 0; font-size: 12.5px; font-weight: 600; color: var(--ink-3); padding-top: 3px; }
.field > p { font-size: 15px; line-height: 1.5; }
.field .note { font-size: 12.5px; color: var(--ink-3); }
.field .source-row { margin-top: 6px; }
.dossier details.more { margin-top: 12px; border: 1px solid var(--line); border-radius: var(--r-md); }
.dossier details.more > summary { list-style: none; cursor: pointer; padding: 11px 16px; font-size: 13px; font-weight: 600; color: var(--ink-2); display: flex; justify-content: space-between; align-items: center; }
.dossier details.more > summary::-webkit-details-marker { display: none; }
.dossier details.more > summary::after { content: ''; width: 8px; height: 8px; border-right: 1.5px solid currentColor; border-bottom: 1.5px solid currentColor; transform: rotate(45deg); margin-right: 4px; transition: transform 160ms; }
.dossier details.more[open] > summary::after { transform: rotate(-135deg); }
.dossier details.more .field { padding-inline: 16px; }
.dossier details.more .field:last-child { border-bottom: 0; }
.dossier .guidance-grid { padding: 4px 16px 16px; }

/* Record (receipt) */
.record-sheet { padding: 28px 36px 44px; }
.record-sheet .label { margin-bottom: 10px; }
.record-value { font-size: 46px; font-weight: 900; letter-spacing: -.035em; line-height: 1.02; overflow-wrap: anywhere; }
.record-status { display: flex; align-items: center; gap: 10px; margin-top: 14px; padding-bottom: 20px; border-bottom: 1px solid var(--line); font-size: 13px; color: var(--ink-2); }
.record-details { display: grid; padding-top: 4px; }
.record-details > div { display: grid; grid-template-columns: 160px minmax(0,1fr); gap: 20px; padding: 11px 0; border-bottom: 1px solid var(--line); font-size: 14px; }
.record-details dt { font-size: 12.5px; font-weight: 600; color: var(--ink-3); padding-top: 2px; }
.record-details dd { overflow-wrap: anywhere; }
.record-details dd.mono { font-family: var(--f-mono); font-size: 12.5px; }
.record-details dd.muted { color: var(--ink-3); }
.record-sheet .receipt-note { margin-top: 18px; padding: 12px 16px; border: 1px solid var(--line-strong); background: var(--surface-2); border-radius: var(--r-md); color: var(--ink); font-size: 13.5px; }
.record-sources { display: grid; gap: 10px; margin-top: 22px; }
.record-sources article { display: grid; gap: 8px; padding: 14px 16px; border: 1px solid var(--line); border-radius: var(--r-md); background: var(--surface-2); }
.record-sources h3 { font-size: 15px; font-weight: 700; line-height: 1.3; }
.record-sources p { font-family: var(--f-mono); font-size: 11.5px; color: var(--ink-3); }

/* Compare */
.compare-controls { display: flex; align-items: center; justify-content: space-between; gap: 20px; padding: 12px 28px; border-bottom: 1px solid var(--line); background: var(--surface-2); font-size: 12.5px; color: var(--ink-3); }
.switch { display: inline-flex; align-items: center; gap: 10px; cursor: pointer; font-size: 13.5px; font-weight: 600; color: var(--ink); }
.switch input { position: absolute; opacity: 0; width: 0; height: 0; }
.switch span { position: relative; width: 36px; height: 20px; border-radius: 999px; background: var(--line-strong); transition: background-color 160ms; }
.switch span::after { content: ''; position: absolute; top: 3px; left: 3px; width: 14px; height: 14px; border-radius: 50%; background: var(--surface); transition: transform 160ms var(--ease); }
.switch input:checked + span { background: var(--accent-fill); }
.switch input:checked + span::after { transform: translateX(16px); background: var(--on-fill); }
.switch input:focus-visible + span { outline: 2px solid var(--cursor); outline-offset: 3px; }
.compare-body { padding: 24px 28px 32px; overflow-x: auto; }
.cmp-head { display: grid; grid-template-columns: 190px repeat(2, minmax(0,1fr)); gap: 0 20px; min-width: 700px; }
.cmp-head > div { padding: 14px 18px 12px; border-top: 1px solid var(--test-color); background: var(--surface-2); border-radius: 0 0 var(--r-md) var(--r-md); }
.cmp-head strong { display: block; font-size: 32px; font-weight: 900; letter-spacing: -.03em; line-height: 1; }
.cmp-head span { font-size: 12.5px; color: var(--ink-2); display: block; margin-top: 6px; }
.cmp-note { min-width: 700px; padding: 10px 0 12px; font-size: 12px; color: var(--ink-3); }
.cmp-row { display: grid; grid-template-columns: 190px repeat(2, minmax(0,1fr)); gap: 0 20px; min-width: 700px; border-top: 1px solid var(--line); }
.cmp-row > strong { padding: 16px 0; font-size: 12.5px; font-weight: 600; color: var(--ink-3); }
.cmp-row > div { padding: 16px 18px; font-size: 14px; line-height: 1.45; }
.cmp-row .fig-value { font-size: 24px; }
.cmp-row .meter { margin-top: 8px; }
.cmp-row .accuracy-context { margin-top: 6px; font-size: 12px; color: var(--ink-3); }
.cmp-scale { display: grid; grid-template-columns: 190px repeat(2, minmax(0,1fr)); gap: 0 20px; min-width: 700px; padding: 8px 0 2px; }
.cmp-scale > div { padding: 0 18px; }

/* Brief */
.brief-controls { position: sticky; top: 57px; z-index: 1; display: flex; flex-wrap: wrap; gap: 8px; padding: 12px 28px; background: var(--surface-2); border-bottom: 1px solid var(--line); }
#brief-content { padding: 32px 36px 48px; max-width: 100%; }
.brief-heading h1 { font-size: 30px; font-weight: 900; letter-spacing: -.03em; }
.brief-heading p { margin-top: 8px; font-size: 13.5px; color: var(--ink-3); }
#brief-content table { width: 100%; border-collapse: collapse; margin: 20px 0 8px; font-size: 13.5px; }
#brief-content th, #brief-content td { padding: 11px 12px; text-align: left; vertical-align: top; border-bottom: 1px solid var(--line); }
#brief-content thead th { font-size: 11px; font-weight: 700; letter-spacing: .08em; text-transform: uppercase; color: var(--ink-3); border-bottom: 1px solid var(--line-strong); }
#brief-content tbody th { font-weight: 700; }
#brief-content tbody th small { display: block; font-weight: 400; color: var(--ink-3); }
.brief-comparison { margin-top: 30px; }
.brief-comparison h2, .brief-guidance h2, .brief-references h2 { font-size: 20px; font-weight: 800; margin-bottom: 8px; letter-spacing: -.02em; }
.brief-comparison h3 { font-size: 18px; font-weight: 800; margin: 18px 0 8px; }
.brief-comparison dl { display: grid; grid-template-columns: 200px minmax(0,1fr); gap: 8px 20px; font-size: 13.5px; }
.brief-comparison dt { font-weight: 600; color: var(--ink-2); }
.brief-record { margin-top: 6px; font-size: 12px; color: var(--ink-3); }
.brief-record summary { cursor: pointer; font-weight: 600; color: var(--accent); }
.brief-record small { display: block; margin-top: 4px; }
.brief-conflict { display: block; margin-top: 6px; font-size: 12px; color: var(--warn); }
.brief-guidance { margin-top: 30px; display: grid; gap: 10px; font-size: 13.5px; }
.brief-references { margin-top: 30px; }
.brief-references ol { padding-left: 22px; display: grid; gap: 6px; font-size: 13px; }
#brief-content footer { margin-top: 30px; padding-top: 16px; border-top: 1px solid var(--line); font-size: 12px; color: var(--ink-3); }

.toast { position: fixed; left: 50%; bottom: 92px; z-index: 50; transform: translateX(-50%); padding: 11px 16px; border-radius: var(--r-md); background: var(--surface-3); border: 1px solid var(--line-strong); color: var(--ink); font-size: 13px; font-weight: 500; box-shadow: var(--shadow-float); max-width: calc(100% - 32px); }

/* ---------- Spec sheet: one fixed standard on desktop ---------- */
@media (min-width: 1181px) {
  .sheet-cols { display: grid; grid-template-columns: var(--sheet-grid); gap: 0 12px; padding: 10px 22px 8px 26px; border: 1px solid transparent; position: sticky; top: 60px; z-index: 4; background: var(--bg); }
  .sheet-cols span { font-size: 13px; font-weight: 700; letter-spacing: .05em; text-transform: uppercase; color: var(--ink-2); }
  .spec { grid-template-columns: var(--sheet-grid); grid-template-rows: 0 32px 18px auto; gap: 0 12px; padding: 22px 22px 22px 26px; }
  .spec-id, .spec-side { grid-row: 1 / -1; }
  .spec .fig { display: grid; grid-template-rows: subgrid; grid-row: 1 / -1; gap: 0; min-width: 0; overflow: hidden; }
  .spec .fig > * { min-width: 0; max-width: 100%; }
  .spec .fig .fig-note { overflow-wrap: anywhere; hyphens: auto; }
  .spec .fig .label { display: none; }
  .spec .fig .fig-value { grid-row: 2; align-self: end; font-size: clamp(20px, 1.78vw, 26px); white-space: nowrap; overflow-wrap: normal; }
  .spec .fig .fig-value.range { font-size: clamp(17px, 1.52vw, 22px); }
  .spec .fig-age .fig-value, .spec .fig-time .fig-value, .spec .fig-norms .fig-value { font-size: clamp(20px, 1.78vw, 26px); }
  .spec .fig .meter, .spec .fig .meter-slot { grid-row: 3; margin: 6px 0 0; }
  .spec .fig .fig-note { grid-row: 4; margin-top: 3px; }
  .spec-id { padding-top: 2px; }
  .spec-side { padding-top: 2px; }
}

/* ---------- Responsive ---------- */
@media (max-width: 1180px) {
  .client-bar { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .spec { grid-template-columns: 220px repeat(4, minmax(0,1fr)); gap: 18px 16px; }
  .spec-id { grid-row: 1 / span 2; }
  .spec .fig-age { grid-column: 2; }
  .spec-side { grid-column: 1 / -1; flex-direction: row; justify-content: space-between; align-items: center; padding-top: 12px; border-top: 1px solid var(--line); }
}
@media (max-width: 900px) {
  :root { --gutter: 20px; }
  .atlas-head { grid-template-columns: 1fr; gap: 8px; }
  .slp-motion { max-width: 620px; height: 300px; justify-self: center; }
  .atlas-toolbar .legend { flex-wrap: wrap; justify-content: flex-start; }
  .hero-figure { align-items: center; text-align: left; }
  .client-bar { grid-template-columns: 1fr 1fr; }
  .client-bar .purpose-group, .client-bar .search-group { grid-column: 1 / -1; }
  .records { grid-template-columns: repeat(2, minmax(0,1fr)); }
  .wall { grid-template-columns: repeat(2, minmax(0,1fr)); }
  .spec { grid-template-columns: 1fr 1fr; }
  .spec-id { grid-column: 1 / -1; grid-row: auto; }
  .spec .fig-norms, .spec .fig-acc { grid-column: auto; }
  .spec-side { grid-column: 1 / -1; flex-direction: row; justify-content: space-between; align-items: center; }
}
@media (max-width: 640px) {
  .atlas-chart { padding: 8px 12px 12px; }
  :root { --gutter: 16px; }
  .site-header { height: auto; flex-wrap: wrap; gap: 8px 14px; padding: 10px var(--gutter); }
  .view-tabs { width: 100%; margin-left: 0; overflow-x: auto; }
  .view-tabs button { flex: 0 0 auto; }
  .atlas-head { padding-top: 24px; }
  .slp-motion { height: 240px; }
  .hero-figure strong { font-size: 24px; }
  .client-bar { grid-template-columns: 1fr; gap: 20px; padding: 18px 16px; }
  .client-bar > div > .label { text-align: center; }
  .client-bar .age-inputs { gap: 16px; }
  .client-bar .age-inputs label { flex: 1; min-width: 0; }
  .client-bar .age-inputs input { width: 100%; min-width: 0; }
  .client-bar .legend { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 8px; }
  .client-bar > .area-row { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 8px; padding-top: 20px; margin-top: 0; }
  .area-row .label { grid-column: 1 / -1; margin-bottom: 4px; }
  .client-bar .legend .chip, .client-bar .area-row .chip { justify-content: center; min-height: 44px; padding: 8px 10px; border-radius: 14px; white-space: normal; text-align: center; line-height: 1.35; }
  .client-bar .area-row .chip:last-child:nth-child(even) { grid-column: 1 / -1; }
  .atlas-chart { padding: 8px 10px 14px; }
  .atlas-toolbar { flex-direction: column; align-items: flex-start; }
  .spec { grid-template-columns: 1fr 1fr; padding: 18px 16px 18px 20px; gap: 14px 16px; }
  .fig-value { font-size: 22px; }
  .spec-side .actions .btn-ghost span { display: none; }
  .workspace-heading { flex-direction: column; align-items: flex-start; gap: 14px; }
  .workspace-heading h1 { font-size: 40px; }
  .ledger > details > summary { grid-template-columns: 20px 1fr; }
  .ledger > details > summary em, .ledger > details > summary span { grid-column: 2; }
  .records { grid-template-columns: 1fr; }
  .ledger-stats { gap: 24px; }
  .site-footer { flex-direction: column; align-items: flex-start; gap: 12px; }
  .site-footer > p { text-align: left; }
  .review-stamp { max-width: 100%; white-space: normal; }
  .compare-tray { bottom: 12px; width: calc(100% - 24px); border-radius: var(--r-lg); flex-wrap: wrap; padding: 10px 12px; }
  .tray-actions { margin-left: auto; }
  .toast { bottom: 120px; }
  .modal { width: calc(100% - 16px); max-height: calc(100dvh - 16px); }
  .dialog-titlebar { padding: 12px 16px; }
  .dossier, .record-sheet, .compare-body, #brief-content { padding-inline: 16px; }
  .dossier-head { grid-template-columns: 1fr; }
  .dossier-head .stamp { align-items: flex-start; }
  .wall { grid-template-columns: 1fr; }
  .tile .fig-value { font-size: 32px; }
  .field { grid-template-columns: 1fr; gap: 4px; }
  .field h5 { grid-row: auto; }
  .record-value { font-size: 36px; }
  .record-details > div { grid-template-columns: 1fr; gap: 3px; }
  .cmp-head, .cmp-row, .cmp-scale, .cmp-note { min-width: 0; grid-template-columns: repeat(2, minmax(0,1fr)); }
  .cmp-row > strong { grid-column: 1 / -1; padding: 12px 0 2px; }
  .cmp-row > div { padding: 8px 0 14px; }
  .cmp-head > div { padding: 12px; }
  .cmp-head strong { font-size: 24px; }
  .cmp-scale > div { padding: 0; }
  .brief-controls { top: 49px; padding: 10px 16px; }
  .brief-comparison dl { grid-template-columns: 1fr; gap: 2px 0; }
  .brief-comparison dd { margin-bottom: 10px; }
}
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after { animation: none !important; transition: none !important; }
}

/* ---------- Print (brief only) ---------- */
@media print {
  @page { margin: .6in; }
  html, body { height: auto; overflow: visible !important; }
  body { background: #fff; color: #16111f; }
  body > *:not(#brief-dialog) { display: none !important; }
  #brief-dialog { display: block !important; position: static; margin: 0; padding: 0; border: 0; width: 100%; max-width: none; height: auto; max-height: none; overflow: visible; border-radius: 0; box-shadow: none; background: #fff; color: #16111f; }
  #brief-dialog::backdrop { display: none !important; }
  #brief-dialog .dialog-titlebar, .brief-controls { display: none !important; }
  #brief-content { padding: 0; }
  #brief-content table tr { break-inside: avoid; }
  #brief-content h2 { break-after: avoid; }
}

/* ---------- LSU optical glass ----------
   Outer panes catch light; controls and evidence keep a steady reading surface.
   The animation is the only moving visual effect. */
:root {
  --pane: rgba(41, 25, 62, .76);
  --pane-edge: rgba(191, 163, 220, .28);
  --pane-highlight: rgba(236, 218, 255, .18);
  --chrome: rgba(23, 12, 39, .90);
  --plot: #1b112a;
  --well: #160e23;
  --light-purple: rgba(90, 36, 156, .26);
  --light-gold: rgba(253, 208, 35, .045);
  --stripe-ink: #b393d4; --stripe-opacity: .09;
}
@media (prefers-color-scheme: light) {
  :root:not([data-theme="dark"]) {
    --pane: rgba(255, 255, 255, .82); --pane-edge: rgba(70, 29, 124, .22);
    --pane-highlight: rgba(255, 255, 255, .90); --chrome: rgba(248, 244, 253, .93);
    --plot: #ffffff; --well: #ffffff;
    --light-purple: rgba(70, 29, 124, .10); --light-gold: rgba(253, 208, 35, .09);
    --stripe-ink: #461D7C; --stripe-opacity: .06;
  }
}
:root[data-theme="light"] {
  --pane: rgba(255, 255, 255, .82); --pane-edge: rgba(70, 29, 124, .22);
  --pane-highlight: rgba(255, 255, 255, .90); --chrome: rgba(248, 244, 253, .93);
  --plot: #ffffff; --well: #ffffff;
  --light-purple: rgba(70, 29, 124, .10); --light-gold: rgba(253, 208, 35, .09);
  --stripe-ink: #461D7C; --stripe-opacity: .06;
}
html { scrollbar-color: var(--line-strong) var(--bg); }
body { position: relative; isolation: isolate; }
body::before {
  content: ''; position: fixed; inset: 0; z-index: -1; pointer-events: none;
  background: radial-gradient(ellipse at 80% 0, var(--light-purple), transparent 65%), radial-gradient(ellipse at 6% 80%, var(--light-gold), transparent 58%);
}
/* A transparent tiger-stripe mask lives behind the entire app, never over data. */
body::after {
  content: ''; position: fixed; inset: 0; z-index: -1; pointer-events: none;
  background: var(--stripe-ink); opacity: var(--stripe-opacity);
  -webkit-mask: url('assets/textures/tiger-stripes.webp') center / cover no-repeat;
  mask: url('assets/textures/tiger-stripes.webp') center / cover no-repeat;
}
::selection { background: var(--lsu-gold); color: var(--lsu-purple); }
.site-header {
  background: var(--chrome); border-bottom: 1px solid var(--pane-edge);
  box-shadow: 0 1px 0 var(--pane-highlight) inset;
  backdrop-filter: blur(18px); -webkit-backdrop-filter: blur(18px);
}
.brand-mark { color: var(--lsu-purple); width: 32px; height: 32px; }
.brand strong { font-size: 20px; letter-spacing: -.02em; }
.brand > span > span { color: var(--ink-2); letter-spacing: .12em; }
.view-tabs { gap: 6px; }
.view-tabs button { min-height: 40px; }
.view-tabs button[aria-current="page"] { color: var(--on-fill); background: var(--lsu-gold); }
.view-tabs .shortlist-nav { border-color: var(--line-strong); }
#shortlist-nav-count { background: var(--accent-tint); color: var(--accent); }
.view-tabs .shortlist-nav[aria-current="page"] #shortlist-nav-count { background: var(--lsu-purple); color: var(--lsu-gold); }
.atlas-head { padding-block: 30px 24px; }
.client-bar, .atlas, .guidance-strip, .ledger > details, .shortlist-toolbar {
  background: var(--pane); border: 1px solid var(--pane-edge); border-radius: var(--r-lg);
  box-shadow: 0 1px 0 var(--pane-highlight) inset;
}
.client-bar, .shortlist-toolbar { backdrop-filter: blur(18px); -webkit-backdrop-filter: blur(18px); }
.client-bar { padding: 22px 24px; gap: 20px 22px; margin-bottom: 24px; }
.client-bar > div { gap: 9px; }
.client-bar .label { font-size: 12px; letter-spacing: .065em; color: var(--ink-2); }
.client-bar .legend { gap: 8px; }
.client-bar > .area-row { gap: 8px; padding-top: 18px; margin-top: 0; }
input[type="search"], input[type="number"], select {
  min-height: 44px; background: var(--well); border-color: var(--line-strong);
  box-shadow: 0 1px 2px rgba(0,0,0,.09) inset;
}
select option { background: var(--well); color: var(--ink); }
input[type="search"]:focus, input[type="number"]:focus, select:focus { border-color: var(--cursor); box-shadow: none; outline: 2px solid var(--cursor); outline-offset: 2px; }
.chip, .legend button { border-radius: var(--r-md); }
.chip { min-height: 36px; background: var(--well); border-color: var(--line-strong); padding: 6px 12px; font-size: 14px; font-weight: 500; }
.chip:hover { background: var(--surface-3); color: var(--ink); }
.chip[aria-pressed="true"], .btn-ghost[aria-pressed="true"], .btn-icon[aria-pressed="true"] { background: var(--lsu-gold); color: var(--on-fill); border-color: var(--lsu-gold); }
.btn-primary { background: var(--lsu-gold); color: var(--on-fill); box-shadow: 0 1px 0 rgba(255,255,255,.28) inset; }
.btn-primary:hover:not(:disabled) { background: var(--accent-fill-2); }
.btn-ghost, .btn-icon, .receipt-link { border-radius: var(--r-md); }
.btn-icon, .btn-ghost { background: var(--surface-2); }
.legend button[aria-pressed="true"] { background: var(--accent-tint); color: var(--accent); box-shadow: inset 0 0 0 1px var(--line-strong); }
.legend button[aria-pressed="true"] b { color: inherit; }
.client-bar .legend button[aria-pressed="true"] { background: var(--lsu-gold); color: var(--on-fill); box-shadow: none; }
.atlas-toolbar { gap: 16px; padding: 18px 20px; }
.atlas-toolbar h2 { font-size: 22px; }
.layer-picker { justify-content: flex-start; gap: 6px; padding: 12px 20px; background: var(--surface-2); }
.layer-picker button { min-height: 40px; border-radius: 6px; padding-inline: 15px; font-size: 13px; }
.layer-picker button[aria-selected="true"] { background: var(--lsu-gold); color: var(--on-fill); }
.atlas-chart, .chart-head, .chart-axis { background: var(--plot); }
.atlas-chart { padding-top: 16px; }
.atlas-chart .plot-bg { fill: color-mix(in srgb, var(--ink) 3%, var(--plot)); }
.atlas-foot { background: var(--surface-2); line-height: 1.5; border-radius: 0 0 var(--r-lg) var(--r-lg); }
.sheet-head { padding-top: 42px; padding-bottom: 18px; }
.sheet-head h2 { font-size: 26px; }
.spec { background: var(--surface); border-color: var(--pane-edge); border-radius: 12px; box-shadow: none; }
.spec:hover { border-color: var(--line-strong); box-shadow: none; transform: none; }
.spec.selected, .spec.selected:hover { border-color: var(--cursor); }
.spec-id p.focus { color: var(--ink-2); }
.sheet-cols { background: var(--chrome); backdrop-filter: blur(16px); -webkit-backdrop-filter: blur(16px); }
.asha-panel, .study-card, .audit-note, .guidance-intro, .coverage-gaps li { background: var(--surface-2); box-shadow: none; border: 1px solid var(--line); border-radius: var(--r-md); }
.ledger-stats strong { color: var(--accent); }
.ledger > details > summary strong { color: var(--fam-text, var(--ink)); }
.records, .wall { background: var(--line); border-color: var(--line); }
.record, .tile { background: var(--surface); }
.record:hover, .tile:hover { background: var(--surface-3); }
.compare-tray { background: var(--chrome); border: 1px solid var(--pane-edge); box-shadow: 0 12px 34px rgba(8,2,17,.24); backdrop-filter: blur(20px); -webkit-backdrop-filter: blur(20px); border-radius: var(--r-lg); }
dialog.modal { background: var(--surface); border: 1px solid var(--pane-edge); border-radius: var(--r-lg); box-shadow: var(--shadow-float); }
dialog::backdrop { background: rgba(12, 5, 24, .65); backdrop-filter: blur(8px); }
.dialog-titlebar { background: var(--chrome); border-bottom-color: var(--pane-edge); }
.cmp-head > div { border-top: 1px solid var(--test-color); background: var(--surface-2); }
.atlas-tip, .toast { background: var(--surface-3); border: 1px solid var(--line-strong); box-shadow: var(--shadow); }
.site-footer { border-top-color: var(--pane-edge); }
@media (max-width: 900px) {
  .atlas-head { gap: 0; }
  .atlas-head h1 { font-size: clamp(38px, 6vw, 56px); }
  .atlas-head .lede { max-width: 66ch; }
  .atlas-toolbar { gap: 12px; }
}
@media (max-width: 640px) {
  .view-tabs { display: grid; grid-template-columns: auto 1fr auto; gap: 6px; overflow: visible; }
  .view-tabs button { font-size: 13px; padding-inline: 8px; }
  .view-tabs .shortlist-nav { margin-left: 0; gap: 6px; }
  .view-tabs .theme-toggle { position: absolute; top: 14px; right: var(--gutter); width: 40px; padding: 0; }
  .atlas-head { padding-block: 26px 4px; }
  .slp-motion { --motion-width-padding: 1.1; --motion-min-view-height: 6.6; height: clamp(180px, 48vw, 210px); }
  .atlas-head h1 { font-size: clamp(34px, 10vw, 46px); }
  .atlas-head .lede { font-size: 15px; line-height: 1.6; margin-top: 16px; }
  .hero-figure { margin-top: 16px; }
  .client-bar { padding: 20px 16px; gap: 22px; }
  .client-bar .label { font-size: 13px; }
  .client-bar input, .client-bar select { font-size: 16px; }
  .client-bar .chip { min-height: 44px; font-size: 14px; border-radius: var(--r-md); }
  .client-bar .legend { gap: 8px; }
  .layer-picker { padding: 10px; gap: 6px; display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .layer-picker button { min-height: 44px; padding: 8px; font-size: 13px; }
  .atlas-toolbar { padding: 16px 14px; }
  .atlas-foot { flex-direction: column; gap: 6px; padding-inline: 14px; }
  .sheet-head { flex-direction: column; align-items: flex-start; gap: 8px; }
  .spec-side .actions .btn-icon { width: 40px; height: 40px; }
  .spec-side .actions .btn-ghost { min-height: 40px; }
}
@media (prefers-reduced-transparency: reduce) {
  .client-bar, .atlas, .guidance-strip, .ledger > details, .shortlist-toolbar, .compare-tray, .site-header, .sheet-cols, .dialog-titlebar { background: var(--surface); backdrop-filter: none; -webkit-backdrop-filter: none; }
}

@media print {
  :root { --ink: #241337; --ink-2: #4e3d62; --ink-3: #675876; --accent: #461D7C; --warn: #805300; --surface: #fff; --surface-2: #f4effa; --line: #d6c9e4; }
  body::before, body::after { display: none; }
}

@media (forced-colors: active) {
  body::after { display: none; }
}

/* ---------- LSU gold perimeter ----------
   The big outer containers (filters, the atlas chart, every assessment card, the guidance strip,
   ledger entries, the shortlist toolbar) carry a thin LSU gold edge. Inner controls keep their own. */
.client-bar, .atlas, .spec, .guidance-strip, .ledger > details, .shortlist-toolbar { border: 1px solid var(--lsu-gold); }
.spec:hover { border-color: var(--lsu-gold); box-shadow: var(--shadow), 0 0 0 1px color-mix(in srgb, var(--lsu-gold) 45%, transparent); }
.spec.selected { border-color: var(--lsu-gold); box-shadow: 0 0 0 2px var(--lsu-gold); }

/* ---------- Faint gold foil on the background stripes ----------
   A hairline LSU gold edge traces each tiger stripe, kept faint so gold still means "this matters"
   on the content above. Same mask placement as body::after, so the edge sits exactly on the stripe. */
html::after {
  content: ''; position: fixed; inset: 0; z-index: -1; pointer-events: none;
  background: var(--lsu-gold); opacity: .26;
  -webkit-mask: url('assets/textures/tiger-stripes-edge.webp') center / cover no-repeat;
  mask: url('assets/textures/tiger-stripes-edge.webp') center / cover no-repeat;
}

/* Order control: one order drives the chart rows and the spec sheet. */
.layer-row { display: flex; align-items: center; gap: 12px; padding: 10px 20px; border-bottom: 1px solid var(--line); background: var(--surface-2); }
.layer-row .layer-picker { flex: 1 1 auto; justify-content: flex-start; padding: 0; border: 0; background: none; }
.sort-control { display: inline-flex; align-items: center; gap: 8px; white-space: nowrap; }
.sort-control span { font-size: 12px; font-weight: 700; letter-spacing: .07em; text-transform: uppercase; color: var(--ink-2); }
.sort-control select { min-height: 34px; font-size: 13.5px; font-weight: 600; border-color: var(--lsu-gold); }
.sheet-head { align-items: flex-end; }
.spec-side .figure-count { display: block; text-align: right; font-size: 12px; color: var(--ink-3); margin-top: 2px; }
.spec-side .figure-count.full { color: var(--lsu-gold); }
.dossier-head .figure-count { display: block; font-size: 12px; color: var(--ink-3); }
.dossier-head .figure-count.full { color: var(--lsu-gold); }
@media (max-width: 760px) {
  .layer-row { flex-direction: column; align-items: stretch; }
  .layer-row .layer-picker { justify-content: center; }
  .sheet-head { flex-direction: column; align-items: stretch; }
  .sort-control { justify-content: space-between; }
  .sort-control select { flex: 1 1 auto; font-size: 16px; }
}

/* Compare up to three: columns follow the count the dialog is given. */
.cmp-head, .cmp-row { grid-template-columns: 190px repeat(var(--cols, 2), minmax(0,1fr)); }
#compare-dialog.three-up { width: min(1320px, calc(100% - 40px)); }
#compare-dialog.three-up .cmp-head, #compare-dialog.three-up .cmp-row { min-width: 900px; gap: 0 16px; }
#compare-dialog.three-up .cmp-head strong { font-size: 28px; }
@media (max-width: 640px) {
  .cmp-head, .cmp-row { grid-template-columns: repeat(var(--cols, 2), minmax(0,1fr)); }
  #compare-dialog.three-up .cmp-head, #compare-dialog.three-up .cmp-row { min-width: 540px; grid-template-columns: repeat(3, minmax(160px,1fr)); }
  #compare-dialog.three-up .cmp-head strong { font-size: 22px; }
  .cmp-head > span:first-child { display: none; } /* the label column folds away on phones, so the names line up with their columns */
}
