/* ============================================================
   Trawick Financial — Design System
   ============================================================ */

:root {
  --green:        #1a5c34;
  --green-light:  #eef1ee;
  --green-accent: #2e8b57;
  --amber:        #f59e0b;
  --amber-light:  #fef3c7;
  --amber-text:   #92400e;
  --purple:       #7c3aed;
  --purple-light: #ede9fe;
  --purple-text:  #5b21b6;
  --text:         #1f2937;
  --text-grey:    #6b7280;
  --text-light:   #9ca3af;
  --border:       #e5e7eb;
  --bg:           #f8f9fa;
  --field:        #f3f4f6;
  --white:        #ffffff;
  --btn-hover:    #14492a;
  --orb-size:     260px;
  /* Reveal-orb inner type/padding — shrink in step with --orb-size on mobile
     (see the <=600px block) so big figures don't crowd the smaller bubbles. */
  --orb-pad:      30px;
  --orb-label:    12px;
  --orb-num:      32px;
  --orb-sub:      13px;
}

/* ============================================================
   Dark theme — redefines the design-system color tokens. All 260
   var(--…) uses across the app cascade automatically. Charcoal (not
   pure black), greens lightened for contrast. PDF is server-side and
   unaffected.
   ============================================================ */
html[data-theme="dark"] {
  --green:        #3da06a;
  --green-light:  #16291f;
  --green-accent: #4cb37e;
  --amber:        #fbbf24;
  --amber-light:  #3a2c0c;
  --amber-text:   #fcd34d;
  --purple:       #a78bfa;
  --purple-light: #241a3d;
  --purple-text:  #c4b5fd;
  --text:         #e6ece8;
  --text-grey:    #9fb0a7;
  --text-light:   #7f9088;
  --border:       #2c3a32;
  --bg:           #0f1512;
  --field:        #212a25;
  --white:        #18211c;   /* "card surface" in dark, not literal white */
  --btn-hover:    #4cb37e;
}

/* Per-strategy color themes — match each shield. Set on .calc-wrap via data-theme by
   selectStrategy(); re-themes the whole calculator (the green tokens cascade). The nav,
   outside .calc-wrap, keeps the default forest green. */
[data-strat-theme="excelerator"] { --green:#16466b; --green-accent:#2f86c5; --green-light:#e8f0f7; --btn-hover:#0f3450; }
[data-strat-theme="rothx"]       { --green:#1e8836; --green-accent:#2e8b4e; --green-light:#e9f6e6; --btn-hover:#15662b; }  /* board #22: warmer/brighter kelly green, leans toward the lime shield while staying AA-readable on white */
[data-strat-theme="horizon"]     { --green:#8a5d16; --green-accent:#c0891e; --green-light:#f6edd6; --btn-hover:#6e4910; }
[data-strat-theme="indextra"]    { --green:#3c7a1e; --green-accent:#5fae2e; --green-light:#edf5e2; --btn-hover:#2c5a14; }
[data-strat-theme="mec"]         { --green:#1f6b6b; --green-accent:#2f9b9b; --green-light:#e3f1f0; --btn-hover:#154f4f; }
[data-strat-theme="annuity"]     { --green:#9c7a06; --green-accent:#d4ab18; --green-light:#fbf3cf; --btn-hover:#7a5f04; }

/* Dark variants of the per-strategy themes — lightened to read on charcoal. */
html[data-theme="dark"] [data-strat-theme="excelerator"] { --green:#4f93c9; --green-accent:#6fb0e0; --green-light:#11202e; --btn-hover:#6fb0e0; }
html[data-theme="dark"] [data-strat-theme="rothx"]       { --green:#46b06c; --green-accent:#6fd494; --green-light:#15301c; --btn-hover:#6fd494; }  /* board #22: brighter limier green on charcoal */
html[data-theme="dark"] [data-strat-theme="horizon"]     { --green:#cda23f; --green-accent:#e0bd5e; --green-light:#2a2310; --btn-hover:#e0bd5e; }
html[data-theme="dark"] [data-strat-theme="indextra"]    { --green:#6fb83a; --green-accent:#8ed35a; --green-light:#1a2710; --btn-hover:#8ed35a; }
html[data-theme="dark"] [data-strat-theme="mec"]         { --green:#3aa6a6; --green-accent:#5ec7c7; --green-light:#0f2625; --btn-hover:#5ec7c7; }
html[data-theme="dark"] [data-strat-theme="annuity"]     { --green:#e3c14d; --green-accent:#eed67e; --green-light:#2b240d; --btn-hover:#eed67e; }

/* ============================================================
   Reset & Base
   ============================================================ */

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

body {
  font-family: system-ui, -apple-system, sans-serif;
  background: var(--bg);
  color: var(--text);
}

a {
  color: var(--green);
  text-decoration: none;
}

/* ============================================================
   Navigation
   ============================================================ */

.top-nav {
  display: flex;
  align-items: center;
  padding: 14px 32px;
  background: var(--white);
  border-bottom: 2px solid var(--border);
  gap: 24px;
  flex-wrap: nowrap;
}

.nav-brand {
  font-weight: 800;
  font-size: 18px;
  color: var(--text);
  white-space: nowrap;
}

.nav-brand-light {
  color: var(--green-accent);
  font-weight: 600;
}

.nav-links {
  display: flex;
  gap: 4px;
}

.nav-link {
  padding: 8px 16px;
  color: var(--text-grey);
  font-size: 13px;
  border-radius: 6px;
  text-decoration: none;
  transition: background 0.15s, color 0.15s;
}

.nav-link:hover {
  background: var(--green-light);
  color: var(--green);
}

.nav-link.active {
  background: var(--green);
  color: var(--white);
  font-weight: 600;
}

/* Count badge on the Board nav link: how many open requests await review. */
.nav-badge {
  display: inline-block;
  min-width: 18px;
  margin-left: 6px;
  padding: 0 5px;
  font-size: 11px;
  font-weight: 700;
  line-height: 18px;
  text-align: center;
  border-radius: 9px;
  background: var(--green-accent);
  color: var(--white);
}

.nav-link.active .nav-badge {
  background: var(--white);
  color: var(--green);
}

.nav-user {
  margin-left: auto;
  display: flex;
  align-items: center;
  gap: 8px;
}

.avatar {
  width: 32px;
  height: 32px;
  border-radius: 50%;
  background: var(--green);
  color: var(--white);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 13px;
  font-weight: 700;
  flex-shrink: 0;
}

.nav-username {
  color: var(--text-grey);
  font-size: 13px;
}

.nav-logout {
  color: var(--text-grey);
  font-size: 13px;
  text-decoration: none;
}

.nav-logout:hover {
  color: var(--text);
}

.nav-toggle {
  display: none;
  margin-left: auto;
  background: none;
  border: none;
  font-size: 24px;
  line-height: 1;
  color: var(--text);
  cursor: pointer;
  padding: 4px 10px;
}

/* ============================================================
   Nav — Logo home link + hover tooltip  (Board #18)
   ============================================================ */

/* Make the brand a positioned anchor for the tooltip */
.nav-brand {
  position: relative;
  text-decoration: none;
  display: inline-block;
}

/* CSS-only "Home" tooltip that appears below the wordmark on hover */
.nav-brand::after {
  content: "Home";
  position: absolute;
  top: calc(100% + 8px);
  left: 50%;
  transform: translateX(-50%);
  background: var(--green);
  color: var(--white);
  font-size: 11px;
  font-weight: 600;
  padding: 4px 10px;
  border-radius: 6px;
  white-space: nowrap;
  pointer-events: none;
  opacity: 0;
  transition: opacity 0.15s;
  box-shadow: 0 2px 8px rgba(0,0,0,0.15);
  z-index: 200;
}

/* Small arrow pointing up at the brand */
.nav-brand::before {
  content: "";
  position: absolute;
  top: calc(100% + 3px);
  left: 50%;
  transform: translateX(-50%);
  border: 5px solid transparent;
  border-bottom-color: var(--green);
  pointer-events: none;
  opacity: 0;
  transition: opacity 0.15s;
  z-index: 201;
}

.nav-brand:hover::after,
.nav-brand:hover::before {
  opacity: 1;
}

/* ============================================================
   Nav — Hover-flyout framework  (Board #17, reused by later tasks)

   Usage:
     Wrap a top-level .nav-link in <div class="nav-item">.
     Add a sibling <div class="nav-flyout"> containing .nav-flyout-link
     items — the flyout appears below on :hover of .nav-item.

   The .nav-item wrapper ensures hovering onto the flyout itself
   keeps the menu visible (single compound hover area).
   ============================================================ */

.nav-item {
  position: relative;
  display: inline-flex;
  align-items: center;
}

.nav-flyout {
  display: none;
  position: absolute;
  top: calc(100% + 6px);
  left: 0;
  min-width: 160px;
  background: var(--white);
  border: 1px solid var(--border);
  border-radius: 8px;
  box-shadow: 0 4px 16px rgba(0,0,0,0.10);
  padding: 6px;
  flex-direction: column;
  gap: 2px;
  z-index: 300;
  /* Prevent gap between trigger and flyout from closing menu */
}

/* Invisible bridge: fills the 6px gap so cursor can travel down */
.nav-flyout::before {
  content: "";
  position: absolute;
  top: -8px;
  left: 0;
  right: 0;
  height: 8px;
}

.nav-item:hover .nav-flyout {
  display: flex;
}

.nav-flyout-link {
  display: block;
  padding: 8px 14px;
  color: var(--text-grey);
  font-size: 13px;
  border-radius: 6px;
  text-decoration: none;
  white-space: nowrap;
  transition: background 0.12s, color 0.12s;
}

.nav-flyout-link:hover {
  background: var(--green-light);
  color: var(--green);
}

/* Board #24: per-strategy shield emblem before the name in the Estimator flyout. */
.nav-flyout-logo { height: 18px; width: auto; vertical-align: middle; margin-right: 8px; border-radius: 3px; }

.nav-flyout-link.danger {
  color: #b91c1c;
}

.nav-flyout-link.danger:hover {
  background: #fef2f2;
  color: #991b1b;
}

.nav-flyout-divider {
  height: 1px;
  background: var(--border);
  margin: 4px 6px;
}

/* ============================================================
   Nav — User icon + dropdown  (Board #17)
   ============================================================ */

/* Wrap .nav-user in .nav-item so flyout framework applies */
.nav-user-item {
  position: relative;
  display: inline-flex;
  align-items: center;
  margin-left: auto;          /* push to far right, same as old .nav-user */
}

.nav-user-trigger {
  display: flex;
  align-items: center;
  gap: 8px;
  cursor: default;
  /* Entire trigger area is the hover target */
}

.nav-user-item:hover .nav-flyout {
  display: flex;
}

/* Right-align flyout under the user trigger */
.nav-user-item .nav-flyout {
  left: auto;
  right: 0;
}

/* Dark-mode toggle button in the nav. Shows sun in dark theme, moon in light. */
.theme-toggle {
  background: transparent;
  border: 1.5px solid var(--border);
  color: var(--text-grey);
  border-radius: 8px;
  width: 36px;
  height: 36px;
  font-size: 16px;
  line-height: 1;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  transition: border-color .15s, color .15s, background .15s;
}
.theme-toggle:hover { border-color: var(--green-accent); color: var(--text); }
.theme-toggle-sun { display: none; }
.theme-toggle-moon { display: inline; }
html[data-theme="dark"] .theme-toggle-sun { display: inline; }
html[data-theme="dark"] .theme-toggle-moon { display: none; }

/* ============================================================
   Auth Pages
   ============================================================ */

.auth-container {
  display: flex;
  justify-content: center;
  align-items: center;
  min-height: 100vh;
  padding: 20px;
}

.auth-card {
  position: relative;
  background: var(--white);
  border-radius: 12px;
  padding: 40px;
  max-width: 400px;
  width: 100%;
  box-shadow: 0 4px 24px rgba(0, 0, 0, 0.08);
}

.auth-theme-toggle {
  position: absolute;
  top: 16px;
  right: 16px;
}

.auth-title {
  font-size: 24px;
  font-weight: 800;
  text-align: center;
}

.auth-title-light {
  color: var(--green-accent);
  font-weight: 600;
}

.auth-subtitle {
  color: var(--text-grey);
  font-size: 14px;
  text-align: center;
  margin-bottom: 24px;
}

.auth-link {
  text-align: center;
  font-size: 13px;
  color: var(--text-grey);
  margin-top: 16px;
}

.auth-link a {
  color: var(--green);
}

/* ============================================================
   Forms
   ============================================================ */

.form-group {
  margin-bottom: 16px;
}

.form-label {
  display: block;
  font-size: 12px;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  color: var(--text-grey);
  font-weight: 600;
  margin-bottom: 6px;
}

/* Grouped field blocks on the admin user profile / add-user form. */
.form-section {
  margin-bottom: 22px;
  padding-top: 16px;
  border-top: 1px solid var(--border);
}
.form-section:first-child {
  padding-top: 0;
  border-top: none;
}
.form-section-title {
  font-size: 12px;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  color: var(--text-grey);
  font-weight: 600;
  margin: 0 0 12px;
}

.form-input {
  width: 100%;
  max-width: 100%;          /* never overflow the container, even with an inline px width */
  box-sizing: border-box;
  padding: 10px 14px;
  border: 1px solid var(--border);
  border-radius: 8px;
  font-size: 14px;
  outline: none;
  background: var(--white);
  color: var(--text);
  transition: border-color 0.15s;
}

/* Admin/inline forms set explicit px widths on inputs and selects; cap them so they
   can't push past the viewport on a phone. */
input, select, textarea { max-width: 100%; box-sizing: border-box; }

.form-input:focus {
  border-color: var(--green);
}

textarea.form-input {
  resize: vertical;
}

/* ============================================================
   Buttons
   ============================================================ */

.btn {
  padding: 10px 20px;
  border-radius: 8px;
  font-size: 13px;
  font-weight: 500;
  cursor: pointer;
  border: none;
  display: inline-block;
  text-align: center;
  text-decoration: none;
  transition: background 0.15s;
}

.btn-primary {
  background: var(--green);
  color: var(--white);
  font-weight: 600;
}

.btn-primary:hover {
  background: var(--btn-hover);
  color: var(--white);
}

.btn-full {
  display: block;
  width: 100%;
  text-align: center;
  padding: 14px;
}

/* ============================================================
   Flash Messages
   ============================================================ */

.flash {
  padding: 12px 16px;
  border-radius: 8px;
  margin-bottom: 16px;
  font-size: 14px;
  border: 1px solid transparent;
}

.flash-error {
  background: #fef2f2;
  color: #991b1b;
  border-color: #fecaca;
}

.flash-success {
  background: var(--green-light);
  color: #166534;
  border-color: #bbf7d0;
}

html[data-theme="dark"] .flash-error {
  background: #2a1416;
  color: #fca5a5;
  border-color: #5b2326;
}
html[data-theme="dark"] .flash-success {
  background: var(--green-light);
  color: #86efac;
  border-color: #1f5235;
}

/* Dark-mode overrides for template callouts/buttons whose red status semantics
   shouldn't be retokenized inline (light red would glare on charcoal). */
html[data-theme="dark"] .btn-deny {
  background: #2a1416 !important;
  color: #fca5a5 !important;
  border-color: #5b2326 !important;
}

/* Dark-mode overrides for the results-page ledger table. The base rules below
   hardcode light surfaces (cell borders, zebra stripe, income-row tint, the
   tax-planning toggle's active pill) that aren't token-driven and would glare on
   charcoal. Retoned to the dark tokens here so the ledger body re-themes. */
html[data-theme="dark"] .ledger-table td { border-bottom-color: var(--border); }
html[data-theme="dark"] .ledger-table tr:nth-child(even) { background: var(--bg); }
html[data-theme="dark"] .ledger-table tr.income-row { background: var(--green-light); }
html[data-theme="dark"] .ledger-table tr:nth-child(even) td:first-child { background: var(--bg); }
html[data-theme="dark"] .ledger-table tr.income-row td:first-child { background: var(--green-light); }
html[data-theme="dark"] .seg-btn.active { background: var(--white); }

/* ============================================================
   Page Layout
   ============================================================ */

.content {
  min-height: calc(100vh - 65px);
}

.page-container {
  max-width: 1200px;
  margin: 0 auto;
  padding: 32px;
}

.page-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 28px;
}

.page-title {
  font-size: 24px;
  font-weight: 700;
}

.page-subtitle {
  color: var(--text-grey);
  font-size: 14px;
  margin-top: 4px;
}

/* ============================================================
   Cards
   ============================================================ */

.card {
  background: var(--white);
  border: 1px solid var(--border);
  border-radius: 12px;
  overflow: hidden;
}

.card-header {
  padding: 16px 20px;
  border-bottom: 1px solid var(--border);
  font-weight: 600;
  font-size: 15px;
}

.card-body {
  padding: 20px;
}

/* ============================================================
   Summary Cards
   ============================================================ */

.summary-cards {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 12px;
}

.summary-card {
  background: var(--white);
  border: 1px solid var(--border);
  border-radius: 10px;
  padding: 16px;
}

/* ── Hero bubble cards (top-3 metrics on results page) ──
   Each card IS the settled orb: white interior, generous radius,
   and a colored ring accent that matches the animation orb.
   Colors: card-1=green #1caa5c  card-2=blue #3b82f6  card-3=amber #f59e0b */
.hero-bubble-card {
  background: var(--white);
  border-radius: 20px;
  padding: 24px;
  text-align: center;
  /* ring accent overridden per-card via inline style */
  border: 2.5px solid var(--bubble-ring, #e5e7eb);
  box-shadow: 0 4px 18px rgba(0,0,0,0.07);
}

.summary-card .label {
  font-size: 11px;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  color: var(--text-grey);
  font-weight: 600;
}

.summary-card .value {
  font-size: 22px;
  font-weight: 700;
  margin-top: 4px;
}

.summary-card .value.green {
  color: var(--green);
}

/* ============================================================
   Ledger Table
   ============================================================ */

.table-scroll {
  overflow-x: auto;
  -webkit-overflow-scrolling: touch;
}

.ledger-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 13px;
}

.ledger-table th {
  padding: 10px 16px;
  background: var(--bg);
  font-size: 10px;
  text-transform: uppercase;
  color: var(--text-grey);
  font-weight: 600;
  letter-spacing: 0.5px;
  text-align: right;
  border-bottom: 1px solid var(--border);
}

.ledger-table td {
  padding: 9px 16px;
  text-align: right;
  border-bottom: 1px solid #f5f5f5;
}

.ledger-table th.text-left,
.ledger-table td.text-left {
  text-align: left;
}

.ledger-table tr:nth-child(even) {
  background: #fafafa;
}

.ledger-table tr.income-row {
  background: #f0fdf4;
}

.text-green {
  color: var(--green);
}

.text-amber {
  color: var(--amber);
}

.text-grey {
  color: var(--text-grey);
}

.text-muted {
  color: var(--text-light);
}

/* ============================================================
   Badges
   ============================================================ */

.badge {
  padding: 3px 10px;
  border-radius: 12px;
  font-size: 12px;
  font-weight: 600;
  display: inline-block;
}

.badge-horizon {
  background: var(--green-light);
  color: var(--green);
}

.badge-rothx {
  background: var(--amber-light);
  color: var(--amber-text);
}

.badge-excelerator {
  background: var(--purple-light);
  color: var(--purple-text);
}

.badge-indextra {
  background: #edf5e2;
  color: #3c7a1e;
}

.badge-mec {
  background: #e3f1f0;
  color: #1f6b6b;
}

html[data-theme="dark"] .badge-indextra {
  background: #1a2710;
  color: #6fb83a;
}

html[data-theme="dark"] .badge-mec {
  background: #0f2625;
  color: #3aa6a6;
}

/* ============================================================
   Benchmark Cards
   ============================================================ */

.benchmark-card {
  background: var(--white);
  border: 1px solid var(--border);
  border-radius: 10px;
  padding: 14px 16px;
  display: flex;
  align-items: center;
  gap: 14px;
}

.benchmark-icon {
  width: 40px;
  height: 40px;
  background: var(--green-light);
  border-radius: 10px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 18px;
  flex-shrink: 0;
}

.benchmark-label {
  font-size: 11px;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  color: var(--text-grey);
  font-weight: 600;
}

.benchmark-value {
  font-size: 18px;
  font-weight: 700;
}

/* ============================================================
   Links
   ============================================================ */

.link-green {
  color: var(--green);
  font-weight: 500;
  font-size: 13px;
  text-decoration: none;
}

.link-green:hover {
  text-decoration: underline;
}

/* ============================================================
   Empty State
   ============================================================ */

.empty-state {
  padding: 40px;
  text-align: center;
  color: var(--text-grey);
}

/* ============================================================
   Utility
   ============================================================ */

.text-left   { text-align: left; }
.text-right  { text-align: right; }
.text-center { text-align: center; }
.mt-1        { margin-top: 8px; }
.mb-1        { margin-bottom: 8px; }

/* ============================================================
   Learning Center
   ============================================================ */

.learning-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 16px;
  margin-top: 24px;
}

.learning-card .card-body {
  min-height: 120px;
}

/* ============================================================
   Responsive — Tablet (<= 768px)
   ============================================================ */

@media (max-width: 768px) {
  .summary-cards {
    grid-template-columns: repeat(2, 1fr);
  }

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

  /* Nav -> hamburger */
  .top-nav {
    flex-wrap: wrap;
    padding: 12px 16px;
    gap: 8px;
  }
  .nav-toggle { display: block; }
  .nav-links,
  .nav-user {
    display: none;
    flex-basis: 100%;
    width: 100%;
    flex-direction: column;
    align-items: stretch;
    gap: 2px;
    margin-left: 0;
  }
  .top-nav.open .nav-links,
  .top-nav.open .nav-user { display: flex; }
  .nav-link {
    padding: 12px 14px;
    font-size: 15px;
    border-radius: 8px;
  }
  .nav-user {
    padding-top: 8px;
    margin-top: 4px;
    border-top: 1px solid var(--border);
    gap: 4px;
  }
  .nav-user .avatar { display: none; }
  .nav-username { font-size: 14px; padding: 4px 14px; }
  .nav-logout { padding: 10px 14px; font-size: 15px; }

  /* Flyouts: collapse to inline on mobile — full-width, LEFT-aligned, with a clear
     parent/child hierarchy. (Desktop makes .nav-item align-items:center + the flyout
     min-width:160px, which on a stacked mobile menu rendered the items centered in a
     narrow column. Reset both here.) */
  .nav-item,
  .nav-user-item {
    position: static;
    display: flex;
    flex-direction: column;
    align-items: stretch;      /* override desktop center -> full-width rows */
    width: 100%;
  }
  .nav-link,
  .nav-flyout-link { text-align: left; width: 100%; }
  /* The flyout trigger (Strategy Finder / Estimator) reads as a section header. */
  .nav-item > .nav-link { font-weight: 600; color: var(--text); }
  .nav-flyout {
    display: flex;
    position: static;
    box-shadow: none;
    border: none;
    border-radius: 0;
    min-width: 0;              /* drop the desktop 160px that narrowed/centered it */
    width: 100%;
    margin: 2px 0 6px 14px;
    padding: 0 0 0 12px;
    gap: 0;
    background: transparent;
    border-left: 2px solid var(--border);   /* children sit visibly under their parent */
  }
  .nav-flyout::before { display: none; }
  .nav-flyout-link {
    font-size: 14px;
    padding: 10px 12px;
    color: var(--text-grey);
  }
  .nav-flyout-divider {
    margin: 4px 0;
  }
  /* User menu: collapsed by default on mobile — tap the profile circle to expand
     (the Strategy Finder / Estimator flyouts above stay inline; only the account
     menu accordions). These are more specific than the generic .nav-flyout rule. */
  .nav-user-trigger { cursor: pointer; }
  /* Collapsed by default. The :hover selector is neutralized here so a touch tap
     (which can trigger :hover) can't reveal it — only the .open toggle does. */
  .nav-user-item .nav-flyout,
  .nav-user-item:hover .nav-flyout { display: none; }
  .nav-user-item.open .nav-flyout { display: flex; }
  /* Caret cue on the profile row; rotates when open. */
  .nav-user-trigger::after {
    content: "";
    margin-left: auto;
    width: 8px; height: 8px;
    border-right: 2px solid var(--text-grey);
    border-bottom: 2px solid var(--text-grey);
    transform: rotate(45deg);
    transition: transform 0.2s ease;
  }
  .nav-user-item.open .nav-user-trigger::after { transform: rotate(-135deg); }
  /* Logo tooltip: hide on mobile (redundant + obscured) */
  .nav-brand::before,
  .nav-brand::after { display: none; }

  .page-container { padding: 20px 16px; }
  .page-header { flex-direction: column; align-items: flex-start; gap: 12px; }

  /* Inputs: 16px prevents iOS focus-zoom */
  .form-input { font-size: 16px; }

  /* Bigger tap targets */
  .qual-btn { padding: 10px 16px; }
  .strategy-btn { padding: 14px 12px; }
  .btn-delete { min-height: 40px; padding: 8px 12px; font-size: 13px; }

  /* Frozen first column on wide tables */
  .ledger-table th:first-child,
  .ledger-table td:first-child {
    position: sticky;
    left: 0;
    background: var(--white);
    z-index: 1;
  }
  .ledger-table tr:nth-child(even) td:first-child { background: #fafafa; }
  .ledger-table tr.income-row td:first-child { background: #f0fdf4; }

  /* Results page grids collapse (classes added in results.html) */
  .hero-cards { grid-template-columns: 1fr 1fr !important; }
  .results-2col { grid-template-columns: 1fr !important; }
  .result-actions { flex-wrap: wrap; }
  .result-actions .btn { flex: 1; min-width: 120px; }

  /* Compact spacing on small screens */
  .card-body { padding: 16px; }
  .summary-card { padding: 16px !important; }
  .hero-cards,
  .results-2col { margin-bottom: 16px !important; }
  .card { margin-bottom: 16px; }
}

/* ============================================================
   Responsive — Reveal animation (<= 600px)
   ============================================================ */

@media (max-width: 600px) {
  :root {
    --orb-size: 170px;
    /* Smaller bubble → tighter padding and type so figures stay centered
       and clear of the edges (board #6). */
    --orb-pad: 16px;
    --orb-label: 11px;
    --orb-num: 22px;
    --orb-sub: 11px;
  }
  #reveal-overlay {
    justify-content: flex-start !important;
    overflow-y: auto;
    padding: 32px 16px;
  }
  #reveal-podium {
    flex-direction: column;
  }
}

/* ============================================================
   Responsive — Phone (<= 480px)
   ============================================================ */

@media (max-width: 480px) {
  .summary-cards,
  .hero-cards { grid-template-columns: 1fr !important; }
  .page-container { padding: 16px 12px; }

  /* Trim hero number size a touch so cards stay compact */
  .summary-card .value { font-size: 26px; }

  /* Your Potential -> 2-across stat tiles */
  .potential-body {
    display: grid !important;
    grid-template-columns: 1fr 1fr !important;
    gap: 10px !important;
  }
  .potential-row {
    flex-direction: column;
    align-items: flex-start !important;
    gap: 3px;
    padding: 12px !important;
    border: 1px solid var(--border) !important;
    border-radius: 10px;
    background: var(--bg);
  }
  .potential-row > div:last-child { font-size: 18px !important; }
  /* Last tile (Breakeven / DB Multiple) spans full width */
  .potential-body > .potential-row:last-child { grid-column: 1 / -1; }

  /* Scenario assumptions stay 2-col (denser than a plain list) */
  .assume-grid { gap: 8px 16px !important; }

  /* Intake form: keep 2-col, pair short fields, tighten gaps */
  .intake-grid {
    grid-template-columns: 1fr 1fr !important;
    gap: 12px !important;
  }
  .intake-grid > .form-group { margin-bottom: 0 !important; }
  /* Full-width: Name(1), Filing(4), Proposal Type(7), Income Start Age(8) */
  .intake-grid > .form-group:nth-child(1),
  .intake-grid > .form-group:nth-child(4),
  .intake-grid > .form-group:nth-child(7),
  .intake-grid > #income-age-group { grid-column: 1 / -1; }
  /* Age|State and Income|Contribution stay paired (nth-child 2,3,5,6) */

  /* Tighten standalone form groups + strategy row */
  .form-group { margin-bottom: 12px; }
  .strategy-row { gap: 6px; }
}

/* ============================================================
   Strategy buttons
   ============================================================ */

.strategy-btn {
  flex: 1;
  padding: 14px 16px;
  background: var(--white);
  border: 1px solid var(--border);
  border-radius: 8px;
  text-align: center;
  font-weight: 500;
  color: var(--text-grey);
  font-size: 14px;
  cursor: pointer;
  font-family: inherit;
}
.strategy-btn.active {
  background: var(--green-light);
  border: 2px solid var(--green);
  color: var(--green);
  font-weight: 600;
}
.strategy-btn:hover {
  border-color: var(--green);
}

/* Qualified toggle buttons */
.qual-btn {
  padding: 6px 14px;
  font-size: 13px;
  color: var(--text-grey);
  background: transparent;
  border: none;
  border-radius: 4px;
  cursor: pointer;
  font-family: inherit;
}
.qual-btn.active {
  background: var(--white);
  font-weight: 600;
  color: var(--text);
  box-shadow: 0 1px 2px rgba(0,0,0,0.05);
}

/* Delete button */
.btn-delete {
  background: none;
  border: 1px solid var(--border);
  border-radius: 4px;
  color: var(--text-grey);
  cursor: pointer;
  font-size: 12px;
  padding: 2px 6px;
  line-height: 1;
  font-family: inherit;
}
.btn-delete:hover {
  background: #fef2f2;
  border-color: #fca5a5;
  color: #dc2626;
}
.btn-delete-bulk {
  background: var(--white);
  border: 1px solid #fca5a5;
  color: #dc2626;
  border-radius: 6px;
  cursor: pointer;
  font-weight: 600;
  font-family: inherit;
}
.btn-delete-bulk:hover:not(:disabled) { background: #dc2626; color: #fff; border-color: #dc2626; }
.btn-delete-bulk:disabled { opacity: .45; cursor: not-allowed; border-color: var(--border); color: var(--text-grey); }

/* ---- Home hero ---- */
.hero { display:flex; gap:40px; align-items:center; padding:64px 48px 48px; max-width:1200px; margin:0 auto; }
.hero-text { flex:1; }
.hero-eyebrow { color:var(--green); font-weight:700; font-size:13px; letter-spacing:1.5px; text-transform:uppercase; margin-bottom:20px; }
.hero-title { font-size:56px; line-height:1.03; font-weight:800; letter-spacing:-1.5px; color:var(--text); margin:0; }
.hero-sub { margin-top:22px; color:var(--text-grey); font-size:18px; max-width:440px; line-height:1.5; }
.hero-cta { display:inline-block; margin-top:30px; width:auto; }
.hero-art { flex:1; display:flex; align-items:stretch; }
.ha-card { flex:1; min-height:340px; border-radius:20px; padding:26px 26px 22px;
  background:linear-gradient(155deg, var(--green) 0%, #14492a 100%); color:#fff;
  box-shadow:0 18px 46px rgba(20,73,42,.26); display:flex; flex-direction:column; }
.ha-top { display:flex; align-items:center; justify-content:space-between; margin-bottom:auto; }
.ha-kicker { font-size:12px; font-weight:700; letter-spacing:1.2px; text-transform:uppercase; color:rgba(255,255,255,.8); }
.ha-lock { font-size:16px; filter:grayscale(1) brightness(2.2); opacity:.85; }
.ha-bars { display:flex; align-items:flex-end; gap:8px; height:150px; margin:22px 0 10px; }
.ha-bars i { flex:1; height:0; border-radius:6px 6px 2px 2px;
  background:linear-gradient(180deg, rgba(255,255,255,.92), rgba(255,255,255,.6));
  animation:haGrow .9s cubic-bezier(.2,.75,.25,1) forwards; }
@keyframes haGrow { to { height:var(--h); } }
.ha-bars i:nth-child(2){animation-delay:.06s} .ha-bars i:nth-child(3){animation-delay:.12s}
.ha-bars i:nth-child(4){animation-delay:.18s} .ha-bars i:nth-child(5){animation-delay:.24s}
.ha-bars i:nth-child(6){animation-delay:.30s} .ha-bars i:nth-child(7){animation-delay:.36s}
.ha-bars i:nth-child(8){animation-delay:.42s}
.ha-floor { border-top:2px dashed rgba(255,255,255,.45); padding-top:8px; }
.ha-floor span { font-size:12px; font-weight:600; color:rgba(255,255,255,.82); }
.ha-chips { display:flex; flex-wrap:wrap; gap:8px; margin-top:16px; }
.ha-chips span { font-size:12px; font-weight:600; background:rgba(255,255,255,.14);
  border:1px solid rgba(255,255,255,.28); border-radius:999px; padding:6px 12px; }

/* Hero card: "Your book at a glance" — real stats from the agent's own proposals. */
.ha-card .ha-top { margin-bottom:18px; }
.ha-stats { display:flex; flex-wrap:wrap; gap:16px 18px; }
.ha-stat { flex:1 1 120px; min-width:0; }
.ha-num { display:block; font-size:30px; font-weight:800; line-height:1.05; letter-spacing:-.02em;
  overflow-wrap:anywhere; }
.ha-lbl { display:block; font-size:12px; font-weight:600; color:rgba(255,255,255,.78); margin-top:5px; }
.ha-latest { margin-top:auto; border-top:1px solid rgba(255,255,255,.22); padding-top:14px; }
.ha-latest-lbl { font-size:11px; font-weight:700; letter-spacing:1px; text-transform:uppercase; color:rgba(255,255,255,.6); }
.ha-latest-main { font-size:15px; margin-top:5px; }
.ha-latest-sub { font-size:13px; color:rgba(255,255,255,.82); margin-top:3px; }
.ha-foot { font-size:11px; color:rgba(255,255,255,.6); margin-top:14px; }
.ha-empty { margin:auto 0; }
.ha-empty-msg { font-size:16px; line-height:1.55; color:rgba(255,255,255,.92); margin-bottom:18px; }
.ha-empty-cta { display:inline-block; font-size:14px; font-weight:700; color:#fff; text-decoration:none;
  background:rgba(255,255,255,.16); border:1px solid rgba(255,255,255,.32); border-radius:999px; padding:9px 17px;
  transition:background .15s; }
.ha-empty-cta:hover { background:rgba(255,255,255,.27); }

/* Home quick-links */
.home-quick { display:grid; grid-template-columns:repeat(auto-fit,minmax(220px,1fr)); gap:16px; margin-bottom:8px; }
.qcard { display:flex; flex-direction:column; background:var(--white); border:1px solid var(--border);
  border-radius:16px; padding:24px; box-shadow:0 6px 22px rgba(0,0,0,.04);
  transition:transform .15s, box-shadow .15s; }
.qcard:hover { transform:translateY(-3px); box-shadow:0 14px 32px rgba(0,0,0,.09); }
.qc-ic { width:42px; height:42px; border-radius:12px; background:var(--green-light); color:var(--green);
  display:flex; align-items:center; justify-content:center; font-size:18px; margin-bottom:14px; }
.qcard h3 { font-size:18px; color:var(--green); margin-bottom:7px; }
.qcard p { font-size:14px; line-height:1.55; color:var(--text-grey); margin-bottom:14px; flex:1; }
.qc-go { font-size:14px; font-weight:700; color:var(--green); }

@media (max-width:820px){
  .hero{ flex-direction:column; padding:36px 20px; }
  .hero-title{ font-size:40px; }
  .ha-card{ min-height:260px; width:100%; }
  .home-quick{ grid-template-columns:1fr; }
}
@media (prefers-reduced-motion:reduce){ .ha-bars i { animation:none; height:var(--h); } }

/* ---- Calculator page ---- */
.calc-wrap { display:flex; min-height:calc(100vh - 70px); }
.calc-rail { width:248px; padding:32px 24px; border-right:1px solid var(--border); flex-shrink:0; }
.rail-strat { display:block; width:100%; text-align:left; background:none; border:0; cursor:pointer;
  font-size:14px; letter-spacing:.6px; font-weight:700; color:var(--text-grey); padding:13px 14px; border-radius:8px; }
.rail-strat.active { background:var(--green-light); color:var(--text); }
.rail-logo { height:28px; width:auto; vertical-align:middle; margin-right:9px; border-radius:4px; }
.result-logo { height:74px; width:auto; filter:drop-shadow(0 2px 6px rgba(0,0,0,.18)); }
@media (max-width:560px){ .result-logo { height:56px; } }
.rail-subtabs { margin:6px 0 18px; }
.rail-sub { display:block; width:100%; text-align:left; background:none; border:0; cursor:pointer;
  font-size:14px; color:var(--text-grey); padding:10px 14px; border-radius:8px; }
.rail-sub.active { background:var(--green); color:#fff; font-weight:600; }
.calc-main { flex:1; min-width:0; display:block; padding:56px 48px; }
.calc-panel { width:100%; }
.calc-center { flex:1; min-width:280px; }
.calc-headline { font-size:46px; line-height:1.05; font-weight:800; letter-spacing:-1px; color:var(--green); margin:0; }
.calc-tagline { margin-top:18px; color:var(--text-grey); font-size:17px; }
.calc-card { width:420px; max-width:100%; background:var(--white); border:1px solid var(--border); border-radius:18px;
  box-shadow:0 10px 40px rgba(0,0,0,.06); padding:28px; }
.card-toggle-row { display:flex; align-items:center; justify-content:space-between; margin-bottom:18px; }
.card-toggle-lbl { font-size:14px; color:var(--text-grey); }
.card-title { font-size:19px; font-weight:700; margin-bottom:16px; }
.seg { display:flex; background:var(--field); border-radius:9px; padding:3px; }
.seg-btn { border:0; background:transparent; padding:8px 16px; border-radius:7px; font-size:14px; cursor:pointer; color:var(--text-grey); }
.seg-btn.active { background:#fff; color:var(--text); font-weight:600; box-shadow:0 1px 3px rgba(0,0,0,.1); }
.two-col { display:grid; grid-template-columns:1fr 1fr; gap:14px; }
.qual-box { background:var(--green-light); border:1px solid var(--border); border-radius:10px; padding:12px 14px;
  display:flex; align-items:center; justify-content:space-between; }
.qual-q { font-size:14px; font-weight:600; }
.qual-note { font-size:12px; color:var(--text-grey); }
@media (max-width:620px){ .qual-box { flex-direction:column; align-items:flex-start; gap:10px; } }
.form-hint { display:block; margin-top:6px; font-size:12px; line-height:1.4; color:var(--green-accent); font-weight:600; }
.advanced-box { margin-top:18px; padding:16px; background:var(--field); border:1px solid var(--border); border-radius:10px; }
.advanced-title { font-size:13px; font-weight:600; }
.advanced-note { font-size:11px; color:var(--text-grey); margin-bottom:14px; }
.admin-mode { border-top:1px solid var(--border); margin-top:16px; padding-top:16px; }
.anim-row { display:flex; align-items:center; justify-content:center; gap:6px; margin-top:12px; }
.anim-row input { accent-color:var(--green); }
.anim-row label { font-size:12px; color:var(--text-grey); cursor:pointer; }

/* Calculator Parameters: sectioned layout + collapsible Advanced (declutter pass).
   Reuses the .form-section / .form-section-title pattern; scoped to .calc-card so it
   doesn't touch the admin forms that share those classes. */
.calc-card .form-section { margin-bottom:0; padding-top:18px; border-top:1px solid var(--border); }
.calc-card .form-section:first-of-type { padding-top:6px; border-top:none; }
.calc-card .form-section-title { margin:0 0 14px; }
.calc-card .form-section > .form-group:last-child,
.calc-card .form-section > .two-col:last-child .form-group { margin-bottom:0; }
.calc-card .form-section .card-toggle-row { margin-bottom:14px; }
.calc-card .form-section .card-toggle-row:last-child { margin-bottom:0; }
/* Hints read as quiet helper text, not loud green labels. */
.calc-card .form-hint { color:var(--text-grey); font-weight:500; }
/* Collapsible Advanced — a section header you can open, with a rotating chevron. */
.calc-card details.adv-details { padding-top:18px; border-top:1px solid var(--border); }
.calc-card details.adv-details > summary {
  list-style:none; cursor:pointer; display:flex; align-items:center; gap:8px;
  font-size:12px; text-transform:uppercase; letter-spacing:0.5px; color:var(--text-grey); font-weight:600;
}
.calc-card details.adv-details > summary::-webkit-details-marker { display:none; }
.calc-card details.adv-details > summary::before {
  content:"\25B8"; font-size:10px; color:var(--text-grey); transition:transform .15s;
}
.calc-card details.adv-details[open] > summary::before { transform:rotate(90deg); }
.calc-card details.adv-details[open] > summary { margin-bottom:14px; }
.calc-card details.adv-details > summary:hover { color:var(--text); }
.calc-card .adv-details .advanced-box { margin-top:0; }
.calc-card .adv-details .advanced-title, .calc-card .adv-details .advanced-note { display:none; }
/* On phones the label + segmented control stack instead of squeezing side by side. */
@media (max-width:620px){
  .calc-card .form-section .card-toggle-row { flex-direction:column; align-items:flex-start; gap:8px; }
}
@media (max-width:900px){ .calc-wrap{ flex-direction:column; } .calc-rail{ width:100%; border-right:0; border-bottom:1px solid var(--border); }
  .calc-main{ padding:28px 20px; } .calc-headline{ font-size:34px; } .calc-card{ width:100%; } .two-col{ grid-template-columns:1fr; } }

/* ============================================================
   Board #16: Estimator sub-tab bar
   Replaces the left rail (now hidden) with a horizontal bar that
   shows the active strategy's name + logo and the 3 sub-tab buttons.
   ============================================================ */
.calc-wrap { flex-direction:column; }
.calc-subtab-bar {
  display:flex;
  align-items:center;
  gap:0;
  border-bottom:1px solid var(--border);
  padding:0 48px;
  background:var(--white);
  flex-shrink:0;
}
.calc-subtab-strategy {
  display:flex;
  align-items:center;
  gap:10px;
  padding:14px 0;
  margin-right:32px;
  border-right:1px solid var(--border);
  padding-right:32px;
  min-width:0;
  flex-shrink:0;
}
.calc-subtab-logo {
  height:40px;
  width:auto;
  flex-shrink:0;
  border-radius:4px;
  filter:drop-shadow(0 1px 4px rgba(0,0,0,.15));
}
.calc-subtab-name {
  font-size:15px;
  font-weight:700;
  color:var(--text);
  letter-spacing:.2px;
  white-space:nowrap;
}
.calc-subtab-tabs {
  display:flex;
  align-items:stretch;
  gap:0;
}
.calc-subtab-btn {
  background:none;
  border:0;
  cursor:pointer;
  font-size:14px;
  font-weight:500;
  color:var(--text-grey);
  padding:16px 20px;
  border-bottom:3px solid transparent;
  margin-bottom:-1px;
  transition:color .15s, border-color .15s;
  white-space:nowrap;
}
.calc-subtab-btn:hover { color:var(--green); }
.calc-subtab-btn.active { color:var(--green); border-bottom-color:var(--green); font-weight:700; }
@media (max-width:900px) {
  .calc-subtab-bar { padding:0 20px; gap:0; }
  .calc-subtab-strategy { margin-right:16px; padding-right:16px; }
  .calc-subtab-btn { padding:14px 14px; font-size:13px; }
}
@media (max-width:600px) {
  .calc-subtab-bar { flex-direction:column; align-items:stretch; padding:0 16px; }
  .calc-subtab-strategy { border-right:0; padding-right:0; margin-right:0; border-bottom:1px solid var(--border); padding-bottom:10px; margin-bottom:0; }
  .calc-subtab-tabs { justify-content:center; flex-wrap:wrap; }
  .calc-subtab-btn { padding:12px 10px; font-size:13px; white-space:normal; }
  /* Estimate hero declutter on phones: the strategy bar above already shows the
     emblem + name, so the big duplicate shield and the redundant "· STRATEGY"
     eyebrow just make the header busy. Drop both; keep headline + tagline, tighter. */
  .est-hero .est-logo { display:none; }
  .est-hero .est-eyebrow { display:none; }
  .est-hero { margin-bottom:16px; gap:0; }
  .est-hero .calc-tagline { font-size:15px; }
}

/* ============================================================
   STRATEGY PAGES REDESIGN (Estimate / How it Works / Apply)
   2026-05-31 — editorial finish on top of the tabbed shell.
   ============================================================ */

/* --- Atmosphere: soft mesh behind the calculator main column --- */
.calc-main {
  background:
    radial-gradient(60% 55% at 88% 0%, rgba(46,139,87,.07), transparent 70%),
    radial-gradient(45% 40% at 0% 12%, rgba(26,92,52,.05), transparent 70%);
}

/* ---------- ESTIMATE PANEL ---------- */
.est-hero { max-width:1180px; margin:0 auto 30px; display:flex; align-items:center; gap:28px; }
.est-hero-text { min-width:0; }
.est-logo { height:148px; width:auto; flex:0 0 auto; filter:drop-shadow(0 3px 9px rgba(0,0,0,.20)); }
.est-eyebrow { display:inline-flex; align-items:center; gap:8px; font-size:12px; font-weight:700;
  letter-spacing:1.6px; text-transform:uppercase; color:var(--green-accent); margin-bottom:18px; }
.est-eyebrow-dot { width:7px; height:7px; border-radius:50%; background:var(--green-accent);
  box-shadow:0 0 0 4px rgba(46,139,87,.15); }
.est-hero .calc-headline { font-family:"Fraunces", Georgia, serif; font-size:54px; line-height:1.02;
  font-weight:600; letter-spacing:-1.2px; color:var(--green); }
.est-hero .calc-headline .hl-accent { color:var(--green-accent); font-style:italic; }
.est-hero .calc-tagline { max-width:620px; }

.est-body { max-width:1180px; margin:0 auto; display:grid;
  grid-template-columns:440px minmax(0,1fr); gap:48px; align-items:start; }
.est-body .calc-card { width:100%; }

.est-aside { position:relative; }
.spot-card { background:linear-gradient(150deg, var(--green-accent) 0%, var(--green) 100%); color:#fff;
  border-radius:18px; padding:26px 26px 28px; box-shadow:0 16px 40px rgba(20,73,42,.22); position:relative; overflow:hidden; }
.spot-card::after { content:""; position:absolute; right:-40px; top:-40px; width:160px; height:160px;
  border-radius:50%; background:radial-gradient(circle, rgba(255,255,255,.14), transparent 70%); }
.spot-tag { font-size:12px; font-weight:700; letter-spacing:1.4px; text-transform:uppercase;
  color:rgba(255,255,255,.72); margin-bottom:12px; }
.spot-lede { font-size:19px; line-height:1.5; font-weight:400; }
.spot-lede strong { color:#fff; font-weight:700; border-bottom:2px solid rgba(255,255,255,.5); }

.benefit-list { list-style:none; margin:22px 0 0; padding:0; display:flex; flex-direction:column; gap:2px; }
.benefit-list li { display:flex; gap:14px; align-items:flex-start; padding:14px 4px; border-bottom:1px solid var(--border); }
.benefit-list li:last-child { border-bottom:0; }
.bl-ico { flex-shrink:0; width:38px; height:38px; border-radius:11px; background:var(--green-light);
  color:var(--green); display:flex; align-items:center; justify-content:center; font-size:17px; font-weight:700; }
.benefit-list b { display:block; font-size:15px; color:var(--text); }
.benefit-list span:not(.bl-ico) { display:block; font-size:13px; color:var(--text-grey); margin-top:2px; line-height:1.45; }

.mini-viz { margin-top:22px; background:var(--white); border:1px solid var(--border); border-radius:14px; padding:18px 18px 16px; }
.mv-label { font-size:12px; font-weight:600; letter-spacing:.3px; color:var(--text-grey); margin-bottom:14px; }
.mv-bars { display:flex; align-items:flex-end; gap:10px; height:104px; }
.mv-bars i { flex:1; height:0; border-radius:6px 6px 3px 3px; background:linear-gradient(180deg, var(--green-accent), var(--green));
  transition:height .9s cubic-bezier(.2,.75,.25,1); }
.mv-bars i.oop { background:linear-gradient(180deg, #4b5563, #1f2937); }
.anim-go .mv-bars i { height:var(--h); }
.mv-bars i:nth-child(2){ transition-delay:.08s } .mv-bars i:nth-child(3){ transition-delay:.16s }
.mv-bars i:nth-child(4){ transition-delay:.24s } .mv-bars i:nth-child(5){ transition-delay:.32s }

.aside-link { margin-top:18px; background:none; border:0; color:var(--green); font-weight:700; font-size:14px;
  cursor:pointer; padding:6px 0; display:inline-flex; align-items:center; gap:6px; }
.aside-link:hover { color:var(--green-accent); }

.est-includes { margin-top:22px; background:var(--white); border:1px solid var(--border); border-radius:14px; padding:18px 20px; }
.ei-title { font-size:12px; font-weight:700; letter-spacing:.6px; text-transform:uppercase; color:var(--green-accent); margin-bottom:12px; }
.ei-list { list-style:none; margin:0; padding:0; display:flex; flex-direction:column; gap:10px; }
.ei-list li { display:flex; gap:10px; align-items:center; font-size:14px; color:var(--text); }
.ei-ck { flex-shrink:0; width:20px; height:20px; border-radius:6px; background:var(--green-light); color:var(--green); display:flex; align-items:center; justify-content:center; font-size:12px; font-weight:800; }

/* Stagger the aside reveal */
.est-info .spot-card, .est-info .benefit-list, .est-info .mini-viz, .est-info .aside-link {
  opacity:0; transform:translateY(16px); transition:opacity .6s ease, transform .6s ease; }
.est-info.anim-go .spot-card { opacity:1; transform:none; transition-delay:.02s; }
.est-info.anim-go .benefit-list { opacity:1; transform:none; transition-delay:.12s; }
.est-info.anim-go .mini-viz { opacity:1; transform:none; transition-delay:.22s; }
.est-info.anim-go .aside-link { opacity:1; transform:none; transition-delay:.32s; }

/* ---------- HOW IT WORKS ---------- */
.how-doc { max-width:980px; margin:0 auto; }
.how-hero { text-align:center; padding:8px 0 8px; }
.how-eyebrow { font-size:12px; font-weight:700; letter-spacing:1.8px; text-transform:uppercase;
  color:var(--green-accent); margin-bottom:16px; }
.how-title { font-family:"Fraunces", Georgia, serif; font-size:50px; line-height:1.06; font-weight:600;
  letter-spacing:-1px; color:var(--green); margin:0 auto; max-width:760px; }
.how-lede { max-width:680px; margin:22px auto 0; font-size:18px; line-height:1.65; color:var(--text-grey); }
.how-lede strong { color:var(--text); }
/* Board #30: "money must be moveable" must-know note on ROTH X + Qualified Horizon guides. */
.how-callout { max-width:680px; margin:18px auto 0; padding:14px 18px; font-size:15px; line-height:1.55;
  color:var(--text); background:var(--green-light); border:1px solid var(--border);
  border-left:4px solid var(--green); border-radius:10px; }
.how-callout strong { color:var(--green); }

.how-hero, .how-steps, .how-mechanic, .how-pillars, .how-cta {
  opacity:0; transform:translateY(22px); transition:opacity .7s ease, transform .7s ease; }
.how-doc.anim-go .how-hero { opacity:1; transform:none; transition-delay:.02s; }
.how-doc.anim-go .how-steps { opacity:1; transform:none; transition-delay:.14s; }
.how-doc.anim-go .how-mechanic { opacity:1; transform:none; transition-delay:.24s; }
.how-doc.anim-go .how-pillars { opacity:1; transform:none; transition-delay:.34s; }
.how-doc.anim-go .how-cta { opacity:1; transform:none; transition-delay:.42s; }

.how-steps { display:grid; grid-template-columns:repeat(4,1fr); gap:18px; margin:48px 0; }
.how-step { background:var(--white); border:1px solid var(--border); border-radius:16px; padding:22px 20px;
  position:relative; box-shadow:0 6px 24px rgba(0,0,0,.04); }
.step-n { display:inline-flex; align-items:center; justify-content:center; width:36px; height:36px;
  border-radius:11px; background:var(--green); color:#fff; font-family:"Fraunces",serif; font-weight:600;
  font-size:18px; margin-bottom:14px; }
.how-step h3 { font-size:16px; color:var(--green); margin-bottom:8px; }
.how-step p { font-size:13.5px; line-height:1.55; color:var(--text-grey); }

.how-mechanic { display:grid; grid-template-columns:1fr 1fr; gap:40px; align-items:center;
  background:linear-gradient(160deg, #fbfdfb, #f1f5f2); border:1px solid var(--border);
  border-radius:22px; padding:40px; margin:0 0 48px; }
.mech-kicker { font-size:12px; font-weight:700; letter-spacing:1.4px; text-transform:uppercase;
  color:var(--green-accent); margin-bottom:12px; }
.mech-copy h2 { font-family:"Fraunces",Georgia,serif; font-size:32px; line-height:1.12; font-weight:600;
  color:var(--green); margin-bottom:14px; letter-spacing:-.5px; }
.mech-copy p { font-size:15.5px; line-height:1.65; color:var(--text-grey); }
.mech-legend { display:flex; gap:20px; margin-top:18px; font-size:13px; color:var(--text-grey); }
.mech-legend span { display:inline-flex; align-items:center; gap:7px; }
.mech-legend .dot { width:11px; height:11px; border-radius:3px; }
.dot.market,.dot.lump { background:#cbd5e1; } .dot.policy { background:var(--green); }
.dot.oop { background:#1f2937; }
.mech-foot { margin-top:16px; padding-top:14px; border-top:1px solid var(--border);
  font-size:12.5px; line-height:1.5; color:var(--text-light); }

/* Guaranteed-rails viz (Horizon SPIA) */
.rails-viz { display:flex; flex-direction:column; justify-content:flex-end; }
.rv-track { display:flex; align-items:flex-end; gap:14px; height:200px; }
.rv-pay { flex:1; display:flex; flex-direction:column; align-items:center; gap:8px; }
.rv-pay i { width:100%; height:0; border-radius:9px 9px 0 0;
  background:linear-gradient(180deg, var(--green-accent), var(--green));
  transition:height .8s cubic-bezier(.2,.75,.25,1); }
/* Lock badge sits ABOVE each bar as its own flex item — never overlaps the Yr labels. */
.rv-pay::before { content:"\1F512"; font-size:13px; line-height:1; opacity:0;
  transition:opacity .4s ease .5s; }
.anim-go .rv-pay i { height:80%; } .anim-go .rv-pay::before { opacity:.85; }
.rv-pay span { font-size:11px; font-weight:700; color:var(--text-grey); letter-spacing:.3px; }
.rv-pay:nth-child(2) i { transition-delay:.1s } .rv-pay:nth-child(3) i { transition-delay:.2s }
.rv-pay:nth-child(4) i { transition-delay:.3s } .rv-pay:nth-child(5) i { transition-delay:.4s }
.rv-cap { margin-top:14px; text-align:center; font-size:12.5px; font-weight:600; color:var(--green); }

.mech-viz { position:relative; min-height:220px; }
/* Floor viz (Horizon) */
.floor-viz { display:flex; flex-direction:column; justify-content:flex-end; }
.fv-zero { position:absolute; left:0; right:0; bottom:46px; border-top:2px dashed rgba(26,92,52,.4);
  font-size:11px; font-weight:700; color:var(--green); text-align:right; padding-right:2px; line-height:0; }
.fv-cols { display:flex; align-items:flex-end; gap:14px; height:200px; padding-bottom:0; }
.fv-col { flex:1; display:flex; align-items:flex-end; justify-content:center; gap:5px; position:relative; }
.fv-col i { width:14px; border-radius:5px 5px 0 0; height:0; transition:height .8s cubic-bezier(.2,.75,.25,1); }
.fv-col .m { background:#cbd5e1; } .fv-col .p { background:var(--green); }
.fv-col .m.down { background:#e2a8a8; align-self:flex-start; border-radius:0 0 5px 5px; }
.anim-go .fv-col .m.up { height:var(--h); } .anim-go .fv-col .p.up { height:var(--h); }
.anim-go .fv-col .p.floor { height:8px; }
.fv-col:nth-child(2) i { transition-delay:.1s } .fv-col:nth-child(3) i { transition-delay:.2s }
.fv-col:nth-child(4) i { transition-delay:.3s } .fv-col:nth-child(5) i { transition-delay:.4s }

/* Bracket viz (ROTH X) */
.bracket-viz { display:flex; align-items:flex-end; justify-content:center; gap:22px; height:220px; }
.bv-group { display:flex; flex-direction:column; align-items:center; gap:10px; }
.bv-bar { display:flex; align-items:flex-end; gap:6px; height:170px; }
.bv-bar i { width:30px; height:0; border-radius:6px 6px 0 0; transition:height .9s cubic-bezier(.2,.75,.25,1); }
.bv-bar.one i { width:46px; background:linear-gradient(180deg,#b45309,#7c2d12); position:relative; }
.bv-bar.spread i { background:linear-gradient(180deg,var(--green-accent),var(--green)); }
.bv-bar.spread i:nth-child(2){transition-delay:.1s} .bv-bar.spread i:nth-child(3){transition-delay:.2s} .bv-bar.spread i:nth-child(4){transition-delay:.3s}
.anim-go .bv-bar i { height:var(--h); }
.bv-tax { position:absolute; top:-22px; left:50%; transform:translateX(-50%); font-size:11px; font-weight:700; color:#b45309; white-space:nowrap; }
.bv-bar.one { position:relative; }
.bv-cap { font-size:12.5px; font-weight:600; color:var(--text-grey); }
.bv-vs { font-family:"Fraunces",serif; font-style:italic; font-size:18px; color:var(--text-light); align-self:center; }

/* Climb viz (Excelerator) */
.climb-viz { display:flex; flex-direction:column; gap:12px; }
.cv-track { display:flex; align-items:flex-end; gap:9px; height:190px;
  border-bottom:2px solid var(--border); padding-top:6px; }
.cv { flex:1; height:0; border-radius:6px 6px 0 0; background:linear-gradient(180deg,var(--green-accent),var(--green));
  transition:height .85s cubic-bezier(.2,.75,.25,1); }
.cv.oop { background:linear-gradient(180deg,#4b5563,#1f2937); }
.anim-go .cv { height:var(--h); }
.cv:nth-child(2){transition-delay:.08s} .cv:nth-child(3){transition-delay:.16s} .cv:nth-child(4){transition-delay:.24s}
.cv:nth-child(5){transition-delay:.32s} .cv:nth-child(6){transition-delay:.40s} .cv:nth-child(7){transition-delay:.48s} .cv:nth-child(8){transition-delay:.56s}
.cv-axis { display:flex; justify-content:space-between; font-size:11.5px; color:var(--text-grey); font-weight:600; }

/* Stream viz (Indextra) — a lump funds a steady guaranteed income into the policy */
.stream-viz { display:flex; flex-direction:column; justify-content:center; gap:16px; }
.sv-flow { display:flex; align-items:center; gap:12px; }
.sv-node { flex-shrink:0; min-width:72px; padding:16px 10px; border-radius:14px; text-align:center;
  font-weight:700; font-size:13px; line-height:1.2; color:#fff; }
.sv-lump { background:linear-gradient(180deg,#4b5563,#1f2937); }
.sv-policy { background:linear-gradient(180deg,var(--green-accent),var(--green)); }
.sv-arrow { color:var(--green-accent); font-size:20px; font-weight:700; flex-shrink:0; }
.sv-stream { flex:1; display:flex; align-items:flex-end; justify-content:space-between; gap:6px; height:120px; }
.sv-stream i { flex:1; height:0; border-radius:5px 5px 0 0;
  background:linear-gradient(180deg,var(--green-accent),var(--green));
  transition:height .7s cubic-bezier(.2,.75,.25,1); }
.anim-go .sv-stream i { height:70%; }
.sv-stream i:nth-child(2){transition-delay:.08s} .sv-stream i:nth-child(3){transition-delay:.16s}
.sv-stream i:nth-child(4){transition-delay:.24s} .sv-stream i:nth-child(5){transition-delay:.32s}
.sv-stream i:nth-child(6){transition-delay:.40s} .sv-stream i:nth-child(7){transition-delay:.48s}
.sv-cap { text-align:center; font-size:12.5px; font-weight:600; color:var(--green); }

.how-pillars { display:grid; grid-template-columns:repeat(3,1fr); gap:20px; margin:0 0 48px; }
.pillar { padding:24px; border-left:3px solid var(--green-accent); background:var(--white);
  border-radius:0 14px 14px 0; box-shadow:0 6px 22px rgba(0,0,0,.04); }
.pillar h4 { font-size:16px; color:var(--green); margin-bottom:8px; }
.pillar p { font-size:14px; line-height:1.55; color:var(--text-grey); }

.how-cta { text-align:center; padding:40px; background:var(--green); border-radius:22px; color:#fff; }
.how-cta h3 { font-family:"Fraunces",serif; font-weight:600; font-size:28px; margin-bottom:22px; }
.how-cta-btns { display:flex; gap:14px; justify-content:center; flex-wrap:wrap; }
.btn-ghost { background:transparent; color:#fff; border:1.5px solid rgba(255,255,255,.55); }
.btn-ghost:hover { background:rgba(255,255,255,.12); border-color:#fff; }
.how-disclaimer { max-width:760px; margin:26px auto 0; text-align:center; font-size:11.5px;
  line-height:1.5; color:var(--text-light); }

/* ---------- APPLY NOW ---------- */
.apply-doc { max-width:920px; margin:0 auto; }
.apply-hero { text-align:center; }
.apply-grid { display:grid; grid-template-columns:1fr 1fr; gap:28px; margin:44px 0 26px; align-items:stretch; }
.apply-cta-card { background:linear-gradient(155deg, var(--green) 0%, #14492a 100%); color:#fff;
  border-radius:22px; padding:38px 32px; text-align:center; box-shadow:0 20px 50px rgba(20,73,42,.28);
  display:flex; flex-direction:column; align-items:center; justify-content:center; }
.acc-avatar { width:64px; height:64px; border-radius:18px; background:rgba(255,255,255,.16);
  display:flex; align-items:center; justify-content:center; font-family:"Fraunces",serif; font-weight:600;
  font-size:24px; margin-bottom:18px; }
.acc-name { font-size:18px; font-weight:700; }
.acc-role { font-size:13.5px; color:rgba(255,255,255,.72); margin:6px 0 24px; line-height:1.45; }
.meet-btn { background:var(--white); color:var(--green); font-size:16px; }
.meet-btn:hover { background:#f0f0f0; }
.acc-note { font-size:12.5px; color:rgba(255,255,255,.7); margin-top:16px; }

.apply-expect { background:var(--white); border:1px solid var(--border); border-radius:22px; padding:32px;
  box-shadow:0 8px 28px rgba(0,0,0,.05); }
.ae-title { font-size:13px; font-weight:700; letter-spacing:1.2px; text-transform:uppercase;
  color:var(--green-accent); margin-bottom:20px; }
.ae-list { list-style:none; margin:0; padding:0; display:flex; flex-direction:column; gap:20px; }
.ae-list li { display:flex; gap:16px; align-items:flex-start; }
.ae-n { flex-shrink:0; width:34px; height:34px; border-radius:10px; background:var(--green-light);
  color:var(--green); display:flex; align-items:center; justify-content:center; font-family:"Fraunces",serif; font-weight:600; }
.ae-list b { display:block; font-size:15.5px; color:var(--text); margin-bottom:3px; }
.ae-list p { font-size:13.5px; line-height:1.55; color:var(--text-grey); }

.apply-reassure { display:flex; gap:26px; justify-content:center; flex-wrap:wrap;
  font-size:13px; font-weight:600; color:var(--green); }
.apply-reassure span { display:inline-flex; align-items:center; gap:7px; }

/* Board #34: embedded Calendly calendar on the Apply tab. */
.apply-calendar { min-width:320px; height:720px; margin:32px 0 8px; border:1px solid var(--border);
  border-radius:18px; overflow:hidden; background:var(--white); }
.apply-fallback { text-align:center; font-size:13px; color:var(--text-grey); margin:0 0 26px; }
.apply-fallback a { color:var(--green); font-weight:600; }
.apply-expect { margin-bottom:26px; }

.apply-doc .apply-hero, .apply-doc .apply-calendar, .apply-doc .apply-expect, .apply-doc .apply-reassure {
  opacity:0; transform:translateY(20px); transition:opacity .7s ease, transform .7s ease; }
.apply-doc.anim-go .apply-hero { opacity:1; transform:none; transition-delay:.02s; }
.apply-doc.anim-go .apply-calendar { opacity:1; transform:none; transition-delay:.16s; }
.apply-doc.anim-go .apply-expect { opacity:1; transform:none; transition-delay:.24s; }
.apply-doc.anim-go .apply-reassure { opacity:1; transform:none; transition-delay:.3s; }

/* ---------- RESPONSIVE ---------- */
@media (max-width:960px){
  .est-body { grid-template-columns:1fr; gap:30px; }
  .est-hero .calc-headline { font-size:40px; }
  .how-mechanic { grid-template-columns:1fr; gap:28px; padding:28px; }
  .how-steps { grid-template-columns:repeat(2,1fr); }
  .apply-grid { grid-template-columns:1fr; }
}
@media (max-width:560px){
  .calc-main { padding:24px 18px; }
  .est-hero { flex-direction:column; align-items:flex-start; gap:16px; }
  .est-logo { height:102px; }
  .est-hero .calc-headline { font-size:33px; }
  .how-title { font-size:34px; }
  .how-lede { font-size:16px; }
  .how-steps { grid-template-columns:1fr; }
  .how-pillars { grid-template-columns:1fr; }
  .mech-copy h2 { font-size:26px; }
  .how-cta { padding:28px 22px; }
  .how-cta h3 { font-size:23px; }
  .spot-lede { font-size:17px; }
}
@media (prefers-reduced-motion:reduce){
  .est-info *, .how-doc *, .apply-doc *, .mv-bars i, .fv-col i, .bv-bar i, .cv {
    transition:none !important; }
}

/* ============================================================
   WHY IUL PAGE (first-principles client page + canvas module)
   2026-06-01 — reuses brand tokens, Fraunces display, .pillar/.btn.
   ============================================================ */
.wiul-wrap { max-width:1080px; margin:0 auto; padding:56px 24px 72px;
  background:
    radial-gradient(55% 40% at 92% 2%, rgba(46,139,87,.07), transparent 70%),
    radial-gradient(45% 35% at 2% 16%, rgba(26,92,52,.05), transparent 70%); }
.wiul-module { margin-bottom:64px; }
.wiul-module:last-of-type { margin-bottom:0; }

.wiul-hero { text-align:center; max-width:760px; margin:0 auto 8px; }
.wiul-mod-head { max-width:720px; margin:0 auto 26px; text-align:center; }
.wiul-h2 { font-family:"Fraunces", Georgia, serif; font-size:34px; line-height:1.1; font-weight:600;
  letter-spacing:-.5px; color:var(--green); margin:6px 0 0; }
.wiul-mod-sub { margin-top:16px; font-size:16.5px; line-height:1.6; color:var(--text-grey); }
.wiul-mod-sub em, .wiul-h2 em { font-style:italic; color:var(--green-accent); }

/* --- animation card --- */
.wiul-anim-card { background:#fff; border:1px solid var(--border); border-radius:22px;
  padding:26px; box-shadow:0 16px 44px rgba(0,0,0,.06); }
.wiul-controls { display:flex; flex-wrap:wrap; align-items:flex-end; gap:18px 28px; margin-bottom:18px; }
.wiul-ctl-group { display:flex; flex-direction:column; gap:8px; }
.wiul-ctl-lbl { font-size:12px; font-weight:700; letter-spacing:.6px; text-transform:uppercase; color:var(--text-grey); }
.wiul-ctl-lbl b { color:var(--green); font-size:13px; }
.wiul-seg { width:fit-content; }
/* Board #33: real S&P year-range chip under the scenario picker. */
.wiul-years { display:inline-block; margin-top:6px; font-size:12px; font-weight:700;
  color:var(--green); font-variant-numeric:tabular-nums; }
.wiul-slider { width:200px; max-width:100%; accent-color:var(--green); height:4px; cursor:pointer; }
.wiul-floor-chip { margin-left:auto; align-self:center; background:var(--green-light); color:var(--green);
  border:1px solid var(--border); border-radius:999px; padding:8px 14px; font-size:12.5px; font-weight:700; white-space:nowrap; }
.wiul-lock { filter:grayscale(1); opacity:.7; }
.wiul-method-note { margin:-4px 0 14px; font-size:12.5px; line-height:1.5; color:var(--text-light); }
.wiul-market { display:flex; align-items:center; justify-content:center; gap:10px; margin:4px 0 14px; }
.wm-lbl { font-size:12px; font-weight:700; letter-spacing:.5px; text-transform:uppercase; color:var(--text-grey); }
.wm-val { font-size:15px; font-weight:800; padding:3px 14px; border-radius:999px; background:var(--field); color:var(--text-grey); transition:background .25s, color .25s; }
.wm-val.up { background:rgba(26,92,52,.12); color:var(--green); }
.wm-val.down { background:rgba(220,38,38,.12); color:#dc2626; }

.wiul-canvas-box { position:relative; }
#wiul-canvas, #wiul-loan-canvas, #wiul-climb-canvas { width:100%; height:360px; display:block; }
.wiul-replay { margin-left:auto; align-self:center; background:var(--green-light); color:var(--green);
  border:1px solid var(--border); border-radius:999px; padding:8px 16px; font-size:13px; font-weight:700; cursor:pointer; }
.wiul-replay:hover { background:var(--green-light); filter:brightness(.97); }
/* Board #36: loan-module stepper (Back · dots · Next). */
.wiul-stepper { margin-left:auto; align-self:center; display:flex; align-items:center; gap:10px; }
.wiul-stepper .wiul-replay { margin-left:0; }
.wiul-stepper .wiul-replay:disabled { opacity:.45; cursor:default; }
.wiul-next { background:var(--green); color:#fff; border-color:var(--green); }
.wiul-next:hover { background:var(--btn-hover, var(--green)); filter:none; }
.wiul-step-dots { display:flex; gap:6px; }
.wiul-step-dots .wsd { width:8px; height:8px; border-radius:50%; background:var(--border); display:inline-block; transition:background .15s; }
.wiul-step-dots .wsd.on { background:var(--green); }
.wiul-hyp { position:absolute; top:8px; right:10px; font-size:11px; font-weight:700; letter-spacing:.4px;
  color:var(--text-light); background:rgba(255,255,255,.7); padding:2px 8px; border-radius:6px; }

/* Dark-mode: the animation card and the "Hypothetical" pill hardcode white
   surfaces. The canvas modules now read theme colors (see why_iul.html
   _wiulTheme()), so the card behind them must go dark too or the themed grid/
   labels would sit on a glaring white panel. */
html[data-theme="dark"] .wiul-anim-card { background:var(--white); }
html[data-theme="dark"] .wiul-hyp { background:rgba(24,33,28,.72); }

.wiul-caption { margin-top:6px; min-height:24px; text-align:center; font-size:15px; color:var(--text); }
.wiul-caption b { color:var(--green); }

.wiul-legend { display:flex; flex-wrap:wrap; gap:10px 22px; justify-content:center; margin-top:16px;
  padding-top:16px; border-top:1px solid var(--border); font-size:12.5px; color:var(--text-grey); }
.wiul-leg { display:inline-flex; align-items:center; gap:8px; }
.wl-line { width:20px; height:0; border-top-width:3px; border-top-style:solid; border-radius:2px; }
.wl-line.green { border-top-color:var(--green); }
.wl-line.navy { border-top-color:#1e293b; border-top-style:dashed; }
.wl-swatch { width:14px; height:14px; border-radius:4px; }
.wl-swatch.green { background:rgba(26,92,52,.20); }
.wl-swatch.navy { background:rgba(30,41,59,.16); }

/* Crediting mechanic: static floor/cap/spread graphic shown BEFORE the 20-year simulation */
.wiul-credit-card { max-width:760px; margin:0 auto; background:var(--white); border:1px solid var(--border);
  border-radius:18px; box-shadow:0 10px 30px rgba(0,0,0,.06); padding:24px 22px; }
.wcredit-grid { display:grid; grid-template-columns:1fr 1fr; gap:14px; }
.wcredit-col { border:1px solid var(--border); border-radius:14px; padding:14px 8px 8px; }
.wcredit-cap { text-align:center; font-size:13px; font-weight:800; letter-spacing:.2px; color:var(--text); margin:0 0 4px; }
.wcredit-svg { width:100%; height:auto; display:block; }
.wcredit-foot { text-align:center; font-size:13px; line-height:1.55; color:var(--text-grey); margin:14px auto 0; max-width:640px; }
.wcredit-foot b { color:var(--green); }
@media(max-width:600px){ .wcredit-grid { grid-template-columns:1fr; } }

.wiul-stats { display:flex; flex-wrap:wrap; justify-content:center; gap:14px; margin-top:18px; }
.wiul-stat { flex:1; min-width:160px; max-width:240px; background:var(--bg); border:1px solid var(--border);
  border-radius:14px; padding:14px 18px; text-align:center; }
.ws-lbl { display:block; font-size:11.5px; font-weight:700; letter-spacing:.5px; text-transform:uppercase; color:var(--text-grey); }
.ws-val { display:block; margin-top:4px; font-family:"Fraunces",serif; font-weight:600; font-size:26px; }
.ws-val.green { color:var(--green); } .ws-val.navy { color:#1e293b; }
.wiul-takeaway { margin:16px auto 0; max-width:680px; text-align:center; font-size:14.5px; line-height:1.6; color:var(--text-grey); }
.wiul-takeaway strong { color:var(--green); }
.wiul-tax { margin-top:20px; padding-top:18px; border-top:1px dashed var(--border); }
.wt-title { text-align:center; font-size:15px; font-weight:700; color:var(--text); margin-bottom:14px; }
.wt-title em { font-style:italic; color:var(--green-accent); }
.wt-note { max-width:680px; margin:12px auto 0; text-align:center; font-size:11px; line-height:1.5; color:var(--text-light); }
.wiul-notes { max-width:none; margin-top:20px; }

/* --- pillars --- */
.wiul-pillars { display:grid; grid-template-columns:repeat(3,1fr); gap:18px; }
.wiul-pillar { background:var(--white); border:1px solid var(--border); border-radius:18px; padding:26px 24px;
  box-shadow:0 8px 26px rgba(0,0,0,.04); }
.wp-num { font-family:"Fraunces",serif; font-weight:600; font-size:22px; color:var(--green-accent); margin-bottom:12px; }
.wiul-pillar h3 { font-size:17px; color:var(--green); margin-bottom:9px; }
.wiul-pillar p { font-size:14px; line-height:1.6; color:var(--text-grey); }
.wiul-pillar-quiet { background:var(--green-light); border-color:transparent; }
/* Board #37: "too good to be true" cards — the design answer under each risk.
   Team review 2026-06-10: labeled answer block instead of an inline run-on. */
.wtg-ans { margin-top:12px; padding:10px 12px; border-radius:10px; background:var(--green-light);
  font-size:13px; line-height:1.55; color:var(--text); }
.wtg-ans .wtg-lbl { display:flex; align-items:center; gap:6px; font-size:10.5px; font-weight:800;
  letter-spacing:.08em; text-transform:uppercase; color:var(--green); margin-bottom:5px; }
.wtg-ans .wcc-check { width:17px; height:17px; font-size:10px; border-radius:5px; background:var(--white); }
.wtg-ans p { margin:0; }
.wtg-ans b { color:var(--green); }

/* --- liquidity comparison (real estate vs IUL) --- */
.wiul-compare { display:grid; grid-template-columns:1fr 1fr; gap:18px; }
.wiul-comp-card { background:var(--white); border:1px solid var(--border); border-radius:18px;
  padding:26px 24px; box-shadow:0 8px 26px rgba(0,0,0,.04); }
.wiul-comp-card.green { background:linear-gradient(160deg,#fbfdfb,#f1f5f2); border-color:rgba(26,92,52,.25); }

/* Dark-mode: the page-body cards (pillars + comparison cards) and the green
   comparison card's light gradient hardcode bright surfaces — they would glare
   against the dark page. Retokenized the plain cards to var(--white); the green
   card keeps its light gradient in light mode and gets a dark surface here. The
   small "X" badge (#f1f5f9) is also a light spot in dark — drop it to a panel. */
html[data-theme="dark"] .wiul-comp-card.green {
  background:linear-gradient(160deg, rgba(61,160,106,.10), rgba(61,160,106,.05)); }
html[data-theme="dark"] .wcc-x { background:var(--field); color:var(--text-grey); }
.wcc-tag { font-size:12px; font-weight:700; letter-spacing:.6px; text-transform:uppercase; margin-bottom:16px; }
.wcc-tag.navy { color:#475569; }
.wcc-tag.green { color:var(--green); }
.wcc-list { list-style:none; margin:0; padding:0; display:flex; flex-direction:column; gap:12px; }
.wcc-list li { display:flex; gap:11px; align-items:flex-start; font-size:14.5px; line-height:1.5; color:var(--text); }
.wcc-list em { font-style:italic; color:var(--green-accent); }
.wcc-x, .wcc-check { flex-shrink:0; width:22px; height:22px; border-radius:7px; display:flex;
  align-items:center; justify-content:center; font-size:13px; font-weight:800; margin-top:1px; }
.wcc-x { background:#f1f5f9; color:#94a3b8; }
.wcc-check { background:var(--green-light); color:var(--green); }
@media (max-width:860px){ .wiul-compare { grid-template-columns:1fr; } }

/* --- forward connect (green band) --- */
.wiul-connect { background:linear-gradient(155deg, var(--green) 0%, #14492a 100%);
  border-radius:26px; padding:48px 40px; }
.wiul-connect-inner { max-width:680px; margin:0 auto; text-align:center; }
.wiul-connect-sub { margin-top:16px; font-size:16px; line-height:1.6; color:rgba(255,255,255,.82); }
.wiul-connect-chips { display:flex; flex-wrap:wrap; justify-content:center; gap:12px; margin:26px 0 22px; }
.wiul-chip { background:rgba(255,255,255,.12); border:1px solid rgba(255,255,255,.35); color:#fff;
  border-radius:999px; padding:10px 20px; font-weight:600; font-size:14.5px; transition:background .15s; }
.wiul-chip:hover { background:rgba(255,255,255,.22); color:#fff; }
.wiul-connect-cta { display:inline-block; }
.wiul-foot-disc { max-width:880px; margin:40px auto 0; }

/* --- responsive --- */
@media (max-width:860px){
  .wiul-pillars { grid-template-columns:repeat(2,1fr); }
  .wiul-h2 { font-size:28px; }
}
@media (max-width:560px){
  .wiul-wrap { padding:34px 16px 54px; }
  .wiul-module { margin-bottom:48px; }
  .wiul-pillars { grid-template-columns:1fr; }
  .wiul-h2 { font-size:25px; }
  #wiul-canvas, #wiul-loan-canvas, #wiul-climb-canvas { height:300px; }
  .wiul-floor-chip { margin-left:0; }
  .wiul-controls { gap:16px; }
  /* Segmented controls: let the buttons wrap + tighten padding so the 3-option
     "Market scenario" control can't overflow a narrow phone. */
  .wiul-seg { width:100%; }
  .wiul-seg .seg-row, .wiul-seg > div { flex-wrap:wrap; }
  .seg-btn { padding:8px 11px; font-size:13px; }
  .wiul-connect { padding:34px 22px; }
}

/* ============================================================
   STRATEGY FINDER (guided quiz)
   ============================================================ */
.sf-wrap { max-width:760px; margin:0 auto; padding:56px 24px 72px;
  background:radial-gradient(60% 45% at 90% 0%, rgba(46,139,87,.07), transparent 70%); }
.sf-head { text-align:center; margin-bottom:28px; }
.sf-head .how-title { font-size:40px; }
.sf-card { background:var(--white); border:1px solid var(--border); border-radius:22px;
  padding:36px 34px 26px; box-shadow:0 16px 44px rgba(0,0,0,.06); position:relative; }
.sf-progress { display:flex; gap:8px; justify-content:center; margin-bottom:26px; }
.sf-progress span { width:44px; height:5px; border-radius:999px; background:var(--border); transition:background .3s; }
.sf-progress span.on { background:var(--green); }
.sf-q { font-family:"Fraunces",Georgia,serif; font-size:27px; font-weight:600; color:var(--green);
  text-align:center; line-height:1.15; }
.sf-sub { text-align:center; color:var(--text-grey); font-size:14.5px; margin-top:10px; }
.sf-choices { display:flex; flex-direction:column; gap:12px; margin-top:24px; }
.sf-choice { text-align:left; background:var(--white); border:1.5px solid var(--border); border-radius:14px;
  padding:18px 20px; cursor:pointer; transition:border-color .15s, transform .15s, box-shadow .15s; }
.sf-choice:hover { border-color:var(--green); transform:translateY(-2px); box-shadow:0 10px 26px rgba(0,0,0,.07); }
.sf-choice b { display:block; font-size:16px; color:var(--text); }
.sf-choice span { display:block; font-size:13px; color:var(--text-grey); margin-top:3px; }

.sf-result { text-align:center; }
.sf-rec-eyebrow { font-size:12px; font-weight:700; letter-spacing:1.4px; text-transform:uppercase; color:var(--green-accent); }
.sf-rec-head { display:flex; align-items:center; justify-content:center; gap:16px; margin:14px 0 8px; }
.sf-rec-logo { height:58px; width:auto; filter:drop-shadow(0 2px 6px rgba(0,0,0,.18)); }
.sf-rec-name { font-family:"Fraunces",serif; font-weight:600; font-size:38px; color:var(--green); }
.sf-rec-why { max-width:540px; margin:6px auto 0; font-size:16px; line-height:1.6; color:var(--text-grey); }
.sf-rec-actions { display:flex; gap:12px; justify-content:center; flex-wrap:wrap; margin:26px 0 6px; }
.btn-ghost-dark { background:transparent; color:var(--green); border:1.5px solid var(--green); }
.btn-ghost-dark:hover { background:var(--green-light); color:var(--green); }
.sf-disclaimer { max-width:520px; margin:18px auto 0; font-size:11.5px; line-height:1.5; color:var(--text-light); }

.sf-back, .sf-restart { background:none; border:0; color:var(--text-grey); font-size:13px; font-weight:600;
  cursor:pointer; margin-top:22px; padding:6px 4px; }
.sf-back:hover, .sf-restart:hover { color:var(--green); }
.sf-restart { display:block; margin-left:auto; margin-right:auto; }

@media (max-width:560px){
  .sf-wrap { padding:32px 16px 54px; }
  .sf-head .how-title { font-size:30px; }
  .sf-card { padding:26px 20px 20px; }
  .sf-q { font-size:23px; }
  .sf-rec-name { font-size:30px; }
}

/* ============================================================
   Board #11 — Metric section headers + figure icons
   ============================================================ */

/* Enlarged, centered, bold section headers for results pages.
   Applied to card-header elements that introduce key metric sections. */
.metric-section-header {
  font-size: 20px !important;
  font-weight: 700 !important;
  text-align: center;
  color: var(--green);
  letter-spacing: -0.01em;
}

/* Inline figure icon: sits flush left of a number, vertically centred.
   SVGs are set to currentColor so they inherit the parent's color. */
.fig-icon {
  display: inline-flex;
  align-items: center;
  vertical-align: middle;
  margin-right: 4px;
  opacity: 0.75;
  flex-shrink: 0;
}

/* Left-of-label variant: slightly larger and sits before the metric title */
.fig-icon--left {
  margin-right: 0;
  margin-top: 1px;
  opacity: 0.8;
}

.fig-icon--left svg {
  width: 1.1em;
  height: 1.1em;
}

.fig-icon svg {
  width: 1em;
  height: 1em;
  fill: none;
  stroke: currentColor;
  stroke-width: 2;
  stroke-linecap: round;
  stroke-linejoin: round;
}

/* ---- Proposal Assistant floating widget (F2) ---- */
.pa-fab {
  position: fixed; right: 20px; bottom: 20px; z-index: 1000;
  width: 56px; height: 56px; border-radius: 50%;
  background: #1a5c34; color: #fff; border: none;
  box-shadow: 0 4px 14px rgba(0,0,0,.25); cursor: pointer;
  display: flex; align-items: center; justify-content: center;
  transition: transform .15s ease, box-shadow .15s ease;
}
.pa-fab:hover { transform: translateY(-2px); box-shadow: 0 6px 18px rgba(0,0,0,.30); }
.pa-fab svg { width: 26px; height: 26px; }
.pa-panel {
  position: fixed; right: 20px; bottom: 88px; z-index: 1000;
  width: 360px; max-width: calc(100vw - 32px); max-height: 70vh;
  display: none; flex-direction: column; background: var(--white);
  border: 1px solid var(--border); border-radius: 14px;
  box-shadow: 0 10px 30px rgba(0,0,0,.22); overflow: hidden;
}
.pa-panel.open { display: flex; }
.pa-panel-header {
  display: flex; align-items: center; justify-content: space-between;
  padding: 12px 14px; background: #1a5c34; color: #fff;
  font-family: Georgia, serif; font-size: 15px;
}
.pa-panel-header button {
  background: none; border: none; color: #fff; font-size: 20px;
  line-height: 1; cursor: pointer; padding: 0 4px;
}
.pa-header-actions { display: inline-flex; align-items: center; gap: 4px; }
.pa-panel-header .pa-header-btn {
  font-size: 11px; font-weight: 600; letter-spacing: .3px; text-transform: uppercase;
  padding: 3px 9px; border-radius: 6px; border: 1px solid rgba(255,255,255,.45);
  opacity: .85;
}
.pa-panel-header .pa-header-btn:hover { opacity: 1; background: rgba(255,255,255,.15); }
.pa-chat { flex: 1; overflow-y: auto; padding: 14px; min-height: 160px; }
.pa-bubble {
  margin: 8px 0; padding: 10px 13px; border-radius: 12px;
  max-width: 85%; white-space: pre-wrap; font-size: 14px;
}
.pa-bubble.user { background: #1a5c34; color: #fff; margin-left: auto; }
.pa-bubble.bot  { background: #f1f4f1; color: #222; }
.pa-bubble.bot strong { font-weight: 700; }
.pa-bubble.bot em { font-style: italic; }
.pa-bubble.bot hr { border: none; border-top: 1px solid #d7ddd7; margin: 9px 0; }
.pa-card { margin: 0 14px 12px; border: 1px solid #1a5c34; border-radius: 12px; padding: 12px; font-size: 14px; }
/* The confirm card forces a light-green surface, so pin dark text — otherwise in
   dark mode the text inherits a light color and goes light-on-light (unreadable). */
.pa-card.confirm { background: #eef6f0; color: #16301f; }
.pa-card pre { white-space: pre-wrap; font-family: inherit; margin: 8px 0; }
.pa-foot { padding: 10px 14px; border-top: 1px solid #eef1ee; }
.pa-foot form { display: flex; gap: 6px; }
.pa-foot input { flex: 1; padding: 9px 10px; border: 1px solid #cfd8cf; border-radius: 9px; font-size: 14px; }
.pa-finder { margin-top: 6px; font-size: 12px; padding: 6px 10px; }
.pa-uw-internal {
  display: block;
  font-size: 10px;
  font-weight: 600;
  letter-spacing: .04em;
  text-transform: uppercase;
  color: #7a4f00;
  background: #fff3cd;
  border: 1px solid #e0c060;
  border-radius: 4px;
  padding: 2px 6px;
  margin-bottom: 5px;
}
@media (max-width: 480px) {
  .pa-panel { right: 8px; left: 8px; width: auto; bottom: 80px; }
  .pa-fab { right: 14px; bottom: 14px; }
}
