/* ============================================================================
   Quantum Capital — site stylesheet
   Direction: Swiss financial print (light). Paper surface, carbon ink, one red accent,
   visible grid lines, hairline rules, near-square corners, crisp ink-tinted shadows.
   One accent, one neutral family, one radius scale, one shadow scale on every page.
   ========================================================================== */

@font-face {
  font-family: "Archivo";
  src: url("../fonts/archivo-latin-wght-normal.woff2") format("woff2");
  font-weight: 100 900;
  font-style: normal;
  font-display: swap;
}
@font-face {
  font-family: "IBM Plex Mono";
  src: url("../fonts/ibm-plex-mono-latin-400-normal.woff2") format("woff2");
  font-weight: 400;
  font-style: normal;
  font-display: swap;
}

/* ---------------------------------------------------------------- tokens -- */
:root {
  --paper: #f4f4f0;
  --paper-2: #eae8e3;
  --sheet: #fbfbf8;
  --white: #ffffff;
  --ink: #111111;
  --ink-2: #22221f;
  --ink-muted: #5a5a55;
  --ink-3: #67665f;
  --rule: #111111;
  --rule-faint: rgba(17, 17, 17, 0.075);
  --rule-paper: rgba(17, 17, 17, 0.05);
  --border: #d3d1c9;
  --border-strong: #8a8983;
  --accent: #e61919;
  --accent-hover: #c91515;
  --accent-ink: #b31212;
  --accent-tint: #f7e6e4;
  --accent-tint-2: #fcf2f1;
  --yes: #1d6f3c;
  --chip-light: #ffffff;
  --chip-dark: #0f172a;

  --font-sans: "Archivo", "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
  --font-mono: "IBM Plex Mono", ui-monospace, "Cascadia Mono", Consolas, monospace;

  --r-1: 2px;
  --r-2: 4px;
  --r-3: 6px;
  --r-chip: 10px;

  --shadow-sm: 0 0 0 1px rgba(17, 17, 17, 0.04), 0 1px 0 rgba(17, 17, 17, 0.07);
  --shadow-md: 0 0 0 1px rgba(17, 17, 17, 0.05), 0 1px 0 rgba(17, 17, 17, 0.05), 0 10px 20px -14px rgba(17, 17, 17, 0.32);
  --shadow-lg: 0 0 0 1px rgba(17, 17, 17, 0.06), 0 2px 0 rgba(17, 17, 17, 0.04), 0 30px 50px -30px rgba(17, 17, 17, 0.4);

  --header-h: 64px;
  --gutter: clamp(16px, 4vw, 40px);
  --section-y: clamp(48px, 7vw, 88px);
  --ease: cubic-bezier(0.2, 0.6, 0.2, 1);
}

/* ------------------------------------------------------------------ base -- */
*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; text-size-adjust: 100%; scroll-padding-top: calc(var(--header-h) + 16px); }
body {
  margin: 0;
  background: var(--paper);
  color: var(--ink);
  font-family: var(--font-sans);
  font-size: 1.0625rem;
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
  overflow-x: clip;
}
img, svg, iframe, video, canvas { max-width: 100%; }
img { height: auto; display: block; }
[hidden] { display: none !important; }
h1, h2, h3, h4 { margin: 0; font-weight: 800; line-height: 1.04; letter-spacing: -0.03em; text-wrap: balance; }
h1 { font-size: clamp(2.25rem, 4.6vw, 4.125rem); line-height: 0.96; }
h2 { font-size: clamp(1.75rem, 3.1vw, 2.875rem); }
h3 { font-size: 1.2rem; line-height: 1.2; letter-spacing: -0.02em; font-weight: 700; }
h4 { font-size: 1.0625rem; line-height: 1.3; letter-spacing: -0.01em; }
p, ul, ol, dl, figure { margin: 0 0 1em; }
p:last-child, ul:last-child, ol:last-child, dl:last-child, figure:last-child { margin-bottom: 0; }
a { color: inherit; text-decoration-color: var(--accent); text-decoration-thickness: 2px; text-underline-offset: 0.16em; transition: color 0.16s var(--ease), background-color 0.16s var(--ease); }
a:hover { color: var(--accent-ink); }
:focus-visible { outline: 2px solid var(--accent); outline-offset: 3px; border-radius: var(--r-1); }
::selection { background: var(--ink); color: var(--paper); }
strong, b { font-weight: 700; }
hr { border: 0; border-top: 1px solid var(--rule); margin: 0; }
button { font-family: inherit; }
svg { display: inline-block; vertical-align: middle; }

.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; }
.skip-link {
  position: absolute; top: -200px; left: 16px; z-index: 300;
  padding: 12px 16px; background: var(--ink); color: var(--paper);
  font-weight: 600; text-decoration: none; border-radius: var(--r-1);
}
.skip-link:focus { top: 12px; color: var(--paper); }

/* -------------------------------------------------------------- utilities -- */
.container { width: 100%; max-width: 1200px; margin-inline: auto; padding-inline: var(--gutter); }
.section { padding-block: var(--section-y); }
.section--tight { padding-block: clamp(32px, 4vw, 56px); }
.mono { font-family: var(--font-mono); font-size: 0.75rem; font-weight: 400; letter-spacing: 0.08em; text-transform: uppercase; }
.lead { font-size: clamp(1.125rem, 1.5vw, 1.3125rem); line-height: 1.45; color: var(--ink-2); }
.muted { color: var(--ink-muted); }
.small { font-size: 0.875rem; }
.stack > * + * { margin-top: 0.75em; }
.stack--cards > .card { padding: 28px; }
.stack--cards > .card + .card { margin-top: 20px; }
.stack--cards > .card p { max-width: 70ch; }
.stack--cards > .card .btn { align-self: flex-start; margin-top: 6px; }
.conditions__title { margin: 36px 0 14px; padding-top: 16px; border-top: 2px solid var(--rule); font-size: 1.375rem; }
.nowrap { white-space: nowrap; }
.mt { margin-top: 24px; }
.mb-small { margin-bottom: 10px; }
.nf-links { margin: 0; padding: 0; list-style: none; }
.nf-links li { margin: 0; }
.nf-links a { display: inline-flex; align-items: center; min-height: 28px; color: var(--ink-muted); text-decoration: none; transition: color 0.14s var(--ease); }
.nf-links a:hover { color: var(--ink); text-decoration: underline; }
.facts a svg { margin-left: 6px; }

.band--grey { background: var(--paper-2); border-block: 1px solid var(--border); }
.band--sheet { background: var(--sheet); border-block: 1px solid var(--border); }
.band--grid {
  background-color: var(--paper);
  background-image: linear-gradient(to right, var(--rule-faint) 1px, transparent 1px), linear-gradient(to bottom, rgba(17, 17, 17, 0.025), transparent 40%);
  background-size: 96px 100%, 100% 100%;
}
.band--dots {
  background-color: var(--paper-2);
  background-image: radial-gradient(rgba(17, 17, 17, 0.16) 1px, transparent 1.4px);
  background-size: 18px 18px;
}
.band--tint { background: var(--accent-tint-2); border-block: 1px solid var(--border); border-top-width: 2px; border-top-color: var(--accent); }
.band--noise { position: relative; background-color: var(--sheet); border-block: 1px solid var(--border); }
.band--noise::before {
  content: ""; position: absolute; inset: 0; pointer-events: none; opacity: 0.5; mix-blend-mode: multiply;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='180' height='180'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.85' numOctaves='2' stitchTiles='stitch'/%3E%3CfeColorMatrix values='0 0 0 0 0.07 0 0 0 0 0.07 0 0 0 0 0.07 0 0 0 0.08 0'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)'/%3E%3C/svg%3E");
}
.band--noise > .container { position: relative; }

/* ---------------------------------------------------------------- buttons -- */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  min-height: 48px; padding: 0 22px; border: 1px solid transparent; border-radius: var(--r-1);
  font: 600 0.9375rem/1.1 var(--font-sans); letter-spacing: 0.005em; text-decoration: none;
  white-space: nowrap; cursor: pointer;
  transition: background-color 0.16s var(--ease), color 0.16s var(--ease), transform 0.16s var(--ease), box-shadow 0.16s var(--ease), border-color 0.16s var(--ease);
}
.btn svg { flex: none; }
.btn--primary { background: var(--accent); color: var(--white); box-shadow: var(--shadow-sm); }
.btn--primary:hover, .btn--primary:focus-visible { background: var(--accent-hover); color: var(--white); transform: translateY(-1px); box-shadow: var(--shadow-md); }
.btn--primary:active { transform: translateY(0); box-shadow: var(--shadow-sm); }
.btn--ink { background: var(--ink); color: var(--paper); }
.btn--ink:hover, .btn--ink:focus-visible { background: #0b0b0a; color: var(--paper); transform: translateY(-1px); box-shadow: var(--shadow-md); }
.btn--ghost { background: transparent; color: var(--ink); border-color: var(--rule); }
.btn--ghost:hover, .btn--ghost:focus-visible { background: var(--ink); color: var(--paper); }
.btn--sm { min-height: 40px; padding: 0 16px; font-size: 0.875rem; }
.btn--block { width: 100%; }

/* ------------------------------------------------------------------ logo -- */
.logo { display: inline-flex; align-items: center; gap: 10px; min-width: 190px; color: var(--ink); text-decoration: none; }
.logo:hover { color: var(--ink); }
.logo__mark { flex: none; display: block; }
.logo__word { display: inline-flex; align-items: baseline; gap: 2px; white-space: nowrap; }
.logo__word-main { font-weight: 800; font-size: 1.0625rem; letter-spacing: -0.025em; line-height: 1; }
.logo__word-sub { font-family: var(--font-mono); font-weight: 400; font-size: 0.8125rem; letter-spacing: 0.02em; color: var(--ink-muted); }
.flag { flex: none; display: block; border-radius: 1px; }

/* ---------------------------------------------------------------- header -- */
.site-header {
  position: sticky; top: 0; z-index: 100; height: var(--header-h);
  background: var(--paper); border-bottom: 1px solid var(--rule);
  transition: background-color 0.2s var(--ease), box-shadow 0.2s var(--ease);
}
.site-header.is-scrolled { background: var(--sheet); box-shadow: var(--shadow-lg); }
.site-header__bar { position: relative; display: flex; align-items: center; gap: 28px; height: 100%; }
.site-header__cta { flex: none; }

.site-nav { margin-left: auto; }
.site-nav__list { display: flex; gap: 2px; margin: 0; padding: 0; list-style: none; }
.site-nav__item { position: relative; margin: 0; }
.site-nav__trigger {
  display: inline-flex; align-items: center; gap: 6px; height: 44px; padding: 0 12px;
  border: 0; border-radius: var(--r-1); background: transparent; color: var(--ink);
  font: 500 0.9375rem/1 var(--font-sans); cursor: pointer; transition: background-color 0.16s var(--ease);
}
.site-nav__trigger:hover, .site-nav__trigger[aria-expanded="true"] { background: var(--paper-2); }
.site-nav__chev { transition: transform 0.16s var(--ease); }
.site-nav__item.is-open .site-nav__chev { transform: rotate(180deg); }
.site-nav__sub {
  position: absolute; top: calc(100% - 2px); left: 0; z-index: 5; display: none;
  margin: 0; padding: 8px; list-style: none; min-width: 268px;
  background: var(--sheet); border: 1px solid var(--rule); border-radius: var(--r-3); box-shadow: var(--shadow-md);
}
.site-nav__sub::before {
  content: ""; position: absolute; top: -6px; left: 22px; width: 10px; height: 10px;
  background: var(--sheet); border-left: 1px solid var(--rule); border-top: 1px solid var(--rule); transform: rotate(45deg);
}
.site-nav__item.is-open .site-nav__sub { display: grid; grid-template-columns: 1fr; animation: nav-in 0.16s var(--ease); }
.site-nav__item.is-open .site-nav__sub--wide { grid-template-columns: repeat(2, minmax(248px, 1fr)); min-width: 0; width: max-content; max-width: calc(100vw - 32px); }
.site-nav__item.is-end .site-nav__sub { left: auto; right: 0; }
.site-nav__item.is-end .site-nav__sub::before { left: auto; right: 22px; }
.site-nav__sub a {
  display: flex; align-items: center; min-height: 40px; padding: 8px 12px; border-radius: var(--r-1);
  font-size: 0.9375rem; line-height: 1.3; text-decoration: none; transition: background-color 0.14s var(--ease);
}
.site-nav__sub a:hover, .site-nav__sub a:focus-visible { background: var(--accent-tint); color: var(--ink); }
.site-nav__cta { display: none; }
@keyframes nav-in { from { opacity: 0; transform: translateY(-4px); } to { opacity: 1; transform: none; } }

.nav-toggle {
  display: none; align-items: center; justify-content: center; flex: none;
  width: 44px; height: 44px; margin-left: auto; padding: 0;
  border: 1px solid var(--rule); border-radius: var(--r-1); background: transparent; color: var(--ink); cursor: pointer;
  transition: background-color 0.16s var(--ease), color 0.16s var(--ease);
}
.nav-toggle:hover, .nav-toggle[aria-expanded="true"] { background: var(--ink); color: var(--paper); }
.nav-toggle__icon--close { display: none; }
.nav-toggle[aria-expanded="true"] .nav-toggle__icon--open { display: none; }
.nav-toggle[aria-expanded="true"] .nav-toggle__icon--close { display: block; }

@media (max-width: 1023.98px) {
  .nav-toggle { display: inline-flex; }
  .site-header__cta { display: none; }
  .site-header__bar { gap: 16px; }
  .site-nav {
    display: none; position: absolute; top: 100%; left: 0; right: 0; margin: 0;
    max-height: calc(100vh - var(--header-h)); overflow-y: auto; padding: 16px var(--gutter) 24px;
    background: var(--sheet); border-bottom: 1px solid var(--rule); box-shadow: var(--shadow-lg);
  }
  .site-header.is-open .site-nav { display: block; animation: nav-in 0.18s var(--ease); }
  .site-nav__cta { display: flex; width: 100%; margin-bottom: 12px; }
  .site-nav__list { display: block; }
  .site-nav__item { border-top: 1px solid var(--border); }
  .site-nav__trigger { width: 100%; justify-content: space-between; height: 52px; padding: 0 4px; font-size: 1rem; border-radius: 0; }
  .site-nav__sub, .site-nav__item.is-end .site-nav__sub {
    position: static; display: none; min-width: 0; width: auto; margin: 0; padding: 0 0 12px 12px;
    background: transparent; border: 0; border-left: 2px solid var(--rule); border-radius: 0; box-shadow: none;
  }
  .site-nav__sub::before { display: none; }
  .site-nav__item.is-open .site-nav__sub, .site-nav__item.is-open .site-nav__sub--wide { display: block; }
  .site-nav__sub a { min-height: 44px; padding: 10px 12px; font-size: 1rem; }
}
body.menu-open { overflow: hidden; }

/* ------------------------------------------------------------ breadcrumbs -- */
.breadcrumbs { border-bottom: 1px solid var(--border); background: var(--paper); }
.breadcrumbs__list {
  display: flex; flex-wrap: wrap; gap: 2px 8px; margin: 0; padding: 10px 0; list-style: none;
  font-family: var(--font-mono); font-size: 0.75rem; letter-spacing: 0.05em; text-transform: uppercase; color: var(--ink-3);
}
.breadcrumbs__list li { display: flex; align-items: center; gap: 8px; }
.breadcrumbs__list li + li::before { content: "/"; color: var(--border-strong); }
.breadcrumbs__list a { display: inline-flex; align-items: center; min-height: 24px; color: var(--ink-muted); text-decoration: none; }
.breadcrumbs__list a:hover { color: var(--accent-ink); text-decoration: underline; }
.breadcrumbs__list [aria-current] { display: inline-flex; align-items: center; min-height: 24px; color: var(--ink); }

/* ----------------------------------------------------------------- forms -- */
.form-block {
  background: var(--sheet); border: 1px solid var(--rule); border-radius: var(--r-2);
  box-shadow: var(--shadow-md); padding: 24px;
}
.form-block__title { font-size: 1.25rem; line-height: 1.15; margin-bottom: 4px; }
.form-block__intro { color: var(--ink-muted); font-size: 0.9375rem; margin-bottom: 16px; }
.form-legal { font-size: 0.8125rem; line-height: 1.5; color: var(--ink-muted); margin: 14px 0 0; }
.form-legal a { display: inline; padding: 0; }

:is(.form-block, .calc-modal__content) form { display: grid; gap: 12px; margin: 0; }
:is(.form-block, .calc-modal__content) label { display: block; margin: 0 0 6px; font: 500 0.8125rem/1.3 var(--font-sans); color: var(--ink); }
:is(.form-block, .calc-modal__content) input:not([type="checkbox"]):not([type="radio"]):not([type="hidden"]),
:is(.form-block, .calc-modal__content) select,
:is(.form-block, .calc-modal__content) textarea {
  width: 100%; min-height: 44px; margin: 0; padding: 10px 12px;
  font: 400 1rem/1.3 var(--font-sans); color: var(--ink); background: var(--white);
  border: 1px solid var(--border-strong); border-radius: var(--r-1);
  transition: border-color 0.16s var(--ease), box-shadow 0.16s var(--ease);
}
:is(.form-block, .calc-modal__content) textarea { min-height: 120px; resize: vertical; }
:is(.form-block, .calc-modal__content) input:focus-visible, :is(.form-block, .calc-modal__content) select:focus-visible, :is(.form-block, .calc-modal__content) textarea:focus-visible {
  outline: 2px solid var(--accent); outline-offset: 1px; border-color: var(--ink);
}
:is(.form-block, .calc-modal__content) input[aria-invalid="true"] { border-color: var(--accent); }
:is(.form-block, .calc-modal__content) label:has(> input[aria-invalid="true"]) { color: var(--accent-ink); }
:is(.form-block, .calc-modal__content) :is(div, label) > p { margin: 6px 0 0; font-size: 0.8125rem; line-height: 1.4; color: var(--ink-muted); }
:is(.form-block, .calc-modal__content) label:has(> input[aria-invalid="true"]) > p { color: var(--accent-ink); }
:is(.form-block, .calc-modal__content) form > [role="status"] { margin: 4px 0 0; font-size: 0.9375rem; font-weight: 600; color: var(--ink); }
:is(.form-block, .calc-modal__content) label:has(> input[type="checkbox"]) {
  display: grid; grid-template-columns: 24px 1fr; column-gap: 10px; row-gap: 4px; align-items: start;
  font-size: 0.8125rem; line-height: 1.45; color: var(--ink-muted); cursor: pointer;
}
:is(.form-block, .calc-modal__content) label:has(> input[type="checkbox"]) > input { grid-row: 1; grid-column: 1; }
:is(.form-block, .calc-modal__content) label:has(> input[type="checkbox"]) > span { grid-column: 2; }
:is(.form-block, .calc-modal__content) label:has(> input[type="checkbox"]) > p { grid-column: 2; }
:is(.form-block, .calc-modal__content) input[type="checkbox"], :is(.form-block, .calc-modal__content) input[type="radio"] {
  width: 24px; height: 24px; margin: 0 0 0; accent-color: var(--accent); flex: none;
}
:is(.form-block, .calc-modal__content) input[type="checkbox"]:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; }
:is(.form-block, .calc-modal__content) button[type="submit"],
:is(.form-block, .calc-modal__content) button:not([type]) {
  display: inline-flex; align-items: center; justify-content: center; width: 100%; min-height: 48px; padding: 0 20px;
  margin: 4px 0 0; border: 1px solid transparent; border-radius: var(--r-1);
  background: var(--accent); color: var(--white); font: 600 1rem/1.1 var(--font-sans); white-space: nowrap; cursor: pointer;
  box-shadow: var(--shadow-sm); transition: background-color 0.16s var(--ease), transform 0.16s var(--ease), box-shadow 0.16s var(--ease);
}
:is(.form-block, .calc-modal__content) button[type="submit"]:hover { background: var(--accent-hover); transform: translateY(-1px); box-shadow: var(--shadow-md); }
:is(.form-block, .calc-modal__content) [role="status"] { font-weight: 600; color: var(--ink); }

/* -------------------------------------------------------------- sections -- */
.sec-head {
  position: relative; display: grid; grid-template-columns: repeat(12, minmax(0, 1fr)); column-gap: 24px; row-gap: 10px;
  align-items: end; margin-bottom: clamp(28px, 4vw, 48px); padding-top: 14px; border-top: 2px solid var(--rule);
}
.sec-head__folio { grid-column: 1 / 3; grid-row: 1 / span 2; align-self: start; font-family: var(--font-mono); font-size: 0.75rem; letter-spacing: 0.08em; color: var(--ink-3); }
.sec-head__title { grid-column: 3 / 10; }
.sec-head__lead { grid-column: 3 / 10; color: var(--ink-muted); max-width: 44em; }
.sec-head--side .sec-head__title { grid-column: 3 / 8; }
.sec-head--side .sec-head__lead { grid-column: 8 / 13; align-self: end; }
.sec-head__aside { grid-column: 10 / 13; grid-row: 1 / span 2; align-self: end; justify-self: end; }

.split { display: grid; grid-template-columns: repeat(12, minmax(0, 1fr)); column-gap: 24px; row-gap: 32px; align-items: start; }
.split__copy { grid-column: 1 / 7; }
.split__aside { grid-column: 8 / 13; }
.split--flip .split__copy { grid-column: 7 / 13; grid-row: 1; }
.split--flip .split__aside { grid-column: 1 / 6; grid-row: 1; }
.split__copy > h2 { margin-bottom: 14px; }
.split__copy > .lead { margin-bottom: 16px; }
.hero + .band { border-top: 0; }

/* ------------------------------------------------------------------ hero -- */
.hero {
  position: relative; isolation: isolate; overflow: clip; border-bottom: 1px solid var(--rule);
  background:
    radial-gradient(ellipse at 94% 0%, #f2d8d3, transparent 55%),
    linear-gradient(108deg, #faf7ef 14%, var(--paper) 72%);
}
.hero__title .hero-accent { color: #b71b1f; }
.hero__bg {
  position: absolute; inset: -160px 0; z-index: -1; pointer-events: none; will-change: transform;
  background-image:
    linear-gradient(to right, transparent 7%, rgba(183, 27, 31, .16) 7%, rgba(183, 27, 31, .16) calc(7% + 1px), transparent calc(7% + 1px)),
    linear-gradient(to bottom, var(--rule-paper) 1px, transparent 1px);
  background-size: 100% 100%, 100% 32px;
}
.hero__grid {
  position: relative; display: grid; grid-template-columns: repeat(12, minmax(0, 1fr)); column-gap: 24px; row-gap: 28px;
  padding-top: clamp(32px, 5vw, 64px); padding-bottom: clamp(28px, 4vw, 48px);
}
.hero__lines {
  position: absolute; top: clamp(32px, 5vw, 64px); bottom: clamp(28px, 4vw, 48px); left: var(--gutter); right: var(--gutter);
  display: grid; grid-template-columns: repeat(12, minmax(0, 1fr)); column-gap: 24px; pointer-events: none; z-index: -1;
}
.hero__lines span { border-left: 1px solid var(--rule-faint); }
.hero__lines span:last-child { border-right: 1px solid var(--rule-faint); }
.hero__title { grid-column: 1 / 9; grid-row: 1; font-size: clamp(2.625rem, 5.5vw, 5rem); line-height: 0.9; letter-spacing: -0.045em; }
.hero__form { grid-column: 9 / 13; grid-row: 1 / span 4; align-self: start; margin-top: 4px; }
.hero__lead { grid-column: 1 / 8; grid-row: 2; font-size: clamp(1.125rem, 1.55vw, 1.375rem); line-height: 1.42; color: var(--ink-2); max-width: 30em; }
.hero__points {
  grid-column: 1 / 9; grid-row: 3; display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); column-gap: 32px;
  margin: 0; padding: 0; list-style: none; border-top: 1px solid var(--rule);
}
.hero__points li { display: grid; grid-template-columns: 24px 1fr; column-gap: 12px; align-items: start; padding: 14px 0 16px; border-bottom: 1px solid var(--border); }
.hero__points li svg { color: var(--accent); margin-top: 3px; }
.hero__points strong { display: block; font-weight: 700; line-height: 1.3; }
.hero__points span { display: block; color: var(--ink-muted); font-size: 0.9375rem; line-height: 1.45; }
.hero .hero__points span { color: var(--ink-2); }
.hero__figure { grid-column: 1 / 9; grid-row: 4; margin: 0; }
.hero__figure svg { display: block; width: 100%; height: auto; }
.hero__caption {
  margin-top: 10px; width: fit-content; max-width: 100%; padding: 8px 12px;
  background: var(--sheet); border: 1px solid var(--border);
  color: var(--ink-2); font-family: var(--font-mono); font-size: 0.75rem;
  letter-spacing: 0.05em; text-transform: uppercase;
}
.hero__meta { grid-column: 1 / 9; grid-row: 5; display: flex; flex-wrap: wrap; align-items: center; gap: 12px 32px; }
.link-tags { display: flex; flex-wrap: wrap; gap: 12px; }
.link-tag {
  display: inline-flex; align-items: center; gap: 10px; min-height: 44px; padding: 0 14px 0 10px;
  background: var(--sheet); border: 1px solid var(--border); border-radius: var(--r-2); box-shadow: var(--shadow-sm);
  font-size: 0.9375rem; font-weight: 600; text-decoration: none; transition: transform 0.16s var(--ease), box-shadow 0.16s var(--ease), border-color 0.16s var(--ease);
}
.link-tag svg { color: var(--accent); }
.link-tag:hover { color: var(--ink); transform: translateY(-1px); box-shadow: var(--shadow-md); border-color: var(--border-strong); }
.made-for { display: inline-flex; align-items: center; gap: 8px; font-family: var(--font-mono); font-size: 0.75rem; letter-spacing: 0.06em; text-transform: uppercase; color: var(--ink-3); }
.hero .made-for { padding: 6px 10px; background: var(--sheet); color: var(--ink-2); border: 1px solid var(--border); }
.hero__points--single { grid-template-columns: 1fr; margin-top: 20px; }
.split__copy > .sec-head__folio { display: block; margin-bottom: 10px; }

/* hero figure (inline SVG) */
.hero-figure { overflow: visible; }
.hero-figure .fig-grid { stroke: var(--rule-paper); stroke-width: 1; }
.hero-figure .fig-candle { fill: rgba(17, 17, 17, 0.22); }
.hero-figure .fig-wick { stroke: rgba(17, 17, 17, 0.28); stroke-width: 1; }
.hero-figure .fig-line { fill: none; stroke: var(--ink); stroke-width: 2.4; stroke-linejoin: miter; }
.hero-figure .fig-node { fill: var(--accent); }
.hero-figure .fig-scan { stroke: var(--accent); stroke-width: 1.2; opacity: 0.9; }
/* With JavaScript running on a desktop without reduced motion, the three animated groups are
   held back until the hero script draws them in; every other case (no JS, mobile, reduced motion,
   low-power device, animation library unavailable) shows the complete figure immediately. */
@media (min-width: 768px) and (prefers-reduced-motion: no-preference) {
  .js .hero-figure:not(.is-static) :is(.fig-line, .fig-node, .fig-candle) { visibility: hidden; }
}

/* ---------------------------------------------------------- ledger strip -- */
.ledger { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); margin: 0; border-top: 1px solid var(--rule); }
.ledger > div { min-width: 0; padding: 16px 24px 18px 0; }
.ledger > div + div { padding-left: 24px; border-left: 1px solid var(--border); }
.ledger dt { margin-bottom: 4px; font-family: var(--font-mono); font-size: 0.75rem; letter-spacing: 0.08em; text-transform: uppercase; color: var(--ink-3); }
.ledger dd { margin: 0; font-weight: 700; font-size: 1.0625rem; line-height: 1.25; letter-spacing: -0.015em; }
.ledger dd small { display: block; margin-top: 2px; font-weight: 400; font-size: 0.8125rem; color: var(--ink-muted); letter-spacing: 0; }
.hero .ledger { background-color: var(--sheet); }
.hero .ledger dt, .hero .ledger dd small { color: var(--ink-2); }

/* ------------------------------------------------------------- exchanges -- */
.exchange-row { display: flex; flex-wrap: wrap; gap: 16px; margin: 0; padding: 0; list-style: none; }
.exchange-chip {
  display: inline-flex; align-items: center; justify-content: center;
  width: 196px; height: 62px; padding: 0 20px;
  background: var(--chip-light); border: 1px solid var(--border); border-radius: var(--r-chip); box-shadow: var(--shadow-sm);
}
.exchange-chip--dark { background: var(--chip-dark); border-color: var(--chip-dark); }
.exchange-chip img { width: auto; height: 28px; max-width: 100%; object-fit: contain; }
.section-cta { display: flex; flex-wrap: wrap; align-items: center; gap: 14px 24px; margin-top: 32px; }
.section-cta p { margin: 0; color: var(--ink-muted); font-size: 0.9375rem; }

/* ----------------------------------------------------------------- steps -- */
.steps { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); margin: 0; padding: 0; list-style: none; border-top: 1px solid var(--rule); }
.steps > li { padding: 24px 24px 28px 0; border-bottom: 1px solid var(--border); }
.steps > li + li { padding-left: 24px; border-left: 1px solid var(--border); }
.step__num {
  display: inline-flex; align-items: center; justify-content: center; flex: none;
  width: 32px; height: 32px; margin-bottom: 16px; border-radius: 50%;
  background: var(--accent); color: var(--white); font: 700 0.875rem/1 var(--font-sans);
}
.steps h3 { margin-bottom: 8px; font-size: 1.125rem; }
.steps p { margin: 0; color: var(--ink-muted); font-size: 0.9375rem; }
.steps--row { display: grid; grid-template-columns: repeat(auto-fit, minmax(220px, 1fr)); gap: 0 32px; }
.steps--row > li { display: grid; grid-template-columns: 32px 1fr; column-gap: 14px; padding: 16px 0; border: 0; border-bottom: 1px solid var(--border); }
.steps--row .step__num { grid-row: 1 / span 2; margin: 0; }
.steps--row h3 { margin: 4px 0 6px; }

/* ---------------------------------------------------------------- tables -- */
.table-wrap {
  position: relative; /* containing block of visually-hidden labels inside, so they stay clipped here */
  overflow-x: auto; -webkit-overflow-scrolling: touch; max-width: 100%;
  background: var(--sheet); border: 1px solid var(--rule); border-radius: var(--r-2); box-shadow: var(--shadow-sm);
}
table { width: 100%; border-collapse: collapse; font-size: 0.9375rem; }
.table--wide { min-width: 720px; }
.table--mid { min-width: 560px; }
caption {
  caption-side: top; text-align: left; padding: 14px 20px; background: var(--sheet); color: var(--ink);
  font-family: var(--font-mono); font-size: 0.75rem; letter-spacing: 0.08em; text-transform: uppercase; border-bottom: 1px solid var(--border);
}
th, td { padding: 14px 20px; text-align: left; vertical-align: top; line-height: 1.45; border-bottom: 1px solid var(--border); }
thead th {
  background: var(--paper-2); color: var(--ink); font-family: var(--font-mono); font-size: 0.75rem; font-weight: 400;
  letter-spacing: 0.08em; text-transform: uppercase; border-bottom: 1px solid var(--rule); white-space: nowrap;
}
tbody tr:last-child > * { border-bottom: 0; }
tbody tr:nth-child(even) > * { background: rgba(17, 17, 17, 0.018); }
td:first-child { font-weight: 600; }
tbody th[scope="row"] { width: 34%; vertical-align: top; padding-top: 17px; color: var(--ink-3); font-family: var(--font-mono); font-size: 0.75rem; font-weight: 400; letter-spacing: 0.08em; text-transform: uppercase; white-space: nowrap; }
th.col-brand { border-top: 3px solid var(--accent); }
.mark { display: inline-flex; align-items: center; gap: 8px; white-space: nowrap; }
.mark svg { flex: none; }
.mark--yes svg { color: var(--yes); }
.mark--no svg { color: var(--accent); }
.table--compare th:nth-child(2), .table--compare td:nth-child(2), .table--compare th:nth-child(3), .table--compare td:nth-child(3) { width: 21%; text-align: center; }
.table--compare th:nth-child(3) { white-space: normal; }
.table--compare .mark { justify-content: center; }
.table--plans th:nth-child(n + 2), .table--plans td:nth-child(n + 2) { width: 21%; text-align: center; }
.table--plans .mark { justify-content: center; }
.table--compare td:nth-child(2), .table--plans td:nth-child(n + 2) { font-weight: 400; }
.table--compare td:nth-child(2) strong, .table--plans td strong { font-weight: 700; }
td.cell-text { min-width: 280px; font-weight: 400; }
.cell-scope { display: block; margin-top: 4px; color: var(--ink-muted); font-size: 0.875rem; }
.steps--row h4 { margin: 4px 0 6px; font-size: 1rem; }
.split .conditions__title { margin-top: 0; }
.table-note { margin-top: 14px; font-size: 0.875rem; color: var(--ink-muted); }

/* ruled feature list: icon, title and one line per row, no empty cells at any width */
.feature-list { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); column-gap: 40px; margin: 0; padding: 0; list-style: none; border-top: 1px solid var(--rule); }
.feature-list > li { display: grid; grid-template-columns: 48px 1fr; column-gap: 16px; margin: 0; padding: 18px 0; border-bottom: 1px solid var(--border); }
.feature-list .icon-badge { grid-row: 1 / span 2; }
.feature-list h3 { margin: 4px 0 6px; font-size: 1.0625rem; }
.feature-list p { margin: 0; color: var(--ink-muted); font-size: 0.9375rem; }

/* ----------------------------------------------------------------- cards -- */
.grid { display: grid; gap: 20px; grid-template-columns: repeat(auto-fit, minmax(260px, 1fr)); }
.grid--2 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
.grid--3 { grid-template-columns: repeat(3, minmax(0, 1fr)); }
@media (max-width: 1023.98px) { .grid--3 { grid-template-columns: repeat(2, minmax(0, 1fr)); } .grid--3 > *:last-child:nth-child(odd) { grid-column: 1 / -1; } }
.grid--stagger { grid-template-columns: repeat(2, minmax(0, 1fr)); }
.grid--stagger > *:nth-child(even) { margin-top: 32px; }
.grid--bento { grid-template-columns: repeat(3, minmax(0, 1fr)); }
.grid--bento > *:first-child { grid-column: span 2; }
.card {
  position: relative; display: flex; flex-direction: column; align-items: flex-start; gap: 14px;
  padding: 24px; background: var(--sheet); border: 1px solid var(--border); border-radius: var(--r-2); box-shadow: var(--shadow-sm);
  transition: transform 0.18s var(--ease), box-shadow 0.18s var(--ease), border-color 0.18s var(--ease);
}
.card::before { content: ""; position: absolute; top: -1px; left: 24px; width: 32px; height: 3px; background: var(--accent); }
.card:hover { transform: translateY(-2px); box-shadow: var(--shadow-md); border-color: var(--border-strong); }
.card h3, .card h4 { font-size: 1.125rem; }
.card p { margin: 0; color: var(--ink-muted); font-size: 0.9375rem; }
.card .card__more { margin-top: auto; font-weight: 600; font-size: 0.9375rem; display: inline-flex; align-items: center; gap: 6px; text-decoration: none; min-height: 32px; }
.card .card__more svg { transition: transform 0.16s var(--ease); }
.card:hover .card__more svg { transform: translateX(3px); }
a.card { color: inherit; text-decoration: none; }
a.card:hover { color: inherit; }
a.card:hover h3, a.card:hover h4 { text-decoration: underline; text-decoration-color: var(--accent); text-decoration-thickness: 2px; text-underline-offset: 0.16em; }
.icon-badge {
  display: inline-flex; align-items: center; justify-content: center; flex: none;
  width: 48px; height: 48px; border-radius: var(--r-3); background: var(--accent-tint); color: var(--accent);
}
.icon-badge svg { width: 24px; height: 24px; }
.icon-badge--ink { background: var(--paper-2); color: var(--ink); }

/* ledger cards: ruled cells separated by hairlines (no floating boxes) */
.ledger-cards { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 1px; background: var(--border); border: 1px solid var(--border); border-radius: var(--r-2); overflow: hidden; box-shadow: var(--shadow-sm); }
.ledger-cards > * { background: var(--sheet); padding: 24px; }
.ledger-cards > * > .idx { display: block; margin-bottom: 14px; font-family: var(--font-mono); font-size: 0.75rem; letter-spacing: 0.08em; color: var(--accent-ink); }
.ledger-cards h3 { margin-bottom: 8px; font-size: 1.0625rem; }
.ledger-cards p { margin: 0 0 8px; color: var(--ink-muted); font-size: 0.9375rem; }
.ledger-cards p:last-child { margin: 0; }

/* definition rows (fact sheets) */
.facts { margin: 0; border-top: 1px solid var(--rule); }
.facts > div { display: grid; grid-template-columns: minmax(140px, 1fr) 2fr; gap: 16px; padding: 14px 0; border-bottom: 1px solid var(--border); }
.facts dt { font-family: var(--font-mono); font-size: 0.75rem; letter-spacing: 0.06em; text-transform: uppercase; color: var(--ink-3); padding-top: 3px; }
.facts dd { margin: 0; font-weight: 500; }
.facts a { display: inline-flex; align-items: center; min-height: 24px; }

/* ------------------------------------------------------------------- faq -- */
.faq { border-top: 1px solid var(--rule); }
.faq__group { margin-top: 32px; }
.faq__group > h3 { padding: 10px 0; border-bottom: 1px solid var(--rule); font-family: var(--font-mono); font-size: 0.75rem; font-weight: 400; letter-spacing: 0.08em; text-transform: uppercase; }
.faq__item { border-bottom: 1px solid var(--border); }
.faq__q {
  display: flex; width: 100%; align-items: center; justify-content: space-between; gap: 16px; padding: 16px 0;
  background: none; border: 0; color: var(--ink); text-align: left; cursor: pointer;
  font: 700 1.0625rem/1.3 var(--font-sans); letter-spacing: -0.01em;
}
.faq__q:hover { color: var(--accent-ink); }
.faq__q svg { flex: none; color: var(--accent); transition: transform 0.18s var(--ease); }
.faq__q[aria-expanded="true"] svg { transform: rotate(45deg); }
.faq__a { padding: 0 36px 20px 0; color: var(--ink-muted); max-width: 48em; }
.faq__a:not([hidden]) { animation: faq-in 0.2s var(--ease); }
.faq__a ul, .faq__a ol { padding-left: 20px; }
@keyframes faq-in { from { opacity: 0; transform: translateY(-4px); } to { opacity: 1; transform: none; } }

/* open question-and-answer list (documentation pages: every answer is visible) */
.qa { margin: 0; padding: 0; list-style: none; border-top: 1px solid var(--rule); }
.qa__item { display: grid; grid-template-columns: 36px 1fr; column-gap: 8px; padding: 18px 0; border-bottom: 1px solid var(--border); }
.qa__item > div { min-width: 0; }
.qa__n { padding-top: 3px; font-family: var(--font-mono); font-size: 0.875rem; color: var(--accent-ink); }
.qa__q { margin: 0 0 8px; font-size: 1.0625rem; }
.qa__a { max-width: 48em; color: var(--ink-muted); }
.qa__a p { margin: 0 0 0.6em; }
.qa__a p:last-child { margin-bottom: 0; }
.qa__a ul { padding-left: 20px; margin: 0; }
@media (max-width: 767.98px) { .qa__item { grid-template-columns: 1fr; row-gap: 4px; } }

/* ------------------------------------------------------------------ notes -- */
.note {
  display: grid; grid-template-columns: 3px 1fr; column-gap: 16px; padding: 16px 18px;
  background: var(--sheet); border: 1px solid var(--border); border-radius: var(--r-2); box-shadow: var(--shadow-sm);
}
.note::before { content: ""; background: var(--accent); }
.note p { margin: 0; font-size: 0.9375rem; line-height: 1.5; color: var(--ink-2); }
.note--ink::before { background: var(--ink); }
.note--paper { background: var(--paper-2); }

/* ------------------------------------------------------------- page hero -- */
.page-hero {
  position: relative; isolation: isolate; overflow: clip; border-bottom: 1px solid var(--rule); background: var(--paper);
  background-image: linear-gradient(to right, var(--rule-faint) 1px, transparent 1px), linear-gradient(to bottom, var(--rule-paper) 1px, transparent 1px);
  background-size: 96px 100%, 100% 32px;
}
.page-hero__grid {
  position: relative; display: grid; grid-template-columns: repeat(12, minmax(0, 1fr)); column-gap: 24px; row-gap: 24px;
  padding-block: clamp(32px, 5vw, 64px);
}
.page-hero__copy { grid-column: 1 / 8; align-self: center; }
.page-hero__copy h1 { margin-bottom: 18px; }
.page-hero__copy .lead { color: var(--ink-2); max-width: 26em; }
.page-hero__form { grid-column: 9 / 13; grid-row: 1; align-self: start; }
.page-hero__motif { width: min(100%, 400px); margin: 22px 0 -6px; opacity: 0.95; }
.page-hero__motif svg { display: block; width: 100%; height: auto; }
.motif .m-line { fill: none; stroke: var(--ink); stroke-width: 1.6; }
.motif .m-node { fill: var(--accent); }
.motif .m-ring { fill: var(--paper); stroke: var(--ink); stroke-width: 1.6; }
.motif .m-faint { stroke: var(--rule-faint); stroke-width: 1; fill: none; }
.motif .m-block { fill: rgba(17, 17, 17, 0.1); }
.motif .m-link { fill: none; stroke: rgba(17, 17, 17, 0.35); stroke-width: 1.4; }
.page-hero--plain .page-hero__copy { grid-column: 1 / 10; }
.page-hero--plain .page-hero__motif { width: min(100%, 340px); }

/* map embed (Contact page): market-level map inside a framed box, never edge to edge */
.map-embed {
  position: relative; max-width: 100%; aspect-ratio: 16 / 9; min-height: 280px; overflow: hidden;
  background: var(--paper-2); border: 1px solid var(--rule); border-radius: var(--r-2); box-shadow: var(--shadow-sm);
}
.map-embed iframe { display: block; width: 100%; height: 100%; border: 0; }
.map-caption { margin-top: 10px; font-size: 0.875rem; color: var(--ink-muted); }

/* plan cards (Fees page, unlisted landing page): the R$ amount is the visual anchor */
.plan-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 20px; }
.plan { position: relative; display: flex; flex-direction: column; gap: 12px; padding: 24px; background: var(--sheet); border: 1px solid var(--border); border-radius: var(--r-2); box-shadow: var(--shadow-sm); }
.plan::before { content: ""; position: absolute; top: -1px; left: 24px; width: 32px; height: 3px; background: var(--accent); }
.plan--featured { border-color: var(--rule); box-shadow: var(--shadow-md); }
.plan__name { font-size: 1.25rem; font-weight: 800; letter-spacing: -0.02em; }
.plan__for { color: var(--ink-muted); font-size: 0.9375rem; min-height: 2.9em; }
.plan__amount { margin: 4px 0 0; font-size: clamp(2rem, 3.2vw, 2.75rem); font-weight: 800; letter-spacing: -0.04em; line-height: 1; }
.plan__amount small { display: block; margin-top: 6px; font-size: 0.8125rem; font-weight: 400; letter-spacing: 0; color: var(--ink-muted); }
.plan ul { margin: 0; padding: 14px 0 0; list-style: none; border-top: 1px solid var(--border); }
.plan li { display: grid; grid-template-columns: 20px 1fr; gap: 8px; margin: 0; padding: 5px 0; font-size: 0.9375rem; color: var(--ink-2); }
.plan li svg { color: var(--accent); margin-top: 3px; }
.plan .btn { margin-top: auto; }
@media (max-width: 1023.98px) { .plan-grid { grid-template-columns: 1fr; } .plan__for { min-height: 0; } }

/* article cards and simple link lists */
.article { padding: 28px 0; border-top: 1px solid var(--border); }
.article:first-of-type { border-top: 2px solid var(--rule); }
.article h2 { margin-bottom: 6px; }
.article .meta { margin-bottom: 14px; }
.article p { max-width: 46em; }
.doc-section > p.mono { margin-bottom: 6px; }
.article-index { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 20px; margin: 0; padding: 0; list-style: none; }
.article-index a {
  display: flex; flex-direction: column; gap: 10px; height: 100%; padding: 24px; color: inherit; text-decoration: none;
  background: var(--sheet); border: 1px solid var(--border); border-radius: var(--r-2); box-shadow: var(--shadow-sm);
  transition: transform 0.18s var(--ease), box-shadow 0.18s var(--ease), border-color 0.18s var(--ease);
}
.article-index a:hover, .article-index a:focus-visible { transform: translateY(-2px); box-shadow: var(--shadow-md); border-color: var(--border-strong); color: inherit; }
.article-index strong { font-size: 1.125rem; line-height: 1.25; }
.article-index .muted { font-size: 0.9375rem; }
@media (max-width: 767.98px) { .article-index { grid-template-columns: 1fr; } }
.check-list { margin: 0; padding: 0; list-style: none; }
.check-list li { display: grid; grid-template-columns: 24px 1fr; gap: 12px; margin: 0; padding: 10px 0; border-bottom: 1px solid var(--border); }
.check-list li svg { color: var(--accent); margin-top: 3px; }

/* ------------------------------------------------------------------ prose -- */
.prose { max-width: 46em; }
.prose--wide { max-width: 100%; }
.prose--wide p { max-width: 46em; }
.prose > h2 { margin: 44px 0 14px; padding-top: 16px; border-top: 2px solid var(--rule); font-size: clamp(1.5rem, 2.4vw, 2rem); }
.prose > h2:first-child { margin-top: 0; padding-top: 0; border-top: 0; }
.prose > h3 { margin: 28px 0 8px; }
.prose ul, .prose ol { padding-left: 22px; }
.prose li { margin-bottom: 6px; }
.prose li::marker { color: var(--accent); }
.prose strong { font-weight: 700; }

.doc { display: grid; grid-template-columns: repeat(12, minmax(0, 1fr)); column-gap: 24px; row-gap: 32px; align-items: start; }
.doc__body { grid-column: 3 / 11; min-width: 0; }
.doc--toc .doc__body { grid-column: 4 / 12; }
.doc__toc { grid-column: 1 / 4; position: sticky; top: calc(var(--header-h) + 24px); }
.doc__toc h2 { margin-bottom: 10px; font-family: var(--font-mono); font-size: 0.75rem; font-weight: 400; letter-spacing: 0.08em; text-transform: uppercase; }
.doc__toc ol { margin: 0; padding: 0; list-style: none; counter-reset: toc; border-left: 1px solid var(--rule); }
.doc__toc li { counter-increment: toc; }
.doc__toc a { display: grid; grid-template-columns: 32px 1fr; gap: 8px; align-items: start; padding: 8px 12px 8px 0; min-height: 24px; font-size: 0.875rem; line-height: 1.35; color: var(--ink-muted); text-decoration: none; border-left: 2px solid transparent; margin-left: -1.5px; transition: color 0.14s var(--ease), border-color 0.14s var(--ease); }
.doc__toc a::before { content: counter(toc, decimal-leading-zero); font-family: var(--font-mono); font-size: 0.75rem; color: var(--ink-3); padding-top: 2px; }
.doc__toc a:hover { color: var(--ink); border-left-color: var(--accent); }
.doc-section { padding: 24px 0 8px; border-top: 1px solid var(--border); }
.doc-section:first-of-type { border-top: 2px solid var(--rule); }
.doc-section > h2 { margin-bottom: 12px; font-size: clamp(1.375rem, 2.1vw, 1.75rem); display: grid; grid-template-columns: 44px 1fr; column-gap: 8px; align-items: baseline; }
.doc-section > h2 .n { font-family: var(--font-mono); font-size: 0.875rem; font-weight: 400; letter-spacing: 0.04em; color: var(--accent-ink); }
.doc-section--icon > h2 { grid-template-columns: 48px 1fr; align-items: start; }
.doc-section--icon > h2 .icon-badge { margin-top: -4px; }
.doc-section .note { margin-top: 16px; }
.doc__body > .note { margin-bottom: 8px; }
.doc-section > h3 { margin: 22px 0 8px; font-size: 1.0625rem; }
.doc-section p, .doc-section li { color: var(--ink-2); }
.doc-section ul, .doc-section ol { padding-left: 22px; }
.doc-section li { margin-bottom: 6px; }
.doc-section li::marker { color: var(--accent); }

/* -------------------------------------------------------------- calculator -- */
.calc-section .calc-widget { max-width: 960px; text-align: left; --calc-skeleton-bg: #e2e0d9; --calc-skeleton-shimmer: rgba(255, 255, 255, 0.55); }
.calc-section .calc-widget__title { margin-bottom: 8px; font-size: 1.25rem; font-weight: 800; letter-spacing: -0.02em; line-height: 1.2; }
.calc-section .calc-widget__subtitle { margin-bottom: 28px; font-size: 0.9375rem; line-height: 1.55; max-width: 46em; }
.calc-section .calc-widget__wrapper { gap: 48px; max-width: 100%; margin-bottom: 28px; align-items: start; }
.calc-section .calc-widget__result { backdrop-filter: none; border: 1px solid var(--rule); border-radius: var(--r-2); box-shadow: var(--shadow-sm); }
.calc-section .calc-widget__result-head { gap: 0.6rem; margin-bottom: 2rem; }
.calc-section .calc-widget__result-title { font-size: 0.9375rem; font-weight: 600; line-height: 1.35; letter-spacing: 0; }
.calc-section .calc-widget__stat-label { font-size: 0.875rem; font-weight: 600; }
.calc-section .calc-widget__label { font-size: 1rem; }
.calc-section .calc-widget__minmax { font-size: 0.8125rem; }
.calc-section .calc-widget__range { height: 24px; border-radius: 2px; background-size: 100% 4px !important; background-position: 0 center !important; background-repeat: no-repeat !important; }
.calc-section .calc-widget__range:focus-visible { outline: 2px solid var(--accent); outline-offset: 0; }
/* generous hit area for inline text links: their box measures at least 24 px without changing line rhythm */
.prose a, .card p a, .section-cta p a, .note a, .table-note a, .form-legal a, .qa__a a, .faq__a a,
.check-list a, .split__copy p a, .hero__lead a, .small a, .map-caption a, .doc-section a:not(.btn):not(.icon-badge), .article a:not(.btn) {
  padding-block: 6px; margin-block: -6px;
}
.calc-section .calc-widget__disclaimer { margin-bottom: 24px; font-size: 0.875rem; line-height: 1.5; }
.calc-section .calc-widget__cta {
  margin: 0; min-height: 48px; padding: 0 22px; border-radius: var(--r-1); box-shadow: var(--shadow-sm);
  font: 600 0.9375rem/1.1 var(--font-sans); transition: background-color 0.16s var(--ease), transform 0.16s var(--ease), box-shadow 0.16s var(--ease);
}
.calc-section .calc-widget__cta:hover { opacity: 1; background: var(--accent-hover); transform: translateY(-1px); box-shadow: var(--shadow-md); }
.calc-modal__content { border-radius: var(--r-3); border: 1px solid var(--rule); }
.calc-modal .calc-modal__close {
  top: 6px; right: 6px; display: inline-flex; align-items: center; justify-content: center;
  width: 44px; height: 44px; border: 1px solid var(--border); border-radius: var(--r-1); opacity: 1; font-size: 24px;
}
.calc-modal .calc-modal__close:hover { background: var(--paper-2); transform: none; }
.calc-modal .calc-modal__title { text-align: left; margin-bottom: 18px; font-size: 1.125rem; line-height: 1.35; padding-right: 56px; }

/* ------------------------------------------------------------- exit modal -- */
.exit-modal {
  position: fixed; inset: 0; z-index: 200; display: flex; align-items: center; justify-content: center;
  padding: 16px; background: rgba(17, 17, 17, 0.55);
}
.exit-modal.is-open { animation: fade-in 0.18s var(--ease); }
.exit-modal__card {
  position: relative; width: 100%; max-width: 480px; max-height: calc(100vh - 32px); overflow-y: auto;
  padding: 28px 28px 28px; background: var(--sheet); border: 1px solid var(--rule); border-radius: var(--r-3); box-shadow: var(--shadow-lg);
}
.exit-modal__card h2 { margin-bottom: 12px; font-size: clamp(1.5rem, 3vw, 1.9rem); }
.exit-modal__card p { color: var(--ink-muted); font-size: 0.9375rem; }
.exit-modal__art { margin-bottom: 20px; }
.exit-modal__art svg { display: block; width: 100%; height: auto; }
.exit-modal__close {
  position: absolute; top: 10px; right: 10px; display: inline-flex; align-items: center; justify-content: center;
  width: 40px; height: 40px; border: 1px solid var(--border); border-radius: var(--r-1); background: var(--sheet); color: var(--ink); cursor: pointer;
  transition: background-color 0.16s var(--ease), color 0.16s var(--ease);
}
.exit-modal__close:hover { background: var(--ink); color: var(--paper); }
@keyframes fade-in { from { opacity: 0; } to { opacity: 1; } }
body.modal-open { overflow: hidden; }

/* ------------------------------------------------------------ illustrations -- */
.illustration svg { display: block; width: 100%; height: auto; }
.phone-illo .p-body { fill: var(--sheet); stroke: var(--ink); stroke-width: 2; }
.phone-illo .p-screen { fill: var(--paper); }
.phone-illo .p-bar { fill: var(--paper-2); }
.phone-illo .p-line { fill: none; stroke: var(--ink); stroke-width: 2.4; }
.phone-illo .p-node { fill: var(--accent); }
.phone-illo .p-row { fill: rgba(17, 17, 17, 0.08); }
.phone-illo .p-btn { fill: var(--ink); }
.mesh-illo .m-link { stroke: rgba(17, 17, 17, 0.28); stroke-width: 1; }
.mesh-illo .m-node { fill: var(--ink); }
.mesh-illo .m-hot { fill: var(--accent); }
.mesh-illo .m-ring { fill: none; stroke: var(--ink); stroke-width: 1.4; }
.doc-section .illustration { margin-top: 22px; }
.dash-illo { border: 1px solid var(--border); border-radius: var(--r-2); background: var(--paper); padding: 18px; max-width: 560px; }
.dash-illo .d-panel { fill: var(--sheet); stroke: var(--ink); stroke-width: 1.6; }
.dash-illo .d-grid { fill: none; stroke: var(--rule-paper); stroke-width: 1; }
.dash-illo .d-bar { fill: rgba(17, 17, 17, 0.12); }
.dash-illo .d-big { fill: var(--ink); }
.dash-illo .d-candle { fill: rgba(17, 17, 17, 0.22); }
.dash-illo .d-line { fill: none; stroke: var(--ink); stroke-width: 2.4; }
.dash-illo .d-node { fill: var(--accent); }
.dash-illo .d-dot { fill: none; stroke: var(--ink); stroke-width: 1.6; }

/* ----------------------------------------------------------------- footer -- */
.site-footer { border-top: 1px solid var(--rule); background: var(--paper-2); padding-block: clamp(40px, 5vw, 64px) 24px; font-size: 0.9375rem; }
.site-footer__grid { display: grid; grid-template-columns: repeat(12, minmax(0, 1fr)); gap: 32px 24px; padding-bottom: 36px; border-bottom: 1px solid var(--border-strong); }
.site-footer__brand { grid-column: span 4; }
.site-footer__col { grid-column: span 2; min-width: 0; }
.site-footer__col--learn, .site-footer__col--products { grid-column: span 3; }
.site-footer__col--docs { grid-column: 1 / -1; }
.site-footer__col--docs .site-footer__links { columns: 3; column-gap: 24px; }
.site-footer__col--docs .site-footer__links li { break-inside: avoid; }
.site-footer__title { margin-bottom: 12px; font-family: var(--font-mono); font-size: 0.75rem; font-weight: 400; letter-spacing: 0.08em; text-transform: uppercase; }
.site-footer__tagline { margin: 18px 0 14px; color: var(--ink-muted); max-width: 26em; }
.site-footer__made { display: flex; align-items: center; gap: 8px; margin: 0; font-family: var(--font-mono); font-size: 0.75rem; letter-spacing: 0.06em; text-transform: uppercase; color: var(--ink-3); }
.site-footer__links { margin: 0; padding: 0; list-style: none; }
.site-footer__links li { margin: 0; }
.site-footer__links a { display: inline-flex; align-items: center; min-height: 28px; color: var(--ink-muted); text-decoration: none; transition: color 0.14s var(--ease); }
.site-footer__links a:hover { color: var(--ink); text-decoration: underline; }
.site-footer__contact { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 20px 32px; padding-block: 24px; border-bottom: 1px solid var(--border); }
.site-footer__contact .site-footer__title { margin: 0; }
.site-footer__facts { display: flex; flex-wrap: wrap; gap: 12px 32px; margin: 0; }
.site-footer__facts > div { display: flex; flex-wrap: wrap; gap: 8px; align-items: baseline; }
.site-footer__facts dt { font-family: var(--font-mono); font-size: 0.75rem; letter-spacing: 0.06em; text-transform: uppercase; color: var(--ink-3); }
.site-footer__facts dd { margin: 0; font-weight: 600; }
.site-footer__facts a { display: inline-flex; align-items: center; min-height: 24px; }
.site-footer__legal { padding-block: 24px; border-bottom: 1px solid var(--border); color: var(--ink-muted); font-size: 0.875rem; }
.site-footer__legal-title { margin: 0 0 6px; font-family: var(--font-mono); font-size: 0.75rem; font-weight: 400; letter-spacing: 0.08em; text-transform: uppercase; }
.site-footer__legal p { max-width: 84ch; }
.site-footer__legal p + .site-footer__legal-title { margin-top: 18px; }
.site-footer__bottom { display: flex; flex-wrap: wrap; justify-content: space-between; gap: 10px 24px; padding-top: 20px; font-size: 0.8125rem; color: var(--ink-3); }
.site-footer__bottom p { margin: 0; }
.site-footer__top { display: inline-flex; align-items: center; gap: 6px; min-height: 24px; }

/* ----------------------------------------------------------------- motion -- */
@media (prefers-reduced-motion: no-preference) {
  html { scroll-behavior: smooth; }
  .js .reveal { opacity: 0; transform: translateY(10px); transition: opacity 0.55s ease-out, transform 0.55s var(--ease); }
  .js .reveal.is-in { opacity: 1; transform: none; }
}
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation-duration: 0.01ms !important; animation-iteration-count: 1 !important; transition-duration: 0.01ms !important; }
}

/* ------------------------------------------------------------- responsive -- */
@media (max-width: 1023.98px) {
  .hero__title { grid-column: 1 / 8; font-size: clamp(2.25rem, 6.2vw, 3.75rem); }
  .hero__form { grid-column: 8 / 13; }
  .hero__lead, .hero__points, .hero__figure, .hero__meta { grid-column: 1 / 8; }
  .sec-head__aside { grid-column: 9 / 13; }
  .grid--stagger > *:nth-child(even) { margin-top: 0; }
  .grid--bento { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .grid--bento > *:first-child { grid-column: span 2; }
  .ledger-cards { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .ledger { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .ledger > div:nth-child(3) { border-left: 0; padding-left: 0; border-top: 1px solid var(--border); }
  .ledger > div:nth-child(4) { border-top: 1px solid var(--border); }
  .steps { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .steps > li:nth-child(odd) { border-left: 0; padding-left: 0; }
  .steps > li:nth-child(n + 3) { border-bottom: 1px solid var(--border); }
  .steps > li:nth-child(even) { padding-left: 24px; }
  .doc, .doc--toc .doc__body { grid-template-columns: 1fr; }
  .doc__body, .doc--toc .doc__body { grid-column: 1 / -1; }
  .doc__toc { position: static; grid-column: 1 / -1; }
  .site-footer__brand { grid-column: span 6; }
  .site-footer__col, .site-footer__col--learn, .site-footer__col--products { grid-column: span 2; }
  .site-footer__col--docs .site-footer__links { columns: 3; }
  .feature-list { column-gap: 28px; }
}

@media (max-width: 767.98px) {
  .hero__bg { inset: -120px 0; }
  .hero__lines { grid-template-columns: repeat(6, minmax(0, 1fr)); }
  .hero__lines span:nth-child(n + 7) { display: none; }
  .hero__title, .hero__form, .hero__lead, .hero__points, .hero__figure, .hero__meta { grid-column: 1 / -1; grid-row: auto; }
  .hero__title { order: 1; font-size: clamp(2.375rem, 11vw, 3.25rem); }
  .hero__form { order: 2; margin-top: 0; }
  .hero__lead { order: 3; }
  .hero__points { order: 4; }
  .hero__figure { order: 5; }
  .hero__meta { order: 6; }
  .hero__points { grid-template-columns: 1fr; }
  .hero__grid { row-gap: 24px; }

  .page-hero__grid { grid-template-columns: 1fr; }
  .page-hero__copy, .page-hero__form { grid-column: 1 / -1; grid-row: auto; }
  .page-hero--plain .page-hero__copy { grid-column: 1 / -1; }
  .page-hero__motif { display: none; }
  .map-embed { min-height: 220px; aspect-ratio: 4 / 3; }

  .sec-head { grid-template-columns: 1fr; row-gap: 8px; }
  .sec-head__folio, .sec-head__title, .sec-head__lead, .sec-head--side .sec-head__title, .sec-head--side .sec-head__lead, .sec-head__aside { grid-column: 1 / -1; grid-row: auto; }
  .sec-head__folio { order: -1; }
  .sec-head__aside { justify-self: start; }

  .split, .split--flip { grid-template-columns: 1fr; row-gap: 28px; }
  .split__copy, .split__aside, .split--flip .split__copy, .split--flip .split__aside { grid-column: 1 / -1; grid-row: auto; }

  .grid, .grid--2, .grid--stagger, .grid--3 { grid-template-columns: 1fr; }
  .grid--3 > *:last-child:nth-child(odd) { grid-column: auto; }
  .grid--bento { grid-template-columns: 1fr; }
  .grid--bento > *:first-child { grid-column: auto; }
  .ledger-cards { grid-template-columns: 1fr; }
  .steps { grid-template-columns: 1fr; }
  .steps > li, .steps > li + li, .steps > li:nth-child(odd), .steps > li:nth-child(n + 3) { padding: 20px 0; border-left: 0; border-bottom: 1px solid var(--border); }
  .steps > li:last-child { border-bottom: 0; }
  .facts > div { grid-template-columns: 1fr; gap: 4px; }
  .form-block { padding: 20px; }
  .site-footer__grid { gap: 28px 16px; }
  .site-footer__brand { grid-column: 1 / -1; }
  .site-footer__col, .site-footer__col--learn, .site-footer__col--products { grid-column: span 6; }
  .site-footer__col--docs { grid-column: 1 / -1; }
  .site-footer__col--docs .site-footer__links { columns: 2; }
  .exchange-chip { width: calc(50% - 8px); min-width: 0; }
  .doc-section > h2 { grid-template-columns: 1fr; }
  .feature-list { grid-template-columns: 1fr; }
  .site-footer__contact { flex-direction: column; align-items: flex-start; }
  .site-footer__facts { flex-direction: column; }
}

@media (max-width: 479.98px) {
  .logo { min-width: 0; }
  .exchange-row { gap: 12px; }
  .exchange-chip { width: 100%; }
  .site-footer__col, .site-footer__col--learn, .site-footer__col--products { grid-column: 1 / -1; }
  .site-footer__col--docs .site-footer__links { columns: 1; }
  .ledger { grid-template-columns: 1fr; }
  .ledger > div, .ledger > div:nth-child(3), .ledger > div:nth-child(4) { border-left: 0; padding: 14px 0; border-top: 1px solid var(--border); }
  .ledger > div:first-child { border-top: 0; }
}

@media print {
  .site-header, .nav-toggle, .site-nav, .skip-link, .form-block, .btn, .site-footer__top { display: none !important; }
  body { background: #fff; color: #000; overflow: visible; }
  a { text-decoration: none; }
}

.tv-ticker-wrapper {
    padding-top: 0px !important;
    height: 58px !important;
}

/* Homepage background artwork */
.hero-art {
  position: absolute; inset: 0; z-index: -2; pointer-events: none;
}
.hero-art img { display: block; width: 100%; height: 100%; object-fit: cover; object-position: right center; }
.hero-art::after {
  content: ""; position: absolute; inset: 0;
  background:
    linear-gradient(90deg, rgb(250 247 239 / 96%), rgb(250 247 239 / 89%) 39%, rgb(250 247 239 / 67%) 68%, rgb(250 247 239 / 19%) 96%),
    linear-gradient(180deg, rgb(250 247 239 / 90%), transparent 56%);
}
.hero__bg { opacity: .45; }
@media (min-width: 1024px) {
    .hero-art { right: 34%; mask-image: linear-gradient(90deg, #000 86%, transparent); }
}
@media (max-width: 767px) {
  .hero-art { inset: auto 0 0; height: clamp(300px, 88vw, 480px); }
  .hero-art::after {
    background: linear-gradient(180deg, var(--paper), rgb(250 247 239 / 91%) 26%, rgb(250 247 239 / 38%) 66%, transparent 90%);
  }
  .hero { padding-bottom: clamp(144px, 41vw, 222px); }
}

/* Account button in the site header and its mobile menu. */
.site-header .header-signup {
    min-height: 44px; gap: 8px; padding: 5px 7px 5px 15px;
    font-size: .875rem; font-weight: 700; line-height: 1.15;
    white-space: nowrap; text-align: center; text-decoration: none;
    transition: background-color .18s ease, box-shadow .18s ease, transform .18s ease;
    gap: 12px; padding-block: 0; padding-inline-end: 0;
    color: #fff; background: #b91620; border: 1px solid #a6121b; border-radius: 3px;
    box-shadow: 3px 3px 0 #631419;
}
.site-header .header-signup__icon {
    display: grid; place-items: center; flex: none;
    width: 41px; align-self: stretch; color: #fff; background: #8f121b;
    border-left: 1px solid rgb(255 255 255 / 29%);
}
.site-header .header-signup__icon svg { display: block; width: 16px; height: 16px; transition: transform .18s ease; }
.site-header .header-signup:focus-visible { outline: 2px solid #a6121b; outline-offset: 3px; }
@media (hover: hover) and (pointer: fine) {
  .site-header .header-signup:hover {
    color: #fff; background: #a8121b; box-shadow: 4px 4px 0 #631419;
  }
  .site-header .header-signup:hover svg { transform: translateX(2px); }
}
@media (prefers-reduced-motion: reduce) {
    .site-header .header-signup, .site-header .header-signup:hover, .site-header .header-signup .header-signup__icon svg { transition: none; transform: none; }
}
@media (max-width: 1023px) {
    .site-header .site-nav__cta .header-signup__label { flex: 1; }
}

#registration-form input[type="submit"] {
    background-color: #b71b1f!important;
    font-weight: bold!important;
    color: #fff!important;
}
