:root {
  /* ---- Surfaces --------------------------------------------------- */
  /* The page is warm paper, not clinical white. That single decision is
     what lets white panels read as *floating* instead of merging in.   */
  --bg: #f6f5f2;
  --bg-warm: #f2f0ec;
  --surface: #ffffff;
  --surface-2: #fbfaf8;
  --surface-sunk: #edebe6;
  --surface-glass: rgba(255, 255, 255, 0.72);

  /* ---- Text ------------------------------------------------------- */
  --text: #14171a;
  --text-muted: #5c6670;
  --text-subtle: #69737e;
  /* Placeholders and disabled states. 3.04:1 — deliberately below body text
     so an empty field never reads as filled, but still legible. */
  --text-ghost: #8b95a0;

  /* ---- Borders ----------------------------------------------------- */
  --border: #e2ded7;
  --border-soft: #ebe8e2;
  --border-strong: #c4bfb6;

  /* ---- Primary — marine blue.  Deliberately NOT green/amber/red:     */
  /*      those three encode congestion across the map and heatmap, so  */
  /*      the brand colour must stay outside that range to keep the     */
  /*      traffic reading unambiguous.                                  */
  --p-050: #f2f7fb;
  --p-100: #e3edf7;
  --p-200: #c3daed;
  --p-400: #6aa3d0;
  --p-500: #1a72c4;   /* 4.94:1 on white — active states, focus rings   */
  --p-600: #0f5c9e;   /* 6.90:1 both ways — buttons, links, markers     */
  --p-700: #0b4a80;   /* 9.11:1 on white — emphasised accent text       */
  --p-900: #0a2f52;   /* 13.6:1 — origin marker, accented headings      */

  --primary: var(--p-600);
  --primary-hover: var(--p-700);
  --primary-active: var(--p-500);
  --primary-subtle: var(--p-100);
  --primary-faint: var(--p-050);
  --primary-border: var(--p-200);
  --primary-ring: rgba(26, 114, 196, 0.22);

  /* ---- Status = the traffic ramp.  One vocabulary for the whole      */
  /*      product: what means "clear road" also means "success".        */
  --clear: #2d9a4a;
  --slow:  #d99a4e;
  --jam:   #c9532b;
  --success: var(--clear);
  --warning: var(--slow);
  --danger:  var(--jam);

  /* Heatmap: the same three hues, lightened — so a pale cell and a     */
  /* pale stretch of road read as the same statement.                   */
  --cell-1: #dcefdf;
  --cell-2: #f0e8c9;
  --cell-3: #f2cea0;
  --cell-4: #e0996b;
  --cell-5: #c04a30;

  /* ---- Back-compat aliases (older rules still reference these) ------ */
  --bg-2: var(--surface-2);
  --border-hi: var(--border-strong);
  --fg: var(--text);
  --fg-2: var(--text-muted);
  --fg-3: var(--text-subtle);

  --mono: 'JetBrains Mono', 'SF Mono', 'Menlo', 'Consolas', monospace;
  --display: 'Space Grotesk', -apple-system, 'Segoe UI', sans-serif;
  --ui: 'Manrope', 'Inter', -apple-system, 'Segoe UI', sans-serif;

  /* Legacy name kept so existing rules pick up the new brand colour. */
  --accent: var(--primary);

  /* Spacing scale (4px base). Vertical rhythm across the whole product. */
  --s1: 4px;   --s2: 8px;   --s3: 12px;  --s4: 16px;
  --s5: 24px;  --s6: 32px;  --s7: 48px;  --s8: 64px;
  --s9: 96px;  --s10: 128px;

  /* Motion — fast and precise, never bouncy. */
  --ease: cubic-bezier(0.22, 0.61, 0.36, 1);
  --ease-out: cubic-bezier(0.16, 1, 0.3, 1);
  --t-fast: 120ms;
  --t-mid: 220ms;
  --t-slow: 420ms;

  /* Radii — one scale, no more ad-hoc 6/9/10/14. */
  --r-xs: 6px;  --r-sm: 10px;  --r-md: 14px;
  --r-lg: 20px; --r-xl: 28px;  --r-pill: 999px;

  /* Elevation — tinted with the accent hue, never neutral black. Pure
     black alpha over warm paper turns muddy grey; a blue-cast shadow
     reads as air. */
  --lift-1: 0 1px 2px rgba(20, 40, 66, 0.05);
  --lift-2: 0 2px 6px rgba(20, 40, 66, 0.06), 0 8px 24px rgba(20, 40, 66, 0.05);
  --lift-3: 0 4px 12px rgba(20, 40, 66, 0.07), 0 20px 56px rgba(20, 40, 66, 0.09);
  --lift-float: 0 1px 3px rgba(20, 40, 66, 0.08), 0 10px 34px rgba(20, 40, 66, 0.10);
}

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
  }
}

* { box-sizing: border-box; }
*::selection { background: var(--fg); color: var(--bg); }

html, body {
  margin: 0;
  padding: 0;
  background: var(--bg);
  font-optical-sizing: auto;
  color: var(--fg);
  font-family: var(--ui);
  font-weight: 400;
  min-height: 100vh;
  line-height: 1.5;
  -webkit-font-smoothing: antialiased;
  font-feature-settings: 'cv11';
}

a { color: var(--fg); text-decoration: none; transition: opacity 0.1s ease; }
a:hover { opacity: 0.6; }

.mono { font-family: var(--mono); font-variant-numeric: tabular-nums; }
.display { font-family: var(--display); font-weight: 700; letter-spacing: -0.04em; }

.label {
  font-family: var(--mono);
  font-size: 11px;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--fg-2);
  font-weight: 500;
}

/* NAV */

.nav {
  position: sticky;
  top: 0;
  z-index: 900;
  display: grid;
  grid-template-columns: 1fr auto 1fr;
  align-items: center;
  height: 54px;
  padding: 0 var(--s5);
  background: rgba(246, 245, 242, 0.78);
  backdrop-filter: saturate(180%) blur(20px);
  -webkit-backdrop-filter: saturate(180%) blur(18px);
  border-bottom: 1px solid transparent;
  transition: border-color var(--t-mid) var(--ease);
}
/* Hairline only once the page has moved — the header floats until then. */
.nav.is-stuck { border-bottom-color: var(--border-soft); }

.nav-brand {
  display: inline-flex;
  align-items: center;
  gap: var(--s2);
  justify-self: start;
  font-family: var(--display);
  font-weight: 700;
  font-size: 15px;
  letter-spacing: 0.02em;
  text-transform: uppercase;
  color: var(--fg);
}
.nav-brand:hover { opacity: 1; }
.nav-mark {
  width: 7px;
  height: 7px;
  background: var(--fg);
  transition: background var(--t-mid) var(--ease), transform var(--t-mid) var(--ease);
}
.nav-brand:hover .nav-mark { background: var(--primary); transform: rotate(45deg) scale(1.15); }

.nav-mid {
  display: flex;
  gap: var(--s6);
  align-items: center;
  justify-self: center;
  font-size: 13px;
  font-weight: 450;
  letter-spacing: -0.005em;
}
.nav-mid a {
  color: var(--fg-2);
  transition: color var(--t-fast) var(--ease);
}
.nav-mid a:hover { color: var(--text); opacity: 1; }

.nav-end {
  display: flex;
  gap: var(--s3);
  align-items: center;
  justify-self: end;
}

.nav-ghost {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  background: transparent;
  border: none;
  padding: 6px 10px;
  cursor: pointer;
  color: var(--fg-2);
  font-family: var(--ui);
  font-size: 13px;
  font-weight: 450;
  border-radius: 6px;
  transition: color var(--t-fast) var(--ease), background var(--t-fast) var(--ease);
}
.nav-ghost:hover { color: var(--text); background: rgba(20, 23, 26, 0.05); }
.nav-ghost-glyph { font-size: 14px; line-height: 1; }

@media (max-width: 820px) {
  .nav { grid-template-columns: auto 1fr; height: 50px; padding: 0 var(--s4); }
  .nav-mid { display: none; }
  .nav-ghost-label { display: none; }
}

/* Legacy alias — some pages still use .nav-links */
.nav-links {
  display: flex;
  gap: var(--s6);
  align-items: center;
  font-size: 13px;
}
.nav-links a { color: var(--fg-2); }
.btn-line {
  border: 1px solid var(--fg);
  padding: 8px 18px;
  font-size: 12px;
  color: var(--fg);
  background: transparent;
  cursor: pointer;
  font-family: var(--ui);
  font-weight: 500;
  text-transform: uppercase;
  letter-spacing: 0.08em;
}
.btn-line:hover { background: var(--fg); color: var(--bg); opacity: 1; }


.th-modal[hidden] { display: none !important; }
.th-modal {
  position: fixed; inset: 0;
  background: rgba(0, 0, 0, 0.35);
  z-index: 10000;
  display: flex; align-items: flex-start; justify-content: center;
  padding: 60px 20px 20px;
  animation: thFade 0.15s ease-out;
}
@keyframes thFade { from { opacity: 0; } to { opacity: 1; } }
.th-panel {
  background: var(--bg);
  border: 1px solid var(--fg);
  width: 100%;
  max-width: 560px;
  max-height: 80vh;
  display: flex; flex-direction: column;
  box-shadow: 0 24px 80px rgba(0,0,0,0.45);
}
.th-head {
  display: flex; justify-content: space-between; align-items: center;
  padding: 18px 22px;
  border-bottom: 1px solid var(--border);
}
.th-title {
  font-family: var(--display);
  font-weight: 700;
  font-size: 15px;
  letter-spacing: 0.04em;
  text-transform: uppercase;
}
.th-close {
  background: transparent; border: 1px solid var(--border);
  width: 28px; height: 28px; font-size: 18px; line-height: 1;
  cursor: pointer; color: var(--fg-2); padding: 0;
}
.th-close:hover { border-color: var(--fg); color: var(--fg); }
.th-list {
  flex: 1; overflow-y: auto;
  padding: 8px 0;
}
.th-empty {
  padding: 32px 22px;
  color: var(--fg-3); font-size: 13px;
  text-align: center;
}
.th-item {
  display: flex; align-items: stretch;
  border-bottom: 1px solid var(--border);
  margin: 0;
}
.th-run {
  flex: 1;
  background: transparent; border: none; text-align: left;
  padding: 14px 22px;
  cursor: pointer;
  color: var(--fg);
  font-family: inherit;
  transition: background 0.15s;
}
.th-run:hover { background: var(--bg-2, rgba(0,0,0,0.03)); }
.th-route {
  font-family: var(--display);
  font-size: 14px; font-weight: 600;
}
.th-when {
  font-family: var(--mono);
  font-size: 11px; color: var(--fg-2);
  margin-top: 4px; letter-spacing: 0.04em;
}
.th-del {
  background: transparent; border: none;
  color: var(--fg-3); font-size: 20px;
  width: 40px; cursor: pointer;
  transition: color 0.15s;
}
.th-del:hover { color: var(--fg); }
.th-footer {
  padding: 12px 22px;
  border-top: 1px solid var(--border);
  text-align: right;
}
.th-clear {
  background: transparent; border: 1px solid var(--border);
  padding: 6px 12px; cursor: pointer;
  font-family: var(--mono); font-size: 11px;
  color: var(--fg-2); letter-spacing: 0.06em;
  text-transform: uppercase;
}
.th-clear:hover { color: var(--fg); border-color: var(--fg); }

.lang-switch {
  display: inline-flex;
  align-items: center;
  gap: 2px;
  padding: 2px;
  background: rgba(10, 10, 10, 0.04);
  border-radius: 7px;
}
.lang-switch .lang-item {
  padding: 4px 7px;
  font-family: var(--mono);
  font-size: 10px;
  line-height: 1;
  color: var(--fg-3);
  letter-spacing: 0.04em;
  border-radius: 5px;
  transition: color var(--t-fast) var(--ease), background var(--t-fast) var(--ease);
}
.lang-switch .lang-item:hover { color: var(--fg); opacity: 1; }
.lang-switch .lang-item.active {
  background: var(--surface);
  color: var(--text);
  box-shadow: var(--lift-1);
}

/* LANDING — form-first */

.landing {
  padding: 72px 40px 96px;
  max-width: 1440px;
  margin: 0 auto;
  border-bottom: 1px solid var(--border);
  text-align: center;
}
@media (max-width: 800px) { .landing { padding: 40px 20px 56px; } }

.landing-head { margin-bottom: 48px; }

.hero-eyebrow {
  font-family: var(--mono);
  font-size: 11px;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: var(--fg-2);
  margin-bottom: 20px;
}

.landing h1 {
  font-family: var(--display);
  font-size: clamp(40px, 6.5vw, 88px);
  line-height: 0.95;
  margin: 0 0 24px;
  font-weight: 700;
  letter-spacing: -0.045em;
  color: var(--fg);
  text-transform: uppercase;
}

.landing-lede {
  font-size: 17px;
  line-height: 1.55;
  color: var(--fg-2);
  max-width: 720px;
  margin: 0 auto;
  font-weight: 400;
}
.landing-lede strong { color: var(--fg); font-weight: 600; }

/* NL CHATBOT (landing) */

.nl-chat {
  max-width: 900px;
  margin: 0 auto 24px;
  padding: 20px 24px;
  border: 1px solid var(--fg);
  background: var(--bg);
  text-align: left;
}
.nl-eyebrow {
  font-family: var(--mono);
  font-size: 11px;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--fg-2);
  margin-bottom: 12px;
}
.nl-row {
  display: flex;
  gap: 12px;
  align-items: stretch;
}
.nl-row input {
  flex: 1;
  border: none;
  border-bottom: 1px solid var(--border);
  background: transparent;
  padding: 12px 0;
  font-family: var(--ui);
  font-size: 18px;
  font-weight: 500;
  color: var(--fg);
  outline: none;
  border-radius: 0;
}
.nl-row input::placeholder { color: var(--fg-3); font-weight: 400; }
.nl-row input:focus { border-bottom-color: var(--fg); }
.nl-row button {
  background: var(--fg);
  color: var(--bg);
  border: none;
  padding: 12px 28px;
  font-family: var(--ui);
  font-size: 13px;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.1em;
  cursor: pointer;
  transition: opacity 0.1s ease;
}
.nl-row button:hover { opacity: 0.85; }
.nl-row button:disabled { opacity: 0.4; cursor: wait; }

.nl-status {
  font-family: var(--mono);
  font-size: 12px;
  color: var(--fg-2);
  margin-top: 12px;
  min-height: 0;
}
.nl-status:empty { display: none; }

.nl-preview {
  margin-top: 20px;
  padding-top: 20px;
  border-top: 1px solid var(--border);
  text-align: left;
}
.nl-title {
  font-family: var(--mono);
  font-size: 11px;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--fg-2);
  margin-bottom: 8px;
}
.nl-summary {
  font-family: var(--display);
  font-size: 22px;
  font-weight: 700;
  letter-spacing: -0.02em;
  line-height: 1.15;
  margin-bottom: 16px;
}
.nl-tags {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  margin-bottom: 20px;
}
.nl-tag {
  font-family: var(--mono);
  font-size: 11px;
  padding: 5px 10px;
  border: 1px solid var(--border);
  color: var(--fg-2);
  letter-spacing: 0.04em;
  text-transform: uppercase;
}
.nl-warn {
  font-family: var(--mono);
  font-size: 12px;
  color: #8a5232;
  padding: 10px 12px;
  background: rgba(217, 154, 78, 0.09);
  border-left: 2px solid var(--warning);
  border-radius: 0 6px 6px 0;
  margin-bottom: 16px;
}
.nl-actions {
  display: flex;
  gap: 12px;
  align-items: center;
}
.nl-actions .btn-primary { padding: 12px 24px; font-size: 12px; }
.btn-line-small {
  background: transparent;
  border: 1px solid var(--border);
  color: var(--fg);
  padding: 12px 18px;
  font-family: var(--ui);
  font-size: 12px;
  cursor: pointer;
  text-transform: uppercase;
  letter-spacing: 0.08em;
}
.btn-line-small:hover { border-color: var(--fg); }

.nl-or {
  text-align: center;
  font-family: var(--mono);
  font-size: 11px;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--fg-3);
  margin: 0 0 20px;
}

/* ADDRESS AUTOCOMPLETE */

.ac-wrap { position: relative; }
.ac-dropdown {
  position: absolute;
  top: 100%;
  left: 0;
  right: 0;
  background: var(--bg);
  border: 1px solid var(--fg);
  border-top: none;
  z-index: 20;
  max-height: 320px;
  overflow-y: auto;
  box-shadow: 0 6px 24px rgba(0,0,0,0.08);
}
.ac-dropdown[hidden] { display: none !important; }
.ac-item {
  padding: 12px 16px;
  border-bottom: 1px solid var(--border);
  cursor: pointer;
  transition: background 0.05s ease;
}
.ac-item:last-child { border-bottom: none; }
.ac-item:hover,
.ac-item.active { background: var(--bg-2); }
.ac-item.active { border-left: 3px solid var(--fg); padding-left: 13px; }
.ac-primary {
  font-family: var(--ui);
  font-size: 14px;
  font-weight: 500;
  color: var(--fg);
  line-height: 1.3;
  margin-bottom: 2px;
}
.ac-secondary {
  font-family: var(--mono);
  font-size: 11px;
  color: var(--fg-2);
  letter-spacing: 0.02em;
  line-height: 1.3;
}

/* SEARCH BAR */

.search-bar {
  display: grid;
  grid-template-columns: 1.5fr 4px 1.5fr 4px 1fr 4px 1fr auto;
  align-items: stretch;
  border: 1px solid var(--fg);
  background: var(--bg);
  max-width: 1200px;
  margin: 0 auto;
}
@media (max-width: 1000px) {
  .search-bar {
    grid-template-columns: 1fr 1fr;
    grid-auto-rows: auto;
  }
  .search-bar .sb-sep { display: none; }
  .search-bar .sb-submit { grid-column: 1 / -1; }
}

.sb-field {
  padding: 18px 24px;
  text-align: left;
  display: flex;
  flex-direction: column;
  justify-content: center;
  min-width: 0;
}
.sb-field label {
  font-family: var(--mono);
  font-size: 10px;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--fg-2);
  margin-bottom: 6px;
  font-weight: 500;
}
.sb-field input, .sb-field select {
  border: none;
  outline: none;
  background: transparent;
  font-family: var(--ui);
  font-size: 18px;
  font-weight: 500;
  color: var(--fg);
  padding: 0;
  width: 100%;
  letter-spacing: -0.01em;
  border-radius: 0;
  min-width: 0;
}
.sb-field input::placeholder { color: var(--fg-3); font-weight: 400; }
.sb-field.disabled { background: var(--bg-2); }
.sb-field.disabled label { color: var(--fg-3); }
.sb-field.disabled input { color: var(--fg-3); cursor: not-allowed; }
.sb-sep {
  background: var(--border);
}
.sb-submit {
  background: var(--fg);
  color: var(--bg);
  border: none;
  padding: 0 40px;
  font-family: var(--ui);
  font-size: 15px;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.1em;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  gap: 12px;
  justify-content: center;
  transition: opacity 0.1s ease;
}
.sb-submit:hover { opacity: 0.85; }

/* SEARCH OPTIONS */

.search-opts {
  display: flex;
  justify-content: center;
  gap: 48px;
  margin-top: 24px;
  flex-wrap: wrap;
}
.opt-group {
  display: flex;
  align-items: center;
  gap: 14px;
}
.opt-label {
  font-family: var(--mono);
  font-size: 10px;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--fg-2);
  font-weight: 500;
}
.opt-pills { display: flex; }
.opt-pill {
  padding: 6px 14px;
  border-top: 1px solid var(--border);
  border-bottom: 1px solid var(--border);
  border-right: 1px solid var(--border);
  color: var(--fg-2);
  font-size: 12px;
  font-weight: 500;
  cursor: pointer;
  background: var(--bg);
  transition: all 0.1s ease;
  letter-spacing: 0.02em;
  text-transform: uppercase;
}
.opt-pill:first-child { border-left: 1px solid var(--border); }
.opt-pill input { display: none; }
.opt-pill:hover { color: var(--fg); }
.opt-pill.active { background: var(--fg); color: var(--bg); border-color: var(--fg); }

.landing-hint {
  text-align: center;
  font-size: 13px;
  color: var(--fg-2);
  margin-top: 40px;
  max-width: 640px;
  margin-left: auto;
  margin-right: auto;
  line-height: 1.55;
}

/* Spec strip under hero */

.spec-strip {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  border-bottom: 1px solid var(--border);
  max-width: 1440px;
  margin: 0 auto;
}
@media (max-width: 900px) { .spec-strip { grid-template-columns: 1fr 1fr; } }

.spec {
  padding: 40px 40px;
  border-right: 1px solid var(--border);
}
.spec:last-child { border-right: none; }
.spec .k {
  font-family: var(--mono);
  font-size: 11px;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--fg-2);
  margin-bottom: 16px;
  font-weight: 500;
}
.spec .v {
  font-family: var(--display);
  font-size: 40px;
  font-weight: 700;
  color: var(--fg);
  letter-spacing: -0.03em;
  line-height: 1;
}
.spec .v .unit { font-size: 16px; color: var(--fg-2); margin-left: 4px; font-weight: 500; }

/* DIFF SECTION */

.diff-section {
  padding: 96px 40px 32px;
  max-width: 1240px;
  margin: 0 auto;
}
@media (max-width: 800px) { .diff-section { padding: 56px 24px 24px; } }

.diff-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  border: 1px solid var(--border);
}
@media (max-width: 700px) { .diff-grid { grid-template-columns: 1fr; } }

.diff-item {
  padding: 40px;
  border-right: 1px solid var(--border);
}
.diff-item:last-child { border-right: none; }
@media (max-width: 700px) {
  .diff-item { border-right: none; border-bottom: 1px solid var(--border); }
  .diff-item:last-child { border-bottom: none; }
}

.diff-us { background: var(--fg); color: var(--bg); }
.diff-us .diff-name { color: var(--bg); }
.diff-us .diff-list li { color: var(--bg); }
.diff-us .diff-list li::before { color: var(--bg); }

.diff-name {
  font-family: var(--display);
  font-size: 22px;
  font-weight: 700;
  letter-spacing: -0.02em;
  text-transform: uppercase;
  margin-bottom: 24px;
  padding-bottom: 20px;
  border-bottom: 1px solid var(--border);
}
.diff-us .diff-name { border-color: rgba(255,255,255,0.15); }

.diff-list {
  list-style: none;
  padding: 0;
  margin: 0;
  display: flex;
  flex-direction: column;
  gap: 14px;
}
.diff-list li {
  font-size: 14px;
  color: var(--fg);
  line-height: 1.4;
  padding-left: 24px;
  position: relative;
}
.diff-list li::before {
  content: '●';
  position: absolute;
  left: 0;
  top: 0;
  font-size: 8px;
  color: var(--fg);
  line-height: 1.6;
}
.diff-list li.off {
  color: var(--fg-3);
  text-decoration: line-through;
  text-decoration-color: var(--fg-3);
}
.diff-list li.off::before {
  content: '○';
  color: var(--fg-3);
}

.diff-note {
  text-align: center;
  font-size: 14px;
  color: var(--fg-2);
  margin: 32px auto 0;
  max-width: 720px;
  line-height: 1.55;
}
.diff-note strong { color: var(--fg); font-weight: 600; }

/* REPORTS */

.reports-hero {
  padding: 96px 40px 40px;
  max-width: 1240px;
  margin: 0 auto;
  border-bottom: 1px solid var(--border);
}
@media (max-width: 800px) { .reports-hero { padding: 56px 24px 32px; } }
.reports-hero h1 {
  font-family: var(--display);
  font-size: clamp(40px, 6vw, 80px);
  line-height: 0.95;
  margin: 20px 0 24px;
  font-weight: 700;
  letter-spacing: -0.045em;
  text-transform: uppercase;
}
.reports-lede {
  font-size: 17px;
  color: var(--fg-2);
  max-width: 720px;
  margin: 0 0 24px;
  line-height: 1.55;
}
.trust-badge {
  display: inline-block;
  padding: 8px 16px;
  border: 1px solid var(--border);
  font-family: var(--mono);
  font-size: 12px;
  color: var(--fg-2);
  letter-spacing: 0.04em;
}
.trust-badge strong { color: var(--fg); font-weight: 600; }

.reports-body {
  padding: 64px 40px 96px;
  max-width: 1240px;
  margin: 0 auto;
}
@media (max-width: 800px) { .reports-body { padding: 40px 24px 56px; } }

.reports-map {
  width: 100%;
  height: 520px;
  border: 1px solid var(--border);
  margin-bottom: 48px;
}
@media (max-width: 800px) { .reports-map { height: 380px; margin-bottom: 32px; } }
.reports-map .leaflet-container {
  font-family: var(--ui);
}
.leaflet-popup-content-wrapper {
  border-radius: 0 !important;
  border: 1px solid #0a0a0a;
  box-shadow: 0 4px 20px rgba(0,0,0,0.15) !important;
}
.leaflet-popup-tip {
  border: 1px solid #0a0a0a;
}
.leaflet-popup-content {
  margin: 14px 16px !important;
}
.leaflet-control-zoom a {
  border-radius: 0 !important;
  border-color: #0a0a0a !important;
  color: #0a0a0a !important;
  font-family: var(--ui) !important;
}

.reports-grid {
  display: grid;
  grid-template-columns: 1fr 1.4fr;
  gap: 48px;
}
@media (max-width: 900px) { .reports-grid { grid-template-columns: 1fr; gap: 32px; } }

.reports-form-wrap { }
.reports-form {
  border: 1px solid var(--border);
  padding: 28px;
  margin-top: 16px;
}
.reports-form .btn-primary { width: 100%; }
.reports-form-note {
  margin-top: 16px;
  font-size: 12px;
  color: var(--fg-2);
  line-height: 1.55;
}

.reports-list {
  display: flex;
  flex-direction: column;
  border-top: 1px solid var(--border);
  margin-top: 16px;
}
.reports-empty {
  padding: 40px 24px;
  border: 1px dashed var(--border);
  text-align: center;
  color: var(--fg-2);
  font-size: 14px;
  margin-top: 16px;
}
.report-row {
  padding: 24px 0;
  border-bottom: 1px solid var(--border);
  display: flex;
  flex-direction: column;
  gap: 8px;
}
.rr-kind {
  font-family: var(--display);
  font-size: 16px;
  font-weight: 700;
  letter-spacing: -0.01em;
  text-transform: uppercase;
}
.rr-note {
  font-size: 14px;
  color: var(--fg-2);
  line-height: 1.5;
  font-style: italic;
}
.rr-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 20px;
  font-family: var(--mono);
  font-size: 11px;
  color: var(--fg-2);
  letter-spacing: 0.04em;
  text-transform: uppercase;
}
.rr-actions {
  display: flex;
  gap: 8px;
  margin-top: 4px;
}
.rr-actions .btn-line { padding: 6px 14px; font-size: 11px; }

/* PRICING TEASER (landing) */

.pricing-teaser {
  padding: 96px 40px;
  max-width: 1240px;
  margin: 0 auto;
  border-top: 1px solid var(--border);
}
@media (max-width: 800px) { .pricing-teaser { padding: 56px 24px; } }

.pt-inner {
  display: grid;
  grid-template-columns: 1fr 1.2fr;
  gap: 80px;
  align-items: start;
}
@media (max-width: 900px) { .pt-inner { grid-template-columns: 1fr; gap: 40px; } }

.pt-copy h2 {
  font-family: var(--display);
  font-size: clamp(32px, 4vw, 56px);
  font-weight: 700;
  letter-spacing: -0.04em;
  line-height: 1;
  margin: 20px 0 20px;
  text-transform: uppercase;
}
.pt-copy p {
  font-size: 15px;
  color: var(--fg-2);
  margin: 0 0 24px;
  max-width: 380px;
  line-height: 1.55;
}
.pt-link {
  font-family: var(--display);
  font-weight: 700;
  font-size: 14px;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  border-bottom: 1px solid var(--fg);
  padding-bottom: 4px;
}
.pt-link:hover { opacity: 1; }

.pt-plans {
  display: grid;
  grid-template-columns: 1fr 1fr;
  border: 1px solid var(--border);
}
@media (max-width: 500px) { .pt-plans { grid-template-columns: 1fr; } }
.pt-plan {
  padding: 32px 28px;
  border-right: 1px solid var(--border);
  color: var(--fg);
  transition: background 0.1s ease;
}
.pt-plan:last-child { border-right: none; }
@media (max-width: 500px) {
  .pt-plan { border-right: none; border-bottom: 1px solid var(--border); }
  .pt-plan:last-child { border-bottom: none; }
}
.pt-plan:hover { opacity: 1; background: var(--bg-2); }
.pt-plan-pro { background: var(--fg); color: var(--bg); }
.pt-plan-pro:hover { background: #1f1f1f; }
.pt-plan-pro .pt-per { color: rgba(255,255,255,0.55); }
.pt-plan-pro .pt-quota { color: rgba(255,255,255,0.75); }

.pt-name {
  font-family: var(--display);
  font-size: 20px;
  font-weight: 700;
  letter-spacing: -0.02em;
  text-transform: uppercase;
  margin-bottom: 20px;
}
.pt-price {
  display: flex;
  align-items: baseline;
  margin-bottom: 16px;
  font-family: var(--display);
}
.pt-amount {
  font-size: 56px;
  font-weight: 700;
  line-height: 0.85;
  letter-spacing: -0.05em;
}
.pt-cur {
  font-size: 24px;
  font-weight: 500;
  margin-left: 4px;
}
.pt-per {
  font-family: var(--mono);
  font-size: 11px;
  color: var(--fg-2);
  margin-left: 10px;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  font-weight: 500;
}
.pt-quota {
  font-size: 13px;
  color: var(--fg-2);
  line-height: 1.45;
}

/* PRICING */

.pricing-hero {
  padding: 96px 40px 48px;
  max-width: 1240px;
  margin: 0 auto;
  text-align: center;
  border-bottom: 1px solid var(--border);
}
@media (max-width: 800px) { .pricing-hero { padding: 56px 24px 32px; } }
.pricing-hero h1 {
  font-family: var(--display);
  font-size: clamp(40px, 6vw, 80px);
  line-height: 0.95;
  margin: 20px 0 24px;
  font-weight: 700;
  letter-spacing: -0.045em;
  text-transform: uppercase;
}
.pricing-lede {
  font-size: 17px;
  color: var(--fg-2);
  max-width: 620px;
  margin: 0 auto;
  line-height: 1.55;
}

.pricing-grid-wrap {
  padding: 80px 40px 40px;
  max-width: 1240px;
  margin: 0 auto;
}
@media (max-width: 800px) { .pricing-grid-wrap { padding: 40px 24px; } }

.pricing-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  border: 1px solid var(--border);
}
@media (max-width: 800px) { .pricing-grid { grid-template-columns: 1fr; } }

.plan {
  padding: 48px 40px;
  border-right: 1px solid var(--border);
  display: flex;
  flex-direction: column;
}
.plan:last-child { border-right: none; }
@media (max-width: 800px) {
  .plan { border-right: none; border-bottom: 1px solid var(--border); }
  .plan:last-child { border-bottom: none; }
}

.plan-pro { background: var(--fg); color: var(--bg); }
.plan-pro .plan-tag { color: rgba(255,255,255,0.55); }
.plan-pro .q-hint { color: rgba(255,255,255,0.55); }
.plan-pro .plan-includes { border-top-color: rgba(255,255,255,0.15); }
.plan-pro .pi-title { color: rgba(255,255,255,0.55); }
.plan-pro .plan-includes ul li { color: rgba(255,255,255,0.85); }
.plan-pro .plan-includes ul li::before { color: var(--bg); }
.plan-pro .plan-cta { background: var(--bg); color: var(--fg); }
.plan-pro .plan-cta:hover { opacity: 1; background: var(--bg); }

.plan-name {
  font-family: var(--display);
  font-size: 32px;
  font-weight: 700;
  letter-spacing: -0.03em;
  text-transform: uppercase;
  margin-bottom: 8px;
}
.plan-tag {
  font-size: 14px;
  color: var(--fg-2);
  margin-bottom: 40px;
}
.plan-price {
  display: flex;
  align-items: baseline;
  margin-bottom: 32px;
  font-family: var(--display);
}
.plan-price .p-amount {
  font-size: 96px;
  font-weight: 700;
  letter-spacing: -0.05em;
  line-height: 0.85;
}
.plan-price .p-currency {
  font-size: 40px;
  font-weight: 500;
  margin-left: 4px;
}
.plan-price .p-period {
  font-family: var(--mono);
  font-size: 13px;
  color: var(--fg-2);
  margin-left: 12px;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  font-weight: 500;
}
.plan-pro .p-period { color: rgba(255,255,255,0.55); }

.plan-quota { margin-bottom: 32px; }
.plan-quota .q-value {
  font-size: 16px;
  font-weight: 600;
  margin-bottom: 4px;
}
.plan-quota .q-hint {
  font-family: var(--mono);
  font-size: 12px;
  color: var(--fg-2);
  letter-spacing: 0.04em;
}

.plan-cta {
  display: block;
  text-align: center;
  background: var(--fg);
  color: var(--bg);
  padding: 16px 28px;
  font-size: 13px;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.1em;
  margin-bottom: 40px;
  transition: opacity 0.1s ease;
}
.plan-cta:hover { opacity: 0.8; color: var(--bg); }

.plan-includes {
  border-top: 1px solid var(--border);
  padding-top: 24px;
  margin-top: auto;
}
.plan-includes .pi-title {
  font-family: var(--mono);
  font-size: 11px;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--fg-2);
  margin-bottom: 16px;
}
.plan-includes ul {
  list-style: none;
  padding: 0;
  margin: 0;
  display: flex;
  flex-direction: column;
  gap: 10px;
}
.plan-includes ul li {
  font-size: 14px;
  color: var(--fg);
  padding-left: 20px;
  position: relative;
  line-height: 1.4;
}
.plan-includes ul li::before {
  content: '●';
  position: absolute;
  left: 0;
  top: 0;
  font-size: 7px;
  color: var(--fg);
  line-height: 1.9;
}

.pricing-note {
  text-align: center;
  font-size: 14px;
  color: var(--fg-2);
  margin: 40px auto 0;
  max-width: 720px;
  line-height: 1.55;
}
.pricing-note a { color: var(--fg); text-decoration: underline; }

.pricing-faq {
  padding: 80px 40px 120px;
  max-width: 1240px;
  margin: 0 auto;
}
@media (max-width: 800px) { .pricing-faq { padding: 48px 24px; } }
.pricing-faq h2 {
  font-family: var(--display);
  font-size: clamp(32px, 4vw, 56px);
  font-weight: 700;
  letter-spacing: -0.04em;
  text-transform: uppercase;
  margin: 0 0 48px;
}
.faq-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 0;
  border-top: 1px solid var(--border);
}
@media (max-width: 800px) { .faq-grid { grid-template-columns: 1fr; } }
.faq-item {
  padding: 28px 32px 28px 0;
  border-bottom: 1px solid var(--border);
  border-right: 1px solid var(--border);
}
.faq-item:nth-child(2n) { border-right: none; padding-right: 0; }
@media (max-width: 800px) {
  .faq-item { border-right: none; padding-right: 0; }
}
.faq-q {
  font-family: var(--display);
  font-size: 17px;
  font-weight: 700;
  letter-spacing: -0.01em;
  margin-bottom: 12px;
  text-transform: uppercase;
}
.faq-a {
  font-size: 14px;
  color: var(--fg-2);
  line-height: 1.6;
}

/* METHOD SECTION */

.method-section {
  padding: 96px 40px 120px;
  max-width: 1440px;
  margin: 0 auto;
}
@media (max-width: 800px) { .method-section { padding: 56px 24px; } }

.method-section h2 {
  font-family: var(--display);
  font-size: clamp(32px, 4vw, 56px);
  font-weight: 700;
  letter-spacing: -0.04em;
  line-height: 1;
  margin: 0 0 48px;
  text-transform: uppercase;
}

.method-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 0;
  border-top: 1px solid var(--border);
  border-bottom: 1px solid var(--border);
}
@media (max-width: 900px) { .method-grid { grid-template-columns: 1fr 1fr; } }
@media (max-width: 600px) { .method-grid { grid-template-columns: 1fr; } }

.method-item {
  padding: 32px 32px 32px 0;
  border-right: 1px solid var(--border);
}
.method-item:last-child { border-right: none; padding-right: 0; }
@media (max-width: 900px) {
  .method-item:nth-child(2n) { border-right: none; padding-right: 0; }
  .method-item:nth-child(2n+1) { padding-right: 32px; }
}

.method-item .m-n {
  font-family: var(--mono);
  font-size: 11px;
  color: var(--fg-2);
  margin-bottom: 20px;
  letter-spacing: 0.14em;
  font-weight: 500;
}
.method-item .m-t {
  font-family: var(--display);
  font-size: 22px;
  font-weight: 700;
  letter-spacing: -0.02em;
  margin-bottom: 12px;
  text-transform: uppercase;
  line-height: 1.1;
}
.method-item .m-d {
  font-size: 14px;
  color: var(--fg-2);
  line-height: 1.55;
}

/* SEARCH FORM */

.panel {
  border: 1px solid var(--border);
  padding: 40px;
  background: var(--bg);
}

.panel .panel-title {
  font-family: var(--display);
  font-size: 20px;
  font-weight: 700;
  letter-spacing: -0.02em;
  text-transform: uppercase;
  margin: 0 0 32px;
  padding-bottom: 20px;
  border-bottom: 1px solid var(--border);
}

.field { margin-bottom: 24px; }
.field label {
  display: block;
  font-family: var(--mono);
  font-size: 11px;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--fg-2);
  margin-bottom: 10px;
  font-weight: 500;
}
.field input, .field select {
  width: 100%;
  border: none;
  border-bottom: 1px solid var(--border);
  background: transparent;
  padding: 12px 0;
  font-family: var(--ui);
  font-size: 18px;
  font-weight: 500;
  color: var(--fg);
  outline: none;
  border-radius: 0;
  transition: border-color 0.1s ease;
  letter-spacing: -0.01em;
}
.field input::placeholder { color: var(--fg-3); font-weight: 400; }
.field input:focus, .field select:focus { border-color: var(--fg); }

.field-row {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 24px;
}

.pill-group { display: flex; gap: 0; }
.pill {
  padding: 12px 20px;
  border: 1px solid var(--border);
  border-right: none;
  color: var(--fg-2);
  font-family: var(--ui);
  font-size: 13px;
  font-weight: 500;
  cursor: pointer;
  background: var(--bg);
  transition: all 0.1s ease;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  flex: 1;
  text-align: center;
}
.pill:last-child { border-right: 1px solid var(--border); }
.pill:hover { color: var(--fg); }
.pill.active {
  background: var(--fg);
  color: var(--bg);
  border-color: var(--fg);
}

.priority-list { display: flex; flex-direction: column; }
.priority-list label {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 16px 0;
  border-bottom: 1px solid var(--border);
  font-size: 15px;
  color: var(--fg-2);
  cursor: pointer;
  transition: color 0.1s ease;
  font-family: var(--ui);
  font-weight: 500;
  margin-bottom: 0;
}
.priority-list label:hover { color: var(--fg); }
.priority-list input { display: none; }
.priority-list label:has(input:checked) { color: var(--fg); }
.priority-list label:has(input:checked)::after {
  content: '●';
  color: var(--fg);
  font-size: 12px;
}

.submit-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-top: 40px;
}
.submit-hint {
  font-family: var(--mono);
  font-size: 11px;
  color: var(--fg-2);
  letter-spacing: 0.08em;
  text-transform: uppercase;
}
.btn-primary {
  background: var(--fg);
  color: var(--bg);
  padding: 16px 32px;
  font-size: 13px;
  font-weight: 600;
  border: none;
  cursor: pointer;
  font-family: var(--ui);
  text-transform: uppercase;
  letter-spacing: 0.1em;
  transition: opacity 0.1s ease;
}
.btn-primary:hover { opacity: 0.8; }

/* RESULTS */

.results-nav {
  padding: 24px 40px;
  border-bottom: 1px solid var(--border);
  display: flex;
  justify-content: space-between;
  align-items: center;
  max-width: 1600px;
  margin: 0 auto;
}
.trip-summary {
  display: flex;
  align-items: baseline;
  gap: 14px;
  font-family: var(--display);
  font-size: 20px;
  font-weight: 700;
  color: var(--fg);
  text-transform: uppercase;
  letter-spacing: -0.02em;
}
.trip-summary .arrow { color: var(--fg-2); font-weight: 400; }
.trip-summary .meta {
  color: var(--fg-2);
  font-size: 12px;
  margin-left: 16px;
  letter-spacing: 0.06em;
  font-family: var(--mono);
  font-weight: 400;
  text-transform: uppercase;
}

.results {
  padding: 64px 40px 96px;
  display: grid;
  grid-template-columns: 1.4fr 1fr;
  gap: 64px;
  max-width: 1600px;
  margin: 0 auto;
}
.results.results-single { grid-template-columns: 1fr 1fr; gap: 80px; max-width: 1240px; }
@media (max-width: 1200px) { .results, .results.results-single { grid-template-columns: 1fr; gap: 48px; padding: 40px 24px; } }

.single-slot-context .context-card {
  border: 1px solid var(--border);
  padding: 32px;
  display: flex;
  flex-direction: column;
}
.single-slot-context .ctx-row {
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  padding: 20px 0;
  border-bottom: 1px solid var(--border);
}
.single-slot-context .ctx-row:first-child { padding-top: 0; }
.single-slot-context .ctx-row:last-child { padding-bottom: 0; border-bottom: none; }
.single-slot-context .ctx-label {
  font-family: var(--mono);
  font-size: 11px;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--fg-2);
  font-weight: 500;
}
.single-slot-context .ctx-value {
  font-family: var(--display);
  font-size: 32px;
  font-weight: 700;
  color: var(--fg);
  letter-spacing: -0.03em;
}

.section-title {
  font-family: var(--display);
  font-size: 40px;
  line-height: 1;
  margin: 0 0 16px;
  font-weight: 700;
  letter-spacing: -0.035em;
  color: var(--fg);
  text-transform: uppercase;
}
.section-sub {
  font-size: 15px;
  color: var(--fg-2);
  margin: 0 0 40px;
  max-width: 560px;
  line-height: 1.55;
}

.heatmap-wrap {
  border: 1px solid var(--border);
  padding: 32px;
}
.heatmap {
  display: grid;
  gap: 0;
  align-items: center;
  margin: 0 0 32px;
}
.hm-head {
  text-align: center;
  font-family: var(--mono);
  font-size: 11px;
  color: var(--fg-2);
  padding: 10px 0;
  letter-spacing: 0.06em;
  border-bottom: 1px solid var(--border);
  font-variant-numeric: tabular-nums;
}
.hm-day-label {
  font-family: var(--mono);
  font-size: 11px;
  color: var(--fg-2);
  text-align: left;
  padding: 0 12px 0 0;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  font-weight: 500;
}
.cell {
  aspect-ratio: 1;
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: center;
  font-family: var(--mono);
  font-size: 15px;
  font-weight: 500;
  color: var(--fg);
  border-right: 1px solid var(--border);
  border-bottom: 1px solid var(--border);
  position: relative;
  cursor: pointer;
  transition: transform 0.1s ease;
  font-variant-numeric: tabular-nums;
  letter-spacing: -0.02em;
}
.cell:hover { transform: scale(1.05); z-index: 2; }
.cell.score-1 { background: var(--cell-1); color: var(--fg); }
.cell.score-2 { background: var(--cell-2); color: var(--fg); }
.cell.score-3 { background: var(--cell-3); color: var(--fg); }
.cell.score-4 { background: var(--cell-4); color: var(--fg); }
.cell.score-5 { background: var(--cell-5); color: var(--bg); }
.cell.best {
  outline: 2px solid var(--fg);
  outline-offset: -1px;
  z-index: 1;
}
.cell.empty { background: transparent; cursor: default; color: var(--fg-3); }
.cell.empty:hover { transform: none; }
.cell .sub {
  font-family: var(--mono);
  font-size: 10px;
  color: var(--fg-2);
  margin-top: 2px;
  font-variant-numeric: tabular-nums;
  letter-spacing: 0.02em;
}
.cell.score-1 .sub,
.cell.score-2 .sub,
.cell.score-3 .sub,
.cell.score-4 .sub { color: rgba(10, 10, 10, 0.55); }
.cell.score-5 .sub { color: rgba(255, 255, 255, 0.7); }

.legend {
  display: flex;
  align-items: center;
  gap: 16px;
  font-family: var(--mono);
  font-size: 10px;
  color: var(--fg-2);
  text-transform: uppercase;
  letter-spacing: 0.1em;
  padding-top: 24px;
  border-top: 1px solid var(--border);
}
.legend-bar { display: flex; flex: 1; max-width: 240px; height: 6px; }
.legend-bar > div { flex: 1; border-right: 1px solid var(--bg); }
.legend-bar > div:last-child { border-right: none; }

/* BEST PANEL */

.best-panel {
  border: 1px solid var(--border);
  padding: 40px;
}
.best-eyebrow {
  font-family: var(--mono);
  font-size: 11px;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--fg-2);
  margin-bottom: 24px;
  font-weight: 500;
}
.best-time {
  font-family: var(--display);
  font-size: 88px;
  line-height: 0.9;
  font-weight: 700;
  color: var(--fg);
  letter-spacing: -0.05em;
  margin-bottom: 8px;
}
.best-date {
  font-size: 14px;
  color: var(--fg-2);
  margin-bottom: 40px;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  font-family: var(--mono);
}

.metrics {
  display: grid;
  grid-template-columns: 1fr 1fr 1fr;
  border-top: 1px solid var(--border);
  border-bottom: 1px solid var(--border);
  margin: 0 0 40px;
}
.metric {
  padding: 24px 20px 24px 0;
  border-right: 1px solid var(--border);
}
.metric:last-child { border-right: none; padding-right: 0; }
.metric-label {
  font-family: var(--mono);
  font-size: 10px;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--fg-2);
  margin-bottom: 12px;
  font-weight: 500;
}
.metric-value {
  font-family: var(--display);
  font-size: 32px;
  font-weight: 700;
  color: var(--fg);
  letter-spacing: -0.03em;
  line-height: 1;
}
.metric-value .unit { font-size: 14px; color: var(--fg-2); margin-left: 4px; font-weight: 500; }

.wall-info {
  margin: 24px 0;
  padding: 20px 24px;
  border: 1px solid var(--fg);
}
.wi-title {
  font-family: var(--display);
  font-size: 14px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.02em;
  margin-bottom: 14px;
}
.wi-row {
  display: flex;
  justify-content: space-between;
  padding: 8px 0;
  border-bottom: 1px solid var(--border);
  font-size: 13px;
  color: var(--fg);
}
.wi-row.wi-stop {
  gap: 12px;
}
.wi-stop-name {
  flex: 1;
  min-width: 0;
}
.wi-remove {
  background: transparent;
  border: 1px solid var(--border);
  color: var(--fg-2);
  width: 22px;
  height: 22px;
  font-size: 16px;
  line-height: 1;
  cursor: pointer;
  padding: 0;
  border-radius: 0;
  transition: border-color 0.15s, color 0.15s;
}
.wi-remove:hover {
  border-color: var(--fg);
  color: var(--fg);
}
.wi-row.wi-total {
  border-bottom: none;
  padding-top: 12px;
  font-family: var(--display);
  font-size: 16px;
  font-weight: 700;
}
.wi-v { font-family: var(--mono); font-variant-numeric: tabular-nums; font-weight: 500; }
.wi-arrival {
  margin: 12px 0 16px;
  font-size: 13px;
  color: var(--fg-2);
}
.wi-arrival strong { color: var(--fg); font-family: var(--display); font-weight: 700; }
.wi-note {
  margin-top: 12px;
  padding-top: 12px;
  border-top: 1px solid var(--border);
  font-size: 12px;
  color: var(--fg-2);
  line-height: 1.55;
  font-style: italic;
}

.duration-note {
  margin: 24px 0 40px;
  padding: 20px 24px;
  background: var(--fg);
  color: var(--bg);
}
.duration-note .dn-title {
  font-family: var(--display);
  font-size: 16px;
  font-weight: 700;
  letter-spacing: -0.01em;
  text-transform: uppercase;
  margin-bottom: 8px;
}
.duration-note .dn-body {
  font-size: 13px;
  line-height: 1.55;
  color: rgba(255, 255, 255, 0.75);
}

.section-heading {
  font-family: var(--mono);
  font-size: 11px;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--fg-2);
  margin: 0 0 24px;
  font-weight: 500;
}

.reasons { display: flex; flex-direction: column; }
.reason {
  display: flex;
  gap: 20px;
  align-items: flex-start;
  padding: 20px 0;
  border-bottom: 1px solid var(--border);
}
.reason:first-child { padding-top: 0; }
.reason:last-child { border-bottom: none; }
.reason svg { flex-shrink: 0; margin-top: 4px; }
.reason .r-title {
  font-size: 15px;
  color: var(--fg);
  margin-bottom: 4px;
  font-weight: 500;
}
.reason .r-title .penalty {
  color: var(--fg-2);
  font-family: var(--mono);
  font-size: 12px;
  margin-left: 8px;
  font-variant-numeric: tabular-nums;
  font-weight: 400;
}
.reason .r-detail {
  font-size: 13px;
  color: var(--fg-2);
  line-height: 1.55;
}

/* EXPORTS */

.exports-block { margin-top: 48px; }
.export-list {
  display: flex;
  flex-direction: column;
  border-top: 1px solid var(--border);
}
.export {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 18px 0;
  border-bottom: 1px solid var(--border);
  color: var(--fg);
  transition: padding-left 0.15s ease;
}
.export:hover { padding-left: 8px; opacity: 1; }
.export .e-name {
  font-size: 15px;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.02em;
}
.export .e-hint {
  font-family: var(--mono);
  font-size: 11px;
  color: var(--fg-2);
  margin-top: 3px;
  letter-spacing: 0.06em;
  text-transform: uppercase;
}
.export .arrow {
  font-family: var(--display);
  font-weight: 700;
  font-size: 20px;
}

/* DRIVER TOGGLE (landing options) */

.opt-toggle {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 8px 14px;
  border: 1px solid var(--border);
  cursor: pointer;
  font-family: var(--ui);
  font-size: 13px;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  color: var(--fg-2);
  background: var(--bg);
  transition: all 0.1s ease;
}
.opt-toggle input { width: 16px; height: 16px; margin: 0; accent-color: var(--fg); }
.opt-toggle:hover { color: var(--fg); border-color: var(--border-hi); }
.opt-toggle:has(input:checked) {
  background: var(--fg);
  color: var(--bg);
  border-color: var(--fg);
}

/* DRIVER BREAKS BLOCK (results) */

.breaks-block {
  margin-top: 40px;
  padding-top: 28px;
  border-top: 1px solid var(--border);
}
.brk-metrics {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 0;
  border-top: 1px solid var(--border);
  border-bottom: 1px solid var(--border);
  margin: 16px 0 16px;
}
.brk-metric { padding: 16px 12px; border-right: 1px solid var(--border); }
.brk-metric:last-child { border-right: none; }
.brk-metric.brk-total { background: var(--bg-2); }
.brk-k {
  font-family: var(--mono);
  font-size: 10px;
  color: var(--fg-2);
  text-transform: uppercase;
  letter-spacing: 0.1em;
  margin-bottom: 8px;
}
.brk-v {
  font-family: var(--display);
  font-size: 20px;
  font-weight: 700;
  letter-spacing: -0.02em;
}
.brk-arrival {
  font-size: 14px;
  color: var(--fg);
  margin: 0 0 20px;
  line-height: 1.55;
}
.brk-arrival strong { font-family: var(--display); font-weight: 700; }

.brk-timeline {
  display: flex;
  flex-direction: column;
  margin-bottom: 16px;
}
.brk-stop {
  display: grid;
  grid-template-columns: 80px 1fr;
  gap: 16px;
  padding: 12px 0;
  border-bottom: 1px solid var(--border);
  align-items: baseline;
}
.brk-stop:last-child { border-bottom: none; }
.brk-stop-time {
  font-family: var(--mono);
  font-size: 13px;
  color: var(--fg);
  font-weight: 500;
  letter-spacing: 0.04em;
}
.brk-stop-body {
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  gap: 12px;
}
.brk-stop-label { font-size: 14px; font-weight: 500; }
.brk-stop-dur {
  font-family: var(--mono);
  font-size: 12px;
  color: var(--fg-2);
  letter-spacing: 0.04em;
}
.brk-legal {
  font-family: var(--mono);
  font-size: 11px;
  color: var(--fg-3);
  line-height: 1.55;
}

/* FUEL BLOCK (proactive) */

.fuel-block, .hotel-stopover-block {
  margin-top: 40px;
  padding-top: 28px;
  border-top: 1px solid var(--border);
}
.fuel-list, .stopover-list {
  display: flex;
  flex-direction: column;
  margin-top: 8px;
}
.fuel-row, .stopover-row {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  gap: 20px;
  padding: 16px 0;
  border-bottom: 1px solid var(--border);
}
.fuel-row:last-child, .stopover-row:last-child { border-bottom: none; }
.fuel-main, .stopover-main { flex: 1; min-width: 0; }
.fuel-name, .stopover-name {
  font-family: var(--display);
  font-size: 15px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: -0.01em;
  margin-bottom: 2px;
}
.fuel-addr, .stopover-addr {
  font-family: var(--mono);
  font-size: 11px;
  color: var(--fg-2);
  letter-spacing: 0.04em;
}
.stopover-meta {
  font-family: var(--mono);
  font-size: 11px;
  color: var(--fg);
  margin-top: 4px;
  letter-spacing: 0.04em;
}
.price-dots { font-weight: 600; }
.price-dim { color: var(--fg-3); font-weight: 400; }
.fuel-price {
  text-align: right;
  min-width: 100px;
}
.fp-value {
  font-family: var(--display);
  font-size: 22px;
  font-weight: 700;
  letter-spacing: -0.02em;
  line-height: 1;
}
.fp-unit {
  font-family: var(--mono);
  font-size: 11px;
  color: var(--fg-2);
  margin-left: 3px;
  letter-spacing: 0.04em;
}
.fp-fuel {
  font-family: var(--mono);
  font-size: 10px;
  color: var(--fg-3);
  letter-spacing: 0.1em;
  text-transform: uppercase;
  margin-top: 4px;
}

/* ALTERNATIVES */

.alt-block {
  margin-top: 40px;
  padding-top: 28px;
  border-top: 1px solid var(--border);
}
.alt-list { display: flex; flex-direction: column; margin-top: 8px; }
.alt-row {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 16px;
  padding: 14px 0;
  border-bottom: 1px solid var(--border);
}
.alt-row:last-child { border-bottom: none; }
.alt-main { flex: 1; }
.alt-label {
  font-family: var(--display);
  font-size: 15px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: -0.01em;
  margin-bottom: 2px;
}
.alt-tradeoff {
  font-family: var(--mono);
  font-size: 12px;
  color: var(--fg-2);
  letter-spacing: 0.04em;
}
.alt-hint {
  font-size: 12px;
  color: var(--fg-3);
  margin-top: 12px;
  line-height: 1.55;
}

/* CHAT (conversationnel) */

.chat-head {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 12px;
  margin-bottom: 12px;
}
.chat-clear {
  background: transparent;
  border: none;
  color: var(--fg-3);
  font-family: var(--mono);
  font-size: 11px;
  cursor: pointer;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  padding: 0;
}
.chat-clear:hover { color: var(--fg); }

.chat-log {
  display: flex;
  flex-direction: column;
  gap: 14px;
  margin: 20px 0 16px;
  max-height: 600px;
  overflow-y: auto;
}
.chat-log:empty { display: none; }

.chat-bubble {
  padding: 14px 16px;
  border: 1px solid var(--border);
  background: var(--bg);
}
.chat-user { background: var(--fg); color: var(--bg); border-color: var(--fg); }
.chat-user .cb-role { color: rgba(255,255,255,0.55); }
.chat-user .cb-text { color: var(--bg); }
.chat-assistant { background: var(--bg-2); }
.chat-system {
  background: transparent;
  border: 1px dashed var(--border-hi);
  color: var(--fg-2);
  padding: 10px 14px;
}
.chat-system .cb-text {
  font-family: var(--mono);
  font-size: 11px;
  color: var(--fg-2);
  letter-spacing: 0.04em;
  text-transform: uppercase;
}

.cb-role {
  font-family: var(--mono);
  font-size: 10px;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--fg-3);
  margin-bottom: 6px;
}
.cb-text {
  font-size: 14px;
  line-height: 1.55;
  color: var(--fg);
}
.cb-thinking { color: var(--fg-3); font-style: italic; }
.cb-err { color: #a04040; }

.chat-mutation {
  margin-top: 12px;
  padding: 14px 16px;
  border: 1px solid var(--fg);
  background: var(--bg);
}
.cm-title {
  font-family: var(--mono);
  font-size: 11px;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--fg-2);
  margin-bottom: 8px;
}
.cm-reason {
  font-size: 14px;
  color: var(--fg);
  line-height: 1.5;
  margin-bottom: 12px;
}
.cm-rows {
  display: flex;
  flex-direction: column;
  gap: 4px;
  margin-bottom: 14px;
}
.cm-row {
  display: flex;
  justify-content: space-between;
  padding: 6px 0;
  border-bottom: 1px solid var(--border);
  font-size: 13px;
}
.cm-row:last-child { border-bottom: none; }
.cm-k {
  font-family: var(--mono);
  font-size: 11px;
  color: var(--fg-3);
  text-transform: uppercase;
  letter-spacing: 0.06em;
}
.cm-v {
  font-family: var(--mono);
  font-weight: 500;
  color: var(--fg);
}
.cm-actions {
  display: flex;
  gap: 8px;
}
.cm-actions .btn-primary { padding: 10px 18px; font-size: 12px; flex: 1; }
.cm-actions .btn-line-small { padding: 10px 16px; font-size: 11px; }

/* ASSISTANT */

.assistant-block {
  margin-top: 48px;
  padding-top: 32px;
  border-top: 1px solid var(--border);
}
.assistant-hint {
  font-size: 12px;
  color: var(--fg-2);
  margin: 0 0 16px;
  line-height: 1.5;
}
.assistant-form {
  display: flex;
  gap: 8px;
}
.assistant-form input {
  flex: 1;
  border: 1px solid var(--border);
  padding: 12px 14px;
  font-family: var(--ui);
  font-size: 14px;
  color: var(--fg);
  background: var(--bg);
  outline: none;
  border-radius: 0;
  transition: border-color 0.1s ease;
}
.assistant-form input:focus { border-color: var(--fg); }
.assistant-form .btn-primary { padding: 12px 20px; font-size: 12px; }

.assistant-reply {
  margin: 20px 0 8px;
  font-size: 14px;
  color: var(--fg);
  line-height: 1.55;
  min-height: 0;
}
.assistant-reply:empty { display: none; }

.assistant-suggestions { display: flex; flex-direction: column; gap: 12px; margin-top: 16px; }
.assistant-suggestions:empty { display: none; }
.suggestion {
  border: 1px solid var(--border);
  padding: 20px;
}
.suggestion-accepted { opacity: 0.55; background: var(--bg-2); }
.suggestion-accepted .s-name { text-decoration: line-through; }
.s-head {
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  gap: 12px;
  margin-bottom: 4px;
}
.s-name {
  font-family: var(--display);
  font-size: 17px;
  font-weight: 700;
  letter-spacing: -0.01em;
  text-transform: uppercase;
}
.s-meta {
  font-family: var(--mono);
  font-size: 12px;
  color: var(--fg-2);
  letter-spacing: 0.02em;
  white-space: nowrap;
}
.s-addr {
  font-family: var(--mono);
  font-size: 11px;
  color: var(--fg-3);
  margin-bottom: 12px;
  letter-spacing: 0.02em;
}
.s-stop {
  display: inline-block;
  padding: 1px 6px;
  border: 1px solid var(--fg-2);
  color: var(--fg);
  font-weight: 600;
}
.s-price-eur {
  display: inline-block;
  padding: 1px 8px;
  background: var(--fg);
  color: var(--bg);
  font-family: var(--display);
  font-weight: 700;
  font-size: 12px;
}
.s-price-eur em { font-weight: 400; font-style: normal; opacity: 0.7; }
.s-off-route {
  display: inline-block;
  color: var(--fg-2);
  font-family: var(--mono);
  font-size: 11px;
  letter-spacing: 0.02em;
}
.slot-contournement {
  display: flex;
  gap: 12px;
  align-items: center;
  padding: 12px 16px;
  margin: 12px 0 20px;
  border: 1px solid #c9532b;
  background: rgba(201, 83, 43, 0.08);
  animation: scFade 0.2s ease-out;
}
@keyframes scFade { from { opacity: 0; transform: translateY(-4px); } to { opacity: 1; transform: none; } }
.slot-contournement .sc-text {
  flex: 1;
  font-size: 13px;
  color: var(--fg);
  line-height: 1.4;
}
.slot-contournement .sc-text strong { color: #a01f1f; }
.slot-contournement .sc-dismiss {
  background: transparent;
  border: 1px solid var(--border);
  color: var(--fg-2);
  width: 26px; height: 26px;
  font-size: 16px; line-height: 1;
  padding: 0; cursor: pointer;
}
.slot-contournement .sc-dismiss:hover { color: var(--fg); border-color: var(--fg); }
.fuel-summary {
  border: 1px solid var(--border);
  padding: 14px 16px;
  margin: 14px 0 20px;
  background: var(--bg-2, transparent);
}
.fuel-summary .fs-row {
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  gap: 12px;
}
.fuel-summary .fs-label {
  font-size: 12px;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--fg-2);
}
.fuel-summary .fs-value {
  font-family: var(--display);
  font-size: 22px;
  font-weight: 700;
  color: var(--fg);
}
.fuel-summary .fs-sub {
  margin-top: 6px;
  font-family: var(--mono);
  font-size: 12px;
  color: var(--fg-3);
}
.fuel-summary .fs-cta {
  margin-top: 12px;
  padding-top: 12px;
  border-top: 1px solid var(--border);
  font-size: 12px;
  color: var(--fg-2);
  line-height: 1.5;
}
.s-affluence {
  display: grid;
  grid-template-columns: auto 1fr;
  column-gap: 8px;
  align-items: center;
  padding: 8px 10px;
  margin: 8px 0 10px;
  border: 1px solid var(--border);
  background: var(--bg-2, transparent);
  font-size: 12px;
  line-height: 1.35;
}
.s-affluence .s-aff-dot {
  width: 10px;
  height: 10px;
  border-radius: 50%;
  background: currentColor;
  grid-row: 1 / span 2;
}
.s-affluence .s-aff-label {
  font-weight: 600;
  color: var(--fg);
  text-transform: uppercase;
  letter-spacing: 0.04em;
  font-size: 11px;
}
.s-affluence .s-aff-note {
  color: var(--fg-2);
  font-family: var(--mono);
  font-size: 11px;
  letter-spacing: 0.01em;
}
.s-aff-low       { color: #4a8d4a; }
.s-aff-medium    { color: #b58824; }
.s-aff-high      { color: #c9532b; }
.s-aff-very_high { color: #a01f1f; }
.s-reason {
  font-size: 14px;
  color: var(--fg-2);
  line-height: 1.55;
  margin-bottom: 16px;
}
.s-actions {
  display: flex;
  gap: 16px;
  align-items: center;
}
.s-actions .btn-primary { padding: 10px 20px; font-size: 12px; letter-spacing: 0.06em; }
.s-google {
  font-family: var(--mono);
  font-size: 11px;
  color: var(--fg-2);
  letter-spacing: 0.06em;
  text-transform: uppercase;
}
.s-google:hover { color: var(--fg); opacity: 1; }

.waypoint-chip {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 4px 4px 4px 10px;
  border: 1px solid var(--fg);
  background: var(--fg);
  color: var(--bg);
  font-family: var(--display);
  font-size: 13px;
  font-weight: 700;
  letter-spacing: -0.01em;
  text-transform: uppercase;
}
.wp-remove {
  background: transparent;
  color: var(--bg);
  border: none;
  cursor: pointer;
  font-size: 16px;
  line-height: 1;
  padding: 0 6px;
  opacity: 0.6;
  transition: opacity 0.1s;
}
.wp-remove:hover { opacity: 1; }
.wi-stop-select {
  border: 1px solid var(--border);
  padding: 3px 8px;
  font-family: var(--mono);
  font-size: 11px;
  background: var(--bg);
  color: var(--fg);
  border-radius: 0;
  cursor: pointer;
}

/* TRIP MAP BAND (top of results) */

.trip-map-band {
  padding: 24px 40px 0;
  max-width: 1600px;
  margin: 0 auto;
}
@media (max-width: 800px) { .trip-map-band { padding: 16px 20px 0; } }

#results-map {
  width: 100%;
  /* Keep a readable shape on ultra-wide screens instead of a letterbox strip */
  height: clamp(400px, 52vh, 660px);
  border: none;
  background: var(--bg-warm);
}
@media (max-width: 700px) { #results-map { height: 320px; } }

/* MapLibre chrome — stripped to match the monochrome, zero-radius palette */
#results-map .maplibregl-canvas { outline: none; }

#results-map .maplibregl-ctrl-group {
  background: var(--surface-glass);
  backdrop-filter: saturate(180%) blur(16px);
  -webkit-backdrop-filter: saturate(180%) blur(16px);
  border: 1px solid var(--border-soft);
  border-radius: var(--r-md) !important;
  box-shadow: var(--lift-float) !important;
  overflow: hidden;
  margin: 16px !important;
}
#results-map .maplibregl-ctrl-group button {
  width: 34px;
  height: 34px;
  border-radius: 0 !important;
  background: transparent;
  border: none;
  transition: background var(--t-fast) var(--ease);
}
#results-map .maplibregl-ctrl-group button + button { border-top: 1px solid var(--border-soft); }
#results-map .maplibregl-ctrl-group button:hover { background: rgba(20,23,26,0.06); }
#results-map .maplibregl-ctrl-group button .maplibregl-ctrl-icon {
  filter: none;
  opacity: 0.85;
}

#results-map .maplibregl-ctrl-attrib {
  font-family: var(--mono);
  font-size: 9px;
  letter-spacing: 0.02em;
  background: rgba(255, 255, 255, 0.82) !important;
  border-radius: 0 !important;
  padding: 2px 7px;
}
#results-map .maplibregl-ctrl-attrib a { color: var(--fg-2); }
#results-map .maplibregl-ctrl-bottom-right { margin: 0; }

#results-map .maplibregl-popup-content {
  border-radius: var(--r-md);
  border: 1px solid var(--border);
  box-shadow: 0 6px 28px rgba(0, 0, 0, 0.14);
  padding: 12px 16px;
  font-family: var(--ui);
  min-width: 170px;
}
#results-map .maplibregl-popup-close-button {
  color: var(--fg-2);
  font-size: 18px;
  padding: 2px 7px 4px;
  border-radius: 0;
}
#results-map .maplibregl-popup-close-button:hover {
  background: transparent;
  color: var(--fg);
}
#results-map .maplibregl-popup-tip { display: none; }

/* BREAKDOWN PANEL (cell click) */

.breakdown-panel {
  position: fixed;
  inset: 0;
  z-index: 200;
  display: flex;
  align-items: stretch;
  justify-content: flex-end;
}
.breakdown-panel[hidden] { display: none !important; }
.bp-scrim {
  position: absolute;
  inset: 0;
  background: rgba(10, 10, 10, 0.4);
  z-index: 0;
}
.bp-inner {
  position: relative;
  z-index: 1;
  width: 460px;
  max-width: 100%;
  background: var(--bg);
  border-left: 1px solid var(--fg);
  padding: 36px 36px 40px;
  overflow-y: auto;
  animation: bp-slide 0.15s ease-out;
}
@keyframes bp-slide { from { transform: translateX(20px); opacity: 0; } to { transform: none; opacity: 1; } }
@media (max-width: 600px) { .bp-inner { width: 100%; padding: 28px 24px; } }

.bp-close {
  position: absolute;
  top: 16px;
  right: 20px;
  border: none;
  background: transparent;
  font-size: 28px;
  color: var(--fg);
  cursor: pointer;
  line-height: 1;
  padding: 0;
  width: 32px;
  height: 32px;
}
.bp-close:hover { color: var(--fg-2); }

.bp-eyebrow {
  font-family: var(--mono);
  font-size: 11px;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--fg-2);
  margin-bottom: 12px;
}
.bp-title {
  font-family: var(--display);
  font-size: 56px;
  font-weight: 700;
  letter-spacing: -0.04em;
  line-height: 0.95;
}
.bp-subtitle {
  font-family: var(--mono);
  font-size: 13px;
  color: var(--fg-2);
  margin: 8px 0 28px;
  letter-spacing: 0.04em;
  text-transform: uppercase;
}

.bp-body { display: flex; flex-direction: column; }
.bi-row {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  gap: 16px;
  padding: 14px 0;
  border-bottom: 1px solid var(--border);
}
.bi-baseline { border-top: 1px solid var(--border); padding-top: 14px; }
.bi-main { flex: 1; }
.bi-label {
  font-size: 14px;
  font-weight: 600;
  color: var(--fg);
}
.bi-note {
  font-size: 12px;
  color: var(--fg-2);
  margin-top: 4px;
  line-height: 1.5;
}
.bi-time {
  font-family: var(--mono);
  font-size: 15px;
  font-weight: 500;
  color: var(--fg);
  white-space: nowrap;
  letter-spacing: -0.02em;
}
.bi-weather .bi-time,
.bi-event .bi-time,
.bi-report .bi-time { color: var(--fg-2); }

.bi-total {
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  gap: 16px;
  padding: 18px 0 4px;
  margin-top: 8px;
  border-top: 2px solid var(--fg);
}
.bi-total .bi-label {
  font-family: var(--display);
  font-size: 16px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: -0.01em;
}
.bi-total .bi-time {
  font-family: var(--display);
  font-size: 24px;
  font-weight: 700;
  letter-spacing: -0.03em;
}

.bp-actions {
  margin-top: 32px;
}
.bp-actions .btn-primary {
  width: 100%;
  padding: 16px 24px;
  font-size: 13px;
}
.bp-is-best {
  padding: 14px 16px;
  border: 1px solid var(--border);
  font-family: var(--mono);
  font-size: 12px;
  color: var(--fg-2);
  text-transform: uppercase;
  letter-spacing: 0.08em;
  text-align: center;
}

.bp-conf {
  margin-top: 20px;
  font-size: 12px;
  color: var(--fg-3);
  line-height: 1.55;
}

/* User-override notice on the best panel */
.user-override-note {
  padding: 10px 12px;
  background: var(--bg-2);
  border-left: 2px solid var(--fg);
  font-family: var(--mono);
  font-size: 11px;
  color: var(--fg-2);
  text-transform: uppercase;
  letter-spacing: 0.06em;
  margin-bottom: 14px;
}

/* ERRORS */

.errors {
  margin-top: 24px;
  padding: 16px;
  border: 1px solid var(--border);
  font-family: var(--mono);
  font-size: 11px;
  color: var(--fg-2);
}
.errors summary { cursor: pointer; color: var(--fg); font-weight: 500; }
.errors pre { margin: 12px 0 0; white-space: pre-wrap; font-family: var(--mono); font-size: 10px; color: var(--fg-2); }

/* FOOTER */

.site-footer {
  border-top: 1px solid var(--border);
  margin-top: 40px;
  padding: 32px 40px 40px;
}
.ft-inner {
  max-width: 1440px;
  margin: 0 auto;
  display: grid;
  grid-template-columns: auto 1fr auto;
  gap: 40px;
  align-items: center;
}
@media (max-width: 700px) { .ft-inner { grid-template-columns: 1fr; gap: 12px; text-align: left; } }
.ft-brand {
  font-family: var(--display);
  font-weight: 700;
  font-size: 20px;
  letter-spacing: -0.02em;
  text-transform: uppercase;
}
.ft-tag {
  font-size: 13px;
  color: var(--fg-2);
}
.ft-status {
  font-family: var(--mono);
  font-size: 11px;
  color: var(--fg-3);
  letter-spacing: 0.06em;
  text-transform: uppercase;
}

/* COOKIE NOTICE */

.cookie-notice {
  position: fixed;
  bottom: 20px;
  left: 20px;
  right: 20px;
  max-width: 560px;
  margin: 0 auto;
  border: 1px solid var(--fg);
  background: var(--bg);
  padding: 16px 20px;
  display: flex;
  gap: 16px;
  align-items: center;
  z-index: 100;
  box-shadow: 0 4px 20px rgba(0,0,0,0.1);
}
.cookie-notice[hidden] { display: none !important; }
.cookie-notice .cn-body {
  flex: 1;
  font-size: 12px;
  line-height: 1.5;
  color: var(--fg-2);
}
.cookie-notice .cn-ok {
  background: var(--fg);
  color: var(--bg);
  border: none;
  padding: 10px 18px;
  font-family: var(--ui);
  font-size: 11px;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  cursor: pointer;
  white-space: nowrap;
}

/* ERROR PAGE */

.error-hero {
  padding: 120px 40px 80px;
  max-width: 900px;
  margin: 0 auto;
  text-align: center;
}
.error-hero h1 {
  font-family: var(--display);
  font-size: clamp(48px, 8vw, 96px);
  line-height: 0.95;
  margin: 20px 0 24px;
  font-weight: 700;
  letter-spacing: -0.04em;
  text-transform: uppercase;
}
.error-body {
  font-size: 16px;
  color: var(--fg-2);
  margin: 0 0 32px;
  line-height: 1.55;
}
.error-detail {
  text-align: left;
  padding: 16px;
  background: var(--bg-2);
  border: 1px solid var(--border);
  font-family: var(--mono);
  font-size: 12px;
  color: var(--fg-2);
  overflow-x: auto;
  margin: 0 0 32px;
  white-space: pre-wrap;
}

/* LOADER */

.loader {
  display: none;
  padding: 160px 0;
  text-align: center;
  font-family: var(--mono);
  font-size: 12px;
  color: var(--fg-2);
  text-transform: uppercase;
  letter-spacing: 0.14em;
}
.loader.on { display: block; }


/* ==================================================================== */
/* LANDING v2 — agent first, map as continuation, planner as a route    */
/* ==================================================================== */

/* Progressive reveal ------------------------------------------------- */
.reveal {
  opacity: 0;
  transform: translateY(14px);
  transition: opacity var(--t-slow) var(--ease-out),
              transform var(--t-slow) var(--ease-out);
  will-change: opacity, transform;
}
.reveal.in { opacity: 1; transform: none; }

/* STAGE — the map is the surface, the interface floats on it --------- */
.stage {
  position: relative;
  min-height: min(78vh, 780px);
  display: flex;
  flex-direction: column;
  justify-content: center;
  overflow: hidden;
  isolation: isolate;
}
.stage-canvas {
  position: absolute;
  inset: 0;
  z-index: 0;
  background: var(--bg-warm);
  animation: canvasIn 900ms var(--ease-out) both;
}
@keyframes canvasIn { from { opacity: 0; transform: scale(1.04); } to { opacity: 1; transform: none; } }

/* Keeps type legible over the map without washing the map out. */
.stage-veil {
  position: absolute;
  inset: 0;
  z-index: 1;
  pointer-events: none;
  background:
    radial-gradient(115% 78% at 50% 34%, rgba(246,245,242,0.94) 0%, rgba(246,245,242,0.72) 42%, rgba(246,245,242,0) 78%);
}
/* Hands the map back to the page below it. */
.stage-fade {
  position: absolute;
  left: 0; right: 0; bottom: 0;
  height: 140px;
  z-index: 1;
  pointer-events: none;
  background: linear-gradient(rgba(246,245,242,0) 0%, var(--bg) 88%);
}

.stage-overlay {
  position: relative;
  z-index: 2;
  max-width: 660px;
  margin: 0 auto;
  padding: var(--s7) var(--s5) var(--s8);
  text-align: center;
}
.stage-head { margin-bottom: var(--s6); }

.stage-ask {
  font-family: var(--display);
  font-size: clamp(36px, 5.6vw, 66px);
  line-height: 1.0;
  letter-spacing: -0.042em;
  font-weight: 700;
  margin: 0 0 var(--s3);
  color: var(--text);
  animation: riseIn 620ms var(--ease-out) both;
}
.stage-sub {
  font-size: 16px;
  line-height: 1.5;
  color: var(--text-muted);
  max-width: 440px;
  margin: 0 auto;
  animation: riseIn 620ms 80ms var(--ease-out) both;
}
@keyframes riseIn { from { opacity: 0; transform: translateY(12px); } to { opacity: 1; transform: none; } }

.stage-map-idle {
  position: absolute;
  left: 0; right: 0; bottom: var(--s5);
  z-index: 2;
  text-align: center;
  font-family: var(--mono);
  font-size: 10.5px;
  letter-spacing: 0.06em;
  color: var(--text-subtle);
  pointer-events: none;
  transition: opacity var(--t-slow) var(--ease);
}
.stage-map-idle.gone { opacity: 0; }

.lm-pin { will-change: transform; animation: pinDrop 380ms var(--ease-out); }
@keyframes pinDrop {
  from { opacity: 0; transform: translateY(-12px) scale(0.7); }
  to   { opacity: 1; transform: none; }
}

@media (max-width: 720px) {
  .stage { min-height: 88vh; }
  .stage-overlay { padding: var(--s6) var(--s4) var(--s7); }
}

/* AGENT — a single floating instrument -------------------------------- */
.agent { max-width: 560px; margin: 0 auto; animation: riseIn 620ms 160ms var(--ease-out) both; }

.agent-field {
  display: flex;
  align-items: center;
  gap: var(--s3);
  padding: 5px 5px 5px var(--s4);
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--r-lg);
  box-shadow: var(--lift-float);
  transition: border-color var(--t-mid) var(--ease),
              box-shadow var(--t-mid) var(--ease),
              transform var(--t-mid) var(--ease);
}
.agent-field:hover { transform: translateY(-1px); box-shadow: var(--lift-3); }
.agent-field:focus-within {
  border-color: var(--p-200);
  box-shadow: var(--lift-3), 0 0 0 4px var(--primary-ring);
  transform: translateY(-1px);
}

.agent-spark {
  flex: none;
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: var(--text-ghost);
  transition: background var(--t-mid) var(--ease), box-shadow var(--t-mid) var(--ease);
}
.agent-field:focus-within .agent-spark {
  background: var(--primary);
  box-shadow: 0 0 0 4px var(--primary-ring);
}
.agent-field.thinking .agent-spark {
  background: var(--primary);
  animation: sparkPulse 1.1s var(--ease) infinite;
}
@keyframes sparkPulse {
  0%, 100% { box-shadow: 0 0 0 0 var(--primary-ring); }
  50%      { box-shadow: 0 0 0 7px rgba(26,114,196,0); }
}

.agent-field input {
  flex: 1;
  min-width: 0;
  border: none;
  outline: none;
  background: transparent;
  font-family: var(--ui);
  font-size: 16px;
  font-weight: 500;
  color: var(--text);
  padding: 13px 0;
  letter-spacing: -0.008em;
}
.agent-field input::placeholder { color: var(--text-ghost); font-weight: 400; }

.agent-field button {
  flex: none;
  width: 40px;
  height: 40px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border: none;
  border-radius: var(--r-md);
  background: var(--primary);
  color: #fff;
  cursor: pointer;
  transition: background var(--t-fast) var(--ease), transform var(--t-fast) var(--ease);
}
.agent-field button:hover { background: var(--primary-hover); transform: translateX(1px); }
.agent-field button:disabled { opacity: 0.35; cursor: wait; transform: none; }

.agent-suggest {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: var(--s2);
  margin-top: var(--s4);
}
.agent-suggest .sg {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  background: var(--surface-glass);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  border: 1px solid var(--border-soft);
  border-radius: var(--r-pill);
  padding: 7px 14px 7px 11px;
  font-family: var(--ui);
  font-size: 12.5px;
  font-weight: 500;
  color: var(--text-muted);
  cursor: pointer;
  transition: color var(--t-fast) var(--ease),
              border-color var(--t-fast) var(--ease),
              background var(--t-fast) var(--ease),
              transform var(--t-fast) var(--ease),
              box-shadow var(--t-fast) var(--ease);
}
.sg-dot {
  width: 5px; height: 5px; border-radius: 50%;
  background: var(--p-400);
  transition: background var(--t-fast) var(--ease);
}
.agent-suggest .sg:hover {
  color: var(--text);
  border-color: var(--border-strong);
  background: var(--surface);
  transform: translateY(-1px);
  box-shadow: var(--lift-1);
}
.agent-suggest .sg:hover .sg-dot { background: var(--primary); }

/* PLANNER ------------------------------------------------------------- */
.planner {
  max-width: 620px;
  margin: calc(var(--s8) * -1) auto var(--s9);
  position: relative;
  z-index: 3;
  padding: var(--s7) var(--s7) var(--s6);
  background: var(--surface);
  border: 1px solid var(--border-soft);
  border-radius: var(--r-xl);
  box-shadow: var(--lift-2);
}
@media (max-width: 620px) {
  .planner { margin: calc(var(--s7) * -1) var(--s4) var(--s8); padding: var(--s6) var(--s5); }
}
.planner-label {
  font-family: var(--mono);
  font-size: 11px;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--fg-3);
  margin-bottom: var(--s5);
}

.route-builder { position: relative; }
/* The spine connecting A to B */
.rb-line {
  position: absolute;
  left: 5px;
  top: 26px;
  bottom: 96px;
  width: 2px;
  border-radius: 2px;
  background: linear-gradient(var(--text) 0%, var(--text) 55%, var(--primary) 100%);
  opacity: 0.32;
}

.rb-node {
  position: relative;
  display: flex;
  align-items: center;
  gap: var(--s4);
  padding: var(--s3) 0;
}
.rb-dot {
  flex: none;
  width: 11px;
  height: 11px;
  border-radius: 50%;
  background: var(--surface);
  border: 2px solid var(--p-900);
  z-index: 1;
  transition: box-shadow var(--t-mid) var(--ease), border-color var(--t-mid) var(--ease);
}
.rb-dot-b { border-color: var(--primary); }
/* The node being edited lights up — hierarchy follows attention. */
.rb-node:focus-within .rb-dot {
  border-color: var(--primary-active);
  box-shadow: 0 0 0 5px var(--primary-ring);
}
.rb-node:focus-within .rb-body label { color: var(--text-muted); }

.rb-body { flex: 1; min-width: 0; }
.rb-body label {
  display: block;
  font-family: var(--mono);
  font-size: 10px;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--fg-3);
  margin-bottom: 2px;
}
.rb-body input {
  width: 100%;
  border: none;
  border-bottom: 1px solid var(--border);
  outline: none;
  background: transparent;
  font-family: var(--display);
  font-size: 21px;
  font-weight: 600;
  letter-spacing: -0.02em;
  color: var(--fg);
  padding: 3px 0 7px;
  transition: border-color var(--t-mid) var(--ease);
}
.rb-body input::placeholder { color: var(--text-ghost); font-weight: 400; letter-spacing: -0.01em; }
.rb-body input:focus { border-bottom-color: var(--primary); }

.rb-when {
  display: flex;
  align-items: flex-end;
  gap: var(--s5);
  margin-top: var(--s5);
  padding-left: 27px;
}
.rb-when-field { flex: 1; min-width: 0; }
.rb-when-field label {
  display: block;
  font-family: var(--mono);
  font-size: 10px;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--fg-3);
  margin-bottom: 4px;
}
.rb-when-field input {
  width: 100%;
  border: none;
  border-bottom: 1px solid var(--border);
  outline: none;
  background: transparent;
  font-family: var(--mono);
  font-size: 15px;
  color: var(--fg);
  padding: 3px 0 7px;
  transition: border-color var(--t-mid) var(--ease);
}
.rb-when-field input:focus { border-bottom-color: var(--primary); }
.rb-when-field:focus-within label { color: var(--text-muted); }
.rb-when-field.disabled label,
.rb-when-field.disabled input { color: var(--fg-3); }

.rb-go {
  flex: none;
  display: inline-flex;
  align-items: center;
  gap: var(--s2);
  height: 46px;
  background: var(--primary);
  color: #fff;
  border: none;
  border-radius: var(--r-md);
  padding: 0 22px;
  font-family: var(--ui);
  font-size: 13px;
  font-weight: 550;
  letter-spacing: 0.01em;
  cursor: pointer;
  transition: transform var(--t-fast) var(--ease), opacity var(--t-fast) var(--ease);
}
.rb-go:hover { background: var(--primary-hover); box-shadow: var(--lift-2); }
.rb-go:active { transform: scale(0.985); }

@media (max-width: 620px) {
  .rb-when { flex-wrap: wrap; padding-left: 0; }
  .rb-when-field { flex-basis: 40%; }
  .rb-go { width: 100%; justify-content: center; margin-top: var(--s3); }
  .rb-line { display: none; }
}

/* Option pills, quieter ---------------------------------------------- */
.search-opts {
  display: flex;
  flex-wrap: wrap;
  gap: var(--s4) var(--s6);
  margin-top: var(--s6);
  padding-top: var(--s5);
  border-top: 1px solid var(--border-soft);
  justify-content: flex-start;
}
.opt-label {
  font-family: var(--mono);
  font-size: 9.5px;
  letter-spacing: 0.13em;
  text-transform: uppercase;
  color: var(--fg-3);
}
.opt-pills { gap: 2px; padding: 3px; background: var(--surface-sunk); border-radius: var(--r-sm); }
.opt-pill {
  border: none !important;
  border-radius: 6px;
  padding: 6px 11px;
  font-size: 12.5px;
  color: var(--fg-2);
  background: transparent;
  transition: color var(--t-fast) var(--ease), background var(--t-fast) var(--ease);
}
.opt-pill:hover { color: var(--text); background: rgba(20,23,26,0.045); }
.opt-pill.active {
  background: var(--surface);
  color: var(--text);
  box-shadow: var(--lift-1);
  font-weight: 550;
}

.landing-hint {
  margin-top: var(--s5);
  font-size: 13px;
  line-height: 1.5;
  color: var(--fg-3);
}

/* NL preview, restyled to match --------------------------------------- */
.nl-status { margin-top: var(--s3); font-family: var(--mono); font-size: 11.5px; color: var(--fg-2); }
.nl-status:empty { display: none; }
.nl-preview {
  margin-top: var(--s4);
  padding: var(--s5);
  border: 1px solid var(--border-soft);
  border-radius: var(--r-md);
  background: var(--surface);
  text-align: left;
  box-shadow: var(--lift-1);
  animation: previewIn var(--t-mid) var(--ease-out);
}
@keyframes previewIn { from { opacity: 0; transform: translateY(6px); } to { opacity: 1; transform: none; } }
.nl-preview[hidden] { display: none !important; }
.nl-title {
  font-family: var(--mono);
  font-size: 10px;
  letter-spacing: 0.13em;
  text-transform: uppercase;
  color: var(--fg-3);
  margin-bottom: var(--s2);
  border: none;
  padding: 0;
}
.nl-summary {
  font-family: var(--display);
  font-size: 19px;
  font-weight: 600;
  letter-spacing: -0.02em;
  line-height: 1.3;
  margin-bottom: var(--s3);
}
.nl-tags { display: flex; flex-wrap: wrap; gap: 6px; }
.nl-tag {
  font-family: var(--mono);
  font-size: 11px;
  padding: 4px 9px;
  border-radius: 6px;
  background: var(--bg);
  border: 1px solid var(--border);
  color: var(--fg-2);
}
.nl-actions { display: flex; gap: var(--s2); margin-top: var(--s4); }

/* WHY ----------------------------------------------------------------- */
.why {
  max-width: 1020px;
  margin: 0 auto;
  padding: var(--s8) var(--s5) var(--s9);
}
.why-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: var(--s6);
}
@media (max-width: 900px) { .why-grid { grid-template-columns: repeat(2, 1fr); } }
@media (max-width: 520px) { .why-grid { grid-template-columns: 1fr; } }
.why-n {
  font-family: var(--mono);
  font-size: 10px;
  letter-spacing: 0.14em;
  color: var(--fg-3);
  margin-bottom: var(--s3);
}
.why-t {
  font-family: var(--display);
  font-size: 15px;
  font-weight: 600;
  letter-spacing: -0.015em;
  margin-bottom: 6px;
}
.why-d { font-size: 13.5px; line-height: 1.55; color: var(--fg-2); }

/* CLOSING ------------------------------------------------------------- */
.closing {
  max-width: 1020px;
  margin: 0 auto;
  padding: var(--s8) var(--s5) var(--s10);
  text-align: center;
}
.closing h2 {
  font-family: var(--display);
  font-size: clamp(28px, 4.4vw, 48px);
  line-height: 1.05;
  letter-spacing: -0.035em;
  font-weight: 700;
  margin: 0 0 var(--s6);
}
.closing-cta {
  background: var(--primary);
  color: #fff;
  border: none;
  border-radius: var(--r-md);
  height: 50px;
  padding: 0 32px;
  font-family: var(--ui);
  font-size: 14px;
  font-weight: 550;
  cursor: pointer;
  transition: opacity var(--t-fast) var(--ease), transform var(--t-fast) var(--ease);
}
.closing-cta:hover { background: var(--primary-hover); box-shadow: var(--lift-2); }
.closing-cta:active { transform: scale(0.985); }


/* Focus is a product-wide contract, not a per-component decision. */
:where(a, button, input, select, textarea, [tabindex]):focus-visible {
  outline: 2px solid var(--primary-active);
  outline-offset: 2px;
  border-radius: 4px;
}
::selection { background: var(--primary-subtle); color: var(--p-900); }


/* ==================================================================== */
/* LEGAL PAGES — long-form reading, same paper as the rest              */
/* ==================================================================== */

.legal {
  max-width: 860px;
  margin: 0 auto;
  padding: var(--s8) var(--s5) var(--s10);
}

.legal-nav {
  display: flex;
  flex-wrap: wrap;
  gap: 2px;
  padding: 3px;
  background: var(--surface-sunk);
  border-radius: var(--r-sm);
  margin-bottom: var(--s7);
}
.legal-nav a {
  padding: 8px 14px;
  border-radius: var(--r-xs);
  font-size: 13px;
  font-weight: 500;
  color: var(--text-muted);
  transition: color var(--t-fast) var(--ease), background var(--t-fast) var(--ease);
}
.legal-nav a:hover { color: var(--text); opacity: 1; }
.legal-nav a.on {
  background: var(--surface);
  color: var(--text);
  box-shadow: var(--lift-1);
}

.legal-body {
  background: var(--surface);
  border: 1px solid var(--border-soft);
  border-radius: var(--r-xl);
  padding: var(--s8) var(--s7);
  box-shadow: var(--lift-1);
}
@media (max-width: 620px) {
  .legal { padding: var(--s6) var(--s4) var(--s8); }
  .legal-body { padding: var(--s6) var(--s5); border-radius: var(--r-lg); }
}

.legal-head { margin-bottom: var(--s7); }
.legal-body h1 {
  font-family: var(--display);
  font-size: clamp(28px, 3.8vw, 40px);
  line-height: 1.08;
  letter-spacing: -0.035em;
  font-weight: 700;
  margin: 0 0 var(--s2);
}
.legal-updated {
  font-family: var(--mono);
  font-size: 11px;
  letter-spacing: 0.06em;
  color: var(--text-subtle);
  margin: 0;
}

.legal-lede {
  font-size: 16px;
  line-height: 1.6;
  color: var(--text-muted);
  padding: var(--s4) var(--s5);
  background: var(--surface-2);
  border-left: 2px solid var(--primary);
  border-radius: 0 var(--r-sm) var(--r-sm) 0;
  margin: 0 0 var(--s7);
}
.legal-lede strong { color: var(--text); font-weight: 650; }

.legal-body h2 {
  font-family: var(--display);
  font-size: 18px;
  font-weight: 650;
  letter-spacing: -0.02em;
  margin: var(--s7) 0 var(--s3);
  padding-top: var(--s5);
  border-top: 1px solid var(--border-soft);
}
.legal-body h2:first-of-type { border-top: none; padding-top: 0; margin-top: 0; }

.legal-body p {
  font-size: 14.5px;
  line-height: 1.68;
  color: var(--text-muted);
  margin: 0 0 var(--s3);
}
.legal-body p strong { color: var(--text); font-weight: 600; }
.legal-body a { color: var(--primary); text-decoration: underline; text-underline-offset: 2px; }
.legal-body a:hover { color: var(--primary-hover); opacity: 1; }
.legal-body code {
  font-family: var(--mono);
  font-size: 12.5px;
  padding: 1px 5px;
  background: var(--surface-sunk);
  border-radius: var(--r-xs);
  color: var(--text);
}

.legal-ul {
  margin: 0 0 var(--s4);
  padding-left: var(--s5);
}
.legal-ul li {
  font-size: 14.5px;
  line-height: 1.65;
  color: var(--text-muted);
  margin-bottom: 6px;
}
.legal-ul li::marker { color: var(--text-subtle); }

.legal-dl {
  display: grid;
  grid-template-columns: minmax(140px, 220px) 1fr;
  gap: 10px var(--s5);
  margin: 0 0 var(--s4);
}
@media (max-width: 560px) { .legal-dl { grid-template-columns: 1fr; gap: 2px var(--s3); } }
.legal-dl dt {
  font-family: var(--mono);
  font-size: 10.5px;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--text-subtle);
  padding-top: 3px;
}
.legal-dl dd {
  margin: 0 0 var(--s2);
  font-size: 14.5px;
  color: var(--text);
}

.legal-table {
  width: 100%;
  border-collapse: collapse;
  margin: 0 0 var(--s5);
  font-size: 13.5px;
  display: block;
  overflow-x: auto;
}
.legal-table thead th {
  text-align: left;
  font-family: var(--mono);
  font-size: 10px;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--text-subtle);
  font-weight: 500;
  padding: 0 var(--s4) var(--s2) 0;
  border-bottom: 1px solid var(--border);
  white-space: nowrap;
}
.legal-table td {
  padding: var(--s3) var(--s4) var(--s3) 0;
  border-bottom: 1px solid var(--border-soft);
  color: var(--text-muted);
  line-height: 1.55;
  vertical-align: top;
  min-width: 120px;
}
.legal-table tbody tr:last-child td { border-bottom: none; }

.legal-small { font-size: 11.5px; color: var(--text-subtle); }
.legal-note {
  font-size: 13px;
  color: var(--text-subtle);
  font-style: italic;
  margin: calc(var(--s3) * -1) 0 var(--s5);
}

/* FOOTER ------------------------------------------------------------- */
.ft-legal {
  display: flex;
  flex-wrap: wrap;
  gap: var(--s4);
  margin: var(--s4) 0 var(--s3);
}
.ft-legal a {
  font-size: 13px;
  color: var(--text-muted);
  transition: color var(--t-fast) var(--ease);
}
.ft-legal a:hover { color: var(--text); opacity: 1; }
.ft-disclaimer {
  margin-top: var(--s3);
  font-size: 11.5px;
  line-height: 1.5;
  color: var(--text-subtle);
  max-width: 520px;
}

/* Geocoding recovery + invalid field state ---------------------------- */
.geo-fix { max-width: 620px; margin: 0 auto; padding: var(--s8) var(--s5) var(--s10); }
.geo-head { margin-bottom: var(--s7); }
.geo-head h1 {
  font-family: var(--display);
  font-size: clamp(26px, 3.6vw, 36px);
  letter-spacing: -0.035em;
  font-weight: 700;
  margin: 0 0 var(--s2);
}
.geo-head p { font-size: 15px; line-height: 1.6; color: var(--text-muted); margin: 0; }

.geo-form {
  background: var(--surface);
  border: 1px solid var(--border-soft);
  border-radius: var(--r-xl);
  padding: var(--s7);
  box-shadow: var(--lift-2);
}
.geo-node { display: flex; gap: var(--s4); padding: var(--s3) 0; }
.geo-dot {
  flex: none; width: 11px; height: 11px; margin-top: 22px;
  border-radius: 50%; background: var(--surface);
  border: 2px solid var(--text);
}
.geo-dot-b { border-color: var(--primary); }
.geo-body { flex: 1; min-width: 0; }
.geo-body label {
  display: block; font-family: var(--mono); font-size: 10px;
  letter-spacing: 0.12em; text-transform: uppercase;
  color: var(--text-subtle); margin-bottom: 2px;
}
.geo-body input {
  width: 100%; border: none; border-bottom: 1px solid var(--border);
  outline: none; background: transparent;
  font-family: var(--display); font-size: 20px; font-weight: 600;
  letter-spacing: -0.02em; color: var(--text); padding: 3px 0 7px;
  transition: border-color var(--t-mid) var(--ease);
}
.geo-body input:focus { border-bottom-color: var(--primary); }
.geo-node.bad .geo-body input { border-bottom-color: var(--danger); }
.geo-node.bad .geo-dot { border-color: var(--danger); }

.geo-msg { font-size: 13px; color: var(--danger); margin: var(--s2) 0 0; }
.geo-sub {
  font-family: var(--mono); font-size: 10px; letter-spacing: 0.1em;
  text-transform: uppercase; color: var(--text-subtle);
  margin: var(--s4) 0 var(--s2);
}
.geo-alts { display: flex; flex-direction: column; gap: 4px; }
.geo-alt {
  text-align: left; background: var(--surface-2);
  border: 1px solid var(--border-soft); border-radius: var(--r-sm);
  padding: 9px 12px; cursor: pointer; font-family: var(--ui);
  transition: border-color var(--t-fast) var(--ease), background var(--t-fast) var(--ease);
}
.geo-alt:hover { border-color: var(--primary-border); background: var(--primary-faint); }
.geo-alt-1 { display: block; font-size: 14px; font-weight: 600; color: var(--text); }
.geo-alt-2 { display: block; font-size: 12px; color: var(--text-muted); margin-top: 1px; }

.geo-actions {
  display: flex; align-items: center; gap: var(--s4);
  margin-top: var(--s6); padding-top: var(--s5);
  border-top: 1px solid var(--border-soft);
}
.geo-back { font-size: 13px; color: var(--text-muted); }

/* Invalid state on the landing planner */
.rb-node.bad .rb-body input { border-bottom-color: var(--danger); }
.rb-node.bad .rb-dot { border-color: var(--danger); box-shadow: 0 0 0 5px rgba(201,83,43,0.14); }
.nl-missing { margin-bottom: var(--s3); }

/* Assistant clarification — a question, not an error --------------------- */
.cl-block {
  margin-top: var(--s4);
  padding: var(--s4);
  background: var(--surface-2);
  border: 1px solid var(--border-soft);
  border-radius: var(--r-md);
  transition: border-color var(--t-mid) var(--ease), background var(--t-mid) var(--ease);
}
.cl-block.answered {
  border-color: var(--primary-border);
  background: var(--primary-faint);
}
.cl-q {
  display: flex;
  align-items: baseline;
  gap: var(--s2);
  flex-wrap: wrap;
  font-size: 14.5px;
  font-weight: 550;
  color: var(--text);
  margin-bottom: var(--s3);
}
.cl-badge {
  font-family: var(--mono);
  font-size: 9.5px;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--text-subtle);
  background: var(--surface);
  border: 1px solid var(--border-soft);
  border-radius: var(--r-xs);
  padding: 2px 6px;
}
.cl-opts { display: flex; flex-wrap: wrap; gap: 6px; margin-bottom: var(--s3); }
.cl-opt {
  display: inline-flex;
  align-items: baseline;
  gap: 7px;
  text-align: left;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--r-sm);
  padding: 8px 12px;
  cursor: pointer;
  font-family: var(--ui);
  transition: border-color var(--t-fast) var(--ease),
              background var(--t-fast) var(--ease),
              transform var(--t-fast) var(--ease);
}
.cl-opt:hover { border-color: var(--border-strong); transform: translateY(-1px); box-shadow: var(--lift-1); }
.cl-opt.chosen {
  border-color: var(--primary);
  background: var(--surface);
  box-shadow: 0 0 0 3px var(--primary-ring);
}
.cl-opt-1 { font-size: 13.5px; font-weight: 600; color: var(--text); }
.cl-opt-2 { font-size: 11.5px; color: var(--text-muted); }
.cl-tag {
  font-family: var(--mono);
  font-size: 9px;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--text-subtle);
  border-left: 1px solid var(--border);
  padding-left: 7px;
}
.cl-free {
  width: 100%;
  border: none;
  border-bottom: 1px solid var(--border);
  outline: none;
  background: transparent;
  font-family: var(--ui);
  font-size: 14px;
  color: var(--text);
  padding: 6px 0;
  transition: border-color var(--t-mid) var(--ease);
}
.cl-free::placeholder { color: var(--text-ghost); }
.cl-free:focus { border-bottom-color: var(--primary); }

/* No-route explanation ------------------------------------------------- */
.nr-pair {
  display: grid;
  grid-template-columns: 1fr auto 1fr;
  align-items: center;
  gap: var(--s4);
  padding: var(--s5);
  margin-bottom: var(--s4);
  background: var(--surface);
  border: 1px solid var(--border-soft);
  border-radius: var(--r-md);
}
@media (max-width: 560px) { .nr-pair { grid-template-columns: 1fr; text-align: center; } }
.nr-end { min-width: 0; }
.nr-k {
  display: block;
  font-family: var(--mono);
  font-size: 9.5px;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--text-subtle);
  margin-bottom: 3px;
}
.nr-v {
  display: block;
  font-family: var(--display);
  font-size: 15px;
  font-weight: 600;
  letter-spacing: -0.015em;
  color: var(--text);
}
.nr-gap { text-align: center; }
.nr-dist {
  display: block;
  font-family: var(--mono);
  font-size: 10.5px;
  color: var(--text-subtle);
  margin-bottom: 2px;
}
.nr-cross { color: var(--danger); font-size: 15px; }
.nr-details {
  margin-top: var(--s5);
  font-size: 12.5px;
  color: var(--text-subtle);
}
.nr-details summary { cursor: pointer; font-family: var(--mono); font-size: 11px; letter-spacing: 0.06em; }
.nr-details ul { margin: var(--s2) 0 0; padding-left: var(--s5); font-family: var(--mono); font-size: 11px; }
.cl-tag.near { color: var(--primary); border-left-color: var(--primary-border); font-weight: 600; }
.nl-tag-stop { border-color: var(--primary-border); color: var(--primary-hover); background: var(--primary-faint); }
.wi-when {
  display: inline-block;
  margin-left: var(--s2);
  font-family: var(--mono);
  font-size: 10.5px;
  color: var(--text-subtle);
  letter-spacing: 0.02em;
}
.replay-banner {
  display: flex; align-items: center; gap: var(--s3);
  padding: var(--s3) var(--s4);
  margin-bottom: var(--s4);
  background: var(--primary-faint);
  border: 1px solid var(--primary-border);
  border-radius: var(--r-md);
  font-size: 13.5px;
  color: var(--primary-hover);
}
.rp-spin {
  flex: none; width: 12px; height: 12px; border-radius: 50%;
  border: 2px solid var(--primary-border);
  border-top-color: var(--primary);
  animation: rpSpin 0.7s linear infinite;
}
@keyframes rpSpin { to { transform: rotate(360deg); } }
.truck-note {
  display: flex; gap: var(--s3); align-items: flex-start;
  padding: var(--s4);
  margin-bottom: var(--s5);
  background: var(--surface-2);
  border: 1px solid var(--border-soft);
  border-radius: var(--r-md);
  font-size: 13.5px; line-height: 1.55; color: var(--text-muted);
}
.tn-badge {
  flex: none;
  font-family: var(--mono); font-size: 9.5px; letter-spacing: 0.12em;
  text-transform: uppercase; color: #fff; background: var(--text);
  padding: 4px 8px; border-radius: var(--r-xs);
}
.tn-limit { margin-top: 6px; font-size: 12px; color: var(--text-subtle); }

/* Stop-impact panel — when a stop costs more than it lasts ------------- */
.impact {
  margin-bottom: var(--s5);
  padding: var(--s5);
  background: var(--surface);
  border: 1px solid var(--border);
  border-left: 3px solid var(--warning);
  border-radius: var(--r-md);
  box-shadow: var(--lift-1);
}
.impact-head { display: flex; gap: var(--s3); align-items: flex-start; }
.impact-icon {
  flex: none;
  width: 22px; height: 22px; border-radius: 50%;
  display: flex; align-items: center; justify-content: center;
  background: var(--warning); color: #fff;
  font-family: var(--display); font-weight: 700; font-size: 13px;
}
.impact-title {
  font-family: var(--display);
  font-size: 15.5px; font-weight: 650;
  letter-spacing: -0.015em;
  color: var(--text);
}
.impact-sub { font-size: 13.5px; line-height: 1.5; color: var(--text-muted); margin-top: 3px; }

.impact-rows { margin-top: var(--s4); }
.impact-row {
  display: flex; justify-content: space-between; gap: var(--s4);
  padding: 7px 0;
  font-size: 13px;
  color: var(--text-muted);
  border-bottom: 1px solid var(--border-soft);
}
.impact-row:last-child { border-bottom: none; }
.impact-v { font-family: var(--mono); font-size: 12.5px; color: var(--text); white-space: nowrap; }
.impact-row-bad .impact-v { color: var(--jam); font-weight: 600; }
.impact-compare .impact-v { font-weight: 600; }

.impact-fix {
  display: flex; align-items: center; justify-content: space-between;
  gap: var(--s4); flex-wrap: wrap;
  margin-top: var(--s4); padding-top: var(--s4);
  border-top: 1px solid var(--border-soft);
  font-size: 13.5px; color: var(--text);
}
.impact-apply {
  flex: none;
  height: 38px; padding: 0 18px;
  background: var(--primary); color: #fff;
  border: none; border-radius: var(--r-sm);
  font-family: var(--ui); font-size: 13px; font-weight: 550;
  cursor: pointer;
  transition: background var(--t-fast) var(--ease);
}
.impact-apply:hover { background: var(--primary-hover); }
.impact-apply:disabled { opacity: 0.5; cursor: wait; }

/* "I picked this one" — a statement with the runners-up one click away */
.cl-note {
  margin-top: var(--s3);
  padding: var(--s3) var(--s4);
  background: var(--surface-2);
  border: 1px solid var(--border-soft);
  border-radius: var(--r-sm);
  font-size: 13px;
  color: var(--text-muted);
}
.cl-note-line { display: flex; align-items: baseline; gap: var(--s2); flex-wrap: wrap; }
.cl-note strong { color: var(--text); font-weight: 600; }
.cl-alts { margin-top: var(--s2); }
.cl-alts summary {
  cursor: pointer;
  font-family: var(--mono);
  font-size: 10.5px;
  letter-spacing: 0.06em;
  color: var(--primary);
}
.cl-alts summary:hover { color: var(--primary-hover); }
.cl-alts .cl-opts { margin-top: var(--s2); margin-bottom: 0; }

/* Settings bar — a sentence you read, not a panel you configure ---------- */
.opts-bar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: var(--s4);
  margin-top: var(--s5);
  padding-top: var(--s4);
  border-top: 1px solid var(--border-soft);
}
.opts-summary {
  font-size: 13px;
  color: var(--text-muted);
  letter-spacing: -0.005em;
}
.opts-toggle {
  flex: none;
  display: inline-flex;
  align-items: center;
  gap: 6px;
  background: transparent;
  border: none;
  padding: 6px 8px;
  margin-right: -8px;
  border-radius: var(--r-xs);
  font-family: var(--ui);
  font-size: 13px;
  font-weight: 500;
  color: var(--text-muted);
  cursor: pointer;
  transition: color var(--t-fast) var(--ease), background var(--t-fast) var(--ease);
}
.opts-toggle:hover { color: var(--text); background: rgba(20,23,26,0.04); }
.opts-chev { transition: transform var(--t-mid) var(--ease); }
.opts-toggle.open .opts-chev { transform: rotate(180deg); }

.opts-panel {
  display: flex;
  flex-wrap: wrap;
  gap: var(--s4) var(--s6);
  margin-top: var(--s4);
  padding: var(--s4) 0 var(--s2);
  animation: optsIn var(--t-mid) var(--ease-out);
}
.opts-panel[hidden] { display: none !important; }
@keyframes optsIn { from { opacity: 0; transform: translateY(-4px); } to { opacity: 1; transform: none; } }
.opts-panel .opt-group[hidden] { display: none !important; }
.opts-panel #sb-time-input {
  border: 1px solid var(--border);
  border-radius: var(--r-xs);
  background: var(--surface);
  font-family: var(--mono);
  font-size: 14px;
  color: var(--text);
  padding: 6px 9px;
}
.opts-panel #sb-time-input:focus { outline: none; border-color: var(--primary); }


/* ==========================================================================
   ACCOUNTS, BILLING & GATES
   Added with the paywall. Everything here reuses the existing tokens — no new
   colours, no new radii — so the signed-in surfaces read as the same product.
   ========================================================================== */

/* ---- Header: signed-out vs signed-in ----------------------------------- */

.nav-signin {
  font-size: 13px;
  font-weight: 500;
  color: var(--text-muted);
  text-decoration: none;
  padding: 7px 10px;
  border-radius: var(--r-xs);
  transition: color var(--t-fast) var(--ease), background var(--t-fast) var(--ease);
}
.nav-signin:hover { color: var(--text); background: rgba(20, 23, 26, 0.05); }

.nav-cta {
  display: inline-flex;
  align-items: center;
  font-size: 13px;
  font-weight: 600;
  color: #fff;
  background: var(--primary);
  text-decoration: none;
  padding: 8px 16px;
  border-radius: var(--r-pill);
  box-shadow: var(--lift-1);
  transition: background var(--t-fast) var(--ease), transform var(--t-fast) var(--ease);
}
.nav-cta:hover { background: var(--primary-hover); transform: translateY(-1px); }

.nav-account {
  display: inline-flex;
  align-items: center;
  gap: var(--s2);
  padding: 5px 10px 5px 5px;
  border-radius: var(--r-pill);
  text-decoration: none;
  color: var(--text-muted);
  font-size: 13px;
  font-weight: 500;
  border: 1px solid transparent;
  transition: border-color var(--t-fast) var(--ease), color var(--t-fast) var(--ease);
}
.nav-account:hover { color: var(--text); border-color: var(--border); }

.nav-avatar {
  display: grid;
  place-items: center;
  width: 26px; height: 26px;
  border-radius: var(--r-pill);
  background: var(--p-900);
  color: #fff;
  font-family: var(--ui);
  font-size: 12px;
  font-weight: 700;
}

/* Trips left today. A number the customer can act on, not a decoration. */
.nav-quota {
  font-family: var(--mono);
  font-size: 11px;
  font-weight: 500;
  padding: 2px 7px;
  border-radius: var(--r-pill);
  background: var(--primary-faint);
  color: var(--p-700);
}
.nav-quota.is-out { background: #fbe9e3; color: var(--jam); }

@media (max-width: 720px) {
  .nav-account-label, .nav-signin { display: none; }
}

/* ---- Flash messages ----------------------------------------------------- */

.flash {
  max-width: 720px;
  margin: var(--s5) auto 0;
  padding: var(--s3) var(--s4);
  border-radius: var(--r-sm);
  font-size: 14px;
  line-height: 1.5;
  border: 1px solid;
}
.flash-ok   { background: #eaf5ec; border-color: #cbe4d1; color: #1d6b34; }
.flash-warn { background: #fdf3e8; border-color: #f0dcc0; color: #8a5a1c; }
.flash-info { background: var(--primary-faint); border-color: var(--primary-border); color: var(--p-700); }

/* ---- Auth --------------------------------------------------------------- */

.auth-wrap {
  min-height: 68vh;
  display: grid;
  place-items: center;
  padding: var(--s8) var(--s4);
}

.auth-card {
  width: 100%;
  max-width: 400px;
  background: var(--surface);
  border: 1px solid var(--border-soft);
  border-radius: var(--r-xl);
  padding: var(--s7) var(--s6) var(--s6);
  box-shadow: var(--lift-3);
}

.auth-head h1 {
  font-family: var(--display);
  font-size: 26px;
  font-weight: 700;
  letter-spacing: -0.02em;
  margin: 0 0 var(--s2);
}
.auth-head p { margin: 0 0 var(--s6); color: var(--text-muted); font-size: 14px; line-height: 1.55; }

.auth-error {
  margin-bottom: var(--s5);
  padding: var(--s3) var(--s4);
  border-radius: var(--r-sm);
  background: #fbe9e3;
  border: 1px solid #f0cdc0;
  color: #9b3d1e;
  font-size: 13.5px;
  line-height: 1.5;
}

.auth-form { display: grid; gap: var(--s4); }

.auth-field { display: grid; gap: 6px; }
.auth-field > span {
  font-size: 12px;
  font-weight: 600;
  letter-spacing: 0.02em;
  color: var(--text-muted);
}
.auth-field input {
  font-family: var(--ui);
  font-size: 15px;
  padding: 12px 14px;
  border: 1px solid var(--border);
  border-radius: var(--r-sm);
  background: var(--surface-2);
  color: var(--text);
  transition: border-color var(--t-fast) var(--ease), box-shadow var(--t-fast) var(--ease);
}
.auth-field input::placeholder { color: var(--text-ghost); }
.auth-field input:focus {
  outline: none;
  background: var(--surface);
  border-color: var(--primary);
  box-shadow: 0 0 0 3px var(--primary-ring);
}
.auth-field small { font-size: 12px; color: var(--text-subtle); }

.auth-submit {
  margin-top: var(--s2);
  font-family: var(--ui);
  font-size: 15px;
  font-weight: 600;
  color: #fff;
  background: var(--primary);
  border: 0;
  border-radius: var(--r-sm);
  padding: 13px;
  cursor: pointer;
  transition: background var(--t-fast) var(--ease);
}
.auth-submit:hover { background: var(--primary-hover); }

.auth-legal {
  margin: var(--s5) 0 0;
  font-size: 12px;
  line-height: 1.6;
  color: var(--text-subtle);
}
.auth-legal a { color: var(--text-muted); }

.auth-switch {
  display: block;
  margin-top: var(--s5);
  padding-top: var(--s5);
  border-top: 1px solid var(--border-soft);
  text-align: center;
  font-size: 13.5px;
  color: var(--primary);
  text-decoration: none;
}
.auth-switch:hover { text-decoration: underline; }

/* ---- Account ------------------------------------------------------------ */

.acct-wrap { max-width: 760px; margin: 0 auto; padding: var(--s8) var(--s4) var(--s9); }

.acct-title {
  font-family: var(--display);
  font-size: 30px;
  font-weight: 700;
  letter-spacing: -0.025em;
  margin: 0;
}
.acct-email {
  font-family: var(--mono);
  font-size: 13px;
  color: var(--text-subtle);
  margin-top: var(--s2);
}

.acct-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  gap: var(--s4);
  margin-top: var(--s7);
}

.acct-card {
  background: var(--surface);
  border: 1px solid var(--border-soft);
  border-radius: var(--r-lg);
  padding: var(--s5);
  box-shadow: var(--lift-1);
}

.acct-label {
  font-size: 11px;
  font-weight: 600;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--text-subtle);
}

.acct-plan {
  font-family: var(--display);
  font-size: 26px;
  font-weight: 700;
  letter-spacing: -0.02em;
  margin-top: var(--s3);
}
.acct-plan-none { color: var(--text-ghost); font-size: 18px; font-weight: 600; }

.acct-sub { margin-top: var(--s2); font-size: 13.5px; line-height: 1.55; color: var(--text-muted); }

.acct-actions { margin-top: var(--s5); }

.acct-btn {
  display: inline-block;
  font-family: var(--ui);
  font-size: 14px;
  font-weight: 600;
  color: #fff;
  background: var(--primary);
  border: 0;
  border-radius: var(--r-sm);
  padding: 11px 20px;
  cursor: pointer;
  text-decoration: none;
  transition: background var(--t-fast) var(--ease);
}
.acct-btn:hover { background: var(--primary-hover); }

.acct-note { margin: var(--s3) 0 0; font-size: 12.5px; line-height: 1.55; color: var(--text-subtle); }

.acct-meter-value {
  font-family: var(--display);
  font-size: 26px;
  font-weight: 700;
  margin-top: var(--s3);
  color: var(--text-muted);
}
.acct-meter-value b { color: var(--text); }

.acct-meter {
  margin-top: var(--s3);
  height: 6px;
  border-radius: var(--r-pill);
  background: var(--surface-sunk);
  overflow: hidden;
}
.acct-meter span {
  display: block;
  height: 100%;
  background: var(--primary);
  border-radius: var(--r-pill);
  transition: width var(--t-mid) var(--ease);
}

.acct-logout { margin-top: var(--s7); }
.acct-logout button {
  font-family: var(--ui);
  font-size: 13.5px;
  color: var(--text-subtle);
  background: none;
  border: 0;
  padding: 0;
  cursor: pointer;
  text-decoration: underline;
}
.acct-logout button:hover { color: var(--text); }

/* ---- Paywall & quota gates ---------------------------------------------- */

.gate-wrap {
  min-height: 72vh;
  display: grid;
  place-items: center;
  padding: var(--s8) var(--s4);
}

.gate-card {
  width: 100%;
  max-width: 520px;
  text-align: center;
  background: var(--surface);
  border: 1px solid var(--border-soft);
  border-radius: var(--r-xl);
  padding: var(--s7) var(--s6);
  box-shadow: var(--lift-3);
}

/* The brand lozenge, turned on its corner — same gesture as the nav mark. */
.gate-mark {
  width: 28px; height: 28px;
  margin: 0 auto var(--s5);
  background: var(--p-900);
  border-radius: var(--r-xs);
  transform: rotate(45deg);
}

.gate-card h1 {
  font-family: var(--display);
  font-size: 26px;
  font-weight: 700;
  letter-spacing: -0.025em;
  line-height: 1.2;
  margin: 0 0 var(--s3);
}

.gate-lede { margin: 0; font-size: 14.5px; line-height: 1.6; color: var(--text-muted); }
.gate-note { margin: var(--s3) 0 0; font-size: 13px; line-height: 1.55; color: var(--text-subtle); }

.gate-trip {
  margin: var(--s6) 0 0;
  padding: var(--s4);
  background: var(--surface-2);
  border: 1px solid var(--border-soft);
  border-radius: var(--r-md);
}
.gate-trip-label {
  font-size: 11px;
  font-weight: 600;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--text-subtle);
}
.gate-trip-route {
  display: flex;
  align-items: center;
  justify-content: center;
  flex-wrap: wrap;
  gap: var(--s3);
  margin-top: var(--s2);
  font-size: 15px;
  font-weight: 600;
  color: var(--text);
}
.gate-trip-route svg { color: var(--primary); flex: none; }

.gate-actions {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: var(--s3);
  margin-top: var(--s6);
}

.gate-primary, .gate-secondary {
  font-family: var(--ui);
  font-size: 14.5px;
  font-weight: 600;
  padding: 12px 22px;
  border-radius: var(--r-sm);
  text-decoration: none;
  transition: background var(--t-fast) var(--ease), border-color var(--t-fast) var(--ease);
}
.gate-primary { color: #fff; background: var(--primary); }
.gate-primary:hover { background: var(--primary-hover); }
.gate-secondary { color: var(--text); background: var(--surface); border: 1px solid var(--border); }
.gate-secondary:hover { border-color: var(--border-strong); }

.gate-hint {
  display: inline-block;
  margin-top: var(--s5);
  font-size: 13.5px;
  color: var(--text-subtle);
  text-decoration: underline;
}
.gate-hint:hover { color: var(--text); }

/* ---- Pricing CTAs now submit real forms --------------------------------- */

.plan form { display: contents; }

button.plan-cta {
  font-family: var(--ui);
  cursor: pointer;
  border: 0;
  width: 100%;
}
button.plan-cta:disabled { opacity: 0.45; cursor: not-allowed; }

.plan-cta-current {
  background: var(--surface-sunk) !important;
  color: var(--text-muted) !important;
}


/* ==========================================================================
   ONE-OFF CREDIT PACKS
   Sold without an account. Deliberately lighter than the subscription cards:
   this is the way in for a stranger, not the offer a daily driver should land on.
   ========================================================================== */

.packs {
  max-width: 860px;
  margin: 0 auto;
  padding: var(--s8) var(--s4) var(--s9);
}

.packs-head { text-align: center; margin-bottom: var(--s6); }

.packs-head h2 {
  font-family: var(--display);
  font-size: 24px;
  font-weight: 700;
  letter-spacing: -0.02em;
  margin: 0 0 var(--s2);
}
.packs-head p {
  margin: 0 auto;
  max-width: 44ch;
  font-size: 14.5px;
  line-height: 1.6;
  color: var(--text-muted);
}

.packs-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
  gap: var(--s4);
}

.pack {
  display: flex;
  flex-direction: column;
  gap: var(--s2);
  background: var(--surface);
  border: 1px solid var(--border-soft);
  border-radius: var(--r-lg);
  padding: var(--s5);
  box-shadow: var(--lift-1);
  transition: border-color var(--t-fast) var(--ease), transform var(--t-fast) var(--ease);
}
.pack:hover { border-color: var(--border-strong); transform: translateY(-2px); }

.pack-name {
  font-size: 11px;
  font-weight: 600;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--text-subtle);
}

.pack-price {
  font-family: var(--display);
  font-size: 30px;
  font-weight: 700;
  letter-spacing: -0.025em;
  line-height: 1;
}

.pack-desc {
  font-size: 13.5px;
  line-height: 1.55;
  color: var(--text-muted);
  flex: 1;
}

.pack-cta {
  margin-top: var(--s3);
  font-family: var(--ui);
  font-size: 14px;
  font-weight: 600;
  color: var(--text);
  background: var(--surface-2);
  border: 1px solid var(--border);
  border-radius: var(--r-sm);
  padding: 11px;
  cursor: pointer;
  transition: background var(--t-fast) var(--ease), border-color var(--t-fast) var(--ease);
}
.pack-cta:hover { background: var(--primary); border-color: var(--primary); color: #fff; }

.packs-note {
  margin: var(--s5) 0 0;
  text-align: center;
  font-size: 12.5px;
  line-height: 1.6;
  color: var(--text-subtle);
}

/* ---- The buy-now block on the paywall ----------------------------------- */

/* This is the conversion moment: the visitor has just described a trip and
   wants THAT trip. Buying it outright sits above the subscription pitch. */
.pay-now {
  margin-top: var(--s6);
  padding: var(--s5);
  background: var(--primary-faint);
  border: 1px solid var(--primary-border);
  border-radius: var(--r-md);
}

.pay-now-label {
  font-size: 12px;
  font-weight: 600;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  color: var(--p-700);
  margin-bottom: var(--s3);
}

.pay-now-row {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(130px, 1fr));
  gap: var(--s3);
}

.pay-now-btn {
  width: 100%;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 4px;
  font-family: var(--ui);
  background: var(--surface);
  border: 1px solid var(--primary-border);
  border-radius: var(--r-sm);
  padding: 12px 14px;
  cursor: pointer;
  transition: background var(--t-fast) var(--ease), border-color var(--t-fast) var(--ease),
              transform var(--t-fast) var(--ease);
}
.pay-now-btn:hover { border-color: var(--primary); transform: translateY(-1px); }

.pay-now-btn.is-primary { background: var(--primary); border-color: var(--primary); }
.pay-now-btn.is-primary .pn-name,
.pay-now-btn.is-primary .pn-price { color: #fff; }
.pay-now-btn.is-primary:hover { background: var(--primary-hover); }

.pn-name { font-size: 12px; font-weight: 500; color: var(--text-muted); }
.pn-price { font-family: var(--display); font-size: 19px; font-weight: 700; color: var(--text); }

.pay-now-note {
  margin-top: var(--s3);
  font-size: 12px;
  color: var(--text-subtle);
}

/* ---- Welcome page after a one-off purchase ------------------------------ */

/* The brand lozenge turns green here — the one place the success colour is
   allowed on a non-traffic element, because the message IS "it worked". */
.gate-mark-ok { background: var(--success); }

.welcome-credits {
  display: flex;
  align-items: baseline;
  justify-content: center;
  gap: var(--s3);
  margin: var(--s6) 0 0;
  padding: var(--s4);
  background: var(--surface-2);
  border: 1px solid var(--border-soft);
  border-radius: var(--r-md);
}
.welcome-credits b {
  font-family: var(--display);
  font-size: 34px;
  font-weight: 700;
  line-height: 1;
  letter-spacing: -0.03em;
}
.welcome-credits span { font-size: 14px; color: var(--text-muted); }


/* ==========================================================================
   PAYWALL — the three-way choice
   One-off purchases and the subscription in the SAME row, with cost per trip
   under each. The comparison is the argument: nobody divides 9 by 150 from a
   link on another page.
   ========================================================================== */

.buy-row {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(150px, 1fr));
  gap: var(--s3);
  margin-top: var(--s6);
  align-items: end;
}

.buy-opt { position: relative; display: flex; }

.buy-card {
  width: 100%;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 5px;
  font-family: var(--ui);
  text-align: center;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--r-md);
  padding: var(--s4) var(--s3);
  cursor: pointer;
  transition: border-color var(--t-fast) var(--ease), transform var(--t-fast) var(--ease),
              box-shadow var(--t-fast) var(--ease);
}
.buy-card:hover {
  border-color: var(--border-strong);
  transform: translateY(-2px);
  box-shadow: var(--lift-2);
}

.buy-name {
  font-size: 12px;
  font-weight: 600;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  color: var(--text-subtle);
}

.buy-price {
  font-family: var(--display);
  font-size: 24px;
  font-weight: 700;
  letter-spacing: -0.025em;
  line-height: 1.1;
  color: var(--text);
}
.buy-price small {
  font-family: var(--ui);
  font-size: 12px;
  font-weight: 500;
  letter-spacing: 0;
  color: var(--text-muted);
  margin-left: 3px;
}

.buy-unit {
  font-size: 11.5px;
  line-height: 1.4;
  color: var(--text-subtle);
}

/* The subscription: taller, accented, and the only one carrying a badge.
   It has to win the glance without hiding the 2,90 € entry point. */
.buy-opt.is-best { padding-top: 12px; }

.buy-card-best {
  background: var(--p-900);
  border-color: var(--p-900);
  padding: var(--s5) var(--s3);
  box-shadow: var(--lift-2);
}
.buy-card-best:hover { border-color: var(--p-700); background: var(--p-700); }
.buy-card-best .buy-name { color: rgba(255, 255, 255, 0.72); }
.buy-card-best .buy-price { color: #fff; }
.buy-card-best .buy-price small { color: rgba(255, 255, 255, 0.72); }
.buy-card-best .buy-unit { color: rgba(255, 255, 255, 0.8); }

.buy-badge {
  position: absolute;
  top: 0; left: 50%;
  transform: translate(-50%, -50%);
  z-index: 1;
  white-space: nowrap;
  font-size: 10px;
  font-weight: 700;
  letter-spacing: 0.07em;
  text-transform: uppercase;
  color: #fff;
  background: var(--success);
  padding: 4px 10px;
  border-radius: var(--r-pill);
  box-shadow: var(--lift-1);
}

.buy-note {
  margin-top: var(--s4);
  font-size: 12.5px;
  color: var(--text-subtle);
}

/* Once buying is the main event, the remaining links step back. */
.gate-actions-quiet { margin-top: var(--s5); }
.gate-actions-quiet .gate-secondary {
  font-size: 13.5px;
  padding: 9px 16px;
  color: var(--text-muted);
}

@media (max-width: 520px) {
  .buy-row { grid-template-columns: 1fr; }
  /* On a phone the subscription goes first: it is the offer to read, and a
     single column removes the side-by-side comparison that justified its
     position at the end. */
  .buy-opt.is-best { order: -1; margin-bottom: var(--s2); }
}
