/* The trip planner (/chargers/plan/). Loaded after chargers.css; every rule sits under .tp so nothing here reaches another page. The motorsport set: carbon
   ground, square-cut controls on a hairline, the orange and blue stripe on what is lit, display numerals for the figures, gold for a stop. Nothing that holds
   glass is animated in opacity, filter, mask or clip-path (garage.css: the flicker rule); only the map's own drawing moves, and not under reduced motion. */

.tp{ --tp-gold:#F2C94C }

/* ---------- the route: A and B ---------- */
.tp .tp-form{ margin:0 0 22px }
.tp .tp-route{ display:grid; grid-template-columns:minmax(0,1fr) auto minmax(0,1fr); gap:12px; align-items:center; margin:0 0 18px }
.tp .tp-end{ position:relative; min-width:0; display:flex; gap:12px; align-items:center; padding:10px 12px 10px 10px; border:1px solid var(--hairline-strong); border-radius:var(--r-box,4px);
  background:rgba(5,7,13,.55); box-shadow:inset 0 1px 0 rgba(229,231,235,.06) }
.tp .tp-end:focus-within{ border-color:var(--ignition); box-shadow:0 0 0 1px var(--ignition), 0 0 24px -6px rgba(244,81,30,.5) }
.tp .tp-pin{ flex:none; display:inline-grid; place-items:center; width:34px; height:34px; border-radius:50%; font-family:var(--display); font-size:15px; color:#05070d; background:var(--ink);
  box-shadow:0 0 0 3px rgba(5,7,13,.85), 0 0 0 4px rgba(229,231,235,.25) }
.tp .tp-pin--b{ background:var(--speed-blue) }
.tp .tp-pin--s{ background:var(--tp-gold); width:30px; height:30px; font-size:14px }
.tp .tp-box{ min-width:0; flex:1 1 auto; display:flex; flex-direction:column; gap:2px }
.tp .tp-lab{ font-size:var(--cm-cap); font-weight:800; letter-spacing:.18em; text-transform:uppercase; color:var(--ink-3) }
.tp .tp-end input[type="search"]{ width:100%; min-height:40px; padding:4px 0; border:0; background:transparent; color:var(--ink); font:inherit; font-size:clamp(1.05rem,2.4vw,1.25rem); font-weight:600; letter-spacing:-.01em; box-shadow:none; flex:none }
.tp .tp-end input[type="search"]:focus-visible{ outline:0 }
.tp .tp-here{ align-self:flex-start; margin:0; padding:2px 0; border:0; border-bottom:1px solid rgba(87,199,245,.45); background:transparent; color:var(--sky); cursor:pointer; font-size:var(--cm-cap); font-weight:700; letter-spacing:.08em; text-transform:uppercase }
.tp .tp-here[hidden]{ display:none }
.tp .tp-swap{ width:44px; height:44px; display:grid; place-items:center; border:1px solid var(--hairline-strong); border-radius:50%; background:rgba(255,255,255,.04); color:var(--ink); font-size:20px; cursor:pointer; transition:border-color .15s, transform .25s }
.tp .tp-swap:hover{ border-color:var(--ink-2) }
.tp .tp-swap:active{ transform:rotate(180deg) }
.tp .tp-swap:focus-visible{ outline:2px solid var(--ignition); outline-offset:2px }
.tp .tp-end .cm-sug{ top:100%; left:0; right:0 }
@media (max-width:759.98px){
  .tp .tp-route{ grid-template-columns:minmax(0,1fr) }
  .tp .tp-swap{ justify-self:end; margin:-34px 10px -34px 0; position:relative; z-index:2; width:38px; height:38px; background:#0b101c }
}

/* ---------- the car's setup ---------- */
.tp .tp-setup{ margin:0 0 18px; padding:16px 16px 14px; border:1px solid var(--hairline); border-radius:var(--r-box,4px); background:linear-gradient(180deg,rgba(255,255,255,.035),rgba(255,255,255,0) 60%) }
.tp .tp-leg{ padding:0 8px; margin-left:-8px; font-size:var(--cm-cap); font-weight:800; letter-spacing:.2em; text-transform:uppercase; color:var(--amber) }
.tp .tp-dials{ display:grid; gap:14px 22px; grid-template-columns:repeat(2,minmax(0,1fr)); margin:6px 0 16px }
@media (min-width:1000px){ .tp .tp-dials{ grid-template-columns:repeat(4,minmax(0,1fr)) } }
.tp .tp-dial{ min-width:0; display:grid; grid-template-columns:minmax(0,1fr) auto; gap:2px 8px; align-items:baseline }
.tp .tp-dial label{ font-size:var(--cm-cap); font-weight:800; letter-spacing:.12em; text-transform:uppercase; color:var(--ink-2) }
.tp .tp-dial output{ font-family:var(--display); font-size:1.15rem; color:var(--ink); font-variant-numeric:tabular-nums }
.tp .tp-dial input[type="range"]{ grid-column:1 / -1; width:100%; margin:6px 0 0 }
.tp .tp-dial small{ grid-column:1 / -1; font-size:var(--cm-foot); line-height:1.4; color:var(--ink-3) }
.tp input[type="range"]{ -webkit-appearance:none; appearance:none; height:28px; background:transparent; cursor:pointer }
.tp input[type="range"]{ --p:50% }
.tp input[type="range"]::-webkit-slider-runnable-track{ height:6px; border-radius:0; background:linear-gradient(90deg,var(--ignition) var(--p),rgba(229,231,235,.16) var(--p)); clip-path:polygon(0 0,100% 0,calc(100% - 8px) 100%,0 100%) }
.tp input[type="range"]::-moz-range-track{ height:6px; background:linear-gradient(90deg,var(--ignition) var(--p),rgba(229,231,235,.16) var(--p)) }
.tp input[type="range"]::-webkit-slider-thumb{ -webkit-appearance:none; appearance:none; width:22px; height:22px; margin-top:-8px; border-radius:50%; border:3px solid #05070d; background:var(--ink); box-shadow:0 0 0 1px rgba(229,231,235,.5) }
.tp input[type="range"]::-moz-range-thumb{ width:16px; height:16px; border-radius:50%; border:3px solid #05070d; background:var(--ink); box-shadow:0 0 0 1px rgba(229,231,235,.5) }
.tp input[type="range"]:focus-visible{ outline:2px solid var(--ignition); outline-offset:3px; border-radius:3px }

/* the battery bar: reserve, working window and top, with a tick where each stop charges to */
.tp .tp-batt{ position:relative; height:16px; margin:0 0 16px; border:1px solid var(--hairline-strong); background:rgba(5,7,13,.7); overflow:hidden }
.tp .tp-batt i{ position:absolute; top:0; bottom:0 }
.tp .tp-batt .b-res{ left:0; background:repeating-linear-gradient(135deg,rgba(244,81,30,.75) 0 4px,rgba(244,81,30,.25) 4px 8px) }
.tp .tp-batt .b-use{ background:linear-gradient(90deg,rgba(87,199,245,.55),rgba(87,199,245,.9)) }
.tp .tp-batt .b-top{ background:rgba(255,255,255,.05) }
.tp .tp-batt .b-to{ position:absolute; top:-2px; bottom:-2px; width:3px; margin-left:-1px; background:var(--tp-gold); box-shadow:0 0 8px rgba(242,201,76,.8) }

.tp .tp-picks{ display:flex; flex-wrap:wrap; gap:14px 24px; align-items:center }
.tp .tp-plugs{ margin:0; padding:0; border:0; min-width:0; display:flex; align-items:center; gap:12px; flex-wrap:wrap }
.tp .tp-plugs legend{ float:left; padding:0; margin-right:12px; font-size:var(--cm-cap); font-weight:800; letter-spacing:.14em; text-transform:uppercase; color:var(--ink-2) }
.tp .tp-chk{ margin:0 }

/* ---------- the button and its status ---------- */
.tp .tp-act{ display:flex; flex-wrap:wrap; gap:12px 18px; align-items:center }
.tp .tp-plan{ position:relative; min-height:54px; padding:14px 34px 14px 28px; border:0; border-radius:0; background:linear-gradient(180deg,#ff6a3a,var(--ignition)); color:#fff; cursor:pointer;
  font-family:var(--display); font-size:15px; letter-spacing:.12em; text-transform:uppercase; clip-path:polygon(0 0,100% 0,calc(100% - 14px) 100%,0 100%) }
.tp .tp-plan:hover{ background:linear-gradient(180deg,#ff7b4f,#ff5a28) }
.tp .tp-plan:focus-visible{ outline:2px solid var(--speed-blue); outline-offset:3px }
.tp .tp-status{ margin:0; font-size:var(--cm-sub); color:var(--ink-2) }
.tp .tp-status.is-bad{ color:#ffb199 }
@media (max-width:599.98px){ .tp .tp-plan{ width:100%; padding-right:28px; text-align:center } }

/* ---------- the result: the map beside the route sheet ---------- */
.tp .tp-result{ display:grid; gap:22px; grid-template-columns:minmax(0,1fr); padding-top:22px; border-top:1px solid var(--hairline) }
@media (min-width:980px){ .tp .tp-result{ grid-template-columns:minmax(0,1.05fr) minmax(0,1fr); align-items:start } .tp .tp-mapcard{ position:sticky; top:84px } }
.tp .tp-mapcard{ min-width:0 }
.tp .tp-canvas{ display:block; width:100%; height:clamp(320px,56vh,600px); border:1px solid var(--hairline-strong); border-radius:var(--r-box,4px); background:#05070d }
.tp .tp-out{ min-width:0 }

.tp .tp-head{ display:grid; grid-template-columns:repeat(3,minmax(0,1fr)); gap:0; margin:0 0 14px; border:1px solid var(--hairline-strong); border-radius:var(--r-box,4px); background:rgba(5,7,13,.5) }
.tp .tp-fig{ min-width:0; padding:12px 14px; border-left:1px solid var(--hairline) }
.tp .tp-fig:first-child{ border-left:0 }
.tp .tp-fig b{ display:block; font-family:var(--display); font-size:clamp(1.5rem,4.6vw,2.2rem); line-height:1; letter-spacing:-.02em; color:var(--ink); font-variant-numeric:tabular-nums }
.tp .tp-fig:first-child b{ color:var(--ignition) }
.tp .tp-fig span{ display:block; margin-top:6px; font-size:var(--cm-cap); font-weight:700; letter-spacing:.1em; text-transform:uppercase; color:var(--ink-3) }
.tp .tp-via{ display:flex; flex-wrap:wrap; gap:6px; align-items:center; margin:0 0 16px }
.tp .tp-via-k{ margin-right:4px; font-size:var(--cm-cap); font-weight:800; letter-spacing:.16em; text-transform:uppercase; color:var(--ink-3) }
.tp .tp-road{ padding:3px 9px; border:1px solid rgba(87,199,245,.5); border-radius:2px; background:rgba(87,199,245,.1); font-size:var(--cm-foot); font-weight:800; letter-spacing:.06em; color:var(--speed-blue-hot,#8ADCFF) }
.tp .tp-warn{ margin:0 0 14px; padding:12px 14px; border:1px solid rgba(242,201,76,.6); border-left-width:4px; border-radius:var(--r-box,4px); background:rgba(242,201,76,.07); font-size:var(--cm-sub); line-height:1.5; color:var(--ink) }
.tp .tp-ok{ margin:0 0 14px; padding:12px 14px; border:1px solid rgba(87,199,245,.5); border-left-width:4px; border-radius:var(--r-box,4px); background:rgba(87,199,245,.07); font-size:var(--cm-sub); line-height:1.5; color:var(--ink) }

/* ---------- the route sheet: a rail from A to B ---------- */
.tp .tp-line{ list-style:none; margin:0 0 18px; padding:0; position:relative; display:grid; gap:0 }
.tp .tp-line::before{ content:""; position:absolute; left:16px; top:18px; bottom:18px; width:3px; background:repeating-linear-gradient(180deg,var(--ignition) 0 10px,transparent 10px 16px); opacity:.85 }
.tp .tp-node{ position:relative; display:flex; gap:14px; align-items:center; min-height:44px; margin:0 }
.tp .tp-node .tp-pin{ position:relative; z-index:1; width:34px; height:34px }
.tp .tp-nt b{ display:block; font-size:var(--cm-body); color:var(--ink); overflow-wrap:anywhere }
.tp .tp-nt span{ display:block; font-size:var(--cm-sub); color:var(--ink-2) }
.tp .tp-leg-row{ display:flex; gap:14px; align-items:center; margin:0; padding:10px 0; min-height:40px }
.tp .tp-legbar{ flex:none; width:34px; height:1px }
.tp .tp-legt{ padding:3px 10px; border:1px solid var(--hairline-strong); border-radius:2px; background:rgba(5,7,13,.85); font-size:var(--cm-foot); font-weight:700; letter-spacing:.04em; color:var(--ink-2); font-variant-numeric:tabular-nums }
.tp .tp-stop{ position:relative; margin:0 0 0 48px; padding:14px 16px 12px; border:1px solid var(--hairline-strong); border-radius:var(--r-box,4px);
  background:linear-gradient(180deg,rgba(255,255,255,.045),rgba(255,255,255,.01)); box-shadow:inset 0 1px 0 rgba(229,231,235,.08) }
.tp .tp-stop::before{ content:""; position:absolute; left:-32px; top:30px; width:30px; height:2px; background:var(--tp-gold); opacity:.7 }
.tp .tp-stop.is-on{ border-color:var(--tp-gold); box-shadow:0 0 0 1px var(--tp-gold), 0 18px 44px -18px rgba(242,201,76,.35) }
.tp .tp-top{ display:flex; gap:12px; align-items:flex-start; width:100%; margin:0; padding:0; border:0; background:transparent; color:inherit; text-align:left; font:inherit; cursor:pointer }
.tp .tp-top:focus-visible{ outline:2px solid var(--ignition); outline-offset:4px; border-radius:2px }
.tp .tp-t{ min-width:0 }
.tp .tp-t b{ display:block; font-size:var(--cm-body); line-height:1.3; color:var(--ink); overflow-wrap:anywhere }
.tp .tp-t span{ display:block; margin-top:2px; font-size:var(--cm-sub); color:var(--ink-2) }
.tp .tp-gauge{ position:relative; height:10px; margin:12px 0 4px; border:1px solid var(--hairline-strong); background:rgba(5,7,13,.8) }
.tp .tp-gauge i{ position:absolute; left:0; top:0; bottom:0; background:linear-gradient(90deg,rgba(87,199,245,.6),var(--speed-blue)) }
.tp .tp-gauge i.is-low{ background:linear-gradient(90deg,rgba(244,81,30,.6),var(--ignition)) }
.tp .tp-gauge i.tp-gauge-to{ width:2px; margin-left:-1px; top:-3px; bottom:-3px; background:var(--tp-gold) }
.tp .tp-gt{ margin:0 0 10px; font-size:var(--cm-foot); font-weight:700; letter-spacing:.06em; text-transform:uppercase; color:var(--ink-2) }
.tp .tp-chips{ display:flex; flex-wrap:wrap; gap:6px; margin:0 0 8px }
.tp .tp-chip{ padding:3px 9px; border:1px solid var(--hairline-strong); border-radius:2px; background:rgba(255,255,255,.04); font-size:var(--cm-foot); line-height:1.4; color:var(--ink-2) }
.tp .tp-price{ margin:0 0 8px; font-size:var(--cm-foot); color:var(--ink-3) }
.tp .tp-go{ display:flex; flex-wrap:wrap; gap:0 18px; margin:0 }
.tp .tp-l{ padding:9px 0; font-size:var(--cm-cap); font-weight:800; letter-spacing:.12em; text-transform:uppercase; color:var(--ink); text-decoration:none; border-bottom:1px solid var(--hairline-strong) }
.tp .tp-l:hover{ color:var(--amber); border-bottom-color:var(--amber) }
.tp .tp-l:focus-visible{ outline:2px solid var(--speed-blue); outline-offset:2px }
.tp .tp-acts{ display:flex; flex-wrap:wrap; gap:10px }
.tp .tp-whole{ display:inline-block; text-decoration:none; text-align:center; border-color:rgba(244,81,30,.6); background:rgba(244,81,30,.14) }
@media (max-width:599.98px){
  .tp .tp-stop{ margin-left:30px } .tp .tp-stop::before{ left:-18px; width:16px }
  .tp .tp-fig{ padding:10px }
}
@media (prefers-reduced-motion:reduce){ .tp .tp-swap{ transition:none } .tp .tp-swap:active{ transform:none } }

/* ---------- one-tap trips, range classes ---------- */
.tp .tp-try{ display:flex; flex-wrap:wrap; gap:8px; align-items:center; margin:0 0 12px }
.tp .tp-try[hidden], .tp .tp-ex[hidden]{ display:none }
.tp .tp-try-k, .tp .tp-class-k{ margin-right:4px; font-size:var(--cm-cap); font-weight:800; letter-spacing:.16em; text-transform:uppercase; color:var(--ink-3) }
.tp .tp-ex, .tp .tp-class{ min-height:36px; padding:6px 12px; border:1px solid var(--hairline-strong); border-radius:2px; background:rgba(255,255,255,.04); color:var(--ink); cursor:pointer; font:inherit; font-size:var(--cm-foot); font-weight:700; letter-spacing:.04em; transition:border-color .15s, background .15s, transform .15s }
.tp .tp-ex:hover, .tp .tp-class:hover{ border-color:var(--ink-2); transform:translateY(-1px) }
.tp .tp-ex:focus-visible, .tp .tp-class:focus-visible{ outline:2px solid var(--ignition); outline-offset:2px }
.tp .tp-ex--real{ border-color:rgba(242,201,76,.5) }
.tp .tp-ex--last{ border-color:rgba(87,199,245,.55); color:var(--speed-blue-hot,#8ADCFF) }
.tp .tp-classes{ display:flex; flex-wrap:wrap; gap:8px; align-items:center; margin:2px 0 8px }
.tp .tp-class.is-on{ border-color:var(--ignition); background:rgba(244,81,30,.16) }

/* ---------- what the car did, what the ledger saw, what a change would do ---------- */
.tp .tp-real, .tp .tp-ledger, .tp .tp-what{ margin:0 0 14px; padding:12px 14px; border:1px solid var(--hairline-strong); border-left-width:4px; border-radius:var(--r-box,4px); background:rgba(255,255,255,.03) }
.tp .tp-real{ border-left-color:var(--tp-gold) }
.tp .tp-real-k, .tp .tp-what-k{ margin:0 0 4px; font-size:var(--cm-cap); font-weight:800; letter-spacing:.16em; text-transform:uppercase; color:var(--amber) }
.tp .tp-real-t, .tp .tp-what-t{ margin:0 0 6px; font-size:var(--cm-sub); line-height:1.5; color:var(--ink) }
.tp .tp-real a{ font-size:var(--cm-foot) }
.tp .tp-ledger{ border-left-color:var(--speed-blue); margin:0 0 16px; font-size:var(--cm-sub); line-height:1.5; color:var(--ink) }
.tp .tp-what{ border-left-color:var(--ignition) }
.tp .tp-what-t:last-child{ margin-bottom:0 }
.tp .tp-chip--new{ border-color:rgba(87,199,245,.6); background:rgba(87,199,245,.12); color:var(--speed-blue-hot,#8ADCFF); font-weight:800 }

/* the stops slide into place (a transform only: nothing that holds glass fades) */
@keyframes tp-in{ from{ transform:translateY(14px) } to{ transform:none } }
.tp .tp-stop{ animation:tp-in .42s cubic-bezier(.2,.7,.2,1) both }
.tp .tp-play{ border-color:rgba(87,199,245,.6); background:rgba(87,199,245,.14) }
.tp .tp-img{ border-color:var(--hairline-strong) }

/* ---------- keep reading ---------- */
.tp .tp-learn{ margin:26px 0 0; padding-top:18px; border-top:1px solid var(--hairline) }
.tp .tp-learn[hidden]{ display:none }
.tp .tp-learn-k{ margin:0 0 10px; font-size:var(--cm-cap); font-weight:800; letter-spacing:.18em; text-transform:uppercase; color:var(--amber) }
.tp .tp-learn ul{ list-style:none; margin:0; padding:0; display:grid; gap:12px; grid-template-columns:minmax(0,1fr) }
@media (min-width:700px){ .tp .tp-learn ul{ grid-template-columns:repeat(2,minmax(0,1fr)) } }
@media (min-width:1100px){ .tp .tp-learn ul{ grid-template-columns:repeat(4,minmax(0,1fr)) } }
.tp .tp-learn li{ margin:0 }
.tp .tp-learn a{ display:block; height:100%; padding:14px 16px; border:1px solid var(--hairline-strong); border-radius:var(--r-box,4px); background:rgba(255,255,255,.03); text-decoration:none; color:inherit; transition:border-color .15s, transform .2s }
.tp .tp-learn a:hover{ border-color:var(--ignition); transform:translateY(-2px) }
.tp .tp-learn a:focus-visible{ outline:2px solid var(--speed-blue); outline-offset:3px }
.tp .tp-learn b{ display:block; font-size:var(--cm-body); color:var(--ink) }
.tp .tp-learn span{ display:block; margin-top:4px; font-size:var(--cm-sub); line-height:1.45; color:var(--ink-2) }
@media (prefers-reduced-motion:reduce){ .tp .tp-stop{ animation:none } .tp .tp-ex, .tp .tp-class, .tp .tp-learn a{ transition:none } .tp .tp-ex:hover, .tp .tp-class:hover, .tp .tp-learn a:hover{ transform:none } }
@media (max-width:599.98px){
  .tp .tp-try{ flex-wrap:nowrap; overflow-x:auto; margin-left:-2px; padding:0 2px 6px; scrollbar-width:none }
  .tp .tp-try::-webkit-scrollbar{ display:none }
  .tp .tp-try-k, .tp .tp-ex{ flex:none; white-space:nowrap }
  .tp .tp-classes{ gap:6px } .tp .tp-class-k{ flex:1 1 100% }
  .tp .tp-class{ flex:1 1 0; padding:6px 8px; white-space:nowrap }
}

/* ---------- a walk from the stalls ---------- */
.tp .tp-near{ margin:0 0 10px; padding:10px 12px; border:1px solid var(--hairline); border-left:3px solid var(--speed-blue); background:rgba(87,199,245,.05) }
.tp .tp-near[hidden]{ display:none }
.tp .tp-near-k{ margin:0 0 6px; font-size:var(--cm-cap); font-weight:800; letter-spacing:.14em; text-transform:uppercase; color:var(--speed-blue-hot,#8ADCFF) }
.tp .tp-near-none{ margin:0; font-size:var(--cm-foot); color:var(--ink-3) }
.tp .tp-near-row{ display:flex; flex-wrap:wrap; gap:4px 8px; align-items:baseline; margin:0 0 5px; font-size:var(--cm-foot) }
.tp .tp-near-row b{ flex:0 0 78px; font-size:var(--cm-cap); letter-spacing:.1em; text-transform:uppercase; color:var(--ink-2) }
.tp .tp-place{ padding:2px 8px; border:1px solid var(--hairline-strong); border-radius:2px; background:rgba(255,255,255,.04); color:var(--ink); line-height:1.4 }
