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

:root {
  --gold:    #d97706;
  --gold-dk: #92400e;
  --gold-lt: #fef3c7;
  --gold-md: #fbbf24;
  --amber:   #f59e0b;
  --text:    #1c1917;
  --text-2:  #57534e;
  --text-3:  #a8a29e;
  --surface: #fffbf5;
  --card-bg: #ffffff;
  --border:  #e7e5e4;
  --emp-clr: #0369a1;
  --er-clr:  #047857;
  --ret-clr: #7c3aed;
  --radius:  12px;
  --shadow:  0 1px 4px rgba(0,0,0,.08);
}

body {
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  background: var(--surface);
  color: var(--text);
  font-size: 16px;
  line-height: 1.6;
}

.container { max-width: 860px; margin: 0 auto; padding: 0 1.25rem; }

/* ── Header ── */
.site-header {
  background: var(--gold-dk);
  padding: .85rem 0;
  position: sticky;
  top: 0;
  z-index: 100;
}
.site-header .container { display: flex; align-items: center; justify-content: space-between; }
.logo { font-size: 1.25rem; font-weight: 700; color: #fff; letter-spacing: -.5px; }
.logo span { color: var(--gold-md); }
nav { display: flex; gap: 1.5rem; }
nav a { color: rgba(255,255,255,.8); text-decoration: none; font-size: .9rem; }
nav a:hover { color: #fff; }

/* ── Hero ── */
.hero {
  background: linear-gradient(135deg, var(--gold-dk) 0%, var(--gold) 60%, var(--amber) 100%);
  padding: 3.5rem 0 3rem;
  color: #fff;
}
.hero-eyebrow {
  font-size: .8rem;
  font-weight: 600;
  letter-spacing: .12em;
  text-transform: uppercase;
  color: rgba(255,255,255,.75);
  margin-bottom: .6rem;
}
.hero h1 {
  font-size: clamp(1.6rem, 4vw, 2.4rem);
  font-weight: 800;
  line-height: 1.2;
  margin-bottom: .75rem;
  max-width: 600px;
}
.hero-sub { font-size: 1rem; color: rgba(255,255,255,.85); max-width: 520px; margin-bottom: 2rem; }

.hero-corpus-preview {
  display: inline-flex;
  flex-direction: column;
  background: rgba(255,255,255,.15);
  border: 1px solid rgba(255,255,255,.25);
  border-radius: var(--radius);
  padding: 1rem 1.5rem;
  backdrop-filter: blur(4px);
  min-width: 260px;
}
.corpus-label { font-size: .78rem; font-weight: 600; text-transform: uppercase; letter-spacing: .08em; color: rgba(255,255,255,.75); }
.corpus-amount { font-size: 2rem; font-weight: 800; color: #fff; letter-spacing: -.5px; margin-top: .25rem; }

/* ── Main layout ── */
main.container { padding-top: 2rem; padding-bottom: 3rem; }
.calc-body { display: flex; flex-direction: column; gap: 1.5rem; }

/* ── Card ── */
.card {
  background: var(--card-bg);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 1.5rem;
  box-shadow: var(--shadow);
}

/* ── Inputs strip ── */
.inputs-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 1rem 1.5rem;
  margin-bottom: 1.5rem;
}
@media (max-width: 540px) { .inputs-grid { grid-template-columns: 1fr; } }

.field-group { display: flex; flex-direction: column; gap: .35rem; }
.field-group label { font-size: .85rem; font-weight: 600; color: var(--text-2); }
.field-group input, .field-group select {
  border: 1.5px solid var(--border);
  border-radius: 8px;
  padding: .6rem .8rem;
  font-size: .95rem;
  color: var(--text);
  background: #fff;
  transition: border-color .15s;
  outline: none;
}
.field-group input:focus, .field-group select:focus { border-color: var(--gold); box-shadow: 0 0 0 3px rgba(217,119,6,.12); }
.optional { font-weight: 400; color: var(--text-3); font-size: .8em; }
.hint { font-size: .78rem; color: var(--text-3); }

/* ── Contribution row ── */
.contrib-row {
  display: flex;
  align-items: center;
  gap: .75rem;
  padding: 1rem 1.25rem;
  background: var(--gold-lt);
  border-radius: 8px;
  border: 1px solid #fde68a;
  flex-wrap: wrap;
}
.contrib-block { display: flex; flex-direction: column; align-items: center; gap: .15rem; }
.contrib-pct { font-size: 1.5rem; font-weight: 800; color: var(--gold-dk); }
.contrib-block.employee .contrib-pct { color: var(--emp-clr); }
.contrib-block.employer .contrib-pct { color: var(--er-clr); }
.contrib-block.total .contrib-pct { color: var(--gold-dk); }
.contrib-label { font-size: .72rem; color: var(--text-2); text-align: center; line-height: 1.3; }
.contrib-plus, .contrib-equals { font-size: 1.2rem; font-weight: 700; color: var(--text-3); }

/* ── Results top ── */
.results-top { display: grid; grid-template-columns: 1fr 1fr; gap: 1.25rem; }
@media (max-width: 580px) { .results-top { grid-template-columns: 1fr; } }

.corpus-card { border-top: 4px solid var(--gold); }
.corpus-title { font-size: .8rem; font-weight: 600; text-transform: uppercase; letter-spacing: .08em; color: var(--text-3); margin-bottom: .5rem; }
.corpus-big { font-size: 2rem; font-weight: 800; color: var(--gold-dk); letter-spacing: -.5px; margin-bottom: .75rem; }
.corpus-meta { display: flex; flex-direction: column; gap: .3rem; font-size: .85rem; color: var(--text-2); }
.corpus-meta strong { color: var(--text); }

.pension-card { border-top: 4px solid var(--ret-clr); }
.pension-title { font-size: .8rem; font-weight: 600; text-transform: uppercase; letter-spacing: .08em; color: var(--text-3); margin-bottom: .5rem; }
.pension-big { font-size: 2rem; font-weight: 800; color: var(--ret-clr); letter-spacing: -.5px; margin-bottom: .6rem; }
.pension-note { font-size: .78rem; color: var(--text-3); line-height: 1.4; margin-bottom: .75rem; }
.alt-option { display: flex; justify-content: space-between; align-items: center; background: #f5f3ff; border-radius: 6px; padding: .5rem .75rem; }
.alt-label { font-size: .8rem; color: var(--text-2); }
.alt-amount { font-size: .95rem; font-weight: 700; color: var(--ret-clr); }

/* ── Growth timeline ── */
.timeline-card h3 { font-size: 1rem; font-weight: 700; margin-bottom: 1.25rem; }
.timeline { display: flex; flex-direction: column; gap: .7rem; }
.tl-row { display: grid; grid-template-columns: 60px 1fr 110px; align-items: center; gap: .75rem; }
.tl-label { font-size: .8rem; color: var(--text-2); font-weight: 600; white-space: nowrap; }
.tl-bar-wrap { height: 10px; background: #f5f5f4; border-radius: 99px; overflow: hidden; }
.tl-bar { height: 100%; background: linear-gradient(90deg, var(--gold-md), var(--gold-dk)); border-radius: 99px; transition: width .4s ease; min-width: 2px; }
.tl-amount { font-size: .85rem; font-weight: 700; color: var(--text); text-align: right; }
.timeline-note { font-size: .75rem; color: var(--text-3); margin-top: 1rem; }

/* ── Contribution breakdown ── */
.contrib-breakdown-card h3 { font-size: 1rem; font-weight: 700; margin-bottom: 1rem; }
.contrib-breakdown { display: flex; flex-direction: column; gap: .1rem; margin-bottom: 1.25rem; }
.breakdown-row {
  display: flex; justify-content: space-between;
  padding: .55rem .1rem;
  font-size: .9rem;
  border-bottom: 1px solid #f5f5f4;
  color: var(--text-2);
}
.breakdown-row span:last-child { font-weight: 600; color: var(--text); }
.breakdown-row.highlight { background: var(--gold-lt); padding: .55rem .5rem; border-radius: 6px; border-bottom: none; color: var(--gold-dk); }
.breakdown-row.highlight span:last-child { color: var(--gold-dk); }
.breakdown-row.total { padding: .65rem .1rem; font-weight: 700; font-size: .95rem; color: var(--text); border-bottom: none; }
.breakdown-row.total span:last-child { color: var(--gold-dk); }

.corpus-donut-wrap {
  display: flex;
  align-items: center;
  gap: 1.5rem;
  flex-wrap: wrap;
}
.corpus-donut { width: 100px; height: 100px; flex-shrink: 0; }
.donut-legend { display: flex; flex-direction: column; gap: .45rem; }
.legend-item { display: flex; align-items: center; gap: .5rem; font-size: .82rem; color: var(--text-2); }
.legend-dot { width: 10px; height: 10px; border-radius: 50%; flex-shrink: 0; }

/* ── Empty state ── */
.empty-state { text-align: center; padding: 3rem 1rem; color: var(--text-3); }
.empty-icon { font-size: 3rem; margin-bottom: .75rem; opacity: .3; }

/* ── Content sections ── */
.content-section { margin-top: 3rem; }
.content-section h2 { font-size: 1.4rem; font-weight: 800; margin-bottom: 1.25rem; color: var(--text); }
.section-intro { color: var(--text-2); margin-bottom: 1.25rem; font-size: .95rem; }

/* ── CPS steps ── */
.cps-steps { display: flex; flex-direction: column; gap: 1.25rem; }
.cps-step {
  display: flex;
  gap: 1rem;
  background: var(--card-bg);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 1.25rem;
  box-shadow: var(--shadow);
}
.cps-step .step-num {
  width: 32px;
  height: 32px;
  border-radius: 50%;
  background: var(--gold);
  color: #fff;
  font-weight: 800;
  font-size: .9rem;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  margin-top: .15rem;
}
.cps-step h3 { font-size: .95rem; font-weight: 700; margin-bottom: .35rem; }
.cps-step p { font-size: .88rem; color: var(--text-2); line-height: 1.55; }

/* ── PFA grid ── */
.pfa-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: .85rem;
  margin-bottom: 1rem;
}
@media (max-width: 580px) { .pfa-grid { grid-template-columns: 1fr 1fr; } }
.pfa-card {
  background: var(--card-bg);
  border: 1px solid var(--border);
  border-radius: 8px;
  padding: .85rem 1rem;
  box-shadow: var(--shadow);
}
.pfa-name { font-size: .88rem; font-weight: 700; margin-bottom: .2rem; }
.pfa-aum { font-size: .75rem; color: var(--text-3); }
.pfa-note { font-size: .8rem; color: var(--text-3); }
.pfa-note a { color: var(--gold-dk); }

/* ── FAQ ── */
.faq-list { display: flex; flex-direction: column; gap: .5rem; }
details {
  background: var(--card-bg);
  border: 1px solid var(--border);
  border-radius: 8px;
  padding: .85rem 1rem;
  box-shadow: var(--shadow);
}
details[open] { border-color: var(--gold-md); }
summary {
  font-size: .92rem;
  font-weight: 600;
  cursor: pointer;
  list-style: none;
  display: flex;
  justify-content: space-between;
  align-items: center;
  color: var(--text);
}
summary::after { content: "+"; font-size: 1.1rem; color: var(--gold); }
details[open] summary::after { content: "−"; }
details p { margin-top: .75rem; font-size: .88rem; color: var(--text-2); line-height: 1.6; }

/* ── Footer ── */
.site-footer {
  background: var(--gold-dk);
  color: rgba(255,255,255,.75);
  padding: 2rem 0;
  margin-top: 4rem;
  font-size: .85rem;
}
.site-footer .container { display: flex; flex-direction: column; gap: .5rem; }
.site-footer a { color: var(--gold-md); text-decoration: none; }
.site-footer a:hover { color: #fff; }
