/* The panorama and the original, uncropped HUD evidence are separate surfaces. */
.flight-manual {
  --brass: #ffc46d;
  --glass: #101613;
  --paper: #f8f5e9;
  --line-on-glass: rgba(243,231,201,.33);
}
.viewport-hero, .mining-pass {
  position: relative;
  isolation: isolate;
  overflow: hidden;
  background: var(--glass);
  color: var(--paper);
}
.viewport-hero figure, .mining-pass figure { position: relative; isolation: isolate; }
.panorama, .hangar-veil, .mine-veil, .fore-rock, .hatch {
  position: absolute;
  pointer-events: none;
  z-index: -1;
}
.panorama { inset: -20px 0; transform: translateY(var(--drift, 0px)); }
.panorama img, .fore-rock img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}
.hangar-pan { left: 17%; mask-image: linear-gradient(90deg, transparent 0, #000 19%); }
.hangar-pan img { object-position: 45% 53%; }
.hangar-veil {
  inset: 0;
  background: linear-gradient(90deg, #101613 5%, rgba(16,22,19,.97) 15%, rgba(16,22,19,.8) 28%, transparent 54%),
              linear-gradient(0deg, rgba(7,12,10,.92), transparent 28%, transparent 84%, rgba(7,12,10,.23));
}
.hatch {
  width: 52%;
  top: 0;
  bottom: 0;
  background-color: #28302b;
  background-image: repeating-linear-gradient(0deg, #080c0966 0 2px, transparent 2px 36px),
                    linear-gradient(150deg, #454e43d9, #141c18 82%);
  border-inline: 6px solid #9b9278;
  box-shadow: 0 0 25px #070b08;
  visibility: hidden;
}
.hatch::after {
  content: "";
  position: absolute;
  inset: 23% 8% 22%;
  border: 2px solid #636658;
  outline: 7px solid #101813;
  clip-path: polygon(5% 0,100% 0,100% 89%,94% 100%,0 100%,0 10%);
  background: repeating-linear-gradient(132deg, transparent 0 10px, #abb79018 10px 11px);
}
.hatch-port { left: 0; clip-path: polygon(0 0,100% 0,97% 42%,100% 67%,96% 100%,0 100%); }
.hatch-starboard { right: 0; clip-path: polygon(4% 0,100% 0,100% 100%,0 100%,3% 64%,0 43%); }
.bridge {
  min-height: clamp(530px, 68vh, 680px);
  display: flex;
  align-items: center;
  padding-block: 38px 67px;
}
.bridge-copy { max-width: min(39vw, 540px); }
.flight-id, .log-index, .scene-id, .full-frame, .rail-key, .flight-rail small, .hud-tag {
  font: 500 11px/1.35 var(--mono);
  letter-spacing: .1em;
  text-transform: uppercase;
}
.flight-id { display: inline-flex; align-items: center; gap: 10px; min-height: 29px; color: var(--brass); }
.flight-id i { width: 27px; height: 8px; background: repeating-linear-gradient(119deg, transparent 0 3px, #ffc46d 3px 6px); }
.flight-id:hover, .oxygen-link:hover, .index-action:hover, .full-frame:hover { text-decoration: underline; text-underline-offset: 4px; }
.bridge h1 {
  font: 700 clamp(76px, 7.35vw, 118px)/.83 var(--heading);
  letter-spacing: -.032em;
  text-transform: uppercase;
  margin: 12px 0 28px;
}
.bridge h1 span { display: block; margin-top: 3px; }
.log-index { display: flex; gap: 8px; align-items: center; color: var(--amber); }
.log-index i { background: currentColor; width: 24px; height: 1px; }
.viewport-hero .log-index, .mining-pass .log-index { color: var(--brass); }
.departure-order h2 { font-size: clamp(28px, 2.6vw, 42px); margin-block: 6px; }
.departure-order h2 a, .ore-copy h2 a, .console-copy h2 a { display: inline; }
.departure-order h2 svg, .ore-copy h2 svg, .console-copy h2 svg { margin-left: 5px; vertical-align: .02em; }
.departure-order h2 a:hover, .ore-copy h2 a:hover { color: var(--brass); }
.flight-manual .fig-text { margin: 0; font: 400 clamp(17px,1.25vw,19px)/1.42 var(--body); max-width: 39ch; }
.bridge .fig-text, .ore-copy .fig-text { color: #f2f1e8; }
.quick-return { display: flex; flex-wrap: wrap; gap: 10px 22px; align-items: center; margin-top: 20px; }
.quick-return a { display: inline-flex; align-items: center; gap: 8px; min-height: 44px; font-weight: 600; }
.return-link { background: var(--brass); color: #1c1b13; padding: 8px 14px; }
.return-link:hover { background: #ffda96; }
.oxygen-link { color: var(--paper); }
.pan-caption {
  position: absolute;
  left: 0;
  right: 0;
  bottom: 0;
  border-top: 1px solid var(--line-on-glass);
  min-height: 44px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  color: var(--paper);
}
.scene-id, .full-frame { display: inline-flex; align-items: center; gap: 9px; letter-spacing: .06em; font-size: 10px; }
.scene-id .photo-id { color: inherit; padding-right: 9px; border-right: 1px solid currentColor; margin: 0; }
.pan-caption .photo-id { color: var(--brass); }
.full-frame { min-height: 40px; }
.approach-track {
  pointer-events: none;
  position: absolute;
  bottom: 52px;
  right: 5%;
  width: min(32vw,490px);
  height: auto;
  overflow: visible;
  fill: var(--brass);
  stroke: var(--brass);
  stroke-width: 1.3;
  filter: drop-shadow(0 1px 2px #101613);
}
.approach-track path { fill: none; }
.approach-track text { font: 500 10px var(--mono); letter-spacing: .08em; stroke: none; fill: #fff0d0; }
.track-dashes { stroke-dasharray: 2 6; opacity: .8; }
.route-stroke { stroke-dasharray: 1; }
.flight-rail {
  position: sticky;
  top: var(--header-h);
  z-index: 6;
  border-block: 1px solid var(--edge);
  color: var(--ink);
  background: var(--header);
}
.rail-inner { display: flex; align-items: center; gap: clamp(24px, 5vw, 84px); }
.rail-key { display: inline-flex; align-items: center; gap: 8px; white-space: nowrap; color: var(--muted); }
.flight-rail ol { display: flex; align-items: center; flex-grow: 1; list-style: none; margin: 0; padding: 0; }
.flight-rail li { display: flex; align-items: center; flex: 1; }
.flight-rail li:last-child { flex: 0; }
.flight-rail li:not(:last-child)::after { content: ""; flex-grow: 1; margin: 0 1.9vw; height: 1px; background: var(--line); }
.flight-rail a { display: flex; align-items: center; gap: 7px; min-height: 60px; font: 600 21px var(--heading); white-space: nowrap; }
.flight-rail a i, .hud-tag i { width: 8px; height: 8px; border: 1px solid var(--edge); transform: rotate(45deg); }
.flight-rail small { font-size: 10px; color: var(--muted); }
.flight-rail .is-current, .flight-rail a:hover { color: var(--amber); }
.flight-rail .is-current i { background: currentColor; border-color: currentColor; box-shadow: 0 0 0 3px var(--bg), 0 0 0 4px var(--edge); }
.mining-pass .mine-pan, .fore-rock { inset: -38px 12% -38px 0; }
.mine-pan img, .fore-rock img { object-position: 43% 46%; }
.fore-rock {
  transform: translateY(var(--near-drift, 0px)) scale(1.035);
  transform-origin: 0 55%;
  clip-path: polygon(0 0,17% 0,19% 5%,14% 11%,16% 19%,13% 26%,14% 33%,11% 42%,8% 48%,10% 54%,6% 59%,7% 71%,4% 81%,6% 92%,2% 100%,0 100%);
  mask-image: linear-gradient(90deg, #000 2%, #000b 10%, transparent 19%);
  filter: brightness(.79);
}
.mine-veil {
  inset: 0;
  background: linear-gradient(270deg, #111610 7%, #111610eb 26%, #1116108c 43%, transparent 62%),
              linear-gradient(0deg,#080c0be8,transparent 21%);
}
.ore-deck { min-height: clamp(415px, 58vh, 620px); display: flex; justify-content: flex-end; align-items: center; padding-block: 48px 72px; }
.ore-copy { width: 35%; max-width: 455px; }
.ore-copy h2, .console-copy h2, .flight-library h2 { font: 700 clamp(42px,4.65vw,76px)/.98 var(--heading); letter-spacing: -.025em; margin: 9px 0 16px; }
.ore-copy .fig-text a, .console-copy .fig-text a, .press-credit a { text-decoration: underline; text-underline-offset: 3px; text-decoration-color: var(--amber); }
.ore-copy .fig-text a { text-decoration-color: var(--brass); }
.return-station { background: var(--surface); border-block: 1px solid var(--edge); }
.hud-layout, .trade-layout { display: grid; align-items: center; gap: clamp(30px, 5vw, 86px); padding-block: clamp(46px,5.4vw,84px); }
.hud-layout { grid-template-columns: minmax(0, .54fr) minmax(0, 1fr); }
.console-copy .fig-text { color: var(--sub); }
.console-copy h2 a:hover, .flight-library li a:hover { color: var(--amber); }
.hud-controls { display: grid; margin-top: 21px; border-bottom: 1px solid var(--edge); }
.hud-link { display: block; padding: 11px 0; border-top: 1px solid var(--edge); }
.hud-tag { display: flex; align-items: center; gap: 10px; color: var(--amber); font-size: 14px; }
.hud-tag i { border-color: currentColor; }
.hud-tag svg { margin-left: auto; }
.hud-note { display: block; color: var(--sub); font-size: 15px; line-height: 1.35; margin: 5px 18px 0; }
.hud-link:hover .hud-tag i, .hud-link:focus-visible .hud-tag i { background-color: currentColor; }
.hud-link:hover .hud-note, .hud-link:focus-visible .hud-note { color: var(--ink); }
.hud-plate { position: relative; background: var(--inset); outline: 1px solid var(--edge); }
.hud-plate img, .terminal-image > img { width: 100%; height: auto; aspect-ratio: 16 / 9; }
.scope-traces { position: absolute; inset: 0; width: 100%; height: 100%; pointer-events: none; }
.scope-traces g { fill: none; stroke: #ffe18a; stroke-width: 1.4; filter: drop-shadow(0 1px 1px #151618); }
.scope-traces path { stroke-dasharray: 1; stroke-dashoffset: 1; }
.scope-traces rect { stroke-dasharray: 4 4; opacity: .72; }
.hud-layout:has([data-hud="air"]:is(:hover,:focus-visible)) [data-trace="air"] path,
.hud-layout:has([data-hud="lander"]:is(:hover,:focus-visible)) [data-trace="lander"] path { stroke-dashoffset: 0; }
.hud-layout:has([data-hud="air"]:is(:hover,:focus-visible)) [data-trace="air"] rect,
.hud-layout:has([data-hud="lander"]:is(:hover,:focus-visible)) [data-trace="lander"] rect { stroke-dasharray: none; stroke-width: 2.5; opacity: 1; }
.scope-traces .trace-label { opacity: 0; }
.scope-traces .trace-label text { stroke: none; fill: #ffe18a; font: 500 10px var(--mono); letter-spacing: .025em; }
.scope-traces .trace-label rect { fill: #181b15; stroke: #ffe18a; stroke-width: 1px; stroke-dasharray: none; opacity: 1; }
.hud-layout:has([data-hud="air"]:is(:hover,:focus-visible)) [data-trace="air"] .trace-label,
.hud-layout:has([data-hud="lander"]:is(:hover,:focus-visible)) [data-trace="lander"] .trace-label { opacity: 1; }
.scope-caption { display: flex; align-items: center; justify-content: space-between; gap: 10px; color: var(--sub); }
.scope-caption .photo-id, .scope-caption .full-frame { color: var(--amber); }
.trade-layout { grid-template-columns: minmax(0,1.25fr) minmax(0,.8fr); }
.flight-library { border-top: 2px solid var(--edge); padding-block: 32px; display: grid; grid-template-columns: .6fr 1fr; gap: 6vw; }
.flight-library h2 { font-size: clamp(34px,3.8vw,54px); }
.index-action { display: inline-flex; align-items: center; gap: 10px; color: var(--amber); font-weight: 600; min-height: 40px; }
.flight-library ul { list-style: none; padding: 0; margin: 0; }
.flight-library li a { border-bottom: 1px solid var(--line); display: grid; grid-template-columns: minmax(90px,.4fr) 1fr auto; gap: 12px; padding: 13px 0; align-items: center; }
.flight-library li span, .press-credit { color: var(--sub); }
.press-credit { font-size: 13px; padding-bottom: 42px; }
@media (min-width:761px) and (hover:hover) and (pointer:fine) and (prefers-reduced-motion:no-preference) {
  .arrival .hatch { visibility: visible; animation: open-port .96s cubic-bezier(.4,0,.18,1) both; }
  .arrival .hatch-starboard { animation-name: open-starboard; }
  .arrival .route-stroke { animation: flight-arrival-complete 1.05s ease-out both; }
  .scope-traces path { transition: stroke-dashoffset .2s ease-out; }
  .in-view .ore-copy, .in-view .console-copy { animation: log-arrival .48s cubic-bezier(.22,.7,.3,1) both; }
  .flight-rail .is-current i { animation: stop-lock .36s ease-out; }
}
@keyframes open-port { to { transform: translateX(-102%); } }
@keyframes open-starboard { to { transform: translateX(102%); } }
@keyframes flight-arrival-complete { from { stroke-dashoffset: 1; } to { stroke-dashoffset: 0; } }
@keyframes log-arrival { from { transform: translateY(18px); opacity: .75; } to { transform: translateY(0); opacity: 1; } }
@keyframes stop-lock { from { transform: rotate(0deg) scale(1.45); } to { transform: rotate(45deg) scale(1); } }
@media (max-width: 960px) and (min-width:761px) {
  .bridge-copy { max-width: 44vw; }
  .bridge h1 { font-size: 81px; }
  .ore-copy { width: 38%; }
  .hud-layout { grid-template-columns: .68fr 1fr; gap: 23px; }
}
@media (max-width:760px) {
  .bridge { display: block; min-height: 0; padding-top: clamp(160px, 47vw, 258px); padding-bottom: 58px; }
  .bridge-copy { max-width: none; }
  .hangar-pan { mask-image: none; inset: 0 0 auto; height: clamp(235px,70vw,385px); }
  .hangar-pan img { object-position: 33% 44%; }
  .hangar-veil { background: linear-gradient(0deg,#101613 0 48%,transparent 76%); }
  .bridge h1 { font-size: clamp(54px,13vw,82px); margin: 2px 0 14px; }
  .bridge h1 span { display: inline; }
  .flight-id { font-size: 10px; padding-right: 4px; text-shadow: 0 1px 3px #000; }
  .departure-order h2 { font-size: 29px; margin-block: 4px; }
  .flight-manual .fig-text { font-size: 16px; }
  .quick-return { margin-top: 12px; gap: 14px; }
  .quick-return a { font-size: 15px; }
  .approach-track { display: none; }
  .pan-caption { min-height: 37px; }
  .flight-rail { position: static; }
  .rail-key { display: none; }
  .rail-inner { display: block; }
  .flight-rail a { min-height: 48px; font-size: 17px; gap: 4px; }
  .flight-rail a i { width: 4px; height: 4px; }
  .flight-rail small { font-size: 9px; }
  .flight-rail li:not(:last-child)::after { margin-inline: 6px; }
  .mining-pass .mine-pan { inset: 0 0 auto; height: clamp(210px,64vw,350px); }
  .mine-pan img { object-position: 39% 49%; }
  .fore-rock { display: none; }
  .mine-veil { background: linear-gradient(0deg,#111610 0 39%,transparent 68%); }
  .ore-deck { display: block; min-height: 0; padding-top: clamp(162px,47vw,260px); padding-bottom: 59px; }
  .ore-copy { width: 100%; max-width: none; }
  .ore-copy h2, .console-copy h2 { font-size: clamp(38px,9.75vw,54px); margin: 8px 0; }
  .hud-layout, .trade-layout { display: flex; flex-direction: column; align-items: stretch; gap: 16px; padding-block: 28px 22px; }
  .hud-controls { grid-template-columns: 1fr 1fr; gap: 13px; margin-top: 16px; border: none; }
  .hud-note { font-size: 14px; margin-left: 0; }
  .trade-layout .console-copy { order: -1; }
  .scope-caption { gap: 3px; }
  .flight-library { display: block; padding-block: 14px 22px; }
  .flight-library > div { display: flex; justify-content: space-between; align-items: center; }
  .flight-library h2 { margin-block: 8px; }
  .flight-library li a { font-size: 14px; gap: 6px; }
  .press-credit { padding-bottom: 22px; }
}
@media (prefers-reduced-motion:reduce), (hover:none) {
  .panorama, .fore-rock { transform: none; }
}
