/* sproultech.com look: black, JetBrains Mono, square corners, 1px rules, white is the only accent,
   emphasis = inversion. Turn cards live in ladder.css. */
:root {
  --bg: #000; --line: #2b2b2b; --line2: #161616;
  --ink: #fff; --ink2: #bdbdbd; --mute: #8a8a8a;
  --warn: #ff5a5a;
}
* { box-sizing: border-box; }
html, body { margin: 0; height: 100%; background: var(--bg); color: var(--ink);
  font: 400 15px/1.5 "JetBrains Mono", ui-monospace, monospace; letter-spacing: .02em;
  -webkit-tap-highlight-color: transparent; overscroll-behavior: none; }
button, input { font: inherit; color: inherit; letter-spacing: inherit; }
.hidden { display: none !important; }
.eyebrow { font-size: 10px; text-transform: uppercase; letter-spacing: .25em; color: var(--mute); }
.btn { padding: 14px 20px; min-height: 48px; border: 1px solid var(--ink); border-radius: 0; background: none;
  color: var(--ink); text-transform: uppercase; letter-spacing: .15em; font-size: 12px; cursor: pointer; }
.btn.solid { background: var(--ink); color: #000; font-weight: 700; }
.btn:disabled { opacity: .35; }
.btn.sm { padding: 6px 10px; min-height: 32px; font-size: 10px; letter-spacing: .2em; }
.note { color: var(--mute); font-size: 12px; }
.err { color: var(--warn); font-size: 13px; }

/* ---------- search screen ---------- */
#search { max-width: 560px; margin: 0 auto; padding: 16px; display: flex; flex-direction: column; gap: 14px; min-height: 100%; }
#search h1 { font-size: 13px; font-weight: 700; margin: 6px 0 0; letter-spacing: .3em; text-transform: uppercase; }
#q { width: 100%; padding: 12px 0; border: 0; border-bottom: 1px solid var(--ink2); background: none; font-size: 20px; border-radius: 0; outline: none; }
#q:focus { border-bottom-color: var(--ink); }
.chips { display: flex; flex-wrap: wrap; gap: 6px; }
.chip { font-size: 11px; text-transform: uppercase; letter-spacing: .15em; padding: 8px 11px; border: 1px solid var(--line);
  background: none; color: var(--ink2); border-radius: 0; cursor: pointer; }
.chip.on { background: var(--ink); color: #000; border-color: var(--ink); font-weight: 700; }
.seg { display: grid; grid-template-columns: 1fr 1fr; border: 1px solid var(--ink); }
.seg button { border: 0; background: none; padding: 11px 4px; font-size: 11px; text-transform: uppercase; letter-spacing: .15em; cursor: pointer; }
.seg button.on { background: var(--ink); color: #000; font-weight: 700; }
#results { display: flex; flex-direction: column; }
.hit { display: grid; grid-template-columns: minmax(0, 1fr) auto; gap: 2px 12px; text-align: left; padding: 12px 10px;
  border: 1px solid transparent; border-bottom-color: var(--line); background: none; cursor: pointer; width: 100%; border-radius: 0; }
.hit.sel, .hit.best { border-color: var(--ink); margin-bottom: -1px; position: relative; }
.hit.sel { background: var(--ink); color: #000; }
.hit.sel .a, .hit.sel .big span { color: #444; }
.hit .n { font-weight: 700; text-transform: uppercase; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.hit .a { grid-column: 1; color: var(--mute); font-size: 12px; }
.hit .big { grid-row: 1 / span 2; grid-column: 2; text-align: right; align-self: center; }
.hit .big b { display: block; font-size: 22px; font-weight: 500; letter-spacing: -.04em; line-height: 1.1; }
.hit .big span { font-size: 10px; letter-spacing: .15em; text-transform: uppercase; color: var(--mute); }
.badge { font-size: 9px; letter-spacing: .2em; text-transform: uppercase; background: var(--ink); color: #000; padding: 1px 6px; margin-left: 6px; vertical-align: 2px; }
.hit.sel .badge { background: #000; color: #fff; }
#search .foot { margin-top: auto; display: flex; flex-direction: column; gap: 10px; padding-bottom: 8px; }

/* ---------- nav screen: A (stack) upright, C (side by side) when the phone is sideways ---------- */
#nav { height: 100%; display: flex; flex-direction: column; }
#turns { display: flex; flex-direction: column; min-height: 0; }
#top { display: flex; justify-content: space-between; align-items: center; gap: 8px; padding: 10px 14px;
  border-bottom: 1px solid var(--line); }
#arrive { font-size: 12px; color: var(--ink2); white-space: nowrap; line-height: 1.25; }
#arrive b { display: block; color: var(--ink); font-size: 18px; font-weight: 700; }
#top .row { display: flex; gap: 6px; }
#banner { margin: 10px 12px 0; padding: 8px 12px; border: 1px solid var(--ink); font-size: 12px; text-transform: uppercase; letter-spacing: .12em; }
#ladder { padding: 12px 12px 0; }
#map { flex: 1; min-height: 140px; margin: 12px; border: 1px solid var(--line); background: #050505; }
@media (orientation: landscape) and (max-height: 560px) {
  #nav { flex-direction: row; }
  #turns { width: min(420px, 50vw); border-right: 1px solid var(--line); overflow-y: auto; }
  #top { padding: 6px 10px; }
  #ladder { padding: 8px 10px; }
  #ladder .card.cur { --gl: 56px; --et: 44px; --hd: 22px; --sb: 14px; padding: 10px 12px 18px; row-gap: 6px; }
  #ladder .card.cur .dist { font-size: 14px; }
  #ladder .card.cur .bar { bottom: 7px; }
  #ladder .card.next, #ladder .card.later { --gl: 36px; --hd: 17px; --et: 22px; --sb: 13px; padding: 6px 12px; }
  #map { margin: 0; border: 0; }
}

/* map: greyscale inverted OSM so nothing on screen has colour but the page's own white */
.st-tiles { filter: grayscale(1) invert(1) brightness(.75) contrast(1.15); }
.leaflet-container { background: #050505; font-family: inherit; }
.leaflet-control-attribution { background: rgba(0,0,0,.7) !important; color: #555 !important; font-size: 9px !important; }
.leaflet-control-attribution a { color: #777 !important; }
.me { width: 28px; height: 28px; display: block; }
.empty { color: var(--mute); padding: 24px; text-align: center; }
