/* What The Flight? — the app's palette (WhatTheFlight/UI/Theme.swift): paper and indigo ink
   by day, the night radar after dark, SF Mono as the radar's voice. */

:root {
  --paper: #E9E7E2;
  --paper-shade: #D3D0C8;
  --ink: #3A33D6;
  --route: #7C83E8;
  --signal: #E5483B;
  --caption: #75726C;
  --value: #3B3A37;
  --text-2: #5C5A55;
  --faint: #A29E95;
  --blip: #2D56B9;
  --chip: #8F8B84;
  --chip-text: #FFFFFF;
  --live: #23A55A;
  --warning: #D98B00;
  --notable: #B7860B;
  --military: #55692A;
  --rule: #D3D0C8;
  --paper-alt: #E1DED6;
  --sky-top: #93C2EC;
  --sky-mid: #C9DFF1;
  --frame-shadow: 30, 28, 40;

  --mono: ui-monospace, "SF Mono", SFMono-Regular, "JetBrains Mono", Menlo, Consolas, monospace;
  --sans: -apple-system, BlinkMacSystemFont, "SF Pro Text", "Segoe UI", system-ui, Roboto, "Helvetica Neue", sans-serif;
  --gutter: clamp(20px, 5vw, 48px);
  color-scheme: light;
}

@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) {
    --paper: #0A0E14; --paper-shade: #020306; --ink: #A8A4FF; --route: #8C9BFF; --signal: #FF6B5E;
    --caption: #8790A0; --value: #E7EAF0; --text-2: #AEB5C2; --faint: #465061; --blip: #72AAFF;
    --chip: #273042; --chip-text: #E7EAF0; --live: #3DDC84; --warning: #FFB020; --notable: #FFCB45;
    --military: #A9C76B; --rule: #222A38; --paper-alt: #111722; --sky-top: #0C1730; --sky-mid: #18284A; --frame-shadow: 0, 0, 0;
    color-scheme: dark;
  }
}

:root[data-theme="dark"],
.night {
  --paper: #0A0E14; --paper-shade: #020306; --ink: #A8A4FF; --route: #8C9BFF; --signal: #FF6B5E;
  --caption: #8790A0; --value: #E7EAF0; --text-2: #AEB5C2; --faint: #465061; --blip: #72AAFF;
  --chip: #273042; --chip-text: #E7EAF0; --live: #3DDC84; --warning: #FFB020; --notable: #FFCB45;
  --military: #A9C76B; --rule: #222A38; --paper-alt: #111722; --sky-top: #0C1730; --sky-mid: #18284A; --frame-shadow: 0, 0, 0;
  color-scheme: dark;
}

*, *::before, *::after { box-sizing: border-box; }

html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; }
body {
  margin: 0;
  background: var(--paper);
  color: var(--value);
  font: 17px/1.55 var(--sans);
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}

img { max-width: 100%; }
a { color: var(--ink); }
::selection { background: color-mix(in srgb, var(--ink) 22%, transparent); }

:focus-visible { outline: 2px solid var(--signal); outline-offset: 3px; border-radius: 6px; }

.visually-hidden {
  position: absolute; width: 1px; height: 1px; margin: -1px; padding: 0; overflow: hidden;
  clip: rect(0 0 0 0); white-space: nowrap; border: 0;
}

.skip {
  position: absolute; left: 16px; top: -60px; z-index: 10;
  padding: 10px 16px; border-radius: 999px;
  background: var(--ink); color: var(--paper); font: 600 14px var(--mono); text-decoration: none;
}
.skip:focus { top: 16px; }

canvas.topo { display: block; opacity: 0; transition: opacity 0.8s ease; }
canvas.topo.is-drawn { opacity: 1; }

/* ------------------------------------------------------------------------------------------
   The radar */

.hero {
  position: relative;
  isolation: isolate;
  display: flex;
  flex-direction: column;
  min-height: max(680px, 100svh);
  overflow: hidden;
  background: var(--paper);
  border-bottom: 1px solid var(--rule);
  touch-action: pan-y;
  -webkit-user-select: none;
  user-select: none;
}
.hero.is-turning { cursor: grabbing; }

.hero-topo, .radar-bezel, .radar-edge {
  position: absolute; inset: 0; width: 100%; height: 100%;
}
.hero-topo { z-index: -1; }
.radar-bezel { pointer-events: none; overflow: visible; }
.radar-bezel .ticks { stroke: var(--faint); stroke-width: 1.2; stroke-linecap: round; fill: none; }
.radar-bezel text {
  font: 700 12px var(--mono); fill: var(--caption);
  text-anchor: middle; dominant-baseline: central;
}
.radar-bezel text.north { fill: var(--signal); }

.radar-edge { pointer-events: none; z-index: 1; }

.blip {
  position: absolute; left: 0; top: 0;
  width: 36px; height: 36px; margin: -18px 0 0 -18px; padding: 0;
  border: 0; border-radius: 50%; background: none;
  color: var(--blip); cursor: pointer; pointer-events: auto;
  will-change: transform;
}
.blip[hidden] { display: none; }
.blip .glyph { display: block; width: 26px; height: 26px; margin: 5px; fill: currentColor; }
.blip .mi {
  position: absolute; left: 50%; top: 50%;
  width: 3em; margin: -0.72em 0 0 -1.5em;
  font: 700 13px/1.44 var(--mono); text-align: center; color: var(--blip);
  text-shadow: 0 0 2px var(--paper), 0 0 5px var(--paper);
  pointer-events: none;
}
.blip[data-tag="military"] { color: var(--military); }
.blip[data-tag="military"] .mi { color: var(--military); }
.blip[data-tag="rare"]::after,
.blip[data-tag="government"]::after {
  content: ""; position: absolute; right: 3px; top: 3px;
  width: 7px; height: 7px; border-radius: 50%;
  background: var(--notable); box-shadow: 0 0 0 1.5px var(--paper);
}
.blip[data-tag="government"]::after { background: var(--ink); }
.blip:hover { color: var(--ink); }
.blip.is-focus, .blip.is-focus .mi { color: var(--signal); }
.blip.is-focus::before {
  content: ""; position: absolute; inset: -4px; border-radius: 50%;
  background: color-mix(in srgb, var(--signal) 16%, transparent);
  box-shadow: 0 0 0 1.5px color-mix(in srgb, var(--signal) 45%, transparent);
}

/* Helicopter rotors spin, as in the app. */
.rotor { transform-box: view-box; transform-origin: 32px 27px; animation: rotor 1.2s linear infinite; }
@keyframes rotor { to { transform: rotate(360deg); } }

.site-header {
  position: relative; z-index: 3;
  display: flex; align-items: center; gap: 20px;
  padding: max(18px, env(safe-area-inset-top)) var(--gutter) 0;
  -webkit-user-select: none; user-select: none;
}
.brand {
  display: inline-flex; align-items: center; gap: 11px;
  color: var(--value); text-decoration: none;
  font: 700 16px var(--mono); letter-spacing: -0.01em;
}
.brand img { width: 36px; height: 36px; border-radius: 22.5%; box-shadow: 0 0 0 0.5px rgba(0, 0, 0, 0.15); }
.site-nav { margin-left: auto; display: flex; gap: 24px; }
.site-nav a { color: var(--caption); text-decoration: none; font: 500 14px var(--mono); }
.site-nav a:hover { color: var(--ink); }

.theme-toggle {
  flex: none; display: grid; place-items: center;
  width: 38px; height: 38px; padding: 0; border-radius: 50%;
  border: 1px solid var(--rule);
  background: color-mix(in srgb, var(--paper) 70%, transparent);
  color: var(--value); cursor: pointer;
}
.theme-toggle:hover { color: var(--ink); border-color: var(--ink); }
.theme-toggle svg { width: 19px; height: 19px; fill: none; stroke: currentColor; stroke-width: 1.8; stroke-linecap: round; }
.theme-toggle .moon { display: none; fill: currentColor; stroke: none; }
.theme-toggle[data-night="true"] .moon { display: block; }
.theme-toggle[data-night="true"] .sun,
.theme-toggle[data-night="true"] .rays { display: none; }

.hero-body {
  position: relative; z-index: 2;
  flex: 1;
  display: flex; flex-direction: column; align-items: center; justify-content: center;
  padding: clamp(50px, 6vh, 64px) clamp(70px, 11vw, 150px) clamp(100px, 12vh, 116px);
  text-align: center;
  pointer-events: none;
}
.hero-body p,
.hero-body dl { text-shadow: 0 0 2px var(--paper), 0 0 6px var(--paper), 0 0 12px var(--paper); }

.flight { transition: opacity 0.18s ease, transform 0.18s ease; }
.flight.is-swapping { opacity: 0; transform: translateY(5px); }
.flight p { margin: 0; }
.flight-operator {
  font: 700 13px var(--mono); letter-spacing: 0.16em; text-transform: uppercase; color: var(--caption);
}
.flight-ident {
  margin: 4px 0 10px !important;
  font: 800 clamp(60px, min(10.5vw, 12vh), 136px)/0.98 var(--mono);
  letter-spacing: -0.035em;
  color: var(--ink);
}
.flight-route { display: flex; align-items: flex-start; justify-content: center; gap: clamp(16px, 3vw, 40px); }
.flight-route[hidden] { display: none; }
.airport b {
  display: block;
  font: 700 clamp(34px, 4.4vw, 56px)/1 var(--mono);
  letter-spacing: -0.01em;
  color: var(--route);
}
.airport small { display: block; margin-top: 7px; font: 500 12px var(--mono); color: var(--caption); }
.route-arrow {
  width: clamp(26px, 3vw, 40px); margin-top: clamp(8px, 1.1vw, 15px);
  fill: none; stroke: var(--signal); stroke-width: 3; stroke-linecap: round; stroke-linejoin: round;
}
.flight-type {
  display: flex; flex-wrap: wrap; align-items: center; justify-content: center; gap: 8px 10px;
  margin-top: clamp(12px, 2vh, 20px) !important;
}
.type-chip {
  padding: 4px 13px; border-radius: 999px;
  background: var(--chip); color: var(--chip-text);
  font: 700 14px var(--mono); text-shadow: none;
}
.notable-badge {
  padding: 3px 11px; border-radius: 999px;
  border: 1.5px solid currentColor; color: var(--notable);
  font: 800 12px var(--mono); letter-spacing: 0.1em; text-transform: uppercase;
}
.notable-badge[hidden] { display: none; }
.notable-badge[data-tag="military"] { color: var(--military); }
.notable-badge[data-tag="government"] { color: var(--ink); }
.type-name { flex-basis: 100%; font: 400 15px var(--mono); color: var(--caption); }

.flight-stats {
  display: grid; grid-template-columns: repeat(3, auto); justify-content: center;
  gap: 12px clamp(28px, 4vw, 60px);
  margin: clamp(16px, 2.4vh, 24px) 0 0;
}
.flight-stats dt { font: 700 12px var(--mono); letter-spacing: 0.16em; text-transform: uppercase; color: var(--caption); }
.flight-stats dd {
  display: flex; align-items: baseline; justify-content: center; gap: 4px;
  margin: 4px 0 0;
  font: 600 clamp(20px, 1.9vw, 26px) var(--mono); color: var(--value);
  font-variant-numeric: tabular-nums;
}
.flight-stats small { font: 500 0.6em var(--mono); color: var(--caption); }
.flight-stats svg { flex: none; align-self: center; width: 15px; height: 15px; }
.trend { fill: none; stroke-width: 2.4; stroke-linecap: round; stroke-linejoin: round; }
.trend[data-trend="up"] { stroke: var(--live); }
.trend[data-trend="down"] { stroke: var(--warning); transform: rotate(90deg); }
.trend[data-trend=""] { display: none; }
.pointer { fill: var(--signal); }

.hero .lead {
  max-width: 27em; margin: clamp(18px, 3.2vh, 40px) auto 0;
  font: 400 clamp(17px, 1.45vw, 20px)/1.5 var(--sans);
  color: var(--value);
}
.hero-actions {
  display: flex; flex-wrap: wrap; align-items: center; justify-content: center; gap: 12px 18px;
  margin-top: 20px;
}
.store-pill {
  display: inline-flex; align-items: center; gap: 10px;
  padding: 10px 18px; border-radius: 999px;
  border: 1.5px solid var(--ink);
  background: color-mix(in srgb, var(--paper) 80%, transparent);
  color: var(--ink);
  font: 700 14px var(--mono); text-shadow: none;
}
.store-pill i {
  width: 8px; height: 8px; border-radius: 50%;
  background: var(--live); box-shadow: 0 0 0 3px color-mix(in srgb, var(--live) 28%, transparent);
}
.platforms { font: 500 13px var(--mono); color: var(--caption); }

/* ------------------------------------------------------------------------------------------
   Sections */

.section { position: relative; padding: clamp(84px, 11vw, 150px) 0; }
/* Every other section sits on a slightly different paper, edged with a hairline, so each
   one reads as its own band. */
.section.alt {
  background: var(--paper-alt);
  box-shadow: inset 0 1px var(--rule), inset 0 -1px var(--rule);
}
.wrap { width: min(1160px, 100% - 2 * var(--gutter)); margin-inline: auto; }

.copy { max-width: 32rem; }
.copy.wide { max-width: 44rem; }
.copy p { margin: 0 0 1em; font-size: clamp(17px, 1.3vw, 19px); line-height: 1.58; color: var(--text-2); }
.copy p:last-child { margin-bottom: 0; }

h2 {
  margin: 0 0 22px;
  font: 700 clamp(34px, 4.5vw, 56px)/1.04 var(--sans);
  letter-spacing: -0.028em;
  color: var(--value);
  text-wrap: balance;
}

.device-label {
  margin: 0 0 14px !important;
  font: 700 14px var(--mono) !important;
  color: var(--signal) !important;
}

.points { list-style: none; margin: 32px 0 0; padding: 0; display: grid; gap: 16px; }
.points li { position: relative; padding-left: 30px; font-size: 16.5px; line-height: 1.5; color: var(--text-2); }
.points li b { color: var(--value); font-weight: 600; }
.points li::before {
  content: ""; position: absolute; left: 0; top: 0.2em;
  width: 17px; height: 17px;
  background: var(--blip);
  -webkit-mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 64 64'%3E%3Cpath d='M32 5C33.98 5 35.6 8.15 35.6 12L35.6 46L33.2 60L30.8 60L28.4 46L28.4 12C28.4 8.15 30.02 5 32 5Z'/%3E%3Cpath d='M32.5 25L57 37.5L57.5 40.5L32.5 36L31.5 36L6.5 40.5L7 37.5L31.5 25Z'/%3E%3Crect x='40.2' y='25.5' width='4.6' height='7.5' rx='2.3'/%3E%3Crect x='19.2' y='25.5' width='4.6' height='7.5' rx='2.3'/%3E%3Cpath d='M32.5 51L43 56.5L43.3 59L32.5 57L31.5 57L20.7 59L21 56.5L31.5 51Z'/%3E%3C/svg%3E") center / contain no-repeat;
          mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 64 64'%3E%3Cpath d='M32 5C33.98 5 35.6 8.15 35.6 12L35.6 46L33.2 60L30.8 60L28.4 46L28.4 12C28.4 8.15 30.02 5 32 5Z'/%3E%3Cpath d='M32.5 25L57 37.5L57.5 40.5L32.5 36L31.5 36L6.5 40.5L7 37.5L31.5 25Z'/%3E%3Crect x='40.2' y='25.5' width='4.6' height='7.5' rx='2.3'/%3E%3Crect x='19.2' y='25.5' width='4.6' height='7.5' rx='2.3'/%3E%3Cpath d='M32.5 51L43 56.5L43.3 59L32.5 57L31.5 57L20.7 59L21 56.5L31.5 51Z'/%3E%3C/svg%3E") center / contain no-repeat;
  transform: rotate(45deg);
}

.split {
  display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
  gap: clamp(40px, 6vw, 100px); align-items: center;
}
.split.reverse > :first-child { order: 2; }

figure { margin: 0; }
figcaption { font-size: 16px; line-height: 1.5; color: var(--text-2); }
figcaption b { color: var(--value); font-weight: 600; }

/* ------------------------------------------------------------------------------------------
   Devices: drawn frames around the real screenshots */

.device { position: relative; }
.device img { display: block; width: 100%; height: auto; background: #000; }

.phone {
  --w: 280px;
  width: var(--w);
  padding: calc(var(--w) * 0.03);
  border-radius: calc(var(--w) * 0.168);
  background: linear-gradient(150deg, #34353a, #121316 55%, #26272b);
  box-shadow:
    inset 0 0 0 1.5px rgba(255, 255, 255, 0.1),
    0 0 0 1px rgba(0, 0, 0, 0.3),
    0 32px 60px -24px rgba(var(--frame-shadow), 0.55),
    0 14px 26px -14px rgba(var(--frame-shadow), 0.35);
}
.phone img { border-radius: calc(var(--w) * 0.138); }

.tablet {
  --w: clamp(300px, 40vw, 500px);
  width: var(--w);
  justify-self: center;
  padding: calc(var(--w) * 0.028);
  border-radius: calc(var(--w) * 0.06);
  background: linear-gradient(150deg, #34353a, #121316 55%, #26272b);
  box-shadow:
    inset 0 0 0 1.5px rgba(255, 255, 255, 0.1),
    0 0 0 1px rgba(0, 0, 0, 0.3),
    0 40px 80px -30px rgba(var(--frame-shadow), 0.55);
}
.tablet img { border-radius: calc(var(--w) * 0.035); }

.watch {
  --w: clamp(170px, 18vw, 220px);
  width: var(--w);
  padding: calc(var(--w) * 0.075);
  border-radius: calc(var(--w) * 0.27);
  background: #000;
  box-shadow:
    0 0 0 calc(var(--w) * 0.03) #8b8c90,
    0 0 0 calc(var(--w) * 0.034) #46474b,
    0 30px 50px -20px rgba(0, 0, 0, 0.9);
}
.watch img { border-radius: calc(var(--w) * 0.17); }
.watch::after,
.watch::before { content: ""; position: absolute; border-radius: 4px; }
.watch::after {   /* Digital Crown */
  right: calc(var(--w) * -0.1); top: 28%;
  width: calc(var(--w) * 0.07); height: 20%;
  background: linear-gradient(90deg, #77787c, #b4b5b8 50%, #6a6b6f);
}
.watch::before {  /* Action button */
  left: calc(var(--w) * -0.065); top: 36%;
  width: calc(var(--w) * 0.035); height: 16%;
  background: #f26b22;
}

.tv {
  padding: 0.9%;
  border-radius: 1.6% / 2.8%;
  background: linear-gradient(180deg, #2a2d33, #121418 60%, #1c1f24);
  box-shadow:
    inset 0 0 0 1px rgba(255, 255, 255, 0.1),
    0 0 0 1px rgba(0, 0, 0, 0.6),
    0 60px 100px -40px rgba(0, 0, 0, 0.95);
}
.tv img { border-radius: 0.7% / 1.25%; }
[data-switcher-screen] { transition: opacity 0.25s ease; }
[data-switcher-screen].is-swapping { opacity: 0.15; }

/* Two phones, one in front of the other. */
.pair { display: grid; grid-template-areas: "stack"; justify-items: center; align-items: center; padding: 30px 0; }
.pair > * { grid-area: stack; }
.pair .phone { --w: clamp(200px, 21vw, 290px); }
.pair .back { transform: translate(36%, -6%); }
.pair .front { transform: translate(-32%, 6%); }

/* ------------------------------------------------------------------------------------------
   Details gallery */

.gallery {
  display: grid; grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: clamp(24px, 3.4vw, 48px);
  margin-top: clamp(48px, 6vw, 72px);
}
.gallery figure { display: flex; flex-direction: column; align-items: center; }
.gallery .phone { --w: clamp(200px, 22vw, 280px); }
.gallery figcaption { max-width: 19rem; margin-top: 28px; }

/* ------------------------------------------------------------------------------------------
   Sky View */

.sky {
  background: linear-gradient(180deg, var(--sky-mid) 0%, var(--sky-top) 50%, var(--sky-mid) 100%);
}

/* The notches are cut with a mask, which would clip a box-shadow, so the shadow is a filter
   on the wrapper. */
.pass-shadow {
  justify-self: center;
  width: min(370px, 100%);
  filter: drop-shadow(0 26px 30px rgba(20, 30, 60, 0.28)) drop-shadow(0 6px 10px rgba(20, 30, 60, 0.16));
}
.pass {
  --cut: 232px;
  border-radius: 26px;
  overflow: hidden;
  background: #F5F1E8;
  color: #2E2D2A;
  -webkit-mask:
    radial-gradient(circle at 0 var(--cut), transparent 14px, #000 14.5px) left / 51% 100% no-repeat,
    radial-gradient(circle at 100% var(--cut), transparent 14px, #000 14.5px) right / 51% 100% no-repeat;
          mask:
    radial-gradient(circle at 0 var(--cut), transparent 14px, #000 14.5px) left / 51% 100% no-repeat,
    radial-gradient(circle at 100% var(--cut), transparent 14px, #000 14.5px) right / 51% 100% no-repeat;
}
.pass-photo {
  position: relative; height: var(--cut);
  background: linear-gradient(180deg, #5E93D6 0%, #82B0E4 55%, #A6C9EE 100%);
}
.pass-chip {
  position: absolute; top: 14px; left: 14px;
  padding: 4px 9px; border-radius: 999px;
  background: rgba(16, 24, 44, 0.42); color: #fff;
  font: 700 11px var(--mono);
}
.pass-chip.brand { left: auto; right: 14px; letter-spacing: 0.08em; text-transform: uppercase; }
.speck {
  position: absolute; left: var(--x); top: var(--y);
  width: 7px; height: 2px; margin: -1px 0 0 -3.5px; border-radius: 2px;
  background: #2a3140; opacity: 0.75; transform: rotate(var(--r));
}
.lock { position: absolute; left: var(--x); top: var(--y); }
.lock i {
  position: absolute; left: -24px; top: -24px; width: 48px; height: 48px;
  border: 1.5px solid rgba(255, 255, 255, 0.95); border-radius: 50%;
  box-shadow: 0 0 0 4px rgba(255, 255, 255, 0.18);
}
.lock b {
  position: absolute; left: 30px; top: -38px;
  padding: 3px 8px; border-radius: 7px;
  background: rgba(58, 51, 214, 0.9); color: #fff;
  font: 700 12px var(--mono); white-space: nowrap;
}

.pass-body { padding: 22px 24px 24px; }
.pass-body p { margin: 0; }
.pass-head {
  display: flex; justify-content: space-between; gap: 12px;
  font: 700 11px var(--mono); letter-spacing: 0.12em; text-transform: uppercase; color: #75726C;
}
.pass-kind { color: #E5483B; }
.pass-route { display: flex; align-items: center; justify-content: space-between; margin-top: 12px; }
.pass-route b { display: block; font: 800 48px/1 var(--mono); letter-spacing: -0.02em; color: #3A33D6; }
.pass-route small { display: block; margin-top: 6px; font: 500 12px var(--mono); color: #75726C; }
.pass-route .to { text-align: right; }
.pass-route svg { width: 36px; height: 36px; fill: #E5483B; margin-bottom: 18px; }
.pass-progress { position: relative; height: 4px; margin: 16px 0 7px; border-radius: 2px; background: #DDD8CD; }
.pass-progress i {
  position: absolute; left: var(--p); top: 50%;
  width: 11px; height: 11px; margin: -5.5px 0 0 0; border-radius: 50%; background: #E5483B;
}
.pass-flown { font: 500 11.5px var(--mono); color: #75726C; }
.pass-grid { display: grid; grid-template-columns: minmax(0, 1.35fr) minmax(0, 1fr) minmax(0, 1fr); gap: 13px 10px; margin: 18px 0 0; }
.pass-grid dt { font: 700 9.5px var(--mono); letter-spacing: 0.14em; text-transform: uppercase; color: #8F8B84; }
.pass-grid dd { margin: 3px 0 0; font: 700 14px var(--mono); color: #2E2D2A; white-space: nowrap; }
.pass-type { margin-top: 14px !important; font: 500 12.5px var(--mono); color: #75726C; }
.pass-foot {
  display: flex; justify-content: space-between; align-items: flex-end; gap: 12px;
  margin-top: 16px; padding-top: 16px; border-top: 1.5px dashed #D6D0C3;
}
.barcode {
  width: 124px; height: 34px;
  background: repeating-linear-gradient(90deg,
    #2E2D2A 0 2px, transparent 2px 4px, #2E2D2A 4px 5px, transparent 5px 8px,
    #2E2D2A 8px 11px, transparent 11px 12px, #2E2D2A 12px 13px, transparent 13px 16px);
}
.pass-foot p { text-align: right; font: 700 13px var(--mono); }
.pass-foot small {
  display: block; margin-bottom: 3px;
  font: 700 9.5px var(--mono); letter-spacing: 0.14em; text-transform: uppercase; color: #8F8B84;
}

/* ------------------------------------------------------------------------------------------
   Logbook (a phone with its pages as tabs underneath) and alerts */

/* The stage is as tall as the phone, so the tabs stay put while the iPad comes and goes. */
.stage {
  --pw: clamp(250px, 24vw, 310px);
  position: relative;
  container-type: inline-size;
  display: grid; place-items: center;
  height: calc(var(--pw) * 2.235);
  margin-top: clamp(48px, 6vw, 72px);
}
.stage > .device {
  grid-area: 1 / 1;
  transition: opacity 0.35s ease, transform 0.35s ease, visibility 0s linear 0s;
}
.stage > .device.is-off {
  opacity: 0; transform: scale(0.96); visibility: hidden; pointer-events: none;
  transition: opacity 0.35s ease, transform 0.35s ease, visibility 0s linear 0.35s;
}
.stage .phone { --w: var(--pw); }
.tablet.landscape {
  --w: min(100cqw, var(--pw) * 3.17);
  padding: calc(var(--w) * 0.02);
  border-radius: calc(var(--w) * 0.042);
}
.tablet.landscape img { border-radius: calc(var(--w) * 0.024); }

.showcase-caption {
  max-width: 26rem; min-height: 3em; margin: 18px auto 0;
  font-size: 15px; line-height: 1.5; text-align: center; color: var(--text-2);
}

.lockphone { --w: clamp(240px, 22vw, 290px); justify-self: center; }

.lock-screen {
  position: relative; isolation: isolate; overflow: hidden;
  aspect-ratio: 1206 / 2622;
  display: flex; flex-direction: column; align-items: center;
  padding: 15% 4.5% 5%;
  border-radius: calc(var(--w) * 0.138);
  background: #1E545A;
  color: #fff;
  font-family: var(--sans);
}
.lock-screen canvas.topo { position: absolute; inset: 0; width: 100%; height: 100%; z-index: -1; }
.lock-screen p { margin: 0; }
.lock-date { font-size: calc(var(--w) * 0.054); font-weight: 600; opacity: 0.88; }
.lock-time { font-size: calc(var(--w) * 0.26); font-weight: 700; line-height: 1; letter-spacing: -0.035em; }
.lock-stack { width: 100%; margin-top: auto; display: grid; gap: calc(var(--w) * 0.022); }

.note {
  display: grid; grid-template-columns: auto minmax(0, 1fr) auto; gap: calc(var(--w) * 0.03);
  padding: calc(var(--w) * 0.035);
  border-radius: calc(var(--w) * 0.06);
  background: rgba(246, 246, 248, 0.82);
  -webkit-backdrop-filter: blur(16px); backdrop-filter: blur(16px);
  color: #1d1d1f;
  font-size: calc(var(--w) * 0.039); line-height: 1.3;
}
.note img { width: calc(var(--w) * 0.088); height: auto; border-radius: 23%; }
.note-title { font-weight: 650; }
.note time { font-size: 0.88em; color: #6e6e73; }

.activity {
  padding: calc(var(--w) * 0.04);
  border-radius: calc(var(--w) * 0.07);
  background: rgba(10, 14, 20, 0.88);
  -webkit-backdrop-filter: blur(16px); backdrop-filter: blur(16px);
  font-family: var(--mono); color: #E7EAF0;
}
.activity-head {
  display: flex; align-items: center; gap: 6px;
  font-size: calc(var(--w) * 0.034); font-weight: 700; color: #8790A0;
}
.activity-head svg { width: 1.3em; height: 1.3em; fill: none; stroke: #FF6B5E; stroke-width: 2; stroke-linecap: round; }
.activity-head circle { fill: #FF6B5E; stroke: none; }
.activity-head span:first-of-type { min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.activity-head .count { margin-left: auto; font-weight: 600; white-space: nowrap; }
.activity-flight { display: flex; justify-content: space-between; align-items: flex-end; margin: calc(var(--w) * 0.025) 0; }
.activity .op { font-size: calc(var(--w) * 0.03); font-weight: 600; text-transform: uppercase; color: #8790A0; }
.activity-flight b { font-size: calc(var(--w) * 0.078); font-weight: 800; color: #A8A4FF; }
.activity-flight p span { margin-left: 0.5em; font-size: calc(var(--w) * 0.044); font-weight: 700; color: #8C9BFF; }
.activity .where { text-align: right; }
.activity .where b { display: block; font-size: calc(var(--w) * 0.05); color: #E7EAF0; }
.activity .where span { font-size: calc(var(--w) * 0.034); color: #8790A0; }
.activity-foot {
  display: flex; justify-content: space-between; align-items: center;
  font-size: calc(var(--w) * 0.036); font-weight: 700; color: #A8A4FF;
}
.activity .stop { padding: 0.25em 0.9em; border-radius: 999px; background: rgba(255, 107, 94, 0.18); color: #FF6B5E; }

/* ------------------------------------------------------------------------------------------
   Night: Apple Watch and Apple TV */

.night {
  --paper: #111722;
  position: relative; isolation: isolate;
  background: var(--paper);
  color: var(--value);
}
.night > canvas.topo {
  position: absolute; inset: 0; width: 100%; height: 100%; z-index: -1;
  -webkit-mask: linear-gradient(transparent, #000 12%, #000 88%, transparent);
          mask: linear-gradient(transparent, #000 12%, #000 88%, transparent);
}
.night #tv { padding-top: 0; }

.watches {
  display: grid; grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: clamp(28px, 4vw, 60px);
  margin-top: clamp(56px, 7vw, 84px);
}
.watches figure { display: flex; flex-direction: column; align-items: center; }
.watches figcaption { max-width: 17rem; margin-top: 34px; text-align: center; }

.night .tv { margin-top: clamp(48px, 6vw, 72px); }
.tv-views, .showcase-tabs { display: flex; flex-wrap: wrap; justify-content: center; gap: 16px; margin-top: 28px; }
.tv-views button, .showcase-tabs button {
  display: flex; flex-direction: column; align-items: center; gap: 9px;
  padding: 0; border: 0; background: none; cursor: pointer;
  font: 600 13px var(--mono); color: var(--caption);
}
.tv-views button:focus-visible, .showcase-tabs button:focus-visible { outline: none; }
.tv-views img, .showcase-tabs img {
  display: block; width: clamp(104px, 13vw, 168px); height: auto; aspect-ratio: 16 / 9; object-fit: cover;
  border-radius: 8px; opacity: 0.5;
  outline: 2px solid transparent; outline-offset: 3px;
  transition: opacity 0.2s ease, outline-color 0.2s ease;
}
.showcase-tabs img { width: 76px; aspect-ratio: 3 / 4; object-position: top; border-radius: 10px; }
:is(.tv-views, .showcase-tabs) button:hover img { opacity: 0.8; }
:is(.tv-views, .showcase-tabs) button[aria-selected="true"] img { opacity: 1; outline-color: var(--ink); }
:is(.tv-views, .showcase-tabs) button[aria-selected="true"] span { color: var(--value); }
:is(.tv-views, .showcase-tabs) button:focus-visible img { outline-color: var(--signal); }

/* ------------------------------------------------------------------------------------------
   Close and footer */

.closing {
  position: relative; isolation: isolate; overflow: hidden;
  padding: clamp(100px, 13vw, 170px) 0;
  background: #153F45;
  color: #fff; text-align: center;
}
.closing canvas.topo { position: absolute; inset: 0; width: 100%; height: 100%; z-index: -1; }
.closing-icon {
  display: block; margin: 0 auto 34px;
  width: 112px; height: 112px; border-radius: 22.5%;
  box-shadow: 0 0 0 1px rgba(255, 255, 255, 0.16), 0 26px 50px -18px rgba(0, 0, 0, 0.7);
}
.closing h2 { color: #fff; }
.closing p { max-width: 30em; margin: 0 auto; font-size: clamp(17px, 1.4vw, 20px); line-height: 1.55; color: rgba(226, 242, 242, 0.84); }
.closing .hero-actions { margin-top: 34px; }
.store-pill.on-teal { border-color: rgba(255, 255, 255, 0.7); background: rgba(9, 32, 36, 0.4); color: #fff; }

.site-footer {
  padding: 52px 0 calc(60px + env(safe-area-inset-bottom));
  border-top: 1px solid var(--rule);
  background: var(--paper);
  font-size: 14px; line-height: 1.6; color: var(--caption);
}
.footer-top { display: flex; flex-wrap: wrap; justify-content: space-between; align-items: center; gap: 16px; margin-bottom: 22px; }
.footer-top .brand img { width: 28px; height: 28px; }
.footer-top nav { display: flex; gap: 22px; }
.footer-top nav a { font: 500 14px var(--mono); color: var(--value); text-decoration: none; }
.footer-top nav a:hover { color: var(--ink); }
.site-footer p { max-width: 60em; margin: 0 0 10px; }

/* ------------------------------------------------------------------------------------------
   Support and privacy */

.page-top { position: relative; isolation: isolate; overflow: hidden; padding-bottom: clamp(44px, 6vw, 72px); }
.page-top canvas.topo {
  position: absolute; inset: 0; width: 100%; height: 100%; z-index: -1;
  -webkit-mask: linear-gradient(#000 40%, transparent);
          mask: linear-gradient(#000 40%, transparent);
}
.site-nav a[aria-current="page"] { color: var(--ink); }
.page-title { max-width: 46rem; margin-top: clamp(56px, 8vw, 96px); }
.page-title h1 {
  margin: 0 0 10px;
  font: 700 clamp(36px, 5vw, 56px)/1.04 var(--sans); letter-spacing: -0.028em; color: var(--value);
}
.page-title p { margin: 0; font: 500 14px var(--mono); color: var(--caption); }

.doc { max-width: 46rem; padding-bottom: clamp(72px, 9vw, 120px); }
.doc h2 {
  margin: 48px 0 12px;
  font: 700 22px/1.25 var(--sans); letter-spacing: -0.01em;
}
.doc p, .doc li { color: var(--text-2); }
.doc strong { color: var(--value); font-weight: 600; }
.doc ul { padding-left: 22px; }
.doc li { margin: 8px 0; }
.doc li::marker { color: var(--faint); }

.summary, .contact, .doc details {
  border: 1px solid var(--rule); border-radius: 16px;
  background: color-mix(in srgb, var(--paper) 55%, #fff 45%);
}
:root[data-theme="dark"] .summary, :root[data-theme="dark"] .contact, :root[data-theme="dark"] .doc details {
  background: color-mix(in srgb, var(--paper) 92%, #fff 8%);
}
@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) .summary,
  :root:not([data-theme="light"]) .contact,
  :root:not([data-theme="light"]) .doc details { background: color-mix(in srgb, var(--paper) 92%, #fff 8%); }
}
.summary { padding: 20px 24px; }
.summary p { margin: 0; }

.doc details { margin: 10px 0; padding: 0; }
.doc summary {
  position: relative; padding: 16px 52px 16px 22px;
  list-style: none; cursor: pointer;
  font-weight: 600; color: var(--value);
}
.doc summary::-webkit-details-marker { display: none; }
.doc summary::after {
  content: ""; position: absolute; right: 22px; top: 50%;
  width: 9px; height: 9px; margin-top: -6px;
  border-right: 2px solid var(--caption); border-bottom: 2px solid var(--caption);
  transform: rotate(45deg); transition: transform 0.2s ease;
}
.doc details[open] summary::after { transform: rotate(225deg); margin-top: -2px; }
.doc details p { margin: 0; padding: 0 22px 18px; }

.contact { margin-top: 48px; padding: 24px; }
.contact h2 { margin-top: 0; }
.contact p { margin: 0; }
.contact a { font: 700 17px var(--mono); }

/* ------------------------------------------------------------------------------------------
   Smaller screens */

@media (max-width: 920px) {
  .split { grid-template-columns: minmax(0, 1fr); }
  .split.reverse > :first-child { order: 0; }
  .split > .pair, .split > .tablet, .split > .pass-shadow, .split > .lockphone { margin-top: 8px; }
}

@media (max-width: 760px) {
  .site-nav a:not(:last-child) { display: none; }
  .hero { min-height: max(620px, 100svh); }
  .hero-body { padding: 40px 56px 78px; }
  .flight-ident { margin: 2px 0 8px !important; font-size: clamp(52px, 15vw, 64px); }
  .airport b { font-size: 34px; }
  .airport small { margin-top: 5px; font-size: 11px; }
  .flight-type { margin-top: 12px !important; gap: 6px 8px; }
  .type-chip { font-size: 13px; padding: 3px 11px; }
  .type-name { font-size: 13.5px; }
  .flight-stats { grid-template-columns: repeat(2, auto); gap: 8px 32px; margin-top: 14px; }
  .flight-stats > div:last-child { grid-column: 1 / -1; }
  .flight-stats dt { font-size: 11px; }
  .flight-stats dd { font-size: 20px; margin-top: 2px; }
  .hero .lead { margin-top: 16px; font-size: 16px; }
  .hero-actions { margin-top: 14px; gap: 8px; }
  .store-pill { padding: 8px 14px; gap: 8px; font-size: 12.5px; }
  .platforms { display: none; }

  /* Galleries become a row you can swipe. */
  .gallery, .watches {
    grid-template-columns: none; grid-auto-flow: column; grid-auto-columns: 78%;
    overflow-x: auto; scroll-snap-type: x mandatory; scrollbar-width: none;
    margin-inline: calc(var(--gutter) * -1); padding: 6px var(--gutter) 30px;
  }
  .gallery::-webkit-scrollbar, .watches::-webkit-scrollbar { display: none; }
  .gallery figure, .watches figure { scroll-snap-align: center; }
  .watches { grid-auto-columns: 70%; }
  .watches .watch { --w: 180px; }
  .pair .phone { --w: min(54vw, 230px); }
  .stage { --pw: min(66vw, 270px); }
  .lockphone { --w: min(70vw, 280px); }
  .tablet { --w: min(100%, 420px); }
}

@media (max-width: 400px) {
  .hero-body { padding-inline: 50px; }
  .brand span { font-size: 15px; }
}

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after { transition-duration: 0.01ms !important; animation: none !important; }
}
