/* Bar, menu, hero and cutaway (direction-v2 §2-4, §7, §9). Tokens live in base.css. */
@property --fade { syntax: "<length>"; inherits: true; initial-value: 48px; }
@property --ry { syntax: "<percentage>"; inherits: true; initial-value: 400%; }

/* ---------- shared ---------- */
.btn { display: inline-flex; align-items: center; justify-content: center; height: var(--h-ctl); padding-inline: var(--pad-ctl);
  background: var(--sun); color: var(--void); text-decoration: none; font: 500 15px/20px var(--f-type); white-space: nowrap;
  transition: background-color var(--t-fb) var(--ease); }
.btn:hover { background: var(--sun-hi); }
.page-pad { --pad: max(var(--gutter), (100vw - var(--max)) / 2); }
.lockup { display: inline-flex; align-items: center; gap: 10px; min-height: var(--tap); color: var(--ink); text-decoration: none; }
.wordmark { font: 500 15px/24px var(--f-type); font-stretch: 150%; letter-spacing: .08em; text-transform: uppercase; margin-right: -.08em; }

/* Station rule: the ship's 103 frames at 4 m. Ticks every 5 and 10 frames, a plate every 10. */
.station { position: relative; height: 32px; border-top: 1px solid var(--ink-3);
  background: linear-gradient(90deg, var(--ink-3) 1px, transparent 0) 0 0 / calc(100% * 40 / 412) 6px repeat-x,
              linear-gradient(90deg, var(--ink-3) 1px, transparent 0) 0 0 / calc(100% * 20 / 412) 3px repeat-x; }
.station span { position: absolute; top: 10px; left: calc(100% * var(--fr) * 4 / 412); transform: translateX(-50%);
  font: 400 15px/20px var(--f-plate); letter-spacing: .06em; color: var(--ink-3); white-space: nowrap; }
.station span:first-child { transform: none; }
.station span:last-child { transform: translateX(-100%); }   /* "100" ends on the rule's end, the mirror of "FR 0" */
@media (max-width: 767px) { .station span:nth-child(even) { display: none; } }

/* ---------- bar (§4.1) ---------- */
.bar, .menu-bar { --pad: max(var(--gutter), (100vw - var(--max)) / 2); height: var(--h-nav); padding-inline: var(--pad);
  display: flex; align-items: center; justify-content: space-between; }
.bar { position: fixed; inset: 0 0 auto; z-index: 20; transition: transform var(--t) var(--ease), background-color var(--t) var(--ease); }
.bar::after { content: ""; position: absolute; inset: auto 0 0; height: 1px; background: var(--line); opacity: 0; transition: opacity var(--t) var(--ease); }
.bar.is-solid { background: var(--void); }   /* opaque: page text never reads through the logo or Menu */
.bar.is-solid::after { opacity: 1; }
.bar.is-hidden:not(:focus-within) { transform: translateY(-100%); }
.menu-btn { display: inline-flex; align-items: center; gap: 10px; min-width: var(--tap); min-height: var(--tap); margin-right: -8px; padding: 0 8px;
  background: none; border: 0; color: var(--ink); font: 500 15px/20px var(--f-type); cursor: pointer; transition: color var(--t-fb) var(--ease); }
.menu-btn:hover { color: #FFFFFF; }
.bar-links { display: flex; gap: 24px; margin: 0; padding: 0; list-style: none; font: 500 15px/20px var(--f-type); }

/* ---------- menu (§4.2-4.3) ---------- */
.menu { position: fixed; inset: 0; width: 100%; height: 100%; max-width: none; max-height: none; margin: 0; padding: 0; border: 0;
  background: transparent; color: var(--ink); overflow: hidden auto; overscroll-behavior: contain;
  --R: calc(100vw * 1.15); --apex: 112px; --top: clamp(176px, 100svh - 576px, 300px); --row: min(104px, 11.5svh); }   /* fits 720 tall without a scroll */
.menu::backdrop { background: var(--void, #05070A); opacity: 0; transition: opacity var(--t) var(--ease); }
.menu.is-in::backdrop { opacity: 1; }
.menu-bar { position: absolute; inset: 0 0 auto; z-index: 2; }
.menu-close .sun-disc { transform: translateY(7px); transition: transform var(--t) var(--ease); }
.menu.is-in .menu-close .sun-disc { transform: none; }
.menu-planet { position: relative; min-height: 100%; overflow: hidden; transform: translateY(100vh); }
.menu.is-in .menu-planet { transform: none; transition: transform 600ms var(--ease); }
.menu-globe { position: absolute; left: 50%; top: var(--apex); width: calc(2 * var(--R)); height: calc(2 * var(--R)); margin-left: calc(-1 * var(--R));
  border-radius: 50%; background: var(--deck); box-shadow: 0 -32px 96px -24px color-mix(in srgb, var(--atmo) 40%, transparent); }
.menu-rim { position: absolute; inset: 0; border-radius: 50%; opacity: 0;
  box-shadow: inset 0 2px 0 0 color-mix(in srgb, var(--atmo) 30%, #fff), inset 0 3px 0 0 var(--atmo),
              inset 0 64px 96px -48px color-mix(in srgb, var(--atmo) 55%, transparent);
  -webkit-mask-image: linear-gradient(90deg, transparent 31%, #000 41%, #000 50%, transparent 67%);
          mask-image: linear-gradient(90deg, transparent 31%, #000 41%, #000 50%, transparent 67%); }
.menu.is-in .menu-rim { opacity: 1; transition: opacity var(--t) var(--ease) 150ms; }
.menu-body { --pad: max(var(--gutter), (100vw - var(--max)) / 2); position: relative; min-height: 100svh; padding: var(--top) var(--pad) 32px;
  display: grid; grid-template-columns: repeat(12, minmax(0, 1fr)); grid-template-rows: auto 1fr auto; column-gap: var(--col-gap); }
.menu-links { grid-column: 1 / 8; margin: 0; padding: 0; list-style: none; }
.menu-links li { opacity: 0; transform: translateY(16px); }
.menu.is-in .menu-links li { opacity: 1; transform: none; transition: opacity var(--t) var(--ease), transform var(--t) var(--ease);
  transition-delay: calc(250ms + var(--n, 0) * 40ms); }
.menu-links li:nth-child(2) { --n: 1; } .menu-links li:nth-child(3) { --n: 2; } .menu-links li:nth-child(4) { --n: 3; }
.menu-links a { display: flex; align-items: last baseline; justify-content: space-between; gap: 24px; height: calc(var(--row) + 1px);
  border-bottom: 1px solid var(--line); color: var(--ink); text-decoration: none; transition: border-color var(--t) var(--ease); }
.ml-name { font: 300 72px/var(--row) var(--f-type); font-stretch: 100%; letter-spacing: -.01em; white-space: nowrap;
  transition: font-stretch var(--t) var(--ease), color var(--t) var(--ease); }
.ml-cap { font: 500 15px/20px var(--f-type); color: var(--ink-2); text-align: right; }
.menu-links a[aria-current="true"] .ml-name { font-stretch: 150%; }   /* where you are rests wide */
.menu-links a:is(:hover, :focus-visible) { border-color: var(--sun); }
.menu-links a { position: relative; }
.menu-links a:focus-visible { outline: 0; }
/* The ring as everywhere: it takes over the row's two rules (one border where they meet) and stands 12 px off the text. */
.menu-links a:focus-visible::after { content: ""; position: absolute; inset: -1px -12px; border: 2px solid var(--sun); pointer-events: none; }
.menu-links a:is(:hover, :focus-visible) .ml-name { font-stretch: 150%; }
.menu-fig { grid-column: 9 / 13; align-self: start; width: 100%; margin-top: 30px; color: var(--ink-2); overflow: visible; }
.menu-fig path, .menu-fig rect { vector-effect: non-scaling-stroke; stroke-width: 1; transition: stroke var(--t-fb) var(--ease), stroke-width var(--t-fb) var(--ease); }
.menu-fig .z-all path { stroke: var(--ink); stroke-width: 1.5; }   /* the hull outline carries the drawing */
.menu-fig[data-zone="all"] .z-all *, .menu-fig[data-zone="hab"] .z-hab *, .menu-fig[data-zone="jd"] .z-jd *,
.menu-fig[data-zone="bridge"] .z-bridge * { stroke: var(--sun); stroke-width: 1.5; }
.menu-foot { grid-column: 1 / -1; grid-row: 3; display: flex; justify-content: space-between; align-items: flex-end; gap: 16px; }
.menu-state { margin: 0; font: 500 15px/20px var(--f-type); color: var(--ink-2); }
.menu-foot .fiducial { order: 2; margin-left: auto; }
.menu-foot .btn { order: 3; }
.menu-foot { display: grid; grid-template-columns: 1fr auto; grid-template-areas: ". fid" "state btn"; row-gap: 32px; }
.menu-state { grid-area: state; align-self: center; }
.menu-foot .fiducial { grid-area: fid; justify-self: end; }
.menu-foot .btn { grid-area: btn; }
.menu :is(.menu-fig, .menu-foot) { opacity: 0; }
.menu.is-in :is(.menu-fig, .menu-foot) { opacity: 1; transition: opacity var(--t) var(--ease) 500ms; }
.menu.is-out :is(.menu-planet, .menu-links li, .menu-fig, .menu-foot, .menu-rim) { transition: opacity var(--t) var(--ease-exit), transform var(--t) var(--ease-exit); }
.menu.is-out .menu-planet { transform: translateY(40vh); opacity: 0; }
.menu.is-out::backdrop { opacity: 0; transition: opacity var(--t) var(--ease-exit); }
@media (max-width: 1023px) {
  .menu { --R: calc(100vw * 1.25); --apex: 100px; --top: 236px; --row: 88px; }
  .menu-links { grid-column: 1 / -1; }
  .ml-name { font-size: 56px; line-height: 88px; }
  .menu-fig { display: none; }
}
@media (max-width: 767px) {
  .menu { --R: calc(100vw * 1.33); --apex: 88px; --top: 152px; }
  .menu-links a { flex-direction: column; align-items: flex-start; justify-content: center; gap: 4px; }
  .ml-name { font-size: 40px; line-height: 44px; }
  .ml-cap { font: 400 14px/20px var(--f-type); text-align: left; }
  .menu-foot { grid-template-columns: 1fr; grid-template-areas: "state" "btn"; row-gap: 16px; padding-top: 32px; }
  .menu-foot .fiducial { display: none; }
  .menu-foot .btn { width: 100%; }
}
@media (prefers-reduced-motion: reduce) {
  .menu-planet, .menu-links li, .menu.is-out .menu-planet { transform: none; }
  .menu.is-in .menu-planet, .menu.is-in .menu-links li, .menu.is-in :is(.menu-fig, .menu-foot), .menu.is-in .menu-rim { transition: opacity 200ms linear; transition-delay: 0ms; }
  .menu-planet { opacity: 0; } .menu.is-in .menu-planet { opacity: 1; }
  .menu-links a .ml-name { transition: color var(--t-fb) linear; }
  .menu-links a:not([aria-current]):is(:hover, :focus-visible) .ml-name { font-stretch: 100%; }
}

/* ---------- hero (§9) ---------- */
.hero { --pad: max(var(--gutter), (100vw - var(--max)) / 2); position: relative; height: 100svh; min-height: 640px; overflow: hidden;
  background: var(--void); touch-action: pan-y; }
.hero-stage { position: absolute; inset: 0; z-index: 0; background: var(--void); }   /* the void inside the stage's group, so the poster's lighten blend has something to beat */
.hero-stage canvas { position: absolute; inset: 0; width: 100%; height: 100%; }
/* Poster: the page's own rest frame (?still at 1440×900, 768×1024 and 390×844, 2x; /tmp/starship-qa/poster.mjs),
   so the canvas fades in over the same picture. Recapture when the camera, lights or layout change. */
.hero-poster { position: absolute; left: 0; top: 0; width: 100%; height: auto; max-width: none; pointer-events: none; }
@media (min-width: 1024px) { .hero-poster { top: calc(34% - 21.25vw); } }   /* the ship scales with the width and its hull sits at 34% of the height, as fit() frames it */
.hero-stage canvas { transition: opacity var(--t) var(--ease); }
.hero-stage:focus-visible { outline: 0; }
.hero-stage:focus-visible::after { content: ""; position: absolute; inset: 6px; z-index: 1; outline: 2px solid var(--sun); pointer-events: none; }   /* on a layer of its own: the canvas paints over the stage's own outline (retested 2026-11-21) */
.hero-copy { position: absolute; z-index: 2; left: var(--pad); right: var(--pad); bottom: 64px; max-width: 800px; pointer-events: none; }
.hero-copy a { pointer-events: auto; }
.hero-h1 { margin: 0; font: 250 clamp(46px, min(7.2vw, 11.5svh), 112px)/0.962 var(--f-type); font-stretch: 150%;
  letter-spacing: -.01em; color: var(--ink); }
/* Each line carries the light; padding keeps descenders inside the painted box. */
.hero-h1 .l { display: block; width: fit-content; padding-block: .12em; margin-block: -.12em;
  background: radial-gradient(circle 620px at var(--sx, 30vw) calc(var(--sy, 14vh) - var(--i) * 1lh + .12em), #FFFFFF 0%, #EDEFF2 30%, #8E96A3 100%);
  -webkit-background-clip: text; background-clip: text; color: transparent; }
.hero-sub { margin: 24px 0 0; max-width: 58ch; /* 2 lines at 1440: 44ch sets 4 and pushes the H1 into the ring (decisions.md, round 1) */ font: 400 17px/26px var(--f-type); color: var(--ink-2); text-wrap: pretty; }
.hero-ctas { margin-top: 32px; display: flex; flex-wrap: wrap; align-items: center; gap: 16px 24px; }
.link-down { display: inline-flex; align-items: center; gap: 8px; min-height: var(--h-ctl); padding-inline: 8px; margin-inline: -8px; font: 500 15px/20px var(--f-type);
  color: var(--ink); text-decoration: none; transition: color var(--t-fb) var(--ease); }
.link-down:hover { color: #FFFFFF; }
.link-down svg { transition: transform var(--t-fb) var(--ease); }
.link-down:hover svg { transform: translateY(2px); }
/* The credit: Small, ink-2, quiet beside the one amber button. From 1024 it holds the hint's old corner, centred on the button's row. */
.hero-credit { margin: 24px 0 0; max-width: 44ch; font: 400 14px/20px var(--f-type); color: var(--ink-2); text-wrap: pretty; }
.hero-credit a { position: relative; color: var(--ink); text-decoration: underline; text-decoration-color: var(--edge); text-underline-offset: 3px; transition: text-decoration-color var(--t-fb) var(--ease); }
.hero-credit a::after { content: ""; position: absolute; inset: 50% 0 auto; height: 44px; transform: translateY(-50%); }   /* a 44 px target; the focus ring stays on the name */
@media (hover: hover) { .hero-credit a:hover { text-decoration-color: var(--ink); } }
@media (min-width: 1024px) {
  .hero-copy { max-width: none; }
  .hero-h1 { max-width: 800px; }
  .hero-credit { position: absolute; right: 0; bottom: 14px; margin: 0; max-width: calc(100% - 400px); text-align: right; }   /* 14 = (48 button - 20 line) / 2 */
}
.seam { padding-top: 0; }

/* tablet 768-1023: text in flow under the ship */
@media (max-width: 1023px) {
  .hero { height: auto; min-height: max(640px, 100svh); display: flex; flex-direction: column; }
  .hero-copy { position: relative; left: auto; right: auto; bottom: auto; max-width: none; margin-top: 376px; padding: 0 var(--pad); }
  .hero-sub { max-width: 44ch; }
  .hero-h1 { font-size: clamp(46px, min(9.4vw, 11.5svh), 72px); }
  .hero-copy { padding-bottom: 56px; }   /* the credit took the old hint's room; this is what is left above the station rule */
}
@media (min-width: 768px) and (max-width: 1023px) { .hero { min-height: 0; } }   /* hug the copy: a full-screen hero left a 155 px empty band at 768 */
@media (max-width: 767px) {
  .hero-h1 { font-size: min(46px, (100vw - 2 * var(--gutter)) / 7.2); line-height: 1; }   /* "Go where" holds one line down to 320 */
  .hero-copy { margin-top: min(316px, 81.1vw); }   /* the poster scales with the width, so the ship's clearance does too */
  .hero-sub { font-size: 16px; line-height: 24px; }
  .hero-copy { padding-bottom: 40px; }
}


/* intro. Text waits for the scene; a 4 s safety reveal covers a failed boot. */
@media (scripting: enabled) {
  .hero:not(.is-ready) .hero-copy { opacity: 0; animation: hero-safety 1ms 4s forwards; }
}
@keyframes hero-safety { to { opacity: 1; } }
@keyframes hero-rise24 { from { opacity: 0; transform: translateY(24px); } }
@keyframes hero-rise8 { from { opacity: 0; transform: translateY(8px); } }
@keyframes hero-fade { from { opacity: 0; } }
.hero.is-intro .hero-h1 .l { animation: hero-rise24 600ms var(--ease) calc(900ms + var(--i) * 80ms) both; }
.hero.is-intro :is(.hero-sub, .hero-ctas, .hero-credit) { animation: hero-rise8 500ms var(--ease) 1300ms both; }
@media (prefers-reduced-motion: reduce) { .hero.is-quiet { animation: hero-fade 200ms linear both; } }

/* ---------- cutaway (§7) ---------- */
.cut { --card: min(100%, 318px); background: var(--void); padding-block: 160px 128px; }   /* the card and Fig. 1's table share one width and one left edge */
.cut-h { margin: 0; font: 300 48px/52px var(--f-type); font-stretch: 150%; letter-spacing: -.01em; text-wrap: balance; }
.cut-note { margin: 16px 0 0; max-width: 44ch; font: 400 17px/26px var(--f-type); color: var(--ink-2); }

.cut-body { --idx: 232px; margin-top: 64px; display: grid; grid-template-columns: repeat(12, minmax(0, 1fr)); column-gap: var(--col-gap); }
/* pan-y: a vertical swipe on the ship still scrolls the page; a sideways drag turns it (cutaway.js) */
.cut-stage { grid-area: 1 / 1 / 2 / -1; height: clamp(560px, 72svh, 720px); touch-action: pan-y pinch-zoom; outline-offset: 4px; background: var(--void); }
.cut-stage canvas { position: absolute; inset: 0; width: 100%; height: 100%; }
/* Poster while the model loads, and the still for each part without WebGL. Lighten drops the render's black. */
.cut-poster { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: contain; mix-blend-mode: lighten; pointer-events: none;
  transition: opacity 200ms linear; }
.cut-stage.is-live .cut-poster { opacity: 0; }
.cut-stage canvas { cursor: grab; }
@media (min-width: 1024px) {
  .cut-poster { --pr: calc(min(318px, (100% - 11 * var(--col-gap)) / 3 + 3 * var(--col-gap)) + 24px);   /* the band between index and card */
    left: calc(var(--idx) + 24px); width: calc(100% - var(--idx) - 24px - var(--pr)); }
  /* The hull falls off along an ellipse inside the band between index and card: a curved edge reads as light, a straight one as a cut. */
  .cut-stage { transition: --fade 600ms var(--ease), --ry 600ms var(--ease); }
  .cut-stage.is-part { --fade: 110px; --ry: 86%; }   /* whole ship: the tall ellipse leaves bow and stern uncut */
  .cut-stage canvas {
    --mask: radial-gradient(ellipse var(--rx, 50%) var(--ry) at var(--cx, 50%) 50%,
      #000 calc(100% - var(--fade)), rgb(0 0 0 / .9) calc(100% - var(--fade) * .8), rgb(0 0 0 / .65) calc(100% - var(--fade) * .6),
      rgb(0 0 0 / .35) calc(100% - var(--fade) * .4), rgb(0 0 0 / .1) calc(100% - var(--fade) * .2), transparent 100%);
    -webkit-mask-image: var(--mask); mask-image: var(--mask); }
  .cut-card .cut-card-h { font-size: clamp(22px, 2.2vw, 24px); }
  .cut-hint span { display: block; }   /* two lines, inside the index column: one line ran onto the lit hull */
}
@media (min-width: 1024px) and (max-width: 1279px) { .cut-body { --idx: 168px; } }   /* the card takes the width the index does not need */
.cut-stage canvas:active { cursor: grabbing; }
/* The hint and the tour share a foot: on the stage's bottom edge from 1024, under the parts row below it.
   Hint text centre = tour text centre: 24 + 10 = 12 + 44 / 2. */
.cut-foot { display: contents; }
.cut-hint { grid-area: 1 / 1 / 2 / -1; align-self: end; justify-self: start; z-index: 2; margin: 0 0 24px 24px; font: 400 14px/20px var(--f-type); color: var(--ink-3); pointer-events: none; }
.cut-tour { grid-area: 1 / 1 / 2 / -1; align-self: end; justify-self: end; z-index: 2; margin: 0 20px 12px 0; min-height: var(--tap); padding: 0 4px; background: none; border: 0;
  font: 500 15px/20px var(--f-type); color: var(--ink); cursor: pointer; text-decoration: underline; text-decoration-color: var(--edge); text-underline-offset: 4px;
  transition: color var(--t-fb) var(--ease), text-decoration-color var(--t-fb) var(--ease); }
.cut-tour:hover { color: #FFFFFF; text-decoration-color: var(--ink); }

.cut-index { grid-area: 1 / 1 / 2 / 3; align-self: start; margin-top: 18px; z-index: 2; display: flex; flex-direction: column; width: var(--idx); }   /* 18: first label on the card's plate line */
.cut-index button { position: relative; height: var(--h-ctl); padding: 0 0 0 24px; background: none; border: 0; text-align: left; scroll-margin-block: 72px;
  font: 500 15px/20px var(--f-type); color: var(--ink-2); cursor: pointer; transition: color var(--t-fb) var(--ease); }
.cut-index button::before { content: ""; position: absolute; left: 0; top: 18px; width: 1px; height: 12px; background: var(--line);
  transition: background-color var(--t-fb) var(--ease), width var(--t-fb) var(--ease); }
.cut-index button:hover, .cut-index [aria-pressed="true"] { color: var(--ink); }
.cut-index [aria-pressed="true"]::before { width: 2px; background: var(--lead); }

.cut-card { grid-area: 1 / 9 / 2 / -1; justify-self: end; width: var(--card); align-self: start; z-index: 2; margin-top: 32px; transition: opacity var(--t) var(--ease); }
.cut-card.is-swapping { opacity: 0; }
.cut-card .plate { margin: 0; }
.cut-card-h { margin: 8px 0 0; font: 300 24px/28px var(--f-type); font-stretch: 150%; text-wrap: balance; }   /* "Where you sleep" holds one line in the 318 px card */
.cut-card-p { margin: 16px 0 0; max-width: 34ch; font: 400 17px/26px var(--f-type); color: var(--ink-2); text-wrap: pretty; }
.parts { width: 100%; margin-top: 24px; border-collapse: collapse; font: 500 15px/20px var(--f-type); }
.parts th, .parts td { padding: 12px 0; border-bottom: 1px solid var(--line); }
.parts tr:first-child :is(th, td) { border-top: 1px solid var(--line); }
.parts th { font-weight: 500; text-align: left; color: var(--ink-2); }
.parts td { text-align: right; color: var(--ink); white-space: nowrap; }

/* leader-line labels, drawn by cutaway.js */
.cut-labels { position: absolute; inset: 0; pointer-events: none; z-index: 1; }
.cut-labels svg { position: absolute; inset: 0; width: 100%; height: 100%; overflow: visible; }
.cut-labels path { fill: none; stroke: var(--ink-3); stroke-width: 1; }
.cut-labels span { position: absolute; font: 400 15px/20px var(--f-plate); letter-spacing: .06em; text-transform: uppercase; color: var(--ink); white-space: nowrap; }
.cut-labels > * { opacity: 0; transition: opacity var(--t) var(--ease); }
.cut-labels.is-on > * { opacity: 1; }

/* Fig. 1 general arrangement */
.ga { margin-top: 96px; display: grid; grid-template-columns: repeat(12, minmax(0, 1fr)); column-gap: var(--col-gap); align-items: end; }
.ga-fig { grid-column: 1 / 9; margin: 0; }
.ga-canvas { position: relative; }
.ga-svg { width: 100%; height: auto; color: var(--ink-2); overflow: visible; }
.ga-svg :is(path, rect, circle) { vector-effect: non-scaling-stroke; stroke-width: 1; }
.ga-svg .ga-hull { stroke: var(--ink); stroke-width: 1.5; }
.ga-svg .ga-lead { fill: var(--lead-paint); fill-opacity: .55; stroke: none; }
.ga-svg .ga-dims * { stroke: var(--ink-3); }
/* The tanks stand in front of the saddle lines; filled, so the bay reads as five objects. Brighter while Fuel is on. */
.ga-svg .ga-tanks :is(circle, rect) { fill: var(--void); transition: stroke var(--t-fb) var(--ease); }
.ga-hatches:has([data-z="5"].is-on) ~ .ga-tanks :is(circle, rect, path) { stroke: var(--ink); }
.ga-hatches rect { fill: url(#ga-hatch); stroke: var(--ink); opacity: 0; transition: opacity var(--t-fb) var(--ease); }
.ga-hatches rect.is-on { opacity: 1; }
.ga-dim { position: absolute; left: calc((var(--x) + 30) / 480 * 100%); top: calc((120 - var(--y)) / 190 * 100%); transform: translate(-50%, -50%);
  padding: 0 4px; background: var(--void); color: var(--ink-2); font-size: 15px; white-space: nowrap; }
.ga-zones [data-part] { position: absolute; left: calc((var(--x0) + 30) / 480 * 100%); width: calc((var(--x1) - var(--x0)) / 480 * 100%);
  top: calc((120 - (var(--y0) + var(--y1)) / 2) / 190 * 100%); height: max(44px, calc((var(--y1) - var(--y0)) / 190 * 100%));
  transform: translateY(-50%); cursor: pointer; }
.ga-zones .plate { position: absolute; left: 0; bottom: 100%; margin-bottom: 8px; color: var(--ink); white-space: nowrap; opacity: 0; transition: opacity var(--t-fb) var(--ease); }
.ga-zones [data-part]:is(:hover, .is-on) .plate { opacity: 1; }
.ga-zones [data-part="1"] .plate { bottom: auto; top: 0; left: 100%; margin: 0 0 0 8px; } /* the ring reaches the figure's top edge */
.ga-station { margin-left: calc(30 / 480 * 100%); width: calc(412 / 480 * 100%); margin-top: 12px; }
.ga-cap { margin: 16px 0 0; }
.ga-table { grid-column: 9 / -1; justify-self: end; width: var(--card); margin-top: 0; }

@media (max-width: 1023px) {
  .cut { padding-block: 96px; }
  .cut-h { font-size: 40px; line-height: 44px; }
  .cut-body { display: flex; flex-direction: column; margin-top: 48px; }
  /* DOM order = visual order: stage, parts, then hint and tour on one line, card */
  .cut-foot { display: flex; flex-wrap: wrap; justify-content: space-between; align-items: center; column-gap: 16px; }
  .cut-hint { align-self: center; margin: 0; }
  .cut-tour { align-self: center; margin: 0 -4px; }   /* label on the column edge whether it shares the hint's line or wraps under it */
  .cut-stage { height: clamp(440px, 50svh, 560px); }
  /* 6 px of padding inside the sideways row so a focus ring is never clipped; margins keep the labels where they were */
  .cut-index { align-self: stretch; flex-direction: row; gap: 8px; width: auto; margin: 10px -22px -6px; padding: 6px; overflow-x: auto; scrollbar-width: none; }
  .cut-index button { flex: none; padding: 0 16px; scroll-margin-inline: 22px; }
  .cut-index button::before { top: auto; bottom: 6px; left: 16px; right: 16px; width: auto; height: 0; }
  .cut-index [aria-pressed="true"]::before { width: auto; height: 2px; }
  .cut-card { align-self: stretch; width: auto; margin-top: 32px; display: grid; grid-template-columns: repeat(6, minmax(0, 1fr)); column-gap: var(--col-gap); }
  .cut-card > :not(.parts) { grid-column: 1 / 4; }
  .cut-card .parts { grid-column: 4 / -1; grid-row: 1 / 5; margin-top: 0; align-self: start; }
  .ga { display: block; margin-top: 64px; }
  .ga-table { width: 100%; margin-top: 48px; }
}
@media (min-width: 768px) and (max-width: 1023px) {   /* all nine parts fit on one line */
  .cut-index { justify-content: space-between; gap: 0; margin-inline: -12px; }
  .cut-index button { min-width: var(--tap); padding: 0 6px; text-align: center; }
  .cut-index button::before { left: 6px; right: 6px; }
}
@media (max-width: 767px) {
  .cut { padding-block: 72px; }
  .cut-h { font-size: min(30px, (100vw - 48px) / 11.85); line-height: 34px; }   /* one line down to 320 */
  .cut-body { margin-top: 40px; }
  .cut-stage { height: clamp(360px, 52svh, 440px); }
  .cut-card { display: block; margin-top: 32px; }
  .cut-card .parts { margin-top: 24px; }
  .ga { margin-top: 48px; }
  .ga-scroll { padding-top: 32px; }   /* room for a zone's plate above the ring */
  /* At this size a centred dimension covers what it measures: 137 M stands right of its line, 144 M right of the ring, and the bridge's plate ends on its zone. */
  .ga-dim-h { left: calc((-16 + 30) / 480 * 100%); transform: translateY(-50%); }
  .ga-dim-ring { left: calc((140 + 30) / 480 * 100%); transform: translateY(-50%); }
  .ga-zones [data-part="2"] .plate { left: auto; right: 0; }
}

/* Yard and Journal are set dressing: <a> with no href shows as a link, takes no focus, no hover and goes nowhere. */
a:not([href]) { pointer-events: none; }
