/* Steady Ledger design tokens, shared by the guide, the printable pages and the website.
   Visual idea: a well-kept paper ledger. Warm paper, navy ink, and three steady colours
   that always mean the same thing: insured (green, circle), Treasury (blue, square),
   can go up or down (amber-brown, triangle). Colour is never the only signal. */

@font-face { font-family: 'SL Serif'; src: url('fonts/SerifDisplay-Semibold.woff2') format('woff2'); font-weight: 600; font-style: normal; font-display: swap; }
@font-face { font-family: 'SL Serif'; src: url('fonts/SerifDisplay-Regular.woff2') format('woff2'); font-weight: 400; font-style: normal; font-display: swap; }
@font-face { font-family: 'SL Serif'; src: url('fonts/SerifDisplay-Italic.woff2') format('woff2'); font-weight: 400; font-style: italic; font-display: swap; }
@font-face { font-family: 'SL Serif Text'; src: url('fonts/SerifText-Semibold.woff2') format('woff2'); font-weight: 600; font-style: normal; font-display: swap; }
@font-face { font-family: 'SL Sans'; src: url('fonts/Sans-Regular.woff2') format('woff2'); font-weight: 400; font-style: normal; font-display: swap; }
@font-face { font-family: 'SL Sans'; src: url('fonts/Sans-Medium.woff2') format('woff2'); font-weight: 500; font-style: normal; font-display: swap; }
@font-face { font-family: 'SL Sans'; src: url('fonts/Sans-Bold.woff2') format('woff2'); font-weight: 700; font-style: normal; font-display: swap; }
@font-face { font-family: 'SL Sans'; src: url('fonts/Sans-Italic.woff2') format('woff2'); font-weight: 400; font-style: italic; font-display: swap; }

:root {
  --ink: #1f2a44;
  --ink-2: #3b4a6b;
  --muted: #4a5568;
  --paper: #f7f3ea;
  --paper-2: #efe9dc;
  --card: #ffffff;
  --rule: #d8d2c4;
  --rule-strong: #b9b1a0;

  --insured: #1e5a3e;
  --insured-tint: #ddeee4;
  --treasury: #1f4e8c;
  --treasury-tint: #dce7f5;
  --market: #8a4b0f;
  --market-tint: #f8e6cf;
  --check: #444444;
  --check-tint: #e6e6e6;

  --warn: #7a1c1c;
  --warn-tint: #f8e3e3;
  --highlight: #fbe3a6;
  --input: #fff4cc;

  --serif: 'SL Serif', Georgia, 'Times New Roman', serif;
  --serif-text: 'SL Serif Text', 'SL Serif', Georgia, serif;
  --sans: 'SL Sans', 'Atkinson Hyperlegible Next', Verdana, system-ui, sans-serif;
}

.badge { display: inline-flex; align-items: center; gap: 0.35em; font-family: var(--sans); font-weight: 700; line-height: 1.2; }
.badge svg { width: 0.85em; height: 0.85em; flex: none; }
.badge.g-insured { color: var(--insured); } .badge.g-insured svg { fill: var(--insured); }
.badge.g-treasury { color: var(--treasury); } .badge.g-treasury svg { fill: var(--treasury); }
.badge.g-market { color: var(--market); } .badge.g-market svg { fill: var(--market); }
.badge.g-check { color: var(--check); } .badge.g-check svg { fill: var(--check); }
.tnum { font-variant-numeric: tabular-nums; }

/* Steady Ledger website. Tokens come from src/design/tokens.css. */
*, *::before, *::after { box-sizing: border-box; }
[hidden] { display: none !important; }
html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; }
@media (prefers-reduced-motion: reduce) { html { scroll-behavior: auto; } * { transition: none !important; } }
body { margin: 0; background: #fff; color: var(--ink); font-family: var(--sans); font-size: 1.1875rem; line-height: 1.6; font-variant-numeric: tabular-nums; }
img, svg { max-width: 100%; height: auto; }
a { color: var(--treasury); text-underline-offset: 0.18em; }
a:hover { color: var(--ink); }
:focus-visible { outline: 3px solid var(--treasury); outline-offset: 3px; border-radius: 4px; }
.skip { position: absolute; left: -9999px; top: 0; background: var(--ink); color: #fff; padding: 12px 18px; z-index: 100; }
.skip:focus { left: 12px; top: 12px; }
.wrap { width: min(1140px, 100% - 40px); margin-inline: auto; }
.measure { max-width: 42rem; }
h1, h2, h3 { font-family: var(--serif); font-weight: 600; line-height: 1.12; letter-spacing: -0.01em; margin: 0 0 0.5em; }
h1 { font-size: clamp(2.3rem, 5.2vw, 3.7rem); }
h2 { font-size: clamp(1.85rem, 3.6vw, 2.6rem); }
h3 { font-size: 1.45rem; font-family: var(--serif-text); }
p { margin: 0 0 1em; }
.eyebrow { font-weight: 700; letter-spacing: 0.1em; text-transform: uppercase; font-size: 0.85rem; color: var(--ink-2); margin-bottom: 0.9rem; }
.lead { font-size: 1.32rem; color: var(--ink-2); }
.small { font-size: 0.95rem; }
.muted { color: var(--muted); }
section { padding: 88px 0; }
section.paper { background: var(--paper); }
section.tight { padding: 56px 0; }
.center { text-align: center; }
.center .measure, .measure.center { margin-inline: auto; }

/* Header */
.site-head { position: sticky; top: 0; z-index: 20; background: rgba(255,255,255,0.97); border-bottom: 1px solid var(--rule); }
.site-head .wrap { display: flex; align-items: center; gap: 24px; min-height: 72px; }
.brand { display: inline-flex; align-items: center; gap: 10px; font-family: var(--serif); font-weight: 600; font-size: 1.4rem; color: var(--ink); text-decoration: none; }
.brand svg { width: 34px; height: 34px; }
.nav { display: flex; gap: 22px; margin-left: auto; }
.nav a { color: var(--ink); text-decoration: none; font-weight: 500; font-size: 1.02rem; padding: 8px 2px; }
.nav a:hover { text-decoration: underline; }
.head-cta { margin-left: 8px; }
@media (max-width: 900px) { .nav { display: none; } .head-cta { margin-left: auto; } }
@media (max-width: 480px) { .brand span { font-size: 1.2rem; } .site-head .btn { padding: 0 14px; font-size: 0.98rem; min-height: 46px; } }

/* Buttons */
.btn { display: inline-flex; align-items: center; justify-content: center; gap: 10px; min-height: 56px; padding: 0 26px; border-radius: 10px; font-family: var(--sans); font-size: 1.15rem; font-weight: 700; text-decoration: none; border: 2px solid transparent; cursor: pointer; line-height: 1.2; text-align: center; }
.btn-primary { background: var(--insured); color: #fff; }
.btn-primary:hover { background: #16452f; color: #fff; }
.btn-secondary { background: #fff; color: var(--ink); border-color: var(--ink); }
.btn-secondary:hover { background: var(--paper-2); color: var(--ink); }
.btn[aria-disabled="true"] { background: #8c949f; color: #fff; cursor: not-allowed; }
.btn-row { display: flex; flex-wrap: wrap; gap: 14px; align-items: center; margin: 28px 0 18px; }
.trust { list-style: none; padding: 0; margin: 0; display: flex; flex-wrap: wrap; gap: 8px 22px; font-size: 1rem; color: var(--ink-2); }
.trust li { display: inline-flex; align-items: center; gap: 8px; }
.trust li::before { content: ''; width: 9px; height: 9px; border-radius: 50%; background: var(--insured); flex: none; }

/* Preview banner (shown only while checkout is not connected) */
.preview-banner { background: var(--highlight); color: #3d2a00; text-align: center; padding: 10px 16px; font-size: 0.98rem; font-weight: 500; }

/* Hero */
.hero { background: var(--paper); padding: 64px 0 80px; overflow: hidden; }
.hero-grid { display: grid; grid-template-columns: 1.05fr 1fr; gap: 56px; align-items: center; }
.hero h1 { margin-bottom: 0.35em; }
.hero-visual { position: relative; padding-top: 150px; }
.frame { background: #fff; border: 1px solid var(--rule-strong); border-radius: 12px; box-shadow: 0 18px 40px -18px rgba(31,42,68,0.35); overflow: hidden; }
.frame-bar { display: flex; align-items: center; gap: 7px; padding: 9px 12px; background: #eceef2; border-bottom: 1px solid var(--rule); font-size: 0.78rem; color: var(--muted); }
.frame-bar i { width: 10px; height: 10px; border-radius: 50%; background: #c9ced6; display: inline-block; }
.frame-bar span { margin-left: 8px; }
.frame img { display: block; width: 100%; }
.hero-visual .sheet { position: relative; z-index: 2; width: 94%; }
.hero-visual picture.cover-wrap { position: absolute; z-index: 1; width: 40%; right: 0; top: 0; }
.hero-visual .guide-cover { display: block; width: 100%; transform: rotate(3deg); border-radius: 6px; box-shadow: 0 14px 30px -12px rgba(31,42,68,0.45); }
.hero-visual .label { position: relative; z-index: 3; margin: 14px 0 0 0; display: inline-block; background: var(--ink); color: #fff; padding: 10px 16px; border-radius: 10px; font-size: 0.95rem; font-weight: 500; max-width: 320px; }
@media (max-width: 960px) { .hero-grid { grid-template-columns: 1fr; } .hero-visual { margin-top: 8px; padding-top: 22%; } .hero-visual picture.cover-wrap { width: 34%; } }

/* Problem */
.thoughts { display: grid; grid-template-columns: repeat(2, 1fr); gap: 18px; margin-top: 32px; }
.thought { background: #fff; border: 1px solid var(--rule); border-radius: 12px; padding: 22px 24px; font-size: 1.18rem; position: relative; }
.thought::before { content: '“'; font-family: var(--serif); font-size: 3rem; line-height: 1; color: var(--rule-strong); position: absolute; top: 8px; left: 14px; }
.thought p { margin: 0 0 0 26px; }
.resolve { margin-top: 30px; font-size: 1.3rem; font-family: var(--serif); }
@media (max-width: 700px) { .thoughts { grid-template-columns: 1fr; } }

/* Three questions */
.q-block { display: grid; grid-template-columns: 0.9fr 1.1fr; gap: 48px; align-items: center; padding: 48px 0; border-top: 1px solid var(--rule); }
.q-block:first-of-type { border-top: 0; }
.q-block.flip .q-text { order: 2; }
.q-num { display: inline-flex; align-items: center; justify-content: center; width: 44px; height: 44px; border-radius: 50%; color: #fff; font-family: var(--serif); font-weight: 600; font-size: 1.4rem; margin-bottom: 14px; }
.q-1 .q-num { background: var(--insured); } .q-2 .q-num { background: var(--treasury); } .q-3 .q-num { background: var(--market); }
.q-text ul { padding-left: 1.2em; margin: 0 0 1em; }
.q-text li { margin-bottom: 0.45em; }
.q-shots { display: grid; gap: 16px; }
.q-shots figcaption { font-size: 0.92rem; color: var(--muted); margin-top: 8px; }
@media (max-width: 900px) { .q-block { grid-template-columns: 1fr; gap: 24px; } .q-block.flip .q-text { order: 0; } }

/* Safety label sorter */
.sorter { background: #fff; border: 2px solid var(--ink); border-radius: 14px; padding: 22px 24px; margin-top: 22px; }
.sorter label { font-weight: 700; display: block; margin-bottom: 8px; }
.sorter select { width: 100%; font: inherit; font-size: 1.1rem; min-height: 52px; padding: 8px 12px; border: 2px solid var(--ink-2); border-radius: 8px; background: #fff; color: var(--ink); }
.sorter-result { margin-top: 16px; border-radius: 10px; padding: 14px 16px; background: var(--paper); min-height: 72px; }
.sorter-result.g-insured { background: var(--insured-tint); } .sorter-result.g-treasury { background: var(--treasury-tint); }
.sorter-result.g-market { background: var(--market-tint); } .sorter-result.g-check { background: var(--check-tint); }
.sorter-result p { margin: 0 0 0.4em; }
.sorter-label { font-size: 1.2rem; }
.sorter-hint { color: var(--muted); }
.icon-defs { display: none; }

/* Growth Explorer */
.explorer { display: grid; grid-template-columns: 340px 1fr; gap: 32px; background: #fff; border: 1px solid var(--rule-strong); border-radius: 16px; padding: 28px; box-shadow: 0 12px 30px -20px rgba(31,42,68,0.35); margin-top: 28px; }
.explorer form { display: grid; gap: 16px; align-content: start; }
.field label { display: block; font-weight: 700; margin-bottom: 6px; font-size: 1.02rem; }
.field .hint { display: block; font-weight: 400; color: var(--muted); font-size: 0.92rem; }
.input-wrap { display: flex; align-items: stretch; border: 2px solid var(--ink-2); border-radius: 8px; background: #fff; overflow: hidden; }
.input-wrap:focus-within { outline: 3px solid var(--treasury); outline-offset: 2px; }
.input-wrap .affix { display: flex; align-items: center; padding: 0 12px; background: var(--paper); color: var(--ink-2); font-weight: 700; }
.input-wrap input, .field select { flex: 1; min-width: 0; font: inherit; font-size: 1.15rem; padding: 10px 12px; min-height: 50px; border: 0; color: var(--ink); background: #fff; }
.input-wrap input:focus, .field select:focus { outline: none; }
.field select { width: 100%; border: 2px solid var(--ink-2); border-radius: 8px; }
.field select:focus-visible { outline: 3px solid var(--treasury); outline-offset: 2px; }
.field input[aria-invalid="true"] { background: var(--warn-tint); }
.error { color: var(--warn); font-weight: 700; font-size: 0.95rem; margin: 6px 0 0; }
.rate-a .affix:first-child { color: var(--treasury); } .rate-b .affix:first-child { color: #8a4b0f; }
.explorer details summary { cursor: pointer; font-weight: 700; color: var(--treasury); padding: 6px 0; }
.results { display: grid; gap: 18px; align-content: start; transition: opacity .2s; }
.results.stale { opacity: 0.45; }
.result-cards { display: grid; grid-template-columns: repeat(3, 1fr); gap: 12px; }
.rc { border-radius: 10px; padding: 12px 14px; background: var(--paper); }
.rc .k { font-size: 0.9rem; color: var(--ink-2); margin: 0 0 2px; }
.rc .v { font-family: var(--serif); font-weight: 600; font-size: 1.7rem; margin: 0; line-height: 1.15; }
.rc.a { background: var(--treasury-tint); } .rc.a .v { color: var(--treasury); }
.rc.b { background: var(--market-tint); } .rc.b .v { color: #7a420d; }
.rc.d { background: #fff; border: 2px solid var(--ink); }
.facts { list-style: none; padding: 0; margin: 0; display: grid; grid-template-columns: 1fr 1fr; gap: 4px 20px; font-size: 1rem; }
.facts li { display: flex; justify-content: space-between; border-bottom: 1px dotted var(--rule-strong); padding: 4px 0; gap: 12px; }
.facts strong { white-space: nowrap; }
.legend { display: flex; flex-wrap: wrap; gap: 16px; font-size: 0.95rem; margin: 0; padding: 0; list-style: none; }
.legend li { display: inline-flex; align-items: center; gap: 8px; }
.legend i { width: 26px; height: 0; border-top: 4px solid; display: inline-block; }
.legend .la i { border-color: #1f4e8c; } .legend .lb i { border-color: #b26a1e; } .legend .lp i { border-color: #6b7280; border-top-style: dashed; border-top-width: 3px; }
.growth-svg { width: 100%; height: auto; display: block; }
.growth-svg .grid { stroke: #e3ded2; stroke-width: 1; }
.growth-svg .axis { stroke: #b9b1a0; }
.growth-svg .tick { font: 13px var(--sans); fill: #4a5568; }
.growth-svg .axis-label { font: 13px var(--sans); fill: #4a5568; }
.assumptions { font-size: 0.95rem; color: var(--ink-2); background: var(--paper); border-radius: 10px; padding: 12px 16px; margin: 0; }
.year-table { max-height: 340px; overflow: auto; border: 1px solid var(--rule); border-radius: 8px; margin-top: 10px; }
.year-table table { width: 100%; border-collapse: collapse; font-size: 0.98rem; }
.year-table th, .year-table td { padding: 6px 10px; text-align: right; border-bottom: 1px solid var(--rule); }
.year-table thead th { position: sticky; top: 0; background: var(--ink); color: #fff; }
.year-table tbody th { text-align: center; }
.noscript { background: var(--highlight); padding: 10px 14px; border-radius: 8px; }
@media (max-width: 960px) { .explorer { grid-template-columns: 1fr; padding: 20px; } }
@media (max-width: 560px) { .result-cards { grid-template-columns: 1fr; } .facts { grid-template-columns: 1fr; } .rc .v { font-size: 1.5rem; } }

/* Guide preview */
.pages { display: grid; grid-template-columns: repeat(4, 1fr); gap: 18px; margin-top: 30px; }
.pages figure { margin: 0; }
.pages img { border: 1px solid var(--rule-strong); border-radius: 4px; box-shadow: 0 8px 18px -12px rgba(31,42,68,0.4); background: #fff; }
.pages figcaption { font-size: 0.92rem; color: var(--muted); margin-top: 8px; }
.chapters { columns: 2; column-gap: 40px; padding-left: 1.2em; margin-top: 26px; }
.chapters li { margin-bottom: 0.4em; break-inside: avoid; }
.sources-strip { display: flex; flex-wrap: wrap; gap: 10px; margin-top: 18px; padding: 0; list-style: none; }
.sources-strip li { background: #fff; border: 1px solid var(--rule); border-radius: 999px; padding: 4px 14px; font-size: 0.95rem; font-weight: 500; }
@media (max-width: 900px) { .pages { grid-template-columns: repeat(2, 1fr); } .chapters { columns: 1; } }

/* What you get */
.files { display: grid; grid-template-columns: repeat(2, 1fr); gap: 18px; margin-top: 30px; }
.file { background: #fff; border: 1px solid var(--rule); border-radius: 12px; padding: 22px 24px; display: grid; grid-template-columns: 52px 1fr; gap: 16px; }
.file .ext { width: 52px; height: 62px; border-radius: 6px; display: flex; align-items: flex-end; justify-content: center; padding-bottom: 8px; color: #fff; font-weight: 700; font-size: 0.82rem; letter-spacing: 0.05em; }
.file .ext.xlsx { background: var(--insured); } .file .ext.pdf { background: var(--warn); }
.file h3 { font-size: 1.2rem; margin-bottom: 0.3em; }
.file p { margin: 0; color: var(--ink-2); font-size: 1.02rem; }
@media (max-width: 760px) { .files { grid-template-columns: 1fr; } }

/* For / not for, How it works */
.two-col { display: grid; grid-template-columns: 1fr 1fr; gap: 28px; margin-top: 28px; }
.panel { border-radius: 14px; padding: 26px 28px; background: #fff; border: 1px solid var(--rule); }
.panel.yes { border-top: 6px solid var(--insured); } .panel.no { border-top: 6px solid var(--market); }
.panel ul { padding-left: 1.2em; margin: 0; } .panel li { margin-bottom: 0.55em; }
.steps3 { display: grid; grid-template-columns: repeat(3, 1fr); gap: 22px; margin-top: 30px; counter-reset: st; padding: 0; list-style: none; }
.steps3 li { counter-increment: st; background: #fff; border-radius: 14px; padding: 24px; border: 1px solid var(--rule); }
.steps3 li::before { content: counter(st); display: flex; align-items: center; justify-content: center; width: 42px; height: 42px; border-radius: 50%; background: var(--ink); color: #fff; font-family: var(--serif); font-size: 1.3rem; font-weight: 600; margin-bottom: 12px; }
.steps3 h3 { font-size: 1.25rem; }
.steps3 p { margin: 0; font-size: 1.05rem; }
@media (max-width: 860px) { .two-col, .steps3 { grid-template-columns: 1fr; } }

/* Price */
.price-card { max-width: 860px; margin: 30px auto 0; background: #fff; border: 2px solid var(--ink); border-radius: 18px; padding: 36px 40px; display: grid; grid-template-columns: 0.9fr 1.1fr; gap: 40px; align-items: center; }
.price-card .price-side { text-align: center; border-right: 1px solid var(--rule); padding-right: 36px; }
@media (max-width: 760px) { .price-card .price-side { border-right: 0; padding-right: 0; } }
.price { font-family: var(--serif); font-weight: 600; font-size: 3.4rem; line-height: 1; margin: 0; }
.price small { font-family: var(--sans); font-size: 1rem; font-weight: 500; color: var(--ink-2); display: block; margin-top: 6px; }
.price-card ul { padding-left: 1.2em; margin: 0 0 1em; }
.price-card li { margin-bottom: 0.4em; }
.policy { display: grid; grid-template-columns: repeat(3, 1fr); gap: 18px; max-width: 980px; margin: 28px auto 0; }
.policy > div { background: #fff; border-radius: 12px; padding: 18px 20px; border: 1px solid var(--rule); font-size: 1rem; }
.policy h3 { font-size: 1.12rem; margin-bottom: 0.3em; }
.policy p { margin: 0; }
@media (max-width: 760px) { .price-card { grid-template-columns: 1fr; padding: 26px 22px; } .policy { grid-template-columns: 1fr; } }

/* FAQ */
.faq { max-width: 52rem; margin: 26px auto 0; }
.faq details { border-bottom: 1px solid var(--rule-strong); padding: 6px 0; }
.faq summary { cursor: pointer; font-weight: 700; font-size: 1.15rem; padding: 14px 40px 14px 0; list-style: none; position: relative; }
.faq summary::-webkit-details-marker { display: none; }
.faq summary::after { content: '+'; position: absolute; right: 6px; top: 8px; font-size: 1.7rem; font-weight: 400; color: var(--ink-2); }
.faq details[open] summary::after { content: '−'; }
.faq details p { margin: 0 0 1em; }

/* Final CTA + footer */
.final { background: var(--ink); color: #fff; text-align: center; }
.final h2 { color: #fff; }
.final .lead { color: #dfe4ee; }
.final .btn-secondary { background: transparent; color: #fff; border-color: #fff; }
.final .btn-secondary:hover { background: rgba(255,255,255,0.1); color: #fff; }
.final :focus-visible { outline-color: #fff; }
.final .btn-row { justify-content: center; }
.site-foot { background: #161e31; color: #c9d0dc; padding: 44px 0 56px; font-size: 0.95rem; }
.site-foot a { color: #fff; }
.site-foot .cols { display: grid; grid-template-columns: 1.4fr 1fr; gap: 36px; }
.site-foot .brand { color: #fff; margin-bottom: 12px; }
.site-foot ul { list-style: none; padding: 0; margin: 0; display: grid; gap: 8px; }
.site-foot :focus-visible { outline-color: #fff; }
.placeholder { background: var(--highlight); color: #3d2a00; padding: 0 4px; border-radius: 3px; }
@media (max-width: 760px) { .site-foot .cols { grid-template-columns: 1fr; } section { padding: 64px 0; } }

/* Simple content pages (help, privacy, terms) */
.doc { padding: 56px 0 80px; }
.doc h1 { font-size: clamp(2rem, 4vw, 2.8rem); }
.doc h2 { font-size: 1.6rem; margin-top: 1.6em; }
.doc ol, .doc ul { padding-left: 1.3em; } .doc li { margin-bottom: 0.5em; }

/* Keep anchored sections clear of the sticky header */
section[id], #main { scroll-margin-top: 88px; }
