/* Layout concept: a calm "financial ledger" — navy ink on paper, teal for growth, tabular figures, generous reading column. */
:root {
  --bg: #F6F2EC;
  --surface: #FFFFFF;
  --ink: #1B2A4A;
  --text: #2A3346;
  --muted: #5D6677;
  --line: #E2DACD;
  --teal: #2E6E63;
  --teal-soft: #E3EEEA;
  --navy-soft: #E6E9F0;
  --warn-bg: #FFF6E0;
  --warn-line: #E8C76A;
  --wa: #1E8E4E;
  --font-display: "Libre Caslon Text", Georgia, "Times New Roman", serif;
  --font-body: "Public Sans", "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
  --radius: 10px;
  --wrap: 1120px;
  --read: 70ch;
}
@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) {
    --bg: #0F1726; --surface: #172236; --ink: #EFE9DE; --text: #D9DEE8; --muted: #9AA5B8;
    --line: #2A3750; --teal: #73C2B1; --teal-soft: #17332F; --navy-soft: #1D2A42;
    --warn-bg: #2E2715; --warn-line: #8A7330; --wa: #3DBB72; color-scheme: dark;
  }
}
:root[data-theme="dark"] {
  --bg: #0F1726; --surface: #172236; --ink: #EFE9DE; --text: #D9DEE8; --muted: #9AA5B8;
  --line: #2A3750; --teal: #73C2B1; --teal-soft: #17332F; --navy-soft: #1D2A42;
  --warn-bg: #2E2715; --warn-line: #8A7330; --wa: #3DBB72; color-scheme: dark;
}

* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body {
  margin: 0; background: var(--bg); color: var(--text);
  font-family: var(--font-body); font-size: 1.0625rem; line-height: 1.65;
}
img { max-width: 100%; height: auto; }
a { color: var(--teal); text-underline-offset: 3px; }
a:focus-visible, button:focus-visible, summary:focus-visible { outline: 3px solid var(--teal); outline-offset: 2px; border-radius: 4px; }
h1, h2, h3 { font-family: var(--font-display); color: var(--ink); line-height: 1.2; text-wrap: balance; margin: 0; }
h1 { font-size: clamp(2rem, 4.4vw, 3.1rem); font-weight: 700; }
h2 { font-size: clamp(1.5rem, 2.8vw, 2.05rem); font-weight: 700; }
h3 { font-size: 1.25rem; font-weight: 700; }
p { margin: 0; }
.num, table { font-variant-numeric: tabular-nums; }
.wrap { max-width: var(--wrap); margin: 0 auto; padding-left: max(16px, env(safe-area-inset-left, 0px)); padding-right: max(16px, env(safe-area-inset-right, 0px)); }
.eyebrow { font-size: .78rem; letter-spacing: .12em; text-transform: uppercase; font-weight: 700; color: var(--teal); }
.lede { font-size: 1.2rem; color: var(--muted); max-width: 60ch; }
.skip { position: absolute; left: -999px; }
.skip:focus { left: 16px; top: 16px; background: var(--surface); padding: 8px 12px; z-index: 50; }

/* Header */
body::before { content: ""; position: fixed; inset: 0 0 auto; height: env(safe-area-inset-top, 0px); z-index: 10; background: var(--surface); }
.site-header { position: sticky; top: env(safe-area-inset-top, 0px); z-index: 9; background: var(--surface); border-bottom: 1px solid var(--line); }
.site-header .wrap { display: flex; align-items: center; justify-content: space-between; gap: 16px; padding-block: 10px; }
.brand img { display: block; height: 46px; width: auto; }
.brand .logo-dark { display: none; }
@media (prefers-color-scheme: dark) { :root:not([data-theme="light"]) .brand .logo-light { display: none; } :root:not([data-theme="light"]) .brand .logo-dark { display: block; } }
:root[data-theme="dark"] .brand .logo-light { display: none; }
:root[data-theme="dark"] .brand .logo-dark { display: block; }
.nav { display: flex; flex-wrap: wrap; gap: 4px 18px; align-items: center; font-size: .95rem; }
.nav a { color: var(--ink); text-decoration: none; font-weight: 500; }
.nav a:hover, .nav a[aria-current="page"] { color: var(--teal); text-decoration: underline; }
.menu-toggle { display: none; background: none; border: 1px solid var(--line); color: var(--ink); border-radius: 8px; padding: 8px 12px; font: inherit; font-weight: 600; cursor: pointer; }
@media (max-width: 960px) {
  .menu-toggle { display: inline-block; }
  .nav { display: none; position: absolute; left: 0; right: 0; top: 100%; background: var(--surface); border-bottom: 1px solid var(--line); flex-direction: column; align-items: stretch; gap: 0; padding: 8px max(16px, env(safe-area-inset-right, 0px)) 16px max(16px, env(safe-area-inset-left, 0px)); }
  .nav.open { display: flex; }
  .nav a { padding: 10px 0; border-bottom: 1px solid var(--line); }
}

/* Buttons */
.btn { display: inline-flex; align-items: center; gap: 8px; padding: 12px 20px; border-radius: 999px; font-weight: 700; text-decoration: none; border: 2px solid transparent; line-height: 1.2; }
.btn-wa { background: var(--wa); color: #fff; }
.btn-wa:hover { filter: brightness(1.08); }
.btn-teal { background: var(--teal); color: var(--bg); }
.btn-teal:hover { filter: brightness(1.1); }
.cta-band .btn-teal { background: var(--bg); color: var(--ink); }
.btn-ghost { border-color: var(--ink); color: var(--ink); }
.btn-ghost:hover { background: var(--navy-soft); }
.btn svg { width: 20px; height: 20px; flex: none; }
.actions { display: flex; flex-wrap: wrap; gap: 12px; }
.wa-float { position: fixed; right: calc(16px + env(safe-area-inset-right, 0px)); bottom: calc(16px + env(safe-area-inset-bottom, 0px)); z-index: 8; box-shadow: 0 6px 20px rgba(0,0,0,.25); }

/* Sections */
section { padding-block: 56px; }
.section-alt { background: var(--surface); border-block: 1px solid var(--line); }
.stack { display: grid; gap: 18px; }
.hero { padding-block: 56px 40px; }
.hero-grid { display: grid; grid-template-columns: 1.1fr .9fr; gap: 40px; align-items: center; }
.hero-grid > * { min-width: 0; }
@media (max-width: 860px) { .hero-grid { grid-template-columns: 1fr; } }
.grid-2 { display: grid; grid-template-columns: repeat(2, minmax(0,1fr)); gap: 20px; }
.grid-3 { display: grid; grid-template-columns: repeat(3, minmax(0,1fr)); gap: 20px; }
@media (max-width: 860px) { .grid-3 { grid-template-columns: repeat(2, minmax(0,1fr)); } }
@media (max-width: 600px) { .grid-2, .grid-3 { grid-template-columns: 1fr; } }
.card { background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); padding: 22px; display: grid; gap: 10px; align-content: start; }
.card h3 a { color: var(--ink); text-decoration: none; }
.card h3 a:hover { color: var(--teal); }
.card .meta { font-size: .85rem; color: var(--muted); }
.tag { display: inline-block; font-size: .75rem; font-weight: 700; letter-spacing: .06em; text-transform: uppercase; color: var(--teal); background: var(--teal-soft); padding: 3px 10px; border-radius: 999px; justify-self: start; }

/* Honesty notice */
.notice { background: var(--warn-bg); border: 1px solid var(--warn-line); border-radius: var(--radius); padding: 16px 18px; font-size: .97rem; }
.notice strong { color: var(--ink); }

/* Hub map */
.hub { width: 100%; max-width: 560px; margin: 0 auto; display: block; }
.hub text { font-family: var(--font-body); }
.hub .spoke { stroke: var(--line); stroke-width: 2; }
.hub .node rect { fill: var(--surface); stroke: var(--teal); stroke-width: 1.5; }
.hub .node text { fill: var(--ink); font-size: 13px; font-weight: 600; }
.hub .node text.sub { fill: var(--muted); font-size: 11px; font-weight: 400; }
.hub .node:hover rect { fill: var(--teal-soft); }
.hub .core circle { fill: var(--ink); }
.hub .core text { fill: var(--bg); font-family: var(--font-display); font-weight: 700; }

/* Steps (real sequence) */
.steps { list-style: none; padding: 0; margin: 0; display: grid; gap: 14px; counter-reset: s; }
.steps li { counter-increment: s; display: grid; grid-template-columns: 44px 1fr; gap: 14px; align-items: start; background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); padding: 16px; }
.steps li::before { content: counter(s); width: 44px; height: 44px; border-radius: 50%; background: var(--ink); color: var(--bg); display: grid; place-items: center; font-family: var(--font-display); font-weight: 700; font-size: 1.15rem; }
.steps li > div { min-width: 0; }

/* Tables */
.table-wrap { overflow-x: auto; border: 1px solid var(--line); border-radius: var(--radius); background: var(--surface); }
table { border-collapse: collapse; width: 100%; font-size: .95rem; }
th, td { text-align: left; padding: 10px 14px; border-bottom: 1px solid var(--line); vertical-align: top; }
th { background: var(--navy-soft); color: var(--ink); font-weight: 700; white-space: nowrap; }
tr:last-child td { border-bottom: 0; }
td.r, th.r { text-align: right; white-space: nowrap; }
caption { caption-side: bottom; text-align: left; padding: 10px 14px; font-size: .85rem; color: var(--muted); }

/* Prose (articles & long pages) */
.prose { max-width: var(--read); display: grid; gap: 1.05em; }
.prose h2 { margin-top: .8em; }
.prose h3 { margin-top: .4em; }
.prose ul, .prose ol { margin: 0; padding-left: 1.3em; display: grid; gap: .35em; }
.prose blockquote { margin: 0; padding: 12px 18px; border-left: 4px solid var(--teal); background: var(--teal-soft); border-radius: 0 var(--radius) var(--radius) 0; }
.prose .table-wrap { margin: .3em 0; }
.prose hr { border: 0; border-top: 1px solid var(--line); width: 100%; }
.article-layout { display: grid; grid-template-columns: minmax(0, 1fr) 300px; gap: 48px; align-items: start; }
.article-layout > * { min-width: 0; }
@media (max-width: 960px) { .article-layout { grid-template-columns: 1fr; } }
.aside { position: sticky; top: 100px; display: grid; gap: 16px; }
@media (max-width: 960px) { .aside { position: static; } }
.breadcrumb { font-size: .88rem; color: var(--muted); display: flex; flex-wrap: wrap; gap: 6px; }
.breadcrumb a { color: var(--muted); }
.article-head { display: grid; gap: 14px; padding-block: 40px 8px; }
.byline { font-size: .9rem; color: var(--muted); }

/* FAQ */
details { background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); padding: 14px 18px; }
details + details { margin-top: 10px; }
summary { cursor: pointer; font-weight: 700; color: var(--ink); }
details[open] summary { margin-bottom: 8px; }

/* CTA band */
.cta-band { background: var(--ink); color: var(--bg); border-radius: 14px; padding: 32px; display: grid; gap: 14px; }
.cta-band h2, .cta-band h3 { color: var(--bg); }
.cta-band p { color: var(--bg); opacity: .9; }
.cta-band .btn-ghost { border-color: var(--bg); color: var(--bg); }
.cta-band .btn-ghost:hover { background: transparent; text-decoration: underline; }

/* Footer */
.site-footer { border-top: 1px solid var(--line); background: var(--surface); padding-block: 40px 90px; font-size: .92rem; color: var(--muted); }
.footer-grid { display: grid; grid-template-columns: 1.4fr 1fr 1fr 1fr; gap: 28px; }
@media (max-width: 960px) { .footer-grid { grid-template-columns: 1fr 1fr; } }
.footer-grid > * { min-width: 0; }
@media (max-width: 760px) { .footer-grid { grid-template-columns: 1fr; } }
.site-footer h3 { font-size: 1rem; margin-bottom: 8px; }
.site-footer ul { list-style: none; padding: 0; margin: 0; display: grid; gap: 6px; }
.site-footer a { color: var(--text); }
.fineprint { margin-top: 28px; padding-top: 18px; border-top: 1px solid var(--line); font-size: .82rem; display: grid; gap: 8px; }

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