:root {
  --navy: #071a3d;
  --navy-deep: #04112a;
  --navy-soft: #102a5f;
  --yellow: #ffd447;
  --yellow-soft: #ffe489;
  --white: #ffffff;
  --ink: #dfe8ff;
  --muted: #aebddd;
  --line: rgba(255, 255, 255, 0.12);
  --shadow: 0 24px 70px rgba(2, 10, 30, 0.34);
  --radius-xl: 30px;
  --radius-lg: 22px;
  --radius-md: 16px;
  --body-accent: rgba(255, 212, 71, 0.14);
  --body-start: var(--navy-deep);
  --body-mid: var(--navy);
  --body-end: #0d2452;
  --grid-line: rgba(255, 255, 255, 0.02);
  --surface-top: rgba(255, 255, 255, 0.05);
  --surface-bottom: rgba(255, 255, 255, 0.03);
  --surface-accent-a: rgba(8, 27, 63, 0.94);
  --surface-accent-b: rgba(8, 20, 48, 0.92);
  --soft-bg: rgba(255, 255, 255, 0.04);
  --input-bg: rgba(255, 255, 255, 0.06);
}

html[data-theme="light"] {
  --navy: #0f2a63;
  --navy-deep: #eaf1ff;
  --navy-soft: #385caa;
  --white: #102243;
  --ink: #183058;
  --muted: #5e7096;
  --line: rgba(16, 34, 67, 0.12);
  --shadow: 0 20px 48px rgba(35, 60, 120, 0.14);
  --body-accent: rgba(255, 212, 71, 0.2);
  --body-start: #f8fbff;
  --body-mid: #edf3ff;
  --body-end: #e3ecff;
  --grid-line: rgba(16, 34, 67, 0.04);
  --surface-top: rgba(255, 255, 255, 0.9);
  --surface-bottom: rgba(242, 247, 255, 0.96);
  --surface-accent-a: rgba(245, 249, 255, 0.98);
  --surface-accent-b: rgba(233, 240, 255, 0.98);
  --soft-bg: rgba(255, 255, 255, 0.74);
  --input-bg: rgba(255, 255, 255, 0.82);
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  color: var(--ink);
  font-family: "DM Sans", "Space Grotesk", sans-serif;
  background:
    radial-gradient(circle at top left, var(--body-accent), transparent 22%),
    linear-gradient(180deg, var(--body-start) 0%, var(--body-mid) 55%, var(--body-end) 100%);
}

body::before {
  content: "";
  position: fixed;
  inset: 0;
  pointer-events: none;
  background-image:
    linear-gradient(var(--grid-line) 1px, transparent 1px),
    linear-gradient(90deg, var(--grid-line) 1px, transparent 1px);
  background-size: 32px 32px;
  opacity: 0.5;
}

h1,
h2,
h3,
h4 {
  margin: 0;
  font-family: "Fraunces", "Syne", serif;
}

/* The trip notebook: deliberately editorial, calm and visibly opinionated. */
.wizard-page {
  width: min(1180px, calc(100% - 32px));
  margin: 0 auto;
  padding: 54px 0 90px;
}

.editorial-hero {
  display: grid;
  grid-template-columns: minmax(0, 1.6fr) minmax(260px, 0.6fr);
  gap: clamp(36px, 8vw, 110px);
  align-items: end;
  min-height: 430px;
  padding: clamp(48px, 8vw, 100px) 0 72px;
  border-bottom: 1px solid var(--line);
}

.editorial-hero h1 {
  max-width: 850px;
  font-size: clamp(3.2rem, 7.3vw, 7.2rem);
  line-height: 0.91;
  letter-spacing: -0.045em;
}

.editorial-lede {
  max-width: 720px;
  margin: 32px 0 0;
  color: var(--muted);
  font-size: clamp(1.05rem, 1.8vw, 1.35rem);
  line-height: 1.65;
}

.editor-note,
.human-promise {
  position: relative;
  padding: 25px 25px 22px 32px;
  color: var(--ink);
  background: color-mix(in srgb, var(--yellow) 13%, transparent);
  border: 1px solid color-mix(in srgb, var(--yellow) 42%, transparent);
  border-radius: 4px 20px 20px 20px;
  transform: rotate(-1.2deg);
}

.editor-note p,
.human-promise p { margin: 0; line-height: 1.6; }
.editor-note-mark { position: absolute; top: -22px; left: -10px; color: var(--yellow); font: 700 2.7rem "Fraunces", serif; }

.intent-section { padding: 80px 0; }
.section-heading { display: flex; gap: 22px; align-items: flex-start; margin-bottom: 34px; }
.handwritten-number,
.guidance-number { color: var(--yellow); font: italic 700 1.25rem "Fraunces", serif; }
.intent-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 18px; }
.intent-card {
  min-height: 210px;
  padding: 28px;
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  justify-content: flex-end;
  gap: 9px;
  color: var(--ink);
  text-align: left;
  text-decoration: none;
  font: inherit;
  background: var(--soft-bg);
  border: 1px solid var(--line);
  border-radius: 7px 28px 7px 7px;
  cursor: pointer;
  transition: transform 180ms ease, border-color 180ms ease, background 180ms ease;
}
.intent-card:hover,
.intent-card.selected { transform: translateY(-4px); border-color: var(--yellow); }
.intent-card-primary { background: var(--yellow); color: #071a3d; border-color: var(--yellow); }
.intent-card strong { color: inherit; font: 700 clamp(1.25rem, 2vw, 1.7rem) "Fraunces", serif; }
.intent-card > span:last-child { color: inherit; opacity: 0.78; line-height: 1.45; }
.intent-icon { margin-bottom: auto; font-size: 2rem; }

.wizard-shell {
  display: grid;
  grid-template-columns: 280px minmax(0, 1fr);
  overflow: hidden;
  min-height: 650px;
  background: linear-gradient(145deg, var(--surface-top), var(--surface-bottom));
  border: 1px solid var(--line);
  border-radius: 8px 38px 8px 8px;
  box-shadow: var(--shadow);
}
.wizard-rail { padding: 38px 30px; border-right: 1px solid var(--line); background: color-mix(in srgb, var(--navy) 38%, transparent); }
.wizard-rail h2 { margin-top: 5px; }
.wizard-progress { display: grid; gap: 6px; margin: 34px 0; padding: 0; list-style: none; }
.wizard-progress li { display: grid; grid-template-columns: 34px 1fr; gap: 10px; align-items: center; padding: 9px 0; color: var(--muted); }
.wizard-progress li span { display: grid; place-items: center; width: 30px; height: 30px; border: 1px solid var(--line); border-radius: 50%; font-size: .78rem; }
.wizard-progress li.active { color: var(--white); font-weight: 700; }
.wizard-progress li.active span { color: #071a3d; background: var(--yellow); border-color: var(--yellow); }
.wizard-progress li.complete span { color: var(--yellow); border-color: var(--yellow); }
.wizard-rail-note { color: var(--muted); line-height: 1.55; font-size: .9rem; }
.wizard-form { min-width: 0; }
.wizard-step { padding: clamp(36px, 6vw, 72px); }
.wizard-step[hidden] { display: none; }
.wizard-step h2 { max-width: 720px; font-size: clamp(2.1rem, 4.5vw, 4.2rem); line-height: 1; }
.wizard-step-copy { max-width: 670px; margin: 17px 0 34px; color: var(--muted); font-size: 1.08rem; line-height: 1.65; }
.wizard-field-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 20px; }
.wizard-field-grid > label,
.advanced-options-body label { display: grid; gap: 9px; }
.party-fieldset,
.traveler-counts { margin: 27px 0 0; padding: 0; border: 0; }
.party-fieldset legend,
.traveler-counts legend { margin-bottom: 12px; font-weight: 700; }
.party-grid,
.traveler-counts { display: grid; grid-template-columns: repeat(3, 1fr); gap: 15px; }
.party-grid label,
.traveler-counts label { display: grid; gap: 8px; }
.choice-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 12px; margin-bottom: 26px; }
.choice-card,
.priority-grid label {
  position: relative;
  display: flex;
  min-height: 122px;
  flex-direction: column;
  justify-content: flex-end;
  gap: 5px;
  padding: 19px;
  background: var(--soft-bg);
  border: 1px solid var(--line);
  border-radius: 6px 18px 6px 6px;
  cursor: pointer;
}
.choice-card:has(input:checked),
.priority-grid label:has(input:checked) { border-color: var(--yellow); box-shadow: inset 0 0 0 1px var(--yellow); }
.choice-card input,
.priority-grid input { position: absolute; top: 15px; right: 15px; accent-color: var(--yellow); }
.choice-card span,
.priority-grid span { color: var(--white); font-weight: 700; }
.choice-card small { color: var(--muted); line-height: 1.35; }
.priority-hint { color: var(--muted); }
.priority-grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 11px; margin: 22px 0 28px; }
.priority-grid label { min-height: 88px; }
.practical-checks { display: grid; gap: 12px; margin: 26px 0; }
.advanced-options { margin: 22px 0; padding: 18px; background: var(--soft-bg); border: 1px solid var(--line); border-radius: 8px; }
.advanced-options summary { cursor: pointer; font-weight: 700; }
.advanced-options-body { display: grid; gap: 18px; padding-top: 20px; }
.wizard-actions { display: flex; justify-content: flex-end; gap: 12px; margin-top: 34px; }
.human-promise { display: flex; gap: 13px; margin-top: 28px; transform: rotate(.35deg); }
.human-promise > span { color: var(--yellow); font-size: 1.6rem; }
.human-proof { padding: 90px 0 20px; }
.proof-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 1px; background: var(--line); border: 1px solid var(--line); }
.proof-grid article { padding: 28px; background: var(--body-mid); }
.proof-grid strong { color: var(--yellow); }
.proof-grid p { color: var(--muted); line-height: 1.55; }

.human-verdict-card {
  display: grid;
  grid-template-columns: auto 1fr;
  gap: 24px;
  margin: 0 0 24px;
  padding: clamp(26px, 4vw, 42px);
  background: color-mix(in srgb, var(--yellow) 11%, var(--soft-bg));
  border: 1px solid color-mix(in srgb, var(--yellow) 46%, transparent);
  border-radius: 5px 26px 5px 5px;
}
.human-verdict-mark { color: var(--yellow); font: 700 2.4rem "Fraunces", serif; }
.human-verdict-card h2 { font-size: clamp(1.9rem, 4vw, 3.4rem); }
.human-verdict-card p:not(.eyebrow) { max-width: 850px; color: var(--muted); line-height: 1.6; }
.human-trip-badges { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 19px; }
.human-trip-badges span,
.guidance-status { padding: 7px 11px; color: var(--ink); background: var(--soft-bg); border: 1px solid var(--line); border-radius: 999px; font-size: .82rem; }
.practical-guidance-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 18px; margin: 24px 0; }
.guidance-card { position: relative; }
.guidance-number { position: absolute; top: 22px; right: 24px; }
.guidance-list { display: grid; gap: 13px; margin: 20px 0 0; padding-left: 18px; color: var(--muted); line-height: 1.52; }
.guidance-list li::marker { color: var(--yellow); }
.guidance-status { display: inline-block; margin: 20px 0 0; }

@media (max-width: 900px) {
  .editorial-hero,
  .wizard-shell { grid-template-columns: 1fr; }
  .editorial-hero { min-height: auto; }
  .editor-note { max-width: 520px; }
  .intent-grid,
  .practical-guidance-grid { grid-template-columns: 1fr; }
  .intent-card { min-height: 160px; }
  .wizard-rail { border-right: 0; border-bottom: 1px solid var(--line); }
  .wizard-progress { grid-template-columns: repeat(5, 1fr); }
  .wizard-progress li { display: flex; justify-content: center; }
  .wizard-progress li strong { display: none; }
  .wizard-rail-note { display: none; }
  .priority-grid { grid-template-columns: repeat(2, 1fr); }
}

@media (max-width: 620px) {
  .wizard-page { width: min(100% - 22px, 1180px); padding-top: 10px; }
  .editorial-hero { padding-top: 50px; }
  .editorial-hero h1 { font-size: clamp(2.75rem, 15vw, 4.4rem); }
  .wizard-step { padding: 30px 20px; }
  .wizard-field-grid,
  .party-grid,
  .traveler-counts,
  .choice-grid,
  .priority-grid,
  .proof-grid { grid-template-columns: 1fr; }
  .choice-card { min-height: 104px; }
  .wizard-actions { flex-direction: column-reverse; }
  .wizard-actions .button { width: 100%; }
  .human-verdict-card { grid-template-columns: 1fr; }
}

h1 {
  font-size: clamp(2.2rem, 4vw, 4.5rem);
  line-height: 0.96;
  color: var(--white);
}

h2 {
  font-size: clamp(1.6rem, 3vw, 2.4rem);
  color: var(--white);
}

h3 {
  font-size: 1.2rem;
  color: var(--white);
}

h4 {
  font-size: 1rem;
  color: var(--yellow);
}

p {
  margin: 0;
  line-height: 1.6;
}

.eyebrow,
.package-tag {
  text-transform: uppercase;
  letter-spacing: 0.16em;
  font-size: 0.74rem;
  font-weight: 700;
  color: var(--yellow);
}

.hero-text {
  color: var(--muted);
  max-width: 56ch;
}

.top-tools {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
}

.page-brand {
  width: min(1380px, calc(100% - 32px));
  margin: 0 auto;
  padding: 24px 0 8px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
}

.site-footer {
  width: min(1380px, calc(100% - 32px));
  margin: 0 auto;
  padding: 0 0 28px;
}

.site-disclaimer {
  color: var(--muted);
  font-size: 0.78rem;
  line-height: 1.55;
  opacity: 0.82;
}

.site-version {
  margin-top: 8px;
  color: var(--muted);
  font-size: 0.72rem;
  line-height: 1.4;
  opacity: 0.7;
}

.site-easter-egg {
  margin-top: 4px;
  color: var(--muted);
  font-size: 0.72rem;
  line-height: 1.4;
  opacity: 0.72;
}

.proposal-empty-state {
  padding: 18px 20px;
  border: 1px solid var(--line);
  border-radius: 18px;
  color: var(--muted);
  background: var(--soft-bg);
  line-height: 1.6;
}

.operator-note-card {
  align-items: flex-start;
}

.page-controls {
  display: inline-flex;
  align-items: center;
  justify-content: flex-end;
  gap: 10px;
  flex-wrap: wrap;
}

.brand-stack {
  display: grid;
  gap: 10px;
}

.brand-lockup {
  display: inline-flex;
  align-items: center;
  gap: 12px;
  width: fit-content;
  color: var(--white);
  text-decoration: none;
}

.brand-mark {
  width: 48px;
  height: 48px;
  display: block;
  flex: 0 0 auto;
}

.brand-wordmark {
  font-family: "Syne", sans-serif;
  font-size: clamp(1.05rem, 1.8vw, 1.4rem);
  font-weight: 700;
  line-height: 1;
  letter-spacing: -0.03em;
  color: var(--white);
}

.language-switcher {
  display: inline-flex;
  gap: 8px;
  flex-wrap: wrap;
}

.theme-switcher {
  display: inline-flex;
  gap: 6px;
  flex-wrap: wrap;
}

.lang-button,
.theme-button {
  min-width: 44px;
  padding: 10px 12px;
  border-radius: 999px;
  border: 1px solid var(--line);
  background: var(--soft-bg);
  color: var(--muted);
  font: inherit;
  font-weight: 700;
  cursor: pointer;
}

.page-language-switcher {
  gap: 6px;
}

.page-language-switcher .lang-button {
  min-width: 38px;
  padding: 8px 10px;
  font-size: 0.85rem;
}

.theme-button {
  min-width: 0;
  width: 20px;
  height: 20px;
  padding: 0;
  border-radius: 999px;
  font-size: 0;
}

.theme-button.light {
  background: #ffffff;
  border-color: rgba(16, 34, 67, 0.14);
}

.theme-button.dark {
  background: #101010;
  border-color: rgba(255, 255, 255, 0.16);
}

.lang-button.active,
.theme-button.active {
  color: var(--yellow);
  border-color: rgba(255, 212, 71, 0.4);
  box-shadow: 0 0 0 3px rgba(255, 212, 71, 0.14);
}

.hidden {
  display: none !important;
}

.button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 14px 22px;
  border-radius: 999px;
  border: 0;
  font: inherit;
  font-weight: 700;
  text-decoration: none;
  transition: transform 0.18s ease, box-shadow 0.18s ease;
}

.button:hover {
  transform: translateY(-2px);
}

.button-primary {
  background: var(--yellow);
  color: var(--navy);
  box-shadow: 0 16px 30px rgba(255, 212, 71, 0.24);
}

.button-secondary {
  background: var(--soft-bg);
  border: 1px solid var(--line);
  color: var(--white);
}

.home-layout {
  width: min(1380px, calc(100% - 32px));
  margin: 0 auto;
  display: grid;
  grid-template-columns: minmax(0, 1.2fr) 360px;
  gap: 20px;
  align-items: start;
  min-height: 100vh;
  padding: 0 0 24px;
}

.planner-stage,
.routes-panel,
.routes-header,
.route-suggestion-card,
.proposal-card {
  border: 1px solid var(--line);
  border-radius: var(--radius-xl);
  background:
    linear-gradient(180deg, var(--surface-top), var(--surface-bottom)),
    linear-gradient(135deg, var(--surface-accent-a), var(--surface-accent-b));
  box-shadow: var(--shadow);
}

.planner-stage,
.routes-panel,
.route-suggestion-card,
.proposal-card {
  padding: 28px;
}

.planner-intro {
  display: grid;
  gap: 14px;
  margin-bottom: 18px;
}

.planner-intro h1 {
  font-size: clamp(1.4rem, 2.1vw, 2.1rem);
  line-height: 1.08;
  max-width: 18ch;
}

.planner-subtitle {
  color: var(--muted);
  font-size: 0.94rem;
  line-height: 1.45;
}

.planner-form {
  display: grid;
  gap: 16px;
}

.planner-row {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 14px;
}

.planner-form label {
  display: grid;
  gap: 8px;
  font-weight: 700;
  color: var(--white);
  position: relative;
}

.planner-checkbox {
  display: flex !important;
  align-items: center;
  gap: 12px !important;
  padding: 12px 14px;
  border: 1px solid var(--line);
  border-radius: 16px;
  background: var(--input-bg);
  font-weight: 600 !important;
}

.planner-checkbox input[type="checkbox"] {
  width: 20px;
  height: 20px;
  margin: 0;
  accent-color: var(--yellow);
  flex: 0 0 auto;
}

.advanced-options {
  margin-top: 2px;
  border-radius: 18px;
  border: 1px solid var(--line);
  background: rgba(255, 255, 255, 0.03);
  overflow: hidden;
}

.advanced-options summary {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 14px 18px;
  cursor: pointer;
  list-style: none;
  color: var(--white);
  font-weight: 700;
}

.advanced-options summary::-webkit-details-marker {
  display: none;
}

.advanced-options summary::after {
  content: "+";
  color: var(--yellow);
  font-size: 1.1rem;
  line-height: 1;
}

.advanced-options[open] summary::after {
  content: "−";
}

.advanced-options-body {
  display: grid;
  gap: 18px;
  padding: 0 18px 18px;
}

.advanced-options-highlight {
  border-color: rgba(255, 212, 71, 0.28);
  background: linear-gradient(180deg, rgba(255, 212, 71, 0.14), rgba(255, 255, 255, 0.03));
  box-shadow: 0 10px 24px rgba(255, 212, 71, 0.08);
}

.advanced-options-highlight summary {
  background: rgba(255, 212, 71, 0.08);
}

.advanced-options-highlight summary:hover {
  background: rgba(255, 212, 71, 0.12);
}

input,
select,
textarea {
  width: 100%;
  border: 1px solid var(--line);
  border-radius: 16px;
  padding: 14px 16px;
  font: inherit;
  color: var(--white);
  background: var(--input-bg);
}

textarea {
  min-height: 110px;
  resize: vertical;
}

small {
  color: var(--muted);
}

.input-suggestions {
  position: absolute;
  top: calc(100% - 4px);
  left: 0;
  right: 0;
  z-index: 8;
  display: grid;
  gap: 6px;
  padding: 8px;
  border-radius: 16px;
  background: rgba(7, 26, 61, 0.96);
  border: 1px solid var(--line);
  box-shadow: 0 18px 34px rgba(0, 0, 0, 0.22);
}

html[data-theme="light"] .input-suggestions {
  background: rgba(248, 251, 255, 0.98);
}

.suggestion-item {
  width: 100%;
  padding: 10px 12px;
  border: 0;
  border-radius: 12px;
  background: transparent;
  color: var(--white);
  text-align: left;
  font: inherit;
  cursor: pointer;
}

.suggestion-item:hover {
  background: rgba(255, 212, 71, 0.12);
  color: var(--yellow);
}

.planner-button[disabled] {
  opacity: 0.7;
  cursor: wait;
}

.form-status {
  min-height: 24px;
  color: var(--yellow-soft);
  font-size: 0.95rem;
}

.planner-loading {
  position: fixed;
  inset: 0;
  z-index: 3000;
  display: grid;
  place-items: center;
  padding: 24px;
  background: rgba(7, 14, 30, 0.72);
  backdrop-filter: blur(8px);
}

.planner-loading.hidden {
  display: none;
}

.planner-loading-card {
  width: min(720px, calc(100vw - 32px));
  padding: 24px;
  border-radius: 28px;
  border: 1px solid var(--line);
  background: linear-gradient(180deg, rgba(20, 37, 77, 0.98), rgba(9, 24, 54, 0.98));
  box-shadow: 0 28px 80px rgba(0, 0, 0, 0.35);
  display: grid;
  gap: 14px;
}

.planner-loading-card h2 {
  margin: 0;
  font-size: clamp(1.5rem, 2.2vw, 2rem);
  line-height: 1.1;
}

.planner-loading-copy {
  margin: 0;
  color: var(--muted);
  max-width: 56ch;
}

.planner-loading-track {
  position: relative;
  height: 110px;
  margin-top: 6px;
  overflow: hidden;
  border-radius: 18px;
  border: 1px solid rgba(255, 255, 255, 0.08);
  background:
    linear-gradient(180deg, rgba(120, 175, 255, 0.08), rgba(255, 255, 255, 0.02) 38%, rgba(29, 72, 30, 0.18) 72%, rgba(255, 212, 71, 0.08) 100%),
    rgba(255, 255, 255, 0.02);
}

.planner-loading-scenery {
  position: absolute;
  inset: 0;
  pointer-events: none;
  overflow: hidden;
}

.planner-loading-scenery-strip {
  position: absolute;
  left: -50%;
  display: flex;
  gap: 36px;
  width: 300%;
  min-width: 300%;
  bottom: 42px;
  font-size: 1.35rem;
  line-height: 1;
  opacity: 0.9;
  will-change: transform;
  animation: planner-scenery-drift 16s linear infinite;
}

.planner-loading-scenery-strip > span {
  flex: 0 0 auto;
  display: inline-flex;
  white-space: nowrap;
}

.planner-loading-scenery-strip-sky {
  top: 10px;
  bottom: auto;
  font-size: 1.05rem;
  opacity: 0.62;
  animation-duration: 34s;
}

.planner-loading-scenery-strip-near {
  bottom: 46px;
  font-size: 1.16rem;
  opacity: 0.82;
  animation-duration: 14s;
}

.planner-loading-scenery-strip-mid {
  bottom: 62px;
  font-size: 1.12rem;
  opacity: 0.74;
  animation-duration: 18s;
}

.planner-loading-scenery-strip-far {
  bottom: 82px;
  font-size: 1.02rem;
  opacity: 0.56;
  filter: saturate(0.92);
  animation-duration: 26s;
}

.planner-loading-scenery-strip-ground {
  bottom: 30px;
  font-size: 1rem;
  opacity: 0.88;
  animation-duration: 12s;
}

.planner-loading-track::before,
.planner-loading-track::after {
  content: "";
  position: absolute;
  left: 0;
  right: 0;
  height: 4px;
  background: rgba(255, 212, 71, 0.28);
}

.planner-loading-track::before {
  bottom: 26px;
}

.planner-loading-track::after {
  bottom: 10px;
}

.planner-loading-track::selection {
  background: transparent;
}

.planner-loading-train {
  position: absolute;
  left: -10%;
  bottom: 18px;
  transform: none;
  font-size: 2.35rem;
  line-height: 1;
  letter-spacing: -0.12em;
  white-space: nowrap;
  animation: planner-train-ride 2.8s linear infinite;
  filter: drop-shadow(0 5px 10px rgba(0, 0, 0, 0.22));
}

@keyframes planner-scenery-drift {
  0% {
    transform: translateX(0);
  }
  100% {
    transform: translateX(-25%);
  }
}

@keyframes planner-train-ride {
  0% {
    left: -10%;
  }
  100% {
    left: 105%;
  }
}

.example-route-box {
  display: grid;
  gap: 10px;
  margin-top: 4px;
}

.example-route-label {
  color: var(--muted);
  font-size: 0.92rem;
}

.example-route-button {
  width: fit-content;
  padding: 12px 16px;
  border: 1px solid rgba(255, 212, 71, 0.22);
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.04);
  color: var(--white);
  font: inherit;
  cursor: pointer;
  transition: transform 0.18s ease, border-color 0.18s ease;
}

.example-route-button:hover {
  transform: translateY(-2px);
  border-color: rgba(255, 212, 71, 0.48);
}

.routes-panel {
  display: grid;
  gap: 16px;
  align-content: start;
}

.routes-button {
  width: fit-content;
}

.mini-route-list {
  display: grid;
  gap: 10px;
}

.mini-route-list span {
  display: inline-flex;
  width: fit-content;
  padding: 10px 14px;
  border-radius: 999px;
  border: 1px solid rgba(255, 212, 71, 0.2);
  background: rgba(255, 255, 255, 0.04);
  color: var(--white);
  font-size: 0.92rem;
}

.routes-page,
.proposal-page {
  width: min(1380px, calc(100% - 32px));
  margin: 0 auto;
  padding: 0 0 48px;
}

.routes-header,
.proposal-header {
  display: flex;
  justify-content: space-between;
  gap: 18px;
  align-items: flex-start;
  margin-bottom: 20px;
}

.routes-header-copy {
  display: grid;
  gap: 10px;
}

.admin-page {
  width: min(1380px, calc(100% - 32px));
  margin: 0 auto;
  padding: 24px 0 48px;
  display: grid;
  gap: 20px;
}

.admin-card {
  border: 1px solid var(--line);
  border-radius: var(--radius-xl);
  background:
    linear-gradient(180deg, var(--surface-top), var(--surface-bottom)),
    linear-gradient(135deg, var(--surface-accent-a), var(--surface-accent-b));
  box-shadow: var(--shadow);
  padding: 24px;
}

.admin-shell,
.admin-grid,
.admin-form,
.admin-actions,
.admin-routes-list {
  display: grid;
  gap: 16px;
}

.admin-grid {
  grid-template-columns: 1.1fr 0.9fr;
}

.admin-config-card {
  display: grid;
  gap: 18px;
}

.admin-section-heading {
  display: flex;
  justify-content: space-between;
  align-items: start;
  gap: 20px;
}

.admin-section-heading p,
.admin-config-note,
.admin-form small {
  margin: 0;
  color: var(--muted);
}

.admin-config-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 16px;
}

.admin-config-links {
  display: flex;
  flex-wrap: wrap;
  gap: 12px 18px;
}

.admin-header {
  display: flex;
  justify-content: space-between;
  align-items: start;
  gap: 16px;
}

.admin-tabs {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
}

.admin-tab-button {
  min-height: 44px;
  padding: 10px 16px;
  border: 1px solid var(--line);
  border-radius: 999px;
  background: var(--soft-bg);
  color: var(--muted);
  font: inherit;
  font-weight: 700;
  cursor: pointer;
}

.admin-tab-button.active {
  background: rgba(255, 212, 71, 0.16);
  border-color: rgba(255, 212, 71, 0.32);
  color: var(--yellow);
}

.admin-tab-panel {
  display: none;
}

.admin-tab-panel.active {
  display: grid;
  gap: 18px;
}

.admin-preview,
.saved-route-card {
  padding: 16px;
  border-radius: 16px;
  background: var(--soft-bg);
  border: 1px solid var(--line);
}

.admin-form textarea {
  min-height: 92px;
  border: 1px solid var(--line);
  border-radius: 16px;
  padding: 14px 16px;
  font: inherit;
  color: var(--white);
  background: var(--input-bg);
}

.admin-preview-block {
  display: grid;
  gap: 10px;
}

.admin-preview-block ul {
  margin: 0;
  padding-left: 18px;
}

.admin-inline-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
}

.admin-progress-block {
  display: grid;
  gap: 8px;
}

.admin-progress-meta {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  font-size: 0.88rem;
  color: var(--muted);
}

.admin-progress-step {
  margin: 0;
  font-size: 0.82rem;
  color: var(--muted);
  letter-spacing: 0.01em;
}

.admin-progress-track {
  width: 100%;
  height: 10px;
  border-radius: 999px;
  overflow: hidden;
  border: 1px solid var(--line);
  background: rgba(255, 255, 255, 0.08);
}

.admin-progress-fill {
  height: 100%;
  width: 0;
  border-radius: inherit;
  background: linear-gradient(90deg, rgba(255, 212, 71, 0.72), rgba(255, 212, 71, 1));
  transition: width 0.35s ease;
  box-shadow: 0 0 18px rgba(255, 212, 71, 0.22);
}

.admin-stopover-shell,
.admin-stopovers-list {
  display: grid;
  gap: 12px;
}

.admin-stopover-row {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 10px;
}

.admin-feed-row {
  display: grid;
  grid-template-columns: 110px minmax(0, 1fr) auto;
  gap: 10px;
  align-items: end;
}

.admin-feed-source-label {
  min-width: 0;
}

.station-input-wrap {
  position: relative;
}

.button-small {
  padding: 10px 14px;
  min-height: auto;
  font-size: 0.92rem;
}

.add-stop-button {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  padding: 12px 18px;
  min-height: 46px;
  color: var(--navy);
  background: linear-gradient(180deg, rgba(255, 212, 71, 1), rgba(255, 198, 31, 1));
  border: 1px solid rgba(255, 212, 71, 0.34);
  box-shadow: 0 18px 36px rgba(255, 212, 71, 0.26);
  font-weight: 800;
}

.add-stop-button:hover {
  transform: translateY(-1px);
  box-shadow: 0 22px 40px rgba(255, 212, 71, 0.32);
}

.add-stop-button:focus-visible {
  outline: 2px solid rgba(255, 212, 71, 0.65);
  outline-offset: 3px;
}

.add-stop-plus {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 24px;
  height: 24px;
  border-radius: 999px;
  background: rgba(7, 26, 61, 0.16);
  font-size: 1.08rem;
  font-weight: 800;
  line-height: 1;
}

[data-theme="light"] .add-stop-button {
  color: var(--navy);
  border-color: rgba(7, 26, 61, 0.08);
  box-shadow: 0 12px 22px rgba(7, 26, 61, 0.08);
}

[data-theme="light"] .add-stop-plus {
  background: rgba(7, 26, 61, 0.08);
}

.routes-header {
  padding: 28px;
}

.routes-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 18px;
}

.top-routes-panel {
  display: grid;
  gap: 18px;
  margin-bottom: 18px;
}

.top-routes-head {
  display: flex;
  align-items: end;
  justify-content: space-between;
  gap: 12px;
}

.top-routes-list {
  display: grid;
  grid-template-columns: repeat(5, minmax(0, 1fr));
  gap: 12px;
}

.top-route-item {
  display: grid;
  gap: 10px;
  padding: 16px;
  border-radius: 18px;
  background: rgba(255, 255, 255, 0.04);
  border: 1px solid rgba(255, 255, 255, 0.08);
}

.top-route-rank {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 32px;
  height: 32px;
  border-radius: 999px;
  background: rgba(255, 212, 71, 0.16);
  color: var(--yellow);
  font-weight: 800;
}

.top-route-copy,
.top-route-meta,
.route-vote-block,
.route-vote-head {
  display: grid;
  gap: 6px;
}

.top-route-copy strong {
  color: var(--white);
}

.top-route-copy span,
.top-route-meta span,
.route-vote-summary,
.route-vote-feedback {
  color: var(--muted);
}

.route-suggestion-card {
  display: grid;
  gap: 14px;
}

.route-vote-actions {
  display: flex;
  gap: 10px;
  flex-wrap: wrap;
}

.route-video-block {
  display: grid;
  gap: 10px;
}

.route-video-frame {
  position: relative;
  width: 100%;
  padding-top: 56.25%;
  overflow: hidden;
  border-radius: 18px;
  border: 1px solid rgba(255, 255, 255, 0.08);
  background: rgba(255, 255, 255, 0.03);
}

.route-video-frame iframe {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  border: 0;
}

.route-vote-button {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  min-height: 42px;
  padding: 10px 14px;
  border-radius: 999px;
  border: 1px solid rgba(255, 255, 255, 0.12);
  background: rgba(255, 255, 255, 0.04);
  color: var(--white);
  font: inherit;
  font-weight: 700;
  cursor: pointer;
}

.route-vote-button:hover:not(:disabled) {
  border-color: rgba(255, 212, 71, 0.32);
  background: rgba(255, 212, 71, 0.08);
}

.route-vote-button-down:hover:not(:disabled) {
  border-color: rgba(255, 122, 122, 0.35);
  background: rgba(255, 122, 122, 0.08);
}

.route-vote-button:disabled {
  opacity: 0.55;
  cursor: default;
}

.route-vote-feedback {
  min-height: 1.2em;
  margin: 0;
  font-size: 0.9rem;
}

.home-top-routes {
  display: grid;
  gap: 12px;
  margin-top: 22px;
  padding-top: 18px;
  border-top: 1px solid rgba(255, 255, 255, 0.08);
}

.home-top-routes-list {
  display: grid;
  gap: 10px;
}

.home-top-route-item {
  display: grid;
  gap: 10px;
  padding: 14px;
  border-radius: 18px;
  background: rgba(255, 255, 255, 0.04);
  border: 1px solid rgba(255, 255, 255, 0.08);
}

.home-top-route-rank {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 28px;
  height: 28px;
  border-radius: 999px;
  background: rgba(255, 212, 71, 0.16);
  color: var(--yellow);
  font-weight: 800;
}

.home-top-route-copy {
  display: grid;
  gap: 4px;
}

.home-top-route-copy strong {
  color: var(--white);
}

.home-top-route-copy span,
.home-top-route-copy small {
  color: var(--muted);
}

.proposal-head-copy {
  display: grid;
  gap: 8px;
}

.proposal-route-ribbon {
  display: grid;
  gap: 12px;
  padding: 14px 16px 16px;
  border-radius: 20px;
  background: linear-gradient(135deg, rgba(255, 212, 71, 0.12), rgba(255, 255, 255, 0.03));
  border: 1px solid rgba(255, 212, 71, 0.16);
}

.proposal-route-ribbon h1 {
  font-size: clamp(1.15rem, 1.7vw, 1.45rem);
  line-height: 1.2;
  letter-spacing: -0.03em;
}

.proposal-route-stops {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
}

.route-stop-chip {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 8px 12px;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.05);
  border: 1px solid rgba(255, 255, 255, 0.08);
  color: var(--white);
  font-size: 0.92rem;
  font-weight: 700;
}

.route-stop-chip span {
  display: inline-flex;
  align-items: center;
  gap: 6px;
}

.route-stop-chip::after {
  content: "";
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: var(--yellow);
}

.route-stop-chip:last-child::after {
  display: none;
}

.back-link {
  color: var(--white);
  text-decoration: none;
  font-weight: 700;
}

.proposal-summary {
  display: grid;
  justify-items: end;
  gap: 10px;
  color: var(--muted);
  font-weight: 700;
  padding-top: 6px;
}

.proposal-summary span {
  white-space: nowrap;
}

.proposal-share-header-button {
  width: fit-content;
}

.proposal-header-meta {
  display: grid;
  gap: 12px;
  justify-items: end;
  min-width: min(100%, 360px);
}

.proposal-filters-card {
  width: min(100%, 360px);
  padding: 18px 20px;
}

.proposal-grid {
  display: grid;
  grid-template-columns: minmax(0, 1.3fr) minmax(320px, 0.7fr);
  gap: 20px;
  align-items: start;
}

.proposal-side {
  display: grid;
  gap: 16px;
}

.booking-steps-card {
  margin-top: 20px;
}

.cost-summary,
.cost-breakdown,
.day-overview {
  display: grid;
  gap: 12px;
}

.day-card {
  display: grid;
  gap: 8px;
  padding: 12px 14px;
  border-radius: 14px;
  background: rgba(255, 255, 255, 0.04);
  border: 1px solid rgba(255, 255, 255, 0.08);
}

.day-card-top,
.timeline-day-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
}

.day-card-top strong,
.timeline-day-header span,
.timeline-day-header strong {
  color: var(--white);
}

.day-title {
  color: var(--white);
  font-weight: 700;
  display: flex;
  align-items: center;
  gap: 8px;
  flex-wrap: wrap;
}

.day-title-text {
  color: var(--white);
}

.day-segments {
  color: var(--muted);
  font-size: 0.95rem;
}

.day-ticket-row {
  display: flex;
  align-items: center;
  gap: 10px;
  color: var(--muted);
  font-size: 0.92rem;
  font-weight: 700;
}

.day-ticket-empty {
  color: var(--muted);
}

.day-interrail {
  display: inline-flex;
  align-items: center;
  padding: 6px 10px;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.05);
  border: 1px solid rgba(255, 255, 255, 0.08);
  color: var(--muted);
  font-size: 0.82rem;
  font-weight: 700;
}

.day-interrail.active,
.timeline-day-header strong.active {
  background: rgba(255, 212, 71, 0.12);
  color: var(--yellow);
}

.timeline-day-header {
  padding: 8px 2px 0;
}

.timeline-day-header strong {
  display: inline-flex;
  align-items: center;
  padding: 6px 10px;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.05);
  border: 1px solid rgba(255, 255, 255, 0.08);
  color: var(--muted);
  font-size: 0.82rem;
  font-weight: 700;
}

.cost-total,
.cost-line {
  display: flex;
  align-items: start;
  justify-content: space-between;
  gap: 12px;
}

.cost-total strong,
.cost-line strong {
  display: block;
  color: var(--white);
}

.cost-total {
  margin-top: 6px;
  padding-top: 14px;
  border-top: 1px solid rgba(255, 255, 255, 0.08);
}

.cost-total span,
.cost-line > span {
  color: var(--yellow);
  font-weight: 700;
  white-space: nowrap;
}

.cost-line div {
  display: grid;
  gap: 4px;
}

.cost-line div span,
.cost-summary-copy,
.timeline-ticket-plan {
  color: var(--muted);
}

.pass-compare {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 12px 14px;
  border-radius: 14px;
  background: var(--soft-bg);
  border: 1px solid var(--line);
}

.pass-compare-mark {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 24px;
  height: 24px;
  border-radius: 999px;
  font-weight: 800;
}

.pass-compare.selected .pass-compare-mark {
  background: rgba(34, 197, 94, 0.16);
  color: #22c55e;
}

.pass-compare.not-selected .pass-compare-mark {
  background: rgba(239, 68, 68, 0.16);
  color: #ef4444;
}

.pass-compare-copy {
  display: grid;
  gap: 2px;
}

.pass-compare-copy strong {
  color: var(--white);
}

.pass-compare-copy span {
  color: var(--muted);
}

.pass-compare-copy em {
  font-style: normal;
  font-size: 0.9rem;
  font-weight: 700;
}

.pass-compare.selected .pass-compare-copy em {
  color: #22c55e;
}

.pass-compare.not-selected .pass-compare-copy em {
  color: #ef4444;
}

.timeline-ticket-plan {
  font-weight: 700;
}

.operator-overview {
  display: grid;
  gap: 10px;
}

.operator-card {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 12px 14px;
  border-radius: 14px;
  background: rgba(255, 255, 255, 0.04);
  border: 1px solid rgba(255, 255, 255, 0.08);
  color: var(--white);
  font-weight: 700;
}

.booking-steps {
  margin-top: 18px;
}

.booking-step-list {
  display: grid;
  gap: 12px;
  list-style: none;
  padding: 0;
  margin: 0;
}

.booking-step-item {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 16px;
  padding: 14px 16px;
  border-radius: 16px;
  background: rgba(255, 255, 255, 0.04);
  border: 1px solid rgba(255, 255, 255, 0.08);
}

.booking-step-copy {
  display: grid;
  gap: 4px;
}

.booking-step-copy strong {
  color: var(--white);
}

.booking-step-copy span {
  color: var(--muted);
}

.booking-step-side {
  display: grid;
  justify-items: end;
  gap: 8px;
}

.booking-step-side span {
  color: var(--yellow);
  font-weight: 700;
  white-space: nowrap;
}

.booking-link {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 34px;
  padding: 0 12px;
  border-radius: 999px;
  border: 1px solid rgba(255, 212, 71, 0.22);
  color: var(--white);
  text-decoration: none;
  font-weight: 700;
  background: rgba(255, 255, 255, 0.04);
}

.booking-link:hover {
  border-color: rgba(255, 212, 71, 0.42);
  color: var(--yellow);
}

.route-map {
  overflow: hidden;
  border-radius: 18px;
  min-height: 220px;
  background:
    radial-gradient(circle at top left, rgba(255, 212, 71, 0.08), transparent 32%),
    rgba(255, 255, 255, 0.03);
  border: 1px solid rgba(255, 255, 255, 0.08);
}

.proposal-map-head {
  align-items: center;
}

.route-map-large {
  min-height: min(72vh, 760px);
}

.route-map .leaflet-container {
  width: 100%;
  min-height: 220px;
  background: #0a1836;
}

.route-map-large .leaflet-container {
  min-height: min(72vh, 760px);
}

.route-map .leaflet-control-attribution {
  background: rgba(7, 26, 61, 0.72);
  color: rgba(223, 232, 255, 0.72);
  font-size: 9px;
}

.route-map .leaflet-control-attribution a {
  color: var(--yellow);
}

.route-map-label {
  background: rgba(7, 26, 61, 0.92);
  color: var(--white);
  border: 1px solid rgba(255, 212, 71, 0.18);
  border-radius: 999px;
  box-shadow: none;
  font-family: "Space Grotesk", sans-serif;
  font-size: 11px;
  font-weight: 700;
  padding: 4px 8px;
  pointer-events: none;
  white-space: nowrap;
}

.route-map-label::before {
  display: none;
}

.route-map-label-large {
  font-size: 12px;
  padding: 6px 10px;
  border-color: rgba(255, 212, 71, 0.28);
  box-shadow: 0 10px 24px rgba(0, 0, 0, 0.18);
}

.route-map-label-stop {
  background: rgba(7, 26, 61, 0.82);
  border-color: rgba(255, 255, 255, 0.08);
  font-size: 10px;
}

html[data-theme="light"] .route-map-label,
html[data-theme="light"] .route-map-label-stop {
  color: #f8fbff;
  background: rgba(7, 26, 61, 0.92);
  border-color: rgba(255, 212, 71, 0.24);
  box-shadow: 0 8px 20px rgba(7, 26, 61, 0.18);
}

html[data-theme="light"] .route-map-label-stop {
  background: rgba(17, 41, 88, 0.88);
  border-color: rgba(255, 255, 255, 0.14);
}

.map-modal {
  position: fixed;
  inset: 0;
  z-index: 4000;
  display: grid;
  place-items: center;
  padding: 20px;
}

.map-modal.hidden {
  display: none;
}

.map-modal-backdrop {
  position: absolute;
  inset: 0;
  background: rgba(7, 14, 30, 0.72);
  backdrop-filter: blur(6px);
}

.map-modal-card {
  position: relative;
  z-index: 2;
  width: min(1100px, calc(100vw - 24px));
  padding: 18px;
  border-radius: 24px;
  background: var(--card-bg);
  border: 1px solid var(--line);
  box-shadow: 0 28px 80px rgba(0, 0, 0, 0.38);
}

.map-modal .leaflet-container,
.map-modal .leaflet-pane,
.map-modal .leaflet-control-container {
  z-index: auto;
}

body.modal-open {
  overflow: hidden;
}

.filter-chips {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
}

.filter-chip {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 10px 14px;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.04);
  border: 1px solid rgba(255, 255, 255, 0.1);
  color: var(--muted);
  font-weight: 700;
}

.filter-chip.active {
  background: rgba(255, 212, 71, 0.14);
  border-color: rgba(255, 212, 71, 0.32);
  color: var(--yellow);
}

.operator-icon {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 22px;
  height: 22px;
  border-radius: 999px;
  font-size: 0.7rem;
  font-weight: 800;
  letter-spacing: 0.02em;
  color: #071a3d;
  background: var(--yellow);
  flex: 0 0 auto;
}

.operator-logo {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 34px;
  height: 22px;
  border-radius: 8px;
  overflow: hidden;
  background: rgba(255, 255, 255, 0.96);
  flex: 0 0 auto;
}

.operator-logo img {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: contain;
}

.city-flag {
  display: inline-flex;
  align-items: center;
  line-height: 1;
  font-size: 1rem;
}

.operator-icon.db {
  background: #ff6b6b;
}

.operator-icon.generic {
  background: #cbd5e1;
  color: #0f172a;
}

.operator-icon.eurostar {
  background: #60a5fa;
}

.operator-icon.sncb {
  background: #fbbf24;
}

.operator-icon.ns {
  background: #fb923c;
}

.operator-icon.govolta {
  background: #6ee7c8;
}

.operator-icon.sleeper {
  background: #a7f3d0;
}

.operator-icon.nightjet {
  background: #93c5fd;
}

.operator-icon.eurobahn {
  background: #f9a8d4;
}

.operator-icon.interrail {
  background: #ffd447;
}

.operator-icon.deutschlandticket {
  background: #86efac;
}

.filter-chip,
.timeline-meta,
.timeline-ticket-plan,
.day-ticket-row {
  display: flex;
  align-items: center;
  gap: 8px;
  flex-wrap: wrap;
}

.timeline-city-line {
  display: flex;
  align-items: center;
  gap: 8px;
  flex-wrap: wrap;
}

.timeline-arrow {
  color: rgba(255, 255, 255, 0.42);
}

.timeline-separator {
  color: rgba(255, 255, 255, 0.32);
}

.proposal-card-head {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
}

.proposal-share-panel {
  margin-top: 16px;
  display: grid;
  gap: 12px;
}

.proposal-share-panel.hidden {
  display: none;
}

.proposal-share-actions {
  display: flex;
  gap: 10px;
  flex-wrap: wrap;
}

.timeline {
  display: grid;
  gap: 14px;
  margin-top: 20px;
}

.timeline-item,
.transfer-row {
  display: grid;
  grid-template-columns: 88px 20px minmax(0, 1fr);
  gap: 12px;
  align-items: start;
}

.timeline-time {
  text-align: right;
  padding-top: 2px;
}

.timeline-time strong {
  display: block;
  color: var(--white);
  font-size: 1.15rem;
}

.timeline-time span {
  color: #8fd27d;
  font-size: 0.92rem;
}

.timeline-time small {
  display: block;
  margin-top: 4px;
  color: var(--muted);
  font-size: 0.88rem;
}

.timeline-line {
  position: relative;
  display: flex;
  justify-content: center;
  min-height: 100%;
}

.timeline-line::before {
  content: "";
  position: absolute;
  top: 0;
  bottom: -26px;
  width: 2px;
  background: rgba(255, 255, 255, 0.28);
}

.timeline-dot {
  position: relative;
  z-index: 1;
  width: 12px;
  height: 12px;
  margin-top: 8px;
  border-radius: 50%;
  background: var(--yellow);
  box-shadow: 0 0 0 5px rgba(255, 212, 71, 0.16);
}

.timeline-content {
  padding: 16px 18px;
  border-radius: 18px;
  background: var(--soft-bg);
  border: 1px solid var(--line);
  display: grid;
  gap: 8px;
}

.timeline-meta,
.timeline-note,
.timeline-headsign,
.timeline-coverage {
  color: var(--muted);
}

.timeline-headsign {
  margin-top: -2px;
  line-height: 1.45;
}

.timeline-headsign strong {
  color: var(--text);
}

.timeline-product-badge {
  display: inline-flex;
  align-items: center;
  padding: 4px 10px;
  border-radius: 999px;
  border: 1px solid rgba(255, 212, 71, 0.28);
  background: rgba(255, 212, 71, 0.12);
  color: var(--text);
  font-size: 0.78rem;
  font-weight: 800;
  letter-spacing: 0.04em;
}

html[data-theme="light"] .timeline-product-badge {
  border-color: rgba(16, 34, 67, 0.18);
  background: rgba(255, 212, 71, 0.22);
}

.timeline-coverage {
  margin-top: -2px;
  font-weight: 700;
}

.timeline-coverage-yes {
  color: #a7ef9f;
}

.proposal-logic-list {
  margin: 0;
  padding-left: 18px;
  display: grid;
  gap: 10px;
  color: var(--muted);
}

.proposal-logic-list li {
  line-height: 1.5;
}

.proposal-logic-story {
  display: grid;
  gap: 12px;
  color: var(--muted);
}

.proposal-logic-story p {
  margin: 0;
  line-height: 1.65;
}

.proposal-logic-story strong {
  color: var(--text);
  font-weight: 700;
}

.timeline-info {
  position: relative;
  width: fit-content;
  margin-top: 2px;
}

.timeline-info summary {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 30px;
  padding: 0 12px;
  border-radius: 999px;
  border: 1px solid var(--line);
  background: var(--soft-bg);
  color: var(--muted);
  font-size: 0.88rem;
  font-weight: 700;
  cursor: pointer;
  list-style: none;
  white-space: nowrap;
}

.timeline-info summary::-webkit-details-marker {
  display: none;
}

.timeline-info[open] summary,
.timeline-info summary:hover {
  color: var(--yellow);
  border-color: rgba(255, 212, 71, 0.28);
}

.timeline-tooltip {
  position: absolute;
  top: calc(100% + 10px);
  left: 0;
  z-index: 4;
  min-width: min(320px, 75vw);
  padding: 12px 14px;
  border-radius: 14px;
  background: rgba(7, 26, 61, 0.96);
  border: 1px solid rgba(255, 255, 255, 0.1);
  box-shadow: 0 18px 34px rgba(0, 0, 0, 0.28);
  color: var(--muted);
}

.timeline-tooltip p + p {
  margin-top: 8px;
}

.timeline-ticket {
  display: inline-flex;
  width: fit-content;
  margin-top: 4px;
  padding: 8px 12px;
  border-radius: 999px;
  background: rgba(255, 212, 71, 0.12);
  color: var(--yellow);
  font-weight: 700;
}

.transfer-badge {
  padding: 10px 14px;
  border-radius: 14px;
  background: rgba(255, 255, 255, 0.05);
  border: 1px solid rgba(255, 255, 255, 0.08);
  color: var(--muted);
}

@media (max-width: 1100px) {
  .home-layout,
  .proposal-grid,
  .routes-grid,
  .top-routes-list,
  .admin-grid {
    grid-template-columns: 1fr;
  }

  .admin-config-grid,
  .admin-section-heading {
    display: grid;
    grid-template-columns: 1fr;
  }

  .admin-feed-row {
    grid-template-columns: 1fr;
  }

  .home-layout {
    min-height: auto;
  }

  .proposal-header {
    flex-direction: column;
  }

  .proposal-header-meta {
    width: 100%;
    min-width: 0;
    justify-items: stretch;
  }

  .proposal-filters-card {
    width: 100%;
  }
}

@media (max-width: 760px) {
  .home-layout,
  .routes-page,
  .proposal-page {
    width: min(100% - 20px, 1380px);
    padding-top: 0;
  }

  .page-brand {
    width: min(100% - 20px, 1380px);
    padding: 16px 0 8px;
    align-items: flex-start;
    flex-direction: column;
  }

  .site-footer {
    width: min(100% - 20px, 1380px);
  }

  .page-controls {
    width: 100%;
    justify-content: flex-start;
  }

  .planner-stage,
  .routes-panel,
  .routes-header,
  .route-suggestion-card,
  .proposal-card {
    padding: 20px;
  }

  .planner-row,
  .routes-header,
  .proposal-header {
    grid-template-columns: 1fr;
    flex-direction: column;
  }

  .top-tools {
    flex-direction: column;
    align-items: flex-start;
  }

  .timeline-item,
  .transfer-row {
    grid-template-columns: 62px 16px minmax(0, 1fr);
  }

  .booking-step-item {
    flex-direction: column;
  }

  .booking-step-side {
    justify-items: start;
  }

  .proposal-route-ribbon h1 {
    font-size: 1.05rem;
  }
}

/* Planner entry v2. Keep this block last: it also prevents stale generic rules
   from flattening the guided experience. */
[hidden] {
  display: none !important;
}

.wizard-home .wizard-page {
  width: min(1120px, calc(100% - 40px));
  padding: 0 0 88px;
}

.mode-gateway {
  display: grid;
  align-content: center;
  min-height: calc(100vh - 118px);
  padding: 70px 0 110px;
}

.mode-gateway-copy {
  max-width: 850px;
  margin-bottom: 48px;
}

.mode-gateway h1 {
  max-width: 820px;
  font-size: clamp(3rem, 6.2vw, 6rem);
  line-height: 0.95;
  letter-spacing: -0.045em;
}

.mode-gateway .editorial-lede {
  max-width: 690px;
  margin-top: 22px;
}

.mode-choice-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 18px;
}

.mode-choice {
  display: grid;
  grid-template-columns: auto minmax(0, 1fr) auto;
  gap: 20px;
  align-items: center;
  min-height: 168px;
  padding: 28px 30px;
  color: var(--ink);
  text-align: left;
  font: inherit;
  background: rgba(255, 255, 255, 0.045);
  border: 1px solid var(--line);
  border-radius: 20px;
  cursor: pointer;
  box-shadow: 0 18px 50px rgba(2, 10, 30, 0.16);
  transition: transform 180ms ease, border-color 180ms ease, background 180ms ease;
}

.mode-choice-wizard {
  color: #071a3d;
  background: var(--yellow);
  border-color: var(--yellow);
}

.mode-choice:hover,
.mode-choice:focus-visible {
  transform: translateY(-4px);
  border-color: var(--yellow);
  outline: none;
}

.mode-choice-icon {
  display: grid;
  place-items: center;
  width: 58px;
  height: 58px;
  color: var(--yellow);
  background: rgba(255, 212, 71, 0.09);
  border: 1px solid rgba(255, 212, 71, 0.25);
  border-radius: 16px;
  font-size: 1.75rem;
}

.mode-choice-wizard .mode-choice-icon {
  color: var(--yellow);
  background: #071a3d;
  border-color: #071a3d;
}

.mode-choice-body {
  display: grid;
  gap: 8px;
}

.mode-choice-body strong {
  color: inherit;
  font: 700 clamp(1.35rem, 2.3vw, 2rem) "Fraunces", "Syne", serif;
}

.mode-choice-body small {
  color: inherit;
  opacity: 0.72;
  font-size: 0.98rem;
  line-height: 1.5;
}

.mode-choice-arrow {
  font-size: 1.8rem;
  transition: transform 180ms ease;
}

.mode-choice:hover .mode-choice-arrow {
  transform: translateX(5px);
}

.mode-ideas {
  margin-top: 26px;
  color: var(--muted);
  text-align: center;
}

.mode-ideas a {
  color: var(--yellow);
  font-weight: 700;
}

.wizard-home .wizard-shell {
  width: 100%;
  margin-top: 40px;
  background: linear-gradient(145deg, rgba(16, 42, 95, 0.82), rgba(4, 17, 42, 0.92));
  border: 1px solid rgba(255, 255, 255, 0.11);
  border-radius: 28px;
  box-shadow: 0 30px 90px rgba(1, 8, 24, 0.34);
}

html[data-theme="light"] .wizard-home .wizard-shell {
  background: linear-gradient(145deg, rgba(255, 255, 255, 0.96), rgba(239, 245, 255, 0.98));
}

.change-mode-button {
  margin: 0 0 30px;
  padding: 0;
  color: var(--muted);
  font: 700 0.82rem "DM Sans", sans-serif;
  background: transparent;
  border: 0;
  cursor: pointer;
}

.change-mode-button:hover {
  color: var(--yellow);
}

.guided-mode .wizard-rail {
  background: rgba(1, 10, 30, 0.18);
  border-right-color: var(--line);
}

.guided-mode .wizard-progress li > span:last-child {
  display: block;
  width: auto;
  height: auto;
  color: inherit;
  text-align: left;
  background: transparent;
  border: 0;
  border-radius: 0;
  font-size: 0.9rem;
}

.guided-mode .wizard-step {
  min-height: 650px;
}

.manual-mode {
  display: block;
}

.manual-mode .wizard-rail {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
  padding: 24px 30px;
  border: 0;
  border-bottom: 1px solid var(--line);
  background: transparent;
}

.manual-mode .wizard-rail .eyebrow,
.manual-mode .wizard-progress,
.manual-mode .wizard-rail-note {
  display: none;
}

.manual-mode .wizard-rail h2 {
  font-size: clamp(1.35rem, 2.5vw, 2rem);
}

.manual-mode .change-mode-button {
  margin: 0;
  order: 2;
}

.manual-mode .wizard-form {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 16px;
  padding: 20px;
}

.manual-mode .wizard-step {
  display: block;
  min-height: 0;
  padding: 28px;
  background: rgba(255, 255, 255, 0.035);
  border: 1px solid var(--line);
  border-radius: 18px;
}

.manual-mode .wizard-step[data-wizard-step="2"],
.manual-mode .wizard-step[data-wizard-step="5"] {
  grid-column: 1 / -1;
}

.manual-mode .wizard-step h2 {
  font-size: clamp(1.55rem, 2.8vw, 2.35rem);
}

.manual-mode .wizard-step-copy {
  margin: 10px 0 24px;
  font-size: 0.96rem;
}

.manual-mode .wizard-step:not(:last-child) .wizard-actions,
.manual-mode [data-wizard-back] {
  display: none;
}

.manual-mode .choice-grid {
  grid-template-columns: repeat(2, 1fr);
}

.manual-mode .priority-grid {
  grid-template-columns: repeat(2, 1fr);
}

.manual-mode .human-promise {
  transform: none;
}

.wizard-home .human-proof {
  padding-top: 56px;
}

@media (max-width: 820px) {
  .mode-choice-grid,
  .manual-mode .wizard-form {
    grid-template-columns: 1fr;
  }

  .manual-mode .wizard-step[data-wizard-step="2"],
  .manual-mode .wizard-step[data-wizard-step="5"] {
    grid-column: auto;
  }

  .guided-mode {
    grid-template-columns: 1fr;
  }

  .guided-mode .wizard-rail {
    border-right: 0;
    border-bottom: 1px solid var(--line);
  }

  .guided-mode .wizard-progress li > span:last-child {
    display: none;
  }
}

@media (max-width: 560px) {
  .wizard-home .wizard-page {
    width: min(100% - 22px, 1120px);
  }

  .mode-gateway {
    min-height: auto;
    padding: 62px 0 80px;
  }

  .mode-gateway h1 {
    font-size: clamp(2.8rem, 14vw, 4.2rem);
  }

  .mode-choice {
    grid-template-columns: auto minmax(0, 1fr);
    min-height: 142px;
    padding: 22px;
  }

  .mode-choice-arrow {
    display: none;
  }

  .manual-mode .wizard-rail {
    align-items: flex-start;
    flex-direction: column;
  }

  .manual-mode .change-mode-button {
    order: 0;
  }

  .manual-mode .wizard-form,
  .manual-mode .wizard-step {
    padding: 14px;
  }

  .manual-mode .choice-grid,
  .manual-mode .priority-grid {
    grid-template-columns: 1fr;
  }
}

/* Selection cards and proposal story v3. */
.choice-card,
.priority-grid label {
  display: grid;
  grid-template-columns: 46px minmax(0, 1fr) 28px;
  grid-template-rows: auto auto;
  align-items: center;
  gap: 5px 14px;
  min-height: 128px;
  padding: 20px;
}

.choice-card .choice-icon,
.priority-grid .choice-icon {
  grid-column: 1;
  grid-row: 1 / span 2;
  display: grid;
  place-items: center;
  width: 46px;
  height: 46px;
  color: var(--yellow);
  background: rgba(255, 212, 71, 0.09);
  border: 1px solid rgba(255, 212, 71, 0.22);
  border-radius: 14px;
  font: 700 1.4rem "DM Sans", sans-serif;
}

.choice-card .choice-copy,
.priority-grid .choice-copy {
  grid-column: 2;
  grid-row: 1;
  align-self: end;
  line-height: 1.25;
}

.choice-card small {
  grid-column: 2;
  grid-row: 2;
  align-self: start;
}

.choice-card input[type="checkbox"],
.priority-grid input[type="checkbox"] {
  position: static;
  grid-column: 3;
  grid-row: 1 / span 2;
  width: 24px;
  height: 24px;
  margin: 0;
  padding: 0;
  appearance: none;
  color: #071a3d;
  background: transparent;
  border: 2px solid rgba(255, 255, 255, 0.42);
  border-radius: 50%;
  cursor: pointer;
}

.choice-card input[type="checkbox"]:checked,
.priority-grid input[type="checkbox"]:checked {
  display: grid;
  place-items: center;
  background: var(--yellow);
  border-color: var(--yellow);
}

.choice-card input[type="checkbox"]:checked::after,
.priority-grid input[type="checkbox"]:checked::after {
  content: "✓";
  font-size: 0.82rem;
  font-weight: 900;
}

.choice-card:has(input:checked) .choice-icon,
.priority-grid label:has(input:checked) .choice-icon {
  color: #071a3d;
  background: var(--yellow);
  border-color: var(--yellow);
}

.priority-grid label {
  min-height: 94px;
  grid-template-rows: 1fr;
}

.priority-grid .choice-icon,
.priority-grid .choice-copy,
.priority-grid input[type="checkbox"] {
  grid-row: 1;
}

.proposal-page {
  display: grid;
  gap: 22px;
}

.proposal-page .proposal-header,
.proposal-page .human-verdict-card,
.proposal-page .proposal-grid,
.proposal-page .journey-story,
.proposal-page .booking-steps-card {
  margin: 0;
}

.human-trip-badges span {
  display: inline-flex;
  align-items: center;
  min-height: 32px;
  padding: 7px 12px;
  border-radius: 999px;
}

.journey-story {
  padding: clamp(28px, 4vw, 48px);
}

.journey-story-head {
  max-width: 760px;
  margin-bottom: 34px;
}

.journey-story-head h2 {
  margin-top: 6px;
  font-size: clamp(2rem, 4vw, 3.6rem);
  line-height: 1;
}

.journey-story-flow {
  position: relative;
  display: grid;
  gap: 0;
}

.journey-story-flow::before {
  content: "";
  position: absolute;
  top: 28px;
  bottom: 28px;
  left: 26px;
  width: 2px;
  background: linear-gradient(var(--yellow), rgba(255, 212, 71, 0.14));
}

.story-chapter {
  position: relative;
  display: grid;
  grid-template-columns: 54px minmax(0, 1fr);
  gap: 24px;
  padding: 22px 0;
}

.story-icon {
  position: relative;
  z-index: 1;
  display: grid;
  place-items: center;
  width: 54px;
  height: 54px;
  color: #071a3d;
  background: var(--yellow);
  border: 7px solid color-mix(in srgb, var(--navy) 85%, transparent);
  border-radius: 50%;
  font-size: 1.15rem;
  font-weight: 900;
}

.story-chapter h3 {
  margin: 2px 0 8px;
  font: 700 clamp(1.3rem, 2.4vw, 1.8rem) "Fraunces", serif;
}

.story-chapter p {
  max-width: 940px;
  color: var(--muted);
  line-height: 1.72;
}

.story-chapter p + p {
  margin-top: 10px;
}

.story-emphasis {
  color: var(--ink) !important;
  font-weight: 600;
}

.story-source-note {
  margin-top: 12px !important;
  font-size: 0.84rem;
}

@media (max-width: 700px) {
  .choice-card,
  .priority-grid label {
    grid-template-columns: 42px minmax(0, 1fr) 24px;
    gap: 6px 11px;
    min-height: 108px;
    padding: 16px;
  }

  .choice-card .choice-icon,
  .priority-grid .choice-icon {
    width: 42px;
    height: 42px;
  }

  .story-chapter {
    grid-template-columns: 46px minmax(0, 1fr);
    gap: 15px;
  }

  .story-icon {
    width: 46px;
    height: 46px;
    border-width: 6px;
  }

  .journey-story-flow::before {
    left: 22px;
  }
}
