/* ==========================================================================
   hsalimit.com — 2026 HSA Triple-Tax Optimizer
   House style: calm, authoritative, health-finance. Source Serif 4 display,
   Source Sans 3 UI/body, Source Code Pro for figures & math.
   --------------------------------------------------------------------------
   NOTE: the above-the-fold subset of this file (the :root block, base rules,
   .site-header*, .hero*) is mirrored as an inline <style> in index.html's
   <head> for LCP. Keep both copies in sync — see docs/build.md.
   ========================================================================== */

:root {
  /* Surfaces */
  --paper: #f6f8f7;
  --card: #ffffff;
  --card-sunk: #f3f6f4;
  --line: #e2e8e4;
  --line-soft: #eef2f0;
  --line-strong: #d3ddd7;

  /* Ink */
  --ink: #14211b;
  --ink-soft: #38463f;
  --muted: #66756d;
  --faint: #93a09a;

  /* Brand — forest teal-green */
  --brand: #1f7a5c;
  --brand-deep: #15463a;
  --brand-press: #18684e;
  --brand-tint: #eaf3ef;
  --brand-tint-2: #dcebe4;

  /* Warm secondary — used for Medicare/flag callouts (calm clay, not alarm red) */
  --clay: #b5762e;
  --clay-deep: #8a5717;
  --clay-tint: #f7efe1;
  --clay-line: #ecd9b8;

  /* A restrained alert for true hard-stops ($0 limit, disqualification) */
  --stop: #a6402f;
  --stop-tint: #f7e9e6;
  --stop-line: #ecc9c1;

  /* Typography */
  --serif: "Source Serif 4", Georgia, "Times New Roman", serif;
  --sans: "Source Sans 3", -apple-system, BlinkMacSystemFont, "Segoe UI", system-ui, sans-serif;
  --mono: "Source Code Pro", ui-monospace, "SFMono-Regular", Menlo, monospace;

  --radius: 14px;
  --radius-sm: 9px;
  --radius-lg: 20px;
  --shadow-card: 0 1px 2px rgba(20,33,27,.04), 0 6px 22px rgba(20,33,27,.05);
  --shadow-pop: 0 12px 40px rgba(20,33,27,.14);
  --maxw: 1180px;
}

* { box-sizing: border-box; }

html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; }

body {
  margin: 0;
  background: var(--paper);
  color: var(--ink);
  font-family: var(--sans);
  font-size: 17px;
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  text-rendering: optimizeLegibility;
  overflow-x: hidden;
}

h1, h2, h3, h4 { font-family: var(--serif); font-weight: 600; color: var(--ink); margin: 0; line-height: 1.12; letter-spacing: -0.01em; }

a { color: var(--brand-deep); text-decoration-color: color-mix(in oklab, var(--brand) 35%, transparent); text-underline-offset: 2px; }
a:hover { color: var(--brand-press); }

.wrap { max-width: var(--maxw); margin: 0 auto; padding: 0 24px; }

.mono { font-family: var(--mono); }
.eyebrow {
  font-family: var(--mono);
  font-size: 12.5px;
  letter-spacing: .14em;
  text-transform: uppercase;
  color: var(--brand);
  font-weight: 600;
}
.visually-hidden { position:absolute; width:1px; height:1px; padding:0; margin:-1px; overflow:hidden; clip:rect(0 0 0 0); white-space:nowrap; border:0; }

/* ============================ HEADER ============================ */
.site-header {
  position: sticky; top: 0; z-index: 50;
  background: color-mix(in oklab, var(--paper) 86%, transparent);
  backdrop-filter: saturate(1.4) blur(10px);
  border-bottom: 1px solid var(--line);
}
.site-header__inner { display: flex; align-items: center; gap: 20px; height: 64px; }
.brand { display: flex; align-items: center; gap: 11px; text-decoration: none; color: var(--ink); }
.brand__mark { width: 30px; height: 30px; border-radius: 8px; display: block; box-shadow: 0 1px 2px rgba(20,33,27,.18); }
.brand__name { font-family: var(--serif); font-weight: 600; font-size: 19px; letter-spacing: -0.01em; }
.brand__tld { color: var(--brand); }
.site-nav { margin-left: auto; display: flex; align-items: center; gap: 4px; }
.site-nav a {
  font-size: 14.5px; color: var(--ink-soft); text-decoration: none;
  padding: 8px 12px; border-radius: 8px; font-weight: 500; white-space: nowrap;
}
.site-nav a:hover { background: var(--brand-tint); color: var(--brand-deep); }
.nav-toggle { display: none; }

@media (max-width: 860px) {
  .site-nav { display: none; }
}

/* ============================ HERO ============================ */
.hero { padding: 54px 0 30px; }
.hero__inner { max-width: 820px; }
.hero h1 {
  font-size: clamp(32px, 5.4vw, 52px);
  line-height: 1.05;
  margin: 14px 0 0;
  text-wrap: balance;
}
.hero h1 .accent { color: var(--brand-deep); }
.hero__sub {
  font-size: clamp(17px, 2.2vw, 20px);
  color: var(--ink-soft);
  margin: 18px 0 0;
  max-width: 660px;
  text-wrap: pretty;
}
.hero__meta {
  display: flex; flex-wrap: wrap; gap: 8px 18px; align-items: center;
  margin-top: 22px; font-size: 13px; color: var(--muted); font-family: var(--mono);
}
.hero__meta .dot { width: 5px; height: 5px; border-radius: 50%; background: var(--brand); display: inline-block; }
.hero__meta strong { color: var(--ink-soft); font-weight: 600; }

/* ============================ AD SLOTS ============================ */
.ad-slot {
  position: relative;
  display: flex; align-items: center; justify-content: center;
  margin: 0 auto;
  border-radius: var(--radius-sm);
  overflow: hidden;
}
.ad-slot-label {
  position: absolute; top: 6px; left: 8px;
  font-family: var(--mono); font-size: 9.5px; letter-spacing: .12em; text-transform: uppercase;
  color: var(--faint); display: none;
}
/* Per docs/ad_slots.md (live behavior): slots reserve their dimensions via
   min-height to prevent CLS, but render NOTHING visible until AdSense fills
   them — no dashed chrome, no debug dimension labels. The "Advertisement"
   label and a subtle frame appear only on a real fill. */
.ad-slot:has(ins[data-ad-status="filled"]) {
  background: var(--card-sunk);
  border: 1px solid var(--line);
}
.ad-slot:has(ins[data-ad-status="filled"]) .ad-slot-label { display: block; }
.ad-slot ins[data-ad-status="unfilled"] { display: none; }
.ad-slot ins:not([data-ad-status]) { display: none; }
/* .ad-fallback is a design-preview-only dimension hint; never shown live
   (covers both the inline slots and the mobile-sticky anchor). */
.ad-fallback { display: none; }
.ad-slot--top-banner { min-height: 90px; max-width: 728px; margin-top: 8px; margin-bottom: 8px; }
.ad-slot--pre-result { min-height: 250px; max-width: 320px; }
.ad-slot--mid-content { min-height: 90px; max-width: 728px; margin: 36px auto; }
.ad-slot--pre-faq { min-height: 90px; max-width: 728px; margin: 36px auto; }
.ad-slot--sidebar { min-height: 600px; width: 300px; }

@media (max-width: 740px) {
  .ad-slot--top-banner { min-height: 100px; max-width: 320px; }
  .ad-slot--mid-content, .ad-slot--pre-faq { min-height: 250px; max-width: 300px; }
}

/* Mobile sticky anchor */
.ad-sticky {
  position: fixed; left: 0; right: 0; bottom: 0; z-index: 60;
  display: none;
  background: color-mix(in oklab, var(--card) 96%, transparent);
  border-top: 1px solid var(--line);
  box-shadow: 0 -4px 18px rgba(20,33,27,.08);
  backdrop-filter: blur(8px);
  padding: 6px 0 calc(6px + env(safe-area-inset-bottom));
}
.ad-sticky__inner { display: flex; align-items: center; justify-content: center; min-height: 50px; position: relative; }
.ad-sticky__label { position:absolute; left: 12px; top: 4px; font-family: var(--mono); font-size: 9px; letter-spacing:.1em; text-transform: uppercase; color: var(--faint); }
.ad-sticky__close {
  position: absolute; right: 8px; top: 50%; transform: translateY(-50%);
  width: 26px; height: 26px; border-radius: 50%; border: 1px solid var(--line);
  background: var(--card); color: var(--muted); font-size: 15px; line-height: 1; cursor: pointer;
  display: flex; align-items: center; justify-content: center;
}
.ad-sticky__close:hover { color: var(--ink); border-color: var(--line-strong); }
@media (max-width: 860px) {
  .ad-sticky.is-on { display: block; }
  body.has-sticky-ad { padding-bottom: 64px; }
}

/* ============================ APP LAYOUT ============================ */
.app-grid { display: grid; grid-template-columns: minmax(0, 1fr) 300px; gap: 40px; align-items: start; padding-bottom: 40px; }
.app-main { min-width: 0; }
.app-rail { position: sticky; top: 84px; }
@media (max-width: 1040px) {
  .app-grid { grid-template-columns: 1fr; }
  .app-rail { display: none; }
}

/* ============================ CARDS ============================ */
.card {
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-card);
}
.card__head { padding: 22px 26px 0; }
.card__kicker { font-family: var(--mono); font-size: 11.5px; letter-spacing: .12em; text-transform: uppercase; color: var(--brand); font-weight: 600; }
.card__title { font-size: 23px; margin-top: 6px; }
.card__hint { color: var(--muted); font-size: 14.5px; margin-top: 6px; }

/* ============================ CALCULATOR ============================ */
.calc { scroll-margin-top: 80px; }
.calc__body { padding: 20px 26px 26px; }
.field-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 18px 22px; }
@media (max-width: 560px) { .field-grid { grid-template-columns: 1fr; } }
.field { display: flex; flex-direction: column; gap: 7px; min-width: 0; }
.field--full { grid-column: 1 / -1; }
.field > label, .field__label {
  font-size: 13.5px; font-weight: 600; color: var(--ink-soft);
  display: flex; align-items: center; gap: 7px;
}
.field__note { font-size: 12.5px; color: var(--muted); margin-top: -2px; }

/* Segmented control */
.seg { display: flex; background: var(--card-sunk); border: 1px solid var(--line); border-radius: 10px; padding: 3px; gap: 3px; }
.seg button {
  flex: 1; appearance: none; border: 0; background: transparent; cursor: pointer;
  font-family: var(--sans); font-size: 14px; font-weight: 600; color: var(--ink-soft);
  padding: 8px 10px; border-radius: 7px; transition: background .14s, color .14s, box-shadow .14s;
  white-space: nowrap;
}
.seg button[aria-pressed="true"] { background: var(--card); color: var(--brand-deep); box-shadow: 0 1px 2px rgba(20,33,27,.12), inset 0 0 0 1px var(--line); }
.seg button:hover:not([aria-pressed="true"]) { color: var(--ink); }

/* Selects & inputs */
select, input[type="number"], input[type="text"] {
  appearance: none; width: 100%; font-family: var(--sans); font-size: 15px; color: var(--ink);
  background: var(--card); border: 1px solid var(--line-strong); border-radius: 10px;
  padding: 10px 12px; line-height: 1.3; transition: border-color .14s, box-shadow .14s;
}
select {
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='14' height='14' viewBox='0 0 24 24' fill='none' stroke='%2366756d' stroke-width='2.4' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpolyline points='6 9 12 15 18 9'/%3E%3C/svg%3E");
  background-repeat: no-repeat; background-position: right 12px center; padding-right: 34px; cursor: pointer;
}
select:focus, input:focus { outline: none; border-color: var(--brand); box-shadow: 0 0 0 3px var(--brand-tint); }

.input-affix { position: relative; }
.input-affix .affix { position: absolute; top: 50%; transform: translateY(-50%); color: var(--muted); font-family: var(--mono); font-size: 14px; pointer-events: none; }
.input-affix .affix--pre { left: 12px; }
.input-affix .affix--post { right: 12px; }
.input-affix input.has-pre { padding-left: 26px; }
.input-affix input.has-post { padding-right: 34px; }

/* Stepper number */
.stepper { display: flex; align-items: stretch; }
.stepper input { border-radius: 0; text-align: center; border-left: 0; border-right: 0; }
.stepper button {
  width: 40px; border: 1px solid var(--line-strong); background: var(--card-sunk); cursor: pointer;
  font-size: 19px; color: var(--ink-soft); line-height: 1; display: flex; align-items: center; justify-content: center;
}
.stepper button:first-child { border-radius: 10px 0 0 10px; }
.stepper button:last-child { border-radius: 0 10px 10px 0; }
.stepper button:hover { background: var(--brand-tint); color: var(--brand-deep); }

/* Toggle row */
.toggle-row { display: flex; align-items: flex-start; gap: 12px; padding: 14px 16px; background: var(--card-sunk); border: 1px solid var(--line); border-radius: 12px; }
.toggle-row__text { flex: 1; min-width: 0; }
.toggle-row__text b { font-size: 14px; color: var(--ink); font-weight: 600; }
.toggle-row__text span { display: block; font-size: 12.5px; color: var(--muted); margin-top: 2px; }
.switch { position: relative; flex: none; width: 44px; height: 26px; }
.switch input { opacity: 0; width: 0; height: 0; }
.switch .track { position: absolute; inset: 0; background: var(--line-strong); border-radius: 999px; transition: background .16s; cursor: pointer; }
.switch .track::before { content:""; position: absolute; top: 3px; left: 3px; width: 20px; height: 20px; background: #fff; border-radius: 50%; transition: transform .16s; box-shadow: 0 1px 3px rgba(0,0,0,.25); }
.switch input:checked + .track { background: var(--brand); }
.switch input:checked + .track::before { transform: translateX(18px); }
.switch input:focus-visible + .track { box-shadow: 0 0 0 3px var(--brand-tint); }

/* Reveal sub-fields */
.subfields { display: grid; gap: 16px; grid-template-columns: 1fr 1fr; padding: 16px; margin-top: 4px; background: var(--brand-tint); border: 1px solid var(--brand-tint-2); border-radius: 12px; }
.subfields.is-hidden { display: none; }
.subfields .field__label { color: var(--brand-deep); }
@media (max-width: 560px) { .subfields { grid-template-columns: 1fr; } }

.field-sep { grid-column: 1/-1; height: 1px; background: var(--line-soft); margin: 2px 0; }
.field-section-label { grid-column: 1/-1; font-family: var(--mono); font-size: 11px; letter-spacing: .12em; text-transform: uppercase; color: var(--faint); margin: 6px 0 -4px; }

/* Info tooltip */
.info { position: relative; display: inline-flex; }
.info__dot { width: 15px; height: 15px; border-radius: 50%; border: 1px solid var(--line-strong); color: var(--muted); font-size: 10px; font-weight: 700; display: flex; align-items: center; justify-content: center; cursor: help; font-family: var(--mono); }
.info__dot:hover { border-color: var(--brand); color: var(--brand); }
.info__pop {
  position: absolute; bottom: calc(100% + 8px); left: 50%; transform: translateX(-50%);
  width: 230px; background: var(--ink); color: #eef3f0; font-size: 12.5px; line-height: 1.45; font-weight: 400;
  padding: 10px 12px; border-radius: 10px; box-shadow: var(--shadow-pop); z-index: 30;
  opacity: 0; visibility: hidden; transition: opacity .14s, visibility .14s; pointer-events: none; font-family: var(--sans); letter-spacing: 0; text-transform: none;
}
.info__pop::after { content:""; position: absolute; top: 100%; left: 50%; transform: translateX(-50%); border: 6px solid transparent; border-top-color: var(--ink); }
.info:hover .info__pop, .info:focus-within .info__pop { opacity: 1; visibility: visible; }

/* ============================ RESULTS ============================ */
.results { scroll-margin-top: 80px; }
.result-headline {
  background: linear-gradient(180deg, var(--brand-deep), #103328);
  color: #eaf3ef; border-radius: var(--radius-lg);
  padding: 30px 32px; position: relative; overflow: hidden;
}
.result-headline::after {
  content:""; position: absolute; right: -40px; top: -40px; width: 220px; height: 220px;
  background: radial-gradient(circle, rgba(255,255,255,.08), transparent 70%);
}
.result-headline__label { font-family: var(--mono); font-size: 12px; letter-spacing: .12em; text-transform: uppercase; color: color-mix(in oklab, #eaf3ef 70%, transparent); }
.result-headline__num { font-family: var(--serif); font-weight: 600; font-size: clamp(46px, 9vw, 72px); line-height: 1; margin: 8px 0 6px; letter-spacing: -0.02em; }
.result-headline__num .cents { font-size: .5em; opacity: .7; }
.result-headline__sub { font-size: 15px; color: color-mix(in oklab, #eaf3ef 86%, transparent); max-width: 460px; }
.result-headline__sub b { color: #fff; font-weight: 600; }
.result-headline.is-zero { background: linear-gradient(180deg, #7a2c20, #5c2018); }

.result-breakdown { display: flex; flex-wrap: wrap; gap: 0; margin-top: 20px; border-top: 1px solid rgba(255,255,255,.14); }
.result-breakdown .bd { padding: 14px 22px 4px 0; }
.result-breakdown .bd__k { font-family: var(--mono); font-size: 11px; letter-spacing: .06em; text-transform: uppercase; color: color-mix(in oklab, #eaf3ef 60%, transparent); }
.result-breakdown .bd__v { font-family: var(--mono); font-size: 18px; color: #fff; margin-top: 3px; }
.result-breakdown .bd__op { align-self: center; padding: 14px 18px 4px; font-family: var(--mono); color: color-mix(in oklab, #eaf3ef 50%, transparent); font-size: 18px; }

/* Flags / warnings */
.flags { display: grid; gap: 12px; margin-top: 20px; }
.flag { display: flex; gap: 13px; padding: 15px 17px; border-radius: 13px; border: 1px solid; align-items: flex-start; }
.flag__icon { flex: none; width: 26px; height: 26px; border-radius: 7px; display: flex; align-items: center; justify-content: center; font-family: var(--mono); font-weight: 700; font-size: 14px; margin-top: 1px; }
.flag__body { min-width: 0; }
.flag__title { font-weight: 700; font-size: 14.5px; }
.flag__text { font-size: 13.5px; line-height: 1.5; margin-top: 3px; color: var(--ink-soft); }
.flag__text b { font-weight: 700; }
.flag--stop { background: var(--stop-tint); border-color: var(--stop-line); }
.flag--stop .flag__icon { background: var(--stop); color: #fff; }
.flag--stop .flag__title { color: var(--stop); }
.flag--warn { background: var(--clay-tint); border-color: var(--clay-line); }
.flag--warn .flag__icon { background: var(--clay); color: #fff; }
.flag--warn .flag__title { color: var(--clay-deep); }
.flag--info { background: var(--brand-tint); border-color: var(--brand-tint-2); }
.flag--info .flag__icon { background: var(--brand); color: #fff; }
.flag--info .flag__title { color: var(--brand-deep); }

/* Triple-tax cards */
.triple { margin-top: 22px; }
.triple__head { display: flex; align-items: baseline; justify-content: space-between; gap: 16px; flex-wrap: wrap; margin-bottom: 14px; }
.triple__head h3 { font-size: 20px; }
.triple__total { font-family: var(--mono); font-size: 14px; color: var(--muted); }
.triple__total b { font-family: var(--serif); font-size: 24px; color: var(--brand-deep); font-weight: 600; }
.triple-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 14px; }
@media (max-width: 620px) { .triple-grid { grid-template-columns: 1fr; } }
.tcard { border: 1px solid var(--line); border-radius: 14px; padding: 17px 18px; background: var(--card); position: relative; }
.tcard__tag { display: inline-flex; align-items: center; gap: 6px; font-family: var(--mono); font-size: 11px; letter-spacing: .08em; text-transform: uppercase; color: var(--brand); font-weight: 600; }
.tcard__tag .num { width: 18px; height: 18px; border-radius: 5px; background: var(--brand-tint); color: var(--brand-deep); display: flex; align-items: center; justify-content: center; font-size: 11px; }
.tcard__num { font-family: var(--serif); font-size: 30px; font-weight: 600; color: var(--ink); margin: 10px 0 2px; letter-spacing: -0.01em; }
.tcard__label { font-weight: 600; font-size: 14px; }
.tcard__desc { font-size: 12.5px; color: var(--muted); margin-top: 5px; line-height: 1.45; }
.tcard__strike { font-size: 12px; color: var(--clay-deep); margin-top: 8px; font-family: var(--mono); }

/* Projection strip */
.projection { margin-top: 18px; padding: 18px 20px; background: var(--card-sunk); border: 1px solid var(--line); border-radius: 14px; }
.projection__row { display: flex; flex-wrap: wrap; align-items: baseline; gap: 8px 18px; }
.projection h4 { font-size: 16px; }
.projection__big { font-family: var(--serif); font-size: 26px; font-weight: 600; color: var(--brand-deep); }
.projection__desc { font-size: 13px; color: var(--muted); margin-top: 8px; line-height: 1.5; }
.projection__desc b { color: var(--ink-soft); }

/* Show-the-math disclosure */
.math { margin-top: 16px; border-top: 1px dashed var(--line-strong); padding-top: 14px; }
.math summary { cursor: pointer; font-family: var(--mono); font-size: 12.5px; color: var(--brand-deep); letter-spacing: .04em; list-style: none; display: inline-flex; align-items: center; gap: 7px; }
.math summary::-webkit-details-marker { display: none; }
.math summary::before { content: "▸"; transition: transform .15s; display: inline-block; }
.math[open] summary::before { transform: rotate(90deg); }
.math__body { margin-top: 12px; font-family: var(--mono); font-size: 12.5px; color: var(--ink-soft); line-height: 1.8; }
.math__body .ln { display: flex; justify-content: space-between; gap: 16px; padding: 2px 0; border-bottom: 1px dotted var(--line); }
.math__body .ln span:last-child { color: var(--ink); white-space: nowrap; }
.math__note { margin-top: 12px; font-family: var(--sans); font-size: 12.5px; color: var(--muted); line-height: 1.5; }

.disclaimer-inline { margin-top: 16px; font-size: 12.5px; color: var(--muted); line-height: 1.55; display: flex; gap: 9px; }
.disclaimer-inline svg { flex: none; margin-top: 2px; }

/* ============================ EXPLAINER ============================ */
.prose { max-width: 760px; }
.prose-section { scroll-margin-top: 80px; padding-top: 40px; }
.prose-section > .eyebrow { display: block; margin-bottom: 10px; }
.prose h2 { font-size: clamp(26px, 4vw, 34px); margin-bottom: 6px; text-wrap: balance; }
.prose h3 { font-size: 21px; margin: 28px 0 8px; }
.prose p { color: var(--ink-soft); margin: 14px 0; text-wrap: pretty; }
.prose p.lead { font-size: 19px; color: var(--ink); }
.prose ul { margin: 14px 0; padding-left: 0; list-style: none; display: grid; gap: 10px; }
.prose ul li { position: relative; padding-left: 26px; color: var(--ink-soft); }
.prose ul li::before { content:""; position: absolute; left: 4px; top: 10px; width: 7px; height: 7px; border-radius: 2px; background: var(--brand); transform: rotate(45deg); }
.prose strong { color: var(--ink); font-weight: 700; }
.prose a { font-weight: 500; }

/* Reference table — 2026 figures */
.fig-table-wrap { overflow-x: auto; margin: 20px 0; border: 1px solid var(--line); border-radius: 14px; background: var(--card); }
table.fig { width: 100%; border-collapse: collapse; font-size: 15px; min-width: 460px; }
table.fig caption { text-align: left; padding: 14px 18px 0; font-family: var(--mono); font-size: 11px; letter-spacing: .1em; text-transform: uppercase; color: var(--faint); }
table.fig th, table.fig td { text-align: left; padding: 12px 18px; border-bottom: 1px solid var(--line-soft); }
table.fig thead th { font-family: var(--mono); font-size: 11.5px; letter-spacing: .06em; text-transform: uppercase; color: var(--muted); font-weight: 600; }
table.fig tbody td { color: var(--ink-soft); }
table.fig td.val { font-family: var(--mono); font-weight: 600; color: var(--ink); text-align: right; white-space: nowrap; }
table.fig tr:last-child td { border-bottom: 0; }
table.fig .src { font-family: var(--mono); font-size: 11px; color: var(--faint); }

/* Callout box inside prose */
.callout { border-radius: 14px; padding: 18px 20px; margin: 22px 0; border: 1px solid; }
.callout__tag { font-family: var(--mono); font-size: 11px; letter-spacing: .1em; text-transform: uppercase; font-weight: 700; display: block; margin-bottom: 6px; }
.callout p { margin: 6px 0 0; }
.callout--brand { background: var(--brand-tint); border-color: var(--brand-tint-2); }
.callout--brand .callout__tag { color: var(--brand-deep); }
.callout--clay { background: var(--clay-tint); border-color: var(--clay-line); }
.callout--clay .callout__tag { color: var(--clay-deep); }
.callout--clay p, .callout--brand p { color: var(--ink-soft); }

/* Strategy mini-cards */
.strat-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; margin: 22px 0; }
@media (max-width: 620px) { .strat-grid { grid-template-columns: 1fr; } }
.strat { border: 1px solid var(--line); border-radius: 14px; padding: 18px 20px; background: var(--card); }
.strat h4 { font-size: 17px; margin-bottom: 6px; }
.strat p { font-size: 14px; margin: 0; color: var(--ink-soft); }

/* ============================ FAQ ============================ */
.faq { display: grid; gap: 0; border: 1px solid var(--line); border-radius: 16px; overflow: hidden; background: var(--card); margin-top: 18px; }
.faq details { border-bottom: 1px solid var(--line-soft); }
.faq details:last-child { border-bottom: 0; }
.faq summary {
  cursor: pointer; list-style: none; padding: 18px 22px; display: flex; align-items: center; gap: 14px;
  font-family: var(--serif); font-size: 18px; font-weight: 600; color: var(--ink);
}
.faq summary::-webkit-details-marker { display: none; }
.faq summary .chev { margin-left: auto; flex: none; color: var(--brand); transition: transform .18s; }
.faq details[open] summary .chev { transform: rotate(45deg); }
.faq__a { padding: 0 22px 20px; color: var(--ink-soft); font-size: 15.5px; line-height: 1.6; }
.faq__a p { margin: 0 0 10px; }
.faq__a p:last-child { margin-bottom: 0; }

/* ============================ FOOTER ============================ */
.site-footer { background: #0e1a15; color: #c5d2cb; margin-top: 50px; padding: 48px 0 30px; }
.footer-cols { display: grid; grid-template-columns: 1.4fr 1fr 1fr; gap: 36px; }
@media (max-width: 760px) { .footer-cols { grid-template-columns: 1fr; gap: 28px; } }
.footer-brand .brand__name { color: #fff; }
.footer-brand__mark { width: 34px; height: 34px; border-radius: 9px; }
.footer-brand p { font-size: 14px; color: #93a89d; margin: 12px 0 0; max-width: 280px; line-height: 1.55; }
.footer-col h4 { font-family: var(--mono); font-size: 11.5px; letter-spacing: .12em; text-transform: uppercase; color: #7e948a; font-weight: 600; margin-bottom: 14px; }
.footer-col ul { list-style: none; margin: 0; padding: 0; display: grid; gap: 10px; }
.footer-col a, .footer-col button.linklike { color: #c5d2cb; text-decoration: none; font-size: 14.5px; background: none; border: 0; padding: 0; cursor: pointer; font-family: var(--sans); text-align: left; }
.footer-col a:hover, .footer-col button.linklike:hover { color: #fff; }
.footer-col .ext { font-size: 11px; color: #6f857b; margin-left: 5px; font-family: var(--mono); }
.footer-divider { border: 0; border-top: 1px solid rgba(255,255,255,.1); margin: 32px 0 22px; }
.footer-legal { font-size: 12.5px; color: #8a9d93; line-height: 1.6; max-width: 860px; }
.footer-legal strong { color: #c5d2cb; }
.footer-bottom { display: flex; align-items: center; justify-content: space-between; gap: 16px; margin-top: 22px; flex-wrap: wrap; }
.footer-bottom__copy { font-size: 12.5px; color: #7e948a; }
.footer-bottom__copy a { color: #93a89d; }
.footer-bottom button.linklike { color: #c5d2cb; font-weight: 600; font-size: 13.5px; }

/* ============================ PRIVACY MODAL ============================ */
.modal-scrim {
  position: fixed; inset: 0; z-index: 100; background: rgba(14,26,21,.55);
  display: flex; align-items: center; justify-content: center; padding: 20px;
  opacity: 0; visibility: hidden; transition: opacity .18s, visibility .18s;
}
.modal-scrim.is-open { opacity: 1; visibility: visible; }
.modal {
  background: var(--paper); border-radius: 18px; width: min(640px, 100%); max-height: 86vh;
  display: flex; flex-direction: column; box-shadow: var(--shadow-pop);
  transform: translateY(8px) scale(.99); transition: transform .18s;
}
.modal-scrim.is-open .modal { transform: none; }
.modal__head { display: flex; align-items: center; gap: 12px; padding: 20px 24px; border-bottom: 1px solid var(--line); }
.modal__head h2 { font-size: 20px; }
.modal__head .modal__tld { color: var(--brand); }
.modal__close { margin-left: auto; width: 34px; height: 34px; border-radius: 9px; border: 1px solid var(--line); background: var(--card); cursor: pointer; color: var(--muted); font-size: 19px; display: flex; align-items: center; justify-content: center; }
.modal__close:hover { color: var(--ink); border-color: var(--line-strong); }
.modal__body { overflow-y: auto; padding: 22px 24px; }
.modal__body h3 { font-size: 16px; margin: 20px 0 6px; }
.modal__body h3:first-child { margin-top: 0; }
.modal__body p, .modal__body li { font-size: 14px; color: var(--ink-soft); line-height: 1.6; }
.modal__body ul { padding-left: 20px; margin: 8px 0; }
.modal__body .short { background: var(--brand-tint); border: 1px solid var(--brand-tint-2); border-radius: 12px; padding: 14px 16px; font-size: 14px; color: var(--ink); }
.modal__body strong { color: var(--ink); }
.modal__foot { padding: 16px 24px; border-top: 1px solid var(--line); display: flex; justify-content: flex-end; }
.btn { font-family: var(--sans); font-weight: 600; font-size: 14.5px; border-radius: 10px; padding: 10px 20px; cursor: pointer; border: 1px solid transparent; }
.btn--primary { background: var(--brand); color: #fff; }
.btn--primary:hover { background: var(--brand-press); }
.btn--ghost { background: var(--card); border-color: var(--line-strong); color: var(--ink-soft); }
.btn--ghost:hover { border-color: var(--brand); color: var(--brand-deep); }

/* ============================ COOKIE CONSENT ============================ */
/* CookieConsent v3 is vendored at /vendor/cookieconsent/ and brings its own
   CSS (docs/consent.md). These are brand-fit overrides only — primary button,
   toggle, and link color mapped to the site palette. */
#cc-main {
  --cc-font-family: var(--sans);
  --cc-btn-primary-bg: var(--brand);
  --cc-btn-primary-border-color: var(--brand);
  --cc-btn-primary-hover-bg: var(--brand-press);
  --cc-btn-primary-hover-border-color: var(--brand-press);
  --cc-toggle-on-bg: var(--brand);
  --cc-link-color: var(--brand-deep);
}
/* Keep the consent box clear of the mobile sticky ad anchor when both show. */
@media (max-width: 860px) {
  body.has-sticky-ad #cc-main .cm--box { margin-bottom: 60px; }
}

/* ============================ MISC ============================ */
/* Range sliders */
input[type="range"] { -webkit-appearance: none; appearance: none; width: 100%; height: 6px; border-radius: 999px; background: var(--brand-tint-2); outline: none; padding: 0; border: 0; margin: 8px 0; }
input[type="range"]::-webkit-slider-thumb { -webkit-appearance: none; appearance: none; width: 22px; height: 22px; border-radius: 50%; background: var(--brand); border: 3px solid #fff; box-shadow: 0 1px 4px rgba(20,33,27,.3); cursor: pointer; }
input[type="range"]::-moz-range-thumb { width: 18px; height: 18px; border-radius: 50%; background: var(--brand); border: 3px solid #fff; box-shadow: 0 1px 4px rgba(20,33,27,.3); cursor: pointer; }
input[type="range"]:focus-visible::-webkit-slider-thumb { box-shadow: 0 0 0 4px var(--brand-tint); }

.jump-to { margin-top: 26px; display: flex; flex-wrap: wrap; gap: 10px; }
.jump-to a {
  font-size: 13px; font-family: var(--mono); letter-spacing: .02em; text-decoration: none;
  color: var(--brand-deep); background: var(--card); border: 1px solid var(--line); border-radius: 999px; padding: 7px 14px;
}
.jump-to a:hover { border-color: var(--brand); background: var(--brand-tint); }

.section-rule { border: 0; border-top: 1px solid var(--line); margin: 0; }

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