/* ══════════════════════════════════════════════════
   Financial Freedom Calculator — standalone page.
   Loads with shared.css + landing.css; everything below
   is specific to this page: white background, the top nav
   (home link + language toggle), the input form, results
   and the expandable assumptions panel.
   ══════════════════════════════════════════════════ */

/* ── white background for easier reading (overrides landing.css cream) ── */
body { background: #fff; }
.lp-nav { background: rgba(255,255,255,.94); }
.lp-hero { background: #fff; }

/* ── nav: logo (home) on the left, home link + language toggle on the right ── */
.lp-logo img { height: 44px; width: auto; display: block; }
.lp-nav-right { display: flex; align-items: center; gap: 16px; flex-wrap: wrap; }
.lp-home-link { color: var(--muted); text-decoration: none; font-weight: 600; font-size: var(--text-sm); white-space: nowrap; }
.lp-home-link:hover { color: var(--accent-text); }

/* Language toggle — sliding pill indicator behind the active label
   (self-contained copy of the SPA's toggle, since this page loads no site.css). */
.lang-toggle {
  position: relative; display: flex; background: var(--bg2); border: 1px solid var(--border);
  border-radius: var(--radius-pill); padding: 3px; flex-shrink: 0;
}
.lang-indicator {
  position: absolute; top: 3px; left: 3px; width: calc(50% - 3px); height: calc(100% - 6px);
  background: var(--text); border-radius: var(--radius-pill);
  transition: transform .25s cubic-bezier(.4,0,.2,1);
}
.lang-toggle.lang-en .lang-indicator { transform: translateX(100%); }
.lang-toggle:has(#lb-en.on) .lang-indicator { transform: translateX(100%); }
.lb {
  position: relative; z-index: 1; padding: 8px 14px; font-size: var(--text-xs); font-weight: 700;
  border: none; white-space: nowrap; background: transparent; color: var(--muted);
  cursor: pointer; transition: color .18s; min-height: 44px; border-radius: var(--radius-pill);
  display: inline-flex; align-items: center; justify-content: center;
}
.lb.on { color: white; }
.lb:focus-visible { outline: 2px solid var(--focus); outline-offset: 2px; }

/* ── hero value-prop checklist ── */
.ff-hero-list { list-style: none; padding: 0; margin: 14px 0 0; display: grid; gap: 9px; }
.ff-hero-list li { position: relative; padding-left: 28px; font-size: var(--text-base); color: var(--text); line-height: 1.5; }
.ff-hero-list li::before {
  content: '✓'; position: absolute; left: 0; top: 0; color: #fff; background: var(--accent);
  width: 19px; height: 19px; border-radius: 50%; font-size: var(--text-2xs); font-weight: 700;
  display: flex; align-items: center; justify-content: center; margin-top: 2px;
}

/* ── expandable "how we calculate this" panels ── */
.ff-explain-steps { margin-top: 6px; }
.ff-assume-intro { font-size: var(--text-sm); color: var(--text); margin: 0 0 10px; }
.ff-explain {
  border: 1px solid var(--border); border-radius: var(--r); background: var(--bg2);
  padding: 0; margin: 4px 0 30px;
}
.ff-explain summary {
  list-style: none; cursor: pointer; padding: 16px 20px;
  font-size: var(--text-sm); font-weight: 700; color: var(--text);
}
.ff-explain summary::-webkit-details-marker { display: none; }
.ff-explain summary:focus-visible { outline: 2px solid var(--focus); outline-offset: -2px; border-radius: var(--r); }
.ff-explain-body { padding: 0 20px 20px; }
.ff-explain-body h3 { font-size: var(--text-sm); margin: 14px 0 8px; color: var(--accent-text); }
.ff-explain-body ul { padding-left: 20px; margin: 0 0 10px; }
.ff-explain-body li { font-size: var(--text-sm); color: var(--text); line-height: 1.7; margin-bottom: 6px; }
.ff-steps { padding-left: 20px; margin: 0 0 10px; }
.ff-steps li { font-size: var(--text-sm); color: var(--text); line-height: 1.8; margin-bottom: 6px; }
.ff-steps b { color: var(--accent-text); font-family: var(--font-en); }
.ff-explain-note { font-size: var(--text-xs); color: var(--muted); margin: 10px 0 0; }

/* ── input form ── */
.ff-form {
  display: grid; gap: 22px; background: #fff; border: 1px solid var(--border);
  border-radius: var(--r); padding: 22px 22px 20px; margin: 4px 0 34px;
  box-shadow: 0 1px 2px rgba(var(--shadow-rgb),.04), 0 8px 26px rgba(var(--shadow-rgb),.05);
}
.ff-field label {
  display: flex; justify-content: space-between; align-items: baseline;
  font-size: var(--text-sm); font-weight: 600; color: var(--text); margin-bottom: 10px; gap: 10px;
}
.ff-field-val {
  font-family: var(--font-en); font-weight: 700; color: var(--accent-text);
  font-size: var(--text-base); font-variant-numeric: tabular-nums; white-space: nowrap;
}
.ff-field input[type="range"] {
  -webkit-appearance: none; appearance: none; width: 100%; height: 34px;
  background: transparent; cursor: pointer; margin: 0;
}
.ff-field input[type="range"]::-webkit-slider-runnable-track { height: 8px; border-radius: var(--radius-sm); background: #E0B84C; }
.ff-field input[type="range"]::-webkit-slider-thumb {
  -webkit-appearance: none; width: 26px; height: 26px; border-radius: 50%;
  background: white; border: 4px solid var(--accent); margin-top: -9px;
  box-shadow: 0 3px 10px rgba(var(--shadow-rgb),.2);
}
.ff-field input[type="range"]::-moz-range-track { height: 8px; border-radius: var(--radius-sm); background: #E0B84C; }
.ff-field input[type="range"]::-moz-range-thumb { width: 22px; height: 22px; border-radius: 50%; background: white; border: 4px solid var(--accent); }
.ff-field input[type="range"]:focus-visible { outline: 2px solid var(--focus); outline-offset: 4px; border-radius: var(--radius-sm); }
.ff-leftover {
  font-size: var(--text-xs); color: var(--muted); margin: 0; padding-top: 4px;
  border-top: 1px dashed var(--border);
}
.ff-leftover b { color: var(--accent-text); font-family: var(--font-en); }
.ff-leftover.ff-neg b { color: var(--err-text); }

.lp-body .ff-feasibility-warn {
  background: var(--err-bg); border: 1px solid var(--err-border); color: var(--err-text);
  font-size: var(--text-sm); padding: 12px 16px; border-radius: var(--radius-md); margin: 4px 0 0;
}

/* ── results ── */
.ff-results { display: grid; grid-template-columns: repeat(2, 1fr); gap: 16px; margin: 0 0 4px; }
.ff-result-card {
  border: 1px solid var(--border); border-radius: var(--r); padding: 20px 22px;
  background: #fff; display: flex; flex-direction: column;
  box-shadow: 0 1px 2px rgba(var(--shadow-rgb),.04), 0 6px 20px rgba(var(--shadow-rgb),.04);
}
.ff-result-main { background: var(--accent-bg); border-color: rgba(81,122,75,.35); }
.ff-result-label { font-size: var(--text-xs); font-weight: 700; color: var(--muted); letter-spacing: .01em; }
.ff-result-main .ff-result-label { color: var(--accent-text); }
.ff-result-big {
  font-family: var(--font-en); font-weight: 700; font-size: clamp(22px, 4.2vw, 30px);
  color: var(--text); margin-top: 8px; font-variant-numeric: tabular-nums; line-height: 1.2;
}
.ff-result-accent { color: var(--accent-text); }
.ff-result-sub { font-size: var(--text-xs); color: var(--accent-text); font-weight: 600; margin-top: 2px; }
.ff-result-note { font-size: var(--text-xs); color: var(--muted); line-height: 1.6; margin: 10px 0 0; }

/* ── two ways (SIP or lumpsum) — plain "or" between the cards, no chip ── */
.ff-paths-head { font-size: var(--text-base); color: var(--text); margin: 26px 0 14px; }
.ff-two-paths { display: grid; grid-template-columns: 1fr auto 1fr; gap: 18px; align-items: stretch; margin: 0 0 26px; }
.ff-two-paths .ff-path-card { justify-content: flex-start; }
.ff-or-divider {
  align-self: center; font-size: var(--text-xs); font-weight: 700; color: var(--muted);
  text-transform: uppercase; letter-spacing: .08em; text-align: center;
}

/* ── current-path / gap card ── */
.ff-current-path-card {
  border: 1px dashed var(--border); border-radius: var(--r); padding: 20px 22px;
  background: var(--bg2); margin: 0 0 32px;
}
.ff-current-path-card .ff-result-note { margin-top: 6px; }
.ff-progress-bar { height: 10px; background: #E7E2D6; border-radius: var(--radius-sm); overflow: hidden; margin-top: 14px; }
.ff-progress-fill { height: 100%; width: 0; background: var(--accent); border-radius: var(--radius-sm); transition: width .4s ease; }
.ff-progress-fill.ff-over { background: #C99A2E; }
.ff-progress-pct { font-size: var(--text-xs); font-weight: 700; color: var(--accent-text); margin: 8px 0 0; }

/* ── full disclaimer block (separate from the footer's short one) ── */
.ff-disclaimer-full {
  font-size: var(--text-xs); color: var(--muted); line-height: 1.75; margin: 8px 0 0;
  background: var(--bg2); border: 1px solid var(--border); border-radius: var(--r); padding: 14px 18px;
}

@media (max-width: 700px) {
  .lp-home-link { display: none; } /* logo already links home; keep mobile nav uncluttered */
  .ff-results { grid-template-columns: 1fr; }
  .ff-two-paths { grid-template-columns: 1fr; gap: 12px; }
}
