@font-face { font-family: Inter; src: url("/inter.woff2") format("woff2"); font-weight: 100 900; font-display: swap; }
@font-face { font-family: Bricolage; src: url("/bricolage.woff2") format("woff2"); font-weight: 400 800; font-display: swap; }
:root {
  color-scheme: dark;
  --base: #151d24; --panel: #1e2932; --map: #17232c; --ink: #f3f5ee;
  --muted: #b3c0c3; --line: #455762; --accent: #ffb653; --safe: #a1dfb3;
  --display: Bricolage, Inter, sans-serif;
}
*, *::before, *::after { box-sizing: border-box; }
[hidden] { display: none !important; }
body { color: var(--ink); background: var(--base); margin: 0; font: 400 15px/1.5 Inter, Arial, sans-serif; }
h1, h2, p, dl { margin: 0; }
button, input, textarea, select { font: inherit; }
input, button, textarea, select { color: inherit; }
button, select { cursor: pointer; }
a { color: inherit; text-underline-offset: .21em; }
a:hover { color: var(--accent); }
:focus-visible { outline: 3px solid var(--accent); outline-offset: 3px; }
.shell { width: min(1260px, calc(100% - 80px)); margin: 0 auto; }
.skip { position: fixed; z-index: 3; top: 1rem; left: 1rem; padding: 9px 14px; background: var(--accent); color: #201b15; transform: translateY(-220%); }
.skip:focus { transform: none; }
.top { border-bottom: 1px solid #34454f; }
.top-inner { min-height: 62px; display: flex; justify-content: space-between; align-items: center; gap: 10px; }
.brand { white-space: nowrap; display: inline-flex; align-items: center; font: 800 1.6rem/.95 var(--display); letter-spacing: -.055em; text-decoration: none; }
.brand > span:last-child { color: var(--accent); }
.brand-mark { width: 25px; height: 23px; display: flex; align-items: flex-end; justify-content: center; gap: 3px; margin-right: 7px; padding: 4px; background: var(--accent); border-radius: 3px; }
.brand-mark i { display: block; width: 3px; height: 8px; background: #1c252a; border-radius: 1px; }
.brand-mark i:nth-child(2) { height: 14px; }
.brand-mark i:nth-child(3) { height: 11px; }
.top nav a { color: #e3e7df; font-size: .81rem; font-weight: 690; text-decoration: none; }
.top nav a:hover { color: var(--accent); }
.intro { display: grid; grid-template-columns: minmax(0, 1fr) minmax(260px,.63fr); align-items: end; gap: 12px 22px; padding: clamp(27px, 5vw, 58px) 0 24px; border-bottom: 1px solid #425462; }
h1 { font: 800 clamp(3.3rem, 7.15vw, 6.75rem)/.86 var(--display); letter-spacing: -.05em; word-spacing: .025em; }
h1 span { color: var(--accent); }
.intro-side p { color: var(--muted); max-width: 360px; font-size: clamp(.89rem, 1.7vw, 1.05rem); }
.intro-side .quiet { margin-top: 10px; }
.workbench { display: grid; grid-template-columns: minmax(255px, .63fr) minmax(0, 1.42fr); align-items: start; gap: 12px; margin-top: 14px; }
.inputs, .route-panel, .pick-sheet { padding: 13px; min-width: 0; border: 1px solid var(--line); border-radius: 5px; background: var(--panel); }
h2 { font: 800 clamp(1.22rem, 3vw, 1.62rem)/1.02 var(--display); letter-spacing: -.04em; }
.fields { display: grid; grid-template-columns: 1fr 1fr; gap: 6px 8px; margin: 10px 0 8px; }
.fields > label, .helper { color: #d3dfdc; font-size: .73rem; font-weight: 650; min-width: 0; }
.fields input, .fields select, textarea {
  display: block; width: 100%; min-width: 0; margin: 3px 0 0; border: 1px solid #52626a;
  padding: 5px 6px; background: #18242b; border-radius: 3px; font-size: .8rem; min-height: 33px;
}
select { color-scheme: dark; }
.cross { display: flex; flex-wrap: wrap; gap: 4px 12px; border: 0; padding: 0; margin: 0 0 14px; }
.cross legend { color: #d3dfdc; font-size: .72rem; font-weight: 650; }
.cross label { display: flex; align-items: center; gap: 3px; font-size: .76rem; min-height: 26px; }
input[type="checkbox"] { accent-color: var(--accent); }
.helper { display: block; margin-top: 5px; }
textarea { min-height: 106px; resize: vertical; font: .78rem/1.44 ui-monospace, Menlo, monospace; padding: 6px 7px; }
.muted { color: var(--muted); font-size: .72rem; margin-top: 4px; }
.private { margin-top: 7px; }
.run-actions, .sheet-actions { display: flex; flex-wrap: wrap; align-items: center; gap: 6px; margin-top: 8px; }
.quiet, .accent {
  display: inline-flex; gap: 6px; align-items: center; justify-content: center; min-height: 35px;
  padding: 5px 8px; background: transparent; border: 1px solid #657781; color: var(--ink);
  border-radius: 3px; font-size: .74rem; font-weight: 730; text-align: center; text-decoration: none;
}
.quiet:hover { background: #354651; color: white; }
.accent { background: var(--accent); border-color: var(--accent); color: #252019; font-weight: 790; }
.accent:hover { background: #ffd085; color: #202424; }
button:disabled { opacity: .46; cursor: default; }
.file-label { cursor: pointer; }
.file-input { position: absolute; width: 1px; height: 1px; opacity: 0; }
.run-actions:has(.file-input:focus-visible) .file-label { outline: 3px solid var(--accent); outline-offset: 3px; }
.alert { padding: 6px 8px; background: #552c28; color: #ffe0cc; margin-top: 6px; font-size: .82rem; border-radius: 3px; }
.map-header { display: flex; align-items: flex-start; justify-content: space-between; gap: 7px; }
#method { color: var(--muted); margin-top: 4px; font-size: .72rem; }
.route-toggle { display: flex; gap: 2px; padding: 2px; border: 1px solid #516570; border-radius: 4px; white-space: nowrap; }
.route-toggle button { border: 0; background: transparent; padding: 4px 6px; border-radius: 2px; font-size: .72rem; font-weight: 680; min-height: 26px; }
.route-toggle button[aria-pressed="true"] { color: #221b12; background: var(--accent); }
.map-frame { margin-top: 8px; background: var(--map); border: 1px solid #526672; border-radius: 4px; overflow: clip; }
#map { width: 100%; display: block; height: clamp(293px, 33vw, 417px); }
.metrics { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 4px; margin: 7px 0 0; padding: 6px 0; border-bottom: 1px solid var(--line); }
.metrics > div { display: grid; gap: 1px; padding: 0 6px; min-width: 0; }
.metrics > div + div { border-left: 1px solid var(--line); }
.metrics dt { font-size: .7rem; color: var(--muted); font-weight: 610; }
.metrics dd { margin: 0; font: 800 clamp(1.05rem, 2.35vw, 1.7rem)/1.12 var(--display); overflow-wrap: anywhere; }
#saved-distance { color: var(--safe); }
.route-note, #stale { color: var(--muted); margin-top: 8px; font-size: .75rem; }
#stale { background: #493a21; color: #ffdfaa; padding: 4px 7px; border-radius: 2px; }
.pick-sheet { grid-column: 1 / -1; }
.sheet-head { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 5px 10px; }
#progress { color: var(--muted); margin-top: 4px; font-size: .76rem; }
.sheet-actions { margin-top: 0; }
#stops { list-style: none; margin: 8px 0 0; padding: 0; display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); column-gap: 9px; }
.stop { min-width: 0; border-top: 1px solid var(--line); padding: 6px 0; display: grid; align-items: start; grid-template-columns: 25px minmax(0, 1fr) auto; gap: 5px; }
.stop-index { font: 800 .83rem/1.5 var(--display); color: #292016; min-width: 22px; text-align: center; border-radius: 2px; background: var(--accent); }
.stop[data-done] .stop-index { background: var(--safe); }
.stop strong { color: var(--ink); font-size: .81rem; }
.stop div { min-width: 0; overflow-wrap: anywhere; }
.stop small { color: var(--muted); margin-left: 5px; font-size: .69rem; }
.stop ul { margin: 1px 0 0; list-style: none; padding: 0; color: #deebdf; font-size: .76rem; }
.stop label { align-self: start; font-size: .7rem; white-space: nowrap; display: flex; align-items: center; gap: 2px; }
.scope { margin: 11px 0 14px; color: var(--muted); font-size: .77rem; }
footer { display: flex; justify-content: space-between; flex-wrap: wrap; gap: 5px 10px; padding: 12px 0 23px; border-top: 1px solid var(--line); font-size: .78rem; color: var(--muted); }
footer span:first-child { font-weight: 730; }
.guide { width: min(760px, 100%); margin: clamp(30px, 6vw, 76px) auto 31px; }
.guide h1 { font-size: clamp(3rem, 6.6vw, 5.8rem); }
.guide .lead { margin-top: 17px; color: var(--muted); font-size: 1.05rem; }
.guide section { border-top: 1px solid var(--line); margin-top: 16px; padding-top: 11px; }
.guide p { color: #dbe3df; margin-top: 6px; }
.guide .accent { margin-top: 17px; }
.guide code { background: #33434d; border-radius: 3px; padding: 1px 3px; }
@media (max-width: 820px) {
  .shell { width: calc(100% - 44px); }
  #map { height: 340px; }
}
@media (max-width: 630px) {
  .shell { width: calc(100% - 24px); }
  .top-inner { min-height: 53px; }
  .top nav a { font-size: .73rem; }
  .intro { grid-template-columns: 1fr; padding: 26px 0 15px; }
  h1 { font-size: clamp(3.15rem, 11vw, 4.4rem); }
  .intro-side p { font-size: .88rem; }
  .workbench { grid-template-columns: 1fr; }
  #map { height: clamp(262px, 81vw, 353px); }
  .inputs, .route-panel, .pick-sheet { padding: 9px; }
  #stops { grid-template-columns: 1fr; }
  .quiet, .accent, .route-toggle button { min-height: 39px; }
  .fields input, .fields select, textarea { font-size: 1rem; }
}
@media (max-width: 340px) {
  .map-header { flex-wrap: wrap; }
  .metrics dt { font-size: .65rem; }
}
@media print {
  :root { color-scheme: light; }
  body { background: white; color: #151d24; }
  .shell { width: 100%; }
  .intro, .top, .inputs, .route-panel, .sheet-actions, .scope, footer { display: none; }
  .workbench, #stops { display: block; }
  .pick-sheet { color: #151d24; background: white; border: 0; padding: 0; }
  .stop { break-inside: avoid; }
  #progress, .stop small, .stop ul, .stop strong { color: #151d24; }
}
