/* ---------------------------------------------------------------------------
   KiloWait — design tokens

   The subject is the paper list on a windscreen at a jammed charger. The
   ticket is a physical object — perforated, printed, torn from a pad — and it
   stays the loudest thing on screen. The map and the filter panel are the
   quiet ticket-machine chassis around it.

   Two themes, because queues form in midday sun as often as at night. Light is
   default and tuned for sunlight: near-black on warm white, no low-contrast
   grey where it matters, borders that survive glare (>= 3:1).
--------------------------------------------------------------------------- */
:root[data-theme="light"]{
  --bg:#FFFDF7; --panel:#FFFFFF; --edge:#8A8474; --edge-2:#D6D0BE;
  --text:#16180F; --muted:#5A5C4E;
  --ticket:#16180F; --ticket-t:#FFFDF7; --ticket-r:#4A4C3E;
  --amber:#E09600; --amber-t:#241800; --green:#0F7A4A; --green-t:#FFFFFF; --red:#D62828;
  --chip:#FFFFFF; --chip-on:#16180F; --chip-on-t:#FFFDF7;
  --tiles:light_all;
}
:root[data-theme="dark"]{
  --bg:#14160F; --panel:#22261D; --edge:#4A5240; --edge-2:#2C3126;
  --text:#F4EFE2; --muted:#B7BDA9;
  --ticket:#F4EFE2; --ticket-t:#16180F; --ticket-r:#6B6552;
  --amber:#F5C542; --amber-t:#241800; --green:#6BD79B; --green-t:#05230F; --red:#F08065;
  --chip:#22261D; --chip-on:#F5C542; --chip-on-t:#241800;
  --tiles:dark_all;
}
/* High-contrast (dark base, maximum separation) — for sunlight and low vision. */
:root[data-theme="contrast"]{
  --bg:#000000; --panel:#0C0C0C; --edge:#FFFFFF; --edge-2:#8A8A8A;
  --text:#FFFFFF; --muted:#E4E4E4;
  --ticket:#FFFFFF; --ticket-t:#000000; --ticket-r:#000000;
  --amber:#FFD400; --amber-t:#000000; --green:#3BE07A; --green-t:#000000; --red:#FF5A47;
  --chip:#000000; --chip-on:#FFD400; --chip-on-t:#000000;
  --tiles:dark_nolabels;
}
:root{ --mono:'Azeret Mono', ui-monospace, 'SF Mono', Menlo, monospace;
       --ui:-apple-system, system-ui, 'Segoe UI', sans-serif;
       --display:'Archivo', var(--ui);
       --fs:1; }               /* text-size multiplier, set by the size control */

*{box-sizing:border-box;margin:0;padding:0;-webkit-tap-highlight-color:transparent}
html,body{height:100%;overscroll-behavior:none}
/* Dynamic viewport height: iOS Safari's toolbar slides away as you scroll, and a
   plain 100% keeps the old, taller figure — leaving a band of background below
   everything once the toolbar has moved. dvh follows the toolbar. */
@supports (height: 100dvh) { html,body{height:100dvh} }
body{background:var(--bg);color:var(--text);font-family:var(--ui);font-size:calc(18px * var(--fs));
  line-height:1.45;display:flex;flex-direction:column;padding-top:env(safe-area-inset-top)}

/* ---- Header ---- */
header{display:flex;align-items:center;justify-content:space-between;gap:8px;
  padding:6px 16px;border-bottom:1px solid var(--edge);background:var(--bg);z-index:1100}
/* Tagline beside the wordmark rather than under it.
 *
 * Stacked, it cost the header a whole line of height — and header height comes
 * straight out of the map, which is the thing the app is actually for. Beside it
 * the two share a baseline and the bar loses about twenty pixels. Below 380px
 * the tagline goes entirely: on a screen that narrow it would wrap and cost more
 * height than it saves. */
.brandwrap{min-width:0;display:flex;align-items:baseline;gap:9px;flex-wrap:nowrap;overflow:hidden}
.brand{font-family:var(--display);font-weight:900;font-size:calc(27px * var(--fs));line-height:1;
  letter-spacing:-.01em;color:var(--amber);text-transform:uppercase;
  white-space:nowrap;flex:0 0 auto}
.brand .brand-2{color:var(--text)}
/* The tear line between the two halves of the name: a perforation that is also
   a bolt. Same idea as the standalone logo, drawn in the header accent. */
.brand-perf{display:inline-block;height:calc(26px * var(--fs));width:calc(14px * var(--fs));
  vertical-align:-.10em;color:var(--amber);margin:0 2px}
.brand-sub{font-family:var(--mono);font-size:calc(9.5px * var(--fs));letter-spacing:.1em;
  color:var(--muted);text-transform:uppercase;
  white-space:nowrap;overflow:hidden;text-overflow:ellipsis;min-width:0}
@media (max-width:400px){ .brand-sub{display:none} }
/* Four controls plus the wordmark is tight on a small phone. The tagline is the
   least load-bearing thing on the screen, so it goes first; the wordmark shrinks
   rather than wrapping or pushing a button off the edge. */
@media (max-width:392px){
  .brand-sub{display:none}
  .brand{font-size:calc(25px * var(--fs))}
  .iconbtn{min-width:44px}
  header{gap:6px;padding:8px 12px}
  .hbtns{gap:6px}
}
.hbtns{display:flex;gap:8px}
.iconbtn{background:var(--panel);border:1.5px solid var(--edge);color:var(--text);
  min-width:48px;height:48px;border-radius:11px;font-size:calc(19px * var(--fs));cursor:pointer;
  display:grid;place-items:center;position:relative}
.iconbtn[hidden]{display:none}
.iconbtn:active{background:var(--edge-2)}
.iconbtn:focus-visible{outline:3px solid var(--amber);outline-offset:2px}
.iconbtn.on{background:var(--amber);border-color:var(--amber);color:var(--amber-t)}
.iconbtn .dot{position:absolute;top:6px;right:6px;width:11px;height:11px;border-radius:50%;
  background:var(--amber);border:2px solid var(--panel)}
/* A bolt alone doesn't say what it does — this one asks the map for live
   availability, and "live" is the word people already use for that. The label
   goes under the glyph so the button keeps its width in a row of four. */
.iconbtn.labelled{flex-direction:column;gap:0;line-height:1;padding-top:5px}
.iconbtn .btn-label{font-family:var(--mono);font-size:calc(8px * var(--fs));
  font-weight:700;letter-spacing:.1em}

/* ---- Map ---- */
#maprow{position:relative;flex:1;display:flex;min-height:0}
#map{flex:1;background:var(--bg);z-index:1}
#searchhere{position:absolute;left:50%;top:12px;transform:translateX(-50%);z-index:600;
  background:var(--amber);color:var(--amber-t);border:0;border-radius:99px;padding:11px 20px;
  font-family:var(--ui);font-size:calc(15px * var(--fs));font-weight:700;cursor:pointer;box-shadow:0 3px 14px rgba(0,0,0,.28)}
#searchhere:focus-visible{outline:3px solid var(--text);outline-offset:2px}
#searchhere:focus-visible{outline:3px solid var(--text);outline-offset:2px}

/* "My location" — a map control sitting just below the zoom buttons, top-left. */
#myplace{position:absolute;left:10px;top:96px;z-index:800;width:44px;height:44px;border-radius:10px;
  background:var(--panel);color:var(--text);border:1.5px solid var(--edge);cursor:pointer;
  display:grid;place-items:center;box-shadow:0 2px 8px rgba(0,0,0,.2)}
#myplace:active{background:var(--edge-2)}
#myplace:focus-visible{outline:3px solid var(--amber);outline-offset:2px}
#myplace.locating{color:var(--amber)}
@media (prefers-reduced-motion:no-preference){
  #myplace.locating svg{animation:spin 1s linear infinite}
  @keyframes spin{to{transform:rotate(360deg)}}
}

/* ---- Search: a floating pill at the bottom of the map ---- */
#searchwrap{position:absolute;left:12px;right:12px;bottom:calc(12px + env(safe-area-inset-bottom));z-index:1040}

/* The results badge.
 *
 * The sheet used to sit here as a slim bar, and even slim it was opaque: it cut
 * the map off at a hard edge, and any charger below that edge was invisible
 * while the badge cheerfully counted it. Panning the map to compensate only
 * traded one problem for a worse one — a map that moves on its own is a map you
 * cannot aim.
 *
 * So the panel gets out of the way entirely and this floats instead. The map
 * runs to the bottom of the screen, markers stay where they were put, and the
 * count is legible through a blur. */
#hits{position:absolute;left:12px;right:12px;
  bottom:calc(74px + env(safe-area-inset-bottom));z-index:1041;
  display:flex;align-items:center;gap:10px;
  padding:9px 10px 9px 15px;border-radius:13px;
  border:1.5px solid color-mix(in srgb, var(--edge) 45%, transparent);
  background:color-mix(in srgb, var(--panel) 34%, transparent);
  backdrop-filter:blur(26px) saturate(1.6);-webkit-backdrop-filter:blur(26px) saturate(1.6);
  box-shadow:0 6px 20px rgba(0,0,0,.12);
  animation:hitsIn .22s ease-out}
@keyframes hitsIn{from{opacity:0;transform:translateY(8px)}to{opacity:1;transform:none}}
#hits[hidden]{display:none}
#hits-txt{flex:1;min-width:0;overflow:hidden;text-overflow:ellipsis;white-space:nowrap;
  font-size:calc(15px * var(--fs));font-weight:700;
  /* At a third opacity the background cannot carry the text over a busy map.
     A halo in the panel colour does, without painting the box back in. */
  text-shadow:0 1px 2px var(--panel), 0 0 8px var(--panel), 0 0 15px var(--panel)}
/* The search placeholder needs the same help at a third opacity. */
#search, #search::placeholder{text-shadow:0 0 8px var(--panel)}
#hits-show{flex:0 0 auto;border:1.5px solid var(--edge);
  background:color-mix(in srgb, var(--panel) 70%, transparent);
  border-radius:10px;padding:9px 16px;font:inherit;font-weight:700;
  font-size:calc(13.5px * var(--fs));color:var(--text);cursor:pointer;min-height:40px;
  -webkit-tap-highlight-color:transparent}
#hits-show:active{background:var(--edge)}
/* Browsers without color-mix get a solid panel rather than an invisible one. */
@supports not (background: color-mix(in srgb, red 50%, transparent)){
  #hits, #hits-show, #search{background:var(--panel)}
}
#sheet:not([hidden]):not(.peek) ~ #searchwrap{display:none}

/* ---- Speed slider, directly under the header ---- */
#speedbar{display:flex;align-items:center;gap:12px;padding:7px 16px 8px;background:var(--bg);
  border-bottom:1px solid var(--edge)}
#speedbar .speedbar-label{font-family:var(--mono);font-weight:700;font-size:calc(17px * var(--fs));color:var(--amber);
  letter-spacing:-3px;min-width:30px}
#speed{flex:1;accent-color:var(--amber);height:32px}
#speed:focus-visible{outline:3px solid var(--amber);outline-offset:3px;border-radius:6px}
.speedbar-val{font-family:var(--mono);font-weight:700;font-size:calc(14px * var(--fs));min-width:84px;text-align:right}
/* Glass, not a lid. Both floating controls sit ON the map rather than cutting it
   off, so the road under them stays readable and nothing is hidden behind an
   opaque strip. The blur is what keeps text legible over a busy map — without
   it, transparency alone turns the label into noise. */
#search{width:100%;padding:14px 16px;border-radius:14px;border:1.5px solid color-mix(in srgb, var(--edge) 45%, transparent);
  background:color-mix(in srgb, var(--panel) 34%, transparent);
  backdrop-filter:blur(26px) saturate(1.6);-webkit-backdrop-filter:blur(26px) saturate(1.6);
  color:var(--text);font-family:var(--ui);font-size:calc(16px * var(--fs));
  box-shadow:0 6px 22px rgba(0,0,0,.14)}
/* Focused, it becomes a real input again: you are typing, not glancing. */
#search:focus{background:var(--panel)}
#search:focus{outline:3px solid var(--amber);outline-offset:1px}
#searchac{position:absolute;left:0;right:0;bottom:calc(100% + 8px);background:var(--panel);
  border:1.5px solid var(--edge);border-radius:14px;overflow:hidden;box-shadow:0 12px 30px rgba(0,0,0,.3);max-height:46vh;overflow-y:auto}
.acitem{padding:13px 15px;font-size:calc(15px * var(--fs));cursor:pointer;border-bottom:1px solid var(--edge-2);
  white-space:nowrap;overflow:hidden;text-overflow:ellipsis}
.acitem:last-child{border-bottom:0}
.acitem:hover,.acitem[aria-selected="true"]{background:var(--edge-2)}
.acitem .sub{color:var(--muted);font-size:calc(13px * var(--fs))}
.leaflet-control-attribution{background:var(--panel)!important;color:var(--muted)!important;font-size:calc(10px * var(--fs))}
.leaflet-control-attribution a{color:var(--muted)!important}
/* The zoom control disappeared behind the header / off the top of the map when
   left at Leaflet's default offset. Pin its container explicitly, below the
   header band and above the map, with the same left margin as the locate button
   so the two stack cleanly (zoom on top at 10px, locate below at 96px). */
.leaflet-top.leaflet-left{top:8px;left:0;z-index:600}
.leaflet-top.leaflet-left .leaflet-control-zoom{margin-left:10px;margin-top:2px;
  box-shadow:0 2px 8px rgba(0,0,0,.2)}
.leaflet-control-zoom a{width:44px!important;height:34px!important}
.leaflet-bar a{background:var(--panel)!important;color:var(--text)!important;
  border-bottom-color:var(--edge)!important;font-size:calc(20px * var(--fs))!important;line-height:34px!important}

/* Charger nodes, in Laddkarta's visual language: a round dot coloured by power
   band, sized by how many charge points the station has. A waiting line turns it
   amber; your own queue turns it green; a live-availability ring shows free/busy. */
.node{display:flex;align-items:center;justify-content:center;border-radius:50%;
  border:2px solid var(--text);position:relative;font-family:var(--mono);font-weight:700;
  color:#fff;font-size:calc(10px * var(--fs));text-shadow:0 1px 2px rgba(0,0,0,.6)}
/* A station with one or two points is drawn at 20px. That is under half the
   44px a thumb needs, so taps land on the map beside it and nothing happens —
   which reads as "tapping a station does not open its details". This extends
   the clickable area outward without touching what is drawn: the dot stays
   small and legible, the target becomes reachable. pointer-events on the
   pseudo-element is what makes Leaflet's marker click fire from the halo. */
.node::after{content:"";position:absolute;top:50%;left:50%;
  width:44px;height:44px;transform:translate(-50%,-50%);border-radius:50%;
  pointer-events:auto}
.node.p0{background:#7b8aa0}.node.p1{background:#6ea9cf}.node.p2{background:#46b57c}
.node.p3{background:#f08c3d}.node.p4{background:#e0489a}
.node.waiting{background:var(--amber);color:var(--amber-t);text-shadow:none;box-shadow:0 0 0 4px rgba(224,150,0,.28)}
.node.mine{background:var(--green);color:#fff;box-shadow:0 0 0 4px rgba(15,122,74,.3)}
.node .qn{font-size:calc(11px * var(--fs))}
.node .live{position:absolute;top:-3px;right:-3px;width:10px;height:10px;border-radius:50%;border:2px solid var(--bg)}
.node .live.free{background:var(--green)}
.node .live.busy{background:var(--red)}
/* Live availability as the fill itself: green = at least one point free now,
   red = all points taken. Stronger claim than a power band, so it wins. */
/* Availability nodes carry a white ring so a lone pin reads against any map
   colour. The busy one especially: a dark-red disc on a pale-green map at arm's
   length in sunlight was the pin that vanished. The ring does the separating,
   the fill does the meaning. */
.node.lv-free{background:var(--green);box-shadow:0 0 0 2px #fff, 0 2px 6px rgba(0,0,0,.4)}
.node.lv-busy{background:var(--red);box-shadow:0 0 0 2px #fff, 0 2px 6px rgba(0,0,0,.4)}
.me{width:16px;height:16px;border-radius:50%;background:#2B7FFF;border:3px solid #fff;box-shadow:0 0 0 6px rgba(43,127,255,.22)}

/* Cluster: a solid circle coloured by the fastest charger inside (outer number =
   stations grouped), with a dark badge showing total charge points + max kW. */
.cwrap{background:none!important}
.cbub{border-radius:50%;color:#fff;border:3px solid var(--text);display:flex;align-items:center;
  justify-content:center;font-family:var(--mono);font-weight:700;font-size:calc(13px * var(--fs));position:relative;
  text-shadow:0 1px 2px rgba(0,0,0,.55);box-shadow:0 2px 10px rgba(0,0,0,.25)}
.cbub .csub{position:absolute;bottom:-9px;right:-12px;font-size:calc(9px * var(--fs));font-style:normal;
  background:var(--text);color:var(--bg);border-radius:7px;padding:1px 5px;white-space:nowrap;
  font-family:var(--mono);font-weight:700;text-shadow:none}
/* Free points, summed only over the stations reporting live. Green because it is
   the one number in the badge a driver can act on. */
.cbub .csub .cfree{color:#A8F5CE;font-weight:700}
.cbub .csub .cbusy{color:#FFB8B8;font-weight:700}

/* The same badge on a single station.
 *
 * It only ever appears where live availability is actually known, which is the
 * minority of stations and therefore does not clutter a dense map — and where it
 * does appear it answers the only question that matters before driving there.
 * Withholding it from single stations while showing it on groups was backwards:
 * a group is a rough sum, a single station is a fact. */
.node .csub{position:absolute;bottom:-9px;left:50%;transform:translateX(-50%);
  font-size:calc(9px * var(--fs));font-style:normal;
  background:var(--text);color:var(--bg);border-radius:7px;padding:1px 5px;
  white-space:nowrap;font-family:var(--mono);font-weight:700;text-shadow:none;
  pointer-events:none}
/* On the near-black badge these need to be bright enough to read at a glance on
   a sunlit phone. #FF8A8A was too muted against black; #5FE39B and #FF6B6B clear
   the WCAG AA contrast bar (4.5:1) on this background. */
.node .csub .cfree{color:#A8F5CE;font-weight:700}
.node .csub .cbusy{color:#FFB8B8;font-weight:700}

/* One station or several? The number alone cannot say — an 8-point station and
   a group of 8 stations both read "8". A group is drawn stacked: a second disc
   peeking out behind the first, which is the same shorthand a pile of cards
   uses. Nothing is added to a single marker, so the plain disc keeps meaning
   "one place". */
.cbub::before{content:"";position:absolute;inset:-3px;border-radius:50%;
  border:3px solid var(--text);background:inherit;
  transform:translate(4px,4px);z-index:-1;opacity:.85}
.leaflet-cluster-anim .leaflet-marker-icon{transition:none}

/* ---- Sheet ---- */
/* ---- Results sheet: an overlay above the search pill, shown only when there are
   hits. Being absolute (not a flex sibling) means it never squeezes the map, so
   the zoom and my-location controls can't vanish. ---- */
#sheet{position:absolute;left:0;right:0;bottom:0;z-index:1000;
  background:var(--panel);border-top:1.5px solid var(--edge);border-radius:18px 18px 0 0;
  /* 84px used to be reserved here for the floating search pill. But the pill is
     hidden whenever the sheet is expanded (see #searchwrap below), so in every
     expanded state that space was empty panel sitting on the map — most visible
     on the "nothing matches" card, which became a mostly blank half-screen.
     Peek mode, where the pill IS shown, keeps its own larger padding. */
  padding:0 16px calc(14px + env(safe-area-inset-bottom));
  /* The map is the product; the list is a drawer over it. At 56vh the sheet took
     more than half the screen for a single result, and you could no longer see
     where that result was. 46vh keeps the map dominant, and the grabber still
     drags to 72vh when someone actually wants to read a long list. */
  max-height:46vh;overflow-y:auto;box-shadow:0 -12px 34px rgba(0,0,0,.2);
  /* Scrolling to the end of the list must stop there. Without this the gesture
     chains to the page behind, which rubber-bands and opens a gap under the
     sheet that then stays until the layout settles. */
  overscroll-behavior:contain;
  scrollbar-width:thin;scrollbar-color:var(--edge) transparent}
#sheet::-webkit-scrollbar{width:6px}
#sheet::-webkit-scrollbar-thumb{background:var(--edge);border-radius:3px}
#sheet[hidden]{display:none}
/* In peek only the slim bar shows, but the sheet still carried the 84px bottom
   padding that exists to keep list rows clear of the floating search pill. That
   is 84px of empty panel sitting on top of the map for no reason. The pill needs
   its own height plus its 12px offset — about 60px — and nothing more. */
#sheet.peek{max-height:none;overflow:visible;cursor:pointer;
  padding-bottom:calc(60px + env(safe-area-inset-bottom))}
#sheet.peek #sheet-body{display:none}

/* Drag handle (grabber) — the visible "slider" that opens and closes the list. */
/* The touch target was 9 + 5 + 3 = 17px tall. Apple's guideline is 44px, and a
   17px strip at the very edge of the screen is genuinely hard to hit with a
   thumb. The padding below buys the height; the bar itself stays thin, because
   a fat grey line would look like a mistake. Alignment stays centred via flex,
   so the visible bar sits in the middle of its own hit area. */
.grabber{width:100%;padding:16px 0 12px;display:flex;justify-content:center;align-items:center;
  min-height:44px;box-sizing:border-box;
  touch-action:none;cursor:grab;position:sticky;top:0;background:var(--panel);z-index:3}
.grabber::before{content:"";width:52px;height:5px;border-radius:3px;background:var(--edge);display:block}
.grabber:active{cursor:grabbing}
.grabber:active::before{background:var(--amber)}

.sheet-bar{display:flex;align-items:center;justify-content:space-between;gap:12px;
  padding:4px 0 10px;position:sticky;top:20px;background:var(--panel);z-index:2}
#sheet.peek .sheet-bar{padding:2px 0 calc(8px + env(safe-area-inset-bottom))}
/* In ticket mode the ticket itself is the header — no separate sticky bar to
   overlap it while dragging/scrolling. */
#sheet.ticket-mode .sheet-bar{display:none}
#sheet.ticket-mode .grabber{padding-bottom:8px}
.sheet-bar-text{flex:1;min-width:0;font-size:calc(15px * var(--fs));font-weight:600;
  white-space:nowrap;overflow:hidden;text-overflow:ellipsis;color:var(--muted)}
#sheet.peek .sheet-bar-text{font-size:calc(16px * var(--fs));color:var(--text)}
.sheet-bar-text .n{font-family:var(--mono);font-weight:700;background:var(--amber);
  color:var(--amber-t);border-radius:7px;padding:2px 9px;margin-right:8px}
.sheet-bar-text .taphint{color:var(--amber);font-weight:700}
.sheet-bar-text{display:flex;align-items:center;gap:10px}
.bar-txt{flex:1;min-width:0;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}
.bar-open{flex:0 0 auto;border:1.5px solid var(--edge);background:var(--panel);
  border-radius:9px;padding:7px 14px;font:inherit;font-weight:700;
  font-size:calc(13px * var(--fs));color:var(--text);cursor:pointer;min-height:36px;
  -webkit-tap-highlight-color:transparent}
.bar-open:active{background:var(--edge)}
/* Compact empty state: one line, action inline. */
.empty{display:flex;align-items:center;gap:12px;padding:2px 0 6px}
.empty-txt{flex:1;min-width:0;display:flex;flex-direction:column;gap:2px}
.empty-txt b{font-size:calc(16px * var(--fs));font-weight:700}
.empty-txt span{font-family:var(--mono);font-size:calc(12.5px * var(--fs));color:var(--muted);
  white-space:nowrap;overflow:hidden;text-overflow:ellipsis}
.empty-btn{flex:0 0 auto;border:1.5px solid var(--edge);background:var(--panel);
  border-radius:9px;padding:9px 14px;font:inherit;font-weight:700;
  font-size:calc(14px * var(--fs));cursor:pointer;min-height:40px}
.empty-btn:active{background:var(--edge)}

/* Per-power connector breakdown. A station is rarely uniform, and "150 kW,
   6 points" hides that only two of those six are fast. One row per tier. */
.tiers{margin:10px 0 2px;display:flex;flex-direction:column;gap:1px;
  border:1.5px solid var(--edge);border-radius:10px;overflow:hidden}
/* ChargeFinder-style row: what it is on the left, how many are free on the
   right. The free count is the only number that decides anything, so it gets the
   weight and the colour; power and plug are the label. */
.tier-avail{margin-left:auto;font-family:var(--mono);font-weight:700;
  font-size:calc(16px * var(--fs));white-space:nowrap;flex:0 0 auto}
.tier-avail.free{color:#2f9e63}
.tier-avail.busy{color:#c0392b}
.tier-conn{font-family:var(--mono);font-size:calc(13px * var(--fs));
  color:var(--muted);text-transform:uppercase;letter-spacing:.03em}
.tier{display:flex;align-items:baseline;gap:10px;padding:10px 11px;background:var(--panel);
  width:100%;border:0;text-align:left;font:inherit;color:inherit;cursor:pointer;
  -webkit-tap-highlight-color:transparent}
.tier:active{background:var(--edge)}
/* Same five-colour power palette as the map pins, so a tier reads as "the pink
   ones" at a glance and the list ties back to what is on the map. */
.tier-dot{width:9px;height:9px;border-radius:50%;flex:0 0 auto;align-self:center}
.tier-detail{display:none;padding:0 11px 10px;background:var(--panel);
  font-family:var(--mono);font-size:calc(12.5px * var(--fs));color:var(--muted);line-height:1.5}
.tier-wrap.open .tier-detail{display:block}
/* Styling ::-webkit-scrollbar was the obvious answer and the wrong one: iOS does
   not render it for touch-scrolled elements at all, so the affordance existed on
   a desktop browser and nowhere the app is actually used.
   
   This works everywhere instead — a fade with a label, pinned to the bottom edge
   of the sheet, shown only while there is more content below it. */
#sheet{scrollbar-width:thin;scrollbar-color:var(--edge) transparent}
#sheet::-webkit-scrollbar{width:6px}
#sheet::-webkit-scrollbar-thumb{background:var(--edge);border-radius:3px}
#sheet::-webkit-scrollbar-track{background:transparent}

#sheet-more{position:sticky;bottom:0;left:0;right:0;height:46px;
  margin:-46px -16px 0;pointer-events:none;z-index:4;
  display:flex;align-items:flex-end;justify-content:center;padding-bottom:5px;
  background:linear-gradient(to bottom,
    color-mix(in srgb, var(--panel) 0%, transparent) 0%,
    color-mix(in srgb, var(--panel) 88%, transparent) 62%,
    var(--panel) 100%)}
#sheet-more[hidden]{display:none}
#sheet-more span{font-family:var(--mono);font-size:calc(10.5px * var(--fs));
  font-weight:700;letter-spacing:.06em;text-transform:uppercase;color:var(--muted)}
#sheet-more span::after{content:" \2193"}

/* The queue call to action, sitting where the live figure has just told you the
   bays are taken. That is the moment the feature is worth knowing about; by the
   time you have scrolled past the chart it is too late to be a suggestion. */
/* The assumptions note under a queue estimate. Closed by default — the number is
   the answer, this is the footnote for anyone who wants to know how much to trust
   it. */
.wait-assume{margin:8px 0 2px;border:1px solid var(--edge);border-radius:10px;overflow:hidden}
.wait-assume summary{list-style:none;cursor:pointer;padding:9px 12px;
  font-family:var(--mono);font-size:calc(12px * var(--fs));color:var(--muted);
  display:flex;align-items:center;gap:7px}
.wait-assume summary::-webkit-details-marker{display:none}
.wait-assume summary::before{content:"\203a";transition:transform .15s;display:inline-block}
.wait-assume[open] summary::before{transform:rotate(90deg)}
.wait-assume-body{padding:0 12px 12px;font-size:calc(13px * var(--fs));line-height:1.5}
.wait-assume-body p{margin:0 0 8px}
.wait-assume-body p:last-child{margin-bottom:0}
.wait-assume-body .muted{color:var(--muted);font-size:calc(12px * var(--fs))}

.queue-cta{display:flex;align-items:center;gap:12px;width:100%;
  margin:12px 0 2px;padding:12px 14px;border-radius:11px;
  border:1.5px solid var(--amber);background:var(--panel);
  font:inherit;text-align:left;cursor:pointer;-webkit-tap-highlight-color:transparent}
.queue-cta:active{background:var(--edge)}
/* A brief pulse on arrival, so it is obvious which control the tap was aiming
   at after the view has scrolled somewhere new. */
@keyframes joinflash{0%,100%{transform:scale(1)}35%{transform:scale(1.04)}}
.btn-join.flash{animation:joinflash .55s ease-in-out 2}
.queue-cta-txt{flex:1;min-width:0;display:flex;flex-direction:column;gap:2px}
.queue-cta-txt b{font-size:calc(15px * var(--fs));font-weight:700}
.queue-cta-txt span{font-family:var(--mono);font-size:calc(12px * var(--fs));color:var(--muted)}
.queue-cta-go{flex:0 0 auto;color:var(--amber);font-weight:700;
  font-size:calc(20px * var(--fs));line-height:1}

/* Provenance only, for when the rows above already answer "how many". */
.live-meta{margin:4px 0 14px;font-family:var(--mono);
  font-size:calc(11.5px * var(--fs));color:var(--muted);letter-spacing:.02em}
.live-scope{margin:6px 0 0;font-family:var(--mono);font-size:calc(11.5px * var(--fs));
  color:var(--muted);line-height:1.5}
.tier-foot{margin:6px 0 2px;font-family:var(--mono);font-size:calc(12px * var(--fs));
  color:var(--muted);line-height:1.45}
.tier-chev{margin-left:6px;color:var(--muted);font-size:calc(11px * var(--fs));
  transition:transform .15s}
.tier-wrap.open .tier-chev{transform:rotate(90deg)}
.tier-wrap + .tier-wrap{border-top:1.5px solid var(--edge)}
.tier-n{font-family:var(--mono);font-weight:700;font-size:calc(15px * var(--fs));
  min-width:2.4em;color:var(--text)}
.tier-kw{font-family:var(--mono);font-weight:700;font-size:calc(15px * var(--fs));color:var(--text)}
.tier-meta{margin-left:auto;font-family:var(--mono);font-size:calc(12px * var(--fs));
  color:var(--muted);text-transform:uppercase;letter-spacing:.03em}
.sheet-title{font-size:calc(20px * var(--fs));font-weight:700;margin-bottom:3px;letter-spacing:-.01em}
.sheet-meta{font-family:var(--mono);font-size:calc(13px * var(--fs));color:var(--muted);margin-bottom:14px}

/* ---- THE TICKET ---- */
.ticket{position:relative;background:var(--ticket);color:var(--ticket-t);
  border-radius:4px 4px 12px 12px;padding:18px 18px 16px;margin-bottom:16px;
  box-shadow:0 12px 30px rgba(0,0,0,.22)}
.ticket::before{content:"";position:absolute;top:0;left:0;right:0;height:9px;
  background:radial-gradient(circle at 6px 0, transparent 0 5px, var(--ticket) 5.5px) 0 0/12px 9px repeat-x}
.ticket-head{display:flex;justify-content:space-between;align-items:baseline;
  padding-top:8px;padding-bottom:11px;border-bottom:1.5px dashed var(--ticket-r);
  font-family:var(--mono);font-size:calc(12px * var(--fs));font-weight:700;letter-spacing:.16em;
  text-transform:uppercase;color:var(--ticket-t);opacity:.72}
.ticket-num{font-family:var(--mono);font-weight:700;font-variant-numeric:tabular-nums;
  font-size:calc(96px * var(--fs));line-height:1;letter-spacing:-.05em;text-align:center;padding:20px 0 8px}
.ticket-label{font-family:var(--mono);font-size:calc(13px * var(--fs));font-weight:700;letter-spacing:.16em;
  text-transform:uppercase;text-align:center;padding-bottom:18px;opacity:.72}
.ticket-foot{border-top:1.5px dashed var(--ticket-r);padding-top:11px;display:flex;
  justify-content:space-between;gap:10px;font-family:var(--mono);font-size:calc(13px * var(--fs));opacity:.72}
.ticket-foot span{white-space:nowrap;overflow:hidden;text-overflow:ellipsis}
.ticket.turn{box-shadow:0 12px 30px rgba(0,0,0,.22),0 0 0 4px var(--green)}
.ticket.turn .ticket-num{color:var(--green)}
@media (prefers-reduced-motion:no-preference){
  .ticket.dispensed{animation:dispense .5s cubic-bezier(.2,.9,.25,1)}
  @keyframes dispense{from{transform:translateY(-18px) rotate(-.8deg);opacity:0}to{transform:none;opacity:1}}
}

/* First-visit card: three lines and a dismiss. Amber-edged like a ticket stub. */
/* First-run guide. Three cards over a dimmed map, shown once and then never
   again. It exists because the app inverts what a charging map normally does —
   nobody expects a queue feature or an occupancy forecast, so ten seconds up
   front saves a confused first session. Kept short: a PR-launch visitor who
   wanted a map will not read a manual. */
.guide-back{position:fixed;inset:0;z-index:3000;background:rgba(0,0,0,.55);
  display:flex;align-items:center;justify-content:center;padding:22px;
  -webkit-backdrop-filter:blur(2px);backdrop-filter:blur(2px)}
.guide-card{background:var(--bg);border-radius:18px;max-width:340px;width:100%;
  padding:26px 24px 20px;box-shadow:0 20px 60px rgba(0,0,0,.4);
  animation:guideIn .25s ease-out}
@keyframes guideIn{from{opacity:0;transform:translateY(14px) scale(.98)}to{opacity:1;transform:none}}
.guide-icon{font-family:var(--mono);font-weight:700;font-size:calc(13px * var(--fs));
  color:var(--amber);letter-spacing:.1em;text-transform:uppercase;margin-bottom:10px}
.guide-card h2{font-family:var(--display);font-weight:900;font-size:calc(23px * var(--fs));
  line-height:1.1;margin:0 0 10px;letter-spacing:-.01em}
.guide-card p{font-size:calc(15px * var(--fs));line-height:1.5;color:var(--text);margin:0}
.guide-card .muted{color:var(--muted);font-size:calc(13.5px * var(--fs));margin-top:9px}
.guide-dots{display:flex;gap:6px;margin:20px 0 0}
.guide-dot{width:7px;height:7px;border-radius:50%;background:var(--edge)}
.guide-dot.on{background:var(--amber)}
.guide-row{display:flex;align-items:center;justify-content:space-between;gap:12px;margin-top:16px}
.guide-skip{background:none;border:0;padding:8px 4px;color:var(--muted);font:inherit;
  font-size:calc(14px * var(--fs));cursor:pointer}
.guide-next{background:var(--amber);color:var(--amber-t);border:0;border-radius:11px;
  padding:11px 22px;font:inherit;font-weight:700;font-size:calc(15px * var(--fs));cursor:pointer;
  min-height:44px}
.guide-next:active{filter:brightness(.94)}
.guide-swatch{display:inline-flex;gap:6px;margin-top:12px;align-items:center;
  font-family:var(--mono);font-size:calc(12.5px * var(--fs));color:var(--muted)}
.guide-swatch i{width:15px;height:15px;border-radius:50%;border:2px solid #fff;
  box-shadow:0 1px 3px rgba(0,0,0,.3);flex:none}


/* The one-line answer at the top of the list: nearest charger with live proof of
   a free point. Framed like a result, not a control — green dot, name, distance. */
.nearrow{display:flex;align-items:center;gap:11px;width:100%;text-align:left;cursor:pointer;
  background:var(--panel);border:2px solid var(--green);border-radius:12px;
  padding:12px 14px;margin:10px 0 4px;font:inherit;color:var(--text)}
.nearrow:focus-visible{outline:3px solid var(--amber);outline-offset:2px}
.nearrow-dot{flex:none;width:13px;height:13px;border-radius:50%;background:var(--green)}
.nearrow-txt{flex:1;min-width:0;font-size:calc(15px * var(--fs));line-height:1.35}
.nearrow-txt b{font-size:calc(13px * var(--fs));letter-spacing:.04em;text-transform:uppercase;
  font-family:var(--mono);color:var(--green)}
.nearrow-go{flex:none;font-size:calc(22px * var(--fs));color:var(--muted)}
.nearrow.ask{border-color:var(--edge-2)}
.nearrow.ask b{color:var(--amber);text-transform:none;font-family:var(--ui);letter-spacing:0}

/* ---- Buttons / messages ---- */
.btn{display:block;width:100%;padding:17px;border:0;border-radius:12px;font-family:var(--ui);
  font-size:calc(19px * var(--fs));font-weight:700;cursor:pointer}
.btn:focus-visible{outline:3px solid var(--amber);outline-offset:2px}
.btn-join{background:var(--amber);color:var(--amber-t)}
.btn-leave{background:transparent;color:var(--text);border:2px solid var(--edge)}
.btn-ghost{background:var(--panel);color:var(--text);border:2px solid var(--edge);font-size:calc(17px * var(--fs));padding:14px}
.btn:disabled{opacity:.55}
.msg{margin-top:12px;font-size:calc(16px * var(--fs));text-align:center;color:var(--muted);min-height:20px;line-height:1.4}
.msg.err{color:var(--red);font-weight:600}
.hint{font-size:calc(16px * var(--fs));color:var(--muted);padding:2px 0 14px;line-height:1.5}

/* ---- Charger detail ---- */
.spec{display:flex;gap:8px;flex-wrap:wrap;margin-bottom:14px}
.spec .tag{font-family:var(--mono);font-size:calc(12px * var(--fs));font-weight:700;padding:5px 10px;border-radius:8px;
  border:1.5px solid var(--edge);color:var(--text);white-space:nowrap}
.spec .tag.dc{background:var(--amber);border-color:var(--amber);color:var(--amber-t)}
/* Two rows now: the figure, and what the figure covers. The qualifier used to
   sit below the whole box, which on a station with four connector tiers put it
   off the bottom of the screen — present in the DOM, invisible in the hand.
   A caveat you have to scroll to find is not a caveat. */
.live-row{display:flex;flex-wrap:wrap;align-items:center;gap:8px;
  font-size:calc(16px * var(--fs));margin-bottom:16px;
  padding:11px 13px;border-radius:10px;border:1.5px solid var(--edge-2)}
.live-row .live-scope{flex-basis:100%;margin:2px 0 0}
.live-row b{font-weight:700}
.live-row .live-dot{width:12px;height:12px;border-radius:50%;flex:0 0 auto}
.live-row.free .live-dot{background:var(--green)}
.live-row.busy .live-dot{background:var(--red)}
.live-row.free{border-color:var(--green)}
.live-row.busy{border-color:var(--red)}
.live-row.none{color:var(--muted);font-size:calc(14px * var(--fs))}
.live-src{color:var(--muted);font-size:calc(13px * var(--fs));font-family:var(--mono)}
.detail-link{margin-top:10px;text-align:center;text-decoration:none}

/* ---- Charger list rows: each is a tappable card ---- */
.row{display:flex;align-items:center;gap:12px;padding:12px;margin-bottom:8px;
  border:1.5px solid var(--edge-2);border-radius:12px;background:var(--bg);cursor:pointer}
.row:active{background:var(--edge-2);border-color:var(--edge)}
.row:focus-visible{outline:3px solid var(--amber);outline-offset:2px}
.row-n{font-family:var(--mono);font-weight:700;font-size:calc(16px * var(--fs));min-width:42px;height:42px;
  border-radius:10px;display:grid;place-items:center;background:var(--amber);color:var(--amber-t)}
.row-n.plain{background:transparent;border:1.5px solid var(--edge);color:var(--muted);font-size:calc(13px * var(--fs))}
.row-b{flex:1;min-width:0}
.row-t{font-size:calc(16px * var(--fs));font-weight:700;white-space:nowrap;overflow:hidden;text-overflow:ellipsis}
.row-m{font-family:var(--mono);font-size:calc(12px * var(--fs));color:var(--muted)}
.row-go{color:var(--muted);font-size:calc(22px * var(--fs));font-weight:700;flex:0 0 auto}
.row-live{font-family:var(--mono);font-size:calc(12px * var(--fs));font-weight:700;padding:4px 8px;border-radius:7px;white-space:nowrap}
.row-live.free{background:rgba(15,122,74,.14);color:var(--green)}
.row-live.busy{background:rgba(179,38,30,.12);color:var(--red)}

/* ---- Filter panel ---- */
/* Collapsible info sections in the menu: About, How it works, Privacy.
   These were native <details>, which snap open in a single frame: the section
   appears instantly, everything below it jumps, and the sheet edge moves. Now a
   button (aria-expanded carries the state for screen readers) over a grid
   wrapper animating 0fr -> 1fr — the one CSS mechanism that animates to an
   unknown content height without JS measurement or max-height guesses. */
.info-sec{border:1.5px solid var(--edge);border-radius:12px;margin:0 0 10px;overflow:hidden}
.info-head{width:100%;text-align:left;background:none;border:0;color:var(--text);
  cursor:pointer;padding:14px 15px;-webkit-tap-highlight-color:transparent;
  font-family:var(--display);font-weight:900;font-size:calc(17px * var(--fs));
  display:flex;align-items:center;justify-content:space-between;gap:10px}
.info-head::after{content:"\203a";color:var(--muted);font-size:calc(20px * var(--fs));
  transition:transform .18s;flex:none}
.info-sec.open .info-head::after{transform:rotate(90deg)}
.info-wrap{display:grid;grid-template-rows:0fr;transition:grid-template-rows .22s ease}
.info-sec.open .info-wrap{grid-template-rows:1fr}
.info-wrap>.info-body{overflow:hidden;min-height:0}
/* Bottom padding must NOT sit on the body: with border-box a padded element
   cannot shrink below its own padding, which leaves a visible sliver when the
   section is closed. The last child carries it as a margin instead, which
   compresses to nothing with the grid track. */
.info-body{padding:0 15px;font-size:calc(15px * var(--fs));line-height:1.55;color:var(--text)}
.info-sec .info-body>:last-child{margin-bottom:15px}
.info-body p{margin:0 0 11px}
.info-body p:last-child{margin-bottom:0}
.info-body b{font-weight:700}
.info-body .q{font-weight:700;margin:14px 0 3px;display:block}
.info-body a{color:var(--amber);font-weight:700}
.info-body .muted{color:var(--muted);font-size:calc(13.5px * var(--fs))}
.info-swatch{display:inline-flex;gap:5px;align-items:center;vertical-align:middle}
.info-swatch i{width:13px;height:13px;border-radius:50%;border:2px solid #fff;
  box-shadow:0 1px 2px rgba(0,0,0,.3);flex:none}

.fgroup{margin:4px 0 16px}
.flabel{font-family:var(--mono);font-size:calc(11px * var(--fs));letter-spacing:.14em;text-transform:uppercase;
  color:var(--muted);margin-bottom:9px;display:flex;justify-content:space-between;align-items:baseline}
.flabel .clear{color:var(--amber);cursor:pointer;font-size:calc(11px * var(--fs));letter-spacing:.04em;text-transform:none}
.chips{display:flex;flex-wrap:wrap;gap:8px}
.chip{font-family:var(--ui);font-size:calc(15px * var(--fs));font-weight:600;padding:9px 14px;border-radius:10px;
  border:1.5px solid var(--edge);background:var(--chip);color:var(--text);cursor:pointer;min-height:42px}
.chip:focus-visible{outline:3px solid var(--amber);outline-offset:2px}
.chip[aria-pressed="true"]{background:var(--chip-on);border-color:var(--chip-on);color:var(--chip-on-t)}
.chip-n{font-family:var(--mono);font-size:calc(11px * var(--fs));opacity:.6;margin-left:6px}
.fsearch{width:100%;padding:11px 13px;margin-bottom:9px;border-radius:10px;
  border:1.5px solid var(--edge);background:var(--panel);color:var(--text);
  font-family:var(--ui);font-size:calc(15px * var(--fs))}
.fsearch:focus{outline:3px solid var(--amber);outline-offset:1px}
.rng{display:flex;align-items:center;gap:12px}
.rng input[type=range]{flex:1;accent-color:var(--amber);height:32px}
.rngval{font-family:var(--mono);font-weight:700;font-size:calc(15px * var(--fs));min-width:74px;text-align:right}
.linkbtn{background:none;border:0;padding:0;margin:0;color:var(--amber);font:inherit;
  font-weight:700;cursor:pointer;text-decoration:underline}
.fcount{font-family:var(--mono);font-size:calc(13px * var(--fs));color:var(--muted);text-align:center;padding:2px 0 14px}

/* Detail views are reached by tapping a marker, so the way back to the list of
   nearby chargers has to be on screen — the sheet's drag-down gesture closes the
   sheet entirely rather than stepping back one level. */
.detail-back{display:inline-flex;align-items:center;gap:7px;background:none;border:0;
  padding:2px 0 10px;margin:0;color:var(--amber);font:inherit;
  font-size:calc(14px * var(--fs));font-weight:600;cursor:pointer}
.detail-back:hover{text-decoration:underline}
.detail-back svg{flex:none}

/* The busy-times strip inside a charger's detail view. Deliberately compact: it
   is a hint, not the main event, and it must degrade to a single honest line of
   text when this charger has no measured history behind it. */
.bt-box{margin-top:14px;border:1.5px solid var(--edge-2);border-radius:12px;padding:12px 13px;background:var(--panel)}
.bt-top{display:flex;align-items:baseline;justify-content:space-between;gap:10px;margin-bottom:9px}
.bt-title{font-family:var(--mono);font-size:calc(12px * var(--fs));letter-spacing:.08em;
  text-transform:uppercase;color:var(--muted)}
.bt-more{background:none;border:0;padding:0;margin:0;color:var(--amber);font:inherit;
  font-size:calc(13px * var(--fs));font-weight:600;cursor:pointer}
.bt-more:hover{text-decoration:underline}
.bt-none{font-size:calc(13px * var(--fs));color:var(--muted);line-height:1.45}
.bt-foot{font-family:var(--mono);font-size:calc(12px * var(--fs));color:var(--muted);margin-top:8px}
.bt-box .fc-chart,.bt-box .fc-y{height:calc(58px * var(--fs))}
.bt-box .fc-y span:nth-child(2){visibility:hidden}

/* ---------------------------------------------------------------------------
   Busy times — weekly occupancy profile from the history service.
   A column per hour. Filled bars are measured hours; a hollow dot on the
   baseline means we have no reading for that hour yet, which is a different
   statement from "nobody charged" and must not look like a zero bar.
--------------------------------------------------------------------------- */
.fc-list{display:flex;flex-direction:column;gap:8px}
.fc-station{display:flex;align-items:center;justify-content:space-between;gap:10px;width:100%;
  background:var(--panel);border:1.5px solid var(--edge-2);border-radius:11px;padding:11px 13px;
  color:var(--text);font:inherit;font-size:calc(15px * var(--fs));text-align:left;cursor:pointer}
.fc-station:hover,.fc-station:focus-visible{border-color:var(--edge)}
.fc-s-name{font-weight:600;min-width:0;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}
.fc-s-meta{font-family:var(--mono);font-size:calc(12px * var(--fs));color:var(--muted);flex:none}
.fc-head{margin-bottom:2px}
/* The week at a glance: seven rows of twenty-four cells.
 *
 * A single day answers "is it busy at four on a Tuesday". The week answers
 * "when is this place worth avoiding", which is the question someone planning a
 * trip is actually asking — and it is the view you want to come back to after
 * drilling into a day. */
.fc-week{margin:12px 0 6px;display:flex;flex-direction:column;gap:3px}
.fc-wrow{display:flex;align-items:center;gap:7px}
.fc-wday{flex:0 0 30px;font-family:var(--mono);font-size:calc(11px * var(--fs));
  font-weight:700;color:var(--muted);text-transform:uppercase}
.fc-wday.today{color:var(--amber)}
.fc-wcells{flex:1;display:grid;grid-template-columns:repeat(24,1fr);gap:1px}
.fc-wcell{aspect-ratio:1;border-radius:2px;background:var(--edge-2);position:relative}
.fc-wcell.now{outline:2px solid var(--amber);outline-offset:1px;z-index:1}
.fc-wcell.weak::after{content:"";position:absolute;inset:0;border-radius:2px;
  background:repeating-linear-gradient(45deg,transparent 0 2px,var(--panel) 2px 3px)}
.fc-wscale{display:flex;align-items:center;gap:8px;margin:8px 0 2px;
  font-family:var(--mono);font-size:calc(10.5px * var(--fs));color:var(--muted)}
.fc-wscale i{display:flex;gap:2px;font-style:normal}
.fc-wscale i span{width:13px;height:13px;border-radius:2px}
.fc-whours{display:flex;justify-content:space-between;margin:3px 0 0 37px;
  font-family:var(--mono);font-size:calc(10px * var(--fs));color:var(--muted)}

.fc-days{display:flex;gap:6px;flex-wrap:wrap;margin:14px 0 12px}
.fc-wrap{display:flex;gap:8px;align-items:stretch}
.fc-plot{flex:1 1 auto;min-width:0}
/* Value labels sit outside the plot so they can never be mistaken for data. */
.fc-y{flex:none;display:flex;flex-direction:column;justify-content:space-between;
  height:calc(122px * var(--fs));font-family:var(--mono);
  font-size:calc(10px * var(--fs));color:var(--muted);text-align:right;
  transform:translateY(-.45em)}
.fc-chart{display:flex;align-items:flex-end;gap:2px;height:calc(122px * var(--fs));
  border-bottom:1.5px solid var(--edge);
  /* One line at half height: enough to read a bar against, faint enough to ignore. */
  background-image:linear-gradient(var(--edge-2), var(--edge-2));
  background-size:100% 1px;background-position:0 50%;background-repeat:no-repeat}
.fc-col{position:relative;flex:1 1 0;height:100%;display:flex;align-items:flex-end;
  justify-content:center;border-radius:3px 3px 0 0}
/* "Now" is a mark below the baseline. As a full-height outline it read as the
   tallest bar on the chart — louder than any real measurement. */
.fc-col.now::after{content:'';position:absolute;bottom:calc(-1 * (5px * var(--fs)) - 3px);
  left:50%;transform:translateX(-50%);width:0;height:0;
  border-left:calc(4px * var(--fs)) solid transparent;
  border-right:calc(4px * var(--fs)) solid transparent;
  border-bottom:calc(5px * var(--fs)) solid var(--amber)}
.fc-bar{width:100%;background:var(--amber);border-radius:3px 3px 0 0;min-height:3px}
.fc-col.nodata .fc-bar{width:4px;height:4px;min-height:4px;border-radius:50%;
  background:none;border:1.5px solid var(--edge-2)}
/* Measured, but under the threshold the service trusts: shown, not hidden,
   and visibly lighter than the bars we stand behind. */
.fc-col.weak .fc-bar{background:var(--edge-2)}
.fc-axis{display:flex;font-family:var(--mono);font-size:calc(11px * var(--fs));
  color:var(--muted);margin-top:9px}
.fc-axis span{flex:1 1 0;text-align:center}
.fc-axis span:first-child{text-align:left}
.fc-axis span:last-child{text-align:right}
.fc-now{font-family:var(--mono);font-size:calc(13px * var(--fs));margin-top:14px;
  padding:10px 12px;border:1.5px solid var(--edge-2);border-radius:11px;background:var(--panel)}
.fc-now b{font-size:calc(17px * var(--fs))}
.fc-err{color:var(--red);font-size:calc(14px * var(--fs));padding:6px 0}
/* Corridor route line + from/to search UI. */
.corr-dimmed{opacity:var(--corr-dim,0.28);transition:opacity .2s}

/* From/To search, revealed when the search box is tapped. Two rows so the eye
   groups them as one origin->destination pair, with a swap between. */
#corrbox{display:none;flex-direction:column;gap:8px;margin-top:8px;position:relative;
  background:var(--panel);border:1.5px solid var(--edge);border-radius:14px;padding:10px;
  box-shadow:0 12px 30px rgba(0,0,0,.3)}
#corrbox.open{display:flex}
.corr-row{display:flex;align-items:center;gap:8px}
.corr-field{position:relative;flex:1}
.corr-field input{width:100%;box-sizing:border-box;padding:12px 13px;border-radius:12px;
  border:1.5px solid var(--edge);background:var(--card);color:var(--text);
  font-size:calc(15px * var(--fs));font-family:inherit}
.corr-field input:focus{outline:none;border-color:var(--text)}
.corr-ac{position:absolute;left:0;right:0;bottom:calc(100% + 6px);z-index:1050;
  background:var(--panel);border:1.5px solid var(--edge);border-radius:12px;overflow:hidden;
  box-shadow:0 12px 30px rgba(0,0,0,.3);max-height:38vh;overflow-y:auto}
.corr-ac[hidden]{display:none}
.corr-ac .acitem{padding:11px 13px;cursor:pointer;font-size:calc(14px * var(--fs));
  border-bottom:1px solid var(--edge)}
.corr-ac .acitem:last-child{border-bottom:0}
.corr-ac .acitem:hover,.corr-ac .acitem.sel{background:var(--chip-on-bg,rgba(0,0,0,.06))}
.corr-swap{flex:none;width:34px;height:34px;border-radius:50%;border:1.5px solid var(--edge);
  background:var(--card);color:var(--text);cursor:pointer;font-size:16px;line-height:1}
.corr-actions{display:flex;gap:8px}
.corr-go{flex:1;padding:15px 14px;border-radius:14px;border:0;background:var(--accent);
  color:#111;font-weight:900;font-family:var(--display);font-size:calc(17px * var(--fs));
  cursor:pointer;display:flex;align-items:center;justify-content:center;gap:8px;
  box-shadow:0 4px 14px rgba(224,165,58,.35);letter-spacing:.01em}
.corr-go:active{transform:translateY(1px)}
.corr-go:disabled{opacity:.55;box-shadow:none}
.corr-go svg{flex:none}
.corr-clear{flex:none;padding:12px 14px;border-radius:12px;border:1.5px solid var(--edge);
  background:var(--card);color:var(--text);cursor:pointer}
/* The route summary strip: distance + time, shown once a corridor is live. */
#corrstrip{display:none;margin-top:8px;padding:10px 13px;border-radius:12px;
  background:var(--card);border:1.5px solid var(--edge);
  font-family:var(--mono);font-size:calc(13px * var(--fs))}
#corrstrip.show{display:block}
.corr-err{color:#c0392b;font-size:calc(13px * var(--fs));margin-top:6px}
/* Along-route list in the sheet. */
.corr-list-head{font-family:var(--display);font-weight:900;font-size:calc(15px * var(--fs));
  padding:4px 2px 10px;color:var(--muted);text-transform:uppercase;letter-spacing:.03em}
.corr-list{display:flex;flex-direction:column;gap:8px}
.corr-item{width:100%;text-align:left;background:var(--card);border:1.5px solid var(--edge);
  border-radius:12px;padding:12px 13px;cursor:pointer;color:var(--text);font:inherit}
.corr-item-top{display:flex;justify-content:space-between;align-items:baseline;gap:10px}
.corr-eta{font-family:var(--mono);font-size:calc(13px * var(--fs));color:var(--muted);flex:none}
.corr-item-sub{margin-top:4px;font-family:var(--mono);font-size:calc(12px * var(--fs));color:var(--muted)}
.corr-fc{font-weight:700}
.corr-fc.muted{color:var(--muted);font-weight:400}
.corr-ac .corr-myloc{font-weight:700;color:var(--text)}
/* Departure-time picker above the along-route list. */
.corr-dep{display:flex;align-items:center;gap:6px;flex-wrap:wrap;padding:2px 2px 12px}
.corr-dep-lbl{font-size:calc(13px * var(--fs));color:var(--muted);margin-right:2px}
.corr-dep-chip{padding:6px 11px;border-radius:20px;border:1.5px solid var(--edge);
  background:var(--card);color:var(--text);font:inherit;font-size:calc(13px * var(--fs));cursor:pointer}
.corr-dep-chip.on{background:var(--accent);color:#111;border-color:var(--accent);font-weight:700}
.corr-dep-time{padding:6px 8px;border-radius:10px;border:1.5px solid var(--edge);
  background:var(--card);color:var(--text);font:inherit;font-size:calc(13px * var(--fs))}
/* "reading busy times…" — hidden unless the depart row is in its busy state, and
   shown with a soft pulse so it reads as work-in-progress, not a static label. */
.corr-dep-status{display:none;font-size:calc(12px * var(--fs));color:var(--accent);
  font-family:var(--mono);animation:corrPulse 1.1s ease-in-out infinite}
.corr-dep.busy .corr-dep-status{display:inline}
.corr-dep.busy .corr-dep-chip{opacity:.6}
@keyframes corrPulse{0%,100%{opacity:1}50%{opacity:.45}}
