/* ============================================
   AINextGrowth — Global Stylesheet
   Professional finance tools design system
   ============================================ */

:root {
  /* Brand palette — deep navy + trust accents */
  --navy-900: #0A2540;
  --navy-800: #0F3055;
  --navy-700: #163D66;
  --navy-600: #1E4D7B;
  --brand-500: #1B7F5A;
  --brand-600: #146B4B;
  --brand-700: #0F5539;
  --brand-400: #22A06B;
  --brand-300: #3FC98A;
  --accent-500: #2563EB;
  --accent-400: #3B82F6;

  /* Neutrals */
  --ink-900: #0B1726;
  --ink-800: #16202E;
  --ink-700: #1F2D3D;
  --ink-600: #3D4B5C;
  --ink-500: #4A5A6A;
  --ink-400: #6B7C8C;
  --ink-300: #697887;
  --line-200: #E3E9EF;
  --line-100: #EFF3F7;
  --surface: #FFFFFF;
  --surface-alt: #F7F9FC;
  --surface-tint: #F0F5FA;

  /* Semantic */
  --success: #1B7F5A;
  --warning: #B7791F;
  --danger: #C0392B;

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

  /* Layout */
  --maxw: 1140px;
  --radius: 12px;
  --radius-sm: 8px;
  --radius-lg: 18px;
  --shadow-sm: 0 1px 3px rgba(10,37,64,.06), 0 1px 2px rgba(10,37,64,.04);
  --shadow: 0 4px 16px rgba(10,37,64,.08);
  --shadow-lg: 0 12px 40px rgba(10,37,64,.12);

  /* Fluid type scale ------------------------------------------------------
     Every size below is a clamp() so the page breathes on a phone without
     triggering a zoom, and still looks composed on a 1440px display. The
     middle term uses rem + vw so user font-size preferences are honoured. */
  --fs-xs:   clamp(.72rem, .70rem + .10vw, .78rem);
  --fs-sm:   clamp(.82rem, .79rem + .15vw, .89rem);
  --fs-base: clamp(1rem,   .96rem + .20vw, 1.065rem);
  --fs-md:   clamp(1.06rem, 1.01rem + .24vw, 1.15rem);
  --fs-lg:   clamp(1.22rem, 1.14rem + .40vw, 1.4rem);
  --fs-xl:   clamp(1.5rem,  1.34rem + .80vw, 1.95rem);
  --fs-2xl:  clamp(1.9rem,  1.55rem + 1.60vw, 2.9rem);
  --fs-3xl:  clamp(2.2rem,  1.7rem  + 2.40vw, 3.5rem);
  --fs-stat: clamp(1.75rem, 1.4rem + 1.5vw, 2.5rem);

  /* Motion tokens — one shared easing so the whole site feels of a piece. */
  --ease: cubic-bezier(.22, .61, .36, 1);
  --ease-out: cubic-bezier(.16, 1, .3, 1);
  --dur-fast: .16s;
  --dur: .28s;
  --dur-slow: .55s;
}

/* ---------- Reset ---------- */
*, *::before, *::after { box-sizing: border-box; }
html { scroll-behavior: smooth; -webkit-text-size-adjust: 100%; }
body {
  margin: 0;
  font-family: var(--font);
  font-size: var(--fs-base);
  line-height: 1.65;
  color: var(--ink-700);
  background: var(--surface);
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}
img { max-width: 100%; display: block; }
a { color: var(--accent-500); text-decoration: none; }
a:hover { text-decoration: underline; }
h1, h2, h3, h4 { color: var(--navy-900); line-height: 1.25; margin: 0 0 .5em; font-weight: 700; }
h1 { font-size: var(--fs-2xl); letter-spacing: -.022em; }
h2 { font-size: var(--fs-xl); letter-spacing: -.012em; }
h3 { font-size: var(--fs-lg); }
h4 { font-size: var(--fs-md); }
p { margin: 0 0 1rem; }
ul, ol { margin: 0 0 1rem; padding-left: 1.35rem; }
li { margin-bottom: .35rem; }
strong { color: var(--navy-900); }

/* ---------- Motion primitives -------------------------------------------
   The site previously shipped zero @keyframes, which is why it read as
   static and "average". These are the only animations on the site — kept
   deliberately few, short, and with one shared easing curve so nothing
   feels random. `prefers-reduced-motion` neutralises all of them at the
   foot of this file.
   ------------------------------------------------------------------------ */

@keyframes fadeUp {
  from { opacity: 0; transform: translate3d(0, 18px, 0); }
  to   { opacity: 1; transform: none; }
}
@keyframes fadeIn {
  from { opacity: 0; }
  to   { opacity: 1; }
}
@keyframes fadeDown {
  from { opacity: 0; transform: translate3d(0, -12px, 0); }
  to   { opacity: 1; transform: none; }
}
@keyframes scaleIn {
  from { opacity: 0; transform: scale(.965); }
  to   { opacity: 1; transform: none; }
}
@keyframes slideInLeft {
  from { opacity: 0; transform: translate3d(-22px, 0, 0); }
  to   { opacity: 1; transform: none; }
}
@keyframes slideInRight {
  from { opacity: 0; transform: translate3d(22px, 0, 0); }
  to   { opacity: 1; transform: none; }
}
@keyframes growBar {
  from { transform: scaleX(0); }
  to   { transform: scaleX(1); }
}
@keyframes shimmer {
  0%   { background-position: -480px 0; }
  100% { background-position: 480px 0; }
}
@keyframes pulseRing {
  0%   { box-shadow: 0 0 0 0 rgba(34,160,107,.34); }
  70%  { box-shadow: 0 0 0 12px rgba(34,160,107,0); }
  100% { box-shadow: 0 0 0 0 rgba(34,160,107,0); }
}
@keyframes floatY {
  0%, 100% { transform: translateY(0); }
  50%      { transform: translateY(-7px); }
}
@keyframes drawLine {
  from { stroke-dashoffset: 1000; }
  to   { stroke-dashoffset: 0; }
}
@keyframes countUp {
  from { opacity: 0; transform: translateY(8px); }
  to   { opacity: 1; transform: none; }
}

/* Entrance animation, gated on a class the observer adds. Elements start
   hidden ONLY when JS is available (html.js), so a no-JS visitor sees the
   full page immediately instead of a blank one. */
.js [data-animate] {
  opacity: 0;
  will-change: opacity, transform;
}
.js [data-animate].is-visible {
  animation: fadeUp var(--dur-slow) var(--ease-out) both;
}
.js [data-animate="fade"].is-visible  { animation-name: fadeIn; }
.js [data-animate="down"].is-visible  { animation-name: fadeDown; }
.js [data-animate="scale"].is-visible { animation-name: scaleIn; }
.js [data-animate="left"].is-visible  { animation-name: slideInLeft; }
.js [data-animate="right"].is-visible { animation-name: slideInRight; }

/* Stagger: children of a staggered group cascade instead of popping in
   together. Capped at 8 steps — beyond that the delay feels broken. */
.js [data-stagger] > * { opacity: 0; }
.js [data-stagger].is-visible > * {
  animation: fadeUp var(--dur-slow) var(--ease-out) both;
}
.js [data-stagger].is-visible > *:nth-child(1) { animation-delay: .04s; }
.js [data-stagger].is-visible > *:nth-child(2) { animation-delay: .10s; }
.js [data-stagger].is-visible > *:nth-child(3) { animation-delay: .16s; }
.js [data-stagger].is-visible > *:nth-child(4) { animation-delay: .22s; }
.js [data-stagger].is-visible > *:nth-child(5) { animation-delay: .28s; }
.js [data-stagger].is-visible > *:nth-child(6) { animation-delay: .34s; }
.js [data-stagger].is-visible > *:nth-child(7) { animation-delay: .40s; }
.js [data-stagger].is-visible > *:nth-child(8) { animation-delay: .46s; }
.js [data-stagger].is-visible > *:nth-child(n+9) { animation-delay: .52s; }

/* Above-the-fold hero content animates immediately on paint rather than
   waiting for the observer — no flash of invisible content on load. */
.hero-eyebrow { animation: fadeDown .5s var(--ease-out) both; }
.hero h1      { animation: fadeUp .62s var(--ease-out) .06s both; }
.hero .lead   { animation: fadeUp .62s var(--ease-out) .13s both; }
.hero .search-bar { animation: fadeUp .62s var(--ease-out) .20s both; }
.hero-actions { animation: fadeUp .62s var(--ease-out) .27s both; }
.trust-row    { animation: fadeUp .62s var(--ease-out) .34s both; }


/* ---------- Section rhythm ---------------------------------------------- */
.section { padding: clamp(44px, 6vw, 74px) 0; }
.section--tint { background: var(--surface-alt); }
.section--tight { padding: clamp(30px, 4vw, 46px) 0; }

/* Section head with an accent rule. The rule draws itself in on scroll. */
.section-head { display: flex; align-items: flex-end; justify-content: space-between; gap: 20px; margin-bottom: 28px; }
.section-head h2 { margin: 0; }
.section-head p { margin: 8px 0 0; color: var(--ink-400); font-size: var(--fs-sm); max-width: 62ch; }
.section-head a { font-size: var(--fs-sm); font-weight: 600; white-space: nowrap; }

/* ---------- Layout helpers ---------- */
.wrap { max-width: var(--maxw); margin: 0 auto; padding: 0 20px; }
.center { text-align: center; }
.lead { font-size: var(--fs-md); color: var(--ink-500); }
.muted { color: var(--ink-400); font-size: var(--fs-sm); }
.skip-link {
  position: absolute; left: -9999px; top: 0;
  background: var(--navy-900); color: #fff; padding: 10px 16px; z-index: 100;
}
.skip-link:focus { left: 0; }

/* ---------- Header ---------- */
.site-header {
  position: sticky; top: 0; z-index: 50;
  background: rgba(255,255,255,.94);
  backdrop-filter: saturate(180%) blur(12px);
  border-bottom: 1px solid var(--line-200);
}
.nav { display: flex; align-items: center; justify-content: space-between; height: 68px; }
.logo { display: flex; align-items: center; gap: 10px; font-weight: 800; color: var(--navy-900); font-size: 1.15rem; letter-spacing: -.02em; }
.logo:hover { text-decoration: none; }
.logo-mark {
  width: 34px; height: 34px; border-radius: 9px;
  background: linear-gradient(135deg, var(--navy-900), var(--brand-500));
  display: grid; place-items: center; color: #fff; font-size: .95rem; font-weight: 800;
}
.nav-links { display: flex; align-items: center; gap: 26px; }
.nav-links a { color: var(--ink-700); font-size: .94rem; font-weight: 500; }
.nav-links a:hover { color: var(--navy-900); text-decoration: none; }
.nav-toggle {
  display: none; background: none; border: 1px solid var(--line-200);
  border-radius: 8px; padding: 8px 10px; cursor: pointer; font-size: 1.1rem; color: var(--navy-900);
}

/* ---------- Buttons ---------- */
.btn {
  display: inline-flex; align-items: center; gap: 8px;
  padding: 13px 24px; border-radius: 10px; font-weight: 600;
  font-size: var(--fs-sm);
  border: 1px solid transparent; cursor: pointer;
  transition: background var(--dur-fast) var(--ease),
              color var(--dur-fast) var(--ease),
              border-color var(--dur-fast) var(--ease),
              transform var(--dur-fast) var(--ease),
              box-shadow var(--dur-fast) var(--ease);
  font-family: inherit; position: relative; overflow: hidden;
  text-decoration: none;
}
.btn:active { transform: translateY(0) scale(.985); }
.btn:focus-visible { outline: 2px solid var(--brand-500); outline-offset: 2px; }
.btn-primary { background: var(--navy-900); color: #fff; }
.btn-primary:hover {
  background: var(--navy-700); text-decoration: none;
  transform: translateY(-2px); box-shadow: 0 8px 22px rgba(10,37,64,.22);
}
.btn-brand { background: var(--brand-500); color: #fff; }
.btn-brand:hover {
  background: var(--brand-400); text-decoration: none;
  transform: translateY(-2px); box-shadow: 0 8px 22px rgba(27,127,90,.26);
}
.btn-ghost { background: #fff; color: var(--navy-900); border-color: var(--line-200); }
.btn-ghost:hover {
  border-color: var(--navy-600); text-decoration: none;
  transform: translateY(-2px); box-shadow: var(--shadow-sm);
}
.btn-block { width: 100%; justify-content: center; }

/* Sweep highlight — a soft light band crosses the button on hover. Pure
   ::after so it costs nothing in the DOM and no extra element per CTA. */
.btn--sweep::after {
  content: ''; position: absolute; inset: 0;
  background: linear-gradient(105deg, transparent 30%, rgba(255,255,255,.22) 50%, transparent 70%);
  transform: translateX(-120%);
  transition: transform .55s var(--ease-out);
  pointer-events: none;
}
.btn--sweep:hover::after { transform: translateX(120%); }

/* ---------- Hero ---------- */
.hero {
  position: relative;
  background:
    radial-gradient(900px 420px at 78% -8%, rgba(34,160,107,.16), transparent 62%),
    radial-gradient(700px 380px at 8% 4%, rgba(37,99,235,.10), transparent 60%),
    linear-gradient(180deg, var(--surface-tint), var(--surface));
  padding: clamp(52px, 7vw, 84px) 0 clamp(48px, 6vw, 74px);
  border-bottom: 1px solid var(--line-200);
  overflow: hidden;
}
/* Faint dot grid adds depth without an image request. Masked so it fades
   out before it reaches the content. */
.hero::before {
  content: ''; position: absolute; inset: 0; pointer-events: none;
  background-image: radial-gradient(rgba(10,37,64,.055) 1px, transparent 1px);
  background-size: 22px 22px;
  -webkit-mask-image: radial-gradient(760px 400px at 72% 12%, #000, transparent 78%);
  mask-image: radial-gradient(760px 400px at 72% 12%, #000, transparent 78%);
}
.hero > .wrap { position: relative; z-index: 1; }
.hero-grid { display: grid; grid-template-columns: 1.05fr .95fr; gap: 52px; align-items: center; }
.hero-eyebrow { display: inline-flex; }
.eyebrow {
  display: inline-flex; align-items: center; gap: 8px;
  background: #fff; border: 1px solid var(--line-200);
  color: var(--brand-500); font-size: var(--fs-xs); font-weight: 700;
  padding: 6px 13px; border-radius: 999px; margin-bottom: 18px;
  text-transform: uppercase; letter-spacing: .06em;
  box-shadow: var(--shadow-sm);
}
.eyebrow .dot {
  width: 7px; height: 7px; border-radius: 50%; background: var(--brand-400);
  animation: pulseRing 2.4s var(--ease) infinite;
}
.hero h1 { margin-bottom: .45em; max-width: 18ch; }
.hero p.lead { max-width: 46ch; font-size: var(--fs-md); color: var(--ink-500); }
.hero-actions { display: flex; gap: 12px; flex-wrap: wrap; margin-top: 26px; }
.trust-row { display: flex; gap: 22px; flex-wrap: wrap; margin-top: 30px; padding-top: 24px; border-top: 1px solid var(--line-200); }
.trust-item { font-size: var(--fs-sm); color: var(--ink-500); display: flex; align-items: center; gap: 7px; }
.trust-item strong { color: var(--navy-900); }

/* Hero side panel: a live-looking stat card instead of empty space. */
.hero-panel {
  background: #fff; border: 1px solid var(--line-200);
  border-radius: var(--radius-lg); box-shadow: var(--shadow-lg);
  padding: 26px 28px;
  animation: scaleIn .7s var(--ease-out) .18s both;
}
.hero-panel h2 { font-size: var(--fs-md); margin-bottom: 4px; }
.hero-panel .hp-sub { font-size: var(--fs-sm); color: var(--ink-400); margin-bottom: 20px; }
.hp-stats { display: grid; grid-template-columns: 1fr 1fr; gap: 14px; }
.hp-stat {
  background: var(--surface-alt); border: 1px solid var(--line-100);
  border-radius: var(--radius-sm); padding: 14px 16px;
}
.hp-stat .v {
  font-size: var(--fs-stat); font-weight: 800; color: var(--navy-900);
  letter-spacing: -.03em; line-height: 1.1;
  font-variant-numeric: tabular-nums;
}
.hp-stat .k {
  font-size: var(--fs-xs); color: var(--ink-400); text-transform: uppercase;
  letter-spacing: .06em; font-weight: 600; margin-top: 3px;
}
.hp-bar {
  height: 6px; border-radius: 999px; background: var(--line-100);
  margin-top: 20px; overflow: hidden;
}
.hp-bar span {
  display: block; height: 100%; width: 72%; border-radius: 999px;
  background: linear-gradient(90deg, var(--brand-500), var(--brand-300));
  transform-origin: left; animation: growBar 1.1s var(--ease-out) .5s both;
}
.hp-note { font-size: var(--fs-xs); color: var(--ink-400); margin: 12px 0 0; }


/* ---------- Calculator card ---------- */
.calc-card {
  background: #fff; border: 1px solid var(--line-200);
  border-radius: var(--radius-lg); box-shadow: var(--shadow-lg);
  padding: 26px;
}
.calc-card h3, .calc-card .calc-card-title { margin-bottom: 4px; }
.calc-card .calc-sub { font-size: .88rem; color: var(--ink-400); margin-bottom: 20px; }
.field { margin-bottom: 16px; }
.field label { display: block; font-size: .85rem; font-weight: 600; color: var(--ink-700); margin-bottom: 6px; }
.field .hint { font-size: .78rem; color: var(--ink-400); font-weight: 400; }
.input-group { position: relative; display: flex; align-items: center; }
.input-group .prefix, .input-group .suffix {
  position: absolute; color: var(--ink-400); font-size: .9rem; pointer-events: none;
}
.input-group .prefix { left: 13px; }
.input-group .suffix { right: 13px; }
input[type="number"], input[type="text"], select {
  width: 100%; padding: 12px 14px; font-size: var(--fs-sm); font-family: inherit;
  border: 1px solid var(--line-200); border-radius: 10px;
  background: #fff; color: var(--ink-900);
  transition: border-color var(--dur-fast) var(--ease),
              box-shadow var(--dur-fast) var(--ease),
              background var(--dur-fast) var(--ease);
  font-variant-numeric: tabular-nums;
}
.input-group.has-prefix input { padding-left: 30px; }
.input-group.has-suffix input { padding-right: 42px; }
input:hover:not(:focus), select:hover:not(:focus) { border-color: var(--ink-300); }
input:focus, select:focus {
  outline: none; border-color: var(--brand-400);
  box-shadow: 0 0 0 4px rgba(34,160,107,.15);
}
.input-group:focus-within .prefix,
.input-group:focus-within .suffix { color: var(--brand-500); }
.field-row { display: grid; grid-template-columns: 1fr 1fr; gap: 14px; }

/* Range slider — paired with the number input on the key variables so a
   reader can explore without typing. */
input[type="range"] {
  -webkit-appearance: none; appearance: none;
  width: 100%; height: 5px; border-radius: 999px;
  background: var(--line-100); margin: 10px 0 2px; cursor: pointer;
}
input[type="range"]::-webkit-slider-thumb {
  -webkit-appearance: none; appearance: none;
  width: 19px; height: 19px; border-radius: 50%;
  background: var(--brand-500); border: 3px solid #fff;
  box-shadow: 0 1px 5px rgba(10,37,64,.28); cursor: pointer;
  transition: transform var(--dur-fast) var(--ease);
}
input[type="range"]::-webkit-slider-thumb:hover { transform: scale(1.14); }
input[type="range"]::-moz-range-thumb {
  width: 15px; height: 15px; border-radius: 50%;
  background: var(--brand-500); border: 3px solid #fff;
  box-shadow: 0 1px 5px rgba(10,37,64,.28); cursor: pointer;
}

/* ---------- Results ---------- */
.result-box {
  margin-top: 22px; padding: 20px; border-radius: var(--radius);
  background: linear-gradient(135deg, var(--navy-900), var(--navy-700));
  color: #fff; position: relative; overflow: hidden;
}
/* Soft light bloom in the corner so the panel does not read as a flat slab. */
.result-box::after {
  content: ''; position: absolute; inset: 0; pointer-events: none;
  background: radial-gradient(320px 160px at 92% -20%, rgba(63,201,138,.24), transparent 70%);
}
.result-box > * { position: relative; z-index: 1; }
.result-box .result-label { font-size: var(--fs-xs); text-transform: uppercase; letter-spacing: .07em; opacity: .72; margin-bottom: 4px; }
.result-box .result-main {
  font-size: var(--fs-stat); font-weight: 800; letter-spacing: -.025em; line-height: 1.1;
  font-variant-numeric: tabular-nums; animation: countUp .4s var(--ease-out) both;
}
.result-box .result-sub { font-size: var(--fs-sm); opacity: .8; margin-top: 6px; }
.result-split { display: grid; grid-template-columns: 1fr 1fr; gap: 14px; margin-top: 18px; }
.result-mini { background: rgba(255,255,255,.09); border-radius: 10px; padding: 12px 14px; }
.result-mini .k { font-size: var(--fs-xs); text-transform: uppercase; letter-spacing: .06em; opacity: .7; }
.result-mini .v { font-size: var(--fs-md); font-weight: 700; margin-top: 2px; font-variant-numeric: tabular-nums; }

/* ---------- Tool grid ---------- */
.grid-cards { display: grid; grid-template-columns: repeat(auto-fit, minmax(280px, 1fr)); gap: 20px; }
.tool-card {
  display: block; background: #fff; border: 1px solid var(--line-200);
  border-radius: var(--radius); padding: 22px; color: inherit;
  position: relative; overflow: hidden;
  transition: border-color var(--dur) var(--ease),
              box-shadow var(--dur) var(--ease),
              transform var(--dur) var(--ease);
}
/* Coloured top rule that grows from the left on hover — replaces a flat
   border change with something that reads as a deliberate interaction. */
.tool-card::before {
  content: ''; position: absolute; top: 0; left: 0; right: 0; height: 3px;
  background: linear-gradient(90deg, var(--brand-500), var(--brand-300));
  transform: scaleX(0); transform-origin: left;
  transition: transform var(--dur) var(--ease-out);
}
.tool-card:hover {
  text-decoration: none; border-color: var(--brand-300);
  box-shadow: 0 14px 34px rgba(10,37,64,.11);
  transform: translateY(-4px);
}
.tool-card:hover::before { transform: scaleX(1); }
.tool-card.is-soon { cursor: default; opacity: .82; }
.tool-card.is-soon:hover { transform: none; border-color: var(--line-200); box-shadow: none; }
.tool-card.is-soon:hover::before { transform: scaleX(0); }
.tool-icon {
  width: 46px; height: 46px; border-radius: 12px; display: grid; place-items: center;
  background: var(--surface-tint); color: var(--navy-800); margin-bottom: 14px;
  transition: background var(--dur) var(--ease), color var(--dur) var(--ease),
              transform var(--dur) var(--ease);
}
.tool-icon svg { width: 22px; height: 22px; }
.tool-card:hover .tool-icon {
  background: var(--navy-900); color: #fff; transform: scale(1.06) rotate(-3deg);
}
.tool-card h3 { font-size: var(--fs-md); margin-bottom: .3em; }
.tool-card p { font-size: var(--fs-sm); color: var(--ink-500); margin: 0; }
.tool-card .tc-go {
  display: inline-flex; align-items: center; gap: 5px;
  font-size: var(--fs-sm); font-weight: 600; color: var(--brand-500);
  margin-top: 14px; opacity: 0; transform: translateX(-6px);
  transition: opacity var(--dur) var(--ease), transform var(--dur) var(--ease);
}
.tool-card:hover .tc-go { opacity: 1; transform: none; }
.badge {
  display: inline-block; font-size: var(--fs-xs); font-weight: 700; padding: 3px 9px;
  border-radius: 999px; text-transform: uppercase; letter-spacing: .05em; margin-bottom: 10px;
}
.badge-live { background: var(--finance-100); color: var(--finance-500); }
.badge-soon { background: var(--line-100); color: var(--ink-400); }

/* ---------- Worked example / comparison / mistakes / limits -------------
   Blocks used by the expanded calculator pages. They mirror the guide-page
   components so a calculator and a guide read as the same publication. */

.worked-example {
  margin-top: 46px; padding: 24px 26px;
  background: var(--surface-tint);
  border-left: 4px solid var(--accent-500);
  border-radius: 0 var(--radius) var(--radius) 0;
}
.worked-example > h2 { margin-top: 0; font-size: var(--fs-lg); }
.worked-example .step {
  display: grid; grid-template-columns: 30px 1fr; gap: 14px;
  padding: 14px 0; border-bottom: 1px solid var(--line-200);
}
.worked-example .step:last-child { border-bottom: 0; padding-bottom: 0; }
.worked-example .step-n {
  width: 28px; height: 28px; border-radius: 50%;
  display: grid; place-items: center; flex-shrink: 0;
  background: var(--accent-500); color: #fff;
  font-size: var(--fs-xs); font-weight: 800;
}
.worked-example .step-body p { margin: 0; font-size: var(--fs-sm); }
.worked-example .step-body strong { color: var(--navy-900); }
.worked-example .formula {
  font-family: var(--font-mono); font-size: var(--fs-sm);
  background: var(--surface); border: 1px solid var(--line-200);
  border-radius: var(--radius-sm); padding: 13px 16px; margin: 12px 0;
  overflow-x: auto; color: var(--navy-800);
}

.comparison-block, .mistakes-block, .limits-block { margin-top: 46px; }
.comparison-block > h2, .mistakes-block > h2, .limits-block > h2 { font-size: var(--fs-lg); }

.mistake-list, .limits-list { list-style: none; padding: 0; margin: 18px 0 0; }
.mistake-list li, .limits-list li {
  position: relative; padding: 14px 16px 14px 46px;
  border: 1px solid var(--line-200); border-radius: var(--radius-sm);
  margin-bottom: 10px; font-size: var(--fs-sm); color: var(--ink-600);
  background: var(--surface);
  transition: border-color var(--dur) var(--ease), background var(--dur) var(--ease);
}
.mistake-list li:hover, .limits-list li:hover {
  border-color: var(--brand-300); background: var(--surface-alt);
}
.mistake-list li::before, .limits-list li::before {
  content: ''; position: absolute; left: 17px; top: 19px;
  width: 17px; height: 17px; border-radius: 50%;
  background-repeat: no-repeat; background-position: center;
  background-size: 11px 11px;
}
.mistake-list li::before {
  background-color: #FDF2F0;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23C0392B' stroke-width='3.2' stroke-linecap='round'%3E%3Cpath d='M18 6L6 18M6 6l12 12'/%3E%3C/svg%3E");
}
.limits-list li::before {
  background-color: #EAF2FE;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%232563EB' stroke-width='3.2' stroke-linecap='round'%3E%3Cpath d='M12 8v5M12 17h.01'/%3E%3C/svg%3E");
}
.mistake-list strong, .limits-list strong { display: block; margin-bottom: 3px; }

/* Numbered/lettered source list for calculator citations. */
.source-list { list-style: none; padding: 0; margin: 16px 0 0; }
.source-list li {
  font-size: var(--fs-sm); color: var(--ink-600);
  padding: 9px 0; border-bottom: 1px solid var(--line-100);
}
.source-list li:last-child { border-bottom: 0; }
.source-list a { text-decoration: underline; text-underline-offset: 2px; }
.source-list .src-pub { color: var(--ink-400); font-size: var(--fs-xs); }

.prose { max-width: 72ch; }
.prose h2 { margin-top: 2em; }
.prose h3 { margin-top: 1.6em; }
.callout {
  border-left: 4px solid var(--brand-400); background: var(--surface-tint);
  padding: 16px 20px; border-radius: 0 var(--radius-sm) var(--radius-sm) 0; margin: 20px 0;
}
.callout--warn { border-left-color: var(--warning); background: #FFFBF0; }
.callout--danger { border-left-color: var(--danger); background: #FEF4F3; }
.callout p:last-child { margin-bottom: 0; }
.callout strong { color: var(--navy-900); }

/* FAQ — plain visible Q&A on article pages. A separate class from
   .faq-acc (the <details> accordion used on directory pages) because the
   two share a name and the collision broke both layouts. */
.faq-item { border-bottom: 1px solid var(--line-200); padding: 18px 0; }
.faq-item:last-child { border-bottom: 0; }
.faq-item h3 { font-size: 1.05rem; margin-bottom: .4em; color: var(--navy-900); }
.faq-item p { color: var(--ink-500); margin: 0; font-size: .94rem; line-height: 1.65; }

table.data { width: 100%; border-collapse: collapse; margin: 20px 0; font-size: .92rem; }
table.data th, table.data td { text-align: left; padding: 11px 14px; border-bottom: 1px solid var(--line-200); }
table.data th { background: var(--surface-alt); font-weight: 700; color: var(--navy-900); font-size: .84rem; text-transform: uppercase; letter-spacing: .04em; }

/* ---- Contact page -------------------------------------------------------
   The contact form composes a mailto: message client-side — no backend, so
   the site can stay purely static. Cards give AdSense and readers a clear
   picture of who to write to and how quickly we reply.
   ------------------------------------------------------------------------ */

.contact-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
  gap: 16px;
  margin: 24px 0 34px;
}
.contact-card {
  padding: 18px 20px;
  background: var(--surface-alt);
  border: 1px solid var(--line-200);
  border-radius: var(--radius);
}
.contact-card h3 { margin: 0 0 8px; font-size: 1rem; color: var(--navy-900); }
.contact-card p { margin: 0 0 6px; font-size: .92rem; }
.contact-card p:last-child { margin-bottom: 0; }
.contact-card .muted { font-size: .84rem; line-height: 1.55; }

.contact-form {
  margin: 22px 0 34px;
  padding: 24px 26px;
  background: var(--surface-tint);
  border: 1px solid var(--line-200);
  border-radius: var(--radius);
}
.contact-form .field label { font-size: .88rem; }
.contact-form select,
.contact-form input[type="text"],
.contact-form textarea {
  width: 100%;
  padding: 10px 12px;
  font: inherit;
  font-size: .95rem;
  color: var(--ink-800);
  background: #fff;
  border: 1px solid var(--line-200);
  border-radius: var(--radius-sm);
}
.contact-form select:focus,
.contact-form input:focus,
.contact-form textarea:focus {
  outline: 2px solid var(--brand-500);
  outline-offset: 1px;
  border-color: var(--brand-500);
}
.contact-form textarea { resize: vertical; min-height: 140px; }
.contact-form .field-row {
  display: flex;
  align-items: center;
  gap: 14px;
  flex-wrap: wrap;
  margin-bottom: 0;
}
.contact-form .field-row .muted { font-size: .84rem; }

/* ---- Dark mode --------------------------------------------------------- */
@media (prefers-color-scheme: dark) {
  .contact-card { background: var(--surface-alt); border-color: var(--line-200); }
  .contact-card h3 { color: var(--ink-900); }
  .contact-form { background: var(--surface-tint); border-color: var(--line-200); }
  .contact-form select,
  .contact-form input[type="text"],
  .contact-form textarea {
    background: var(--surface-alt);
    color: var(--ink-800);
    border-color: var(--line-200);
  }
}

/* ---- Rich guide content blocks ------------------------------------------
   Components used by the expanded guide pages (buildRichBody in
   tools/gen-guides-part2.js). They are separate from .callout because the
   semantics differ: .answer-box is the AEO direct answer that sits directly
   under the H1 and is what a voice assistant or AI overview should quote.
   ------------------------------------------------------------------------ */

/* The direct answer. Deliberately the first thing in the article body so
   the lead paragraph + this block form one self-contained, quotable unit. */
.answer-box {
  background: var(--surface-tint);
  border-left: 4px solid var(--brand-500);
  border-radius: 0 var(--radius-sm) var(--radius-sm) 0;
  padding: 18px 22px;
  margin: 26px 0 30px;
}
.answer-box p { margin: 0; font-size: 1.03rem; line-height: 1.68; color: var(--ink-700); }
.answer-box strong { color: var(--navy-900); }

/* Key takeaways — the scannable summary. Sits at the foot of the article,
   after the sources, so the reader who scrolls to the end gets the recap. */
.key-takeaways {
  margin-top: 46px;
  padding: 24px 26px;
  background: var(--surface-alt);
  border: 1px solid var(--line-200);
  border-radius: var(--radius);
}
.key-takeaways h2 { margin-top: 0; font-size: 1.12rem; }
.key-takeaways ul { margin: 0; padding-left: 20px; }
.key-takeaways li { margin-bottom: 9px; color: var(--ink-600); line-height: 1.62; }
.key-takeaways li:last-child { margin-bottom: 0; }

/* Provenance note that closes the sources block. Explains in the reader's
   own terms how the numbers were handled — a trust signal, not filler. */
.src-note {
  margin-top: 18px;
  font-size: .86rem;
  color: var(--ink-400);
  line-height: 1.6;
}
.src-note a { color: var(--ink-500); text-decoration: underline; }

/* Tables inside the expanded guides reuse table.data + .table-scroll. Give
   the header row a little more presence on long comparison tables. */
.table-scroll table.data caption {
  caption-side: top;
  text-align: left;
  font-size: .84rem;
  color: var(--ink-400);
  padding-bottom: 10px;
}

/* Long-form readability: the expanded guides carry real prose now, so cap
   the measure and give headings breathing room. */
.calc-main > h2 { margin-top: 2.1em; }
.calc-main > h3 { margin-top: 1.7em; }
.calc-main p, .calc-main li { text-wrap: pretty; }
.calc-main > h2, .calc-main > h3 { text-wrap: balance; }
.calc-main ol, .calc-main ul { padding-left: 22px; }
.calc-main li { margin-bottom: 7px; }

/* In-body link styling — expanded guides cite external sources inline.
   The underline starts transparent and draws in on hover so long-form text
   stays calm while links are still unmistakably links. */
.calc-main a, .prose a {
  color: var(--navy-600);
  text-decoration: underline;
  text-underline-offset: 3px;
  text-decoration-thickness: 1px;
  text-decoration-color: var(--line-200);
  transition: color var(--dur-fast) var(--ease),
              text-decoration-color var(--dur-fast) var(--ease);
}
.calc-main a:hover, .prose a:hover {
  color: var(--brand-600);
  text-decoration-color: var(--brand-500);
}

/* ---------- Data tables ------------------------------------------------- */
.table-scroll { overflow-x: auto; -webkit-overflow-scrolling: touch; margin: 22px 0; }
table.data {
  width: 100%; border-collapse: collapse; margin: 0;
  font-size: var(--fs-sm);
}
table.data th, table.data td {
  text-align: left; padding: 12px 15px;
  border-bottom: 1px solid var(--line-200);
  font-variant-numeric: tabular-nums;
}
table.data th {
  background: var(--surface-alt); font-weight: 700; color: var(--navy-900);
  font-size: var(--fs-xs); text-transform: uppercase; letter-spacing: .04em;
  position: sticky; top: 0; z-index: 1;
}
table.data tbody tr { transition: background var(--dur-fast) var(--ease); }
table.data tbody tr:hover { background: var(--surface-tint); }
table.data tbody tr:last-child td { border-bottom: 0; }
table.data td.num, table.data th.num { text-align: right; }

/* ---------- Result chart -------------------------------------------------
   A single lightweight inline SVG per calculator. No chart library — the
   markup is generated by the calculator script, so there is nothing to load
   and nothing to block paint. */
.calc-chart {
  margin: 22px 0 4px; padding: 18px 18px 12px;
  background: var(--surface-alt); border: 1px solid var(--line-200);
  border-radius: var(--radius);
}
.calc-chart h4 {
  margin: 0 0 12px; font-size: var(--fs-sm); color: var(--ink-500);
  text-transform: uppercase; letter-spacing: .06em; font-weight: 700;
}
.calc-chart svg { width: 100%; height: auto; display: block; overflow: visible; }
.calc-chart .axis { stroke: var(--line-200); stroke-width: 1; }
.calc-chart .grid-line { stroke: var(--line-100); stroke-width: 1; stroke-dasharray: 3 4; }
.calc-chart .series-main { fill: none; stroke: var(--brand-500); stroke-width: 2.4; stroke-linejoin: round; stroke-linecap: round; }
.calc-chart .series-alt  { fill: none; stroke: var(--navy-600); stroke-width: 1.8; stroke-dasharray: 5 4; stroke-linejoin: round; }
.calc-chart .area-main   { fill: url(#chartFill); }
.calc-chart .dot { fill: #fff; stroke: var(--brand-500); stroke-width: 2; }
.calc-chart .tick { font-size: 10px; fill: var(--ink-400); font-family: var(--font); }
.calc-chart .legend { display: flex; gap: 16px; flex-wrap: wrap; margin-top: 10px; font-size: var(--fs-xs); color: var(--ink-400); }
.calc-chart .legend span { display: inline-flex; align-items: center; gap: 6px; }
.calc-chart .legend i { width: 15px; height: 3px; border-radius: 2px; display: inline-block; }
.calc-chart .legend i.main { background: var(--brand-500); }
.calc-chart .legend i.alt { background: var(--navy-600); }
.js .calc-chart svg .series-main,
.js .calc-chart svg .series-alt {
  stroke-dasharray: 1000;
  animation: drawLine 1.25s var(--ease-out) both;
}
.js .calc-chart svg .area-main { animation: fadeIn .9s var(--ease-out) .35s both; }

/* ---------- Result actions (copy link / print / csv) -------------------- */
.result-actions { display: flex; gap: 8px; flex-wrap: wrap; margin-top: 16px; }
.result-actions button {
  display: inline-flex; align-items: center; gap: 6px;
  font: inherit; font-size: var(--fs-xs); font-weight: 600;
  padding: 8px 13px; border-radius: 8px; cursor: pointer;
  background: rgba(255,255,255,.1); color: #fff;
  border: 1px solid rgba(255,255,255,.2);
  transition: background var(--dur-fast) var(--ease),
              transform var(--dur-fast) var(--ease);
}
.result-actions button:hover { background: rgba(255,255,255,.2); transform: translateY(-1px); }
.result-actions button:focus-visible { outline: 2px solid #fff; outline-offset: 2px; }
.result-actions button svg { width: 14px; height: 14px; }

/* ---------- Toast ------------------------------------------------------- */
.toast {
  position: fixed; left: 50%; bottom: 28px; transform: translate(-50%, 90px);
  background: var(--navy-900); color: #fff;
  padding: 12px 20px; border-radius: 10px;
  font-size: var(--fs-sm); font-weight: 600;
  box-shadow: 0 14px 40px rgba(10,37,64,.3);
  z-index: 200; opacity: 0; pointer-events: none;
  transition: transform var(--dur) var(--ease-out), opacity var(--dur) var(--ease);
}
.toast.is-open { transform: translate(-50%, 0); opacity: 1; }

/* ---------- Back to top ------------------------------------------------- */
.to-top {
  position: fixed; right: 22px; bottom: 22px;
  width: 44px; height: 44px; border-radius: 50%;
  display: grid; place-items: center; cursor: pointer;
  background: var(--navy-900); color: #fff; border: 0;
  box-shadow: var(--shadow-lg); z-index: 90;
  opacity: 0; transform: translateY(14px) scale(.9); pointer-events: none;
  transition: opacity var(--dur) var(--ease), transform var(--dur) var(--ease-out);
}
.to-top.is-open { opacity: 1; transform: none; pointer-events: auto; }
.to-top:hover { background: var(--brand-600); transform: translateY(-3px); }
.to-top:focus-visible { outline: 2px solid var(--brand-500); outline-offset: 3px; }
.to-top svg { width: 19px; height: 19px; }

/* ---------- Progress bar ------------------------------------------------ */
.read-progress {
  position: fixed; top: 0; left: 0; height: 3px; width: 100%;
  transform: scaleX(0); transform-origin: left;
  background: linear-gradient(90deg, var(--brand-500), var(--brand-300), var(--accent-400));
  z-index: 60; pointer-events: none;
}

/* ---------- Feature strip ---------------------------------------------- */
.feature-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(230px, 1fr)); gap: 18px; }
.feature-card {
  background: #fff; border: 1px solid var(--line-200);
  border-radius: var(--radius); padding: 22px;
  transition: border-color var(--dur) var(--ease),
              box-shadow var(--dur) var(--ease),
              transform var(--dur) var(--ease);
}
.feature-card:hover {
  border-color: var(--brand-300); box-shadow: var(--shadow);
  transform: translateY(-3px);
}
.feature-card .fi {
  width: 40px; height: 40px; border-radius: 10px; display: grid; place-items: center;
  background: linear-gradient(135deg, var(--navy-900), var(--brand-500));
  color: #fff; margin-bottom: 14px;
}
.feature-card .fi svg { width: 20px; height: 20px; }
.feature-card h3 { font-size: var(--fs-md); margin-bottom: .35em; }
.feature-card p { font-size: var(--fs-sm); color: var(--ink-500); margin: 0; }

.footer-grid { display: grid; grid-template-columns: 1.4fr 1fr 1fr 1fr; gap: 34px; }
.site-footer h4, .site-footer .footer-col-title { color: #fff; font-size: .92rem; text-transform: uppercase; letter-spacing: .06em; margin-bottom: 14px; }
.site-footer a { color: #B9C7D6; font-size: .9rem; display: block; margin-bottom: 9px; }
.site-footer a:hover { color: #fff; text-decoration: none; }
.footer-brand p { font-size: .9rem; max-width: 32ch; color: #8E9DB0; }
.footer-bottom {
  border-top: 1px solid rgba(255,255,255,.1); margin-top: 38px; padding-top: 22px;
  display: flex; justify-content: space-between; gap: 18px; flex-wrap: wrap; font-size: .82rem; color: #8E9DB0;
}
.disclaimer-bar {
  background: rgba(255,255,255,.05); border-radius: var(--radius-sm);
  padding: 14px 18px; font-size: .8rem; color: #93A3B5; margin-bottom: 30px; line-height: 1.6;
}

/* ---------- Responsive ---------- */
@media (max-width: 1020px) {
  .hero-grid { grid-template-columns: 1fr; gap: 36px; }
  .footer-grid { grid-template-columns: 1fr 1fr; }
  /* §5: the nav grew from 7 items to 9 ("Glossary", "Personal Finance"), which
     pushes the desktop row to roughly 1000px inside a 1100px container. Collapse
     to the hamburger at 1020px instead of 900px so there is real slack rather
     than relying on the estimate being right. */
  .nav-links {
    display: none; position: absolute; top: 68px; left: 0; right: 0;
    background: #fff; border-bottom: 1px solid var(--line-200);
    flex-direction: column; align-items: stretch; gap: 0; padding: 10px 20px 18px;
    box-shadow: var(--shadow);
  }
  .nav-links.open { display: flex; }
  .nav-links a { padding: 11px 0; border-bottom: 1px solid var(--line-100); }
  .nav-toggle { display: block; }
}
@media (max-width: 560px) {
  .section { padding: 44px 0; }
  .hero { padding: 52px 0 46px; }
  .field-row, .result-split { grid-template-columns: 1fr; }
  .footer-grid { grid-template-columns: 1fr; }
  .calc-card { padding: 20px; }
  .result-box .result-main { font-size: 1.7rem; }
  .state-grid { grid-template-columns: repeat(auto-fill, minmax(132px, 1fr)); gap: 8px; }
  .state-card { padding: 10px 11px; gap: 9px; }
  .state-abbr { width: 30px; height: 26px; font-size: .68rem; }
  .state-name { font-size: .8rem; }
  .stat strong { font-size: 1.55rem; }
}

/* ---------- Article / Blog ---------- */
.post-header { padding: 44px 0 8px; }
.post-meta { display: flex; align-items: center; gap: 14px; flex-wrap: wrap; font-size: .86rem; color: var(--ink-400); margin-bottom: 14px; }
.post-meta .pill { background: var(--surface-tint); color: var(--navy-800); padding: 4px 11px; border-radius: 999px; font-weight: 600; font-size: .78rem; text-transform: uppercase; letter-spacing: .05em; }
.post-body { font-size: 1.06rem; line-height: 1.78; }
.post-body h2 { margin-top: 2.1em; padding-top: .3em; }
.post-body h3 { margin-top: 1.7em; }
.post-body > p:first-of-type { font-size: 1.16rem; color: var(--ink-600, #3D4B5C); }
.post-body img, .post-body svg.figure { margin: 26px 0; border-radius: var(--radius); }
.figure-wrap { margin: 30px 0; }
.figure-wrap svg { width: 100%; height: auto; display: block; border-radius: var(--radius); border: 1px solid var(--line-200); background: #fff; }
.figure-cap { font-size: .85rem; color: var(--ink-400); margin-top: 10px; text-align: center; }
.keybox { background: linear-gradient(135deg, var(--navy-900), var(--navy-700)); color: #fff; border-radius: var(--radius); padding: 22px 24px; margin: 28px 0; }
.keybox h3 { color: #fff; margin-top: 0; font-size: 1.05rem; }
.keybox ul { margin: 0; padding-left: 1.2rem; }
.keybox li { margin-bottom: .5rem; }
.keybox li:last-child { margin-bottom: 0; }
.keybox strong { color: #7FD8AE; }
.tool-cta {
  border: 1px solid var(--brand-300); background: linear-gradient(135deg, #F2FBF7, #FFFFFF);
  border-radius: var(--radius); padding: 20px 22px; margin: 30px 0; display: flex;
  align-items: center; justify-content: space-between; gap: 18px; flex-wrap: wrap;
}
.tool-cta p { margin: 0; font-size: .95rem; color: var(--ink-600, #3D4B5C); }
.tool-cta strong { color: var(--navy-900); display: block; margin-bottom: 3px; font-size: 1.02rem; }
.toc { background: var(--surface-alt); border: 1px solid var(--line-200); border-radius: var(--radius); padding: 20px 24px; margin: 28px 0; }
.toc h3, .toc .toc-title { font-size: .82rem; text-transform: uppercase; letter-spacing: .07em; color: var(--ink-400); margin-bottom: 12px; }
.toc ol { margin: 0; padding-left: 1.2rem; font-size: .94rem; }
.toc li { margin-bottom: .4rem; }
.author-box { display: flex; gap: 16px; align-items: flex-start; border-top: 1px solid var(--line-200); margin-top: 46px; padding-top: 24px; }
.author-avatar { width: 48px; height: 48px; border-radius: 50%; background: linear-gradient(135deg, var(--navy-900), var(--brand-500)); display: grid; place-items: center; color: #fff; font-weight: 800; flex-shrink: 0; }
.author-box p { font-size: .88rem; color: var(--ink-500); margin: 0; }
.author-box strong { color: var(--navy-900); display: block; font-size: .95rem; margin-bottom: 3px; }
.related { margin-top: 46px; }
.related h2 { font-size: 1.25rem; }

/* Blog index cards */
.post-card {
  display: block; background: #fff; border: 1px solid var(--line-200);
  border-radius: var(--radius); padding: 24px; color: inherit;
  position: relative; overflow: hidden;
  transition: border-color var(--dur) var(--ease),
              box-shadow var(--dur) var(--ease),
              transform var(--dur) var(--ease);
}
.post-card::before {
  content: ''; position: absolute; left: 0; top: 0; bottom: 0; width: 3px;
  background: linear-gradient(180deg, var(--brand-500), var(--brand-300));
  transform: scaleY(0); transform-origin: top;
  transition: transform var(--dur) var(--ease-out);
}
.post-card:hover {
  text-decoration: none; border-color: var(--brand-300);
  box-shadow: 0 14px 34px rgba(10,37,64,.11); transform: translateY(-4px);
}
.post-card:hover::before { transform: scaleY(1); }
.post-card .cat { font-size: var(--fs-xs); font-weight: 700; text-transform: uppercase; letter-spacing: .06em; color: var(--brand-500); }
.post-card h3 { font-size: var(--fs-md); margin: .5em 0 .4em; }
.post-card p { font-size: var(--fs-sm); color: var(--ink-500); margin: 0; }
.post-card .read { font-size: var(--fs-xs); color: var(--ink-400); margin-top: 12px; display: block; }

/* ---------- Bank directory ---------- */
.bank-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(300px, 1fr)); gap: 20px; }
.bank-card {
  display: block; background: #fff; border: 1px solid var(--line-200);
  border-radius: var(--radius); padding: 22px; color: inherit;
  transition: border-color var(--dur) var(--ease),
              box-shadow var(--dur) var(--ease),
              transform var(--dur) var(--ease);
}
.bank-card:hover {
  text-decoration: none; border-color: var(--brand-300);
  box-shadow: 0 14px 34px rgba(10,37,64,.11); transform: translateY(-4px);
}
.bank-card:hover .bank-logo { transform: scale(1.07); }
.bank-head { display: flex; align-items: center; gap: 13px; margin-bottom: 14px; }
.bank-logo {
  width: 46px; height: 46px; border-radius: 11px; flex-shrink: 0;
  display: grid; place-items: center; font-weight: 800; font-size: var(--fs-sm);
  letter-spacing: .01em; color: #fff; background: var(--navy-800);
  transition: transform var(--dur) var(--ease);
}
.bank-logo--wise { background: #163300; }
.bank-logo--revolut { background: #0666EB; }
.bank-logo--n26 { background: #1B1B1B; }
.bank-logo--monzo { background: #FF4F40; }
.bank-logo--chime { background: #1EC677; color: #06301C; }
.bank-logo--sofi { background: #00A5A5; }
.bank-logo--mercury { background: #5266EB; }
.bank-logo--wisebiz { background: #163300; }
.bank-logo--revolutbiz { background: #0666EB; }
.bank-logo--kraken { background: #5741D9; }
.bank-logo--coinbase { background: #0052FF; }
.bank-name { font-size: 1.04rem; font-weight: 700; color: var(--navy-900); margin: 0; line-height: 1.3; }
.bank-tag { font-size: .78rem; color: var(--ink-400); margin: 2px 0 0; }
.bank-meta { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 12px; }
.chip {
  font-size: .72rem; font-weight: 600; padding: 3px 9px; border-radius: 999px;
  background: var(--surface-tint); color: var(--navy-700); border: 1px solid transparent;
}
.chip--good { background: #E6F6EE; color: #0F6E56; }
.chip--warn { background: #FFFBF0; color: #854F0B; }
.chip--info { background: #EAF2FE; color: #1D4ED8; }
/* Card body text is now a full institution profile (55-85 words) rather than
   a five-word label, so it needs a comfortable measure and line height. */
.bank-card p { font-size: .9rem; color: var(--ink-500); margin: 0; line-height: 1.62; }

/* Official-source links: bank cards, regulator rows, deposit scheme rows.
   These are citations to primary sources, not paid placements — so no
   rel="nofollow". They exist so a reader can verify any claim on the page. */
a.bank-card { cursor: pointer; text-decoration: none; }
a.bank-card .bank-name { text-decoration: none; }
a.bank-card:hover .bank-name { text-decoration: underline; text-underline-offset: 3px; }
.ext-mark {
  display: inline-block; margin-left: 5px; font-size: .78em;
  color: var(--brand-500); transform: translateY(-1px);
}
.src-link {
  color: var(--brand-500); font-weight: 600;
  text-decoration: underline; text-underline-offset: 2px;
  text-decoration-color: var(--line-200);
}
.src-link:hover { text-decoration-color: var(--brand-500); }
.src-note {
  display: block; margin-top: 6px; font-size: .82rem;
  color: var(--ink-400); line-height: 1.55;
}

/* FAQ — plain <details>, so it works without JavaScript and costs no CLS. */
.faq-acc-list { display: flex; flex-direction: column; gap: 10px; max-width: 860px; }
.faq-acc {
  background: #fff; border: 1px solid var(--line-200);
  border-radius: var(--radius-sm); padding: 0 18px;
}
.faq-acc[open] { border-color: var(--brand-300); }
.faq-acc summary {
  cursor: pointer; padding: 15px 0; font-weight: 600;
  color: var(--navy-900); font-size: .98rem; list-style: none;
  display: flex; justify-content: space-between; align-items: center; gap: 14px;
}
.faq-acc summary::-webkit-details-marker { display: none; }
.faq-acc summary::after {
  content: "+"; font-weight: 400; font-size: 1.3rem; line-height: 1;
  color: var(--brand-500); flex-shrink: 0;
}
.faq-acc[open] summary::after { content: "\2212"; }
.faq-a {
  padding: 0 0 16px; font-size: .92rem; color: var(--ink-500);
  line-height: 1.65; border-top: 1px solid var(--line-100); padding-top: 14px;
}

/* Sources list — the verifiable basis for claims made on the page. */
.sources-block { margin-top: 46px; padding-top: 26px; border-top: 1px solid var(--line-200); }
.sources-block h2 { margin-top: 0; }
.src-list { list-style: none; padding: 0; margin: 20px 0 0; max-width: 860px; }
.src-list li {
  padding: 11px 0; border-bottom: 1px solid var(--line-100);
  font-size: .92rem; color: var(--ink-500);
}
.src-list li:last-child { border-bottom: 0; }
.src-pub { display: block; margin-top: 3px; font-size: .82rem; color: var(--ink-400); }

/* Comparison table refinement */
.cmp-table { width: 100%; border-collapse: collapse; font-size: .9rem; }
.cmp-table th {
  background: var(--navy-900); color: #fff; text-align: left;
  padding: 12px 14px; font-weight: 600; font-size: .82rem;
  text-transform: uppercase; letter-spacing: .04em;
}
.cmp-table td { padding: 12px 14px; border-bottom: 1px solid var(--line-200); vertical-align: top; }
.cmp-table tbody tr:nth-child(even) { background: var(--surface-alt); }
.cmp-table .yes { color: #1B7F5A; font-weight: 700; }
.cmp-table .no { color: #C0392B; font-weight: 700; }
.table-scroll { overflow-x: auto; -webkit-overflow-scrolling: touch; margin: 24px 0; }

/* Section hub editorial intro — two-column prose + how-to-use block */
.intro-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 40px;
  align-items: start;
}
.intro-grid > div > p {
  font-size: .96rem;
  line-height: 1.72;
  color: var(--ink-700);
  margin: 0 0 16px;
}
.intro-grid > div > p:last-child { margin-bottom: 0; }
.intro-grid .sh-title { margin: 0 0 16px; }
.intro-grid .req-list { margin: 0; }
.intro-grid .faq-acc-list { max-width: 860px; }
@media (max-width: 860px) {
  .intro-grid { grid-template-columns: 1fr; gap: 30px; }
}

/* Requirement checklist */
.req-list { list-style: none; padding: 0; margin: 20px 0; }
.req-list li {
  display: flex; gap: 12px; align-items: flex-start;
  padding: 12px 0; border-bottom: 1px solid var(--line-200);
}
.req-list li:last-child { border-bottom: none; }
.req-num {
  width: 26px; height: 26px; border-radius: 50%; flex-shrink: 0;
  background: var(--navy-900); color: #fff; display: grid; place-items: center;
  font-size: .78rem; font-weight: 700; margin-top: 1px;
}
.req-list strong { display: block; color: var(--navy-900); font-size: .95rem; margin-bottom: 2px; }
.req-list span { font-size: .89rem; color: var(--ink-500); }

/* ---------- US state directory ---------- */
.state-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(158px, 1fr));
  gap: 10px;
}
.state-card {
  display: flex; align-items: center; gap: 11px;
  padding: 12px 14px;
  background: #fff;
  border: 1px solid var(--line-200);
  border-radius: 10px;
  color: inherit;
  transition: all .16s ease;
}
.state-card:hover {
  text-decoration: none;
  border-color: var(--brand-400, var(--brand-500));
  box-shadow: var(--shadow);
  transform: translateY(-2px);
}
.state-abbr {
  flex-shrink: 0;
  width: 36px; height: 30px;
  display: grid; place-items: center;
  border-radius: 7px;
  background: var(--navy-900);
  color: #fff;
  font-size: .74rem; font-weight: 800; letter-spacing: .04em;
}
.state-abbr--code {
  width: 42px;
  font-size: .66rem;
  letter-spacing: .02em;
  background: var(--brand-600, var(--brand-500));
}
.state-name {
  font-size: .86rem; font-weight: 600; color: var(--navy-900);
  line-height: 1.25;
}

/* Region grouping on the hub page */
.region-block > h3 {
  display: flex; align-items: center; gap: 12px;
  font-size: 1.05rem; color: var(--navy-900); margin-bottom: 16px;
}
.region-block > h3::after {
  content: ''; flex: 1; height: 1px; background: var(--line-200);
}

/* Breadcrumbs */
.crumbs {
  font-size: .82rem; color: var(--ink-400);
  margin-bottom: 14px;
  display: flex; flex-wrap: wrap; gap: 6px; align-items: center;
}
.crumbs a { color: var(--ink-500); }
.crumbs a:hover { color: var(--brand-500); }
.crumbs span { color: var(--ink-300, var(--ink-400)); }
.crumbs > span:last-child { color: var(--navy-800); font-weight: 600; }

/* Stat cards */
.grid--3 {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
  gap: 18px;
}
.stat {
  background: #fff; border: 1px solid var(--line-200);
  border-radius: var(--radius); padding: 22px 20px;
  text-align: center;
}
.stat strong {
  display: block; font-size: 1.9rem; font-weight: 800;
  color: var(--navy-900); line-height: 1.1; letter-spacing: -.02em;
}
.stat span {
  display: block; margin-top: 5px;
  font-size: .84rem; color: var(--ink-500);
}

/* ---------- Verification line (reference pages) ---------- */
/* Sits under the H1 on any page carrying checkable figures.
   Deliberately visible rather than muted-into-invisibility: the date
   is the whole point, and burying it would defeat the purpose. */
.verified {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 6px;
  margin: 10px 0 26px;
  padding: 9px 14px;
  font-size: .82rem;
  line-height: 1.5;
  color: var(--ink-500);
  background: var(--surface-alt, #F7F9FC);
  border-left: 3px solid var(--brand-500);
  border-radius: 0 8px 8px 0;
}
.verified time {
  font-weight: 700;
  color: var(--navy-800, var(--navy-900));
}
.verified a { color: var(--brand-500); text-decoration: underline; }

/* ============================================================
   AFFILIATE — link slots, disclosure, program cards
   ============================================================ */

/* ---------- In-page monetised link slot ---------- */
.aff-btn {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 13px 22px;
  background: var(--brand-600, var(--brand-500));
  color: #fff;
  font-weight: 700;
  font-size: .95rem;
  border-radius: 10px;
  text-decoration: none;
  transition: background .16s ease, transform .16s ease;
}
.aff-btn:hover {
  background: var(--brand-700, var(--navy-900));
  color: #fff;
  text-decoration: none;
  transform: translateY(-1px);
}

/* The required disclosure line. Deliberately readable — never tiny grey
   text designed to be missed, which is the pattern regulators reject. */
.aff-fine {
  margin: 10px 0 0;
  font-size: .82rem;
  line-height: 1.6;
  color: var(--ink-500);
  max-width: 60ch;
}
.aff-fine a { color: var(--brand-500); text-decoration: underline; }

/* A block that groups a link and its disclosure, for spacing rhythm. */
.aff-block {
  margin: 26px 0;
  padding: 20px 22px;
  background: var(--surface-alt, #F7F9FC);
  border: 1px solid var(--line-200);
  border-left: 3px solid var(--brand-500);
  border-radius: 10px;
}
.aff-block > h3, .aff-block > h2 { margin: 0 0 8px; font-size: 1rem; color: var(--navy-900); }
.aff-block > p { margin: 0 0 14px; font-size: .92rem; color: var(--ink-500); }

/* ---------- Program cards (working page) ---------- */
.aff-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  gap: 16px;
  margin: 24px 0 40px;
}
.aff-card {
  background: #fff;
  border: 1px solid var(--line-200);
  border-radius: var(--radius);
  padding: 20px 22px;
  display: flex;
  flex-direction: column;
  gap: 12px;
  position: relative;
  transition: box-shadow .16s ease, border-color .16s ease;
}
.aff-card:hover { box-shadow: var(--shadow); border-color: var(--brand-400, var(--brand-500)); }
.aff-card.is-live { border-color: var(--brand-500); box-shadow: 0 0 0 1px var(--brand-500) inset; }

.aff-card-head {
  display: flex;
  flex-wrap: wrap;
  align-items: baseline;
  justify-content: space-between;
  gap: 8px;
}
.aff-card-head h3 {
  margin: 0;
  font-size: 1.02rem;
  color: var(--navy-900);
  letter-spacing: -.01em;
}
.aff-cat {
  font-size: .7rem;
  font-weight: 700;
  letter-spacing: .05em;
  text-transform: uppercase;
  color: var(--brand-600, var(--brand-500));
  background: rgba(27,127,90,.08);
  padding: 3px 9px;
  border-radius: 20px;
  white-space: nowrap;
}
.aff-tagline {
  margin: 0;
  font-size: .89rem;
  line-height: 1.6;
  color: var(--ink-500);
}
.aff-meta {
  margin: 0;
  display: grid;
  gap: 8px;
  padding: 12px 0 0;
  border-top: 1px solid var(--line-200);
}
.aff-meta > div {
  display: flex;
  justify-content: space-between;
  gap: 14px;
  align-items: baseline;
}
.aff-meta dt {
  font-size: .78rem;
  color: var(--ink-400);
  font-weight: 600;
  flex-shrink: 0;
}
.aff-meta dd {
  margin: 0;
  font-size: .82rem;
  font-weight: 700;
  color: var(--navy-800, var(--navy-900));
  text-align: right;
}
.aff-status {
  align-self: flex-start;
  font-size: .72rem;
  font-weight: 800;
  letter-spacing: .04em;
  text-transform: uppercase;
  padding: 4px 11px;
  border-radius: 20px;
}
.aff-status.is-off { background: #EEF2F7; color: var(--ink-400); }
.aff-status.is-on { background: rgba(27,127,90,.12); color: var(--brand-700, var(--brand-600)); }

/* ---------- Network cards ---------- */
.aff-network {
  background: #fff;
  border: 1px solid var(--line-200);
  border-radius: var(--radius);
  padding: 20px 22px;
  display: flex;
  flex-direction: column;
  gap: 10px;
  transition: box-shadow .16s ease, transform .16s ease;
}
.aff-network:hover { box-shadow: var(--shadow); transform: translateY(-2px); }
.aff-best {
  margin: 0;
  font-size: .82rem;
  color: var(--ink-500);
}
.link-out {
  margin-top: auto;
  font-size: .85rem;
  font-weight: 700;
  color: var(--brand-500);
  text-decoration: none;
}
.link-out:hover { text-decoration: underline; color: var(--brand-600, var(--brand-500)); }

/* ---------- Mobile ---------- */
@media (max-width: 560px) {
  .aff-grid { grid-template-columns: 1fr; gap: 13px; }
  .aff-card, .aff-network { padding: 17px 18px; }
  .aff-btn { width: 100%; justify-content: center; padding: 14px 18px; }
  .aff-meta > div { flex-direction: column; gap: 2px; }
  .aff-meta dd { text-align: left; }
  .aff-block { padding: 17px 18px; }
}

/* ---------- Print ---------- */
@media print {
  .site-header, .site-footer, .hero-actions, .nav-toggle { display: none; }
}

/* ============================================================
   v2.0 EXTENSIONS — Modern Fintech Editorial
   Added for blueprint expansion: hubs, search, topic clusters,
   investing/business/loans sections, featured guides, trust.
   All additions — existing styles are untouched above.
   ============================================================ */

/* ---- New section color variables ----
   Institutional palette: desaturated, trust-first. Each section has a
   distinct hue identity but shares the same low-chroma character as the
   navy/brand core, so the page reads as one publication, not five sites.
   Every 500-level clears WCAG AA (4.5:1) on its own 100-level tint. */
:root {
  /* Investing — deep violet, authority without playfulness */
  --invest-500: #5B3FA8;
  --invest-400: #6E4FBF;
  --invest-100: #F2EFFA;

  /* Business — burnt sienna, established and grounded */
  --business-500: #96481C;
  --business-400: #B25A28;
  --business-100: #FBF0E9;

  /* Loans — ink blue, the most institutional of the set */
  --loan-500: #1C4E8A;
  --loan-400: #2462A8;
  --loan-100: #EDF3FA;

  /* Banking / finance — deep emerald, sits beside the brand green */
  --finance-500: #136B52;
  --finance-400: #1A8567;
  --finance-100: #E9F5F1;

  /* Savings — murky teal, calm and liquid */
  --savings-500: #12626E;
  --savings-400: #1A7C8A;
  --savings-100: #E8F3F5;

  /* Retirement — muted plum, long-horizon and steady */
  --retirement-500: #6B3A63;
  --retirement-400: #854A7B;
  --retirement-100: #F6EEF4;
}

/* ---- Search bar (hero + header) ---- */
.search-bar {
  position: relative;
  max-width: 560px;
  margin: 22px 0 0;
}
.search-bar input {
  width: 100%;
  padding: 16px 20px 16px 52px;
  font-size: 1.02rem;
  font-family: inherit;
  border: 2px solid var(--line-200);
  border-radius: 14px;
  background: #fff;
  color: var(--ink-900);
  transition: border-color .15s, box-shadow .15s;
}
.search-bar input:focus {
  outline: none;
  border-color: var(--brand-400);
  box-shadow: 0 0 0 4px rgba(34,160,107,.12);
}
.search-bar .search-icon {
  position: absolute;
  left: 18px;
  top: 50%;
  transform: translateY(-50%);
  width: 20px;
  height: 20px;
  color: var(--ink-400);
  pointer-events: none;
}
.search-bar .search-icon svg { width: 100%; height: 100%; }
.search-results {
  position: absolute;
  top: calc(100% + 6px);
  left: 0;
  right: 0;
  background: #fff;
  border: 1px solid var(--line-200);
  border-radius: var(--radius);
  box-shadow: var(--shadow-lg);
  max-height: 420px;
  overflow-y: auto;
  z-index: 60;
  display: none;
}
.search-results.open { display: block; }
.search-result-item {
  display: flex;
  align-items: flex-start;
  gap: 12px;
  padding: 14px 18px;
  border-bottom: 1px solid var(--line-100);
  cursor: pointer;
  transition: background .12s ease;
  text-decoration: none;
  color: inherit;
}
.search-result-item:last-child { border-bottom: 0; }
.search-result-item:hover { background: var(--surface-tint); text-decoration: none; }
.search-result-item .sr-cat {
  font-size: .68rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: .05em;
  padding: 2px 8px;
  border-radius: 6px;
  flex-shrink: 0;
  margin-top: 2px;
}
.sr-cat--calc { background: var(--surface-tint); color: var(--navy-700); }
.sr-cat--inv { background: var(--invest-100); color: var(--invest-500); }
.sr-cat--biz { background: var(--business-100); color: var(--business-500); }
.sr-cat--loan { background: var(--loan-100); color: var(--loan-500); }
.sr-cat--bank { background: var(--finance-100); color: var(--finance-500); }
.search-result-item .sr-title { font-size: .92rem; font-weight: 600; color: var(--navy-900); }
.search-result-item .sr-desc { font-size: .82rem; color: var(--ink-400); margin-top: 1px; }
.search-empty { padding: 24px 18px; text-align: center; color: var(--ink-400); font-size: .9rem; }

/* ---- Pillar navigation bar (under header) ---- */
.pillar-nav {
  background: #fff;
  border-bottom: 1px solid var(--line-200);
  position: sticky;
  top: 68px;
  z-index: 40;
}
.pillar-nav-inner {
  display: flex;
  gap: 4px;
  overflow-x: auto;
  -webkit-overflow-scrolling: touch;
  scrollbar-width: none;
}
.pillar-nav-inner::-webkit-scrollbar { display: none; }
.pillar-nav a {
  display: flex;
  align-items: center;
  gap: 7px;
  padding: 12px 16px;
  font-size: .88rem;
  font-weight: 600;
  color: var(--ink-500);
  white-space: nowrap;
  border-bottom: 2px solid transparent;
  transition: color .15s, border-color .15s;
}
.pillar-nav a:hover { color: var(--navy-900); text-decoration: none; }
.pillar-nav a.active { color: var(--navy-900); border-bottom-color: var(--brand-500); }
.pillar-nav .pn-icon { width: 16px; height: 16px; flex-shrink: 0; }

/* ---- Hub hero (section landing pages) ---- */
.hub-hero {
  padding: 60px 0 40px;
  border-bottom: 1px solid var(--line-200);
}
.hub-hero--invest { background: radial-gradient(700px 300px at 80% -10%, rgba(91,63,168,.07), transparent 60%), linear-gradient(180deg, var(--invest-100), var(--surface)); }
.hub-hero--business { background: radial-gradient(700px 300px at 80% -10%, rgba(150,72,28,.07), transparent 60%), linear-gradient(180deg, var(--business-100), var(--surface)); }
.hub-hero--loans { background: radial-gradient(700px 300px at 80% -10%, rgba(28,78,138,.07), transparent 60%), linear-gradient(180deg, var(--loan-100), var(--surface)); }
.hub-hero--finance { background: radial-gradient(700px 300px at 80% -10%, rgba(19,107,82,.07), transparent 60%), linear-gradient(180deg, var(--finance-100), var(--surface)); }
.hub-hero--savings { background: radial-gradient(700px 300px at 80% -10%, rgba(18,98,110,.07), transparent 60%), linear-gradient(180deg, var(--savings-100), var(--surface)); }
.hub-hero--retirement { background: radial-gradient(700px 300px at 80% -10%, rgba(107,58,99,.07), transparent 60%), linear-gradient(180deg, var(--retirement-100), var(--surface)); }
.hub-hero h1 { margin-bottom: .35em; }
.hub-hero p.lead { max-width: 56ch; }
.hub-hero .hub-actions { display: flex; gap: 12px; flex-wrap: wrap; margin-top: 24px; }

/* ---- Topic cluster grid ---- */
.cluster-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(260px, 1fr));
  gap: 20px;
}
.cluster-card {
  display: block;
  background: #fff;
  border: 1px solid var(--line-200);
  border-radius: var(--radius);
  padding: 24px;
  transition: all .18s ease;
  color: inherit;
  position: relative;
}
.cluster-card:hover { text-decoration: none; border-color: var(--brand-300); box-shadow: var(--shadow); transform: translateY(-3px); }
.cluster-card .cc-icon {
  width: 44px;
  height: 44px;
  border-radius: 12px;
  display: grid;
  place-items: center;
  margin-bottom: 16px;
  font-size: 1.2rem;
}
.cc-icon--invest { background: var(--invest-100); color: var(--invest-500); }
.cc-icon--business { background: var(--business-100); color: var(--business-500); }
.cc-icon--loans { background: var(--loan-100); color: var(--loan-500); }
.cc-icon--finance { background: var(--finance-100); color: var(--finance-500); }
.cc-icon--savings { background: var(--savings-100); color: var(--savings-500); }
.cc-icon--retirement { background: var(--retirement-100); color: var(--retirement-500); }
.cc-icon--tools { background: var(--surface-tint); color: var(--navy-800); }
.cluster-card h3 { font-size: 1.08rem; margin-bottom: .35em; }
.cluster-card p { font-size: .9rem; color: var(--ink-500); margin: 0 0 14px; }
.cluster-card .cc-link { font-size: .86rem; font-weight: 600; color: var(--accent-500); }
.cluster-card:hover .cc-link { color: var(--navy-900); }

/* ---- Calculator hub category tabs ---- */
.calc-cat-tabs {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
  margin-bottom: 30px;
}
.calc-cat-tab {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 10px 18px;
  border-radius: 999px;
  border: 1px solid var(--line-200);
  background: #fff;
  font-size: .88rem;
  font-weight: 600;
  color: var(--ink-500);
  cursor: pointer;
  transition: all .15s ease;
}
.calc-cat-tab:hover { border-color: var(--brand-300); color: var(--navy-900); }
.calc-cat-tab.active {
  background: var(--navy-900);
  color: #fff;
  border-color: var(--navy-900);
}
.calc-cat-tab .cct-count {
  font-size: .72rem;
  background: rgba(255,255,255,.15);
  padding: 1px 7px;
  border-radius: 10px;
}
.calc-cat-tab:not(.active) .cct-count { background: var(--surface-tint); }

/* ---- Country hub cards ---- */
.country-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
  gap: 16px;
}
.country-card {
  display: block;
  background: #fff;
  border: 1px solid var(--line-200);
  border-radius: var(--radius);
  padding: 22px;
  text-align: center;
  transition: all .18s ease;
  color: inherit;
}
.country-card:hover { text-decoration: none; border-color: var(--brand-300); box-shadow: var(--shadow); transform: translateY(-3px); }
.country-card .flag { font-size: 2.2rem; margin-bottom: 10px; line-height: 1; }
.country-card h3 { font-size: 1rem; margin-bottom: .25em; }
.country-card p { font-size: .82rem; color: var(--ink-400); margin: 0; }

/* ---- Featured guide cards ---- */
.featured-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
  gap: 22px;
}
.featured-card {
  display: block;
  background: #fff;
  border: 1px solid var(--line-200);
  border-radius: var(--radius);
  overflow: hidden;
  transition: all .18s ease;
  color: inherit;
}
.featured-card:hover { text-decoration: none; border-color: var(--brand-300); box-shadow: var(--shadow-lg); transform: translateY(-4px); }
.featured-card .fc-banner {
  height: 6px;
  background: var(--brand-500);
}
.featured-card .fc-banner--invest { background: var(--invest-500); }
.featured-card .fc-banner--business { background: var(--business-500); }
.featured-card .fc-banner--loans { background: var(--loan-500); }
.featured-card .fc-body { padding: 22px 24px; }
.featured-card .fc-cat {
  font-size: .72rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: .06em;
  margin-bottom: 8px;
}
.fc-cat--invest { color: var(--invest-500); }
.fc-cat--business { color: var(--business-500); }
.fc-cat--loans { color: var(--loan-500); }
.fc-cat--bank { color: var(--finance-500); }
.featured-card h3 { font-size: 1.12rem; margin-bottom: .4em; }
.featured-card p { font-size: .9rem; color: var(--ink-500); margin: 0 0 14px; }
.featured-card .fc-read { font-size: .82rem; color: var(--ink-400); }

/* ---- Trust strip ---- */
.trust-strip {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
  gap: 20px;
}
.trust-strip-item {
  text-align: center;
  padding: 24px 18px;
  background: var(--surface-alt);
  border-radius: var(--radius);
  border: 1px solid var(--line-200);
}
.trust-strip-item .ts-icon {
  width: 48px;
  height: 48px;
  border-radius: 12px;
  display: grid;
  place-items: center;
  margin: 0 auto 14px;
  background: #fff;
  border: 1px solid var(--line-200);
  color: var(--brand-500);
}
.trust-strip-item h3 { font-size: .96rem; margin-bottom: .25em; }
.trust-strip-item p { font-size: .84rem; color: var(--ink-500); margin: 0; }

/* ---- Internal linking block (related/next step) ---- */
.link-engine {
  margin-top: 46px;
  padding: 28px;
  background: var(--surface-alt);
  border: 1px solid var(--line-200);
  border-radius: var(--radius-lg);
}
.link-engine h2 { font-size: 1.2rem; margin-bottom: 18px; }
.le-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  gap: 14px;
}
.le-card {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 14px 16px;
  background: #fff;
  border: 1px solid var(--line-200);
  border-radius: var(--radius-sm);
  transition: all .15s ease;
  color: inherit;
  text-decoration: none;
}
.le-card:hover { text-decoration: none; border-color: var(--brand-300); box-shadow: var(--shadow-sm); }
.le-card .le-icon { width: 36px; height: 36px; border-radius: 9px; display: grid; place-items: center; background: var(--surface-tint); color: var(--navy-800); font-size: .95rem; flex-shrink: 0; }
.le-card .le-text { font-size: .88rem; font-weight: 600; color: var(--navy-900); line-height: 1.3; }
.le-card .le-type { font-size: .72rem; color: var(--ink-400); text-transform: uppercase; letter-spacing: .04em; }

/* ---- Section header ---- */
.section-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  margin-bottom: 28px;
  flex-wrap: wrap;
}
.section-head .sh-title { margin: 0; }
.section-head .sh-sub { font-size: .9rem; color: var(--ink-500); margin-top: 4px; }
.section-head .sh-link { font-size: .88rem; font-weight: 600; color: var(--accent-500); white-space: nowrap; }
.section-head .sh-link:hover { color: var(--navy-900); }
/* Safety net: heading used directly with .section-head must not become a flex row */
h1.section-head, h2.section-head, h3.section-head { display: block; margin: 0 0 20px; }

/* ---- New section backgrounds ---- */
.section--invest { background: radial-gradient(600px 200px at 90% 10%, rgba(91,63,168,.035), transparent 60%), var(--surface); }
.section--business { background: radial-gradient(600px 200px at 90% 10%, rgba(150,72,28,.035), transparent 60%), var(--surface); }
.section--loans { background: radial-gradient(600px 200px at 90% 10%, rgba(28,78,138,.035), transparent 60%), var(--surface); }
.section--finance { background: radial-gradient(600px 200px at 90% 10%, rgba(19,107,82,.035), transparent 60%), var(--surface); }
.section--savings { background: radial-gradient(600px 200px at 90% 10%, rgba(18,98,110,.035), transparent 60%), var(--surface); }
.section--retirement { background: radial-gradient(600px 200px at 90% 10%, rgba(107,58,99,.035), transparent 60%), var(--surface); }

/* ---- Updated nav for expanded site ---- */
.nav-links a.nav-dropdown { position: relative; padding-right: 18px; }
.nav-links a.nav-dropdown::after { content: '\25BE'; margin-left: 4px; font-size: .8em; color: var(--ink-400); }

/* ---- Mega menu (desktop) ---- */
.mega-menu {
  position: absolute;
  top: 100%;
  left: 0;
  background: #fff;
  border: 1px solid var(--line-200);
  border-radius: var(--radius);
  box-shadow: var(--shadow-lg);
  padding: 20px;
  min-width: 440px;
  display: none;
  z-index: 60;
}
.nav-item:hover .mega-menu { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }
.mega-menu a {
  display: flex;
  align-items: flex-start;
  gap: 10px;
  padding: 10px 12px;
  border-radius: var(--radius-sm);
  border-bottom: none;
}
.mega-menu a:hover { background: var(--surface-tint); }
.mega-menu .mm-icon { width: 28px; height: 28px; border-radius: 7px; display: grid; place-items: center; background: var(--surface-tint); color: var(--navy-800); flex-shrink: 0; font-size: .85rem; }
.mega-menu .mm-text strong { display: block; font-size: .88rem; color: var(--navy-900); }
.mega-menu .mm-text span { display: block; font-size: .78rem; color: var(--ink-400); }

/* ---- Responsive additions ---- */
@media (max-width: 900px) {
  .pillar-nav { top: 0; position: static; }
  .section-head { flex-direction: column; align-items: flex-start; }
}
@media (max-width: 560px) {
  .cluster-grid { grid-template-columns: 1fr; }
  .country-grid { grid-template-columns: repeat(auto-fill, minmax(150px, 1fr)); }
  .featured-grid { grid-template-columns: 1fr; }
  .link-engine { padding: 20px 16px; }
  .le-grid { grid-template-columns: 1fr; }
  .calc-cat-tabs { overflow-x: auto; flex-wrap: nowrap; -webkit-overflow-scrolling: touch; }
  .search-bar input { font-size: .95rem; padding: 14px 18px 14px 46px; }
}

/* ---- Calculator page layout (new pages) ---- */
.calc-page { padding: 40px 0 60px; }
.calc-page-layout { display: grid; grid-template-columns: 1fr 340px; gap: 40px; align-items: start; }
.calc-main { min-width: 0; }
.calc-sidebar { position: sticky; top: 84px; }
.calc-sidebar .le-card { margin-bottom: 10px; }
.calc-explanation { margin-top: 40px; }
.calc-explanation h2 { margin-top: 1.8em; }
.calc-explanation h2:first-child { margin-top: 0; }

@media (max-width: 900px) {
  .calc-page-layout { grid-template-columns: 1fr; }
  .calc-sidebar { position: static; }
}

/* ---- Badge variants for calculators ---- */
.badge-invest { background: var(--invest-100); color: var(--invest-500); }
.badge-business { background: var(--business-100); color: var(--business-500); }
.badge-loans { background: var(--loan-100); color: var(--loan-500); }
.badge-savings { background: var(--savings-100); color: var(--savings-500); }
.badge-retirement { background: var(--retirement-100); color: var(--retirement-500); }

/* ---- Badge variants (double-dash) used by generated pages ----
   All pairs verified >= 4.5:1 against their tint background. */
.badge--invest   { background: var(--invest-100);      color: var(--invest-500); }
.badge--business { background: var(--business-100);    color: var(--business-500); }
.badge--loan     { background: var(--loan-100);        color: var(--loan-500); }
.badge--loans    { background: var(--loan-100);        color: var(--loan-500); }
.badge--finance  { background: var(--finance-100);     color: var(--finance-500); }
.badge--trust    { background: var(--finance-100);     color: var(--finance-500); }
.badge--purple   { background: var(--invest-100);      color: var(--invest-500); }
.badge--blue     { background: var(--loan-100);        color: var(--loan-500); }
.badge--indigo   { background: var(--retirement-100);  color: var(--retirement-500); }
.badge--amber    { background: var(--business-100);    color: var(--business-500); }
.badge--savings  { background: var(--savings-100);     color: var(--savings-500); }

/* ---- Field spacer for 2-column calculator form grid ---- */
.field-spacer { display: block; }

/* ---- Print additions ---- */
@media print {
  .pillar-nav, .search-bar, .calc-sidebar, .link-engine { display: none; }
}

/* ============================================================
   v2.1 REFINEMENTS — cohesive palette, dark mode, polish
   ============================================================ */

/* ---- Typography refinement: tighter headings, better rhythm ---- */
h1, h2, h3, h4 {
  letter-spacing: -0.015em;
  text-wrap: balance;
}
h1 { letter-spacing: -0.025em; }
p { text-wrap: pretty; }

/* ---- Focus visibility (accessibility + UX quality signal) ---- */
:focus-visible {
  outline: 3px solid var(--accent-500);
  outline-offset: 2px;
  border-radius: 4px;
}

/* ---- Card hover lift: consistent across every card type ---- */
.tool-card, .cluster-card, .country-card, .featured-card {
  transition: transform .18s ease, box-shadow .18s ease, border-color .18s ease;
  will-change: transform;
}
.tool-card:hover, .cluster-card:hover, .country-card:hover, .featured-card:hover {
  transform: translateY(-3px);
  box-shadow: var(--shadow);
  border-color: var(--line-200);
}

/* ---- Sticky header for better on-page navigation ---- */
.site-header {
  position: sticky;
  top: 0;
  z-index: 60;
  backdrop-filter: saturate(180%) blur(12px);
  background: rgba(255,255,255,.88);
}

/* ---- Section head alignment fix ---- */
.section-head { flex-wrap: wrap; gap: 12px; }

/* ---- Dark mode: full token remap ---- */
@media (prefers-color-scheme: dark) {
  :root {
    /* Core surfaces */
    --navy-900: #EAF0F7;
    --navy-800: #D3E0EE;
    --navy-700: #B8CADD;
    --navy-600: #93AAC4;
    --ink-900: #F2F6FA;
    --ink-800: #E4EBF2;
    --ink-700: #DCE4EC;
    --ink-600: #C2CEDA;
    --ink-500: #A9B7C6;
    --ink-400: #8C9AAB;
    --ink-300: #6E7C8D;
    --line-200: #2A3644;
    --line-100: #202A36;
    --surface: #10161E;
    --surface-alt: #161E28;
    --surface-tint: #1B2531;

    /* Brand adjusted for dark backgrounds */
    --brand-500: #35B47F;
    --brand-600: #2A9A6B;
    --brand-700: #248057;
    --brand-400: #4CC894;
    --brand-300: #6FD9AC;
    --accent-500: #5B9BFF;
    --accent-400: #7DAFFF;

    --success: #35B47F;
    --warning: #E0A83C;
    --danger: #E8695C;

    /* Section tints: dark, low-chroma with legible accents */
    --invest-500: #B49CE8;
    --invest-100: #221C33;
    --business-500: #E0A078;
    --business-100: #2E231A;
    --loan-500: #8FB6E8;
    --loan-100: #1A2433;
    --finance-500: #6FC9AC;
    --finance-100: #172A25;
    --savings-500: #7CC3D1;
    --savings-100: #16272B;
    --retirement-500: #CF9FC6;
    --retirement-100: #2A1F28;

    --shadow-sm: 0 1px 3px rgba(0,0,0,.4);
    --shadow: 0 4px 16px rgba(0,0,0,.5);
    --shadow-lg: 0 12px 40px rgba(0,0,0,.6);
  }

  body { background: var(--surface); color: var(--ink-700); }

  .site-header {
    background: rgba(16,22,30,.88);
  }
  .site-header, .site-footer { border-color: var(--line-200); }

  .search-bar input { background: var(--surface-alt); color: var(--ink-900); }
  .calc-card, .tool-card, .cluster-card, .country-card,
  .featured-card, .le-card, .faq-item {
    background: var(--surface-alt);
    border-color: var(--line-200);
  }
  .site-footer { background: #0A0F15; }
  .btn-ghost { border-color: var(--line-200); color: var(--ink-700); }
  input, select, textarea { background: var(--surface-alt); color: var(--ink-900); border-color: var(--line-200); }
  .disclaimer-bar { background: var(--surface-alt) !important; }

  /* Rich guide blocks in dark mode */
  .answer-box { background: var(--surface-tint); border-left-color: var(--brand-400); }
  .answer-box p { color: var(--ink-600); }
  .answer-box strong { color: var(--ink-900); }
  .key-takeaways { background: var(--surface-alt); border-color: var(--line-200); }
  .key-takeaways li { color: var(--ink-500); }
  .src-note { color: var(--ink-400); }
  .src-note a { color: var(--ink-500); }
  .calc-main a, .prose a { color: var(--accent-400); }
  .calc-main a:hover, .prose a:hover { color: var(--brand-400); }

  /* New visual-layer components */
  .hero-panel { background: var(--surface-alt); border-color: var(--line-200); }
  .hp-stat { background: var(--surface-tint); border-color: var(--line-200); }
  .hp-stat .v { color: var(--ink-900); }
  .eyebrow { background: var(--surface-alt); border-color: var(--line-200); }
  .hero::before { opacity: .5; }
  .feature-card { background: var(--surface-alt); border-color: var(--line-200); }
  .feature-card h3 { color: var(--ink-900); }
  .calc-chart { background: var(--surface-alt); border-color: var(--line-200); }
  .calc-chart .series-alt { stroke: var(--accent-400); }
  .calc-chart .dot { fill: var(--surface-alt); }
  .calc-chart .legend i.alt { background: var(--accent-400); }
  table.data th { background: var(--surface-tint); color: var(--ink-900); }
  table.data tbody tr:hover { background: var(--surface-tint); }
  .toast { background: var(--surface-tint); color: var(--ink-900); border: 1px solid var(--line-200); }
  .to-top { background: var(--brand-600); color: #fff; }
  .tool-card:hover .tool-icon { background: var(--brand-600); color: #fff; }
  .btn-ghost { background: transparent; }
  .btn--sweep::after { background: linear-gradient(105deg, transparent 30%, rgba(255,255,255,.1) 50%, transparent 70%); }
}

/* ---- Reduced motion respect ---- */
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after {
    animation-duration: .01ms !important;
    animation-delay: 0ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: .01ms !important;
    scroll-behavior: auto !important;
  }
  /* Anything gated behind the observer must be visible even though the
     animation is suppressed — otherwise content stays at opacity:0. */
  .js [data-animate],
  .js [data-stagger] > * { opacity: 1 !important; }
  .calc-chart .series-main,
  .calc-chart .series-alt { stroke-dasharray: none !important; }
  .hp-bar span { transform: none !important; }
  .to-top, .toast { transition: none !important; }
}
