:root {
  --ink: #1f2d3d;
  --blue: #49657f;
  --blue-dark: #223d5a;
  --paper: #f7f4ed;
  --surface: #ffffff;
  --soft: #e7edf0;
  --rust: #ae6e50;
  --muted: #687582;
  --line: #d5d8d2;
  --serif: "Newsreader", Georgia, serif;
  --sans: "DM Sans", Arial, sans-serif;
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body { margin: 0; background: var(--paper); color: var(--ink); font: 400 17px/1.6 var(--sans); }
a { color: inherit; }
.shell { width: min(1120px, calc(100% - 40px)); margin: 0 auto; }
.site-header { position: sticky; top: 0; z-index: 20; background: rgba(251, 248, 243, 0.9); border-bottom: 1px solid rgba(217, 221, 229, 0.72); backdrop-filter: blur(12px); }
.nav-row { min-height: 82px; display: flex; align-items: center; justify-content: space-between; gap: 24px; }
.wordmark { color: var(--ink); font: 600 1.2rem/1.1 var(--serif); letter-spacing: -0.025em; text-decoration: none; }
.site-nav { display: flex; align-items: center; gap: 6px; padding: 5px; border-radius: 999px; background: rgba(255,255,255,0.82); }
.site-nav a, .footer-links a { color: var(--ink); font-size: 0.83rem; text-decoration: none; }
.site-nav a { padding: 7px 11px; border-radius: 999px; }
.site-nav a:hover, .site-nav a[aria-current="page"] { color: var(--blue-dark); background: var(--soft); }
.menu-button { display: none; padding: 8px 0; border: 0; background: transparent; color: var(--ink); font: 600 0.82rem var(--sans); }
.editorial-hero { padding: 20px 0 clamp(58px, 8vw, 104px); background: linear-gradient(135deg, #4e6976 0%, #29485c 52%, #223d5a 100%); color: #fff; }
.editorial-intro { display: flex; align-items: flex-end; justify-content: space-between; gap: 40px; padding: 26px 0 42px; }
.editorial-intro .eyebrow { margin: 0; color: #c2d1cb; }
.masthead-note { max-width: 410px; margin: 0; color: #e6ece6; font: 400 1.1rem/1.42 var(--serif); }
.lead-story { overflow: hidden; background: var(--surface); color: var(--ink); border-radius: 30px; box-shadow: 0 18px 42px rgba(26, 47, 94, 0.22); }
.lead-story-topline { display: flex; flex-wrap: wrap; gap: 10px 16px; padding: 20px 26px 8px; color: var(--blue-dark); font: 600 0.7rem/1.5 var(--sans); letter-spacing: 0.08em; text-transform: uppercase; }
.lead-story-topline span { padding: 5px 10px; border-radius: 999px; background: var(--soft); }
.lead-story-layout { padding: clamp(30px, 5vw, 70px); }
.lead-story h1 { max-width: 780px; margin-bottom: 22px; font-size: clamp(3.05rem, 7.1vw, 6.25rem); }
.lead-dek { max-width: 670px; margin-bottom: 25px; color: var(--muted); font: 400 clamp(1.16rem, 2vw, 1.42rem)/1.48 var(--serif); }
.eyebrow, .story-meta, .topic-number, .article-meta, .legal-label { margin: 0 0 16px; color: var(--blue); font: 600 0.73rem/1.45 var(--sans); letter-spacing: 0.1em; text-transform: uppercase; }
h1, h2, h3, p { margin-top: 0; }
h1 { max-width: 780px; margin-bottom: 0; font: 500 clamp(3.35rem, 7.4vw, 6.4rem)/0.96 var(--serif); letter-spacing: -0.05em; }
.button { display: inline-block; margin-top: 8px; padding: 12px 19px; border-radius: 999px; background: var(--blue); color: #fff; font: 500 0.92rem/1.15 var(--sans); letter-spacing: 0; text-decoration: none; white-space: nowrap; }
.button:hover, .button:focus-visible { background: var(--blue-dark); }
.button-light { background: var(--blue); }
.section { padding: clamp(64px, 8vw, 112px) 0; }
.field-note { background: #e6ebe2; border-bottom: 1px solid var(--line); }
.field-note-layout { display: grid; grid-template-columns: 0.7fr 1.3fr; gap: clamp(44px, 10vw, 150px); }
.field-note .large-copy { margin-bottom: 16px; font: 400 clamp(1.9rem, 4vw, 3.25rem)/1.06 var(--serif); letter-spacing: -0.04em; }
.field-note p:not(.eyebrow):not(.large-copy) { max-width: 700px; color: #3e4b60; font: 400 1.08rem/1.6 var(--serif); }
.section-featured { background: var(--surface); }
.featured-story { display: grid; grid-template-columns: 185px minmax(0, 1fr); gap: clamp(28px, 6vw, 90px); padding: 30px 0 2px; border-top: 2px solid var(--ink); }
.story-meta { color: var(--muted); line-height: 1.7; }
.featured-story h2, .topic-card h2, .page-heading h1, .article-header h1, .legal-heading h1 { font-family: var(--serif); font-weight: 500; letter-spacing: -0.038em; }
.featured-story h2 { max-width: 770px; margin-bottom: 16px; font-size: clamp(2.35rem, 5vw, 4.2rem); line-height: 1; }
.featured-story p { max-width: 650px; color: var(--muted); }
.text-link { display: inline-block; margin-top: 5px; border-bottom: 1px solid var(--blue); color: var(--ink); font-size: 0.9rem; font-weight: 600; line-height: 1.6; text-decoration: none; }
.text-link:hover, .text-link:focus-visible { color: var(--blue); }
.topics-section { border-top: 1px solid var(--line); }
.topic-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 18px; }
.topic-card { min-height: 270px; padding: 29px 28px 24px; border: 1px solid var(--line); border-radius: 24px; background: var(--surface); transition: transform 180ms ease, box-shadow 180ms ease; }
.topic-card:first-child { border-left: 1px solid var(--line); }
.topic-card:hover { transform: translateY(-4px); box-shadow: 0 10px 24px rgba(38, 54, 77, 0.09); }
.topic-number { color: var(--rust); }
.topic-card h2 { margin-bottom: 12px; font-size: 2rem; line-height: 1.05; }
.topic-card p:last-child { color: var(--muted); }
.about-preview { background: var(--blue-dark); color: #fff; }
.about-preview .eyebrow { color: #a9c1ff; }
.split-copy { display: grid; grid-template-columns: 0.7fr 1.3fr; gap: clamp(44px, 10vw, 150px); }
.split-copy p:not(.eyebrow) { color: #d9e3f6; }
.split-copy .large-copy { color: #fff; font: 400 clamp(1.7rem, 3.3vw, 2.65rem)/1.18 var(--serif); letter-spacing: -0.025em; }
.split-copy .text-link { color: #fff; border-color: #a9c1ff; }
.site-footer { padding: 44px 0 30px; background: #e7e4dc; }
.footer-top { display: flex; justify-content: space-between; gap: 30px; padding-top: 22px; border-top: 1px solid var(--ink); }
.footer-links { display: flex; flex-wrap: wrap; gap: 15px 20px; }
.footer-bottom { margin-top: 34px; color: var(--muted); font-size: 0.76rem; }
.page-hero, .article-header, .legal-heading { padding: 72px 0 56px; border-bottom: 1px solid var(--line); }
.page-heading, .article-wrap, .legal-wrap { width: min(760px, calc(100% - 40px)); margin: 0 auto; }
.page-heading h1, .legal-heading h1 { margin-bottom: 18px; font-size: clamp(3.4rem, 7vw, 5.6rem); line-height: 0.96; }
.page-heading p, .legal-heading p { max-width: 650px; color: var(--muted); font: 400 1.23rem/1.5 var(--serif); }
.article-header { background: var(--surface); }
.article-header h1 { margin: 18px 0 20px; font-size: clamp(3.15rem, 7vw, 5.9rem); line-height: 0.98; }
.article-dek { max-width: 640px; color: var(--muted); font: 400 1.3rem/1.5 var(--serif); }
.article-meta { display: flex; flex-wrap: wrap; gap: 12px; margin-top: 28px; color: var(--muted); }
.article-share { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; margin-top: 22px; }
.article-content .article-share { margin-top: 42px; padding-top: 22px; border-top: 1px solid var(--line); }
.share-button { min-height: 40px; padding: 8px 14px; border: 1px solid var(--line); border-radius: 999px; background: var(--surface); color: var(--ink); font: 600 0.82rem/1 var(--sans); cursor: pointer; }
.share-button:hover, .share-button:focus-visible { border-color: var(--blue); color: var(--blue-dark); background: var(--soft); }
.share-status { min-height: 20px; color: var(--muted); font-size: 0.8rem; }
.money-snapshot { margin: 30px 0 42px; padding: 28px; border: 1px solid var(--line); border-radius: 24px; background: var(--surface); }
.money-snapshot h2 { margin: 0 0 25px; font-size: clamp(1.85rem, 4vw, 2.5rem); }
.snapshot-bars { display: grid; gap: 20px; }
.snapshot-label { display: flex; justify-content: space-between; gap: 20px; margin-bottom: 8px; color: var(--ink); font: 500 0.94rem/1.35 var(--sans); }
.snapshot-label strong { white-space: nowrap; }
.snapshot-track { height: 13px; overflow: hidden; border-radius: 999px; background: var(--soft); }
.snapshot-bar { display: block; height: 100%; border-radius: inherit; }
.snapshot-income { background: var(--blue-dark); }
.snapshot-spend { background: var(--rust); }
.snapshot-budget { background: #a8b6a1; }
.snapshot-margin { margin: 25px 0 8px !important; color: var(--ink) !important; font: 500 1.18rem/1.4 var(--serif) !important; }
.snapshot-note { margin-bottom: 0 !important; color: var(--muted) !important; font: 400 0.85rem/1.55 var(--sans) !important; }
.article-content, .legal-content { padding: 55px 0 92px; }
.article-content p, .legal-content p, .legal-content li { color: #24364f; font: 400 1.18rem/1.75 var(--serif); }
.article-content a { color: var(--blue-dark); font-weight: 600; text-decoration: underline; text-decoration-color: var(--rust); text-decoration-thickness: 2px; text-underline-offset: 3px; }
.article-content a:hover, .article-content a:focus-visible { color: var(--rust); }
.article-content a.button, .article-content a.button:hover, .article-content a.button:focus-visible { color: #fff; text-decoration: none; }
.article-content h2, .legal-content h2 { margin: 50px 0 15px; font: 500 2.2rem/1.1 var(--serif); letter-spacing: -0.03em; }
.article-content ul { margin: 24px 0 30px; padding-left: 23px; }
.article-content li { margin-bottom: 10px; font: 400 1.05rem/1.55 var(--sans); }
.article-note, .affiliate-box { margin: 36px 0; padding: 18px 20px; border-left: 3px solid var(--blue); border-radius: 0 18px 18px 0; background: var(--soft); color: var(--ink); font-size: 0.88rem; }
.article-note p, .affiliate-box p { margin: 0; color: var(--ink); font: 400 0.94rem/1.55 var(--sans); }
.article-quote { margin: 42px 0; padding: 27px 0; border-top: 1px solid var(--rust); border-bottom: 1px solid var(--rust); color: var(--rust); font: 500 clamp(1.75rem, 4vw, 2.6rem)/1.2 var(--serif); letter-spacing: -0.025em; }
.article-list { border-top: 1px solid var(--line); }
.article-list-item { display: grid; grid-template-columns: 130px 1fr; gap: 26px; padding: 28px 0; border-bottom: 1px solid var(--line); }
.article-list-item h2 { margin: 0 0 8px; font: 500 2rem/1.08 var(--serif); letter-spacing: -0.03em; }
.article-list-item p { margin-bottom: 0; color: var(--muted); }
.tools-intro { margin-bottom: 42px; color: var(--muted); font: 400 1.24rem/1.55 var(--serif); }
.tool-card { max-width: 700px; padding: 30px; border: 1px solid var(--line); border-radius: 24px; background: var(--surface); }
.tool-card + .tool-card { margin-top: 18px; }
.tool-card h2 { margin: 0 0 8px; font: 500 2.4rem/1 var(--serif); letter-spacing: -0.04em; }
.tool-card p { color: var(--muted); }
.tool-link-note { margin: 16px 0 0; font-size: 0.92rem; }
.tool-link-note a { color: var(--blue-dark); font-weight: 600; }
.calculator-page { padding: 70px 0 92px; }
.calculator-page h1 { margin: 10px 0 18px; font-size: clamp(3rem, 7vw, 5.4rem); }
.calculator-intro { max-width: 620px; color: var(--muted); font: 400 1.28rem/1.52 var(--serif); }
.calculator-grid { display: grid; grid-template-columns: minmax(0, 0.95fr) minmax(0, 1.05fr); gap: 20px; margin-top: 42px; }
.calculator-form, .calculator-results { padding: 28px; border: 1px solid var(--line); border-radius: 24px; background: var(--surface); }
.calculator-form { display: grid; gap: 18px; align-content: start; }
.calculator-form label { display: grid; gap: 8px; color: var(--ink); font: 600 0.88rem/1.3 var(--sans); }
.input-with-prefix, .input-with-suffix { display: grid; grid-template-columns: auto 1fr; align-items: center; min-height: 51px; overflow: hidden; border: 1px solid var(--line); border-radius: 14px; background: #fff; }
.input-with-suffix { grid-template-columns: 1fr auto; }
.input-with-prefix > span, .input-with-suffix > span { padding: 0 0 0 16px; color: var(--muted); font: 500 1rem var(--sans); }
.input-with-suffix > span { padding: 0 16px 0 0; }
.calculator-form input { width: 100%; min-width: 0; padding: 13px 15px; border: 0; outline: none; background: transparent; color: var(--ink); font: 500 1rem var(--sans); }
.input-with-prefix:focus-within, .input-with-suffix:focus-within { border-color: var(--blue); box-shadow: 0 0 0 3px rgba(73, 101, 127, 0.14); }
.calculator-helper { margin: 0; color: var(--muted); font-size: 0.84rem; }
.calculator-results { background: var(--blue-dark); color: #fff; }
.calculator-results .eyebrow { color: #b9d1df; }
.calculator-total-label { margin: 0; color: #d5e2ea; font-size: 0.88rem; }
.calculator-total { margin: 2px 0 26px; font: 500 clamp(2.5rem, 6vw, 4.5rem)/1 var(--serif); letter-spacing: -0.05em; }
.calculator-stats { display: grid; grid-template-columns: 1fr 1fr; gap: 0; margin: 0; border-top: 1px solid rgba(255,255,255,0.22); }
.calculator-stats div { padding: 16px 10px 15px 0; border-bottom: 1px solid rgba(255,255,255,0.22); }
.calculator-stats div:nth-child(even) { padding-left: 18px; border-left: 1px solid rgba(255,255,255,0.22); }
.calculator-stats dt { margin-bottom: 4px; color: #bcd0db; font-size: 0.74rem; line-height: 1.3; }
.calculator-stats dd { margin: 0; color: #fff; font: 500 1.17rem/1.2 var(--serif); }
.calculator-message { min-height: 1.5em; margin: 20px 0 0; color: #d8e4eb; font-size: 0.88rem; }
.calculator-boundary { margin-top: 22px; padding: 20px 22px; border-left: 3px solid var(--rust); border-radius: 0 18px 18px 0; background: #eee8df; }
.calculator-boundary p { margin: 0; color: #455268; font: 400 0.91rem/1.55 var(--sans); }
.calculator-boundary p + p { margin-top: 8px; }
.amortization-schedule { margin-top: 52px; }
.schedule-heading { display: flex; align-items: end; justify-content: space-between; gap: 24px; margin-bottom: 20px; }
.schedule-heading .eyebrow { margin-bottom: 8px; }
.schedule-heading h2 { margin: 0; font: 500 clamp(1.8rem, 4vw, 2.65rem)/1.08 var(--serif); letter-spacing: -0.04em; }
.schedule-heading > p { margin: 0; color: var(--muted); font-size: 0.84rem; white-space: nowrap; }
.schedule-scroll { overflow-x: auto; border: 1px solid var(--line); border-radius: 20px; background: var(--surface); }
.schedule-scroll table { width: 100%; min-width: 620px; border-collapse: collapse; }
.schedule-scroll th, .schedule-scroll td { padding: 14px 17px; border-bottom: 1px solid var(--line); text-align: right; font-size: 0.88rem; }
.schedule-scroll th:first-child, .schedule-scroll td:first-child { text-align: left; }
.schedule-scroll th { color: var(--muted); font-size: 0.72rem; letter-spacing: 0.07em; text-transform: uppercase; }
.schedule-scroll td { color: var(--ink); }
.schedule-scroll tbody tr:last-child td { border-bottom: 0; }
.legal-section { scroll-margin-top: 104px; margin-bottom: 56px; }
.legal-section:not(:last-child) { padding-bottom: 38px; border-bottom: 1px solid var(--line); }
@media (max-width: 760px) {
  .shell { width: min(100% - 32px, 1120px); }
  .nav-row { min-height: 66px; }
  .menu-button { display: block; }
  .site-nav { display: none; position: absolute; top: 66px; left: 16px; right: 16px; padding: 12px; background: var(--surface); border: 1px solid var(--line); border-radius: 18px; box-shadow: 0 12px 26px rgba(38, 54, 77, 0.12); flex-direction: column; align-items: flex-start; gap: 5px; }
  .site-nav.is-open { display: flex; }
  .editorial-intro, .lead-story-layout, .field-note-layout, .split-copy { grid-template-columns: 1fr; }
  .editorial-intro { display: grid; gap: 14px; padding-bottom: 26px; }
  .lead-story { border-radius: 22px; box-shadow: 0 14px 30px rgba(26, 47, 94, 0.2); }
  .lead-story-layout { gap: 22px; padding: 28px 24px 30px; }
  h1 { font-size: clamp(3.05rem, 15vw, 4.6rem); }
  .featured-story, .article-list-item { grid-template-columns: 1fr; gap: 14px; }
  .topic-grid { grid-template-columns: 1fr; }
  .topic-grid { gap: 12px; }
  .topic-card, .topic-card:first-child { min-height: auto; border: 1px solid var(--line); }
  .footer-top { flex-direction: column; }
  .page-hero, .article-header, .legal-heading { padding: 56px 0 45px; }
  .page-heading, .article-wrap, .legal-wrap { width: min(100% - 32px, 760px); }
  .calculator-page { padding: 52px 0 70px; }
  .calculator-grid { grid-template-columns: 1fr; margin-top: 30px; }
  .calculator-form, .calculator-results { padding: 22px; border-radius: 20px; }
  .schedule-heading { display: block; }
  .schedule-heading > p { margin-top: 10px; white-space: normal; }
}
