/* ════════════════════════════════════════════════════════════════
   components.css — MFP shared component styles
   Loaded by base_public.html and base_dashboard.html
   Phase 3 — CSS extraction (2026-04-14)
   ════════════════════════════════════════════════════════════════ */

/* ────────────────────────────────────────────
   BUTTONS
   Used across all public + dashboard pages
   ──────────────────────────────────────────── */
.btn {
  display: inline-flex;
  align-items: center;
  padding: 7px 14px;
  border-radius: var(--r-btn);
  font-family: var(--sans);
  font-size: 13px;
  font-weight: 600;
  cursor: pointer;
  border: none;
  text-decoration: none;
  transition: transform 0.15s, background 0.15s;
  gap: 6px;
}
.btn:hover { transform: translateY(-1px); }
.btn-red { background: var(--red); color: #fff; box-shadow: 0 2px 12px rgba(200,71,42,0.25); }
.btn-red:hover { background: #b33d22; }
.btn-ghost { background: transparent; color: var(--ink); border: 1.5px solid var(--border); }
.btn-ghost:hover { background: var(--warm-mid); }
.btn-sm { padding: 6px 12px; font-size: 12px; }

/* ────────────────────────────────────────────
   HERO CHIP / EYEBROW LABEL
   Used on: about, privacy, terms, disclaimer, methodology,
            net_worth_by_age, super_by_age, average_salary,
            rule_50_30_20
   ──────────────────────────────────────────── */
.hero-chip {
  display: inline-block;
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 1.4px;
  text-transform: uppercase;
  color: var(--accent);
  background: var(--accent-light);
  padding: 5px 14px;
  border-radius: 100px;
  margin-bottom: 18px;
}

/* ────────────────────────────────────────────
   ABOUT HERO SECTION
   Used on: about, privacy, terms, disclaimer, methodology
   ──────────────────────────────────────────── */
.about-hero { text-align: center; margin-bottom: 60px; }
.about-hero h1 {
  font-family: var(--sans);
  font-weight: 700;
  font-size: clamp(32px, 5vw, 52px);
  letter-spacing: -1.5px;
  line-height: 1.08;
  margin-bottom: 18px;
}
.about-hero h1 .accent { color: var(--accent); }
.about-hero p { font-size: 17px; color: var(--muted); line-height: 1.65; max-width: 540px; margin: 0 auto; }

/* ────────────────────────────────────────────
   ABOUT SECTION CARD
   Used on: about, privacy, terms, disclaimer, methodology
   ──────────────────────────────────────────── */
.about-section {
  background: var(--card-bg);
  border: 1px solid var(--border);
  border-radius: 20px;
  padding: 36px 40px;
  margin-bottom: 24px;
  box-shadow: var(--shadow);
}
.about-section h2 {
  font-family: var(--serif);
  font-size: clamp(22px, 3vw, 28px);
  letter-spacing: -0.8px;
  margin-bottom: 16px;
  line-height: 1.15;
}
.about-section p { color: var(--muted); margin-bottom: 14px; line-height: 1.7; }
.about-section p:last-child { margin-bottom: 0; }
.about-section strong { color: var(--ink); font-weight: 600; }
.about-section ul { color: var(--muted); margin: 0 0 14px 20px; line-height: 1.8; }
.about-section ul:last-child { margin-bottom: 0; }
.about-section li { margin-bottom: 4px; }
.about-section a { color: var(--accent); text-decoration: none; }
.about-section a:hover { text-decoration: underline; }

/* ────────────────────────────────────────────
   SECTION EYEBROW
   Used on: about, privacy, terms, disclaimer, methodology
   ──────────────────────────────────────────── */
.section-eyebrow {
  font-size: 10.5px;
  font-weight: 700;
  letter-spacing: 1.4px;
  text-transform: uppercase;
  color: var(--accent);
  margin-bottom: 10px;
  display: flex;
  align-items: center;
  gap: 8px;
}
.section-eyebrow .ey-dot {
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: var(--accent);
  flex-shrink: 0;
}

/* ────────────────────────────────────────────
   EYEBROW (guide pages variant)
   Used on: net_worth_by_age, super_by_age, average_salary,
            rule_50_30_20
   ──────────────────────────────────────────── */
.eyebrow {
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 1.4px;
  text-transform: uppercase;
  color: var(--accent);
  margin-bottom: 12px;
  display: flex;
  align-items: center;
  gap: 8px;
}
.eyebrow-dot {
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: var(--accent);
  flex-shrink: 0;
}

/* ────────────────────────────────────────────
   CTA CARD (dark dark banner, light button)
   Used on: about, methodology, disclaimer + guide pages
   ──────────────────────────────────────────── */
.cta-card {
  background: var(--ink);
  color: var(--paper);
  border-radius: 20px;
  padding: 40px;
  text-align: center;
  margin-top: 32px;
}
.cta-card h2 {
  font-family: var(--serif);
  font-size: clamp(24px, 3.5vw, 32px);
  letter-spacing: -1px;
  margin-bottom: 12px;
}
.cta-card p {
  font-size: 15px;
  opacity: 0.7;
  margin-bottom: 24px;
  line-height: 1.6;
  max-width: 440px;
  margin-left: auto;
  margin-right: auto;
}
.cta-btn {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  background: var(--paper);
  color: var(--ink);
  border: none;
  border-radius: 12px;
  padding: 13px 28px;
  font-size: 15px;
  font-weight: 700;
  font-family: var(--sans);
  cursor: pointer;
  text-decoration: none;
  transition: opacity 0.15s, transform 0.12s;
}
.cta-btn:hover { opacity: 0.9; transform: translateY(-1px); }

/* ────────────────────────────────────────────
   CTA BAND (guide pages inline CTA)
   Used on: net_worth_by_age, super_by_age, average_salary,
            rule_50_30_20
   ──────────────────────────────────────────── */
.cta-band {
  background: var(--ink);
  border-radius: var(--r-card);
  padding: 36px 40px;
  text-align: center;
  margin-bottom: 24px;
}
.cta-band h2 { color: #fff; font-size: 1.6rem; margin-bottom: 10px; }
.cta-band p { color: rgba(245,240,232,0.65); font-size: 0.95rem; margin-bottom: 24px; }
.cta-band .btn-light,
.cta-band .btn-red { background: #f5f0e8; color: var(--ink); display: inline-flex; }
.cta-band .btn-light:hover,
.cta-band .btn-red:hover { background: #fff; }

/* ────────────────────────────────────────────
   PAGE HERO (guide pages)
   Used on: net_worth_by_age, super_by_age, average_salary,
            rule_50_30_20
   ──────────────────────────────────────────── */
.page-hero { margin-bottom: 48px; }
.page-hero h1 {
  font-family: var(--sans);
  font-weight: 700;
  font-size: clamp(2rem, 5vw, 3rem);
  letter-spacing: -1px;
  margin-bottom: 16px;
  color: var(--ink);
  line-height: 1.15;
}
.page-hero .lead {
  font-size: 1.1rem;
  color: var(--muted);
  line-height: 1.7;
  max-width: 640px;
}

/* ────────────────────────────────────────────
   CARD (guide pages)
   Used on: net_worth_by_age, super_by_age, average_salary,
            rule_50_30_20
   ──────────────────────────────────────────── */
.card {
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: var(--r-card);
  padding: 36px 40px;
  margin-bottom: 24px;
  box-shadow: var(--shadow);
}

/* ────────────────────────────────────────────
   DATA TABLE (guide pages)
   Used on: net_worth_by_age, super_by_age, average_salary,
            rule_50_30_20
   ──────────────────────────────────────────── */
.data-table-wrap {
  overflow-x: auto;
  margin: 8px 0 0;
  border-radius: 12px;
  border: 1px solid var(--border);
}
.data-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 0.9rem;
}
.data-table th {
  background: var(--warm-light);
  padding: 13px 16px;
  text-align: left;
  font-size: 0.75rem;
  font-weight: 700;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--muted);
  border-bottom: 1px solid var(--border);
  white-space: nowrap;
}
.data-table td {
  padding: 14px 16px;
  border-bottom: 1px solid var(--border);
  color: var(--ink);
  vertical-align: middle;
}
.data-table tr:last-child td { border-bottom: none; }
.data-table tr:hover td { background: var(--warm-light); }
.data-table .num { font-variant-numeric: tabular-nums; font-weight: 500; }
.data-table .highlight { font-weight: 700; color: var(--ink); }

/* ────────────────────────────────────────────
   FAQ ACCORDION
   Used on: net_worth_by_age, super_by_age, average_salary,
            rule_50_30_20
   ──────────────────────────────────────────── */
.faq-list { display: flex; flex-direction: column; gap: 0; }
.faq-item {
  border: 1px solid var(--border);
  border-radius: 12px;
  background: var(--card);
  overflow: hidden;
  margin-bottom: 8px;
}
.faq-item:hover { border-color: rgba(200,71,42,0.25); }
.faq-q {
  width: 100%;
  background: none;
  border: none;
  padding: 20px 24px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  font-family: var(--sans);
  font-size: 1rem;
  font-weight: 600;
  color: var(--ink);
  cursor: pointer;
  text-align: left;
}
.faq-q svg { flex-shrink: 0; transition: transform 0.25s ease; stroke: var(--muted); }
.faq-item.open .faq-q svg { transform: rotate(180deg); }
.faq-a {
  padding: 0 24px;
  max-height: 0;
  overflow: hidden;
  transition: max-height 0.35s ease, padding 0.35s ease;
  font-size: 0.92rem;
  color: var(--muted);
  line-height: 1.7;
}
.faq-item.open .faq-a { max-height: 400px; padding: 0 24px 20px; }

/* ────────────────────────────────────────────
   WARNING BANNER
   Used on: disclaimer (+ available for other pages)
   ──────────────────────────────────────────── */
.warning-banner {
  background: var(--accent-light);
  border: 1.5px solid rgba(200,71,42,0.25);
  border-radius: 14px;
  padding: 20px 24px;
  margin-bottom: 28px;
  display: flex;
  gap: 14px;
  align-items: flex-start;
}
.warning-icon { font-size: 22px; flex-shrink: 0; margin-top: 1px; }
.warning-body { font-size: 14px; color: var(--accent); line-height: 1.65; }
.warning-body strong { color: var(--accent); font-weight: 700; }

/* ────────────────────────────────────────────
   TRUST ROW (used with _trust_chips.html)
   Used on: home, budget, forecast, milestones
   ──────────────────────────────────────────── */
.trust-row {
  display: flex;
  gap: 24px;
  flex-wrap: wrap;
  justify-content: center;
  font-size: 13px;
  color: var(--muted);
  margin: 16px 0;
}
.trust-chip {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-size: 13px;
  color: var(--muted);
}

/* ────────────────────────────────────────────
   SOURCE NOTE
   Used on: guide pages
   ──────────────────────────────────────────── */
.source-note {
  font-size: 0.8rem;
  color: var(--muted);
  padding: 20px 0 0;
  border-top: 1px solid var(--border);
  margin-top: 8px;
}

/* ────────────────────────────────────────────
   FORM INPUTS (shared modal + public form styles)
   ──────────────────────────────────────────── */
.form-group { margin-bottom: 18px; }
.form-label {
  display: block;
  font-size: 12px;
  font-weight: 700;
  color: var(--muted);
  letter-spacing: 0.06em;
  text-transform: uppercase;
  margin-bottom: 7px;
}
.form-input,
.form-select {
  width: 100%;
  padding: 11px 14px;
  border: 1.5px solid var(--warm-mid);
  border-radius: var(--r-input);
  font-family: var(--sans);
  font-size: 14px;
  color: var(--ink);
  background: var(--card-bg);
  transition: border-color 0.15s;
  outline: none;
}
.form-input:focus,
.form-select:focus {
  border-color: var(--ink);
  box-shadow: 0 0 0 3px rgba(13,17,23,0.06);
}
.form-input::placeholder { color: var(--muted); opacity: 0.6; }
.form-error { color: var(--accent); font-size: 12px; margin-top: 8px; display: none; }

/* ────────────────────────────────────────────
   TOAST NOTIFICATION (used with _toast.html)
   Used on: dashboard_assets, dashboard_debts
   ──────────────────────────────────────────── */
#mfp-toast {
  position: fixed;
  bottom: 28px;
  left: 50%;
  transform: translateX(-50%) translateY(10px);
  background: var(--ink);
  color: #fff;
  padding: 10px 22px;
  border-radius: 10px;
  font-size: 13.5px;
  font-weight: 500;
  z-index: 9999;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.2s, transform 0.2s;
  white-space: nowrap;
}
#mfp-toast.on  { opacity: 1; transform: translateX(-50%) translateY(0); }
#mfp-toast.ok  { background: var(--green); }
#mfp-toast.err { background: var(--accent); }

/* ────────────────────────────────────────────
   SOURCE CARDS (data sources grid)
   Used on: about, methodology
   ──────────────────────────────────────────── */
.sources-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 14px;
  margin-top: 16px;
}
.source-card {
  background: var(--paper);
  border: 1px solid var(--border);
  border-radius: 14px;
  padding: 18px 16px;
}
.source-logo { font-size: 22px; margin-bottom: 8px; }
.source-name { font-size: 13px; font-weight: 700; color: var(--ink); margin-bottom: 4px; }
.source-desc { font-size: 12px; color: var(--muted); line-height: 1.5; }

@media (max-width: 640px) {
  .sources-grid { grid-template-columns: 1fr 1fr; }
}
@media (max-width: 420px) {
  .sources-grid { grid-template-columns: 1fr; }
}

/* ────────────────────────────────────────────
   RESPONSIVE — shared guide page mobile
   ──────────────────────────────────────────── */
@media (max-width: 768px) {
  .card { padding: 24px 20px; }
  .cta-band { padding: 28px 20px; }
  .trust-row { gap: 12px; justify-content: center; }
}
@media (max-width: 640px) {
  .about-section { padding: 24px 20px; }
}
