:root { color-scheme: dark; font-family: Inter,-apple-system,BlinkMacSystemFont,"Segoe UI",sans-serif; color: #f8faf9; background: #08181d; }
* { box-sizing: border-box }
body, h1, p, dl, dd, figure { margin: 0 }
button, a, input { -webkit-tap-highlight-color: transparent }
button, input { font: inherit; color: inherit }
button { cursor: pointer; border: 0; background: none }
a { color: inherit; text-decoration: none }
:focus-visible { outline: 2px solid #a8eaf0; outline-offset: 3px }
#dive { height: 200vh; height: calc(100svh + 100lvh); }
#dive.landed, #dive.in-case-study { height: auto; }
.stage { position: sticky; top: 0; height: 100vh; height: 100svh; overflow: clip; isolation: isolate; --view-duration: 280ms; --view-ease: cubic-bezier(.25,.72,.22,1); --view-motion: var(--view-duration) var(--view-ease); }
.reef, .water-shade { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; z-index: -3; }
.reef { transform-origin: 50% 82%; }
.water-shade { z-index: -2; background: linear-gradient(180deg,#03191e88,transparent 19%,#03111635 43%,#00101518 72%,#020e15af); }
.intro { position: absolute; top: 43%; left: 50%; width: min(23ch,82vw); transform: translate(-50%,-50%); text-align: center; text-wrap: balance; font-weight: 550; letter-spacing: -.055em; line-height: 1.08; font-size: clamp(27px,3.1vw,66px); text-shadow: 0 2px 28px #00161bd4,0 1px 5px #00161b75; pointer-events: none; }
.instrument {
  position: absolute; left: 50%; top: 80%; width: 32vw;
  /* The 3456 × 1117 glass sits inside a 14-unit bezel on every edge. */
  transform: translate(-50%,-50%); aspect-ratio: 3484 / 1145;
  container-type: inline-size;
  border-radius: 1.05% / 3.2%;
  background: linear-gradient(165deg,#34373a,#1e2023 42%,#111315);
  box-shadow: inset 0 1px 1px #ffffff40, inset 0 -1px 1px #0009, 0 1px 2px #0009, 0 6px 26px #0008;
}
.stand { position: absolute; top: 100%; width: 30%; height: 120vh; left: 35%; background: linear-gradient(90deg,#212122,#060606 14%,#29292b 55%,#070707 84%,#262629); box-shadow: inset 0 15px 24px #0009; }
.glass { position: absolute; inset: calc(100cqw * 14 / 3484); overflow: clip; border-radius: .65cqw; background: #101014; container-type: inline-size; --cockpit-split: 48.14815cqw; }
.mode-page { position: absolute; inset: 0; overflow: clip; visibility: hidden; }
.mode-page.is-current, .mode-page.is-leaving { visibility: visible; }
.mode-page.is-current { z-index: 1; }
.navigation-view { background: #212229; }
.navigation-track { position: absolute; inset: 0; transition: transform var(--view-motion); }
.navigation-view[data-map-view="map"] .navigation-track { transform: translateX(calc(-1 * var(--cockpit-split))); }
.original, .panel, .home-design, .cockpit-map-hud { position: absolute; inset: 0; overflow: clip; }
.original { width: var(--cockpit-split); background: #212229; pointer-events: none; }
/* The Figma depth scale straddles the camera/map seam. */
.cockpit-map-hud { z-index: 1; pointer-events: none; opacity: 0; transition: opacity .14s ease-out; }
.navigation-view[data-map-view="home"] .cockpit-map-hud { opacity: 1; transition-delay: .06s; }
.home-design { width: 3456px; height: 1117px; transform: scale(var(--home-scale,1)); transform-origin: top left; font-family: Inter,Arial,sans-serif; }
/* Place working controls at the lower-right mask corners in the scaled Figma art. */
.home-capture { position: absolute; inset: 0; pointer-events: none; }
.home-capture [data-capture-feed] { position: absolute; left: 32.60cqw; top: 15.57cqw; transform: translate(-100%,-100%); pointer-events: auto; }
.home-capture [data-capture-feed="Port"] { left: 17.16cqw; }
.home-capture [data-capture-feed="Keel"] { top: 30.90cqw; }
.home-capture-status { position: absolute; top: 2%; right: 2%; z-index: 2; max-width: 42%; padding: .35em .65em; border-radius: .35em; background: #101318ec; font: max(8px,1cqw)/1.2 ui-monospace,monospace; pointer-events: none; }
.home-capture-status:empty { display: none; }
@container (max-width: 400px) {
  .home-capture .capture-controls button { width: min(6cqw,18px); }
  /* At this size the compact dock is 118px wide. Keep a 3px gap to its left. */
  .home-capture [data-capture-feed="Keel"] { left: min(32.60cqw,calc(50cqw - 62px)); }
}
.home-design p { margin: 0 }
.panel { background: #0b0c0e; }
.panel[inert] { pointer-events: none }
.chart { isolation: isolate; background: transparent; left: var(--cockpit-split); width: 100%; }
.chart > *, .chart::after { transition: opacity .22s ease-out; }
.navigation-view[data-map-view="home"] .chart > *, .navigation-view[data-map-view="home"] .chart::after { opacity: 0; }
/* Framing moves the entire Figma terrain plane. Both markers stay in its coordinates. */
.map-scene { position: absolute; inset: 0 auto 0 var(--cockpit-split); width: 100%; overflow: hidden; background: #212229; }
.terrain-framing { position: absolute; left: 0; top: 0; width: 100%; aspect-ratio: 2792 / 1596; transform-origin: top left; transform: translate(0,-13cqw) scale(1.14); transition: transform var(--view-motion); }
.navigation-view[data-map-view="home"] .terrain-framing { transform: translate(0,-5.35301cqw) scale(.8078704); }
.seafloor { position: absolute; inset: 0; width: 100%; height: 100%; overflow: visible; --ship-x: 42.31734%; --ship-y: 49.53008%; --symbol-zoom: var(--map-zoom,1); transform-origin: var(--ship-x) var(--ship-y); transform: scale(var(--map-zoom,1)); }
.seafloor.is-recentering, .seafloor.is-recentering .map-symbol { transition: transform var(--view-motion); }
.map-symbol { transform: scale(calc(1 / var(--symbol-zoom))); transform-origin: 0 0; }
.waypoint text { font: 500 28px ui-monospace,monospace; fill: #fff; paint-order: stroke; stroke: #161616; stroke-width: 3px; opacity: 0; transition: opacity .4s; }
.navigation-view[data-map-view="map"] .waypoint text { opacity: 1; }
.chart::after { content: ''; position: absolute; inset: 0; pointer-events: none; background: linear-gradient(90deg,#090a0ce8,transparent 48%),linear-gradient(0deg,#09090b80,transparent 24%); }
dt, .zoom span, .arm-slider { font: 500 clamp(10px,1cqw,14px)/1.2 ui-monospace,SFMono-Regular,monospace; }
.coordinates { position: absolute; top: 30%; left: 3.4%; z-index: 1; display: grid; gap: 1.35cqw; }
dt { color: #b9c0bf; }
.coordinates dd { margin-top: .15em; font-size: clamp(14px,1.8cqw,30px); font-variant-numeric: tabular-nums; letter-spacing: -.04em }
.zoom { position: absolute; bottom: 8%; right: 3%; z-index: 2; display: grid; justify-items: center; gap: 6px; padding: 8px; background: #101113ba; border-radius: 18px; }
.zoom input { writing-mode: vertical-lr; direction: rtl; width: 24px; height: clamp(70px,9cqw,112px); margin: 0; accent-color: white; cursor: ns-resize; }
.zoom output { font: 12px ui-monospace,monospace; }
.glass { --dock-bottom: 3.5%; --dock-pad: 4px; --dock-key-height: clamp(32px,3.3cqw,46px); }
.feeds, .systems-console { --dock-clearance: calc(var(--dock-bottom) + var(--dock-key-height) + 2 * var(--dock-pad) + 2px + max(3px,.45cqw)); }
.feeds { position: absolute; inset: 2% 1% max(17%,var(--dock-clearance)); display: grid; grid-template-areas: "floating surface port starboard" "floating cabin keel keel"; grid-template-rows: repeat(2,minmax(0,1fr)); grid-template-columns: minmax(0,1.35fr) repeat(3,minmax(0,1fr)); gap: clamp(2px,.45cqw,7px); }
.surface-feed { grid-area: surface; }
.cabin-feed { grid-area: cabin; }
.port-feed { grid-area: port; }
.starboard-feed { grid-area: starboard; }
.keel-feed { grid-area: keel; }
.floating-feed { grid-area: floating; }
.diagnostic {
  --light-x: 24.5%;
  background: radial-gradient(ellipse 45% 118% at var(--light-x) -18%, #525557 0%, #343739 34%, #191b1d 66%, #08090a 100%);
}
.model-window { position: absolute; inset: 20% 52% 14% 1%; touch-action: none; cursor: grab; }
.model-window:active,.stick:active { cursor: grabbing }
.model-window canvas,.arm-preview canvas { width: 100%; height: 100%; display: block; }
.drag-hint { position: absolute; bottom: 1%; left: 50%; transform: translateX(-50%); color: #b8bdbd; font-size: 11px; white-space: nowrap; }
.systems-console { position: absolute; inset: 6% 3.4% max(18%,var(--dock-clearance)) 51%; display: grid; grid-template-rows: auto minmax(0,1fr); gap: 1.1cqw; }
.system-tabs { display: flex; border-bottom: 1px solid #35383a; }
.system-tabs button { flex: 1; padding: .65em .2em; font-size: clamp(10px,1.1cqw,17px); color: #a5aaab; border-bottom: 2px solid transparent; }
.system-tabs button[aria-selected="true"] { color: white; border-color: currentColor; }
.system-page { display: grid; grid-template-rows: 1fr auto; min-height: 0; }
.system-page[hidden] { display: none; }
.metrics { display: grid; grid-template-columns: repeat(2,minmax(0,1fr)); align-items: center; column-gap: 2cqw; }
.metrics dd { display: flex; align-items: baseline; font-size: 3.6cqw; font-weight: 450; line-height: 1.1; letter-spacing: -.06em; font-variant-numeric: tabular-nums; }
.metrics em { font-size: .36em; font-style: normal; letter-spacing: normal; margin-left: .25em; color: #c4c9cb; }
.system-actions { display: flex; align-items: center; justify-content: space-between; gap: .4em; padding-top: .65cqw; border-top: 1px solid #36383a; min-height: 3.1cqw; font-size: clamp(10px,1.05cqw,16px); }
.system-state { display: flex; align-items: center; gap: .6em; color: #c9cfce; }
.system-state::before { content: ''; flex: none; width: .45em; height: .45em; border-radius: 50%; background: #c9cfce; }
.system-actions button, .setpoint button { border: 1px solid #55595b; background: #202224; border-radius: .45em; }
.system-actions button { padding: .45em .8em; white-space: nowrap; font-weight: 550; }
.system-actions button[aria-pressed="true"] { background: #e7ebe9; color: #161819; }
.metrics .setpoint { align-items: center; gap: .21em; }
.setpoint button { display: grid; place-items: center; width: 2.1em; height: 2.1em; font-size: .4em; padding: 0; }
.systems-console button:disabled { opacity: .5; }
.system-tabs button:focus-visible { outline-offset: -2px; }
.manipulator { background: #0b0c0e; --bow-button: clamp(18px,2.65cqw,36px); }
.bow-capture { position: absolute; right: 2%; bottom: 2%; }
.bow-capture.capture-controls button { width: var(--bow-button); }
.bow-capture-status { position: absolute; top: 2%; right: 2%; padding: .25em .5em; background: #111b20e6; border-radius: 4px; font: clamp(8px,1cqw,14px)/1.3 ui-monospace,monospace; }
.bow-capture-status:empty { display: none; }
.arm-water { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; object-position: center 68%; }
.arm-layout { position: absolute; inset: 1.5% 2% 0; display: grid; grid-template-columns: 21% 58% 21%; align-items: center; justify-items: center; }
.stick-control { position: relative; z-index: 1; width: 100%; display: grid; justify-items: center; align-self: end; margin-bottom: calc(var(--bow-button) + 1.15cqw); gap: .18cqw; }
.stick-readouts { display: grid; justify-items: center; gap: .16cqw; width: 90%; padding: .35cqw .65cqw .2cqw; border-radius: .65cqw; color: #f8faf9; background: #191b1d; }
.stick-control strong { font-size: clamp(11px,1.36cqw,21px); font-weight: 550; }
.stick-readouts > span { color: #bbc0c2; font: clamp(8px,.88cqw,14px) ui-monospace,monospace; }
.stick { width: 10.3cqw; aspect-ratio: 1; border-radius: 50%; position: relative; background: radial-gradient(circle,#111 42%,#1b1b1c 55%,#29292a 68%,#171718 71%); border: 1px solid #5556; box-shadow: 4px 7px 22px #000a,inset 1px 1px 2px #ffffff19; touch-action: none; cursor: grab; }
.ticks { position: absolute; inset: 5%; border-radius: 50%; background: repeating-conic-gradient(#c5c5c2 0deg .7deg,transparent .7deg 15deg); mask-image: radial-gradient(circle, transparent 61%,black 62%); }
.knob { position: absolute; left: 27%; top: 27%; width: 46%; height: 46%; border-radius: 50%; background: radial-gradient(circle at 45% 34%,#4e5964,#22292f 63%,#141619 85%); box-shadow: 0 4px 11px #000, inset 1px 2px 3px #a3a6a95c; display: grid; place-items: center; }
.knob::before { content: ''; width: 10%; height: 10%; background: #fff; border-radius: 50%; box-shadow: 0 0 8px #fff9; }
.arm-preview { position: absolute; inset: 0; pointer-events: none; }
.stick-control:last-child { grid-column: 3; }
.arm-slider { display: grid; grid-template-columns: 1fr auto; align-items: center; column-gap: .4em; width: 78%; margin-top: .65cqw; font-size: clamp(8px,1cqw,15px); }
.arm-slider input { grid-column: 1 / -1; width: 100%; height: max(14px,1.6cqw); margin: 0; accent-color: #e1e4e4; cursor: pointer; }
.dock { position: absolute; z-index: 3; bottom: var(--dock-bottom); left: 50%; transform: translateX(-50%); display: flex; padding: var(--dock-pad); gap: 4px; background: #171819ed; border: 1px solid #494a4d; border-radius: 14px; }
.dock button { width: clamp(35px,4cqw,55px); height: var(--dock-key-height); border-radius: 8px; display: grid; place-items: center; color: #c8cdce; }
.dock svg { width: 48%; height: 55%; stroke: currentColor; fill: none; stroke-width: 1.6; stroke-linecap: round; stroke-linejoin: round; }
.dock button[aria-current="step"] { background: #f1f2ef; color: #171819; }
.touch { position: absolute; left: 0; top: 0; width: 25px; height: 25px; border: 1px solid white; background: #fff4; border-radius: 50%; box-shadow: 0 0 0 7px #fff2; transform: translate(-50%,-50%); opacity: 0; pointer-events: none; z-index: 4; }
#approach { position: absolute; right: max(clamp(18px,3vw,55px),env(safe-area-inset-right)); bottom: max(14px,env(safe-area-inset-bottom)); padding: 10px 0; font-size: 13px; font-weight: 550; text-shadow: 0 1px 9px #00151a; }
#approach span { margin-left: .4em }
@media(max-width:680px) and (orientation:portrait) {
  .intro { width: 87%; font-size: clamp(25px,7.8vw,44px); }
}
@media(max-height:550px) and (orientation:landscape) {
  #approach { bottom: 2px; }
  .intro { font-size: min(4.6vh,30px); width: 32ch }

}
@media(prefers-reduced-motion:reduce) { .panel,.navigation-track,.cockpit-map-hud,.chart > *,.chart::after,.map-scene,.terrain-framing,.seafloor,.map-symbol,.waypoint text { transition: none } }
.navigation-view.is-setting-map :is(.navigation-track,.cockpit-map-hud,.chart,.chart > *,.terrain-framing,.waypoint text), .navigation-view.is-setting-map .chart::after,
.stage.paused :is(.panel,.navigation-track,.cockpit-map-hud,.chart > *,.map-scene,.terrain-framing,.seafloor,.map-symbol,.waypoint text), .stage.paused .chart::after { transition: none }
@container (max-width: 750px) {
  .coordinates { top: 23%; gap: 1cqw; }
  .coordinates div { display: flex; gap: 1.2cqw; align-items: baseline; }
  .coordinates dt,.zoom span,.zoom output,.metrics dt,.drag-hint,.arm-slider,.stick-readouts > span { font-size: clamp(7px,1.65cqw,11px); }
  .coordinates dd { font-size: clamp(9px,2.4cqw,15px); }
  .zoom { bottom: 5%; right: 2%; gap: 1px; padding: 3px; }
  .zoom input { width: 24px; height: 14cqw; }
  .dock, .feeds, .systems-console { --dock-bottom: 2%; --dock-pad: 1px; --dock-key-height: clamp(17px,4.2cqw,27px); }
  .dock { gap: 1px; border-radius: 7px; }
  .dock button { width: clamp(22px,5.5cqw,35px); border-radius: 5px; padding: 0; }
  .feeds { bottom: max(23%,var(--dock-clearance)); }
  .model-window { inset: 15% 53% 17% 0; }
  .systems-console { inset: 4% 2% max(19%,var(--dock-clearance)) 49%; gap: .5cqw; }
  .system-tabs button, .system-actions { font-size: clamp(8px,1.5cqw,11px); }
  .system-tabs button { padding: .4em .1em; }
  .system-actions { padding-top: .4cqw; }
  .metrics dd { font-size: 3.6cqw; }
  .arm-layout { inset: 1% 1% 0; grid-template-columns: 23% 54% 23%; }
  .stick-control { gap: 0; }
  .stick-control strong { font-size: 2.1cqw; }
  .stick-readouts > span { font-size: max(6px,1.35cqw); }
  .stick { width: 11.5cqw; }
  .arm-slider { width: 96%; font-size: max(7px,1.6cqw); margin-top: .5cqw; }
  .arm-slider input { height: max(13px,2.3cqw); }
  .touch { width: 12px; height: 12px; box-shadow: 0 0 0 3px #fff2; }
}

@container (max-width: 520px) {
  .diagnostic { --light-x: 20%; }
  .systems-console { inset: 0; display: block; pointer-events: none; }
  .systems-console button { pointer-events: auto; }
  .system-tabs { position: absolute; inset: 1% 2% auto 41%; }
  .system-page:not([hidden]) { display: contents; }
  .metrics { position: absolute; inset: max(22%,19px) 2% 23% 41%; }
  .system-actions { position: absolute; inset: auto 2% 2%; height: 21%; padding: 0; border: 0; }
  .system-state { max-width: 29%; }
  .model-window { right: 60%; bottom: 23%; }
  .diagnostic .drag-hint { bottom: 0; }
  .metrics dt { font-size: max(7px,1.8cqw); }
  .system-actions { min-height: 3.4cqw; }
  .setpoint button { min-width: 17px; min-height: 17px; font-size: max(7px,1.4cqw); }
  .system-actions button { padding: .25em .5em; }
}

@container (max-width: 400px) {
  .arm-layout { grid-template-columns: 27% 46% 27%; }
  .stick-readouts { width: 100%; }
  .arm-slider { width: 94%; }
  .stick { width: 10.5cqw; }
}
