:root {
  color-scheme: light;
  --bg: #f4f7fa;
  --surface: #ffffff;
  --surface-2: #eef4f8;
  --surface-3: #e3eef5;
  --text: #142234;
  --muted: #566779;
  --line: #d4dee7;
  --control-line: #708091;
  --brand: #0968b7;
  --brand-strong: #074f8c;
  --brand-soft: #e7f3fd;
  --action-bg: #0968b7;
  --action-hover: #074f8c;
  --action-ink: #ffffff;
  --focus-ring: #0968b7;
  --accent: #0b8f77;
  --accent-soft: #e5f7f1;
  --warning: #a45b00;
  --warning-soft: #fff4dd;
  --danger: #b7363f;
  --danger-soft: #ffedf0;
  --shadow: 0 18px 50px rgba(26, 49, 72, .10);
  --shadow-soft: 0 8px 24px rgba(26, 49, 72, .07);
  --radius: 18px;
  --radius-sm: 12px;
  --content: 1180px;
}

:root[data-theme="dark"] {
  color-scheme: dark;
  --bg: #08111f;
  --surface: #101b2c;
  --surface-2: #152337;
  --surface-3: #1c2d43;
  --text: #f2f6fb;
  --muted: #afbdcd;
  --line: #2d4057;
  --control-line: #6f849a;
  --brand: #53b4ff;
  --brand-strong: #86cbff;
  --brand-soft: #112f49;
  --action-bg: #0968b7;
  --action-hover: #074f8c;
  --action-ink: #ffffff;
  --focus-ring: #53b4ff;
  --accent: #56d8b7;
  --accent-soft: #12382f;
  --warning: #ffc56d;
  --warning-soft: #3d2b12;
  --danger: #ff9da7;
  --danger-soft: #421f27;
  --shadow: 0 20px 60px rgba(0, 0, 0, .35);
  --shadow-soft: 0 10px 30px rgba(0, 0, 0, .24);
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  font-size: 16px;
  line-height: 1.65;
  text-rendering: optimizeLegibility;
}
body.nav-open { overflow: hidden; }
a { color: var(--brand-strong); text-underline-offset: 3px; }
a:hover { text-decoration-thickness: 2px; }
img { max-width: 100%; }
.visually-hidden {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}
button, input, select, textarea { font: inherit; }
button, .button {
  min-height: 44px;
  border: 1px solid transparent;
  border-radius: 11px;
  background: var(--action-bg);
  color: var(--action-ink);
  padding: 10px 16px;
  font-weight: 750;
  cursor: pointer;
  text-decoration: none;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
}
button:hover, .button:hover { background: var(--action-hover); text-decoration: none; }
button:focus-visible, a:focus-visible, input:focus-visible, select:focus-visible, textarea:focus-visible, summary:focus-visible {
  outline: 3px solid var(--focus-ring);
  outline-offset: 3px;
}
.button.secondary, button.secondary { background: var(--surface); color: var(--text); border-color: var(--control-line); }
.button.secondary:hover, button.secondary:hover { background: var(--surface-2); }
.button.accent { background: var(--accent); color: #05231c; }
.button.small, button.small { min-height: 38px; padding: 7px 12px; font-size: .92rem; }
.container { width: min(calc(100% - 36px), var(--content)); margin-inline: auto; }
.skip-link { position: fixed; left: 16px; top: -80px; z-index: 1000; background: var(--text); color: var(--surface); padding: 10px 14px; border-radius: 8px; }
.skip-link:focus { top: 12px; }

.site-header {
  position: sticky;
  top: 0;
  z-index: 80;
  background: color-mix(in srgb, var(--surface) 94%, transparent);
  border-bottom: 1px solid var(--line);
  backdrop-filter: blur(14px);
}
.header-inner { min-height: 72px; display: flex; align-items: center; gap: 18px; }
.brand { display: inline-flex; align-items: center; gap: 11px; color: var(--text); text-decoration: none; font-weight: 850; white-space: nowrap; }
.brand img { width: 42px; height: 42px; border-radius: 12px; box-shadow: var(--shadow-soft); }
.brand span { letter-spacing: -.02em; }
.site-nav { margin-left: auto; display: flex; align-items: center; gap: 4px; }
.site-nav > a, .nav-menu > button {
  background: transparent;
  border: 0;
  color: var(--text);
  min-height: 42px;
  border-radius: 10px;
  padding: 8px 11px;
  font-weight: 680;
  text-decoration: none;
}
.site-nav > a:hover, .nav-menu > button:hover, .site-nav [aria-current="page"] { background: var(--surface-2); color: var(--brand-strong); }
.nav-menu { position: relative; }
.nav-menu > button::after { content: "▾"; font-size: .74em; transition: transform .15s ease; }
.nav-menu > button[aria-expanded="true"]::after { transform: rotate(180deg); }
.mega-menu {
  position: absolute;
  top: calc(100% + 12px);
  right: 0;
  width: min(720px, calc(100vw - 40px));
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  padding: 18px;
}
.mega-menu[hidden] { display: none; }
.mega-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 14px; }
.menu-group { background: var(--surface-2); border-radius: var(--radius-sm); padding: 13px; }
.menu-group strong { display: block; color: var(--muted); font-size: .78rem; text-transform: uppercase; letter-spacing: .08em; margin-bottom: 8px; }
.menu-group a { display: block; color: var(--text); text-decoration: none; padding: 6px 0; line-height: 1.35; }
.menu-group a:hover { color: var(--brand-strong); text-decoration: underline; }
.menu-footer { display: flex; justify-content: space-between; gap: 12px; align-items: center; margin-top: 14px; padding-top: 14px; border-top: 1px solid var(--line); }
.theme-toggle { margin-left: 4px; min-width: 94px; background: var(--surface-2); color: var(--text); border-color: var(--control-line); }
.theme-toggle:hover { background: var(--surface-3); }
.theme-toggle::before { content: "☀"; color: var(--warning); }
:root[data-theme="dark"] .theme-toggle::before { content: "☾"; color: var(--brand); }
.drawer-toggle { display: none; margin-left: auto; width: 44px; padding: 0; background: var(--surface-2); color: var(--text); border-color: var(--control-line); }
.drawer-toggle span, .drawer-toggle::before, .drawer-toggle::after { content: ""; display: block; width: 19px; height: 2px; background: currentColor; border-radius: 2px; }
.drawer-toggle { flex-direction: column; gap: 4px; }
.nav-backdrop { position: fixed; inset: 72px 0 0; z-index: 70; background: rgba(3, 10, 18, .56); }
.nav-backdrop[hidden] { display: none; }

main { min-height: 65vh; }
.page-space { padding-block: 38px 70px; }
.breadcrumbs { color: var(--muted); font-size: .9rem; margin-bottom: 18px; }
.breadcrumbs a { color: inherit; }
h1, h2, h3 { line-height: 1.16; letter-spacing: -.035em; margin-top: 0; }
h1 { font-size: clamp(2.15rem, 5vw, 4.6rem); max-width: 950px; margin-bottom: 18px; }
h2 { font-size: clamp(1.55rem, 3vw, 2.35rem); margin-bottom: 13px; }
h3 { font-size: 1.22rem; margin-bottom: 9px; }
p { margin: 0 0 1.1em; }
.eyebrow { display: inline-flex; align-items: center; gap: 8px; color: var(--accent); background: var(--accent-soft); border: 1px solid color-mix(in srgb, var(--accent) 25%, transparent); border-radius: 999px; padding: 6px 11px; font-weight: 800; font-size: .82rem; letter-spacing: .02em; margin-bottom: 14px; }
.lead { color: var(--muted); font-size: clamp(1.04rem, 2vw, 1.25rem); max-width: 850px; }
.muted { color: var(--muted); }
.fine-print { color: var(--muted); font-size: .88rem; }
.hero {
  padding: 58px 0 44px;
  background: linear-gradient(135deg, color-mix(in srgb, var(--brand-soft) 86%, transparent), transparent 68%);
  border-bottom: 1px solid var(--line);
}
.hero h1 { max-width: 1000px; }
.hero-actions, .actions { display: flex; flex-wrap: wrap; gap: 10px; align-items: center; }
.hero-actions { margin: 26px 0 20px; }
.trust-strip { display: grid; grid-template-columns: repeat(4, 1fr); gap: 12px; margin-top: 28px; }
.trust-item { background: color-mix(in srgb, var(--surface) 84%, transparent); border: 1px solid var(--line); border-radius: var(--radius-sm); padding: 14px; }
.trust-item strong { display: block; font-size: 1.15rem; }
.trust-item span { color: var(--muted); font-size: .9rem; }

.section { padding-block: 48px; }
.section + .section { border-top: 1px solid var(--line); }
.section-heading { display: flex; justify-content: space-between; align-items: end; gap: 24px; margin-bottom: 22px; }
.section-heading p { max-width: 680px; color: var(--muted); margin: 0; }
.card-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 16px; }
.card, .tool-card, .article-card {
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  box-shadow: var(--shadow-soft);
}
.tool-card { display: flex; flex-direction: column; padding: 20px; min-height: 210px; }
.tool-card .tag { align-self: start; margin-bottom: 14px; }
.tool-card p { color: var(--muted); flex-grow: 1; }
.tool-card a.stretched { color: var(--text); text-decoration: none; }
.tool-card a.stretched:hover { color: var(--brand-strong); }
.tag { display: inline-block; border-radius: 999px; background: var(--brand-soft); color: var(--brand-strong); padding: 4px 9px; font-size: .78rem; font-weight: 800; }
.decision-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 16px; }
.decision-card { padding: 22px; background: var(--surface-2); border-radius: var(--radius); }
.decision-card a { font-weight: 750; }

.page-intro { margin-bottom: 26px; }
.page-intro h1 { font-size: clamp(2rem, 4.5vw, 3.7rem); }
.calculator-shell { display: grid; grid-template-columns: minmax(0, 1.15fr) minmax(330px, .85fr); gap: 20px; align-items: start; }
.calculator-panel, .results-panel { padding: 24px; }
.results-panel { position: sticky; top: 92px; }
.privacy-line { display: flex; gap: 10px; align-items: flex-start; border: 1px solid var(--line); background: var(--surface-2); border-radius: var(--radius-sm); padding: 12px 14px; color: var(--muted); font-size: .9rem; margin-bottom: 18px; }
.privacy-line::before { content: "◉"; color: var(--accent); font-weight: 900; }
.fields { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 14px; }
.field { display: grid; align-content: start; gap: 6px; }
.field label { font-weight: 750; line-height: 1.3; }
.field small { color: var(--muted); }
.field input, .field select, .field textarea, .scenario-row select {
  width: 100%;
  min-height: 46px;
  padding: 10px 12px;
  border: 1px solid var(--control-line);
  border-radius: 10px;
  background: var(--bg);
  color: var(--text);
}
.field input:invalid { border-color: var(--warning); }
.calculator-panel .actions { margin-top: 20px; }
.result-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px; }
.result { background: var(--surface-2); border: 1px solid var(--line); border-radius: var(--radius-sm); padding: 13px; min-height: 94px; }
.result .label { color: var(--muted); font-size: .82rem; line-height: 1.35; }
.result .value { margin-top: 5px; font-weight: 850; font-size: 1.25rem; overflow-wrap: anywhere; }
.verdict { margin-top: 14px; padding: 14px; border-radius: var(--radius-sm); border: 1px solid var(--line); display: grid; gap: 4px; }
.verdict strong { font-size: 1.04rem; }
.verdict span { color: var(--muted); font-size: .9rem; }
.verdict.good { background: var(--accent-soft); border-color: color-mix(in srgb, var(--accent) 35%, var(--line)); }
.verdict.warn { background: var(--warning-soft); border-color: color-mix(in srgb, var(--warning) 35%, var(--line)); }
.verdict.bad { background: var(--danger-soft); border-color: color-mix(in srgb, var(--danger) 35%, var(--line)); }
.scenario-tools { margin-top: 18px; padding-top: 18px; border-top: 1px solid var(--line); }
.scenario-tools h3 { margin-bottom: 10px; }
.scenario-row { display: grid; grid-template-columns: minmax(0, 1fr) auto auto; gap: 8px; margin-top: 10px; }
.scenario-status { min-height: 1.5em; margin-top: 9px; color: var(--muted); font-size: .88rem; }
.mobile-result { display: none; position: sticky; bottom: 8px; z-index: 45; background: var(--text); color: var(--surface); padding: 10px 14px; border-radius: 999px; text-align: center; font-weight: 800; box-shadow: var(--shadow); margin: 12px auto; width: min(calc(100% - 24px), 560px); }

.content-layout { display: grid; grid-template-columns: minmax(0, 1fr) 310px; gap: 24px; align-items: start; margin-top: 26px; }
.article { background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); padding: clamp(22px, 4vw, 42px); box-shadow: var(--shadow-soft); }
.article > section + section { margin-top: 34px; padding-top: 30px; border-top: 1px solid var(--line); }
.article h2 { font-size: clamp(1.4rem, 2.7vw, 2rem); }
.article h3 { margin-top: 24px; }
.article ul, .article ol { padding-left: 22px; }
.article li + li { margin-top: 7px; }
.article-meta { display: flex; flex-wrap: wrap; gap: 10px 18px; color: var(--muted); font-size: .88rem; padding-bottom: 18px; margin-bottom: 24px; border-bottom: 1px solid var(--line); }
.side-rail { position: sticky; top: 92px; display: grid; gap: 12px; }
.rail-card { background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); padding: 18px; }
.rail-card h2, .rail-card h3 { font-size: 1.05rem; letter-spacing: -.01em; }
.rail-card a { display: block; padding: 5px 0; }
.notice { border-left: 5px solid var(--brand); background: var(--brand-soft); border-radius: 0 var(--radius-sm) var(--radius-sm) 0; padding: 14px 16px; }
.notice.warning { border-color: var(--warning); background: var(--warning-soft); }
.notice.danger { border-color: var(--danger); background: var(--danger-soft); }
.formula { background: var(--surface-2); border: 1px solid var(--line); border-radius: var(--radius-sm); padding: 15px; font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace; overflow-x: auto; }
.faq details { border-top: 1px solid var(--line); padding: 14px 0; }
.faq details:last-child { border-bottom: 1px solid var(--line); }
.faq summary { cursor: pointer; font-weight: 800; }
.faq details p { color: var(--muted); margin: 10px 0 0; }
.source-list a { overflow-wrap: anywhere; }

.contact-form { display: grid; gap: 14px; max-width: 760px; }
.contact-form .honeypot { position: absolute; left: -10000px; width: 1px; height: 1px; overflow: hidden; }
.contact-form textarea { min-height: 150px; resize: vertical; }
.download-band { display: flex; justify-content: space-between; gap: 18px; align-items: center; background: var(--brand-soft); border: 1px solid color-mix(in srgb, var(--brand) 28%, var(--line)); border-radius: var(--radius); padding: 22px; }
.download-band p { margin: 0; color: var(--muted); }
.empty-ad { display: none; }

.site-footer { background: #081a2d; color: #dbe8f5; margin-top: 64px; }
.footer-inner { padding: 46px 0 24px; }
.footer-grid { display: grid; grid-template-columns: 1.25fr repeat(3, 1fr); gap: 26px; }
.footer-brand { color: #fff; }
.footer-brand img { box-shadow: none; }
.footer-grid p { color: #a8bbcf; }
.footer-grid strong { display: block; color: #fff; margin-bottom: 9px; }
.footer-grid a { display: block; color: #c9dded; padding: 4px 0; }
.footer-bottom { display: flex; justify-content: space-between; gap: 20px; border-top: 1px solid #284058; padding-top: 18px; margin-top: 30px; color: #9fb3c7; font-size: .86rem; }

/* Generated-page layout */
.brand span { display: grid; }
.brand small { color: var(--muted); font-size: .7rem; font-weight: 650; letter-spacing: 0; }
.breadcrumbs { width: min(calc(100% - 36px), var(--content)); margin: 24px auto 0; }
.breadcrumbs ol { display: flex; flex-wrap: wrap; gap: 6px; padding: 0; margin: 0; list-style: none; }
.breadcrumbs li + li::before { content: "/"; margin-right: 6px; color: var(--line); }
.page-hero, .home-hero, .section-wrap, .feature-band, .directory-wrap, .calculator-shell, .article-wrap, .related {
  width: min(calc(100% - 36px), var(--content));
  margin-inline: auto;
}
.page-hero { display: grid; grid-template-columns: minmax(0, 1.45fr) minmax(270px, .55fr); gap: 32px; align-items: center; padding: 44px 0; }
.page-hero.compact { grid-template-columns: minmax(0, 850px); }
.page-hero .lede, .home-hero .lede { color: var(--muted); font-size: clamp(1.05rem, 2vw, 1.28rem); max-width: 820px; }
.decision-card { border: 1px solid var(--line); box-shadow: var(--shadow-soft); }
.decision-card h2 { font-size: 1.18rem; }
.updated, .byline, .microcopy, .privacy-note { color: var(--muted); font-size: .88rem; }
.home-hero { display: grid; grid-template-columns: minmax(0, 1.35fr) minmax(300px, .65fr); gap: 42px; align-items: center; padding: 70px 0 58px; }
.home-hero h1 { font-size: clamp(2.6rem, 6vw, 5.4rem); }
.trust-row { display: flex; flex-wrap: wrap; gap: 8px 22px; color: var(--muted); padding: 0; list-style: none; }
.trust-row li::before { content: "✓"; color: var(--accent); font-weight: 900; margin-right: 7px; }
.hero-quick { display: grid; gap: 10px; background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); padding: 22px; box-shadow: var(--shadow); }
.hero-quick > a { display: grid; gap: 2px; color: var(--text); text-decoration: none; padding: 13px; border-radius: var(--radius-sm); background: var(--surface-2); }
.hero-quick > a:hover { background: var(--brand-soft); }
.hero-quick span { color: var(--muted); font-size: .88rem; }
.section-wrap { padding-block: 44px; }
.section-wrap + .section-wrap { border-top: 1px solid var(--line); }
.content-card { display: flex; flex-direction: column; min-height: 240px; padding: 21px; background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); box-shadow: var(--shadow-soft); }
.content-card .eyebrow { align-self: flex-start; }
.content-card h3 a { color: var(--text); text-decoration: none; }
.content-card h3 a:hover { color: var(--brand-strong); }
.content-card > p:not(.eyebrow) { color: var(--muted); flex-grow: 1; }
.text-link { font-weight: 800; }
.feature-band { display: grid; grid-template-columns: minmax(0, 1.3fr) minmax(300px, .7fr); gap: 36px; margin-block: 34px; padding: clamp(28px, 5vw, 54px); background: #08233c; color: #f5f9fd; border-radius: 26px; }
.feature-band p { color: #bdd0df; }
.feature-band dl { display: grid; gap: 12px; margin: 0; }
.feature-band dl div { border: 1px solid #294a63; border-radius: var(--radius-sm); padding: 14px; }
.feature-band dt { font-size: 2rem; font-weight: 900; }
.feature-band dd { margin: 0; color: #bdd0df; }
.downloads { display: flex; justify-content: space-between; gap: 28px; align-items: center; }
.download-links { display: flex; flex-wrap: wrap; gap: 10px; }
.directory-section { padding-block: 34px; }
.directory-section + .directory-section { border-top: 1px solid var(--line); }
.calculator-shell { padding: 8px 0 42px; }
.calculator-panel, .results-panel { background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); box-shadow: var(--shadow-soft); }
.panel-heading { padding-bottom: 14px; margin-bottom: 18px; border-bottom: 1px solid var(--line); }
.panel-heading p { color: var(--muted); }
.calculator-form { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 15px; }
.form-actions { display: flex; flex-wrap: wrap; gap: 9px; align-items: center; }
.calculator-form .form-actions, .calculator-form .privacy-note { grid-column: 1 / -1; }
.button.ghost, button.ghost { background: transparent; color: var(--brand-strong); border-color: var(--control-line); }
.button.ghost:hover, button.ghost:hover { background: var(--surface-2); }
.saved-scenarios { margin-top: 22px; padding-top: 18px; border-top: 1px solid var(--line); }
.saved-scenarios h3 { font-size: 1rem; }
.saved-scenarios select { width: 100%; min-height: 44px; padding: 9px 11px; margin-bottom: 9px; border: 1px solid var(--control-line); border-radius: 10px; background: var(--bg); color: var(--text); }
.result-list { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px; margin: 16px 0; }
.result-list div { min-height: 94px; padding: 13px; background: var(--surface-2); border: 1px solid var(--line); border-radius: var(--radius-sm); }
.result-list dt { color: var(--muted); font-size: .82rem; line-height: 1.35; }
.result-list dd { margin: 5px 0 0; font-weight: 850; font-size: 1.25rem; overflow-wrap: anywhere; }
.result-actions { display: flex; flex-wrap: wrap; gap: 8px; }
.article-wrap { max-width: 900px; background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); padding: clamp(22px, 4vw, 44px); box-shadow: var(--shadow-soft); }
.article-section + .article-section { margin-top: 34px; padding-top: 30px; border-top: 1px solid var(--line); }
.article-section ul, .article-section ol { padding-left: 22px; }
.article-section li + li { margin-top: 7px; }
.article-section.notice { margin-top: 34px; }
.faq-list details { border-top: 1px solid var(--line); padding: 14px 0; }
.faq-list details:last-child { border-bottom: 1px solid var(--line); }
.faq-list summary { cursor: pointer; font-weight: 800; }
.faq-list details p { color: var(--muted); margin: 10px 0 0; }
.related { padding-block: 48px 12px; }
.related > div:first-child { margin-bottom: 18px; }
.contact-form-wrap { max-width: 760px; }
.footer-brand { display: inline-flex !important; align-items: center; gap: 10px; text-decoration: none; }
.footer-brand strong { margin: 0; }
.footer-brand img { display: block; }

@media (max-width: 980px) {
  .drawer-toggle { display: inline-flex; }
  .theme-toggle { margin-left: 0; }
  .site-nav {
    position: fixed;
    z-index: 75;
    top: 72px;
    right: 0;
    bottom: 0;
    width: min(390px, 92vw);
    padding: 18px;
    background: var(--surface);
    border-left: 1px solid var(--line);
    box-shadow: var(--shadow);
    transform: translateX(105%);
    transition: transform .2s ease;
    display: block;
    overflow-y: auto;
  }
  .site-nav.is-open { transform: translateX(0); }
  .site-nav > a, .nav-menu > button { width: 100%; justify-content: space-between; display: flex; text-align: left; padding: 11px 12px; }
  .nav-menu { position: static; }
  .mega-menu { position: static; width: 100%; box-shadow: none; border-radius: var(--radius-sm); margin: 4px 0 10px; padding: 12px; }
  .mega-grid { grid-template-columns: 1fr; }
  .menu-footer { align-items: stretch; flex-direction: column; }
  .trust-strip { grid-template-columns: repeat(2, 1fr); }
  .card-grid { grid-template-columns: repeat(2, 1fr); }
  .calculator-shell, .content-layout { grid-template-columns: 1fr; }
  .results-panel, .side-rail { position: static; }
  .side-rail { grid-template-columns: repeat(2, 1fr); }
  .footer-grid { grid-template-columns: repeat(2, 1fr); }
  .page-hero, .home-hero, .feature-band { grid-template-columns: 1fr; }
  .home-hero { padding-top: 46px; }
}

@media (max-width: 640px) {
  .container { width: min(calc(100% - 24px), var(--content)); }
  .header-inner { min-height: 66px; gap: 10px; }
  .brand img { width: 38px; height: 38px; border-radius: 10px; }
  .brand span { font-size: .98rem; }
  .theme-toggle { min-width: 76px; padding-inline: 10px; }
  .site-nav { top: 66px; }
  .nav-backdrop { inset: 66px 0 0; }
  .hero { padding: 38px 0 30px; }
  h1 { font-size: clamp(2rem, 11vw, 3.2rem); }
  .trust-strip, .card-grid, .decision-grid, .fields, .result-grid, .side-rail, .footer-grid { grid-template-columns: 1fr; }
  .section { padding-block: 34px; }
  .section-heading { align-items: start; flex-direction: column; gap: 8px; }
  .calculator-panel, .results-panel, .article { padding: 18px; }
  .calculator-shell { gap: 14px; }
  .scenario-row { grid-template-columns: 1fr 1fr; }
  .scenario-row select { grid-column: 1 / -1; }
  .mobile-result { display: block; }
  .download-band, .footer-bottom { align-items: flex-start; flex-direction: column; }
  .footer-bottom { gap: 8px; }
  .page-hero, .home-hero, .section-wrap, .feature-band, .directory-wrap, .calculator-shell, .article-wrap, .related, .breadcrumbs { width: min(calc(100% - 24px), var(--content)); }
  .page-hero { padding: 30px 0; }
  .home-hero { gap: 24px; padding: 34px 0; }
  .home-hero h1 { font-size: clamp(2.2rem, 12vw, 3.45rem); }
  .calculator-form, .result-list { grid-template-columns: 1fr; }
  .downloads { align-items: flex-start; flex-direction: column; }
  .download-links { width: 100%; }
  .download-links .button { width: 100%; }
}

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { scroll-behavior: auto !important; transition: none !important; }
}

@media print {
  .site-header, .site-footer, .breadcrumbs, .scenario-tools, .mobile-result, .hero-actions, .side-rail, .empty-ad { display: none !important; }
  body { background: #fff; color: #000; }
  .container { width: 100%; }
  .calculator-shell, .content-layout { display: block; }
  .card, .article { box-shadow: none; border-color: #bbb; break-inside: avoid; }
  .results-panel { margin-top: 16px; }
}
