:root {
  --ink: #102127;
  --muted: #50646a;
  --paper: #f5f2ea;
  --panel: #fffdf8;
  --navy: #0f3b46;
  --navy-2: #1c5c67;
  --teal: #16858c;
  --mint: #a9d8c7;
  --coral: #e36d55;
  --gold: #c99b3e;
  --line: #d7d8d0;
  --active: #0c7180;
  --waiting: #b27a21;
  --danger: #a84f49;
  --history: #6c6c78;
  --shadow: 0 14px 38px rgba(16, 33, 39, .08);
  --radius: 18px;
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body {
  margin: 0;
  color: var(--ink);
  background: var(--paper);
  overflow-x: hidden;
  font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  line-height: 1.55;
}
a { color: var(--navy-2); text-decoration-thickness: .08em; text-underline-offset: .14em; }
a:hover { color: var(--coral); }
button, select { font: inherit; }
button:focus-visible, select:focus-visible, a:focus-visible { outline: 3px solid #f1b662; outline-offset: 3px; }

.topbar {
  position: sticky; top: 0; z-index: 10;
  display: flex; justify-content: space-between; align-items: center; gap: 1rem;
  padding: .75rem clamp(1rem, 4vw, 4.5rem);
  color: #fff; background: rgba(15, 59, 70, .96); backdrop-filter: blur(10px);
  border-bottom: 1px solid rgba(255,255,255,.16);
}
.topbar a { color: #fff; text-decoration: none; }
.brand { font-weight: 760; letter-spacing: .01em; }
.topbar nav { display: flex; flex-wrap: wrap; gap: .9rem; font-size: .9rem; }

.hero {
  color: #fff;
  background:
    radial-gradient(circle at 86% 24%, rgba(169,216,199,.34), transparent 29%),
    radial-gradient(circle at 9% 82%, rgba(227,109,85,.28), transparent 25%),
    linear-gradient(135deg, #0b2c36 0%, #10515c 62%, #1b7278 100%);
  padding: clamp(3.8rem, 8vw, 7.5rem) clamp(1rem, 7vw, 7rem) 4rem;
}
.eyebrow { text-transform: uppercase; letter-spacing: .14em; font-size: .78rem; font-weight: 750; opacity: .82; }
.hero h1, h2, h3 { font-family: "Iowan Old Style", "Palatino Linotype", Georgia, serif; }
.hero h1 { max-width: 1000px; margin: .5rem 0 1rem; font-size: clamp(2.5rem, 6vw, 5.6rem); line-height: .98; letter-spacing: -.035em; }
.hero .dek { max-width: 810px; font-size: clamp(1.08rem, 2vw, 1.42rem); color: #e8f3f1; }
.hero-meta { display: flex; flex-wrap: wrap; min-width: 0; gap: .6rem 1.25rem; margin-top: 2rem; color: #d7e8e6; font-size: .92rem; }
.hero-meta span { min-width: 0; overflow-wrap: anywhere; padding-left: .9rem; border-left: 2px solid rgba(255,255,255,.35); }

main { width: min(1220px, calc(100% - 2rem)); margin: 0 auto; }
.section { padding: clamp(3rem, 7vw, 6rem) 0; border-bottom: 1px solid var(--line); }
.section-head { display: grid; grid-template-columns: minmax(0, 1.4fr) minmax(250px, .7fr); gap: 2rem; align-items: end; margin-bottom: 2rem; }
.section h2 { margin: 0; font-size: clamp(2rem, 4vw, 3.5rem); line-height: 1.05; letter-spacing: -.025em; }
.section-intro { max-width: 750px; color: var(--muted); font-size: 1.05rem; }
.kicker { margin: 0 0 .4rem; text-transform: uppercase; letter-spacing: .12em; color: var(--teal); font-weight: 780; font-size: .76rem; }

.answer-grid { display: grid; grid-template-columns: repeat(5, minmax(0,1fr)); gap: .8rem; }
.answer-card, .panel, .requirement-card, .report-card, .side-card {
  background: var(--panel); border: 1px solid var(--line); border-radius: var(--radius); box-shadow: var(--shadow);
}
.answer-card { padding: 1.1rem; min-height: 220px; }
.answer-card .level { width: 2.1rem; height: 2.1rem; display: grid; place-items: center; border-radius: 50%; background: var(--navy); color: #fff; font-weight: 800; }
.answer-card h3 { margin: .8rem 0 .5rem; font-size: 1.18rem; line-height: 1.1; }
.answer-card p { font-size: .88rem; color: var(--muted); }
.answer-card .progress-group { margin-top: .8rem; }
.standing { display: inline-flex; align-items: center; gap: .38rem; border-radius: 999px; padding: .28rem .62rem; font-size: .74rem; font-weight: 760; background: #e8eeec; }
.standing::before { content: ""; width: .48rem; height: .48rem; border-radius: 50%; background: var(--history); }
.standing.established::before { background: #27805e; }
.standing.bounded::before, .status-active::before, .status-runnable::before { background: var(--active); }
.standing.not::before, .status-waiting::before, .status-planned::before { background: var(--waiting); }
.status-unavailable::before, .status-failed::before { background: var(--danger); }
.status-user-held::before { background: #815ca6; }

.finding { display: grid; grid-template-columns: 1.1fr .9fr; gap: 2rem; align-items: center; }
.finding-copy { font-size: 1.12rem; }
.finding-copy h2 a { color: var(--navy); text-decoration-thickness: 1px; text-underline-offset: .16em; }
.finding-copy strong { color: var(--navy); }
.figure-card { margin: 0; background: #fff; border: 1px solid var(--line); border-radius: var(--radius); overflow: hidden; box-shadow: var(--shadow); }
.figure-card img { display: block; width: 100%; height: auto; }
.figure-card figcaption { padding: .85rem 1rem 1rem; color: var(--muted); font-size: .84rem; }

.toolbar { display: flex; flex-wrap: wrap; gap: .65rem; margin-bottom: 1rem; }
.filter-button { border: 1px solid var(--line); background: #fff; border-radius: 999px; padding: .52rem .8rem; cursor: pointer; color: var(--ink); }
.filter-button[aria-pressed="true"] { background: var(--navy); color: #fff; border-color: var(--navy); }
.requirements { display: grid; gap: .72rem; }
.requirement-card { display: grid; grid-template-columns: 180px 1fr 210px; gap: 1rem; align-items: start; padding: 1rem 1.1rem; }
.requirement-card.has-result { cursor: pointer; transition: border-color .16s ease, box-shadow .16s ease, transform .16s ease; }
.requirement-card.has-result:hover { border-color: #8eb7ae; box-shadow: 0 12px 30px rgba(8, 36, 43, .12); transform: translateY(-1px); }
.requirement-card.has-result:focus-visible { outline: 3px solid #f1b662; outline-offset: 3px; }
.requirement-card[hidden] { display: none; }
.requirement-card h3 { margin: .15rem 0 .35rem; font-size: 1.05rem; }
.requirement-card p { margin: .2rem 0; color: var(--muted); font-size: .9rem; }
.branch { font-size: .8rem; font-weight: 760; color: var(--teal); text-transform: uppercase; letter-spacing: .06em; }
.status-pill { display: inline-flex; align-items: center; gap: .42rem; padding: .36rem .64rem; border-radius: 999px; background: #eff1ec; font-weight: 760; font-size: .78rem; white-space: nowrap; }
.status-pill::before { content: ""; width: .55rem; height: .55rem; border-radius: 50%; background: var(--history); }
.status-pill.status-materialized { color: #185c45; background: #e1f0e8; border: 1px solid #bad8ca; }
.status-pill.status-materialized::before { background: #27805e; }
.status-pill.status-active, .status-pill.status-runnable { color: #075f6a; background: #dfeff0; border: 1px solid #b6d6d9; }
.status-pill.status-active::before, .status-pill.status-runnable::before { background: var(--active); }
.status-pill.status-waiting, .status-pill.status-planned { color: #7a5318; background: #f6ead5; border: 1px solid #e4cca1; }
.status-pill.status-waiting::before, .status-pill.status-planned::before { background: var(--waiting); }
.status-pill.status-unavailable, .status-pill.status-failed { color: #843d38; background: #f5e2df; border: 1px solid #deb9b4; }
.status-pill.status-unavailable::before, .status-pill.status-failed::before { background: var(--danger); }
.status-pill.status-user-held { color: #654684; background: #eee5f5; border: 1px solid #d0bae1; }
.status-pill.status-user-held::before { background: #815ca6; }
.amount { font-weight: 720; color: var(--navy); }
.progress-group { display: grid; gap: .55rem; width: min(100%, 430px); margin: .55rem 0; }
.progress-metric { display: grid; grid-template-columns: minmax(0,1fr) auto; gap: .14rem .65rem; align-items: baseline; font-size: .72rem; }
.progress-label { min-width: 0; color: var(--muted); font-weight: 680; }
.progress-values { display: inline-flex; align-items: baseline; gap: .5rem; white-space: nowrap; }
.progress-values strong { color: var(--navy); font-size: .76rem; }
.progress-values b { color: var(--teal); font-size: .76rem; }
.progress-track { grid-column: 1 / -1; height: 4px; overflow: hidden; border-radius: 999px; background: #dce3df; }
.progress-track i { display: block; height: 100%; border-radius: inherit; background: var(--teal); }
.progress-panel { margin-top: .8rem; padding: .75rem 1rem; border-left: 4px solid var(--coral); background: #fff8f1; }
.progress-panel > strong { color: #8b3d33; font-size: .78rem; }
.progress-panel .progress-group { margin-bottom: 0; }
.tl-matrix { border: 1px solid var(--line); border-bottom: 0; margin-bottom: .8rem; overflow: hidden; }
.tl-row { background: #fff; border-bottom: 1px solid var(--line); display: grid; gap: 1rem; grid-template-columns: minmax(0,.7fr) minmax(0,1.55fr) minmax(0,1.45fr); padding: .85rem 1rem; }
.tl-row > strong { color: var(--navy); font-size: .88rem; }
.tl-row > span { color: var(--muted); font-size: .78rem; line-height: 1.5; min-width: 0; overflow-wrap: anywhere; }
.tl-row > span b { color: var(--ink); }
.tl-head { background: #e3efeb; color: var(--navy); font-size: .68rem; font-weight: 800; letter-spacing: .045em; text-transform: uppercase; }
.tl-head span { color: inherit; font-size: inherit; }
.tl-comparison { background: #f6f8f5; border: 1px solid var(--line); padding: 1rem; }
.tl-methods { display: grid; gap: .7rem; grid-template-columns: repeat(3, minmax(0, 1fr)); }
.ram-family-label { align-items: center; color: var(--navy); display: flex; font-size: .65rem; font-weight: 800; gap: .65rem; grid-column: 1 / 3; letter-spacing: .12em; text-transform: uppercase; }
.ram-family-label::before, .ram-family-label::after { border-top: 1px solid var(--navy); content: ""; flex: 1; }
.tl-method { background: #fff; border-top: 5px solid var(--coral); display: flex; flex-direction: column; grid-row: 2; min-height: 15rem; padding: 1rem; }
.tl-method.tl-sweeps { border-color: var(--teal); }
.tl-method.tl-one { border-color: var(--navy); }
.tl-method.tl-fast { grid-column: 3; }
.tl-method h3 { font-size: 1.2rem; margin: 0 0 .45rem; }
.tl-method h3 a { color: var(--navy); text-decoration-thickness: 1px; text-underline-offset: .16em; }
.method-copy { display: grid; flex: 1; gap: .55rem; }
.tl-method .method-copy p { color: var(--muted); font-size: .78rem; line-height: 1.5; margin: 0; }
.tl-method .progress-group { margin: .35rem 0 .8rem; }
.method-rating { display: grid; gap: .32rem; margin: 0 0 .8rem; }
.method-rating span { align-items: center; color: var(--muted); display: grid; font-size: .64rem; font-weight: 720; gap: .45rem; grid-template-columns: 3.1rem 1fr; }
.method-rating i { background: linear-gradient(90deg, currentColor 0 31%, transparent 31% 35%, currentColor 35% 65%, transparent 65% 69%, currentColor 69% 100%); color: var(--teal); display: block; height: 4px; max-width: 5rem; opacity: .28; }
.method-rating .rating-one { clip-path: inset(0 66% 0 0); opacity: 1; }
.method-rating .rating-two { clip-path: inset(0 32% 0 0); opacity: 1; }
.method-rating .rating-three { opacity: 1; }
.tl-selection-rule { background: #f6f8f5; border: 1px solid var(--line); color: var(--muted); margin-top: .9rem; padding: .8rem 1rem; }
.tl-selection-rule summary { color: var(--navy); cursor: pointer; font-size: .78rem; font-weight: 760; }
.tl-selection-rule p { font-size: .78rem; line-height: 1.55; margin: .65rem 0 0; }
.tl-authority { align-items: center; display: grid; gap: .5rem; grid-template-columns: auto minmax(3.8rem, 1fr) auto minmax(3.8rem, 1fr) auto minmax(3.8rem, 1fr) auto; margin-top: .8rem; }
.tl-authority strong { background: #fff; border: 1px solid var(--line); color: var(--navy); font-size: .72rem; padding: .62rem .7rem; text-align: center; }
.tl-authority span { align-items: center; color: var(--teal); display: flex; font-size: 1.2rem; justify-content: center; position: relative; }
.tl-authority small { color: var(--muted); font-size: .55rem; left: 50%; position: absolute; top: -.72rem; transform: translateX(-50%); white-space: nowrap; }
@media (max-width: 760px) { .tl-authority { align-items: stretch; grid-template-columns: 1fr; } .tl-authority span { height: 2rem; transform: rotate(90deg); } .tl-authority small { top: .2rem; transform: translateX(-50%) rotate(-90deg); } }
.ais-selector-figure, .ais-set-figure { background: #fffef9; border: 1px solid var(--line); margin: 0 0 1rem; overflow: hidden; }
.ais-selector-figure-head, .ais-set-figure-head { align-items: baseline; border-bottom: 1px solid var(--line); display: flex; gap: 1rem; justify-content: space-between; padding: .9rem 1rem; }
.ais-selector-figure-head h3, .ais-set-figure-head h3 { font-size: clamp(1.35rem, 2.4vw, 2rem); font-weight: 500; margin: 0; }
.ais-selector-figure-head p, .ais-set-figure-head p { color: var(--muted); font-size: .76rem; margin: 0; max-width: 34rem; }
.ais-selector-figure figcaption, .ais-set-figure figcaption { border-top: 1px solid var(--line); color: var(--muted); font-size: .72rem; line-height: 1.5; padding: .72rem 1rem; }
.ais-selector-static { margin: 0 auto; max-width: 760px; padding: 1rem; width: 100%; }
.ais-selector-root, .ais-selector-provider { background: var(--panel); border: 1px solid #829691; position: relative; }
.ais-selector-root { padding: 45px 8px 8px; }
.ais-selector-root-label, .ais-selector-provider-label { font-family: "Iowan Old Style", "Palatino Linotype", Georgia, serif; font-size: 1.25rem; font-weight: 400; left: 50%; position: absolute; text-align: center; top: 8px; transform: translateX(-50%); white-space: nowrap; z-index: 7; }
.ais-selector-provider-grid { display: grid; gap: 9px; grid-template-columns: minmax(0, 2.15fr) minmax(180px, .85fr); position: relative; z-index: 1; }
.ais-selector-provider { height: 230px; isolation: isolate; padding: 44px 8px 8px; }
.ais-selector-amsa-station { color: var(--muted); font-size: 11px; line-height: 1; position: absolute; right: 10px; top: 12px; z-index: 7; }
.ais-selector-set { align-items: flex-start; background: rgba(255, 254, 248, .9); border: 1px solid #aebdb9; color: var(--ink); display: flex; font-size: .9rem; font-weight: 600; justify-content: center; padding: 10px 8px; text-align: center; }
.ais-selector-treatment { bottom: 8px; position: absolute; top: 44px; z-index: 2; }
.ais-selector-ram { left: 8px; width: calc(50% - 11px); }
.ais-selector-nonram { right: 8px; width: calc(50% - 11px); }
.ais-selector-juan { background: rgba(255, 254, 248, .28); border: 2px solid #829691; bottom: 28px; left: 10%; position: absolute; right: 10%; top: 90px; z-index: 4; }
.ais-selector-highlighted { bottom: 38px; left: calc(10% + 10px); position: absolute; top: 145px; width: calc(40% - 18px); z-index: 5; }
.ais-selector-station-grid { bottom: 8px; display: grid; gap: 7px; grid-template-columns: 1fr 1fr; left: 8px; position: absolute; right: 8px; top: 44px; z-index: 2; }
.ais-selector-station-grid .ais-selector-set { min-height: 0; }
.ais-set-chart { overflow-x: auto; padding: .3rem .4rem; scrollbar-gutter: stable; }
.ais-set-chart:focus-visible { outline: 3px solid #0872d6; outline-offset: -3px; }
.ais-set-chart svg { display: block; height: auto; min-width: 900px; width: 100%; }
.ais-flow { cursor: pointer; opacity: .72; stroke: rgba(20,37,34,.08); stroke-width: .7; }
.ais-flow:hover, .ais-flow[data-selected="true"] { opacity: 1; stroke: var(--coral); stroke-width: 2; }
.ais-flow[data-muted="true"] { opacity: .12; }
.ais-flow-grey { fill: #cbd4d0; }
.ais-flow-teal { fill: #73bcb4; }
.ais-flow-blue1 { fill: #c5dfe8; }
.ais-flow-blue2 { fill: #afd2df; }
.ais-flow-blue3 { fill: #8ebfd1; }
.ais-flow-blue4 { fill: #62a4bd; }
.ais-subset { cursor: pointer; }
.ais-subset-juan path { fill: #ef9b76; opacity: .9; }
.ais-subset-highlighted path { fill: #a93418; }
.ais-subset[data-selected="true"] path { stroke: #751f0a; stroke-width: 3; }
.ais-hit-path { fill: none !important; opacity: 1 !important; pointer-events: stroke; stroke: transparent !important; stroke-width: 24 !important; }
.ais-flow:focus-visible, .ais-subset:focus-visible { outline: none; }
.ais-flow:focus-visible path:not(.ais-hit-path), .ais-subset:focus-visible path:not(.ais-hit-path) { stroke: #0872d6; stroke-width: 3; }
.ais-axis-node line { stroke: #142522; stroke-width: 8; }
.ais-axis-node text { fill: #142522; font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace; font-size: 13px; font-weight: 700; paint-order: stroke; stroke: var(--panel); stroke-width: 4px; }
.ais-axis-node tspan { fill: var(--muted); font-weight: 400; }
.ais-axis-title { fill: var(--muted); font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace; font-size: 11px; font-weight: 700; letter-spacing: .07em; }
.ais-juan-label { fill: #79250f; font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace; font-size: 14px; font-weight: 700; pointer-events: none; text-anchor: middle; }
.ais-highlighted-label { fill: #8c260f; font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace; font-size: 13px; font-weight: 700; paint-order: stroke; pointer-events: none; stroke: var(--panel); stroke-width: 4px; text-anchor: middle; }
.ais-set-detail { align-items: baseline; background: #142522; color: #fff; display: grid; gap: .8rem; grid-template-columns: auto 1fr; padding: .72rem 1rem; }
.ais-set-detail strong { color: #a9dad4; font-family: "Iowan Old Style", "Palatino Linotype", Georgia, serif; font-size: 1.25rem; font-weight: 400; }
.ais-set-detail span { color: #c9d8d4; font-size: .72rem; }
.coverage-calendar { --cc-columns: 20; background: #fffef9; border: 1px solid var(--line); border-radius: .8rem; margin: 0 0 1rem; padding: 1rem; }
.cc-switcher { display: flex; gap: .3rem; justify-content: flex-end; margin-bottom: .7rem; }
.cc-switcher button { background: transparent; border: 1px solid var(--line); border-radius: 999px; color: var(--ink); cursor: pointer; font: inherit; font-size: .68rem; padding: .38rem .65rem; }
.cc-switcher button[aria-pressed="true"] { background: var(--ink); color: #fffef9; }
.cc-view > header h3 { font-family: Georgia, serif; font-size: 1.45rem; font-weight: 500; margin: 0; }
.cc-view > header p, .cc-footer p, .cc-footer small { color: var(--muted); display: block; font-size: .62rem; line-height: 1.45; margin: .25rem 0 0; }
.cc-timeline { margin-top: .85rem; overflow-x: auto; padding-bottom: .25rem; scrollbar-gutter: stable; }
.cc-timeline-inner { min-width: var(--cc-min-width); }
.cc-year-row, .cc-month-row, .cc-row { display: grid; gap: .5rem; grid-template-columns: 4rem minmax(0, 1fr); }
.cc-year-row > span, .cc-month-row > span { color: var(--muted); font-size: .53rem; font-weight: 700; }
.cc-years, .cc-months, .cc-cells { display: grid; gap: 2px; grid-template-columns: repeat(var(--cc-columns), minmax(2rem, 1fr)); }
.cc-years b { border-bottom: 1px solid var(--line); color: var(--muted); font-size: .58rem; padding-bottom: .16rem; text-align: center; }
.cc-month-row { align-items: end; margin: .25rem 0 .38rem; }
.cc-months b { color: var(--muted); font-size: .52rem; text-align: center; }
.cc-rows { display: grid; gap: .35rem; }
.cc-row { align-items: center; }
.cc-row > strong { background: #fffef9; font-size: .62rem; left: 0; position: sticky; z-index: 1; }
.cc-cell { border: 1px solid var(--line); border-radius: 2px; display: block; height: 1.05rem; min-width: 0; position: relative; }
.cc-monthly_files.cc-complete { background: var(--teal); }
.cc-monthly_files.cc-partial { background: #fff; box-shadow: inset 0 0 0 .16rem var(--teal); }
.cc-bounded_spans::after, .cc-irregular_snapshots::after { border-radius: 999px; content: ""; inset: .28rem 24%; position: absolute; }
.cc-bounded_spans.cc-complete::after, .cc-irregular_snapshots.cc-complete::after { background: var(--teal); }
.cc-bounded_spans.cc-partial::after, .cc-irregular_snapshots.cc-partial::after { background: #fff; border: 2px solid var(--teal); }
.cc-bounded_spans.cc-held::after, .cc-irregular_snapshots.cc-held::after, .cc-monthly_files.cc-held { background: repeating-linear-gradient(135deg, #fff, #fff 3px, #b25b52 3px, #b25b52 5px); }
.cc-none { background: transparent; opacity: .45; }
.cc-footer { align-items: end; background: transparent; color: inherit; display: flex; gap: 1rem; justify-content: space-between; margin-top: .55rem; min-height: 0; padding: 0; }
.cc-legend { display: flex; flex-wrap: wrap; font-size: .56rem; gap: .65rem; }
.cc-legend span { align-items: center; display: flex; gap: .25rem; }
.cc-legend i { height: .62rem; width: .9rem; }
.cc-legend .cc-bounded_spans::after, .cc-legend .cc-irregular_snapshots::after { inset: .1rem 18%; }
.requirement-actions { display: grid; align-content: start; gap: .6rem; }
.result-pending { color: var(--muted); font-size: .8rem; font-weight: 700; }
.result-scope { color: var(--muted); font-size: .72rem; font-weight: 700; }
.evidence-link { font-size: .78rem; color: var(--muted); }
.viewer-state { display: inline-flex; align-items: center; width: fit-content; gap: .35rem; border-radius: 999px; padding: .27rem .55rem; font-size: .68rem; font-weight: 780; }
.viewer-state::before { content: ""; width: .42rem; height: .42rem; border-radius: 50%; }
.viewer-ready { color: #185c45; background: #e1f0e8; }
.viewer-ready::before { background: #27805e; }
.viewer-pending { color: #7a5318; background: #f6ead5; }
.viewer-pending::before { background: var(--waiting); }

.widget { background: #0b2730; color: #eef8f5; border-radius: 24px; padding: clamp(1rem, 3vw, 2rem); box-shadow: 0 22px 54px rgba(8, 36, 43, .2); }
.widget h3 { font-size: 1.6rem; margin: 0 0 .3rem; }
.widget-intro { color: #bdd5d2; max-width: 820px; }
.widget-controls { display: flex; flex-wrap: wrap; gap: 1rem; align-items: end; margin: 1.25rem 0; }
.widget-top { display: grid; grid-template-columns: minmax(0, 1fr) 250px; gap: 1rem; align-items: end; }
.case-minimap { background: rgba(255,255,255,.08); border: 1px solid rgba(255,255,255,.16); border-radius: 14px; overflow: hidden; }
.case-minimap svg { display: block; width: 100%; height: auto; }
.case-map-water { fill: #e8f3f3; }
.case-map-range { fill: none; stroke: #7ea7a6; stroke-dasharray: 4 4; }
.case-map-station { fill: #102127; stroke: #fff; stroke-width: 1.5; }
.case-map-choice { cursor: pointer; }
.case-map-choice:focus { outline: none; }
.case-map-choice:focus .case-map-hit { fill: rgba(8,114,214,.18); stroke: #0872d6; stroke-width: 1.5; }
.case-map-hit { fill: transparent; }
.case-map-ship { fill: #668785; stroke: #fff; stroke-width: 1.2; }
.case-map-choice.selected .case-map-ship { fill: #e36d55; stroke: #102127; stroke-width: 1.8; }
.case-map-label { fill: #274443; font: 700 9px system-ui, sans-serif; paint-order: stroke; stroke: #e8f3f3; stroke-width: 3px; }
.widget label { display: grid; gap: .35rem; color: #cce0dd; font-size: .82rem; font-weight: 720; }
.widget select { min-width: 180px; border: 1px solid #6c9897; color: #fff; background: #123c46; padding: .55rem .7rem; border-radius: 9px; }
.chart-shell { background: #fff; color: var(--ink); border-radius: 15px; padding: .6rem; overflow: auto; }
.chart-shell svg { width: 100%; min-width: 680px; height: auto; display: block; }
.focused-band { fill: #16858c; opacity: .07; }
.source-uncertainty { fill: #e36d55; opacity: .14; }
.spectral-source-line { fill: none; stroke: #e36d55; stroke-linecap: round; stroke-linejoin: round; stroke-width: 2.5; }
.quantity-sample { cursor: pointer; stroke: #fff; stroke-width: 1.2; }
.quantity-sample-rl { fill: #16858c; }
.quantity-sample-tl { cursor: pointer; stroke: #c99b3e; stroke-linecap: round; stroke-width: 5; }
.quantity-sample.focused { stroke: #102127; stroke-width: 2; }
.quantity-sample-tl.focused { stroke: #102127; stroke-width: 7; }
#spectrum-chart:focus-visible { outline: 3px solid #0872d6; outline-offset: -3px; }
.readout-grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: .7rem; margin-top: .8rem; }
.readout { background: rgba(255,255,255,.08); border: 1px solid rgba(255,255,255,.14); border-radius: 12px; padding: .75rem; }
.readout small { display: block; color: #a9c6c3; }
.readout strong { display: block; font-size: 1.08rem; margin-top: .15rem; }
.method-details { margin-top: .9rem; color: #b8cfcc; font-size: .8rem; }
.method-details summary { width: fit-content; cursor: pointer; font-weight: 720; }
.method-note { margin: .6rem 0 0; font-size: .8rem; color: #b8cfcc; overflow-wrap: anywhere; }
.legend { display: flex; flex-wrap: wrap; gap: 1rem; margin: .8rem 0 0; font-size: .82rem; color: #d5e5e3; }
.legend > span::before { content: ""; display: inline-block; width: 1.2rem; height: 3px; margin: 0 .35rem .18rem 0; background: var(--legend); }
.legend > .legend-point::before { width: .52rem; height: .52rem; border-radius: 50%; margin-bottom: -.02rem; }
.legend > .legend-stroke::before { width: .72rem; }
.widget-method-key { color: #b8cfcc; font-size: .72rem; margin: .55rem 0 0; }
.db-reference { font-size: .65em; white-space: nowrap; }
.db-reference-svg { font-size: 65%; }

.two-up { display: grid; grid-template-columns: 1fr 1fr; gap: 1rem; }
.panel { padding: 1.25rem; }
.panel h3 { margin: 0 0 .5rem; font-size: 1.35rem; }
.panel p, .panel li { color: var(--muted); }
.panel ul { padding-left: 1.2rem; }
.stat-row { display: grid; grid-template-columns: repeat(4, 1fr); gap: .7rem; margin: 1rem 0; }
.stat { padding: 1rem; border-radius: 14px; background: #edf2ed; }
.stat strong { display: block; font-size: 1.55rem; color: var(--navy); }
.stat span { font-size: .8rem; color: var(--muted); }

.gallery { display: grid; grid-template-columns: repeat(2, minmax(0,1fr)); gap: 1rem; }
.gallery .figure-card img { aspect-ratio: 1.75; object-fit: contain; background: #fff; }
.report-grid, .side-grid { display: grid; grid-template-columns: repeat(3, minmax(0,1fr)); gap: 1rem; }
.report-card, .side-card { padding: 1.15rem; }
.report-card h3, .side-card h3 { margin: 0 0 .5rem; font-size: 1.12rem; }
.report-card p, .side-card p { color: var(--muted); font-size: .88rem; }
.tag { display: inline-block; margin-bottom: .65rem; padding: .25rem .55rem; border-radius: 999px; background: #e7ece9; font-size: .72rem; font-weight: 760; color: var(--navy); }

.callout { border-left: 5px solid var(--coral); background: #fff8f1; padding: 1rem 1.2rem; border-radius: 0 12px 12px 0; }
.callout strong { color: #8b3d33; }
.smallprint { color: var(--muted); font-size: .82rem; }
.tech-table { width: 100%; border-collapse: collapse; background: #fff; font-size: .86rem; }
.tech-table th, .tech-table td { padding: .65rem .7rem; border-bottom: 1px solid var(--line); vertical-align: top; text-align: left; }
.tech-table th { color: var(--navy); background: #edf1ed; }
.codeish { font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace; font-size: .8em; word-break: break-all; }

.map-index { padding: 1rem 0 1.4rem; border-bottom: 1px solid var(--line); }
.map-entry { padding: .75rem 0; border-bottom: 1px solid var(--line); scroll-margin-top: 4rem; overflow-x: auto; }
.map-entry:last-child { border-bottom: 0; }
.map-entry > header { position: sticky; left: 0; width: min(100%, 1220px); margin-bottom: .15rem; }
.map-entry > header h2 { margin: 0; font-size: 1.15rem; font-weight: 500; }
.map-entry > header h2 a { color: var(--navy-2); font-weight: 650; text-decoration: underline; text-decoration-thickness: .06em; }
.chapter { padding: clamp(3rem, 7vw, 6rem) 0; border-bottom: 1px solid var(--line); }
.chapter-head { display: flex; gap: 1rem; align-items: baseline; margin-bottom: 2rem; scroll-margin-top: 5rem; }
.chapter-head h1 { margin: 0; font-family: "Iowan Old Style", "Palatino Linotype", Georgia, serif; font-size: clamp(2.7rem, 6vw, 5.5rem); font-weight: 500; letter-spacing: -.045em; line-height: .95; }
.answer-chapter { padding-top: clamp(3.5rem, 8vw, 7rem); }
.answer-chapter .chapter-head { display: block; max-width: 920px; }
.chapter-dek { max-width: 850px; margin: 1.2rem 0 0; color: var(--muted); font-size: clamp(1.05rem, 2vw, 1.3rem); }
.signal-flow { display: grid; grid-template-columns: minmax(125px,.8fr) minmax(170px,.95fr) minmax(135px,.8fr) minmax(250px,1.4fr) minmax(135px,.8fr); min-width: 920px; margin: .25rem 0; }
.flow-wire { display: grid; grid-template-rows: 1fr auto 1fr; min-width: 0; color: var(--ink); text-decoration: none; }
.flow-wire strong { align-self: end; justify-self: stretch; padding: 0 .55rem .35rem; color: var(--navy-2); font-family: "Iowan Old Style", "Palatino Linotype", Georgia, serif; font-size: .96rem; font-weight: 700; text-align: center; }
.flow-wire i { position: relative; display: block; width: 100%; border-top: 2px solid var(--coral); }
.flow-wire i::after { position: absolute; right: 0; top: -6px; content: ""; border-top: 5px solid transparent; border-bottom: 5px solid transparent; border-left: 8px solid var(--coral); }
.flow-operation { align-self: center; display: flex; flex-direction: column; min-height: 82px; padding: .65rem; color: var(--ink); background: var(--panel); border: 1px solid var(--ink); text-decoration: none; }
.signal-flow > a.flow-operation { align-self: stretch; display: grid; place-items: center; min-height: 96px; margin: .15rem 0; text-align: center; }
.flow-operation > strong, .flow-operation h2, .flow-operation h3 { margin: 0; font-family: "Iowan Old Style", "Palatino Linotype", Georgia, serif; font-size: 1rem; font-weight: 500; }
.flow-operation h3 a { color: inherit; text-decoration-thickness: 1px; text-underline-offset: .14em; }
.flow-operation > strong { color: var(--navy-2); font-weight: 700; }
.signal-flow a { cursor: pointer; }
.signal-flow a:hover strong, .signal-flow a:focus-visible strong { color: var(--coral); text-decoration: underline; }
.signal-flow > a.flow-operation:hover, .signal-flow > a.flow-operation:focus-visible { border-color: var(--teal); background: #f1f8f5; box-shadow: 0 6px 18px rgba(15,59,70,.12); }
.flow-operation > span { margin-top: auto; color: var(--teal); font-size: .7rem; font-weight: 760; }
.derivative-operation > div { display: grid; grid-template-columns: repeat(3,1fr); gap: .22rem; margin: auto 0; }
.derivative-operation > div a { padding: .25rem; color: var(--navy-2); background: #e3efeb; font-size: .58rem; font-weight: 780; text-decoration: underline; }
.work-surface { margin: 1rem 0; padding: 1.4rem; background: rgba(255,253,248,.72); border: 1px solid var(--line); border-radius: var(--radius); scroll-margin-top: 5rem; }
.work-surface > header { display: flex; justify-content: space-between; gap: 1rem; align-items: baseline; margin-bottom: 1rem; }
.work-surface > header h2 { margin: 0; font-size: clamp(1.7rem,3vw,2.5rem); }
.work-surface > header p { margin: 0; color: var(--muted); font-size: .86rem; }
.surface-grid { display: grid; grid-template-columns: repeat(3,1fr); gap: .7rem; }
.surface-grid.two { grid-template-columns: repeat(2,1fr); }
.surface-grid article { padding: 1rem; background: var(--panel); border-top: 2px solid var(--navy); }
.surface-grid h3 { margin: 0 0 .45rem; font-size: 1.16rem; }
.surface-grid h3 a, .requirement-card h3 a, .report-card h3 a, .side-card h3 a {
  display: inline-block;
  color: var(--navy);
  text-decoration-thickness: 1px;
  text-underline-offset: .16em;
}
.surface-grid p { color: var(--muted); font-size: .84rem; }
.surface-grid article > a { font-size: .8rem; font-weight: 750; }
.surface-grid article > .viewer-state, .surface-grid article > .evidence-link { display: flex; margin-top: .65rem; }
.set-entrances { margin-top: .9rem; }
.coverage-exception { margin-top: .8rem; color: var(--danger); font-size: .76rem; }
.coverage-exception summary { cursor: pointer; font-weight: 760; }
.coverage-exception p { margin-bottom: 0; color: var(--muted); }
.comparison-finding { margin-top: 2rem; }
.observation-finding { margin-top: .4rem; }

body > footer { padding: 2.5rem max(1rem, calc((100% - 1220px)/2)); color: #dce8e6; background: var(--navy); }
body > footer a { color: #fff; }

@media (max-width: 950px) {
  .widget-top { grid-template-columns: 1fr; }
  .case-minimap { max-width: 300px; }
  .answer-grid { grid-template-columns: repeat(2, 1fr); }
  .section-head, .finding { grid-template-columns: 1fr; }
  .requirement-card { grid-template-columns: 130px 1fr; }
  .requirement-card > :last-child { grid-column: 2; }
  .report-grid, .side-grid { grid-template-columns: repeat(2,1fr); }
  .readout-grid, .stat-row { grid-template-columns: repeat(2,1fr); }
  .chapter { overflow-x: hidden; }
  .work-surface > header { align-items: flex-start; flex-direction: column; }
  .surface-grid { grid-template-columns: 1fr; }
  .tl-methods { grid-template-columns: 1fr; }
  .ram-family-label { grid-column: 1; }
  .tl-method, .tl-method.tl-fast { grid-column: 1; grid-row: auto; min-height: 0; }
}
@media (max-width: 800px) {
  .tl-row { gap: .4rem; grid-template-columns: 1fr; }
  .tl-head { display: none; }
}
@media (max-width: 650px) {
  .topbar { flex-direction: column; align-items: flex-start; gap: .45rem; }
  .topbar nav { width: 100%; justify-content: flex-start; gap: .5rem .85rem; font-size: .76rem; }
  .hero { padding-top: 3rem; }
  .answer-grid, .two-up, .gallery, .report-grid, .side-grid { grid-template-columns: 1fr; }
  .requirement-card { grid-template-columns: 1fr; }
  .requirement-card > :last-child { grid-column: auto; }
  .readout-grid, .stat-row { grid-template-columns: 1fr 1fr; }
  .report-title { align-items: flex-start; flex-direction: column; }
  .map-entry > header { align-items: flex-start; }
  .surface-grid.two { grid-template-columns: 1fr; }
  .map-entry { overflow-x: visible; }
  .signal-flow { display: flex; flex-direction: column; gap: .35rem; min-width: 0; }
  .flow-wire { grid-template-rows: auto 1.6rem; justify-items: center; }
  .flow-wire strong { align-self: auto; padding: .25rem; }
  .flow-wire i { width: 0; height: 1.45rem; border-top: 0; border-left: 2px solid var(--coral); }
  .flow-wire i::after { right: -4px; top: auto; bottom: -1px; border-top: 8px solid var(--coral); border-right: 5px solid transparent; border-bottom: 0; border-left: 5px solid transparent; }
  .signal-flow > .flow-wire:last-child i { display: none; }
  .cc-footer { align-items: stretch; flex-direction: column; }
  .cc-year-row, .cc-month-row, .cc-row { grid-template-columns: 3.3rem minmax(0, 1fr); }
  .cc-cells { gap: 1px; }
  .ais-selector-figure-head, .ais-set-figure-head { align-items: flex-start; flex-direction: column; }
  .ais-selector-static { padding: .65rem; }
  .ais-selector-provider-grid { grid-template-columns: 1fr; }
  .ais-selector-provider { height: 220px; }
  .ais-selector-highlighted { top: 138px; }
  .ais-selector-ara { height: 200px; }
  .ais-set-detail { align-items: start; grid-template-columns: 1fr; gap: .1rem; }
}
@media print {
  .topbar, .toolbar, .widget-controls { display: none; }
  body { background: #fff; }
  .section { break-inside: avoid; }
  .answer-card, .panel, .figure-card, .requirement-card { box-shadow: none; }
  .ais-selector-figure, .ais-set-figure { break-inside: avoid; }
  .ais-set-chart svg { min-width: 0; }
}
