:root {
  --money-ink: #191814;
  --money-muted: #696354;
  --money-paper: #f4f0e6;
  --money-card: #fffdf8;
  --money-line: #d9d0bd;
  --money-gold: #a98020;
}

* { box-sizing: border-box; }

html { scroll-behavior: smooth; }

body {
  margin: 0;
  color: var(--money-ink);
  background: var(--money-paper);
  font-family: Inter, Arial, sans-serif;
  line-height: 1.5;
}

.money-hero,
.money-main,
.money-footer {
  width: min(1240px, calc(100% - 32px));
  margin-inline: auto;
}

.money-hero {
  padding: 34px 0 7px;
  border-bottom: 1px solid var(--money-line);
}

.money-brand,
.money-section-heading > p,
.money-section-label {
  color: var(--money-gold);
  font-size: .76rem;
  font-weight: 700;
  letter-spacing: .15em;
  text-decoration: none;
  text-transform: uppercase;
}

.money-brand:hover { text-decoration: underline; }

.money-hero h1,
.money-section-heading h2,
.money-century h2,
.money-small-chart h3 {
  font-family: Georgia, "Times New Roman", serif;
  font-weight: 500;
}

.money-hero h1 {
  margin: 4px 0;
  font-size: clamp(2.2rem, 3.35vw, 3rem);
  line-height: 1.04;
  white-space: nowrap;
}

.money-hero > p {
  margin: 5px 0 0;
  color: var(--money-muted);
  font-size: clamp(1.05rem, 1.8vw, 1.3rem);
}

.money-main { padding: 6px 0 64px; }

.money-panel {
  background: var(--money-card);
  border: 1px solid var(--money-line);
  border-radius: 18px;
  box-shadow: 0 8px 28px rgba(47, 39, 20, .05);
}

.money-comparison {
  padding: clamp(16px, 2.2vw, 28px);
}

.money-controls,
.money-century-head {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 18px;
}

.money-controls {
  justify-content: flex-end;
  margin-bottom: 10px;
  color: var(--money-muted);
  font-size: .88rem;
}

.money-controls label { white-space: nowrap; }

.money-controls select,
.money-scale-button {
  min-height: 34px;
  padding: 5px 9px;
  border: 1px solid #cbc3b3;
  border-radius: 8px;
  color: #4f4a40;
  background: #fff;
  font: inherit;
}

.money-scale-options { display: flex; gap: 5px; }

.money-scale-button { cursor: pointer; }

.money-scale-button.is-active,
.money-scale-button[aria-pressed="true"] {
  color: #fff;
  border-color: #4b4943;
  background: #4b4943;
}

.money-main-chart {
  width: 100%;
  aspect-ratio: 1200 / 820;
  overflow: hidden;
  border-radius: 14px;
  background: #f8f5ec;
}

.money-main-chart svg { display: block; width: 100%; height: 100%; }

.money-loading,
.money-chart-error {
  margin: 0;
  padding: 42px;
  color: var(--money-muted);
  text-align: center;
}

.money-chart-notes {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 1.2fr);
  gap: 34px;
  margin-top: 18px;
  padding-top: 18px;
  border-top: 1px solid var(--money-line);
}

.money-takeaway {
  align-self: start;
  padding: 18px 20px;
  border-left: 4px solid var(--money-gold);
  border-radius: 0 12px 12px 0;
  background: #f5efe0;
}

.money-takeaway strong { display: block; margin-bottom: 8px; }
.money-takeaway ul { margin: 0; padding-left: 1.25rem; }
.money-takeaway li { margin: 4px 0; }
.money-explainer p { margin: 0 0 10px; color: #494438; }
.money-explainer p:last-child { margin-bottom: 0; }

.money-source-note {
  margin: 16px 0 0;
  color: var(--money-muted);
  font-size: .87rem;
}

.money-section-heading { margin: 58px 0 16px; }
.money-section-heading > p { margin: 0; }
.money-section-heading h2,
.money-century h2 { margin: 3px 0 10px; font-size: clamp(1.8rem, 3.4vw, 2.8rem); line-height: 1.1; }

.money-raw-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 14px;
}

.money-small-chart { padding: 12px; }
.money-small-chart h3 { margin: 8px 8px 4px; font-size: 1.35rem; }
.money-small-chart img,
.money-century img { display: block; width: 100%; border-radius: 14px; }

.money-century { margin-top: 48px; padding: clamp(16px, 2.2vw, 28px); }
.money-century-head { margin-bottom: 16px; }
.money-century-head > div:first-child { max-width: 820px; }
.money-century-head p { margin: 0; color: var(--money-muted); }
.money-century .money-scale-options { flex: 0 0 auto; }

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

.money-method-grid article {
  padding: 22px;
  border-radius: 14px;
  background: #ebe3cf;
}

.money-method-grid h3 { margin: 0 0 6px; font-size: 1rem; }
.money-method-grid p { margin: 0; color: #494438; }

.money-footer {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  padding: 26px 0 48px;
  border-top: 1px solid var(--money-line);
  color: var(--money-muted);
  font-size: .9rem;
}

.money-footer a { color: inherit; }

@media (max-width: 800px) {
  .money-hero { padding: 20px 0 5px; }
  .money-hero h1 { font-size: 2.1rem; line-height: 1.03; white-space: normal; }
  .money-hero > p { margin-top: 6px; font-size: 1rem; }
  .money-main { padding-top: 4px; }
  .money-comparison { padding: 14px; }
  .money-controls { margin-bottom: 8px; font-size: .82rem; }
  .money-controls select,
  .money-scale-button { min-height: 32px; padding: 4px 7px; }
  .money-main-chart { aspect-ratio: 1200 / 680; margin-inline: -6px; width: calc(100% + 12px); }
  .money-chart-notes,
  .money-raw-grid,
  .money-method-grid { grid-template-columns: 1fr; }
  .money-chart-notes { gap: 18px; margin-top: 12px; padding-top: 14px; }
  .money-takeaway { padding: 15px 16px; font-size: .93rem; line-height: 1.4; }
  .money-explainer { font-size: .93rem; line-height: 1.45; }
  .money-section-heading { margin-top: 44px; }
  .money-century-head { align-items: flex-start; flex-direction: column; }
  .money-century img,
  .money-small-chart img { min-height: 300px; object-fit: contain; }
}

@media (max-width: 420px) {
  .money-hero,
  .money-main,
  .money-footer { width: min(100% - 24px, 1240px); }
  .money-hero h1 { font-size: 1.9rem; }
  .money-controls { gap: 5px; }
  .money-controls label { display: flex; align-items: center; gap: 4px; }
}
