/* The flight radiation page (/flight-radiation, ADR 0074). The map, diagram
   and timeline colours are data colours and stay the same in both themes; the
   map and diagram sit on the brand night sky. Dark overrides are in
   flight-radiation-dark.css. */

html:not(.js) [data-needs-js] { display: none; }
.js .flight-nojs { display: none; }
.flight-nojs { margin: 12px 0; }
.flight { display: flex; flex-direction: column; gap: 8px; }
.flight-tool { display: grid; grid-template-columns: minmax(0, 1fr); gap: 18px; margin-top: 8px; }
@media (min-width: 900px) { .flight-tool { grid-template-columns: minmax(0, 320px) minmax(0, 1fr); align-items: start; } }
.flight-tool .flight-controls { order: 2; }
@media (min-width: 900px) { .flight-tool .flight-controls { order: 0; } }
.flight-controls { gap: 14px; }
.flight-controls fieldset { border: 0; margin: 0; padding: 0; min-width: 0; }
.flight-controls legend { padding: 0; margin-bottom: 4px; font-size: 0.8rem; font-weight: 600; text-transform: uppercase; letter-spacing: 0.06em; color: var(--accent-sun); }
.flight-controls label { display: block; font-size: 0.9rem; color: var(--muted); margin: 8px 0 4px; }
.flight-controls input[type="text"], .flight-controls input[type="date"], .flight-controls input[type="time"],
.flight-controls input[type="number"], .flight-controls select {
  width: 100%; min-height: 44px; padding: 8px; font: inherit; font-size: 16px;
  color: var(--text); background: var(--bg); border: 1px solid var(--line); border-radius: 10px;
}
.flight-controls input[type="range"] { width: 100%; accent-color: var(--accent-sun); }
.flight :is(input, select, button):focus-visible { outline: 2px solid var(--accent-moon); outline-offset: 2px; }
.fr-row { display: grid; grid-template-columns: minmax(0, 1.3fr) minmax(0, 1fr); gap: 10px; }
.fr-iconbtn { min-width: 44px; min-height: 44px; border-radius: 10px; border: 1px solid var(--line); background: var(--surface); color: var(--text); font: inherit; cursor: pointer; }
.fr-iconbtn:hover { border-color: var(--accent-sun); }
.fr-error { color: #b2391b; font-size: 0.9rem; margin-top: 6px; }
.fr-error:empty { display: none; }
.fr-chip { border: 1px solid var(--line); background: transparent; color: var(--muted); border-radius: 999px; padding: 6px 12px; min-height: 36px; font: inherit; font-size: 0.88rem; cursor: pointer; }
.fr-chip:hover, .fr-chip[aria-pressed="true"] { color: var(--text); border-color: var(--accent-sun); }
.fr-check { display: flex !important; gap: 10px; align-items: flex-start; }
.fr-check input { width: 20px; height: 20px; margin-top: 2px; flex: none; accent-color: var(--accent-sun); }
.flight-controls .hint { margin-top: 6px; }

.flight-stage { display: flex; flex-direction: column; gap: 14px; min-width: 0; }
.flight-map { gap: 10px; padding: 14px; }
.fr-maphead { display: flex; justify-content: space-between; align-items: center; gap: 10px; flex-wrap: wrap; }
.fr-routeline { display: flex; align-items: center; flex-wrap: wrap; gap: 4px 10px; font-size: 1.05rem; }
.fr-routeline b { font-weight: 600; letter-spacing: 0.02em; }
.fr-swap { min-height: 32px; padding: 4px 10px; }
.fr-findrow { display: flex; justify-content: space-between; align-items: center; gap: 8px 12px; flex-wrap: wrap; }
.fr-find input {
  width: min(240px, 100%); min-height: 40px; padding: 6px 12px; font: inherit; font-size: 16px;
  color: var(--text); background: var(--bg); border: 1px solid var(--line); border-radius: 999px;
}
.fr-find input:focus-visible { outline: 2px solid var(--accent-moon); outline-offset: 2px; }
@media (max-width: 600px) { .fr-find, .fr-find input { width: 100%; } }
.fr-legendname { margin: 0; }
.fr-mapbox { position: relative; width: 100%; aspect-ratio: 2 / 1; min-height: 200px; border-radius: 12px; overflow: hidden; background: #05071a; touch-action: none; }
.fr-mapbox.is-globe { aspect-ratio: 1 / 1; max-height: 600px; }
.fr-mapbox canvas, .fr-mapbox svg { position: absolute; inset: 0; width: 100%; height: 100%; }
/* Picking airports on the map: every airport is a faint dot, the busiest are labelled, and a click
   opens a small "fly from / fly to" choice beside it. */
.fr-mapbox.is-over svg { cursor: pointer; }
.fr-mapbox.is-globe svg { cursor: grab; }
.fr-mapbox.is-globe.is-over svg { cursor: pointer; }
.fr-apdots { fill: none; stroke: rgb(255 247 230 / 0.38); stroke-width: 2.6; stroke-linecap: round; }
.fr-popdot { fill: #fff7e6; opacity: 0.85; }
.fr-poplabel { fill: #fff7e6; font-size: 10.5px; font-weight: 500; letter-spacing: 0.03em; stroke: #05071a; stroke-width: 3px; paint-order: stroke; opacity: 0.88; }
.fr-poplabel.is-covered { display: none; }
.fr-hoverring { fill: none; stroke: #fff7e6; stroke-width: 2; }
.fr-pick {
  position: absolute; z-index: 3; min-width: 200px; padding: 10px 12px; border-radius: 12px;
  border: 1px solid var(--line); background: var(--surface); box-shadow: var(--shadow); color: var(--text);
}
.fr-pick p { margin: 0 0 8px; font-size: 0.92rem; }
.fr-pickalso { display: flex; flex-wrap: wrap; align-items: center; gap: 6px; font-size: 0.85rem; color: var(--muted); }
.fr-pickalso .fr-chip { min-height: 30px; padding: 2px 10px; }
.fr-pickbtns { display: flex; gap: 8px; }
.fr-pickbtns button { flex: 1; padding: 6px 12px; white-space: nowrap; font-size: 0.9rem; }
.fr-pickbtns button[aria-pressed="true"] { border-color: var(--accent-sun); font-weight: 600; }
.fr-readout { font-size: 0.9rem; color: var(--muted); min-height: 2.6em; }
.fr-readout b { color: var(--text); font-weight: 600; }
.fr-solar { color: #ec6038; }
.fr-legend { display: flex; align-items: center; flex-wrap: wrap; gap: 4px 10px; font-size: 0.85rem; color: var(--muted); }
.fr-legbar { flex: 1 1 200px; height: 10px; border-radius: 5px; }
.fr-legticks { position: relative; flex-basis: 100%; height: 16px; font-size: 0.78rem; }
.fr-legticks span { position: absolute; transform: translateX(-50%); }
.fr-scrub { display: grid; grid-template-columns: 44px minmax(0, 1fr); gap: 8px 10px; align-items: center; }
.fr-scrub input[type="range"] { width: 100%; accent-color: var(--accent-sun); }
.fr-times { grid-column: 1 / -1; display: grid; grid-template-columns: auto minmax(0, 1fr) auto; gap: 4px 10px; font-size: 0.85rem; color: var(--muted); }
.fr-times #fr-tmid { text-align: center; }
@media (max-width: 600px) {
  .fr-times { grid-template-columns: auto auto; }
  .fr-times #fr-tright { text-align: right; }
  .fr-times #fr-tmid { grid-column: 1 / -1; grid-row: 2; text-align: start; }
}

/* Overlay on the map (always on the dark map background). */
.fr-graticule { fill: none; stroke: rgb(255 247 230 / 0.07); }
.fr-land { fill: rgb(255 247 230 / 0.035); stroke: rgb(255 247 230 / 0.42); stroke-width: 0.8; }
.fr-borders { fill: none; stroke: rgb(255 247 230 / 0.14); stroke-width: 0.6; }
.fr-sphere { fill: none; stroke: rgb(255 247 230 / 0.25); }
.fr-terminator { fill: none; stroke: #c9a86a; stroke-width: 1.3; stroke-dasharray: 5 4; opacity: 0.9; }
.fr-route-shadow { fill: none; stroke: #05071a; stroke-width: 9; stroke-linecap: round; opacity: 0.55; }
.fr-route-edge { fill: none; stroke: #fff7e6; stroke-width: 6; stroke-linecap: round; }
.fr-route path { fill: none; stroke-width: 3.4; stroke-linecap: round; }
.fr-ap { fill: #fff7e6; stroke: #05071a; stroke-width: 2; }
.fr-maplabel { fill: #fff7e6; font-size: 12.5px; font-weight: 500; stroke: #05071a; stroke-width: 3.5px; paint-order: stroke; }
.fr-nightlabel { opacity: 0.85; font-weight: 400; }
.fr-sunglow { fill: #c9a86a; opacity: 0.25; }
.fr-sun { fill: #fff7e6; }
.fr-plane { stroke: #fff7e6; stroke-width: 2.5; }
.fr-pulse { fill: none; stroke: #fff7e6; animation: fr-pulse 1.8s ease-out infinite; }
@keyframes fr-pulse { from { r: 7; opacity: 0.9; } to { r: 18; opacity: 0; } }
@media (prefers-reduced-motion: reduce) { .fr-pulse { animation: none; opacity: 0; } }

.flight-results { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 12px; }
.flight-results .fr-big, .flight-results .fr-stat:last-child { grid-column: 1 / -1; }
@media (min-width: 640px) {
  .flight-results { grid-template-columns: repeat(3, minmax(0, 1fr)); }
  .flight-results .fr-stat:last-child { grid-column: auto; }
}
.fr-stat { gap: 4px; padding: 14px 16px; }
.fr-k { font-size: 0.85rem; color: var(--muted); }
.fr-v { font-size: clamp(1.5rem, 2.6vw, 1.9rem); font-weight: 300; line-height: 1.15; white-space: nowrap; font-variant-numeric: tabular-nums; }
.fr-v span { font-size: 0.95rem; color: var(--muted); margin-left: 4px; }
.fr-big .fr-v { font-size: clamp(2rem, 4vw, 2.8rem); }
.fr-s { font-size: 0.85rem; color: var(--muted); }
.fr-dot { display: inline-block; width: 9px; height: 9px; border-radius: 50%; margin-right: 5px; }
.fr-dot-gcr { background: #7488ee; }
.fr-dot-sep { background: #ec6038; }

.flight-section { margin-top: 36px; scroll-margin-top: 12px; }
.flight-section h2 { font-size: clamp(1.3rem, 3vw, 1.6rem); line-height: 1.2; margin-bottom: 10px; }
.flight-section h3 { font-size: 1.05rem; margin: 18px 0 6px; }
.flight-lede, .flight-prose p { max-width: 72ch; margin-bottom: 10px; }
.flight-section > .hint { margin-top: 10px; max-width: 80ch; }
.flight-columns { display: grid; grid-template-columns: minmax(0, 1fr); gap: 8px 32px; }
@media (min-width: 820px) { .flight-columns { grid-template-columns: repeat(2, minmax(0, 1fr)); } }

.fr-chart { position: relative; height: 460px; margin-top: 8px; }
.fr-chart > svg { position: absolute; inset: 0; width: 100%; height: 100%; }
.fr-tip { position: absolute; z-index: 2; pointer-events: none; padding: 7px 9px; border-radius: 8px; border: 1px solid var(--line); background: var(--surface); box-shadow: var(--shadow); font-size: 0.8rem; color: var(--muted); white-space: nowrap; }
.fr-tip b { color: var(--text); }
.fr-tick { fill: var(--muted); font-size: 11px; }
.fr-label { fill: var(--muted); font-size: 12px; }
.fr-grid { stroke: var(--line); }
.fr-nightband { fill: rgb(116 136 238 / 0.08); }
.fr-up { fill: #c9a86a; }
.fr-twilight { fill: #8a7d9b; }
.fr-down { fill: #2f3a78; }
.fr-threshold { stroke: #c78a1a; stroke-dasharray: 4 4; }
.fr-cum { fill: none; stroke: var(--text); stroke-width: 2; }
.fr-alt { fill: rgb(201 168 106 / 0.25); stroke: #c9a86a; stroke-width: 1.2; }
.fr-rc { fill: none; stroke: #3f9d8f; stroke-width: 2; }
.fr-rc-storm { fill: none; stroke: #ec6038; stroke-width: 1.5; stroke-dasharray: 4 3; }
.fr-cursor { stroke: var(--text); opacity: 0.45; }

.fr-groups th, .fr-groups td { white-space: normal; min-width: 9rem; }
.fr-groups td:last-child { min-width: 14rem; }
.fr-groups .muted { display: block; margin-top: 6px; font-size: 0.85rem; }
.fr-pill { display: inline-block; padding: 2px 10px; border-radius: 999px; font-size: 0.8rem; font-weight: 600; white-space: nowrap; }
.fr-pill-vlow { background: #e3f3ef; color: #1f6b5e; }
.fr-pill-low { background: var(--accent-moon-soft); color: var(--accent-moon); }
.fr-pill-note { background: var(--accent-sun-soft); color: #9a5a07; }
.fr-pill-high { background: #f6dcd6; color: #8c2a17; }

.flight-diagram { margin: 0; }
.flight-diagram svg { display: block; width: 100%; height: auto; }
.flight-diagram figcaption { margin-top: 8px; font-size: 0.88rem; color: var(--muted); }

.fr-kv { display: grid; grid-template-columns: minmax(0, 1fr); gap: 12px; margin: 14px 0 4px; }
@media (min-width: 760px) { .fr-kv { grid-template-columns: repeat(3, minmax(0, 1fr)); } }
.fr-kvcard { gap: 4px; padding: 14px 16px; }
.fr-n { font-size: clamp(1.2rem, 2.2vw, 1.45rem); font-weight: 300; line-height: 1.25; font-variant-numeric: tabular-nums; }
.fr-mini { position: relative; height: 200px; }
.fr-mini svg { position: absolute; inset: 0; width: 100%; height: 100%; }
.fr-phi { fill: none; stroke: #c78a1a; stroke-width: 1.5; }
.fr-phi-forecast { stroke-dasharray: 4 4; }
.fr-phidot { fill: var(--text); }
.fr-refs ol { padding-left: 20px; font-size: 0.88rem; color: var(--muted); }
.fr-refs li { margin-bottom: 6px; }
.fr-refs summary { cursor: pointer; font-weight: 600; }
