/* Apex Edge — self-contained tactical expedition interface */
:root {
  --ink: #080b10;
  --ink-deep: #030609;
  --panel: #0c1219;
  --panel-raised: #111923;
  --ice: #f8fafc;
  --muted: #93a4b5;
  --dim: #647589;
  --line: rgba(174, 211, 229, 0.14);
  --line-strong: rgba(174, 211, 229, 0.28);
  --adrenaline: #ff5500;
  --adrenaline-dark: #c83d00;
  --aurora: #00e5ff;
  --mono: ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, "Liberation Mono", monospace;
  --sans: "Arial Narrow", "Roboto Condensed", "Helvetica Neue", Arial, "PingFang SC", "Microsoft YaHei", sans-serif;
  --body: "Helvetica Neue", Arial, "PingFang SC", "Hiragino Sans GB", "Microsoft YaHei", sans-serif;
  --max-width: 1440px;
  --ease: cubic-bezier(0.22, 1, 0.36, 1);
}

*, *::before, *::after { box-sizing: border-box; }
html { scroll-behavior: smooth; scroll-padding-top: 88px; background: var(--ink); }
body {
  margin: 0;
  min-width: 320px;
  background: var(--ink);
  color: var(--ice);
  font-family: var(--body);
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
  overflow-x: hidden;
}
body.modal-open { overflow: hidden; }
button, select, input { font: inherit; }
button, select { color: inherit; }
button { cursor: pointer; }
a { color: inherit; text-decoration: none; }
img { display: block; max-width: 100%; background: #0b1720; }
svg { display: block; }
p, h1, h2, h3, h4 { margin: 0; }
button, a, select { -webkit-tap-highlight-color: transparent; }
::selection { color: var(--ink); background: var(--aurora); }
[hidden] { display: none !important; }

:focus-visible { outline: 2px solid var(--aurora); outline-offset: 4px; }
.sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}
.skip-link {
  position: fixed;
  z-index: 2000;
  top: 12px;
  left: 12px;
  padding: 12px 18px;
  background: var(--aurora);
  color: var(--ink);
  transform: translateY(-160%);
  transition: transform 180ms;
}
.skip-link:focus { transform: translateY(0); }
.mono { font-family: var(--mono); font-variant-numeric: tabular-nums slashed-zero; }
.section-shell { width: min(100%, var(--max-width)); margin-inline: auto; padding-inline: clamp(24px, 4vw, 64px); }
.micro-label {
  display: block;
  color: var(--muted);
  font-family: var(--mono);
  font-size: 10px;
  line-height: 1.5;
  letter-spacing: 0.12em;
  text-transform: uppercase;
}
.eyebrow {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  color: #b9c8d4;
  font-family: var(--mono);
  font-size: 10px;
  font-weight: 600;
  line-height: 1.5;
  letter-spacing: 0.16em;
  text-transform: uppercase;
}
.eyebrow i { width: 22px; height: 2px; flex: 0 0 auto; background: var(--adrenaline); }

/* Header */
.site-header {
  position: fixed;
  z-index: 100;
  top: 0;
  left: 0;
  width: 100%;
  padding-top: env(safe-area-inset-top);
  border-bottom: 1px solid transparent;
  transition: background 240ms, border-color 240ms, backdrop-filter 240ms;
}
.site-header.is-scrolled { background: rgba(4, 8, 12, 0.9); border-color: var(--line); backdrop-filter: blur(18px); }
.header-shell {
  display: flex;
  align-items: center;
  justify-content: space-between;
  width: min(100%, 1600px);
  min-height: 82px;
  margin-inline: auto;
  padding-inline: clamp(22px, 3vw, 50px);
  gap: 26px;
}
.brand { display: flex; align-items: center; min-height: 48px; gap: 12px; flex-shrink: 0; }
.brand-mark { width: 38px; height: 38px; color: var(--ice); }
.brand-wordmark { font-family: var(--sans); font-size: 20px; font-weight: 800; line-height: 1; letter-spacing: 0.04em; }
.brand-wordmark b { color: var(--adrenaline); font-weight: 800; }
.brand-division { max-width: 80px; color: var(--muted); font-family: var(--mono); font-size: 7px; line-height: 1.45; letter-spacing: 0.12em; }
.desktop-nav { display: flex; align-items: center; gap: clamp(20px, 2.5vw, 44px); margin-left: auto; }
.desktop-nav a { position: relative; display: grid; place-items: center; min-height: 44px; color: #c3ced7; font-family: var(--mono); font-size: 10px; letter-spacing: 0.11em; text-transform: uppercase; }
.desktop-nav a::after { position: absolute; bottom: 5px; left: 0; width: 0; height: 1px; background: var(--aurora); content: ""; transition: width 220ms var(--ease); }
.desktop-nav a:hover::after { width: 100%; }
.header-actions { display: flex; align-items: center; gap: 22px; }
.network-status { display: flex; align-items: center; gap: 8px; color: var(--muted); font-family: var(--mono); font-size: 8px; letter-spacing: 0.08em; white-space: nowrap; }
.network-status i, .console-live i { width: 5px; height: 5px; border-radius: 50%; background: var(--aurora); box-shadow: 0 0 10px rgba(0, 229, 255, 0.55); }
.language-control { position: relative; display: flex; align-items: center; min-height: 44px; border-left: 1px solid var(--line); padding-left: 20px; }
.language-control svg { position: absolute; left: 30px; z-index: 1; width: 15px; height: 15px; fill: none; stroke: var(--aurora); stroke-width: 1.4; pointer-events: none; }
.language-control select {
  min-width: 112px;
  min-height: 44px;
  padding: 0 24px 0 34px;
  border: 0;
  border-radius: 0;
  outline-offset: 2px;
  background: transparent;
  color: var(--ice);
  font-family: var(--mono);
  font-size: 10px;
  cursor: pointer;
}
.language-control option { background: var(--panel); color: var(--ice); }
.menu-toggle { display: none; width: 44px; height: 44px; padding: 0; border: 1px solid var(--line); background: transparent; }
.menu-toggle i { display: block; width: 18px; height: 1px; margin: 5px auto; background: var(--ice); transition: transform 180ms; }
.menu-toggle[aria-expanded="true"] i:first-of-type { transform: translateY(3px) rotate(45deg); }
.menu-toggle[aria-expanded="true"] i:last-of-type { transform: translateY(-3px) rotate(-45deg); }
.mobile-nav { padding: 10px 24px calc(20px + env(safe-area-inset-bottom)); border-top: 1px solid var(--line); background: rgba(4, 8, 12, 0.98); }
.mobile-nav a { display: flex; align-items: center; min-height: 50px; border-bottom: 1px solid var(--line); font-family: var(--mono); font-size: 11px; letter-spacing: 0.1em; text-transform: uppercase; }

/* Hero */
.hero { position: relative; min-height: 100vh; min-height: 100svh; background: var(--ink-deep); overflow: hidden; }
#hero-root, .hero-media, .hero-vignette, .hero-grid-overlay { position: absolute; inset: 0; }
.hero-media { background: #07111a; }
.hero-image { width: 100%; height: 100%; object-fit: cover; object-position: 56% 50%; filter: saturate(0.78) contrast(1.08); }
.hero-vignette { background: linear-gradient(90deg, rgba(3, 6, 9, 0.97) 0%, rgba(3, 6, 9, 0.82) 38%, rgba(3, 6, 9, 0.2) 72%, rgba(3, 6, 9, 0.4) 100%), linear-gradient(0deg, #080b10 0%, rgba(8, 11, 16, 0.18) 40%, rgba(3, 6, 9, 0.46) 100%); }
.hero-grid-overlay { opacity: 0.25; background-image: linear-gradient(rgba(154, 218, 237, 0.07) 1px, transparent 1px), linear-gradient(90deg, rgba(154, 218, 237, 0.07) 1px, transparent 1px); background-size: 80px 80px; mask-image: linear-gradient(to right, black, transparent 72%); }
.hero-shell { position: relative; display: flex; flex-direction: column; min-height: 100vh; min-height: 100svh; padding-top: 118px; padding-bottom: 26px; }
.hero-topline { display: flex; align-items: center; justify-content: space-between; padding-bottom: 22px; border-bottom: 1px solid var(--line); }
.hero-session { color: var(--dim); font-size: 9px; letter-spacing: 0.12em; }
.hero-main { display: grid; grid-template-columns: minmax(0, 7fr) minmax(300px, 4fr); align-items: center; flex: 1; gap: clamp(40px, 7vw, 110px); padding-block: 44px 36px; }
.hero-copy { max-width: 820px; }
.hero h1 { font-family: var(--sans); font-size: clamp(64px, 7.7vw, 126px); font-weight: 800; line-height: 0.86; letter-spacing: -0.065em; text-transform: uppercase; }
.hero h1 span, .hero h1 strong { display: block; }
.hero h1 strong { margin-top: 0.14em; color: var(--ice); font-weight: 800; }
.hero h1 strong::after { display: inline-block; width: 0.1em; height: 0.1em; margin-left: 0.05em; background: var(--adrenaline); content: ""; }
.hero-description { max-width: 650px; margin-top: 30px; color: #b7c5d0; font-size: clamp(14px, 1.2vw, 17px); line-height: 1.75; }
.hero-actions { display: flex; flex-wrap: wrap; gap: 12px; margin-top: 32px; }
.cta-btn {
  position: relative;
  display: inline-flex;
  align-items: center;
  justify-content: space-between;
  min-height: 52px;
  padding: 0 22px;
  gap: 34px;
  border: 1px solid transparent;
  border-radius: 0;
  font-family: var(--mono);
  font-size: 10px;
  font-weight: 700;
  letter-spacing: 0.08em;
  line-height: 1.4;
  text-transform: uppercase;
  clip-path: polygon(0 0, calc(100% - 9px) 0, 100% 9px, 100% 100%, 9px 100%, 0 calc(100% - 9px));
  transition: color 200ms, background 200ms, border-color 200ms, transform 200ms var(--ease);
}
.cta-btn svg, .route-open svg { width: 18px; height: 18px; fill: none; stroke: currentColor; stroke-width: 1.4; transition: transform 200ms var(--ease); }
.cta-btn:hover svg, .route-open:hover svg { transform: translateX(4px); }
.cta-primary { background: var(--adrenaline); color: #100b08; }
.cta-primary:hover { background: #ff6b23; transform: translateY(-2px); }
.cta-secondary { border-color: var(--line-strong); background: rgba(8, 11, 16, 0.35); color: var(--ice); }
.cta-secondary:hover { border-color: var(--aurora); color: var(--aurora); }
.button-index { color: var(--dim); font-size: 9px; }
.hero-console { position: relative; align-self: center; min-height: 360px; padding: 20px; border: 1px solid rgba(160, 218, 236, 0.24); background: rgba(4, 10, 15, 0.72); backdrop-filter: blur(10px); overflow: hidden; clip-path: polygon(0 0, calc(100% - 16px) 0, 100% 16px, 100% 100%, 0 100%); }
.hero-console::before { position: absolute; inset: 0; opacity: 0.2; background: repeating-radial-gradient(ellipse at 90% 10%, transparent 0 24px, rgba(0, 229, 255, 0.18) 25px 26px); content: ""; pointer-events: none; }
.console-header { position: relative; display: flex; align-items: center; justify-content: space-between; padding-bottom: 16px; border-bottom: 1px solid var(--line); color: var(--muted); font-size: 8px; letter-spacing: 0.12em; }
.console-live { display: flex; align-items: center; gap: 7px; color: var(--aurora); }
.console-target { position: absolute; top: 82px; right: 30px; width: 116px; height: 116px; border: 1px solid rgba(0, 229, 255, 0.25); border-radius: 50%; }
.console-target::before, .console-target::after { position: absolute; top: 50%; left: 50%; background: rgba(0, 229, 255, 0.22); content: ""; transform: translate(-50%, -50%); }
.console-target::before { width: 150%; height: 1px; }
.console-target::after { width: 1px; height: 150%; }
.console-target span { position: absolute; inset: 20px; border: 1px dashed rgba(0, 229, 255, 0.28); border-radius: 50%; }
.console-target span:nth-child(2) { inset: 44px; border-style: solid; }
.console-target i { position: absolute; top: 50%; left: 50%; width: 5px; height: 5px; border-radius: 50%; background: var(--adrenaline); transform: translate(-50%, -50%); }
.console-data { position: relative; max-width: 72%; padding-top: 58px; }
.console-data strong { display: block; max-width: 230px; margin-top: 12px; font-family: var(--mono); font-size: clamp(18px, 2vw, 26px); line-height: 1.2; letter-spacing: -0.04em; }
.console-data p { margin-top: 14px; color: var(--muted); font-size: 12px; line-height: 1.7; }
.console-wave { position: absolute; right: 20px; bottom: 48px; left: 20px; width: calc(100% - 40px); }
.console-wave path { fill: none; stroke: var(--aurora); stroke-width: 1.5; vector-effect: non-scaling-stroke; }
.console-wave .wave-faint { stroke: rgba(0, 229, 255, 0.22); stroke-width: 1; }
.console-coordinates { position: absolute; right: 20px; bottom: 18px; left: 20px; display: flex; justify-content: space-between; color: var(--dim); font-size: 8px; letter-spacing: 0.06em; }
.hero-bottom { display: grid; grid-template-columns: minmax(150px, 1fr) minmax(540px, 3fr); align-items: end; gap: 30px; padding-top: 24px; border-top: 1px solid var(--line); }
.hero-scroll { display: inline-flex; align-items: center; gap: 16px; min-height: 44px; color: var(--muted); font-size: 8px; letter-spacing: 0.1em; }
.hero-scroll i { position: relative; width: 1px; height: 34px; background: var(--line-strong); }
.hero-scroll i::after { position: absolute; bottom: 0; left: -2px; width: 5px; height: 5px; border-right: 1px solid var(--aurora); border-bottom: 1px solid var(--aurora); content: ""; transform: rotate(45deg); }
.hero-metrics { display: grid; grid-template-columns: repeat(3, 1fr); }
.hero-metric { display: flex; gap: 16px; min-width: 0; padding: 0 24px; border-left: 1px solid var(--line); }
.metric-index { padding-top: 3px; color: var(--adrenaline); font-size: 8px; }
.hero-metric strong { display: block; margin-top: 4px; font-size: clamp(20px, 2.1vw, 31px); font-weight: 500; line-height: 1.2; letter-spacing: -0.06em; white-space: nowrap; }
.hero-metric small { display: block; margin-top: 6px; color: var(--dim); font-size: 9px; }
.target-disclaimer { margin-top: 15px; color: var(--dim); font-family: var(--mono); font-size: 8px; text-align: right; }
.reveal-item { animation: instrument-in 600ms var(--ease) both; }
.hero-main .reveal-item:nth-child(2) { animation-delay: 100ms; }
.hero-bottom { animation-delay: 180ms; }
@keyframes instrument-in { from { opacity: 0; transform: translateY(14px); } to { opacity: 1; transform: translateY(0); } }

/* Shared sections */
.expeditions, .telemetry, .matcher { position: relative; padding-block: clamp(90px, 10vw, 150px); }
.expeditions { background: linear-gradient(180deg, #080b10, #0a0f15 50%, #080b10); }
.expeditions::before { position: absolute; inset: 0; opacity: 0.25; background-image: linear-gradient(90deg, transparent calc(100% - 1px), rgba(149, 201, 220, 0.06) 1px); background-size: calc(100% / 12) 100%; content: ""; pointer-events: none; }
.section-heading { position: relative; display: grid; grid-template-columns: minmax(0, 7fr) minmax(280px, 4fr); align-items: end; gap: clamp(40px, 7vw, 110px); margin-bottom: 54px; }
.section-heading h2 { max-width: 900px; margin-top: 18px; font-family: var(--sans); font-size: clamp(40px, 4.7vw, 72px); font-weight: 800; line-height: 0.98; letter-spacing: -0.05em; text-transform: uppercase; }
.section-heading > p { max-width: 520px; padding-left: 22px; border-left: 1px solid var(--line-strong); color: var(--muted); font-size: 14px; line-height: 1.85; }
.expedition-heading { grid-template-columns: minmax(0, 7fr) minmax(280px, 4fr) 90px; }
.expedition-badge { width: 90px; height: 90px; border: 1px solid var(--line); object-fit: cover; }

/* Filters and expedition cards */
.filter-bar { position: relative; display: flex; border-block: 1px solid var(--line); }
.filter-btn { position: relative; display: flex; align-items: center; justify-content: space-between; flex: 1; min-height: 58px; padding: 0 18px; gap: 12px; border: 0; border-right: 1px solid var(--line); background: transparent; color: var(--muted); font-family: var(--mono); font-size: 9px; letter-spacing: 0.06em; text-align: left; text-transform: uppercase; transition: color 180ms, background 180ms; }
.filter-btn:last-child { border-right: 0; }
.filter-btn i { width: 5px; height: 5px; border: 1px solid var(--dim); border-radius: 50%; }
.filter-btn:hover { color: var(--ice); background: rgba(255, 255, 255, 0.025); }
.filter-btn.is-active { color: var(--aurora); background: rgba(0, 229, 255, 0.045); }
.filter-btn.is-active::after { position: absolute; right: 0; bottom: -1px; left: 0; height: 2px; background: var(--aurora); content: ""; }
.filter-btn.is-active i { border-color: var(--aurora); background: var(--aurora); }
.filter-status { display: flex; justify-content: space-between; padding: 15px 0 26px; color: var(--dim); font-size: 8px; letter-spacing: 0.1em; text-transform: uppercase; }
.routes-grid { position: relative; display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 24px; }
.route-card { min-width: 0; border: 1px solid var(--line); border-radius: 3px; background: var(--panel); overflow: hidden; transition: border-color 220ms, transform 260ms var(--ease); }
.route-card:hover { border-color: rgba(0, 229, 255, 0.36); transform: translateY(-4px); }
.route-image-wrap { position: relative; height: clamp(260px, 28vw, 390px); overflow: hidden; background: #0b1720; }
.route-image { width: 100%; height: 100%; object-fit: cover; filter: saturate(0.8) contrast(1.08); transition: transform 600ms var(--ease), filter 300ms; }
.route-card:hover .route-image { transform: scale(1.035); filter: saturate(0.95) contrast(1.05); }
.route-image-shade { position: absolute; inset: 0; background: linear-gradient(180deg, rgba(3, 6, 9, 0.6), transparent 42%, rgba(3, 6, 9, 0.75)); pointer-events: none; }
.route-file { position: absolute; top: 18px; right: 18px; left: 18px; display: flex; justify-content: space-between; gap: 16px; color: rgba(248, 250, 252, 0.68); font-size: 8px; letter-spacing: 0.08em; }
.route-level { display: inline-flex; align-items: center; min-height: 25px; padding: 0 9px; background: var(--adrenaline); color: #150b06; font-family: var(--mono); font-size: 8px; font-weight: 800; letter-spacing: 0.08em; text-transform: uppercase; }
.route-image-wrap > .route-level { position: absolute; bottom: 18px; left: 18px; }
.route-duration { position: absolute; right: 18px; bottom: 19px; color: var(--ice); font-size: 9px; letter-spacing: 0.08em; }
.route-body { padding: clamp(22px, 2.5vw, 34px); }
.route-heading { display: flex; align-items: center; justify-content: space-between; gap: 20px; }
.route-cross { color: var(--dim); font-family: var(--mono); font-size: 18px; font-weight: 300; }
.route-body h3 { max-width: 560px; margin-top: 12px; font-family: var(--sans); font-size: clamp(25px, 2.4vw, 36px); font-weight: 750; line-height: 1.04; letter-spacing: -0.035em; }
.route-summary { min-height: 3.6em; margin-top: 16px; color: var(--muted); font-size: 13px; line-height: 1.8; }
.route-readouts { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); margin-top: 25px; border-block: 1px solid var(--line); }
.route-readouts > div { min-width: 0; padding: 20px 0; }
.route-readouts > div + div { padding-left: 22px; border-left: 1px solid var(--line); }
.route-readouts strong { display: block; overflow-wrap: anywhere; color: var(--ice); font-size: clamp(18px, 2vw, 27px); font-weight: 500; line-height: 1.2; letter-spacing: -0.06em; }
.route-readouts span { display: block; margin-top: 7px; color: var(--dim); font-family: var(--mono); font-size: 8px; letter-spacing: 0.1em; }
.route-benefit { margin-top: 22px; }
.route-benefit p { margin-top: 8px; color: #a6b6c4; font-size: 12px; line-height: 1.75; }
.crypto-access { display: flex; align-items: center; gap: 14px; margin-top: 22px; padding: 14px; border: 1px solid rgba(0, 229, 255, 0.12); background: rgba(0, 229, 255, 0.025); }
.crypto-access svg { width: 24px; height: 24px; flex: 0 0 auto; fill: none; stroke: var(--aurora); stroke-width: 1.2; }
.crypto-access strong, .crypto-access small { display: block; color: var(--muted); font-family: var(--mono); font-size: 7px; font-weight: 500; letter-spacing: 0.08em; }
.crypto-access span { display: block; margin: 2px 0; color: var(--aurora); font-size: 11px; }
.route-open { display: flex; align-items: center; justify-content: space-between; width: 100%; min-height: 50px; margin-top: 22px; padding: 0; border: 0; border-top: 1px solid var(--line); background: transparent; color: var(--ice); font-family: var(--mono); font-size: 9px; letter-spacing: 0.07em; text-align: left; text-transform: uppercase; }
.route-open:hover { color: var(--aurora); }

/* Telemetry */
.telemetry { border-top: 1px solid var(--line); background: #060a0f; }
.telemetry::after { position: absolute; top: 0; right: 5%; width: 32%; height: 100%; opacity: 0.3; background: repeating-linear-gradient(135deg, transparent 0 12px, rgba(0, 229, 255, 0.025) 13px 14px); content: ""; pointer-events: none; }
.telemetry-heading { z-index: 1; }
.telemetry-board { position: relative; z-index: 1; display: grid; grid-template-columns: minmax(0, 8fr) minmax(300px, 4fr); border: 1px solid var(--line); background: var(--panel); }
.chart-module { min-width: 0; padding: clamp(20px, 3vw, 38px); }
.module-bar { display: flex; justify-content: space-between; gap: 20px; padding-bottom: 20px; border-bottom: 1px solid var(--line); color: var(--muted); font-size: 8px; letter-spacing: 0.08em; text-transform: uppercase; }
.module-bar span:last-child { color: var(--aurora); white-space: nowrap; }
.chart-legend { display: flex; flex-wrap: wrap; gap: 18px 28px; margin-top: 24px; color: var(--muted); font-family: var(--mono); font-size: 8px; letter-spacing: 0.04em; }
.chart-legend span { display: inline-flex; align-items: center; gap: 8px; }
.chart-legend i { width: 20px; height: 2px; }
.legend-fatigue { background: var(--adrenaline); }
.legend-hrv { background: var(--aurora); }
.legend-focus { background: repeating-linear-gradient(90deg, var(--ice) 0 4px, transparent 4px 7px); }
.telemetry-svg { width: 100%; height: auto; margin-top: 14px; overflow: visible; }
.chart-grid path { fill: none; stroke: rgba(166, 209, 227, 0.1); stroke-width: 1; }
.chart-grid text, .chart-x-labels { fill: #63768a; font-family: var(--mono); font-size: 10px; }
.chart-axis-title { fill: #63768a; font-family: var(--mono); font-size: 9px; letter-spacing: 2px; }
.chart-area { fill: url(#hrv-area); }
.chart-line { fill: none; stroke-width: 2.5; vector-effect: non-scaling-stroke; }
.fatigue-line { stroke: var(--adrenaline); }
.hrv-line { stroke: var(--aurora); }
.focus-line { stroke: var(--ice); stroke-dasharray: 7 7; stroke-width: 1.5; }
.fatigue-dot { fill: var(--adrenaline); }
.hrv-dot { fill: var(--aurora); }
.focus-dot { fill: var(--ice); }
.model-note { padding-top: 16px; border-top: 1px solid var(--line); color: var(--dim); font-size: 8px; line-height: 1.7; letter-spacing: 0.06em; }
.recovery-readout { padding: clamp(22px, 2.8vw, 38px); border-left: 1px solid var(--line); background: #0a1017; }
.readout-image { position: relative; height: 180px; margin-bottom: 30px; overflow: hidden; }
.readout-image::after { position: absolute; inset: 0; background: linear-gradient(0deg, rgba(5, 10, 15, 0.85), transparent 60%); content: ""; }
.telemetry-image { width: 100%; height: 100%; object-fit: cover; filter: saturate(0.65); }
.readout-image > span { position: absolute; z-index: 1; right: 14px; bottom: 12px; left: 14px; color: var(--aurora); font-size: 7px; letter-spacing: 0.08em; }
.recovery-readout h3 { margin-top: 18px; font-family: var(--sans); font-size: 32px; line-height: 1.02; letter-spacing: -0.04em; }
.recovery-readout > p { margin-top: 18px; color: var(--muted); font-size: 12px; line-height: 1.85; }
.readout-stats { margin: 28px 0 0; }
.readout-stats > div { display: grid; grid-template-columns: 70px 1fr; align-items: center; gap: 16px; padding: 14px 0; border-top: 1px solid var(--line); }
.readout-stats dt { color: var(--ice); font-size: 18px; }
.readout-stats dd { margin: 0; color: var(--muted); font-size: 10px; }

/* Matcher */
.matcher { border-top: 1px solid var(--line); background: radial-gradient(circle at 85% 15%, rgba(0, 229, 255, 0.055), transparent 35%), var(--ink); }
.matcher-console { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr) minmax(250px, 0.8fr); border: 1px solid var(--line-strong); background: #0a1017; }
.matcher-inputs { padding: clamp(22px, 2.5vw, 36px); }
.matcher-inputs fieldset { min-width: 0; margin: 0; padding: 0; border: 0; }
.matcher-inputs fieldset + fieldset { margin-top: 30px; }
.matcher-inputs legend { width: 100%; margin-bottom: 13px; color: var(--muted); font-family: var(--mono); font-size: 9px; letter-spacing: 0.09em; text-transform: uppercase; }
.matcher-options { display: grid; gap: 8px; }
.matcher-option { display: grid; grid-template-columns: 16px 1fr auto; align-items: center; min-height: 49px; padding: 9px 12px; gap: 12px; border: 1px solid var(--line); border-radius: 2px; background: transparent; color: var(--muted); font-size: 11px; line-height: 1.45; text-align: left; transition: border-color 180ms, color 180ms, background 180ms; }
.matcher-option:hover { border-color: var(--line-strong); color: var(--ice); }
.matcher-option.is-selected { border-color: rgba(0, 229, 255, 0.5); background: rgba(0, 229, 255, 0.055); color: var(--ice); }
.option-check { width: 12px; height: 12px; border: 1px solid var(--dim); border-radius: 50%; }
.is-selected .option-check { border: 3px solid var(--panel); background: var(--aurora); box-shadow: 0 0 0 1px var(--aurora); }
.option-code { color: var(--dim); font-size: 8px; }
.matcher-hint { margin-top: 22px; color: var(--dim); font-size: 8px; line-height: 1.7; }
.matcher-result { display: flex; flex-direction: column; min-width: 0; border-left: 1px solid var(--line-strong); background: linear-gradient(145deg, rgba(0, 229, 255, 0.06), transparent 45%); }
.result-top { display: flex; justify-content: space-between; gap: 14px; padding: 18px 24px; border-bottom: 1px solid var(--line); color: var(--aurora); font-size: 7px; letter-spacing: 0.07em; }
.result-body { display: flex; flex: 1; flex-direction: column; padding: clamp(24px, 2.5vw, 36px); }
.result-body h3 { margin-top: 12px; font-family: var(--sans); font-size: clamp(29px, 2.8vw, 42px); line-height: 1; letter-spacing: -0.04em; }
.result-body > p { margin-top: 16px; color: var(--muted); font-size: 12px; line-height: 1.75; }
.result-metrics { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); margin-top: 22px; border-block: 1px solid var(--line); }
.result-metrics > div { min-width: 0; padding: 16px 0; }
.result-metrics > div + div { padding-left: 16px; border-left: 1px solid var(--line); }
.result-metrics strong { display: block; overflow-wrap: anywhere; font-size: 18px; font-weight: 500; line-height: 1.2; }
.result-metrics span { display: block; margin-top: 6px; color: var(--dim); font-family: var(--mono); font-size: 7px; }
.result-recovery { margin: 20px 0; }
.result-recovery p { margin-top: 7px; color: #b7c5d0; font-size: 11px; line-height: 1.7; }
.result-body .cta-btn { align-self: flex-start; margin-top: auto; }
.matcher-visual { position: relative; min-height: 100%; border-left: 1px solid var(--line-strong); overflow: hidden; }
.matcher-visual::after { position: absolute; inset: 0; background: linear-gradient(180deg, rgba(4, 9, 14, 0.15), rgba(4, 9, 14, 0.8)); content: ""; }
.matcher-image { width: 100%; height: 100%; object-fit: cover; filter: saturate(0.65) contrast(1.1); }
.visual-cross { position: absolute; z-index: 1; top: 44%; left: 50%; color: var(--adrenaline); font-family: var(--mono); font-size: 40px; font-weight: 200; transform: translate(-50%, -50%); }
.visual-label { position: absolute; z-index: 1; right: 18px; bottom: 18px; left: 18px; display: flex; justify-content: space-between; gap: 10px; color: var(--ice); font-size: 7px; letter-spacing: 0.07em; }
.visual-label span:last-child { color: var(--aurora); }
.access-band { display: flex; align-items: center; justify-content: space-between; gap: 40px; margin-top: 24px; padding: clamp(28px, 4vw, 52px); border: 1px solid var(--line); background: linear-gradient(105deg, #111a23, #0a1017); }
.access-band h3 { margin-top: 12px; font-family: var(--sans); font-size: clamp(28px, 3.5vw, 48px); line-height: 1; letter-spacing: -0.045em; }
.access-band p { max-width: 750px; margin-top: 14px; color: var(--muted); font-size: 12px; line-height: 1.75; }
.access-band .cta-btn { flex: 0 0 auto; }

/* Footer */
.site-footer { border-top: 1px solid var(--line); background: #030609; }
.footer-grid { display: grid; grid-template-columns: 1.2fr 1fr 1fr; gap: 60px; padding-block: 62px; }
.footer-brand p { margin-top: 20px; color: var(--muted); font-size: 13px; }
.footer-coordinate { display: block; margin-top: 12px; color: var(--dim); font-size: 8px; letter-spacing: 0.08em; }
.footer-principles { display: flex; flex-direction: column; gap: 12px; color: var(--muted); font-family: var(--mono); font-size: 9px; }
.footer-principles span::before { margin-right: 10px; color: var(--aurora); content: "+"; }
.footer-legal { display: flex; flex-direction: column; align-items: flex-start; }
.footer-legal button { min-height: 38px; padding: 0; border: 0; background: transparent; color: var(--muted); font-size: 11px; text-align: left; }
.footer-legal button:hover { color: var(--aurora); }
.footer-base { display: flex; justify-content: space-between; gap: 30px; padding-block: 20px calc(20px + env(safe-area-inset-bottom)); border-top: 1px solid var(--line); color: var(--dim); font-family: var(--mono); font-size: 8px; line-height: 1.6; }

/* Dialogs */
.modal { position: fixed; z-index: 1000; inset: 0; display: grid; place-items: center; padding: 30px; opacity: 0; transition: opacity 180ms; }
.modal.is-open { opacity: 1; }
.modal-backdrop { position: absolute; inset: 0; background: rgba(1, 3, 5, 0.88); backdrop-filter: blur(10px); }
.modal-panel { position: relative; width: min(100%, 1080px); max-height: calc(100vh - 60px); max-height: calc(100dvh - 60px); border: 1px solid var(--line-strong); background: #0a1017; box-shadow: 0 30px 100px rgba(0, 0, 0, 0.65); overflow: auto; overscroll-behavior: contain; transform: translateY(14px); transition: transform 220ms var(--ease); }
.modal.is-open .modal-panel { transform: translateY(0); }
.modal-toolbar { position: sticky; z-index: 5; top: 0; display: flex; align-items: center; justify-content: space-between; min-height: 58px; padding-left: 24px; border-bottom: 1px solid var(--line); background: rgba(7, 12, 18, 0.96); backdrop-filter: blur(12px); }
.modal-toolbar > span { color: var(--muted); font-size: 8px; letter-spacing: 0.1em; }
.modal-toolbar > div { display: flex; align-items: center; }
.modal-nav, .modal-close { display: grid; place-items: center; width: 52px; min-height: 56px; padding: 0; border: 0; border-left: 1px solid var(--line); background: transparent; color: var(--ice); font-family: var(--mono); font-size: 20px; }
.modal-nav:hover, .modal-close:hover { background: rgba(0, 229, 255, 0.06); color: var(--aurora); }
.modal-close { font-size: 28px; font-weight: 200; }
.modal-route-hero { position: relative; height: 350px; overflow: hidden; }
.modal-route-image { width: 100%; height: 100%; object-fit: cover; }
.modal-hero-shade { position: absolute; inset: 0; background: linear-gradient(0deg, #0a1017, rgba(5, 9, 13, 0.12) 80%); }
.modal-route-hero > div:last-child { position: absolute; right: 34px; bottom: 28px; left: 34px; }
.modal-route-hero .micro-label { margin-top: 18px; color: #d0dae1; }
.modal-route-hero h2 { max-width: 800px; margin-top: 8px; font-family: var(--sans); font-size: clamp(34px, 5vw, 62px); line-height: 0.98; letter-spacing: -0.05em; }
.modal-coordinates { display: block; margin-top: 10px; color: var(--aurora); font-size: 9px; }
.modal-route-body { padding: 0 clamp(24px, 4vw, 42px) 38px; }
.modal-primary-readouts { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); border-block: 1px solid var(--line); }
.modal-primary-readouts > div { min-width: 0; padding: 20px 16px; border-right: 1px solid var(--line); }
.modal-primary-readouts > div:first-child { padding-left: 0; }
.modal-primary-readouts > div:last-child { border-right: 0; }
.modal-primary-readouts strong { display: block; overflow-wrap: anywhere; font-size: clamp(17px, 2vw, 24px); font-weight: 500; }
.modal-primary-readouts span { display: block; margin-top: 7px; color: var(--dim); font-family: var(--mono); font-size: 7px; letter-spacing: 0.08em; }
.modal-description { max-width: 850px; padding-block: 28px; color: #b6c3ce; font-size: 14px; line-height: 1.85; }
.modal-detail-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 46px; }
.modal-detail-grid h3 { margin-bottom: 14px; color: var(--muted); font-family: var(--mono); font-size: 9px; letter-spacing: 0.1em; }
.modal-detail-grid section > h3:not(:first-child) { margin-top: 26px; }
.modal-detail-grid p { color: var(--muted); font-size: 12px; line-height: 1.8; }
.protocol-list { margin: 0; padding: 0; list-style: none; }
.protocol-list li { display: flex; gap: 14px; padding: 12px 0; border-top: 1px solid var(--line); color: #b6c3ce; font-size: 12px; }
.protocol-list li span { color: var(--aurora); font-size: 9px; }
.modal-settlement { margin-top: 30px; padding: 20px; border: 1px solid rgba(0, 229, 255, 0.18); background: rgba(0, 229, 255, 0.03); }
.modal-settlement strong { display: block; margin-top: 8px; color: var(--aurora); font-size: 11px; }
.modal-settlement p { margin-top: 8px; color: var(--muted); font-size: 11px; line-height: 1.7; }
.modal-risk { margin-top: 20px; color: var(--dim); font-size: 10px; line-height: 1.8; }
.legal-content { max-width: 800px; padding: clamp(34px, 6vw, 72px); }
.legal-content h2 { margin-top: 20px; font-family: var(--sans); font-size: clamp(38px, 5vw, 62px); line-height: 1; letter-spacing: -0.045em; }
.legal-content p { margin-top: 26px; color: #b1bfcb; font-size: 14px; line-height: 1.9; }
.legal-close { margin-top: 34px; border-color: var(--line-strong); background: transparent; color: var(--ice); cursor: pointer; }
.noscript-message { position: fixed; z-index: 3000; right: 20px; bottom: 20px; left: 20px; padding: 20px; border: 1px solid var(--adrenaline); background: var(--ink); color: var(--ice); text-align: center; }

/* Responsive */
@media (max-width: 1180px) {
  .network-status { display: none; }
  .hero-main { grid-template-columns: minmax(0, 1.5fr) minmax(280px, 0.7fr); gap: 38px; }
  .hero h1 { font-size: clamp(58px, 7.4vw, 88px); }
  .hero-bottom { grid-template-columns: 1fr; }
  .hero-scroll { display: none; }
  .hero-metric:first-child { padding-left: 0; border-left: 0; }
  .matcher-console { grid-template-columns: 1fr 1fr; }
  .matcher-visual { display: none; }
}

@media (max-width: 920px) {
  .desktop-nav { display: none; }
  .menu-toggle { display: block; }
  .header-actions { margin-left: auto; gap: 12px; }
  .site-header { background: rgba(4, 8, 12, 0.82); backdrop-filter: blur(14px); }
  .hero { min-height: auto; }
  .hero-shell { min-height: 100svh; padding-top: 112px; }
  .hero-main { grid-template-columns: 1fr; gap: 34px; }
  .hero-copy { max-width: 740px; }
  .hero h1 { font-size: clamp(58px, 11vw, 92px); }
  .hero-console { display: grid; grid-template-columns: 1fr 1fr; min-height: 210px; }
  .console-header { grid-column: 1 / -1; }
  .console-data { padding-top: 36px; }
  .console-target { top: 82px; right: 54px; width: 90px; height: 90px; }
  .console-wave { right: 20px; bottom: 46px; left: 50%; width: 45%; }
  .console-coordinates { grid-column: 1 / -1; }
  .section-heading, .expedition-heading { grid-template-columns: 1fr; gap: 26px; }
  .section-heading > p { max-width: 700px; }
  .expedition-badge { position: absolute; top: 0; right: 0; width: 64px; height: 64px; }
  .expedition-heading > div { padding-right: 80px; }
  .filter-bar { overflow-x: auto; scrollbar-width: thin; }
  .filter-btn { flex: 0 0 auto; min-width: 150px; }
  .routes-grid { gap: 18px; }
  .route-summary { min-height: 0; }
  .telemetry-board { grid-template-columns: 1fr; }
  .recovery-readout { display: grid; grid-template-columns: 0.8fr 1fr; column-gap: 32px; border-top: 1px solid var(--line); border-left: 0; }
  .readout-image { grid-row: 1 / 6; height: 100%; min-height: 320px; margin: 0; }
  .readout-stats { grid-column: 2; }
  .footer-grid { grid-template-columns: 1fr 1fr; }
  .footer-legal { grid-column: 1 / -1; flex-direction: row; flex-wrap: wrap; gap: 10px 28px; }
}

@media (max-width: 700px) {
  .section-shell { padding-inline: 20px; }
  .header-shell { min-height: 70px; padding-inline: 16px; gap: 12px; }
  .brand { gap: 8px; }
  .brand-mark { width: 31px; height: 31px; }
  .brand-wordmark { font-size: 17px; }
  .brand-division { display: none; }
  .language-control { padding-left: 8px; }
  .language-control svg { left: 14px; width: 13px; }
  .language-control select { min-width: 80px; width: 92px; padding-right: 4px; padding-left: 27px; font-size: 9px; }
  .hero-shell { padding-top: 98px; padding-bottom: 24px; }
  .hero-topline { padding-bottom: 16px; }
  .hero-session { display: none; }
  .hero-main { padding-block: 36px 28px; }
  .hero h1 { font-size: clamp(45px, 13.4vw, 76px); line-height: 0.91; }
  .hero-description { margin-top: 24px; font-size: 14px; }
  .hero-actions { align-items: stretch; flex-direction: column; }
  .hero-actions .cta-btn { width: 100%; }
  .hero-console { display: none; }
  .hero-bottom { padding-top: 18px; }
  .hero-metrics { grid-template-columns: 1fr; }
  .hero-metric { padding: 13px 0; border-top: 1px solid var(--line); border-left: 0; }
  .hero-metric strong { font-size: 25px; }
  .target-disclaimer { text-align: left; }
  .hero-image { object-position: 64% 50%; }
  .hero-vignette { background: linear-gradient(90deg, rgba(3, 6, 9, 0.93), rgba(3, 6, 9, 0.45)), linear-gradient(0deg, #080b10 0%, rgba(8, 11, 16, 0.3) 60%, rgba(3, 6, 9, 0.55)); }
  .section-heading { margin-bottom: 36px; }
  .section-heading h2 { font-size: clamp(36px, 11vw, 54px); }
  .section-heading > p { padding-left: 16px; font-size: 13px; }
  .filter-status { gap: 16px; line-height: 1.5; }
  .filter-status span:last-child { display: none; }
  .routes-grid { grid-template-columns: 1fr; }
  .route-image-wrap { height: 290px; }
  .route-body h3 { font-size: 30px; }
  .route-file span:last-child { display: none; }
  .route-open { min-height: 56px; }
  .chart-module { padding: 18px 12px; }
  .module-bar { align-items: flex-start; flex-direction: column; gap: 8px; padding-inline: 6px; }
  .chart-legend { gap: 12px; padding-inline: 6px; }
  .telemetry-svg { min-width: 570px; }
  .chart-module { overflow-x: auto; }
  .model-note { padding-inline: 6px; }
  .recovery-readout { display: block; padding: 22px; }
  .readout-image { height: 220px; min-height: 0; margin-bottom: 24px; }
  .matcher-console { grid-template-columns: 1fr; }
  .matcher-result { border-top: 1px solid var(--line-strong); border-left: 0; }
  .result-body { min-height: 450px; }
  .access-band { align-items: stretch; flex-direction: column; gap: 26px; }
  .access-band .cta-btn { width: 100%; }
  .footer-grid { grid-template-columns: 1fr; gap: 34px; padding-block: 44px; }
  .footer-legal { grid-column: auto; flex-direction: column; gap: 0; }
  .footer-legal button { min-height: 44px; }
  .footer-base { align-items: flex-start; flex-direction: column; gap: 10px; }
  .modal { padding: 0; }
  .modal-panel { width: 100%; height: 100vh; height: 100dvh; max-height: none; border: 0; }
  .modal-toolbar { padding-top: env(safe-area-inset-top); padding-left: 16px; }
  .modal-route-hero { height: 320px; }
  .modal-route-hero > div:last-child { right: 20px; bottom: 24px; left: 20px; }
  .modal-primary-readouts { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .modal-primary-readouts > div:nth-child(2) { border-right: 0; }
  .modal-primary-readouts > div:nth-child(n+3) { border-top: 1px solid var(--line); }
  .modal-primary-readouts > div:nth-child(3) { padding-left: 0; }
  .modal-detail-grid { grid-template-columns: 1fr; gap: 28px; }
  .legal-content { padding: 36px 22px calc(36px + env(safe-area-inset-bottom)); }
}

@media (max-width: 390px) {
  .brand-mark { display: none; }
  .header-actions { gap: 7px; }
  .language-control select { width: 82px; }
  .hero h1 { font-size: 43px; }
  .route-readouts strong { font-size: 18px; }
}

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after { scroll-behavior: auto !important; animation-duration: 0.01ms !important; animation-iteration-count: 1 !important; transition-duration: 0.01ms !important; }
  .route-card:hover, .cta-primary:hover { transform: none; }
  .route-card:hover .route-image { transform: none; }
}
