/* Last Hertz console. Offline only: fonts are vendored, no network URLs. */
@font-face { font-family: "IBM Plex Sans"; font-weight: 400; src: url("vendor/fonts/ibm-plex-sans-latin-400-normal.woff2") format("woff2"); unicode-range: U+0000-00FF; }
@font-face { font-family: "IBM Plex Sans"; font-weight: 400; src: url("vendor/fonts/ibm-plex-sans-latin-ext-400-normal.woff2") format("woff2"); unicode-range: U+0100-024F, U+1E00-1EFF; }
@font-face { font-family: "IBM Plex Sans"; font-weight: 600; src: url("vendor/fonts/ibm-plex-sans-latin-600-normal.woff2") format("woff2"); unicode-range: U+0000-00FF; }
@font-face { font-family: "IBM Plex Sans"; font-weight: 600; src: url("vendor/fonts/ibm-plex-sans-latin-ext-600-normal.woff2") format("woff2"); unicode-range: U+0100-024F, U+1E00-1EFF; }
@font-face { font-family: "IBM Plex Sans"; font-weight: 700; src: url("vendor/fonts/ibm-plex-sans-latin-700-normal.woff2") format("woff2"); unicode-range: U+0000-00FF; }
@font-face { font-family: "IBM Plex Sans"; font-weight: 700; src: url("vendor/fonts/ibm-plex-sans-latin-ext-700-normal.woff2") format("woff2"); unicode-range: U+0100-024F, U+1E00-1EFF; }
@font-face { font-family: "IBM Plex Mono"; font-weight: 400; src: url("vendor/fonts/ibm-plex-mono-latin-400-normal.woff2") format("woff2"); unicode-range: U+0000-00FF; }
@font-face { font-family: "IBM Plex Mono"; font-weight: 400; src: url("vendor/fonts/ibm-plex-mono-latin-ext-400-normal.woff2") format("woff2"); unicode-range: U+0100-024F, U+1E00-1EFF; }
@font-face { font-family: "IBM Plex Mono"; font-weight: 600; src: url("vendor/fonts/ibm-plex-mono-latin-600-normal.woff2") format("woff2"); unicode-range: U+0000-00FF; }
@font-face { font-family: "IBM Plex Mono"; font-weight: 600; src: url("vendor/fonts/ibm-plex-mono-latin-ext-600-normal.woff2") format("woff2"); unicode-range: U+0100-024F, U+1E00-1EFF; }

:root {
  --ease: cubic-bezier(.25,1,.5,1);   /* ease-out-quart */
  --ink: #eef1f6; --ink-2: #a9b2c0; --ink-3: #8b94a5;
  --paper: #0a0d12; --white: #11161f; --rule: #1c2431; --rule-2: #242f3f;
  --night: #0d1117; --amber: #d9b23a;
  --reach: #4a8dff; --other: #5a6270; --covered: #4a8dff; --missed: #ef5b5f;
  --additional: #d9a03a; --additional-text: #d9a03a; --unknown: #8c7fb0; --foreign: #3d4450; --ellipse: #8b7cff;
  --glass: rgba(16,21,30,.72); --panel: #11161f; --input: #0d1117;
  --map-bg: #0b0e13;
  --mono: "IBM Plex Mono", ui-monospace, Menlo, monospace;
  --sans: "IBM Plex Sans", system-ui, -apple-system, "Segoe UI", sans-serif;
  color-scheme: dark;
}
[data-theme="light"] {
  --ink: #1c1f24; --ink-2: #454c58; --ink-3: #6a717b;
  --paper: #f4f2ec; --white: #ffffff; --rule: #e2ded2; --rule-2: #d8d3c4;
  --night: #14171c; --amber: #c79a2e;
  --reach: #2f6de0; --other: #9aa2ac; --covered: #2f6de0; --missed: #d43a3f;
  --additional: #b57f1f; --additional-text: #8a5f0e; --unknown: #8c7fb0; --foreign: #c4c8cd; --ellipse: #6a55e0;
  --glass: rgba(255,255,255,.82); --panel: #ffffff; --input: #ffffff;
  --map-bg: #efede5;
  color-scheme: light;
}
* { box-sizing: border-box; }
html, body { margin: 0; height: 100%; }
body { font-family: var(--sans); color: var(--ink); background: var(--paper); font-size: 15px; display: flex; flex-direction: column; transition: background-color .35s, color .35s; scrollbar-color: var(--rule-2) transparent; }
::selection { background: color-mix(in srgb, var(--amber) 45%, transparent); color: var(--ink); }
:focus-visible { outline: 2px solid var(--amber); outline-offset: 2px; }
a { color: var(--reach); text-underline-offset: 3px; }
.mono { font-family: var(--mono); }
.small { font-size: 13px; color: var(--ink-2); line-height: 1.45; }
.label { font-family: var(--mono); font-size: 11px; letter-spacing: .08em; text-transform: uppercase; color: var(--ink-3); }

.banner { background: var(--amber); color: #201a00; font-weight: 600; font-size: 13px; letter-spacing: .03em; text-align: center; padding: 7px 20px; position: sticky; top: 0; z-index: 30; animation: bannerIn .6s var(--ease) both; }
@keyframes bannerIn { from { transform: translateY(-100%); } to { transform: none; } }
.topbar { position: sticky; top: 42px; z-index: 25; margin: 10px 12px 0; border-radius: 18px; display: flex; flex-wrap: wrap; align-items: center; gap: 18px; padding: 8px 18px; background: var(--glass); backdrop-filter: blur(20px) saturate(150%); -webkit-backdrop-filter: blur(20px) saturate(150%); border: 1px solid var(--rule-2); }
.brand { display: flex; align-items: baseline; gap: 10px; }
.brand-name { font-weight: 700; letter-spacing: .03em; font-size: 17px; }
.brand-sub { font-size: 12px; color: var(--ink-2); }
.steps { display: flex; gap: 18px; flex-wrap: wrap; }
.steps a { color: var(--ink-2); text-decoration: none; font-size: 13px; padding: 10px 0 8px; border-bottom: 2px solid transparent; transition: color .25s, border-color .25s; }
.steps a:hover, .steps a:focus-visible { color: var(--ink); border-bottom-color: var(--amber); }
.status-chips { margin-left: auto; display: flex; gap: 8px; align-items: center; }
.chip { font-family: var(--mono); font-size: 12px; padding: 4px 8px; border: 1px solid var(--rule-2); color: var(--ink-2); border-radius: 99px; }
.chip.mock { background: var(--amber); color: #201a00; border-color: var(--amber); font-weight: 600; }
#theme-toggle { display: inline-grid; place-items: center; width: 32px; height: 32px; padding: 0; border: 1px solid var(--rule-2); border-radius: 99px; background: transparent; color: var(--ink-2); cursor: pointer; transition: color .25s, border-color .25s; }
#theme-toggle:hover { color: var(--ink); border-color: var(--ink-3); }
#theme-toggle svg { width: 16px; height: 16px; }

.layout { flex: 1; display: grid; grid-template-columns: minmax(0, 1fr) 460px 300px; min-height: 0; padding: 12px; gap: 12px; }
.map-wrap { position: relative; min-height: 520px; border: 1px solid var(--rule); border-radius: 18px; overflow: hidden; background: var(--map-bg); }
#map { position: absolute; inset: 0; }
.map-top { position: absolute; left: 12px; top: 12px; right: 56px; display: flex; flex-direction: column; align-items: flex-start; gap: 8px; z-index: 2; pointer-events: none; }
.map-top > * { pointer-events: auto; }
.map-note { font-family: var(--mono); font-size: 12px; color: var(--ink-2); background: var(--panel); border: 1px solid var(--rule); border-radius: 10px; padding: 5px 9px; max-width: 100%; }
.map-zoom { background: var(--panel); border: 1px solid var(--rule); border-radius: 12px; padding: 4px; }
.map-legend { position: absolute; left: 12px; bottom: 12px; z-index: 2; display: grid; grid-template-columns: repeat(2, auto); gap: 6px 16px; font-size: 12px; background: var(--panel); border: 1px solid var(--rule); border-radius: 12px; padding: 10px 12px; color: var(--ink-2); }
.map-legend span, .bar-key span { display: flex; align-items: center; gap: 6px; }
.sw { display: inline-block; flex: none; width: 14px; height: 10px; border-radius: 3px; }
.sw-reach { background: var(--reach); opacity: .6; } .sw-other { background: var(--other); }
.sw-covered { background: var(--covered); } .sw-missed { background: var(--missed); }
.sw-additional { background: var(--additional); } .sw-foreign { background: var(--foreign); }
.sw-unknown { background: repeating-linear-gradient(45deg, var(--unknown) 0 2px, transparent 2px 5px); }
.town { font-size: 13px; font-weight: 600; color: var(--ink); text-shadow: 0 0 3px var(--paper), 0 0 3px var(--paper); pointer-events: none; }

/* MapLibre chrome, themed so the vendor defaults do not show through. */
.maplibregl-ctrl-group { background: var(--panel); border: 1px solid var(--rule); box-shadow: none; }
.maplibregl-ctrl-group button + button { border-top-color: var(--rule); }
[data-theme="dark"] .maplibregl-ctrl-group button .maplibregl-ctrl-icon { filter: invert(1); }
.maplibregl-ctrl-scale { font-family: var(--mono); font-size: 12px; background: color-mix(in srgb, var(--panel) 85%, transparent); border-color: var(--ink-3); color: var(--ink); }
.maplibregl-ctrl-attrib, .maplibregl-ctrl.maplibregl-ctrl-attrib { background: var(--panel); color: var(--ink-2); font-size: 12px; border: 1px solid var(--rule); }
.maplibregl-ctrl-attrib a { color: var(--ink-2); }
[data-theme="dark"] .maplibregl-ctrl-attrib-button { filter: invert(1); }

.panel { background: var(--panel); border: 1px solid var(--rule); border-radius: 18px; overflow-y: auto; }
.block { padding: 22px 24px; border-bottom: 1px solid var(--rule); }
.block:last-child { border-bottom: 0; }
h1 { margin: 0 0 12px; font-size: 24px; font-weight: 700; letter-spacing: -.01em; }
h2 { margin: 0 0 14px; font-size: 21px; font-weight: 700; line-height: 1.25; letter-spacing: -.01em; text-wrap: balance; }
h2.sec { font-size: 17px; margin-bottom: 12px; }
h3 { margin: 0 0 4px; font-size: 14px; font-weight: 600; }
.kv { display: grid; grid-template-columns: auto 1fr; gap: 6px 16px; margin: 0 0 10px; font-size: 14px; }
.kv dt { color: var(--ink-2); } .kv dd { margin: 0; font-family: var(--mono); text-align: right; font-variant-numeric: tabular-nums; text-wrap: pretty; }

.seg { display: flex; border: 1px solid var(--rule-2); border-radius: 99px; padding: 3px; margin-bottom: 12px; }
.seg-btn { flex: 1; border: 0; border-radius: 99px; background: transparent; color: var(--ink-2); min-height: 40px; font: 500 14px var(--sans); cursor: pointer; transition: background-color .3s var(--ease), color .3s var(--ease); }
.seg-btn:hover { color: var(--ink); }
.seg-btn[aria-pressed="true"] { background: var(--ink); color: var(--paper); font-weight: 600; }
.lambda { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; margin-bottom: 12px; }
.chips { display: flex; gap: 6px; flex-wrap: wrap; }
.chips button { font: 500 13px var(--mono); padding: 8px 12px; min-height: 36px; border: 1px solid var(--rule-2); border-radius: 99px; background: transparent; color: var(--ink-2); cursor: pointer; transition: background-color .25s var(--ease), color .25s var(--ease), border-color .25s var(--ease); }
.chips button:hover { color: var(--ink); border-color: var(--ink-3); }
.chips button[aria-pressed="true"] { background: var(--ink); color: var(--paper); border-color: transparent; }
.plain { font-size: 17px; line-height: 1.55; margin: 4px 0 12px; }
.plain .neg { color: var(--missed); font-weight: 600; }
.bar { display: flex; height: 12px; border-radius: 99px; background: var(--rule); margin-bottom: 8px; overflow: hidden; }
.bar div { height: 100%; }
.bar-key { display: flex; gap: 14px; flex-wrap: wrap; font-size: 12px; color: var(--ink-2); margin-bottom: 14px; }
.table-wrap { overflow-x: auto; }
table { border-collapse: collapse; width: 100%; font-size: 13px; }
th { font-family: var(--mono); font-size: 11px; letter-spacing: .04em; text-transform: uppercase; color: var(--ink-3); font-weight: 500; text-align: right; padding: 6px 6px; white-space: nowrap; }
th:first-child, td:first-child { text-align: left; }
td { padding: 9px 6px; border-top: 1px solid var(--rule); text-align: right; font-family: var(--mono); white-space: nowrap; font-variant-numeric: tabular-nums; }
td:first-child { font-family: var(--sans); font-weight: 600; }
th.missed, td.missed { color: var(--missed); } td.missed { font-weight: 600; font-size: 15px; }
th.additional, td.additional { color: var(--additional-text); }
tr.sel td { background: var(--rule); }
.toggle { display: flex; align-items: center; gap: 8px; margin: 10px 0 4px; }

.actions { display: flex; gap: 10px; flex-wrap: wrap; margin: 12px 0; }
.btn { font: 600 14px var(--sans); padding: 12px 18px; min-height: 44px; border: 1px solid var(--rule-2); border-radius: 99px; background: transparent; color: var(--ink); cursor: pointer; transition: background-color .25s var(--ease), border-color .25s var(--ease), opacity .25s; }
.btn:hover:not(:disabled) { border-color: var(--ink-3); }
.btn-primary { background: var(--ink); color: var(--paper); border-color: transparent; }
.btn-primary:hover:not(:disabled) { background: color-mix(in srgb, var(--ink) 88%, var(--paper)); }
.btn:disabled { opacity: .45; cursor: not-allowed; }
.warn { background: color-mix(in srgb, var(--missed) 12%, transparent); border: 1px solid color-mix(in srgb, var(--missed) 40%, transparent); color: var(--missed); padding: 10px 12px; font-weight: 600; border-radius: 12px; }
.ok-note { background: var(--rule); padding: 10px 12px; font-size: 14px; border-radius: 12px; }
.strip-head { display: flex; justify-content: space-between; align-items: baseline; margin: 8px 0 6px; }
.strip { display: grid; grid-template-columns: repeat(61, minmax(0, 1fr)); gap: 1px; margin-bottom: 10px; }
.strip i { height: 14px; display: block; border-radius: 2px; }
.hexrow { display: flex; gap: 8px; margin-bottom: 10px; }
.hex { flex: 1; font: 500 13px var(--mono); background: var(--input); border: 1px solid var(--rule); color: var(--ink); padding: 12px; word-break: break-all; border-radius: 12px; }
.fields td:nth-child(2) { font-family: var(--sans); text-align: left; white-space: normal; }
.fields td:nth-child(5) { font-family: var(--sans); text-align: left; white-space: normal; color: var(--ink-2); }
.fields th:nth-child(2), .fields th:nth-child(5) { text-align: left; }

.field { display: flex; flex-direction: column; gap: 6px; font-size: 14px; margin-bottom: 10px; }
textarea, input[type=text], .field input { font: 500 13px var(--mono); padding: 10px; border: 1px solid var(--rule-2); border-radius: 12px; background: var(--input); color: var(--ink); resize: none; caret-color: var(--amber); }
.result { margin: 12px 0; padding: 14px; font-size: 15px; border-radius: 12px; border: 1px solid var(--rule); }
.result.in { background: color-mix(in srgb, var(--covered) 12%, transparent); color: var(--covered); }
.result.out { background: color-mix(in srgb, var(--missed) 10%, transparent); color: var(--missed); }
.result b { display: block; font-size: 18px; margin-bottom: 4px; }
.integrity { border-top: 1px solid var(--rule); padding-top: 14px; margin-top: 14px; }
.integrity p { margin: 4px 0 0; }

.phone-wrap { padding: 20px 8px; overflow-y: auto; display: flex; flex-direction: column; gap: 14px; align-items: center; }
/* Phone app result screen (mirrors frontend/phone, Material 3 theme from lib/main.dart). */
.app {
  --a-bg: #0a0d12; --a-bar: #11161f; --a-card: #151b25; --a-ink: #f2f4f8; --a-ink-2: #aab3c0; --a-line: #e6e8ec;
  --a-seg: #03dac6; --a-seg-ink: #00201d;
  position: relative; width: 360px; max-width: 100%; background: var(--a-bg); color: var(--a-ink);
  border: 1px solid var(--rule-2); border-radius: 30px; overflow: hidden; display: flex; flex-direction: column;
  font: 400 14px/1.43 Roboto, "IBM Plex Sans", system-ui, sans-serif; box-shadow: 0 14px 40px rgba(0,0,0,.35);
}
[data-theme="light"] .app { --a-bg: #f4f2ec; --a-bar: #ffffff; --a-card: #ffffff; --a-ink: #1b1c1f; --a-ink-2: #5d636d; --a-line: #3a3d42; --a-seg-ink: #00201d; }
@media (min-width: 1281px) { .app, .prov { zoom: .8; } }
.app-bar { display: flex; align-items: center; gap: 14px; padding: 22px 12px 10px 16px; background: var(--a-bar); }
.app-back { font-size: 22px; line-height: 1; }
.app-title { font-size: 21px; flex: 1; }
.app-seg { display: flex; border: 1px solid var(--a-line); border-radius: 99px; overflow: hidden; }
.app-seg button { font: 600 13px Roboto, system-ui, sans-serif; padding: 6px 16px; border: 0; background: transparent; color: var(--a-ink); cursor: pointer; }
.app-seg button + button { border-left: 1px solid var(--a-line); }
.app-seg button[aria-pressed="true"] { background: var(--a-seg); color: var(--a-seg-ink); }
.app-banner { background: #d9b23a; color: #201a00; font: 700 12px Roboto, system-ui, sans-serif; letter-spacing: 0; white-space: nowrap; text-align: center; padding: 8px 10px; }
.app-body { padding: 14px 12px 18px; display: flex; flex-direction: column; gap: 12px; min-height: 520px; }
.app-chip { align-self: flex-start; border: 1px solid var(--a-line); border-radius: 8px; padding: 6px 12px; font: 500 14px Roboto, system-ui, sans-serif; }
.app-map { height: 220px; border-radius: 0; background: #0b0e13; }
.app-card { background: var(--a-card); border-radius: 12px; padding: 16px; display: flex; flex-direction: column; gap: 2px; }
[data-theme="light"] .app-card { box-shadow: 0 1px 2px rgba(0,0,0,.08); }
.app-verdict { font-size: 24px; font-weight: 700; line-height: 1.25; margin-bottom: 2px; }
.app-meta { font: 400 12px var(--mono); margin-top: 6px; }
.app-hazard { font-size: 18px; font-weight: 700; }
.app-instr { margin-top: 8px; }
.app-src { font-size: 12px; color: var(--a-ink-2); }
.app-note { font-size: 12px; font-style: italic; margin-top: 6px; }
.app-hint { color: var(--a-ink-2); margin: 0; }
#phone-body { display: flex; flex-direction: column; gap: 12px; }
.tag { font-size: 12px; color: var(--additional-text); }
.prov { width: 360px; max-width: 100%; padding: 0 6px; display: flex; flex-wrap: wrap; gap: 6px; }
.prov .label { width: 100%; }
.prov .chip { font-size: 11px; }
.prov .chip.off { color: var(--ink-3); border-style: dashed; }

dialog { border: 0; padding: 0; max-width: 440px; border-radius: 20px; background: var(--panel); color: var(--ink); box-shadow: 0 24px 60px rgba(0,0,0,.45); }
dialog::backdrop { background: rgba(4,6,10,.55); backdrop-filter: blur(6px); }
.dlg { padding: 22px; display: flex; flex-direction: column; gap: 12px; }
.check { display: flex; gap: 10px; align-items: flex-start; font-size: 14px; }
.check input { width: 18px; height: 18px; margin: 0; accent-color: var(--ink); }

@media (max-width: 1280px) {
  .layout { grid-template-columns: minmax(0, 1fr) 440px; }
  .phone-wrap { grid-column: 1 / -1; display: flex; justify-content: center; }
}
@media (max-width: 860px) {
  .topbar { position: static; }
  .layout { grid-template-columns: 1fr; }
  .map-wrap { display: flex; flex-direction: column; min-height: 0; }
  #map { position: relative; inset: auto; height: 420px; }
  .map-legend { position: static; grid-template-columns: 1fr 1fr; border: 0; border-top: 1px solid var(--rule); border-radius: 0; }
  .block { padding: 20px 18px; }
}
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation: none !important; transition: none !important; }
}
