@font-face {
  font-family: Barlow;
  src: url("brand/fonts/barlow-400.woff2") format("woff2");
  font-style: normal;
  font-weight: 400;
  font-display: swap;
}
@font-face {
  font-family: Barlow;
  src: url("brand/fonts/barlow-600.woff2") format("woff2");
  font-style: normal;
  font-weight: 600;
  font-display: swap;
}
@font-face {
  font-family: Barlow;
  src: url("brand/fonts/barlow-700.woff2") format("woff2");
  font-style: normal;
  font-weight: 700;
  font-display: swap;
}
@font-face {
  font-family: "Barlow Semi Condensed";
  src: url("brand/fonts/barlow-semi-condensed-700.woff2") format("woff2");
  font-style: normal;
  font-weight: 700;
  font-display: swap;
}
@font-face {
  font-family: "IBM Plex Mono";
  src: url("brand/fonts/ibm-plex-mono-500.woff2") format("woff2");
  font-style: normal;
  font-weight: 500;
  font-display: swap;
}

:root {
  color-scheme: dark;
  --ui: Barlow, "Segoe UI", Helvetica, Arial, sans-serif;
  --display: "Barlow Semi Condensed", "Arial Narrow", Barlow, sans-serif;
  --mono: "IBM Plex Mono", "SFMono-Regular", Consolas, monospace;
  --ink: #f2f4f2;
  --ink-soft: #d7dcd8;
  --muted: #adb4b0;
  --paper: #1a1c1d;
  --wash: #282c2b;
  --line: #383d3b;
  --lime: #75ff53;
  --lime-hover: #8cff6c;
  --map-bg: #141617;
  --hud: #161819;
  --hud-text: #f3f5f3;
  --hud-muted: #bac1bc;
  --hud-line: rgb(195 201 198 / .22);
  --edge: clamp(14px, 1.5vw, 24px);
  --head-h: 54px;
  --brand-inset: 5px;
  --panel-w: clamp(310px, 25.4vw, 337px);
  --panel-top: calc(var(--edge) + var(--head-h) + 12px);
  --map-legend-bottom: calc(10px + env(safe-area-inset-bottom));
  --search-bottom-clearance: calc(22px + .875rem + env(safe-area-inset-bottom));
  --shadow: 0 18px 50px -16px rgb(0 0 0 / .61), 0 2px 9px rgb(0 0 0 / .34);
  --hud-shadow: 0 5px 19px rgb(0 0 0 / .33);
  --radius: 15px;
}
*, *::before, *::after { box-sizing: border-box; }
html, body { width: 100%; min-height: 100%; margin: 0; }
html { font-family: var(--ui); font-size: 100%; color: var(--ink); }
body { min-height: 100vh; min-height: 100dvh; overflow: hidden; background: var(--map-bg); -webkit-font-smoothing: antialiased; }
::selection { background: #a7ff93; color: #10160f; }
button, input, select, textarea { font: inherit; }
button, a, input, select, textarea { -webkit-tap-highlight-color: transparent; }
button { color: inherit; }
button:not(:disabled), select:not(:disabled), [role="button"]:not([aria-disabled="true"]) { cursor: pointer; }
button:disabled { cursor: not-allowed; opacity: .58; }
button, a { touch-action: manipulation; }
a { color: inherit; text-underline-offset: .2em; }
button, a, input, select, textarea { outline-offset: 3px; }
:focus-visible { outline: 2px solid #75ff53; }
[hidden] { display: none !important; }
.visually-hidden, .sr-only {
  position: absolute !important; width: 1px; height: 1px; overflow: hidden; padding: 0; margin: -1px;
  border: 0; clip: rect(0,0,0,0); clip-path: inset(50%); white-space: nowrap;
}
.skip-link {
  position: fixed; z-index: 3000; top: 5px; left: 5px; transform: translateY(-150%);
  padding: .65rem 1rem; border-radius: 9px; background: var(--lime); color: #0c190c; font-weight: 700;
}
.skip-link:focus { transform: none; }
.icon {
  width: 1.125rem; height: 1.125rem; display: inline-block; flex: 0 0 auto; vertical-align: -.2em;
  fill: none; stroke: currentColor; stroke-width: 1.7; stroke-linecap: round; stroke-linejoin: round;
}

/* Navigation sits independently above the cartographic canvas. */
.masthead {
  position: fixed; top: max(var(--edge), env(safe-area-inset-top)); right: max(var(--edge), env(safe-area-inset-right));
  left: max(var(--edge), env(safe-area-inset-left)); z-index: 50; display: flex; align-items: center;
  height: var(--head-h); gap: 10px; pointer-events: none;
}
.masthead > * { pointer-events: auto; }
.brand, .main-nav, .account-action, .search-reopen, .map-tools, .map-top > * {
  border: 1px solid var(--hud-line);
  background: rgb(17 19 19 / .97);
  color: var(--hud-text);
  box-shadow: var(--hud-shadow);
}
.brand {
  height: var(--head-h); display: inline-flex; align-items: center; flex-shrink: 0; gap: 9px;
  padding: var(--brand-inset); padding-inline-end: 14px;
  border-radius: 13px; text-decoration: none; white-space: nowrap;
}
.brand-mark { display: block; width: auto; height: 100%; flex: none; }
.brand-word { font: 700 1.67rem/.95 var(--display); letter-spacing: -.038em; }
.brand-hq {
  display: inline-flex; align-items: center; justify-content: center; align-self: center;
  padding: 3.8px 5px; margin-inline-start: -1.5px; border: 1px solid rgb(117 255 83 / .42); border-radius: 4.8px;
  color: var(--lime); font: 500 .864rem/1 var(--mono); letter-spacing: .035em;
}
.main-nav { height: var(--head-h); padding: 5px; display: flex; align-items: stretch; gap: 3px; border-radius: 13px; }
.nav-link, .account-action {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px; border: 0;
  text-decoration: none; white-space: nowrap; font: 600 .99rem/1 var(--ui); letter-spacing: .005em;
}
.nav-link { padding: 0 14px; border-radius: 8px; background: transparent; color: #c9cdcb; }
.nav-link:hover { color: white; background: #292d2b; }
.saved-short { display: none; }
.nav-link[aria-current="page"], .nav-link[aria-pressed="true"], .nav-link.is-active, .nav-link.active {
  color: var(--hud-text); background: #313533; box-shadow: inset 0 0 0 1px rgb(240 246 240 / .075);
}
.nav-link[aria-current="page"] .icon, .nav-link.is-active .icon, .nav-link.active .icon { color: var(--lime); }
.account-action {
  margin-left: auto; height: var(--head-h); padding: 0 18px; border: 1px solid var(--hud-line);
  border-radius: 13px; background: rgb(17 19 19 / .97); color: #f4f7f3;
}
.account-action:hover, .search-reopen:hover, .map-tool:hover { background: #2f3431; }
.masthead :focus-visible, .map-panel :focus-visible, .search-reopen:focus-visible { outline-color: var(--lime); }

/* The map retains its viewport when the search panel opens, scrolls or closes. */
.workspace, .map-panel, #map.map-canvas, .map-canvas {
  position: fixed; inset: 0; width: 100%; height: 100vh; height: 100dvh;
}
.workspace { isolation: isolate; }
.map-panel { z-index: 0; overflow: hidden; isolation: isolate; background: var(--map-bg); }
.map-canvas { z-index: 0; background: var(--map-bg); touch-action: none; }
.map-canvas canvas { display: block; }
.map-canvas .leaflet-container { background: var(--map-bg); }
.map-top {
  position: absolute; z-index: 4; top: var(--panel-top); right: max(var(--edge), env(safe-area-inset-right));
  display: flex; align-items: center; gap: 7px; max-width: calc(100% - var(--panel-w) - 3 * var(--edge));
  pointer-events: none;
}
.map-top > * { display: inline-flex; align-items: center; gap: 8px; min-height: 35px; padding: 7px 11px; border-radius: 9px; }
.map-title, .map-badge { color: var(--hud-text); font-size: .92rem; font-weight: 600; line-height: 1.2; }
.map-badge { pointer-events: auto; }
.map-count { color: var(--lime); font: 500 .81rem/1 var(--mono); font-variant-numeric: tabular-nums; }
.status-dot {
  display: inline-block; width: 7px; height: 7px; flex: 0 0 7px; margin: 0 1px; border-radius: 50%;
  background: var(--lime); box-shadow: 0 0 0 3px rgb(117 255 83 / .17);
}
.status-dot.offline, .status-dot.stale, [data-state="offline"] .status-dot, [data-state="stale"] .status-dot {
  background: #ffc087; box-shadow: 0 0 0 3px rgb(255 192 135 / .14);
}
.utc-clock { color: var(--hud-text); font: 500 .8rem/1.25 var(--mono); font-variant-numeric: tabular-nums; white-space: nowrap; }
.utc-clock .icon { width: .95rem; height: .95rem; color: var(--hud-muted); }
.utc-label, .clock-label { color: var(--hud-muted); }
.map-tools {
  position: absolute; z-index: 5; right: max(var(--edge), env(safe-area-inset-right));
  bottom: calc(max(var(--edge), env(safe-area-inset-bottom)) + 26px); display: flex; flex-direction: column;
  padding: 3px; border-radius: 12px;
}
.map-tool {
  display: grid; place-items: center; width: 37px; height: 37px; padding: 0; border: 0;
  border-radius: 7px; background: transparent; color: var(--hud-text);
}
.map-tool .icon { width: 19px; height: 19px; }
.map-tool + .map-tool { margin-top: 1px; }
.map-tool.is-active, .map-tool[aria-pressed="true"] { color: var(--lime); background: #24372a; }
.map-legend {
  position: absolute; z-index: 4; left: max(var(--edge), env(safe-area-inset-left)); bottom: var(--map-legend-bottom);
  display: inline-flex; align-items: center; gap: 3px; padding: 2.5px 5.5px; border-radius: 3px;
  background: #151818f2; color: #d6dcd6; white-space: nowrap; font: 400 .75rem/.875rem "Helvetica Neue", Arial, sans-serif;
}
.map-legend .icon { width: 1em; height: 1em; color: var(--lime); }
.map-legend a { color: inherit; }
.map-info {
  position: absolute; z-index: 4; right: max(10px, env(safe-area-inset-right)); bottom: calc(10px + env(safe-area-inset-bottom));
  display: grid; place-items: center; width: 24px; height: 24px; border-radius: 50%; background: #151818f2; color: #d6dcd6;
}
.map-info .icon { width: 16px; height: 16px; }
.map-info:hover { color: white; }
.credits-page { overflow: auto; }
.credits-page main { max-width: 42rem; margin: 0 auto; padding: clamp(28px, 6vw, 76px) 24px; }
.credits-page .brand { position: static; display: inline-flex; width: fit-content; text-decoration: none; }
.credits-page h1 { margin: 36px 0 24px; font: 700 clamp(2.4rem, 6vw, 3.4rem)/1.1 var(--display); }
.credits-page h2 { margin: 26px 0 7px; font: 700 1.4rem/1.2 var(--display); }
.credits-page p { color: var(--ink-soft); line-height: 1.55; margin: 7px 0 14px; }
.credits-page main > a:last-child { display: inline-block; margin-top: 18px; }
.credits-page a:not(.brand) { color: var(--lime); }
.map-toast {
  position: absolute; z-index: 8; left: 50%; bottom: 3.1rem; transform: translateX(-50%);
  width: max-content; max-width: min(90%, 410px); padding: .65rem .9rem; border: 1px solid var(--hud-line); border-radius: 9px;
  background: var(--hud); color: var(--hud-text); box-shadow: var(--hud-shadow); font-size: .94rem;
}
.mobile-search-jump { display: none; }

/* Instrument surfaces use neutral graphite with a single luminous green active state. */
.search-panel {
  position: fixed; z-index: 15; top: var(--panel-top); left: max(var(--edge), env(safe-area-inset-left));
  width: var(--panel-w); max-height: calc(100vh - var(--panel-top) - var(--search-bottom-clearance));
  max-height: calc(100dvh - var(--panel-top) - var(--search-bottom-clearance)); overflow: auto;
  overscroll-behavior: contain; scrollbar-width: thin; scrollbar-color: #4e5551 transparent;
  border: 1px solid rgb(218 226 219 / .22); border-radius: var(--radius); background: var(--paper); box-shadow: var(--shadow);
}
.panel-head { position: relative; padding: 21px 21px 17px; }
.panel-head h1, .dialog-head h2, .detail-card h2 {
  margin: 0; color: var(--ink); font-family: var(--display); font-weight: 700; line-height: .99; letter-spacing: -.034em;
}
.panel-head h1 { padding-right: 29px; font-size: clamp(2.15rem, 2.5vw, 2.65rem); }
.panel-intro, .account-intro {
  margin: .48rem 0 0; color: var(--muted); font-size: .99rem; line-height: 1.45;
}
.icon-button, #panel-toggle {
  display: inline-grid; place-items: center; width: 33px; height: 33px; flex-shrink: 0;
  padding: 0; border: 1px solid var(--line); border-radius: 8px; background: transparent; color: var(--muted);
}
.icon-button:hover, #panel-toggle:hover { background: var(--wash); color: var(--ink); }
.panel-head #panel-toggle { position: absolute; top: 21px; right: 18px; }
.search-reopen {
  position: fixed; z-index: 16; top: var(--panel-top); left: max(var(--edge), env(safe-area-inset-left));
  display: none; align-items: center; gap: 8px; min-height: 43px; padding: 0 13px; border-radius: 10px; font-weight: 600;
}
body.panel-collapsed .search-panel { display: none; }
body.panel-collapsed .search-reopen { display: inline-flex; }
.mode-tabs {
  display: flex; align-items: stretch; gap: 2px; padding: 3px; margin: 0 20px 16px;
  border: 1px solid #353936; border-radius: 10px; background: #151817;
}
.mode-tab, .mode-tabs > button {
  display: inline-flex; flex: 1 1 0; align-items: center; justify-content: center; gap: 5px; min-width: 0;
  min-height: 34px; padding: 4px 3px; border: 0; border-radius: 6px; background: transparent;
  color: #a9b0aa; font-size: .94rem; font-weight: 600; line-height: 1.2; white-space: nowrap;
}
.mode-tabs .icon { width: 15px; height: 15px; }
.mode-tab:hover, .mode-tabs > button:hover { color: var(--ink); background: #262b27; }
.mode-tabs [aria-selected="true"], .mode-tabs [aria-pressed="true"], .mode-tab.is-active, .mode-tab.active {
  background: #30372f; color: #f4faf2; box-shadow: 0 1px 3px rgb(0 0 0 / .32);
}
.mode-tabs [aria-selected="true"] .icon, .mode-tab.is-active .icon { color: var(--lime); }
.search-form, .account-form { display: grid; gap: 13px; align-content: start; }
.search-panel .search-form { padding: 0 21px 21px; }
.field { position: relative; display: grid; align-content: start; gap: 6px; min-width: 0; }
.field > label, label.field > span:first-child, .field-label {
  display: block; color: var(--ink-soft); font-size: .93rem; line-height: 1.2; font-weight: 600;
}
.field input, .field select, .field textarea, .input-wrap, .search-form > input, .account-form > input {
  width: 100%; min-width: 0; min-height: 44px; border: 1px solid #4a504d; border-radius: 8px;
  appearance: none; background: #222525; color: var(--ink); font-size: 1rem; line-height: 1.3;
}
.field > input, .field > select, .field > textarea, .search-form > input, .account-form > input { padding: 9px 11px; }
.field select {
  padding-right: 31px; background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='12' viewBox='0 0 12 12'%3E%3Cpath d='m2 4 4 4 4-4' stroke='%23aab3ad' stroke-width='1.6' fill='none' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E");
  background-repeat: no-repeat; background-position: right 10px center;
}
.input-wrap { display: flex; align-items: center; gap: 8px; padding: 0 10px; }
.input-wrap .icon { color: #a7afa9; width: 16px; height: 16px; }
.input-wrap > input, .input-wrap > select, .input-wrap > textarea {
  flex: 1; width: 100%; min-width: 0; min-height: 40px; padding: 8px 0; border: 0; border-radius: 0;
  box-shadow: none; outline: none; background-color: transparent; color: var(--ink);
}
.input-wrap > select { padding-right: 18px; background-position: right 1px center; }
.field input::placeholder, .input-wrap input::placeholder { color: #a1a8a3; opacity: 1; }
.field input[type="date"] { font-variant-numeric: tabular-nums; }
input[type="date"]::-webkit-calendar-picker-indicator { opacity: .66; cursor: pointer; }
.input-wrap:focus-within, .field > :where(input, select, textarea):focus, .account-form > input:focus {
  border-color: #75df5b; box-shadow: 0 0 0 3px rgb(117 255 83 / .16); outline: 0;
}
.field-pair { display: grid; grid-template-columns: minmax(0,1fr) minmax(0,1fr); gap: 9px; }
.field-hint, .field small { color: var(--muted); font-size: .86rem; line-height: 1.35; }
.primary-action, .secondary-action, .inline-action {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px; text-decoration: none;
  font-family: var(--ui); font-weight: 700; line-height: 1.2;
}
.primary-action {
  min-height: 45px; padding: 10px 17px; border: 1px solid #6be849; border-radius: 8px;
  background: var(--lime); color: #10180e; box-shadow: 0 2px 0 rgb(0 0 0 / .18);
}
.primary-action:hover:not(:disabled) { background: var(--lime-hover); border-color: #91fc75; }
.primary-action:active:not(:disabled), .secondary-action:active:not(:disabled) { transform: translateY(1px); }
.search-form .primary-action, .account-form .primary-action { width: 100%; }
.secondary-action {
  min-height: 39px; padding: 8px 13px; border: 1px solid #4a504a; border-radius: 8px;
  background: #222525; color: #e4e8e4; font-size: .96rem;
}
.secondary-action:hover:not(:disabled) { background: var(--wash); border-color: #78827a; }
.inline-action { padding: 3px 0; border: 0; background: none; color: #99ea88; font-size: .93rem; }
.inline-action:hover { text-decoration: underline; text-underline-offset: .15em; }

/* Live aircraft and search results. */
.live-list { padding: 14px 15px 12px; border-top: 1px solid var(--line); background: #151717; }
.section-head, .card-head, .dialog-head { display: flex; align-items: center; justify-content: space-between; gap: 10px; }
.section-head { min-height: 29px; margin: 0 5px 7px; }
.section-head h2, .live-list h2, .result-section h2 {
  margin: 0; color: var(--ink); font: 700 1.25rem/1.16 var(--display); letter-spacing: -.014em;
}
.live-count, .live-row-time {
  color: var(--muted); font: 500 .76rem/1.3 var(--mono); font-variant-numeric: tabular-nums;
}
.live-count { display: inline-flex; gap: 5px; align-items: center; }
.live-list .status-dot { width: 6px; height: 6px; flex-basis: 6px; background: #75ff53; box-shadow: none; }
.flight-row {
  display: grid; grid-template-columns: 33px minmax(0,1fr) auto; align-items: center; gap: 9px;
  width: 100%; padding: 10px 5px; border: 0; border-bottom: 1px solid #303532; border-radius: 0;
  background: transparent; text-align: left; text-decoration: none; color: var(--ink);
}
.flight-row:last-child { border-bottom: 0; }
.flight-row:hover { background: #282c28; border-radius: 6px; }
.flight-symbol {
  display: grid; place-items: center; width: 32px; height: 32px; border: 1px solid #414841; border-radius: 8px;
  background: #272c29; color: #a2ea92;
}
.flight-symbol .icon { width: 17px; height: 17px; }
.flight-text, .flight-end { display: grid; align-content: center; gap: 3px; min-width: 0; }
.flight-number, .card-number { color: #f3f5f1; font: 500 .95rem/1.15 var(--mono); letter-spacing: -.025em; }
.flight-meta, .flight-end small, .card-subtitle { color: var(--muted); font-size: .88rem; line-height: 1.22; }
.flight-text > * { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.flight-end { display: flex; align-items: center; justify-content: flex-end; gap: 5px; color: var(--ink-soft); font-size: .91rem; font-weight: 600; font-variant-numeric: tabular-nums; text-align: right; white-space: nowrap; }
.flight-end .icon { width: 15px; height: 15px; color: #b1b9b1; }
.live-list .section-head h2 { width: 100%; }
.list-toggle {
  display: flex; align-items: center; justify-content: space-between; gap: 10px;
  width: 100%; min-height: 29px; padding: 0; border: 0; border-radius: 5px;
  background: none; color: inherit; font: inherit; letter-spacing: inherit; text-align: left;
}
.list-toggle .live-count { padding-inline: 6px; }
.list-toggle:hover { background: var(--wash); color: var(--ink); }
.list-toggle .icon { width: 15px; height: 15px; }
.list-toggle[aria-expanded="false"] .icon { transform: rotate(-90deg); }
.list-message { display: block; margin: 8px 5px; }
.field-pair.single-field { grid-template-columns: 1fr; }
.status-tag {
  display: inline-flex; align-items: center; gap: 5px; padding: 4px 7px; border-radius: 5px;
  background: #283529; color: #a1eca1; font-size: .78rem; line-height: 1.2; font-weight: 700;
}
.status-tag.delayed, .status-tag.warning, .status-tag[data-status="delayed"] { background: #3e3324; color: #f6c68a; }
.status-tag.cancelled, .status-tag.error, .status-tag[data-status="cancelled"] { background: #412b28; color: #ffb1a4; }
.status-tag.neutral { background: #343837; color: var(--ink-soft); }
.results, .search-results, .result-section { padding: 0 19px 17px; }
.result-card, .saved-card {
  display: grid; gap: 10px; width: 100%; margin: 0; padding: 13px 14px; border: 1px solid var(--line);
  border-radius: 10px; background: #222525; color: var(--ink); text-align: left; text-decoration: none;
}
.result-card + .result-card, .saved-card + .saved-card { margin-top: 8px; }
button.result-card:hover, a.result-card:hover { border-color: #626e63; background: #2a302b; }
.card-head { align-items: baseline; }
.card-head h3, .card-head strong { margin: 0; color: var(--ink); font-weight: 700; }
.card-head .card-number { font-weight: 500; }
.card-route { display: flex; align-items: center; flex-wrap: wrap; gap: 8px; color: var(--ink-soft); font-weight: 600; }
.card-route .icon { width: 16px; height: 16px; color: #a2afa4; }
.card-facts { display: flex; align-items: baseline; flex-wrap: wrap; gap: 6px 13px; color: var(--muted); font-size: .91rem; line-height: 1.4; }
.card-facts dt, .card-facts dd { margin: 0; }
.card-facts strong, .card-facts dd { color: var(--ink-soft); }
.result-load-more { width: 100%; margin-top: 9px; }
.detail-card {
  position: absolute; right: calc(max(var(--edge), env(safe-area-inset-right)) + 57px);
  bottom: calc(max(var(--edge), env(safe-area-inset-bottom)) + 25px); z-index: 7;
  width: min(328px, calc(100% - 83px)); max-height: min(65vh, 490px); overflow: auto; overscroll-behavior: contain;
  scrollbar-width: thin; scrollbar-color: #4e5551 transparent;
  border: 1px solid #4b514d; border-radius: 13px; background: var(--paper); box-shadow: var(--shadow);
}
.detail-content { display: flow-root; padding: 17px; }
.detail-tabs {
  position: sticky; top: 0; z-index: 1; display: flex; overflow-x: auto; overscroll-behavior-x: contain;
  padding: 0 4px; border-bottom: 1px solid var(--line); background: #202422; scrollbar-width: thin;
}
.detail-tab-item { position: relative; display: flex; align-items: center; flex: 1 0 max-content; min-width: 0; }
.detail-tab-item + .detail-tab-item { border-left: 1px solid #363c38; }
.detail-tab, .detail-tab-close { border: 0; border-radius: 0; background: transparent; color: var(--muted); }
.detail-tab {
  flex: 1; min-height: 35px; padding: 6px 4px 6px 10px; color: var(--ink-soft);
  font: 600 .8rem/1.15 var(--mono); text-align: left; white-space: nowrap;
}
.detail-tab-close { flex: none; width: 28px; min-height: 35px; padding: 0; font: 400 1rem/1 var(--ui); }
.detail-tab-item:has([aria-selected="true"]) { background: var(--paper); box-shadow: inset 0 -2px var(--lime); }
.detail-tab[aria-selected="true"], .detail-tab:hover, .detail-tab-close:hover { color: var(--lime); }
.detail-tabs button:focus-visible { outline-offset: -3px; }
.detail-card h2 { font-size: 1.7rem; }
.detail-card h3 { margin: 0; color: var(--ink); }
.detail-card p { margin: .4rem 0; line-height: 1.42; }
.detail-content > .card-head { align-items: center; gap: 9px; }
.detail-content > .card-head h2 { min-width: 0; overflow-wrap: anywhere; }
.isolate-flight {
  display: inline-flex; align-items: center; flex: none; gap: 5px; min-height: 33px; margin-left: auto;
  color: var(--ink-soft); font: 500 .81rem/1.15 var(--ui); white-space: nowrap; cursor: pointer;
}
.isolate-flight input { width: 14px; height: 14px; margin: 0; accent-color: var(--lime); cursor: pointer; }
.isolate-flight:has(:checked) { color: var(--lime); }
.isolate-flight:has(:disabled) { opacity: .6; cursor: default; }
.detail-card .icon-button, .dialog-head .icon-button { font: 400 1.42rem/1 var(--ui); }
.detail-card .detail-subtitle { color: var(--muted); margin: 3px 0 8px; font-size: .94rem; }
.detail-content > .status-tag { margin-top: 4px; }
.flight-path-toggle {
  display: flex; align-items: center; gap: 8px; margin-top: 7px; min-height: 34px; padding: 7px 9px;
  border: 1px solid var(--line); border-radius: 7px; background: #202322; color: var(--ink);
  font: 600 .94rem/1.15 var(--ui); cursor: pointer;
}
.flight-path-toggle:has(:checked) { border-color: #405044; background: #222a24; }
.flight-path-toggle input { margin: 0; width: 16px; height: 16px; flex: none; accent-color: var(--lime); cursor: pointer; }
.flight-path-toggle small { margin-left: auto; color: #b3bfb5; font: 400 .77rem/1.15 var(--ui); }
.availability-label { white-space: pre-wrap; }
.availability-qualifier { font-size: .85em; font-weight: 400; white-space: nowrap; }
.detail-card .flight-detail-route { margin: 13px 0 9px; overflow-wrap: anywhere; color: var(--ink); font: 700 1.55rem/1.1 var(--display); }
.leg-times, .flight-metrics { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); align-items: stretch; }
.leg-times { margin: 10px 0 4px; border: 1px solid #414741; border-radius: 8px; background: #232625; }
.leg-time { min-width: 0; display: flex; flex-direction: column; gap: 4px; padding: 10px; }
.leg-time + .leg-time { border-left: 1px solid #414741; }
.leg-time small, .metric dt { color: var(--muted); font-size: .79rem; line-height: 1.25; }
.leg-time small:first-child { color: var(--ink-soft); font-weight: 600; }
.leg-time strong { color: var(--ink); font: 500 1.16rem/1.2 var(--mono); font-variant-numeric: tabular-nums; }
.leg-time span { color: var(--ink-soft); font-size: .88rem; }
.flight-metrics { gap: 0 13px; margin: 8px 0 0; }
.flight-metrics .metric { min-width: 0; padding: 8px 0; border-bottom: 1px solid var(--line); }
.metric dd { margin-top: 2px; overflow-wrap: anywhere; font-size: .91rem; line-height: 1.32; font-weight: 600; font-variant-numeric: tabular-nums; }
.detail-actions, .saved-actions, .account-links { display: flex; align-items: center; flex-wrap: wrap; gap: 9px 12px; }
.detail-actions { margin-top: 14px; }
.detail-actions .primary-action, .detail-actions .secondary-action { min-height: 38px; padding-block: 7px; font-size: .94rem; }
.notice {
  padding: 10px 12px; margin: 0; border: 1px solid #3d5040; border-radius: 8px;
  background: #202b22; color: #bcdac0; font-size: .94rem; line-height: 1.4;
}
.notice.error, .notice.is-error, .notice[data-state="error"] { border-color: #6a4641; background: #362624; color: #ffbdb0; }
.notice:empty { display: none; }

/* Personal account and flight library. */
dialog.dialog {
  width: min(438px, calc(100vw - 32px)); max-height: min(86vh, 790px); max-height: min(86dvh, 790px);
  margin: auto; padding: 0; overflow: auto; overscroll-behavior: contain; border: 1px solid #4b524d;
  border-radius: 17px; background: var(--paper); color: var(--ink); box-shadow: var(--shadow);
}
dialog.dialog::backdrop { background: rgb(0 0 0 / .65); }
dialog.dialog:not([open]) { display: none; }
.dialog-inner { display: grid; gap: 16px; padding: 23px; }
.dialog-head { align-items: flex-start; }
.dialog-head h2 { padding-top: 1px; font-size: clamp(1.8rem, 4vw, 2.2rem); }
.dialog-head p, .account-intro { margin: 0; }
.dialog-inner .icon-button { border-color: #3f4641; background: #262b27; }
.dialog-inner .search-form, .dialog-inner .account-form { padding: 0; gap: 13px; }
.dialog-inner .account-links { justify-content: center; }
.saved-flight-list { display: grid; gap: 9px; }
.saved-flight-list .saved-card { margin: 0; }
.saved-card > :is(h3, p) { margin: 0; }
.saved-card > .card-head { font: 500 1rem/1.22 var(--mono); }
.saved-card .saved-actions { margin-top: 3px; }
.recovery-code {
  display: block; padding: 13px; border: 1px dashed #658162; border-radius: 8px; background: #222b23;
  color: #c1edb8; font: 500 .97rem/1.52 var(--mono); overflow-wrap: anywhere; user-select: all;
}

@media (min-width: 1500px) {
  :root { --panel-w: 350px; }
  .masthead { gap: 12px; }
  .panel-head { padding-top: 23px; }
}
@media (max-width: 950px) and (min-width: 761px) {
  .map-top { flex-direction: column; align-items: flex-end; gap: 5px; }
  .nav-link { padding-inline: 11px; }
}
@media (max-height: 690px) and (min-width: 761px) {
  :root { --head-h: 48px; --edge: 12px; }
  .panel-head { padding-top: 16px; padding-bottom: 13px; }
  .panel-head #panel-toggle { top: 15px; }
  .live-list { padding-top: 10px; }
}
@media (max-width: 760px), (pointer: coarse) and (max-height: 500px) {
  :root {
    --head-h: 40px; --brand-inset: 4px;
    --map-legend-bottom: calc(14px + env(safe-area-inset-bottom));
  }
  /* Keep a full-height touch target around each compact header control. */
  .masthead :is(a, button) { position: relative; }
  .masthead :is(a, button)::after {
    content: ""; position: absolute; inset: 50% 0 auto; height: 44px; transform: translateY(-50%);
  }
  .detail-card {
    --detail-height-share: .65;
    /* Include the two one-pixel borders in the natural height of a short card. */
    height: calc((var(--detail-content-height) + 2px) * var(--detail-height-share));
    max-height: calc(min(65vh, 490px) * var(--detail-height-share));
  }
}
@media (max-width: 760px) {
  :root { --edge: 11px; --panel-w: calc(100vw - 2 * var(--edge)); }
  .masthead { gap: 6px; }
  .brand, .main-nav, .account-action { border-radius: 10px; }
  .brand { gap: 6px; padding-inline-end: 8px; }
  .brand-word { font-size: 1.33rem; }
  .brand-hq { font-size: .756rem; padding: 2.6px 3.8px; }
  .main-nav { margin-left: auto; padding: 3px; }
  .main-nav .nav-link:first-child:has(+ .nav-link) { display: none; }
  .nav-link, .account-action { gap: 5px; padding-inline: 9px; font-size: .9rem; }
  .nav-link .icon, .account-action .icon { width: 15px; height: 15px; }
  .account-action { margin-left: 0; }
  .search-panel, body.panel-collapsed .search-panel, .search-reopen, body.panel-collapsed .search-reopen { display: none; }
  .mobile-search-jump {
    position: fixed; left: max(var(--edge), env(safe-area-inset-left)); right: max(var(--edge), env(safe-area-inset-right));
    top: calc(max(var(--edge), env(safe-area-inset-top)) + var(--head-h) + 9px);
    z-index: 6; display: flex; align-items: center; gap: 9px; width: auto; min-height: 45px;
    padding: 9px 13px; border: 1px solid #454c47; border-radius: 10px; background: var(--paper);
    color: #e9ede9; box-shadow: var(--hud-shadow); text-align: left; text-decoration: none; font-weight: 600;
  }
  .mobile-search-jump .icon { color: #86f474; }
  body.panel-mobile-open .search-panel {
    display: block; z-index: 25; left: max(var(--edge), env(safe-area-inset-left)); right: max(var(--edge), env(safe-area-inset-right));
    top: auto; bottom: var(--search-bottom-clearance); width: auto;
    max-height: calc(100vh - var(--head-h) - 2 * var(--edge) - var(--search-bottom-clearance));
    max-height: calc(100dvh - var(--head-h) - 2 * var(--edge) - var(--search-bottom-clearance));
    border-radius: 16px; box-shadow: 0 18px 65px rgb(0 0 0 / .65);
  }
  body.panel-mobile-open .search-panel::before {
    content: ""; display: block; width: 32px; height: 4px; margin: 8px auto -2px; border-radius: 5px; background: #606962;
  }
  body.panel-mobile-open .mobile-search-jump { visibility: hidden; }
  .panel-head { padding: 16px 18px 14px; }
  .panel-head h1 { font-size: 2.2rem; }
  .panel-head #panel-toggle { top: 14px; }
  .mode-tabs { margin-inline: 17px; margin-bottom: 13px; }
  .search-panel .search-form { padding: 0 18px 18px; }
  .map-top {
    top: calc(max(var(--edge), env(safe-area-inset-top)) + var(--head-h) + 64px);
    left: max(var(--edge), env(safe-area-inset-left)); right: max(var(--edge), env(safe-area-inset-right));
    justify-content: space-between; max-width: none; gap: 4px;
  }
  .map-top > * { gap: 6px; min-height: 30px; padding: 5px 8px; border-radius: 7px; }
  .map-title, .map-badge { font-size: .85rem; }
  .map-count, .utc-clock { font-size: .74rem; }
  .utc-clock .icon { width: 13px; height: 13px; }
  .map-tools { bottom: calc(max(var(--edge), env(safe-area-inset-bottom)) + 40px); }
  .map-tool { width: 41px; height: 41px; }
  .detail-card {
    right: max(var(--edge), env(safe-area-inset-right)); left: max(var(--edge), env(safe-area-inset-left));
    bottom: calc(max(var(--edge), env(safe-area-inset-bottom)) + 33px); width: auto;
    max-height: calc(min(56vh, 100vh - var(--head-h) - 142px) * var(--detail-height-share));
    max-height: calc(min(56dvh, 100dvh - var(--head-h) - 142px - env(safe-area-inset-top)) * var(--detail-height-share));
  }
  .detail-content { padding: 15px; }
  .detail-tab, .detail-tab-close { min-height: 40px; }
  .detail-tab-close { width: 34px; }
  .isolate-flight { min-height: 40px; }
  .flight-path-toggle { min-height: 44px; }
  .map-panel:has(.detail-card:not([hidden])) .map-tools { visibility: hidden; }
  .detail-card:not([hidden]) + .map-toast { top: calc(max(var(--edge), env(safe-area-inset-top)) + var(--head-h) + 101px); bottom: auto; }
  dialog.dialog {
    inset: auto 0 0; width: calc(100vw - 12px); max-height: 90vh; max-height: 90dvh;
    margin: 0 auto max(6px, env(safe-area-inset-bottom)); border-radius: 16px;
  }
  .dialog-inner { padding: 20px; }
}
@media (max-width: 430px) {
  :root { --head-h: 37px; }
  .masthead { gap: 5px; }
  .brand { gap: 5px; padding-inline-end: 7px; }
  .brand-word { font-size: 1.20rem; }
  .main-nav .nav-link, .account-action { padding-inline: 7px; }
}
@media (max-width: 389px) {
  .saved-full, .account-action [data-account-label] { display: none; }
  .saved-short { display: inline; }
  .account-action { width: 42px; flex: 0 0 42px; }
}
@media (max-width: 360px) {
  .brand { gap: 4px; }
  .brand-word { font-size: 1.2rem; }
  .nav-link, .account-action { padding-inline: 6px; font-size: .85rem; }
  .masthead { gap: 4px; }
}
@media (prefers-reduced-motion: no-preference) {
  .nav-link, .account-action, .mode-tab, .map-tool, .primary-action, .secondary-action, .icon-button, .flight-row {
    transition: background-color .15s ease, color .15s ease, border-color .15s ease, box-shadow .15s ease;
  }
}
@media (forced-colors: active) {
  .brand, .main-nav, .account-action, .search-panel, .map-top > *, .map-tools, .map-legend,
  .status-tag, .detail-card, dialog.dialog { border: 1px solid CanvasText; }
  .mode-tabs [aria-selected="true"], .nav-link[aria-current="page"] { outline: 2px solid Highlight; }
}
.owner-page { height: auto; min-height: 100dvh; overflow: auto; background: #121614; color: #ecf2ee; font-family: var(--ui); }
.owner-panel { max-width: 490px; margin: 8vh auto; padding: 26px; background: #1c201e; border: 1px solid #38413c; border-radius: 13px; }
.owner-panel h1 { font: 700 2.15rem/1.1 var(--display); margin: 20px 0; }
.owner-back, .owner-panel .inline-action { color: var(--lime); }
.owner-panel form, .owner-panel fieldset { display: grid; gap: 12px; }
.owner-panel fieldset { border: 0; margin: 0; padding: 0; }
.owner-panel legend { margin-bottom: 10px; font-weight: 700; }
.owner-option { display: flex; align-items: flex-start; gap: 11px; padding: 12px; border: 1px solid #414a43; border-radius: 7px; }
.owner-option input { accent-color: #83ff59; }
.owner-option small { display: block; margin-top: 4px; color: #bdc8c0; }
.owner-panel input[type=password] { padding: 10px; background: #121614; border: 1px solid #68756b; color: white; }
.owner-usage { margin: 18px 0; line-height: 1.45; }
.aircraft-technical { border-top: 1px solid var(--line); margin-top: 13px; padding-top: 10px; }
.aircraft-technical summary { font-weight: 600; cursor: pointer; color: var(--ink-soft); }
