/* ═══════════════════════════════════════════════════════════════════
   TechSavyMoney — design system v3
   Bricolage Grotesque for voice, Inter for information. Crisp white
   surfaces, one confident money-green, and a small family of vivid
   supporting hues (violet, sun, sky, coral) used to colour-code the
   questions people come here to answer. Figures always line up in
   tabular numerals.
   ═══════════════════════════════════════════════════════════════════ */

/* ── Tokens ─────────────────────────────────────────────────────── */
:root {
  color-scheme: light dark;

  --font-display: 'Bricolage Grotesque', 'Inter', system-ui, sans-serif;
  --font-sans: 'Inter', system-ui, -apple-system, 'Segoe UI', sans-serif;

  --paper:        #FAFBFD;
  --surface:      #FFFFFF;
  --surface-2:    #F2F5F9;
  --surface-3:    #E6EBF2;
  --ink:          #0B1B2E;
  --ink-soft:     #2D3B4E;
  --muted:        #5D6B7E;
  --line:         #E3E8EF;
  --line-strong:  #CDD5E0;

  --accent:        #00B386;
  --accent-strong: #007F5F;
  --accent-wash:   #E3F8F1;
  --accent-glow:   rgba(0, 179, 134, 0.20);

  /* Primary action colour — darker than the accent so white text passes AA */
  --btn-bg:     #00875F;
  --btn-bg-hov: #00744F;
  --btn-ink:    #FFFFFF;

  /* Supporting hues — each question on the home page owns one */
  --violet:      #6D5BFF;
  --violet-wash: #EEEBFF;
  --sun:         #F5A300;
  --sun-wash:    #FFF4DA;
  --sky:         #1F8FFF;
  --sky-wash:    #E4F1FF;
  --coral:       #F0505A;
  --coral-wash:  #FFEAEB;

  --pos:       #0E9F6E;
  --pos-wash:  #E3F7EE;
  --neg:       #E0434C;
  --neg-wash:  #FDECEC;
  --warn:      #B86E00;
  --warn-wash: #FFF3DE;

  /* Deep shell used by the footer and feature panels */
  --shell:      #0B1B2E;
  --shell-2:    #13263D;
  --shell-line: rgba(255, 255, 255, 0.10);
  --shell-ink:  #F3F7FB;
  --shell-mute: #9DACBF;

  --shadow-xs: 0 1px 2px rgba(11, 27, 46, 0.05);
  --shadow-sm: 0 1px 3px rgba(11, 27, 46, 0.06), 0 1px 2px rgba(11, 27, 46, 0.04);
  --shadow:    0 2px 6px rgba(11, 27, 46, 0.06), 0 8px 20px -8px rgba(11, 27, 46, 0.12);
  --shadow-md: 0 4px 12px rgba(11, 27, 46, 0.07), 0 18px 36px -14px rgba(11, 27, 46, 0.18);
  --shadow-lg: 0 8px 24px rgba(11, 27, 46, 0.08), 0 32px 64px -20px rgba(11, 27, 46, 0.24);

  --radius-xs: 8px;
  --radius-sm: 12px;
  --radius:    16px;
  --radius-lg: 22px;
  --radius-xl: 30px;

  --ease: cubic-bezier(0.22, 0.61, 0.36, 1);
  --measure: 62ch;

  /* Legacy aliases — referenced from inline styles throughout the HTML
     and from chart code, so they stay, pointing at the new palette. */
  --bg:           var(--paper);
  --navy:         var(--ink);
  --navy-light:   var(--ink-soft);
  --teal:         var(--accent);
  --teal-dark:    var(--accent-strong);
  --teal-light:   var(--accent-wash);
  --text:         var(--ink);
  --text-muted:   var(--muted);
  --border:       var(--line);
  --green:        var(--pos);
  --green-light:  var(--pos-wash);
  --red:          var(--neg);
  --red-light:    var(--neg-wash);
  --amber:        var(--warn);
  --amber-light:  var(--warn-wash);
}

/* Dark tokens apply two ways: the system setting (unless the reader has
   explicitly chosen light) and an explicit choice. Kept identical. */
@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) {
    --paper: #08101B; --surface: #0F1926; --surface-2: #152131; --surface-3: #1E2C3F;
    --ink: #EEF3F9; --ink-soft: #C5D0DE; --muted: #8D9AAD; --line: #1F2D41; --line-strong: #2B3C54;
    --accent: #2EE0A8; --accent-strong: #6BF0C6; --accent-wash: #0B2B23; --accent-glow: rgba(46, 224, 168, 0.22);
    --btn-bg: #2EE0A8; --btn-bg-hov: #5BEABD; --btn-ink: #03241A;
    --violet: #9D90FF; --violet-wash: #1F1C44; --sun: #FFC44D; --sun-wash: #2F240B;
    --sky: #62B4FF; --sky-wash: #0D2340; --coral: #FF7C83; --coral-wash: #351417;
    --pos: #35D196; --pos-wash: #0C2A1F; --neg: #FF6F75; --neg-wash: #321416; --warn: #F0B048; --warn-wash: #2E220E;
    --shell: #050B14; --shell-2: #0C1726; --shell-line: rgba(255, 255, 255, 0.08); --shell-ink: #F0F4F8; --shell-mute: #93A2B5;
    --shadow-xs: 0 1px 2px rgba(0, 0, 0, 0.5);
    --shadow-sm: 0 1px 3px rgba(0, 0, 0, 0.5);
    --shadow:    0 2px 8px rgba(0, 0, 0, 0.45), 0 10px 24px -10px rgba(0, 0, 0, 0.6);
    --shadow-md: 0 6px 16px rgba(0, 0, 0, 0.5), 0 22px 44px -18px rgba(0, 0, 0, 0.7);
    --shadow-lg: 0 10px 28px rgba(0, 0, 0, 0.55), 0 36px 70px -24px rgba(0, 0, 0, 0.8);
  }
}

:root[data-theme="dark"] {
  --paper: #08101B; --surface: #0F1926; --surface-2: #152131; --surface-3: #1E2C3F;
  --ink: #EEF3F9; --ink-soft: #C5D0DE; --muted: #8D9AAD; --line: #1F2D41; --line-strong: #2B3C54;
  --accent: #2EE0A8; --accent-strong: #6BF0C6; --accent-wash: #0B2B23; --accent-glow: rgba(46, 224, 168, 0.22);
  --btn-bg: #2EE0A8; --btn-bg-hov: #5BEABD; --btn-ink: #03241A;
  --violet: #9D90FF; --violet-wash: #1F1C44; --sun: #FFC44D; --sun-wash: #2F240B;
  --sky: #62B4FF; --sky-wash: #0D2340; --coral: #FF7C83; --coral-wash: #351417;
  --pos: #35D196; --pos-wash: #0C2A1F; --neg: #FF6F75; --neg-wash: #321416; --warn: #F0B048; --warn-wash: #2E220E;
  --shell: #050B14; --shell-2: #0C1726; --shell-line: rgba(255, 255, 255, 0.08); --shell-ink: #F0F4F8; --shell-mute: #93A2B5;
  --shadow-xs: 0 1px 2px rgba(0, 0, 0, 0.5);
  --shadow-sm: 0 1px 3px rgba(0, 0, 0, 0.5);
  --shadow:    0 2px 8px rgba(0, 0, 0, 0.45), 0 10px 24px -10px rgba(0, 0, 0, 0.6);
  --shadow-md: 0 6px 16px rgba(0, 0, 0, 0.5), 0 22px 44px -18px rgba(0, 0, 0, 0.7);
  --shadow-lg: 0 10px 28px rgba(0, 0, 0, 0.55), 0 36px 70px -24px rgba(0, 0, 0, 0.8);
}

/* ── Reset ──────────────────────────────────────────────────────── */
*, *::before, *::after { box-sizing: border-box; }
* { margin: 0; }

html {
  -webkit-text-size-adjust: 100%;
  scroll-behavior: smooth;
}
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
  }
}

body {
  font-family: var(--font-sans);
  font-size: 1rem;
  line-height: 1.6;
  color: var(--ink);
  background: var(--paper);
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  font-feature-settings: 'cv05' 1, 'ss01' 1;
  text-rendering: optimizeLegibility;
}

img, svg, canvas { display: block; max-width: 100%; }
button, input, select, textarea { font: inherit; color: inherit; }

:focus-visible {
  outline: 2.5px solid var(--accent);
  outline-offset: 2px;
  border-radius: 4px;
}

::selection { background: var(--accent-glow); color: var(--ink); }

/* ── Typography ─────────────────────────────────────────────────── */
h1, h2, h3, h4 {
  font-family: var(--font-display);
  font-weight: 700;
  line-height: 1.08;
  letter-spacing: -0.025em;
  color: var(--ink);
  text-wrap: balance;
}

h1 { font-size: clamp(2.3rem, 1.4rem + 3.8vw, 4.1rem); letter-spacing: -0.035em; font-weight: 800; }
h2 { font-size: clamp(1.75rem, 1.2rem + 2.2vw, 2.7rem); letter-spacing: -0.03em; font-weight: 750; }
h3 { font-size: 1.1875rem; letter-spacing: -0.015em; font-weight: 700; }
h4 { font-size: 1.0625rem; }

p { text-wrap: pretty; }

a { color: var(--accent-strong); text-decoration-thickness: 1px; text-underline-offset: 2px; }
a:hover { color: var(--accent); }

strong, b { font-weight: 650; }

.subtitle {
  font-size: 1.0625rem;
  line-height: 1.65;
  color: var(--muted);
  max-width: var(--measure);
  margin-inline: auto;
}

.disclaimer, .field-hint {
  font-size: 0.78125rem;
  line-height: 1.55;
  color: var(--muted);
}
.field-hint { margin-top: 0.4375rem; }

.section-label {
  font-size: 0.6875rem;
  font-weight: 650;
  text-transform: uppercase;
  letter-spacing: 0.09em;
  color: var(--muted);
  margin-bottom: 0.875rem;
  padding-bottom: 0.5rem;
  border-bottom: 1px solid var(--line);
}

/* ── Layout ─────────────────────────────────────────────────────── */
.container {
  width: min(100% - 2.5rem, 1200px);
  margin-inline: auto;
}
@media (max-width: 640px) { .container { width: min(100% - 1.75rem, 1200px); } }

.section { padding: clamp(3.5rem, 8vw, 6.5rem) 0; }
.text-center { text-align: center; }
.hidden { display: none !important; }
.mt-2 { margin-top: 1rem; }
.mb-1 { margin-bottom: 0.5rem; }
.flex-between { display: flex; align-items: center; justify-content: space-between; gap: 0.75rem; }

.grid-2 { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 1rem; }
.grid-3 { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 1rem; }
@media (max-width: 720px) {
  .grid-2, .grid-3 { grid-template-columns: 1fr; }
}

/* ── Navbar ─────────────────────────────────────────────────────── */
.navbar {
  position: sticky;
  top: 0;
  z-index: 100;
  background: color-mix(in srgb, var(--surface) 84%, transparent);
  backdrop-filter: saturate(180%) blur(16px);
  -webkit-backdrop-filter: saturate(180%) blur(16px);
  border-bottom: 1px solid var(--line);
}
.navbar .container {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1.25rem;
  min-height: 4.25rem;
}

.nav-logo {
  display: inline-flex;
  align-items: center;
  font-family: var(--font-display);
  font-size: 1.3rem;
  font-weight: 800;
  letter-spacing: -0.03em;
  color: var(--ink);
  text-decoration: none;
  white-space: nowrap;
}
.nav-logo::before {
  content: '';
  width: 1.7rem; height: 1.7rem;
  border-radius: 9px;
  background:
    linear-gradient(135deg, transparent 52%, rgba(255,255,255,0.35) 52% 60%, transparent 60%),
    conic-gradient(from 200deg, var(--accent), var(--sky), var(--violet), var(--accent));
  box-shadow: 0 4px 12px -4px var(--accent-glow);
  flex-shrink: 0;
  margin-right: 0.55rem;
}
.nav-logo:hover { color: var(--ink); }
.nav-logo span { color: var(--accent-strong); }

.nav-links { display: flex; align-items: center; gap: 0.125rem; }
.nav-links a {
  padding: 0.5rem 0.75rem;
  border-radius: 999px;
  font-size: 0.875rem;
  font-weight: 550;
  color: var(--ink-soft);
  text-decoration: none;
  white-space: nowrap;
  transition: color 0.18s var(--ease), background 0.18s var(--ease);
}
.nav-links a:hover { color: var(--ink); background: var(--surface-2); }
.nav-links a.active { color: var(--accent-strong); background: var(--accent-wash); }

.nav-cta {
  margin-left: 0.5rem;
  background: var(--btn-bg) !important;
  color: var(--btn-ink) !important;
  font-weight: 650 !important;
  padding: 0.5rem 1.05rem !important;
  box-shadow: 0 6px 16px -8px var(--accent-glow);
  transition: transform 0.18s var(--ease), background 0.18s var(--ease);
}
.nav-cta:hover { background: var(--btn-bg-hov) !important; transform: translateY(-1px); }

.nav-toggle {
  display: none;
  background: none;
  border: none;
  color: var(--ink);
  font-size: 1.375rem;
  line-height: 1;
  padding: 0.375rem 0.5rem;
  cursor: pointer;
  border-radius: var(--radius-xs);
}
.nav-toggle:hover { background: var(--surface-2); }

.nav-mobile {
  display: none;
  flex-direction: column;
  padding: 0.5rem 1.25rem 1rem;
  background: var(--surface);
  border-top: 1px solid var(--line);
}
.nav-mobile.open { display: flex; }
.nav-mobile a {
  padding: 0.8rem 0.25rem;
  color: var(--ink-soft);
  text-decoration: none;
  font-size: 0.9375rem;
  font-weight: 550;
  border-bottom: 1px solid var(--line);
}
.nav-mobile a:last-child { border-bottom: none; }
.nav-mobile a:hover { color: var(--ink); }

@media (max-width: 1180px) {
  .nav-links { display: none; }
  .nav-toggle { display: block; }
}

/* ── Hero ───────────────────────────────────────────────────────── */
.hero {
  position: relative;
  overflow: hidden;
  background: var(--paper);
  padding: clamp(3rem, 7vw, 5.5rem) 0 clamp(3.5rem, 8vw, 6rem);
  isolation: isolate;
}
/* Soft colour fields — the "vibrant" without a single stock gradient */
.hero::before {
  content: '';
  position: absolute;
  inset: 0;
  z-index: -2;
  pointer-events: none;
  background:
    radial-gradient(38rem 26rem at 88% 8%,  color-mix(in srgb, var(--accent) 22%, transparent), transparent 70%),
    radial-gradient(30rem 22rem at 70% 92%, color-mix(in srgb, var(--violet) 18%, transparent), transparent 70%),
    radial-gradient(26rem 20rem at 4% 96%,  color-mix(in srgb, var(--sun) 16%, transparent), transparent 70%);
}
.hero::after {
  content: '';
  position: absolute;
  inset: 0;
  z-index: -1;
  pointer-events: none;
  background-image: radial-gradient(color-mix(in srgb, var(--ink) 10%, transparent) 1px, transparent 1px);
  background-size: 22px 22px;
  mask-image: linear-gradient(180deg, rgba(0,0,0,0.5), transparent 70%);
  -webkit-mask-image: linear-gradient(180deg, rgba(0,0,0,0.5), transparent 70%);
}

.hero-content { max-width: 40rem; }
.hero h1 { color: var(--ink); margin-bottom: 1.25rem; }
.hero h1 span {
  background: linear-gradient(100deg, var(--accent-strong), var(--sky) 55%, var(--violet));
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
}
.hero p {
  font-size: clamp(1.0625rem, 0.95rem + 0.5vw, 1.2rem);
  line-height: 1.62;
  color: var(--muted);
  max-width: 36rem;
  margin-bottom: 2rem;
}

.hero-badge {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.4rem 0.9rem;
  margin-bottom: 1.5rem;
  border: 1px solid color-mix(in srgb, var(--accent) 30%, transparent);
  border-radius: 999px;
  background: color-mix(in srgb, var(--accent-wash) 80%, var(--surface));
  font-size: 0.8rem;
  font-weight: 600;
  color: var(--accent-strong);
}
.hero-actions { display: flex; flex-wrap: wrap; gap: 0.75rem; }

.fade-up { animation: fade-up 0.7s var(--ease) both; }
@keyframes fade-up {
  from { opacity: 0; transform: translateY(14px); }
  to   { opacity: 1; transform: none; }
}

/* ── Buttons ────────────────────────────────────────────────────── */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
  padding: 0.7rem 1.3rem;
  border: 1px solid transparent;
  border-radius: 999px;
  font-size: 0.9375rem;
  font-weight: 650;
  line-height: 1.2;
  text-decoration: none;
  white-space: nowrap;
  cursor: pointer;
  transition: transform 0.18s var(--ease), box-shadow 0.18s var(--ease),
              background 0.18s var(--ease), border-color 0.18s var(--ease);
}
.btn:active { transform: translateY(1px); }
.btn:disabled, .btn[disabled] { opacity: 0.45; cursor: not-allowed; transform: none; box-shadow: none; }

.btn-primary {
  background: var(--btn-bg);
  color: var(--btn-ink);
  box-shadow: 0 1px 2px rgba(11,27,46,0.14), 0 10px 22px -10px var(--accent-glow);
}
.btn-primary:hover {
  background: var(--btn-bg-hov);
  color: var(--btn-ink);
  transform: translateY(-1.5px);
  box-shadow: 0 2px 4px rgba(11,27,46,0.14), 0 16px 30px -12px var(--accent-glow);
}

.btn-secondary {
  background: var(--surface);
  color: var(--ink);
  border-color: var(--line-strong);
  box-shadow: var(--shadow-xs);
}
.btn-secondary:hover {
  color: var(--ink);
  border-color: var(--muted);
  transform: translateY(-1.5px);
  box-shadow: var(--shadow-sm);
}

.btn-ghost { background: transparent; color: var(--ink-soft); }
.btn-ghost:hover { background: var(--surface-2); color: var(--ink); }

.btn-danger {
  background: var(--neg-wash);
  color: var(--neg);
  border-color: color-mix(in srgb, var(--neg) 22%, transparent);
}
.btn-danger:hover { background: color-mix(in srgb, var(--neg) 14%, var(--neg-wash)); }

.btn-lg { padding: 0.95rem 1.7rem; font-size: 1rem; }
.btn-sm { padding: 0.375rem 0.75rem; font-size: 0.8125rem; border-radius: var(--radius-xs); }

/* ── Forms ──────────────────────────────────────────────────────── */
.form-group { margin-bottom: 1.125rem; }
.form-group:last-child { margin-bottom: 0; }

.form-group label,
label {
  display: block;
  font-size: 0.78125rem;
  font-weight: 600;
  letter-spacing: 0.035em;
  text-transform: uppercase;
  color: var(--muted);
  margin-bottom: 0.4375rem;
}

input[type="number"], input[type="text"], input[type="email"] {
  width: 100%;
  padding: 0.6875rem 0.875rem;
  background: var(--surface);
  border: 1px solid var(--line-strong);
  border-radius: var(--radius-sm);
  font-size: 1rem;
  font-weight: 500;
  font-variant-numeric: tabular-nums;
  color: var(--ink);
  transition: border-color 0.16s var(--ease), box-shadow 0.16s var(--ease), background 0.16s var(--ease);
}
input::placeholder { color: color-mix(in srgb, var(--muted) 72%, transparent); font-weight: 400; }
input[type="number"]:hover, input[type="text"]:hover, input[type="email"]:hover {
  border-color: var(--muted);
}
input[type="number"]:focus, input[type="text"]:focus, input[type="email"]:focus {
  outline: none;
  border-color: var(--accent);
  box-shadow: 0 0 0 3.5px var(--accent-glow);
}
/* Spinners add visual noise to a page that is nothing but number fields */
input[type="number"]::-webkit-outer-spin-button,
input[type="number"]::-webkit-inner-spin-button { -webkit-appearance: none; margin: 0; }
input[type="number"] { -moz-appearance: textfield; }

.input-prefix, .input-suffix { position: relative; display: flex; align-items: center; }
.input-prefix > span, .input-suffix > span {
  position: absolute;
  font-size: 0.9375rem;
  font-weight: 550;
  color: var(--muted);
  pointer-events: none;
}
.input-prefix > span { left: 0.875rem; }
.input-prefix > input { padding-left: 1.9375rem; }
.input-suffix > span { right: 0.875rem; }
.input-suffix > input { padding-right: 1.9375rem; }

.range-wrapper { display: flex; align-items: center; gap: 1rem; }
.range-value {
  min-width: 3.25rem;
  text-align: right;
  font-weight: 700;
  font-variant-numeric: tabular-nums;
  color: var(--accent-strong);
}
input[type="range"] {
  flex: 1;
  -webkit-appearance: none;
  appearance: none;
  height: 5px;
  border-radius: 999px;
  background: var(--surface-3);
  cursor: pointer;
}
input[type="range"]::-webkit-slider-thumb {
  -webkit-appearance: none;
  width: 19px; height: 19px;
  border-radius: 50%;
  background: var(--accent);
  border: 2.5px solid var(--surface);
  box-shadow: var(--shadow-sm);
  cursor: pointer;
}
input[type="range"]::-moz-range-thumb {
  width: 19px; height: 19px;
  border-radius: 50%;
  background: var(--accent);
  border: 2.5px solid var(--surface);
  box-shadow: var(--shadow-sm);
  cursor: pointer;
  border-color: var(--surface);
}

/* ── Cards ──────────────────────────────────────────────────────── */
.card {
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-sm);
  margin-bottom: 1.25rem;
  overflow: hidden;
}
.card:last-child { margin-bottom: 0; }

.card-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.875rem;
  padding: 1.125rem 1.5rem;
  border-bottom: 1px solid var(--line);
  background: linear-gradient(180deg,
    color-mix(in srgb, var(--surface-2) 55%, var(--surface)) 0%, var(--surface) 100%);
}
.card-header h3 { font-size: 1.0625rem; margin: 0; }
.card-body { padding: 1.5rem; }

@media (max-width: 640px) {
  .card-header { padding: 1rem 1.125rem; }
  .card-body { padding: 1.125rem; }
}

/* ── Stats ──────────────────────────────────────────────────────── */
.stat-card {
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 1.25rem;
  box-shadow: var(--shadow-xs);
}
.stat-label {
  display: block;
  font-size: 0.6875rem;
  font-weight: 650;
  text-transform: uppercase;
  letter-spacing: 0.085em;
  color: var(--muted);
  margin-bottom: 0.4375rem;
}
.stat-value {
  font-family: var(--font-display);
  font-size: clamp(1.5rem, 1.1rem + 1.4vw, 2rem);
  font-weight: 600;
  line-height: 1.08;
  letter-spacing: -0.024em;
  font-variant-numeric: tabular-nums;
  color: var(--ink);
}
.stat-meta { font-size: 0.8125rem; color: var(--muted); margin-top: 0.375rem; line-height: 1.5; }
.stat-positive { color: var(--pos); }
.stat-negative { color: var(--neg); }
.stat-neutral  { color: var(--muted); }

/* ── Badges ─────────────────────────────────────────────────────── */
.badge {
  display: inline-flex;
  align-items: center;
  gap: 0.3125rem;
  padding: 0.25rem 0.625rem;
  border-radius: 999px;
  font-size: 0.71875rem;
  font-weight: 650;
  letter-spacing: 0.012em;
  white-space: nowrap;
  border: 1px solid transparent;
}
.badge-teal  { background: var(--accent-wash); color: var(--accent-strong); border-color: color-mix(in srgb, var(--accent) 24%, transparent); }
.badge-green { background: var(--pos-wash);    color: var(--pos);           border-color: color-mix(in srgb, var(--pos) 24%, transparent); }
.badge-amber { background: var(--warn-wash);   color: var(--warn);          border-color: color-mix(in srgb, var(--warn) 26%, transparent); }
.badge-red   { background: var(--neg-wash);    color: var(--neg);           border-color: color-mix(in srgb, var(--neg) 24%, transparent); }
.badge-navy  { background: var(--surface-2);   color: var(--muted);         border-color: var(--line); }

/* ── Progress ───────────────────────────────────────────────────── */
.progress-bar {
  height: 7px;
  background: var(--surface-3);
  border-radius: 999px;
  overflow: hidden;
}
.progress-fill {
  height: 100%;
  border-radius: 999px;
  background: var(--accent);
  transition: width 0.45s var(--ease);
}

/* ── Category rows ──────────────────────────────────────────────── */
.category-row {
  display: grid;
  grid-template-columns: auto 1fr auto auto;
  align-items: center;
  gap: 0.75rem;
  padding: 0.5625rem 0;
  border-bottom: 1px solid var(--line);
  font-size: 0.875rem;
}
.category-row:last-child { border-bottom: none; }
.category-dot { width: 9px; height: 9px; border-radius: 50%; flex-shrink: 0; }
.category-name { min-width: 0; color: var(--ink-soft); }
.category-amount { font-weight: 650; font-variant-numeric: tabular-nums; }
.category-pct {
  min-width: 3rem;
  text-align: right;
  font-size: 0.8125rem;
  color: var(--muted);
  font-variant-numeric: tabular-nums;
}

/* ── Empty state ────────────────────────────────────────────────── */
.empty-state {
  padding: 2.75rem 1.5rem;
  text-align: center;
  color: var(--muted);
  font-size: 0.9375rem;
  line-height: 1.65;
}

/* ── Tool pages ─────────────────────────────────────────────────── */
.tool-page { padding: clamp(2rem, 4vw, 3.25rem) 0 clamp(3rem, 6vw, 5rem); }

.tool-header { margin-bottom: 2rem; max-width: 52rem; }
.tool-header h1 {
  font-size: clamp(1.875rem, 1.4rem + 2.2vw, 2.85rem);
  margin-bottom: 0.625rem;
}
.tool-header p { font-size: 1.0625rem; line-height: 1.62; color: var(--muted); max-width: var(--measure); }

.tool-layout {
  display: grid;
  grid-template-columns: minmax(0, 0.82fr) minmax(0, 1.18fr);
  gap: 1.5rem;
  align-items: start;
}
@media (max-width: 1000px) { .tool-layout { grid-template-columns: 1fr; } }

.chart-wrap { position: relative; min-height: 220px; }

/* ── Tools grid (home) ──────────────────────────────────────────── */
.tools-section { padding: clamp(3.5rem, 8vw, 6rem) 0; }
.tools-section h2 { text-align: center; margin-bottom: 0.75rem; }
.tools-section .subtitle { text-align: center; margin-bottom: 3rem; }

/* Six cards, so three across reads as two clean rows rather than
   leaving an orphan. */
.tools-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 1.25rem;
}
@media (max-width: 1040px) { .tools-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
@media (max-width: 680px)  { .tools-grid { grid-template-columns: 1fr; } }

.tool-card {
  display: flex;
  flex-direction: column;
  padding: 1.75rem;
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-xs);
  text-decoration: none;
  color: inherit;
  transition: transform 0.22s var(--ease), box-shadow 0.22s var(--ease), border-color 0.22s var(--ease);
}
.tool-card:hover {
  color: inherit;
  transform: translateY(-3px);
  border-color: color-mix(in srgb, var(--accent) 40%, var(--line));
  box-shadow: var(--shadow-md);
}
/* The featured tool leads the grid and gets the only accent rule on it */
.tools-grid > .tool-card:first-child {
  border-color: color-mix(in srgb, var(--accent) 32%, var(--line));
  box-shadow: var(--shadow-sm), inset 0 2px 0 var(--accent);
}
.tool-card h3 { margin-bottom: 0.5rem; }
.tool-card p {
  font-size: 0.9062rem;
  line-height: 1.6;
  color: var(--muted);
  margin-bottom: 1.25rem;
  flex: 1;
}
.tool-card-link {
  font-size: 0.875rem;
  font-weight: 600;
  color: var(--accent-strong);
  transition: gap 0.2s var(--ease);
}
.tool-card:hover .tool-card-link { color: var(--accent); }

.tool-icon {
  display: grid;
  place-items: center;
  width: 2.875rem;
  height: 2.875rem;
  margin-bottom: 1.125rem;
  border-radius: var(--radius);
  font-size: 1.375rem;
  background: var(--surface-2);
  border: 1px solid var(--line);
}
.tool-icon-teal  { background: var(--accent-wash); border-color: color-mix(in srgb, var(--accent) 22%, transparent); }
.tool-icon-green { background: var(--pos-wash);    border-color: color-mix(in srgb, var(--pos) 22%, transparent); }
.tool-icon-amber { background: var(--warn-wash);   border-color: color-mix(in srgb, var(--warn) 24%, transparent); }
.tool-icon-navy  { background: var(--surface-2);   border-color: var(--line-strong); }

/* ── How it works ───────────────────────────────────────────────── */
.how-section { padding: clamp(3.5rem, 8vw, 6rem) 0; background: var(--surface-2); border-block: 1px solid var(--line); }
.how-section h2 { text-align: center; margin-bottom: 0.75rem; }
.how-section .subtitle { text-align: center; margin-bottom: 3rem; }

.steps-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(15rem, 1fr)); gap: 2rem; }
.step { text-align: center; }
.step h3 { margin-bottom: 0.5rem; }
.step p { font-size: 0.9062rem; line-height: 1.62; color: var(--muted); }
.step-number {
  display: grid;
  place-items: center;
  width: 2.75rem;
  height: 2.75rem;
  margin: 0 auto 1.125rem;
  border-radius: 50%;
  background: var(--surface);
  border: 1px solid var(--line-strong);
  font-family: var(--font-display);
  font-size: 1.1875rem;
  font-weight: 600;
  color: var(--accent-strong);
  box-shadow: var(--shadow-xs);
}

/* ── Email capture ──────────────────────────────────────────────── */
.email-section { padding: clamp(3.5rem, 8vw, 6rem) 0; }
.email-box {
  max-width: 40rem;
  margin-inline: auto;
  padding: clamp(2rem, 5vw, 3rem);
  text-align: center;
  background: var(--shell);
  border-radius: var(--radius-xl);
  color: var(--shell-ink);
  box-shadow: var(--shadow-lg);
  position: relative;
  overflow: hidden;
}
.email-box::before {
  content: '';
  position: absolute;
  inset: auto -20% -60% auto;
  width: 34rem; aspect-ratio: 1;
  background: radial-gradient(circle, var(--accent-glow) 0%, transparent 65%);
  pointer-events: none;
}
.email-box h2 { color: var(--shell-ink); margin-bottom: 0.75rem; position: relative; }
.email-box p { color: var(--shell-mute); margin-bottom: 1.75rem; position: relative; }
.email-form { display: flex; gap: 0.625rem; flex-wrap: wrap; justify-content: center; position: relative; }
.email-form input {
  flex: 1;
  min-width: 15rem;
  background: rgba(255,255,255,0.07);
  border-color: var(--shell-line);
  color: var(--shell-ink);
}
.email-form input::placeholder { color: var(--shell-mute); }
.email-form input:hover { border-color: rgba(255,255,255,0.28); }
.email-disclaimer { font-size: 0.75rem; color: var(--shell-mute); margin-top: 1rem; position: relative; }

/* ── Debt rows ──────────────────────────────────────────────────── */
.debt-item {
  padding: 1.125rem;
  margin-bottom: 0.875rem;
  background: var(--surface-2);
  border: 1px solid var(--line);
  border-radius: var(--radius);
}
.debt-item-header { display: flex; align-items: center; justify-content: space-between; gap: 0.75rem; margin-bottom: 0.875rem; }
.debt-item-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 0.75rem; }
@media (max-width: 520px) { .debt-item-grid { grid-template-columns: 1fr; } }

/* ── Method comparison ──────────────────────────────────────────── */
.comparison { display: grid; grid-template-columns: repeat(auto-fit, minmax(13.5rem, 1fr)); gap: 1rem; }
.method-card {
  position: relative;
  padding: 1.25rem;
  background: var(--surface);
  border: 1.5px solid var(--line);
  border-radius: var(--radius);
  transition: border-color 0.22s var(--ease), box-shadow 0.22s var(--ease);
}
.method-card.winner {
  border-color: var(--accent);
  box-shadow: 0 0 0 3.5px var(--accent-glow);
}
.method-card h4 { display: flex; align-items: center; gap: 0.5rem; margin-bottom: 0.875rem; }
.method-card .icon { font-size: 1.125rem; }
.method-stat { display: flex; align-items: baseline; justify-content: space-between; gap: 0.75rem; padding: 0.4375rem 0; font-size: 0.875rem; }
.method-stat .label { color: var(--muted); margin: 0; text-transform: none; letter-spacing: 0; font-size: 0.8125rem; font-weight: 400; }
.method-stat .value { font-weight: 650; font-variant-numeric: tabular-nums; color: var(--ink); }
.winner-badge {
  position: absolute;
  top: -0.6875rem;
  right: 0.875rem;
  padding: 0.1875rem 0.625rem;
  border-radius: 999px;
  background: var(--btn-bg);
  color: var(--btn-ink);
  font-size: 0.6875rem;
  font-weight: 700;
  letter-spacing: 0.02em;
  box-shadow: var(--shadow-xs);
}

/* ── Simulator timeline ─────────────────────────────────────────── */
.sim-timeline { display: grid; grid-template-columns: repeat(auto-fit, minmax(9rem, 1fr)); gap: 0.875rem; }
.timeline-card {
  padding: 1.125rem 0.875rem;
  text-align: center;
  background: var(--surface-2);
  border: 1px solid var(--line);
  border-radius: var(--radius);
}
.timeline-year { font-size: 0.6875rem; font-weight: 650; text-transform: uppercase; letter-spacing: 0.085em; color: var(--muted); margin-bottom: 0.4375rem; }
.timeline-amount {
  font-family: var(--font-display);
  font-size: 1.375rem;
  font-weight: 600;
  letter-spacing: -0.02em;
  font-variant-numeric: tabular-nums;
  color: var(--accent-strong);
}
.timeline-saved { font-size: 0.75rem; color: var(--muted); margin-top: 0.25rem; }

/* ── Footer ─────────────────────────────────────────────────────── */
.footer {
  padding: 3rem 0 2.5rem;
  background: var(--shell);
  color: var(--shell-mute);
  border-top: 1px solid var(--shell-line);
}
.footer-inner { display: flex; flex-direction: column; align-items: center; gap: 1.25rem; text-align: center; }
.footer-logo {
  font-family: var(--font-display);
  font-size: 1.1875rem;
  font-weight: 600;
  letter-spacing: -0.024em;
  color: var(--shell-ink);
  text-decoration: none;
}
.footer-logo span { color: var(--accent); }
.footer-links { display: flex; flex-wrap: wrap; justify-content: center; gap: 0.5rem 1.5rem; }
.footer-links a { font-size: 0.875rem; color: var(--shell-mute); text-decoration: none; }
.footer-links a:hover { color: var(--shell-ink); }
.footer-copy { font-size: 0.78125rem; color: color-mix(in srgb, var(--shell-mute) 76%, transparent); }

/* ═══ Shared state (Layer 1) ══════════════════════════════════════ */

input.tsm-prefilled {
  background: var(--accent-wash);
  border-color: color-mix(in srgb, var(--accent) 45%, transparent);
}

.tsm-banner {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  padding: 0.8125rem 1.125rem;
  margin-bottom: 1.5rem;
  background: var(--accent-wash);
  border: 1px solid color-mix(in srgb, var(--accent) 28%, transparent);
  border-radius: var(--radius);
  font-size: 0.875rem;
  line-height: 1.55;
  color: var(--ink);
  animation: tsm-slide-in 0.32s var(--ease);
}
.tsm-banner-share { background: var(--warn-wash); border-color: color-mix(in srgb, var(--warn) 30%, transparent); }
.tsm-banner-icon { color: var(--accent-strong); font-weight: 700; flex-shrink: 0; }
.tsm-banner-share .tsm-banner-icon { color: var(--warn); }
.tsm-banner-text { flex: 1; min-width: 0; }
.tsm-banner-undo {
  flex-shrink: 0;
  padding: 0.3125rem 0.75rem;
  background: var(--surface);
  border: 1px solid color-mix(in srgb, var(--accent) 34%, transparent);
  border-radius: 999px;
  font-size: 0.8125rem;
  font-weight: 600;
  color: var(--accent-strong);
  cursor: pointer;
  transition: background 0.16s var(--ease), border-color 0.16s var(--ease);
}
.tsm-banner-undo:hover { background: var(--accent-wash); border-color: var(--accent); }
.tsm-banner-close {
  flex-shrink: 0;
  background: none;
  border: none;
  padding: 0 0.25rem;
  font-size: 1.25rem;
  line-height: 1;
  color: var(--muted);
  cursor: pointer;
}
.tsm-banner-close:hover { color: var(--ink); }

@keyframes tsm-slide-in {
  from { opacity: 0; transform: translateY(-7px); }
  to   { opacity: 1; transform: none; }
}

/* ── Privacy control ───────────────────────────────────────────── */
.tsm-privacy {
  position: fixed;
  bottom: 1.125rem;
  left: 1.125rem;
  z-index: 200;
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 0.5rem;
  max-width: calc(100vw - 2.25rem);
}

.tsm-privacy-pill {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.5rem 0.9375rem;
  background: color-mix(in srgb, var(--surface) 88%, transparent);
  backdrop-filter: saturate(180%) blur(12px);
  -webkit-backdrop-filter: saturate(180%) blur(12px);
  border: 1px solid var(--line-strong);
  border-radius: 999px;
  box-shadow: var(--shadow);
  font-size: 0.8125rem;
  font-weight: 550;
  color: var(--muted);
  cursor: pointer;
  transition: border-color 0.18s var(--ease), color 0.18s var(--ease),
              box-shadow 0.18s var(--ease), transform 0.18s var(--ease);
}
.tsm-privacy-pill:hover {
  color: var(--ink);
  border-color: var(--accent);
  transform: translateY(-1px);
  box-shadow: var(--shadow-md);
}
.tsm-privacy-dot { width: 7px; height: 7px; border-radius: 50%; background: var(--line-strong); flex-shrink: 0; }
.tsm-privacy.has-data .tsm-privacy-dot {
  background: var(--pos);
  box-shadow: 0 0 0 3px color-mix(in srgb, var(--pos) 22%, transparent);
}
.tsm-privacy.has-data .tsm-privacy-pill { color: var(--ink); }

.tsm-privacy-panel {
  width: min(23rem, calc(100vw - 2.25rem));
  max-height: min(34rem, calc(100vh - 6rem));
  overflow-y: auto;
  padding: 1.25rem;
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-lg);
  animation: tsm-slide-up 0.2s var(--ease);
}
.tsm-privacy-panel[hidden] { display: none; }
@keyframes tsm-slide-up {
  from { opacity: 0; transform: translateY(8px) scale(0.985); }
  to   { opacity: 1; transform: none; }
}

.tsm-privacy-head { display: flex; align-items: baseline; justify-content: space-between; gap: 0.625rem; margin-bottom: 0.5625rem; }
.tsm-privacy-head strong { font-size: 0.9062rem; color: var(--ink); line-height: 1.35; }
.tsm-privacy-bytes {
  flex-shrink: 0;
  padding: 0.125rem 0.5rem;
  border-radius: 999px;
  background: var(--pos-wash);
  border: 1px solid color-mix(in srgb, var(--pos) 24%, transparent);
  font-size: 0.6875rem;
  font-weight: 650;
  color: var(--pos);
  white-space: nowrap;
  font-variant-numeric: tabular-nums;
}
.tsm-privacy-copy { font-size: 0.8125rem; line-height: 1.55; color: var(--muted); margin-bottom: 0.9375rem; }

.tsm-privacy-modes { display: flex; flex-direction: column; gap: 0.4375rem; margin-bottom: 0.875rem; }
.tsm-privacy-mode {
  display: flex;
  align-items: flex-start;
  gap: 0.5625rem;
  padding: 0.5625rem 0.6875rem;
  margin: 0;
  border: 1px solid var(--line);
  border-radius: var(--radius-sm);
  cursor: pointer;
  text-transform: none;
  letter-spacing: 0;
  transition: border-color 0.16s var(--ease), background 0.16s var(--ease);
}
.tsm-privacy-mode:hover { border-color: var(--accent); }
.tsm-privacy-mode.active { border-color: var(--accent); background: var(--accent-wash); }
.tsm-privacy-mode input { margin-top: 0.1875rem; accent-color: var(--accent-strong); }
.tsm-privacy-mode-label { display: block; font-size: 0.8125rem; font-weight: 650; color: var(--ink); text-transform: none; letter-spacing: 0; }
.tsm-privacy-mode-hint { display: block; font-size: 0.75rem; font-weight: 400; color: var(--muted); line-height: 1.45; text-transform: none; letter-spacing: 0; }

.tsm-privacy-expiry { font-size: 0.75rem; color: var(--muted); margin-bottom: 0.875rem; font-variant-numeric: tabular-nums; }

.tsm-privacy-clear {
  width: 100%;
  padding: 0.5625rem;
  background: var(--neg-wash);
  border: 1px solid color-mix(in srgb, var(--neg) 24%, transparent);
  border-radius: var(--radius-sm);
  font-size: 0.8125rem;
  font-weight: 650;
  color: var(--neg);
  cursor: pointer;
  transition: background 0.16s var(--ease);
}
.tsm-privacy-clear:hover:not(:disabled) { background: color-mix(in srgb, var(--neg) 12%, var(--neg-wash)); }
.tsm-privacy-clear:disabled { opacity: 0.45; cursor: default; }

.tsm-privacy-proof {
  font-size: 0.6875rem;
  line-height: 1.5;
  color: var(--muted);
  margin-top: 0.875rem;
  padding-top: 0.875rem;
  border-top: 1px solid var(--line);
}

/* ── Share (Layer 3) ───────────────────────────────────────────── */
.tsm-share { margin-top: 0.875rem; padding-top: 0.875rem; border-top: 1px solid var(--line); }
.tsm-share-btn {
  width: 100%;
  padding: 0.5625rem;
  background: var(--surface);
  border: 1px solid var(--line-strong);
  border-radius: var(--radius-sm);
  font-size: 0.8125rem;
  font-weight: 650;
  color: var(--ink);
  cursor: pointer;
  transition: border-color 0.16s var(--ease), background 0.16s var(--ease);
}
.tsm-share-btn:hover:not(:disabled) { border-color: var(--accent); background: var(--accent-wash); }
.tsm-share-btn:disabled { opacity: 0.6; cursor: default; }
.tsm-share-out[hidden] { display: none; }
.tsm-share-note { font-size: 0.71875rem; line-height: 1.5; color: var(--muted); margin: 0.625rem 0 0.4375rem; }
.tsm-share-field {
  width: 100%;
  padding: 0.4375rem 0.5625rem;
  font-size: 0.6875rem;
  font-family: ui-monospace, 'SF Mono', Menlo, monospace;
  background: var(--surface-2);
  border: 1px solid var(--line);
  border-radius: var(--radius-xs);
  color: var(--muted);
}

/* ── Cross-tool summary strip ──────────────────────────────────── */
.tsm-summary {
  display: flex;
  flex-wrap: wrap;
  gap: 0.625rem 1.75rem;
  padding: 0.875rem 1.25rem;
  margin-bottom: 1.5rem;
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  box-shadow: var(--shadow-xs);
}
.tsm-summary[hidden] { display: none; }
.tsm-summary-item { display: flex; align-items: baseline; gap: 0.4375rem; font-size: 0.8125rem; }
.tsm-summary-label { color: var(--muted); }
.tsm-summary-value { font-weight: 700; color: var(--ink); font-variant-numeric: tabular-nums; }
.tsm-summary-value.positive { color: var(--pos); }
.tsm-summary-value.negative { color: var(--neg); }

/* ═══ Resilience engine (Layer 2) ═════════════════════════════════ */

.runway-muted { font-size: 0.875rem; line-height: 1.6; color: var(--muted); }

.runway-headline {
  position: relative;
  overflow: hidden;
  border-color: var(--line-strong);
  box-shadow: var(--shadow);
}
.runway-headline::before {
  content: '';
  position: absolute;
  inset: 0 0 auto 0;
  height: 3px;
  background: linear-gradient(90deg, var(--accent), color-mix(in srgb, var(--accent) 40%, var(--warn)));
}
.runway-big {
  font-family: var(--font-display);
  font-size: clamp(2.75rem, 1.8rem + 4.2vw, 4.25rem);
  font-weight: 600;
  line-height: 1.02;
  letter-spacing: -0.035em;
  margin: 0.5rem 0 0.875rem;
  font-variant-numeric: tabular-nums;
  color: var(--ink);
}
.runway-big.positive { color: var(--pos); }
.runway-big.caution  { color: var(--warn); }
.runway-big.negative { color: var(--neg); }
.runway-sub {
  font-size: 0.9375rem;
  line-height: 1.62;
  color: var(--muted);
  margin: 1rem auto 0;
  max-width: 32rem;
}

/* ── Cascade ───────────────────────────────────────────────────── */
.timeline-row {
  display: grid;
  grid-template-columns: 4.75rem 1.75rem 1fr;
  align-items: start;
  gap: 0.625rem;
  padding: 0.75rem 0;
}
.timeline-row + .timeline-row { border-top: 1px solid var(--line); }
.timeline-first-break {
  background: var(--neg-wash);
  margin: 0 -0.75rem;
  padding: 0.875rem 0.75rem;
  border-radius: var(--radius-sm);
  border-top-color: transparent !important;
}
.timeline-when {
  font-size: 0.75rem;
  font-weight: 650;
  color: var(--muted);
  font-variant-numeric: tabular-nums;
  padding-top: 0.25rem;
  white-space: nowrap;
}
.timeline-marker {
  display: grid;
  place-items: center;
  width: 1.4375rem;
  height: 1.4375rem;
  border-radius: 50%;
  background: var(--dot, var(--ink));
  color: #fff;
  font-size: 0.6875rem;
  font-weight: 700;
  line-height: 1;
  flex-shrink: 0;
  box-shadow: 0 0 0 3px color-mix(in srgb, var(--dot, var(--ink)) 14%, transparent);
}
.timeline-title {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 0.5rem;
  font-size: 0.9375rem;
  font-weight: 650;
  color: var(--ink);
  margin-bottom: 0.25rem;
  letter-spacing: -0.008em;
}
.timeline-detail { font-size: 0.8125rem; line-height: 1.58; color: var(--muted); }
.timeline-flag {
  padding: 0.125rem 0.5rem;
  border-radius: 999px;
  background: var(--neg);
  color: #fff;
  font-size: 0.625rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  white-space: nowrap;
}

/* ── Leverage ranking ──────────────────────────────────────────── */
.leverage-row {
  display: grid;
  grid-template-columns: 1.75rem 1fr auto;
  align-items: start;
  gap: 0.875rem;
  padding: 0.8125rem 0;
}
.leverage-row + .leverage-row { border-top: 1px solid var(--line); }
.leverage-best {
  background: var(--accent-wash);
  margin: 0 -0.75rem;
  padding: 1rem 0.75rem;
  border-radius: var(--radius-sm);
  border-top-color: transparent !important;
}
.leverage-rank {
  display: grid;
  place-items: center;
  width: 1.75rem;
  height: 1.75rem;
  border-radius: 50%;
  background: var(--surface-2);
  border: 1px solid var(--line);
  color: var(--muted);
  font-size: 0.75rem;
  font-weight: 700;
  flex-shrink: 0;
}
.leverage-best .leverage-rank { background: var(--btn-bg); border-color: var(--btn-bg); color: var(--btn-ink); }
.leverage-body { min-width: 0; }
.leverage-label { font-size: 0.9375rem; font-weight: 650; color: var(--ink); letter-spacing: -0.008em; }
.leverage-meta { font-size: 0.75rem; line-height: 1.5; color: var(--muted); margin-top: 0.25rem; }
.leverage-gain {
  font-family: var(--font-display);
  font-size: 1.1875rem;
  font-weight: 600;
  letter-spacing: -0.02em;
  color: var(--accent-strong);
  font-variant-numeric: tabular-nums;
  white-space: nowrap;
}
.leverage-bar { height: 4px; margin-top: 0.5625rem; background: var(--surface-3); border-radius: 999px; overflow: hidden; }
.leverage-best .leverage-bar { background: color-mix(in srgb, var(--accent) 22%, transparent); }
.leverage-fill { height: 100%; background: var(--accent); border-radius: 999px; transition: width 0.45s var(--ease); }

/* ── Responsive ────────────────────────────────────────────────── */
@media (max-width: 640px) {
  .tsm-privacy { bottom: 0.875rem; left: 0.875rem; }
  .tsm-privacy-pill { font-size: 0.75rem; padding: 0.4375rem 0.75rem; }
  .timeline-row { grid-template-columns: 3.875rem 1.5rem 1fr; gap: 0.5rem; }
  .leverage-row { grid-template-columns: 1.625rem 1fr; }
  .leverage-gain { grid-column: 2; padding-top: 0.3125rem; }
  .hero-actions .btn { width: 100%; }
}

@media print {
  .tsm-privacy, .tsm-banner, .navbar, .footer { display: none !important; }
  .card { box-shadow: none; break-inside: avoid; }
}

/* A share control mounted outside the privacy panel stands on its own */
[data-tsm-share] .tsm-share {
  max-width: 22rem;
  margin: 1.5rem auto 0;
  padding-top: 0;
  border-top: none;
}
[data-tsm-share] .tsm-share-note { text-align: left; }

/* ── Theme toggle ──────────────────────────────────────────────── */
.theme-toggle {
  display: grid;
  place-items: center;
  width: 2.125rem;
  height: 2.125rem;
  margin-left: 0.25rem;
  padding: 0;
  background: rgba(255, 255, 255, 0.07);
  border: 1px solid var(--shell-line);
  border-radius: 50%;
  color: var(--shell-mute);
  cursor: pointer;
  flex-shrink: 0;
  transition: color 0.18s var(--ease), background 0.18s var(--ease), transform 0.18s var(--ease);
}
.theme-toggle:hover { color: var(--shell-ink); background: rgba(255, 255, 255, 0.13); transform: translateY(-1px); }
.theme-toggle svg { width: 1rem; height: 1rem; }
/* Each glyph shows only in the theme it offers to switch away from. */
.theme-toggle .icon-sun { display: none; }
:root[data-theme="dark"] .theme-toggle .icon-sun { display: block; }
:root[data-theme="dark"] .theme-toggle .icon-moon { display: none; }
@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) .theme-toggle .icon-sun { display: block; }
  :root:not([data-theme="light"]) .theme-toggle .icon-moon { display: none; }
}
.navbar .container > .nav-toggle { margin-left: 0.5rem; }
@media (max-width: 960px) {
  .navbar .container { gap: 0.75rem; }
  .theme-toggle { margin-left: auto; }
}

/* ═══ Feedback widget ═════════════════════════════════════════════
   Injected by js/feedback.js on every page. Its markup is fixed, so
   these selectors match what that file emits.
   ═══════════════════════════════════════════════════════════════════ */

textarea {
  width: 100%;
  padding: 0.6875rem 0.875rem;
  background: var(--surface);
  border: 1px solid var(--line-strong);
  border-radius: var(--radius-sm);
  font-family: inherit;
  font-size: 0.9375rem;
  line-height: 1.55;
  color: var(--ink);
  resize: vertical;
  min-height: 5.5rem;
  transition: border-color 0.16s var(--ease), box-shadow 0.16s var(--ease);
}
textarea::placeholder { color: color-mix(in srgb, var(--muted) 72%, transparent); }
textarea:hover { border-color: var(--muted); }
textarea:focus {
  outline: none;
  border-color: var(--accent);
  box-shadow: 0 0 0 3.5px var(--accent-glow);
}
textarea.error {
  border-color: var(--neg);
  box-shadow: 0 0 0 3.5px color-mix(in srgb, var(--neg) 16%, transparent);
}

.btn-block { display: flex; width: 100%; }

/* ── Launcher ──────────────────────────────────────────────────── */
.feedback-btn {
  position: fixed;
  right: 1.125rem;
  bottom: 1.125rem;
  z-index: 200;
  display: inline-flex;
  align-items: center;
  gap: 0.4375rem;
  padding: 0.5625rem 1rem;
  background: color-mix(in srgb, var(--surface) 88%, transparent);
  backdrop-filter: saturate(180%) blur(12px);
  -webkit-backdrop-filter: saturate(180%) blur(12px);
  border: 1px solid var(--line-strong);
  border-radius: 999px;
  box-shadow: var(--shadow);
  font-size: 0.8125rem;
  font-weight: 600;
  color: var(--ink);
  cursor: pointer;
  transition: transform 0.18s var(--ease), box-shadow 0.18s var(--ease),
              border-color 0.18s var(--ease);
}
.feedback-btn:hover {
  transform: translateY(-1.5px);
  border-color: var(--accent);
  box-shadow: var(--shadow-md);
}
.feedback-btn svg { color: var(--accent); flex-shrink: 0; }

/* ── Overlay + modal ───────────────────────────────────────────── */
.feedback-overlay {
  position: fixed;
  inset: 0;
  z-index: 300;
  display: grid;
  place-items: center;
  padding: 1.25rem;
  background: color-mix(in srgb, var(--shell) 62%, transparent);
  backdrop-filter: blur(5px);
  -webkit-backdrop-filter: blur(5px);
  animation: feedback-fade 0.2s var(--ease);
}
@keyframes feedback-fade { from { opacity: 0; } to { opacity: 1; } }

.feedback-modal {
  width: min(29rem, 100%);
  max-height: calc(100vh - 2.5rem);
  overflow-y: auto;
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-lg);
  animation: feedback-rise 0.24s var(--ease);
}
@keyframes feedback-rise {
  from { opacity: 0; transform: translateY(12px) scale(0.98); }
  to   { opacity: 1; transform: none; }
}

.feedback-modal-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.875rem;
  padding: 1.125rem 1.5rem;
  border-bottom: 1px solid var(--line);
}
.feedback-modal-header h3 { font-size: 1.125rem; margin: 0; }

.feedback-close-btn {
  display: grid;
  place-items: center;
  width: 1.875rem;
  height: 1.875rem;
  flex-shrink: 0;
  background: none;
  border: none;
  border-radius: 50%;
  font-size: 1.5rem;
  line-height: 1;
  color: var(--muted);
  cursor: pointer;
  transition: background 0.16s var(--ease), color 0.16s var(--ease);
}
.feedback-close-btn:hover { background: var(--surface-2); color: var(--ink); }

.feedback-modal-body { padding: 1.5rem; }

/* ── Type toggle ───────────────────────────────────────────────── */
.feedback-type-toggle {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 0.375rem;
  padding: 0.25rem;
  margin-bottom: 1.25rem;
  background: var(--surface-2);
  border: 1px solid var(--line);
  border-radius: 999px;
}
.feedback-type-btn {
  padding: 0.4375rem 0.625rem;
  background: none;
  border: none;
  border-radius: 999px;
  font-size: 0.8125rem;
  font-weight: 600;
  color: var(--muted);
  cursor: pointer;
  transition: background 0.16s var(--ease), color 0.16s var(--ease), box-shadow 0.16s var(--ease);
}
.feedback-type-btn:hover { color: var(--ink); }
.feedback-type-btn.active {
  background: var(--surface);
  color: var(--ink);
  box-shadow: var(--shadow-xs);
}

.feedback-privacy-note {
  margin-top: 0.875rem;
  font-size: 0.71875rem;
  line-height: 1.5;
  text-align: center;
  color: var(--muted);
}

/* ── Success ───────────────────────────────────────────────────── */
.feedback-success { padding: 2.5rem 1.5rem; }
.feedback-success-inner { text-align: center; }
.feedback-success-emoji { font-size: 2.5rem; line-height: 1; margin-bottom: 0.875rem; }
.feedback-success h3 { margin-bottom: 0.5rem; }
.feedback-success p { font-size: 0.9375rem; line-height: 1.6; color: var(--muted); }

/* ── Responsive ────────────────────────────────────────────────── */
@media (max-width: 640px) {
  .feedback-btn { right: 0.875rem; bottom: 0.875rem; padding: 0.5rem 0.875rem; font-size: 0.75rem; }
  .feedback-modal-header, .feedback-modal-body { padding: 1.125rem; }
}
/* Below this the launcher and the privacy pill would collide */
@media (max-width: 420px) {
  .feedback-btn span, .feedback-btn { font-size: 0; gap: 0; padding: 0.625rem; }
  .feedback-btn svg { width: 18px; height: 18px; }
}

@media print { .feedback-btn, .feedback-overlay { display: none !important; } }

/* Analytics disclosure inside the privacy panel */
.tsm-privacy-note {
  margin-top: 0.875rem;
  padding: 0.625rem 0.75rem;
  background: var(--surface-2);
  border: 1px solid var(--line);
  border-radius: var(--radius-sm);
  font-size: 0.71875rem;
  line-height: 1.5;
  color: var(--muted);
}

/* ── Import / export ───────────────────────────────────────────── */
.tsm-transfer {
  padding: 0.75rem 1.125rem;
  margin-bottom: 1.5rem;
  background: var(--surface);
  border: 1px dashed var(--line-strong);
  border-radius: var(--radius);
  font-size: 0.84375rem;
  line-height: 1.55;
}
.tsm-transfer.compact { padding: 0; margin: 0; background: none; border: none; }
.tsm-transfer-row { display: flex; align-items: center; gap: 0.75rem 1rem; flex-wrap: wrap; }
.tsm-transfer-text { flex: 1 1 18rem; min-width: 0; color: var(--muted); }
.tsm-transfer-text strong { color: var(--ink); }
.tsm-transfer-actions { display: flex; gap: 0.5rem; flex-wrap: wrap; }
.tsm-transfer.compact .tsm-transfer-row,
.tsm-transfer.compact .tsm-transfer-actions { width: 100%; }
.tsm-transfer.compact .tsm-transfer-actions > .tsm-transfer-btn { flex: 1; }
.tsm-transfer-btn {
  padding: 0.4375rem 0.875rem;
  background: var(--surface);
  border: 1px solid var(--line-strong);
  border-radius: 999px;
  font-size: 0.8125rem;
  font-weight: 600;
  color: var(--ink);
  cursor: pointer;
  white-space: nowrap;
  transition: border-color 0.16s var(--ease), background 0.16s var(--ease);
}
.tsm-transfer-btn:hover { border-color: var(--accent); background: var(--accent-wash); }
.tsm-transfer-btn.primary { border-color: color-mix(in srgb, var(--accent) 40%, transparent); color: var(--accent-strong); }
.tsm-transfer-file { display: none; }
.tsm-transfer-out:empty { display: none; }
.tsm-transfer-out { margin-top: 0.75rem; }
.tsm-transfer-msg { font-size: 0.8125rem; line-height: 1.5; color: var(--ink); margin: 0 0 0.5rem; }
.tsm-transfer-msg.muted { color: var(--muted); }
.tsm-transfer-msg.warn { color: var(--warn); }
.tsm-transfer-msg.error { color: var(--neg); }

/* ═══ v3 · Tool page polish ═══════════════════════════════════════ */
/* Tool pages get a soft tinted band behind the header so they share the
   home page's colour without repeating its hero. */
.tool-page { position: relative; isolation: isolate; }
.tool-page::before {
  content: '';
  position: absolute;
  inset: 0 0 auto 0;
  height: 22rem;
  z-index: -1;
  pointer-events: none;
  background:
    radial-gradient(34rem 18rem at 92% 0%, color-mix(in srgb, var(--accent) 16%, transparent), transparent 70%),
    radial-gradient(28rem 16rem at 60% 0%, color-mix(in srgb, var(--sky) 10%, transparent), transparent 70%);
}
.tool-header h1 { font-weight: 800; letter-spacing: -0.035em; }
.card-header { background: var(--surface); }
.card { box-shadow: var(--shadow-sm); }

/* ═══ v3 · Home ════════════════════════════════════════════════════ */
.eyebrow {
  display: inline-block;
  font-size: 0.75rem;
  font-weight: 700;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--accent-strong);
  margin-bottom: 0.75rem;
}
.section-head { text-align: center; max-width: 44rem; margin: 0 auto 2.75rem; }
.section-head h2 { margin-bottom: 0.75rem; }
.section-head p { color: var(--muted); font-size: 1.0625rem; line-height: 1.65; }

.hero-grid {
  display: grid;
  grid-template-columns: minmax(0, 1.05fr) minmax(0, 0.95fr);
  gap: clamp(2rem, 5vw, 4rem);
  align-items: center;
}
@media (max-width: 920px) { .hero-grid { grid-template-columns: 1fr; } }

.hero-trust {
  display: flex; flex-wrap: wrap; gap: 0.5rem 1.25rem;
  margin-top: 1.75rem;
  font-size: 0.84rem; font-weight: 550; color: var(--ink-soft);
}
.hero-trust span { display: inline-flex; align-items: center; gap: 0.4rem; }
.hero-trust svg { width: 16px; height: 16px; color: var(--accent-strong); }

/* The example result card — shows the payoff before asking for anything */
.preview-card {
  position: relative;
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--radius-xl);
  box-shadow: var(--shadow-lg);
  padding: 1.5rem;
}
.preview-card::after {
  content: 'Example';
  position: absolute; top: 1.1rem; right: 1.2rem;
  font-size: 0.68rem; font-weight: 700; letter-spacing: 0.08em; text-transform: uppercase;
  color: var(--muted); background: var(--surface-2); padding: 0.2rem 0.55rem; border-radius: 999px;
}
.preview-top { display: flex; align-items: center; gap: 1.25rem; margin-bottom: 1.25rem; }
.score-ring {
  --p: 68;
  --ring: var(--accent);
  position: relative;
  width: 6.5rem; height: 6.5rem; flex-shrink: 0;
  border-radius: 50%;
  background: conic-gradient(var(--ring) calc(var(--p) * 1%), var(--surface-3) 0);
  display: grid; place-items: center;
}
.score-ring::before {
  content: ''; position: absolute; inset: 9px; border-radius: 50%; background: var(--surface);
}
.score-ring b {
  position: relative;
  font-family: var(--font-display); font-size: 1.9rem; font-weight: 800; letter-spacing: -0.04em;
  font-variant-numeric: tabular-nums; line-height: 1;
}
.score-ring small { position: relative; display: block; font-size: 0.65rem; color: var(--muted); text-align: center; font-weight: 600; }
.preview-title { font-family: var(--font-display); font-size: 1.25rem; font-weight: 750; letter-spacing: -0.02em; }
.preview-sub { font-size: 0.875rem; color: var(--muted); line-height: 1.5; margin-top: 0.25rem; }

.vitals { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 0.625rem; }
@media (max-width: 460px) { .vitals { grid-template-columns: 1fr; } }
.vital {
  --tone: var(--accent); --tone-wash: var(--accent-wash);
  padding: 0.85rem 0.95rem;
  border-radius: var(--radius);
  background: var(--tone-wash);
  border: 1px solid color-mix(in srgb, var(--tone) 22%, transparent);
}
.vital-label { font-size: 0.72rem; font-weight: 650; color: var(--ink-soft); display: flex; align-items: center; gap: 0.4rem; }
.vital-label::before { content: ''; width: 8px; height: 8px; border-radius: 50%; background: var(--tone); }
.vital-value { font-family: var(--font-display); font-size: 1.4rem; font-weight: 800; letter-spacing: -0.03em; font-variant-numeric: tabular-nums; margin-top: 0.2rem; }
.vital-note { font-size: 0.76rem; color: var(--muted); line-height: 1.45; margin-top: 0.1rem; }
.tone-good { --tone: var(--pos);  --tone-wash: var(--pos-wash); }
.tone-ok   { --tone: var(--sun);  --tone-wash: var(--sun-wash); }
.tone-bad  { --tone: var(--coral); --tone-wash: var(--coral-wash); }
.tone-none { --tone: var(--muted); --tone-wash: var(--surface-2); }
.preview-next {
  display: flex; align-items: center; gap: 0.75rem;
  margin-top: 1rem; padding: 0.85rem 1rem;
  border-radius: var(--radius); background: var(--shell); color: var(--shell-ink);
  font-size: 0.875rem; line-height: 1.45;
}
.preview-next b { color: var(--accent); }

/* Question cards — the site's front door is the questions, not the tools */
.questions-section { padding: clamp(3.5rem, 8vw, 6rem) 0; }
.q-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 1rem; }
@media (max-width: 1000px) { .q-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
@media (max-width: 620px)  { .q-grid { grid-template-columns: 1fr; } }
.q-card {
  --tone: var(--accent); --tone-wash: var(--accent-wash);
  position: relative;
  display: flex; flex-direction: column;
  padding: 1.5rem;
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-xs);
  text-decoration: none; color: inherit;
  overflow: hidden;
  transition: transform 0.22s var(--ease), box-shadow 0.22s var(--ease), border-color 0.22s var(--ease);
}
.q-card::before {
  content: ''; position: absolute; inset: 0 0 auto 0; height: 4px; background: var(--tone);
  transform: scaleX(0.18); transform-origin: left; transition: transform 0.35s var(--ease);
}
.q-card:hover { color: inherit; transform: translateY(-3px); box-shadow: var(--shadow-md); border-color: color-mix(in srgb, var(--tone) 40%, var(--line)); }
.q-card:hover::before { transform: scaleX(1); }
.q-icon {
  display: grid; place-items: center;
  width: 2.75rem; height: 2.75rem; margin-bottom: 1rem;
  border-radius: 13px; background: var(--tone-wash); color: var(--tone);
}
.q-icon svg { width: 22px; height: 22px; }
.q-card h3 { font-size: 1.15rem; line-height: 1.25; margin-bottom: 0.5rem; }
.q-card p { font-size: 0.9rem; line-height: 1.6; color: var(--muted); flex: 1; margin-bottom: 1.1rem; }
.q-meta { display: flex; align-items: center; justify-content: space-between; gap: 0.5rem; font-size: 0.8rem; }
.q-tool { font-weight: 650; color: var(--ink-soft); }
.q-time { color: var(--muted); }
.q-card.featured { background: linear-gradient(160deg, var(--tone-wash), var(--surface) 65%); border-color: color-mix(in srgb, var(--tone) 35%, var(--line)); }
.q-card.featured .q-tag {
  position: absolute; top: 1.1rem; right: 1.1rem;
  font-size: 0.68rem; font-weight: 700; letter-spacing: 0.06em; text-transform: uppercase;
  color: var(--btn-ink); background: var(--btn-bg); padding: 0.2rem 0.6rem; border-radius: 999px;
}
.t-green  { --tone: var(--accent);  --tone-wash: var(--accent-wash); }
.t-violet { --tone: var(--violet);  --tone-wash: var(--violet-wash); }
.t-sun    { --tone: var(--sun);     --tone-wash: var(--sun-wash); }
.t-sky    { --tone: var(--sky);     --tone-wash: var(--sky-wash); }
.t-coral  { --tone: var(--coral);   --tone-wash: var(--coral-wash); }

/* Welcome back — only rendered when this browser already holds figures */
.welcome {
  margin-top: clamp(-2rem, -3vw, -1rem);
  margin-bottom: 0.5rem;
}
.welcome-box {
  display: grid; grid-template-columns: minmax(0, 1fr) auto; gap: 1.25rem; align-items: center;
  padding: 1.25rem 1.5rem;
  background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius-lg); box-shadow: var(--shadow);
}
@media (max-width: 720px) { .welcome-box { grid-template-columns: 1fr; } }
.welcome-box h3 { font-size: 1.05rem; margin-bottom: 0.2rem; }
.welcome-box p { font-size: 0.875rem; color: var(--muted); }
.welcome-stats { display: flex; flex-wrap: wrap; gap: 0.5rem 1.5rem; margin-top: 0.75rem; }
.welcome-stats div { font-size: 0.78rem; color: var(--muted); }
.welcome-stats b { display: block; font-family: var(--font-display); font-size: 1.2rem; color: var(--ink); font-variant-numeric: tabular-nums; letter-spacing: -0.02em; }

/* Why-us strip */
.why-section { padding: clamp(3.5rem, 8vw, 6rem) 0; background: var(--shell); color: var(--shell-ink); }
.why-section h2 { color: var(--shell-ink); }
.why-section .section-head p { color: var(--shell-mute); }
.why-section .eyebrow { color: var(--accent); }
.why-grid { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 1rem; }
@media (max-width: 960px) { .why-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
@media (max-width: 540px) { .why-grid { grid-template-columns: 1fr; } }
.why {
  padding: 1.4rem; border-radius: var(--radius-lg);
  background: var(--shell-2); border: 1px solid var(--shell-line);
}
.why h3 { color: var(--shell-ink); font-size: 1.05rem; margin: 0.85rem 0 0.4rem; }
.why p { color: var(--shell-mute); font-size: 0.875rem; line-height: 1.6; }
.why-icon { width: 2.4rem; height: 2.4rem; display: grid; place-items: center; border-radius: 11px; background: rgba(46,224,168,0.12); color: var(--accent); }
.why-icon svg { width: 20px; height: 20px; }

.steps-row { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 1rem; counter-reset: step; }
@media (max-width: 760px) { .steps-row { grid-template-columns: 1fr; } }
.step-card {
  padding: 1.5rem; border-radius: var(--radius-lg); background: var(--surface); border: 1px solid var(--line);
}
.step-card::before {
  counter-increment: step; content: counter(step);
  display: grid; place-items: center; width: 2.25rem; height: 2.25rem; border-radius: 50%;
  background: var(--accent-wash); color: var(--accent-strong);
  font-family: var(--font-display); font-weight: 800; margin-bottom: 0.9rem;
}
.step-card h3 { font-size: 1.05rem; margin-bottom: 0.4rem; }
.step-card p { font-size: 0.9rem; color: var(--muted); line-height: 1.6; }

/* ═══ v3 · Money Checkup ══════════════════════════════════════════ */
.checkup { padding: clamp(2rem, 5vw, 3.5rem) 0 clamp(3rem, 7vw, 5rem); position: relative; isolation: isolate; }
.checkup::before {
  content: ''; position: absolute; inset: 0 0 auto 0; height: 26rem; z-index: -1; pointer-events: none;
  background:
    radial-gradient(34rem 20rem at 85% 0%, color-mix(in srgb, var(--accent) 18%, transparent), transparent 70%),
    radial-gradient(26rem 18rem at 10% 10%, color-mix(in srgb, var(--violet) 12%, transparent), transparent 70%);
}
.checkup-shell { max-width: 46rem; margin-inline: auto; }
.checkup-shell.wide { max-width: 64rem; }
.checkup-progress { display: flex; gap: 0.4rem; margin-bottom: 1.75rem; }
.checkup-progress span { flex: 1; height: 5px; border-radius: 999px; background: var(--surface-3); transition: background 0.3s var(--ease); }
.checkup-progress span.on { background: var(--accent); }
.checkup-step-label { font-size: 0.8rem; font-weight: 650; color: var(--muted); margin-bottom: 0.5rem; }
.checkup h1 { font-size: clamp(1.9rem, 1.3rem + 2.4vw, 2.9rem); margin-bottom: 0.6rem; }
.checkup-lede { color: var(--muted); font-size: 1.05rem; line-height: 1.6; margin-bottom: 1.75rem; }

.goal-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 0.75rem; }
@media (max-width: 560px) { .goal-grid { grid-template-columns: 1fr; } }
.goal {
  display: flex; align-items: center; gap: 0.85rem;
  padding: 1rem 1.1rem; text-align: left;
  background: var(--surface); border: 1.5px solid var(--line); border-radius: var(--radius);
  cursor: pointer; font-weight: 600; font-size: 0.95rem; line-height: 1.35; color: var(--ink);
  transition: border-color 0.18s var(--ease), box-shadow 0.18s var(--ease), transform 0.18s var(--ease);
}
.goal:hover { border-color: color-mix(in srgb, var(--tone) 50%, var(--line)); transform: translateY(-1px); }
.goal[aria-pressed="true"] { border-color: var(--tone); box-shadow: 0 0 0 4px color-mix(in srgb, var(--tone) 18%, transparent); background: color-mix(in srgb, var(--tone-wash) 60%, var(--surface)); }
.goal .q-icon { width: 2.4rem; height: 2.4rem; margin: 0; flex-shrink: 0; }
.goal .q-icon svg { width: 20px; height: 20px; }

.checkup-card { background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius-lg); box-shadow: var(--shadow); padding: clamp(1.25rem, 3vw, 2rem); }
.money-row { display: grid; grid-template-columns: minmax(0, 1fr) 11rem; gap: 1rem; align-items: center; padding: 0.95rem 0; border-bottom: 1px solid var(--line); }
.money-row:last-child { border-bottom: none; }
@media (max-width: 560px) { .money-row { grid-template-columns: 1fr; gap: 0.5rem; } }
.money-row label { text-transform: none; letter-spacing: 0; font-size: 0.975rem; font-weight: 650; color: var(--ink); margin: 0; }
.money-row .field-hint { margin-top: 0.2rem; }
.checkup-actions { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 0.75rem; margin-top: 1.5rem; }

.result-hero { display: grid; grid-template-columns: auto minmax(0, 1fr); gap: 1.75rem; align-items: center; margin-bottom: 1.5rem; }
@media (max-width: 620px) { .result-hero { grid-template-columns: 1fr; justify-items: start; } }
.result-hero .score-ring { width: 8.5rem; height: 8.5rem; }
.result-hero .score-ring b { font-size: 2.6rem; }
.result-vitals { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 0.85rem; margin-bottom: 1.5rem; }
@media (max-width: 640px) { .result-vitals { grid-template-columns: 1fr; } }
.result-vitals .vital { padding: 1.1rem 1.2rem; display: flex; flex-direction: column; }
.result-vitals .vital-value { font-size: 1.75rem; }
.result-vitals .vital-note { font-size: 0.85rem; flex: 1; }
.result-vitals .vital a { margin-top: 0.6rem; font-size: 0.85rem; font-weight: 650; color: var(--ink); text-decoration: none; }
.result-vitals .vital a:hover { text-decoration: underline; }

.next-steps { display: grid; gap: 0.75rem; margin-bottom: 1.5rem; }
.next-step {
  display: grid; grid-template-columns: auto minmax(0, 1fr) auto; gap: 1rem; align-items: center;
  padding: 1.1rem 1.25rem; border-radius: var(--radius); background: var(--surface); border: 1px solid var(--line);
  text-decoration: none; color: inherit; transition: border-color 0.18s var(--ease), transform 0.18s var(--ease);
}
.next-step:hover { color: inherit; border-color: var(--accent); transform: translateY(-1px); }
.next-step.first { background: var(--shell); border-color: var(--shell); color: var(--shell-ink); }
.next-step.first p { color: var(--shell-mute); }
.next-step-num { width: 2rem; height: 2rem; border-radius: 50%; display: grid; place-items: center; background: var(--accent-wash); color: var(--accent-strong); font-weight: 800; font-size: 0.9rem; }
.next-step.first .next-step-num { background: var(--accent); color: #03241A; }
.next-step h4 { font-size: 1rem; margin-bottom: 0.15rem; color: inherit; }
.next-step p { font-size: 0.86rem; color: var(--muted); line-height: 1.5; }
.next-step-go { font-weight: 700; font-size: 0.875rem; white-space: nowrap; }

.save-box {
  display: flex; flex-wrap: wrap; gap: 1rem; align-items: center; justify-content: space-between;
  padding: 1.1rem 1.25rem; border-radius: var(--radius); background: var(--accent-wash);
  border: 1px solid color-mix(in srgb, var(--accent) 28%, transparent);
}
.save-box p { font-size: 0.88rem; color: var(--ink-soft); line-height: 1.5; max-width: 34rem; }
.save-box strong { color: var(--ink); }
.switch { display: inline-flex; align-items: center; gap: 0.6rem; cursor: pointer; text-transform: none; letter-spacing: 0; font-size: 0.9rem; font-weight: 650; color: var(--ink); margin: 0; }
.switch input { appearance: none; -webkit-appearance: none; width: 2.75rem; height: 1.6rem; border-radius: 999px; background: var(--line-strong); position: relative; cursor: pointer; transition: background 0.2s var(--ease); flex-shrink: 0; }
.switch input::after { content: ''; position: absolute; top: 3px; left: 3px; width: calc(1.6rem - 6px); height: calc(1.6rem - 6px); border-radius: 50%; background: #fff; box-shadow: var(--shadow-sm); transition: transform 0.2s var(--ease); }
.switch input:checked { background: var(--btn-bg); }
.switch input:checked::after { transform: translateX(1.15rem); }

/* ═══ v3.1 · Investing readiness ═══════════════════════════════════ */
.q-wide { grid-column: 1 / -1; display: grid; grid-template-columns: auto minmax(0, 1fr) auto; gap: 1.25rem; align-items: center; }
.q-wide .q-icon { margin: 0; }
.q-wide p { margin-bottom: 0; }
.q-wide .q-meta { flex-direction: column; align-items: flex-end; gap: 0.2rem; }
@media (max-width: 760px) {
  .q-wide { grid-template-columns: 1fr; }
  .q-wide .q-meta { flex-direction: row; align-items: center; }
}
.goal-wide { grid-column: 1 / -1; }

.invest-top { display: grid; grid-template-columns: minmax(0, 1.35fr) minmax(0, 0.9fr); gap: 1.5rem; align-items: start; margin-bottom: clamp(2.5rem, 6vw, 4rem); }
@media (max-width: 960px) { .invest-top { grid-template-columns: 1fr; } }
.invest-top .card { margin-bottom: 0; }

.ladder { list-style: none; padding: 0; margin: 0; position: relative; }
.ladder-step { position: relative; display: grid; grid-template-columns: 2.25rem minmax(0, 1fr); gap: 1rem; padding-bottom: 1.35rem; }
.ladder-step:last-child { padding-bottom: 0; }
.ladder-step:not(:last-child)::before {
  content: ''; position: absolute; left: calc(1.125rem - 1px); top: 2.4rem; bottom: 0.2rem; width: 2px; background: var(--line);
}
.ladder-step.is-done:not(:last-child)::before { background: var(--accent); }
.ladder-dot {
  width: 2.25rem; height: 2.25rem; border-radius: 50%; display: grid; place-items: center;
  font-weight: 800; font-size: 0.9rem; background: var(--surface-2); color: var(--muted); border: 1.5px solid var(--line-strong);
}
.is-done .ladder-dot { background: var(--accent); border-color: var(--accent); color: #03241A; }
.is-current .ladder-dot { background: var(--surface); border-color: var(--accent); color: var(--accent-strong); box-shadow: 0 0 0 5px var(--accent-glow); }
.is-goal .ladder-dot { color: var(--sun); }
.is-goal.is-current .ladder-dot { background: var(--sun-wash); border-color: var(--sun); color: var(--warn); box-shadow: 0 0 0 5px color-mix(in srgb, var(--sun) 22%, transparent); }
.ladder-body h4 { font-size: 1rem; margin: 0.35rem 0 0.2rem; }
.is-todo .ladder-body h4 { color: var(--muted); }
.is-na .ladder-body h4 { text-decoration: line-through; color: var(--muted); }
.ladder-body p { font-size: 0.9rem; color: var(--muted); line-height: 1.55; }
.is-current .ladder-body p { color: var(--ink-soft); }
.ladder-link { display: inline-block; margin-top: 0.5rem; font-size: 0.875rem; font-weight: 650; color: var(--accent-strong); text-decoration: none; }
.ladder-link:hover { text-decoration: underline; }
.match-opts { display: flex; flex-wrap: wrap; gap: 0.4rem; margin-top: 0.65rem; }
.chip {
  padding: 0.4rem 0.8rem; border-radius: 999px; border: 1.5px solid var(--line-strong); background: var(--surface);
  font-size: 0.8125rem; font-weight: 600; color: var(--ink-soft); cursor: pointer; transition: border-color 0.15s var(--ease), background 0.15s var(--ease);
}
.chip:hover { border-color: var(--accent); }
.chip[aria-pressed="true"] { background: var(--accent-wash); border-color: var(--accent); color: var(--accent-strong); }

.safe-card {
  position: sticky; top: 5.5rem;
  padding: 1.6rem; border-radius: var(--radius-lg);
  background: var(--shell); color: var(--shell-ink); box-shadow: var(--shadow-lg);
  border: 1px solid var(--shell-line);
}
.safe-card .stat-label { color: var(--shell-mute); }
.safe-big { font-family: var(--font-display); font-size: clamp(2.6rem, 2rem + 2vw, 3.4rem); font-weight: 800; letter-spacing: -0.04em; line-height: 1; color: var(--shell-mute); font-variant-numeric: tabular-nums; }
.safe-card.is-ready .safe-big { color: var(--accent); }
.safe-big::after { content: ' /mo'; font-size: 1rem; font-weight: 600; letter-spacing: 0; color: var(--shell-mute); }
.safe-lump { margin-top: 0.35rem; font-weight: 650; color: var(--accent); font-size: 0.9rem; min-height: 0.5rem; }
.safe-summary { margin-top: 0.9rem; font-size: 0.975rem; line-height: 1.55; color: var(--shell-ink); }
.safe-match { margin-top: 0.9rem; padding: 0.75rem 0.9rem; border-radius: var(--radius-sm); background: var(--shell-2); font-size: 0.84rem; line-height: 1.5; color: var(--shell-ink); }
.safe-foot { margin-top: 1rem; padding-top: 0.9rem; border-top: 1px solid var(--shell-line); font-size: 0.78rem; line-height: 1.55; color: var(--shell-mute); }
@media (max-width: 960px) { .safe-card { position: static; } }

.asset-section { margin-bottom: clamp(2.5rem, 6vw, 4rem); }
.asset-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 1rem; }
@media (max-width: 1000px) { .asset-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
@media (max-width: 640px)  { .asset-grid { grid-template-columns: 1fr; } }
.asset {
  position: relative; display: flex; flex-direction: column;
  padding: 1.4rem; border-radius: var(--radius-lg); background: var(--surface); border: 1px solid var(--line); box-shadow: var(--shadow-xs);
  overflow: hidden;
}
.asset::before { content: ''; position: absolute; inset: 0 0 auto 0; height: 4px; background: var(--tone); }
.asset-head { margin-bottom: 0.75rem; }
.asset h3 { font-size: 1.2rem; margin-bottom: 0.4rem; }
.asset-what { font-size: 0.9rem; color: var(--ink-soft); line-height: 1.55; margin-bottom: 1rem; }
.asset-facts { margin: 0 0 1rem; display: grid; gap: 0.1rem; }
.asset-facts div { display: grid; grid-template-columns: 7.5rem minmax(0, 1fr); gap: 0.5rem; padding: 0.4rem 0; border-bottom: 1px solid var(--line); font-size: 0.84rem; }
.asset-facts dt { color: var(--muted); }
.asset-facts dd { margin: 0; font-weight: 600; color: var(--ink); }
.asset-fit, .asset-watch { font-size: 0.85rem; line-height: 1.55; color: var(--muted); margin-bottom: 0.5rem; }
.asset-fit b { color: var(--pos); }
.asset-watch b { color: var(--warn); }
.asset .ladder-link { margin-top: auto; padding-top: 0.25rem; }
.meter { display: inline-flex; gap: 3px; vertical-align: middle; }
.meter::before {
  content: ''; width: calc(5 * 14px + 4 * 3px); height: 8px; border-radius: 999px;
  background:
    linear-gradient(90deg, var(--tone) calc(var(--n) * 20%), transparent 0),
    repeating-linear-gradient(90deg, var(--surface-3) 0 14px, transparent 14px 17px);
  -webkit-mask: repeating-linear-gradient(90deg, #000 0 14px, transparent 14px 17px);
          mask: repeating-linear-gradient(90deg, #000 0 14px, transparent 14px 17px);
}

.coming-box {
  display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: 2rem; align-items: center;
  padding: clamp(1.5rem, 4vw, 2.5rem); border-radius: var(--radius-xl);
  background: var(--shell); color: var(--shell-ink);
  border: 1px solid var(--shell-line);
}
@media (max-width: 860px) { .coming-box { grid-template-columns: 1fr; } }
.coming-box h2 { color: var(--shell-ink); font-size: clamp(1.5rem, 1.2rem + 1.4vw, 2.1rem); margin-bottom: 1rem; }
.coming-list { padding-left: 1.1rem; display: grid; gap: 0.5rem; color: var(--shell-mute); font-size: 0.92rem; line-height: 1.5; }
.coming-list b { color: var(--shell-ink); }
.coming-form { justify-content: flex-start; }
.coming-form .email-disclaimer { width: 100%; text-align: left; margin-top: 0.25rem; }

/* ═══ v3.2 · Runway flagship ═══════════════════════════════════════ */
.runway-hero {
  position: relative; overflow: hidden;
  padding: clamp(1.5rem, 4vw, 2.5rem);
  margin-bottom: 1.5rem;
  border-radius: var(--radius-xl);
  background: var(--surface);
  border: 1px solid var(--line);
  box-shadow: var(--shadow-md);
}
.runway-hero::before {
  content: ''; position: absolute; inset: -40% -10% auto auto; width: 36rem; aspect-ratio: 1; pointer-events: none;
  background: radial-gradient(circle, color-mix(in srgb, var(--accent) 14%, transparent), transparent 65%);
}
.runway-hero-top { position: relative; display: grid; grid-template-columns: auto minmax(0, 1fr); gap: 2rem; align-items: end; margin-bottom: 2rem; }
@media (max-width: 760px) { .runway-hero-top { grid-template-columns: 1fr; gap: 0.75rem; } }
.runway-hero .runway-big { font-size: clamp(3.2rem, 2rem + 5vw, 5.5rem); font-weight: 800; letter-spacing: -0.05em; margin: 0.25rem 0 0.75rem; }
.runway-hero .runway-sub { margin: 0; max-width: 34rem; font-size: 1.05rem; line-height: 1.6; color: var(--ink-soft); text-align: left; }

.runway-strip { position: relative; padding-top: 2.4rem; }
.strip-bar { position: relative; height: 18px; border-radius: 999px; background: var(--surface-3); }
.strip-seg { position: absolute; top: 0; bottom: 0; transition: left 0.5s var(--ease), width 0.5s var(--ease); }
.strip-seg:first-child { border-radius: 999px 0 0 999px; }
.strip-seg.is-cash   { background: linear-gradient(90deg, var(--accent), color-mix(in srgb, var(--accent) 70%, var(--sky))); }
.strip-seg.is-credit { background: repeating-linear-gradient(135deg, var(--sun) 0 8px, color-mix(in srgb, var(--sun) 75%, white) 8px 16px); }
.strip-seg.is-danger { background: repeating-linear-gradient(135deg, color-mix(in srgb, var(--coral) 55%, transparent) 0 6px, transparent 6px 12px); border-radius: 0 999px 999px 0; }
.strip-marker { position: absolute; top: -2.4rem; bottom: -6px; width: 0; border-left: 2px solid var(--ink); transition: left 0.5s var(--ease); }
.strip-marker span {
  position: absolute; top: 0; left: 0; transform: translateX(-50%);
  white-space: nowrap; font-size: 0.75rem; font-weight: 700; padding: 0.2rem 0.55rem; border-radius: 999px;
  background: var(--ink); color: var(--surface);
}
.strip-marker.is-end { border-color: var(--coral); }
.strip-marker.is-end span { background: var(--coral); color: #fff; }
.strip-marker.is-ghost { border-left-style: dashed; border-color: var(--accent-strong); top: -1.1rem; }
.strip-marker.is-ghost span { top: auto; bottom: -1.9rem; background: var(--accent-wash); color: var(--accent-strong); border: 1px solid var(--accent); }
.strip-marker.is-info { border-color: var(--sky); border-left-style: dotted; border-left-width: 2.5px; top: -6px; }
.strip-marker.is-info span { display: none; }
/* Keep edge labels on screen */
.strip-marker[style*="left: 0%"] span { transform: none; }
.strip-marker[style*="left: 100%"] span { transform: translateX(-100%); }
.strip-ticks { position: relative; height: 1.4rem; margin-top: 0.5rem; font-size: 0.7rem; color: var(--muted); font-variant-numeric: tabular-nums; }
.strip-ticks span { position: absolute; transform: translateX(-50%); }
.strip-ticks span:first-child { transform: none; }
.runway-strip:has(.is-ghost) .strip-ticks { margin-top: 2.2rem; }
.strip-legend { display: flex; flex-wrap: wrap; gap: 0.4rem 1.1rem; margin-top: 0.75rem; font-size: 0.8rem; color: var(--muted); }
.strip-legend span { display: inline-flex; align-items: center; gap: 0.4rem; }
.strip-legend span::before { content: ''; width: 14px; height: 8px; border-radius: 999px; }
.strip-legend .is-cash::before   { background: var(--accent); }
.strip-legend .is-credit::before { background: var(--sun); }
.strip-legend .is-danger::before { background: color-mix(in srgb, var(--coral) 60%, transparent); }
.strip-legend .is-info::before { width: 0; height: 12px; border-radius: 0; border-left: 2.5px dotted var(--sky); }
.runway-hero [data-tsm-share] { position: relative; margin-top: 1.25rem; }

.runway-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 1.5rem; margin-bottom: 1.5rem; align-items: start; }
@media (max-width: 960px) { .runway-grid { grid-template-columns: 1fr; } }
.runway-grid .card { margin-bottom: 0; }

.whatif-result {
  padding: 0.85rem 1rem; margin-bottom: 1rem; border-radius: var(--radius-sm);
  background: var(--surface-2); color: var(--muted); font-size: 0.9rem; line-height: 1.5;
  transition: background 0.25s var(--ease), color 0.25s var(--ease);
}
.whatif-result.is-active { background: var(--accent-wash); color: var(--ink); }
.whatif-result strong { color: var(--accent-strong); font-size: 1.05rem; }
button.leverage-row {
  width: 100%; text-align: left; font: inherit; color: inherit; cursor: pointer;
  background: transparent; border: 1.5px solid transparent; border-radius: var(--radius-sm);
  padding: 0.8rem 0.75rem;
  transition: background 0.18s var(--ease), border-color 0.18s var(--ease);
}
button.leverage-row:hover { background: var(--surface-2); }
button.leverage-row[aria-pressed="true"] { background: var(--accent-wash); border-color: var(--accent); }
button.leverage-row[aria-pressed="true"] .leverage-rank::after { content: '✓'; }
button.leverage-row[aria-pressed="true"] .leverage-rank { font-size: 0; background: var(--btn-bg); border-color: var(--btn-bg); color: var(--btn-ink); }
button.leverage-row[aria-pressed="true"] .leverage-rank::after { font-size: 0.8rem; }
button.leverage-row + button.leverage-row { border-top-color: transparent; margin-top: 0.25rem; }

.runway-tune { margin-top: clamp(2rem, 5vw, 3rem); }
.runway-tune h2 { font-size: clamp(1.4rem, 1.1rem + 1.2vw, 1.9rem); margin-bottom: 1rem; }

/* ═══ v3.2 · Home signature section ════════════════════════════════ */
.signature { padding: clamp(3rem, 7vw, 5rem) 0; }
.signature-box {
  display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1.1fr); gap: clamp(1.5rem, 4vw, 3.5rem); align-items: center;
  padding: clamp(1.5rem, 4vw, 3rem); border-radius: var(--radius-xl);
  background: var(--shell); color: var(--shell-ink); border: 1px solid var(--shell-line);
  position: relative; overflow: hidden;
}
.signature-box::before {
  content: ''; position: absolute; inset: auto -10% -50% auto; width: 40rem; aspect-ratio: 1; pointer-events: none;
  background: radial-gradient(circle, rgba(46,224,168,0.18), transparent 62%);
}
@media (max-width: 900px) { .signature-box { grid-template-columns: 1fr; } }
.signature-box h2 { color: var(--shell-ink); margin-bottom: 0.85rem; }
.signature-box > div > p { color: var(--shell-mute); line-height: 1.65; margin-bottom: 1.5rem; }
.signature-points { display: grid; gap: 0.85rem; margin-bottom: 1.75rem; }
.signature-points div { display: grid; grid-template-columns: 1.75rem minmax(0, 1fr); gap: 0.75rem; font-size: 0.92rem; line-height: 1.55; color: var(--shell-mute); }
.signature-points b { color: var(--shell-ink); }
.signature-points i { font-style: normal; display: grid; place-items: center; width: 1.75rem; height: 1.75rem; border-radius: 50%; background: rgba(46,224,168,0.14); color: var(--accent); font-weight: 800; font-size: 0.8rem; }
.sig-demo { position: relative; padding: 1.4rem; border-radius: var(--radius-lg); background: var(--shell-2); border: 1px solid var(--shell-line); }
.sig-demo .stat-label { color: var(--shell-mute); }
.sig-num { font-family: var(--font-display); font-size: 3rem; font-weight: 800; letter-spacing: -0.05em; color: var(--sun); line-height: 1; margin: 0.2rem 0 1.4rem; }
.sig-demo .strip-bar { background: rgba(255,255,255,0.08); }
.sig-demo .strip-ticks { color: var(--shell-mute); }
.sig-events { list-style: none; padding: 0; margin: 1.6rem 0 0; display: grid; gap: 0.55rem; }
.sig-events li { display: grid; grid-template-columns: 4.5rem minmax(0, 1fr); gap: 0.75rem; font-size: 0.84rem; color: var(--shell-mute); }
.sig-events b { color: var(--shell-ink); font-weight: 650; }
.sig-events .when { font-variant-numeric: tabular-nums; color: var(--shell-mute); }
.sig-events .bad b { color: var(--coral); }

/* ═══ v3.2 · Motion ════════════════════════════════════════════════ */
.reveal { opacity: 0; transform: translateY(18px); transition: opacity 0.6s var(--ease), transform 0.6s var(--ease); }
.reveal.in { opacity: 1; transform: none; }
@media (prefers-reduced-motion: reduce) { .reveal { opacity: 1; transform: none; } }
button.leverage-row.leverage-best { margin: 0; padding: 0.8rem 0.75rem; }
