@font-face { font-family: "Barlow"; font-weight: 400; font-display: swap; src: url(vendor/fonts/barlow-latin-400-normal.woff2) format("woff2"); }
@font-face { font-family: "Barlow"; font-weight: 500; font-display: swap; src: url(vendor/fonts/barlow-latin-500-normal.woff2) format("woff2"); }
@font-face { font-family: "Barlow"; font-weight: 600; font-display: swap; src: url(vendor/fonts/barlow-latin-600-normal.woff2) format("woff2"); }
@font-face { font-family: "Barlow Condensed"; font-weight: 500; font-display: swap; src: url(vendor/fonts/barlow-condensed-latin-500-normal.woff2) format("woff2"); }
@font-face { font-family: "Barlow Condensed"; font-weight: 600; font-display: swap; src: url(vendor/fonts/barlow-condensed-latin-600-normal.woff2) format("woff2"); }
@font-face { font-family: "DM Mono"; font-weight: 400; font-display: swap; src: url(vendor/fonts/dm-mono-latin-400-normal.woff2) format("woff2"); }
@font-face { font-family: "DM Mono"; font-weight: 500; font-display: swap; src: url(vendor/fonts/dm-mono-latin-500-normal.woff2) format("woff2"); }

:root {
  --ink: #0C1821;
  --panel: #101F2B;
  --raised: #172A39;
  --line: #24394B;
  --text: #E4EDF2;
  --muted: #8FA6B5;
  --faint: #5F7789;
  --weak: #F0554A;
  --fair: #F5B13D;
  --good: #4FD8A8;
  --route: #FFE7A0;
  --focus: #6CC4FF;
  --body: "Barlow", system-ui, sans-serif;
  --display: "Barlow Condensed", "Barlow", system-ui, sans-serif;
  --hex: "DM Mono", ui-monospace, monospace;
}

* { box-sizing: border-box; }
html, body { height: 100%; margin: 0; }
body { background: var(--ink); color: var(--text); font: 400 14px/1.45 var(--body); -webkit-font-smoothing: antialiased; }
button, input, select { font: inherit; color: inherit; }
button { cursor: pointer; }
:focus-visible { outline: 2px solid var(--focus); outline-offset: 2px; }
[hidden] { display: none !important; }

#app { display: grid; grid-template-columns: 384px minmax(0, 1fr); height: 100%; }

/* ------------------------------------------------------------------ planner */
#planner { display: flex; flex-direction: column; min-height: 0; background: var(--panel); border-right: 1px solid var(--line); z-index: 3; }
.brand { display: flex; align-items: center; gap: 12px; padding: 18px 20px 14px; }
.brand h1 { margin: 0; font: 600 26px/1 var(--display); letter-spacing: 0.01em; }
.brand p { margin: 3px 0 0; color: var(--muted); font-size: 13px; }
#demo-badge { margin-left: auto; padding: 3px 9px; border: 1px solid var(--fair); border-radius: 99px; color: var(--fair); font-size: 12px; font-weight: 500; white-space: nowrap; }

.tabs { display: flex; gap: 18px; padding: 0 20px; border-bottom: 1px solid var(--line); }
.tabs button { position: relative; padding: 8px 0 10px; background: none; border: 0; color: var(--muted); font-weight: 500; }
.tabs button[aria-selected="true"] { color: var(--text); }
.tabs button[aria-selected="true"]::after { content: ""; position: absolute; left: 0; right: 0; bottom: -1px; height: 2px; background: var(--route); }
#live-dot { display: inline-block; width: 6px; height: 6px; margin-left: 4px; border-radius: 50%; background: var(--faint); vertical-align: 2px; }
#live-dot.on { background: var(--good); }

.tab { flex: 1; min-height: 0; overflow-y: auto; padding: 18px 20px 24px; scrollbar-width: thin; scrollbar-color: var(--line) transparent; }

.endpoints { display: grid; grid-template-columns: 14px 1fr 34px; gap: 10px; align-items: center; }
.rail { display: flex; flex-direction: column; align-items: center; height: 100%; padding: 31px 0 15px; }
.rail i { width: 10px; height: 10px; border-radius: 50%; border: 2px solid var(--route); flex: none; }
.rail i.end { background: var(--route); }
.rail b { flex: 1; width: 2px; margin: 4px 0; background: repeating-linear-gradient(var(--faint) 0 3px, transparent 3px 7px); }
.fields { display: grid; gap: 10px; }
.picker label { display: block; margin-bottom: 4px; color: var(--muted); font-size: 13px; }
.combo { position: relative; }
.combo input { width: 100%; height: 38px; padding: 0 38px 0 11px; background: var(--ink); border: 1px solid var(--line); border-radius: 6px; }
.combo input::placeholder { color: var(--faint); }
.combo input:focus { border-color: var(--focus); outline: none; }
.combo .pick { position: absolute; right: 3px; top: 3px; width: 32px; height: 32px; display: grid; place-items: center; background: none; border: 0; border-radius: 4px; color: var(--muted); }
.combo .pick:hover, .combo .pick.armed { color: var(--route); background: var(--raised); }
.options { position: absolute; z-index: 20; left: 0; right: 0; top: 42px; max-height: 264px; overflow-y: auto; margin: 0; padding: 4px; list-style: none; background: var(--raised); border: 1px solid var(--line); border-radius: 6px; box-shadow: 0 14px 30px rgba(3, 10, 16, 0.55); }
.options li { display: flex; align-items: baseline; gap: 8px; padding: 6px 8px; border-radius: 4px; cursor: pointer; }
.options li[aria-selected="true"], .options li:hover { background: #20384B; }
.options .kind { margin-left: auto; color: var(--muted); font-size: 12px; white-space: nowrap; }
.options .hex { color: var(--faint); }
.options .none { color: var(--muted); cursor: default; }
#swap { width: 34px; height: 34px; margin-top: 22px; display: grid; place-items: center; background: none; border: 1px solid var(--line); border-radius: 6px; color: var(--muted); }
#swap:hover { color: var(--text); border-color: var(--faint); }

.metrics { margin: 20px 0 0; padding: 0; border: 0; }
.metrics legend { padding: 0; margin-bottom: 6px; color: var(--muted); font-size: 13px; }
.metric { display: grid; grid-template-columns: 18px 1fr; gap: 0 8px; padding: 7px 9px; border-radius: 6px; cursor: pointer; }
.metric:hover { background: rgba(255, 255, 255, 0.03); }
.metric input { grid-row: span 2; appearance: none; width: 16px; height: 16px; margin: 2px 0 0; border: 1.5px solid var(--faint); border-radius: 50%; background: none; }
.metric input:checked { border-color: var(--route); background: radial-gradient(var(--route) 0 4px, transparent 4.6px); }
.metric strong { font-weight: 500; }
.metric span { color: var(--muted); font-size: 13px; line-height: 1.35; }
.metric:has(input:checked) { background: var(--raised); }
.metric:has(input:not(:checked)) span { display: none; }

.hint { margin: 22px 0 0; color: var(--muted); }

/* ------------------------------------------------------------------ result */
#result { margin-top: 22px; }
.answer { padding: 16px 16px 14px; background: var(--ink); border: 1px solid #5E5536; border-radius: 8px; }
.answer h2 { margin: 0 0 8px; font: 500 13px/1.3 var(--body); color: var(--muted); }
.pathline { display: flex; align-items: flex-start; gap: 10px; }
.pathline code { flex: 1; min-width: 0; font: 500 24px/1.25 var(--hex); color: var(--route); overflow-wrap: anywhere; letter-spacing: 0.01em; }
.pathline code.direct { font: 500 17px/1.4 var(--body); }
.copy { flex: none; height: 32px; padding: 0 12px; background: var(--route); border: 0; border-radius: 5px; color: #2A2206; font-weight: 600; }
.copy:hover { background: #FFF1C4; }
.copy.small { height: 24px; padding: 0 8px; background: none; border: 1px solid var(--line); color: var(--muted); font-weight: 500; font-size: 12px; }
.copy.small:hover { color: var(--text); border-color: var(--faint); background: none; }
.sizes { display: flex; align-items: center; gap: 6px; margin-top: 10px; color: var(--muted); font-size: 13px; }
.sizes button { height: 24px; padding: 0 8px; background: none; border: 1px solid var(--line); border-radius: 4px; color: var(--muted); font-size: 12px; }
.sizes button[aria-pressed="true"] { border-color: var(--route); color: var(--route); }
.sizes button:disabled { opacity: 0.4; cursor: not-allowed; }
.answer .how { margin: 10px 0 0; color: var(--muted); font-size: 13px; }
.answer .opt { display: flex; gap: 7px; align-items: center; margin-top: 8px; color: var(--muted); font-size: 13px; }
.answer .opt input { accent-color: var(--route); margin: 0; }

.figures { display: grid; grid-template-columns: repeat(2, 1fr); gap: 1px; margin: 14px 0 0; background: var(--line); border: 1px solid var(--line); border-radius: 8px; overflow: hidden; }
.figures div { padding: 10px 12px; background: var(--panel); }
.figures dt { color: var(--muted); font-size: 12px; }
.figures dd { margin: 2px 0 0; font: 600 24px/1.1 var(--display); }
.figures dd small { font: 500 13px var(--body); color: var(--muted); margin-left: 2px; }

.ladder { margin: 18px 0 0; padding: 0; list-style: none; }
.ladder .stop { display: grid; grid-template-columns: 16px 1fr auto; gap: 10px; align-items: center; }
.ladder .stop i { width: 10px; height: 10px; margin: 0 3px; border-radius: 50%; background: var(--text); }
.ladder .stop.companion i { background: none; border: 2px solid var(--muted); }
.ladder .stop button { padding: 0; background: none; border: 0; text-align: left; font-weight: 500; }
.ladder .stop button:hover { color: var(--route); }
.ladder .stop .hex { font: 400 12px var(--hex); color: var(--faint); }
.ladder .hop { display: grid; grid-template-columns: 16px 1fr; gap: 10px; }
.ladder .hop::before { content: ""; width: 2px; margin: 2px 7px; background: var(--c, var(--faint)); border-radius: 2px; }
.ladder .hop.est::before { background: repeating-linear-gradient(var(--faint) 0 3px, transparent 3px 6px); }
.ladder .hop > div { display: grid; grid-template-columns: 62px 1fr auto; gap: 8px; align-items: center; padding: 7px 0; color: var(--muted); font-size: 13px; }
.ladder .hop .snr { color: var(--c, var(--muted)); font-weight: 600; font-variant-numeric: tabular-nums; }
.ladder .hop .bar { height: 4px; border-radius: 2px; background: var(--line); overflow: hidden; }
.ladder .hop .bar b { display: block; height: 100%; background: var(--c); border-radius: 2px; }
.ladder .hop.weakest .note { color: var(--fair); }

.warnings { margin: 16px 0 0; padding: 0; list-style: none; display: grid; gap: 8px; }
.warnings li { padding: 8px 10px 8px 12px; border-left: 2px solid var(--fair); background: rgba(245, 177, 61, 0.07); color: #D9C9A6; font-size: 13px; border-radius: 0 5px 5px 0; }
.warnings li.soft { border-left-color: var(--faint); background: rgba(255, 255, 255, 0.03); color: var(--muted); }

.back { display: flex; align-items: center; gap: 8px; margin-top: 16px; color: var(--muted); font-size: 13px; }
.back code { font: 500 13px var(--hex); color: var(--text); }
.back .copy { margin-left: auto; }

.alts { margin-top: 22px; }
.alts h3, .block h3 { margin: 0 0 8px; font: 500 13px var(--body); color: var(--muted); }
.alt { display: grid; grid-template-columns: 1fr auto; gap: 2px 10px; width: 100%; padding: 9px 11px; margin-bottom: 6px; background: none; border: 1px solid var(--line); border-radius: 6px; text-align: left; }
.alt:hover { border-color: var(--faint); background: rgba(255, 255, 255, 0.02); }
.alt code { font: 500 14px var(--hex); overflow-wrap: anywhere; }
.alt .pct { font: 600 16px var(--display); }
.alt span { grid-column: 1 / -1; color: var(--muted); font-size: 12.5px; }

/* ------------------------------------------------------------------ network + live tabs */
.totals { display: grid; grid-template-columns: repeat(2, 1fr); gap: 1px; background: var(--line); border: 1px solid var(--line); border-radius: 8px; overflow: hidden; }
.totals div { padding: 10px 12px; background: var(--panel); }
.totals dt { color: var(--muted); font-size: 12px; }
.totals dd { margin: 2px 0 0; font: 600 24px/1.1 var(--display); }
.totals dd small { font: 500 13px var(--body); color: var(--muted); }
.block { margin-top: 24px; }
.block p { margin: 0 0 8px; color: var(--muted); font-size: 13px; }
.rows { margin: 0; padding: 0; list-style: none; }
.rows li { display: flex; align-items: baseline; gap: 8px; padding: 6px 0; border-top: 1px solid var(--line); font-size: 13.5px; }
.rows li:first-child { border-top: 0; }
.rows button { padding: 0; background: none; border: 0; text-align: left; }
.rows button:hover { color: var(--route); }
.rows .val { margin-left: auto; color: var(--muted); font-variant-numeric: tabular-nums; white-space: nowrap; }
.rows code { font: 500 13px var(--hex); color: var(--fair); }
.none-yet { color: var(--faint); font-size: 13px; }

#feed { margin: 0; padding: 0; list-style: none; }
#feed li { display: grid; grid-template-columns: 58px 1fr auto; gap: 2px 10px; padding: 8px 0; border-top: 1px solid var(--line); font-size: 13px; }
#feed li:first-child { border-top: 0; }
#feed time { color: var(--faint); font-variant-numeric: tabular-nums; }
#feed .what { font-weight: 500; }
#feed .snr { font-variant-numeric: tabular-nums; }
#feed .via { grid-column: 2 / -1; color: var(--muted); font-size: 12.5px; overflow-wrap: anywhere; }
#feed .via code { font: 400 12px var(--hex); color: var(--text); }

#sources { padding: 10px 20px 12px; border-top: 1px solid var(--line); display: grid; gap: 4px; font-size: 12.5px; color: var(--muted); }
#sources .src { display: grid; grid-template-columns: 8px auto 1fr; gap: 8px; align-items: baseline; }
#sources .src i { width: 8px; height: 8px; border-radius: 50%; background: var(--faint); transform: translateY(-1px); }
#sources .src.listening i { background: var(--good); }
#sources .src.error i { background: var(--weak); }
#sources .src.connecting i, #sources .src.waiting i { background: var(--fair); }
#sources .src b { font-weight: 500; color: var(--text); }
#sources .src span { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }

/* ------------------------------------------------------------------ stage */
#stage { position: relative; min-width: 0; overflow: hidden; background: var(--ink); touch-action: none; }
#map, #net { position: absolute; inset: 0; width: 100%; height: 100%; }
#net { pointer-events: none; z-index: 1; }
#stage.topo #map { visibility: hidden; }
#stage.topo { background: radial-gradient(ellipse at 50% 45%, #12222F 0%, var(--ink) 70%); cursor: grab; }
#stage.picking, #stage.picking .maplibregl-canvas { cursor: crosshair !important; }
#stage.hover, #stage.hover .maplibregl-canvas { cursor: pointer !important; }
.maplibregl-ctrl-attrib { background: rgba(12, 24, 33, 0.7) !important; color: var(--faint); font: 11px var(--body); }
.maplibregl-ctrl-attrib a { color: var(--muted) !important; }
.maplibregl-ctrl-group { background: var(--panel) !important; border: 1px solid var(--line); box-shadow: none !important; }
.maplibregl-ctrl-group button + button { border-top: 1px solid var(--line) !important; }
.maplibregl-ctrl-icon { filter: invert(0.85); }

.hud { position: absolute; z-index: 2; top: 14px; left: 14px; display: flex; flex-wrap: wrap; align-items: center; gap: 8px 14px; padding: 6px 12px 6px 6px; background: rgba(16, 31, 43, 0.92); border: 1px solid var(--line); border-radius: 8px; font-size: 13px; color: var(--muted); }
.seg { display: flex; padding: 2px; background: var(--ink); border-radius: 6px; }
.seg button { height: 28px; padding: 0 12px; background: none; border: 0; border-radius: 4px; color: var(--muted); font-weight: 500; }
.seg button[aria-pressed="true"] { background: var(--raised); color: var(--text); }
.select { display: flex; align-items: center; gap: 6px; }
.select select { height: 28px; padding: 0 6px; background: var(--ink); border: 1px solid var(--line); border-radius: 5px; color: var(--text); }
.check { display: flex; align-items: center; gap: 6px; }
.check input { accent-color: var(--route); margin: 0; }

#card { position: absolute; z-index: 3; top: 14px; right: 14px; width: 292px; max-height: calc(100% - 28px); overflow-y: auto; padding: 14px 16px 16px; background: rgba(16, 31, 43, 0.96); border: 1px solid var(--line); border-radius: 8px; box-shadow: 0 18px 40px rgba(3, 10, 16, 0.5); }
#card h2 { margin: 0 28px 2px 0; font: 600 21px/1.15 var(--display); overflow-wrap: anywhere; }
#card .sub { color: var(--muted); font-size: 13px; }
#card .sub code { font: 400 12px var(--hex); }
#card .close { position: absolute; top: 8px; right: 8px; width: 28px; height: 28px; background: none; border: 0; border-radius: 4px; color: var(--muted); font-size: 18px; line-height: 1; }
#card .close:hover { color: var(--text); background: var(--raised); }
#card .acts { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; margin: 12px 0 4px; }
#card .acts button { height: 32px; background: none; border: 1px solid var(--line); border-radius: 5px; font-weight: 500; }
#card .acts button:hover { border-color: var(--route); color: var(--route); }
#card .acts button[data-book], #card .acts button[data-card-trace] { grid-column: 1 / -1; }
.card-trace { margin: 10px 0 0; color: var(--muted); font-size: 13px; }
.card-trace:empty { display: none; }
.card-trace .hops { margin-top: 6px; }
#card dl { display: grid; grid-template-columns: auto 1fr; gap: 3px 12px; margin: 12px 0 0; font-size: 13px; }
#card dt { color: var(--muted); }
#card dd { margin: 0; text-align: right; font-variant-numeric: tabular-nums; }
#card h3 { margin: 14px 0 4px; font: 500 13px var(--body); color: var(--muted); }
#card table { width: 100%; border-collapse: collapse; font-size: 13px; }
#card th { padding: 2px 0; color: var(--faint); font-weight: 400; font-size: 12px; text-align: right; }
#card th:first-child { text-align: left; }
#card td { padding: 4px 0; border-top: 1px solid var(--line); text-align: right; font-variant-numeric: tabular-nums; white-space: nowrap; }
#card td:first-child { text-align: left; white-space: normal; }
#card td button { padding: 0; background: none; border: 0; text-align: left; }
#card td button:hover { color: var(--route); }
#card .note { margin: 10px 0 0; padding: 7px 9px; background: rgba(245, 177, 61, 0.08); border-left: 2px solid var(--fair); color: #D9C9A6; font-size: 12.5px; border-radius: 0 4px 4px 0; }

#tip { position: absolute; z-index: 4; pointer-events: none; max-width: 260px; padding: 6px 9px; background: #0A141C; border: 1px solid var(--line); border-radius: 5px; font-size: 12.5px; line-height: 1.4; white-space: nowrap; }
#tip b { font-weight: 500; }
#tip span { color: var(--muted); }

.legend { position: absolute; z-index: 2; left: 14px; bottom: 14px; padding: 8px 12px; background: rgba(16, 31, 43, 0.88); border: 1px solid var(--line); border-radius: 8px; font-size: 12px; color: var(--muted); }
.ramp { display: flex; align-items: center; gap: 8px; }
.ramp i { width: 120px; height: 4px; border-radius: 2px; background: linear-gradient(90deg, var(--weak), var(--fair) 50%, var(--good)); }
.keys { display: flex; flex-wrap: wrap; gap: 4px 14px; margin-top: 6px; max-width: 330px; }
.keys span { display: inline-flex; align-items: center; gap: 5px; white-space: nowrap; }
.legend .env { display: flex; align-items: center; gap: 6px; margin-top: 7px; color: var(--text); cursor: pointer; }
.legend .env input { accent-color: var(--good); margin: 0; }
.legend .env-note { max-width: 330px; margin-top: 2px; font-size: 11.5px; color: var(--muted); }
.legend .env-note:empty { display: none; }

#empty { position: absolute; z-index: 2; left: 50%; top: 46%; transform: translate(-50%, -50%); width: min(440px, calc(100% - 40px)); padding: 22px 24px; background: rgba(16, 31, 43, 0.96); border: 1px solid var(--line); border-radius: 10px; }
#empty h2 { margin: 0 0 6px; font: 600 24px var(--display); }
#empty p { margin: 0; color: var(--muted); }

@media (max-width: 820px) {
  #app { grid-template-columns: 1fr; grid-template-rows: 46vh 54vh; }
  #stage { grid-row: 1; }
  #planner { grid-row: 2; border-right: 0; border-top: 1px solid var(--line); }
  .brand { padding: 12px 16px 8px; }
  .brand p, .legend .keys { display: none; }
  .tab { padding: 14px 16px 20px; }
  #card { left: 10px; right: 10px; width: auto; top: auto; bottom: 10px; max-height: 60%; }
  .hud .check { display: none; }
}

#card .spark { margin-top: 10px; }
#card .spark-head { display: flex; justify-content: space-between; margin-bottom: 2px; color: var(--muted); font-size: 12px; }
#card .spark svg { display: block; background: rgba(255, 255, 255, 0.02); border-radius: 4px; }
#card .spark-note { margin: 0; color: var(--faint); font-size: 12.5px; }

.measure { display: flex; align-items: baseline; gap: 10px; margin-top: 14px; color: var(--muted); font-size: 12.5px; }
.measure .copy { flex: none; }
.measure .copy:disabled { opacity: 0.5; cursor: wait; }
.rows code { overflow-wrap: anywhere; }
.rows li.stack { flex-direction: column; align-items: flex-start; gap: 2px; }
.rows li.stack code { color: var(--muted); font-size: 12px; }
.rows.findings { margin-bottom: 10px; }
.rows.findings li { border-left: 2px solid var(--fair); padding-left: 8px; border-top: 0; margin-bottom: 4px; }
#card .verdict { margin: 0; font-size: 13px; color: var(--text); }
#card .verdict-notes { margin: 6px 0 0; padding-left: 16px; color: var(--muted); font-size: 12.5px; }
#card .verdict-notes li { margin-bottom: 3px; }
.rows li.stack .val { margin-left: 0; white-space: normal; }

/* ------------------------------------------------------------------ address book */
.book-head { display: flex; align-items: center; justify-content: space-between; gap: 10px; }
.book-search, .book-form input, .book-form select, .book-form textarea {
  width: 100%; padding: 7px 10px; background: var(--ink); border: 1px solid var(--line); border-radius: 6px; color: var(--text); }
.book-search { height: 36px; margin-top: 12px; }
.book-form input, .book-form select { height: 36px; }
.book-form textarea { resize: vertical; min-height: 70px; line-height: 1.45; }
.book-search::placeholder, .book-form ::placeholder { color: var(--faint); }
.book-search:focus, .book-form input:focus, .book-form select:focus, .book-form textarea:focus { border-color: var(--focus); outline: none; }
.book-form input[type="date"] { color-scheme: dark; }
.book-count { margin: 10px 0 2px; color: var(--faint); font-size: 12px; }
.book-list li { align-items: center; }
.book-list li > button { display: flex; flex-direction: column; align-items: flex-start; gap: 1px; min-width: 0; flex: 1; }
.book-list li > button strong { font-weight: 600; }
.book-list li > button span { color: var(--muted); font-size: 12.5px; }
.book-list .tag { padding: 0 5px; border: 1px solid var(--line); border-radius: 3px; color: var(--muted); font-size: 11px; font-weight: 500; }
.book-list code { margin-left: auto; }
.back, .link { padding: 0; background: none; border: 0; color: var(--muted); font-size: 13px; }
.back:hover, .link:hover { color: var(--route); }
.link { text-decoration: underline; text-underline-offset: 2px; }
.book-title { margin: 10px 0 2px; font: 600 24px/1.1 var(--display); }
.book-sub { margin: 0 0 14px; color: var(--muted); font-size: 13px; }
.book-sub code { font: 500 12.5px var(--hex); color: var(--fair); }
.subtabs { display: flex; gap: 18px; margin-bottom: 16px; border-bottom: 1px solid var(--line); }
.subtabs button { position: relative; padding: 6px 0 8px; background: none; border: 0; color: var(--muted); font-weight: 500; }
.subtabs button[aria-selected="true"] { color: var(--text); }
.subtabs button[aria-selected="true"]::after { content: ""; position: absolute; left: 0; right: 0; bottom: -1px; height: 2px; background: var(--route); }
.book-form { display: flex; flex-direction: column; gap: 12px; }
.book-form fieldset { display: contents; }
.book-form fieldset:disabled input { opacity: 0.6; }
.f { display: flex; flex-direction: column; gap: 4px; min-width: 0; }
.f > span { color: var(--muted); font-size: 12.5px; font-weight: 500; }
.f small { color: var(--faint); font-size: 12px; }
.pair { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }
.form-acts { display: flex; flex-wrap: wrap; align-items: center; gap: 10px; margin-top: 4px; }
.form-acts .saved { color: var(--good); font-size: 13px; }
.copy.small.danger:hover { border-color: var(--weak); color: var(--weak); }
.book-h { margin: 22px 0 6px; font: 600 15px var(--display); letter-spacing: 0.02em; color: var(--text); }
.form-acts .saved.err { color: var(--weak); }
#tab-book .figures dd { font-size: 19px; }
.checkline { display: flex; align-items: flex-start; gap: 8px; cursor: pointer; }
.checkline input { width: auto !important; height: auto !important; margin: 3px 0 0; accent-color: var(--good); }
.poll-state { margin: 0; color: var(--muted); font-size: 13px; }
.poll-state.err { color: var(--weak); }
#map-note { position: absolute; left: 50%; top: 14px; transform: translateX(-50%); max-width: min(520px, 80%);
  padding: 7px 12px; background: rgba(10, 20, 28, 0.92); border: 1px solid var(--line); border-radius: 8px;
  color: var(--text); font-size: 13px; pointer-events: none; z-index: 5; }
#trace-banner { position: absolute; left: 50%; bottom: 18px; transform: translateX(-50%); display: flex; align-items: center; gap: 12px;
  padding: 7px 8px 7px 14px; background: rgba(10, 20, 28, 0.94); border: 1px solid var(--route); border-radius: 999px;
  color: var(--text); font-size: 13px; z-index: 5; }
#trace-banner button { padding: 3px 10px; background: none; border: 1px solid var(--line); border-radius: 999px; color: var(--text); font-size: 12.5px; }
#trace-banner button:hover { border-color: var(--route); color: var(--route); }
.link-btn { padding: 0; background: none; border: 0; color: inherit; font: inherit; text-decoration: underline; text-underline-offset: 2px; cursor: pointer; }
#trace-banner small { display: block; color: var(--muted); font-size: 12px; max-width: 420px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
#trace-banner .secs { font-weight: 500; color: var(--muted); }
#trace-banner.live { border-color: var(--focus); padding-right: 16px; }
#trace-banner.fail { border-color: var(--weak); padding-right: 16px; }
#trace-banner.good { border-color: var(--good); }
#trace-banner i { flex: none; width: 12px; height: 12px; border-radius: 50%; }
#trace-banner i.spin { border: 2px solid var(--focus); border-right-color: transparent; animation: spin 0.9s linear infinite; }
#trace-banner i.x { background: var(--weak); }
#trace-banner i.ok { background: var(--good); }
@keyframes spin { to { transform: rotate(360deg); } }
@media (prefers-reduced-motion: reduce) { #trace-banner i.spin { animation: none; } }
#feed .heard-result { grid-column: 2 / -1; color: var(--text); font-size: 12.5px; }
#feed .heard-result:empty { display: none; }
#feed .link-btn { color: var(--focus); }
.facts { display: grid; grid-template-columns: max-content 1fr; gap: 6px 14px; margin: 0 0 14px; font-size: 13.5px; }
.facts dt { color: var(--muted); }
.facts dd { margin: 0; overflow-wrap: anywhere; }
.steps { margin: 0 0 10px; padding-left: 20px; font-size: 13.5px; line-height: 1.5; }
.steps li { margin-bottom: 6px; }
.steps code, .owner-banner code { font: 500 12.5px var(--hex); color: var(--text); }
.owner-banner { margin: 0 0 16px; padding: 10px 12px; border: 1px solid var(--good); border-radius: 8px; font-size: 13px; }
.owner-banner summary { margin-top: 6px; color: var(--muted); cursor: pointer; }
.owner-banner input.key { width: 100%; margin: 8px 0; padding: 6px 8px; background: var(--ink); border: 1px solid var(--line);
  border-radius: 6px; color: var(--text); font: 12px var(--hex); }
