/* Overhead: a phone-sized plane spotter on the site's paper. Uses the color tokens from base.css. */
:root { --ov-hi: #8F6100; --ov-hi-bg: #FFF4D6; --ov-scope: #F6F7F4; --ov-grid: #DCE0DA; --ov-ok: #2F6B2A; --ov-err-bg: #FBEBEB; --ov-err: #8E2A26; }
@media (prefers-color-scheme: dark) { :root:not([data-theme="light"]) { --ov-hi: #F2C94C; --ov-hi-bg: #2E2712; --ov-scope: #111514; --ov-grid: #2A322F; --ov-ok: #9FD39A; --ov-err-bg: #331B1A; --ov-err: #F2A19C; } }
:root[data-theme="dark"] { --ov-hi: #F2C94C; --ov-hi-bg: #2E2712; --ov-scope: #111514; --ov-grid: #2A322F; --ov-ok: #9FD39A; --ov-err-bg: #331B1A; --ov-err: #F2A19C; }

:where(.ov-body) button, :where(.ov-body) input { font: inherit; color: inherit; }
:where(.ov-body) button { cursor: pointer; }
.ov-body button:focus-visible, .ov-body input:focus-visible, .ov-body summary:focus-visible { outline: 2px solid var(--scarlet); outline-offset: 2px; }

.ov-app { max-width: 28rem; margin: 0 auto; padding: 1rem max(16px, env(safe-area-inset-right, 0px)) 2rem max(16px, env(safe-area-inset-left, 0px)); display: flex; flex-direction: column; gap: .5rem; min-height: 60vh; }
#ov-view { display: flex; flex-direction: column; gap: 1rem; }
.ov-title { margin: .2rem 0 0; font: 400 2.3rem/1.05 var(--display); letter-spacing: -.025em; }
.ov-h { margin: 0; font: 400 1.7rem/1.1 var(--display); letter-spacing: -.015em; }
.ov-h:focus { outline: none; }
.ov-intro { margin: 0; color: var(--soft); font-size: .95rem; line-height: 1.55; text-wrap: pretty; }
.ov-lbl { margin: 0; font: 400 .68rem/1 var(--mono); letter-spacing: .08em; text-transform: uppercase; color: var(--muted); }
.ov-cap { margin: 0; color: var(--muted); font-size: .8rem; line-height: 1.45; }
.ov-mono { font-family: var(--mono); }

/* Top row: where you are, and whether the feed is live */
.ov-top { display: flex; justify-content: space-between; align-items: center; gap: .6rem; flex-wrap: wrap; }
.ov-where { display: inline-flex; align-items: center; gap: .35rem; min-height: 44px; padding: 0 .2rem; background: none; border: 0; color: var(--soft); font-size: .95rem; text-align: left; }
.ov-where b { font-weight: 500; color: var(--ink); }
.ov-where svg { flex: none; }
.ov-live { display: inline-flex; align-items: center; gap: .4rem; padding: .3rem .7rem; border-radius: 999px; border: 1px solid var(--rule); background: var(--card); font-size: .8rem; color: var(--soft); }
.ov-live .dot { width: 7px; height: 7px; border-radius: 50%; background: var(--ov-ok); }
.ov-live.stale .dot { background: var(--muted); }

/* Radar / List switch */
.ov-tabs { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 4px; padding: 4px; border: 1px solid var(--rule); border-radius: 12px; background: var(--card); }
.ov-tabs button { min-height: 40px; border: 0; border-radius: 9px; background: none; color: var(--soft); font-weight: 500; }
.ov-tabs button[aria-selected="true"] { background: var(--ink); color: var(--bg); }

/* The radar scope */
.ov-scope { position: relative; width: 100%; max-width: 23rem; aspect-ratio: 1; margin: 0 auto; }
.ov-scope > svg { position: absolute; inset: 0; width: 100%; height: 100%; }
.ov-scope .ring { fill: none; stroke: var(--ov-grid); stroke-width: .5; }
.ov-scope .face { fill: var(--ov-scope); stroke: var(--rule); stroke-width: .6; }
.ov-scope .axis { stroke: var(--ov-grid); stroke-width: .4; }
.ov-scope .tick { font: 400 4.2px var(--mono); fill: var(--muted); }
.ov-scope .north { font: 500 5px var(--mono); fill: var(--soft); }
.ov-scope .me { fill: var(--ink); }
.ov-scope .me-halo { fill: var(--ink); opacity: .12; }
.ov-pl { position: absolute; transform: translate(-50%, -50%); width: 44px; height: 44px; display: grid; place-items: center; padding: 0; border: 0; background: none; color: var(--ink); z-index: 1; }
.ov-pl svg { display: block; }
.ov-pl span { position: absolute; top: calc(50% + 11px); left: 50%; transform: translateX(-50%); font: 400 .62rem/1 var(--mono); color: var(--soft); white-space: nowrap; padding: 1px 3px; border-radius: 4px; background: color-mix(in srgb, var(--ov-scope) 80%, transparent); pointer-events: none; }
.ov-pl.hi { color: var(--ov-hi); z-index: 3; }
.ov-pl.hi span { color: var(--ink); font-weight: 500; background: var(--ov-hi-bg); }
.ov-pl.hi::before { content: ""; position: absolute; top: 50%; left: 50%; width: 34px; height: 34px; margin: -17px 0 0 -17px; border-radius: 50%; border: 1.5px solid var(--ov-hi); opacity: .6; }
.ov-pl.ground { opacity: .55; }

/* Cards */
.ov-card { display: grid; gap: .55rem; padding: 1rem 1.05rem; border: 1px solid var(--rule); border-radius: 16px; background: var(--card); color: var(--ink); text-align: left; width: 100%; }
button.ov-card:hover { border-color: var(--muted); }
.ov-card .row { display: flex; justify-content: space-between; align-items: baseline; gap: .6rem; }
.ov-card .k { font: 400 .68rem/1 var(--mono); letter-spacing: .08em; text-transform: uppercase; color: var(--ov-hi); }
.ov-card .cs { font: 400 1.35rem/1.1 var(--mono); }
.ov-card .meta { display: flex; flex-wrap: wrap; gap: .25rem .9rem; font-size: .86rem; color: var(--soft); }
.ov-card .look { display: flex; align-items: center; gap: .5rem; padding-top: .6rem; border-top: 1px solid var(--rule); font-size: .92rem; }
.ov-card .sub { font-size: .84rem; color: var(--muted); }

/* List */
.ov-list { list-style: none; margin: 0; padding: 0; display: grid; gap: .5rem; }
.ov-row { display: grid; grid-template-columns: minmax(0, 1fr) auto; gap: .2rem .8rem; width: 100%; min-height: 44px; padding: .75rem .9rem; border: 1px solid var(--rule); border-radius: 14px; background: var(--card); color: var(--ink); text-align: left; }
.ov-row:hover { border-color: var(--muted); }
.ov-row .cs { font: 400 1rem/1.2 var(--mono); }
.ov-row.hi .cs { color: var(--ov-hi); }
.ov-row .rt { font-size: .92rem; color: var(--soft); text-align: right; white-space: nowrap; }
.ov-row .ty { font-size: .84rem; color: var(--soft); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.ov-row .ad { font-size: .84rem; color: var(--soft); text-align: right; white-space: nowrap; }

/* Buttons and fields */
.ov-btn { display: inline-flex; align-items: center; justify-content: center; gap: .5rem; min-height: 48px; border: 1px solid var(--ink); background: var(--ink); color: var(--bg); border-radius: 999px; padding: .7rem 1.1rem; font-weight: 500; width: 100%; }
.ov-btn.ghost { background: none; color: var(--ink); border-color: var(--rule); }
.ov-btn.sm { width: auto; min-height: 44px; padding: .45rem .9rem; font-size: .88rem; }
.ov-back { align-self: flex-start; display: inline-flex; align-items: center; gap: .25rem; min-height: 44px; padding: 0 .2rem 0 0; border: 0; background: none; color: var(--soft); font-size: .95rem; }
.ov-form { display: grid; gap: .45rem; }
.ov-form label { font-size: .88rem; color: var(--soft); }
.ov-field { display: flex; gap: .5rem; }
.ov-field input { flex: 1; min-width: 0; min-height: 48px; padding: 0 .9rem; border: 1px solid var(--rule); border-radius: 12px; background: var(--card); font-size: 1rem; }
.ov-field input::placeholder { color: var(--muted); }
.ov-results { list-style: none; margin: 0; padding: 0; display: grid; gap: .4rem; }
.ov-results button { width: 100%; min-height: 44px; padding: .6rem .8rem; border: 1px solid var(--rule); border-radius: 12px; background: var(--card); text-align: left; font-size: .9rem; line-height: 1.35; }
.ov-results button:hover { border-color: var(--muted); }
.ov-places { list-style: none; margin: 0; padding: 0; display: grid; gap: .45rem; }
.ov-place { display: flex; align-items: center; gap: .4rem; border: 1px solid var(--rule); border-radius: 14px; background: var(--card); padding-right: .3rem; }
.ov-place.on { border-color: var(--ov-hi); box-shadow: inset 0 0 0 1px var(--ov-hi); }
.ov-place .pick { flex: 1; min-width: 0; min-height: 56px; display: grid; gap: .1rem; padding: .55rem .9rem; border: 0; background: none; text-align: left; }
.ov-place .pick b { font: 400 1.1rem/1.15 var(--display); }
.ov-place .pick small { font-size: .82rem; color: var(--muted); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.ov-place .x { width: 44px; height: 44px; border: 0; background: none; color: var(--muted); border-radius: 10px; display: grid; place-items: center; flex: none; }
.ov-place .x:hover { color: var(--ink); }
.ov-place .ck { color: var(--ov-hi); flex: none; display: grid; place-items: center; }
.ov-radius { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 4px; padding: 4px; border: 1px solid var(--rule); border-radius: 12px; background: var(--card); }
.ov-radius button { min-height: 40px; border: 0; border-radius: 9px; background: none; color: var(--soft); font-weight: 500; }
.ov-radius button[aria-checked="true"] { background: var(--ink); color: var(--bg); }
.ov-sec { display: grid; gap: .55rem; }
.ov-err { margin: 0; padding: .65rem .8rem; border-radius: 12px; background: var(--ov-err-bg); color: var(--ov-err); font-size: .88rem; line-height: 1.45; }
.ov-empty { margin: 0; padding: 1.2rem 1rem; border: 1.5px dashed var(--rule); border-radius: 16px; color: var(--soft); text-align: center; font-size: .92rem; line-height: 1.5; }

/* Plane detail */
.ov-lookcard { display: flex; align-items: center; gap: 1rem; }
.ov-compass { flex: none; width: 92px; height: 92px; }
.ov-compass .face { fill: var(--ov-scope); stroke: var(--rule); }
.ov-compass .n { font: 500 9px var(--mono); fill: var(--soft); }
.ov-compass .needle { stroke: var(--ov-hi); stroke-width: 3; stroke-linecap: round; }
.ov-compass .hub { fill: var(--ink); }
.ov-lookcard b { display: block; font: 400 1.3rem/1.2 var(--display); }
.ov-lookcard p { margin: .25rem 0 0; font-size: .86rem; color: var(--soft); line-height: 1.45; }
.ov-stats { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: .5rem; margin: 0; }
.ov-stats div { display: grid; gap: .2rem; padding: .7rem .85rem; border: 1px solid var(--rule); border-radius: 14px; background: var(--card); }
.ov-stats dt { font-size: .78rem; color: var(--muted); }
.ov-stats dd { margin: 0; font: 400 1.02rem/1.2 var(--mono); }

.ov-foot { max-width: 28rem; margin: 0 auto 1.5rem; padding: 0 16px; text-align: center; font-size: .85rem; color: var(--muted); }
.ov-foot a { color: var(--soft); }
.ov-sr { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }

@media (prefers-reduced-motion: no-preference) { .ov-pl { transition: left .9s linear, top .9s linear; } }
