/* ============================================================
   DollarTrader Light Theme — main.css
   ============================================================ */

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

/* ── Design tokens ── */
:root {
  --bg:        #ffffff;
  --surface:   #f4f9f2;
  --surface2:  #eaf3e6;
  --border:    #c8ddc2;
  --border2:   #b0cfaa;
  --green-dk:  #1e5c1e;   /* logo deep green — primary */
  --green-md:  #2e8b2e;   /* mid green — accents */
  --green-lt:  #52a84a;   /* brighter green — positive values */
  --gold:      #EFBF04;   /* muted gold */
  --red:       #c0392b;
  --blue:      #1a6aaa;
  --blue-lt:   #e8f2fa;
  --muted:     #6b8c66;
  --text:      #182418;
  --subtext:   #3d5c3a;
  --nav-bg:    #1a4e1a;
  --max-w:     968px;     /* shared max-width for header/hero/content */
}

/* ── Base ── */
body {
  background: var(--bg);
  color: var(--text);
  font-family: 'Segoe UI', system-ui, -apple-system, sans-serif;
  min-height: 100vh;
  padding: 0 0 80px;
}

/* ── Site Header / Nav ── */
.site-header {
  background: var(--nav-bg);
  box-shadow: 0 2px 10px rgba(0,0,0,0.22);
}
.site-header-inner {
  max-width: var(--max-w);
  margin: 0 auto;
  padding: 10px 24px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
}
.logo-link {
  flex-shrink: 0;
  line-height: 0;
}
.site-header img {
  height: 58px;
  width: auto;
  display: block;
}
.site-nav {
  display: flex;
  flex-wrap: wrap;
  justify-content: flex-end;
  gap: 2px 0;
}
.site-nav a {
  color: rgba(255,255,255,0.88);
  text-decoration: none;
  font-size: 0.72rem;
  font-weight: 700;
  letter-spacing: 0.07em;
  text-transform: uppercase;
  padding: 6px 11px;
  border-radius: 5px;
  transition: background 0.15s, color 0.15s;
  white-space: nowrap;
}
.site-nav a:hover { background: rgba(255,255,255,0.12); color: #fff; }
.site-nav a.active {
  background: rgba(255,255,255,0.95);
  color: var(--nav-bg);
}

/* ── Hero Band ── */
.hero-band {
  background: linear-gradient(135deg, #f4f9f2 0%, #eaf3e6 60%, #dff0d8 100%);
  border-bottom: 1px solid var(--border);
}
.hero-band-inner {
  max-width: var(--max-w);
  margin: 0 auto;
  padding: 32px 24px 28px;
}
.hero-band .eyebrow {
  font-size: 0.62rem;
  font-weight: 700;
  letter-spacing: 0.2em;
  text-transform: uppercase;
  color: var(--green-md);
  margin-bottom: 10px;
}
.hero-band h1 {
  font-size: clamp(1.8rem, 4vw, 3rem);
  font-weight: 900;
  line-height: 1;
  letter-spacing: -0.03em;
  color: var(--green-dk);
}
.hero-band h1 em {
  font-style: normal;
  color: var(--gold);
}
.hero-band .sub {
  font-size: 0.88rem;
  color: var(--subtext);
  margin-top: 10px;
  max-width: 580px;
  line-height: 1.55;
}

/* ── Page wrap (content area) ── */
.page-wrap {
  max-width: var(--max-w);
  margin: 0 auto;
  padding: 28px 24px 0;
}

/* ── Intro block ── */
.intro-block {
  margin-bottom: 20px;
}
.intro-block p {
  font-size: 0.9rem;
  color: var(--subtext);
  line-height: 1.75;
  margin-bottom: 8px;
}
.intro-block p:last-child { margin-bottom: 0; }
.intro-block strong { color: var(--text); }
.intro-block a { color: var(--green-md); text-decoration: none; font-weight: 600; }
.intro-block a:hover { text-decoration: underline; }

/* ── Cards ── */
.card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 14px;
  padding: 22px 24px;
  margin-bottom: 20px;
}
.card-head {
  font-size: 0.63rem;
  font-weight: 700;
  letter-spacing: 0.13em;
  text-transform: uppercase;
  color: var(--muted);
  margin-bottom: 18px;
  padding-bottom: 12px;
  border-bottom: 1px solid var(--border);
  display: flex;
  align-items: center;
  gap: 10px;
}
.card-head .tag {
  padding: 2px 8px;
  border-radius: 4px;
  font-size: 0.58rem;
  font-weight: 700;
  letter-spacing: 0.07em;
}
.tag-cola   { background: rgba(30,92,30,0.1); color: var(--green-dk); border: 1px solid rgba(30,92,30,0.2); }
.tag-invest { background: var(--blue-lt); color: var(--blue); border: 1px solid rgba(26,106,170,0.2); }

/* ── Inputs ── */
.inputs-card { background: #fff; border-color: var(--border2); }

.input-grid {
  display: grid;
  grid-template-columns: 1fr 1fr 1fr 1fr;
  gap: 16px;
}
.input-group { display: flex; flex-direction: column; gap: 5px; }
.input-group label {
  font-size: 0.71rem;
  font-weight: 600;
  color: var(--subtext);
  letter-spacing: 0.02em;
}
.input-group input[type="number"] {
  background: #fff;
  border: 1.5px solid var(--border);
  border-radius: 8px;
  color: var(--text);
  font-size: 1rem;
  font-weight: 700;
  padding: 9px 12px;
  outline: none;
  transition: border-color 0.15s, box-shadow 0.15s;
  width: 100%;
}
.input-group input:focus {
  border-color: var(--green-md);
  box-shadow: 0 0 0 3px rgba(46,139,46,0.12);
}
.input-group .hint { font-size: 0.67rem; color: var(--muted); }

.lt-age-row {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-top: 16px;
}
.lt-age-row label { font-size: 0.72rem; color: var(--subtext); font-weight: 600; }
.lt-age-row input {
  background: #fff;
  border: 1.5px solid var(--border);
  border-radius: 6px;
  color: var(--text);
  font-size: 0.9rem;
  font-weight: 700;
  padding: 5px 10px;
  width: 68px;
  outline: none;
  transition: border-color 0.15s;
}
.lt-age-row input:focus { border-color: var(--green-md); }
.lt-age-row .hint { font-size: 0.68rem; color: var(--muted); }

.ssa-note { margin-top: 14px; font-size: 0.78rem; color: var(--muted); line-height: 1.6; }
.ssa-note a { color: var(--green-md); text-decoration: none; font-weight: 600; }
.ssa-note a:hover { text-decoration: underline; }

/* ── Two-col calculator grid ── */
.calc-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 20px;
  margin-bottom: 20px;
}

/* ── Sliders ── */
.rate-row {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-bottom: 18px;
}
.rate-row label { font-size: 0.72rem; font-weight: 600; color: var(--subtext); white-space: nowrap; }
.rate-row input[type="range"] { flex: 1; accent-color: var(--green-md); cursor: pointer; }
.rate-row input[type="range"].blue-slider { accent-color: var(--blue); }
.rate-val { font-size: 0.88rem; font-weight: 700; color: var(--green-dk); min-width: 42px; text-align: right; }
.rate-val.blue { color: var(--blue); }

/* ── Break-even highlight ── */
.be-highlight {
  background: linear-gradient(135deg, rgba(30,92,30,0.06) 0%, rgba(46,139,46,0.04) 100%);
  border: 1.5px solid rgba(30,92,30,0.2);
  border-radius: 10px;
  padding: 18px 16px;
  text-align: center;
  margin-bottom: 14px;
}
.be-highlight.blue-tint {
  background: linear-gradient(135deg, var(--blue-lt) 0%, #f0f7ff 100%);
  border-color: rgba(26,106,170,0.25);
}
.be-lbl {
  font-size: 0.62rem;
  font-weight: 700;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--muted);
  margin-bottom: 6px;
}
.be-age { font-size: 2rem; font-weight: 800; color: var(--green-dk); line-height: 1.1; }
.be-age.blue { color: var(--blue); }
.be-sub { font-size: 0.73rem; color: var(--subtext); margin-top: 5px; line-height: 1.45; }

/* ── Result rows ── */
.result-section {
  background: #fff;
  border: 1px solid var(--border);
  border-radius: 10px;
  padding: 14px 16px;
  margin-bottom: 12px;
}
.result-row {
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  padding: 6px 0;
  border-bottom: 1px solid #eef4ec;
  gap: 10px;
}
.result-row:last-child { border-bottom: none; }
.result-row .rlbl { font-size: 0.75rem; color: var(--subtext); }
.result-row .rval { font-size: 0.88rem; font-weight: 700; color: var(--text); font-variant-numeric: tabular-nums; white-space: nowrap; }

/* ── Lifetime section ── */
.lifetime-section {
  background: var(--surface2);
  border: 1px solid var(--border);
  border-radius: 10px;
  padding: 14px 16px;
}
.lt-title {
  font-size: 0.61rem;
  font-weight: 700;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--muted);
  margin-bottom: 10px;
}
.lt-row {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 5px 0;
  border-bottom: 1px solid rgba(0,0,0,0.05);
}
.lt-row:last-child { border-bottom: none; }
.lt-row .lt-lbl { font-size: 0.75rem; color: var(--subtext); }
.lt-row .lt-val { font-size: 0.88rem; font-weight: 700; font-variant-numeric: tabular-nums; }
.lt-better {
  margin-top: 10px;
  padding-top: 10px;
  border-top: 1px solid var(--border);
  font-size: 0.77rem;
  color: var(--subtext);
  text-align: center;
}
.lt-better strong { color: var(--green-lt); }
.lt-better .early-wins { color: var(--gold); }

/* ── Prose cards ── */
.prose-card {
  background: #fff;
  border: 1px solid var(--border);
  border-radius: 14px;
  padding: 24px 26px;
  margin-bottom: 20px;
}
.prose-card p {
  font-size: 0.88rem;
  color: var(--subtext);
  line-height: 1.8;
  margin-bottom: 12px;
}
.prose-card p:last-child { margin-bottom: 0; }
.prose-card p .hi  { color: var(--text); font-weight: 600; }
.prose-card p .pos { color: var(--green-lt); font-weight: 600; }
.prose-card p .neg { color: var(--red); font-weight: 600; }
.prose-card p .acc { color: var(--green-dk); font-weight: 600; }
.prose-card p .blu { color: var(--blue); font-weight: 600; }

/* ── Spouse section ── */
.spouse-input-row {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-bottom: 16px;
  flex-wrap: wrap;
}
.spouse-input-row label { font-size: 0.78rem; color: var(--subtext); font-weight: 600; }
.spouse-input-row input {
  background: #fff;
  border: 1.5px solid var(--border);
  border-radius: 7px;
  color: var(--text);
  font-size: 0.95rem;
  font-weight: 700;
  padding: 6px 11px;
  width: 72px;
  outline: none;
  transition: border-color 0.15s;
}
.spouse-input-row input:focus { border-color: var(--green-md); }
.spouse-input-row .hint { font-size: 0.7rem; color: var(--muted); }

.spouse-stat-row {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
  gap: 12px;
  margin-bottom: 16px;
}
.spouse-stat {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 9px;
  padding: 13px 14px;
}
.spouse-stat .s-lbl { font-size: 0.64rem; font-weight: 700; letter-spacing: 0.08em; text-transform: uppercase; color: var(--muted); margin-bottom: 5px; }
.spouse-stat .s-val { font-size: 1.05rem; font-weight: 700; color: var(--text); }
.spouse-stat .s-sub { font-size: 0.72rem; color: var(--muted); margin-top: 3px; }

/* ── Notes ── */
.notes {
  font-size: 0.75rem;
  color: var(--muted);
  line-height: 1.8;
  padding: 16px 20px;
  border: 1px solid var(--border);
  border-radius: 10px;
  background: var(--surface);
}
.notes strong { color: var(--subtext); }

/* ── Footer ── */
.site-footer {
  margin-top: 32px;
  border-top: 1px solid var(--border);
}
.site-footer-inner {
  max-width: var(--max-w);
  margin: 0 auto;
  padding: 20px 24px;
  text-align: center;
}
.footer-links {
  display: flex;
  flex-wrap: wrap;
  gap: 6px 16px;
  justify-content: center;
  margin-bottom: 10px;
}
.footer-links a {
  font-size: 0.75rem;
  color: var(--muted);
  text-decoration: none;
  transition: color 0.15s;
}
.footer-links a:hover { color: var(--green-md); }
.footer-links span { color: var(--border); font-size: 0.75rem; }
.footer-copy {
  font-size: 0.72rem;
  color: var(--muted);
}

/* ── Responsive ── */
@media (max-width: 680px) {
  .site-header-inner { flex-direction: column; align-items: flex-start; padding: 12px 16px; }
  .site-nav { justify-content: flex-start; }
  .site-header img { height: 44px; }
}
@media (max-width: 660px) {
  .calc-grid { grid-template-columns: 1fr; }
}
@media (max-width: 640px) {
  .input-grid { grid-template-columns: 1fr 1fr; }
}
@media (max-width: 600px) {
  .hero-band-inner { padding: 24px 16px; }
  .page-wrap { padding: 20px 16px 0; }
}
