@font-face {
  font-family: "Fraunces";
  font-style: normal;
  font-weight: 100 900;
  font-display: swap;
  src: url("fonts/fraunces-roman.woff2") format("woff2");
}
@font-face {
  font-family: "Fraunces";
  font-style: italic;
  font-weight: 100 900;
  font-display: swap;
  src: url("fonts/fraunces-italic.woff2") format("woff2");
}
@font-face {
  font-family: "Outfit";
  font-style: normal;
  font-weight: 100 900;
  font-display: swap;
  src: url("fonts/outfit-roman.woff2") format("woff2");
}

:root {
  --bg: #12100e;
  --bg-raise: #1c1815;
  --paper: #f3ecdf;
  --paper-dim: #cfc3b2;
  --faint: #9a8d80;
  --line: rgba(243, 236, 223, 0.16);
  --brass: #e0c48a;
  --brass-deep: #a8844a;
  --wine: #e08a7a;
  --wine-deep: #c45b4a;
  --serif: "Fraunces", "Iowan Old Style", Palatino, "Palatino Linotype", Georgia, serif;
  --sans: "Outfit", "Avenir Next", "Segoe UI", sans-serif;
  --measure: 1080px;
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body {
  margin: 0;
  color: var(--paper);
  font-family: var(--sans);
  font-size: 1.05rem;
  line-height: 1.55;
  background:
    radial-gradient(900px 520px at 0% -10%, rgba(196, 91, 74, 0.18), transparent 55%),
    radial-gradient(700px 480px at 100% 0%, rgba(224, 196, 138, 0.08), transparent 50%),
    var(--bg);
  color-scheme: dark;
}
body::before {
  content: "";
  pointer-events: none;
  position: fixed;
  inset: 0;
  opacity: 0.045;
  background-image: radial-gradient(rgba(243, 236, 223, 0.7) 0.6px, transparent 0.6px);
  background-size: 3px 3px;
  mix-blend-mode: overlay;
}
::selection { background: rgba(224, 196, 138, 0.35); color: var(--paper); }
:focus-visible { outline: 2px solid var(--brass); outline-offset: 3px; }
a { color: var(--brass); }
code {
  font-family: ui-monospace, "SFMono-Regular", Menlo, Consolas, monospace;
  font-size: 0.92em;
  color: var(--brass);
}

.skip {
  position: absolute;
  left: 12px;
  top: -40px;
  background: var(--paper);
  color: var(--bg);
  padding: 8px 12px;
  z-index: 5;
}
.skip:focus { top: 12px; }

.mast, main, .colophon {
  width: min(var(--measure), calc(100% - 48px));
  margin-inline: auto;
}

.mast {
  position: relative;
  padding: 72px 0 28px;
  overflow: hidden;
}
.mast::after {
  content: "29";
  position: absolute;
  right: -0.06em;
  top: 0.05em;
  font-family: var(--serif);
  font-weight: 500;
  font-size: clamp(9rem, 26vw, 20rem);
  line-height: 0.75;
  letter-spacing: -0.06em;
  color: rgba(243, 236, 223, 0.045);
  pointer-events: none;
}
.kicker {
  margin: 0 0 18px;
  font-size: 0.78rem;
  letter-spacing: 0.24em;
  text-transform: uppercase;
  color: var(--brass);
}
h1 {
  position: relative;
  margin: 0;
  font-family: var(--serif);
  font-weight: 500;
  font-size: clamp(4.2rem, 11vw, 8.2rem);
  line-height: 0.84;
  letter-spacing: -0.045em;
}
h1 em {
  display: block;
  font-style: italic;
  font-weight: 460;
  color: var(--brass);
}
.couple {
  position: relative;
  margin: 22px 0 0;
  font-family: var(--serif);
  font-style: italic;
  font-size: clamp(1.4rem, 3vw, 2rem);
  color: var(--paper-dim);
}
.hero {
  position: relative;
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 28px;
  margin-top: 42px;
  padding-top: 28px;
  border-top: 1px solid var(--line);
  border-bottom: 1px solid var(--line);
}
.stat { padding: 8px 0 22px; }
.stat + .stat { border-left: 1px solid var(--line); padding-left: 28px; }
.num {
  display: block;
  font-family: var(--serif);
  font-weight: 520;
  font-size: clamp(3.4rem, 7vw, 5.4rem);
  letter-spacing: -0.04em;
  line-height: 0.9;
  font-variant-numeric: oldstyle-nums;
}
.stat .label { display: block; margin-top: 8px; color: var(--paper-dim); max-width: 28ch; }
.stat .meta { display: block; margin-top: 6px; color: var(--faint); font-size: 0.92rem; }

.rail {
  position: fixed;
  left: 22px;
  top: 50%;
  transform: translateY(-50%);
  display: flex;
  flex-direction: column;
  gap: 10px;
  z-index: 2;
}
.rail a {
  color: var(--faint);
  text-decoration: none;
  font-size: 0.78rem;
  letter-spacing: 0.14em;
  text-transform: uppercase;
}
.rail a span { display: block; font-family: var(--serif); font-style: italic; letter-spacing: 0; text-transform: none; font-size: 0.95rem; color: var(--brass); }
.rail a.is-on { color: var(--paper); }

.chapter { padding: 72px 0 10px; }
.chapter-head { max-width: 40rem; margin-bottom: 28px; }
.index {
  margin: 0;
  color: var(--brass);
  letter-spacing: 0.22em;
  font-size: 0.75rem;
}
h2 {
  margin: 8px 0 12px;
  font-family: var(--serif);
  font-weight: 520;
  font-size: clamp(2.3rem, 5vw, 3.8rem);
  letter-spacing: -0.03em;
  line-height: 0.95;
}
.lede, .disclaimer, .file-hint, .colophon, .noscript { color: var(--paper-dim); }
.lede { margin: 0; }
.disclaimer {
  margin: 0 0 14px;
  padding-left: 14px;
  border-left: 2px solid var(--brass);
  max-width: 62ch;
}

.budget-layout {
  display: grid;
  grid-template-columns: 280px 1fr;
  gap: 48px;
  align-items: start;
}
.thermo { margin: 0; padding-bottom: 12px; }
#thermometer svg { display: block; width: min(100%, 260px); height: auto; }
.thermo figcaption {
  display: flex;
  justify-content: space-between;
  gap: 16px;
  max-width: 240px;
  margin-top: 14px;
  color: var(--paper-dim);
}
.thermo-label {
  display: block;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  font-size: 0.68rem;
  color: var(--faint);
}
.thermo figcaption strong {
  display: block;
  font-family: var(--serif);
  font-weight: 520;
  font-size: 1.45rem;
  color: var(--paper);
  font-variant-numeric: oldstyle-nums;
}
.thermo figcaption .unset strong { font-style: italic; color: var(--faint); font-size: 1.25rem; }

.ledger-head, .row {
  display: grid;
  grid-template-columns: 1.5fr 0.7fr 0.7fr;
  gap: 12px;
  align-items: baseline;
}
.ledger-head {
  padding-bottom: 8px;
  color: var(--faint);
  font-size: 0.72rem;
  letter-spacing: 0.16em;
  text-transform: uppercase;
}
.ledger-head span:not(:first-child), .amt { text-align: right; }
.row {
  padding: 13px 0;
  border-top: 1px solid var(--line);
}
.cat {
  font-family: var(--serif);
  font-size: 1.35rem;
  letter-spacing: -0.02em;
}
.note {
  display: block;
  color: var(--faint);
  font-size: 0.88rem;
}
.amt { font-variant-numeric: tabular-nums; color: var(--paper); }
.amt.unset { color: var(--faint); font-style: italic; }
.file-hint { font-size: 0.92rem; }

.timeline-scroll { overflow-x: auto; padding-bottom: 6px; }
#timeline-chart svg { display: block; min-width: 720px; }
#timeline-chart text { font-family: var(--sans); }
.axis-line, .month-stem { stroke: rgba(243, 236, 223, 0.38); stroke-width: 1; }
.month-name { font-size: 12px; letter-spacing: 0.12em; fill: #cfc3b2; }
.month-count { font-size: 11px; fill: #9a8d80; }
.event-stem { stroke: #cfc3b2; stroke-width: 1.25; }
.event-dot { fill: #cfc3b2; }
.event-name { font-family: var(--serif); font-size: 20px; fill: #f3ecdf; }
.event-count { font-size: 12px; letter-spacing: 0.08em; fill: #cfc3b2; }
.event.important .event-stem { stroke: #e0c48a; stroke-width: 2; }
.event.important .event-dot { fill: #e0c48a; }
.event.important .event-name,
.event.important .event-count { fill: #e0c48a; }
.now-line { stroke: #e08a7a; stroke-width: 1.5; }
.now-label { font-family: var(--serif); font-size: 22px; fill: #e08a7a; }
.now-date { font-size: 12px; letter-spacing: 0.06em; fill: #e08a7a; }

.key { list-style: none; margin: 18px 0 0; padding: 0; display: grid; gap: 12px; }
.key li {
  display: grid;
  grid-template-columns: 14px 1fr;
  gap: 12px;
  align-items: start;
}
.swatch { width: 14px; height: 14px; margin-top: 4px; border-radius: 99px; background: var(--faint); }
.swatch.now { background: var(--wine); }
.swatch.important { background: var(--brass); }
.key .name { font-family: var(--serif); font-size: 1.25rem; }
.key .meta { color: var(--paper-dim); }

.tally { margin: 0 0 10px; color: var(--faint); letter-spacing: 0.08em; text-transform: uppercase; font-size: 0.75rem; }
.check-panel {
  max-height: min(68vh, 640px);
  overflow: auto;
  border: 1px solid var(--line);
  background: rgba(18, 16, 14, 0.35);
}
.check-panel::-webkit-scrollbar { width: 10px; }
.check-panel::-webkit-scrollbar-thumb { background: #3a332c; }
.group-label, .done-label {
  position: sticky;
  top: 0;
  z-index: 1;
  margin: 0;
  padding: 12px 16px 8px;
  background: #1a1714;
  color: var(--brass);
  letter-spacing: 0.14em;
  text-transform: uppercase;
  font-size: 0.72rem;
}
.done-label { color: var(--faint); border-top: 1px solid var(--line); }
.check {
  width: 100%;
  display: grid;
  grid-template-columns: 18px 1fr auto;
  gap: 12px;
  align-items: start;
  padding: 14px 16px;
  border: 0;
  border-top: 1px solid var(--line);
  background: transparent;
  color: inherit;
  text-align: left;
  cursor: pointer;
  font: inherit;
}
.check:hover { background: rgba(224, 196, 138, 0.05); }
.box {
  width: 15px;
  height: 15px;
  margin-top: 4px;
  border: 1px solid var(--brass);
}
.check[aria-pressed="true"] .box { background: var(--brass); }
.check[aria-pressed="true"] .label { color: var(--faint); text-decoration: line-through; text-decoration-thickness: 1px; }
.label { font-family: var(--serif); font-size: 1.28rem; letter-spacing: -0.02em; line-height: 1.2; }
.detail { display: block; margin-top: 4px; color: var(--paper-dim); font-family: var(--sans); font-size: 0.92rem; text-decoration: none; }
.badge {
  font-size: 0.68rem;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--faint);
  border: 1px solid var(--line);
  padding: 4px 7px;
  white-space: nowrap;
}
.badge.real { color: var(--brass); border-color: rgba(224, 196, 138, 0.45); }

.planner {
  display: grid;
  grid-template-columns: minmax(8rem, auto) 1fr;
  gap: 28px;
  align-items: center;
  padding: 12px 0 8px;
  border-top: 1px solid var(--line);
}
.planner .figure {
  font-family: var(--serif);
  font-weight: 520;
  font-size: clamp(5rem, 12vw, 8rem);
  line-height: 0.8;
  letter-spacing: -0.05em;
  font-variant-numeric: oldstyle-nums;
}
.planner .figure.unset {
  color: var(--faint);
  font-style: italic;
  font-size: clamp(3.2rem, 8vw, 5.2rem);
  line-height: 0.95;
}
.planner .unit { margin: 0; color: var(--brass); letter-spacing: 0.16em; text-transform: uppercase; font-size: 0.78rem; }
.planner .explain { margin: 10px 0 0; max-width: 46ch; color: var(--paper-dim); }

.decision + .decision { margin-top: 28px; }
.decision h3 {
  margin: 0;
  font-family: var(--serif);
  font-weight: 520;
  font-size: clamp(1.8rem, 3vw, 2.4rem);
  letter-spacing: -0.03em;
}
.decision .status { margin: 6px 0 14px; color: var(--paper-dim); }
.options {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
  gap: 16px;
}
.option {
  min-height: 180px;
  padding: 22px;
  border: 1px solid var(--line);
  background: transparent;
  color: inherit;
  text-align: left;
  cursor: pointer;
  font: inherit;
  display: flex;
  flex-direction: column;
  gap: 10px;
}
.option:hover { border-color: rgba(224, 196, 138, 0.55); }
.option[aria-pressed="true"] {
  border-color: var(--brass);
  background: rgba(224, 196, 138, 0.07);
}
.option .opt-kicker { letter-spacing: 0.16em; text-transform: uppercase; font-size: 0.7rem; color: var(--faint); }
.option[aria-pressed="true"] .opt-kicker { color: var(--brass); }
.option .opt-name { font-family: var(--serif); font-size: 1.7rem; letter-spacing: -0.03em; line-height: 1.05; }
.option .opt-detail { color: var(--paper-dim); }

.colophon {
  padding: 64px 0 80px;
  border-top: 1px solid var(--line);
  margin-top: 72px;
}
.colophon p { margin: 0 0 6px; }
.noscript {
  width: min(var(--measure), calc(100% - 48px));
  margin: 24px auto 48px;
}

@media (max-width: 1320px) {
  .rail {
    position: sticky;
    top: 0;
    transform: none;
    flex-direction: row;
    flex-wrap: wrap;
    gap: 8px 18px;
    width: min(var(--measure), calc(100% - 48px));
    margin: 0 auto;
    padding: 10px 0;
    background: rgba(18, 16, 14, 0.92);
    z-index: 3;
  }
  .rail a span { display: inline; margin-right: 6px; }
}
@media (max-width: 800px) {
  .hero, .budget-layout, .planner { grid-template-columns: 1fr; }
  .stat + .stat { border-left: 0; padding-left: 0; border-top: 1px solid var(--line); padding-top: 18px; }
  .mast, main, .colophon, .noscript { width: min(var(--measure), calc(100% - 32px)); }
  .check { grid-template-columns: 18px 1fr; }
  .badge { grid-column: 2; justify-self: start; }
}
@media print {
  body { background: white; color: black; }
  .rail, body::before { display: none; }
  .check-panel { max-height: none; overflow: visible; }
}
