:root {
  color-scheme: dark;
  --ink: #081527;
  --panel: #102239;
  --line: #2b4560;
  --white: #f1f6fd;
  --muted: #afc1d5;
  --aqua: #54f3d5;
  --ice: #9bd9ff;
  --amber: #ffce88;
  --lilac: #c8b9fa;
  font: 16px/1.55 'Segoe UI', system-ui, sans-serif;
}
* { box-sizing: border-box; }
body { margin: 0; background: radial-gradient(ellipse at 64% 0, #132c49 0, var(--ink) 65%); color: var(--white); height: 100dvh; overflow: hidden; display: grid; grid-template-rows: auto minmax(0,1fr); }
a { color: inherit; text-decoration: none; }
button, input { font: inherit; }
button, a, summary, input { -webkit-tap-highlight-color: transparent; }
button { cursor: pointer; color: inherit; }
:focus-visible { outline: 2px solid var(--amber); outline-offset: 4px; }
[hidden] { display: none !important; }
img { display: block; max-width: 100%; }
h1, h2, h3, p { margin: 0; }
svg.icon { width: 1.35em; height: 1.35em; fill: none; stroke: currentColor; stroke-width: 1.65; stroke-linecap: round; stroke-linejoin: round; display: block; }
.skip { position: fixed; left: 12px; top: 10px; clip-path: inset(50%); z-index: 10; padding: 10px; background: #fff; color: #081527; }
.skip:focus { clip-path: none; }
.mast { border-bottom: 1px solid #263d54; background: #081527dc; }
.mast-inner, .deck { width: min(1680px, calc(100% - 32px)); margin-inline: auto; }
.mast-inner { height: 39px; display: flex; align-items: center; gap: 10px; }
.brand { display: grid; place-items: center; background: #f0f6fc; border-radius: 6px; padding: 3px 7px; }
.brand img { object-fit: contain; width: 40px; height: 25px; }
.divider { height: 22px; width: 1px; background: #34516d; flex: none; }
.prepared { color: var(--muted); font-size: .84rem; }
.prepared strong { color: var(--white); margin-left: .28em; font-weight: 650; }
.mast-actions { margin-left: auto; }
.quiet { background: none; border: 0; color: var(--muted); display: inline-flex; align-items: center; justify-content: center; gap: 8px; padding: 7px 0; font-size: .9rem; }
.quiet:hover { color: var(--aqua); }
.deck { min-height: 0; display: grid; grid-template-rows: minmax(0,1fr) auto; gap: 6px; padding: 6px 0; }
.scene { position: relative; min-height: 0; min-width: 0; border: 1px solid var(--line); border-radius: 13px; overflow: auto; isolation: isolate; }
.scene.arrive { animation: arrive 350ms ease both; }
@keyframes arrive { from { opacity: .68; transform: translateY(5px); } }
.intro { display: flex; align-items: center; background: #0b1c31; overflow: hidden; }
.hero-art { z-index: -2; position: absolute; inset: 0 0 0 27%; overflow: hidden; background: radial-gradient(ellipse at 66% 48%, #174c67, #132c49 40%, #0b1c31 72%); }
.hero-art::after { content: ''; position: absolute; inset: 0; background: url('assets/hero.jpg') center 48% / cover no-repeat; transition: transform 2.7s cubic-bezier(.2,.7,.3,1), filter 1.2s ease; }
.intro[data-shot="1"] .hero-art::after { transform: scale(1.075) translateX(-2%); filter: saturate(1.18); }
.intro[data-shot="2"] .hero-art::after { transform: scale(1.018) translateX(1%); filter: brightness(1.09); }
.hero-art i { position: absolute; z-index: 1; inset: 0; opacity: 0; pointer-events: none; background: linear-gradient(103deg, transparent 32%, #6affec29 50%, transparent 57%); }
.intro.playing[data-shot="1"] .hero-art i { animation: scan-glass 2.8s ease both; }
@keyframes scan-glass { from { transform: translateX(-60%); opacity: 0; } 40% { opacity: .95; } to { transform: translateX(66%); opacity: 0; } }
.intro::after { content: ''; z-index: -1; position: absolute; inset: 0; background: linear-gradient(90deg,#0b1b2f 4%,#0b1b2ff5 27%,#0b1b2f99 49%,transparent 79%),linear-gradient(0deg,#0b1b2ff2,transparent 36%); }
.hero-content { padding: 16px clamp(22px,5vw,80px) 66px; max-width: 860px; }
.kicker { color: var(--aqua); font-size: .87rem; font-weight: 650; letter-spacing: .055em; display: flex; align-items: center; gap: 9px; }
.kicker span { display: inline-block; width: 20px; height: 1px; background: currentColor; }
.hero-content h1 { font-size: clamp(2.4rem,min(5.55vw,10vh),6.1rem); line-height: 1.02; letter-spacing: -.064em; font-weight: 660; margin: 10px 0 13px; }
.hero-content h1 em { color: var(--aqua); font-style: normal; }
.hero-content > p:not(.kicker) { max-width: 500px; font-size: clamp(1rem,1.37vw,1.22rem); color: #c1d0e0; margin-bottom: 19px; }
.button { border-radius: 7px; border: 1px solid #436077; padding: 10px 18px; display: inline-flex; align-items: center; justify-content: center; gap: 8px; font-weight: 680; font-size: .92rem; line-height: 1.45; }
.primary { color: #082237; background: var(--aqua); border-color: var(--aqua); }
.primary:hover { background: #a4ffeb; border-color: #a4ffeb; }
.button:disabled { opacity: .52; cursor: default; }
.intro-media { position: absolute; bottom: 12px; left: clamp(22px,5vw,80px); right: clamp(22px,5vw,80px); display: grid; grid-template-columns: auto 1fr auto; align-items: center; gap: 14px; }
.intro-frame { display: flex; align-items: center; gap: 9px; color: #e4edf7; min-width: 249px; font-size: .88rem; }
.signal { width: 7px; height: 7px; border-radius: 50%; background: var(--aqua); box-shadow: 0 0 12px var(--aqua); }
.small-mono { font: .78rem 'Cascadia Mono', Consolas, monospace; color: var(--muted); margin-left: auto; }
.film-track { display: flex; gap: 4px; }
.film-track span { flex: 1; height: 2px; background: #45617a; position: relative; }
.film-track span::before { content: ''; position: absolute; inset: 0; transform: scaleX(var(--fill,0)); transform-origin: left; background: var(--aqua); }
.chapter-nav { min-width: 0; position: relative; z-index: 2; }
.chapters { display: grid; grid-template-columns: repeat(4,minmax(0, 1fr)); gap: 8px; }
.chapter-link { min-height: 44px; display: flex; gap: 9px; align-items: center; border: 1px solid var(--line); background: #0f2137; border-radius: 8px; padding: 4px 10px; position: relative; min-width: 0; transition: background .18s, border-color .18s; --tint: var(--ice); }
.chapter-link:nth-child(2) { --tint: var(--aqua); }
.chapter-link:nth-child(3) { --tint: var(--lilac); }
.chapter-link:nth-child(4) { --tint: var(--amber); }
.chapter-link:hover, .chapter-link:focus-visible, .chapter-link[aria-current] { border-color: var(--tint); background: #1a344c; }
.chapter-link[aria-current]::after { content: ''; inset: auto 0 0; height: 2px; background: var(--tint); position: absolute; }
.chapter-icon { color: var(--tint); width: 29px; height: 29px; flex: none; display: grid; place-items: center; border: 1px solid #385770; background: #0c1c30; border-radius: 6px; font-size: 15px; }
.chapter-link strong, .chapter-link small { display: block; }
.chapter-link strong { font-size: .94rem; line-height: 1.15; }
.chapter-link small { font-size: .76rem; color: var(--muted); margin-top: 3px; }
.chapter-number { display: none; }
#hover-preview { position: absolute; max-width: calc(100% - 12px); bottom: calc(100% + 5px); left: 4px; padding: 5px 10px; background: #173249; border: 1px solid #42667f; border-radius: 6px; color: var(--white); font-size: .85rem; pointer-events: none; }
.chapter { background: linear-gradient(135deg,#10263e,#0d1e32 63%); padding: clamp(10px,1.05vw,19px); }
.chapter-heading { margin-bottom: 11px; flex: none; }
.chapter-heading .kicker { display: none; }
.chapter-heading h2 { font-size: clamp(1.5rem,2.5vw,2.8rem); font-weight: 630; letter-spacing: -.042em; line-height: 1.08; margin: 0 0 5px; }
.chapter-heading > p:last-child { color: var(--muted); line-height: 1.38; font-size: .91rem; }
.ia-grid, .value-grid { display: grid; gap: 12px; grid-template-columns: repeat(4,minmax(0,1fr)); }
.ia-card, .metric { text-align: left; background: #142b43; border: 1px solid #37526c; border-radius: 10px; padding: 18px; min-height: 128px; }
.ia-card:is(:hover,[aria-pressed="true"]), .metric:hover { background: #1b3850; border-color: var(--aqua); }
.ia-card > span:first-child, .metric-icon { display: grid; place-items: center; width: 39px; height: 39px; border-radius: 9px; background: #203e56; color: var(--aqua); margin-bottom: 12px; }
.ia-card strong, .metric strong { display: block; font-size: 1.03rem; line-height: 1.25; }
.ia-card small, .metric small { display: block; margin-top: 6px; color: var(--muted); font-size: .9rem; }
.ia-detail, .guard { display: flex; align-items: start; gap: 12px; background: #102e42; padding: 15px; border-left: 2px solid var(--aqua); border-radius: 0 6px 6px 0; margin-top: 16px; }
.ia-detail > span, .guard > span { color: var(--aqua); flex: none; }
.ia-detail p, .guard { color: #bcd1e4; }
.guard { font-size: .92rem; }
.case { display: flex; flex-direction: column; }
.case-tabs { display: none !important; }
.case-grid { display: grid; grid-template-columns: .95fr 1.05fr; gap: 12px; min-height: 0; flex: 1; }
.case-grid:has(.outputs:not([hidden])) { grid-template-columns: 1fr .92fr 1.12fr; }
.source-panel, .work-panel, .outputs { background: #0b1c30; padding: 11px; border: 1px solid var(--line); border-radius: 9px; min-width: 0; overflow: auto; }
.panel-head { display: flex; justify-content: space-between; gap: 5px 8px; flex-wrap: wrap; align-items: center; margin-bottom: 8px; }
.case .button { padding: 6px 10px; }
.panel-head h3, .pilot h3 { font-weight: 650; font-size: 1.07rem; }
.count, .case-state { color: var(--aqua); font-size: .82rem; background: #163749; border-radius: 6px; padding: 3px 8px; }
.case-state[data-state="blocked"] { color: var(--amber); background: #493651; }
.source-list { display: grid; gap: 5px; }
.source-list button { display: flex; align-items: center; gap: 9px; text-align: left; color: #c7d8e9; padding: 3px 7px; background: #132a40; border: 1px solid transparent; border-radius: 5px; font-size: .9rem; }
.source-list button[aria-pressed="true"], .source-list button:hover { border-color: #70b9ce; background: #1a3851; }
.source-list button > span:last-child { margin-left: auto; color: var(--muted); font-size: .78rem; }
.source-list button:disabled { opacity: .58; cursor: default; }
.source-preview { color: var(--ice); margin-top: 9px; font-size: .89rem; overflow-wrap: anywhere; }
.source-preview summary { cursor: pointer; }
pre { overflow: auto; white-space: pre-wrap; color: #c6e4ef; background: #071522; padding: 10px; border-radius: 5px; margin: 6px 0 0; font-size: .8rem; }
.scenario { display: flex; gap: 9px; align-items: center; margin-top: 11px; font-size: .88rem; color: var(--muted); cursor: pointer; }
.scenario input { accent-color: #32d8bc; width: 1.05em; height: 1.05em; margin: 0; }
.case-steps { list-style: none; margin: 0 0 13px; padding: 0; display: grid; gap: 7px; counter-reset: steps; }
.case-steps li { display: flex; color: var(--muted); align-items: center; gap: 9px; font-size: .91rem; counter-increment: steps; }
.case-steps li::before { content: counter(steps, decimal-leading-zero); font: .76rem 'Cascadia Mono', Consolas, monospace; background: #21354b; width: 28px; height: 22px; display: grid; place-items: center; border-radius: 4px; }
.case-steps li[data-stage="working"], .case-steps li[data-stage="done"] { color: var(--aqua); }
.case-steps li[data-stage="working"]::before { box-shadow: 0 0 8px var(--aqua); }
.case-steps li[data-stage="needs-review"] { color: var(--amber); }
.case-controls { display: flex; flex-wrap: wrap; gap: 12px; align-items: center; }
#case-note { margin-top: 9px; font-size: .88rem; color: #c8d9e9; }
.deliverable-layout { display: grid; gap: 8px; }
.doc-list { display: grid; align-content: start; gap: 5px; }
.doc-list { grid-template-columns: repeat(2,minmax(0,1fr)); }
.doc-list button { background: #132a40; border: 1px solid var(--line); border-radius: 5px; color: var(--muted); padding: 6px 9px; text-align: left; font-size: .88rem; }
.doc-list button[aria-pressed="true"] { color: var(--aqua); border-color: var(--aqua); }
.doc-detail { padding: 13px; background: #142b43; border-radius: 7px; }
.doc-detail h4 { margin: 0; font-size: 1.04rem; }
.doc-detail p { color: #bed1e3; margin-top: 5px; font-size: .91rem; }
.doc-detail button { text-align: left; color: var(--ice); }
.architecture { display: grid; grid-template-columns: minmax(0,1fr) auto; grid-template-rows: auto minmax(0,1fr); gap: 7px 11px; overflow: hidden; }
.architecture .chapter-heading { margin: 0; }
.arch-controls { display: flex; justify-content: space-between; align-items: center; align-self: center; flex-wrap: wrap; gap: 4px 10px; }
.segments { display: inline-flex; gap: 3px; border: 1px solid var(--line); padding: 3px; border-radius: 7px; }
.segments button { background: transparent; color: var(--muted); border: 0; padding: 4px 8px; border-radius: 5px; font-size: .86rem; }
.segments button:disabled { opacity: .55; cursor: default; }
.segments button[aria-pressed="true"] { background: #234760; color: var(--aqua); }
.arch-pane { grid-column: 1 / -1; background: #0a1b2b; border: 1px solid #365775; border-radius: 8px; min-height: 0; min-width: 0; padding: 6px; }
.map-scroll { overflow: auto; }
#original-map { display: grid; grid-template-columns: minmax(0,1fr) clamp(235px,22vw,335px); grid-template-rows: auto minmax(0,1fr); gap: 5px 8px; }
.c4-toolbar { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 5px 10px; padding: 0 1px; }
#c4-routes, .c4-zoom { display: flex; flex-wrap: wrap; align-items: center; gap: 6px; }
.c4-toolbar button, .c4-detail-tabs button { padding: 3px 7px; color: var(--muted); background: #102438; border: 1px solid #355674; border-radius: 5px; font-size: .81rem; }
.c4-toolbar button:is(:hover,[aria-pressed="true"]) { color: var(--aqua); border-color: #58acb6; background: #173249; }
.c4-toolbar button:disabled { cursor: default; opacity: .45; }
.c4-zoom output { color: #b9cfe0; font-size: .84rem; min-width: 46px; text-align: center; }
.c4-zoom button { min-width: 34px; }
#c4-scroll { container-type: size; display: grid; place-items: safe center; }
.original-c4 { position: relative; width: calc(min(100cqw, 100cqh * 1722 / 804) * var(--zoom,1)); }
.original-c4 svg { display: block; width: 100%; height: auto; pointer-events: none; }
.c4-hotspot { cursor: pointer; fill: transparent; stroke: none; outline: none; pointer-events: all; vector-effect: non-scaling-stroke; }
.c4-hotspot:is(:hover,:focus-visible) { fill: #42f9dc1c; stroke: var(--aqua); stroke-width: 2; }
.c4-hotspot[aria-pressed="true"] { stroke: #58f7d699; stroke-dasharray: 5 4; stroke-width: 1.5; }
.c4-hotspot:focus-visible { stroke-dasharray: none; }
.c4-tooltip { position: absolute; z-index: 3; display: grid; gap: 4px; width: 220px; padding: 9px 11px; color: var(--white); background: #112b43; border: 1px solid #58cfc6; border-radius: 7px; box-shadow: 0 8px 28px #040c15c9; pointer-events: none; }
.c4-tooltip { transform: translate(var(--tip-x,0),var(--tip-y,0)); }
.c4-tooltip-left { --tip-x: -100%; }
.c4-tooltip-above { --tip-y: -100%; }
.c4-tooltip span { font-size: .85rem; color: #c5d9e8; line-height: 1.4; }
.c4-detail { grid-column: 2; grid-row: 1 / -1; min-width: 0; background: #132b40; border: 1px solid #2c4c67; border-radius: 7px; overflow: auto; padding: 9px; }
.c4-detail > label { font-size: .8rem; color: var(--muted); }
.c4-detail select { display: block; width: 100%; color: var(--white); background: #0b2337; border: 1px solid #466884; border-radius: 5px; min-height: 30px; margin: 3px 0 9px; padding: 2px 6px; font-size: .88rem; }
.c4-detail-tabs { display: none; }
.c4-copy > div + div { border-top: 1px solid #35556c; margin-top: 7px; padding-top: 7px; }
.c4-detail h4 { margin: 0 0 4px; color: #e2eff9; font-size: .94rem; }
.c4-detail p { color: #b9cce0; font-size: .87rem; line-height: 1.4; }
.c4-detail p.c4-detail-category { color: var(--aqua); margin-bottom: 3px; }
.c4-detail h3 { font-size: 1.08rem; }
.pulse { fill: none; stroke: var(--ice); stroke-width: 3; stroke-linecap: round; stroke-dasharray: 17 130; filter: drop-shadow(0 0 4px currentColor); animation: flow 3s linear infinite; }
.pulse.aqua { stroke: var(--aqua); color: var(--aqua); }
.pulse.lilac { stroke: var(--lilac); color: var(--lilac); }
.pulse.amber { stroke: var(--amber); color: var(--amber); }
.arch-static .pulse { animation-play-state: paused; stroke-dasharray: none; opacity: .35; filter: none; }
#c4-lines .dimmed { opacity: .06; filter: none; }
@keyframes flow { from { stroke-dashoffset: 147; } to { stroke-dashoffset: 0; } }
#applied-map { display: grid; grid-template-rows: minmax(0,1fr) auto; gap: 5px; }
#applied-map .map-scroll { display: grid; place-items: safe center; container-type: size; }
#flow-map { width: min(100cqw, 100cqh * 976 / 285); }
.flow-svg { display: block; width: 100%; }
#procedure-steps { display: none; }
.flow-svg .zone { fill: #102638; stroke: #2c4e65; }
.flow-svg .zone-title { fill: #a2cee2; font-size: 13px; font-weight: 660; }
.flow-svg .node { cursor: pointer; outline: none; }
.flow-svg .node rect { fill: #17364d; stroke: #476881; stroke-width: 1.25; }
.flow-svg .node:is(:hover,:focus-visible,[aria-pressed="true"]) rect { stroke: var(--aqua); stroke-width: 2; fill: #20455a; }
.flow-svg .node text { fill: var(--white); font-size: 13.2px; font-weight: 650; pointer-events: none; }
.flow-svg .node .node-sub { fill: #b4cbdf; font-size: 12px; font-weight: 400; }
.flow-svg .edge { fill: none; stroke-width: 1.6; stroke: #529aaa; }
.flow-svg .edge.review { stroke: #bb985f; }
.flow-svg .edge.muted, .flow-svg .pulse.muted { opacity: .19; }
.flow-svg .flow-label { font-size: 11px; fill: #a3bfd1; }
.map-bottom { border-top: 1px solid #2a4960; padding: 7px 9px 2px; min-height: 32px; display: flex; flex-wrap: wrap; gap: 9px 22px; align-items: baseline; font-size: .87rem; color: #b9cfe0; }
.map-legend { display: flex; flex-wrap: wrap; gap: 12px; }
.map-legend i { display: inline-block; width: 15px; height: 2px; vertical-align: middle; background: var(--aqua); }
.map-legend span:last-child i { background: var(--amber); }
.metric { --accent: var(--aqua); }
.metric:nth-child(2) { --accent: var(--ice); }
.metric:nth-child(3) { --accent: var(--lilac); }
.metric:nth-child(4) { --accent: var(--amber); }
.metric-icon { color: var(--accent); }
.metric:hover .metric-icon, .metric:focus-visible .metric-icon { animation: metric-pop 550ms ease both; }
@keyframes metric-pop { 55% { transform: translateY(-5px) scale(1.12); box-shadow: 0 0 12px var(--accent); } }
.pilot { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; column-gap: 19px; row-gap: 12px; margin-top: 17px; border: 1px solid var(--line); border-radius: 9px; padding: 14px 17px; background: #0c1c30; }
.pilot p { color: var(--muted); font-size: .88rem; }
.inputs { display: flex; flex-wrap: wrap; align-items: center; gap: 9px 14px; }
.inputs label { color: #c6d9ea; font-size: .89rem; }
.inputs input { border: 1px solid #466884; background: #132c43; color: #f0f7ff; padding: 4px 5px; width: 62px; border-radius: 4px; }
#delta { color: var(--aqua); font-weight: 690; font-variant-numeric: tabular-nums; }
@media (max-width: 920px) {
  .case-tabs { display: inline-flex !important; align-self: flex-start; margin-bottom: 8px; }
  .case-grid, .case-grid:has(.outputs:not([hidden])) { grid-template-columns: minmax(0,1fr); }
  .case:not([data-active-pane="source"]) .source-panel,
  .case:not([data-active-pane="work"]) .work-panel,
  .case:not([data-active-pane="docs"]) .outputs { display: none; }
  .architecture { grid-template-columns: minmax(0,1fr); grid-template-rows: auto auto minmax(0,1fr); }
}
@media (max-width: 720px) {
  .mast-inner, .deck { width: calc(100% - 14px); }
  .mast-inner { height: 39px; gap: 8px; }
  .prepared, .prepared strong { display: block; margin: 0; line-height: 1.2; }
  .full-label, .desktop-break { display: none; }
  .deck { padding-block: 5px; gap: 5px; }
  .intro { align-items: end; }
  .hero-art { inset: 0 0 23%; }
  .hero-art::after { background-position: 66% 35%; }
  .intro::after { background: linear-gradient(0deg,#0b1b2f 10%,#0b1b2ff0 38%,#0b1b2f5e 68%, transparent 100%); }
  .hero-content { padding: 14px 16px 65px; }
  .hero-content h1 { font-size: clamp(2.35rem,8.2vw,3.9rem); }
  .hero-content > p:not(.kicker) { margin-bottom: 19px; }
  .intro-media { display: grid; grid-template-columns: 1fr auto; gap: 3px 8px; left: 16px; right: 16px; bottom: 10px; }
  .intro-frame { min-width: 0; }
  .small-mono { margin-left: 0; white-space: nowrap; }
  .film-track { grid-column: 1 / -1; grid-row: 2; }
  #intro-control { font-size: .82rem; }
  .chapters, .ia-grid, .value-grid { grid-template-columns: repeat(2,minmax(0,1fr)); gap: 5px; }
  .chapter-link { min-height: 39px; padding: 3px 6px; gap: 6px; }
  .chapter-link strong { font-size: .9rem; }
  .chapter-link small { display: none; }
  .chapter-icon { width: 27px; height: 27px; }
  .chapter-heading { margin-bottom: 10px; }
  .architecture .chapter-heading > p:last-child { font-size: .83rem; }
  #original-map { grid-template-columns: minmax(0,1fr); grid-template-rows: auto minmax(65px,1fr) auto; }
  .c4-toolbar button { font-size: .75rem; padding: 3px 5px; }
  .c4-detail { grid-column: 1; grid-row: 3; padding: 6px 8px; }
  .c4-detail > label { display: inline-block; margin-right: 5px; }
  .c4-detail select { display: inline-block; width: min(73%,230px); min-height: 27px; margin-block: 2px 4px; }
  .c4-detail p, .c4-detail h4 { font-size: .82rem; }
  .c4-detail h3 { font-size: .96rem; }
  .c4-detail-tabs { display: flex; gap: 4px; margin: 2px 0 6px; }
  .c4-detail-tabs button[aria-pressed="true"] { border-color: #58acb6; color: var(--aqua); }
  .c4-copy > div + div { margin: 0; border: 0; padding: 0; }
  .c4-copy:not([data-c4-active="role"]) > div:nth-child(1),
  .c4-copy:not([data-c4-active="rimac"]) > div:nth-child(2),
  .c4-copy:not([data-c4-active="interface"]) > div:nth-child(3) { display: none; }
  .c4-tooltip { display: none; }
  #applied-map { grid-template-rows: minmax(65px,1fr) auto auto; }
  #procedure-steps { display: grid; grid-template-columns: repeat(2,minmax(0,1fr)); gap: 4px; }
  #procedure-steps button { padding: 4px 5px; background: #132b40; border: 1px solid #355674; border-radius: 5px; font-size: .81rem; }
  #procedure-steps button[aria-pressed="true"] { color: var(--aqua); border-color: var(--aqua); }
  .source-panel, .work-panel, .outputs { padding: 10px; }
  .ia-card, .metric { padding: 9px; min-height: 104px; }
  .ia-card > span:first-child, .metric-icon { width: 31px; height: 31px; margin-bottom: 5px; }
  .guard, .ia-detail { padding: 7px 9px; margin-top: 8px; }
  .pilot { margin-top: 8px; padding: 9px; }
  .value-grid { grid-template-columns: minmax(0,1fr); }
  .metric { display: grid; grid-template-columns: 34px minmax(0,1fr); column-gap: 7px; min-height: 0; }
  .metric-icon { grid-row: span 2; margin-bottom: 0; }
  .metric small { margin-top: 2px; line-height: 1.35; }
  .value .guard { line-height: 1.35; }
}
@media (max-width: 365px) {
  .intro-frame { font-size: .8rem; }
  #shot-time { display: none; }
}
@media (max-height: 560px) {
  .chapter { padding: 8px; }
  .chapter-link small { display: none; }
  .chapter-link { min-height: 39px; }
  .hero-content h1 { font-size: clamp(1.75rem,min(6.5vw,10vh),3.4rem); }
}
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation-duration: .001ms !important; transition-duration: .001ms !important; scroll-behavior: auto !important; }
}
