/* Near-black and one blue accent, nothing else. Blue on Consentiva, owner 2026-11-27. Sizes in rem. */
:root {
  --bg: #0a0a0a; --bg2: #111111; --bg3: #1a1a1a; --border: #2a2a2a; --text: #ececec; --muted: #9a9a9a; --green: #2E90FA;
  --bar-h: 3.5rem; --kinds-h: 2.75rem;
}
* { box-sizing: border-box; }
html, body { margin: 0; height: 100%; background: var(--bg); color: var(--text); font-family: system-ui, -apple-system, "Segoe UI", sans-serif; }
body { overflow: hidden; }
.sr { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }

.bar { position: fixed; top: 0; left: 0; right: 0; height: var(--bar-h); display: flex; align-items: center; gap: 0.75rem;
  padding: 0 0.75rem; padding-top: env(safe-area-inset-top); background: var(--bg); border-bottom: 1px solid var(--border); z-index: 3; }
.brand { display: flex; align-items: center; gap: 0.5rem; font-weight: 700; white-space: nowrap; }
.logo { color: var(--green); font-size: 1.25rem; }
.name { font-size: 1rem; letter-spacing: 0.01em; }
.pill { font-size: 0.7rem; font-weight: 600; color: var(--green); border: 1px solid var(--green); border-radius: 999px; padding: 0.1rem 0.5rem; }
.status { flex: 1; min-width: 0; color: var(--muted); font-size: 0.8rem; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.status strong { color: var(--text); }
.status .warn { color: var(--text); }
.search input { width: 13rem; max-width: 40vw; background: var(--bg3); color: var(--text); border: 1px solid var(--border); border-radius: 0.5rem;
  padding: 0.45rem 0.65rem; font-size: 0.9rem; }
.search input:focus { outline: 2px solid var(--green); outline-offset: 1px; }

.kinds { position: fixed; top: var(--bar-h); left: 0; right: 0; height: var(--kinds-h); display: flex; gap: 0.4rem; align-items: center;
  padding: 0 0.75rem; overflow-x: auto; background: color-mix(in srgb, var(--bg) 85%, transparent); border-bottom: 1px solid var(--border); z-index: 2; scrollbar-width: none; }
.kinds::-webkit-scrollbar { display: none; }
.kind { flex: none; display: inline-flex; align-items: center; gap: 0.35rem; background: var(--bg2); color: var(--text); border: 1px solid var(--border);
  border-radius: 999px; padding: 0.3rem 0.75rem; font-size: 0.8rem; cursor: pointer; }
.kind[aria-pressed="true"] { border-color: var(--green); }
.kind[aria-pressed="false"] { color: var(--muted); }
.kind .n { color: var(--green); font-variant-numeric: tabular-nums; }
.kind[aria-pressed="false"] .n { color: var(--muted); }
.kind:focus-visible { outline: 2px solid var(--green); outline-offset: 1px; }

#map { position: fixed; top: calc(var(--bar-h) + var(--kinds-h)); left: 0; right: 0; bottom: 0; }

.panel { position: fixed; z-index: 4; right: 0.75rem; top: calc(var(--bar-h) + var(--kinds-h) + 0.75rem); width: 21rem; max-height: calc(100% - var(--bar-h) - var(--kinds-h) - 1.5rem);
  overflow-y: auto; background: var(--bg2); border: 1px solid var(--border); border-radius: 0.75rem; padding: 1rem 1rem 0.9rem; box-shadow: 0 0.5rem 2rem rgb(0 0 0 / 0.5); }
.panel h2 { margin: 0 2rem 0.15rem 0; font-size: 1.25rem; }
.panel .sub { margin: 0 0 0.75rem; color: var(--muted); font-size: 0.85rem; }
.panel dl { display: grid; grid-template-columns: auto 1fr; gap: 0.35rem 0.9rem; margin: 0 0 0.9rem; font-size: 0.9rem; }
.panel dt { color: var(--muted); }
.panel dd { margin: 0; font-variant-numeric: tabular-nums; }
.panel .close { position: absolute; top: 0.5rem; right: 0.6rem; background: none; border: 0; color: var(--muted); font-size: 1.5rem; line-height: 1; cursor: pointer; padding: 0.25rem; }
.panel .follow { background: var(--bg3); color: var(--text); border: 1px solid var(--border); border-radius: 0.5rem; padding: 0.45rem 0.9rem; font-size: 0.85rem; cursor: pointer; }
.panel .follow[aria-pressed="true"] { border-color: var(--green); color: var(--green); }

.note { position: fixed; left: 0.75rem; bottom: 0.5rem; margin: 0; max-width: calc(100% - 13rem); font-size: 0.7rem; color: var(--muted); z-index: 2; pointer-events: none; text-shadow: 0 0 0.3rem var(--bg); }
.embed-credit { position: fixed; right: 0.75rem; top: 0.6rem; z-index: 5; font-size: 0.75rem; color: var(--green); }

.maplibregl-ctrl-attrib { background: color-mix(in srgb, var(--bg) 80%, transparent) !important; font-size: 0.65rem; }
.maplibregl-ctrl-attrib, .maplibregl-ctrl-attrib-inner, .maplibregl-ctrl-attrib a { color: #b5b5b5 !important; }
.maplibregl-ctrl-attrib-button { filter: invert(1); }
.maplibregl-ctrl-group { background: var(--bg2); border: 1px solid var(--border); }
.maplibregl-ctrl-group button + button { border-top: 1px solid var(--border); }
.maplibregl-ctrl button .maplibregl-ctrl-icon { filter: invert(1); }

/* Embedded on a licensed site: a compact bar. */
body.embed .search { display: none; }
body.embed .pill { display: none; }

/* Phones (iPhone 16 and newer, 393–440 px): the details become a sheet at the bottom. */
@media (max-width: 40rem) {
  .bar { gap: 0.5rem; }
  .name { font-size: 0.95rem; }
  .status { font-size: 0.72rem; }
  .search { margin-left: auto; }
  .search input { width: 10.5rem; font-size: 1rem; }
  /* The count goes on its own line over the map, under the type buttons. */
  .status { position: fixed; top: calc(var(--bar-h) + var(--kinds-h) + 0.4rem); left: 0.5rem; max-width: calc(100% - 1rem); flex: none;
    background: color-mix(in srgb, var(--bg) 85%, transparent); border: 1px solid var(--border); border-radius: 0.5rem; padding: 0.25rem 0.5rem; z-index: 2; }
  .panel { left: 0.5rem; right: 0.5rem; width: auto; top: auto; bottom: 0.5rem; max-height: 55%; }
  .note { max-width: calc(100% - 1.5rem); bottom: 1.75rem; }
}

/* Report this aircraft */
.p-actions { display: flex; gap: 0.5rem; flex-wrap: wrap; }
.report-btn { background: var(--green); color: #0a0a0a; border: 1px solid var(--green); border-radius: 0.5rem; padding: 0.45rem 0.9rem; font-size: 0.85rem; font-weight: 600; cursor: pointer; }
.report { width: min(40rem, calc(100% - 1rem)); max-height: calc(100% - 1rem); padding: 1.1rem 1.1rem 1rem; background: var(--bg2); color: var(--text);
  border: 1px solid var(--border); border-radius: 0.75rem; box-shadow: 0 1rem 3rem rgb(0 0 0 / 0.6); }
.report::backdrop { background: rgb(0 0 0 / 0.6); }
.report h2 { margin: 0 2rem 0.3rem 0; font-size: 1.2rem; }
.report h3 { margin: 1rem 0 0.4rem; font-size: 0.95rem; }
.report .r-close-form { position: absolute; top: 0.4rem; right: 0.5rem; margin: 0; }
.report .close { background: none; border: 0; color: var(--muted); font-size: 1.5rem; line-height: 1; cursor: pointer; padding: 0.25rem; }
.r-lead, .r-small, .r-dist { color: var(--muted); font-size: 0.85rem; margin: 0 0 0.75rem; }
.r-facts dl { display: grid; grid-template-columns: auto 1fr; gap: 0.3rem 0.9rem; margin: 0 0 0.9rem; font-size: 0.85rem; }
.r-facts dt { color: var(--muted); }
.r-facts dd { margin: 0; overflow-wrap: anywhere; font-variant-numeric: tabular-nums; }
.r-where { margin: 0 0 0.75rem; }
.r-loc, .r-buttons button, .r-send button { background: var(--bg3); color: var(--text); border: 1px solid var(--border); border-radius: 0.5rem; padding: 0.5rem 0.9rem; font-size: 0.85rem; cursor: pointer; }
.report .r-primary { background: var(--green); color: #0a0a0a; border-color: var(--green); font-weight: 600; }
.report fieldset { border: 1px solid var(--border); border-radius: 0.5rem; margin: 0 0 0.75rem; padding: 0.5rem 0.75rem 0.6rem; }
.report legend { color: var(--muted); font-size: 0.8rem; padding: 0 0.25rem; }
.r-check { display: flex; align-items: center; gap: 0.45rem; font-size: 0.9rem; padding: 0.2rem 0; }
.r-check input { accent-color: var(--green); width: 1.05rem; height: 1.05rem; }
.r-label { display: block; color: var(--muted); font-size: 0.8rem; margin: 0.5rem 0 0.25rem; }
.report textarea, .report input[type="text"] { width: 100%; background: var(--bg3); color: var(--text); border: 1px solid var(--border); border-radius: 0.5rem; padding: 0.5rem 0.6rem; font: inherit; font-size: 1rem; }
.report textarea:focus, .report input[type="text"]:focus, .report button:focus-visible { outline: 2px solid var(--green); outline-offset: 1px; }
.r-error { color: var(--text); font-size: 0.85rem; min-height: 1em; margin: 0.25rem 0 0.5rem; }
.r-error:not(:empty)::before { content: "⚠ "; color: var(--green); }
.r-out { border-top: 1px solid var(--border); margin-top: 0.9rem; padding-top: 0.9rem; }
.r-ready { font-size: 0.9rem; margin: 0 0 0.6rem; }
.r-buttons { display: flex; gap: 0.5rem; flex-wrap: wrap; }
.r-dest { list-style: none; padding: 0; margin: 0 0 0.6rem; display: grid; gap: 0.5rem; }
.r-dest li { background: var(--bg3); border: 1px solid var(--border); border-radius: 0.5rem; padding: 0.55rem 0.7rem; display: grid; gap: 0.15rem; font-size: 0.9rem; }
.r-dest a { color: var(--green); font-weight: 600; }
.r-dest span, .r-dest .r-note { color: var(--muted); font-size: 0.8rem; }
