/* ============================================================
   FINANCIAL PLANNER DEMO
   Pine and marigold. One family: IBM Plex Sans + Plex Sans Condensed.
   The savings journey chart in the hero is the one bold element;
   everything else stays quiet.
   ============================================================ */

@font-face { font-family: 'Plex Sans'; src: url('../fonts/ibm-plex-sans-latin-400-normal.woff2') format('woff2'); font-weight: 400; font-display: swap; }
@font-face { font-family: 'Plex Sans'; src: url('../fonts/ibm-plex-sans-latin-500-normal.woff2') format('woff2'); font-weight: 500; font-display: swap; }
@font-face { font-family: 'Plex Sans'; src: url('../fonts/ibm-plex-sans-latin-600-normal.woff2') format('woff2'); font-weight: 600; font-display: swap; }
@font-face { font-family: 'Plex Condensed'; src: url('../fonts/ibm-plex-sans-condensed-latin-500-normal.woff2') format('woff2'); font-weight: 500; font-display: swap; }
@font-face { font-family: 'Plex Condensed'; src: url('../fonts/ibm-plex-sans-condensed-latin-600-normal.woff2') format('woff2'); font-weight: 600; font-display: swap; }
@font-face { font-family: 'Plex Condensed'; src: url('../fonts/ibm-plex-sans-condensed-latin-700-normal.woff2') format('woff2'); font-weight: 700; font-display: swap; }

:root {
  /* Palette */
  --pine:      #0F3B36;
  --pine-2:    #16504A;
  --pine-deep: #0A2B27;
  --paper:     #EEF2EE;
  --paper-2:   #E1E9E3;
  --panel:     #FAFCFA;
  --ink:       #13211F;
  --mist:      #566A65;
  --marigold:  #F1B23B;
  --marigold-d:#DB9A1F;
  --sea:       #8FC1B1;
  --on-pine:   #EAF1ED;
  --on-pine-2: #A7C1B9;
  --line-dark: color-mix(in srgb, var(--on-pine) 16%, transparent);
  --line-light: color-mix(in srgb, var(--ink) 12%, transparent);

  /* Type */
  --sans: 'Plex Sans', system-ui, -apple-system, 'Segoe UI', sans-serif;
  --cond: 'Plex Condensed', 'Plex Sans', system-ui, sans-serif;
  --fs-xs: 0.8125rem;
  --fs-sm: 0.9375rem;
  --fs-base: 1.0625rem;
  --fs-md: 1.25rem;
  --fs-lg: 1.625rem;
  --fs-xl: clamp(1.9rem, 3.4vw, 2.6rem);
  --fs-xxl: clamp(2.2rem, 4.6vw, 3.5rem);
  --fs-num: clamp(3rem, 7.5vw, 5.75rem);

  --radius: 6px;
  --ease: cubic-bezier(0.22, 1, 0.36, 1);
}

/* ── Themes ───────────────────────────────────────────────────
   Set `theme` in src/data/content.js: "pine", "midnight" or "ember".
   Every other colour in this file is derived from these tokens, so a
   theme swap needs no other edits. All three are checked for WCAG AA
   contrast on text. */

/* Midnight — deep navy, amber, steel blue */
[data-theme="midnight"] {
  --pine:        #142A47;
  --pine-2:      #1E3B61;
  --pine-deep:   #0C1B2F;
  --paper:       #EFF1F6;
  --paper-2:     #E1E6EF;
  --panel:       #FAFBFE;
  --ink:         #141A24;
  --mist:        #566079;
  --marigold:    #F0B537;
  --marigold-d:  #D69B1E;
  --sea:         #93B8DC;
  --on-pine:     #E9EEF7;
  --on-pine-2:   #A6B7CE;
}

/* Ember — warm charcoal, copper, sage */
[data-theme="ember"] {
  --pine:        #2A2724;
  --pine-2:      #3C3833;
  --pine-deep:   #1B1917;
  --paper:       #F2F0EC;
  --paper-2:     #E5E2DB;
  --panel:       #FBFAF7;
  --ink:         #1E1C1A;
  --mist:        #6A6459;
  --marigold:    #E4913F;
  --marigold-d:  #C6762A;
  --sea:         #9DB59F;
  --on-pine:     #F2EEE8;
  --on-pine-2:   #BDB3A6;
}

*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
html { scroll-behavior: smooth; -webkit-text-size-adjust: 100%; }
body {
  font-family: var(--sans);
  font-size: var(--fs-base);
  line-height: 1.55;
  color: var(--ink);
  background: var(--paper);
  -webkit-font-smoothing: antialiased;
  font-variant-numeric: tabular-nums;
}
img { display: block; max-width: 100%; height: auto; }
a { color: inherit; }
button, input, select, textarea { font: inherit; color: inherit; }
button { cursor: pointer; }
[hidden] { display: none !important; }

h1, h2, h3 { font-family: var(--cond); font-weight: 600; line-height: 1.06; letter-spacing: -0.01em; }
h1 { font-size: var(--fs-xxl); }
h2 { font-size: var(--fs-xl); }
h3 { font-size: var(--fs-md); line-height: 1.2; }

section[id], main { scroll-margin-top: 84px; }

.wrap { max-width: 1180px; margin: 0 auto; padding: 0 clamp(1.25rem, 4vw, 3rem); }
.lede { font-size: var(--fs-md); line-height: 1.5; max-width: 38em; }
.small { font-size: var(--fs-sm); line-height: 1.5; }
.hint { font-size: var(--fs-xs); line-height: 1.5; margin-top: 0.45rem; }

:focus-visible { outline: 3px solid var(--marigold); outline-offset: 2px; border-radius: 3px; }
.protection :focus-visible, .method :focus-visible, .about :focus-visible, .wa-dialog :focus-visible { outline-color: var(--pine); }

.skip { position: absolute; left: -999px; top: 0; background: var(--marigold); color: var(--ink); padding: 0.6rem 1rem; z-index: 200; }
.skip:focus { left: 1rem; top: 1rem; }

/* ── Buttons ─────────────────────────────────────────────── */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 0.5rem;
  padding: 0.85rem 1.35rem;
  border: 1px solid transparent; border-radius: var(--radius);
  font-weight: 600; font-size: var(--fs-sm); line-height: 1.2;
  text-decoration: none;
  transition: background-color 0.2s, border-color 0.2s, color 0.2s;
}
.btn-accent { background: var(--marigold); color: var(--ink); }
.btn-accent:hover { background: var(--marigold-d); }
.btn-dark { background: var(--pine); color: var(--on-pine); }
.btn-dark:hover { background: var(--pine-2); }
.btn-ghost { background: transparent; border-color: var(--line-light); color: var(--ink); }
.btn-ghost:hover { border-color: var(--ink); }
.btn-sm { padding: 0.6rem 1rem; }
.btn-block { width: 100%; }

/* ── Demo bar ────────────────────────────────────────────── */
.demo-bar { background: var(--marigold); color: var(--ink); font-size: var(--fs-xs); line-height: 1.45; }
.demo-bar p { max-width: 1180px; margin: 0 auto; padding: 0.6rem clamp(1.25rem, 4vw, 3rem); }
.demo-bar a { font-weight: 600; margin-left: 0.35rem; }

/* ── Nav ─────────────────────────────────────────────────── */
.site-nav {
  position: sticky; top: 0; z-index: 50;
  background: var(--pine); color: var(--on-pine);
  border-bottom: 1px solid transparent;
  transition: border-color 0.3s;
}
.site-nav.scrolled { border-bottom-color: var(--line-dark); }
.nav-inner { display: flex; align-items: center; gap: 2rem; min-height: 68px; }
.brand { display: flex; flex-direction: column; text-decoration: none; margin-right: auto; line-height: 1.15; }
.brand-name { font-family: var(--cond); font-weight: 600; font-size: var(--fs-md); }
.brand-role { font-size: var(--fs-xs); color: var(--on-pine-2); }
.nav-links { display: flex; gap: 1.75rem; list-style: none; }
.nav-links a { text-decoration: none; font-size: var(--fs-sm); color: var(--on-pine-2); transition: color 0.2s; }
.nav-links a:hover { color: var(--on-pine); }

@media (max-width: 960px) {
  /* Links drop to their own scrollable row rather than vanishing */
  .nav-inner { flex-wrap: wrap; gap: 0.75rem 1rem; padding-top: 0.7rem; padding-bottom: 0.55rem; min-height: 0; }
  .site-nav nav { order: 3; width: 100%; }
  .nav-links {
    gap: 1.25rem; overflow-x: auto; padding-bottom: 0.15rem;
    scrollbar-width: none; -ms-overflow-style: none;
  }
  .nav-links::-webkit-scrollbar { display: none; }
  .nav-links a { white-space: nowrap; }
  section[id], main { scroll-margin-top: 108px; }
}

/* ── Planner (hero) ──────────────────────────────────────── */
.planner { background: var(--pine); color: var(--on-pine); padding: clamp(2.25rem, 5vw, 3.5rem) 0 clamp(3rem, 7vw, 5rem); }
.planner .lede { color: var(--on-pine-2); margin-top: 1.1rem; }
.planner-head { display: grid; grid-template-columns: 1.35fr 1fr; gap: 3rem; align-items: end; }
.planner-intro h1 { max-width: 19ch; }
.planner-answer { padding-bottom: 0.2rem; }
.answer-label { font-size: var(--fs-sm); font-weight: 600; color: var(--on-pine-2); }
.answer-value {
  font-family: var(--cond); font-weight: 700; font-size: var(--fs-num);
  line-height: 0.95; letter-spacing: -0.02em; color: var(--marigold);
  margin: 0.3rem 0 0.6rem;
}
.answer-sub { color: var(--on-pine-2); max-width: 30ch; }
.answer-alt {
  margin-top: 0.9rem; padding-top: 0.9rem; border-top: 1px solid var(--line-dark);
  font-size: var(--fs-sm); color: var(--on-pine-2); max-width: 34ch;
}
.answer-alt b { color: var(--sea); font-weight: 600; }
.nudge { margin-top: 0.7rem; font-size: var(--fs-sm); color: var(--on-pine-2); max-width: 34ch; }
.nudge .link-btn { font-size: var(--fs-sm); white-space: nowrap; }

/* Journey chart */
.journey { margin-top: clamp(1.75rem, 4vw, 2.5rem); position: relative; }
.journey-chart { position: relative; height: clamp(170px, 22vw, 230px); }
.journey-chart svg { width: 100%; height: 100%; display: block; overflow: visible; }
.area-save  { fill: var(--marigold); }
.area-spend { fill: var(--sea); }
.area-line  { fill: none; stroke: var(--on-pine); stroke-width: 2; vector-effect: non-scaling-stroke; stroke-linejoin: round; }
/* The shaded slice is the part CPF LIFE absorbs: it sits over the fills
   and reads as carved out of what you have to save yourself. */
.area-cpf   { fill: color-mix(in srgb, var(--pine-deep) 46%, transparent); }
.line-cpf   { fill: none; stroke: var(--on-pine-2); stroke-width: 1.5; stroke-dasharray: 5 4; vector-effect: non-scaling-stroke; }
.line-ghost { fill: none; stroke: var(--on-pine); stroke-width: 2; stroke-dasharray: 7 5; opacity: 0.9; vector-effect: non-scaling-stroke; }
.journey .journey-chart svg { clip-path: inset(0 100% 0 0); }
.journey.is-drawn .journey-chart svg { clip-path: inset(0 0 0 0); transition: clip-path 1.4s var(--ease); }

.peak { position: absolute; top: 0; transform: translateX(0.75rem); white-space: nowrap; line-height: 1.2; }
.peak.flip { transform: translateX(calc(-100% - 0.75rem)); text-align: right; }
.peak-value { display: block; font-family: var(--cond); font-weight: 600; font-size: var(--fs-lg); }
.peak-label { display: block; font-size: var(--fs-xs); color: var(--on-pine-2); }

.peak-cpf {
  /* sits just under its own curve, clear of the main peak label */
  position: absolute; transform: translate(0.6rem, 0.25rem);
  font-size: var(--fs-xs); font-weight: 500; color: var(--pine-deep);
  white-space: nowrap; pointer-events: none;
}
.ghost-tag {
  /* below its own curve, clear of the live peak label above it */
  position: absolute; transform: translate(-50%, 0.35rem);
  font-size: var(--fs-xs); color: var(--on-pine); white-space: nowrap; pointer-events: none;
}

/* Studio credit — sits in the empty corner of the chart, and moves to
   the other side when the peak label would crowd it */
.chart-mark {
  position: absolute; top: 0; left: 0;
  font-size: var(--fs-xs); letter-spacing: 0.02em;
  color: var(--on-pine-2); opacity: 0.75;
  text-decoration: none; white-space: nowrap;
}
.chart-mark:hover { opacity: 1; color: var(--on-pine); text-decoration: underline; text-underline-offset: 3px; }
.chart-mark.flip { left: auto; right: 0; }

/* Scrub readout */
.journey-chart { cursor: crosshair; touch-action: pan-y; }
.scrub { position: absolute; inset: 0 auto 0 0; width: 0; pointer-events: none; }
.scrub-line { position: absolute; top: 0; bottom: 0; left: 0; width: 1px; background: var(--on-pine); opacity: 0.5; }
.scrub-dot {
  position: absolute; left: 0; width: 11px; height: 11px; margin: -5.5px 0 0 -5.5px;
  border-radius: 50%; background: var(--on-pine); box-shadow: 0 0 0 3px var(--pine);
}
.scrub-tip {
  position: absolute; top: 0; transform: translateX(-50%);
  display: flex; align-items: baseline; gap: 0.45rem;
  padding: 0.3rem 0.6rem; border-radius: 4px;
  background: var(--on-pine); color: var(--pine-deep);
  font-size: var(--fs-xs); line-height: 1.3; white-space: nowrap;
  pointer-events: none;
}
.scrub-tip em { font-style: normal; font-family: var(--cond); font-weight: 700; font-size: var(--fs-sm); }
.scrub-tip small { color: var(--pine-2); }

/* Legend and pin toolbar */
.journey-tools {
  display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between;
  gap: 0.75rem 1.5rem; margin-top: 0.5rem;
}
.legend { display: flex; flex-wrap: wrap; gap: 0.5rem 1.1rem; }
.lg { display: inline-flex; align-items: center; gap: 0.4rem; font-size: var(--fs-xs); color: var(--on-pine-2); }
.lg::before { content: ''; width: 12px; height: 10px; border-radius: 2px; flex: none; }
.lg-save::before  { background: var(--marigold); }
.lg-spend::before { background: var(--sea); }
.lg-cpf::before   { background: color-mix(in srgb, var(--pine-deep) 46%, transparent); box-shadow: inset 0 0 0 1px var(--on-pine-2); }
.lg-ghost::before { background: none; border-top: 1.5px dashed var(--on-pine); height: 0; border-radius: 0; }

.pin-box { display: flex; align-items: center; gap: 0.75rem; }
.link-btn {
  background: none; border: 0; padding: 0;
  font-size: var(--fs-xs); font-weight: 500; color: var(--on-pine);
  text-decoration: underline; text-underline-offset: 3px;
}
.link-btn:hover { color: var(--marigold); }
.pin-chip {
  display: inline-flex; align-items: center; gap: 0.6rem;
  padding: 0.3rem 0.3rem 0.3rem 0.7rem; border-radius: 99px;
  border: 1px solid var(--line-dark); background: var(--pine-deep);
  font-size: var(--fs-xs); color: var(--on-pine-2);
}
.pin-chip b { color: var(--on-pine); font-weight: 500; }
.pin-chip .up { color: var(--marigold); font-weight: 600; }
.pin-chip .down { color: var(--sea); font-weight: 600; }
.pin-chip button {
  background: none; border: 0; width: 22px; height: 22px; border-radius: 50%;
  color: var(--on-pine-2); font-size: 1rem; line-height: 1;
}
.pin-chip button:hover { background: color-mix(in srgb, var(--on-pine) 12%, transparent); color: var(--on-pine); }

/* Life ruler */
.ruler { position: relative; margin-top: 2px; }
.ruler-bar { position: relative; height: 32px; }
.seg {
  position: absolute; top: 0; bottom: 0;
  display: flex; align-items: center; min-width: 0;
  padding: 0 0.7rem; color: var(--ink);
  font-size: var(--fs-xs); font-weight: 600;
}
.seg span { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.seg-save  { background: color-mix(in srgb, var(--marigold) 78%, var(--pine)); }
.seg-spend { background: color-mix(in srgb, var(--sea) 78%, var(--pine)); }
.cpf-strip {
  position: absolute; top: 32px; height: 20px; box-sizing: border-box;
  display: flex; align-items: center; padding: 0 0.55rem;
  background: color-mix(in srgb, var(--pine-deep) 78%, transparent); color: var(--on-pine-2);
  font-size: var(--fs-xs); white-space: nowrap; overflow: hidden;
  border-left: 1px dashed var(--on-pine-2);
}
.ruler { position: relative; margin-top: 2px; }
.ruler.has-cpf .ruler-ticks { margin-top: 20px; }
.ruler-ticks { position: relative; height: 3.1rem; }
.tick {
  position: absolute; top: 0.45rem; transform: translateX(-50%);
  font-size: var(--fs-xs); color: var(--on-pine-2); line-height: 1.2; text-align: center; white-space: nowrap;
  transition: opacity 0.28s linear;
}
.tick b { font-weight: inherit; }
.tick::before { content: ''; position: absolute; left: 50%; top: -0.45rem; width: 1px; height: 0.3rem; background: var(--line-dark); }
.tick-key { color: var(--on-pine); font-size: var(--fs-sm); }
.tick-key b { font-weight: 600; }
.tick-key::before { background: var(--on-pine); height: 0.4rem; }
.tick-key small { display: block; font-weight: 400; font-size: var(--fs-xs); color: var(--on-pine-2); }
.tick.at-start { transform: none; text-align: left; }
.tick.at-start::before { left: 0; }
.tick.at-end { transform: translateX(-100%); text-align: right; }
.tick.at-end::before { left: auto; right: 0; }
.cpf-mark {
  position: absolute; bottom: 100%; /* sits on top of the ruler bar, inside the chart */
  font-size: var(--fs-xs); line-height: 1.2; white-space: nowrap;
  padding: 0.25rem 0.5rem; margin-left: -1px;
  background: var(--pine-deep); color: var(--on-pine);
  border-left: 1px dashed var(--on-pine);
  border-radius: 0 3px 3px 0;
}
.cpf-mark.flip { transform: translateX(-100%); border-left: 0; border-right: 1px dashed var(--on-pine); border-radius: 3px 0 0 3px; margin-left: 1px; }

.age-error {
  margin-top: 1.25rem; padding: 0.8rem 1rem;
  background: color-mix(in srgb, var(--marigold) 14%, transparent); border-left: 3px solid var(--marigold);
  font-size: var(--fs-sm);
}
.is-invalid .planner-answer, .is-invalid .journey, .is-invalid .planner-results { opacity: 0.3; transition: opacity 0.2s; }

/* Planner inputs + results */
.planner-grid { display: grid; grid-template-columns: 1.35fr 1fr; gap: 3rem; margin-top: 2.25rem; }
.field label { display: block; font-size: var(--fs-sm); font-weight: 500; margin-bottom: 0.4rem; }
.field input:not([type=range]), .field select, .field textarea {
  width: 100%; min-height: 48px; padding: 0.65rem 0.85rem;
  border-radius: var(--radius); font-size: var(--fs-md);
  -moz-appearance: textfield; appearance: none;
}
.field textarea { font-size: var(--fs-base); resize: vertical; }
.field input::-webkit-outer-spin-button, .field input::-webkit-inner-spin-button { -webkit-appearance: none; margin: 0; }
.field select {
  font-size: var(--fs-base);
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='8' viewBox='0 0 12 8'%3E%3Cpath d='M1 1l5 5 5-5' fill='none' stroke='%23566A65' stroke-width='1.6'/%3E%3C/svg%3E");
  background-repeat: no-repeat; background-position: right 0.9rem center; padding-right: 2.4rem;
}
.planner .field label, .contact .field label { color: var(--on-pine-2); }
.planner .field input:not([type=range]), .contact .field input, .contact .field select, .contact .field textarea {
  background: color-mix(in srgb, var(--on-pine) 7%, transparent); border: 1px solid var(--line-dark); color: var(--on-pine);
}
.contact .field select option { color: var(--ink); }
.planner .field input:not([type=range]):hover, .contact .field input:hover, .contact .field select:hover, .contact .field textarea:hover { border-color: color-mix(in srgb, var(--on-pine) 35%, transparent); }
.planner .hint { color: var(--on-pine-2); }
.planner .hint a { color: var(--on-pine); text-decoration: underline; text-underline-offset: 2px; }
.planner .hint a:hover { color: var(--marigold); }

.field-row { display: grid; grid-template-columns: repeat(4, 1fr); gap: 1rem 1rem; margin-top: 1.75rem; align-items: end; }
.field-row-2 { grid-template-columns: 1fr 1fr; margin-top: 0; }

.life-top { display: flex; align-items: baseline; justify-content: space-between; gap: 1rem; }
.life-top label { margin-bottom: 0; }
.life-readout { display: flex; align-items: baseline; gap: 0.9rem; margin: 0.35rem 0 0.9rem; }
.life-amt { font-family: var(--cond); font-weight: 600; font-size: var(--fs-lg); }
.life-tier { font-size: var(--fs-sm); color: var(--marigold); font-weight: 500; }

.info-btn { background: none; border: 0; font-size: var(--fs-xs); color: var(--on-pine-2); text-decoration: underline; text-underline-offset: 3px; }
.info-btn:hover { color: var(--on-pine); }
.info-btn-sm { margin-left: 0.4rem; }
.info-box { margin-top: 0.75rem; padding: 1rem 1.1rem; background: var(--pine-deep); border-radius: var(--radius); font-size: var(--fs-sm); color: var(--on-pine-2); }
.info-box p + p { margin-top: 0.5rem; }
.info-box strong { color: var(--on-pine); font-weight: 600; }

.slider {
  --fill: 50%;
  -webkit-appearance: none; appearance: none;
  width: 100%; height: 8px; border-radius: 99px;
  background: linear-gradient(to right, var(--marigold) var(--fill), color-mix(in srgb, var(--on-pine) 18%, transparent) var(--fill));
  margin: 0.6rem 0;
}
.slider::-webkit-slider-thumb {
  -webkit-appearance: none; width: 28px; height: 28px; border-radius: 50%;
  background: var(--marigold); border: 4px solid var(--pine); box-shadow: 0 0 0 1px var(--marigold);
  cursor: grab;
}
.slider::-moz-range-thumb {
  width: 20px; height: 20px; border-radius: 50%;
  background: var(--marigold); border: 4px solid var(--pine); box-shadow: 0 0 0 1px var(--marigold);
  cursor: grab;
}
.slider:focus-visible { outline-offset: 6px; }
.slider-marks { position: relative; height: 2.6rem; }
.rt-mark {
  position: absolute; top: 0.2rem; transform: translateX(-50%);
  background: none; border: 0; font-size: var(--fs-xs); line-height: 1.25;
  color: var(--on-pine-2); text-align: center;
}
.rt-mark:hover { color: var(--on-pine); }

.figures div { display: flex; justify-content: space-between; align-items: baseline; gap: 1rem; padding: 0.8rem 0; border-top: 1px solid var(--line-dark); }
.figures div:first-child { border-top: 0; padding-top: 0.2rem; }
.figures dt { font-size: var(--fs-sm); color: var(--on-pine-2); }
.figures dd { font-weight: 600; text-align: right; text-wrap: pretty; }
.figures .note { display: block; font-size: var(--fs-xs); color: var(--on-pine-2); border-top: 0; padding-top: 0; }
.figures .fig-note { display: block; border-top: 0; }
.planner-results .small { color: var(--on-pine-2); margin: 1rem 0 1.25rem; }

/* CPF input */
.cpf-input {
  margin-top: 1.75rem; padding-top: 1.5rem; border-top: 1px solid var(--line-dark);
  display: grid; gap: 0.9rem; max-width: 30rem;
}
.cpf-input .field input:disabled { opacity: 0.45; }
.switch { display: inline-flex; align-items: center; gap: 0.6rem; cursor: pointer; font-size: var(--fs-sm); font-weight: 500; }
.switch input {
  -webkit-appearance: none; appearance: none; flex: none;
  width: 40px; height: 22px; border-radius: 99px;
  background: color-mix(in srgb, var(--on-pine) 18%, transparent); position: relative;
  transition: background-color 0.2s;
}
.switch input::after {
  content: ''; position: absolute; top: 3px; left: 3px;
  width: 16px; height: 16px; border-radius: 50%;
  background: var(--on-pine); transition: transform 0.2s var(--ease);
}
.switch input:checked { background: var(--marigold); }
.switch input:checked::after { transform: translateX(18px); background: var(--pine); }

.fig-cpf dd { color: var(--sea); }
.figures dt small { display: block; font-size: var(--fs-xs); opacity: 0.8; }

/* Figure rows with explanations */
.fig-info {
  background: none; border: 0; padding: 0; margin: 0;
  font: inherit; color: inherit; text-align: left;
  display: inline;   /* the icon follows the last word when a label wraps */
}
.fig-info::after {
  content: 'i';
  display: inline-block; margin-left: 0.35rem; vertical-align: 1px;
  width: 15px; height: 15px; border-radius: 50%;
  border: 1px solid currentColor; opacity: 0.55;
  font-family: var(--cond); font-size: 11px; font-weight: 600; font-style: italic;
  line-height: 13px; text-align: center;
  transition: opacity 0.15s, background-color 0.15s, color 0.15s, border-color 0.15s;
}
.fig-info:hover::after { opacity: 1; }
.fig-info[aria-expanded="true"] { color: var(--on-pine); }
.fig-info[aria-expanded="true"]::after {
  opacity: 1; background: var(--marigold); border-color: var(--marigold); color: var(--pine);
}
.figures-light .fig-info[aria-expanded="true"] { color: var(--ink); }

.fig-note {
  animation: noteIn 0.18s ease-out;
  margin: 0 0 0.9rem; padding: 0.85rem 1rem;
  border-left: 2px solid var(--marigold);
  background: color-mix(in srgb, var(--on-pine) 6%, transparent);
  border-radius: 0 4px 4px 0;
  font-size: var(--fs-xs); line-height: 1.6; color: var(--on-pine-2);
}
.figures-light .fig-note {
  border-left-color: var(--pine);
  background: color-mix(in srgb, var(--ink) 4%, transparent);
  color: var(--mist);
}

@keyframes noteIn { from { opacity: 0; transform: translateY(-3px); } to { opacity: 1; transform: none; } }

/* CPF rows read as one group under a caption */
.fig-caption {
  margin: 1.1rem 0 0.2rem;
  font-size: var(--fs-xs); font-weight: 600; letter-spacing: 0.06em; text-transform: uppercase;
  color: var(--sea);
}

/* ── Protection ──────────────────────────────────────────── */
.protection { padding: clamp(4rem, 9vw, 7rem) 0; }
.section-head { max-width: 54rem; }
.section-head .lede { color: var(--mist); margin-top: 1rem; }
.cv-grid { display: grid; grid-template-columns: 1fr 1fr; gap: clamp(2rem, 5vw, 4rem); margin-top: 2.75rem; align-items: start; }
.cv-inputs { display: grid; gap: 1.35rem; }
.protection .field input, .protection .field select { background: var(--panel); border: 1px solid var(--line-light); color: var(--ink); }
.protection .field input:hover, .protection .field select:hover { border-color: color-mix(in srgb, var(--ink) 30%, transparent); }
.protection .hint { color: var(--mist); }
.cv-results { background: var(--panel); border: 1px solid var(--line-light); border-radius: 10px; padding: clamp(1.5rem, 3vw, 2.25rem); position: sticky; top: 90px; }
.cv-results .answer-label { color: var(--mist); }
.cv-results .answer-value { color: var(--ink); font-size: clamp(2.6rem, 5.5vw, 4rem); }

.stack { margin: 1.5rem 0 1.25rem; }
.stack-label { font-size: var(--fs-xs); color: var(--mist); margin: 0.9rem 0 0.35rem; }
.stack-label:first-child { margin-top: 0; }
.stack-bar { display: flex; height: 22px; background: var(--paper); border-radius: 3px; overflow: hidden; }
.sb { display: block; height: 100%; transition: width 0.35s var(--ease); }
.sb-income { background: var(--marigold); }
.sb-liab   { background: var(--sea); }
.sb-deps   { background: color-mix(in srgb, var(--pine) 40%, var(--paper)); }
.sb-have   { background: var(--pine); }
.sb-gap    { background: repeating-linear-gradient(135deg, var(--marigold) 0 5px, transparent 5px 10px); box-shadow: inset 0 0 0 1px var(--marigold); }

.figures-light div { border-top-color: var(--line-light); }
.figures-light dt { color: var(--mist); display: flex; align-items: center; gap: 0.55rem; }
.figures-light dd { max-width: 46%; }
.figures-light .figures-total dt, .figures-light .figures-total dd { color: var(--ink); font-weight: 600; }
.figures-light .figures-total { border-top: 1px solid var(--ink); }
.figures:not(.figures-light) .figures-total dd { font-family: var(--cond); font-size: var(--fs-lg); font-weight: 600; }
.figures:not(.figures-light) .figures-total dt { color: var(--on-pine); }
.figures-light .figures-total dd { font-size: var(--fs-md); }
.key { display: inline-block; width: 10px; height: 10px; border-radius: 2px; flex: none; }
.key-income { background: var(--marigold); }
.key-liab { background: var(--sea); }
.key-deps { background: color-mix(in srgb, var(--pine) 40%, var(--paper)); }
.key-have { background: var(--pine); }
.cv-results .btn { margin-top: 1.5rem; }

/* ── Method ──────────────────────────────────────────────── */
.method { background: var(--paper-2); padding: clamp(3.5rem, 8vw, 6rem) 0; }
.method-grid { display: grid; grid-template-columns: 1fr 1fr; gap: clamp(2rem, 5vw, 4.5rem); margin-top: 2.25rem; }
.method h3 { margin-bottom: 1rem; }
.method-list div { padding: 0.9rem 0; border-top: 1px solid var(--line-light); }
.method-list dt { font-weight: 600; font-size: var(--fs-sm); }
.method-list dd { color: var(--mist); font-size: var(--fs-sm); margin-top: 0.2rem; max-width: 38em; }
.cpf-links { font-size: var(--fs-sm); color: var(--mist); margin-top: 1rem; }
.cpf-links a { color: var(--pine); font-weight: 500; }
.method-note { color: var(--mist); margin-top: 2.5rem; }

/* ── About ───────────────────────────────────────────────── */
.about { padding: clamp(4rem, 9vw, 7rem) 0 clamp(3rem, 7vw, 5rem); }
.about-grid { display: grid; grid-template-columns: 5fr 7fr; gap: clamp(2rem, 5vw, 4.5rem); align-items: start; }
.about-photo { position: relative; border-radius: 8px; overflow: hidden; background: var(--paper-2); aspect-ratio: 4 / 5; }
.about-photo img { width: 100%; height: 100%; object-fit: cover; object-position: center 20%; }
.about-photo.no-img { background: var(--pine) radial-gradient(circle at 30% 20%, var(--pine-2), var(--pine)); }
.about-photo.no-img img { display: none; }
.sample-tag { position: absolute; left: 0.75rem; bottom: 0.75rem; background: color-mix(in srgb, var(--ink) 72%, transparent); color: #fff; font-size: var(--fs-xs); padding: 0.2rem 0.55rem; border-radius: 3px; }
.about-name { font-size: var(--fs-sm); font-weight: 600; color: var(--mist); margin-bottom: 0.75rem; }
.about-body h2 { max-width: 20ch; margin-bottom: 1.25rem; }
.about-body > p { max-width: 36em; margin-bottom: 1rem; }
.creds { list-style: none; display: flex; flex-wrap: wrap; gap: 0.5rem; margin: 1.5rem 0 2.5rem; }
.creds li { font-size: var(--fs-xs); font-weight: 500; padding: 0.35rem 0.75rem; border: 1px solid var(--line-light); border-radius: 99px; }
.services { display: grid; grid-template-columns: 1fr 1fr; column-gap: 2rem; margin-top: 0.75rem; }
.services div { padding: 0.9rem 0; border-top: 1px solid var(--line-light); }
.services dt { font-weight: 600; font-size: var(--fs-sm); }
.services dd { color: var(--mist); font-size: var(--fs-sm); margin-top: 0.15rem; }

.quotes { display: grid; grid-template-columns: repeat(3, 1fr); gap: 2rem; margin-top: clamp(3rem, 7vw, 5rem); }
.quote { padding-left: 1.1rem; border-left: 3px solid var(--marigold); }
.quote blockquote { font-size: var(--fs-md); line-height: 1.45; }
.quote figcaption { font-size: var(--fs-xs); color: var(--mist); margin-top: 0.75rem; }

/* ── Contact ─────────────────────────────────────────────── */
.contact { background: var(--pine); color: var(--on-pine); padding: clamp(4rem, 9vw, 6.5rem) 0; }
.contact-grid { display: grid; grid-template-columns: 1fr 1fr; gap: clamp(2rem, 5vw, 4.5rem); align-items: start; }
.contact .lede { color: var(--on-pine-2); margin-top: 1rem; }
.contact-line { margin-top: 1.75rem; font-size: var(--fs-sm); color: var(--on-pine-2); }
.contact-line a { color: var(--on-pine); }
.contact-form { display: grid; gap: 1.1rem; }
.contact-form .btn { justify-self: start; }

/* ── Footer ──────────────────────────────────────────────── */
.site-footer { background: var(--pine-deep); color: var(--on-pine-2); padding: 2.25rem 0; font-size: var(--fs-xs); }
.disclaimer { max-width: 62em; line-height: 1.6; }
.footer-row { display: flex; justify-content: space-between; flex-wrap: wrap; gap: 0.75rem; margin-top: 1.25rem; padding-top: 1.25rem; border-top: 1px solid var(--line-dark); }
.footer-row a { color: var(--on-pine); }

/* ── Demo dialog ─────────────────────────────────────────── */
.wa-dialog {
  margin: auto; width: min(92vw, 520px);
  border: 0; border-radius: 12px; padding: 1.75rem;
  background: var(--panel); color: var(--ink);
  box-shadow: 0 24px 60px color-mix(in srgb, var(--pine-deep) 35%, transparent);
}
.wa-dialog::backdrop { background: color-mix(in srgb, var(--pine-deep) 60%, transparent); }
.wa-dialog h2 { font-size: var(--fs-lg); }
.wa-dialog p { color: var(--mist); font-size: var(--fs-sm); margin-top: 0.6rem; }
.wa-preview {
  margin-top: 1.25rem; padding: 0.9rem 1rem;
  background: #D9FDD3; border-radius: 10px 10px 2px 10px;
  font-family: var(--sans); font-size: var(--fs-sm); line-height: 1.5;
  white-space: pre-wrap; word-break: break-word;
}
.wa-actions { display: flex; gap: 0.75rem; margin-top: 1.5rem; }

/* ── Responsive ──────────────────────────────────────────── */
@media (max-width: 960px) {
  .planner-head, .planner-grid, .cv-grid, .method-grid, .about-grid, .contact-grid { grid-template-columns: 1fr; }
  .planner-head { gap: 1.75rem; }
  .field-row { grid-template-columns: 1fr 1fr; }
  .cv-results { position: static; }
  .about-photo { aspect-ratio: 4 / 3; max-width: 560px; }
  .quotes { grid-template-columns: 1fr; gap: 1.5rem; }
}
@media (max-width: 560px) {
  .services { grid-template-columns: 1fr; }
  .tick:not(.tick-key) { display: none; }
  .cpf-mark { font-size: 0.72rem; }
  .field-row-2 { grid-template-columns: 1fr; }
  .brand-role { display: none; }
  /* short form, so the credit clears the peak label on a phone */
  .chart-mark .mark-prefix { display: none; }
  .chart-mark { font-size: 0.7rem; }
  .rt-mark { font-size: 0.7rem; }
  .slider-marks { height: 2.9rem; }
  .figures div { flex-direction: column; align-items: flex-start; gap: 0.15rem; }
  .figures dd { text-align: left; }
}

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  .journey .journey-chart svg { clip-path: none; }
  .journey.is-drawn .journey-chart svg, .seg, .sb { transition: none; }
  .fig-note { animation: none; }
}
