:root {
  --ink: #12151c;
  --ink-soft: #222733;
  --body: #2b3240;
  --muted: #5c6778;
  --line: #c5d0dc;
  --line-soft: #dce4ee;
  --paper: #e8eef5;
  --sheet: #f5f8fc;
  --white: #ffffff;
  --blue: #1a6bff;
  --blue-mid: #3b75ff;
  --blue-bright: #5b91ff;
  --blue-soft: #d2e2ff;
  --blue-mist: #eaf1ff;
  --green: #1f9d62;
  --green-mid: #2aab6d;
  --green-bright: #34b978;
  --green-soft: #d3efe4;
  --green-mist: #eaf6f0;
  --lemon: #34b978;
  --lemon-deep: #1f9d62;
  --shadow: 0 12px 32px rgba(18, 21, 28, 0.1);
  --shadow-soft: 0 6px 18px rgba(18, 21, 28, 0.06);
  --radius: 8px;
  --radius-sm: 6px;
  --header-h: 72px;
  --ease: cubic-bezier(0.22, 1, 0.36, 1);
  --max: 1180px;
  --article: 740px;
  --display: "Source Serif 4", Georgia, "Times New Roman", serif;
  --sans: "Outfit", "Segoe UI", sans-serif;
}

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

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  color: var(--body);
  background: var(--paper);
  font-family: var(--sans);
  font-size: 17.5px;
  line-height: 1.65;
  -webkit-font-smoothing: antialiased;
}

img,
svg {
  display: block;
  max-width: 100%;
}

button,
input {
  font: inherit;
}

[hidden] {
  display: none !important;
}

a {
  color: var(--blue);
}

.skip-link {
  position: absolute;
  left: 16px;
  top: -48px;
  z-index: 80;
  padding: 10px 16px;
  background: var(--ink);
  color: #fff;
  border-radius: 4px;
  text-decoration: none;
}

.skip-link:focus {
  top: 12px;
}

/* Header */
.site-header {
  position: sticky;
  top: 0;
  z-index: 40;
  height: var(--header-h);
  display: flex;
  align-items: center;
  background: var(--white);
  border-bottom: 2px solid var(--ink);
  box-shadow: 0 4px 0 var(--lemon);
}

.header-inner {
  width: min(var(--max), calc(100% - 40px));
  margin: 0 auto;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
}

.brand {
  display: flex;
  align-items: center;
  gap: 11px;
  text-decoration: none;
  color: var(--ink);
}

.brand-mark {
  width: 56px;
  height: 36px;
  flex: none;
  overflow: visible;
}

.brand-lockup {
  display: flex;
  flex-direction: column;
  min-width: 0;
}

.brand-name {
  display: flex;
  align-items: baseline;
  font-family: "Bricolage Grotesque", var(--sans);
  font-optical-sizing: auto;
  font-variation-settings:
    "opsz" 72,
    "wdth" 100;
  font-size: 1.42rem;
  font-weight: 800;
  letter-spacing: -0.04em;
  line-height: 0.92;
}

.brand-maline {
  font-style: italic;
  font-weight: 700;
  font-variation-settings:
    "opsz" 72,
    "wdth" 100;
  color: var(--blue);
  letter-spacing: -0.05em;
  margin-left: 0.02em;
}

.brand-com {
  margin-left: 0.12em;
  color: var(--muted);
  font-family: var(--sans);
  font-size: 0.52em;
  font-style: normal;
  font-weight: 700;
  letter-spacing: 0.06em;
}

.brand-sub {
  display: block;
  margin-top: 5px;
  color: var(--muted);
  font-size: 0.64rem;
  font-weight: 600;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  white-space: nowrap;
}

.nav {
  display: flex;
  align-items: center;
  gap: 4px;
}

.nav a {
  color: var(--ink);
  text-decoration: none;
  font-size: 0.95rem;
  font-weight: 650;
  padding: 8px 12px;
  position: relative;
}

.nav a:not(.nav-cta)::after {
  content: "";
  position: absolute;
  left: 12px;
  right: 12px;
  bottom: 4px;
  height: 3px;
  background: var(--lemon);
  transform: scaleX(0);
  transform-origin: left;
  transition: transform 0.2s var(--ease);
}

.nav a:not(.nav-cta):hover::after,
.nav a:not(.nav-cta):focus-visible::after {
  transform: scaleX(1);
}

.nav-cta {
  background: var(--blue) !important;
  color: #fff !important;
  padding: 10px 16px !important;
  border-radius: 6px;
  margin-left: 8px;
}

.nav-cta:hover,
.nav-cta:focus-visible {
  background: var(--ink) !important;
}

.menu-toggle {
  display: none;
  width: 44px;
  height: 44px;
  border: 2px solid var(--ink);
  background: var(--blue);
  border-radius: 6px;
  cursor: pointer;
  align-items: center;
  justify-content: center;
  color: #fff;
}

.menu-toggle svg {
  width: 20px;
  height: 20px;
}

/* Hero */
.hero {
  position: relative;
  overflow: hidden;
  padding: 56px 0 0;
  background: linear-gradient(90deg, var(--blue) 0 8px, transparent 8px), var(--paper);
}

.hero-layout {
  display: grid;
  grid-template-columns: minmax(0, 1.15fr) minmax(280px, 0.85fr);
  gap: 48px;
  align-items: end;
  padding-bottom: 48px;
}

.kicker {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 10px;
  margin: 0 0 20px;
  color: var(--ink);
  font-size: 0.78rem;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.kicker-tag,
.kicker-dot {
  display: inline-flex;
  align-items: center;
  padding: 5px 10px;
  background: var(--lemon);
  color: var(--ink);
  font-size: 0.72rem;
  font-weight: 800;
  letter-spacing: 0.14em;
  text-transform: uppercase;
}

.kicker-dot {
  width: auto;
  height: auto;
  border-radius: 0;
  box-shadow: none;
}

.hero h1 {
  max-width: 18ch;
  margin: 0 0 22px;
  color: var(--ink);
  font-family: var(--display);
  font-size: clamp(2.05rem, 4.8vw, 3.85rem);
  font-weight: 700;
  line-height: 1.12;
  letter-spacing: -0.018em;
  overflow-wrap: break-word;
}

.lede {
  max-width: 38rem;
  margin: 0;
  color: var(--ink-soft);
  font-size: clamp(1.05rem, 1.5vw, 1.22rem);
  line-height: 1.55;
}

.hero-photo {
  margin: 0;
  position: relative;
  z-index: 1;
}

.hero-photo::before {
  content: "";
  position: absolute;
  inset: 18px -16px -16px 16px;
  background: var(--blue);
  z-index: -1;
}

.hero-photo img {
  width: 100%;
  height: 440px;
  object-fit: cover;
  border: 3px solid var(--ink);
  transform: rotate(-1.4deg);
}

.figure {
  margin: 32px 0 36px;
}

.figure img {
  width: 100%;
  height: 300px;
  object-fit: cover;
  border: 3px solid var(--ink);
}

.figure figcaption,
.hero-photo figcaption,
.photo-mosaic figcaption {
  margin-top: 10px;
  color: var(--muted);
  font-size: 0.8rem;
  font-weight: 600;
}

.photo-mosaic {
  display: grid;
  grid-template-columns: 1.25fr 1fr;
  grid-template-rows: 1fr 1fr;
  gap: 10px;
  margin: 32px 0 36px;
}

.photo-mosaic figure {
  margin: 0;
  overflow: hidden;
  border: 3px solid var(--ink);
}

.photo-mosaic img {
  width: 100%;
  height: 100%;
  min-height: 150px;
  object-fit: cover;
  transition: transform 0.5s var(--ease);
}

.photo-mosaic figure:hover img {
  transform: scale(1.05);
}

.photo-mosaic figure:first-child {
  grid-row: 1 / 3;
}

.photo-mosaic figure:first-child img {
  min-height: 340px;
}

.wrap {
  width: min(var(--max), calc(100% - 40px));
  margin: 0 auto;
}

/* Stats */
.stat-band {
  background: var(--ink);
  color: #fff;
  padding: 28px 0 32px;
}

.stat-band-label {
  margin: 0 0 16px;
  color: var(--lemon);
  font-family: var(--sans);
  font-size: 0.78rem;
  font-weight: 800;
  letter-spacing: 0.16em;
  text-transform: uppercase;
}

.stat-strip {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 12px;
}

.stat-card {
  padding: 18px 16px 16px;
  background: transparent;
  border: 0;
  border-left: 3px solid var(--lemon);
}

.stat-card::after {
  display: none;
}

.stat-value {
  color: #fff;
  font-family: var(--display);
  font-size: clamp(1.9rem, 3.2vw, 2.5rem);
  font-weight: 700;
  letter-spacing: -0.02em;
  line-height: 1.08;
}

.stat-label {
  margin-top: 10px;
  color: #d7dee8;
  font-size: 0.86rem;
  font-weight: 600;
  line-height: 1.35;
}

.stat-source {
  display: block;
  margin-top: 8px;
  color: var(--lemon);
  font-size: 0.72rem;
  font-weight: 700;
  letter-spacing: 0.04em;
  text-transform: uppercase;
}

/* Article */
.article {
  padding: 56px 0 72px;
  background: var(--sheet);
}

.article-grid {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 260px;
  gap: 64px;
  align-items: start;
}

.prose {
  min-width: 0;
  max-width: 46rem;
}

.prose > p:first-of-type::first-letter {
  float: left;
  margin: 8px 10px 0 0;
  color: var(--blue);
  font-family: var(--display);
  font-size: 3.6rem;
  font-weight: 700;
  line-height: 0.85;
}

.prose h2 {
  margin: 2.6rem 0 1rem;
  color: var(--ink);
  font-family: var(--display);
  font-size: clamp(1.55rem, 2.6vw, 2.15rem);
  font-weight: 700;
  line-height: 1.2;
  letter-spacing: -0.015em;
}

.prose h3 {
  margin: 1.6rem 0 0.6rem;
  color: var(--ink);
  font-family: var(--display);
  font-size: 1.22rem;
  font-weight: 700;
}

.prose p {
  margin: 0 0 1rem;
}

.prose p strong,
.prose li strong {
  color: var(--ink);
  font-weight: 750;
  background: linear-gradient(transparent 62%, var(--lemon) 62%);
  box-decoration-break: clone;
}

.rule {
  height: 0;
  margin: 40px 0;
  border: 0;
  border-top: 2px solid var(--ink);
}

.pull {
  margin: 28px 0;
  padding: 8px 0 8px 18px;
  border-left: 8px solid var(--lemon);
  color: var(--ink);
  font-family: var(--display);
  font-size: clamp(1.35rem, 2.2vw, 1.7rem);
  font-style: italic;
  font-weight: 600;
  line-height: 1.3;
  letter-spacing: -0.01em;
}

/* Expense cascade */
.cascade {
  display: flex;
  flex-direction: column;
  gap: 8px;
  margin: 28px 0 32px;
}

.cascade-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 8px;
}

.cascade-grid-late {
  grid-template-columns: 1fr 1fr;
}

.cascade-item {
  display: flex;
  align-items: center;
  gap: 12px;
  min-height: 56px;
  padding: 12px 14px;
  background: var(--white);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  color: var(--ink);
  font-size: 0.98rem;
  font-weight: 650;
  line-height: 1.35;
  overflow-wrap: break-word;
}

.cascade-item > span:last-child {
  min-width: 0;
}

.icon-tile {
  flex: none;
  width: 32px;
  height: 32px;
  display: grid;
  place-items: center;
  border-radius: var(--radius-sm);
  background: var(--green);
  color: #fff;
}

.icon-tile.blue {
  background: var(--blue);
  color: #fff;
}

.icon-tile svg {
  width: 17px;
  height: 17px;
}

.cascade-pivot {
  margin-top: 4px;
  margin-bottom: 4px;
  background: var(--blue-mist);
  border-color: var(--blue-soft);
  font-family: var(--display);
  font-size: 1.12rem;
  font-style: italic;
  font-weight: 600;
  letter-spacing: -0.01em;
}

.unplanned {
  background: var(--green-mist);
  border-color: var(--green-soft);
  box-shadow: inset 3px 0 0 var(--green);
}

/* Checklist */
.check-list {
  list-style: none;
  margin: 18px 0 28px;
  padding: 0;
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 8px 18px;
}

.check-list li {
  display: flex;
  gap: 10px;
  align-items: center;
  padding: 8px 0;
  border-radius: 0;
  background: transparent;
  border: 0;
  border-bottom: 1px dashed var(--line);
  font-weight: 600;
}

.check-mark {
  flex: none;
  width: 18px;
  height: 18px;
  margin-top: 0;
  color: var(--green);
  overflow: visible;
}

/* Share mosaic */
.share-grid {
  display: grid;
  grid-template-columns: 1.4fr 1fr 1fr;
  gap: 10px;
  margin: 24px 0 28px;
}

.share-block {
  min-height: 170px;
  padding: 20px;
  border: 3px solid var(--ink);
  color: var(--ink);
  display: flex;
  flex-direction: column;
  justify-content: space-between;
}

.share-block.home {
  background: var(--blue);
  color: #fff;
}

.share-block.transport {
  background: var(--lemon);
}

.share-block.food {
  background: var(--green);
  color: #fff;
}

.share-pct {
  font-family: var(--display);
  font-size: 2.4rem;
  line-height: 1.05;
  letter-spacing: -0.02em;
  font-weight: 700;
}

.share-name {
  font-size: 0.95rem;
  font-weight: 700;
}

.share-note {
  margin-top: 6px;
  font-size: 0.8rem;
  opacity: 0.85;
}

/* Category chips */
.chips {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin: 18px 0 28px;
}

.chip {
  padding: 8px 12px;
  border-radius: 0;
  background: var(--white);
  border: 2px solid var(--ink);
  color: var(--ink);
  font-size: 0.9rem;
  font-weight: 700;
}

.chip:nth-child(odd) {
  background: var(--blue);
  border-color: var(--ink);
  color: #fff;
}

.chip:nth-child(even) {
  background: var(--lemon);
  border-color: var(--ink);
  color: var(--ink);
}

.tiny-debits {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 8px;
  margin: 20px 0 24px;
}

.debit {
  padding: 16px 10px;
  text-align: center;
  border: 2px solid var(--ink);
  background: var(--white);
}

.debit:nth-child(odd) {
  background: var(--blue-mist);
}

.debit b {
  display: block;
  color: var(--ink);
  font-family: var(--display);
  font-size: 1.45rem;
  font-weight: 700;
}

.debit span {
  color: var(--muted);
  font-size: 0.75rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.06em;
}

/* Questions */
.q-stack {
  display: grid;
  gap: 0;
  margin: 24px 0 28px;
  border-top: 2px solid var(--ink);
}

.q-item {
  display: grid;
  grid-template-columns: 52px 1fr;
  gap: 14px;
  align-items: center;
  padding: 16px 0;
  border-radius: 0;
  background: transparent;
  border: 0;
  border-bottom: 2px solid var(--ink);
}

.q-num {
  width: 48px;
  height: 48px;
  display: grid;
  place-items: center;
  border-radius: 0;
  background: var(--blue);
  color: #fff;
  font-family: var(--display);
  font-size: 1.35rem;
  font-weight: 700;
}

.q-item:nth-child(even) .q-num {
  background: var(--green);
}

.q-item p {
  margin: 0;
  color: var(--ink);
  font-weight: 750;
  font-size: 1.05rem;
}

/* Scenarios */
.scenarios {
  display: grid;
  gap: 14px;
  margin: 24px 0 32px;
}

.scenario {
  padding: 22px 22px 10px;
  border: 3px solid var(--ink);
  background: var(--white);
  box-shadow: 8px 8px 0 var(--lemon);
}

.scenario:nth-child(2) {
  box-shadow: 8px 8px 0 var(--blue);
}

.scenario:nth-child(3) {
  box-shadow: 8px 8px 0 var(--green);
}

.scenario-index {
  display: inline-flex;
  align-items: center;
  margin-bottom: 8px;
  padding: 3px 8px;
  background: var(--ink);
  color: var(--lemon);
  font-family: var(--sans);
  font-size: 0.78rem;
  font-weight: 800;
  letter-spacing: 0.12em;
  text-transform: uppercase;
}

.scenario h3 {
  margin-top: 0;
}

.split {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 8px;
  margin: 8px 0 16px;
}

.split span {
  padding: 10px 10px;
  background: var(--lemon);
  color: var(--ink);
  font-size: 0.84rem;
  font-weight: 700;
  text-align: center;
  border: 2px solid var(--ink);
}

/* Flow */
.flow {
  display: grid;
  gap: 0;
  margin: 28px 0;
}

.flow-node {
  position: relative;
  padding: 14px 16px;
  border: 2px solid var(--ink);
  color: var(--ink);
  font-weight: 700;
  font-family: var(--sans);
}

.flow-node:nth-child(4n + 1) {
  background: var(--blue);
  color: #fff;
  border-color: var(--ink);
}

.flow-node:nth-child(4n + 3) {
  background: var(--green);
  color: #fff;
  border-color: var(--ink);
}

.flow-arrow {
  height: 22px;
  display: grid;
  place-items: center;
  color: var(--ink);
}

.flow-arrow svg {
  width: 16px;
  height: 16px;
}

.dream-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 8px;
  margin: 16px 0 24px;
}

.dream {
  padding: 16px;
  border: 2px dashed var(--ink);
  background: var(--paper);
  color: var(--ink);
  font-weight: 750;
  font-size: 0.95rem;
}

.dream:nth-child(odd) {
  background: var(--lemon);
  border-style: solid;
}

/* Sidebar */
.side {
  position: sticky;
  top: calc(var(--header-h) + 20px);
}

.side-card {
  padding: 20px;
  background: var(--blue);
  color: #e7edff;
  border: 3px solid var(--ink);
  box-shadow: 8px 8px 0 var(--lemon);
}

.side-card h2 {
  margin: 0 0 14px;
  color: #fff;
  font-family: var(--display);
  font-size: 1.2rem;
  font-weight: 700;
}

.side-card a {
  display: block;
  color: #fff;
  text-decoration: none;
  font-size: 0.92rem;
  font-weight: 650;
  padding: 8px 0;
  border-bottom: 1px solid rgba(255, 255, 255, 0.25);
}

.side-card a:hover {
  color: var(--lemon);
}

.side-note {
  margin-top: 16px;
  padding: 16px;
  background: var(--lemon);
  border: 3px solid var(--ink);
  color: var(--ink);
  font-size: 0.86rem;
}

.side-note strong {
  display: block;
  margin-bottom: 6px;
  color: var(--ink);
}

/* Quiz */
.quiz-section {
  padding: 48px 0 56px;
  background: repeating-linear-gradient(
    -45deg,
    rgba(31, 157, 98, 0.18),
    rgba(31, 157, 98, 0.18) 12px,
    transparent 12px,
    transparent 24px
  );
}

.quiz-shell {
  width: min(760px, calc(100% - 40px));
  margin: 0 auto;
  padding: 32px 32px 28px;
  background: var(--white);
  border: 3px solid var(--ink);
  box-shadow: 12px 12px 0 var(--lemon);
}

.quiz-kicker {
  margin: 0;
  color: var(--blue);
  font-family: var(--sans);
  font-size: 0.78rem;
  font-weight: 800;
  letter-spacing: 0.16em;
  text-transform: uppercase;
}

.quiz-shell > h2 {
  margin: 8px 0 10px;
  color: var(--ink);
  font-family: var(--display);
  font-size: clamp(1.55rem, 2.8vw, 2.05rem);
  font-weight: 700;
  line-height: 1.2;
  letter-spacing: -0.015em;
}

.quiz-intro {
  color: var(--body);
  margin-bottom: 8px;
}

.privacy-note {
  margin: 0 0 22px;
  padding: 12px 14px;
  background: var(--green-soft);
  color: var(--ink);
  font-size: 0.9rem;
  border: 2px solid var(--ink);
}

.progress {
  display: flex;
  align-items: center;
  gap: 12px;
  margin-bottom: 18px;
}

.progress-track {
  flex: 1;
  height: 8px;
  background: var(--line-soft);
  overflow: hidden;
  border: 2px solid var(--ink);
}

.progress-fill {
  height: 100%;
  width: 16.66%;
  background: var(--blue);
  transition: width 0.45s var(--ease);
}

.progress-label {
  color: var(--ink);
  font-size: 0.78rem;
  font-weight: 800;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  white-space: nowrap;
}

.quiz-body {
  display: flex;
  flex-direction: column;
  height: 520px;
}

.quiz-stage {
  position: relative;
  flex: 1 1 auto;
  display: flex;
  flex-direction: column;
  min-height: 0;
  overflow: hidden;
}

.quiz-panel,
.quiz-loading,
.quiz-result {
  flex: 1;
  display: flex;
  flex-direction: column;
  animation: panelIn 0.42s var(--ease);
}

.quiz-panel.leaving {
  animation: panelOut 0.28s ease forwards;
}

@keyframes panelIn {
  from {
    opacity: 0;
    transform: translateY(14px);
  }
  to {
    opacity: 1;
    transform: none;
  }
}

@keyframes panelOut {
  to {
    opacity: 0;
    transform: translateY(-10px);
  }
}

.quiz-question {
  margin: 0 0 18px;
  color: var(--ink);
  font-family: var(--display);
  font-size: 1.28rem;
  font-weight: 700;
  line-height: 1.35;
}

.options {
  display: grid;
  gap: 8px;
}

.option {
  display: grid;
  grid-template-columns: 22px 1fr;
  gap: 12px;
  align-items: center;
  width: 100%;
  padding: 13px 14px;
  text-align: left;
  border-radius: 0;
  border: 2px solid var(--ink);
  background: var(--sheet);
  color: var(--ink);
  cursor: pointer;
  font-weight: 650;
  transition:
    background 0.15s,
    color 0.15s;
}

.option:hover,
.option:focus-visible {
  background: var(--blue-mist);
}

.option[aria-checked="true"] {
  border-color: var(--ink);
  background: var(--green);
  color: #fff;
}

.option[aria-checked="true"]:hover,
.option[aria-checked="true"]:focus-visible {
  background: var(--green);
}

.radio {
  width: 16px;
  height: 16px;
  border-radius: 0;
  border: 2px solid var(--ink);
  display: grid;
  place-items: center;
  background: #fff;
}

.option[aria-checked="true"] .radio {
  border-color: var(--ink);
  background: var(--lemon);
}

.option[aria-checked="true"] .radio::after {
  content: "";
  width: 8px;
  height: 8px;
  background: var(--ink);
}

.quiz-loading,
.quiz-result {
  align-items: center;
  justify-content: center;
  gap: 16px;
  text-align: center;
}

.quiz-loading p {
  margin: 0;
  color: var(--ink);
  font-weight: 800;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  font-size: 0.86rem;
}

.quiz-spinner {
  width: 28px;
  height: 28px;
  border: 3px solid var(--ink);
  background: var(--lemon);
  box-shadow: 4px 4px 0 var(--blue);
  animation: quizSpin 0.7s linear infinite;
}

.quiz-load-track {
  width: min(280px, 100%);
  height: 10px;
  border: 2px solid var(--ink);
  background: var(--sheet);
  overflow: hidden;
}

.quiz-load-fill {
  height: 100%;
  width: 0;
  background: var(--blue);
  animation: loadFill 1.5s var(--ease) forwards;
}

@keyframes quizSpin {
  to {
    transform: rotate(180deg);
  }
}

@keyframes loadFill {
  to {
    width: 100%;
  }
}

.quiz-result {
  width: 100%;
}

.quiz-result-card {
  width: 100%;
  display: flex;
  align-items: center;
  min-height: 220px;
  padding: 22px;
  border: 3px solid var(--ink);
  background: var(--sheet);
  box-shadow: 8px 8px 0 var(--lemon);
}

.quiz-actions {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 12px;
  margin-top: 22px;
  flex-shrink: 0;
}

#quiz-back {
  min-width: 118px;
}

.quiz-actions.leaving {
  animation: panelOut 0.28s ease forwards;
}

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  min-height: 48px;
  padding: 0 18px;
  border-radius: 6px;
  border: 2px solid transparent;
  cursor: pointer;
  text-decoration: none;
  font-family: var(--sans);
  font-weight: 700;
  transition:
    transform 0.2s var(--ease),
    background 0.2s,
    opacity 0.2s;
}

.btn:hover {
  transform: translate(-2px, -2px);
}

.btn:disabled {
  opacity: 0.4;
  cursor: not-allowed;
  transform: none;
}

.btn-ghost {
  background: transparent;
  color: var(--ink);
  border-color: var(--ink);
}

.btn-primary {
  background: var(--blue);
  color: #fff;
  border-color: var(--ink);
}

.btn-primary:hover:not(:disabled) {
  background: var(--ink);
}

.btn-final {
  width: 100%;
  min-height: 88px;
  padding: 20px 24px;
  background: var(--green);
  color: #fff;
  border-color: var(--ink);
  font-size: 1.14rem;
  line-height: 1.25;
  box-shadow: none;
}

.btn-final:hover {
  background: var(--ink);
}

.btn svg {
  width: 16px;
  height: 16px;
}

.disclaimer {
  width: min(760px, calc(100% - 40px));
  margin: 28px auto 0;
  padding: 28px;
  background: var(--paper);
  border: 3px solid var(--ink);
}

.disclaimer h2 {
  margin: 0 0 12px;
  color: var(--ink);
  font-family: var(--display);
  font-size: 1.35rem;
  font-weight: 700;
}

.disclaimer p {
  margin: 0 0 12px;
  font-size: 0.96rem;
}

.disclaimer p:last-child {
  margin-bottom: 0;
}

.sources {
  width: min(var(--max), calc(100% - 40px));
  margin: 0 auto;
  padding: 40px 0 48px;
}

.sources h2 {
  margin: 0 0 8px;
  font-family: var(--display);
  color: var(--ink);
  font-weight: 700;
  letter-spacing: -0.015em;
}

.source-item {
  padding: 14px 0;
  border-top: 2px solid var(--ink);
}

.source-item:first-of-type {
  border-top: 2px solid var(--ink);
  margin-top: 18px;
}

.source-item strong {
  display: block;
  color: var(--ink);
}

.source-item span {
  color: var(--muted);
  font-size: 0.9rem;
}

.update-note {
  margin: 16px 0 0;
  color: var(--muted);
  font-style: normal;
  font-weight: 650;
}

/* Footer */
.site-footer {
  margin-top: 0;
  padding: 48px 0 28px;
  background: var(--ink);
  color: #c9d3de;
  border-top: 8px solid var(--lemon);
}

.footer-brand {
  width: min(var(--max), calc(100% - 40px));
  margin: 0 auto 28px;
}

.footer-brand .brand-name {
  color: #fff;
}

.footer-brand .brand-maline {
  color: var(--green-bright);
}

.footer-brand .brand-com {
  color: #8ea0b3;
}

.footer-brand .brand-sub {
  color: var(--lemon);
}

.footer-brand p {
  margin: 12px 0 0;
  max-width: 42ch;
}

.footer-title {
  margin: 0 0 14px;
  color: var(--lemon);
  font-family: var(--sans);
  font-size: 0.78rem;
  font-weight: 800;
  letter-spacing: 0.14em;
  text-transform: uppercase;
}

.footer-warn {
  display: block;
  width: min(var(--max), calc(100% - 40px));
  margin: 0 auto 8px;
  padding-top: 22px;
  border-top: 1px solid rgba(255, 255, 255, 0.12);
}

.footer-warn .footer-title {
  margin: 0 0 12px;
}

.warn-box {
  flex: 1;
  min-width: 0;
  padding: 0;
  border: 0;
  background: transparent;
  font-size: 0.84rem;
  line-height: 1.55;
}

.warn-box p {
  margin: 0;
}

.footer-nav {
  width: min(var(--max), calc(100% - 40px));
  margin: 0 auto 24px;
}

.footer-links {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  column-gap: 20px;
  row-gap: 10px;
}

.footer-links button,
.cookie-link {
  appearance: none;
  background: none;
  border: 0;
  padding: 0;
  color: #d8d4cc;
  text-align: left;
  cursor: pointer;
  font-size: 0.92rem;
  white-space: nowrap;
}

.footer-links button:hover,
.cookie-link:hover {
  color: var(--lemon);
}

.footer-bottom {
  width: min(var(--max), calc(100% - 40px));
  margin: 0 auto;
  padding-top: 18px;
  border-top: 1px solid rgba(255, 255, 255, 0.12);
  display: flex;
  justify-content: space-between;
  gap: 12px;
  flex-wrap: wrap;
  font-size: 0.85rem;
}

/* Modal */
.modal-root[hidden] {
  display: none;
}

.modal-root {
  position: fixed;
  inset: 0;
  z-index: 60;
  display: grid;
  place-items: center;
  padding: 24px;
}

.modal-backdrop {
  position: absolute;
  inset: 0;
  background: rgba(16, 16, 16, 0.62);
}

.modal {
  position: relative;
  width: min(860px, 100%);
  max-height: min(86vh, 920px);
  overflow: auto;
  padding: 32px 32px 40px;
  background: var(--sheet);
  border: 3px solid var(--ink);
  box-shadow: 12px 12px 0 var(--lemon);
  animation: modalIn 0.35s var(--ease);
}

@keyframes modalIn {
  from {
    opacity: 0;
    transform: translateY(18px);
  }
  to {
    opacity: 1;
    transform: none;
  }
}

.modal-close {
  position: sticky;
  top: 0;
  float: right;
  width: 40px;
  height: 40px;
  border: 2px solid var(--ink);
  background: var(--lemon);
  border-radius: 0;
  cursor: pointer;
  display: grid;
  place-items: center;
}

.modal h2 {
  margin: 0 80px 8px 0;
  color: var(--ink);
  font-family: var(--display);
  font-size: 1.85rem;
  font-weight: 700;
  line-height: 1.2;
}

.modal .meta {
  margin: 0 0 22px;
  color: var(--muted);
  font-size: 0.9rem;
}

.legal h3 {
  margin: 1.6rem 0 0.6rem;
  color: var(--ink);
  font-size: 1.12rem;
  font-family: var(--display);
  font-weight: 700;
}

.legal p,
.legal li {
  font-size: 0.98rem;
  line-height: 1.65;
}

.legal ul {
  padding-left: 1.15rem;
}

.legal table {
  width: 100%;
  border-collapse: collapse;
  margin: 16px 0 24px;
  font-size: 0.88rem;
}

.legal th,
.legal td {
  border: 2px solid var(--ink);
  padding: 10px;
  text-align: left;
  vertical-align: top;
}

.legal th {
  background: var(--lemon);
  color: var(--ink);
}

.legal a {
  color: var(--blue);
}

/* Cookies */
.cookie-banner {
  position: fixed;
  right: 20px;
  bottom: 20px;
  z-index: 50;
  width: min(440px, calc(100% - 32px));
  padding: 22px;
  background: var(--white);
  border: 3px solid var(--ink);
  box-shadow: 8px 8px 0 var(--blue);
  animation: panelIn 0.4s var(--ease);
}

.cookie-banner[hidden] {
  display: none;
}

.cookie-banner h2 {
  margin: 0 0 8px;
  font-size: 1.15rem;
  color: var(--ink);
  font-family: var(--display);
  font-weight: 700;
}

.cookie-banner p {
  margin: 0 0 16px;
  font-size: 0.92rem;
}

.cookie-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.cookie-actions .btn {
  min-height: 42px;
  font-size: 0.9rem;
}

.btn-soft {
  background: var(--lemon);
  color: var(--ink);
  border-color: var(--ink);
}

.cookie-customize {
  margin-top: 14px;
  padding-top: 12px;
  border-top: 2px solid var(--ink);
}

.cookie-row {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  align-items: center;
  margin-bottom: 10px;
  font-size: 0.92rem;
}

.switch {
  width: 44px;
  height: 26px;
  border-radius: 0;
  border: 2px solid var(--ink);
  background: var(--line);
  position: relative;
  cursor: pointer;
}

.switch.on {
  background: var(--green);
}

.switch::after {
  content: "";
  position: absolute;
  top: 2px;
  left: 2px;
  width: 18px;
  height: 18px;
  background: #fff;
  border: 1px solid var(--ink);
  transition: left 0.2s var(--ease);
}

.switch.on::after {
  left: 20px;
}

.switch:disabled {
  opacity: 0.7;
  cursor: default;
}

/* Reveal */
.reveal {
  opacity: 0;
  transform: translateY(18px);
  transition:
    opacity 0.6s var(--ease),
    transform 0.6s var(--ease);
}

.reveal.in {
  opacity: 1;
  transform: none;
}

body.modal-open {
  overflow: hidden;
}

@media (max-width: 980px) {
  .article-grid,
  .stat-strip,
  .share-grid,
  .tiny-debits,
  .dream-grid,
  .split,
  .check-list {
    grid-template-columns: 1fr 1fr;
  }

  .share-grid {
    grid-template-columns: 1fr;
  }

  .side {
    display: none;
  }

  .article-grid {
    grid-template-columns: 1fr;
  }

  .hero-layout,
  .photo-mosaic {
    grid-template-columns: 1fr;
  }

  .photo-mosaic figure:first-child {
    grid-row: auto;
  }

  .hero-photo img,
  .photo-mosaic figure:first-child img {
    height: 280px;
    min-height: 0;
  }
}

@media (max-width: 760px) {
  .nav {
    display: none;
    position: absolute;
    top: var(--header-h);
    left: 0;
    right: 0;
    flex-direction: column;
    align-items: stretch;
    padding: 12px 16px 18px;
    background: var(--white);
    border-bottom: 2px solid var(--ink);
  }

  .nav.open {
    display: flex;
  }

  .menu-toggle {
    display: inline-flex;
  }

  .site-header .brand-sub {
    display: none;
  }

  .stat-strip,
  .tiny-debits,
  .dream-grid,
  .split,
  .check-list,
  .cascade-grid,
  .cascade-grid-late {
    grid-template-columns: 1fr;
  }

  .hero {
    padding-top: 32px;
  }

  .hero-photo img {
    transform: none;
  }

  .quiz-shell,
  .disclaimer,
  .modal {
    padding: 22px;
  }

  .q-item {
    grid-template-columns: 40px 1fr;
  }

  .cookie-banner {
    right: 12px;
    left: 12px;
    width: auto;
    bottom: 12px;
  }

  .prose > p:first-of-type::first-letter {
    font-size: 3.2rem;
  }
}

/* Thank-you page */
.thanks-page {
  min-height: 100vh;
  min-height: 100dvh;
  display: grid;
  place-items: center;
  padding: 32px 24px;
  background: var(--paper);
}

.thanks {
  width: min(42rem, 100%);
  text-align: center;
}

.thanks-mark {
  width: 56px;
  height: 36px;
  margin: 0 auto 28px;
  overflow: visible;
}

.thanks h1 {
  margin: 0;
  color: var(--ink);
  font-family: var(--display);
  font-size: clamp(1.7rem, 4vw, 2.55rem);
  font-weight: 700;
  line-height: 1.25;
  letter-spacing: -0.018em;
}

.thanks p {
  margin: 18px 0 0;
  color: var(--ink-soft);
  font-size: clamp(1.08rem, 2vw, 1.28rem);
  font-weight: 500;
  line-height: 1.5;
}
