/* flyalx.com shared styles. Page chrome follows light/dark; cockpit screens are always dark. */
:root {
  --bg: #05090c;
  --bg-2: #0b1115;
  --fg: #eef3f5;
  --muted: #8d9ca5;
  --faint: #55656f;
  --accent: #55d8ee;
  --route: #ee5cff;
  --ok: #4cde91;
  --caution: #ffc247;
  --warn: #ff4d45;
  --line: rgba(142, 165, 176, 0.18);
  --card: rgba(255, 255, 255, 0.03);
  --shadow: 0 24px 60px rgba(0, 0, 0, 0.55);
  --sans: system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
  --mono: "B612 Mono", ui-monospace, "SF Mono", "Cascadia Mono", "Roboto Mono", Menlo, Consolas, monospace;
}
@media (prefers-color-scheme: light) {
  :root:not([data-theme="dark"]) {
    --bg: #f4f7f8;
    --bg-2: #e8eef0;
    --fg: #0c1a22;
    --muted: #4d5d66;
    --faint: #7b8a93;
    --accent: #0a7c92;
    --route: #a32bb5;
    --ok: #18864d;
    --caution: #9a6400;
    --warn: #c62b24;
    --line: rgba(12, 26, 34, 0.12);
    --card: rgba(255, 255, 255, 0.7);
    --shadow: 0 18px 40px rgba(12, 26, 34, 0.22);
  }
}
* { box-sizing: border-box; margin: 0; padding: 0; }
html { scroll-behavior: smooth; }
@media (prefers-reduced-motion: reduce) { html { scroll-behavior: auto; } }
body {
  background: var(--bg);
  color: var(--fg);
  font-family: var(--sans);
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
}
a { color: var(--accent); text-decoration: none; font-weight: 600; }
a:hover, a:focus-visible { text-decoration: underline; }
img, svg { display: block; max-width: 100%; }
.wrap { max-width: 1160px; margin: 0 auto; padding: 0 16px; }

/* ---------- header / footer ---------- */
.site-head {
  position: sticky; top: 0; z-index: 20;
  background: color-mix(in srgb, var(--bg) 86%, transparent);
  backdrop-filter: blur(10px);
  border-bottom: 1px solid var(--line);
}
.site-head .wrap { display: flex; align-items: center; justify-content: space-between; gap: 16px; height: 56px; }
.brand { display: flex; align-items: center; gap: 10px; color: var(--fg); font-family: var(--mono); letter-spacing: 0.06em; font-size: 0.95rem; }
.brand:hover { text-decoration: none; }
.brand-dot { width: 22px; height: 22px; border-radius: 50%; border: 1.5px solid var(--accent); display: grid; place-items: center; color: var(--accent); font-size: 11px; }
.site-nav { display: flex; gap: 20px; font-size: 0.9rem; }
.site-nav a { color: var(--muted); font-weight: 500; }
.site-nav a[aria-current="page"], .site-nav a:hover { color: var(--fg); text-decoration: none; }
.site-foot { border-top: 1px solid var(--line); margin-top: 96px; padding: 32px 0 40px; color: var(--muted); font-size: 0.85rem; }
.site-foot .wrap { display: grid; gap: 12px; }
.site-foot .fine { color: var(--faint); max-width: 820px; }

/* ---------- typography ---------- */
.eyebrow { font-family: var(--mono); font-size: 0.75rem; letter-spacing: 0.16em; text-transform: uppercase; color: var(--accent); }
h1 { font-size: clamp(2rem, 5.2vw, 3.4rem); line-height: 1.08; letter-spacing: -0.02em; text-wrap: balance; }
h2 { font-size: clamp(1.5rem, 3.4vw, 2.2rem); line-height: 1.15; letter-spacing: -0.01em; text-wrap: balance; }
h3 { font-size: 1.1rem; line-height: 1.3; }
.lede { font-size: clamp(1.05rem, 1.8vw, 1.2rem); color: var(--muted); max-width: 680px; }
p { color: var(--muted); }
section { padding-top: 88px; }
.sec-head { display: grid; gap: 12px; margin-bottom: 32px; max-width: 760px; }

/* ---------- hero ---------- */
.hero { padding-top: 64px; display: grid; gap: 28px; }
.hero .cta { display: flex; flex-wrap: wrap; gap: 12px; }
.btn { display: inline-flex; align-items: center; gap: 8px; padding: 10px 16px; border-radius: 8px; border: 1px solid var(--line); color: var(--fg); background: var(--card); font-weight: 600; font-size: 0.95rem; }
.btn:hover { text-decoration: none; border-color: var(--accent); }
.btn.primary { border-color: color-mix(in srgb, var(--accent) 60%, transparent); color: var(--accent); }
.status-pill { display: inline-flex; gap: 8px; align-items: center; font-family: var(--mono); font-size: 0.75rem; letter-spacing: 0.08em; color: var(--caution); border: 1px solid color-mix(in srgb, var(--caution) 45%, transparent); border-radius: 999px; padding: 4px 12px; width: fit-content; }
.status-pill::before { content: ""; width: 7px; height: 7px; border-radius: 50%; background: currentColor; }

/* ---------- generic grids / cards ---------- */
.grid { display: grid; gap: 16px; }
.g2 { grid-template-columns: repeat(auto-fit, minmax(min(100%, 420px), 1fr)); }
.g3 { grid-template-columns: repeat(auto-fit, minmax(min(100%, 300px), 1fr)); }
.card { border: 1px solid var(--line); background: var(--card); border-radius: 12px; padding: 20px; display: grid; gap: 8px; align-content: start; }
.card h3 { display: flex; gap: 10px; align-items: baseline; }
.card .k { font-family: var(--mono); font-size: 0.72rem; letter-spacing: 0.1em; color: var(--accent); }
.card.planned .k { color: var(--muted); }
.card ul { padding-left: 18px; color: var(--muted); font-size: 0.95rem; }
.card li + li { margin-top: 4px; }
.tag { font-family: var(--mono); font-size: 0.68rem; letter-spacing: 0.1em; text-transform: uppercase; border: 1px solid var(--line); border-radius: 4px; padding: 1px 6px; color: var(--muted); white-space: nowrap; }
.tag.design { color: var(--accent); border-color: color-mix(in srgb, var(--accent) 40%, transparent); }
.tag.sim { color: var(--ok); border-color: color-mix(in srgb, var(--ok) 40%, transparent); }
.tag.planned { color: var(--caution); border-color: color-mix(in srgb, var(--caution) 40%, transparent); }
.tags { display: flex; flex-wrap: wrap; gap: 6px; }
.seealso { font-size: 0.85rem; color: var(--faint); }
.seealso a { font-weight: 500; }

/* split layout (two mock screens side by side) */
.duo { display: grid; gap: 16px; grid-template-columns: repeat(auto-fit, minmax(min(100%, 440px), 1fr)); }
figure.shot { display: grid; gap: 10px; }
figure.shot figcaption { font-size: 0.85rem; color: var(--muted); }
figure.shot figcaption b { color: var(--fg); font-weight: 600; }

/* ---------- scenario cards ---------- */
.scen-list { display: grid; gap: 16px; grid-template-columns: repeat(auto-fit, minmax(min(100%, 330px), 1fr)); }
.scen { display: grid; gap: 14px; border: 1px solid var(--line); border-radius: 14px; padding: 14px; background: var(--card); color: var(--fg); font-weight: 400; }
.scen:hover { text-decoration: none; border-color: color-mix(in srgb, var(--accent) 55%, transparent); }
.scen .meta { display: flex; justify-content: space-between; align-items: center; gap: 8px; }
.scen h3 { font-size: 1.05rem; }
.scen p { font-size: 0.92rem; }
.scen .go { color: var(--accent); font-weight: 600; font-size: 0.9rem; }

/* ---------- scenario page ---------- */
.crumbs { font-size: 0.85rem; color: var(--faint); padding-top: 28px; }
.crumbs a { font-weight: 500; }
.scen-head { padding-top: 20px; display: grid; gap: 16px; }
.facts { display: flex; flex-wrap: wrap; gap: 8px 24px; font-size: 0.9rem; color: var(--muted); }
.facts b { color: var(--fg); font-weight: 600; }
.toc { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 8px; }
.toc a { font-family: var(--mono); font-size: 0.78rem; font-weight: 500; border: 1px solid var(--line); border-radius: 999px; padding: 4px 12px; color: var(--muted); }
.toc a:hover { color: var(--fg); text-decoration: none; border-color: var(--accent); }
.step { display: grid; gap: 20px; padding-top: 56px; scroll-margin-top: 64px; }
@media (min-width: 1000px) { .step { grid-template-columns: minmax(0, 1fr) 330px; align-items: start; } }
.step-text { display: grid; gap: 14px; }
.step-no { font-family: var(--mono); font-size: 0.75rem; letter-spacing: 0.14em; color: var(--accent); }
.step-text h2 { font-size: 1.35rem; }
.step-text h3 { font-size: 0.78rem; font-family: var(--mono); letter-spacing: 0.12em; text-transform: uppercase; color: var(--faint); font-weight: 500; }
.step-text p { font-size: 0.95rem; }
.entries { list-style: none; display: grid; gap: 8px; }
.entries li { display: grid; grid-template-columns: 68px 1fr; gap: 10px; align-items: baseline; font-size: 0.9rem; color: var(--muted); }
.entries .via { font-family: var(--mono); font-size: 0.68rem; letter-spacing: 0.08em; text-transform: uppercase; text-align: center; border-radius: 4px; padding: 2px 0; }
.via.touch { color: var(--accent); border: 1px solid color-mix(in srgb, var(--accent) 45%, transparent); }
.via.knob { color: var(--route); border: 1px solid color-mix(in srgb, var(--route) 45%, transparent); }
.via.button { color: var(--ok); border: 1px solid color-mix(in srgb, var(--ok) 45%, transparent); }
.via.auto { color: var(--muted); border: 1px solid var(--line); }
.note { border-left: 2px solid var(--caution); padding: 4px 0 4px 12px; font-size: 0.88rem; color: var(--muted); }
.ctl-wrap { display: flex; gap: 14px; align-items: center; }
.ctl-wrap svg { width: 92px; flex: none; }
.ctl-wrap p { font-size: 0.82rem; color: var(--faint); }
.pager { display: flex; justify-content: space-between; gap: 16px; flex-wrap: wrap; margin-top: 72px; padding-top: 24px; border-top: 1px solid var(--line); }
.pager a { display: grid; gap: 2px; font-size: 0.95rem; }
.pager a span { font-size: 0.75rem; color: var(--faint); font-family: var(--mono); letter-spacing: 0.1em; font-weight: 500; }
.pager .next { text-align: right; margin-left: auto; }

/* =================================================================
   Cockpit screen mock. Sized with container units: 1cqw = 1/100 of width.
   ================================================================= */
.scr {
  --s-canvas: #020405; --s-panel: #0b1115; --s-panel2: #081216; --s-glass: #050b0fc7;
  --s-line: #25323a; --s-hair: #7d97a11a; --s-card: #8ea5b02e; --s-btn: #ffffff09;
  --s-text: #ffffff; --s-read: #f2f6f7; --s-label: #84939c; --s-unit: #55656f;
  --s-cyan: #55d8ee; --s-mag: #ee5cff; --s-green: #4cde91; --s-amber: #ffc247; --s-red: #ff4d45;
  container-type: inline-size;
  position: relative;
  aspect-ratio: 16 / 9;
  width: 100%;
  background: var(--s-canvas);
  border-radius: 12px;
  border: 3px solid #1a2329;
  box-shadow: var(--shadow), inset 0 0 0 1px #000;
  overflow: hidden;
  font-family: var(--mono);
  color: var(--s-text);
  line-height: 1.2;
  user-select: none;
}
/* container units only resolve against an ancestor, so the layout lives one level down */
.scr-in {
  position: absolute;
  inset: 0;
  font-size: 1.15cqw;
  display: grid;
  /* Figma 3426:3: AutopilotBar 96 px and BottomBar 78 px of a 1080 px frame */
  grid-template-rows: 8.9% minmax(0, 1fr) 7.2%;
}
.scr.mfd .scr-in { grid-template-rows: minmax(0, 1fr); }
/* Screens exported from Figma (see DEP_FIGMA in tools/build_flyalx.py) */
.scr.fig { background: #020405; }
.scr.fig .scr-in { display: block; }
.scr.fig img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; display: block; }
.scr * { box-sizing: border-box; }
.scr .lbl { color: var(--s-label); font-size: 0.82cqw; letter-spacing: 0.08em; text-transform: uppercase; }
.scr .u { color: var(--s-unit); font-size: 0.75cqw; }
.c-cyan { color: var(--s-cyan) !important; } .c-mag { color: var(--s-mag) !important; } .c-green { color: var(--s-green) !important; }
.c-amber { color: var(--s-amber) !important; } .c-red { color: var(--s-red) !important; } .c-dim { color: var(--s-label) !important; }

/* top status bar (Display / Status Bar 3399:2411) */
.s-top { display: grid; grid-template-columns: 10.5fr 5.8fr 6.2fr 6.2fr 10.2fr 11.2fr 10.2fr 21fr; border-bottom: 1px solid var(--s-line); background: linear-gradient(180deg, #152027 0%, #0c1317 100%); }
.s-top > div { padding: 0.25cqw 0.75cqw; border-right: 1px solid var(--s-line); display: grid; align-content: center; gap: 0.1cqw; min-width: 0; }
.s-top .big { font-size: 1.48cqw; font-weight: 700; letter-spacing: 0.02em; white-space: nowrap; }
.s-top .tail { display: flex; align-items: center; gap: 0.5cqw; font-size: 1.05cqw; color: var(--s-label); white-space: nowrap; }
.s-top .tail-ico { width: 1.8cqw; height: 1.8cqw; border-radius: 50%; border: 1px solid #55d8ee73; background: #55d8ee14; color: var(--s-cyan); display: grid; place-items: center; font-size: 0.95cqw; flex: none; }
.s-top .tail b { color: var(--s-read); font-weight: 600; display: block; font-size: 1.15cqw; letter-spacing: 0.06em; }
.s-top .ap, .s-top .mode { text-align: center; }
.s-top .ap .big { color: var(--s-label); }
.s-top .ap.on .big { color: var(--s-green); }
.s-top .mode .big { color: #96e7f4; }
.s-top .tgt { margin: 0.35cqw 0.25cqw; border: 1px solid var(--s-line); border-radius: 0.3cqw; background: rgba(255, 255, 255, 0.02); }
.s-top .tgt .big { font-size: 1.35cqw; color: #96e7f4; font-weight: 500; }
.s-top .clock { display: grid; grid-template-columns: 1fr 1fr; gap: 0.5cqw; padding: 0.25cqw 0.6cqw; border-right: none; }
.s-top .clock > div { display: grid; grid-template-columns: auto 1fr; column-gap: 0.5cqw; row-gap: 0.1cqw; align-items: baseline; font-size: 0.9cqw; }
.s-top .clock > div + div { border-left: 1px solid var(--s-card); padding-left: 0.5cqw; }
.s-top .clock .lbl { font-size: 0.68cqw; }
.s-top .clock span:nth-child(even) { font-size: 1.12cqw; color: var(--s-read); text-align: right; }

/* bottom page bar */
.s-bot { display: grid; grid-template-columns: 10fr 10fr 10fr 13fr 12fr 13fr 12fr; border-top: 1px solid var(--s-line); background: var(--s-panel); }
.s-bot > div { display: flex; align-items: center; justify-content: center; gap: 0.8cqw; border-right: 1px solid var(--s-line); font-size: 1.1cqw; color: var(--s-label); letter-spacing: 0.06em; white-space: nowrap; }
.s-bot .on { color: var(--s-cyan); box-shadow: inset 0 0.22cqw 0 var(--s-cyan); background: #55d8ee0a; }
.s-bot .radio { justify-content: flex-start; padding-left: 1cqw; }
.s-bot .radio .f { color: var(--s-text); font-size: 1.3cqw; }
.s-bot .radio .sb { color: var(--s-cyan); font-size: 0.9cqw; }
.s-bot .radio .stack { display: grid; gap: 0.1cqw; }
.s-bot .xp b { color: var(--s-text); font-size: 1.35cqw; font-weight: 500; }
.s-bot .xp i { font-style: normal; color: var(--s-green); border: 1px solid #4cde9166; padding: 0 0.4cqw; font-size: 1.1cqw; }

/* body */
.s-body { display: grid; min-height: 0; position: relative; }
.s-body.split { grid-template-columns: 33.3% 1fr; }
.s-body.horizon { grid-template-columns: 60% 1fr; }
.s-body.full { grid-template-columns: 1fr; }
.s-pfd { position: relative; overflow: hidden; border-right: 1px solid var(--s-line); }
.s-pfd svg { position: absolute; inset: 0; width: 100%; height: 100%; }

/* side panel (Display / Engine Monitor 3399:4102 + Display / Map Widget 3399:4210) */
.s-side { display: grid; grid-template-rows: auto auto auto auto auto 1fr auto auto; background: var(--s-panel); min-height: 0; }
.s-side .sec { padding: 0.35cqw 0.9cqw; border-bottom: 1px solid var(--s-line); }
.s-side .sec-t { display: flex; justify-content: space-between; align-items: center; }
.s-side .sec-t > div { display: grid; gap: 0.05cqw; }
.s-side .sec-t .lbl { font-size: 0.64cqw; letter-spacing: 0.12em; }
.s-side .sec-t b { font-weight: 500; font-size: 1.02cqw; letter-spacing: 0.06em; color: var(--s-read); }
.eng { display: grid; grid-template-columns: 1fr 1fr; gap: 0.45cqw 1.2cqw; padding: 0.45cqw 0.9cqw; border-bottom: 1px solid var(--s-card); }
.eng .eh { display: flex; justify-content: space-between; align-items: baseline; }
.eng .eh .lbl { font-size: 0.72cqw; }
.eng .eh .u { font-size: 0.62cqw; }
.eng .v { font-size: 1.22cqw; color: var(--s-read); }
.bar { height: 0.36cqw; background: #233039; margin-top: 0.22cqw; position: relative; border-radius: 0.15cqw; }
.bar i { position: absolute; left: 0; top: 0; bottom: 0; background: linear-gradient(90deg, var(--s-green), #a2ecbf); border-radius: 0.15cqw; }
.bar.amber i { background: linear-gradient(90deg, #8a6a2c, var(--s-amber)); }
.bar b { position: absolute; top: -0.18cqw; width: 0.16cqw; height: 0.72cqw; background: var(--s-amber); }
.bar b.red { background: var(--s-red); }
.egt-block { display: grid; grid-template-columns: 0.95fr 1.45fr; gap: 0.6cqw; padding: 0.4cqw 0.9cqw; border-bottom: 1px solid var(--s-card); align-items: center; }
.egt-read { display: grid; gap: 0.15cqw; }
.egt-head { display: flex; align-items: center; gap: 0.4cqw; }
.egt-head .lbl { font-size: 0.72cqw; }
.cyl-chip { font-size: 0.64cqw; color: var(--s-cyan); border: 1px solid #55d8ee73; background: #55d8ee12; border-radius: 0.2cqw; padding: 0.05cqw 0.35cqw; }
.egt-row { display: flex; align-items: baseline; gap: 0.4cqw; }
.egt-row .u { font-size: 0.64cqw; min-width: 2.1cqw; }
.egt-row .v { font-size: 1.08cqw; color: var(--s-read); }
.cyl-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 0.25cqw 0.4cqw; }
.cyl { display: flex; align-items: center; gap: 0.35cqw; padding: 0.18cqw 0.35cqw; border-radius: 0.25cqw; border: 1px solid transparent; }
.cyl.disp { background: #55d8ee12; border-color: #55d8ee73; }
.cyl .cnum { font-size: 0.85cqw; color: var(--s-label); min-width: 1.6cqw; display: flex; align-items: center; gap: 0.15cqw; }
.cyl.disp .cnum { color: var(--s-text); }
.cyl .hot-tri { font-size: 0.55cqw; color: var(--s-amber); }
.cyl .cbars { flex: 1; display: grid; gap: 0.22cqw; }
.cyl .cbars .bar { margin-top: 0; height: 0.32cqw; }
.fuel-row { display: grid; grid-template-columns: 1fr 1.15fr 1fr; padding: 0.38cqw 0.9cqw; border-bottom: 1px solid var(--s-line); align-items: center; }
.fuel-row .lbl { font-size: 0.68cqw; }
.fuel-row .v { font-size: 1.15cqw; color: var(--s-read); }
.fuel-row .endur { text-align: center; border-left: 1px solid var(--s-line); border-right: 1px solid var(--s-line); }
.fuel-row .fuel-r { text-align: right; }
.s-side .nav-hdr .rng { font-size: 0.78cqw; padding: 0.18cqw 0.45cqw; }
.s-side .mini { position: relative; min-height: 0; border-bottom: 1px solid var(--s-line); }
.s-side .mini svg { position: absolute; inset: 0; width: 100%; height: 100%; }
.wind-pill { position: absolute; left: 0.5cqw; top: 0.45cqw; background: var(--s-glass); border: 1px solid var(--s-line); border-radius: 0.25cqw; padding: 0.15cqw 0.45cqw; font-size: 0.72cqw; color: var(--s-read); }
.s-side .quad { display: grid; grid-template-columns: repeat(4, 1fr); border-bottom: 1px solid var(--s-line); }
.s-side .quad > div { padding: 0.35cqw 0.7cqw; border-right: 1px solid var(--s-line); }
.s-side .quad .lbl { font-size: 0.66cqw; }
.s-side .quad .v { font-size: 1.15cqw; }
.s-side .next { display: flex; align-items: center; gap: 0.6cqw; padding: 0.38cqw 0.9cqw; font-size: 0.98cqw; }
.s-side .next .lbl { font-size: 0.68cqw; }
.s-side .next .grow { flex: 1; color: var(--s-mag); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }

/* navigator */
.s-nav { display: grid; grid-template-rows: auto auto minmax(0, 1fr) auto; background: var(--s-panel2); min-height: 0; position: relative; }
.strip { display: grid; grid-template-columns: repeat(9, auto); justify-content: space-between; gap: 0.6cqw; padding: 0.5cqw 1cqw; border-bottom: 1px solid var(--s-line); background: var(--s-panel); }
.strip > div { display: grid; gap: 0.1cqw; white-space: nowrap; }
.strip .lbl { font-size: 0.68cqw; }
.strip .v { font-size: 1.05cqw; }
.tabs { display: flex; gap: 0.5cqw; padding: 0.7cqw 1cqw; align-items: stretch; }
.tabs .t { flex: 1; text-align: center; padding: 0.6cqw 0; border: 1px solid var(--s-line); border-radius: 0.3cqw; background: var(--s-btn); color: var(--s-label); font-size: 1.05cqw; letter-spacing: 0.04em; white-space: nowrap; }
.tabs .t.on { color: var(--s-cyan); border-color: #55d8ee73; background: #55d8ee12; }
.tabs .hint { flex: 1.4; font-size: 0.62cqw; color: var(--s-unit); text-align: right; align-self: center; line-height: 1.35; }
.banner { display: flex; align-items: center; gap: 0.6cqw; margin: 0.45cqw 1cqw; padding: 0.55cqw 0.8cqw; border: 1px solid #55d8ee73; border-left: 0.35cqw solid var(--s-cyan); border-radius: 0.35cqw; background: linear-gradient(90deg, #0b2229 0%, #09171d 100%); font-size: 0.96cqw; }
.banner .b-ico { width: 1.5cqw; height: 1.5cqw; border-radius: 0.25cqw; background: #55d8ee22; border: 1px solid #55d8ee66; color: var(--s-cyan); display: grid; place-items: center; font-size: 0.9cqw; flex: none; }
.banner .b-tag { font-size: 0.72cqw; letter-spacing: 0.1em; color: var(--s-cyan); }
.banner .grow { flex: 1; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; display: flex; align-items: center; gap: 0.5cqw; }
.banner .grow b { color: var(--s-text); font-weight: 600; font-size: 1.1cqw; }
.nav-grid { display: grid; grid-template-columns: 1.08fr 1fr; gap: 0.8cqw; padding: 0 1cqw 0.6cqw; min-height: 0; }
.nav-grid.one { grid-template-columns: 1fr; }
.pane { display: flex; flex-direction: column; gap: 0.45cqw; min-height: 0; overflow: hidden; }
.map { position: relative; border: 1px solid var(--s-line); border-radius: 0.4cqw; overflow: hidden; background: #071016; min-height: 0; }
.map svg { position: absolute; inset: 0; width: 100%; height: 100%; }
.map .mhead { position: absolute; left: 0; right: 0; top: 0; padding: 0.5cqw 0.7cqw; display: flex; justify-content: space-between; align-items: flex-start; gap: 0.5cqw; font-size: 0.88cqw; background: linear-gradient(#071016f0, #07101600); }
.map .mfoot { position: absolute; left: 0.6cqw; right: 0.6cqw; bottom: 0.6cqw; display: flex; justify-content: space-between; align-items: flex-end; gap: 0.5cqw; }
.seg { display: flex; border: 1px solid var(--s-line); border-radius: 2cqw; padding: 0.2cqw; gap: 0.2cqw; background: var(--s-glass); }
.seg span { padding: 0.25cqw 0.7cqw; border-radius: 2cqw; font-size: 0.8cqw; color: var(--s-label); }
.seg span.on { background: #55d8ee22; color: var(--s-cyan); border: 1px solid #55d8ee66; }
.rng { border: 1px solid var(--s-line); background: var(--s-glass); padding: 0.35cqw 0.7cqw; font-size: 1cqw; border-radius: 0.3cqw; }
.apbar { display: flex; gap: 0.6cqw; padding: 0.6cqw 1cqw 0.8cqw; }
.apbar .b { flex: 1; text-align: center; font-size: 0.92cqw; padding: 0.75cqw 0.2cqw; white-space: nowrap; }

/* buttons inside screens */
.b { display: inline-block; border: 1px solid var(--s-line); border-radius: 0.3cqw; background: var(--s-btn); color: var(--s-read); padding: 0.5cqw 0.8cqw; font-size: 0.92cqw; letter-spacing: 0.03em; text-align: center; white-space: nowrap; }
.b.cyan { color: var(--s-cyan); border-color: #55d8ee80; }
.b.green { color: var(--s-green); border-color: #4cde9180; }
.b.mag { color: var(--s-mag); border-color: #ee5cff80; }
.b.amber { color: var(--s-amber); border-color: #ffc24799; }
.b.red { color: var(--s-red); border-color: #ff4d45a0; }
.b.fill-cyan { background: #55d8ee22; }
.b.fill-red { background: #ff4d4518; }
.b.dim { opacity: 0.45; }
.brow { display: flex; gap: 0.5cqw; }
.brow .b { flex: 1; }

/* flight plan rows */
.fpl-head { display: flex; justify-content: space-between; align-items: flex-end; }
.fpl-head .title { font-size: 1.35cqw; }
.cols, .row { display: grid; grid-template-columns: 1fr 4.2cqw 4.6cqw 6cqw 4.4cqw; gap: 0.4cqw; align-items: center; }
.cols { font-size: 0.66cqw; color: var(--s-unit); letter-spacing: 0.08em; padding: 0 0.7cqw; text-align: right; }
.cols span:first-child { text-align: left; padding-left: 1.2cqw; }
.row { border: 1px solid var(--s-hair); background: #ffffff05; border-radius: 0.3cqw; padding: 0.38cqw 0.7cqw; font-size: 1.05cqw; text-align: right; }
.row .w { text-align: left; display: grid; grid-template-columns: 1.2cqw 1fr; align-items: center; }
.row .w b { font-weight: 600; font-size: 1.15cqw; }
.row .w small { grid-column: 2; font-size: 0.62cqw; color: var(--s-label); letter-spacing: 0.06em; white-space: nowrap; }
.row .w i { font-style: normal; font-size: 0.8cqw; color: var(--s-label); }
.row.past { opacity: 0.45; }
.row.act { border-color: #ee5cffa0; background: #1e0f23; }
.row.act .w b, .row.act .w i { color: var(--s-mag); }
.row.sel { border-color: var(--s-cyan); box-shadow: 0 0 0 1px #55d8ee55; background: #55d8ee0f; }
.row.new { border-style: dashed; border-color: #55d8ee99; }
.row.gone { opacity: 0.35; text-decoration: line-through; }
.tot { font-size: 0.88cqw; color: var(--s-label); padding: 0.2cqw 0.4cqw; }
.chip { display: inline-block; border: 1px solid currentColor; border-radius: 0.25cqw; padding: 0.15cqw 0.6cqw; font-size: 0.9cqw; letter-spacing: 0.04em; }

/* cards (variants) */
.vcard { border: 1px solid var(--s-card); border-radius: 0.4cqw; padding: 0.7cqw 0.9cqw; display: grid; gap: 0.5cqw; background: #ffffff04; }
.vcard.act { border-color: #ee5cff99; background: #1e0f23; }
.vcard.sel { border-color: var(--s-cyan); background: #55d8ee0c; }
.vcard .vt { display: flex; gap: 0.8cqw; align-items: center; font-size: 1.05cqw; font-weight: 600; }
.vcard .vt svg { width: 3cqw; height: 0.6cqw; flex: none; }
.vcard .vs { font-size: 0.72cqw; color: var(--s-label); margin-top: -0.3cqw; }
.vgrid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 0.4cqw; }
.vgrid > div { background: #ffffff06; border-radius: 0.25cqw; padding: 0.3cqw 0.5cqw; display: grid; gap: 0.1cqw; }
.vgrid .lbl { font-size: 0.6cqw; }
.vgrid .v { font-size: 1cqw; }

/* popups (Popup / COM Frequency 3476:6344 + Display / CTL Legend 3481:314) */
.pop { position: absolute; z-index: 3; background: linear-gradient(145deg, #142127 8%, #0b1115 65%); border: 1px solid #3e8898; border-radius: 0.45cqw; box-shadow: 0 1cqw 3cqw #000c; padding: 0.8cqw 0.95cqw; display: grid; gap: 0.5cqw; align-content: start; }
.pop.red { border-color: var(--s-red); box-shadow: 0 0 0 0.15cqw #ff4d4530, 0 1cqw 3cqw #000c; }
.pop .ph { display: flex; justify-content: space-between; align-items: baseline; gap: 1cqw; }
.pop .ph b { font-size: 1.35cqw; font-weight: 600; }
.pop .sub { font-size: 0.75cqw; color: var(--s-unit); letter-spacing: 0.04em; }
.com-head { display: flex; justify-content: space-between; align-items: center; padding-bottom: 0.35cqw; border-bottom: 1px solid var(--s-line); }
.com-head > div { display: grid; gap: 0.05cqw; }
.com-head .lbl { font-size: 0.68cqw; }
.com-head b { font-size: 1.05cqw; font-weight: 500; color: var(--s-read); }
.com-st { font-size: 0.82cqw; letter-spacing: 0.04em; }
.com-freqs { display: grid; grid-template-columns: 1fr auto 1fr; gap: 0.5cqw; align-items: stretch; }
.cf-box { background: rgba(2, 7, 9, 0.55); border: 1px solid var(--s-line); border-radius: 0.3cqw; padding: 0.4cqw 0.6cqw; display: grid; gap: 0.05cqw; }
.cf-box.stby { background: rgba(85, 216, 238, 0.06); border-color: rgba(85, 216, 238, 0.45); }
.cf-box .lbl { font-size: 0.65cqw; }
.cf-box b { font-size: 1.65cqw; font-weight: 500; line-height: 1.1; }
.cf-box small { font-size: 0.65cqw; color: var(--s-unit); }
.cf-swap { border: 1px solid var(--s-line); border-radius: 0.3cqw; background: rgba(255, 255, 255, 0.02); padding: 0 0.55cqw; display: flex; flex-direction: column; align-items: center; justify-content: center; color: var(--s-label); font-size: 1.1cqw; }
.cf-swap small { font-size: 0.58cqw; }
.com-qp-hdr { display: flex; justify-content: space-between; align-items: baseline; }
.com-qp-hdr .lbl { font-size: 0.68cqw; }
.com-qp-hdr .u { font-size: 0.62cqw; }
.com-tabs { display: grid; grid-template-columns: repeat(3, 1fr); gap: 0.45cqw; }
.com-tabs .ptab { border: 1px solid var(--s-line); border-radius: 0.25cqw; background: rgba(255, 255, 255, 0.02); text-align: center; padding: 0.32cqw 0; font-size: 0.85cqw; color: var(--s-label); }
.com-tabs .ptab.on { background: rgba(76, 222, 145, 0.1); border-color: var(--s-green); color: var(--s-green); }
.scrim { position: absolute; inset: 0; background: #020405a8; z-index: 2; }
.keypad { display: grid; grid-template-columns: repeat(3, 1fr); gap: 0.5cqw; }
.keypad span { border: 1px solid var(--s-line); border-radius: 0.3cqw; background: var(--s-btn); text-align: center; padding: 0.7cqw 0; font-size: 1.3cqw; }
.readout { text-align: center; font-size: 3cqw; color: var(--s-cyan); border: 1px solid #55d8ee55; border-radius: 0.3cqw; padding: 0.4cqw; background: #55d8ee0a; }
.qp { display: grid; grid-template-columns: repeat(3, 1fr); gap: 0.45cqw; }
.qp > div { border: 1px solid var(--s-line); border-radius: 0.3cqw; padding: 0.42cqw 0.55cqw; display: grid; gap: 0.1cqw; background: rgba(255, 255, 255, 0.02); }
.qp > div .qt { display: flex; justify-content: space-between; align-items: baseline; gap: 0.3cqw; }
.qp > div .qtype { font-size: 0.65cqw; color: var(--s-label); }
.qp > div .f { font-size: 1.15cqw; color: var(--s-read); }
.qp > div .n { font-size: 0.62cqw; color: var(--s-unit); letter-spacing: 0.04em; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.qp > div.sel { border-color: rgba(85, 216, 238, 0.45); background: rgba(85, 216, 238, 0.06); }
.qp > div.sel .qtype, .qp > div.sel .f { color: var(--s-cyan); }
.qp > div.guard { background: #200d0d; }
.qp > div.guard .qtype, .qp > div.guard .f { color: var(--s-red); }
.legend { position: absolute; z-index: 3; display: grid; gap: 0.35cqw; background: rgba(5, 11, 15, 0.84); border: 2px solid rgba(85, 216, 238, 0.45); border-radius: 0.45cqw; padding: 0.35cqw; }
.legend .lg { display: grid; grid-template-columns: 4.3cqw 1fr 1fr 1fr; gap: 0.25cqw; }
.legend .lg > div { padding: 0.4cqw 0.65cqw; border: 1px solid var(--s-line); border-radius: 0.25cqw; background: var(--s-panel2); display: grid; gap: 0.1cqw; }
.legend .lg > div.ktag { background: rgba(4, 8, 10, 0.75); border-color: #34434b; text-align: center; }
.legend .lg > div.in-chg { background: var(--s-cyan); border-color: var(--s-cyan); color: #061014; }
.legend .lg > div.in-chg .lbl { color: #061014; }
.legend .lg b { font-size: 1.2cqw; font-weight: 700; white-space: nowrap; }
.legend .lb { display: grid; grid-template-columns: 1fr 1fr; gap: 0.3cqw; }
.legend .lb span { text-align: center; font-size: 0.9cqw; padding: 0.3cqw; border: 1px solid var(--s-line); background: var(--s-panel2); border-radius: 0.25cqw; }
.legend .lb span b { color: var(--s-label); font-weight: 400; margin-right: 0.4cqw; }
.alert { position: absolute; z-index: 3; border-radius: 0.4cqw; padding: 0.5cqw 1cqw; font-size: 1.05cqw; letter-spacing: 0.06em; display: flex; gap: 0.8cqw; align-items: center; }
.alert.amber { background: #2a1f08f2; border: 1px solid var(--s-amber); color: var(--s-amber); }
.alert.cyan { background: #071b20f2; border: 1px solid var(--s-cyan); color: var(--s-cyan); }
.alert.green { background: #08201af2; border: 1px solid var(--s-green); color: var(--s-green); }
.watermark { position: absolute; z-index: 4; left: 1cqw; top: 9.6%; font-size: 0.75cqw; letter-spacing: 0.16em; color: #ffffff55; pointer-events: none; }
.scr.mfd .watermark { top: auto; left: auto; right: 1cqw; bottom: 0.4cqw; }
.guarded { background: repeating-linear-gradient(135deg, #ff4d4530 0 0.8cqw, transparent 0.8cqw 1.6cqw); border: 1px solid var(--s-red); color: var(--s-red); border-radius: 0.3cqw; text-align: center; padding: 0.6cqw; font-size: 1.1cqw; font-weight: 600; }
.guarded small { display: block; font-size: 0.7cqw; color: var(--s-read); font-weight: 400; letter-spacing: 0.06em; }
.nr { display: grid; grid-template-columns: 1.4cqw 1fr 3.4cqw 3.4cqw 6cqw 5.4cqw; gap: 0.5cqw; align-items: center; border: 1px solid var(--s-hair); border-radius: 0.3cqw; padding: 0.45cqw 0.7cqw; font-size: 1.05cqw; background: #ffffff04; }
.nr .ring { width: 1.1cqw; height: 1.1cqw; border-radius: 50%; border: 0.18cqw solid var(--s-label); }
.nr b { font-weight: 600; font-size: 1.15cqw; }
.nr small { display: block; font-size: 0.6cqw; color: var(--s-label); letter-spacing: 0.06em; }
.nr .agl { font-size: 0.75cqw; text-align: center; border: 1px solid currentColor; border-radius: 0.2cqw; padding: 0.1cqw 0; }
.nr.g .ring { border-color: var(--s-green); } .nr.g .agl { color: var(--s-green); }
.nr.a .ring { border-color: var(--s-amber); } .nr.a .agl { color: var(--s-amber); }
.nr.x { opacity: 0.5; } .nr.x .agl { color: var(--s-label); }
.nr.sel { border-color: var(--s-cyan); background: #55d8ee0f; }
.dto { border: 1px solid #55d8ee88; border-radius: 0.4cqw; padding: 0.7cqw 0.9cqw; background: #55d8ee08; display: grid; gap: 0.2cqw; }
.dto .big { font-size: 2.4cqw; color: var(--s-cyan); font-weight: 700; }
.quadc { display: grid; grid-template-columns: repeat(4, 1fr); gap: 0.4cqw; }
.quadc > div { border: 1px solid var(--s-hair); border-radius: 0.3cqw; padding: 0.35cqw 0.6cqw; display: grid; gap: 0.1cqw; }
.quadc .v { font-size: 1.25cqw; }
.pills { display: flex; gap: 0.4cqw; }
.pills span { flex: 1; text-align: center; border: 1px solid var(--s-line); border-radius: 2cqw; font-size: 0.78cqw; padding: 0.3cqw 0; color: var(--s-label); }
.pills span.on { color: var(--s-cyan); border-color: #55d8ee88; background: #55d8ee14; }

/* highlights: what the pilot touches in this step */
.hl { position: relative; outline: 0.22cqw solid var(--accent-hl, #55d8ee); outline-offset: 0.25cqw; border-radius: 0.3cqw; animation: hlpulse 1.8s ease-in-out infinite; z-index: 1; }
.hl.k { --accent-hl: #ee5cff; }
@keyframes hlpulse { 0%, 100% { outline-color: color-mix(in srgb, var(--accent-hl, #55d8ee) 100%, transparent); } 50% { outline-color: color-mix(in srgb, var(--accent-hl, #55d8ee) 25%, transparent); } }
@media (prefers-reduced-motion: reduce) { .hl { animation: none; } }
.tap { position: absolute; z-index: 6; width: 2.6cqw; height: 2.6cqw; margin: -1.3cqw 0 0 -1.3cqw; border-radius: 50%; background: #55d8ee; color: #02181c; font-size: 1.25cqw; font-weight: 700; display: grid; place-items: center; box-shadow: 0 0 0 0.5cqw #55d8ee40, 0 0.4cqw 1cqw #000a; font-family: var(--sans); }
.tap.k { background: #ee5cff; color: #24002b; box-shadow: 0 0 0 0.5cqw #ee5cff40, 0 0.4cqw 1cqw #000a; }

/* two-screen pairing */
.pair { display: grid; gap: 12px; grid-template-columns: 1fr 1fr; }
@media (max-width: 720px) { .pair { grid-template-columns: 1fr; } }
.pair .lab { font-family: var(--mono); font-size: 0.72rem; letter-spacing: 0.12em; color: var(--faint); margin-bottom: 6px; }
