/* CentWise design system. No external fonts or libraries. */
:root {
  --forest: #0f3d2e; --forest-2: #14503c; --green: #1f6b4f; --lime: #b5e04a; --lime-ink: #5b7f12;
  --paper: #faf8f2; --card: #ffffff; --ink: #22262a; --ink-2: #4a5259; --line: #e3dfd3; --line-2: #d3cfc2;
  --tint: #eef3ec; --warn-bg: #fff6df; --warn-ink: #6b4a00; --warn-line: #ecd9a4; --info-bg: #eaf3ee; --err-bg: #fdeceb; --err-ink: #8a1f17; --err-line: #f0b9b4;
  --link: #14573f; --focus: #1b66d6;
  --radius: 14px; --radius-sm: 9px; --shadow: 0 1px 2px rgba(15,61,46,.06), 0 6px 20px rgba(15,61,46,.06);
  --font-body: system-ui, -apple-system, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
  --font-head: "Iowan Old Style", "Palatino Linotype", Palatino, "Book Antiqua", Georgia, serif;
  --max: 1120px; --max-text: 720px;
  --c1: #1f6b4f; --c2: #9ccb3b; --c3: #3b4249; --c4: #d9a441; --c5: #2e8b8b; --c6: #b5654a; --c7: #7a8794;
}
@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) {
    --forest: #0b2c21; --forest-2: #0f3a2b; --green: #5fbf93; --lime: #b5e04a; --lime-ink: #b5e04a;
    --paper: #101512; --card: #171e1a; --ink: #eceee9; --ink-2: #b6beb8; --line: #2a342e; --line-2: #36423a; --tint: #1a241e;
    --warn-bg: #2d2511; --warn-ink: #f2d98b; --warn-line: #54451c; --info-bg: #17261e; --err-bg: #331a18; --err-ink: #f5b5ae; --err-line: #6a2b27;
    --link: #8fd6b0; --focus: #7fb0ff; --shadow: 0 1px 2px rgba(0,0,0,.4), 0 6px 20px rgba(0,0,0,.25);
    --c1: #5fbf93; --c2: #b5e04a; --c3: #aab3ac; --c4: #e5b960; --c5: #62c0c0; --c6: #e08a6e; --c7: #9aa7b3;
  }
}
:root[data-theme="dark"] {
  --forest: #0b2c21; --forest-2: #0f3a2b; --green: #5fbf93; --lime: #b5e04a; --lime-ink: #b5e04a;
  --paper: #101512; --card: #171e1a; --ink: #eceee9; --ink-2: #b6beb8; --line: #2a342e; --line-2: #36423a; --tint: #1a241e;
  --warn-bg: #2d2511; --warn-ink: #f2d98b; --warn-line: #54451c; --info-bg: #17261e; --err-bg: #331a18; --err-ink: #f5b5ae; --err-line: #6a2b27;
  --link: #8fd6b0; --focus: #7fb0ff; --shadow: 0 1px 2px rgba(0,0,0,.4), 0 6px 20px rgba(0,0,0,.25);
  --c1: #5fbf93; --c2: #b5e04a; --c3: #aab3ac; --c4: #e5b960; --c5: #62c0c0; --c6: #e08a6e; --c7: #9aa7b3;
}
*, *::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-body); -webkit-font-smoothing: antialiased; }
img, svg { max-width: 100%; height: auto; }
a { color: var(--link); text-underline-offset: 3px; text-decoration-thickness: 1px; }
a:hover { text-decoration-thickness: 2px; }
:focus-visible { outline: 3px solid var(--focus); outline-offset: 2px; border-radius: 4px; }
.skip { position: absolute; left: 12px; top: -60px; background: var(--forest); color: #fff; padding: 10px 16px; border-radius: 8px; z-index: 100; }
.skip:focus { top: 10px; }
.wrap { max-width: var(--max); margin: 0 auto; padding: 0 20px; }
h1, h2, h3, h4 { font-family: var(--font-head); line-height: 1.2; letter-spacing: -.01em; color: var(--ink); margin: 0 0 .5em; }
h1 { font-size: clamp(2rem, 4.6vw, 3.1rem); font-weight: 700; }
h2 { font-size: clamp(1.45rem, 2.8vw, 1.9rem); margin-top: 2.2em; }
h3 { font-size: 1.2rem; margin-top: 1.6em; }
p { margin: 0 0 1em; }
code { font: .92em ui-monospace, SFMono-Regular, Menlo, Consolas, monospace; background: var(--tint); padding: .12em .4em; border-radius: 5px; }
.eyebrow { font: 600 .78rem/1 var(--font-body); letter-spacing: .12em; text-transform: uppercase; color: var(--lime-ink); margin-bottom: .9rem; display: block; }
.muted { color: var(--ink-2); }
.small { font-size: .9rem; }
.visually-hidden { position: absolute !important; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }

/* header */
.site-header { background: var(--paper); border-bottom: 1px solid var(--line); position: sticky; top: 0; z-index: 50; backdrop-filter: saturate(1.2); }
.nav { display: flex; align-items: center; gap: 18px; min-height: 68px; }
.brand { display: inline-flex; align-items: center; gap: 11px; text-decoration: none; color: var(--ink); font: 700 1.5rem/1 var(--font-head); letter-spacing: -.02em; }
.brand img { width: 36px; height: 36px; display: block; }
.brand span b { color: var(--green); font-weight: 700; }
.nav-links { display: flex; align-items: center; gap: 4px; margin-left: auto; list-style: none; padding: 0; margin-top: 0; margin-bottom: 0; }
.nav-links a { display: block; padding: 9px 13px; border-radius: 999px; text-decoration: none; color: var(--ink); font-weight: 500; font-size: .98rem; transition: background .15s; }
.nav-links a:hover, .nav-links a[aria-current="page"] { background: var(--tint); }
.nav-search { position: relative; }
.nav-search input { width: 190px; padding: 9px 14px 9px 38px; border-radius: 999px; border: 1px solid var(--line-2); background: var(--card); color: var(--ink); font: inherit; font-size: .95rem; }
.nav-search svg { position: absolute; left: 13px; top: 50%; transform: translateY(-50%); width: 16px; height: 16px; color: var(--ink-2); pointer-events: none; }
.menu-btn { display: none; margin-left: auto; background: none; border: 1px solid var(--line-2); border-radius: 10px; padding: 9px 12px; color: var(--ink); font: inherit; cursor: pointer; }
.theme-btn { background: none; border: 0; color: var(--ink-2); cursor: pointer; padding: 8px; border-radius: 50%; display: inline-flex; }
.theme-btn:hover { background: var(--tint); }
.suggest { position: absolute; top: calc(100% + 8px); left: 0; width: min(420px, 90vw); background: var(--card); border: 1px solid var(--line-2); border-radius: var(--radius); box-shadow: var(--shadow); padding: 6px; z-index: 60; list-style: none; margin: 0; max-height: 70vh; overflow: auto; }
.suggest[hidden] { display: none; }
.suggest a { display: block; padding: 10px 12px; border-radius: 9px; text-decoration: none; color: var(--ink); }
.suggest a:hover, .suggest a.is-active { background: var(--tint); }
.suggest small { display: block; color: var(--ink-2); font-size: .82rem; }
@media (max-width: 920px) {
  .menu-btn { display: inline-flex; align-items: center; gap: 8px; }
  .nav-links { position: absolute; left: 0; right: 0; top: 100%; flex-direction: column; align-items: stretch; background: var(--paper); border-bottom: 1px solid var(--line); padding: 10px 20px 18px; display: none; margin-left: 0; }
  .nav-links.open { display: flex; }
  .nav-links a { padding: 13px 14px; }
  .nav-search input { width: 100%; }
  .nav-search { padding: 6px 0; }
  .nav-search svg { left: 14px; }
}

/* hero */
.hero { background: var(--forest); color: #f4f1e7; position: relative; overflow: hidden; }
.hero::after { content: ""; position: absolute; right: -140px; top: -160px; width: 520px; height: 520px; border-radius: 50%; background: var(--forest-2); }
.hero .wrap { position: relative; z-index: 1; padding-top: 72px; padding-bottom: 80px; }
.hero h1 { color: #fff; max-width: 15ch; }
.hero h1 em { font-style: normal; color: var(--lime); }
.hero p.lead { font-size: 1.2rem; max-width: 56ch; color: #d9e6dd; }
.hero .eyebrow { color: var(--lime); }
.hero-search { display: flex; gap: 10px; max-width: 560px; margin-top: 28px; position: relative; }
.hero-search input { flex: 1; padding: 15px 18px; border-radius: 12px; border: 0; font: inherit; background: #fff; color: #22262a; }
.hero-search .suggest { top: calc(100% + 6px); width: 100%; }
.btn { display: inline-flex; align-items: center; justify-content: center; gap: 8px; padding: 12px 20px; border-radius: 11px; border: 1px solid transparent; background: var(--forest); color: #fff; font: 600 1rem/1.2 var(--font-body); cursor: pointer; text-decoration: none; transition: transform .12s, background .15s; }
.btn:hover { background: var(--forest-2); transform: translateY(-1px); }
.btn.lime { background: var(--lime); color: #17310a; }
.btn.lime:hover { background: #c5ec62; }
.btn.ghost { background: transparent; color: var(--ink); border-color: var(--line-2); }
.btn.ghost:hover { background: var(--tint); }
.btn.sm { padding: 8px 14px; font-size: .92rem; border-radius: 9px; }
.trust { display: flex; flex-wrap: wrap; gap: 8px 22px; margin: 26px 0 0; padding: 0; list-style: none; color: #cfe0d5; font-size: .95rem; }
.trust li::before { content: "✓"; color: var(--lime); margin-right: 8px; font-weight: 700; }

/* sections */
.section { padding: 64px 0; }
.section.alt { background: var(--tint); }
.section-head { display: flex; align-items: end; justify-content: space-between; gap: 20px; margin-bottom: 26px; flex-wrap: wrap; }
.section-head h2 { margin: 0; }
.grid { display: grid; gap: 18px; grid-template-columns: repeat(auto-fill, minmax(280px, 1fr)); }
.card { background: var(--card); border: 1px solid var(--line); border-radius: var(--radius); padding: 22px; box-shadow: var(--shadow); transition: transform .15s, border-color .15s; }
a.card { display: block; text-decoration: none; color: inherit; }
a.card:hover { transform: translateY(-2px); border-color: var(--green); }
.card h3 { margin: 0 0 .4em; font-size: 1.15rem; }
.card p { margin: 0; color: var(--ink-2); font-size: .98rem; }
.card .tag { display: inline-block; font-size: .76rem; font-weight: 600; letter-spacing: .04em; text-transform: uppercase; color: var(--lime-ink); margin-bottom: 8px; }
.cat-card .count { margin-top: 14px; font-size: .88rem; font-weight: 600; color: var(--green); }
.chips { display: flex; flex-wrap: wrap; gap: 8px; margin: 0 0 22px; padding: 0; list-style: none; }
.chip { border: 1px solid var(--line-2); background: var(--card); color: var(--ink); padding: 8px 15px; border-radius: 999px; font: 500 .94rem var(--font-body); cursor: pointer; text-decoration: none; }
.chip:hover { background: var(--tint); }
.chip[aria-pressed="true"], .chip.on { background: var(--forest); color: #fff; border-color: var(--forest); }
.filter-bar { display: flex; gap: 12px; flex-wrap: wrap; align-items: center; margin-bottom: 18px; }
.filter-bar input[type=search] { flex: 1 1 260px; padding: 12px 16px; border-radius: 11px; border: 1px solid var(--line-2); background: var(--card); color: var(--ink); font: inherit; }

/* breadcrumbs */
.crumbs { font-size: .9rem; color: var(--ink-2); padding-top: 18px; }
.crumbs ol { display: flex; flex-wrap: wrap; gap: 4px 8px; list-style: none; margin: 0; padding: 0; }
.crumbs li + li::before { content: "/"; margin-right: 8px; color: var(--line-2); }
.crumbs a { color: var(--ink-2); }

/* page header (inner pages) */
.page-head { padding: 30px 0 18px; }
.page-head p.lead { font-size: 1.15rem; color: var(--ink-2); max-width: 66ch; }
.meta-line { display: flex; flex-wrap: wrap; gap: 6px 18px; font-size: .88rem; color: var(--ink-2); margin: 12px 0 0; }
.meta-line span::before { content: "•"; margin-right: 8px; color: var(--lime-ink); }
.meta-line span:first-child::before { content: none; }

/* calculator */
.tool-layout { display: grid; gap: 28px; grid-template-columns: minmax(0, 1fr) 330px; align-items: start; padding-bottom: 20px; }
@media (max-width: 1000px) { .tool-layout { grid-template-columns: minmax(0, 1fr); } }
.calc { background: var(--card); border: 1px solid var(--line); border-radius: 18px; box-shadow: var(--shadow); overflow: hidden; }
.calc-form { padding: 24px; }
.calc-form fieldset { border: 0; margin: 0 0 20px; padding: 0; min-width: 0; }
.calc-form legend { font: 700 1rem var(--font-head); padding: 0 0 10px; color: var(--green); }
.fields { display: grid; gap: 16px 18px; grid-template-columns: repeat(auto-fit, minmax(230px, 1fr)); }
.field label { display: block; font-weight: 600; font-size: .94rem; margin-bottom: 6px; }
.field .ctl { position: relative; }
.field input, .field select { width: 100%; padding: 12px 14px; border-radius: 10px; border: 1px solid var(--line-2); background: var(--paper); color: var(--ink); font: inherit; min-height: 46px; }
.field input:focus, .field select:focus { border-color: var(--green); }
.field .ctl.money input { padding-left: 28px; }
.field .ctl.money::before { content: "$"; position: absolute; left: 13px; top: 50%; transform: translateY(-50%); color: var(--ink-2); pointer-events: none; }
.field .ctl.percent input { padding-right: 32px; }
.field .ctl.percent::after { content: "%"; position: absolute; right: 13px; top: 50%; transform: translateY(-50%); color: var(--ink-2); pointer-events: none; }
.field .help { font-size: .82rem; color: var(--ink-2); margin-top: 5px; }
.field .err { display: none; font-size: .84rem; color: var(--err-ink); margin-top: 5px; font-weight: 500; }
.field.invalid input, .field.invalid select { border-color: #c4382d; background: var(--err-bg); }
.field.invalid .err { display: block; }
.calc-actions { display: flex; flex-wrap: wrap; gap: 10px; padding: 16px 24px; border-top: 1px solid var(--line); background: var(--tint); }
.calc-results { padding: 24px; border-top: 1px solid var(--line); }
.calc-results h2 { margin: 0 0 14px; font-size: 1.25rem; }
.stat-grid { display: grid; gap: 12px; grid-template-columns: repeat(auto-fit, minmax(210px, 1fr)); }
.stat { background: var(--paper); border: 1px solid var(--line); border-radius: 12px; padding: 14px 16px; }
.stat.primary { background: var(--forest); border-color: var(--forest); color: #f4f1e7; }
.stat .k { font-size: .84rem; color: var(--ink-2); line-height: 1.35; }
.stat.primary .k { color: #cfe0d5; }
.stat .v { font: 700 1.55rem/1.2 var(--font-head); margin-top: 4px; overflow-wrap: anywhere; }
.stat.primary .v { color: #fff; font-size: 1.8rem; }
.stat .n { font-size: .78rem; margin-top: 6px; color: var(--ink-2); }
.stat.primary .n { color: #cfe0d5; }
.msg { border-radius: 11px; padding: 12px 15px; margin: 14px 0 0; font-size: .95rem; border: 1px solid var(--line); background: var(--info-bg); }
.msg.warn { background: var(--warn-bg); color: var(--warn-ink); border-color: var(--warn-line); }
.msg.error { background: var(--err-bg); color: var(--err-ink); border-color: var(--err-line); font-weight: 500; }
.table-wrap { overflow-x: auto; margin: 18px 0 0; border: 1px solid var(--line); border-radius: 12px; }
table.data { width: 100%; border-collapse: collapse; font-size: .93rem; }
table.data caption { text-align: left; font: 700 1rem var(--font-head); padding: 12px 14px 8px; }
table.data th, table.data td { padding: 10px 14px; text-align: right; border-top: 1px solid var(--line); white-space: nowrap; }
table.data th:first-child, table.data td:first-child { text-align: left; }
table.data thead th { background: var(--tint); border-top: 0; font-weight: 600; font-size: .86rem; }
.chart { margin: 22px 0 0; }
.chart figcaption { font: 700 1rem var(--font-head); margin-bottom: 8px; }
.chart svg { width: 100%; height: auto; display: block; }
.chart text { fill: var(--ink-2); font: 11px var(--font-body); }
.chart .grid-line { stroke: var(--line); stroke-width: 1; }
.legend { display: flex; flex-wrap: wrap; gap: 6px 16px; list-style: none; padding: 0; margin: 10px 0 0; font-size: .88rem; }
.legend i { display: inline-block; width: 11px; height: 11px; border-radius: 3px; margin-right: 6px; vertical-align: -1px; }
details.alt-data { margin-top: 8px; font-size: .9rem; }
details.alt-data summary { cursor: pointer; color: var(--link); }
.example-box { background: var(--tint); border-radius: var(--radius); padding: 20px 22px; border: 1px solid var(--line); }
.side { display: grid; gap: 18px; }
.side .card { padding: 18px 20px; }
.side h2, .side h3 { font-size: 1.05rem; margin: 0 0 .6em; }
.side ul { list-style: none; margin: 0; padding: 0; }
.side li + li { margin-top: 8px; }
.side li a { text-decoration: none; font-weight: 500; }
.side li a:hover { text-decoration: underline; }
.side .none { color: var(--ink-2); font-size: .92rem; margin: 0; }
.compare-tbl td, .compare-tbl th { white-space: normal; }
.saved-row { display: flex; gap: 8px; align-items: center; justify-content: space-between; flex-wrap: wrap; padding: 10px 0; border-top: 1px solid var(--line); }
.saved-row:first-child { border-top: 0; }
.toast { position: fixed; bottom: 22px; left: 50%; transform: translateX(-50%) translateY(20px); background: var(--forest); color: #fff; padding: 12px 20px; border-radius: 12px; box-shadow: var(--shadow); opacity: 0; transition: opacity .2s, transform .2s; z-index: 90; pointer-events: none; font-size: .95rem; max-width: 90vw; }
.toast.show { opacity: 1; transform: translateX(-50%) translateY(0); }

/* prose */
.prose { max-width: var(--max-text); }
.prose h2:first-child { margin-top: 0; }
.prose ul, .prose ol { padding-left: 1.3em; margin: 0 0 1em; }
.prose li { margin: .35em 0; }
.prose .callout { background: var(--tint); border-left: 4px solid var(--lime); padding: 14px 18px; border-radius: 0 var(--radius-sm) var(--radius-sm) 0; margin: 1.4em 0; }
.prose table { border-collapse: collapse; width: 100%; margin: 1.2em 0; font-size: .96rem; }
.prose th, .prose td { border: 1px solid var(--line); padding: 8px 12px; text-align: left; }
.prose th { background: var(--tint); }
.faq details { background: var(--card); border: 1px solid var(--line); border-radius: 12px; padding: 4px 18px; margin-bottom: 10px; }
.faq summary { cursor: pointer; font-weight: 600; padding: 14px 0; list-style-position: outside; }
.faq details[open] summary { color: var(--green); }
.faq details p { margin: 0 0 14px; color: var(--ink-2); }
.disclaimer { font-size: .9rem; color: var(--ink-2); background: var(--card); border: 1px solid var(--line); border-radius: 12px; padding: 14px 18px; margin: 28px 0; }
.sources ol { padding-left: 1.2em; }
.sources li { margin: .35em 0; }
.article-grid { display: grid; gap: 18px; grid-template-columns: repeat(auto-fill, minmax(300px, 1fr)); }
.tools-in-article { display: grid; gap: 12px; grid-template-columns: repeat(auto-fill, minmax(240px, 1fr)); margin: 12px 0 0; }
.tools-in-article a { background: var(--card); border: 1px solid var(--line); border-radius: 12px; padding: 14px 16px; text-decoration: none; color: var(--ink); font-weight: 600; }
.tools-in-article a:hover { border-color: var(--green); }
.tools-in-article small { display: block; font-weight: 400; color: var(--ink-2); margin-top: 3px; }

/* ad slots stay hidden until the owner enables ads (see docs/ADSENSE-READINESS.md) */
.ad-slot { display: none; }
html.ads-on .ad-slot { display: block; margin: 28px auto; text-align: center; min-height: 120px; max-width: 100%; }
html.ads-on .ad-slot::before { content: "Advertisement"; display: block; font-size: .72rem; text-transform: uppercase; letter-spacing: .1em; color: var(--ink-2); margin-bottom: 6px; }

/* footer */
.site-footer { background: var(--forest); color: #d5e3da; margin-top: 70px; padding: 54px 0 28px; }
.site-footer a { color: #e8f2ec; }
.site-footer h2 { color: #fff; font-size: 1rem; font-family: var(--font-body); font-weight: 700; margin: 0 0 12px; letter-spacing: .02em; }
.foot-grid { display: grid; gap: 30px; grid-template-columns: 1.6fr repeat(3, 1fr); }
@media (max-width: 820px) { .foot-grid { grid-template-columns: 1fr 1fr; } }
@media (max-width: 520px) { .foot-grid { grid-template-columns: 1fr; } }
.site-footer ul { list-style: none; padding: 0; margin: 0; }
.site-footer li { margin: 7px 0; font-size: .95rem; }
.foot-brand p { font-size: .95rem; max-width: 34ch; }
.foot-note { border-top: 1px solid rgba(255,255,255,.14); margin-top: 34px; padding-top: 20px; font-size: .85rem; color: #b5c9bd; }

.notfound { text-align: center; padding: 70px 0 20px; }
.notfound .big { font: 700 clamp(4rem, 16vw, 8rem)/1 var(--font-head); color: var(--green); }

@media (prefers-reduced-motion: no-preference) {
  .stat, .msg { animation: rise .35s ease both; }
  @keyframes rise { from { opacity: 0; transform: translateY(6px); } to { opacity: 1; transform: none; } }
}
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation: none !important; transition: none !important; scroll-behavior: auto !important; }
}
@media print { .site-header, .site-footer, .calc-actions, .side, .ad-slot { display: none !important; } body { background: #fff; } }

/* Wide data tables scroll inside their own box on small screens instead of widening the page */
@media (max-width: 700px) { table.data { display: block; max-width: 100%; overflow-x: auto; -webkit-overflow-scrolling: touch; } }
main a { overflow-wrap: anywhere; }

/* ===== UI refresh: calculator layout, home page, touch comfort ===== */
html { scroll-behavior: smooth; }
@media (prefers-reduced-motion: reduce) { html { scroll-behavior: auto; } }
.field input, .field select, .hero-search input, .nav-search input, .name-input { font-size: 1rem; } /* 16px stops iOS zooming on focus */
.btn { min-height: 44px; }
.btn.sm { min-height: 40px; }

/* Calculator: inputs on the left, live results on the right (stacked on phones) */
.tool-page { display: block; }
.calc { display: grid; grid-template-columns: minmax(0, 1fr); overflow: hidden; overflow: clip; }
.calc-in { min-width: 0; }
.calc-out { min-width: 0; background: var(--paper); border-top: 1px solid var(--line); }
.calc-out .calc-results { border-top: 0; padding: 22px 24px; }
.calc-out .calc-results + .calc-tools { border-top: 1px solid var(--line); }
.calc-actions { align-items: center; gap: 12px; }
.calc-actions .btn:first-child { padding-left: 32px; padding-right: 32px; }
.live-hint { color: var(--ink-2); font-size: .86rem; margin-left: auto; }
.calc-tools { display: flex; flex-wrap: wrap; gap: 8px; padding: 14px 24px 18px; align-items: center; }
.name-input { flex: 1 1 180px; min-width: 0; padding: 9px 12px; min-height: 40px; border-radius: 9px; border: 1px solid var(--line-2); background: var(--card); color: var(--ink); font-family: inherit; }
@media (min-width: 960px) {
  .calc { grid-template-columns: minmax(0, 5fr) minmax(0, 6fr); }
  .calc-in { border-right: 1px solid var(--line); }
  .calc-out { border-top: 0; align-self: start; position: sticky; top: 78px; max-height: calc(100vh - 96px); overflow: auto; background: var(--card); }
  .calc-form .fields { grid-template-columns: repeat(auto-fit, minmax(190px, 1fr)); }
  .stat-grid { grid-template-columns: repeat(auto-fit, minmax(170px, 1fr)); }
}
@media (max-width: 560px) {
  .calc-form, .calc-actions, .calc-out .calc-results, .calc-tools { padding-left: 16px; padding-right: 16px; }
  .live-hint { display: none; }
  .calc-actions .btn:first-child { flex: 1; }
  .calc-tools .btn { flex: 1 1 auto; }
}
.page-head { padding-bottom: 14px; }
.page-head .lead { margin-bottom: .6em; }
.meta-line { font-size: .86rem; }

/* Floating result bar on phones while results are scrolled out of view */
.peek { display: none; }
@media (max-width: 959px) {
  .peek:not([hidden]) { display: flex; position: fixed; left: 12px; right: 12px; bottom: 12px; z-index: 40; align-items: center; justify-content: space-between; gap: 12px; padding: 10px 12px 10px 16px; border-radius: 14px; background: var(--forest); color: #fff; box-shadow: 0 8px 28px rgba(0,0,0,.28); }
  .peek-txt { display: flex; flex-direction: column; min-width: 0; line-height: 1.25; }
  .peek-txt small { color: #cfe0d5; font-size: .76rem; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
  .peek-txt strong { font: 700 1.15rem var(--font-head); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
  body { padding-bottom: 76px; }
}
@media print { .peek { display: none !important; } }

/* Home */
.hero .wrap { padding-top: 52px; padding-bottom: 52px; }
.hero h1 { font-size: clamp(2.2rem, 6vw, 3.4rem); }
.hero p.lead { font-size: 1.1rem; }
.hero-search { margin-top: 22px; }
.hero-search input { min-height: 52px; }
.quick { display: flex; flex-wrap: wrap; gap: 8px; align-items: center; margin: 16px 0 0; font-size: .92rem; color: #cfe0d5; }
.quick a { color: #fff; text-decoration: none; border: 1px solid rgba(255,255,255,.28); border-radius: 999px; padding: 6px 14px; background: rgba(255,255,255,.06); }
.quick a:hover { background: rgba(255,255,255,.16); border-color: var(--lime); }
.trust { margin-top: 20px; font-size: .9rem; }
.grid-4 { grid-template-columns: repeat(auto-fill, minmax(240px, 1fr)); }
@media (min-width: 1100px) { .grid-4 { grid-template-columns: repeat(4, minmax(0, 1fr)); } }
.card { transition: transform .15s, border-color .15s, box-shadow .15s; }
a.card { text-decoration: none; color: inherit; display: block; }
a.card:hover { transform: translateY(-3px); border-color: var(--green); box-shadow: 0 10px 26px rgba(15,61,46,.12); }
.cat-ico { display: inline-flex; width: 44px; height: 44px; align-items: center; justify-content: center; border-radius: 12px; background: var(--tint); color: var(--green); margin-bottom: 12px; }
.cat-ico svg { width: 24px; height: 24px; }
.cat-all { background: var(--forest); border-color: var(--forest); color: #fff; display: flex; flex-direction: column; justify-content: center; }
.cat-all h3, .cat-all p { color: #fff; } .cat-all p { opacity: .85; } .cat-all .count { color: var(--lime); }
.cat-all:hover { border-color: var(--lime); }
.section { padding: 52px 0; }
@media (max-width: 640px) { .section { padding: 38px 0; } .hero .wrap { padding-top: 36px; padding-bottom: 40px; } .quick span { width: 100%; } }
.page-head { padding-top: 18px; }
.page-head h1 { font-size: clamp(1.9rem, 4.6vw, 2.7rem); margin-bottom: .3em; line-height: 1.15; }
.page-head .eyebrow { margin-bottom: .5rem; }
.page-head .lead { font-size: 1.08rem; }
.hero-search input { min-width: 0; }
.hero-search .btn { flex: none; }
