/* calc-shared.css — SmartFinance calculator pages (shared shell)
   Link before *-calculator.css on EMI, RD, PPF, SSY, FD, SIP pages. */

:root {
  --brand:       #1d9e75;
  --brand-dark:  #0f7558;
  --brand-tint:  #f0fdf9;
  --brand-line:  #a7f3d0;
  --ink:         #0f172a;
  --ink-mute:    #475569;
  --ink-faint:   #94a3b8;
  --line:        #e2e8f0;
  --line-soft:   #f1f5f9;
  --surface:     #ffffff;
  --bg:          #f8fafc;
  --radius:      10px;
  --nav-bar:     56px;
  --nav-main:    56px;
  --page-max:    1120px;
  --shadow-sm:   0 1px 3px rgba(15,23,42,.06);
  --shadow-md:   0 4px 14px rgba(15,23,42,.07);
  --shadow-lg:   0 14px 36px rgba(15, 23, 42, 0.10), 0 2px 6px rgba(15, 23, 42, 0.04);
  --shadow-glow: 0 0 0 3px rgba(29,158,117,.12);
  --danger:      #e24b4a;
  /* Aliases used by EMI / SIP / FD */
  --text:        var(--ink);
  --muted:       var(--ink-mute);
  --muted-light: var(--ink-faint);
  --card:        var(--surface);
  --border:      var(--line);
}

*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }

body {
  font-family: 'Inter', system-ui, sans-serif;
  background:
    radial-gradient(880px 420px at 100% -8%, rgba(29,158,117,.07) 0%, transparent 58%),
    radial-gradient(720px 360px at -8% 0%, rgba(241,245,249,.9) 0%, transparent 52%),
    #f8fafc;
  color: var(--ink);
  min-height: 100vh;
  line-height: 1.5;
  font-size: 14px;
  -webkit-font-smoothing: antialiased;
}

:focus-visible {
  outline: 2px solid var(--brand);
  outline-offset: 2px;
}

/* ── Top nav (shared with home) ── */
.top-nav {
  position: sticky;
  top: 0;
  z-index: 1000;
  min-height: calc(var(--nav-bar) + env(safe-area-inset-top, 0px));
  padding-top: env(safe-area-inset-top, 0px);
  background: rgba(255, 255, 255, 0.85);
  border-bottom: 1px solid var(--line);
  backdrop-filter: saturate(140%) blur(8px);
  -webkit-backdrop-filter: saturate(140%) blur(8px);
  transition: box-shadow 0.18s, background 0.18s;
}
.top-nav.scrolled {
  box-shadow: 0 4px 14px rgba(15, 23, 42, 0.05);
}
.top-nav-inner {
  max-width: var(--page-max);
  height: var(--nav-bar);
  margin: 0 auto;
  padding: 0 24px;
  display: flex;
  align-items: center;
  justify-content: space-between;
}
.nav-logo {
  font-size: 21px;
  font-weight: 800;
  letter-spacing: -0.03em;
  line-height: 1;
  color: var(--ink);
  text-decoration: none;
  flex-shrink: 0;
  transition: opacity 0.15s;
}
.nav-logo span {
  color: var(--brand);
}
.nav-logo:hover span { color: var(--brand-dark); }
.nav-logo:hover { opacity: 1; }
.nav-links {
  display: flex;
  gap: 8px;
}
.nav-links a {
  position: relative;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 36px;
  padding: 8px 14px;
  border-radius: 999px;
  text-decoration: none;
  font-size: 13px;
  font-weight: 600;
  color: var(--ink-mute);
  background: #ffffff;
  border: 1px solid var(--line);
  box-shadow: var(--shadow-sm);
  transition: color 0.15s, background 0.15s, border-color 0.15s, box-shadow 0.15s, transform 0.12s;
}
.nav-links a:hover {
  color: var(--brand-dark);
  background: var(--brand-tint);
  border-color: var(--brand-line);
  box-shadow: var(--shadow-md);
  transform: translateY(-1px);
}
.hamburger-btn {
  display: none;
  width: 44px;
  height: 44px;
  padding: 0;
  background: transparent;
  border: 0;
  cursor: pointer;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 4px;
  flex-shrink: 0;
  border-radius: 8px;
  -webkit-tap-highlight-color: transparent;
  font: inherit;
  color: inherit;
}
.hamburger-btn:hover { background: var(--brand-tint); }
.hamburger-btn span {
  width: 20px;
  height: 2px;
  border-radius: 2px;
  background: var(--ink);
  display: block;
}
.nav-backdrop { display: none; }
body.nav-mobile-open {
  overflow: hidden;
  touch-action: none;
}

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

/* ── Breadcrumb ── */
.page-breadcrumb { padding: 6px 0 4px; }

.page-breadcrumb:has(+ .hero-stage-compact),
.page-breadcrumb:has(+ .calc-page-stack),
.page-breadcrumb:has(+ .home-intro-stack) {
  padding: 4px 0 2px;
}
.page-breadcrumb ol {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 4px;
  list-style: none;
  margin: 0;
  padding: 0;
  font-size: 12px;
  line-height: 1.4;
}
.page-breadcrumb li {
  display: inline-flex;
  align-items: center;
  color: var(--ink-faint);
}
.page-breadcrumb li + li::before {
  content: "/";
  margin: 0 6px;
  color: #cbd5e1;
}
.page-breadcrumb a {
  color: var(--ink-mute);
  text-decoration: none;
  font-weight: 500;
  transition: color .15s;
}
.page-breadcrumb a:hover {
  color: var(--brand-dark);
  text-decoration: underline;
  text-underline-offset: 2px;
}
.page-breadcrumb li[aria-current="page"] {
  color: var(--ink);
  font-weight: 600;
}

/* ── Hero stage + art (curve & numbers preserved) ── */
.hero-stage { margin-top: 0; padding: 0; }

.hero-stage-inner {
  position: relative;
  padding: 28px 28px 24px;
  border-radius: 20px;
  border: 1px solid rgba(167, 243, 208, 0.45);
  background:
    radial-gradient(900px 320px at 100% -20%, rgba(29, 158, 117, 0.12) 0%, transparent 55%),
    radial-gradient(600px 240px at -10% 100%, rgba(241, 245, 249, 0.9) 0%, transparent 50%),
    linear-gradient(165deg, #ffffff 0%, #f8fffe 48%, #f0fdf9 100%);
  box-shadow:
    0 0 0 1px rgba(255, 255, 255, 0.8) inset,
    0 1px 2px rgba(15, 23, 42, 0.04),
    0 12px 40px rgba(29, 158, 117, 0.08);
  overflow: hidden;
}

.hero-stage-inner::before {
  content: "";
  position: absolute;
  top: 0; left: 0; right: 0;
  height: 1px;
  background: linear-gradient(90deg, transparent, rgba(29, 158, 117, 0.35), transparent);
  pointer-events: none;
}

.hero-stage-with-art {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(260px, 340px);
  gap: 20px 28px;
  align-items: center;
}

.hero-main-col { min-width: 0; position: relative; z-index: 1; }

.hero-head {
  display: grid;
  grid-template-columns: 1fr auto;
  gap: 20px;
  align-items: start;
}

.hero-head-copy { min-width: 0; }

.hero-kicker { margin: 0 0 12px; }
.hero-kicker-badge {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 5px 11px;
  border-radius: 999px;
  background: #fff;
  border: 1px solid var(--brand-line);
  font-size: 10px;
  font-weight: 700;
  color: var(--brand-dark);
  letter-spacing: .06em;
  text-transform: uppercase;
  box-shadow: var(--shadow-sm);
}
.hero-kicker-dot {
  width: 6px; height: 6px;
  border-radius: 50%;
  background: var(--brand);
  box-shadow: 0 0 0 3px rgba(29,158,117,.18);
}

.hero-stage .hero-title {
  display: flex;
  flex-direction: column;
  gap: 2px;
  margin: 0;
  line-height: 1.1;
  letter-spacing: -0.04em;
}

.hero-title-line {
  display: block;
  font-size: clamp(1.5rem, 2.8vw, 2.1rem);
  font-weight: 800;
  color: var(--ink);
}

.hero-title-line.hero-title-accent {
  font-size: clamp(1.25rem, 2.2vw, 1.75rem);
  font-weight: 700;
  background: linear-gradient(135deg, var(--brand) 0%, var(--brand-dark) 100%);
  -webkit-background-clip: text;
  background-clip: text;
  -webkit-text-fill-color: transparent;
}

.hero-stage .hero-subtitle {
  margin: 12px 0 0;
  max-width: 44ch;
  font-size: 14px;
  line-height: 1.55;
  color: var(--ink-mute);
  font-weight: 500;
}

.hero-stat-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(80px, 1fr));
  gap: 8px;
  list-style: none;
  margin: 0;
  padding: 0;
  flex-shrink: 0;
}

.hero-stat {
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
  gap: 4px;
  padding: 12px 8px 10px;
  border-radius: 14px;
  background: rgba(255, 255, 255, 0.85);
  border: 1px solid rgba(226, 232, 240, 0.9);
  box-shadow: 0 2px 8px rgba(15, 23, 42, 0.04);
  transition: transform 0.2s ease, box-shadow 0.2s ease, border-color 0.2s ease;
}
.hero-stat:hover {
  transform: translateY(-2px);
  border-color: var(--brand-line);
  box-shadow: 0 6px 16px rgba(29, 158, 117, 0.12);
}

.hero-stat-icon {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 32px; height: 32px;
  border-radius: 10px;
  background: var(--brand-tint);
  color: var(--brand-dark);
}
.hero-stat-icon svg { width: 16px; height: 16px; }
.hero-stat-icon-tax { background: #ecfdf5; color: var(--brand-dark); }
.hero-stat-icon-real { background: #eff6ff; color: #1d4ed8; }

.hero-stat-label {
  font-size: 11px;
  font-weight: 700;
  color: var(--ink);
}
.hero-stat-hint {
  font-size: 9px;
  font-weight: 500;
  color: var(--ink-faint);
}

.hero-banner {
  margin-top: 20px;
  padding: 14px 18px;
  border-radius: 14px;
  background: linear-gradient(135deg, rgba(15, 23, 42, 0.92) 0%, rgba(15, 50, 40, 0.95) 100%);
  border: 1px solid rgba(29, 158, 117, 0.25);
  box-shadow: 0 4px 20px rgba(15, 23, 42, 0.15);
}

.hero-stage .hero-punchline {
  margin: 0;
  font-size: clamp(0.9rem, 1.6vw, 1.05rem);
  font-weight: 500;
  line-height: 1.5;
  color: rgba(255, 255, 255, 0.88);
  text-align: center;
}
.hero-stage .hero-punchline strong {
  font-weight: 700;
  color: #6ee7b7;
}

.hero-foot {
  margin-top: 16px;
  padding-top: 16px;
  border-top: 1px solid rgba(167, 243, 208, 0.35);
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.hero-stage .hero-intro {
  margin: 0;
  max-width: 68ch;
  font-size: 13px;
  line-height: 1.6;
  color: var(--ink-mute);
}
.hero-stage .hero-intro strong {
  color: var(--ink);
  font-weight: 600;
}

.hero-foot-meta {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
}

.hero-updated {
  font-size: 11px;
  font-weight: 500;
  color: var(--ink-faint);
  padding: 4px 10px;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.7);
  border: 1px solid rgba(226, 232, 240, 0.9);
}
.hero-updated time { font-weight: 600; color: var(--ink-mute); }

.hero-compare-links {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
}
.hero-compare-links a {
  font-size: 11px;
  font-weight: 600;
  color: var(--brand-dark);
  text-decoration: none;
  padding: 4px 10px;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.85);
  border: 1px solid var(--brand-line);
  transition: background .15s, border-color .15s;
}
.hero-compare-links a:hover {
  background: var(--brand-tint);
  border-color: var(--brand);
}

/* Hero photo */
.hero-photo {
  margin: 0;
  border-radius: 16px;
  overflow: hidden;
  border: 1px solid var(--line);
  box-shadow: var(--shadow-lg);
  align-self: center;
}
.hero-photo img {
  display: block;
  width: 100%;
  height: auto;
  aspect-ratio: 3 / 2;
  object-fit: cover;
}

/* ── Page stack: hero + calculator as one card (matches calc-shell) ── */
.calc-page-stack {
  position: relative;
  margin-top: 0;
  margin-bottom: 20px;
  border: 1px solid var(--line);
  border-radius: 12px;
  background: var(--surface);
  box-shadow: 0 2px 12px rgba(15, 23, 42, 0.06), 0 8px 32px rgba(15, 23, 42, 0.04);
  overflow: visible;
}

.calc-page-stack::before {
  content: "";
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 3px;
  background: linear-gradient(90deg, var(--brand) 0%, #34d399 60%, var(--brand-line) 100%);
  z-index: 2;
  pointer-events: none;
}

/* ── Compact hero — same shell language as calc-shell below ── */
.hero-stage-compact { margin: 0; padding: 0; }

.hero-stage-compact .hero-stage-inner {
  padding: 22px 28px 20px;
  border: none;
  border-radius: 0;
  border-bottom: 1px solid var(--line-soft);
  background: var(--surface);
  box-shadow: none;
  overflow: visible;
}

.hero-stage-compact .hero-stage-inner::before {
  display: none;
}

.hero-stage-compact .hero-stage-inner.hero-stage-with-art {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(220px, 300px);
  column-gap: 28px;
  row-gap: 14px;
  align-items: start;
}

.hero-stage-inner > .hero-main-col {
  grid-column: 1;
  grid-row: 1;
  min-width: 0;
}

.hero-stage-inner > .hero-photo-compact,
.hero-stage-inner > .hero-art-home {
  grid-column: 2;
  grid-row: 1;
  align-self: start;
}

.hero-stage-inner > .hero-narrative {
  grid-column: 1 / -1;
  grid-row: 2;
  max-width: none;
  width: 100%;
  margin-top: 0;
}

.hero-stage-inner > .hero-compact-bottom,
.hero-stage-inner > .hero-cta-row,
.hero-stage-inner > .hero-trust-chips {
  grid-column: 1 / -1;
}

.hero-stage-inner > .hero-compact-bottom {
  grid-row: 3;
}

.hero-stage-inner > .hero-cta-row {
  grid-row: 3;
}

.hero-stage-inner > .hero-trust-chips {
  grid-row: 4;
}

.hero-compact-top {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 8px;
}

.hero-stage-compact .hero-kicker { margin: 0; }

.hero-stage-compact .hero-kicker-badge {
  padding: 0;
  border: none;
  border-radius: 0;
  background: transparent;
  box-shadow: none;
  font-size: 10px;
  font-weight: 700;
  letter-spacing: 0.07em;
  text-transform: uppercase;
  color: var(--ink-faint);
}

.hero-stage-compact .hero-kicker-dot {
  width: 5px;
  height: 5px;
  box-shadow: none;
}

.hero-updated-inline {
  flex-shrink: 0;
  font-size: 10px;
  font-weight: 600;
  color: var(--ink-faint);
  padding: 0;
  border: none;
  background: transparent;
  box-shadow: none;
  white-space: nowrap;
}

.hero-title-compact {
  display: flex;
  flex-direction: column;
  gap: 4px;
  margin: 0;
  letter-spacing: -0.02em;
}

.hero-title-main {
  display: block;
  font-size: clamp(1.25rem, 2.4vw, 1.55rem);
  font-weight: 700;
  line-height: 1.2;
  color: var(--ink);
}

.hero-title-compact .hero-title-accent {
  display: block;
  font-size: clamp(0.95rem, 1.8vw, 1.1rem);
  font-weight: 600;
  line-height: 1.35;
  color: var(--brand-dark);
  background: none;
  -webkit-background-clip: unset;
  background-clip: unset;
  -webkit-text-fill-color: unset;
}

.hero-subtitle-compact {
  margin: 8px 0 0;
  max-width: none;
  font-size: 13px;
  line-height: 1.5;
  color: var(--ink-mute);
  font-weight: 500;
}

.hero-compact-bottom {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 10px 14px;
  margin-top: 12px;
  padding-top: 0;
  border-top: none;
}

.hero-chip-list {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  list-style: none;
  margin: 0;
  padding: 0;
}

.hero-chip-list li {
  font-size: 11px;
  font-weight: 600;
  line-height: 1.35;
  color: var(--brand-dark);
  padding: 5px 10px;
  border-radius: 999px;
  background: var(--brand-tint);
  border: 1px solid var(--brand-line);
}

.hero-chip-list li::before {
  display: none;
}

.hero-chip-list li:hover {
  transform: none;
  box-shadow: none;
}

.hero-compare-inline {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.hero-compare-inline a {
  font-size: 11px;
  font-weight: 600;
  padding: 0;
  border: none;
  border-radius: 0;
  background: transparent;
  color: var(--brand-dark);
  text-decoration: none;
}

.hero-compare-inline a:hover {
  text-decoration: underline;
  text-underline-offset: 2px;
  background: transparent;
}

.hero-stage-compact .hero-photo {
  margin: 0;
  border-radius: 10px;
  overflow: hidden;
  border: 1px solid var(--line);
  box-shadow: var(--shadow-sm);
  transform: none;
  transition: none;
}

.hero-stage-compact .hero-photo::after {
  display: none;
}

.hero-stage-compact .hero-photo:hover {
  transform: none;
  box-shadow: var(--shadow-sm);
}

.hero-photo-compact img {
  aspect-ratio: 4 / 3;
  min-height: 0;
  object-fit: cover;
  display: block;
  width: 100%;
}

/* ── Narrative hero themes (per-page story + visual separation) ── */
.hero-stage-compact[class*="hero-theme-"] .hero-stage-inner {
  background: linear-gradient(155deg, var(--hero-bg-start, var(--surface)) 0%, var(--surface) 58%);
  border-bottom: 1px solid var(--line);
}

.hero-stage-compact[class*="hero-theme-"] .hero-kicker-dot {
  background: var(--hero-accent, var(--brand));
}

.hero-stage-compact[class*="hero-theme-"] .hero-title-compact .hero-title-accent {
  color: var(--hero-accent-dark, var(--brand-dark));
}

.hero-narrative {
  margin: 0;
  padding: 12px 16px 12px 14px;
  max-width: none;
  width: 100%;
  border-radius: 8px;
  border: 1px solid var(--hero-narrative-line, var(--brand-line));
  border-left: 3px solid var(--hero-accent, var(--brand));
  background: var(--hero-narrative-bg, var(--brand-tint));
  font-size: 13.5px;
  font-weight: 600;
  line-height: 1.5;
  color: var(--ink);
}

.hero-narrative strong {
  color: var(--hero-accent-dark, var(--brand-dark));
  font-weight: 700;
}

.hero-stage-compact[class*="hero-theme-"] .hero-compact-bottom {
  margin-top: 0;
  padding-top: 14px;
  border-top: 1px dashed var(--line);
}

.hero-stage-compact[class*="hero-theme-"] .hero-chip-list li {
  background: var(--hero-chip-bg, var(--brand-tint));
  border-color: var(--hero-chip-line, var(--brand-line));
  color: var(--hero-accent-dark, var(--brand-dark));
}

.hero-stage-compact[class*="hero-theme-"] .hero-photo-compact {
  border-color: var(--hero-photo-line, var(--line));
  box-shadow:
    0 0 0 1px rgba(255, 255, 255, 0.6) inset,
    0 4px 18px var(--hero-photo-shadow, rgba(15, 23, 42, 0.08));
}

/* Themed top bar on unified card */
.calc-page-stack:has(.hero-theme-emi)::before,
.page > .hero-theme-emi.hero-stage-compact > .hero-stage-inner::before {
  background: linear-gradient(90deg, #c2410c 0%, #ea580c 55%, #fdba74 100%);
}

.calc-page-stack:has(.hero-theme-sip)::before {
  background: linear-gradient(90deg, #0f766e 0%, #14b8a6 55%, #5eead4 100%);
}

.calc-page-stack:has(.hero-theme-fd)::before {
  background: linear-gradient(90deg, #475569 0%, #64748b 55%, #94a3b8 100%);
}

.calc-page-stack:has(.hero-theme-rd)::before {
  background: linear-gradient(90deg, #4338ca 0%, #6366f1 55%, #a5b4fc 100%);
}

.calc-page-stack:has(.hero-theme-ppf)::before {
  background: linear-gradient(90deg, #047857 0%, #10b981 55%, #6ee7b7 100%);
}

.calc-page-stack:has(.hero-theme-ssy)::before {
  background: linear-gradient(90deg, #be185d 0%, #ec4899 55%, #f9a8d4 100%);
}

.calc-page-stack:has(.hero-theme-home)::before,
.home-intro-stack.hero-theme-home::before {
  background: linear-gradient(90deg, var(--brand) 0%, #34d399 60%, var(--brand-line) 100%);
}

.hero-theme-emi {
  --hero-accent: #ea580c;
  --hero-accent-dark: #c2410c;
  --hero-bg-start: #fffbf5;
  --hero-narrative-bg: #fff7ed;
  --hero-narrative-line: #fed7aa;
  --hero-chip-bg: #fff7ed;
  --hero-chip-line: #fdba74;
  --hero-photo-line: #fed7aa;
  --hero-photo-shadow: rgba(234, 88, 12, 0.14);
}

.hero-theme-sip {
  --hero-accent: #0d9488;
  --hero-accent-dark: #0f766e;
  --hero-bg-start: #f0fdfa;
  --hero-narrative-bg: #ecfdf5;
  --hero-narrative-line: #99f6e4;
  --hero-chip-bg: #ecfdf5;
  --hero-chip-line: #5eead4;
  --hero-photo-line: #99f6e4;
  --hero-photo-shadow: rgba(13, 148, 136, 0.14);
}

.hero-theme-fd {
  --hero-accent: #64748b;
  --hero-accent-dark: #475569;
  --hero-bg-start: #f8fafc;
  --hero-narrative-bg: #f1f5f9;
  --hero-narrative-line: #cbd5e1;
  --hero-chip-bg: #f1f5f9;
  --hero-chip-line: #cbd5e1;
  --hero-photo-line: #cbd5e1;
  --hero-photo-shadow: rgba(71, 85, 105, 0.12);
}

.hero-theme-rd {
  --hero-accent: #6366f1;
  --hero-accent-dark: #4338ca;
  --hero-bg-start: #f5f7ff;
  --hero-narrative-bg: #eef2ff;
  --hero-narrative-line: #c7d2fe;
  --hero-chip-bg: #eef2ff;
  --hero-chip-line: #a5b4fc;
  --hero-photo-line: #c7d2fe;
  --hero-photo-shadow: rgba(99, 102, 241, 0.14);
}

.hero-theme-ppf {
  --hero-accent: #059669;
  --hero-accent-dark: #047857;
  --hero-bg-start: #f0fdf8;
  --hero-narrative-bg: #ecfdf5;
  --hero-narrative-line: #a7f3d0;
  --hero-chip-bg: #ecfdf5;
  --hero-chip-line: #6ee7b7;
  --hero-photo-line: #a7f3d0;
  --hero-photo-shadow: rgba(5, 150, 105, 0.14);
}

.hero-theme-ssy {
  --hero-accent: #db2777;
  --hero-accent-dark: #be185d;
  --hero-bg-start: #fdf2f8;
  --hero-narrative-bg: #fce7f3;
  --hero-narrative-line: #f9a8d4;
  --hero-chip-bg: #fce7f3;
  --hero-chip-line: #f9a8d4;
  --hero-photo-line: #f9a8d4;
  --hero-photo-shadow: rgba(219, 39, 119, 0.14);
}

.hero-theme-home {
  --hero-accent: var(--brand);
  --hero-accent-dark: var(--brand-dark);
  --hero-bg-start: #f0fdf9;
  --hero-narrative-bg: var(--brand-tint);
  --hero-narrative-line: var(--brand-line);
  --hero-chip-bg: var(--brand-tint);
  --hero-chip-line: var(--brand-line);
  --hero-photo-line: var(--brand-line);
  --hero-photo-shadow: rgba(29, 158, 117, 0.12);
}

/* ── Per-page brand accent (one colour per calculator, RD-style) ──
   Maps hero theme → global --brand tokens for nav, steppers, CTAs, toggles. */
body.emi-page {
  --brand: #ea580c;
  --brand-dark: #c2410c;
  --brand-tint: #fff7ed;
  --brand-line: #fed7aa;
  --brand-tint-2: #ffedd5;
  background: linear-gradient(180deg, #fffbf5 0%, #ffffff 180px);
}

body.sip-page {
  --brand: #0d9488;
  --brand-dark: #0f766e;
  --brand-tint: #f0fdfa;
  --brand-line: #99f6e4;
  --brand-tint-2: #ccfbf1;
  background: linear-gradient(180deg, #f0fdfa 0%, #ffffff 180px);
}

body.fd-page {
  --brand: #64748b;
  --brand-dark: #475569;
  --brand-tint: #f1f5f9;
  --brand-line: #cbd5e1;
  --brand-tint-2: #e2e8f0;
  background: linear-gradient(180deg, #f8fafc 0%, #ffffff 180px);
}

body.rd-page {
  --brand: #6366f1;
  --brand-dark: #4338ca;
  --brand-tint: #eef2ff;
  --brand-line: #c7d2fe;
  --brand-tint-2: #e0e7ff;
}

body.ppf-page {
  --brand: #059669;
  --brand-dark: #047857;
  --brand-tint: #ecfdf5;
  --brand-line: #a7f3d0;
  --brand-tint-2: #d1fae5;
  background: linear-gradient(180deg, #f0fdf8 0%, #ffffff 180px);
}

body.ssy-page {
  --brand: #db2777;
  --brand-dark: #be185d;
  --brand-tint: #fdf2f8;
  --brand-line: #f9a8d4;
  --brand-tint-2: #fce7f3;
  background: linear-gradient(180deg, #fdf2f8 0%, #ffffff 180px);
}

body.emi-page ::selection { background: #ffedd5; color: #c2410c; }
body.sip-page ::selection { background: #ccfbf1; color: #0f766e; }
body.fd-page ::selection { background: #e2e8f0; color: #475569; }
body.rd-page ::selection { background: #eef2ff; color: #4338ca; }
body.ppf-page ::selection { background: #d1fae5; color: #047857; }
body.ssy-page ::selection { background: #fce7f3; color: #be185d; }

/* Themed calc-shell top bar follows page accent */
body.emi-page .calc-page-stack::before,
body.sip-page .calc-page-stack::before,
body.fd-page .calc-page-stack::before,
body.rd-page .calc-page-stack::before,
body.ppf-page .calc-page-stack::before,
body.ssy-page .calc-page-stack::before {
  background: linear-gradient(90deg, var(--brand-dark) 0%, var(--brand) 55%, var(--brand-line) 100%);
}

body.emi-page .calc-shell::before,
body.sip-page .calc-shell::before,
body.fd-page .calc-shell::before,
body.rd-page .calc-shell::before,
body.ppf-page .calc-shell::before,
body.ssy-page .calc-shell::before {
  background: linear-gradient(90deg, var(--brand) 0%, color-mix(in srgb, var(--brand) 70%, var(--brand-line)) 60%, var(--brand-line) 100%);
}

body[class*="-page"] .calc-shell .zone-label::before {
  background: linear-gradient(180deg, var(--brand) 0%, color-mix(in srgb, var(--brand) 75%, var(--brand-line)) 55%, var(--brand-dark) 100%);
}

body[class*="-page"] .nav-links-calc a.is-current {
  background: linear-gradient(135deg, var(--brand) 0%, var(--brand-dark) 100%);
  box-shadow: 0 2px 8px color-mix(in srgb, var(--brand) 35%, transparent);
}

body[class*="-page"] .nav-links-calc a:hover:not(.is-current) {
  color: var(--brand-dark);
  background: var(--brand-tint);
  border-color: var(--brand-line);
}

body[class*="-page"] .ux-hero-truth {
  border-color: var(--brand-line);
  background: linear-gradient(135deg, var(--brand-tint) 0%, #fffbeb 100%);
}

body[class*="-page"] .ux-hero-truth-icon {
  color: var(--brand);
}

body[class*="-page"] .ux-hero-truth strong {
  color: var(--brand-dark);
}

/* ── Unified page hero (home + calculators) ── */
.hero-stage-compact .hero-stage-inner.hero-page-layout {
  display: flex;
  flex-direction: column;
  gap: 16px;
  width: 100%;
  max-width: 100%;
  box-sizing: border-box;
  padding: 20px 24px 18px;
  overflow: visible;
}

.hero-page-top {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(280px, 380px);
  column-gap: 36px;
  row-gap: 20px;
  align-items: center;
}

.hero-page-copy {
  min-width: 0;
}

.hero-stage-compact[class*="hero-theme-"] .hero-page-layout .hero-title-main {
  font-size: clamp(1.45rem, 2.8vw, 2.05rem);
  letter-spacing: -0.03em;
  font-weight: 800;
  line-height: 1.15;
  color: var(--ink);
}

.hero-stage-compact[class*="hero-theme-"] .hero-page-layout .hero-title-accent {
  font-size: clamp(1.35rem, 2.5vw, 1.85rem);
  letter-spacing: -0.03em;
  font-weight: 800;
  line-height: 1.2;
  background: linear-gradient(135deg, var(--hero-accent) 0%, var(--hero-accent-dark) 100%);
  -webkit-background-clip: text;
  background-clip: text;
  -webkit-text-fill-color: transparent;
}

.hero-theme-home .hero-page-layout .hero-title-main,
.hero-theme-home .hero-page-layout .hero-title-accent {
  font-size: clamp(1.75rem, 3.4vw, 2.55rem);
}

.hero-page-hook {
  margin: 14px 0 0;
  padding: 10px 14px;
  border-left: 3px solid var(--hero-accent, var(--brand));
  border-radius: 0 8px 8px 0;
  background: rgba(255, 255, 255, 0.72);
  font-size: 14px;
  font-weight: 600;
  line-height: 1.45;
  color: var(--ink);
  max-width: 42ch;
}

.hero-stage-compact[class*="hero-theme-"] .hero-page-layout .hero-subtitle-compact {
  margin-top: 12px;
  font-size: 15px;
  line-height: 1.55;
  max-width: 46ch;
  color: var(--ink-mute);
}

.hero-page-visual {
  position: relative;
  min-width: 0;
  padding-bottom: 20px;
}

.hero-page-visual .hero-photo-compact {
  margin: 0;
  border-radius: 12px;
  overflow: hidden;
  box-shadow: var(--shadow-lg);
}

.hero-page-visual .hero-photo-compact img {
  display: block;
  width: 100%;
  height: auto;
  min-height: 220px;
  max-height: 280px;
  object-fit: cover;
}

.hero-truth-card {
  position: absolute;
  left: -20px;
  bottom: -16px;
  width: min(100%, 260px);
  padding: 16px 18px 18px;
  border-radius: 12px;
  background: #ffffff;
  border: 1px solid var(--hero-narrative-line, var(--brand-line));
  box-shadow:
    0 16px 40px rgba(15, 23, 42, 0.14),
    0 0 0 1px rgba(255, 255, 255, 0.9) inset;
  z-index: 2;
}

.hero-truth-eyebrow {
  margin: 0 0 10px;
  font-size: 10px;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--ink-faint);
}

.hero-truth-row {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 12px;
}

.hero-truth-label {
  font-size: 10px;
  font-weight: 700;
  letter-spacing: 0.07em;
  text-transform: uppercase;
}

.hero-truth-row--nominal .hero-truth-label {
  color: #b91c1c;
}

.hero-truth-row--nominal .hero-truth-val {
  font-size: 1.25rem;
  font-weight: 800;
  letter-spacing: -0.03em;
  color: var(--ink-faint);
  text-decoration: line-through;
  text-decoration-color: rgba(185, 28, 28, 0.45);
}

.hero-truth-bridge {
  display: flex;
  align-items: center;
  gap: 8px;
  margin: 8px 0;
  padding: 6px 0;
  border-top: 1px dashed var(--line);
  border-bottom: 1px dashed var(--line);
  font-size: 10px;
  font-weight: 600;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  color: var(--ink-faint);
}

.hero-truth-bridge-icon {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 20px;
  height: 20px;
  border-radius: 50%;
  background: var(--hero-narrative-bg, var(--brand-tint));
  color: var(--hero-accent-dark, var(--brand-dark));
  font-size: 11px;
  font-weight: 700;
  flex-shrink: 0;
}

.hero-truth-row--real .hero-truth-label {
  color: var(--hero-accent-dark, var(--brand-dark));
}

.hero-truth-row--real .hero-truth-val {
  font-size: clamp(1.35rem, 2.8vw, 1.75rem);
  font-weight: 800;
  letter-spacing: -0.03em;
  background: linear-gradient(135deg, var(--hero-accent) 0%, var(--hero-accent-dark) 100%);
  -webkit-background-clip: text;
  background-clip: text;
  -webkit-text-fill-color: transparent;
}

.hero-tool-rail {
  display: grid;
  grid-template-columns: repeat(6, minmax(0, 1fr));
  gap: 10px;
  padding-top: 18px;
  border-top: 1px solid var(--hero-narrative-line, var(--brand-line));
}

.hero-tool-link {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 2px;
  padding: 12px 14px;
  border-radius: 10px;
  background: rgba(255, 255, 255, 0.85);
  border: 1px solid var(--line);
  text-decoration: none;
  transition: border-color 0.15s, box-shadow 0.15s, transform 0.12s, background 0.15s;
}

.hero-tool-link:hover {
  border-color: var(--hero-narrative-line, var(--brand-line));
  background: #ffffff;
  box-shadow: var(--shadow-md);
  transform: translateY(-1px);
}

.hero-tool-link.is-current {
  border-color: var(--hero-accent, var(--brand));
  background: var(--hero-narrative-bg, var(--brand-tint));
  box-shadow: inset 0 0 0 1px rgba(255, 255, 255, 0.6);
}

.hero-tool-code {
  font-size: 15px;
  font-weight: 800;
  letter-spacing: -0.02em;
  color: var(--hero-accent-dark, var(--brand-dark));
}

.hero-tool-desc {
  font-size: 11px;
  font-weight: 500;
  color: var(--ink-faint);
}

.hero-page-copy .hero-cta-row {
  margin-top: 20px;
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
}

.hero-page-copy .hero-trust-chips {
  margin-top: 16px;
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
}

.hero-page-copy .hero-trust-chip {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 5px 11px;
  border-radius: 999px;
  background: #ffffff;
  border: 1px solid var(--line);
  font-size: 12px;
  font-weight: 600;
  color: var(--ink-mute);
  box-shadow: var(--shadow-sm);
}

/* Calculator zone reads as "tool" — pure white below narrative hero */
.calc-page-stack > .calc-shell,
.calc-page-stack > .calc-shell.card,
.calc-page-stack > .layout {
  background: #ffffff;
}

.calc-page-stack > .calc-shell .zone-label:first-child,
.calc-page-stack > .layout .card-label:first-child {
  color: var(--ink-faint);
}

.calc-page-stack > .calc-shell,
.calc-page-stack > .calc-shell.card {
  margin-top: 0;
  padding-top: 18px;
  border: none;
  border-radius: 0;
  background: var(--surface);
  box-shadow: none;
}

.calc-page-stack > .calc-shell::before {
  display: none;
}

.calc-page-stack > .calc-shell,
.calc-page-stack > .calc-shell.card,
.calc-page-stack > .layout {
  border-radius: 0 0 11px 11px;
}

.calc-page-stack > .layout {
  margin-top: 0;
  padding: 18px 22px 22px;
}

.calc-page-stack-fd > .layout,
.calc-page-stack-fd > .calc-shell {
  border-top: 1px solid var(--line-soft);
}

/* EMI: hero + calc hub as one card (sticky stays in emi-main) */
.page > .hero-stage-compact + .emi-main {
  margin-top: 0;
}

.page > .hero-stage-compact > .hero-stage-inner {
  position: relative;
  border: 1px solid var(--line);
  border-bottom: 1px solid var(--line-soft);
  border-radius: 12px 12px 0 0;
}

.page > .hero-stage-compact > .hero-stage-inner::before {
  display: block;
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 3px;
  border-radius: 12px 12px 0 0;
  background: linear-gradient(90deg, var(--brand) 0%, #34d399 60%, var(--brand-line) 100%);
}

.page > .hero-theme-emi.hero-stage-compact > .hero-stage-inner::before {
  background: linear-gradient(90deg, #c2410c 0%, #ea580c 55%, #fdba74 100%);
}

.page > .hero-stage-compact + .emi-main .calc-sticky-shell {
  margin-top: 0;
  border: 1px solid var(--line);
  border-top: none;
  border-radius: 0;
  box-shadow: none;
}

.page > .hero-stage-compact + .emi-main .calc-results-shell {
  margin-top: -1px;
  border-radius: 0 0 12px 12px;
  box-shadow: 0 2px 12px rgba(15, 23, 42, 0.06), 0 8px 32px rgba(15, 23, 42, 0.04);
}

@media (max-width: 768px) {
  .hero-stage-compact .hero-stage-inner.hero-page-layout {
    padding: 20px 18px 18px;
    gap: 18px;
  }

  .hero-page-top {
    grid-template-columns: 1fr;
  }

  .hero-page-visual {
    order: -1;
    max-width: 420px;
    margin: 0 auto;
    width: 100%;
    padding-bottom: 12px;
  }

  .hero-truth-card {
    position: relative;
    left: auto;
    bottom: auto;
    width: 100%;
    margin-top: -28px;
  }

  .hero-tool-rail {
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 8px;
    padding-top: 14px;
  }

  .hero-page-copy .hero-cta-row {
    flex-direction: column;
    width: 100%;
  }

  .hero-page-copy .hero-cta-row .cta-btn,
  .hero-page-copy .hero-cta-row .cta-secondary {
    width: 100%;
  }

  .hero-stage-compact .hero-stage-inner.hero-stage-with-art {
    grid-template-columns: 1fr;
    padding: 18px 18px 16px;
    row-gap: 12px;
  }

  .hero-stage-inner > .hero-main-col {
    grid-column: 1;
    grid-row: 2;
  }

  .hero-stage-inner > .hero-photo-compact,
  .hero-stage-inner > .hero-art-home {
    grid-column: 1;
    grid-row: 1;
    max-width: 420px;
    width: 100%;
    margin: 0 auto;
  }

  .hero-stage-inner > .hero-narrative {
    grid-row: 3;
  }

  .hero-stage-inner > .hero-compact-bottom {
    grid-row: 4;
  }

  .hero-stage-inner > .hero-cta-row {
    grid-row: 4;
  }

  .hero-stage-inner > .hero-trust-chips {
    grid-row: 5;
  }

  .calc-page-stack > .layout {
    padding: 16px;
  }
}

@media (max-width: 640px) {
  .hero-compact-top {
    flex-direction: column;
    align-items: flex-start;
    gap: 4px;
  }

  .hero-compact-bottom {
    flex-direction: column;
    align-items: flex-start;
  }
}

/* ── Calculator shell ── */
.hero-stage + .calc-shell { margin-top: 12px; }

.calc-shell {
  padding: 22px 22px 24px;
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: 12px;
  box-shadow: 0 2px 12px rgba(15,23,42,.06), 0 8px 32px rgba(15,23,42,.04);
  position: relative;
  overflow: hidden;
}
.calc-shell::before {
  content: "";
  position: absolute;
  left: 0; right: 0; top: 0;
  height: 3px;
  background: linear-gradient(90deg, var(--brand) 0%, #34d399 60%, var(--brand-line) 100%);
}

.zone { margin-bottom: 18px; }
.zone:last-child { margin-bottom: 0; }
.zone-label {
  font-size: 10px;
  font-weight: 700;
  letter-spacing: .07em;
  text-transform: uppercase;
  color: var(--ink-faint);
  margin-bottom: 8px;
}

.core-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 12px;
}
.core-grid-4 { grid-template-columns: repeat(2, minmax(0, 1fr)); }

.field-compact { display: flex; flex-direction: column; gap: 4px; }
.field-compact label {
  font-size: 12px;
  font-weight: 600;
  color: var(--ink);
}
.field-compact input[type="number"] {
  width: 100%;
  padding: 9px 12px;
  border: 1.5px solid var(--line);
  border-radius: 8px;
  font-size: 15px;
  font-weight: 600;
  color: var(--ink);
  background: #fff;
  outline: none;
  -moz-appearance: textfield;
  transition: border-color .15s, box-shadow .15s;
}
.field-compact input[type="number"]::-webkit-inner-spin-button,
.field-compact input[type="number"]::-webkit-outer-spin-button { -webkit-appearance: none; }
.field-compact input[type="number"]:focus {
  border-color: var(--brand);
  box-shadow: var(--shadow-glow);
}
.field-hint {
  font-size: 10.5px;
  line-height: 1.4;
  color: var(--ink-faint);
}

/* Discover bar */
.discover-bar {
  display: flex;
  align-items: flex-start;
  gap: 10px;
  margin: 0 0 12px;
  padding: 11px 14px;
  border-radius: 10px;
  border: 1px solid var(--brand-line);
  background: linear-gradient(90deg, rgba(236, 253, 245, 0.95), rgba(255, 255, 255, 0.92));
  font-size: 12.5px;
  line-height: 1.5;
  color: var(--ink-mute);
  cursor: pointer;
  transition: border-color 0.15s, box-shadow 0.15s;
}
.discover-bar:hover {
  border-color: var(--brand);
  box-shadow: 0 0 0 3px rgba(29, 158, 117, 0.1);
}
.discover-bar strong { color: var(--ink); font-weight: 600; }
.discover-pill {
  flex-shrink: 0;
  padding: 2px 8px;
  border-radius: 999px;
  background: var(--brand);
  color: #fff;
  font-size: 9px;
  font-weight: 700;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  margin-top: 1px;
}

/* Assumptions */
.zone-assumptions {
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #fafbfc;
  margin-bottom: 14px;
}
.zone-assumptions summary {
  list-style: none;
  padding: 10px 14px;
  font-size: 12px;
  font-weight: 600;
  color: var(--ink-mute);
  cursor: pointer;
  user-select: none;
  display: flex;
  align-items: center;
  justify-content: space-between;
}
.zone-assumptions summary::-webkit-details-marker { display: none; }
.zone-assumptions summary::after {
  content: "+";
  font-size: 16px;
  font-weight: 400;
  color: var(--brand);
}
.zone-assumptions[open] summary::after { content: "−"; }
.zone-assumptions[open] summary {
  border-bottom: 1px solid var(--line);
  background: var(--brand-tint);
  color: var(--brand-dark);
}

.zone-assumptions-prominent {
  border: 1.5px solid var(--brand-line);
  background: linear-gradient(180deg, #f0fdf9 0%, #fcfdfd 100%);
  box-shadow: 0 0 0 1px rgba(29, 158, 117, 0.06);
}
.zone-assumptions-prominent summary {
  font-weight: 600;
  color: var(--brand-dark);
  gap: 10px;
}
.summary-title {
  font-size: 13px;
  font-weight: 700;
  color: var(--brand-dark);
}
.summary-status {
  margin-left: auto;
  padding: 3px 9px;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.9);
  border: 1px solid rgba(226, 232, 240, 0.95);
  font-size: 10px;
  font-weight: 600;
  color: var(--ink-faint);
}
.summary-status.is-active {
  background: #fef2f2;
  border-color: #fecaca;
  color: #b91c1c;
}

.assumptions-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 12px;
  padding: 12px 14px 14px;
}
.assumptions-grid-single {
  grid-template-columns: 1fr;
  max-width: 420px;
}

.field-label-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 6px;
}
.field-label-row > label { font-size: 12px; font-weight: 600; margin: 0; }

.pill-toggle {
  display: inline-flex !important;
  align-items: center;
  gap: 6px;
  cursor: pointer;
  user-select: none;
}
.pill-toggle input[type="checkbox"] {
  position: absolute !important;
  opacity: 0 !important;
  width: 1px !important;
  height: 1px !important;
  pointer-events: none;
}
.pill-track {
  display: inline-block;
  position: relative;
  width: 28px; height: 16px;
  border-radius: 999px;
  background: #d1d5db;
  transition: background .15s;
}
.pill-thumb {
  position: absolute;
  top: 2px; left: 2px;
  width: 12px; height: 12px;
  border-radius: 50%;
  background: #fff;
  box-shadow: 0 1px 2px rgba(0,0,0,.2);
  transition: transform .15s;
}
.pill-toggle input:checked ~ .pill-track { background: var(--brand); }
.pill-toggle input:checked ~ .pill-track .pill-thumb { transform: translateX(12px); }
.pill-text {
  font-size: 9px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: .06em;
  color: var(--ink-faint);
}
.pill-toggle input:checked ~ .pill-text { color: var(--brand); }

.field-inflation .pill-toggle input:checked ~ .pill-track { background: #dc2626; }
.field-inflation .pill-toggle input:checked ~ .pill-text { color: #dc2626; }

.field-inflation.is-inflation-off > input[type="number"],
.field-inflation.is-inflation-off > .slider-wrap {
  opacity: 0.4;
  pointer-events: none;
}

/* Sliders */
.slider-wrap {
  display: flex;
  align-items: center;
  gap: 6px;
  margin-top: 2px;
}
.slider-min, .slider-max {
  font-size: 10px;
  color: var(--ink-faint);
  min-width: 24px;
}
.slider-max { text-align: right; }
input[type="range"] {
  -webkit-appearance: none;
  appearance: none;
  flex: 1;
  height: 4px;
  border-radius: 99px;
  background: linear-gradient(90deg, var(--brand) calc(var(--p, 50%) * 1%), var(--line) calc(var(--p, 50%) * 1%));
  outline: none;
  cursor: pointer;
}
input[type="range"]::-webkit-slider-thumb {
  -webkit-appearance: none;
  width: 14px; height: 14px;
  border-radius: 50%;
  background: #fff;
  border: 2px solid var(--brand);
}
input[type="range"]::-moz-range-thumb {
  width: 14px; height: 14px;
  border-radius: 50%;
  background: #fff;
  border: 2px solid var(--brand);
}

/* Output */
.zone-output {
  border-top: 1px solid var(--line);
  padding-top: 14px;
}

.results-strip {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 1px;
  background: var(--line);
  border: 1px solid var(--line);
  border-radius: 8px;
  overflow: hidden;
}
.strip-cell {
  background: #fff;
  padding: 10px 12px;
  display: flex;
  flex-direction: column;
  gap: 2px;
  min-width: 0;
}
.strip-label {
  font-size: 9px;
  font-weight: 700;
  letter-spacing: .06em;
  text-transform: uppercase;
  color: var(--ink-faint);
}
.strip-value {
  font-size: 16px;
  font-weight: 700;
  color: var(--ink);
  line-height: 1.2;
  word-break: break-word;
}
.strip-cell-hero { background: var(--brand-tint); }
.strip-cell-hero .strip-label { color: var(--brand-dark); }
.strip-cell-hero .strip-value {
  font-size: 22px;
  color: var(--brand-dark);
}
.strip-value.value-positive { color: var(--brand-dark); }
.strip-value.value-negative { color: #b91c1c; }
.strip-hint {
  font-size: 10px;
  color: var(--ink-faint);
  line-height: 1.3;
}

.yield-row {
  margin-top: 14px;
  padding: 14px 16px;
  background: linear-gradient(135deg, #ecfdf5, #d1fae5);
  border: 1px solid var(--brand-line);
  border-radius: 8px;
}
.yield-row.is-negative-real {
  background: linear-gradient(135deg, #fef2f2, #fee2e2);
  border-color: #fecaca;
}
.yield-label {
  font-size: 10px;
  font-weight: 700;
  letter-spacing: .05em;
  text-transform: uppercase;
  color: var(--brand-dark);
}
.yield-row.is-negative-real .yield-label { color: #b91c1c; }
.yield-values {
  display: flex;
  align-items: baseline;
  gap: 10px;
  flex-wrap: wrap;
  margin-top: 4px;
}
.yield-nominal {
  font-size: 28px;
  font-weight: 700;
  color: var(--brand-dark);
  line-height: 1.1;
  letter-spacing: -.02em;
}
.yield-row.is-negative-real .yield-nominal { color: #b91c1c; }
.yield-real {
  font-size: 14px;
  font-weight: 700;
  padding: 2px 8px;
  border-radius: 999px;
  background: rgba(255,255,255,.7);
}
.yield-real.is-positive { color: var(--brand-dark); }
.yield-real.is-negative { color: #b91c1c; }
.yield-note {
  margin-top: 6px;
  font-size: 12px;
  color: var(--ink-mute);
  line-height: 1.45;
}

.insight-chips {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  margin-top: 10px;
}
.insight-chip {
  font-size: 11px;
  font-weight: 600;
  line-height: 1.35;
  padding: 5px 10px;
  border-radius: 999px;
  border: 1px solid var(--line);
  background: #fff;
  color: var(--ink-mute);
}
.chip-good  { background: var(--brand-tint); border-color: var(--brand-line); color: var(--brand-dark); }
.chip-warn  { background: #fffbeb; border-color: #fde68a; color: #92400e; }
.chip-neutral { background: #f8fafc; border-color: var(--line); color: var(--ink-faint); }

.chart-wrap {
  margin-top: 12px;
  position: relative;
}

.card {
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 14px 16px;
  box-shadow: var(--shadow-sm);
}

/* SEO sections */
.noscript-note {
  margin-top: 12px;
  padding: 10px 14px;
  font-size: 12.5px;
  line-height: 1.5;
  color: var(--ink-mute);
  background: #fffbeb;
  border: 1px solid #fde68a;
  border-radius: var(--radius);
}

.content-bridge {
  margin-top: 20px;
  font-size: 13px;
  line-height: 1.6;
  color: var(--ink-mute);
  border-left: 3px solid var(--brand-line);
  background: linear-gradient(90deg, rgba(29,158,117,.04), transparent 65%);
  padding: 11px 14px;
  border-radius: 0 var(--radius) var(--radius) 0;
}
.content-bridge strong { color: var(--ink); font-weight: 600; }

.compare-panel {
  margin-top: 16px;
  padding: 16px 18px;
}
.compare-panel h2 {
  font-size: 15px;
  font-weight: 700;
  color: var(--ink);
  margin-bottom: 6px;
}
.compare-panel-lead {
  font-size: 12.5px;
  line-height: 1.55;
  color: var(--ink-mute);
  margin-bottom: 12px;
}
.compare-panel-lead strong { color: var(--ink); font-weight: 600; }
.compare-table-wrap {
  overflow-x: auto;
  margin: 0 -2px 10px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
}
.compare-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 12px;
  line-height: 1.45;
}
.compare-table th,
.compare-table td {
  padding: 8px 10px;
  text-align: left;
  vertical-align: top;
  border-bottom: 1px solid var(--line);
}
.compare-table thead th {
  background: var(--brand-tint);
  font-size: 11px;
  font-weight: 700;
  color: var(--brand-dark);
}
.compare-table tbody th {
  width: 18%;
  font-weight: 600;
  color: var(--ink);
  background: #fafafa;
}
.compare-table tbody tr:last-child th,
.compare-table tbody tr:last-child td { border-bottom: none; }
.compare-panel-cta {
  font-size: 12.5px;
  color: var(--ink-mute);
}
.compare-panel-cta a {
  color: var(--brand-dark);
  font-weight: 600;
  text-decoration: underline;
  text-underline-offset: 2px;
}

.content-compact {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 12px;
  margin-top: 16px;
}

.info-section h2 {
  font-size: 14px;
  font-weight: 700;
  color: var(--ink);
  margin-bottom: 8px;
}
.info-section p, .info-section li {
  font-size: 12.5px;
  color: var(--ink-mute);
  line-height: 1.55;
}
.info-section p + p { margin-top: 6px; }
.info-section ul, .info-section ol {
  padding-left: 18px;
  display: flex;
  flex-direction: column;
  gap: 6px;
}
.info-section a {
  color: var(--brand-dark);
  font-weight: 600;
  text-decoration: underline;
  text-underline-offset: 2px;
}

.examples-table-wrap {
  overflow-x: auto;
  margin: 8px 0;
  border: 1px solid var(--line);
  border-radius: 8px;
}
.examples-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 12px;
}
.examples-table th,
.examples-table td {
  padding: 8px 10px;
  text-align: left;
  border-bottom: 1px solid var(--line);
}
.examples-table thead th {
  background: var(--brand-tint);
  font-size: 11px;
  font-weight: 700;
  color: var(--brand-dark);
}
.examples-table tbody tr:last-child td { border-bottom: none; }

.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;
}

/* FAQ */
.faq-section { margin-top: 32px; }
.section-head { margin-bottom: 16px; }
.section-eyebrow {
  font-size: 11px;
  font-weight: 700;
  letter-spacing: .10em;
  text-transform: uppercase;
  color: var(--brand);
  margin-bottom: 6px;
}
.faq-section h2 {
  font-size: 20px;
  font-weight: 700;
  color: var(--ink);
}
.faq-list {
  display: flex;
  flex-direction: column;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  overflow: hidden;
  background: var(--surface);
  box-shadow: var(--shadow-sm);
}
.faq-item { border-bottom: 1px solid var(--line); }
.faq-item:last-child { border-bottom: none; }
.faq-item summary {
  list-style: none;
  padding: 14px 18px;
  font-size: 14px;
  font-weight: 600;
  color: var(--ink);
  cursor: pointer;
  display: flex;
  justify-content: space-between;
  align-items: center;
  user-select: none;
  transition: background .15s;
}
.faq-item summary::-webkit-details-marker { display: none; }
.faq-item summary::after {
  content: "+";
  font-size: 18px;
  font-weight: 400;
  color: var(--brand);
  flex-shrink: 0;
}
.faq-item[open] summary::after { content: "−"; }
.faq-item summary:hover { background: var(--brand-tint); }
.faq-item p {
  padding: 0 18px 14px;
  font-size: 13px;
  color: var(--ink-mute);
  line-height: 1.6;
}
.faq-item a {
  color: var(--brand-dark);
  font-weight: 600;
}

.site-footer {
  margin-top: 32px;
  padding: 22px 0 calc(22px + env(safe-area-inset-bottom, 0px));
  border-top: 1px solid var(--line);
  display: flex;
  flex-direction: column;
  gap: 8px;
}
.footer-disclaimer {
  margin: 0;
  font-size: 11.5px;
  line-height: 1.55;
  color: var(--ink-mute);
  max-width: 72ch;
}
.footer-copy {
  margin: 0;
  font-size: 12px;
  color: var(--ink-faint);
}
.footer-copy a {
  color: var(--brand-dark);
  text-decoration: none;
  font-weight: 500;
}
.footer-copy a:hover { text-decoration: underline; }

/* ═══════════════════════════════════════════════════════════════
   CalcUX — reusable truth / insight system (all calculator pages)
   Layer on existing layouts; page CSS only adds theme tokens.
   ═══════════════════════════════════════════════════════════════ */

:root {
  --ux-insight: #ea580c;
  --ux-insight-dark: #c2410c;
  --ux-insight-light: #fff7ed;
  --ux-insight-line: #fed7aa;
  --ux-warn-bg: #fff4e5;
  --ux-warn-line: #fcd34d;
  --ux-risk-bg: #ffecec;
  --ux-risk-line: #fecaca;
  --ux-truth-radius: 10px;
  --ux-anim-duration: 0.8s;
  /* Typography & spacing — RD parity for all CalcUX pages */
  --calc-text-2xs: 0.6875rem;
  --calc-text-xs: 0.75rem;
  --calc-text-sm: 0.8125rem;
  --calc-text-base: 0.9375rem;
  --calc-text-md: 1rem;
  --calc-text-lg: 1.125rem;
  --calc-text-xl: 1.375rem;
  --calc-text-hero-num: clamp(1.625rem, 3.2vw, 2rem);
  --calc-leading-tight: 1.25;
  --calc-leading-normal: 1.5;
  --calc-leading-relaxed: 1.65;
  --calc-space-section: 28px;
  --calc-radius-md: 14px;
}

/* ── Truth box — “what you see ≠ what you get” headline ── */
.truth-box {
  margin: 0 0 22px;
  padding: 16px 20px;
  border-radius: var(--ux-truth-radius);
  border: 1px solid var(--ux-warn-line);
  background: linear-gradient(135deg, var(--ux-warn-bg) 0%, #fffbeb 100%);
  font-size: var(--calc-text-md);
  font-weight: 800;
  line-height: var(--calc-leading-normal);
  color: #7f1d1d;
  box-shadow: 0 2px 12px rgba(220, 38, 38, 0.06);
}
.truth-box strong { font-weight: 800; color: #dc2626; }
.truth-box--caution {
  border-color: var(--ux-insight-line);
  background: linear-gradient(135deg, var(--ux-insight-light) 0%, #fffbeb 100%);
  color: #9a3412;
  box-shadow: 0 2px 12px rgba(234, 88, 12, 0.08);
}
.truth-box--caution strong { color: var(--ux-insight-dark); }
.truth-box--negative {
  border-color: #f87171;
  background: linear-gradient(135deg, #fef2f2 0%, #fff1f0 100%);
  color: #991b1b;
  box-shadow: 0 4px 16px rgba(220, 38, 38, 0.1);
}

/* ── Return flow — nominal → tax → real ladder ── */
.return-flow {
  display: grid;
  grid-template-columns: 1fr auto 1fr auto 1.2fr;
  align-items: stretch;
  gap: 4px;
}
.return-flow__col { min-width: 0; }
.return-flow__bridge {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 4px;
  min-width: 72px;
  opacity: 0.35;
  transition: opacity 0.25s ease;
}
.return-flow__bridge.is-active { opacity: 1; }
.return-flow__bridge-caption {
  font-size: var(--calc-text-2xs);
  font-weight: 600;
  color: var(--ink-mute);
  text-align: center;
  line-height: 1.35;
  max-width: 92px;
}
.return-flow__bridge.is-active .return-flow__bridge-caption {
  color: var(--ux-insight-dark);
}
.return-flow__arrow {
  font-size: var(--calc-text-lg);
  font-weight: 800;
  color: var(--ink-faint);
}
.return-flow__step {
  padding: 14px 12px;
  border-radius: var(--ux-truth-radius);
  background: rgba(255, 255, 255, 0.85);
  border: 1px solid var(--line-soft, var(--line));
  text-align: center;
  transition: transform 0.22s ease, box-shadow 0.22s ease;
}
.return-flow__step.is-muted { opacity: 0.55; }
.return-flow__step-tag {
  display: block;
  margin-top: 10px;
  font-size: var(--calc-text-xs);
  font-weight: 600;
  letter-spacing: 0.02em;
  color: var(--ink-mute);
  line-height: 1.35;
}
.return-flow__step-value {
  display: block;
  font-size: var(--calc-text-xl);
  font-weight: 800;
  color: var(--ink);
  letter-spacing: -0.02em;
  font-variant-numeric: tabular-nums;
  line-height: 1.1;
}
.return-flow__summary {
  margin: 16px 0 0;
  padding: 10px 14px;
  border-radius: 8px;
  background: rgba(15, 23, 42, 0.03);
  font-size: var(--calc-text-sm);
  font-weight: 700;
  color: var(--ink-mute);
  text-align: center;
  font-variant-numeric: tabular-nums;
}
.return-flow.is-full-reality .return-flow__summary {
  background: var(--ux-insight-light);
  color: var(--ux-insight-dark);
  border: 1px solid var(--ux-insight-line);
}

/* ── Real return emphasis ── */
.real-return {
  border: 2px solid #ff4d4f;
  background: #fff1f0;
  box-shadow: 0 10px 28px rgba(255, 77, 79, 0.12);
}
.real-return .return-flow__step-tag,
.real-return .value-block__label {
  color: var(--ux-insight-dark);
  font-weight: 700;
}
.real-return .return-flow__step-value,
.real-return .value-block__amount {
  color: var(--ux-insight-dark);
}
.real-return.is-negative .return-flow__step-value,
.real-return.is-negative .value-block__amount {
  color: #dc2626;
}
.value-block.real-return {
  transform: scale(1.02);
}

/* ── Value comparison row (bank vs today's money) ── */
.value-compare {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 14px;
  margin-top: 18px;
  padding-top: 18px;
  border-top: 1px dashed var(--line-soft, var(--line));
}
.value-block {
  padding: 14px 16px;
  border-radius: var(--ux-truth-radius);
  background: rgba(255, 255, 255, 0.75);
  border: 1px solid var(--line-soft, var(--line));
  transition: transform 0.22s ease, box-shadow 0.22s ease;
}
.value-block__label {
  display: block;
  font-size: 12px;
  font-weight: 700;
  letter-spacing: 0.03em;
  text-transform: uppercase;
  color: var(--ink-mute);
}
.value-block__amount {
  display: block;
  margin-top: 6px;
  font-size: var(--calc-text-hero-num);
  font-weight: 800;
  font-variant-numeric: tabular-nums;
  line-height: var(--calc-leading-tight);
  letter-spacing: -0.02em;
}
.value-block.is-muted { opacity: 0.6; }

/* ── Reality strip — one-line punch ── */
.reality-strip {
  display: flex;
  align-items: flex-start;
  gap: 12px;
  margin-top: 16px;
  padding: 14px 16px;
  border-radius: var(--ux-truth-radius);
  background: var(--ux-warn-bg);
  border: 1px solid var(--ux-warn-line);
}
.reality-strip--pill { border-radius: 999px; }
.reality-strip.is-warning {
  background: var(--ux-risk-bg);
  border-color: var(--ux-risk-line);
}
.reality-strip__icon { flex-shrink: 0; font-size: 18px; line-height: 1.2; }
.reality-strip__text {
  margin: 0;
  font-size: var(--calc-text-sm);
  line-height: var(--calc-leading-relaxed);
  color: var(--ink-mute);
}
.reality-strip__text strong { color: var(--ink); font-weight: 700; }

/* ── Insight carousel ── */
.insight-section {
  margin-top: var(--calc-space-section);
  padding-top: var(--calc-space-section);
  border-top: 1px dashed var(--line-soft, var(--line));
}
.insight-carousel-shell {
  position: relative;
  display: flex;
  align-items: center;
  gap: 8px;
}
.insight-carousel-shell::after {
  content: "";
  position: absolute;
  top: 4px;
  right: 0;
  bottom: 16px;
  width: 28px;
  background: linear-gradient(90deg, transparent 0%, rgba(248, 250, 252, 0.92) 70%, #f8fafc 100%);
  pointer-events: none;
  z-index: 1;
  opacity: 0;
  transition: opacity 0.2s ease;
}
.insight-carousel-shell.is-scrollable::after { opacity: 1; }
.insight-carousel-shell.is-at-end::after { opacity: 0; }
.insight-carousel {
  flex: 1;
  min-width: 0;
  overflow-x: auto;
  scroll-snap-type: x mandatory;
  scroll-behavior: smooth;
  scroll-padding-inline: 4px;
  -webkit-overflow-scrolling: touch;
  overscroll-behavior-x: contain;
  touch-action: pan-x;
  scrollbar-width: none;
  padding: 4px 2px 12px;
}
.insight-carousel.is-dragging { cursor: grabbing; scroll-behavior: auto; user-select: none; }
.insight-carousel::-webkit-scrollbar { display: none; }
.insight-track {
  display: flex;
  gap: 14px;
  padding-right: 18%;
}
.insight-card {
  flex: 0 0 min(82%, 300px);
  scroll-snap-align: start;
  scroll-snap-stop: always;
  padding: 18px;
  border-radius: 12px;
  background: var(--surface);
  border: 1px solid var(--line-soft, var(--line));
  box-shadow: var(--shadow-md);
  transition: transform 0.22s ease, box-shadow 0.22s ease;
}
.insight-card--action {
  background: linear-gradient(135deg, #fff 0%, var(--brand-tint) 100%);
  border-color: var(--brand-line);
}
.insight-card__icon { display: block; font-size: 1.25rem; margin-bottom: 10px; }
.insight-card__title {
  margin: 0 0 8px;
  font-size: var(--calc-text-sm);
  font-weight: 800;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  color: var(--brand-dark);
}
.insight-card__body {
  margin: 0;
  font-size: var(--calc-text-base);
  line-height: var(--calc-leading-relaxed);
  color: var(--ink-mute);
}
.insight-card__body strong { color: var(--ink); font-weight: 700; }
.insight-card__link {
  display: inline-flex;
  margin-top: 12px;
  font-size: 13px;
  font-weight: 700;
  color: var(--brand-dark);
  text-decoration: none;
}
.insight-nav {
  flex-shrink: 0;
  width: 36px;
  height: 36px;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 50%;
  border: 1px solid var(--line);
  background: var(--surface);
  color: var(--brand-dark);
  font-size: 1.35rem;
  cursor: pointer;
  box-shadow: var(--shadow-sm);
  -webkit-tap-highlight-color: transparent;
}
.insight-nav:disabled { opacity: 0.35; cursor: not-allowed; }
.insight-dots {
  display: flex;
  justify-content: center;
  gap: 8px;
  margin-top: 12px;
}
.insight-dot {
  width: 8px;
  height: 8px;
  padding: 0;
  border: none;
  border-radius: 50%;
  background: var(--brand-line);
  cursor: pointer;
  -webkit-tap-highlight-color: transparent;
}
.insight-dot.is-active {
  background: var(--brand);
  width: 22px;
  border-radius: 999px;
}
.explore-hook {
  margin: 14px 0 0;
  text-align: center;
  font-size: 12px;
  font-weight: 600;
  color: var(--ink-faint);
}

/* ── CTA block — compare / next step ── */
.cta-block {
  margin-top: 28px;
  padding-top: 24px;
  border-top: 1px solid var(--line-soft, var(--line));
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 8px;
}
.cta-block__btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 12px 20px;
  min-height: 48px;
  border-radius: 999px;
  font-size: 14px;
  font-weight: 700;
  color: #fff;
  background: linear-gradient(135deg, var(--brand) 0%, var(--brand-dark) 100%);
  box-shadow: 0 4px 14px rgba(15, 118, 110, 0.3);
  text-decoration: none;
  transition: transform 0.18s ease, box-shadow 0.18s ease;
}
.cta-block__note {
  font-size: 12px;
  color: var(--ink-mute);
}

/* ── Progressive disclosure ── */
.ux-disclosure {
  opacity: 0;
  transform: translateY(14px);
  transition: opacity 0.55s ease, transform 0.55s cubic-bezier(0.22, 1, 0.36, 1);
}
.ux-disclosure.is-revealed {
  opacity: 1;
  transform: translateY(0);
}
.ux-disclosure[data-reveal-delay="1"] { transition-delay: 0.08s; }
.ux-disclosure[data-reveal-delay="2"] { transition-delay: 0.16s; }
.ux-disclosure[data-reveal-delay="3"] { transition-delay: 0.24s; }
.ux-disclosure[data-reveal-delay="4"] { transition-delay: 0.32s; }

/* ── Chart key (mobile legend replacement) ── */
.chart-key {
  display: none;
  grid-template-columns: 1fr 1fr;
  gap: 8px 10px;
  margin: 0;
  padding: 12px 14px;
  list-style: none;
  border-radius: var(--ux-truth-radius);
  background: #f8fafc;
  border: 1px solid var(--line-soft, var(--line));
}
.chart-key-item {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 12px;
  font-weight: 600;
  color: var(--ink-mute);
}
.chart-key-line {
  flex-shrink: 0;
  width: 18px;
  height: 0;
  border-top: 2.5px solid var(--key-color, #64748b);
}
.chart-key-item:not(.chart-key-item--solid) .chart-key-line { border-top-style: dashed; }

/* ── Results layout shell (RD parity) ── */
.zone-results-primary {
  border-top-color: transparent;
  padding-top: 18px;
}

.zone-results-primary .zone-label--muted {
  opacity: 0.72;
  font-size: var(--calc-text-2xs);
  margin-bottom: 14px;
}

.ux-result-panel {
  border: none;
  background: transparent;
  overflow: visible;
}

.ux-yield-hero {
  padding: 24px 28px;
  border-radius: var(--calc-radius-md);
  background:
    radial-gradient(ellipse 120% 80% at 100% 0%, rgba(255, 255, 255, 0.7) 0%, transparent 55%),
    linear-gradient(135deg, #f8fafc 0%, #f1f5f9 48%, var(--brand-tint, #ecfdf5) 100%);
  border: 1px solid var(--line-soft, var(--line));
  box-shadow: var(--shadow-md);
}

.ux-yield-hero.is-negative-real {
  background:
    radial-gradient(ellipse 120% 80% at 100% 0%, rgba(255, 255, 255, 0.65) 0%, transparent 55%),
    linear-gradient(135deg, #fef2f2 0%, #fee2e2 48%, #fff1f0 100%);
  border-color: #fecaca;
}

.ux-trust-formula {
  margin: 10px 0 0;
  font-size: var(--calc-text-2xs);
  font-weight: 600;
  color: var(--ink-faint);
  text-align: center;
  letter-spacing: 0.02em;
}

.value-hint {
  display: block;
  margin-top: 6px;
  font-size: var(--calc-text-xs);
  color: var(--ink-mute);
  line-height: var(--calc-leading-normal);
}

.value-story {
  margin: 12px 0 0;
  font-size: var(--calc-text-base);
  line-height: var(--calc-leading-normal);
  color: var(--ink-mute);
  font-weight: 500;
}

.value-block.is-muted {
  opacity: 0.6;
}

.calc-hero-amounts {
  display: flex;
  flex-wrap: wrap;
  align-items: flex-end;
  gap: 10px 16px;
  margin-top: 22px;
  padding-top: 20px;
  border-top: 1px solid rgba(5, 150, 105, 0.18);
}

.calc-hero-amounts--compact .calc-hero-chip {
  padding: 10px 14px;
}

.calc-hero-chip {
  display: flex;
  flex-wrap: wrap;
  align-items: baseline;
  gap: 4px 6px;
  min-width: 0;
  padding: 10px 14px;
  border-radius: var(--ux-truth-radius);
  background: rgba(255, 255, 255, 0.62);
  border: 1px solid rgba(5, 150, 105, 0.14);
  backdrop-filter: blur(4px);
}

.calc-hero-chip-label {
  font-size: var(--calc-text-xs);
  font-weight: 600;
  letter-spacing: 0.03em;
  text-transform: uppercase;
  color: var(--brand-dark);
  opacity: 0.9;
  width: 100%;
}

.calc-hero-chip-value {
  font-size: var(--calc-text-lg);
  font-weight: 700;
  color: var(--ink);
  line-height: var(--calc-leading-tight);
}

.calc-hero-chip-value--gain {
  color: var(--brand-dark);
}

.calc-hero-chip-meta {
  font-size: var(--calc-text-2xs);
  font-weight: 600;
  color: var(--brand-dark);
  opacity: 0.95;
}

.calc-hero-chip-sep {
  font-size: 14px;
  font-weight: 700;
  color: rgba(5, 150, 105, 0.45);
  align-self: center;
  padding-bottom: 2px;
}

.zone-chart {
  margin-top: var(--calc-space-section);
  padding-top: var(--calc-space-section);
  border-top: 1px solid var(--line-soft, var(--line));
}

.zone-chart .zone-label--muted {
  margin: 0 0 12px;
  font-size: var(--calc-text-2xs);
  opacity: 0.72;
}

.real-return .return-flow__step-value {
  font-size: clamp(1.5rem, 3.5vw, 1.875rem);
}

.real-return.is-negative .return-flow__step-value {
  color: #dc2626;
  font-size: clamp(1.625rem, 4vw, 2.125rem);
}

/* ── Micro-interactions & animation hooks ── */
.ux-panel.is-pulse,
.ux-panel.is-input-pulse {
  animation: ux-panel-pulse var(--ux-anim-duration) cubic-bezier(0.22, 1, 0.36, 1);
}
.return-flow__step.is-reveal,
.value-block.is-reveal {
  animation: ux-reveal var(--ux-anim-duration) cubic-bezier(0.22, 1, 0.36, 1);
}
.value-block__amount.is-animating,
.return-flow__step-value.is-animating {
  animation: ux-count var(--ux-anim-duration) cubic-bezier(0.22, 1, 0.36, 1);
}
.value-block__amount.is-dropping {
  animation: ux-drop var(--ux-anim-duration) cubic-bezier(0.34, 1.2, 0.64, 1);
}
.explore-hook.is-pulse {
  animation: ux-hook-pulse 0.9s ease;
}

@keyframes ux-panel-pulse {
  0%, 100% { box-shadow: var(--shadow-md); }
  40% { box-shadow: 0 8px 32px rgba(255, 77, 79, 0.12); }
}
@keyframes ux-reveal {
  0% { opacity: 0.4; transform: translateY(6px) scale(0.97); }
  100% { opacity: 1; transform: translateY(0) scale(1); }
}
@keyframes ux-count {
  0% { opacity: 0.65; transform: translateY(4px); }
  100% { opacity: 1; transform: translateY(0); }
}
@keyframes ux-drop {
  0% { transform: translateY(0) scale(1); }
  35% { transform: translateY(6px) scale(0.94); opacity: 0.7; }
  100% { transform: translateY(0) scale(1); opacity: 1; }
}
@keyframes ux-hook-pulse {
  0%, 100% { color: var(--ink-faint); }
  40% { color: var(--brand-dark); }
}

@media (hover: hover) and (pointer: fine) {
  .insight-card:hover {
    transform: translateY(-4px);
    box-shadow: var(--shadow-lg);
  }
  .return-flow__step:not(.is-muted):hover,
  .value-block:hover {
    transform: translateY(-2px);
    box-shadow: var(--shadow-md);
  }
  .cta-block__btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 24px rgba(15, 118, 110, 0.35);
  }
}

@media (max-width: 720px) {
  .return-flow {
    grid-template-columns: 1fr;
    gap: 10px;
  }
  .return-flow__bridge {
    flex-direction: row;
    justify-content: flex-start;
    min-width: 0;
    padding: 4px 0;
  }
  .return-flow__bridge-caption { max-width: none; text-align: left; }
  .value-compare { grid-template-columns: 1fr; }
  .real-return { transform: none; }
  .reality-strip--pill { border-radius: var(--ux-truth-radius); }
  .insight-nav { display: none; }
  .insight-carousel-shell::after { opacity: 1; }
  .insight-card { flex-basis: min(86%, calc(100vw - 56px)); }
  .insight-track { padding-right: 8%; }
  .chart-key { display: grid; }
  .cta-block { align-items: stretch; }
  .cta-block__btn { width: 100%; text-align: center; }
}

@media (prefers-reduced-motion: reduce) {
  .ux-disclosure { opacity: 1; transform: none; transition: none; }
  .ux-panel.is-pulse,
  .ux-panel.is-input-pulse,
  .return-flow__step.is-reveal,
  .value-block.is-reveal,
  .value-block__amount.is-animating,
  .return-flow__step-value.is-animating,
  .value-block__amount.is-dropping,
  .explore-hook.is-pulse {
    animation: none;
  }
  .insight-card:hover,
  .return-flow__step:not(.is-muted):hover,
  .value-block:hover {
    transform: none;
  }
}

/* ── Responsive ── */
@media (min-width: 900px) {
  .core-grid-4 { grid-template-columns: repeat(4, minmax(0, 1fr)); }
}

@media (max-width: 900px) {
  .hero-stage-with-art { grid-template-columns: 1fr; }
  .hero-photo {
    order: -1;
    max-width: 200px;
    margin: 0 auto;
  }
  .hero-head { grid-template-columns: 1fr; }
  .hero-stat-grid { grid-template-columns: repeat(3, 1fr); width: 100%; }
}

@media (max-width: 720px) {
  .results-strip { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .strip-cell-hero { grid-column: 1 / -1; }
  .content-compact { grid-template-columns: 1fr; }
  .yield-nominal { font-size: 24px; }
}

@media (max-width: 768px) {
  .top-nav-inner { padding: 0 16px; }

  .nav-links {
    position: fixed;
    top: calc(var(--nav-bar) + env(safe-area-inset-top, 0px));
    left: 0;
    right: 0;
    flex-direction: column;
    align-items: stretch;
    gap: 0;
    margin: 0;
    padding: 8px 16px calc(16px + env(safe-area-inset-bottom, 0px));
    background: #ffffff;
    border-bottom: 1px solid var(--line);
    box-shadow: 0 12px 32px rgba(15, 23, 42, 0.12);
    z-index: 1001;
    display: none;
    max-height: min(75vh, calc(100dvh - var(--nav-bar) - env(safe-area-inset-top, 0px)));
    overflow-y: auto;
    -webkit-overflow-scrolling: touch;
  }

  .nav-links a {
    padding: 14px 16px;
    border-radius: 10px;
    font-size: 15px;
    min-height: 48px;
    display: flex;
    align-items: center;
    justify-content: flex-start;
    width: 100%;
    transform: none;
  }

  .nav-links-calc {
    flex-wrap: nowrap;
    justify-content: stretch;
    gap: 0;
    max-width: none;
  }

  .nav-links-calc a {
    padding: 14px 16px;
    font-size: 15px;
    font-weight: 600;
    min-height: 48px;
    width: 100%;
    border-radius: 10px;
    white-space: nowrap;
  }

  .nav-links-calc a.is-current {
    border-radius: 10px;
  }

  .top-nav.is-open .nav-links { display: flex; }

  .top-nav.is-open .nav-backdrop {
    display: block;
    position: fixed;
    top: calc(var(--nav-bar) + env(safe-area-inset-top, 0px));
    left: 0;
    right: 0;
    bottom: 0;
    z-index: 999;
    margin: 0;
    padding: 0;
    border: 0;
    background: rgba(15, 23, 42, 0.4);
    cursor: pointer;
    -webkit-tap-highlight-color: transparent;
  }

  .hamburger-btn { display: inline-flex; }
}

@media (max-width: 600px) {
  .page { padding: 0 16px 40px; }
  .hero-stage-inner { padding: 20px 18px 18px; }
  .calc-shell { padding: 16px; }
  .core-grid, .core-grid-4 { grid-template-columns: 1fr; }
  .hero-foot-meta { flex-direction: column; align-items: flex-start; }
}

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { transition: none !important; animation: none !important; }
}

/* =========================================================
   CalcUX — unified hero carousel + calc nav (RD parity)
   ========================================================= */

.nav-links-calc {
  gap: 4px;
  flex-wrap: nowrap;
}

.nav-links-calc a {
  min-height: 36px;
  padding: 8px 15px;
  font-size: var(--calc-text-sm, 0.8125rem);
  font-weight: 600;
  border-radius: 999px;
  transition: background 0.18s ease, color 0.18s ease, border-color 0.18s ease, box-shadow 0.18s ease;
}

.nav-links-calc a.is-current {
  color: #fff;
  background: linear-gradient(135deg, var(--hero-accent, var(--brand)) 0%, var(--hero-accent-dark, var(--brand-dark)) 100%);
  border-color: transparent;
  box-shadow: 0 2px 8px rgba(15, 23, 42, 0.18);
  pointer-events: none;
}

.nav-links-calc a:hover:not(.is-current) {
  color: var(--hero-accent-dark, var(--brand-dark));
  background: var(--hero-chip-bg, var(--brand-tint));
  border-color: var(--hero-chip-line, var(--brand-line));
  transform: none;
}

.hero-stage-compact[class*="hero-theme-"] .hero-page-top {
  grid-template-columns: minmax(0, 1fr) minmax(340px, 500px);
  column-gap: 40px;
  row-gap: 24px;
}

.hero-page-visual--carousel {
  padding-bottom: 0;
  min-width: 0;
}

.hero-page-copy > .hero-kicker {
  margin-bottom: 14px;
}

.ux-hero-truth {
  margin: 16px 0 0;
  padding: 12px 14px;
  border-radius: 10px;
  border: 1px solid var(--hero-narrative-line, var(--brand-line));
  background: linear-gradient(135deg, var(--hero-narrative-bg, var(--brand-tint)) 0%, #fffbeb 100%);
  font-size: var(--calc-text-sm, 0.8125rem);
  line-height: var(--calc-leading-normal, 1.5);
  color: #9a3412;
  display: flex;
  align-items: flex-start;
  gap: 10px;
  max-width: 52ch;
}

.ux-hero-truth-icon {
  flex-shrink: 0;
  font-size: var(--calc-text-md, 1rem);
  line-height: 1.2;
  color: var(--hero-accent, var(--brand));
}

.ux-hero-truth strong {
  color: var(--hero-accent-dark, var(--brand-dark));
  font-weight: 800;
}

.ux-hero-carousel {
  position: relative;
  width: 100%;
  height: 253px;
  max-height: 253px;
  border-radius: 14px;
  overflow: hidden;
  border: none;
  background: linear-gradient(165deg, var(--hero-bg-start, #f8fafc) 0%, var(--hero-narrative-bg, #f1f5f9) 45%, #fff 100%);
  box-shadow:
    0 16px 48px -20px color-mix(in srgb, var(--hero-accent, var(--brand)) 35%, transparent),
    0 6px 24px -10px color-mix(in srgb, var(--hero-accent, var(--brand)) 14%, transparent);
}

.ux-hero-carousel::before {
  content: "";
  position: absolute;
  inset: 0;
  z-index: 2;
  border-radius: inherit;
  padding: 2px;
  background: linear-gradient(
    145deg,
    color-mix(in srgb, var(--hero-accent, var(--brand)) 50%, transparent) 0%,
    color-mix(in srgb, var(--hero-chip-line, var(--brand-line)) 22%, transparent) 22%,
    rgba(255, 255, 255, 0) 48%,
    color-mix(in srgb, var(--hero-chip-line, var(--brand-line)) 12%, transparent) 72%,
    color-mix(in srgb, var(--hero-accent, var(--brand)) 35%, transparent) 100%
  );
  -webkit-mask:
    linear-gradient(#fff 0 0) content-box,
    linear-gradient(#fff 0 0);
  -webkit-mask-composite: xor;
  mask:
    linear-gradient(#fff 0 0) content-box,
    linear-gradient(#fff 0 0);
  mask-composite: exclude;
  pointer-events: none;
}

.ux-hero-carousel::after {
  content: "";
  position: absolute;
  inset: -14px -18px -18px;
  z-index: -1;
  border-radius: 22px;
  background: radial-gradient(
    ellipse 88% 80% at 50% 42%,
    color-mix(in srgb, var(--hero-accent, var(--brand)) 14%, transparent) 0%,
    rgba(255, 255, 255, 0) 72%
  );
  pointer-events: none;
}

.ux-hero-carousel-track {
  position: absolute;
  inset: 0;
  border-radius: 12px;
  overflow: hidden;
}

.ux-hero-slide {
  position: absolute;
  inset: 0;
  margin: 0;
  opacity: 0;
  transition: opacity 0.85s ease-in-out;
  pointer-events: none;
}

.ux-hero-slide.is-active {
  opacity: 1;
  z-index: 1;
  pointer-events: auto;
}

.ux-hero-slide img {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.ux-hero-carousel-dots {
  position: absolute;
  bottom: 10px;
  left: 50%;
  transform: translateX(-50%);
  z-index: 4;
  display: flex;
  gap: 6px;
  padding: 4px 8px;
  border-radius: 999px;
  background: rgba(15, 23, 42, 0.35);
  backdrop-filter: blur(4px);
}

.ux-hero-carousel-dot {
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.45);
  transition: background 0.2s, transform 0.2s;
  cursor: pointer;
}

.ux-hero-carousel-dot.is-active {
  background: #fff;
  transform: scale(1.15);
}

@media (max-width: 900px) {
  .hero-stage-compact[class*="hero-theme-"] .hero-page-top {
    grid-template-columns: 1fr;
  }

  .nav-links-calc a {
    padding: 8px 11px;
    font-size: var(--calc-text-xs, 0.75rem);
  }
}

@media (max-width: 720px) {
  .ux-hero-carousel {
    height: 220px;
    max-height: 220px;
  }
}

@media (prefers-reduced-motion: reduce) {
  .ux-hero-slide {
    transition: none;
  }

  .ux-hero-slide:not(.is-active) {
    visibility: hidden;
  }
}

/* =========================================================
   Mobile charts & touch-friendly calculator shell
   ========================================================= */

.zone-chart,
.chart-zone {
  margin-top: 16px;
  padding-top: 14px;
  border-top: 1px solid var(--line-soft, var(--line));
}

.chart-head {
  display: flex;
  flex-wrap: wrap;
  align-items: baseline;
  justify-content: space-between;
  gap: 6px 12px;
  margin-bottom: 8px;
}

.chart-head .zone-label {
  margin: 0;
}

.chart-caption {
  margin: 0;
  font-size: 11px;
  font-weight: 600;
  color: var(--ink-faint);
  line-height: 1.4;
}

.chart-wrap {
  position: relative;
  width: 100%;
  min-height: 180px;
  height: clamp(180px, 32vw, 280px);
  touch-action: manipulation;
  -webkit-tap-highlight-color: transparent;
}

.chart-wrap canvas {
  display: block;
  width: 100% !important;
  height: 100% !important;
}

.emi-charts-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 12px;
  margin-top: 4px;
}

.emi-chart-card {
  min-width: 0;
}

.emi-chart-card--full {
  margin-top: 12px;
}

.emi-chart-card .chart-caption {
  margin-bottom: 6px;
}

.emi-chart-wrap--donut {
  min-height: 200px;
  height: clamp(200px, 38vw, 260px);
}

.emi-chart-wrap--line {
  min-height: 200px;
  height: clamp(200px, 38vw, 260px);
}

@media (max-width: 720px) {
  .chart-wrap {
    height: clamp(200px, 52vw, 260px);
    min-height: 200px;
  }

  .chart-head .chart-caption {
    display: none;
  }

  .chart-key {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 6px 10px;
    padding: 10px 12px;
  }

  .emi-charts-grid {
    grid-template-columns: 1fr;
  }

  .ux-hero-truth {
    font-size: 12px;
    padding: 10px 12px;
  }

  .calc-shell,
  .calc-page-stack > .calc-shell {
    padding: 14px 12px;
  }

  input[type="range"] {
    min-height: 28px;
  }

  .slider-wrap {
    gap: 6px;
  }

  .compare-table-wrap {
    -webkit-overflow-scrolling: touch;
    overscroll-behavior-x: contain;
  }
}

@media (max-width: 480px) {
  .chart-key {
    grid-template-columns: 1fr;
  }

  .results-strip {
    gap: 8px;
  }

  .hero-stage-compact .hero-stage-inner.hero-page-layout {
    padding: 16px 14px 14px;
  }
}

/* =========================================================
   Calc mobile polish — shared compact layout (all calculators)
   ========================================================= */

@media (max-width: 1024px) and (min-width: 769px) {
  .top-nav-inner {
    gap: 10px;
  }

  .nav-links-calc {
    flex: 1;
    min-width: 0;
    overflow-x: auto;
    overscroll-behavior-x: contain;
    -webkit-overflow-scrolling: touch;
    scrollbar-width: none;
    mask-image: linear-gradient(to right, transparent 0, #000 12px, #000 calc(100% - 20px), transparent 100%);
    -webkit-mask-image: linear-gradient(to right, transparent 0, #000 12px, #000 calc(100% - 20px), transparent 100%);
  }

  .nav-links-calc::-webkit-scrollbar {
    display: none;
  }

  .nav-links-calc a {
    flex-shrink: 0;
    min-height: 40px;
  }
}

@media (max-width: 720px) {
  /* EMI sticky inputs need ancestors without overflow clip (see emi-calculator.css) */
  body[class*="-page"]:not(.emi-page) {
    overflow-x: clip;
  }

  body[class*="-page"] .page {
    padding-left: max(16px, env(safe-area-inset-left));
    padding-right: max(16px, env(safe-area-inset-right));
    padding-bottom: calc(40px + env(safe-area-inset-bottom, 0px));
  }

  body[class*="-page"] .calc-page-stack {
    overflow-x: clip;
    min-width: 0;
  }

  body[class*="-page"] .calc-page-stack > .calc-shell {
    min-width: 0;
  }

  body[class*="-page"] .hero-stage-with-art {
    min-width: 0;
  }

  body[class*="-page"] .ux-hero-carousel {
    height: clamp(180px, 48vw, 240px);
    max-height: none;
  }

  [class*="-calc-compact"] [class*="-input-stepper"] {
    min-width: 0;
  }

  [class*="-calc-compact"] [class*="-input-stepper"] input[type="number"] {
    font-size: 16px;
    padding: 10px 6px;
  }

  [class*="-calc-compact"] [class*="-input-stepper"] [class*="-step-btn"] {
    flex: 0 0 44px;
    min-width: 44px;
    min-height: 44px;
    touch-action: manipulation;
  }

  [class*="-outcome-bar"] {
    flex-direction: column;
    align-items: stretch;
    gap: 12px;
    min-width: 0;
  }

  [class*="-summary-grid--compact"] {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 8px;
    min-width: 0;
  }

  [class*="-summary-value"] {
    font-size: clamp(1.05rem, 4.5vw, 1.3rem);
    overflow-wrap: anywhere;
  }

  [class*="-calc-compact"] [class*="-text-lead"],
  [class*="-calc-compact"] .truth-box[class*="-psych-headline"],
  [class*="-calc-compact"] .ux-hero-truth {
    max-width: none;
    margin-left: 0;
    margin-right: 0;
  }

  [class*="-calc-compact"] .return-flow__summary,
  [class*="-calc-compact"] [class*="-text-caption"] {
    max-width: none;
    text-align: left;
  }

  [class*="-adjust-summary"] {
    flex-wrap: wrap;
    gap: 8px 10px;
    min-height: 48px;
    padding: 12px 14px;
  }

  [class*="-adjust-chips"] {
    flex-wrap: wrap;
    gap: 6px;
    max-width: 100%;
  }

  [class*="-adjust-chip"] {
    min-height: 36px;
    touch-action: manipulation;
  }

  details[class*="-adjust-panel"] summary {
    touch-action: manipulation;
  }

  .field-label-row {
    flex-wrap: wrap;
    gap: 8px 10px;
  }

  .field-label-row > label {
    flex: 1 1 100%;
  }

  .pill-toggle {
    touch-action: manipulation;
  }

  [class*="-trust-bar"] {
    flex-wrap: wrap;
    gap: 10px;
  }

  .reality-strip {
    flex-wrap: wrap;
    align-items: flex-start;
    gap: 8px 10px;
    padding: 12px 14px;
  }

  [class*="-yield-hero"],
  .ux-yield-hero {
    padding: 16px 14px;
    min-width: 0;
  }

  [class*="-return-ladder"],
  .return-flow {
    min-width: 0;
  }

  [class*="-calc-compact"] .return-flow__step--real.real-return,
  [class*="-calc-compact"] [class*="-return-step--real"].real-return {
    transform: none;
  }

  .chart-head {
    flex-wrap: wrap;
    gap: 10px;
  }

  .chart-head h2,
  .chart-head .zone-label {
    min-width: 0;
  }

  [class*="-decision-cta"] .cta-block,
  [class*="-cta-row"] {
    flex-direction: column;
    align-items: stretch;
  }

  [class*="-decision-cta"] [class*="-cta-btn"],
  [class*="-decision-cta"] .cta-block__btn {
    width: 100%;
    min-height: 48px;
    touch-action: manipulation;
  }

  [class*="-insight-section"],
  .insight-section {
    margin-top: 24px;
    padding-top: 24px;
    min-width: 0;
  }
}

@media (max-width: 480px) {
  body[class*="-page"] .page {
    padding-left: max(14px, env(safe-area-inset-left));
    padding-right: max(14px, env(safe-area-inset-right));
  }

  body[class*="-page"] .calc-shell,
  body[class*="-page"] .calc-page-stack > .calc-shell {
    padding: 12px 10px 20px;
  }

  [class*="-summary-grid--compact"] {
    grid-template-columns: 1fr;
    gap: 8px;
  }

  [class*="-trust-bar"] {
    flex-direction: column;
    align-items: stretch;
  }

  .assumptions-grid {
    grid-template-columns: 1fr;
  }
}

/* ============================================================
   GrowthCharts hub — shared RD-style chart block (all calcs)
   ============================================================ */

.ux-chart-hub {
  display: flex;
  flex-direction: column;
  gap: 0;
  min-width: 0;
}

.ux-chart-hub .ux-chart-card-title,
.ux-chart-hub .fd-chart-title,
.ux-chart-hub .rd-chart-title {
  margin: 0;
  font-size: 1rem;
  font-weight: 700;
  letter-spacing: -0.01em;
  color: var(--ink);
  display: flex;
  align-items: center;
  gap: 8px;
}

.ux-chart-hub .ux-chart-card-title::before,
.ux-chart-hub .fd-chart-title::before,
.ux-chart-hub .rd-chart-title::before {
  content: "";
  flex-shrink: 0;
  width: 3px;
  height: 14px;
  border-radius: 2px;
  background: linear-gradient(180deg, var(--brand) 0%, var(--brand-dark) 100%);
}

.ux-chart-card-caption,
.ux-chart-hub .fd-chart-caption,
.ux-chart-hub .rd-chart-caption,
.ux-chart-hub .chart-caption {
  margin: 6px 0 0;
  font-size: var(--calc-text-xs, 0.75rem);
  line-height: 1.5;
  color: var(--ink-mute);
}

.ux-chart-stats,
.ux-chart-hub .fd-chart-stats,
.ux-chart-hub .rd-chart-stats,
.ux-chart-hub #sip-chart-stats,
.ux-chart-hub #ppf-chart-stats,
.ux-chart-hub #ssy-chart-stats {
  display: flex;
  flex-wrap: wrap;
  gap: 8px 12px;
  margin: 14px 0 12px;
  padding: 10px 12px;
  border-radius: var(--radius, 10px);
  background: var(--brand-tint, #f0fdf9);
  border: 1px solid var(--brand-line, #a7f3d0);
}

.ux-chart-stats span,
.ux-chart-hub .fd-chart-stats span,
.ux-chart-hub .rd-chart-stats span,
.ux-chart-hub #sip-chart-stats span,
.ux-chart-hub #ppf-chart-stats span,
.ux-chart-hub #ssy-chart-stats span {
  font-size: var(--calc-text-xs, 0.75rem);
  font-weight: 600;
  color: var(--brand-dark, #0f7558);
  white-space: nowrap;
}

.ux-chart-hub #rd-chart-stat-real,
.ux-chart-hub #fd-chart-stat-real,
.ux-chart-hub #sip-chart-stat-real,
.ux-chart-hub #ppf-chart-stat-real,
.ux-chart-hub #ssy-chart-stat-real {
  color: var(--ink-mute, #64748b);
}

.ux-chart-wrap,
.ux-chart-hub .chart-wrap,
.ux-chart-hub .fd-chart-wrap,
.ux-chart-hub .rd-chart-wrap {
  position: relative;
  width: 100%;
  min-height: clamp(200px, 42vw, 280px);
  height: clamp(200px, 42vw, 280px);
}

.ux-chart-wrap--donut,
.ux-chart-hub .ux-chart-wrap--donut,
.ux-chart-hub .rd-chart-wrap--donut {
  min-height: clamp(220px, 48vw, 260px);
  height: clamp(220px, 48vw, 260px);
}

.ux-chart-wrap--waterfall,
.ux-chart-hub .ux-chart-wrap--waterfall,
.ux-chart-hub .rd-chart-wrap--waterfall {
  min-height: clamp(240px, 52vw, 300px);
  height: clamp(240px, 52vw, 300px);
}

.ux-donut-center,
.ux-chart-hub .rd-donut-center {
  position: absolute;
  inset: 0;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  pointer-events: none;
  text-align: center;
  padding-bottom: 28px;
}

.ux-donut-center strong,
.ux-chart-hub .rd-donut-center strong {
  font-size: clamp(1rem, 3.5vw, 1.15rem);
  font-weight: 800;
  color: var(--ink);
  letter-spacing: -0.02em;
  font-variant-numeric: tabular-nums;
}

.ux-donut-center span,
.ux-chart-hub .rd-donut-center span {
  font-size: 10px;
  font-weight: 600;
  color: var(--ink-mute);
  margin-top: 2px;
}

.ux-chart-tabs {
  display: none;
  flex-wrap: wrap;
  gap: 6px;
  padding: 4px;
  border-radius: 999px;
  background: var(--line-soft, #f1f5f9);
  border: 1px solid var(--line);
  margin: 16px 0 12px;
}

.ux-chart-tab {
  flex: 1 1 auto;
  min-height: 40px;
  min-width: 0;
  padding: 8px 12px;
  border: none;
  border-radius: 999px;
  background: transparent;
  font-family: inherit;
  font-size: 12px;
  font-weight: 700;
  color: var(--ink-mute);
  cursor: pointer;
  transition: background 0.15s ease, color 0.15s ease, box-shadow 0.15s ease;
  -webkit-tap-highlight-color: transparent;
  touch-action: manipulation;
}

.ux-chart-tab.is-active {
  background: #fff;
  color: var(--brand-dark);
  box-shadow: var(--shadow-sm);
}

.ux-chart-tab:hover:not(.is-active) {
  color: var(--ink);
}

.ux-chart-breakdown {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 16px;
  margin-top: 20px;
  padding-top: 20px;
  border-top: 1px dashed var(--line);
}

.ux-chart-breakdown--single {
  grid-template-columns: 1fr;
  max-width: 480px;
  margin-left: auto;
  margin-right: auto;
}

.ux-chart-hub.is-mobile-tabs .ux-chart-breakdown--single {
  max-width: none;
}

.ux-chart-card {
  padding: 16px;
  border-radius: var(--radius, 12px);
  border: 1px solid var(--line);
  background: var(--surface, #fff);
  box-shadow: var(--shadow-sm);
  min-width: 0;
  transition: border-color 0.18s ease, box-shadow 0.18s ease;
}

@media (hover: hover) and (pointer: fine) {
  .ux-chart-card:hover {
    border-color: var(--brand-line);
    box-shadow: var(--shadow-md);
  }
}

.ux-chart-card-head {
  margin-bottom: 12px;
}

.ux-chart-legend-help,
.ux-chart-hub .fd-chart-legend-help,
.ux-chart-hub .rd-chart-legend-help {
  margin: 10px 0 0;
  font-size: 11px;
  color: var(--ink-faint);
  text-align: center;
}

.ux-chart-hub.is-mobile-tabs .ux-chart-tabs {
  display: flex;
}

.ux-chart-hub.is-mobile-tabs .ux-chart-panel {
  display: none;
}

.ux-chart-hub.is-mobile-tabs .ux-chart-panel.is-active {
  display: block;
}

.ux-chart-hub.is-mobile-tabs .ux-chart-breakdown {
  display: block;
  margin-top: 0;
  padding-top: 0;
  border-top: none;
}

.ux-chart-hub.is-mobile-tabs .ux-chart-breakdown .ux-chart-panel {
  display: none;
}

.ux-chart-hub.is-mobile-tabs .ux-chart-breakdown .ux-chart-panel.is-active {
  display: block;
}

.ux-chart-hub.is-mobile-tabs .ux-chart-panel--growth.is-active .ux-chart-legend-help {
  display: block;
}

@media (max-width: 720px) {
  .ux-chart-stats,
  .ux-chart-hub .fd-chart-stats,
  .ux-chart-hub .rd-chart-stats {
    gap: 6px 10px;
    padding: 8px 10px;
  }

  .ux-chart-stats span,
  .ux-chart-hub .fd-chart-stats span,
  .ux-chart-hub .rd-chart-stats span,
  .ux-chart-hub #sip-chart-stats span,
  .ux-chart-hub #ppf-chart-stats span,
  .ux-chart-hub #ssy-chart-stats span {
    font-size: 11px;
  }

  .ux-chart-tab {
    min-height: 44px;
    font-size: 11px;
    padding: 10px 8px;
  }

  .ux-chart-breakdown {
    grid-template-columns: 1fr;
  }

  .ux-chart-card {
    padding: 14px 12px;
  }
}
