:root {
  --ink: #061b45;
  --ink-2: #0b3470;
  --paper: #f7f8fc;
  --paper-2: #edf2ff;
  --line: #0b3a7e;
  --accent: #ff5f1f;
  --accent-soft: #ffe6dc;
  --success: #0aa56b;
  --muted: #59647a;
  --white: #fff;
  --shadow: 10px 10px 0 var(--accent);
  --radius: 0;
  --max: 1180px;
}

[data-theme="saffron"] { --accent: #ff6b18; --accent-soft: #fff0df; }
[data-theme="gold"] { --accent: #ffb000; --accent-soft: #fff4c9; }
[data-theme="red"] { --accent: #ef3e36; --accent-soft: #ffe1df; }
[data-theme="sky"] { --accent: #36a8ff; --accent-soft: #dff3ff; }
[data-theme="lime"] { --accent: #a5dc38; --accent-soft: #effbd7; }
[data-theme="violet"] { --accent: #8357ff; --accent-soft: #ece6ff; }
[data-theme="magenta"] { --accent: #e84d9b; --accent-soft: #ffe4f2; }
[data-theme="cyan"] { --accent: #10c7c9; --accent-soft: #d9fbfb; }
[data-theme="amber"] { --accent: #f59e0b; --accent-soft: #fff1cf; }
[data-theme="indigo"] { --accent: #5d67e8; --accent-soft: #e8eaff; }
[data-theme="emerald"] { --accent: #13b779; --accent-soft: #dcf8eb; }

* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body { margin: 0; color: var(--ink); background: var(--paper); font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif; line-height: 1.55; }
a { color: inherit; }
button, input, select { font: inherit; }
:focus-visible { outline: 3px solid var(--accent); outline-offset: 4px; }
.container { width: min(calc(100% - 40px), var(--max)); margin-inline: auto; }
.skip { position: fixed; top: 8px; left: 8px; transform: translateY(-160%); background: var(--ink); color: #fff; padding: 10px 14px; z-index: 100; }
.skip:focus { transform: translateY(0); }
.utility { background: var(--ink); color: #fff; border-bottom: 1px solid rgba(255,255,255,.22); font-size: 12px; letter-spacing: .09em; text-transform: uppercase; }
.utility .container { min-height: 34px; display: flex; align-items: center; justify-content: space-between; gap: 20px; }
.site-header { background: rgba(247,248,252,.96); border-bottom: 3px solid var(--line); position: sticky; top: 0; z-index: 20; backdrop-filter: blur(14px); }
.nav { min-height: 76px; display: flex; align-items: center; justify-content: space-between; gap: 24px; }
.brand { display: inline-flex; align-items: center; gap: 11px; text-decoration: none; font-family: "Arial Narrow", Impact, sans-serif; font-weight: 900; letter-spacing: -.035em; font-size: 22px; text-transform: uppercase; }
.brand-mark { width: 28px; height: 28px; background: var(--accent); border: 2px solid var(--ink); box-shadow: 4px 4px 0 var(--ink); }
.nav-links { display: flex; align-items: center; gap: 25px; font-weight: 800; font-size: 12px; text-transform: uppercase; letter-spacing: .05em; }
.nav-links a { text-decoration: none; border-bottom: 2px solid transparent; padding: 8px 0 5px; }
.nav-links a:hover, .nav-links a[aria-current="page"] { border-color: var(--accent); }
.network-menu { position: relative; margin: 0; border: 0; background: transparent; }
.network-menu summary { min-width: max-content; padding: 8px 0 5px; border-bottom: 2px solid transparent; font: inherit; font-size: inherit; letter-spacing: inherit; }
.network-menu summary::after { content: "▾"; margin-left: 7px; color: var(--accent); font-size: 11px; }
.network-menu[open] summary { border-color: var(--accent); }
.network-menu[open] summary::after { content: "▴"; }
.network-menu-links { position: absolute; right: 0; top: calc(100% + 12px); width: 220px; padding: 12px 18px; background: var(--white); border: 2px solid var(--ink); box-shadow: 6px 6px 0 var(--accent); }
.network-menu-links a { display: block; padding: 10px 0; border-bottom: 1px solid #d7deeb; text-transform: none; letter-spacing: 0; }
.network-menu-links a:last-child { border-bottom: 0; }
.nav-toggle { display: none; background: var(--paper); border: 2px solid var(--ink); padding: 9px 12px; font-weight: 900; }
.button { display: inline-flex; align-items: center; justify-content: center; gap: 8px; min-height: 46px; padding: 0 20px; border: 2px solid var(--ink); background: var(--ink); color: #fff; font-weight: 900; text-decoration: none; text-transform: uppercase; letter-spacing: .055em; font-size: 12px; cursor: pointer; }
.button:hover { transform: translate(-2px,-2px); box-shadow: 4px 4px 0 var(--accent); }
.button.secondary { background: transparent; color: var(--ink); }
.button.accent { background: var(--accent); color: var(--ink); }
.hero { border-bottom: 3px solid var(--line); background: linear-gradient(110deg, var(--paper) 0 58%, var(--paper-2) 58%); overflow: hidden; }
.hero-grid { display: grid; grid-template-columns: .9fr 1.1fr; gap: 70px; align-items: center; min-height: 610px; padding-block: 64px; }
.eyebrow { color: var(--ink-2); font-size: 11px; font-weight: 900; letter-spacing: .16em; text-transform: uppercase; margin: 0 0 15px; }
.eyebrow::before { content: ""; display: inline-block; width: 28px; height: 4px; background: var(--accent); margin-right: 10px; vertical-align: 3px; }
h1, h2, h3 { font-family: "Arial Narrow", Impact, Haettenschweiler, sans-serif; line-height: .98; letter-spacing: -.035em; text-transform: uppercase; }
h1 { font-size: clamp(54px, 6.4vw, 92px); margin: 0; max-width: 10ch; }
h2 { font-size: clamp(34px, 4vw, 52px); margin: 0; }
h3 { font-size: 24px; margin: 0; }
.lede { color: #39445a; font-size: 18px; max-width: 580px; margin: 26px 0; }
.actions { display: flex; flex-wrap: wrap; gap: 12px; }
.trust-line { display: flex; gap: 18px; flex-wrap: wrap; margin-top: 28px; color: var(--muted); font-size: 12px; font-weight: 800; text-transform: uppercase; letter-spacing: .05em; }
.trust-line span::before { content: "✓"; color: var(--success); margin-right: 7px; }
.tool-stack { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; position: relative; }
.tool-card { min-height: 178px; background: var(--white); border: 3px solid var(--ink-2); padding: 24px; text-decoration: none; display: flex; flex-direction: column; justify-content: space-between; transition: transform .16s ease, box-shadow .16s ease; }
.tool-card:first-child { grid-column: span 2; background: var(--ink-2); color: #fff; min-height: 220px; box-shadow: var(--shadow); }
.tool-card:hover { transform: translate(-4px,-4px); box-shadow: 8px 8px 0 var(--accent); }
.tool-kicker { font-size: 10px; letter-spacing: .14em; text-transform: uppercase; font-weight: 900; color: var(--accent); }
.tool-title { font-family: "Arial Narrow", Impact, sans-serif; text-transform: uppercase; font-size: 28px; line-height: 1; }
.tool-arrow { font-weight: 900; font-size: 12px; text-transform: uppercase; letter-spacing: .06em; }
.section { padding: 88px 0; border-bottom: 3px solid var(--line); }
.section.soft { background: var(--paper-2); }
.section.dark { background: var(--ink); color: #fff; }
.section-head { display: flex; justify-content: space-between; align-items: end; gap: 30px; margin-bottom: 36px; }
.section-head p { max-width: 540px; color: var(--muted); margin: 0; }
.section.dark .section-head p { color: #b9c8e5; }
.grid-3 { display: grid; grid-template-columns: repeat(3, 1fr); gap: 18px; }
.grid-2 { display: grid; grid-template-columns: repeat(2, 1fr); gap: 18px; }
.card { background: #fff; border: 2px solid var(--ink-2); padding: 26px; min-height: 220px; }
.card .index { color: var(--accent); font-family: Impact, sans-serif; font-size: 38px; margin-bottom: 34px; }
.card p { color: var(--muted); }
.card a { font-weight: 900; text-transform: uppercase; font-size: 12px; text-decoration-thickness: 2px; text-underline-offset: 4px; }
.calculator-shell { display: grid; grid-template-columns: 1.18fr .82fr; gap: 28px; align-items: start; }
.calculator-panel { border: 3px solid var(--ink-2); background: #fff; padding: 30px; }
.calculator-panel h2 { font-size: 31px; margin-bottom: 25px; }
.calculator-contract { display: grid; gap: 5px; margin: -10px 0 26px; padding: 14px 16px; border-left: 5px solid var(--accent); background: var(--accent-soft); color: var(--ink); }
.calculator-contract strong { font-size: 12px; letter-spacing: .06em; text-transform: uppercase; }
.calculator-contract span { color: #39445a; font-size: 14px; line-height: 1.55; }
.field-grid { display: grid; grid-template-columns: repeat(2, 1fr); gap: 18px; }
.field { display: grid; gap: 7px; }
.field.full { grid-column: 1 / -1; }
label { font-size: 10px; font-weight: 900; letter-spacing: .12em; text-transform: uppercase; }
input, select { width: 100%; border: 2px solid #bcc9e1; background: var(--paper-2); min-height: 52px; padding: 12px 14px; color: var(--ink); font-weight: 700; }
input:focus, select:focus { outline: 3px solid var(--accent-soft); border-color: var(--accent); }
.result-panel { background: var(--ink-2); color: #fff; border: 3px solid var(--ink); padding: 30px; box-shadow: var(--shadow); position: sticky; top: 115px; }
.result-label { color: #b9c8e5; font-size: 10px; text-transform: uppercase; letter-spacing: .13em; font-weight: 900; }
.result-number { color: var(--accent); font-family: "Arial Narrow", Impact, sans-serif; font-size: clamp(42px, 5vw, 72px); line-height: 1; margin: 13px 0 22px; word-break: break-word; }
.result-row { display: flex; justify-content: space-between; gap: 20px; padding: 13px 0; border-top: 1px solid rgba(255,255,255,.2); }
.result-row span:last-child { font-weight: 900; }
.notice { border-left: 5px solid var(--accent); background: var(--accent-soft); color: var(--ink); padding: 15px 17px; font-size: 13px; margin-top: 22px; }
.content-layout { display: grid; grid-template-columns: minmax(0, 68ch) 300px; gap: clamp(42px, 6vw, 84px); align-items: start; justify-content: space-between; }
.prose { max-width: 68ch; min-width: 0; }
.prose h2, .prose h3, .prose h4 { font-family: Inter, ui-sans-serif, system-ui, sans-serif; text-transform: none; line-height: 1.16; letter-spacing: -.035em; }
.prose h2 { font-size: clamp(30px, 3.2vw, 40px); margin: 68px 0 24px; text-wrap: balance; }
.prose h3 { font-size: clamp(22px, 2.2vw, 27px); margin: 42px 0 16px; text-wrap: balance; }
.prose h4 { font-size: 20px; margin: 34px 0 14px; }
.prose > h2:first-child, .prose > h3:first-child { margin-top: 0; }
.prose p, .prose li { color: #334058; font-size: clamp(17px, 1.45vw, 18px); line-height: 1.76; }
.prose p { margin: 0 0 1.45em; }
.prose ul, .prose ol { padding-left: 28px; margin: 0 0 28px; }
.prose li { margin: 11px 0; padding-left: 5px; }
.prose code { background: var(--paper-2); border: 1px solid #c6d1e4; padding: 2px 5px; font-size: .9em; overflow-wrap: anywhere; }
.prose pre { max-width: 100%; overflow-x: auto; background: var(--ink); color: #fff; border-left: 7px solid var(--accent); padding: 18px 20px; }
.prose pre code { background: transparent; border: 0; padding: 0; color: inherit; }
.prose .formula { font-size: 17px; }
.prose .content-callout { margin: 30px 0; padding: 26px 28px; border: 2px solid var(--ink-2); border-left: 8px solid var(--accent); background: var(--accent-soft); box-shadow: 7px 7px 0 var(--ink); }
.prose .content-callout > :first-child { margin-top: 0; }
.prose .content-callout > :last-child { margin-bottom: 0; }
.prose .content-callout p strong { color: var(--ink); }
.prose .content-callout ul, .prose .content-callout ol { padding-left: 22px; margin-block: 8px 20px; }
.prose .table-scroll { max-width: 100%; overflow-x: auto; margin: 28px 0; border: 2px solid var(--ink-2); }
.prose table { width: 100%; border-collapse: collapse; margin: 28px 0; background: #fff; }
.prose .table-scroll table { margin: 0; min-width: 580px; }
.contextual-links { margin: 48px 0 0; padding: 24px 26px; border: 2px solid var(--ink-2); background: var(--paper-2); }
.contextual-links h2 { margin: 0 0 12px; font-size: 22px; }
.contextual-links p { margin: 0; }
.contextual-links a { font-weight: 800; }
.prose th, .prose td { border: 1px solid #bac7dc; padding: 13px; text-align: left; }
.prose th { background: var(--ink-2); color: #fff; }
.side-card { border: 2px solid var(--ink-2); background: #fff; padding: 24px; position: sticky; top: 115px; }
.side-card h3 { font-size: 21px; margin-bottom: 18px; }
.side-card a { display: block; padding: 11px 0; border-top: 1px solid #d7deeb; font-weight: 750; text-decoration: none; }
.side-card a:hover { color: var(--ink-2); text-decoration: underline; text-decoration-color: var(--accent); text-decoration-thickness: 3px; }
.faq { max-width: 900px; margin-inline: auto; }
details { background: #fff; border: 2px solid var(--ink-2); margin: 12px 0; }
summary { cursor: pointer; list-style: none; padding: 20px 22px; font-weight: 900; text-transform: uppercase; font-size: 14px; display: flex; justify-content: space-between; gap: 20px; }
summary::after { content: "+"; color: var(--accent); font-size: 23px; line-height: .8; }
details[open] summary::after { content: "−"; }
details p { padding: 0 22px 20px; color: var(--muted); }
.sources-compact { background: var(--paper-2); }
.source-disclosure { max-width: 900px; margin: 0; background: #fff; }
.source-disclosure summary { font-size: 13px; letter-spacing: .04em; }
.source-list { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 0 22px; padding: 4px 22px 22px; }
.source-list a { display: grid; gap: 3px; padding: 15px 0; border-top: 1px solid #d7deeb; text-decoration: none; }
.source-list a:hover strong { text-decoration: underline; text-decoration-color: var(--accent); text-decoration-thickness: 3px; }
.source-list strong { font-size: 14px; line-height: 1.4; }
.source-list span { color: var(--muted); font-size: 12px; overflow-wrap: anywhere; }
.city-list { display: flex; gap: 8px; flex-wrap: wrap; }
.city-list a { background: #fff; border: 2px solid var(--ink-2); padding: 10px 13px; font-weight: 800; text-decoration: none; }
.metric-strip { display: grid; grid-template-columns: repeat(3, 1fr); border: 2px solid var(--ink-2); background: #fff; }
.metric { padding: 22px; text-align: center; border-right: 1px solid #bec9da; }
.metric:last-child { border: 0; }
.metric strong { display: block; font-family: Impact, sans-serif; font-size: 27px; }
.metric span { color: var(--muted); text-transform: uppercase; font-size: 10px; letter-spacing: .1em; font-weight: 900; }
.footer { background: var(--ink); color: #fff; padding: 64px 0 30px; }
.footer-grid { display: grid; grid-template-columns: 1.4fr repeat(3, 1fr); gap: 40px; }
.footer h3 { font-size: 22px; }
.footer h4 { color: #9fb2d6; font-size: 10px; letter-spacing: .14em; text-transform: uppercase; }
.footer a { display: block; color: #d5def0; text-decoration: none; margin: 10px 0; font-size: 13px; }
.footer-base { border-top: 1px solid #284674; margin-top: 46px; padding-top: 24px; color: #8ea2c8; font-size: 11px; display: flex; justify-content: space-between; gap: 20px; }
.breadcrumb { font-size: 11px; font-weight: 800; text-transform: uppercase; letter-spacing: .08em; padding-top: 34px; }
.breadcrumb a { color: var(--muted); }
.article-hero { padding: 54px 0 64px; border-bottom: 3px solid var(--line); }
.article-hero h1 { max-width: 12ch; }
.sr-only { position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px; overflow: hidden; clip: rect(0,0,0,0); white-space: nowrap; border: 0; }

@media (max-width: 900px) {
  .hero-grid, .calculator-shell, .content-layout { grid-template-columns: 1fr; }
  .hero { background: var(--paper); }
  .result-panel, .side-card { position: static; }
  .grid-3 { grid-template-columns: 1fr 1fr; }
  .footer-grid { grid-template-columns: 1fr 1fr; }
  .nav-toggle { display: block; }
  .nav-links { display: none; position: absolute; left: 0; right: 0; top: 76px; background: var(--paper); border-bottom: 3px solid var(--ink); padding: 22px; flex-direction: column; align-items: flex-start; }
  .nav-links.open { display: flex; }
  .network-menu { width: 100%; }
  .network-menu-links { position: static; width: 100%; margin-top: 8px; box-shadow: 4px 4px 0 var(--accent); }
}

@media (max-width: 620px) {
  .container { width: min(calc(100% - 26px), var(--max)); }
  .utility .container { justify-content: center; }
  .utility span:last-child { display: none; }
  .hero-grid { min-height: auto; padding-block: 46px; gap: 42px; }
  h1 { font-size: 48px; }
  .tool-stack, .grid-3, .grid-2, .field-grid, .metric-strip, .footer-grid { grid-template-columns: 1fr; }
  .tool-card:first-child { grid-column: auto; }
  .field.full { grid-column: auto; }
  .metric { border-right: 0; border-bottom: 1px solid #bec9da; }
  .section { padding: 64px 0; }
  .section-head { align-items: start; flex-direction: column; }
  .footer-base { flex-direction: column; }
  .source-list { grid-template-columns: 1fr; }
  .prose p, .prose li { font-size: 17px; line-height: 1.72; }
}

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