:root {
  color-scheme: light;
  --canvas: #f7f7f2;
  --paper: #fff;
  --ink: #172321;
  --muted: #51615d;
  --line: #d9dfd9;
  --forest: #173632;
  --teal: #285b52;
  --coral: #b53c28;
  --radius: 20px;
  font-family: "Avenir Next", Avenir, system-ui, sans-serif;
}

* { box-sizing: border-box; }
body { background: var(--canvas); color: var(--ink); margin: 0; line-height: 1.6; }
button, input { font: inherit; }
button, summary { cursor: pointer; }
button:disabled { cursor: wait; opacity: .7; }
a { color: var(--teal); text-underline-offset: .18em; }
h1, h2, p, dl, dd { margin: 0; }
h1, h2 { line-height: 1.05; letter-spacing: -.055em; }
h2 { font-size: clamp(1.65rem, 4vw, 2.12rem); }
p { color: var(--muted); }
svg { width: 19px; height: 19px; flex: none; vertical-align: middle; }
[hidden] { display: none !important; }
:focus-visible { outline: 3px solid #358375; outline-offset: 3px; }

.wrap { width: min(1120px, calc(100% - 64px)); margin-inline: auto; }
.skip { position: absolute; top: 10px; left: 12px; z-index: 3; transform: translateY(-150%); background: var(--paper); padding: 8px; }
.skip:focus { transform: none; }
.site-header { background: var(--paper); border-bottom: 1px solid var(--line); }
.nav-wrap { display: flex; align-items: center; justify-content: space-between; gap: 16px; min-height: 72px; }
.brand { display: inline-flex; align-items: center; gap: 8px; color: var(--ink); text-decoration: none; white-space: nowrap; font-size: 1.18rem; font-weight: 820; letter-spacing: -.065em; }
.brand > span:last-child span { color: var(--coral); }
.logo { display: grid; place-items: center; width: 34px; height: 34px; color: #fff; background: var(--forest); border-radius: 10px; }
.logo svg { margin-left: 2px; }
.site-header nav, .site-footer nav { display: flex; flex-wrap: wrap; align-items: center; gap: 3px 16px; }
.site-header nav a, .site-footer nav a { color: var(--muted); font-size: .88rem; font-weight: 650; text-decoration: none; }
.site-header nav a { padding: 5px 8px; }
.site-header nav a[aria-current="page"] { background: #e8f0eb; border-radius: 7px; color: var(--forest); }
.site-header nav a:hover, .site-footer nav a:hover { color: var(--coral); }

.hero { border-bottom: 1px solid var(--line); background: radial-gradient(ellipse at 75% 18%, #e9efe5, transparent 55%), var(--canvas); }
.hero-main { display: grid; grid-template-columns: minmax(0, 1.7fr) minmax(260px, 1fr); align-items: start; gap: clamp(24px, 6vw, 72px); padding-block: clamp(44px, 7vw, 100px) clamp(34px, 6vw, 80px); }
.hero h1 { font-size: clamp(2.7rem, 6.2vw, 5.35rem); font-weight: 830; letter-spacing: -.075em; }
.hero h1 em { color: var(--coral); font-style: normal; }
.lede { font-size: clamp(1rem, 2vw, 1.125rem); max-width: 53ch; }
.hero .lede { margin-block: 18px 25px; }
.hero-link, .inline-link { display: inline-flex; align-items: center; gap: 7px; font-size: .875rem; font-weight: 750; text-decoration: none; }
.hero-link { margin-top: 16px; }
.inline-link { margin-top: 12px; }
.hero-link:hover, .inline-link:hover { text-decoration: underline; }
.hero-link svg, .inline-link svg, .text-button svg { width: 16px; }
.mini-panel { background: var(--forest); color: #fff; border-radius: var(--radius); box-shadow: 0 20px 45px #203e301a; padding: 24px; margin-top: 9px; }
.mini-title { display: flex; align-items: center; gap: 11px; margin-bottom: 14px; line-height: 1.35; }
.mini-title strong { font-size: 1.06rem; }
.mini-title small, .thresholds small { display: block; color: #c3d5ce; font-size: .75rem; font-weight: 500; }
.tile-icon { width: 39px; height: 39px; flex: none; display: grid; place-items: center; border-radius: 9px; color: #def3e8; background: #315852; }
.thresholds > div { border-top: 1px solid #44615b; display: grid; grid-template-columns: auto minmax(0, 1fr) auto; align-items: center; gap: 11px; padding: 12px 0; }
.thresholds svg { color: #abd6c5; width: 17px; }
.thresholds dt { font-size: .89rem; }
.thresholds dd { font-size: 1.4rem; letter-spacing: -.05em; font-weight: 780; font-variant-numeric: tabular-nums; }
.mini-panel .inline-link { color: #d9f2e7; }

.tool-card { background: var(--paper); border: 1px solid var(--line); border-radius: var(--radius); padding: 21px; }
.hero-tool { box-shadow: 0 12px 34px #213a2c0c; }
.lookup label, .form-grid label { display: block; font-size: .87rem; font-weight: 740; }
.input-row { display: flex; gap: 9px; margin-top: 7px; }
.search-field { display: flex; align-items: center; flex: 1; min-width: 0; gap: 9px; border: 1px solid #cdd7d0; border-radius: 10px; padding-inline: 12px; color: var(--teal); background: #f8faf8; }
.search-field:focus-within { border-color: #358375; outline: 2px solid #bce0d3; }
.search-field input { width: 100%; min-width: 0; padding: 12px 0; background: transparent; border: 0; outline: 0; color: var(--ink); }
.button { display: inline-flex; align-items: center; justify-content: center; gap: 8px; border: 0; border-radius: 10px; padding: 10px 13px; font-weight: 760; white-space: nowrap; }
.primary { background: var(--coral); color: #fff; }
.primary:hover { background: #94311f; }
.button svg { width: 16px; }
.form-help { display: flex; justify-content: space-between; align-items: baseline; gap: 8px; margin-top: 8px; color: var(--muted); font-size: .78rem; }
.text-button { padding: 0; color: var(--teal); border: 0; background: transparent; font-weight: 750; white-space: nowrap; }
.text-button:hover { text-decoration: underline; }
.lookup-status { font-size: .84rem; margin-top: 10px; }
.lookup-status:empty { margin: 0; }
.lookup-status[data-type="error"] { color: #9a3022; }

.channel-result { margin-top: 16px; border-top: 1px solid var(--line); padding-top: 13px; }
.channel { display: flex; flex-wrap: wrap; align-items: center; gap: 10px; }
.channel img { border-radius: 50%; }
.channel div { min-width: 0; overflow-wrap: anywhere; }
.channel p { font-size: .83rem; }
.channel a { font-size: .8rem; font-weight: 750; }
.snapshot-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 6px; margin-top: 12px; }
.snapshot-grid div { padding: 8px; background: #edf3ef; border-radius: 8px; }
.snapshot-grid dt { color: var(--muted); font-size: .75rem; }
.snapshot-grid dd { margin-top: 3px; font-size: .88rem; font-weight: 750; }
.result-links { display: flex; flex-wrap: wrap; gap: 0 15px; }

.main-content { max-width: 850px; padding-block: 44px 68px; }
.intro p, .content-section p { margin-top: 10px; }
.content-section { padding-top: 25px; margin-top: 25px; border-top: 1px solid var(--line); }
.detail-card { margin-top: 15px; }
.manual-eligibility summary { font-weight: 750; }
.manual-eligibility .form-grid, .calc-fields { margin-top: 15px; }
.form-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 14px; }
.form-grid input:not([type="range"]) { display: block; width: 100%; margin-top: 6px; padding: 8px 10px; border: 1px solid #cdd7d0; border-radius: 8px; background: #f8faf8; color: var(--ink); }
.form-grid input[type="range"] { display: block; width: 100%; margin: 14px 0 0; accent-color: var(--teal); }
.fine { font-size: .83rem; margin-top: 10px; }
.result-note { padding: 9px 12px; border-radius: 8px; background: #e9f1ec; color: #2d564c; font-size: .88rem; font-weight: 650; }
.result-note[data-state="met"] { background: #e4f3e7; }
.gaps { margin: 7px 0 0; padding-left: 20px; color: var(--muted); font-size: .88rem; }
.gaps:empty { display: none; }
.lookup ~ .estimate-panel { margin-top: 22px; padding-top: 20px; border-top: 1px solid var(--line); }
.estimate-heading { display: flex; align-items: baseline; justify-content: space-between; gap: 10px; }
.estimate-heading span { color: var(--muted); font-size: .75rem; }
.estimate-panel .result-note { margin-top: 9px; }
.money-results { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 7px; margin-top: 10px; }
.money-results div { display: grid; align-content: start; gap: 3px; padding: 13px; border: 1px solid var(--line); border-radius: 10px; overflow-wrap: anywhere; }
.money-results div:nth-child(2) { color: #fff; background: var(--forest); border-color: var(--forest); }
.money-results span, .money-results small { color: var(--muted); font-size: .75rem; }
.money-results div:nth-child(2) :is(span, small) { color: #d4e5df; }
.money-results strong { color: inherit; line-height: 1.15; font-size: clamp(1rem, 2.6vw, 1.7rem); letter-spacing: -.035em; font-variant-numeric: tabular-nums; }
.estimate-footnote { padding-top: 8px; border-top: 1px solid var(--line); }
.faq details { border-bottom: 1px solid var(--line); padding: 11px 0; }
.faq details:first-of-type { margin-top: 10px; }
.faq summary { font-weight: 700; }
.faq details p { margin-bottom: 5px; }

.article { max-width: 800px; min-height: 64vh; padding-block: clamp(42px, 6vw, 76px); }
.article-wide { max-width: 930px; }
.article h1 { font-size: clamp(2.45rem, 6vw, 4.6rem); }
.article .lede { margin-top: 13px; }
.article .content-section h2 { font-size: clamp(1.4rem, 4vw, 1.9rem); }
.article > .tool-card { margin-top: 24px; }
.site-footer { border-top: 1px solid var(--line); background: #edf0e9; padding-block: 25px; }
.footer-wrap { display: flex; align-items: center; justify-content: space-between; flex-wrap: wrap; gap: 14px 22px; }
.footer-wrap small { color: var(--muted); font-size: .78rem; }

@media (max-width: 850px) {
  .wrap { width: calc(100% - 40px); }
  .hero-main { grid-template-columns: 1fr; }
  .mini-panel { max-width: 620px; margin-top: 0; }
}
@media (max-width: 550px) {
  .wrap { width: calc(100% - 32px); }
  .nav-wrap { padding-block: 10px; flex-wrap: wrap; gap: 6px; }
  .site-header nav { gap: 4px 7px; }
  .site-header nav a { padding-inline: 4px; font-size: .75rem; }
  .hero .lede { margin-block: 12px 17px; }
  .tool-card, .mini-panel { padding: 15px; }
  .input-row { flex-direction: column; }
  .form-grid { grid-template-columns: 1fr; gap: 10px; }
  .snapshot-grid { grid-template-columns: 1fr; }
  .money-results div { padding: 7px; }
  .money-results small { font-size: .67rem; }
  .main-content { padding-top: 30px; }
}
