/* ==========================================================================
   CapitalVane — design system
   Single stylesheet. No frameworks, no webfonts, no runtime dependencies.
   ========================================================================== */

/* --- 1. Tokens ---------------------------------------------------------- */
:root {
  color-scheme: light;

  /* Brand */
  --navy:        #0A2540;
  --navy-700:    #143A5E;
  --ink:         #0F1E30;
  --body:        #414F63;
  --muted:       #6B7A90;
  --brand:       #1259C7;
  --brand-dark:  #0E45A0;
  --brand-soft:  #EAF1FD;
  --accent:      #199E70;
  --accent-soft: #E7F5EF;

  /* Surfaces */
  --paper:       #FFFFFF;
  --surface:     #F6F8FC;
  --surface-2:   #EEF2F9;
  --line:        #E4EAF3;
  --line-strong: #CFD8E6;

  /* Data series (validated: CVD-safe pair, both ≥3:1 on white) */
  --series-1:    #2A78D6;  /* contributions / principal */
  --series-2:    #199E70;  /* growth / interest        */
  --grid:        #E9EDF4;
  --axis:        #C2CCDA;

  /* Type */
  --sans: system-ui, -apple-system, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
  --mono: ui-monospace, SFMono-Regular, "SF Mono", Menlo, Consolas, monospace;

  /* Space & shape */
  --r-sm: 8px;
  --r:    12px;
  --r-lg: 18px;
  --r-xl: 24px;
  --shadow-sm: 0 1px 2px rgba(10,37,64,.06), 0 1px 1px rgba(10,37,64,.04);
  --shadow:    0 2px 4px rgba(10,37,64,.05), 0 8px 24px -12px rgba(10,37,64,.16);
  --shadow-lg: 0 4px 8px rgba(10,37,64,.05), 0 24px 48px -20px rgba(10,37,64,.22);
  --wrap: 1160px;
  --wrap-narrow: 760px;
}

/* --- 2. Reset ----------------------------------------------------------- */
*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; }
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after { animation-duration: .01ms !important; transition-duration: .01ms !important; }
}
body {
  margin: 0;
  font-family: var(--sans);
  font-size: 16.5px;
  line-height: 1.65;
  color: var(--body);
  background: var(--paper);
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}
img, video { max-width: 100%; height: auto; display: block; }
svg { display: block; }
svg.ico { width: 15px; height: 15px; flex-shrink: 0; }
h1, h2, h3, h4, h5 {
  color: var(--ink);
  font-weight: 700;
  line-height: 1.22;
  letter-spacing: -0.018em;
  margin: 0 0 .5em;
  text-wrap: balance;
}
h1 { font-size: clamp(2rem, 1.35rem + 2.6vw, 3.15rem); letter-spacing: -0.028em; }
h2 { font-size: clamp(1.5rem, 1.2rem + 1.3vw, 2.15rem); letter-spacing: -0.024em; }
h3 { font-size: clamp(1.18rem, 1.08rem + .45vw, 1.4rem); }
h4 { font-size: 1.05rem; }
p  { margin: 0 0 1.1em; }
p:last-child, ul:last-child, ol:last-child { margin-bottom: 0; }
a { color: var(--brand); text-decoration-thickness: 1px; text-underline-offset: 2px; }
a:hover { color: var(--brand-dark); }
ul, ol { margin: 0 0 1.1em; padding-left: 1.3em; }
li { margin-bottom: .4em; }
li::marker { color: var(--muted); }
strong { color: var(--ink); font-weight: 650; }
small { font-size: .875rem; }
hr { border: 0; border-top: 1px solid var(--line); margin: 2.5rem 0; }
code { font-family: var(--mono); font-size: .92em; background: var(--surface-2); padding: .12em .38em; border-radius: 5px; color: var(--ink); }

/* Focus — always visible, never removed */
:focus-visible {
  outline: 3px solid var(--brand);
  outline-offset: 2px;
  border-radius: 4px;
}
.skip-link {
  position: absolute; left: 12px; top: -60px; z-index: 200;
  background: var(--navy); color: #fff; padding: .7rem 1.1rem;
  border-radius: var(--r-sm); font-weight: 600; text-decoration: none;
  transition: top .15s ease;
}
.skip-link:focus { top: 12px; color: #fff; }

/* --- 3. Layout ---------------------------------------------------------- */
.wrap { width: 100%; max-width: var(--wrap); margin-inline: auto; padding-inline: 20px; }
.wrap-narrow { max-width: var(--wrap-narrow); }
/* Reading measures: tool pages keep room for the calculator card, article and
   legal pages sit in a narrower centred column. */
.wrap-article { max-width: 940px; }
.wrap-read { max-width: 780px; }
.section { padding-block: clamp(3rem, 2rem + 4vw, 5.5rem); }
.section--tight { padding-block: clamp(2.25rem, 1.6rem + 2.6vw, 3.5rem); }
.section--surface { background: var(--surface); }
.section--navy { background: var(--navy); color: #C7D6E8; }
.section--navy h2, .section--navy h3 { color: #fff; }
.section-head { max-width: 660px; margin-bottom: 2.25rem; }
.section-head p { color: var(--muted); font-size: 1.05rem; margin-bottom: 0; }
.section-head--center { margin-inline: auto; text-align: center; }
.eyebrow {
  display: inline-block; font-size: .77rem; font-weight: 700; letter-spacing: .09em;
  text-transform: uppercase; color: var(--brand); margin-bottom: .65rem;
}
.section--navy .eyebrow { color: #7FB0F5; }
.grid { display: grid; gap: 20px; }
.grid-2 { grid-template-columns: repeat(auto-fit, minmax(300px, 1fr)); }
.grid-3 { grid-template-columns: repeat(auto-fit, minmax(272px, 1fr)); }
.grid-4 { grid-template-columns: repeat(auto-fit, minmax(230px, 1fr)); }

/* --- 4. Buttons --------------------------------------------------------- */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: .5rem;
  font: inherit; font-weight: 600; font-size: .97rem;
  padding: .78rem 1.35rem; border-radius: 10px; border: 1px solid transparent;
  cursor: pointer; text-decoration: none; white-space: nowrap;
  transition: background-color .16s ease, border-color .16s ease, color .16s ease, transform .16s ease, box-shadow .16s ease;
}
.btn:active { transform: translateY(1px); }
.btn-primary { background: var(--brand); color: #fff; box-shadow: var(--shadow-sm); }
.btn-primary:hover { background: var(--brand-dark); color: #fff; }
.btn-secondary { background: var(--paper); color: var(--ink); border-color: var(--line-strong); }
.btn-secondary:hover { background: var(--surface); color: var(--ink); border-color: var(--muted); }
.btn-ghost { background: transparent; color: var(--brand); padding-inline: .25rem; }
.btn-ghost:hover { color: var(--brand-dark); text-decoration: underline; }
.btn-block { width: 100%; }
.btn-lg { padding: .95rem 1.7rem; font-size: 1.02rem; }
.section--navy .btn-secondary { background: transparent; color: #fff; border-color: rgba(255,255,255,.32); }
.section--navy .btn-secondary:hover { background: rgba(255,255,255,.08); color: #fff; }

/* --- 5. Header ---------------------------------------------------------- */
.site-header {
  position: sticky; top: 0; z-index: 100;
  background: rgba(255,255,255,.92);
  backdrop-filter: saturate(180%) blur(10px);
  border-bottom: 1px solid var(--line);
}
.header-inner { display: flex; align-items: center; gap: 1.5rem; min-height: 68px; }
.logo { display: inline-flex; align-items: center; gap: .58rem; text-decoration: none; flex-shrink: 0; }
.logo svg { width: 26px; height: 26px; flex-shrink: 0; }
.logo-text { font-size: 1.16rem; font-weight: 700; letter-spacing: -.028em; color: var(--navy); }
.logo-text b { font-weight: 700; color: var(--brand); }
.main-nav { margin-left: auto; }
.main-nav ul { display: flex; align-items: center; gap: .2rem; list-style: none; margin: 0; padding: 0; }
.main-nav li { margin: 0; }
.main-nav a {
  display: block; padding: .5rem .7rem; border-radius: 8px; white-space: nowrap;
  font-size: .93rem; font-weight: 550; color: var(--body); text-decoration: none;
  transition: background-color .15s ease, color .15s ease;
}
.main-nav .nav-cta { display: none; }
.main-nav a:hover { background: var(--surface); color: var(--ink); }
.main-nav a[aria-current="page"] { color: var(--brand); background: var(--brand-soft); }
.header-cta { flex-shrink: 0; }
.nav-toggle {
  display: none; margin-left: auto; background: var(--paper); border: 1px solid var(--line-strong);
  border-radius: 9px; width: 42px; height: 42px; cursor: pointer; color: var(--ink);
  align-items: center; justify-content: center; padding: 0;
}
.nav-toggle svg { width: 20px; height: 20px; }
.nav-toggle .icon-close { display: none; }
.nav-toggle[aria-expanded="true"] .icon-close { display: block; }
.nav-toggle[aria-expanded="true"] .icon-open { display: none; }

@media (max-width: 900px) {
  .nav-toggle { display: inline-flex; }
  .header-cta { display: none; }
  .main-nav {
    display: none; position: absolute; inset-inline: 0; top: 100%;
    background: var(--paper); border-bottom: 1px solid var(--line);
    box-shadow: var(--shadow); padding: .6rem 20px 1.1rem;
  }
  .main-nav.is-open { display: block; }
  .main-nav ul { flex-direction: column; align-items: stretch; gap: 0; }
  .main-nav a { padding: .78rem .6rem; border-radius: 8px; font-size: 1rem; }
  .main-nav li + li a { border-top: 1px solid var(--line); border-radius: 0; }
  .main-nav .nav-cta { margin-top: .8rem; }
  .main-nav .nav-cta a { background: var(--brand); color: #fff; text-align: center; border-radius: 10px; border-top: 0; }
}

/* --- 6. Hero ------------------------------------------------------------ */
.hero-inner { max-width: 800px; margin-inline: auto; text-align: center; }
.hero-inner .hero-lede { margin-inline: auto; }
.hero-inner .hero-actions, .hero-inner .hero-trust { justify-content: center; }

.hero {
  background: #F7FAFF;
  padding-block: clamp(2.75rem, 2rem + 4vw, 4.5rem) clamp(1.75rem, 1.2rem + 2vw, 2.5rem);
}
.hero + .featured-band { background: linear-gradient(180deg, #F7FAFF 0%, #FFFFFF 78%); }
.hero-grid { display: grid; gap: clamp(2rem, 1rem + 4vw, 3.5rem); align-items: center; grid-template-columns: 1fr; }
@media (min-width: 960px) { .hero-grid { grid-template-columns: 1.02fr .98fr; } }
.hero h1 { margin-bottom: .55rem; }
.hero-lede { font-size: clamp(1.03rem, .98rem + .35vw, 1.16rem); color: var(--body); max-width: 40em; margin-bottom: 1.6rem; }
.hero-actions { display: flex; flex-wrap: wrap; gap: .75rem; margin-bottom: 1.75rem; }
.hero-trust { display: flex; flex-wrap: wrap; gap: .5rem 1.4rem; list-style: none; margin: 0; padding: 0; }
.hero-trust li { display: flex; align-items: center; gap: .42rem; font-size: .89rem; color: var(--muted); margin: 0; }
.hero-trust svg { width: 15px; height: 15px; color: var(--accent); flex-shrink: 0; }

/* --- 7. Cards ----------------------------------------------------------- */
.card {
  background: var(--paper); border: 1px solid var(--line); border-radius: var(--r-lg);
  padding: 1.5rem;
}
.card-link {
  display: flex; flex-direction: column; text-decoration: none; color: inherit;
  transition: border-color .16s ease, box-shadow .16s ease, transform .16s ease;
}
.card-link:hover { border-color: var(--line-strong); box-shadow: var(--shadow); transform: translateY(-2px); color: inherit; }
.card-icon {
  width: 40px; height: 40px; border-radius: 10px; background: var(--brand-soft); color: var(--brand);
  display: inline-flex; align-items: center; justify-content: center; margin-bottom: 1rem;
}
.card-icon svg { width: 20px; height: 20px; }
.card h3 { font-size: 1.06rem; margin-bottom: .35rem; }
.card p { font-size: .93rem; color: var(--muted); margin-bottom: 1rem; }
.card-cta {
  margin-top: auto; font-size: .9rem; font-weight: 620; color: var(--brand);
  display: inline-flex; align-items: center; gap: .3rem;
}
.card-cta svg { width: 14px; height: 14px; transition: transform .16s ease; }
.card-link:hover .card-cta svg { transform: translateX(3px); }

/* --- 8. Calculator shell ------------------------------------------------ */
.calc {
  background: var(--paper); border: 1px solid var(--line); border-radius: var(--r-xl);
  box-shadow: var(--shadow); overflow: hidden;
  container-type: inline-size; container-name: calc;
}
.calc-head {
  display: flex; align-items: center; gap: .6rem 1rem;
  padding: 1rem 1.25rem; border-bottom: 1px solid var(--line); background: var(--surface);
}
@media (max-width: 430px) {
  .calc-head .currency-picker label { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
}
.calc-head h2, .calc-head h3, .calc-head .calc-title { margin: 0; font-size: 1.05rem; color: var(--ink); font-weight: 700; }
.calc-head .currency-picker { margin-left: auto; }
.calc-body { display: grid; grid-template-columns: 1fr; }
.calc-inputs { padding: 1.5rem; border-bottom: 1px solid var(--line); }
/* The card adapts to the width of its own container, not the viewport, so the
   same component works in a narrow column and at full page width. */
@container calc (min-width: 760px) {
  .calc-body { grid-template-columns: minmax(310px, 370px) 1fr; }
  .calc-inputs { border-bottom: 0; border-right: 1px solid var(--line); }
}
@supports not (container-type: inline-size) {
  @media (min-width: 920px) {
    .calc-body { grid-template-columns: minmax(310px, 370px) 1fr; }
    .calc-inputs { border-bottom: 0; border-right: 1px solid var(--line); }
  }
}
.calc-output { padding: 1.5rem; background: var(--surface); }

.field { margin-bottom: 1.15rem; }
.field:last-child { margin-bottom: 0; }
.field > label, .field-label {
  display: block; font-size: .88rem; font-weight: 600; color: var(--ink); margin-bottom: .4rem;
}
.field-hint { display: block; font-size: .8rem; color: var(--muted); font-weight: 400; margin-top: .25rem; }
.input-shell { position: relative; display: flex; align-items: center; }
.input-prefix, .input-suffix {
  position: absolute; font-size: .93rem; color: var(--muted); pointer-events: none; font-weight: 500;
}
.input-prefix { left: .8rem; }
.input-suffix { right: .8rem; }
input[type="number"], input[type="text"], input[type="email"], select, textarea {
  width: 100%; font: inherit; font-size: .97rem; color: var(--ink);
  background: var(--paper); border: 1px solid var(--line-strong); border-radius: 10px;
  padding: .62rem .8rem; transition: border-color .15s ease, box-shadow .15s ease;
  -moz-appearance: textfield;
}
.has-prefix input { padding-left: 1.9rem; }
.has-suffix input { padding-right: 2.4rem; }
input:hover, select:hover { border-color: var(--muted); }
input:focus, select:focus, textarea:focus {
  outline: none; border-color: var(--brand); box-shadow: 0 0 0 3px var(--brand-soft);
}
input:focus-visible, select:focus-visible, textarea:focus-visible { outline: 3px solid var(--brand); outline-offset: 1px; }
input[type=number]::-webkit-outer-spin-button, input[type=number]::-webkit-inner-spin-button { -webkit-appearance: none; margin: 0; }
select {
  appearance: none;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 20 20' fill='%236B7A90'%3E%3Cpath d='M5.5 7.5 10 12l4.5-4.5' stroke='%236B7A90' stroke-width='1.6' fill='none' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E");
  background-repeat: no-repeat; background-position: right .6rem center; background-size: 18px;
  padding-right: 2.1rem;
}
input[type="range"] {
  width: 100%; margin-top: .6rem; accent-color: var(--brand); height: 22px; padding: 0; border: 0; background: transparent;
}
.field-error { display: none; font-size: .82rem; color: #C0392B; margin-top: .35rem; font-weight: 500; }
.field.is-invalid input { border-color: #C0392B; }
.field.is-invalid input:focus { box-shadow: 0 0 0 3px rgba(192,57,43,.14); }
.field.is-invalid .field-error { display: block; }
.field-row { display: grid; grid-template-columns: 1fr 1fr; gap: .75rem; }
.calc-actions { display: flex; gap: .6rem; margin-top: 1.35rem; }

.currency-picker { display: inline-flex; align-items: center; gap: .45rem; font-size: .85rem; color: var(--muted); }
.currency-picker select { width: auto; padding: .34rem 1.9rem .34rem .6rem; font-size: .85rem; border-radius: 8px; }

/* Results */
.result-headline {
  background: var(--navy); color: #fff; border-radius: var(--r-lg); padding: 1.35rem 1.5rem; margin-bottom: 1rem;
}
.result-headline .result-label { font-size: .84rem; color: #9CB6D4; font-weight: 600; letter-spacing: .02em; margin-bottom: .2rem; }
.result-headline .result-value { font-size: clamp(2rem, 1.5rem + 2vw, 2.7rem); font-weight: 700; letter-spacing: -.03em; line-height: 1.05; color: #fff; }
.result-headline .result-note { font-size: .85rem; color: #9CB6D4; margin-top: .45rem; }
.result-tiles { display: grid; grid-template-columns: repeat(auto-fit, minmax(140px, 1fr)); gap: .7rem; margin-bottom: 1.25rem; min-height: 76px; }
.tile { background: var(--paper); border: 1px solid var(--line); border-radius: var(--r); padding: .85rem .95rem; }
.tile .tile-label { display: flex; align-items: center; gap: .4rem; font-size: .8rem; color: var(--muted); font-weight: 550; margin-bottom: .18rem; }
.tile .tile-value { font-size: 1.22rem; font-weight: 700; color: var(--ink); letter-spacing: -.02em; }
.swatch { width: 10px; height: 10px; border-radius: 3px; flex-shrink: 0; }
.swatch-1 { background: var(--series-1); }
.swatch-2 { background: var(--series-2); }

/* Split bar (part-to-whole) */
.splitbar { margin-bottom: 1.25rem; min-height: 44px; }
.splitbar-track { display: flex; height: 14px; border-radius: 7px; overflow: hidden; background: var(--surface-2); gap: 2px; }
.splitbar-seg { height: 100%; min-width: 2px; transition: width .3s ease; }
.splitbar-seg.s1 { background: var(--series-1); }
.splitbar-seg.s2 { background: var(--series-2); }
.splitbar-legend { display: flex; flex-wrap: wrap; gap: .35rem 1.1rem; margin-top: .6rem; font-size: .83rem; color: var(--muted); }
.splitbar-legend span { display: inline-flex; align-items: center; gap: .4rem; }

/* Chart */
.chart-wrap { position: relative; background: var(--paper); border: 1px solid var(--line); border-radius: var(--r); padding: 1rem .9rem .6rem; }
.chart-wrap h3, .chart-wrap h4 { font-size: .88rem; color: var(--ink); margin: 0 0 .1rem; font-weight: 650; letter-spacing: -.01em; }
.chart-sub { font-size: .8rem; color: var(--muted); margin: 0 0 .7rem; }
.cv-chart { width: 100%; height: auto; display: block; overflow: visible; touch-action: pan-y; }
/* Height reserved before the chart is drawn, so painting it shifts nothing. */
[data-cv-chart] { min-height: 250px; }
.cv-chart text { font-family: var(--sans); fill: var(--muted); font-size: 11px; }
.cv-chart .grid-line { stroke: var(--grid); stroke-width: 1; }
.cv-chart .axis-line { stroke: var(--axis); stroke-width: 1; }
.cv-chart .bar-1 { fill: var(--series-1); }
.cv-chart .bar-2 { fill: var(--series-2); }
.cv-chart .hover-band { fill: transparent; }
.cv-chart .hover-band:hover, .cv-chart .hover-band:focus { fill: rgba(10,37,64,.05); outline: none; }
.cv-chart .crosshair { stroke: var(--navy); stroke-width: 1; stroke-dasharray: 3 3; opacity: 0; }
.chart-tooltip {
  position: absolute; pointer-events: none; opacity: 0; transform: translate(-50%, -100%);
  background: var(--navy); color: #fff; border-radius: 10px; padding: .55rem .7rem;
  font-size: .8rem; line-height: 1.45; white-space: nowrap; box-shadow: var(--shadow-lg);
  transition: opacity .12s ease; z-index: 5;
}
.chart-tooltip.is-visible { opacity: 1; }
.chart-tooltip .tt-title { font-weight: 700; color: #fff; margin-bottom: .2rem; }
.chart-tooltip .tt-row { display: flex; align-items: center; gap: .4rem; color: #C7D6E8; }
.chart-tooltip .tt-row b { color: #fff; font-weight: 600; margin-left: auto; padding-left: .8rem; }
.chart-legend { display: flex; flex-wrap: wrap; gap: .3rem 1.1rem; font-size: .82rem; color: var(--muted); margin-top: .5rem; }
.chart-legend span { display: inline-flex; align-items: center; gap: .4rem; }

/* Data table fallback (accessibility relief + AI/crawler readable) */
.data-toggle {
  margin-top: .9rem; border-top: 1px solid var(--line); padding-top: .7rem;
}
.data-toggle summary {
  cursor: pointer; font-size: .85rem; font-weight: 600; color: var(--brand); list-style: none;
  display: inline-flex; align-items: center; gap: .35rem; padding-block: .3rem; min-height: 24px;
}
.data-toggle summary::-webkit-details-marker { display: none; }
.data-toggle summary::before { content: "▸"; font-size: .8em; transition: transform .15s ease; }
.data-toggle[open] summary::before { transform: rotate(90deg); }
.data-toggle table { margin-top: .8rem; }

/* --- 9. Tables ---------------------------------------------------------- */
.table-scroll { overflow-x: auto; -webkit-overflow-scrolling: touch; margin-bottom: 1.4rem; }
table { width: 100%; border-collapse: collapse; font-size: .92rem; font-variant-numeric: tabular-nums; }
caption { text-align: left; font-size: .85rem; color: var(--muted); padding-bottom: .55rem; }
th, td { text-align: left; padding: .62rem .8rem; border-bottom: 1px solid var(--line); }
thead th { font-size: .8rem; text-transform: uppercase; letter-spacing: .045em; color: var(--muted); font-weight: 700; background: var(--surface); white-space: nowrap; }
tbody tr:last-child td { border-bottom: 0; }
td:not(:first-child), th:not(:first-child) { text-align: right; }
.table-card { border: 1px solid var(--line); border-radius: var(--r); overflow: hidden; }

/* --- 10. Prose ---------------------------------------------------------- */
.prose { max-width: 74ch; }
.prose h2 { margin-top: 2.6rem; }
.prose h3 { margin-top: 1.9rem; }
.prose h2:first-child, .prose h3:first-child { margin-top: 0; }
.prose > p:first-of-type { font-size: 1.06rem; }
.lede { font-size: 1.08rem; color: var(--body); }
.answer-box {
  background: var(--brand-soft); border-left: 3px solid var(--brand);
  border-radius: 0 var(--r) var(--r) 0; padding: 1.1rem 1.25rem; margin-bottom: 1.6rem;
}
.answer-box p:last-child { margin-bottom: 0; }
.formula {
  background: var(--navy); color: #E4EDF9; border-radius: var(--r); padding: 1.15rem 1.25rem;
  font-family: var(--mono); font-size: .93rem; line-height: 1.7; overflow-x: auto; margin-bottom: 1.2rem;
}
.formula .fx { display: block; color: #fff; font-size: 1.02rem; margin-bottom: .6rem; }
.formula dl { margin: 0; display: grid; grid-template-columns: auto 1fr; gap: .25rem .8rem; font-size: .86rem; }
.formula dt { color: #7FB0F5; font-weight: 600; }
.formula dd { margin: 0; color: #C7D6E8; }
.callout {
  border: 1px solid var(--line); border-left: 3px solid var(--accent); background: var(--accent-soft);
  border-radius: 0 var(--r) var(--r) 0; padding: 1rem 1.2rem; margin-bottom: 1.4rem; font-size: .95rem;
}
.callout strong { display: block; margin-bottom: .2rem; }
.note-muted { font-size: .875rem; color: var(--muted); }

/* FAQ */
.faq-list { border-top: 1px solid var(--line); }
.faq-item { border-bottom: 1px solid var(--line); }
.faq-item summary {
  cursor: pointer; list-style: none; padding: 1.05rem 2.2rem 1.05rem 0; position: relative;
  font-weight: 620; color: var(--ink); font-size: 1.01rem;
}
.faq-item summary::-webkit-details-marker { display: none; }
.faq-item summary::after {
  content: ""; position: absolute; right: .35rem; top: 1.45rem; width: 10px; height: 10px;
  border-right: 2px solid var(--muted); border-bottom: 2px solid var(--muted);
  transform: rotate(45deg); transition: transform .18s ease;
}
.faq-item[open] summary::after { transform: rotate(-135deg); top: 1.65rem; }
.faq-item summary:hover { color: var(--brand); }
.faq-answer { padding: 0 0 1.15rem; color: var(--body); }
.faq-answer p:last-child { margin-bottom: 0; }

/* --- 11. Breadcrumbs ---------------------------------------------------- */
.breadcrumbs { padding-block: .7rem; border-bottom: 1px solid var(--line); background: var(--surface); }
.breadcrumbs ol { display: flex; flex-wrap: wrap; align-items: center; gap: .3rem; list-style: none; margin: 0; padding: 0; font-size: .85rem; }
.breadcrumbs li { display: flex; align-items: center; gap: .3rem; margin: 0; color: var(--muted); }
.breadcrumbs li + li::before { content: "/"; color: var(--line-strong); }
.breadcrumbs a { color: var(--muted); text-decoration: none; display: inline-block; padding-block: .22rem; }
.breadcrumbs a:hover { color: var(--brand); text-decoration: underline; }
.breadcrumbs [aria-current="page"] { color: var(--ink); font-weight: 550; }

/* --- 12. Page header ---------------------------------------------------- */
.page-head { padding-block: clamp(2rem, 1.5rem + 2.4vw, 3.25rem) 1.6rem; }
.page-head h1 { margin-bottom: .5rem; }
.page-head .lede { max-width: 62ch; margin-bottom: 1rem; }
.byline {
  display: flex; flex-wrap: wrap; align-items: center; gap: .4rem .8rem;
  font-size: .855rem; color: var(--muted); padding-top: .3rem;
}
.byline .dot { width: 3px; height: 3px; border-radius: 50%; background: var(--line-strong); }
@media (max-width: 560px) { .byline { flex-direction: column; align-items: flex-start; gap: .25rem; } .byline .dot { display: none; } }
.byline a { color: var(--muted); display: inline-block; padding-block: .1rem; }

/* --- 13. Related / lists ------------------------------------------------ */
.related-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(230px, 1fr)); gap: 14px; }
.related-item {
  display: block; padding: .95rem 1.05rem; border: 1px solid var(--line); border-radius: var(--r);
  text-decoration: none; background: var(--paper); transition: border-color .15s ease, box-shadow .15s ease;
}
.related-item:hover { border-color: var(--line-strong); box-shadow: var(--shadow-sm); }
.related-item .ri-title { display: block; font-weight: 620; color: var(--ink); font-size: .96rem; margin-bottom: .12rem; }
.related-item .ri-desc { display: block; font-size: .85rem; color: var(--muted); }

.cat-block { margin-bottom: 3rem; }
.cat-block:last-child { margin-bottom: 0; }
.cat-head { display: flex; align-items: baseline; gap: .8rem; margin-bottom: 1.15rem; padding-bottom: .7rem; border-bottom: 1px solid var(--line); }
.cat-head h2 { margin: 0; font-size: 1.35rem; }
.cat-head .cat-count { font-size: .84rem; color: var(--muted); margin-left: auto; }

.article-list { list-style: none; padding: 0; margin: 0; }
.article-list li { margin: 0; border-bottom: 1px solid var(--line); }
.article-list a { display: block; padding: 1.2rem 0; text-decoration: none; }
.article-list a:hover .al-title { color: var(--brand); }
.al-title { display: block; font-weight: 660; color: var(--ink); font-size: 1.08rem; margin-bottom: .25rem; letter-spacing: -.01em; }
.al-desc { display: block; color: var(--muted); font-size: .93rem; }
.al-meta { display: block; font-size: .8rem; color: var(--muted); margin-top: .4rem; }

/* --- 14. Ad slots ------------------------------------------------------- */
/* Slots are reserved in the markup but render nothing until advertising is
   switched on with data-ads="on" on <body> — so the page never shows an empty
   placeholder box to a reader. When enabled, the height is reserved up front
   so filling the slot causes no layout shift. */
.ad-slot { display: none; }
body[data-ads="on"] .ad-slot {
  display: block; margin-block: 2.25rem; min-height: 90px; text-align: center;
  contain: layout paint;
}
body[data-ads="on"] .ad-slot::before {
  content: "Advertisement"; display: block; font-size: .7rem; letter-spacing: .08em;
  text-transform: uppercase; color: var(--muted); margin-bottom: .4rem;
}

/* --- 15. Footer --------------------------------------------------------- */
.site-footer { background: var(--navy); color: #A7BCD4; padding-block: 3.25rem 1.75rem; font-size: .92rem; }
.footer-top { display: grid; gap: 2rem; grid-template-columns: 1fr; margin-bottom: 2.5rem; }
@media (min-width: 720px) { .footer-top { grid-template-columns: 1.4fr repeat(3, 1fr); gap: 2.5rem; } }
.footer-brand .logo-text { color: #fff; }
.footer-brand .logo-text b { color: #7FB0F5; }
.footer-brand p { margin-top: .8rem; max-width: 34ch; color: #A7BCD4; font-size: .9rem; }
.footer-col h3 { font-size: .8rem; text-transform: uppercase; letter-spacing: .08em; color: #fff; margin-bottom: .9rem; }
.footer-col ul { list-style: none; margin: 0; padding: 0; }
.footer-col li { margin-bottom: 0; }
.footer-col a { color: #A7BCD4; text-decoration: none; display: inline-block; padding-block: .32rem; }
.footer-col a:hover { color: #fff; text-decoration: underline; }
.footer-bottom {
  border-top: 1px solid rgba(255,255,255,.12); padding-top: 1.5rem;
  display: flex; flex-wrap: wrap; gap: .6rem 1.5rem; align-items: center; font-size: .84rem; color: #8CA3BE;
}
.footer-bottom .footer-legal { margin-left: auto; display: flex; flex-wrap: wrap; gap: .5rem 1.1rem; }
.footer-bottom a { color: #8CA3BE; text-decoration: none; display: inline-block; padding-block: .28rem; }
.footer-bottom a:hover { color: #fff; }
.footer-disclaimer {
  margin-top: 1.2rem; font-size: .79rem; line-height: 1.6; color: #7D93AE; max-width: 90ch;
}

/* --- 16. Utility -------------------------------------------------------- */
.visually-hidden {
  position: absolute !important; width: 1px; height: 1px; padding: 0; margin: -1px;
  overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; border: 0;
}
.text-center { text-align: center; }
.mt-0 { margin-top: 0; }
.mb-0 { margin-bottom: 0; }
.stack > * + * { margin-top: 1.1rem; }
[hidden] { display: none !important; }

/* CTA band */
.cta-band { background: var(--navy); border-radius: var(--r-xl); padding: clamp(1.75rem, 1.2rem + 2.4vw, 3rem); text-align: center; }
.cta-band h2 { color: #fff; margin-bottom: .5rem; }
.cta-band p { color: #A7BCD4; max-width: 52ch; margin-inline: auto; margin-bottom: 1.5rem; }
.cta-band .btn-primary { background: #fff; color: var(--navy); }
.cta-band .btn-primary:hover { background: #E4EDF9; color: var(--navy); }

/* Stat strip */
.stat-strip { display: grid; grid-template-columns: repeat(auto-fit, minmax(160px, 1fr)); gap: 1px; background: var(--line); border: 1px solid var(--line); border-radius: var(--r-lg); overflow: hidden; }
.stat-strip div { background: var(--paper); padding: 1.25rem 1.35rem; }
.stat-strip dt { font-size: .82rem; color: var(--muted); font-weight: 550; margin-bottom: .2rem; }
.stat-strip dd { margin: 0; font-size: 1.45rem; font-weight: 700; color: var(--ink); letter-spacing: -.02em; }

/* Print */
@media print {
  .site-header, .site-footer, .ad-slot, .calc-actions, .breadcrumbs, .skip-link { display: none !important; }
  body { font-size: 11pt; color: #000; }
  .calc, .card { border-color: #999; box-shadow: none; }
  a[href^="http"]::after { content: " (" attr(href) ")"; font-size: .8em; color: #555; }
}

/* Forced colors / high contrast */
@media (forced-colors: active) {
  .btn-primary, .result-headline { forced-color-adjust: none; }
  .card-link, .related-item, .calc { border: 1px solid CanvasText; }
}


/* --- 17. Featured calculator band --------------------------------------- */
.featured-band {
  background: linear-gradient(180deg, #F7FAFF 0%, #FFFFFF 100%);
  border-bottom: 1px solid var(--line);
  padding-bottom: clamp(2.5rem, 2rem + 3vw, 4rem);
}
.featured-head { text-align: center; margin-bottom: 1.5rem; }
.featured-head h2 { margin: 0 0 .35rem; }
.featured-head p { margin: 0 auto .6rem; color: var(--muted); font-size: .97rem; max-width: 52ch; }
.featured-head .featured-link { font-weight: 600; font-size: .93rem; display: inline-flex;
  align-items: center; gap: .35rem; }

@media (max-width: 520px) {
  .hero-actions { flex-direction: column; align-items: stretch; }
  .hero-actions .btn { width: 100%; }
  .hero-trust { flex-direction: column; align-items: center; gap: .45rem; }
}

/* Checkbox fields: the whole label row is the target, and the box itself is
   large enough to hit comfortably on a phone. */
.field-label input[type="checkbox"] {
  width: 20px; height: 20px; min-width: 20px; accent-color: var(--brand); cursor: pointer;
}
.field > .field-label:has(input[type="checkbox"]) { padding-block: .3rem; min-height: 30px; }

.calc-noscript {
  border: 1px solid var(--line-strong); background: var(--paper); border-radius: var(--r);
  padding: .9rem 1.05rem; font-size: .9rem; color: var(--body); margin-bottom: 1rem;
}

/* iOS Safari zooms the page when a focused form control is under 16px. Hold controls at 16px on touch and small screens. */
@media (max-width: 900px), (pointer: coarse) {
  input[type="number"], input[type="text"], input[type="email"], select, textarea, .currency-picker select { font-size: 16px; }
}
