:root {
  --bg: #f7f8fb;
  --surface: #ffffff;
  --surface-2: #eef2f7;
  --ink: #0f1b2d;
  --ink-2: #44526a;
  --muted: #6b778c;
  --line: #dde3ec;
  --brand: #0e7c66;
  --brand-ink: #ffffff;
  --brand-soft: #e3f4ef;
  --accent: #f2b33d;
  --radius: 14px;
  --shadow: 0 1px 2px rgba(15, 27, 45, .06), 0 8px 24px rgba(15, 27, 45, .06);
  --max: 1160px;
  --band: #0f1b2d;
  --band-ink: #ffffff;
  --band-ink-2: #c4cee0;
  --warn-bg: #fff6e0;
  --warn-ink: #6a4a00;
  --font-display: "Bricolage Grotesque", "Inter", system-ui, sans-serif;
  --font-body: "Inter", system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
}
@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) {
    --bg: #0b1220; --surface: #121b2c; --surface-2: #18233a; --ink: #e8edf5;
    --ink-2: #b4bfd1; --muted: #8592a8; --line: #24314a; --brand: #2bb593;
    --brand-ink: #06231c; --brand-soft: #123a33; --band: #16243b;
    --warn-bg: #3a2e10; --warn-ink: #f5d98a; color-scheme: dark;
  }
}
:root[data-theme="dark"] {
  --bg: #0b1220; --surface: #121b2c; --surface-2: #18233a; --ink: #e8edf5;
  --ink-2: #b4bfd1; --muted: #8592a8; --line: #24314a; --brand: #2bb593;
  --brand-ink: #06231c; --brand-soft: #123a33; --band: #16243b;
  --warn-bg: #3a2e10; --warn-ink: #f5d98a; color-scheme: dark;
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body {
  margin: 0; background: var(--bg); color: var(--ink);
  font: 16px/1.6 var(--font-body);
  -webkit-font-smoothing: antialiased;
}
img { max-width: 100%; display: block; }
a { color: var(--brand); text-decoration: none; }
a:hover { text-decoration: underline; }
h1, h2, h3 { font-family: var(--font-display); line-height: 1.15; letter-spacing: -.02em; margin: 0 0 .5em; text-wrap: balance; }
h1 { font-size: clamp(2rem, 4.5vw, 3.25rem); }
h2 { font-size: clamp(1.5rem, 3vw, 2.1rem); }
h3 { font-size: 1.15rem; }
p { margin: 0 0 1em; color: var(--ink-2); }

.container { max-width: var(--max); margin: 0 auto; padding-left: max(16px, env(safe-area-inset-left, 0px)); padding-right: max(16px, env(safe-area-inset-right, 0px)); }
.skip { position: absolute; left: -999px; top: 8px; background: var(--ink); color: var(--bg); padding: 8px 12px; border-radius: 8px; z-index: 100; }
.skip:focus { left: 8px; }

/* Notice bar */
.notice { background: var(--band); color: var(--band-ink-2); font-size: .82rem; padding: 8px 0; }
.notice p { margin: 0; color: inherit; }

/* Header */
.site-header { position: sticky; top: env(safe-area-inset-top, 0px); z-index: 50; background: color-mix(in srgb, var(--bg) 88%, transparent); backdrop-filter: blur(10px); border-bottom: 1px solid var(--line); }
.nav { display: flex; align-items: center; justify-content: space-between; gap: 16px; height: 68px; }
.logo { display: flex; align-items: center; gap: 10px; color: var(--ink); font-family: var(--font-display); font-weight: 800; font-size: 1.15rem; }
.logo:hover { text-decoration: none; }
.logo-mark { width: 34px; height: 34px; border-radius: 10px; background: var(--brand); color: var(--brand-ink); display: grid; place-items: center; font-weight: 800; font-size: .95rem; }
.logo small { display: block; font-weight: 500; font-size: .72rem; color: var(--muted); letter-spacing: 0; }
.nav-links { display: flex; align-items: center; gap: 4px; list-style: none; margin: 0; padding: 0; }
.nav-links a { color: var(--ink-2); padding: 8px 12px; border-radius: 8px; font-weight: 500; font-size: .95rem; }
.nav-links a:hover, .nav-links a[aria-current="page"] { background: var(--surface-2); color: var(--ink); text-decoration: none; }
.menu-btn { display: none; background: none; border: 1px solid var(--line); border-radius: 8px; padding: 8px 10px; color: var(--ink); cursor: pointer; }
@media (max-width: 900px) {
  .menu-btn { display: block; }
  .nav-links { display: none; position: absolute; top: 68px; left: 0; right: 0; flex-direction: column; align-items: stretch; background: var(--surface); border-bottom: 1px solid var(--line); padding: 12px 16px; }
  .nav-links.open { display: flex; }
  .nav-links .btn { margin-top: 8px; }
}

/* Buttons */
.btn { display: inline-flex; align-items: center; justify-content: center; gap: 8px; padding: 12px 20px; border-radius: 10px; font-weight: 600; border: 1px solid transparent; cursor: pointer; font-size: .95rem; font-family: inherit; transition: transform .1s, background .2s; }
.btn:hover { text-decoration: none; transform: translateY(-1px); }
.btn-primary { background: var(--brand); color: var(--brand-ink); }
.btn-primary:hover { background: color-mix(in srgb, var(--brand) 88%, black); }
.btn-ghost { background: transparent; border-color: var(--line); color: var(--ink); }
.btn-ghost:hover { background: var(--surface-2); }
.btn-sm { padding: 8px 14px; font-size: .88rem; }

/* Sections */
section { padding: 72px 0; }
.section-head { display: flex; align-items: end; justify-content: space-between; gap: 16px; margin-bottom: 32px; flex-wrap: wrap; }
.section-head p { max-width: 560px; margin: 0; }
.eyebrow { display: inline-block; font-size: .78rem; font-weight: 700; letter-spacing: .08em; text-transform: uppercase; color: var(--brand); margin-bottom: 10px; }
.alt { background: var(--surface); border-block: 1px solid var(--line); }

/* Hero */
.hero { padding: 64px 0 56px; }
.hero-grid { display: grid; grid-template-columns: 1.3fr 1fr; gap: 48px; align-items: center; }
.hero .lead { font-size: 1.15rem; max-width: 560px; }
.hero-actions { display: flex; gap: 12px; flex-wrap: wrap; margin: 24px 0 8px; }
.pill { display: inline-flex; gap: 8px; align-items: center; font-size: .82rem; color: var(--ink-2); background: var(--surface); border: 1px solid var(--line); padding: 6px 12px; border-radius: 999px; margin-bottom: 18px; }
.pill .dot { width: 8px; height: 8px; border-radius: 50%; background: var(--brand); }
.desk-card { background: var(--surface); border: 1px solid var(--line); border-radius: 20px; padding: 28px; box-shadow: var(--shadow); }
.desk-card .tag { font-size: .78rem; color: var(--muted); font-weight: 600; text-transform: uppercase; letter-spacing: .06em; }
.checklist { list-style: none; padding: 0; margin: 16px 0 20px; display: grid; gap: 12px; }
.checklist li { display: flex; gap: 12px; color: var(--ink-2); }
.checklist li::before { content: "✓"; flex: none; width: 24px; height: 24px; border-radius: 50%; background: var(--brand-soft); color: var(--brand); display: grid; place-items: center; font-weight: 700; font-size: .8rem; }
.trust { display: grid; grid-template-columns: repeat(4, 1fr); gap: 16px; margin-top: 48px; padding-top: 28px; border-top: 1px solid var(--line); }
.trust strong { display: block; color: var(--ink); }
.trust span { font-size: .9rem; color: var(--muted); }
@media (max-width: 900px) {
  .hero-grid { grid-template-columns: 1fr; }
  .trust { grid-template-columns: repeat(2, 1fr); }
}

/* Cards */
.grid { display: grid; gap: 20px; }
.grid-3 { grid-template-columns: repeat(3, 1fr); }
.grid-4 { grid-template-columns: repeat(4, 1fr); }
@media (max-width: 900px) { .grid-3, .grid-4 { grid-template-columns: repeat(2, 1fr); } }
@media (max-width: 600px) { .grid-3, .grid-4 { grid-template-columns: 1fr; } }
.card { background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); padding: 24px; display: flex; flex-direction: column; gap: 6px; transition: border-color .2s, box-shadow .2s; }
.card:hover { border-color: color-mix(in srgb, var(--brand) 40%, var(--line)); box-shadow: var(--shadow); }
.card p { margin-bottom: 12px; }
.card .btn, .card .more { margin-top: auto; align-self: flex-start; }
.num { font-weight: 800; color: var(--brand); font-size: .9rem; letter-spacing: .04em; }
.monogram { width: 44px; height: 44px; border-radius: 12px; background: var(--surface-2); color: var(--ink); font-weight: 800; display: grid; place-items: center; margin-bottom: 8px; }
.chip { display: inline-block; font-size: .75rem; font-weight: 600; color: var(--ink-2); background: var(--surface-2); padding: 3px 10px; border-radius: 999px; align-self: flex-start; }
.meta { font-size: .82rem; color: var(--muted); }
a.card { color: inherit; }
a.card:hover { text-decoration: none; }

/* Steps */
.steps { counter-reset: step; display: grid; grid-template-columns: repeat(3, 1fr); gap: 20px; }
.step { position: relative; padding: 24px; border-left: 3px solid var(--brand); background: var(--surface); border-radius: 0 var(--radius) var(--radius) 0; }
.step::before { counter-increment: step; content: "Step " counter(step); font-size: .78rem; font-weight: 700; color: var(--brand); text-transform: uppercase; letter-spacing: .06em; }
.step h3 { margin-top: 6px; }
@media (max-width: 900px) { .steps { grid-template-columns: 1fr; } }

/* FAQ */
.faq { max-width: 820px; }
.faq details { background: var(--surface); border: 1px solid var(--line); border-radius: 12px; padding: 0 20px; margin-bottom: 12px; }
.faq summary { cursor: pointer; padding: 18px 0; font-weight: 600; list-style: none; display: flex; justify-content: space-between; gap: 16px; }
.faq summary::-webkit-details-marker { display: none; }
.faq summary::after { content: "+"; color: var(--brand); font-size: 1.3rem; line-height: 1; }
.faq details[open] summary::after { content: "–"; }
.faq details p { padding-bottom: 18px; margin: 0; }

/* CTA band */
.cta-band { background: var(--band); color: var(--band-ink); border-radius: 24px; padding: 48px; display: grid; grid-template-columns: 1.5fr auto; gap: 24px; align-items: center; }
.cta-band h2 { color: var(--band-ink); }
.cta-band p { color: var(--band-ink-2); margin: 0; }
@media (max-width: 700px) { .cta-band { grid-template-columns: 1fr; padding: 32px 24px; } }

/* Page header */
.page-head { padding: 56px 0 40px; border-bottom: 1px solid var(--line); background: var(--surface); }
.page-head p { font-size: 1.1rem; max-width: 680px; }
.crumbs { font-size: .85rem; color: var(--muted); margin-bottom: 12px; }

/* Prose */
.prose { max-width: 760px; }
.prose h2 { margin-top: 1.6em; font-size: 1.5rem; }
.prose ul, .prose ol { color: var(--ink-2); padding-left: 1.2em; }
.prose li { margin-bottom: .4em; }
.callout { background: var(--brand-soft); border: 1px solid color-mix(in srgb, var(--brand) 30%, transparent); border-radius: 12px; padding: 16px 20px; margin: 24px 0; }
.callout p { margin: 0; color: var(--ink); }
.layout-side { display: grid; grid-template-columns: 1fr 300px; gap: 48px; align-items: start; }
.side { position: sticky; top: 96px; }
@media (max-width: 900px) { .layout-side { grid-template-columns: 1fr; } .side { position: static; } }

/* Tables */
.table-wrap { overflow-x: auto; border: 1px solid var(--line); border-radius: 12px; background: var(--surface); }
table { width: 100%; border-collapse: collapse; font-size: .92rem; }
th, td { text-align: left; padding: 12px 16px; border-bottom: 1px solid var(--line); }
th { background: var(--surface-2); font-weight: 600; }
tr:last-child td { border-bottom: none; }

/* Filters */
.filters { display: flex; gap: 8px; flex-wrap: wrap; margin-bottom: 24px; }
.filters button { border: 1px solid var(--line); background: var(--surface); color: var(--ink-2); padding: 8px 14px; border-radius: 999px; cursor: pointer; font: inherit; font-size: .88rem; }
.filters button.active { background: var(--ink); color: var(--bg); border-color: var(--ink); }

/* Footer */
.site-footer { background: var(--surface); border-top: 1px solid var(--line); padding: 56px 0 32px; margin-top: 40px; }
.foot-grid { display: grid; grid-template-columns: 1.6fr 1fr 1fr 1fr; gap: 32px; }
.foot-grid h4 { font-size: .85rem; text-transform: uppercase; letter-spacing: .06em; color: var(--muted); margin: 0 0 12px; }
.foot-grid ul { list-style: none; margin: 0; padding: 0; display: grid; gap: 8px; }
.foot-grid a { color: var(--ink-2); font-size: .93rem; }
.disclaimer { margin-top: 40px; padding-top: 24px; border-top: 1px solid var(--line); font-size: .8rem; color: var(--muted); }
.disclaimer p { color: var(--muted); }
@media (max-width: 800px) { .foot-grid { grid-template-columns: 1fr 1fr; } }

/* Modal */
.modal { position: fixed; inset: 0; z-index: 200; display: none; align-items: center; justify-content: center; padding: 16px; background: rgba(5, 10, 20, .55); }
.modal[hidden] { display: none !important; }
.modal.open { display: flex; }
.modal-box { background: var(--surface); border-radius: 20px; width: 100%; max-width: 520px; max-height: 92vh; overflow: auto; padding: 28px; position: relative; box-shadow: 0 20px 60px rgba(0,0,0,.3); }
.modal-close { position: absolute; top: 14px; right: 14px; background: var(--surface-2); border: none; width: 34px; height: 34px; border-radius: 50%; cursor: pointer; color: var(--ink); font-size: 1.1rem; }
.progress { display: flex; gap: 6px; margin: 12px 0 20px; }
.progress span { flex: 1; height: 4px; border-radius: 4px; background: var(--surface-2); }
.progress span.on { background: var(--brand); }
.field { display: grid; gap: 6px; margin-bottom: 14px; }
.field label { font-weight: 600; font-size: .9rem; }
.field input, .field select, .field textarea { font: inherit; padding: 11px 12px; border-radius: 10px; border: 1px solid var(--line); background: var(--bg); color: var(--ink); width: 100%; }
.field input:focus, .field select:focus, .field textarea:focus { outline: 2px solid var(--brand); outline-offset: 1px; border-color: transparent; }
.warn { font-size: .82rem; background: var(--warn-bg); color: var(--warn-ink); border-radius: 10px; padding: 10px 12px; margin-bottom: 16px; }
.form-step { display: none; }
.form-step.active { display: block; }
.form-nav { display: flex; justify-content: space-between; gap: 12px; margin-top: 8px; }
.success { text-align: center; padding: 16px 0; }
.success .big { font-size: 2.5rem; }

/* Additions */
.view[hidden] { display: none !important; }
.ticket { font-family: ui-monospace, "SF Mono", Menlo, monospace; font-size: .85rem; background: var(--surface-2); border-radius: 12px; padding: 16px; display: grid; gap: 6px; font-variant-numeric: tabular-nums; }
.ticket div { display: flex; justify-content: space-between; gap: 12px; }
.ticket span:first-child { color: var(--muted); }
.ticket strong { color: var(--ink); }
.layout-side > *, .grid > *, .hero-grid > * { min-width: 0; }
.back { display: inline-block; margin-bottom: 12px; font-weight: 600; }
.toc { display: grid; gap: 6px; font-size: .92rem; }
.toc a { color: var(--ink-2); }
.theme-btn { background: none; border: 1px solid var(--line); border-radius: 8px; width: 38px; height: 38px; cursor: pointer; color: var(--ink); font-size: 1rem; }
:focus-visible { outline: 2px solid var(--brand); outline-offset: 2px; }
@media (prefers-reduced-motion: reduce) { * { transition: none !important; scroll-behavior: auto !important; } }

/* Placeholder business details: replace before launch */
.ph { background: var(--warn-bg); color: var(--warn-ink); border-radius: 4px; padding: 0 4px; }

/* Cookie banner */
.cookie { position: fixed; left: 0; right: 0; bottom: 0; z-index: 150; background: var(--surface); border-top: 1px solid var(--line); box-shadow: 0 -8px 24px rgba(15, 27, 45, .08); padding-block: 16px calc(16px + env(safe-area-inset-bottom, 0px)); }
.cookie[hidden] { display: none !important; }
.cookie-inner { display: flex; gap: 16px; align-items: center; justify-content: space-between; flex-wrap: wrap; }
.cookie-inner p { margin: 0; font-size: .9rem; flex: 1 1 420px; min-width: 0; }
.cookie-actions { display: flex; gap: 8px; flex-wrap: wrap; }

/* Educational components */
.grid-2 { grid-template-columns: repeat(2, 1fr); }
@media (max-width: 700px) { .grid-2 { grid-template-columns: 1fr; } }
.lead { font-size: 1.12rem; }
.takeaways { background: var(--brand-soft); border-radius: var(--radius); padding: 4px 24px 12px; margin: 32px 0; }
.takeaways h2 { margin-top: 20px !important; font-size: 1.2rem !important; }
.quiz { display: grid; gap: 16px; margin-bottom: 24px; }
.q { border: 1px solid var(--line); border-radius: 12px; padding: 16px 20px; margin: 0; background: var(--surface); }
.q legend { font-weight: 600; padding: 0 6px; margin-left: -6px; }
.q label { display: flex; gap: 10px; align-items: center; padding: 6px 0; cursor: pointer; color: var(--ink-2); }
.q input { accent-color: var(--brand); }
.q-result { margin: 6px 0 0; font-weight: 600; font-size: .92rem; min-height: 1.2em; }
.q.is-right { border-color: var(--brand); }
.q.is-right .q-result { color: var(--brand); }
.q.is-wrong .q-result { color: var(--warn-ink); }
.pager { display: flex; justify-content: space-between; gap: 12px; flex-wrap: wrap; margin-top: 32px; }
.toc a[aria-current="page"] { color: var(--brand); font-weight: 600; }
.side .more { display: block; }
.glossary { display: grid; grid-template-columns: repeat(2, 1fr); gap: 0 32px; margin: 24px 0 0; }
.term { padding: 14px 0; border-bottom: 1px solid var(--line); }
.term[hidden] { display: none; }
.term dt { font-weight: 700; color: var(--ink); }
.term dd { margin: 4px 0 0; color: var(--ink-2); }
@media (max-width: 700px) { .glossary { grid-template-columns: 1fr; } }
.calc { display: grid; grid-template-columns: repeat(2, 1fr); gap: 0 16px; }
@media (max-width: 500px) { .calc { grid-template-columns: 1fr; } }
.calc-results { display: grid; grid-template-columns: repeat(3, 1fr); gap: 12px; margin: 12px 0 16px; }
.calc-results div { background: var(--surface); border: 1px solid var(--line); border-radius: 12px; padding: 14px 16px; }
.calc-results span { display: block; font-size: .82rem; color: var(--muted); }
.calc-results strong { font-family: var(--font-display); font-size: 1.4rem; font-variant-numeric: tabular-nums; }
@media (max-width: 600px) { .calc-results { grid-template-columns: 1fr; } }
.bar { display: flex; height: 14px; border-radius: 999px; overflow: hidden; background: var(--surface-2); }
.bar span { display: block; height: 100%; transition: width .3s; }
#bar-contrib, .key-a { background: var(--ink-2); }
#bar-growth, .key-b { background: var(--brand); }
.key { display: inline-block; width: 10px; height: 10px; border-radius: 3px; vertical-align: middle; margin: 0 4px 0 8px; }
td, th { font-variant-numeric: tabular-nums; }
