/* Exit Value Modeller: the pieces the shared tl- classes don't cover. Tokens only, so dark mode and print follow the site. */

/* Form */
.ev-driver + .ev-driver { margin-top: 0.3rem; }
.ev-driver .tl-sub .muted { display: block; margin-top: 2px; font-size: 0.88rem; }
.ev-price-btns { margin-top: 10px; gap: 8px 10px; }
.ev-price-btns .btn { min-height: 40px; padding: 0.45rem 0.9rem; font-size: 0.9rem; white-space: normal; text-align: left; }
.ev-msg { margin-top: 0.5rem; color: var(--ink); font-size: 0.88rem; }
.ev-msg:empty { display: none; }
.ev-rates { max-width: 82ch; }

/* Result blocks */
.ev-block { margin-top: clamp(32px, 5vw, 48px); }
.ev-block > .tl-h2 { margin-top: 0; }
.tl-results .tl-empty { padding: 18px 20px; border-left: 3px solid var(--accent); background: var(--accent-tint); color: var(--ink); max-width: 82ch; outline: none; }

/* Normalisation lines */
.ev-lines { margin: 0; max-width: 640px; border-top: 1px solid var(--line-strong); }
.ev-lines div { display: flex; justify-content: space-between; align-items: baseline; gap: 16px; padding: 10px 0; border-bottom: 1px solid var(--line); }
.ev-lines dt { color: var(--muted); }
.ev-lines dd { margin: 0; font-weight: 600; font-variant-numeric: tabular-nums; white-space: nowrap; }
.ev-lines .total { border-bottom-color: var(--line-strong); }
.ev-lines .total dt { color: var(--ink); font-weight: 600; }
.ev-lines .total dd { color: var(--accent); font-size: 1.15rem; }

/* Value bridge: today, then what the model treats as within reach (hatched) */
.ev-bridge { position: relative; height: 44px; max-width: 820px; background: var(--track); overflow: hidden; }
.ev-bridge span { position: absolute; top: 0; bottom: 0; }
.ev-today { left: 0; background: var(--accent); }
.ev-gap, .ev-key.gap, .ev-route.eot i {
  background: repeating-linear-gradient(135deg, var(--accent) 0 2px, var(--accent-tint) 2px 8px);
  box-shadow: inset 0 0 0 1px var(--accent);
}
.ev-legend { list-style: none; display: flex; flex-wrap: wrap; gap: 8px 28px; margin-top: 12px; font-size: 0.92rem; color: var(--muted); }
.ev-legend li { display: flex; align-items: baseline; gap: 8px; }
.ev-legend .ev-key { align-self: center; }
.ev-legend strong { color: var(--ink); font-weight: 600; font-variant-numeric: tabular-nums; }
.ev-key { flex: none; width: 12px; height: 12px; }
.ev-key.today { background: var(--accent); }
.ev-gapline { margin-top: 18px; padding: 14px 18px; max-width: 820px; border-left: 3px solid var(--accent); background: var(--accent-tint); }
.ev-gapline strong { display: block; font-size: 1.35rem; font-stretch: 112%; line-height: 1.2; color: var(--accent); font-variant-numeric: tabular-nums; }
.ev-gapline span { display: block; margin-top: 4px; font-size: 0.93rem; }

/* Focus list and driver answers */
.ev-focus, .ev-drivers { list-style: none; border-top: 1px solid var(--line-strong); }
.ev-focus { max-width: 640px; counter-reset: ev; margin-bottom: 1.6rem; }
.ev-focus li { counter-increment: ev; display: grid; grid-template-columns: 2.4rem minmax(0, 1fr) auto; gap: 12px; align-items: baseline; padding: 12px 0; border-bottom: 1px solid var(--line); }
.ev-focus li::before { content: '0' counter(ev); font-family: var(--mono); color: var(--accent); }
.ev-focus b { font-weight: 600; }
.ev-focus span { font-weight: 600; color: var(--accent); font-variant-numeric: tabular-nums; white-space: nowrap; }
.ev-none { margin-bottom: 1.6rem; max-width: 72ch; }
.ev-sub { font-weight: 600; margin: 0 0 0.5rem; }
.ev-drivers { max-width: 820px; }
.ev-drivers li { display: grid; grid-template-columns: minmax(0, 1.1fr) minmax(0, 1fr) 9rem; gap: 2px 16px; align-items: baseline; padding: 10px 0; border-bottom: 1px solid var(--line); }
.ev-drivers b { font-weight: 600; }
.ev-drivers .ans { color: var(--muted); }
.ev-drivers .imp { text-align: right; font-weight: 600; font-variant-numeric: tabular-nums; white-space: nowrap; }
.ev-drivers .imp.up { color: var(--accent); }
.ev-drivers .imp.flat { color: var(--muted); font-weight: 400; }

/* Routes */
.ev-routes { list-style: none; display: grid; gap: 20px; max-width: 820px; }
.ev-route-top { display: flex; justify-content: space-between; align-items: baseline; gap: 4px 16px; flex-wrap: wrap; }
.ev-route-top b { font-weight: 600; }
.ev-route-top small { display: block; color: var(--muted); font-size: 0.85rem; }
.ev-route-net { font-size: 1.35rem; font-weight: 600; font-stretch: 112%; font-variant-numeric: tabular-nums; }
.ev-route-bar { height: 12px; margin-top: 8px; background: var(--track); }
.ev-route-bar i { display: block; height: 100%; }
.ev-route.standard i { background: var(--muted); }
.ev-route.badr i { background: var(--accent); }
.ev-route-tax { margin-top: 5px; color: var(--muted); font-size: 0.88rem; font-variant-numeric: tabular-nums; }
.ev-block .tl-aside { margin-top: 24px; }
.ev-note { margin-top: 16px; padding-left: 17px; max-width: 90ch; border-left: 3px solid var(--line-strong); color: var(--muted); font-size: 0.93rem; }
.ev-note strong { color: var(--ink); }

@media (max-width: 600px) {
  .ev-drivers li { grid-template-columns: minmax(0, 1fr) 7.5rem; }
  .ev-drivers .ans { grid-column: 1; grid-row: 2; }
  .ev-drivers .imp { grid-column: 2; grid-row: 1 / span 2; align-self: center; }
  .ev-price-btns .btn { flex: 1 1 100%; }
  .ev-lines div { align-items: flex-start; }
}

/* Save as PDF: the results only (the shared rules hide the form) */
@media print {
  .ev-block { margin-top: 12px; }
  .ev-block .tl-h2, .ev-sub { break-after: avoid; }
  .ev-lines, .ev-focus, .ev-drivers, .ev-route, .ev-gapline, .ev-block .tl-aside, .ev-note { break-inside: avoid; }
  .tl-results .tl-empty { display: none; }
  .ev-lines div, .ev-drivers li, .ev-focus li { padding: 3px 0; font-size: 8.5pt; }
  .ev-lines .total dd { font-size: 9.5pt; }
  .ev-bridge { height: 16px; }
  .ev-legend { margin-top: 4px; font-size: 8pt; }
  .ev-gapline { margin-top: 6px; padding: 6px 10px; }
  .ev-gapline strong { font-size: 11pt; }
  .ev-gapline span { font-size: 8.5pt; }
  .ev-focus, .ev-none { margin-bottom: 8px; }
  .ev-sub { font-size: 9pt; margin-bottom: 2px; }
  .ev-drivers li { grid-template-columns: minmax(0, 1.1fr) minmax(0, 1fr) 30mm; }
  .ev-routes { gap: 6px; }
  .ev-route-top b { font-size: 9pt; }
  .ev-route-top small { font-size: 8pt; }
  .ev-route-net { font-size: 10.5pt; }
  .ev-route-bar { height: 7px; margin-top: 3px; }
  .ev-route-tax { font-size: 8pt; margin-top: 2px; }
  .ev-block .tl-aside, .ev-note { margin-top: 8px; padding: 6px 10px; font-size: 8pt; }
}
