/*
  Kestrel K2: drone product page (Screenery template)
  HUD / FUI: the page is the pilot's display. Thin cyan-white vector lines on deep night blue, corner brackets,
  tick rulers and small uppercase labels. Amber is reserved for warnings and nothing else.
  Major Mono Display for the display voice and big readouts, Chakra Petch for everything else.

  Contents
   1. Tokens
   2. Base and browser surfaces
   3. Components: buttons, panels, fields, checks, switch, segmented, readouts, range
   4. Header
   5. Hero: stage, HUD instruments, modes, copy
   6. Camera
   7. Sensing
   8. Endurance
   9. Plan a flight
  10. Kits table
  11. Order
  12. Questions and footer
  13. States (?state=lowbattery, ?hud=off), motion
  14. Narrow screens
*/

/* ---------- 1. Tokens ---------- */
:root {
  --night: #070d1a;          /* the ground */
  --night-2: #0a1426;        /* panels */
  --night-3: #10203b;        /* wells, hover */
  --ink: #e4f5fc;            /* primary text, 17:1 on night */
  --ink-2: #b0cad8;          /* secondary text, 11:1 */
  --ink-3: #88a7ba;          /* labels, 7.3:1 */
  --cyan: #7fe3ff;           /* vector lines, live values */
  --cyan-2: #bff1ff;
  --line: rgb(191 239 255 / 0.16);
  --line-2: rgb(191 239 255 / 0.32);
  --line-3: rgb(191 239 255 / 0.6);
  --amber: #ffb547;          /* warnings only */
  --amber-ink: #1d1200;
  --amber-wash: rgb(255 181 71 / 0.12);

  --f-display: 'Major Mono Display', ui-monospace, monospace;
  --f-ui: 'Chakra Petch', system-ui, sans-serif;

  --s-1: 4px; --s-2: 8px; --s-3: 12px; --s-4: 16px; --s-5: 24px; --s-6: 32px; --s-7: 48px; --s-8: 72px; --s-9: 112px;
  --radius: 2px;
  --gutter: clamp(16px, 4vw, 56px);
  --maxw: 1240px;
  --head-h: 60px;
  --ease-out: cubic-bezier(0.16, 1, 0.3, 1);
  --focus: 0 0 0 2px var(--night), 0 0 0 4px var(--cyan);
}

/* ---------- 2. Base and browser surfaces ---------- */
*, *::before, *::after { box-sizing: border-box; }
[hidden] { display: none !important; }
html { color-scheme: dark; scroll-behavior: smooth; scroll-padding-top: calc(var(--head-h) + 16px); scrollbar-color: var(--line-3) var(--night); accent-color: var(--cyan); }
@media (prefers-reduced-motion: reduce) { html { scroll-behavior: auto; } }
body {
  margin: 0;
  background: var(--night);
  color: var(--ink);
  font: 400 1rem/1.6 var(--f-ui);
  -webkit-font-smoothing: antialiased;
  caret-color: var(--cyan);
}
::selection { background: var(--cyan); color: var(--night); }
::-webkit-scrollbar { width: 10px; height: 10px; }
::-webkit-scrollbar-track { background: var(--night); }
::-webkit-scrollbar-thumb { background: var(--line-2); border: 2px solid var(--night); }
img, svg, canvas { display: block; max-width: 100%; }
a { color: var(--cyan-2); text-underline-offset: 0.22em; text-decoration-thickness: 1px; }
a:hover { color: var(--ink); }
:focus-visible { outline: 2px solid var(--cyan); outline-offset: 3px; }
h1, h2, h3 { text-wrap: balance; margin: 0; font-weight: 500; }
p { margin: 0; text-wrap: pretty; }
.num, b, output, dd, td { font-variant-numeric: tabular-nums; }
.icon { width: 20px; height: 20px; flex: none; fill: none; stroke: currentColor; stroke-width: 1.5; stroke-linecap: square; stroke-linejoin: miter; }
.defs { position: absolute; width: 0; height: 0; overflow: hidden; }
.visually-hidden { position: absolute !important; width: 1px; height: 1px; padding: 0; margin: -1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; border: 0; }
.skip { position: absolute; left: 12px; top: -60px; z-index: 50; padding: 10px 14px; background: var(--cyan); color: var(--night); font-weight: 600; }
.skip:focus { top: 12px; }
.skip:hover { color: var(--night); }
.lbl { color: var(--ink-3); letter-spacing: 0.12em; }

/* ---------- 3. Components ---------- */
.btn {
  --bc: var(--line-3);
  display: inline-flex; align-items: center; justify-content: center; gap: var(--s-2);
  min-height: 46px; padding: 0 var(--s-5);
  font: 600 0.82rem/1 var(--f-ui); letter-spacing: 0.14em; text-transform: uppercase;
  color: var(--ink); text-decoration: none; cursor: pointer;
  background: transparent; border: 1px solid var(--bc); border-radius: var(--radius);
  transition: background-color 0.25s var(--ease-out), color 0.25s var(--ease-out), border-color 0.25s var(--ease-out);
}
.btn--line:hover { --bc: var(--cyan); color: var(--ink); background: rgb(127 227 255 / 0.08); }
.btn--solid { background: var(--cyan); color: var(--night); --bc: var(--cyan); }
.btn--solid:hover { background: var(--cyan-2); color: var(--night); }
.btn .icon { width: 18px; height: 18px; }
.btn[disabled] { cursor: progress; opacity: 0.75; }
.spinner { display: none; width: 16px; height: 16px; border: 2px solid currentColor; border-right-color: transparent; border-radius: 50%; animation: spin 0.8s linear infinite; }
.is-loading .spinner { display: inline-block; }
@keyframes spin { to { transform: rotate(360deg); } }

/* A panel: hairline frame with corner brackets drawn in the border's own colour, a title bar with a code */
.panel {
  position: relative;
  background: var(--night-2);
  border: 1px solid var(--line);
  padding: var(--s-5);
}
.panel::before, .panel::after {
  content: ''; position: absolute; width: 14px; height: 14px; pointer-events: none;
  border: 0 solid var(--cyan);
}
.panel::before { top: -1px; left: -1px; border-top-width: 2px; border-left-width: 2px; }
.panel::after { bottom: 0; right: 0; border-bottom-width: 2px; border-right-width: 2px; }
.panel__bar { display: flex; justify-content: space-between; align-items: baseline; gap: var(--s-4); padding-bottom: var(--s-3); margin-bottom: var(--s-5); border-bottom: 1px solid var(--line); }
.panel__title { font: 600 0.82rem/1.2 var(--f-ui); letter-spacing: 0.16em; text-transform: uppercase; color: var(--ink); }
.panel__code { font: 500 0.75rem/1.2 var(--f-ui); letter-spacing: 0.14em; color: var(--ink-3); }

.field { display: grid; gap: 6px; min-width: 0; align-content: start; }
.field label, .walk legend, .seg legend, .brake__label {
  font: 600 0.75rem/1.3 var(--f-ui); letter-spacing: 0.14em; text-transform: uppercase; color: var(--ink-2);
}
.unit { color: var(--ink-3); letter-spacing: 0.08em; text-transform: none; font-weight: 500; }
.field input, .field select {
  width: 100%; min-height: 46px; padding: 0 var(--s-3);
  font: 500 1rem/1 var(--f-ui); color: var(--ink);
  background: var(--night); border: 1px solid var(--line-2); border-radius: var(--radius);
  font-variant-numeric: tabular-nums;
  transition: border-color 0.2s var(--ease-out), box-shadow 0.2s var(--ease-out);
}
.field select { appearance: none; padding-right: 40px; background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%237fe3ff' stroke-width='1.5'%3E%3Cpath d='M6.5 9.5l5.5 5.5 5.5-5.5'/%3E%3C/svg%3E"); background-repeat: no-repeat; background-position: right 10px center; background-size: 20px; }
.field select option { background: var(--night-2); color: var(--ink); }
.field input[type='number'] { appearance: textfield; -moz-appearance: textfield; }
.field input::-webkit-inner-spin-button, .field input::-webkit-outer-spin-button { appearance: none; margin: 0; }
.field input::placeholder { color: var(--ink-3); opacity: 1; }
.field input:hover, .field select:hover { border-color: var(--line-3); }
.field input:focus-visible, .field select:focus-visible { outline: none; border-color: var(--cyan); box-shadow: 0 0 0 1px var(--cyan); }
.field input[aria-invalid='true'], .field select[aria-invalid='true'] { border-color: var(--amber); box-shadow: 0 0 0 1px var(--amber); }
.field__help { font-size: 0.85rem; color: var(--ink-3); }
.field__err { display: flex; gap: 6px; align-items: flex-start; font-size: 0.875rem; color: var(--amber); }
.field__err .icon { width: 16px; height: 16px; margin-top: 3px; }
.field-row { display: grid; grid-template-columns: 1fr 1fr; gap: var(--s-4); }

.check { display: flex; gap: var(--s-3); align-items: flex-start; min-height: 44px; padding: 10px 0; cursor: pointer; color: var(--ink-2); }
.check input { appearance: none; flex: none; width: 20px; height: 20px; margin: 2px 0 0; border: 1px solid var(--line-3); background: var(--night); border-radius: var(--radius); display: grid; place-content: center; cursor: pointer; }
.check input::after { content: ''; width: 10px; height: 10px; background: var(--cyan); transform: scale(0); transition: transform 0.2s var(--ease-out); }
.check input:checked { border-color: var(--cyan); }
.check input:checked::after { transform: scale(1); }
.check input:checked + span { color: var(--ink); }
.check input:focus-visible { outline: 2px solid var(--cyan); outline-offset: 3px; }

.switch { position: relative; display: flex; align-items: center; gap: var(--s-3); min-height: 44px; cursor: pointer; color: var(--ink); font-weight: 500; }
.switch input { position: absolute; opacity: 0; width: 1px; height: 1px; }
.switch__track { flex: none; position: relative; width: 46px; height: 24px; border: 1px solid var(--line-3); background: var(--night); }
.switch__track::after { content: ''; position: absolute; top: 3px; left: 3px; width: 16px; height: 16px; background: var(--ink-3); transition: transform 0.25s var(--ease-out), background-color 0.25s var(--ease-out); }
.switch input:checked + .switch__track { border-color: var(--amber); }
.switch input:checked + .switch__track::after { transform: translateX(22px); background: var(--amber); }
.switch input:focus-visible + .switch__track { outline: 2px solid var(--cyan); outline-offset: 3px; }

/* Segmented radio groups */
.seg { border: 0; padding: 0; margin: 0; display: flex; flex-wrap: wrap; gap: 0; min-width: 0; }
.seg legend { margin-bottom: var(--s-2); padding: 0; }
.seg label { position: relative; flex: 1 1 auto; }
.seg input { position: absolute; opacity: 0; inset: 0; width: 100%; height: 100%; margin: 0; cursor: pointer; }
.seg span { display: flex; align-items: center; justify-content: center; min-height: 44px; padding: 6px 14px; font-weight: 500; font-size: 0.9rem; color: var(--ink-2); border: 1px solid var(--line-2); margin-left: -1px; text-align: center; transition: background-color 0.2s var(--ease-out), color 0.2s var(--ease-out); }
.seg label:first-of-type span { margin-left: 0; }
.seg input:hover + span { color: var(--ink); background: var(--night-3); }
.seg input:checked + span { color: var(--night); background: var(--cyan); border-color: var(--cyan); position: relative; z-index: 1; }
.seg input:focus-visible + span { outline: 2px solid var(--cyan); outline-offset: 2px; z-index: 2; }

/* Readouts: label over value, values in the display face */
.readout { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 1px; margin: 0; background: var(--line); border: 1px solid var(--line); }
.readout div { background: var(--night-2); padding: var(--s-3) var(--s-4); }
.readout dt { font: 600 0.7rem/1.3 var(--f-ui); letter-spacing: 0.16em; text-transform: uppercase; color: var(--ink-3); }
.readout dd { margin: 4px 0 0; color: var(--ink-2); font-size: 0.9rem; }
.readout b { font: 400 1.5rem/1.1 var(--f-display); color: var(--cyan); margin-right: 2px; }
.readout--row { grid-template-columns: repeat(4, minmax(0, 1fr)); }

.spec { display: grid; margin: 0; }
.spec div { display: grid; grid-template-columns: 8.5rem 1fr; gap: var(--s-4); padding: 10px 0; border-top: 1px solid var(--line); }
.spec dt { font: 600 0.75rem/1.6 var(--f-ui); letter-spacing: 0.14em; text-transform: uppercase; color: var(--ink-3); padding-top: 1px; }
.spec dd { margin: 0; color: var(--ink); }
.spec--cols { grid-template-columns: repeat(2, minmax(0, 1fr)); column-gap: var(--s-6); margin-top: var(--s-6); }

.range { width: 100%; height: 44px; margin: 0; background: transparent; appearance: none; cursor: pointer; }
.range::-webkit-slider-runnable-track { height: 2px; background: linear-gradient(90deg, var(--cyan) var(--fill, 40%), var(--line-2) var(--fill, 40%)); }
.range::-moz-range-track { height: 2px; background: var(--line-2); }
.range::-moz-range-progress { height: 2px; background: var(--cyan); }
.range::-webkit-slider-thumb { appearance: none; width: 14px; height: 28px; margin-top: -13px; background: var(--night); border: 2px solid var(--cyan); }
.range::-moz-range-thumb { width: 12px; height: 26px; background: var(--night); border: 2px solid var(--cyan); border-radius: 0; }
.range.is-warn::-webkit-slider-thumb { border-color: var(--amber); }

.note { color: var(--ink-2); font-size: 0.95rem; padding: var(--s-3) var(--s-4); border: 1px solid var(--line); }
.note.is-warn { color: var(--amber); border-color: var(--amber); background: var(--amber-wash); }

/* ---------- 4. Header ---------- */
.top {
  position: sticky; top: 0; z-index: 30;
  height: var(--head-h);
  display: flex; align-items: center; gap: var(--s-6);
  padding: 0 var(--gutter);
  background: rgb(7 13 26 / 0.94);
  border-bottom: 1px solid var(--line);
}
.mark { display: inline-flex; align-items: center; gap: 10px; color: var(--ink); text-decoration: none; min-height: 44px; }
.mark__glyph { width: 26px; height: 26px; fill: none; stroke: var(--cyan); stroke-width: 1.6; }
.mark__word { font: 400 1.3rem/1 var(--f-display); letter-spacing: 0.02em; }
.nav { display: flex; gap: var(--s-1); margin-left: auto; }
.nav a { display: inline-flex; align-items: center; min-height: 44px; padding: 0 12px; color: var(--ink-2); text-decoration: none; font-size: 0.8rem; font-weight: 600; letter-spacing: 0.14em; text-transform: uppercase; }
.nav a:hover { color: var(--cyan); }
.top__buy { min-height: 40px; padding: 0 var(--s-4); }
.top__price { color: var(--ink-3); font-weight: 500; letter-spacing: 0.06em; text-transform: none; }

/* ---------- 5. Hero ---------- */
.hero { position: relative; }
.stage {
  position: relative;
  height: max(640px, min(calc(100svh - var(--head-h)), 940px));
  overflow: hidden;
  background: linear-gradient(#050a15, #0c1a33 42%, #060c19);
  touch-action: pan-y;
  outline: none;
}
.stage:focus-visible { box-shadow: inset 0 0 0 2px var(--cyan); }
.stage__map, .stage__gl { position: absolute; inset: 0; width: 100%; height: 100%; }
.stage__map { object-fit: cover; }
.stage__gl { opacity: 0; transition: opacity 1.2s var(--ease-out); }
.gl .stage__gl { opacity: 1; }
/* a low scrim so the copy and telemetry read over bright contour lines */
.stage::after { content: ''; position: absolute; inset: 0; pointer-events: none; background: linear-gradient(to top, rgb(7 13 26 / 0.82), rgb(7 13 26 / 0.35) 34%, transparent 56%); }
.gl .stage__map { opacity: 0; transition: opacity 1.2s var(--ease-out); }

.hud { z-index: 1; --tape-h: clamp(170px, 30vh, 250px); position: absolute; inset: 0; pointer-events: none; color: var(--cyan); font-family: var(--f-ui); transition: opacity 0.4s var(--ease-out); }
.bracket { position: absolute; width: 34px; height: 34px; border: 0 solid var(--line-3); }
.bracket--tl { top: 18px; left: 18px; border-top-width: 1px; border-left-width: 1px; }
.bracket--tr { top: 18px; right: 18px; border-top-width: 1px; border-right-width: 1px; }
.bracket--bl { bottom: 18px; left: 18px; border-bottom-width: 1px; border-left-width: 1px; }
.bracket--br { bottom: 18px; right: 18px; border-bottom-width: 1px; border-right-width: 1px; }

.horizon { position: absolute; inset: 0; width: 100%; height: 100%; overflow: visible; fill: none; stroke: var(--cyan); stroke-width: 1.2; }
.horizon text { fill: var(--cyan-2); stroke: none; font: 500 12px var(--f-ui); letter-spacing: 0.08em; }
.horizon__line { stroke: var(--cyan-2); stroke-width: 1.4; }
.horizon__reticle { stroke: var(--ink); stroke-width: 2; }
.horizon__pointer { fill: var(--cyan); stroke: none; }
#roll-arc { stroke: var(--line-3); }
#ladder-rungs path { stroke: var(--cyan); stroke-opacity: 0.7; }

.tape { position: absolute; font-size: 0.75rem; letter-spacing: 0.1em; }
.tape__window { position: relative; overflow: hidden; }
.tape__scale { stroke: var(--cyan); stroke-width: 1; fill: var(--cyan-2); overflow: visible; }
.tape__scale text { stroke: none; font: 500 11px var(--f-ui); letter-spacing: 0.04em; }
.tape__read { color: var(--ink); background: var(--night); border: 1px solid var(--cyan); padding: 2px 8px; font-weight: 500; white-space: nowrap; }
.tape__read b { font: 400 1.25rem/1.2 var(--f-display); color: var(--ink); }
.tape__title, .tape__sub { color: var(--ink-2); font-weight: 600; white-space: nowrap; text-shadow: 0 1px 2px var(--night); }

.tape--compass { top: 20px; left: 50%; width: min(520px, 62%); transform: translateX(-50%); display: grid; justify-items: center; gap: 4px; }
.tape--compass .tape__window { width: 100%; height: 34px; mask-image: linear-gradient(90deg, transparent, #000 18%, #000 82%, transparent); -webkit-mask-image: linear-gradient(90deg, transparent, #000 18%, #000 82%, transparent); }
.tape--compass .tape__scale { width: 100%; }
.tape--compass .tape__read { order: -1; }

.tape--v { top: 124px; display: grid; gap: 6px; width: 92px; }
.tape--v .tape__window { height: var(--tape-h); border-block: 1px solid var(--line-2); mask-image: linear-gradient(transparent, #000 16%, #000 84%, transparent); -webkit-mask-image: linear-gradient(transparent, #000 16%, #000 84%, transparent); }
.tape--v .tape__scale { height: var(--tape-h); }
.tape--v .tape__read { position: absolute; top: calc(1.6em + 6px + var(--tape-h) / 2); transform: translateY(-50%); min-width: 64px; text-align: center; }
.tape--speed { left: clamp(28px, 4vw, 64px); }
.tape--speed .tape__read { left: 0; }
.tape--alt { right: clamp(28px, 4vw, 64px); text-align: right; justify-items: end; }
.tape--alt .tape__read { right: 0; }
.tape--alt .tape__window { width: 64px; }

.hud__warn {
  position: absolute; top: 104px; left: 50%; transform: translateX(-50%);
  display: flex; align-items: center; gap: 10px; padding: 8px 14px;
  background: var(--amber); color: var(--amber-ink);
  font-weight: 600; font-size: 0.82rem; letter-spacing: 0.12em; text-transform: uppercase; white-space: nowrap;
}

.telemetry {
  position: absolute; right: clamp(28px, 4vw, 64px); bottom: 176px;
  display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 0;
  width: 340px; margin: 0;
  border: 1px solid var(--line-2); background: rgb(7 13 26 / 0.82);
}
.telemetry__item { position: relative; padding: 8px 12px 9px; border-bottom: 1px solid var(--line); border-right: 1px solid var(--line); }
.telemetry__item:nth-child(2n) { border-right: 0; }
.telemetry__item:nth-last-child(-n+2) { border-bottom: 0; }
.telemetry dt { display: flex; align-items: center; gap: 6px; font-size: 0.7rem; font-weight: 600; letter-spacing: 0.16em; color: var(--ink-3); }
.telemetry dt .icon { width: 14px; height: 14px; color: var(--cyan); }
.telemetry dd { margin: 2px 0 0; color: var(--ink-2); font-size: 0.8rem; white-space: nowrap; }
.telemetry b { font: 400 1.1rem/1.2 var(--f-display); color: var(--ink); }
.telemetry__sub { color: var(--ink-3); margin-left: 4px; }
.cells { position: absolute; left: 12px; right: 12px; bottom: 3px; display: flex; gap: 2px; }
.cells i { flex: 1; height: 2px; background: var(--cyan); }
.cells i.off { background: var(--line); }
.telemetry__item--rec dt .icon { color: var(--ink-2); }
.is-rec .telemetry__item--rec dt .icon { color: var(--cyan); }

.modes {
  position: absolute; right: clamp(28px, 4vw, 64px); bottom: 28px; z-index: 2;
  width: 340px; margin: 0; padding: 0; border: 0;
}
.modes__legend { float: left; width: 100%; margin-bottom: 6px; padding: 0; font-size: 0.7rem; font-weight: 600; letter-spacing: 0.16em; text-transform: uppercase; color: var(--ink-2); text-shadow: 0 1px 2px var(--night); }
.modes__row { clear: both; display: grid; grid-template-columns: repeat(4, 1fr); border: 1px solid var(--line-2); background: rgb(7 13 26 / 0.86); }
.mode { position: relative; display: grid; align-content: center; gap: 1px; min-height: 52px; padding: 6px 4px; text-align: center; cursor: pointer; border-left: 1px solid var(--line); }
.mode:first-child { border-left: 0; }
.mode input { position: absolute; inset: 0; opacity: 0; margin: 0; cursor: pointer; }
.mode__name { font-size: 0.72rem; font-weight: 600; letter-spacing: 0.1em; text-transform: uppercase; color: var(--ink); line-height: 1.15; }
.mode__val { font-size: 0.7rem; color: var(--ink-3); }
.mode:hover { background: var(--night-3); }
.mode:has(input:checked) { background: var(--cyan); }
.mode:has(input:checked) .mode__name, .mode:has(input:checked) .mode__val { color: var(--night); }
.mode:has(input:focus-visible) { outline: 2px solid var(--cyan); outline-offset: 2px; z-index: 1; }
.modes__note { margin-top: 8px; min-height: 2.7em; font-size: 0.82rem; line-height: 1.35; color: var(--ink-2); text-shadow: 0 1px 2px var(--night); display: none; }

.hud-toggle {
  position: absolute; top: 20px; right: clamp(28px, 4vw, 64px); z-index: 2;
  display: inline-flex; align-items: center; gap: 8px; min-height: 44px; padding: 0 12px;
  font: 600 0.72rem/1 var(--f-ui); letter-spacing: 0.14em; text-transform: uppercase;
  color: var(--ink-2); background: rgb(7 13 26 / 0.8); border: 1px solid var(--line-2); cursor: pointer;
}
.hud-toggle:hover { color: var(--ink); border-color: var(--cyan); }
.hud-toggle .icon { width: 16px; height: 16px; color: var(--cyan); }
.stage__hint { position: absolute; left: 50%; bottom: 22px; transform: translateX(-50%); max-width: 30ch; text-align: center; font-size: 0.75rem; color: var(--ink-3); text-shadow: 0 1px 2px var(--night); display: none; }

/* Copy sits over the bottom left of the stage on wide screens */
.hero__copy {
  position: absolute; left: var(--gutter); bottom: 40px; z-index: 2;
  width: min(600px, calc(100% - 2 * var(--gutter) - 380px));
  padding: var(--s-5) var(--s-5) var(--s-5) 0;
}
.hero__title { font: 400 clamp(2.6rem, 5vw, 4.6rem)/0.95 var(--f-display); letter-spacing: -0.02em; word-spacing: -0.3em; white-space: nowrap; color: var(--ink); text-shadow: 0 2px 18px var(--night); }
.hero__lede { margin-top: var(--s-4); max-width: 44ch; font-size: 1.1rem; color: var(--ink); text-shadow: 0 1px 3px var(--night), 0 0 18px var(--night); }
.hero__actions { display: flex; flex-wrap: wrap; gap: var(--s-3); margin-top: var(--s-5); }
.hero__actions .btn--line { background: rgb(7 13 26 / 0.7); }
.hero__price { margin-top: var(--s-4); font-size: 0.9rem; color: var(--ink-2); text-shadow: 0 1px 3px var(--night); }
.hero__price .num { color: var(--ink); font-weight: 600; }

/* ---------- Sections ---------- */
.section { max-width: var(--maxw); margin: 0 auto; padding: var(--s-9) var(--gutter) 0; }
.section__head { display: grid; grid-template-columns: minmax(0, 5fr) minmax(0, 7fr); gap: var(--s-6); align-items: end; margin-bottom: var(--s-7); padding-bottom: var(--s-5); border-bottom: 1px solid var(--line); position: relative; }
/* tick ruler under each section heading */
.section__head::after { content: ''; position: absolute; left: 0; right: 0; bottom: -7px; height: 6px; background: repeating-linear-gradient(90deg, var(--line-2) 0 1px, transparent 1px 24px); }
.h2 { font: 400 clamp(1.9rem, 3.4vw, 2.8rem)/1.05 var(--f-display); letter-spacing: -0.01em; word-spacing: -0.35em; color: var(--ink); }
.section__lede { color: var(--ink-2); font-size: 1.05rem; max-width: 62ch; }

/* ---------- 6. Camera ---------- */
.camera { display: grid; grid-template-columns: minmax(0, 5fr) minmax(0, 7fr); gap: var(--s-5); align-items: start; }
.sensor-fig { margin: 0 0 var(--s-5); }
.sensor-fig svg { width: 100%; height: auto; }
.sensor-fig text { fill: var(--ink-2); font: 500 9px var(--f-ui); letter-spacing: 0.06em; }
.sensor-fig .sensor-fig__label { fill: var(--ink); font-weight: 600; letter-spacing: 0.1em; text-transform: uppercase; }
.sensor-fig__big { fill: rgb(127 227 255 / 0.12); stroke: var(--cyan); stroke-width: 1.2; }
.sensor-fig__small { fill: none; stroke: var(--line-3); stroke-width: 1; stroke-dasharray: 3 3; }
.sensor-fig__dim { stroke: var(--ink-3); stroke-width: 0.8; }
.sensor-fig__grid { stroke: var(--line); }
.sensor-fig figcaption { margin-top: var(--s-2); font-size: 0.85rem; color: var(--ink-3); }

.video { display: grid; grid-template-columns: minmax(0, 0.8fr) minmax(0, 1.2fr); gap: var(--s-5); }
.video__modes { border: 0; margin: 0; padding: 0; display: grid; gap: 0; align-content: start; }
.vmode { position: relative; display: grid; gap: 2px; min-height: 56px; padding: 10px 14px; border: 1px solid var(--line); margin-top: -1px; cursor: pointer; }
.vmode input { position: absolute; inset: 0; opacity: 0; margin: 0; cursor: pointer; }
.vmode span { font: 600 1rem/1.2 var(--f-ui); letter-spacing: 0.06em; color: var(--ink); }
.vmode small { font-size: 0.8rem; color: var(--ink-3); }
.vmode:hover { background: var(--night-3); }
.vmode:has(input:checked) { border-color: var(--cyan); background: rgb(127 227 255 / 0.1); z-index: 1; }
.vmode:has(input:checked) span { color: var(--cyan); }
.vmode:has(input:focus-visible) { outline: 2px solid var(--cyan); outline-offset: 2px; z-index: 2; }
.viewfinder { margin: 0; }
.viewfinder svg { width: 100%; height: auto; fill: none; }
.viewfinder__sensor { stroke: var(--line-2); fill: rgb(7 13 26 / 0.6); }
.viewfinder__thirds { stroke: var(--line); }
.viewfinder__crop { stroke: var(--cyan); stroke-width: 1; fill: rgb(127 227 255 / 0.07); transition: all 0.5s var(--ease-out); }
.viewfinder__corners { stroke: var(--ink); stroke-width: 2; transition: d 0.5s var(--ease-out); }
.viewfinder__centre { stroke: var(--cyan); }
.viewfinder figcaption { margin-top: var(--s-2); font-size: 0.85rem; color: var(--ink-3); }
.panel--video .readout { grid-column: 1 / -1; grid-template-columns: repeat(4, minmax(0, 1fr)); }

/* ---------- 7. Sensing ---------- */
.sensing { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: var(--s-8); align-items: center; }
.radar { margin: 0; }
.radar svg { width: 100%; max-width: 520px; height: auto; margin: 0 auto; overflow: visible; }
.radar__rings { fill: none; stroke: var(--line-2); stroke-width: 1; }
.radar__rings circle:last-of-type { stroke: var(--cyan); stroke-opacity: 0.7; }
.radar__rings path { stroke: var(--line); }
.radar__labels text { fill: var(--ink-3); font: 500 10px var(--f-ui); letter-spacing: 0.06em; }
.radar__sweep path { fill: rgb(127 227 255 / 0.1); }
.radar__sweep .radar__beam { fill: none; stroke: var(--cyan); stroke-width: 1.5; }
.radar__sweep { transform-origin: 0 0; }
.radar__brake { fill: none; stroke: var(--ink); stroke-width: 1.5; stroke-dasharray: 5 5; transition: r 0.3s var(--ease-out), stroke 0.3s; }
.radar__brake.is-warn { stroke: var(--amber); }
.radar__blips { fill: none; stroke: var(--cyan-2); stroke-width: 1.5; }
.radar__blips text { fill: var(--ink-2); stroke: none; font: 500 10.5px var(--f-ui); letter-spacing: 0.06em; }
.radar__drone { fill: none; stroke: var(--ink); stroke-width: 1.5; }
.radar figcaption { max-width: 52ch; margin: var(--s-3) auto 0; font-size: 0.85rem; color: var(--ink-3); text-align: center; }
.sensing__copy { display: grid; gap: var(--s-5); }
.sensing__copy > p { color: var(--ink-2); font-size: 1.05rem; max-width: 56ch; }
.brake { display: grid; gap: var(--s-3); }
.brake__label { display: flex; justify-content: space-between; align-items: baseline; }
.brake__label output { font: 400 1rem var(--f-ui); color: var(--ink-2); letter-spacing: 0.04em; text-transform: none; }
.brake__label output b { font: 400 1.4rem var(--f-display); color: var(--cyan); }
.check--inline { padding: 0; align-items: center; }
.check--inline input { margin: 0; }

/* ---------- 8. Endurance ---------- */
.endurance__controls { display: flex; flex-wrap: wrap; gap: var(--s-5); margin-bottom: var(--s-6); }
.ruler { position: relative; }
.ruler__track { display: flex; height: 64px; border: 1px solid var(--line-2); }
.cell-seg { flex: 0 0 var(--w); display: flex; flex-direction: column; justify-content: center; gap: 2px; padding: 0 var(--s-3); border-right: 1px solid var(--night); background: rgb(127 227 255 / 0.14); color: var(--ink-2); font-size: 0.82rem; white-space: nowrap; overflow: hidden; transition: flex-basis 0.6s var(--ease-out); }
.cell-seg b { font-weight: 600; letter-spacing: 0.12em; text-transform: uppercase; font-size: 0.7rem; color: var(--ink); }
.cell-seg:nth-child(2) { background: rgb(127 227 255 / 0.22); }
.cell-seg:nth-child(3) { background: rgb(127 227 255 / 0.3); }
.ruler__scale { position: relative; height: 30px; margin-top: 4px; }
.ruler__scale span { position: absolute; top: 0; width: 1px; height: 6px; background: var(--line-3); }
.ruler__scale span.major { height: 10px; background: var(--cyan); }
.ruler__scale em { position: absolute; top: 12px; transform: translateX(-50%); font-style: normal; font-size: 0.72rem; color: var(--ink-3); font-variant-numeric: tabular-nums; }
.endurance__sum { margin-top: var(--s-4); font-size: 1.05rem; color: var(--ink-2); max-width: 70ch; }
.endurance__sum #e-sum, .endurance__sum #e-hm { color: var(--ink); font-weight: 600; }

/* ---------- 9. Plan a flight ---------- */
.plan { display: grid; grid-template-columns: minmax(0, 7fr) minmax(0, 5fr); gap: var(--s-6); align-items: start; }
.plan__fields { display: grid; gap: var(--s-5); }
.zone { display: grid; gap: var(--s-2); padding: var(--s-4); border: 1px solid var(--line); }
.zone__ref { margin-top: var(--s-2); }
.walk { border: 0; margin: 0; padding: 0; display: grid; }
.walk legend { margin-bottom: var(--s-2); padding: 0; }
.plan__submit { justify-self: start; min-width: 200px; }
.plan__result { position: sticky; top: calc(var(--head-h) + 24px); }
.verdict { display: flex; align-items: center; gap: 10px; padding: 12px 14px; font: 400 1.2rem/1.2 var(--f-display); text-transform: lowercase; word-spacing: -0.3em; border: 1px solid var(--line-2); color: var(--ink-2); }
.verdict .icon { width: 22px; height: 22px; }
.verdict--go { color: var(--night); background: var(--cyan); border-color: var(--cyan); }
.verdict--care { color: var(--amber); border-color: var(--amber); background: var(--amber-wash); }
.verdict--nogo { color: var(--amber-ink); background: var(--amber); border-color: var(--amber); }
.verdict--busy { color: var(--ink-2); }
.verdict__list { list-style: none; margin: var(--s-4) 0 0; padding: 0; display: grid; }
.vi { display: flex; gap: 10px; align-items: flex-start; padding: 10px 0; border-top: 1px solid var(--line); color: var(--ink-2); font-size: 0.95rem; }
.vi .icon { width: 18px; height: 18px; margin-top: 3px; color: var(--cyan); }
.vi--warn, .vi--stop { color: var(--ink); }
.vi--warn .icon, .vi--stop .icon { color: var(--amber); }
.vi b { font-weight: 600; color: var(--ink); }
.vi--idle::before { content: ''; flex: none; width: 8px; height: 1px; margin-top: 0.8em; background: var(--line-3); }

/* ---------- 10. Kits ---------- */
.table-wrap { overflow-x: auto; border: 1px solid var(--line); }
.table-wrap:focus-visible { outline-offset: 2px; }
.compare { width: 100%; border-collapse: collapse; min-width: 640px; }
.compare th, .compare td { padding: 14px 18px; text-align: left; border-bottom: 1px solid var(--line); font-weight: 400; }
.compare thead th { font: 600 0.75rem/1.3 var(--f-ui); letter-spacing: 0.14em; text-transform: uppercase; color: var(--ink-3); background: var(--night-2); }
.compare thead th:nth-child(3) { color: var(--night); background: var(--cyan); }
.compare tbody th { color: var(--ink); }
.compare td { color: var(--ink-2); }
.compare td:nth-child(3) { color: var(--ink); background: rgb(127 227 255 / 0.06); }
.compare tfoot th, .compare tfoot td { border-bottom: 0; border-top: 1px solid var(--line-2); }
.compare tfoot td.num { font: 400 1.15rem var(--f-display); color: var(--ink); }
.compare tfoot td:last-child.num { font: 400 0.9rem var(--f-ui); color: var(--ink-2); }

/* ---------- 11. Order ---------- */
.buy { display: grid; grid-template-columns: minmax(0, 5fr) minmax(0, 7fr); gap: var(--s-7); align-items: start; padding-top: var(--s-5); border-top: 1px solid var(--line); }
.buy__intro { display: grid; gap: var(--s-4); }
.buy__intro > p { color: var(--ink-2); font-size: 1.05rem; }
.buy__facts { list-style: none; margin: var(--s-2) 0 0; padding: 0; display: grid; gap: var(--s-2); }
.buy__facts li { display: flex; gap: 10px; color: var(--ink-2); }
.buy__facts .icon { color: var(--cyan); width: 18px; height: 18px; margin-top: 4px; }
.order { display: grid; gap: var(--s-4); }
.order .panel__bar { margin-bottom: 0; }
.kitpick { border: 0; margin: 0; padding: 0; display: grid; grid-template-columns: 1fr 1fr; gap: var(--s-3); }
.kit { position: relative; display: grid; gap: 2px; padding: var(--s-4); border: 1px solid var(--line-2); cursor: pointer; }
.kit input { position: absolute; inset: 0; opacity: 0; margin: 0; cursor: pointer; }
.kit__name { font-weight: 600; letter-spacing: 0.12em; text-transform: uppercase; font-size: 0.82rem; }
.kit__desc { font-size: 0.88rem; color: var(--ink-3); }
.kit__price { margin-top: var(--s-2); font: 400 1.5rem/1 var(--f-display); color: var(--ink); }
.kit:hover { background: var(--night-3); }
.kit:has(input:checked) { border-color: var(--cyan); background: rgb(127 227 255 / 0.08); box-shadow: inset 0 0 0 1px var(--cyan); }
.kit:has(input:checked) .kit__price { color: var(--cyan); }
.kit:has(input:focus-visible) { outline: 2px solid var(--cyan); outline-offset: 3px; }
.seg--full label { flex: 1 1 200px; }
.sum { margin: 0; display: grid; border-top: 1px solid var(--line); }
.sum div { display: flex; justify-content: space-between; gap: var(--s-4); padding: 8px 0; color: var(--ink-2); }
.sum dd { margin: 0; color: var(--ink); }
.sum__total { border-top: 1px solid var(--line-2); margin-top: 4px; padding-top: 12px !important; }
.sum__total dt { color: var(--ink); font-weight: 600; }
.sum__total dd { font: 400 1.5rem/1 var(--f-display); color: var(--cyan); }
.order__alert { display: flex; gap: 10px; padding: 12px 14px; border: 1px solid var(--amber); background: var(--amber-wash); color: var(--amber); }
.order__alert .icon { margin-top: 2px; }
.order__submit { width: 100%; }
.order__done { display: grid; gap: var(--s-3); color: var(--ink-2); }
.order__done:focus { outline: none; }
.order.is-done > :not(.panel__bar):not(.order__done) { display: none; }

/* ---------- 12. Questions and footer ---------- */
.faq { display: grid; grid-template-columns: minmax(0, 4fr) minmax(0, 8fr); gap: var(--s-7); padding-top: var(--s-5); border-top: 1px solid var(--line); }
.faq__list { border-top: 1px solid var(--line-2); }
.faq details { border-bottom: 1px solid var(--line); }
.faq summary { list-style: none; display: flex; justify-content: space-between; align-items: center; gap: var(--s-4); min-height: 60px; padding: var(--s-3) 0; cursor: pointer; font-size: 1.1rem; font-weight: 500; color: var(--ink); }
.faq summary::-webkit-details-marker { display: none; }
.faq summary:hover { color: var(--cyan); }
.faq summary .icon { color: var(--cyan); transition: transform 0.3s var(--ease-out); }
.faq details[open] summary .icon { transform: rotate(180deg); }
.faq details p { padding: 0 0 var(--s-5); max-width: 68ch; color: var(--ink-2); }

.foot { margin-top: var(--s-9); border-top: 1px solid var(--line); background: var(--night-2); }
.foot__grid { max-width: var(--maxw); margin: 0 auto; padding: var(--s-7) var(--gutter) var(--s-8); display: grid; grid-template-columns: minmax(0, 5fr) minmax(0, 3fr) minmax(0, 4fr); gap: var(--s-6); }
.foot__word { font: 400 1.8rem/1 var(--f-display); margin-bottom: var(--s-3); }
.foot__brand p { color: var(--ink-2); }
.foot__nav { display: grid; align-content: start; }
.foot__nav a { display: inline-flex; align-items: center; min-height: 40px; color: var(--ink-2); text-decoration: none; }
.foot__nav a:hover { color: var(--cyan); }
.foot__small { font-size: 0.85rem; color: var(--ink-3); }

/* ---------- 13. States and motion ---------- */
/* ?hud=off or the HUD button: instruments go, the terrain and the mode selector stay */
.hud-off .hud { opacity: 0; visibility: hidden; }

/* ?state=lowbattery: battery cells and readout turn amber, the warning bar shows */
.low-battery #t-bat-row b, .low-battery #t-bat-row dt, .low-battery #t-bat-row dt .icon, .low-battery #t-bat-row .telemetry__sub { color: var(--amber); }
.low-battery #t-bat-row .cells i:not(.off) { background: var(--amber); }
.low-battery #t-bat-row { background: var(--amber-wash); }

@media (prefers-reduced-motion: no-preference) {
  .radar__sweep { animation: sweep 4s linear infinite; }
  .hud__warn .icon { animation: blink 1.6s steps(2, jump-none) infinite; }
}
@keyframes sweep { to { transform: rotate(360deg); } }
@keyframes blink { 50% { opacity: 0.2; } }

/* ---------- 14. Narrow screens ---------- */
@media (min-width: 1100px) {
  .modes__note { display: block; }
}
@media (max-width: 1180px) {
  .nav a:nth-child(n+5) { display: none; }
}
@media (max-width: 1020px) {
  .nav { display: none; }
  .top__buy { margin-left: auto; }
  .camera, .sensing, .plan, .buy, .faq { grid-template-columns: minmax(0, 1fr); }
  .sensing { gap: var(--s-6); }
  .plan__result { position: static; }
  .section__head { grid-template-columns: minmax(0, 1fr); gap: var(--s-4); }
}

/* Tablet and phone: the copy moves under the stage and the stage gets its own composition */
@media (max-width: 900px) {
  .stage { height: clamp(560px, 82svh, 720px); }
  .hero__copy { position: static; width: auto; padding: var(--s-6) var(--gutter) 0; }
  .hero__title { text-shadow: none; }
  .hero__lede, .hero__price { text-shadow: none; }
  .telemetry { left: 50%; right: auto; transform: translateX(-50%); width: min(440px, calc(100% - 40px)); bottom: 122px; grid-template-columns: repeat(3, minmax(0, 1fr)); }
  .telemetry__item:nth-child(2n) { border-right: 1px solid var(--line); }
  .telemetry__item:nth-child(3n) { border-right: 0; }
  .telemetry__item:nth-last-child(-n+3) { border-bottom: 0; }
  .modes { left: 50%; right: auto; transform: translateX(-50%); width: min(440px, calc(100% - 40px)); bottom: 24px; }
  .modes__note { display: none; }
  .hud-toggle { top: auto; bottom: 244px; right: 20px; }
}
@media (max-width: 640px) {
  :root { --head-h: 56px; }
  .top { gap: var(--s-3); }
  .top__price { display: none; }
  .stage { height: 700px; }
  .tape--compass { top: 14px; width: calc(100% - 40px); }
  .hud { --tape-h: 140px; }
  .tape--v { top: 150px; width: 70px; }
  .tape--speed { left: 14px; }
  .tape--alt { right: 14px; }
  .tape--alt .tape__window { width: 56px; }
  .tape--v .tape__read { min-width: 56px; padding: 2px 4px; }
  .tape__read b { font-size: 1.05rem; }
  .bracket { width: 22px; height: 22px; }
  .bracket--tl, .bracket--tr { top: 8px; } .bracket--bl, .bracket--br { bottom: 8px; }
  .bracket--tl, .bracket--bl { left: 8px; } .bracket--tr, .bracket--br { right: 8px; }
  .telemetry { bottom: 116px; }
  .telemetry__item { padding: 6px 8px 8px; }
  .telemetry dd { font-size: 0.72rem; }
  .telemetry b { font-size: 0.95rem; }
  .telemetry__sub { display: none; }
  .hud__warn { top: 96px; font-size: 0.72rem; white-space: normal; width: calc(100% - 40px); max-width: max-content; }
  .mode__name { font-size: 0.72rem; letter-spacing: 0.02em; }
  .hud-toggle { bottom: 262px; right: 14px; }
  .section { padding-top: var(--s-8); }
  .field-row, .kitpick, .spec--cols { grid-template-columns: minmax(0, 1fr); }
  .video { grid-template-columns: minmax(0, 1fr); }
  .panel { padding: var(--s-4); }
  .readout--row, .panel--video .readout { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .spec div { grid-template-columns: minmax(0, 1fr); gap: 2px; }
  .foot__grid { grid-template-columns: minmax(0, 1fr); }
  .endurance__controls { gap: var(--s-4); }
  .ruler__track { height: 72px; }
  .cell-seg { padding: 0 6px; font-size: 0.75rem; }
  .seg span { padding: 6px 8px; font-size: 0.8rem; }
  .compare { min-width: 0; font-size: 0.88rem; }
  .compare th, .compare td { padding: 10px 8px; }
  .compare thead th { letter-spacing: 0.06em; font-size: 0.72rem; }
  .compare tfoot td.num { font-size: 0.95rem; }
}
