/* RetireWise — Retirement Savings Calculator
   Shared stylesheet. Mobile-first, fast, no external dependencies.
   (Identical design system to the …Wise site network.) */

:root {
  --brand: #7c3aed;
  --brand-dark: #5b21b6;
  --accent: #f59e0b;
  --ink: #1c2530;
  --muted: #5b6672;
  --line: #e4e8ec;
  --bg: #ffffff;
  --bg-soft: #f6f4fb;
  --ok: #1a8f5a;
  --radius: 12px;
  --maxw: 900px;
  --font: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
}
* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body { margin: 0; font-family: var(--font); color: var(--ink); background: var(--bg); line-height: 1.65; font-size: 17px; }
a { color: var(--brand); }
.container { max-width: var(--maxw); margin: 0 auto; padding: 0 20px; }
.site-header { background: var(--bg); border-bottom: 1px solid var(--line); position: sticky; top: 0; z-index: 50; }
.site-header .container { display: flex; align-items: center; justify-content: space-between; height: 64px; }
.logo { font-weight: 800; font-size: 1.25rem; color: var(--brand); text-decoration: none; letter-spacing: -0.02em; }
.logo span { color: var(--accent); }
.nav a { color: var(--ink); text-decoration: none; margin-left: 22px; font-size: 0.95rem; font-weight: 500; }
.nav a:hover { color: var(--brand); }
.nav-toggle { display: none; }
@media (max-width: 640px) {
  .nav { display: none; position: absolute; top: 64px; left: 0; right: 0; background: #fff; border-bottom: 1px solid var(--line); flex-direction: column; padding: 10px 20px; }
  .nav.open { display: flex; }
  .nav a { margin: 8px 0; }
  .nav-toggle { display: block; background: none; border: 1px solid var(--line); border-radius: 8px; padding: 8px 12px; font-size: 1rem; cursor: pointer; }
}
.hero { background: linear-gradient(160deg, var(--brand) 0%, var(--brand-dark) 100%); color: #fff; padding: 48px 0 40px; }
.hero h1 { font-size: 2rem; margin: 0 0 12px; line-height: 1.2; letter-spacing: -0.02em; }
.hero p { font-size: 1.1rem; opacity: 0.92; margin: 0; max-width: 640px; }
main { padding: 36px 0 10px; }
h2 { font-size: 1.5rem; margin: 2em 0 0.6em; letter-spacing: -0.01em; }
h3 { font-size: 1.15rem; margin: 1.6em 0 0.5em; }
p { margin: 0 0 1em; }
ul, ol { margin: 0 0 1em; padding-left: 1.3em; }
li { margin-bottom: 0.4em; }
.lead { font-size: 1.1rem; color: var(--muted); }
.calc { background: var(--bg-soft); border: 1px solid var(--line); border-radius: var(--radius); padding: 26px; margin: 8px 0 28px; }
.calc h2 { margin-top: 0; }
.field { margin-bottom: 18px; }
.field label { display: block; font-weight: 600; margin-bottom: 6px; font-size: 0.98rem; }
.field .hint { display: block; font-weight: 400; color: var(--muted); font-size: 0.86rem; margin-top: 2px; }
.field input, .field select { width: 100%; padding: 12px 14px; border: 1px solid #cfd6da; border-radius: 10px; font-size: 1rem; font-family: var(--font); background: #fff; }
.field input:focus, .field select:focus { outline: 2px solid var(--brand); border-color: var(--brand); }
.grid2 { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; }
@media (max-width: 560px) { .grid2 { grid-template-columns: 1fr; } }
.btn { background: var(--accent); color: #1c2530; border: none; border-radius: 10px; padding: 14px 24px; font-size: 1.05rem; font-weight: 700; cursor: pointer; width: 100%; }
.btn:hover { filter: brightness(0.96); }
.btn-secondary { background: #fff; border: 1px solid #cfd6da; color: var(--ink); margin-top: 10px; }
.result { display: none; margin-top: 22px; background: #fff; border: 1px solid var(--line); border-radius: var(--radius); padding: 22px; }
.result.show { display: block; }
.result .range { font-size: 2rem; font-weight: 800; color: var(--brand); letter-spacing: -0.02em; }
.result .breakdown { margin-top: 14px; border-top: 1px solid var(--line); padding-top: 14px; }
.result .row { display: flex; justify-content: space-between; padding: 5px 0; border-bottom: 1px dashed var(--line); font-size: 0.96rem; }
.result .row.total { font-weight: 700; border-bottom: none; }
.result .disclaimer-mini { font-size: 0.85rem; color: var(--muted); margin-top: 14px; }
.ad-slot { margin: 26px 0; min-height: 90px; background: repeating-linear-gradient(45deg, #fafbfb, #fafbfb 10px, #f2f4f5 10px, #f2f4f5 20px); border: 1px dashed #d4dadd; border-radius: 10px; display: flex; align-items: center; justify-content: center; color: #a7b0b6; font-size: 0.8rem; text-transform: uppercase; letter-spacing: 0.08em; }
.faq details { border: 1px solid var(--line); border-radius: 10px; padding: 4px 16px; margin-bottom: 10px; background: #fff; }
.faq summary { font-weight: 600; cursor: pointer; padding: 12px 0; }
.faq details[open] summary { color: var(--brand); }
.callout { background: #fff7e6; border: 1px solid #f5dea8; border-radius: 10px; padding: 14px 18px; font-size: 0.95rem; }
table { width: 100%; border-collapse: collapse; margin: 1em 0; font-size: 0.95rem; }
th, td { text-align: left; padding: 10px 12px; border-bottom: 1px solid var(--line); }
th { background: var(--bg-soft); }
.site-footer { background: var(--bg-soft); border-top: 1px solid var(--line); margin-top: 40px; padding: 30px 0; color: var(--muted); font-size: 0.9rem; }
.site-footer a { color: var(--muted); text-decoration: none; margin-right: 18px; }
.site-footer a:hover { color: var(--brand); }
.site-footer .links { margin-bottom: 12px; }
.crumbs { font-size: 0.85rem; color: var(--muted); margin-bottom: 4px; }
.crumbs a { color: var(--muted); }
