/* SkySwitch site styles.
   Layout: a left-aligned text column with the working object (demo clip or tool) held in a panel on the right;
   the two ends of a switch are colour-coded everywhere: A = amber (ground you leave), B = cobalt (ground you land on). */
:root {
  --bg: #edf1f6;        /* high-altitude haze, the compositor's own haze colour lightened */
  --surface: #ffffff;
  --sunk: #e2e8f0;
  --ink: #0f1c2e;
  --muted: #4d5d73;
  --line: #c9d3e0;
  --a: #b3650b;         /* point A */
  --b: #1747d1;         /* point B, also links and primary buttons */
  --on-b: #ffffff;
  --warn-bg: #fff4dc;
  --warn-ink: #5c3d00;
  --frame: #0b1422;     /* the dark bed behind video frames, same in both themes */
  --on-frame: #e6ecf4;
  --display: "Barlow Condensed", "Bahnschrift", "Arial Narrow", sans-serif;
  --body: "Hanken Grotesk", "Segoe UI", system-ui, sans-serif;
  --mono: "Spline Sans Mono", ui-monospace, "Cascadia Mono", Consolas, monospace;
  --gutter: max(20px, env(safe-area-inset-left, 0px));
  --wrap: 72rem;
}
@media (prefers-color-scheme: dark) {
  :root {
    --bg: #0b1422; --surface: #121e30; --sunk: #0f1a2b; --ink: #e6ecf4; --muted: #9aaabf; --line: #26364e;
    --a: #eaa54b; --b: #86a8ff; --on-b: #08122a; --warn-bg: #3a2c0c; --warn-ink: #ffe2a3;
    color-scheme: dark;
  }
}

* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; }
body { margin: 0; background: var(--bg); color: var(--ink); font: 400 1.0625rem/1.6 var(--body); }
img, video { max-width: 100%; height: auto; }
[hidden] { display: none !important; }
a { color: var(--b); text-underline-offset: 0.18em; }
a:focus-visible, button:focus-visible, input:focus-visible, select:focus-visible, summary:focus-visible, video:focus-visible {
  outline: 3px solid var(--b); outline-offset: 2px; border-radius: 4px;
}
h1, h2, h3 { font-family: var(--display); font-weight: 700; line-height: 1.02; letter-spacing: 0.005em; text-wrap: balance; margin: 0; }
h1 { font-size: clamp(2.7rem, 6.4vw, 4.9rem); text-transform: uppercase; }
h2 { font-size: clamp(1.9rem, 3.4vw, 2.6rem); text-transform: uppercase; }
h3 { font-size: 1.45rem; font-weight: 600; line-height: 1.15; }
p { margin: 0; max-width: 62ch; }
.mono { font-family: var(--mono); font-size: 0.86em; font-variant-numeric: tabular-nums; }
.eyebrow { font: 500 0.8rem/1.2 var(--mono); letter-spacing: 0.09em; text-transform: uppercase; color: var(--muted); }
.lede { font-size: 1.22rem; line-height: 1.5; color: var(--ink); max-width: 34ch; }
.small { font-size: 0.9rem; color: var(--muted); }
.ta { color: var(--a); } .tb { color: var(--b); }

.wrap { max-width: var(--wrap); margin-inline: auto; padding-left: var(--gutter); padding-right: max(20px, env(safe-area-inset-right, 0px)); }
.stack { display: flex; flex-direction: column; gap: 1rem; }
.stack-l { display: flex; flex-direction: column; gap: 1.6rem; }

/* header */
.top { border-bottom: 1px solid var(--line); }
.top .wrap { display: flex; align-items: center; justify-content: space-between; gap: 1rem; flex-wrap: wrap; padding-block: 0.8rem; }
.brand { display: inline-flex; align-items: center; gap: 0.55rem; font: 700 1.55rem/1 var(--display); letter-spacing: 0.02em; text-transform: uppercase; color: var(--ink); text-decoration: none; }
.brand svg { flex: none; }
.navlinks { display: flex; align-items: center; gap: 1.3rem; flex-wrap: wrap; font-size: 0.98rem; }
.navlinks a { color: var(--ink); text-decoration: none; }
.navlinks a:hover { text-decoration: underline; }
.btn { display: inline-flex; align-items: center; gap: 0.5rem; font: 600 1.02rem/1 var(--body); padding: 0.85rem 1.25rem; border-radius: 6px; border: 2px solid var(--b); background: var(--b); color: var(--on-b); text-decoration: none; cursor: pointer; }
.navlinks a.btn { color: var(--on-b); padding: 0.6rem 0.95rem; font-size: 0.95rem; }
.btn:hover { filter: brightness(1.08); text-decoration: none; }
.btn.ghost { background: transparent; color: var(--b); }
.btn[disabled] { opacity: 0.5; cursor: default; filter: none; }

/* hero */
.hero .wrap { display: grid; grid-template-columns: minmax(0, 1fr) auto; gap: clamp(2rem, 5vw, 4.5rem); align-items: center; padding-block: clamp(2.2rem, 5vw, 4rem); }
.hero-text { display: flex; flex-direction: column; gap: 1.4rem; min-width: 0; }
.hero-cta { display: flex; gap: 0.9rem; flex-wrap: wrap; align-items: center; }
.route { display: flex; flex-wrap: wrap; gap: 0.3rem 0.7rem; align-items: baseline; font: 500 0.85rem/1.3 var(--mono); color: var(--muted); }
.route b { font-weight: 500; }

/* demo clip with its altitude rail */
.demo { display: grid; grid-template-columns: auto 6.2rem; gap: 0.9rem; background: var(--frame); color: var(--on-frame); padding: 0.9rem; border-radius: 10px; }
.demo video { display: block; width: min(19rem, 58vw); aspect-ratio: 9 / 16; height: auto; background: #000; border-radius: 4px; }
.rail { position: relative; display: flex; flex-direction: column; gap: 0.6rem; min-width: 0; }
.rail-title { font: 500 0.68rem/1.25 var(--mono); letter-spacing: 0.07em; text-transform: uppercase; color: #9aaabf; }
.rail-scale { position: relative; flex: 1; min-height: 12rem; border-left: 1px solid #3a4c68; margin-left: 0.45rem; }
.tick { position: absolute; left: 0; transform: translateY(50%); display: flex; align-items: center; gap: 0.4rem; font: 400 0.74rem/1 var(--mono); font-variant-numeric: tabular-nums; color: #c3cfdf; white-space: nowrap; }
.tick::before { content: ""; width: 0.55rem; height: 1px; background: #6d7f9a; }
.tick.ga { color: #eaa54b; } .tick.gb { color: #86a8ff; }
.marker { position: absolute; left: -0.45rem; bottom: 0; width: 0.9rem; height: 0.9rem; margin-bottom: -0.45rem; border-radius: 50%; background: #fff; border: 3px solid #eaa54b; will-change: bottom; }
.rail-read { font: 500 0.78rem/1.3 var(--mono); font-variant-numeric: tabular-nums; min-height: 2.6em; color: #e6ecf4; }
.rail-read span { display: block; color: #9aaabf; font-weight: 400; }
.demo video { cursor: pointer; }
.demo-bar { grid-column: 1 / -1; display: flex; align-items: center; gap: 1rem; }
.demo-bar .btn { background: #86a8ff; border-color: #86a8ff; color: #08122a; padding: 0.65rem 1rem; }
.demo-mute { font: 600 0.9rem/1 var(--body); color: #e6ecf4; background: none; border: 0; padding: 0.4rem 0; cursor: pointer; text-decoration: underline; text-underline-offset: 0.18em; }
.demo-cap { grid-column: 1 / -1; font-size: 0.8rem; line-height: 1.4; color: #9aaabf; max-width: 27rem; }

/* sections */
.band { border-top: 1px solid var(--line); }
.band .wrap { padding-block: clamp(2.4rem, 5vw, 4rem); display: flex; flex-direction: column; gap: 1.8rem; }
.band.alt { background: var(--surface); }
.steps { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: repeat(5, minmax(0, 1fr)); gap: 1.6rem 1.6rem; counter-reset: step; }
@media (max-width: 62rem) { .steps { grid-template-columns: minmax(0, 34rem); } }
.steps li { counter-increment: step; display: flex; flex-direction: column; gap: 0.45rem; min-width: 0; border-top: 2px solid var(--ink); padding-top: 0.8rem; }
.steps li::before { content: "Step " counter(step); font: 500 0.75rem/1 var(--mono); letter-spacing: 0.09em; text-transform: uppercase; color: var(--muted); }
.steps p { font-size: 0.98rem; }
.where { font: 500 0.75rem/1.3 var(--mono); color: var(--muted); }
.cols { display: grid; grid-template-columns: repeat(auto-fit, minmax(17rem, 1fr)); gap: 2rem 3rem; }
.cols > div { display: flex; flex-direction: column; gap: 0.8rem; min-width: 0; }
.facts { margin: 0; padding: 0; list-style: none; display: flex; flex-direction: column; }
.facts li { display: grid; grid-template-columns: 9.5rem minmax(0, 1fr); gap: 1rem; padding: 0.6rem 0; border-top: 1px solid var(--line); font-size: 0.98rem; }
.facts li > span:first-child { font: 500 0.78rem/1.5 var(--mono); letter-spacing: 0.05em; text-transform: uppercase; color: var(--muted); }
ul.plain { margin: 0; padding-left: 1.1rem; display: flex; flex-direction: column; gap: 0.5rem; max-width: 62ch; }
.note { background: var(--warn-bg); color: var(--warn-ink); padding: 0.9rem 1.1rem; border-radius: 6px; font-size: 0.96rem; max-width: 62ch; }
.note a { color: inherit; }
.faq { display: flex; flex-direction: column; max-width: 46rem; }
.faq details { border-top: 1px solid var(--line); padding: 0.9rem 0; }
.faq details:last-child { border-bottom: 1px solid var(--line); }
.faq summary { cursor: pointer; font-weight: 600; }
.faq details p { margin-top: 0.6rem; color: var(--muted); }
.cta-band .wrap { flex-direction: row; flex-wrap: wrap; align-items: center; justify-content: space-between; }
.cta-band .wrap > div { display: flex; flex-direction: column; gap: 0.6rem; min-width: 0; }

footer .wrap { padding-block: 1.6rem 2.2rem; display: flex; flex-wrap: wrap; gap: 0.6rem 2rem; justify-content: space-between; font-size: 0.86rem; color: var(--muted); border-top: 1px solid var(--line); }
footer a { color: inherit; }
.preview-flag { background: var(--warn-bg); color: var(--warn-ink); font-size: 0.86rem; }
.preview-flag .wrap { padding-block: 0.45rem; }

@media (max-width: 54rem) {
  .hero .wrap { grid-template-columns: minmax(0, 1fr); }
  .demo { justify-self: start; }
  .lede { max-width: 40ch; }
}
@media (max-width: 34rem) {
  .top .wrap { gap: 0.5rem; padding-block: 0.6rem; }
  .navlinks { gap: 0.35rem 1.1rem; font-size: 0.92rem; }
}
@media (max-width: 26rem) {
  .demo { grid-template-columns: minmax(0, 1fr) 5.4rem; gap: 0.6rem; padding: 0.6rem; }
  .demo video { width: 100%; }
  .facts li { grid-template-columns: minmax(0, 1fr); gap: 0.15rem; }
}
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
}

/* ---------- planner (/make/) ---------- */
.tool .wrap { padding-block: clamp(1.6rem, 4vw, 2.6rem) 3rem; display: flex; flex-direction: column; gap: 1.8rem; }
.tool-head { display: flex; flex-direction: column; gap: 0.8rem; }
.tool-head h1 { font-size: clamp(2.3rem, 5vw, 3.6rem); }
.tool-grid { display: grid; grid-template-columns: minmax(0, 26rem) minmax(0, 1fr); gap: 1.6rem; align-items: start; }
.controls { display: flex; flex-direction: column; gap: 1rem; min-width: 0; }
fieldset.end { margin: 0; min-width: 0; border: 1px solid var(--line); border-left: 4px solid var(--line); border-radius: 6px; background: var(--surface); padding: 0.9rem 1rem 1rem; display: flex; flex-direction: column; gap: 0.8rem; }
fieldset.end-a { border-left-color: var(--a); } fieldset.end-b { border-left-color: var(--b); }
fieldset.end.on { box-shadow: 0 0 0 2px var(--ink); }
fieldset.end legend { font: 700 1.35rem/1 var(--display); text-transform: uppercase; letter-spacing: 0.02em; padding: 0 0.4rem; display: flex; align-items: center; gap: 0.5rem; }
.dot { display: inline-grid; place-items: center; width: 1.5rem; height: 1.5rem; border-radius: 50%; font: 600 0.85rem/1 var(--body); color: #fff; background: var(--ink); }
.end-a .dot { background: #b3650b; } .end-b .dot { background: #1747d1; }
.field { display: flex; flex-direction: column; gap: 0.3rem; min-width: 0; position: relative; }
.field label { font-size: 0.82rem; font-weight: 600; color: var(--muted); }
.field input, .field select { font: inherit; font-size: 1rem; width: 100%; min-width: 0; padding: 0.55rem 0.65rem; border: 1px solid var(--line); border-radius: 5px; background: var(--bg); color: var(--ink); }
.row2 { display: grid; grid-template-columns: minmax(0, 1.3fr) minmax(0, 1fr); gap: 0.7rem; }
.row3 { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 0.7rem; align-items: end; }
.hint { font-size: 0.82rem; line-height: 1.45; color: var(--muted); }
.sug { list-style: none; margin: 0; padding: 0.25rem; position: absolute; z-index: 5; top: 100%; left: 0; right: 0; margin-top: 0.25rem; background: var(--surface); border: 1px solid var(--line); border-radius: 6px; box-shadow: 0 10px 28px rgb(11 20 34 / 0.22); max-height: 17rem; overflow-y: auto; }
.sug button { display: flex; flex-direction: column; gap: 0.1rem; width: 100%; text-align: left; font: inherit; font-size: 0.95rem; padding: 0.5rem 0.6rem; border: 0; border-radius: 4px; background: none; color: var(--ink); cursor: pointer; }
.sug button:hover, .sug button:focus-visible { background: var(--sunk); }
.sug button span { font-size: 0.8rem; color: var(--muted); }
.sug .none { padding: 0.5rem 0.6rem; font-size: 0.9rem; color: var(--muted); }
.pick { font: 600 0.9rem/1.2 var(--body); padding: 0.55rem 0.7rem; border-radius: 5px; border: 1px dashed var(--muted); background: none; color: var(--ink); cursor: pointer; text-align: left; }
.pick[aria-pressed="true"] { border-style: solid; border-color: var(--ink); background: var(--sunk); }
.pick[aria-pressed="true"]::after { content: "  (active)"; font-weight: 400; color: var(--muted); }
.fine summary { cursor: pointer; font-size: 0.9rem; font-weight: 600; color: var(--muted); }
.fine[open] { display: flex; flex-direction: column; gap: 0.7rem; }
.seg { display: flex; flex-wrap: wrap; gap: 0.5rem 1.4rem; font-size: 0.98rem; }
.seg label { display: inline-flex; align-items: center; gap: 0.45rem; cursor: pointer; }
.summary { margin: 0; display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 0; border-top: 2px solid var(--ink); }
.summary div { padding: 0.6rem 0; border-bottom: 1px solid var(--line); display: flex; flex-direction: column; gap: 0.15rem; min-width: 0; }
.summary dt { font: 500 0.72rem/1.2 var(--mono); letter-spacing: 0.07em; text-transform: uppercase; color: var(--muted); }
.summary dd { margin: 0; font: 500 1.05rem/1.3 var(--mono); font-variant-numeric: tabular-nums; }
.go { display: flex; flex-direction: column; gap: 0.6rem; }
.go .btn { justify-content: center; font-size: 1.08rem; padding-block: 1rem; }
.status { min-height: 1.5em; font-size: 0.92rem; color: var(--muted); }
.status.bad { color: var(--warn-ink); background: var(--warn-bg); padding: 0.5rem 0.7rem; border-radius: 5px; }
.mapcol { position: sticky; top: 1rem; display: flex; flex-direction: column; gap: 0.5rem; min-width: 0; }
#map { height: min(74vh, 46rem); min-height: 22rem; border-radius: 8px; border: 1px solid var(--line); background: var(--sunk); overflow: hidden; }
.maptools { display: flex; flex-wrap: wrap; gap: 0.3rem 1.2rem; align-items: baseline; justify-content: space-between; }
.link { font: inherit; font-size: 0.92rem; font-weight: 600; color: var(--b); background: none; border: 0; padding: 0; cursor: pointer; text-decoration: underline; text-underline-offset: 0.18em; }
.pin { width: 2rem; height: 2rem; border-radius: 50% 50% 50% 0; transform-origin: bottom left; display: grid; place-items: center; font: 700 0.95rem/1 var(--body); color: #fff; border: 2px solid #fff; box-shadow: 0 2px 6px rgb(0 0 0 / 0.4); cursor: grab; }
.pin-a { background: #b3650b; } .pin-b { background: #1747d1; }
.next, .recent { display: flex; flex-direction: column; gap: 0.9rem; border-top: 2px solid var(--ink); padding-top: 1.4rem; scroll-margin-top: 1rem; }
.todo { margin: 0; padding-left: 1.3rem; display: flex; flex-direction: column; gap: 0.6rem; max-width: 64ch; }
.recent ul { list-style: none; margin: 0; padding: 0; max-width: 46rem; }
.recent li { display: grid; grid-template-columns: minmax(0, 1fr) auto; gap: 0.15rem 1rem; padding: 0.7rem 0; border-top: 1px solid var(--line); }
.recent li .mono { grid-column: 1; color: var(--muted); }
.recent li .acts { grid-column: 2; grid-row: 1 / span 2; display: flex; gap: 1rem; align-items: center; }

/* finish page: folder drop and the frame check */
.drop { display: flex; flex-direction: column; gap: 0.8rem; align-items: flex-start; padding: clamp(1.2rem, 3vw, 2rem); border: 2px dashed var(--line); border-radius: 8px; background: var(--surface); max-width: 46rem; }
.drop.over { border-color: var(--b); border-style: solid; }
.drop-title { font: 600 1.5rem/1.15 var(--display); letter-spacing: 0.01em; text-transform: uppercase; margin: 0; }
.drop .small { max-width: 60ch; margin: 0; overflow-wrap: anywhere; }
.checks, .picklist { list-style: none; margin: 0; padding: 0; max-width: 52rem; }
.checks li { display: grid; grid-template-columns: 5.2rem 8.5rem minmax(0, 1fr); gap: 0.2rem 1rem; padding: 0.7rem 0; border-top: 1px solid var(--line); align-items: baseline; }
.checks .tag { font: 500 0.78rem/1.3 var(--mono); letter-spacing: 0.06em; text-transform: uppercase; color: var(--muted); }
.checks .ok .tag { color: var(--b); }
.checks .bad .tag { color: var(--warn-ink); background: var(--warn-bg); padding: 0.15rem 0.4rem; border-radius: 4px; justify-self: start; }
.checks .what { font-weight: 600; }
.checks .why { overflow-wrap: anywhere; }
.picklist li { display: grid; grid-template-columns: minmax(0, 1fr) auto; gap: 0.15rem 1rem; padding: 0.7rem 0; border-top: 1px solid var(--line); }
.picklist li .mono { grid-column: 1; color: var(--muted); overflow-wrap: anywhere; }
.picklist li .link { grid-column: 2; grid-row: 1 / span 2; align-self: center; }
.need { display: flex; flex-direction: column; gap: 0.8rem; align-items: flex-start; max-width: 62ch; }
.need p { margin: 0; }
.thumbs { display: flex; flex-wrap: wrap; gap: 1rem; }
.thumbs figure { margin: 0; background: var(--frame); color: var(--on-frame); padding: 0.5rem; border-radius: 8px; display: flex; flex-direction: column; gap: 0.4rem; }
.thumbs canvas { display: block; width: auto; height: 15rem; max-width: 100%; border-radius: 3px; }
.thumbs figcaption { font: 500 0.78rem/1.2 var(--mono); letter-spacing: 0.06em; text-transform: uppercase; }
.recent li span { overflow-wrap: anywhere; }
@media (max-width: 40rem) {
  .checks li { grid-template-columns: 5.2rem minmax(0, 1fr); }
  .checks .why { grid-column: 1 / -1; }
  .picklist li { grid-template-columns: minmax(0, 1fr); } .picklist li .link { grid-column: 1; grid-row: auto; justify-self: start; }
}
@media (max-width: 58rem) {
  .tool-grid { grid-template-columns: minmax(0, 1fr); }
  .mapcol { position: static; order: -1; }
  #map { height: 22rem; }
}
@media (max-width: 26rem) {
  .row3 { grid-template-columns: minmax(0, 1fr); }
  .recent li { grid-template-columns: minmax(0, 1fr); } .recent li .acts { grid-column: 1; grid-row: auto; }
}
