/* Visual identity: "MS Financial Literacy — Brand Studio" concept (Deep Forest / Fresh Lime / Warm Paper,
   Manrope + DM Sans, 24px radii, 8px grid). Light by design. Fonts self-hosted, latin subset. */
@font-face { font-family: "Manrope"; font-style: normal; font-weight: 400 800; font-display: swap; src: url(/fonts/manrope-normal.woff2) format("woff2"); unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD; }
@font-face { font-family: "DM Sans"; font-style: normal; font-weight: 400 700; font-display: swap; src: url(/fonts/dm-sans-normal.woff2) format("woff2"); unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD; }
@font-face { font-family: "DM Sans"; font-style: italic; font-weight: 400; font-display: swap; src: url(/fonts/dm-sans-italic.woff2) format("woff2"); unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD; }

:root {
  --paper: #f7f8f2;
  --white: #ffffff;
  --ink: #163b32;
  --muted: #55675f;
  --line: #dde3d9;
  --lime: #d8f27a;
  --sage: #e9efe3;
  --forest: #235747;
  --highlight: #f1f9cf;
  --radius: 24px;
  --radius-sm: 12px;
  --font: "DM Sans", system-ui, -apple-system, "Segoe UI", Arial, sans-serif;
  --heading: "Manrope", system-ui, Arial, sans-serif;
  --serif: Georgia, "Times New Roman", serif;
  --wrap: 1320px;
  --measure: 44rem;
  color-scheme: light;
}

*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; }
body { margin: 0; background: var(--paper); color: var(--ink); font: 400 1.0625rem/1.65 var(--font); }
h1, h2, h3, p { margin: 0; }
h1, h2, h3 { font-family: var(--heading); color: var(--ink); }
a { color: var(--forest); text-decoration-thickness: 1px; text-underline-offset: 4px; transition: color 0.2s, background 0.2s, transform 0.2s, border-color 0.2s; }
a:hover { color: var(--ink); }
:focus-visible { outline: 3px solid var(--forest); outline-offset: 4px; border-radius: 4px; }
img { max-width: 100%; height: auto; }
.wrap { max-width: var(--wrap); margin: 0 auto; padding: 0 56px; }
.skip { position: absolute; left: -9999px; }
.skip:focus { left: 16px; top: 16px; background: var(--white); padding: 8px 12px; z-index: 10; }

/* header */
.masthead { border-bottom: 1px solid var(--line); background: var(--paper); }
.masthead__row { display: flex; align-items: center; justify-content: space-between; gap: 16px 24px; min-height: 96px; flex-wrap: wrap; padding-top: 12px; padding-bottom: 12px; }
.brand { display: inline-flex; align-items: center; gap: 12px; color: var(--ink); text-decoration: none; font: 700 1rem/1.2 var(--heading); letter-spacing: -0.01em; min-height: 44px; }
.brand:hover { color: var(--ink); }
.brand__tld { font-weight: 500; color: var(--muted); }
.brand small { display: block; font: 500 0.6875rem/1.2 var(--font); letter-spacing: 0.16em; text-transform: uppercase; margin-top: 4px; color: var(--muted); }
.mark { width: 43px; height: 43px; flex: none; color: var(--ink); }
.sections { display: flex; gap: 4px; background: #e9ede3; padding: 5px; border-radius: 99px; overflow-x: auto; scrollbar-width: none; max-width: 100%; }
.sections::-webkit-scrollbar { display: none; }
.sections a { display: inline-flex; align-items: center; min-height: 40px; padding: 0 16px; border-radius: 99px; color: var(--muted); font-size: 0.875rem; text-decoration: none; white-space: nowrap; }
.sections a:hover { color: var(--ink); background: #ffffff99; }
.sections a[aria-current] { background: var(--white); color: var(--ink); box-shadow: 0 2px 5px #163b3210; }

/* shared bits */
.eyebrow { display: flex; align-items: center; gap: 10px; font-size: 0.6875rem; text-transform: uppercase; letter-spacing: 0.18em; font-weight: 700; color: var(--ink); }
.eyebrow--center { justify-content: center; margin-bottom: 20px; }
.dot { width: 7px; height: 7px; background: var(--forest); border-radius: 50%; display: inline-block; }
.num { display: block; font-size: 0.6875rem; letter-spacing: 0.12em; text-transform: uppercase; color: var(--muted); margin-bottom: 12px; }
.pill { display: inline-block; border: 1px solid var(--line); padding: 4px 12px; border-radius: 30px; font-size: 0.75rem; background: var(--white); }
.btn { display: inline-flex; align-items: center; justify-content: center; gap: 16px; min-height: 48px; padding: 12px 24px; border: 1px solid var(--ink); border-radius: 99px; background: var(--ink); color: var(--white); font-size: 0.9375rem; text-decoration: none; }
.btn:hover { transform: translateY(-2px); color: var(--white); }
.btn--ghost { background: transparent; color: var(--ink); }
.btn--ghost:hover { color: var(--ink); background: var(--white); }
.actions { display: flex; flex-wrap: wrap; gap: 12px; margin-top: 28px; }

/* home hero */
.site-hero { display: grid; grid-template-columns: 1.1fr 1fr; align-items: center; gap: 64px; padding: 72px 0; }
.site-hero h1 { font-size: clamp(2.75rem, 1.8rem + 3.4vw, 4.25rem); font-weight: 500; line-height: 1.08; letter-spacing: -0.035em; margin: 22px 0; }
.site-hero h1 em { font-family: var(--serif); font-weight: 400; letter-spacing: -0.02em; }
.lede { color: var(--muted); max-width: 30rem; font-size: 1.0625rem; }
.illustration { margin: 0; background: var(--sage); border-radius: 32px; padding: 38px; position: relative; overflow: hidden; }
.illustration::before, .illustration::after { content: ""; position: absolute; border: 1px solid #c4d2bc; border-radius: 50%; width: 420px; height: 420px; right: -150px; top: -230px; }
.illustration::after { width: 650px; height: 650px; right: -265px; top: -345px; }
.money-card { position: relative; z-index: 1; background: var(--white); border-radius: 20px; padding: 24px; box-shadow: 0 20px 40px #163b3210; }
.meta { display: flex; justify-content: space-between; align-items: center; gap: 12px; font-size: 0.875rem; }
.money-card__value { font: 500 2.25rem/1.1 var(--heading); letter-spacing: -0.04em; margin: 16px 0 8px; }
.bars { list-style: none; padding: 0; margin: 12px 0 8px; height: 170px; display: flex; align-items: flex-end; gap: 12px; }
.bars li { flex: 1; height: 100%; display: flex; flex-direction: column; justify-content: flex-end; align-items: center; gap: 4px; font-variant-numeric: tabular-nums; }
.bars__bar { display: block; width: 100%; height: calc(var(--h) * 0.72); background: var(--lime); border-radius: 9px 9px 0 0; order: 1; }
.bars li:nth-child(even) .bars__bar { background: var(--forest); }
.bars b { font: 600 0.875rem/1 var(--heading); order: 0; }
.bars small { font-size: 0.75rem; color: var(--muted); order: 2; }
.money-card figcaption { font-size: 0.8125rem; color: var(--muted); }
.floating { position: relative; z-index: 1; background: var(--ink); color: var(--white); padding: 22px; border-radius: 18px; width: 85%; margin: 20px 0 0 auto; }
.floating strong { display: block; }
.floating small { color: #c9d9cd; }
.band { border-top: 1px solid var(--line); border-bottom: 1px solid var(--line); }
.band__row { display: flex; justify-content: space-between; flex-wrap: wrap; gap: 12px 24px; padding-top: 22px; padding-bottom: 22px; font-size: 0.875rem; }
.band a { color: var(--ink); }

/* home sections */
.section { padding: 56px 0; border-bottom: 1px solid var(--line); }
.section-title { display: flex; justify-content: space-between; align-items: baseline; gap: 20px; margin-bottom: 28px; }
.section-title > span { font-size: 0.8125rem; color: var(--muted); }
.home h2, .cta h2 { font-size: clamp(1.75rem, 1.3rem + 1.6vw, 2.25rem); font-weight: 500; letter-spacing: -0.04em; line-height: 1.12; }
.cards { list-style: none; padding: 0; margin: 0; display: grid; gap: 18px; grid-template-columns: repeat(auto-fill, minmax(min(100%, 19rem), 1fr)); }
.path { display: flex; flex-direction: column; gap: 10px; height: 100%; padding: 28px; background: var(--white); border: 1px solid var(--line); border-radius: var(--radius); color: var(--ink); text-decoration: none; }
.path:hover { transform: translateY(-4px); color: var(--ink); border-color: #c4d2bc; }
.path--sage { background: var(--sage); border-color: transparent; }
.path small { font-size: 0.75rem; color: var(--muted); letter-spacing: 0.06em; text-transform: uppercase; margin-bottom: 18px; }
.path strong { font: 600 1.375rem/1.2 var(--heading); letter-spacing: -0.03em; }
.path span { font-size: 0.9375rem; color: var(--muted); }
.path .arrow { margin-top: auto; padding-top: 14px; font-style: normal; font-size: 0.875rem; color: var(--forest); text-decoration: underline; text-underline-offset: 4px; }
.rules { display: grid; grid-template-columns: 1fr 1fr; column-gap: 40px; }
.rule { display: flex; gap: 24px; padding: 20px 0; border-bottom: 1px solid var(--line); }
.rule b { font: 500 1.875rem/1 var(--heading); min-width: 64px; }
.rule p { color: var(--muted); }
.rule strong { display: block; color: var(--ink); }
.note { background: var(--sage); padding: 16px 20px; border-radius: var(--radius-sm); font-size: 0.875rem; color: var(--muted); margin: 28px 0 0; }
.cta { margin: 56px 0 72px; padding: 56px; text-align: center; border-radius: var(--radius); background: var(--lime); }
.cta h2 { margin-bottom: 24px; }

/* article, hub, page */
.article { padding-top: 32px; padding-bottom: 72px; }
.article > * { max-width: var(--measure); }
.article > .related, .article > .sources { max-width: 60rem; }
.article--narrow { max-width: calc(var(--measure) + 112px); }
.crumbs { font-size: 0.8125rem; color: var(--muted); margin-bottom: 20px; }
.crumbs a { color: var(--muted); }
.kicker { font-size: 0.6875rem; text-transform: uppercase; letter-spacing: 0.18em; font-weight: 700; color: var(--forest); margin: 0 0 12px; display: flex; align-items: center; gap: 10px; }
.kicker::before { content: ""; width: 7px; height: 7px; border-radius: 50%; background: var(--forest); }
.article h1 { font-size: clamp(2.125rem, 1.5rem + 2.4vw, 3.25rem); font-weight: 600; line-height: 1.1; letter-spacing: -0.035em; margin: 0 0 16px; hyphens: auto; overflow-wrap: break-word; }
.dek { font-size: 1.1875rem; line-height: 1.55; color: var(--muted); margin: 0 0 16px; }
.byline { font-size: 0.875rem; color: var(--muted); border-bottom: 1px solid var(--line); padding-bottom: 20px; margin: 0 0 32px; }
.prose h2 { font-size: 1.75rem; font-weight: 600; line-height: 1.2; letter-spacing: -0.03em; margin: 48px 0 14px; }
.prose h3 { font-size: 1.1875rem; font-weight: 700; letter-spacing: -0.01em; margin: 32px 0 8px; }
.prose p, .prose ul, .prose ol { margin: 0 0 16px; }
.prose li { margin-bottom: 8px; }
.prose li::marker { color: var(--forest); }
.prose strong { font-weight: 700; }
.prose blockquote { margin: 24px 0; padding: 16px 20px; background: var(--sage); border-radius: var(--radius-sm); }
.prose table { display: block; overflow-x: auto; border-collapse: collapse; width: 100%; margin: 24px 0 32px; font-size: 0.9375rem; font-variant-numeric: tabular-nums; background: var(--white); border: 1px solid var(--line); border-radius: 16px; }
.prose th, .prose td { border-bottom: 1px solid var(--line); padding: 10px 14px; text-align: left; vertical-align: top; }
.prose tr:last-child td { border-bottom: 0; }
.prose th { background: var(--sage); font-weight: 700; font-size: 0.875rem; }
.prose code { font-size: 0.9em; background: var(--sage); padding: 0.1em 0.35em; border-radius: 6px; }
sup.ref { font-size: 0.72em; line-height: 0; font-variant-numeric: tabular-nums; }
sup.ref a { text-decoration: none; font-weight: 700; padding: 0 0.15em; }
.article .note { margin: 48px 0 32px; }
.sources { margin-top: 32px; padding-top: 24px; border-top: 1px solid var(--line); font-size: 0.9375rem; }
.sources h2, .related h2 { font-size: 1.5rem; font-weight: 600; letter-spacing: -0.03em; margin: 0 0 16px; }
.sources ol { padding-left: 24px; }
.sources li { margin-bottom: 8px; overflow-wrap: anywhere; }
.sources li:target { background: var(--highlight); border-radius: 6px; }
.asof { color: var(--muted); }
.related { margin-top: 56px; }
.related .cards a { display: flex; flex-direction: column; gap: 8px; height: 100%; padding: 24px; background: var(--white); border: 1px solid var(--line); border-radius: var(--radius); color: var(--ink); text-decoration: none; }
.related .cards a:hover { transform: translateY(-4px); border-color: #c4d2bc; }
.related .cards strong { font: 600 1.125rem/1.25 var(--heading); letter-spacing: -0.02em; }
.related .cards span { font-size: 0.875rem; color: var(--muted); }

/* footer */
.colophon { border-top: 1px solid var(--line); padding: 48px 0 0; font-size: 0.875rem; color: var(--muted); }
.colophon__grid { display: grid; gap: 24px; grid-template-columns: 2fr 1fr; padding-bottom: 32px; }
.colophon__grid p { max-width: 34rem; margin-top: 14px; }
.colophon nav { display: flex; flex-direction: column; }
.colophon nav a { display: inline-flex; align-items: center; min-height: 36px; color: var(--ink); text-decoration: none; }
.colophon nav a:hover { text-decoration: underline; }
.fine { font-size: 0.8125rem; }
.colophon__base { display: flex; justify-content: space-between; gap: 16px; padding-top: 24px; padding-bottom: 40px; border-top: 1px solid var(--line); font-size: 0.75rem; }

@media (max-width: 900px) {
  .wrap { padding: 0 24px; }
  .site-hero { grid-template-columns: 1fr; gap: 32px; padding: 48px 0; }
  .rules { grid-template-columns: 1fr; }
  .colophon__grid { grid-template-columns: 1fr; }
  .colophon nav { flex-direction: row; flex-wrap: wrap; gap: 0 20px; }
  .colophon nav a { min-height: 44px; }
}
@media (max-width: 560px) {
  .masthead__row { min-height: 0; padding-top: 16px; padding-bottom: 16px; }
  .sections { width: 100%; }
  .section-title { flex-direction: column; gap: 8px; }
  .illustration { padding: 20px; }
  .floating { width: 100%; }
  .cta { padding: 32px 22px; }
  .path { padding: 22px; }
  .colophon__base { flex-direction: column; }
}
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after { transition: none !important; }
  .path:hover, .btn:hover, .related .cards a:hover { transform: none; }
}
