/* ─────────────────────────────────────────────────────────────
   Washington, for Christmas — Americana.
   Cream paper, navy ink, a red accent, gold stars. Set in
   Libre Caslon Text (display) and EB Garamond (text), laid out
   like a formal invitation. One committed light theme, painted
   explicitly so it holds on any host ground.
   ───────────────────────────────────────────────────────────── */

:root {
  --paper:   #f4f1ea;
  --ink:     #1c2a4a;   /* navy */
  --ink-2:   #3f4658;   /* body text */
  --muted:   #6b6a66;
  --rule:    #cfc9bb;   /* hairlines on paper */
  --red:     #a8322c;
  --gold:    #b8975a;

  --display: "Libre Caslon Text", "Baskerville", Georgia, "Times New Roman", serif;
  --text:    "EB Garamond", Garamond, Georgia, "Times New Roman", serif;

  --measure: 62ch;
  color-scheme: light;
}

*, *::before, *::after { box-sizing: border-box; }

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

body {
  margin: 0;
  background: var(--paper);
  color: var(--ink);
  font-family: var(--text);
  font-size: 18px;
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
}

a { color: var(--red); text-underline-offset: 3px; }
a:hover { color: var(--ink); }
a:focus-visible, summary:focus-visible {
  outline: 2px solid var(--red);
  outline-offset: 3px;
}

/* ───────────── Page frame ───────────── */

.hero, main, .foot {
  max-width: 820px;
  margin: 0 auto;
  padding-left: 24px;
  padding-right: 24px;
}
.hero { padding-top: 48px; }
.foot { padding-bottom: 72px; }

/* ───────────── Type roles ───────────── */

h1, h2, h3 {
  font-family: var(--display);
  font-weight: 400;
  margin: 0;
  text-wrap: balance;
}
h1 {
  font-size: clamp(44px, 7.5vw, 74px);
  line-height: 1.02;
  letter-spacing: -0.01em;
}
h1 em { font-style: normal; color: var(--red); }
h2 { font-size: clamp(32px, 4.5vw, 44px); line-height: 1.08; }
h2 em { font-style: italic; }
h3 { font-size: 27px; line-height: 1.1; }

.kicker, .eyebrow, .stop-date b, .board-head, .half small, .countdown span, .legend, .foot b, .hero-nav a, .art {
  font-size: 13px;
  letter-spacing: 0.22em;
  text-transform: uppercase;
  font-weight: 600;
}
.kicker { color: var(--red); margin: 0; }

p { margin: 0; max-width: var(--measure); text-wrap: pretty; }
p + p { margin-top: 0.75em; }

.star, .stars, .plus { color: var(--gold); }
.plus { color: var(--red); }

/* ───────────── Hero: the invitation card ───────────── */

/* Outer 48/24px page margin, then a double-ruled frame, then 44/32px inside it. */
.hero {
  position: relative;
  display: grid;
  gap: 20px;
  justify-items: center;
  text-align: center;
  padding: 92px 56px 40px;
}
.hero::after {
  content: "";
  position: absolute;
  inset: 48px 24px 0;
  border: 1px solid var(--ink);
  outline: 1px solid var(--ink);
  outline-offset: 4px;
  pointer-events: none;
}

.eyebrow {
  display: flex; flex-wrap: wrap; justify-content: center; align-items: center; gap: 6px 10px;
  color: var(--red);
  max-width: none;
}

.ornament {
  display: flex; align-items: center; gap: 12px;
  width: 100%; max-width: 360px;
}
.ornament span { flex: 1; height: 1px; background: var(--ink); }
.ornament i { color: var(--gold); font-style: normal; font-size: 14px; }

.lede {
  max-width: 560px;
  font-size: 19px;
  line-height: 1.55;
}

.countdown {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  width: 100%;
  max-width: 520px;
  border-top: 1px solid var(--ink);
  border-bottom: 1px solid var(--ink);
  margin-top: 6px;
}
.tile {
  padding: 14px 6px 10px;
  display: grid; gap: 2px; justify-items: center;
  border-right: 1px solid var(--rule);
}
.tile:last-child { border-right: 0; }
.tile b {
  font-family: var(--display);
  font-weight: 400;
  font-size: clamp(30px, 5.5vw, 42px);
  line-height: 1;
  font-variant-numeric: tabular-nums;
}
.tile:last-child b { color: var(--red); }
.tile span { font-size: 12px; letter-spacing: 0.18em; color: var(--muted); font-weight: 400; }

.countdown-label {
  margin-top: -8px;
  font-style: italic;
  color: var(--muted);
}

.hero-nav {
  display: flex; flex-wrap: wrap; justify-content: center; gap: 8px 24px;
}
.hero-nav a {
  color: var(--ink);
  text-decoration: none;
  border-bottom: 1px solid var(--gold);
  padding-bottom: 2px;
  letter-spacing: 0.18em;
}
.hero-nav a:hover { color: var(--red); border-color: var(--red); }

/* ───────────── Sections ───────────── */

main { display: grid; gap: 64px; padding-top: 64px; }

.section { display: grid; gap: 28px; }
.section-head { display: grid; gap: 10px; }
.section-head .intro { margin-top: 4px; color: var(--ink-2); max-width: 620px; }
.section-head .intro .legend {
  display: block; margin-top: 10px;
  letter-spacing: 0.14em; color: var(--muted); font-weight: 400;
}

/* ───────────── Departure board ───────────── */

.board {
  border-top: 3px double var(--ink);
  border-bottom: 3px double var(--ink);
  overflow-x: auto;
}
.board-row {
  display: grid;
  grid-template-columns: 1fr 1.3fr 1.5fr 1fr;
  gap: 16px;
  padding: 16px 4px;
  min-width: 640px;
  align-items: start;
  border-top: 1px solid var(--rule);
}
.board-head {
  border-top: 0;
  border-bottom: 1px solid var(--ink);
  padding: 12px 4px 10px;
  color: var(--muted);
  letter-spacing: 0.2em;
  font-size: 12px;
}
.board-row:nth-child(2) { border-top: 0; }
.board-row span { display: grid; gap: 2px; }
.board-row b { font-weight: 600; }
.board-row span:first-child b {
  font-family: var(--display);
  font-weight: 400;
  font-size: 21px;
  line-height: 1.1;
}
.board-row small { color: var(--muted); font-style: italic; font-size: 0.9em; }

.perks {
  list-style: none; padding: 0; margin: 0;
  display: grid; gap: 18px 32px;
  grid-template-columns: repeat(auto-fit, minmax(230px, 1fr));
  color: var(--ink-2);
}
.perks li { max-width: 40ch; }
.perks b { color: var(--ink); font-weight: 600; }

/* ───────────── The week (itinerary) ───────────── */

.line {
  list-style: none; padding: 0; margin: 0;
  display: grid;
  border-top: 3px double var(--ink);
}
.stop {
  display: grid;
  grid-template-columns: 96px 1fr;
  gap: 0 20px;
  padding: 24px 0;
  border-bottom: 1px solid var(--rule);
}
.stop.last { border-bottom: 3px double var(--ink); }
.stop.featured {
  border-left: 3px solid var(--red);
  margin-left: -20px;
  padding-left: 17px;
}

.stop-date {
  display: grid; align-content: start; gap: 2px;
  padding-top: 4px;
}
.stop-date b { letter-spacing: 0.2em; }
.featured .stop-date b { color: var(--red); }
.stop-date span { font-family: var(--display); font-size: 20px; line-height: 1; }

.stop-body { display: grid; gap: 10px; align-content: start; }
.stop-body p { color: var(--ink-2); }
.featured .stop-body p { color: var(--ink); }
.featured h3 { font-style: italic; }

.halves {
  display: flex; flex-wrap: wrap; gap: 6px 24px;
  font-size: 14px; color: var(--ink-2);
}
.half { display: inline-flex; align-items: baseline; gap: 6px; }
.half small { font-size: 12px; letter-spacing: 0.16em; color: var(--muted); font-weight: 400; }

/* level meter: ●○○○ … ●●●●, red once it's a big one */
.ticks { letter-spacing: 2px; color: var(--ink); font-style: normal; }
.ticks::before { content: "○○○○"; }
.ticks[style*="--n:1"]::before { content: "●○○○"; }
.ticks[style*="--n:2"]::before { content: "●●○○"; }
.ticks[style*="--n:3"]::before { content: "●●●○"; }
.ticks[style*="--n:4"]::before { content: "●●●●"; }
.ticks[style*="--n:4"], .night .ticks[style*="--n:3"] { color: var(--red); }
.legend .ticks[style*="--n:4"] { color: var(--red); }

/* ───────────── The canon ───────────── */

.canon {
  list-style: none; margin: 0; padding: 0;
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(240px, 1fr));
  gap: 0 40px;
  counter-reset: canon;
  font-family: var(--display);
  font-size: 19px;
  line-height: 1.25;
}
.canon li {
  counter-increment: canon;
  display: grid;
  grid-template-columns: 28px 1fr;
  gap: 8px;
  padding: 10px 0;
  border-bottom: 1px solid var(--rule);
}
.canon li::before {
  content: counter(canon) ".";
  color: var(--gold);
  font-family: var(--text);
  font-size: 14px;
  letter-spacing: 0.05em;
  padding-top: 4px;
}
.canon li:last-child { grid-column: 1 / -1; color: var(--red); font-style: italic; }
.canon li:last-child::before { color: var(--red); }

.bonus {
  border: 1px solid var(--rule);
  padding: 16px 20px;
  color: var(--ink-2);
}
.bonus summary {
  cursor: pointer; list-style: none;
  display: flex; flex-wrap: wrap; gap: 4px 12px; align-items: baseline;
  font-family: var(--display);
  font-size: 22px;
  color: var(--ink);
}
.bonus summary::-webkit-details-marker { display: none; }
.bonus[open] summary .plus::before { content: "−"; }
.bonus[open] summary .plus { font-size: 0; }
.bonus[open] summary .plus::before { font-size: 22px; }
.bonus summary > span:last-child {
  font-family: var(--text); font-size: 12px; letter-spacing: 0.16em;
  text-transform: uppercase; color: var(--muted);
}
.bonus p { margin-top: 14px; }
.bonus ul {
  margin: 12px 0 4px; padding: 0; list-style: none;
  display: grid; grid-template-columns: repeat(auto-fill, minmax(220px, 1fr)); gap: 4px 24px;
}
.bonus ul li::before { content: "· "; }

/* ───────────── House rules: the articles ───────────── */

.rules {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
  gap: 28px 40px;
}
.rule { display: grid; gap: 8px; align-content: start; }
.rule h3 { font-size: 23px; line-height: 1.2; }
.art {
  display: block; margin-bottom: 4px;
  color: var(--gold);
  font-family: var(--text);
  font-size: 14px; letter-spacing: 0.1em; font-weight: 400; text-transform: none;
}
.rule p { color: var(--ink-2); max-width: 40ch; }

.thesis {
  margin: 12px 0 0;
  padding: 28px 0 0;
  border-top: 3px double var(--ink);
  text-align: center;
  display: grid; gap: 10px; justify-items: center;
}
.thesis .stars { font-size: 14px; }
.thesis p {
  font-family: var(--display);
  font-style: italic;
  font-size: clamp(24px, 3.4vw, 34px);
  line-height: 1.25;
  max-width: 30ch;
  text-wrap: balance;
}

/* ───────────── Footer ───────────── */

.foot {
  margin-top: 64px;
  border-top: 1px solid var(--ink);
  padding-top: 20px;
  text-align: center;
  display: grid; gap: 6px; justify-items: center;
  color: var(--muted);
  font-size: 14px;
}
.foot p { max-width: none; }
.foot b { color: var(--ink); letter-spacing: 0.24em; }

/* ───────────── Photo slots ─────────────
   Every <img class="photo"> is optional; the head script removes its
   <figure> when the file isn't there yet. Framed like plates in a book. */

figure { margin: 0; }
figcaption {
  margin-top: 8px;
  font-style: italic;
  font-size: 15px;
  color: var(--muted);
  text-align: center;
}
.photo { display: block; width: 100%; height: auto; border: 1px solid transparent; }
.photo.ready { border-color: var(--ink); }
figure:not(:has(.photo.ready)) figcaption { visibility: hidden; }

.plate { width: 100%; max-width: 560px; padding: 4px; border: 1px solid transparent; }
.plate:has(.photo.ready) { border-color: var(--rule); }
.plate .photo { aspect-ratio: 16 / 9; object-fit: cover; object-position: center 35%; }

.banner .photo { aspect-ratio: 21 / 9; object-fit: cover; }
.inset { max-width: 420px; }
.inset .photo { aspect-ratio: 4 / 3; object-fit: cover; }

.stop-photo .photo { aspect-ratio: 3 / 2; object-fit: cover; }
.featured .stop-photo .photo.ready { border-color: var(--red); }
@media (min-width: 720px) {
  .stop-body:has(.stop-photo) {
    grid-template-columns: minmax(0, 1fr) 240px;
    column-gap: 24px;
  }
  .stop-body:has(.stop-photo) > :not(.stop-photo) { grid-column: 1; }
  .stop-body:has(.stop-photo) .stop-photo { grid-column: 2; grid-row: 1 / span 6; align-self: start; }
}

.family { width: 96px; margin-bottom: 6px; }
.family .photo { aspect-ratio: 1; object-fit: cover; border-radius: 50%; }
.family .photo.ready { outline: 1px solid var(--ink); outline-offset: 3px; }

/* ───────────── Small screens ───────────── */

@media (max-width: 560px) {
  .hero { padding: 80px 36px 32px; }
  .hero::after { inset: 40px 16px 0; }
  .stop { grid-template-columns: 72px 1fr; gap: 0 14px; }
  .stop.featured { margin-left: -14px; padding-left: 11px; }
  .stop-body:has(.stop-photo) .stop-photo { order: -1; }
}

/* ───────────── Planner: change the trip ─────────────
   Lives in the invitation card under the countdown. Verdict first,
   controls behind a disclosure, so the page stays a proposal. */

.planner { display: grid; gap: 10px; justify-items: center; width: 100%; max-width: 560px; }
.verdict {
  display: flex; flex-wrap: wrap; justify-content: center; align-items: baseline; gap: 4px 10px;
  font-size: 13px; letter-spacing: 0.18em; text-transform: uppercase; font-weight: 600;
  color: var(--ink);
}
.verdict b { font-weight: 600; }
.verdict .sep { color: var(--gold); letter-spacing: 0; }
.verdict-label { color: var(--red); }
.verdict-label.warn { color: var(--muted); }
.verdict-why { font-size: 16px; color: var(--ink-2); max-width: 52ch; }
.verdict-why b { color: var(--ink); font-weight: 600; }

.change { width: 100%; }
.change summary {
  cursor: pointer; list-style: none;
  font-size: 13px; letter-spacing: 0.18em; text-transform: uppercase; font-weight: 600;
  color: var(--ink);
  display: inline-flex; gap: 8px; align-items: baseline;
  border-bottom: 1px solid var(--gold); padding-bottom: 2px;
}
.change summary::-webkit-details-marker { display: none; }
.change[open] summary .plus::before { content: "−"; }
.change[open] summary .plus { font-size: 0; }
.change[open] summary .plus::before { font-size: 13px; }
.change-body {
  margin-top: 16px;
  display: grid; grid-template-columns: repeat(auto-fit, minmax(200px, 1fr)); gap: 14px 28px;
  align-items: end; justify-items: center; text-align: left;
  padding: 16px 20px; border: 1px solid var(--rule);
}
.field { display: grid; gap: 6px; width: 100%; max-width: 220px; }
.field > span { font-size: 12px; letter-spacing: 0.16em; text-transform: uppercase; color: var(--muted); font-weight: 600; }
.field input[type="date"] {
  font: inherit; font-size: 17px; color: var(--ink);
  background: transparent; border: 0; border-bottom: 1px solid var(--ink);
  padding: 4px 0; width: 100%;
}
.field input[type="date"]:focus-visible { outline: 2px solid var(--red); outline-offset: 3px; }
.stepper-controls { display: grid; grid-template-columns: 40px 1fr 40px; align-items: center; border-bottom: 1px solid var(--ink); }
.stepper-controls b {
  font-family: var(--display); font-weight: 400; font-size: 28px; line-height: 1; text-align: center;
  font-variant-numeric: tabular-nums;
}
.stepper-controls button, .reset {
  font: inherit; cursor: pointer; background: transparent; color: var(--ink);
}
.stepper-controls button {
  border: 1px solid var(--ink); border-radius: 50%; width: 32px; height: 32px; margin: 0 auto 4px;
  font-size: 20px; line-height: 1; display: grid; place-items: center;
}
.stepper-controls button:hover:not(:disabled) { background: var(--ink); color: var(--paper); }
.stepper-controls button:disabled { opacity: 0.35; cursor: default; }
.stepper-controls button:focus-visible, .reset:focus-visible { outline: 2px solid var(--red); outline-offset: 3px; }
.reset {
  grid-column: 1 / -1; justify-self: center;
  border: 0; border-bottom: 1px solid var(--gold); padding: 0 0 2px;
  font-size: 13px; letter-spacing: 0.16em; text-transform: uppercase; font-weight: 600; color: var(--red);
}

/* Cut items on the list */
.canon li.cut { color: var(--muted); }
.canon li.cut::before { color: var(--muted); }
.canon li.cut > span, .canon li.cut { text-decoration: none; }
.canon li.cut::after { content: "cut"; font-family: var(--text); font-size: 11px; letter-spacing: 0.18em; text-transform: uppercase; color: var(--red); margin-left: 8px; align-self: center; }
.canon li { grid-template-columns: 28px 1fr auto; }
.canon li:not(.cut)::after { content: ""; }

/* "A different trip" */
.stop.different .options { margin: 8px 0 0; padding: 0; list-style: none; display: grid; gap: 8px; color: var(--ink-2); max-width: 62ch; }
.stop.different .options b { color: var(--ink); font-weight: 600; }
.stop.different .options li::before { content: "✦ "; color: var(--gold); }
