[hidden] { display: none !important; }
@font-face { font-family: "VIC Slimline"; src: url("/fonts/slimline.ttf") format("truetype"); font-weight: 400 800; font-style: normal; font-display: swap; }
/* Everything is capitals, everywhere. The Slimline font has capitals, digits and a few marks only, so punctuation falls back to Geist. */
html, body, button, input, select, textarea, .maplibregl-popup, .maplibregl-ctrl { text-transform: uppercase; }
input::placeholder, textarea::placeholder { text-transform: uppercase; }
input[type="email"], input[type="password"] { text-transform: none; }
/* Matches agenticice.au: quiet studio sheet, ice-blue accent, Schibsted Grotesk / Geist / Geist Mono, pill buttons, ruled lines. */
:root {
  --bg: #FAFBFC; --panel: #FFFFFF; --ink: #0D1217; --ink-2: #5A6672; --line: #DFE4E9; --grid: #EEF2F5;
  --fleet: #0A6C8C; --on-fleet: #FFFFFF; --primary: #d97a00; --alert: #a85a00; --other: #7a8894; --ok: #1b7a45;
  --font-display: "VIC Slimline", "Helvetica Neue", Arial, sans-serif;
  --font-body: "VIC Slimline", "Geist", system-ui, sans-serif;
  --font-mono: "VIC Slimline", "Geist Mono", ui-monospace, monospace;
  color-scheme: light;
}
@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) {
    --bg: #0B0F13; --panel: #11171D; --ink: #EBF0F4; --ink-2: #93A1AD; --line: #232C35; --grid: #161E25;
    --fleet: #5CC4E4; --on-fleet: #06141A; --primary: #ffb23f; --alert: #ffb23f; --other: #5d6d7a; --ok: #4cc38a;
    color-scheme: dark;
  }
}
:root[data-theme="dark"] {
  --bg: #0B0F13; --panel: #11171D; --ink: #EBF0F4; --ink-2: #93A1AD; --line: #232C35; --grid: #161E25;
  --fleet: #5CC4E4; --on-fleet: #06141A; --primary: #ffb23f; --alert: #ffb23f; --other: #5d6d7a; --ok: #4cc38a;
  color-scheme: dark;
}

* { box-sizing: border-box; }
html, body { margin: 0; }
body {
  background: var(--bg); color: var(--ink); font-family: var(--font-body); font-size: 15px; line-height: 1.45;
  padding-left: max(16px, env(safe-area-inset-left, 0px));
  padding-right: max(16px, env(safe-area-inset-right, 0px));
  padding-top: max(14px, env(safe-area-inset-top, 0px));
  padding-bottom: max(28px, env(safe-area-inset-bottom, 0px));
}
button { font: inherit; color: inherit; cursor: pointer; }
button:disabled { cursor: not-allowed; opacity: 0.55; }
button:focus-visible, input:focus-visible, a:focus-visible { outline: 2px solid var(--fleet); outline-offset: 2px; }
a { color: var(--fleet); }
.mono { font-family: var(--font-mono); font-variant-numeric: tabular-nums; }

header.top { display: flex; flex-wrap: wrap; align-items: baseline; justify-content: space-between; gap: 6px 20px; margin-bottom: 12px; }
h1 { font-family: var(--font-display); font-weight: 800; font-size: 26px; letter-spacing: -0.04em; margin: 0; line-height: 1.1; }
.site { font-family: var(--font-mono); font-size: 12px; color: var(--ink-2); display: flex; align-items: center; gap: 10px; flex-wrap: wrap; }
.pill { display: inline-flex; align-items: center; gap: 6px; padding: 2px 9px; border: 1px solid var(--line); border-radius: 999px; font-size: 11px; color: var(--ink); background: var(--panel); letter-spacing: 0.04em; text-transform: uppercase; }
.pill i { width: 7px; height: 7px; border-radius: 50%; background: var(--other); display: block; }
.pill[data-state="live"] i { background: var(--ok); }
.pill[data-state="bad"] i { background: var(--alert); }

.app { display: grid; grid-template-columns: minmax(0, 1fr) 380px; gap: 16px; align-items: start; }
@media (max-width: 900px) { .app { grid-template-columns: minmax(0, 1fr); } }

.map-wrap { position: relative; height: calc(100dvh - 90px); min-height: 460px; max-height: 900px; border: 1px solid var(--line); border-radius: 12px; overflow: hidden; background: var(--grid); }
@media (max-width: 900px) { .map-wrap { height: 58dvh; min-height: 360px; } }
#map { position: absolute; inset: 0; }
.chip-row { position: absolute; top: 10px; left: 10px; right: 56px; display: flex; flex-wrap: wrap; gap: 6px; pointer-events: none; z-index: 2; }
.chip { pointer-events: auto; background: var(--panel); border: 1px solid var(--line); border-radius: 999px; padding: 6px 14px; font-size: 13px; font-weight: 500; line-height: 1.2; }
.chip[aria-pressed="true"] { background: var(--ink); border-color: var(--ink); color: var(--bg); }
.legend { position: absolute; left: 10px; bottom: 26px; z-index: 2; background: var(--panel); border: 1px solid var(--line); border-radius: 4px; padding: 6px 10px; display: flex; flex-wrap: wrap; gap: 4px 14px; font-size: 12px; color: var(--ink-2); max-width: calc(100% - 20px); }
.legend span { display: inline-flex; align-items: center; gap: 6px; }
.legend b { display: block; width: 10px; height: 10px; border-radius: 50%; }
.legend .l-primary { background: #ff9d00; }
.legend .l-fleet { background: #0A6C8C; }
.legend .l-other { background: #7b8a96; }
.legend .l-me { background: var(--ink); }
.toast { position: absolute; left: 50%; top: 52px; transform: translateX(-50%); z-index: 3; max-width: min(92%, 420px); background: var(--ink); color: var(--bg); padding: 10px 14px; border-radius: 6px; font-weight: 500; display: flex; gap: 10px; align-items: flex-start; box-shadow: 0 6px 20px rgba(0,0,0,0.25); }
.toast .tdot { width: 9px; height: 9px; border-radius: 50%; background: var(--primary); margin-top: 6px; flex: none; }
.maperr { position: absolute; inset: 0; display: grid; place-items: center; text-align: center; padding: 24px; background: var(--panel); color: var(--ink-2); z-index: 4; }
.maplibregl-ctrl-attrib { font-size: 11px; }

.panel { background: var(--panel); border: 1px solid var(--line); border-radius: 12px; min-width: 0; }
.sec { padding: 14px 16px; border-bottom: 1px solid var(--line); }
.sec:last-child { border-bottom: 0; }
h2 { font-family: var(--font-mono); font-size: 12px; font-weight: 500; text-transform: uppercase; letter-spacing: 0.08em; color: var(--ink-2); margin: 0 0 10px; }

.fleet-list { display: flex; flex-direction: column; margin: 0 -8px; }
.row { display: grid; grid-template-columns: 1fr auto; gap: 1px 10px; text-align: left; width: 100%; background: transparent; border: 0; border-radius: 4px; padding: 8px; align-items: center; }
.row:hover { background: color-mix(in srgb, var(--fleet) 8%, transparent); }
.row[aria-pressed="true"] { background: color-mix(in srgb, var(--fleet) 14%, transparent); }
.row.old .callsign { color: var(--ink-2); }
.callsign { font-family: var(--font-display); font-weight: 700; font-size: 20px; letter-spacing: -0.02em; line-height: 1.1; }
.tag { font-family: var(--font-mono); font-size: 10px; text-transform: uppercase; letter-spacing: 0.06em; color: var(--alert); border: 1px solid currentColor; border-radius: 3px; padding: 0 5px; margin-left: 8px; vertical-align: 3px; }
.status { font-family: var(--font-mono); font-size: 11px; text-transform: uppercase; letter-spacing: 0.06em; text-align: right; }
.status.air { color: var(--fleet); }
.status.gnd, .status.old { color: var(--ink-2); }
.meta { grid-column: 1 / -1; font-family: var(--font-mono); font-size: 12px; color: var(--ink-2); }
.subhead { font-family: var(--font-mono); font-size: 11px; color: var(--ink-2); text-transform: uppercase; letter-spacing: 0.06em; margin: 10px 8px 2px; }

.setting { display: flex; justify-content: space-between; align-items: center; gap: 14px; padding: 8px 0; }
.setting + .setting { border-top: 1px solid var(--line); }
.s-title { font-weight: 600; }
.s-desc { font-size: 12.5px; color: var(--ink-2); }
.switch { width: 44px; height: 26px; border-radius: 999px; border: 1px solid var(--line); background: var(--grid); position: relative; flex: none; padding: 0; }
.switch::after { content: ""; position: absolute; top: 2px; left: 2px; width: 20px; height: 20px; border-radius: 50%; background: var(--panel); border: 1px solid var(--line); transition: transform 0.15s; }
.switch[aria-checked="true"] { background: var(--fleet); border-color: var(--fleet); }
.switch[aria-checked="true"]::after { transform: translateX(18px); border-color: var(--fleet); }
@media (prefers-reduced-motion: reduce) { .switch::after { transition: none; } }
.slider-row { padding: 8px 0 4px; }
.slider-row label { display: flex; justify-content: space-between; font-weight: 600; margin-bottom: 4px; }
input[type="range"] { width: 100%; accent-color: var(--fleet); }
.seg { display: flex; border: 1px solid var(--line); border-radius: 999px; overflow: hidden; }
.seg button { flex: 1; border: 0; border-right: 1px solid var(--line); background: transparent; padding: 7px 2px; font-size: 13px; font-family: var(--font-mono); }
.seg button:last-child { border-right: 0; }
.seg button[aria-pressed="true"] { background: var(--ink); color: var(--bg); }
.seg button:disabled { opacity: 0.45; }
.btn { border: 1px solid var(--line); background: transparent; border-radius: 999px; padding: 8px 16px; font-weight: 600; font-size: 14px; }
.btn:hover { border-color: var(--ink); }
.btn.primary { background: var(--ink); border-color: var(--ink); color: var(--bg); }
.btn-row { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 12px; }
.note { font-size: 12.5px; color: var(--ink-2); margin: 8px 0 0; }
.limit { margin-top: 10px; padding: 8px 12px; border: 1px solid var(--alert); border-radius: 10px; color: var(--alert); font-size: 13px; }
.plan { border: 1px solid var(--line); border-radius: 10px; padding: 10px 12px; }
.plan-name { font-family: var(--font-display); font-weight: 700; font-size: 22px; line-height: 1.1; }
.plan-sub { font-family: var(--font-mono); font-size: 12px; color: var(--ink-2); margin-top: 2px; }
.meter { height: 6px; border-radius: 3px; background: var(--grid); margin-top: 8px; overflow: hidden; }
.meter div { height: 100%; width: 0; background: var(--fleet); }
.plus-list { margin: 10px 0 0; padding-left: 18px; color: var(--ink-2); font-size: 13.5px; }
.plusonly[data-locked="true"] { opacity: 0.5; }
.quiet-times { display: flex; gap: 14px; flex-wrap: wrap; font-size: 13px; padding-bottom: 6px; }
.quiet-times input { font: inherit; background: var(--panel); color: var(--ink); border: 1px solid var(--line); border-radius: 4px; padding: 3px 6px; }
.testing { border-top: 1px dashed var(--line) !important; margin-top: 6px; }

.log { list-style: none; margin: 0; padding: 0; max-height: 240px; overflow-y: auto; }
.log li { display: grid; grid-template-columns: auto 10px 1fr; gap: 8px; align-items: baseline; padding: 6px 0; border-top: 1px solid var(--line); font-size: 13.5px; }
.log li:first-child { border-top: 0; }
.log time { font-family: var(--font-mono); font-size: 11.5px; color: var(--ink-2); }
.log .d { width: 8px; height: 8px; border-radius: 50%; background: var(--other); align-self: center; }
.log .d.takeoff { background: var(--primary); }
.log .d.near { background: var(--fleet); }
.empty { color: var(--ink-2); font-size: 13.5px; margin: 4px 0; }
.maperr .mono { font-size: 11.5px; display: inline-block; margin-top: 8px; max-width: 420px; word-break: break-word; }

h3 { font-family: var(--font-display); font-size: 15px; font-weight: 600; text-transform: uppercase; letter-spacing: 0.1em; color: var(--ink-2); margin: 16px 0 6px; }
.nomargin { margin-top: 0; }
.legend .l-haz { background: #e5484d; }
.legend .l-rep { background: #8a5cf6; }
.log .d.hazard { background: #e5484d; }
.haz-list { display: flex; flex-direction: column; }
.haz { padding: 8px 0; border-top: 1px solid var(--line); }
.haz:first-child { border-top: 0; }
.haz-top { display: flex; justify-content: space-between; gap: 10px; align-items: baseline; }
.haz-type { font-weight: 600; }
.haz-src { font-family: var(--font-mono); font-size: 10px; text-transform: uppercase; letter-spacing: 0.06em; color: var(--ink-2); border: 1px solid var(--line); border-radius: 3px; padding: 0 5px; flex: none; }
.haz-meta { font-family: var(--font-mono); font-size: 12px; color: var(--ink-2); }
.haz-text { font-size: 13.5px; }
.haz button.link { background: none; border: 0; padding: 0; color: var(--fleet); text-decoration: underline; font-size: 12.5px; }
.rep-form label { display: block; font-weight: 600; margin: 10px 0 4px; font-size: 13.5px; }
.rep-form select, .rep-form input[type="text"] { width: 100%; font: inherit; background: var(--panel); color: var(--ink); border: 1px solid var(--line); border-radius: 4px; padding: 7px 8px; }
.btn[aria-pressed="true"] { background: var(--fleet); color: var(--on-fleet); border-color: var(--fleet); }
.maplibregl-popup-content { font-family: var(--font-body); font-size: 13px; max-width: 240px; color: #131f2a; }
.maplibregl-popup-content button { font: inherit; margin-top: 6px; background: none; border: 0; padding: 0; color: #1450d8; text-decoration: underline; cursor: pointer; }

/* accounts */
.acct, .rep-gate { background: var(--panel2, rgba(127,127,127,.08)); border-radius: 10px; padding: 12px; }
.rep-gate { margin-bottom: 10px; }
.modal { position: fixed; inset: 0; z-index: 50; background: rgba(0,0,0,.55); display: grid; place-items: center; padding: 16px; }
.modal-card { position: relative; width: min(380px, 100%); max-height: 92vh; overflow: auto; background: var(--bg, #fff); color: inherit; border-radius: 14px; padding: 20px; box-shadow: 0 10px 40px rgba(0,0,0,.4); }
.modal-card h2 { margin: 0 0 14px; }
.modal-card label { display: block; margin: 10px 0 4px; font-size: 13px; }
.modal-card input { width: 100%; box-sizing: border-box; padding: 10px; font: inherit; font-size: 16px; border-radius: 8px; border: 1px solid rgba(127,127,127,.5); background: transparent; color: inherit; }
.modal-x { position: absolute; top: 8px; right: 10px; background: none; border: 0; font-size: 26px; color: inherit; cursor: pointer; }
.btn.wide, .btn.google { width: 100%; margin-top: 14px; }
.btn.google { margin-top: 0; }
.or { text-align: center; margin: 14px 0 0; font-size: 12px; opacity: .7; }
#authMsg[data-ok="1"] { color: #2e9e5b; }
#authMsg:not([data-ok="1"]) { color: #d64545; }
#hazScope { margin: 4px 0 10px; }
.modal[hidden], .rep-gate[hidden], .rep-form[hidden] { display: none !important; }


h1, h2, .callsign, .status, .tag, .btn, .chip, .seg button, .s-title, .plan-name { font-family: var(--font-display), var(--font-body); font-synthesis: none; font-weight: 400; letter-spacing: 0.04em; }
h1 { font-size: 32px; } .callsign { font-size: 24px; } h2 { font-size: 15px; }

/* one font, one weight, everywhere */
html, body, button, input, select, textarea, .maplibregl-popup, .maplibregl-ctrl { font-family: var(--font-body); font-synthesis: none; letter-spacing: 0.04em; }
b, strong, h1, h2, h3, .s-title { font-weight: 400; }
body { font-size: 16px; }
.mono { font-family: var(--font-mono); }

/* brand: number plate logo */
h1 { display: flex; align-items: center; gap: 12px; flex-wrap: wrap; }
.plate { position: relative; display: inline-block; padding: 3px 22px; background: #fff; color: #0b1f4b; border: 2px solid #0b1f4b; border-radius: 7px;
  box-shadow: inset 0 0 0 2px #fff, inset 0 0 0 3px #9aa7bf, 0 1px 2px rgba(0,0,0,.35); font-size: 26px; letter-spacing: 0.1em; line-height: 1.15; text-shadow: 0 1px 0 rgba(255,255,255,.9), 0 -1px 0 rgba(11,31,75,.25); }
.plate::before, .plate::after { content: ""; position: absolute; top: 50%; width: 5px; height: 5px; margin-top: -2.5px; border-radius: 50%; background: radial-gradient(circle at 35% 35%, #fff, #8c98ae); }
.plate::before { left: 7px; } .plate::after { right: 7px; }

.chip[hidden] { display: none; }
.chip-x { padding: 6px 11px; }
