:root {
  --teal: #023047;
  --teal-deep: #011d2b;
  --ink: #10252d;
  --muted: #4d6670;
  --gold: #f6b915;
  --sea: #93c6cc;
  --mist: #e7f1f3;
  --paper: #f5f8f9;
  --line: rgba(2, 48, 71, 0.16);
  --display: 'Bricolage Grotesque', 'Arial Narrow', sans-serif;
  --body: 'Source Serif 4', Georgia, serif;
}

*, *::before, *::after { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body {
  margin: 0;
  padding-bottom: 5.5rem; /* room for the fixed plan bar */
  background: var(--paper);
  color: var(--ink);
  font: 400 1.0625rem/1.6 var(--body);
  -webkit-print-color-adjust: exact;
  print-color-adjust: exact;
}
.wrap { width: min(100% - 2.5rem, 68rem); margin-inline: auto; }
h1, h2, h3, h4 { font-family: var(--display); margin: 0; text-wrap: balance; }
p { margin: 0; }
a { color: inherit; }
:focus-visible { outline: 3px solid var(--gold); outline-offset: 3px; border-radius: 2px; }

/* Hero */
.hero { background: var(--teal); color: #fff; padding-block: 1.5rem 4.5rem; }
.top { display: flex; align-items: center; gap: 1.25rem; font: 500 0.95rem/1.2 var(--display); }
.top img { border-radius: 50%; }
.top-name { margin-right: auto; color: var(--sea); }
.top a { text-underline-offset: 4px; }
.top a:hover { color: var(--gold); }
.hero-grid { display: grid; grid-template-columns: 1.35fr 1fr; gap: 3.5rem; align-items: end; margin-top: 4.5rem; }
h1 { font-size: clamp(2.3rem, 5.4vw, 4rem); font-weight: 700; line-height: 1.02; letter-spacing: -0.025em; }
.hero-text { margin-top: 1.5rem; max-width: 34rem; font-size: 1.2rem; color: #dcebee; }

/* The slip mirrors the header of a travel quote: who, when, valid until, amount. */
.slip { margin: 0; background: #fff; color: var(--ink); border-radius: 6px; padding: 0.5rem 1.5rem; }
.slip div { display: flex; justify-content: space-between; gap: 1.5rem; padding-block: 0.7rem; border-bottom: 1px dashed var(--line); }
.slip div:last-child { border-bottom: 0; }
.slip dt { color: var(--muted); font-size: 0.95rem; }
.slip dd { margin: 0; text-align: right; font: 600 1rem/1.35 var(--display); }
.slip .slip-total { align-items: baseline; }
.slip .slip-total dd { font-size: 2rem; font-weight: 700; color: var(--teal); }

/* Sections */
main > section { margin-top: 5rem; }
h2 { font-size: clamp(1.6rem, 3vw, 2.1rem); font-weight: 700; letter-spacing: -0.015em; line-height: 1.1; color: var(--teal); }
.lead { margin-top: 0.9rem; max-width: 42rem; font-size: 1.125rem; }
.note { margin-top: 1.25rem; max-width: 46rem; color: var(--muted); font-size: 0.975rem; }
ul { margin: 0.9rem 0 0; padding-left: 1.2rem; }
li { margin-top: 0.45rem; }
li::marker { color: var(--sea); }

/* Tables */
table { width: 100%; margin-top: 1.5rem; border-collapse: collapse; font-variant-numeric: tabular-nums lining-nums; }
th, td { text-align: left; vertical-align: top; padding: 0.85rem 1rem 0.85rem 0; border-bottom: 1px solid var(--line); }
thead th { font: 600 0.95rem/1.2 var(--display); color: var(--muted); border-bottom: 2px solid var(--teal); }
tbody th { font-weight: 400; }
.today tbody th { color: var(--muted); width: 46%; }
.today td { font-weight: 600; }
.summary td:last-child, .summary thead th:last-child { text-align: right; padding-right: 0; white-space: nowrap; }
.summary td { white-space: nowrap; }
.summary tbody tr:last-child > * { border-bottom: 0; border-top: 2px solid var(--teal); font: 700 1.1rem/1.3 var(--display); color: var(--teal); }
.costs tbody th { font: 600 1rem/1.4 var(--display); width: 26%; }
.costs td:nth-child(2) { width: 24%; font-weight: 600; }

/* Route: the stages in order, joined by a dashed flight path. */
.leg { margin-top: 3rem; font-size: 1rem; font-weight: 600; color: var(--muted); }
.route { list-style: none; margin: 1.25rem 0 0; padding: 0; }
.stop { position: relative; display: grid; grid-template-columns: 3rem 1fr 14rem; gap: 0 1.75rem; margin: 0; padding-bottom: 2.75rem; break-inside: avoid; }
.stop::before { content: ''; position: absolute; left: calc(1.5rem - 1px); top: 3rem; bottom: 0; border-left: 2px dashed var(--sea); }
.route:last-of-type .stop:last-child::before { display: none; }
.stop-num {
  width: 3rem; height: 3rem; display: grid; place-items: center; border-radius: 50%;
  border: 2px solid var(--teal); background: #fff; color: var(--teal);
  font: 700 1.2rem/1 var(--display); transition: background-color 0.2s, color 0.2s;
}
.stop.is-on .stop-num { background: var(--teal); color: var(--gold); }
.stop h4 { font-size: 1.4rem; font-weight: 700; letter-spacing: -0.01em; line-height: 1.15; padding-top: 0.55rem; }
.stop-why { margin-top: 0.4rem; font-style: italic; color: var(--muted); }
.stop h5 { margin: 1.4rem 0 0; font: 600 1.05rem/1.3 var(--display); color: var(--teal); }
.stop h5 + ul { margin-top: 0.5rem; }
.stop-side { padding-top: 0.55rem; }
.stop-price { font: 700 1.4rem/1.15 var(--display); color: var(--teal); font-variant-numeric: tabular-nums; }
.stop-time, .stop-note { margin-top: 0.3rem; color: var(--muted); font-size: 0.95rem; line-height: 1.4; }
.pick {
  display: inline-flex; align-items: center; gap: 0.55rem; margin-top: 0.9rem; padding: 0.5rem 0.85rem;
  border: 1.5px solid var(--teal); border-radius: 6px; cursor: pointer;
  font: 600 0.95rem/1.2 var(--display); color: var(--teal); transition: background-color 0.2s, color 0.2s;
}
.pick[hidden] { display: none; }
.pick input { width: 1.1rem; height: 1.1rem; margin: 0; accent-color: var(--gold); }
.pick:has(input:checked) { background: var(--teal); color: #fff; }
.pick:has(input:focus-visible) { outline: 3px solid var(--gold); outline-offset: 3px; }

/* Paired lists */
.two { display: grid; grid-template-columns: 1fr 1fr; gap: 3.5rem; }
.owned { background: var(--mist); border-radius: 8px; padding: 2.25rem 2.5rem; }
.owned ul { max-width: 46rem; }
.owned li::marker { color: var(--teal); }
.steps { margin: 1.25rem 0 0; padding-left: 1.6rem; max-width: 42rem; }
.steps li { padding-left: 0.4rem; margin-top: 0.7rem; }
.steps li::marker { font: 700 1.1rem var(--display); color: var(--teal); }

.foot { margin-top: 5rem; padding-block: 1.5rem; border-top: 1px solid var(--line); color: var(--muted); font-size: 0.95rem; }

/* Plan bar */
.plan { position: fixed; inset: auto 0 0 0; z-index: 5; background: var(--teal-deep); color: #fff; padding-block: 0.8rem; }
.plan-row { display: flex; align-items: center; justify-content: space-between; gap: 1rem 1.5rem; flex-wrap: wrap; }
.plan p { font: 500 1rem/1.3 var(--display); font-variant-numeric: tabular-nums; }
.plan strong { color: var(--gold); font-weight: 700; }
.btn { background: var(--gold); color: var(--teal-deep); padding: 0.7rem 1.1rem; border-radius: 6px; text-decoration: none; font: 700 0.95rem/1.2 var(--display); }
.btn:hover { background: #ffd04a; }

@media screen and (max-width: 52rem) {
  body { padding-bottom: 8rem; }
  .hero-grid { grid-template-columns: 1fr; gap: 2.25rem; margin-top: 3rem; align-items: start; }
  .top-name { display: none; }
  .top img { margin-right: auto; }
  .two { grid-template-columns: 1fr; gap: 0; }
  .two > div + div { margin-top: 3.5rem; }
  .stop { grid-template-columns: 3rem 1fr; }
  .stop-side { grid-column: 2; padding-top: 1rem; }
  .owned { padding: 1.75rem 1.5rem; }
  /* Tables become stacked rows so nothing scrolls sideways. */
  .today thead, .costs thead { display: none; }
  .today tr, .costs tr { display: block; padding-block: 0.9rem; border-bottom: 1px solid var(--line); }
  .today :is(th, td), .costs :is(th, td) { display: block; width: auto !important; padding: 0.15rem 0; border: 0; }
  .summary td { white-space: normal; }
  .summary td:nth-child(2), .summary thead th:nth-child(2) { display: none; }
}

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  * { transition: none !important; }
}

@page { size: letter; margin: 14mm 14mm 16mm; }
@media print {
  body { padding-bottom: 0; background: #fff; font-size: 10pt; line-height: 1.5; }
  .wrap { width: 100%; }
  .plan, .pick, .top a { display: none; }
  .hero { padding: 1.25rem 1.5rem 2rem; border-radius: 6px; }
  .hero-grid { margin-top: 2rem; gap: 2rem; }
  h1 { font-size: 2.3rem; }
  main > section { margin-top: 2rem; }
  h2 { font-size: 1.45rem; break-after: avoid; }
  .leg { margin-top: 1.75rem; break-after: avoid; }
  .stop { padding-bottom: 1.1rem; grid-template-columns: 2.6rem 1fr 10.5rem; }
  .stop-num { width: 2.6rem; height: 2.6rem; background: var(--teal); color: var(--gold); }
  .stop::before { left: calc(1.3rem - 1px); top: 2.6rem; }
  .stop h4 { font-size: 1.15rem; }
  .stop h5 { margin-top: 0.7rem; font-size: 0.95rem; }
  .stop li { margin-top: 0.22rem; }
  .stop ul { margin-top: 0.5rem; }
  .stop-price { font-size: 1.15rem; }
  tr, .owned, .two > div, main > section:not(:nth-of-type(2)) { break-inside: avoid; }
  .hero-grid { grid-template-columns: 1fr 1fr; }
  .slip { padding-inline: 1.1rem; }
  .slip dt { white-space: nowrap; }
  .slip dd { font-size: 0.9rem; }
  .foot { margin-top: 2.5rem; }
}
