/* FlightPointer public flight map — the StellarTeq hub's look: dark slate glass over a faint
   radar backdrop, teal accents, HUD corner brackets, monospace instrument labels. */
:root {
    --text: #c7ccd6; --text-strong: #e6e9ef; --muted: #8b93a7; --label: #8fb9b2;
    --accent: #19c3b1; --accent-text: #5eead4; --link: #2dd4bf; --ok: #3ccf8e;
    --glass:
        linear-gradient(118deg, rgba(255,255,255,.055) 0%, rgba(255,255,255,.015) 26%, transparent 42%),
        linear-gradient(155deg, rgba(38,50,68,.55) 0%, rgba(22,29,41,.62) 55%, rgba(17,23,33,.68) 100%);
    --glass-border: rgba(148,226,213,.13);
    --glass-shadow: inset 0 1px 0 rgba(255,255,255,.08), inset 0 -1px 0 rgba(0,0,0,.3), 0 10px 30px rgba(0,0,0,.28);
    --hud: rgba(94,234,212,.7);
    --mono: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
    --top: 3.4rem;
    color-scheme: dark;
}
* { box-sizing: border-box; }
html { font-size: clamp(15px, 0.35vw + 9px, 18px); }
body {
    margin: 0; color: var(--text); font-family: 'Helvetica Neue', Helvetica, Arial, sans-serif;
    background:
        repeating-radial-gradient(circle at 88% -8%, rgba(25,195,177,.045) 0 1px, transparent 1.5px 140px),
        radial-gradient(1100px 700px at 88% -8%, rgba(25,195,177,.10), transparent 62%),
        radial-gradient(900px 600px at -5% 105%, rgba(56,189,248,.06), transparent 60%),
        #10151e;
    background-attachment: fixed;
}
a { color: var(--link); }
h1 { margin: 0; font-size: 1.35rem; font-weight: 600; color: var(--text-strong); }
.muted { color: var(--muted); }
.small { font-size: .76rem; }
.label, .panel h2 { font: 600 .68rem var(--mono); letter-spacing: .16em; text-transform: uppercase; color: var(--label); margin: 0 0 .4rem; }

/* Header: a glass flight strip */
.top {
    position: sticky; top: 0; z-index: 30; height: var(--top); display: flex; align-items: center; gap: 1rem; padding: 0 1.25rem;
    background: rgba(16,21,30,.72); backdrop-filter: blur(16px) saturate(140%); -webkit-backdrop-filter: blur(16px) saturate(140%);
    border-bottom: 1px solid rgba(148,226,213,.1); box-shadow: inset 0 1px 0 rgba(255,255,255,.05);
}
.brand { display: flex; align-items: center; gap: .65rem; text-decoration: none; color: var(--text-strong); font-weight: 600; font-size: 1.1rem; }
.brand img { filter: drop-shadow(0 0 12px rgba(25,195,177,.35)); }
.brand span { display: flex; flex-direction: column; line-height: 1.05; }
.brand small { font: 600 .62rem var(--mono); letter-spacing: .16em; text-transform: uppercase; color: var(--accent-text); opacity: .85; }
.top-spacer { flex: 1; }
.top-utc { font: 600 .74rem var(--mono); letter-spacing: .14em; color: var(--accent-text); font-variant-numeric: tabular-nums; }
.live-dot { display: inline-flex; align-items: center; gap: .4rem; font: 600 .66rem var(--mono); letter-spacing: .14em; text-transform: uppercase; color: var(--label); }
.live-dot i { width: 7px; height: 7px; border-radius: 50%; background: var(--ok); box-shadow: 0 0 8px rgba(60,207,142,.9); animation: pulse 2s ease-in-out infinite; }
@keyframes pulse { 50% { opacity: .35; } }

/* Three columns, one page scroll; the map sticks in view between them. */
.layout { display: grid; grid-template-columns: 330px minmax(0, 1fr) 350px; gap: 1rem; padding: 1rem 1.25rem; align-items: start; }
.col-left, .col-right { display: flex; flex-direction: column; gap: .8rem; padding: 6px; }
.col-map { position: sticky; top: calc(var(--top) + 1rem); display: flex; flex-direction: column; height: calc(100dvh - var(--top) - 2rem); min-height: 420px; padding-top: 6px; }
.map-head { display: flex; align-items: baseline; justify-content: space-between; gap: 1rem; margin-bottom: .6rem; flex-wrap: wrap; }
.map-head .muted { font-size: .8rem; }
.map-wrap { flex: 1; min-height: 0; border: 1px solid var(--glass-border); border-radius: 12px; overflow: hidden; box-shadow: 0 10px 30px rgba(0,0,0,.3); }
#adsb-map { width: 100%; height: 100%; background: #0d1117; }
#adsb-map .osm-dark { filter: invert(1) hue-rotate(180deg) brightness(.82) contrast(.92) saturate(.35); }
#adsb-map .leaflet-control-attribution { background: rgba(20,26,36,.8); color: #8b93a7; }
#adsb-map .leaflet-control-attribution a { color: #5eead4; }
.ac-divicon { background: none; border: none; }
.ac-marker { width: 96px; text-align: center; }
.ac-icon { width: 28px; height: 28px; margin: 0 auto; transition: transform .4s linear; }
.ac-label { line-height: 1.05; margin-top: 1px; pointer-events: none; white-space: nowrap; }
.ac-cs { font-size: 10px; font-weight: 600; color: #eef2f7; text-shadow: 0 1px 2px #000, 0 0 3px #000; }
.ac-ty { font-size: 9px; color: #aeb7c2; text-shadow: 0 1px 2px #000, 0 0 3px #000; }

/* Glass panels with HUD corner brackets */
.panel {
    position: relative; background: var(--glass); border: 1px solid var(--glass-border); border-radius: 12px; padding: .85rem .95rem .75rem;
    box-shadow: var(--glass-shadow); backdrop-filter: blur(14px) saturate(140%); -webkit-backdrop-filter: blur(14px) saturate(140%);
}
.panel::before {
    content: ""; position: absolute; inset: -6px; pointer-events: none; opacity: .55; --l: 12px; --t: 1.5px;
    background:
        linear-gradient(var(--hud), var(--hud)) top left / var(--l) var(--t) no-repeat,
        linear-gradient(var(--hud), var(--hud)) top left / var(--t) var(--l) no-repeat,
        linear-gradient(var(--hud), var(--hud)) top right / var(--l) var(--t) no-repeat,
        linear-gradient(var(--hud), var(--hud)) top right / var(--t) var(--l) no-repeat,
        linear-gradient(var(--hud), var(--hud)) bottom left / var(--l) var(--t) no-repeat,
        linear-gradient(var(--hud), var(--hud)) bottom left / var(--t) var(--l) no-repeat,
        linear-gradient(var(--hud), var(--hud)) bottom right / var(--l) var(--t) no-repeat,
        linear-gradient(var(--hud), var(--hud)) bottom right / var(--t) var(--l) no-repeat;
}

/* 3D feeder board */
.pcb { padding: 0; overflow: visible; }
/* The board show (pcb-show.js): a canvas with the split-flap board laid over it. */
.pcb-stage { position: relative; height: 250px; border-radius: 12px 12px 0 0; overflow: hidden;
    background: radial-gradient(circle at 50% 55%, rgba(25,195,177,.12), transparent 65%); }
.pcb-canvas { position: absolute; inset: 0; width: 100%; height: 100%; display: block; cursor: grab; touch-action: pan-y; }
.pcb-canvas:active { cursor: grabbing; }
.pcb-loading { position: absolute; inset: 0; display: grid; place-items: center; font: 600 .7rem var(--mono); letter-spacing: .14em; text-transform: uppercase; color: var(--label); }

/* Split-flap departures board */
.flap-board {
    position: absolute; left: .55rem; right: .55rem; top: 50%; transform: translateY(-50%);
    display: flex; flex-direction: column; gap: 4px; padding: .55rem .5rem .6rem; border-radius: 8px;
    background: linear-gradient(180deg, rgba(14,18,25,.94), rgba(8,11,16,.96)); border: 1px solid rgba(148,226,213,.18);
    box-shadow: inset 0 1px 0 rgba(255,255,255,.06), 0 12px 30px rgba(0,0,0,.5);
    opacity: 0; pointer-events: none; transition: opacity .35s ease;
}
.flap-board.on { opacity: 1; }
.flap-head { display: flex; align-items: center; gap: .4rem; margin-bottom: 2px; }
.flap-cap { font: 600 8px var(--mono); letter-spacing: .14em; text-transform: uppercase; color: var(--label); }
.flap-dep { margin-left: auto; color: #f5a742; }
.flap-cols, .flap-line { display: grid; grid-template-columns: 17fr 9fr; gap: 0 6px; }
.flap-row { display: grid; grid-auto-flow: column; grid-auto-columns: 1fr; gap: 1px; }
.flap-head .flap-row { grid-auto-columns: 12px; }
.flap {
    display: block; height: 17px; line-height: 17px; text-align: center; overflow: hidden; border-radius: 2px;
    font: 700 10.5px var(--mono); color: #eef1f5;
    background: linear-gradient(180deg, #1d232c 0 48%, #06080b 48% 52%, #171c24 52% 100%);
    box-shadow: inset 0 1px 0 rgba(255,255,255,.05);
}
.flap-status .flap { color: #5eead4; }
.flap-status.amber .flap { color: #f5a742; }
.flap.flip { animation: flap .06s linear; }
@keyframes flap { 50% { transform: scaleY(.2); filter: brightness(1.4); } }

/* Reduced motion: still board, text underneath. No WebGL: just the text. */
.pcb-stage.static, .pcb-stage.no-3d { height: auto; overflow: visible; }
.pcb-stage.static .pcb-canvas { position: relative; height: 210px; cursor: default; }
.pcb-stage.no-3d .pcb-canvas { display: none; }
.pcb-stage.static .flap-board, .pcb-stage.no-3d .flap-board { position: relative; left: auto; right: auto; top: auto; transform: none; margin: .5rem; opacity: 1; }
.pcb-caption { display: flex; align-items: baseline; justify-content: space-between; gap: .5rem; padding: .6rem .95rem .7rem; border-top: 1px solid rgba(148,226,213,.1); }
.pcb-caption b { color: var(--text-strong); font-size: .95rem; }
.pcb-caption span { font: 600 .66rem var(--mono); letter-spacing: .1em; color: var(--label); }

/* Timeline of the latest aircraft */
.timeline-wrap { padding: .2rem .2rem 0; }
.timeline { list-style: none; margin: 0; padding: 0 0 0 1.1rem; position: relative; display: flex; flex-direction: column; gap: .7rem; }
.timeline::before { content: ""; position: absolute; left: .32rem; top: .4rem; bottom: .4rem; width: 1.5px; background: linear-gradient(180deg, rgba(94,234,212,.6), rgba(94,234,212,.08)); }
.tl-empty { padding: .6rem 0; font-size: .85rem; }
.tl-item { position: relative; }
.tl-dot { position: absolute; left: -1.1rem; top: 1rem; width: 9px; height: 9px; border-radius: 50%; background: #10151e; border: 2px solid var(--accent); transform: translateX(.07rem); }
.tl-item:first-child .tl-dot { background: var(--accent); box-shadow: 0 0 10px rgba(25,195,177,.8); }
.tl-card {
    display: grid; grid-template-columns: 72px 1fr; gap: .65rem; padding: .45rem .55rem .45rem .45rem; border-radius: 10px; cursor: pointer;
    background: var(--glass); border: 1px solid var(--glass-border); box-shadow: var(--glass-shadow);
}
.tl-new { animation: slide-in .6s cubic-bezier(.2,.8,.2,1) both; }
.tl-new .tl-card { animation: glow 2.4s ease-out both; }
@keyframes slide-in { from { opacity: 0; transform: translateY(-14px); } to { opacity: 1; transform: none; } }
@keyframes glow { from { border-color: rgba(94,234,212,.8); box-shadow: var(--glass-shadow), 0 0 22px rgba(25,195,177,.35); } }
.tl-photo { position: relative; display: block; width: 72px; aspect-ratio: 1; border-radius: 7px; overflow: hidden; background: #0b1017; align-self: start; }
.tl-photo img { width: 100%; height: 100%; object-fit: cover; display: block; }
.tl-photo.none { display: grid; place-items: center; }
.tl-photo.none svg { fill: rgba(94,234,212,.35); }
.tl-credit { position: absolute; left: 0; right: 0; bottom: 0; padding: 0 3px; font-size: .5rem; color: #dfe6ee; background: rgba(0,0,0,.55); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.tl-body { min-width: 0; display: flex; flex-direction: column; gap: .15rem; }
.tl-top { display: flex; justify-content: space-between; align-items: baseline; gap: .5rem; }
.tl-cs { font-family: var(--mono); font-size: .95rem; color: var(--text-strong); letter-spacing: .03em; }
.tl-top time { font: 600 .66rem var(--mono); color: var(--label); font-variant-numeric: tabular-nums; }
.tl-airline { font-size: .76rem; color: var(--text); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.tl-route { font-size: .78rem; color: var(--text-strong); display: flex; flex-wrap: wrap; align-items: baseline; gap: .3rem; }
.tl-route b { font-family: var(--mono); font-weight: 600; }
.tl-arrow { color: var(--accent-text); }
.tl-route small { flex-basis: 100%; color: var(--muted); font-size: .68rem; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.tl-meta { font-size: .7rem; color: var(--muted); }
.credit { margin: .7rem 0 0 1.1rem; }

/* Stats column (same markup as the hub's Live Map) */
.live-history { display: flex; align-items: center; gap: .5rem; flex-wrap: wrap; }
.seg { display: inline-flex; border: 1px solid rgba(148,226,213,.18); border-radius: 7px; overflow: hidden; background: rgba(4,8,13,.35); }
.seg-btn { border: 0; background: transparent; color: #aab2c2; font-size: .78rem; font-weight: 600; padding: .35rem .7rem; cursor: pointer; }
.seg-btn + .seg-btn { border-left: 1px solid rgba(148,226,213,.18); }
.seg-btn:hover { background: rgba(255,255,255,.05); }
.seg-btn.on { background: rgba(25,195,177,.16); color: var(--accent-text); }
.seg-btn:focus-visible, .btn-ghost:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; }
.live-end { display: inline-flex; align-items: center; gap: .4rem; font: 600 .64rem var(--mono); letter-spacing: .12em; text-transform: uppercase; color: var(--label); }
.live-end input { background: rgba(4,8,13,.55); border: 1px solid rgba(148,226,213,.15); color: #cdd3df; border-radius: 7px; padding: .28rem .4rem; font-size: .78rem; }
.btn-ghost { background: rgba(255,255,255,.03); border: 1px solid rgba(148,226,213,.2); color: #c7ccd6; border-radius: 7px; padding: .28rem .7rem; font-size: .78rem; cursor: pointer; }
.stat-hero .hero-num { display: flex; align-items: baseline; gap: .4rem; font-size: 2.6rem; font-weight: 600; line-height: 1; color: var(--text-strong); font-variant-numeric: tabular-nums; margin: .15rem 0 .25rem; }
.stat-hero .hero-num small { font: 600 .7rem var(--mono); letter-spacing: .12em; text-transform: uppercase; color: var(--label); }
.hero-sub { font-size: .76rem; color: var(--muted); margin-bottom: .4rem; font-variant-numeric: tabular-nums; }
.live-tiles { display: grid; grid-template-columns: 1fr 1fr; gap: .6rem; }
.stat { display: flex; flex-direction: column; gap: .15rem; padding: .65rem .75rem; }
.stat .label { margin: 0; font-size: .6rem; letter-spacing: .08em; }
.stat-num { font-size: 1.3rem; font-weight: 600; color: var(--text-strong); font-variant-numeric: tabular-nums; }
.stat-num small { font-size: .68rem; color: var(--muted); font-weight: 500; }
.chart { position: relative; min-height: 118px; }
.c-plot { position: relative; }
.c-plot svg { display: block; width: 100%; height: auto; overflow: visible; }
.c-grid { stroke: rgba(148,226,213,.08); stroke-width: 1; }
.c-tick { fill: #6f7d90; font: 500 9px var(--mono); }
.c-cross { stroke: rgba(230,233,239,.45); stroke-width: 1; stroke-dasharray: 3 3; }
.c-hit { cursor: crosshair; }
.c-legend { display: flex; gap: .9rem; font-size: .72rem; color: var(--muted); margin-bottom: .2rem; }
.c-legend i, .c-tip i { display: inline-block; width: 10px; height: 3px; border-radius: 2px; margin-right: .35rem; vertical-align: middle; }
.c-tip { position: absolute; top: 0; transform: translate(-50%, -100%); pointer-events: none; z-index: 5; min-width: 130px; background: rgba(10,14,20,.92); border: 1px solid rgba(148,226,213,.22); border-radius: 7px; padding: .4rem .55rem; font-size: .72rem; color: var(--text); box-shadow: 0 8px 24px rgba(0,0,0,.45); white-space: nowrap; }
.c-tip b { display: block; font: 600 .64rem var(--mono); letter-spacing: .06em; color: var(--label); margin-bottom: .2rem; }
.c-tip div { display: flex; align-items: center; }
.c-tip span { margin-left: auto; padding-left: .8rem; color: var(--text-strong); font-variant-numeric: tabular-nums; }
.chart-empty, .chart-note { margin: .4rem 0 0; }
.df-bars { display: flex; flex-direction: column; gap: 5px; }
.df-row { display: grid; grid-template-columns: 4.6rem 1fr 3rem; align-items: center; gap: .5rem; font-size: .74rem; }
.df-label { font-family: var(--mono); color: var(--muted); }
.df-track { height: 8px; background: rgba(255,255,255,.04); border-radius: 4px; overflow: hidden; }
.df-bar { display: block; height: 100%; background: #0ea596; border-radius: 0 4px 4px 0; }
.df-val { text-align: right; color: var(--text-strong); font-variant-numeric: tabular-nums; }

.foot { padding: 1rem 1.25rem 1.5rem; border-top: 1px solid rgba(148,226,213,.08); }

/* Narrower screens: map first, then the hardware + timeline and the stats side by side, then stacked. */
@media (max-width: 1280px) {
    .layout { grid-template-columns: 1fr 1fr; }
    .col-map { grid-column: 1 / -1; position: static; height: 62vh; order: -1; }
}
@media (max-width: 760px) {
    .layout { grid-template-columns: 1fr; padding: .75rem 1rem; }
    .top { padding: 0 1rem; }
    .top-utc { display: none; }
    .col-left, .col-right { padding: 6px 0; }
}
@media (prefers-reduced-motion: reduce) {
    .live-dot i, .tl-new, .tl-new .tl-card { animation: none; }
}

/* Expandable charts: a small button on each chart panel opens it large in an overlay. */
.c-expand {
    position: absolute; top: .5rem; right: .55rem; width: 26px; height: 26px; display: grid; place-items: center; padding: 0;
    background: rgba(255,255,255,.03); border: 1px solid rgba(148,226,213,.16); border-radius: 6px; color: #8fb9b2; cursor: pointer;
}
.c-expand svg { width: 13px; height: 13px; fill: none; stroke: currentColor; stroke-width: 1.6; stroke-linecap: round; stroke-linejoin: round; }
.c-expand:hover { color: #5eead4; border-color: rgba(94,234,212,.5); background: rgba(94,234,212,.08); }
.c-expand:focus-visible, .c-modal-close:focus-visible { outline: 2px solid #19c3b1; outline-offset: 2px; }
.c-modal { position: fixed; inset: 0; z-index: 2000; }
.c-modal-dim { position: absolute; inset: 0; background: rgba(6,9,14,.6); backdrop-filter: blur(4px); -webkit-backdrop-filter: blur(4px); }
.c-modal .c-modal-card {
    position: absolute; left: 50%; top: 50%; transform: translate(-50%, -50%); margin: 0;
    width: min(1400px, calc(100vw - 2rem)); max-height: calc(100dvh - 2rem); overflow: auto; padding: 1rem 1.2rem 1.1rem;
    box-shadow: inset 0 1px 0 rgba(255,255,255,.08), 0 30px 80px rgba(0,0,0,.6);
}
.c-modal-head { display: flex; align-items: center; gap: .8rem; margin-bottom: .6rem; flex-wrap: wrap; }
.c-modal-head h2 { margin: 0; flex: 1; }
.c-modal-close { width: 32px; height: 32px; border-radius: 8px; border: 1px solid rgba(148,226,213,.2); background: rgba(255,255,255,.04); color: #c7ccd6; font-size: 1.2rem; line-height: 1; cursor: pointer; }
.c-modal-close:hover { color: #fff; border-color: rgba(94,234,212,.5); }
.c-modal .c-tick { font-size: 10.5px; }

.c-modal .c-modal-card::before { inset: 6px; }   /* brackets inside: the card scrolls, so nothing may stick out */

/* Card interactions: click pings the aircraft on the map. */
.tl-card { transition: border-color .15s, background .15s; }
.timeline .tl-card:hover { border-color: rgba(94,234,212,.45); }
.timeline .tl-card:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; }
.tl-flight { font: 600 .7rem var(--mono); color: var(--text-strong); font-variant-numeric: tabular-nums; letter-spacing: .02em; }

/* Today's total + unique aircraft per day */
.tl-days { display: flex; align-items: flex-end; gap: .8rem; margin: 0 0 .8rem; padding: .55rem .7rem; border-radius: 10px; background: rgba(4,8,13,.35); border: 1px solid rgba(148,226,213,.1); }
.tl-today { display: flex; flex-direction: column; line-height: 1.05; }
.tl-today b { font-size: 1.45rem; color: var(--text-strong); font-variant-numeric: tabular-nums; }
.tl-today span { font: 600 .6rem var(--mono); letter-spacing: .12em; text-transform: uppercase; color: var(--label); margin-top: .15rem; }
.tl-bars { flex: 1; height: 34px; display: flex; align-items: flex-end; gap: 2px; justify-content: flex-end; }
.tl-bars span { flex: 0 1 12px; min-width: 4px; background: rgba(14,165,150,.55); border-radius: 3px 3px 0 0; }
.tl-bars span.now { background: #19c3b1; box-shadow: 0 0 8px rgba(25,195,177,.5); }
.tl-bars span:hover { background: #5eead4; }

/* Radar ping on the map (card click) */
.ac-ping { pointer-events: none; }
.ac-ping i { position: absolute; inset: 0; border-radius: 50%; border: 2px solid #5eead4; opacity: 0; animation: ping 1.4s cubic-bezier(.2,.6,.3,1) 2 both; }
.ac-ping i:nth-child(2) { animation-delay: .25s; }
.ac-ping i:nth-child(3) { animation-delay: .5s; border-width: 1px; }
@keyframes ping { 0% { transform: scale(.15); opacity: .95; } 100% { transform: scale(1); opacity: 0; } }

/* Notice (aircraft no longer on the map) */
.fp-toast { position: fixed; left: 50%; bottom: 1.5rem; transform: translate(-50%, 20px); opacity: 0; pointer-events: none; z-index: 3000;
    background: rgba(10,14,20,.92); border: 1px solid rgba(148,226,213,.25); color: var(--text-strong); padding: .55rem .9rem; border-radius: 9px; font-size: .84rem;
    box-shadow: 0 10px 30px rgba(0,0,0,.5); transition: opacity .2s, transform .2s; }
.fp-toast.show { opacity: 1; transform: translate(-50%, 0); }

/* Map hover: the timeline card, floating above the aircraft */
.leaflet-tooltip.card-tip { padding: 0; background: transparent; border: 0; box-shadow: none; color: inherit; white-space: normal; }
.leaflet-tooltip.card-tip::before { display: none; }
.card-tip .tl-card { width: 280px; cursor: default; background: linear-gradient(155deg, rgba(30,40,56,.96), rgba(16,22,32,.97)); box-shadow: 0 14px 40px rgba(0,0,0,.55); }
.card-tip:not(:has(.tl-card)) { background: rgba(10,14,20,.92); border: 1px solid rgba(148,226,213,.22); border-radius: 8px; padding: .4rem .6rem; color: var(--text); font-size: .75rem; }

@media (prefers-reduced-motion: reduce) {
    .ac-ping i { animation-duration: .01s; }
    .fp-toast { transition: none; }
}

/* Altitude legend on the map (adsb-map.js) */
.alt-legend { display: flex; align-items: center; gap: .55rem; padding: .3rem .55rem; border-radius: 7px; background: rgba(10,14,20,.82); border: 1px solid rgba(148,226,213,.16); font: 600 10px ui-monospace, SFMono-Regular, Menlo, Consolas, monospace; color: #aab2c2; backdrop-filter: blur(6px); }
.alt-legend span { display: inline-flex; align-items: center; gap: .25rem; white-space: nowrap; }
.alt-legend i { width: 9px; height: 9px; border-radius: 2px; box-shadow: 0 0 0 1px rgba(0,0,0,.4); }
.alt-legend-title { color: #8fb9b2; letter-spacing: .08em; text-transform: uppercase; }

/* Latest / Top 10 tabs and the ranked list */
.tl-tabs { display: flex; margin: 0 0 .7rem; }
.tl-tabs[hidden] { display: none; }
.tl-tabs .seg-btn { flex: 1; font: 600 .66rem var(--mono); letter-spacing: .12em; text-transform: uppercase; padding: .45rem .5rem; }
.tl-rank {
    position: absolute; left: -1.1rem; top: .75rem; width: 18px; height: 18px; transform: translateX(-.22rem); border-radius: 50%;
    display: grid; place-items: center; font: 700 .62rem var(--mono); color: var(--accent-text); background: #10151e; border: 1.5px solid var(--accent);
}
.top10 .tl-item:first-child .tl-rank { background: var(--accent); color: #062420; box-shadow: 0 0 10px rgba(25,195,177,.8); }
.tl-tags { display: flex; flex-wrap: wrap; gap: .25rem; margin-top: .25rem; }
.tag { font: 600 .58rem var(--mono); letter-spacing: .1em; text-transform: uppercase; color: var(--text); padding: .12rem .4rem; border-radius: 5px; border: 1px solid rgba(148,226,213,.18); background: rgba(4,8,13,.35); }
.tag.lead { color: var(--accent-text); border-color: rgba(94,234,212,.45); background: rgba(25,195,177,.12); }
.top10-note { margin: .7rem 0 0 1.1rem; }
.timeline[hidden] { display: none; }

/* Search bar under "Latest aircraft" and filter chips under "Top 10 today" */
.tl-search {
    display: flex; align-items: center; gap: .45rem; margin: 0 0 .7rem; padding: 0 .65rem; height: 2.2rem; border-radius: 8px;
    background: rgba(4,8,13,.45); border: 1px solid rgba(148,226,213,.16);
}
.tl-search:focus-within { border-color: rgba(94,234,212,.55); box-shadow: 0 0 0 3px rgba(25,195,177,.12); }
.tl-search svg { width: 15px; height: 15px; flex: none; fill: none; stroke: var(--label); stroke-width: 1.7; stroke-linecap: round; }
.tl-search input { flex: 1; min-width: 0; height: 100%; border: 0; outline: 0; background: transparent; color: var(--text-strong); font: inherit; font-size: .84rem; }
.tl-search input::placeholder { color: var(--muted); opacity: .8; }
.tl-search[hidden], .tl-filters[hidden], .tl-results-note[hidden] { display: none; }
.tl-results-note { margin: 0 0 .6rem; }
.tl-filters { display: flex; flex-wrap: wrap; gap: .35rem; margin: 0 0 .75rem; }
.chip-filter {
    display: inline-flex; align-items: center; gap: .35rem; padding: .22rem .55rem; border-radius: 999px; cursor: pointer;
    font: 600 .62rem var(--mono); letter-spacing: .08em; text-transform: uppercase; color: var(--text);
    background: rgba(4,8,13,.35); border: 1px solid rgba(148,226,213,.18);
}
.chip-filter b { font-weight: 700; color: var(--muted); }
.chip-filter:hover { border-color: rgba(94,234,212,.45); }
.chip-filter.on { color: var(--accent-text); background: rgba(25,195,177,.14); border-color: rgba(94,234,212,.55); }
.chip-filter.on b { color: var(--accent-text); }
.chip-filter:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; }

/* Map colours by altitude band (adsb-map.js reads --alt-*), flight paths, the chart dot ring */
:root {
    --alt-0: #ef6f74; --alt-1: #f5a742; --alt-2: #2bbfae; --alt-3: #5f8dff; --alt-4: #d9c9ff; --alt-x: #6b7487;
    --ac-outline: #0b0e14; --chart-surface: #161d29;
}
.ac-trail { fill: none; stroke-linecap: round; stroke-linejoin: round; transition: stroke-opacity .15s, stroke-width .15s; }
.ac-trail.b0 { stroke: var(--alt-0); } .ac-trail.b1 { stroke: var(--alt-1); } .ac-trail.b2 { stroke: var(--alt-2); }
.ac-trail.b3 { stroke: var(--alt-3); } .ac-trail.b4 { stroke: var(--alt-4); } .ac-trail.bx { stroke: var(--alt-x); }
/* The selected aircraft (click; its path is drawn): a teal glow and a bolder label */
.ac-selected .ac-icon svg { filter: drop-shadow(0 0 3px var(--accent-text)) drop-shadow(0 0 7px var(--accent)); }
.ac-selected .ac-cs { color: var(--accent-text); }

/* Moon/Sun theme button in the header */
.theme-btn {
    width: 32px; height: 32px; display: grid; place-items: center; padding: 0; border-radius: 8px; cursor: pointer;
    background: rgba(255,255,255,.04); border: 1px solid rgba(148,226,213,.2); color: var(--accent-text);
}
.theme-btn:hover { border-color: rgba(94,234,212,.5); background: rgba(94,234,212,.08); }
.theme-btn:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; }
.theme-btn svg { width: 17px; height: 17px; fill: none; stroke: currentColor; stroke-width: 1.6; stroke-linecap: round; stroke-linejoin: round; }
.theme-btn .i-sun { display: none; }
:root[data-theme="light"] .theme-btn .i-sun { display: block; }
:root[data-theme="light"] .theme-btn .i-moon { display: none; }

/* ---- Light theme: frosted white glass on a pale sky, deeper teal for contrast ---- */
:root[data-theme="light"] {
    --text: #354152; --text-strong: #121a26; --muted: #5d6879; --label: #3f7a72;
    --accent: #0f9a8c; --accent-text: #0b7d72; --link: #0b7d72; --ok: #1f9d63;
    --glass:
        linear-gradient(118deg, rgba(255,255,255,.75) 0%, rgba(255,255,255,.35) 30%, transparent 48%),
        linear-gradient(155deg, rgba(255,255,255,.82) 0%, rgba(248,251,252,.78) 55%, rgba(241,246,248,.8) 100%);
    --glass-border: rgba(15,110,100,.16);
    --glass-shadow: inset 0 1px 0 rgba(255,255,255,.9), 0 1px 2px rgba(20,40,60,.06), 0 10px 28px rgba(20,40,60,.08);
    --hud: rgba(15,154,140,.55);
    --alt-0: #a8302c; --alt-1: #c7860f; --alt-2: #12998b; --alt-3: #3561d6; --alt-4: #c03a8a; --alt-x: #7d8796;
    --ac-outline: #ffffff; --chart-surface: #ffffff;
    color-scheme: light;
}
:root[data-theme="light"] body {
    background:
        repeating-radial-gradient(circle at 88% -8%, rgba(15,154,140,.06) 0 1px, transparent 1.5px 140px),
        radial-gradient(1100px 700px at 88% -8%, rgba(15,154,140,.10), transparent 62%),
        radial-gradient(900px 600px at -5% 105%, rgba(56,140,220,.07), transparent 60%),
        #eef2f4;
}
:root[data-theme="light"] .top { background: rgba(250,252,253,.78); border-bottom-color: rgba(15,110,100,.12); box-shadow: 0 1px 0 rgba(255,255,255,.8); }
:root[data-theme="light"] .brand img { filter: drop-shadow(0 0 8px rgba(15,154,140,.25)); }
:root[data-theme="light"] .live-dot i { box-shadow: 0 0 6px rgba(31,157,99,.6); }
:root[data-theme="light"] .theme-btn { background: rgba(255,255,255,.7); border-color: rgba(15,110,100,.22); }
:root[data-theme="light"] .theme-btn:hover { background: rgba(15,154,140,.08); border-color: rgba(15,154,140,.45); }

:root[data-theme="light"] .map-wrap { box-shadow: 0 10px 28px rgba(20,40,60,.12); }
:root[data-theme="light"] #adsb-map { background: #e9edf0; }
:root[data-theme="light"] #adsb-map .osm-dark { filter: saturate(.45) brightness(1.04) contrast(.92); }
:root[data-theme="light"] #adsb-map .leaflet-control-attribution { background: rgba(255,255,255,.85); color: #5d6879; }
:root[data-theme="light"] #adsb-map .leaflet-control-attribution a { color: #0b7d72; }
:root[data-theme="light"] .ac-cs { color: #111a24; text-shadow: 0 0 3px #fff, 0 0 2px #fff, 0 1px 1px #fff; }
:root[data-theme="light"] .ac-ty { color: #485465; text-shadow: 0 0 3px #fff, 0 0 2px #fff; }
:root[data-theme="light"] .ac-icon svg { filter: drop-shadow(0 1px 1.5px rgba(0,0,0,.35)); }
:root[data-theme="light"] .ac-selected .ac-icon svg { filter: drop-shadow(0 0 2px #fff) drop-shadow(0 0 6px var(--accent)); }
:root[data-theme="light"] .ac-ping i { border-color: #0b7d72; }
:root[data-theme="light"] .alt-legend { background: rgba(255,255,255,.88); border-color: rgba(15,110,100,.18); color: #485465; }
:root[data-theme="light"] .alt-legend-title { color: #3f7a72; }
:root[data-theme="light"] .alt-legend i { box-shadow: 0 0 0 1px rgba(0,0,0,.15); }

:root[data-theme="light"] .pcb-stage { background: radial-gradient(circle at 50% 55%, rgba(15,154,140,.14), transparent 65%); }
:root[data-theme="light"] .pcb-caption { border-top-color: rgba(15,110,100,.12); }

:root[data-theme="light"] .timeline::before { background: linear-gradient(180deg, rgba(15,154,140,.6), rgba(15,154,140,.08)); }
:root[data-theme="light"] .tl-dot, :root[data-theme="light"] .tl-rank { background: #f6f9fa; }
:root[data-theme="light"] .top10 .tl-item:first-child .tl-rank { color: #fff; }
:root[data-theme="light"] .tl-photo { background: #dfe6ea; }
:root[data-theme="light"] .tl-photo.none svg { fill: rgba(15,154,140,.4); }
:root[data-theme="light"] .tl-new .tl-card { animation-name: glow-light; }
@keyframes glow-light { from { border-color: rgba(15,154,140,.7); box-shadow: var(--glass-shadow), 0 0 18px rgba(15,154,140,.25); } }
:root[data-theme="light"] .timeline .tl-card:hover { border-color: rgba(15,154,140,.45); }
:root[data-theme="light"] .tl-days { background: rgba(255,255,255,.55); border-color: rgba(15,110,100,.12); }
:root[data-theme="light"] .tl-bars span { background: rgba(15,154,140,.45); }
:root[data-theme="light"] .tl-bars span.now { background: #0f9a8c; box-shadow: 0 0 6px rgba(15,154,140,.4); }
:root[data-theme="light"] .tl-bars span:hover { background: #0b7d72; }
:root[data-theme="light"] .tag { background: rgba(255,255,255,.6); border-color: rgba(15,110,100,.18); }
:root[data-theme="light"] .tag.lead { background: rgba(15,154,140,.1); border-color: rgba(15,154,140,.4); }

:root[data-theme="light"] .seg { background: rgba(255,255,255,.6); border-color: rgba(15,110,100,.2); }
:root[data-theme="light"] .seg-btn { color: #4d5868; }
:root[data-theme="light"] .seg-btn + .seg-btn { border-left-color: rgba(15,110,100,.2); }
:root[data-theme="light"] .seg-btn:hover { background: rgba(15,154,140,.06); }
:root[data-theme="light"] .seg-btn.on { background: rgba(15,154,140,.13); color: #0b7d72; }
:root[data-theme="light"] .live-end input { background: rgba(255,255,255,.8); border-color: rgba(15,110,100,.2); color: #233041; }
:root[data-theme="light"] .btn-ghost { background: rgba(255,255,255,.7); border-color: rgba(15,110,100,.22); color: #354152; }
:root[data-theme="light"] .c-grid { stroke: rgba(20,60,70,.09); }
:root[data-theme="light"] .c-tick { fill: #677386; }
:root[data-theme="light"] .c-cross { stroke: rgba(20,30,45,.4); }
:root[data-theme="light"] .c-tip { background: rgba(255,255,255,.96); border-color: rgba(15,110,100,.22); box-shadow: 0 8px 24px rgba(20,40,60,.15); }
:root[data-theme="light"] .df-track { background: rgba(20,60,70,.07); }
:root[data-theme="light"] .c-expand { background: rgba(255,255,255,.7); border-color: rgba(15,110,100,.2); color: #3f7a72; }
:root[data-theme="light"] .c-expand:hover { color: #0b7d72; border-color: rgba(15,154,140,.45); background: rgba(15,154,140,.08); }
:root[data-theme="light"] .c-modal-dim { background: rgba(30,45,60,.28); }
:root[data-theme="light"] .c-modal .c-modal-card { box-shadow: 0 30px 80px rgba(20,40,60,.25); }
:root[data-theme="light"] .c-modal-close { background: rgba(255,255,255,.8); border-color: rgba(15,110,100,.22); color: #354152; }
:root[data-theme="light"] .c-modal-close:hover { color: #0b7d72; }

:root[data-theme="light"] .fp-toast { background: rgba(255,255,255,.96); border-color: rgba(15,110,100,.22); box-shadow: 0 10px 30px rgba(20,40,60,.18); }
:root[data-theme="light"] .card-tip .tl-card { background: linear-gradient(155deg, #ffffff, #f3f7f8); box-shadow: 0 14px 40px rgba(20,40,60,.22); }
:root[data-theme="light"] .card-tip:not(:has(.tl-card)) { background: rgba(255,255,255,.96); border-color: rgba(15,110,100,.22); }
:root[data-theme="light"] .foot { border-top-color: rgba(15,110,100,.1); }
:root[data-theme="light"] .tl-search { background: rgba(255,255,255,.75); border-color: rgba(15,110,100,.2); }
:root[data-theme="light"] .tl-search:focus-within { border-color: rgba(15,154,140,.55); box-shadow: 0 0 0 3px rgba(15,154,140,.12); }
:root[data-theme="light"] .chip-filter { background: rgba(255,255,255,.65); border-color: rgba(15,110,100,.2); }
:root[data-theme="light"] .chip-filter.on { background: rgba(15,154,140,.12); border-color: rgba(15,154,140,.5); }

/* Paths button at the start of the altitude legend (adsb-map.js): selected aircraft or all */
.alt-legend .path-btn { width: 20px; height: 20px; display: grid; place-items: center; padding: 0; margin-right: .1rem; border-radius: 5px; cursor: pointer;
    background: transparent; border: 1px solid rgba(148,226,213,.22); color: #8fb9b2; }
.alt-legend .path-btn svg { width: 14px; height: 14px; fill: none; stroke: currentColor; stroke-width: 1.6; stroke-linecap: round; }
.alt-legend .path-btn svg .fill { fill: currentColor; stroke: none; }
.alt-legend .path-btn:hover { color: #5eead4; border-color: rgba(94,234,212,.5); }
.alt-legend .path-btn.on { color: #5eead4; background: rgba(25,195,177,.16); border-color: rgba(94,234,212,.5); }
.alt-legend .path-btn:focus-visible { outline: 2px solid #19c3b1; outline-offset: 1px; }
:root[data-theme="light"] .alt-legend .path-btn { color: #3f7a72; border-color: rgba(15,110,100,.25); }
:root[data-theme="light"] .alt-legend .path-btn.on, :root[data-theme="light"] .alt-legend .path-btn:hover { color: #0b7d72; background: rgba(15,154,140,.12); border-color: rgba(15,154,140,.5); }

/* Aircraft shapes (adsb-map.js): see-through rotor disc, thin blades / balloon ropes */
.ac-divicon .rotor { fill-opacity: .16; stroke-opacity: .45; }
.ac-divicon .rotor-blade { fill: none; stroke-width: 1.3; stroke-linecap: round; }
