/* ===========================
   rollover.io — main styles
   Theme: refined dark fintech
   =========================== */

:root {
  --bg:        #0d0f14;
  --surface:   #141720;
  --surface-2: #1c2030;
  --border:    rgba(255,255,255,0.08);
  --border-hover: rgba(255,255,255,0.18);
  --gold:      #c8a84b;
  --gold-light:#e2c97e;
  --text:      #e8e8e2;
  --text-muted:#7e8494;
  --text-dim:  #4a4f5e;
  --green:     #3ecf8e;
  --red:       #e05252;
  --radius:    12px;
  --radius-lg: 20px;
  --transition: 0.2s cubic-bezier(0.25, 0.46, 0.45, 0.94);
}

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

html { scroll-behavior: smooth; }

body {
  background: var(--bg);
  color: var(--text);
  font-family: 'DM Sans', sans-serif;
  font-size: 16px;
  line-height: 1.6;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  overflow-x: hidden;
}

/* Grain texture overlay */
.grain {
  position: fixed;
  inset: 0;
  background-image: url("data:image/svg+xml,%3Csvg viewBox='0 0 256 256' xmlns='http://www.w3.org/2000/svg'%3E%3Cfilter id='noise'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.9' numOctaves='4' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23noise)' opacity='0.035'/%3E%3C/svg%3E");
  pointer-events: none;
  z-index: 0;
  opacity: 0.6;
}

/* ---- HEADER ---- */
header {
  position: relative;
  z-index: 1;
  padding: 2rem 2rem 0;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0.4rem;
  animation: fadeDown 0.6s ease both;
}

.logo {
  font-family: 'DM Mono', monospace;
  font-size: 1.1rem;
  font-weight: 500;
  letter-spacing: 0.04em;
  color: var(--gold);
}

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

.tagline {
  font-size: 0.75rem;
  color: var(--text-muted);
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

/* ---- MAIN ---- */
main {
  flex: 1;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 3rem 1.5rem 4rem;
  position: relative;
  z-index: 1;
}

/* Ambient glow behind the card */
main::before {
  content: '';
  position: absolute;
  top: 10%;
  left: 50%;
  transform: translateX(-50%);
  width: 600px;
  height: 400px;
  background: radial-gradient(ellipse, rgba(200,168,75,0.06) 0%, transparent 70%);
  pointer-events: none;
}

/* ---- WIZARD CARD ---- */
.wizard {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  width: 100%;
  max-width: 560px;
  min-height: 420px;
  padding: 2.5rem;
  position: relative;
  box-shadow: 0 40px 80px rgba(0,0,0,0.5), 0 0 0 1px rgba(200,168,75,0.05);
}

/* ---- STEPS ---- */
.step {
  display: none;
  flex-direction: column;
  gap: 1.25rem;
  animation: stepIn 0.35s ease both;
}

.step.active {
  display: flex;
}

@keyframes stepIn {
  from { opacity: 0; transform: translateY(12px); }
  to   { opacity: 1; transform: translateY(0); }
}

.step-eyebrow {
  font-family: 'DM Mono', monospace;
  font-size: 0.7rem;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--gold);
}

.step-progress {
  font-family: 'DM Mono', monospace;
  font-size: 0.72rem;
  color: var(--text-muted);
  letter-spacing: 0.08em;
}

.step-num {
  color: var(--gold);
  font-weight: 500;
}

h1.step-title {
  font-family: 'DM Serif Display', serif;
  font-size: 2.4rem;
  line-height: 1.15;
  color: var(--text);
  letter-spacing: -0.01em;
}

h1.step-title em {
  font-style: italic;
  color: var(--gold-light);
}

.step-body {
  color: var(--text-muted);
  font-size: 1rem;
  line-height: 1.7;
  max-width: 44ch;
}

h2.step-question {
  font-family: 'DM Serif Display', serif;
  font-size: 1.55rem;
  line-height: 1.25;
  color: var(--text);
}

.step-hint {
  font-size: 0.85rem;
  color: var(--text-muted);
  margin-top: -0.5rem;
}

/* ---- CHOICE GRID ---- */
.choice-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 0.6rem;
}

.choice-grid.two-col { grid-template-columns: repeat(2, 1fr); }
.choice-grid.tight { margin-top: 0.4rem; }

.choice {
  background: var(--surface-2);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 1rem 0.75rem;
  cursor: pointer;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0.5rem;
  transition: border-color var(--transition), background var(--transition), transform var(--transition);
  color: var(--text);
}

.choice:hover {
  border-color: var(--border-hover);
  background: rgba(255,255,255,0.04);
  transform: translateY(-1px);
}

.choice.selected {
  border-color: var(--gold);
  background: rgba(200,168,75,0.08);
  box-shadow: 0 0 0 1px rgba(200,168,75,0.3);
}

.choice.small {
  padding: 0.75rem;
  flex-direction: row;
  justify-content: center;
}

.choice-icon { font-size: 1.5rem; line-height: 1; }
.choice-label { font-size: 0.82rem; font-weight: 500; text-align: center; }

/* ---- INPUTS ---- */
.input-row {
  display: flex;
  align-items: center;
  gap: 0.5rem;
}

.input-prefix {
  font-family: 'DM Mono', monospace;
  font-size: 1.5rem;
  color: var(--gold);
  line-height: 1;
}

.text-input {
  background: var(--surface-2);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 0.85rem 1rem;
  color: var(--text);
  font-family: 'DM Mono', monospace;
  font-size: 1.1rem;
  width: 100%;
  transition: border-color var(--transition);
  outline: none;
}

.text-input:focus { border-color: var(--gold); }
.text-input::placeholder { color: var(--text-dim); }
.text-input.narrow { max-width: 160px; }

/* Number input arrow hiding */
.text-input[type=number]::-webkit-inner-spin-button,
.text-input[type=number]::-webkit-outer-spin-button { -webkit-appearance: none; }
.text-input[type=number] { -moz-appearance: textfield; }

.balance-chips {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
}

.chip {
  background: transparent;
  border: 1px solid var(--border);
  border-radius: 99px;
  padding: 0.35rem 0.85rem;
  font-size: 0.78rem;
  color: var(--text-muted);
  cursor: pointer;
  transition: all var(--transition);
  font-family: 'DM Sans', sans-serif;
}

.chip:hover { border-color: var(--gold); color: var(--gold); }

.field-group { display: flex; flex-direction: column; gap: 0.5rem; }
.field-label { font-size: 0.85rem; color: var(--text-muted); font-weight: 500; }

/* ---- BUTTONS ---- */
.btn-primary {
  background: var(--gold);
  color: #0d0f14;
  border: none;
  border-radius: var(--radius);
  padding: 0.9rem 1.75rem;
  font-family: 'DM Sans', sans-serif;
  font-size: 0.95rem;
  font-weight: 600;
  cursor: pointer;
  transition: background var(--transition), transform var(--transition), box-shadow var(--transition);
  letter-spacing: 0.01em;
  align-self: flex-start;
}

.btn-primary:hover {
  background: var(--gold-light);
  transform: translateY(-1px);
  box-shadow: 0 8px 24px rgba(200,168,75,0.25);
}

.btn-primary:active { transform: translateY(0); }

.btn-secondary {
  background: transparent;
  border: 1px solid var(--border-hover);
  border-radius: var(--radius);
  padding: 0.75rem 1.5rem;
  color: var(--text);
  font-family: 'DM Sans', sans-serif;
  font-size: 0.9rem;
  cursor: pointer;
  transition: all var(--transition);
}

.btn-secondary:hover { border-color: var(--gold); color: var(--gold); }

.btn-back {
  background: none;
  border: none;
  color: var(--text-muted);
  font-size: 0.82rem;
  cursor: pointer;
  padding: 0;
  font-family: 'DM Sans', sans-serif;
  transition: color var(--transition);
  align-self: flex-start;
}

.btn-back:hover { color: var(--text); }

/* ---- TRUST ROW ---- */
.trust-row {
  display: flex;
  gap: 0.75rem;
  font-size: 0.75rem;
  color: var(--text-dim);
  flex-wrap: wrap;
  align-items: center;
}

/* ---- RESULT ---- */
.result-badge {
  display: inline-block;
  background: rgba(200,168,75,0.1);
  border: 1px solid rgba(200,168,75,0.3);
  color: var(--gold);
  font-family: 'DM Mono', monospace;
  font-size: 0.68rem;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  padding: 0.3rem 0.75rem;
  border-radius: 99px;
  align-self: flex-start;
}

.result-headline {
  font-family: 'DM Serif Display', serif;
  font-size: 1.9rem;
  line-height: 1.2;
  color: var(--text);
}

.result-explanation {
  color: var(--text-muted);
  font-size: 0.95rem;
  line-height: 1.75;
  border-left: 2px solid var(--gold);
  padding-left: 1rem;
}

.penalty-warning {
  background: rgba(224,82,82,0.08);
  border: 1px solid rgba(224,82,82,0.25);
  border-radius: var(--radius);
  padding: 0.85rem 1rem;
  font-size: 0.85rem;
  color: #f08080;
  line-height: 1.6;
}

/* ---- ADVISOR CTA ---- */
.advisor-cta {
  background: var(--surface-2);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 1.25rem;
  display: flex;
  flex-direction: column;
  gap: 1rem;
}

.advisor-cta-inner {
  display: flex;
  gap: 0.75rem;
  align-items: flex-start;
}

.advisor-icon {
  font-size: 1.5rem;
  flex-shrink: 0;
  margin-top: 0.1rem;
}

.advisor-cta-inner strong {
  display: block;
  margin-bottom: 0.25rem;
  font-size: 0.9rem;
}

.advisor-cta-inner p {
  font-size: 0.82rem;
  color: var(--text-muted);
}

.lead-form {
  display: flex;
  gap: 0.5rem;
  flex-wrap: wrap;
}

.lead-form .text-input {
  font-family: 'DM Sans', sans-serif;
  font-size: 0.9rem;
  flex: 1;
  min-width: 180px;
}

.lead-form .btn-primary {
  font-size: 0.85rem;
  padding: 0.75rem 1.2rem;
  white-space: nowrap;
}

.lead-thanks {
  font-size: 0.85rem;
  color: var(--green);
  font-weight: 500;
}

.result-actions {
  display: flex;
  gap: 0.75rem;
  flex-wrap: wrap;
  align-items: center;
}

.disclaimer {
  font-size: 0.72rem;
  color: var(--text-dim);
  line-height: 1.5;
  margin-top: 0.5rem;
}

/* ---- FOOTER ---- */
footer {
  position: relative;
  z-index: 1;
  padding: 1.25rem 2rem;
  border-top: 1px solid var(--border);
}

.footer-inner {
  max-width: 800px;
  margin: 0 auto;
  display: flex;
  gap: 2rem;
  justify-content: center;
  font-size: 0.75rem;
  color: var(--text-dim);
  flex-wrap: wrap;
}

/* ---- ANIMATIONS ---- */
@keyframes fadeDown {
  from { opacity: 0; transform: translateY(-8px); }
  to   { opacity: 1; transform: translateY(0); }
}

/* ---- RESPONSIVE ---- */
@media (max-width: 600px) {
  .wizard { padding: 1.75rem 1.25rem; }
  h1.step-title { font-size: 1.85rem; }
  .choice-grid { grid-template-columns: repeat(2, 1fr); }
  .choice-grid.two-col { grid-template-columns: repeat(2, 1fr); }
  .result-headline { font-size: 1.5rem; }
}

/* =============================================
   SITE HEADER / NAV
   ============================================= */
.site-header {
  position: sticky; top: 0; z-index: 100;
  background: rgba(13,15,20,0.95);
  backdrop-filter: blur(12px);
  border-bottom: 1px solid var(--border);
}
.header-inner {
  max-width: 1300px; margin: 0 auto;
  padding: 0 1.5rem;
  display: flex; align-items: center; gap: 0.5rem;
  height: 52px;
}
.logo { color: var(--gold); font-family: 'DM Mono', monospace; font-size: 0.95rem;
  font-weight: 500; text-decoration: none; letter-spacing: 0.04em; flex-shrink: 0; }
.site-nav { display: flex; gap: 0.15rem; align-items: center; flex-wrap: nowrap;
  margin-left: auto; overflow-x: auto; }
.nav-link { color: var(--text-muted); text-decoration: none; font-size: 0.72rem;
  padding: 0.3rem 0.55rem; border-radius: 6px; transition: all var(--transition);
  white-space: nowrap; }
.nav-link:hover, .nav-link.active { color: var(--gold); background: rgba(200,168,75,0.08); }
.nav-toggle { display: none; background: none; border: 1px solid var(--border);
  color: var(--text-muted); border-radius: 6px; padding: 0.3rem 0.6rem; cursor: pointer; }
footer a.footer-link { color: var(--text-dim); text-decoration: none; }
footer a.footer-link:hover { color: var(--text-muted); }

/* =============================================
   WIZARD PAGE WRAPPER
   ============================================= */
.wizard-page { display: flex; align-items: center; justify-content: center;
  padding: 3rem 1.5rem 4rem; min-height: calc(100vh - 52px - 60px); position: relative; }
.wizard-page::before { content: ''; position: absolute; top: 10%; left: 50%;
  transform: translateX(-50%); width: 600px; height: 400px;
  background: radial-gradient(ellipse, rgba(200,168,75,0.06) 0%, transparent 70%);
  pointer-events: none; }

/* =============================================
   HOME PAGE
   ============================================= */
.home-page { max-width: 1100px; margin: 0 auto; padding: 3rem 1.5rem 5rem; }
.home-hero { text-align: center; padding: 2rem 0 3.5rem; }
.home-title { font-family: 'DM Serif Display', serif; font-size: 3rem; line-height: 1.1;
  letter-spacing: -0.02em; margin: 0.75rem 0 1rem; }
.home-title em { font-style: italic; color: var(--gold-light); }
.home-sub { color: var(--text-muted); font-size: 1.05rem; max-width: 48ch; margin: 0 auto; line-height: 1.7; }
.tool-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(300px, 1fr)); gap: 1rem; }
.tool-card { background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius-lg);
  padding: 1.5rem; display: flex; flex-direction: column; gap: 0.75rem;
  text-decoration: none; color: var(--text); transition: all var(--transition); }
.tool-card:hover { border-color: var(--border-hover); transform: translateY(-2px);
  box-shadow: 0 12px 40px rgba(0,0,0,0.3); }
.tool-card.featured { border-color: rgba(200,168,75,0.3);
  background: linear-gradient(135deg, var(--surface), rgba(200,168,75,0.04)); grid-column: 1 / -1; flex-direction: row; align-items: center; }
.tool-card-icon { font-size: 2rem; flex-shrink: 0; }
.tool-card-body { flex: 1; }
.tool-card-badge { display: inline-block; background: rgba(200,168,75,0.15); color: var(--gold);
  font-family: 'DM Mono', monospace; font-size: 0.65rem; letter-spacing: 0.1em;
  text-transform: uppercase; padding: 0.2rem 0.6rem; border-radius: 99px; margin-bottom: 0.4rem; }
.tool-card-title { font-family: 'DM Serif Display', serif; font-size: 1.1rem; margin-bottom: 0.3rem; }
.tool-card-desc { font-size: 0.82rem; color: var(--text-muted); line-height: 1.6; }
.tool-card-cta { font-size: 0.78rem; color: var(--gold); font-weight: 500; white-space: nowrap; }
.home-disclaimer { margin-top: 3rem; padding: 1rem 1.5rem; border: 1px solid var(--border);
  border-radius: var(--radius); font-size: 0.75rem; color: var(--text-dim); line-height: 1.6; }

/* =============================================
   CALCULATOR PAGE LAYOUT
   ============================================= */
.calc-page { max-width: 1100px; margin: 0 auto; padding: 2.5rem 1.5rem 5rem; }
.calc-header { margin-bottom: 2rem; }
.calc-header h1 { font-family: 'DM Serif Display', serif; font-size: 2.2rem;
  line-height: 1.15; margin: 0.4rem 0 0.75rem; }
.calc-header p { color: var(--text-muted); font-size: 0.95rem; line-height: 1.7; max-width: 60ch; }
.page-eyebrow { font-family: 'DM Mono', monospace; font-size: 0.7rem; letter-spacing: 0.1em;
  text-transform: uppercase; color: var(--gold); }
.calc-layout { display: grid; grid-template-columns: 1fr 1fr; gap: 1.5rem; align-items: start; }
.card { background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius-lg); padding: 1.75rem; }
.card-title { font-family: 'DM Serif Display', serif; font-size: 1.1rem; margin-bottom: 1.25rem;
  color: var(--text); }
.calc-results { transition: opacity 0.3s ease; }
.calc-results:not(.visible) { opacity: 0.4; pointer-events: none; }
.calc-results.visible { opacity: 1; pointer-events: auto; }
.page-disclaimer { margin-top: 2rem; font-size: 0.72rem; color: var(--text-dim); line-height: 1.6; }

/* =============================================
   FORM ELEMENTS (calculator-specific)
   ============================================= */
.select-input { cursor: pointer; }
select.text-input option { background: var(--surface-2); }
.input-suffix { color: var(--text-muted); font-size: 0.9rem; flex-shrink: 0; padding: 0 0.25rem; }
.field-hint { font-size: 0.72rem; color: var(--text-dim); line-height: 1.5; margin-top: 0.2rem; }
.range-input { width: 100%; -webkit-appearance: none; background: var(--surface-2);
  height: 4px; border-radius: 99px; outline: none; border: none; cursor: pointer; }
.range-input::-webkit-slider-thumb { -webkit-appearance: none; width: 18px; height: 18px;
  border-radius: 50%; background: var(--gold); cursor: pointer; border: 2px solid var(--bg); }
.range-display { font-family: 'DM Mono', monospace; font-size: 0.85rem; color: var(--gold);
  margin-top: 0.25rem; }
.toggle-row { display: flex; gap: 0.5rem; }
.toggle-btn { flex: 1; background: var(--surface-2); border: 1px solid var(--border);
  border-radius: var(--radius); padding: 0.6rem; font-size: 0.8rem; color: var(--text-muted);
  cursor: pointer; transition: all var(--transition); font-family: 'DM Sans', sans-serif; }
.toggle-btn.active { border-color: var(--gold); color: var(--gold); background: rgba(200,168,75,0.08); }

/* =============================================
   RESULT COMPONENTS
   ============================================= */
.results-stack { display: flex; flex-direction: column; gap: 0.6rem; margin-bottom: 1.25rem; }
.result-row { display: flex; justify-content: space-between; align-items: center;
  font-size: 0.85rem; padding: 0.4rem 0; }
.result-row.total { border-top: 1px solid var(--border); padding-top: 0.75rem; margin-top: 0.25rem; }
.result-row.total .result-row-label { font-weight: 600; font-size: 0.9rem; }
.result-row.total .result-row-value { font-size: 1.3rem; font-family: 'DM Mono', monospace; }
.result-row-label { color: var(--text-muted); }
.result-row-value { font-family: 'DM Mono', monospace; font-size: 0.9rem; }
.result-divider { border-top: 1px solid var(--border); margin: 0.25rem 0; }
.gain { color: var(--green); }
.loss { color: #e07070; }
.gold { color: var(--gold-light); }

.futures-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 0.75rem; margin-bottom: 1.25rem; }
.future-card { background: var(--surface-2); border: 1px solid var(--border); border-radius: var(--radius);
  padding: 1rem; text-align: center; }
.future-card.future-rollover { border-color: rgba(62,207,142,0.25); background: rgba(62,207,142,0.04); }
.future-card.future-cashout { border-color: rgba(224,112,112,0.25); background: rgba(224,112,112,0.04); }
.future-label { font-size: 0.75rem; color: var(--text-muted); margin-bottom: 0.5rem; }
.future-value { font-family: 'DM Mono', monospace; font-size: 1.4rem; font-weight: 500;
  color: var(--text); line-height: 1.2; }
.future-value.gold { color: var(--gold-light); }
.future-sub { font-size: 0.7rem; color: var(--text-dim); margin-top: 0.3rem; }

.breakdown-list { display: flex; flex-direction: column; gap: 0.5rem; margin: 1rem 0; }
.breakdown-item { display: flex; justify-content: space-between; font-size: 0.82rem;
  color: var(--text-muted); padding: 0.35rem 0; border-bottom: 1px solid rgba(255,255,255,0.04); }
.breakdown-item span:last-child { font-family: 'DM Mono', monospace; color: var(--text); }

.verdict-box { border-radius: var(--radius); padding: 0.85rem 1rem; font-size: 0.85rem;
  line-height: 1.6; margin-top: 1rem; }
.verdict-good { background: rgba(62,207,142,0.06); border: 1px solid rgba(62,207,142,0.2); color: #7ecfa8; }
.verdict-warn { background: rgba(200,168,75,0.06); border: 1px solid rgba(200,168,75,0.2); color: var(--gold); }
.verdict-icon { margin-right: 0.4rem; }

/* =============================================
   BAR CHARTS (CSS)
   ============================================= */
.bar-compare { margin-top: 1.25rem; }
.bar-track { display: flex; height: 14px; border-radius: 99px; overflow: hidden;
  background: var(--surface-2); margin-bottom: 0.5rem; }
.bar-track.tall { height: 24px; }
.bar-fill { height: 100%; transition: width 0.5s ease; }
.loss-fill { background: #e07070; }
.gain-fill { background: var(--green); }
.rollover-fill { background: var(--green); }
.cashout-fill { background: var(--text-dim); }
.bar-labels { display: flex; justify-content: space-between; font-size: 0.72rem; color: var(--text-dim); }

/* =============================================
   COMPARE GRID (loan vs withdrawal)
   ============================================= */
.compare-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 1rem; margin-bottom: 1rem; }
.compare-col { background: var(--surface-2); border: 1px solid var(--border); border-radius: var(--radius); overflow: hidden; }
.compare-header { padding: 0.75rem 1rem; font-size: 0.82rem; font-weight: 600; border-bottom: 1px solid var(--border); }
.loan-header { background: rgba(62,207,142,0.06); color: var(--green); }
.withdrawal-header { background: rgba(224,112,112,0.06); color: #e07070; }
.compare-stat { display: flex; flex-direction: column; padding: 0.6rem 1rem;
  border-bottom: 1px solid rgba(255,255,255,0.04); }
.compare-stat-label { font-size: 0.72rem; color: var(--text-dim); }
.compare-stat-value { font-family: 'DM Mono', monospace; font-size: 0.9rem; color: var(--text); }
.compare-stat.total-stat .compare-stat-label { font-weight: 600; color: var(--text-muted); }
.compare-stat.total-stat .compare-stat-value { font-size: 1.05rem; }
.compare-divider { border-top: 1px solid var(--border); }

/* =============================================
   GROWTH PROJECTOR SPECIFIC
   ============================================= */
.difference-box { background: rgba(200,168,75,0.08); border: 1px solid rgba(200,168,75,0.2);
  border-radius: var(--radius); padding: 1rem; text-align: center; margin-bottom: 1rem; }
.diff-label { font-size: 0.8rem; color: var(--text-muted); display: block; }
.diff-value { font-family: 'DM Serif Display', serif; font-size: 2rem; color: var(--gold-light);
  display: block; line-height: 1.3; }

/* =============================================
   DRAWDOWN / TIMELINE
   ============================================= */
.timeline-bar { margin-top: 1rem; }
.timeline-label { font-size: 0.75rem; color: var(--text-dim); margin-bottom: 0.4rem; }
.timeline-track { height: 8px; background: var(--surface-2); border-radius: 99px; overflow: hidden; margin-bottom: 0.4rem; }
.timeline-fill { height: 100%; background: var(--green); border-radius: 99px; transition: width 0.5s ease; }
.timeline-labels { display: flex; justify-content: space-between; font-size: 0.7rem; color: var(--text-dim); }

/* =============================================
   RMD TABLE
   ============================================= */
.rmd-table-wrapper { margin-top: 1.25rem; }
.rmd-table-title { font-size: 0.78rem; color: var(--text-muted); font-weight: 600; margin-bottom: 0.5rem; }
.rmd-table { width: 100%; border-collapse: collapse; font-size: 0.82rem; }
.rmd-table th { color: var(--text-dim); font-weight: 500; text-align: left; padding: 0.4rem 0.5rem;
  border-bottom: 1px solid var(--border); }
.rmd-table td { padding: 0.4rem 0.5rem; color: var(--text-muted); border-bottom: 1px solid rgba(255,255,255,0.03); }
.rmd-table tr.current-row td { color: var(--gold); font-weight: 500;
  background: rgba(200,168,75,0.05); }

/* =============================================
   ROTH CONVERSION SPECIFIC
   ============================================= */
.breakeven-box { background: var(--surface-2); border: 1px solid var(--border); border-radius: var(--radius);
  padding: 1rem; margin-top: 1rem; }
.breakeven-title { font-size: 0.78rem; font-weight: 600; color: var(--text-muted); margin-bottom: 0.4rem; }
.breakeven-box p { font-size: 0.82rem; color: var(--text-muted); line-height: 1.6; margin: 0; }

/* =============================================
   AM I ON TRACK SPECIFIC
   ============================================= */
.track-status { display: flex; align-items: center; gap: 0.75rem; padding: 0.85rem 1rem;
  border-radius: var(--radius); margin-bottom: 1.25rem; font-size: 0.9rem; font-weight: 600; }
.track-ahead { background: rgba(62,207,142,0.06); border: 1px solid rgba(62,207,142,0.2); color: var(--green); }
.track-behind { background: rgba(224,112,112,0.06); border: 1px solid rgba(224,112,112,0.2); color: #e07070; }
.progress-section { margin-bottom: 1.25rem; }
.progress-labels { display: flex; justify-content: space-between; font-size: 0.78rem;
  color: var(--text-muted); margin-bottom: 0.5rem; }
.progress-track { height: 12px; background: var(--surface-2); border-radius: 99px;
  overflow: hidden; margin-bottom: 0.4rem; position: relative; }
.progress-fill { height: 100%; border-radius: 99px; transition: width 0.5s ease; }
.progress-ahead { background: var(--green); }
.progress-behind { background: #e07070; }
.progress-pct { font-size: 0.72rem; color: var(--text-dim); text-align: right; }
.benchmark-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 0.6rem; margin-bottom: 1rem; }
.benchmark-item { background: var(--surface-2); border: 1px solid var(--border); border-radius: var(--radius);
  padding: 0.75rem; text-align: center; }
.benchmark-item.current-benchmark { border-color: rgba(200,168,75,0.3); background: rgba(200,168,75,0.04); }
.benchmark-label { font-size: 0.7rem; color: var(--text-dim); margin-bottom: 0.3rem; }
.benchmark-value { font-family: 'DM Mono', monospace; font-size: 0.85rem; color: var(--text); }
.benchmark-sub { font-size: 0.68rem; color: var(--text-dim); margin-top: 0.2rem; }
.milestone-row { margin-top: 1.25rem; }
.milestone-title { font-size: 0.75rem; color: var(--text-muted); font-weight: 600; margin-bottom: 0.6rem; }
.milestones { display: flex; gap: 0.4rem; flex-wrap: wrap; }
.milestone { background: var(--surface-2); border: 1px solid var(--border); border-radius: 8px;
  padding: 0.4rem 0.6rem; font-size: 0.7rem; color: var(--text-dim); }
.milestone.milestone-current { border-color: rgba(200,168,75,0.4); color: var(--gold); }
.milestone-age { font-weight: 600; }
.milestone-target { color: inherit; }

/* =============================================
   CTA NUDGE
   ============================================= */
.cta-nudge { margin-top: 1.25rem; display: flex; align-items: center; gap: 1rem; flex-wrap: wrap;
  padding: 0.85rem 1rem; background: var(--surface-2); border-radius: var(--radius);
  border: 1px solid var(--border); font-size: 0.82rem; color: var(--text-muted); }
.btn-secondary-sm { background: transparent; border: 1px solid var(--border-hover);
  border-radius: 8px; padding: 0.4rem 0.85rem; color: var(--gold); font-size: 0.78rem;
  text-decoration: none; cursor: pointer; white-space: nowrap; transition: all var(--transition); }
.btn-secondary-sm:hover { background: rgba(200,168,75,0.08); }

/* =============================================
   PRIVACY / PROSE PAGE
   ============================================= */
.prose-page { max-width: 800px; margin: 0 auto; padding: 2.5rem 1.5rem 5rem; }
.prose-card h2 { font-family: 'DM Serif Display', serif; font-size: 1.3rem; color: var(--text);
  margin: 1.75rem 0 0.5rem; }
.prose-card h3 { font-size: 0.9rem; font-weight: 600; color: var(--text-muted); margin: 1rem 0 0.4rem; }
.prose-card p { color: var(--text-muted); font-size: 0.9rem; line-height: 1.75; margin: 0 0 0.75rem; }
.prose-card ul { color: var(--text-muted); font-size: 0.9rem; line-height: 1.75;
  padding-left: 1.5rem; margin: 0 0 0.75rem; }
.prose-card a { color: var(--gold); }

/* =============================================
   RESPONSIVE
   ============================================= */
@media (max-width: 900px) {
  .calc-layout { grid-template-columns: 1fr; }
  .calc-results:not(.visible) { opacity: 1; pointer-events: auto; }
  .home-title { font-size: 2.2rem; }
  .tool-card.featured { flex-direction: column; grid-column: auto; }
}

@media (max-width: 700px) {
  .site-nav { display: none; flex-direction: column; position: absolute; top: 52px;
    left: 0; right: 0; background: rgba(13,15,20,0.98); border-bottom: 1px solid var(--border);
    padding: 0.75rem; gap: 0.25rem; z-index: 99; }
  .site-nav.open { display: flex; }
  .nav-toggle { display: block; margin-left: auto; }
  .site-header { position: relative; }
  .compare-grid { grid-template-columns: 1fr; }
  .futures-grid { grid-template-columns: 1fr; }
  .benchmark-grid { grid-template-columns: 1fr 1fr; }
}

/* =============================================
   NAV GROUPS
   ============================================= */
.nav-group { display: flex; align-items: center; gap: 0.15rem; border-left: 1px solid var(--border); padding-left: 0.5rem; margin-left: 0.25rem; }
.nav-group-label { font-size: 0.6rem; color: var(--text-dim); text-transform: uppercase; letter-spacing: 0.08em; padding: 0 0.3rem; white-space: nowrap; }
.nav-featured { border: 1px solid rgba(200,168,75,0.35) !important; color: var(--gold) !important; background: rgba(200,168,75,0.06) !important; margin-left: 0.5rem !important; }
.nav-featured:hover, .nav-featured.active { background: rgba(200,168,75,0.14) !important; }

/* =============================================
   AFFILIATE STRIPS
   ============================================= */
.affiliate-strip { margin: 2rem 0; padding: 1.25rem; background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius-lg); }
.fee-strip { border-color: rgba(200,168,75,0.25); background: linear-gradient(135deg, var(--surface), rgba(200,168,75,0.03)); }
.hysa-strip { border-color: rgba(62,207,142,0.2); }
.advisor-strip { border-color: rgba(100,130,255,0.2); }
.affiliate-strip-label { font-size: 0.75rem; color: var(--text-muted); font-weight: 600; letter-spacing: 0.05em; text-transform: uppercase; margin-bottom: 0.85rem; }
.affiliate-cards { display: grid; grid-template-columns: repeat(3, 1fr); gap: 0.75rem; margin-bottom: 0.75rem; }
.affiliate-card { background: var(--surface-2); border: 1px solid var(--border); border-radius: var(--radius); padding: 0.85rem 1rem; text-decoration: none; color: var(--text); display: flex; flex-direction: column; gap: 0.3rem; transition: all var(--transition); }
.affiliate-card:hover { border-color: var(--gold); transform: translateY(-1px); }
.affiliate-card.featured-aff { border-color: rgba(200,168,75,0.3); background: rgba(200,168,75,0.05); }
.aff-badge { display: inline-block; background: rgba(200,168,75,0.15); color: var(--gold); font-size: 0.62rem; letter-spacing: 0.08em; text-transform: uppercase; padding: 0.15rem 0.5rem; border-radius: 99px; font-family: 'DM Mono', monospace; align-self: flex-start; }
.aff-name { font-size: 0.9rem; font-weight: 600; color: var(--text); }
.aff-detail { font-size: 0.75rem; color: var(--text-muted); line-height: 1.4; }
.aff-cta { font-size: 0.78rem; color: var(--gold); font-weight: 500; margin-top: auto; }
.aff-disclosure { font-size: 0.65rem; color: var(--text-dim); }

/* =============================================
   FEE DETECTOR SPECIFIC
   ============================================= */
.upload-layout { display: grid; grid-template-columns: 1fr 1fr; gap: 1.5rem; margin-bottom: 2rem; }
.upload-card { background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius-lg); overflow: hidden; }
.upload-zone { padding: 2.5rem; display: flex; flex-direction: column; align-items: center; gap: 0.85rem; border: 2px dashed var(--border); margin: 1rem; border-radius: var(--radius); transition: all var(--transition); text-align: center; }
.upload-zone.drag-over { border-color: var(--gold); background: rgba(200,168,75,0.05); }
.upload-icon { font-size: 3rem; }
.upload-title { font-family: 'DM Serif Display', serif; font-size: 1.2rem; }
.upload-sub { font-size: 0.78rem; color: var(--text-muted); max-width: 30ch; }
.upload-btn { cursor: pointer; }
.upload-privacy { padding: 0.85rem 1.25rem; background: var(--surface-2); font-size: 0.72rem; color: var(--text-dim); line-height: 1.5; border-top: 1px solid var(--border); }
.what-we-find { background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius-lg); padding: 1.5rem; }
.what-we-find h3 { font-family: 'DM Serif Display', serif; font-size: 1.1rem; margin-bottom: 1rem; }
.find-list { list-style: none; display: flex; flex-direction: column; gap: 0.85rem; }
.find-list li { display: flex; gap: 0.75rem; align-items: flex-start; }
.find-icon { font-size: 1.2rem; flex-shrink: 0; margin-top: 0.1rem; }
.find-list strong { display: block; font-size: 0.88rem; margin-bottom: 0.15rem; }
.find-list span { font-size: 0.78rem; color: var(--text-muted); line-height: 1.4; }

.loading-state { display: flex; flex-direction: column; align-items: center; gap: 1.25rem; padding: 3rem; background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius-lg); text-align: center; }
.loading-spinner { width: 48px; height: 48px; border: 3px solid var(--border); border-top-color: var(--gold); border-radius: 50%; animation: spin 1s linear infinite; }
@keyframes spin { to { transform: rotate(360deg); } }
.loading-title { font-family: 'DM Serif Display', serif; font-size: 1.2rem; }
.loading-steps { display: flex; flex-direction: column; gap: 0.4rem; }
.loading-step { font-size: 0.82rem; color: var(--text-dim); transition: color 0.3s; }
.loading-step.active { color: var(--gold); }
.error-state { display: flex; flex-direction: column; align-items: center; gap: 1rem; padding: 2.5rem; background: rgba(224,112,112,0.05); border: 1px solid rgba(224,112,112,0.2); border-radius: var(--radius-lg); text-align: center; }
.error-icon { font-size: 2.5rem; }
.error-msg { font-size: 0.9rem; color: #e07070; }

.impact-banner { padding: 1.75rem; border-radius: var(--radius-lg); margin-bottom: 1.5rem; display: grid; grid-template-columns: 1fr 1fr; gap: 1.5rem; align-items: center; }
.impact-high { background: rgba(224,112,112,0.06); border: 1px solid rgba(224,112,112,0.25); }
.impact-medium { background: rgba(200,168,75,0.06); border: 1px solid rgba(200,168,75,0.25); }
.impact-low { background: rgba(62,207,142,0.06); border: 1px solid rgba(62,207,142,0.2); }
.impact-label { font-size: 0.78rem; color: var(--text-muted); margin-bottom: 0.4rem; }
.impact-number { font-family: 'DM Serif Display', serif; font-size: 2.5rem; color: #e07070; line-height: 1.1; }
.impact-sub { font-size: 0.72rem; color: var(--text-dim); margin-top: 0.4rem; }
.switch-label { font-size: 0.78rem; color: var(--text-muted); margin-bottom: 0.4rem; }
.switch-number { font-family: 'DM Serif Display', serif; font-size: 2rem; color: var(--green); }
.switch-sub { font-size: 0.72rem; color: var(--text-dim); margin-top: 0.3rem; }

.fee-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 1.25rem; margin-bottom: 1.25rem; }
.fee-card { overflow-x: auto; }
.fee-table { width: 100%; border-collapse: collapse; font-size: 0.8rem; white-space: nowrap; }
.fee-table th { color: var(--text-dim); font-weight: 500; text-align: left; padding: 0.4rem 0.5rem; border-bottom: 1px solid var(--border); font-size: 0.72rem; }
.fee-table td { padding: 0.45rem 0.5rem; border-bottom: 1px solid rgba(255,255,255,0.03); color: var(--text-muted); }
.fund-name { display: block; color: var(--text); font-size: 0.78rem; }
.fund-ticker { font-family: 'DM Mono', monospace; font-size: 0.68rem; color: var(--text-dim); }
.fee-total-row { display: flex; justify-content: space-between; font-size: 0.82rem; padding: 0.6rem 0.5rem 0; border-top: 1px solid var(--border); margin-top: 0.4rem; }
.fee-total-val { font-family: 'DM Mono', monospace; color: #e07070; font-weight: 600; }
.no-data { font-size: 0.82rem; color: var(--text-dim); padding: 0.5rem 0; }

.fee-summary .summary-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 0.75rem; margin-bottom: 1rem; }
.summary-stat { background: var(--surface-2); border: 1px solid var(--border); border-radius: var(--radius); padding: 0.75rem; }
.summary-stat-label { font-size: 0.7rem; color: var(--text-dim); margin-bottom: 0.35rem; }
.summary-stat-value { font-family: 'DM Mono', monospace; font-size: 0.9rem; color: var(--text); }
.notes-box { background: var(--surface-2); border: 1px solid var(--border); border-radius: var(--radius); padding: 0.85rem; font-size: 0.82rem; color: var(--text-muted); line-height: 1.6; }

.fee-cta-card { display: flex; flex-direction: column; gap: 1rem; margin-bottom: 1.25rem; }
.fee-cta-header { display: flex; gap: 0.75rem; align-items: flex-start; }
.fee-cta-icon { font-size: 1.5rem; flex-shrink: 0; }
.fee-cta-header strong { display: block; margin-bottom: 0.25rem; }
.fee-cta-header p { font-size: 0.82rem; color: var(--text-muted); margin: 0; }
.reset-row { text-align: center; margin-top: 1.5rem; }
.inf-table-wrapper { margin-top: 1.25rem; }

/* =============================================
   HOME PAGE UPDATES
   ============================================= */
.tool-card-star { display: inline-block; background: rgba(200,168,75,0.15); color: var(--gold); font-size: 0.62rem; letter-spacing: 0.08em; text-transform: uppercase; padding: 0.15rem 0.5rem; border-radius: 99px; font-family: 'DM Mono', monospace; margin-bottom: 0.35rem; }

/* =============================================
   RESPONSIVE ADDITIONS
   ============================================= */
@media (max-width: 900px) {
  .upload-layout { grid-template-columns: 1fr; }
  .impact-banner { grid-template-columns: 1fr; }
  .fee-grid { grid-template-columns: 1fr; }
  .fee-summary .summary-grid { grid-template-columns: repeat(2,1fr); }
  .affiliate-cards { grid-template-columns: 1fr; }
}

@media (max-width: 700px) {
  .nav-group { display: none; }
  .nav-group-label { display: none; }
}

/* =============================================
   SHARE BAR
   ============================================= */
.share-bar {
  display: flex; align-items: center; gap: 1rem; flex-wrap: wrap;
  padding: 1rem 1.25rem; margin: 2rem 0 0;
  background: var(--surface); border: 1px solid var(--border);
  border-radius: var(--radius); border-left: 3px solid var(--gold);
}
.share-label {
  font-size: 0.75rem; color: var(--text-muted); font-weight: 500;
  letter-spacing: 0.04em; white-space: nowrap;
}
.share-buttons { display: flex; gap: 0.5rem; flex-wrap: wrap; }
.share-btn {
  display: inline-flex; align-items: center; gap: 0.4rem;
  padding: 0.45rem 0.85rem; border-radius: 8px; font-size: 0.78rem;
  font-weight: 500; text-decoration: none; cursor: pointer;
  border: 1px solid var(--border); background: var(--surface-2);
  color: var(--text-muted); font-family: 'DM Sans', sans-serif;
  transition: all var(--transition); white-space: nowrap;
}
.share-btn:hover { transform: translateY(-1px); }
.share-x:hover    { background: #000; border-color: #333; color: #fff; }
.share-fb:hover   { background: #1877f2; border-color: #1877f2; color: #fff; }
.share-sms:hover  { background: #34c759; border-color: #34c759; color: #fff; }
.share-copy:hover { border-color: var(--gold); color: var(--gold); }
.share-copy.copied { border-color: var(--green); color: var(--green); background: rgba(62,207,142,0.08); }

@media (max-width: 600px) {
  .share-bar { flex-direction: column; align-items: flex-start; gap: 0.75rem; }
  .share-btn span { display: none; }
  .share-btn { padding: 0.5rem 0.65rem; }
  .share-copy span { display: inline; }  /* always show "Copy link" / "Copied!" */
}
