/* ============================================================
   My Vital Wealth — Modern Fintech Design System
   深色专业金融科技设计语言
   ============================================================ */

/* ---------- Design Tokens (Default: Deep Navy) ---------- */
:root {
  /* Backgrounds */
  --bg-base: #070d1a;
  --bg-surface: #0c1628;
  --bg-card: rgba(255, 255, 255, 0.025);
  --bg-card-hover: rgba(255, 255, 255, 0.05);
  --bg-input: rgba(255, 255, 255, 0.04);
  --bg-input-focus: rgba(255, 255, 255, 0.06);

  /* Borders */
  --border: rgba(255, 255, 255, 0.07);
  --border-strong: rgba(255, 255, 255, 0.12);
  --border-accent: rgba(45, 212, 191, 0.35);

  /* Text */
  --text-primary: #f1f5f9;
  --text-secondary: #94a3b8;
  --text-muted: #94a3b8;
  --text-inverse: #070d1a;

  /* Accent: Teal */
  --accent: #2dd4bf;
  --accent-hover: #14b8a6;
  --accent-soft: rgba(45, 212, 191, 0.1);
  --accent-glow: rgba(45, 212, 191, 0.25);

  /* Semantic */
  --success: #34d399;
  --success-soft: rgba(52, 211, 153, 0.1);
  --warning: #fbbf24;
  --warning-soft: rgba(251, 191, 36, 0.1);
  --danger: #f87171;
  --danger-soft: rgba(248, 113, 113, 0.1);
  --ink: #64748b;

  /* Typography */
  --font-sans: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
  --font-mono: 'JetBrains Mono', 'IBM Plex Mono', 'SF Mono', monospace;
  --t-display: clamp(2.25rem, 4.5vw, 3.75rem);
  --t-h1: clamp(1.75rem, 3vw, 2.5rem);
  --t-h2: clamp(1.35rem, 2vw, 1.75rem);
  --t-h3: 1.125rem;
  --t-body: 1rem;
  --t-small: 0.875rem;
  --t-caption: 0.75rem;

  /* Spacing */
  --s1: 4px; --s2: 8px; --s3: 12px; --s4: 16px;
  --s5: 24px; --s6: 32px; --s7: 48px; --s8: 64px;

  /* Radius */
  --radius-sm: 8px;
  --radius-md: 12px;
  --radius-lg: 16px;
  --radius-xl: 24px;
  --radius-pill: 999px;

  /* Shadows */
  --shadow-xs: 0 1px 2px rgba(0,0,0,0.3);
  --shadow-sm: 0 2px 8px rgba(0,0,0,0.35);
  --shadow-md: 0 8px 24px rgba(0,0,0,0.4);
  --shadow-lg: 0 16px 48px rgba(0,0,0,0.5);
  --shadow-glow: 0 0 32px rgba(45, 212, 191, 0.12);

  /* Motion */
  --ease: cubic-bezier(0.4, 0, 0.2, 1);
  --duration: 200ms;

  /* Measure */
  --measure: 65ch;
}

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

html {
  scroll-behavior: smooth;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

body {
  font-family: var(--font-sans);
  font-size: var(--t-body);
  line-height: 1.6;
  color: var(--text-primary);
  background: var(--bg-base);
  min-height: 100vh;
  overflow-x: hidden;
}

/* Ambient background glow */
body::before {
  content: '';
  position: fixed;
  top: -20%;
  right: -10%;
  width: 60vw;
  height: 60vh;
  background: radial-gradient(ellipse, var(--accent-soft) 0%, transparent 70%);
  pointer-events: none;
  z-index: 0;
}

body::after {
  content: '';
  position: fixed;
  bottom: -30%;
  left: -15%;
  width: 50vw;
  height: 50vh;
  background: radial-gradient(ellipse, rgba(59, 130, 246, 0.06) 0%, transparent 70%);
  pointer-events: none;
  z-index: 0;
}

a { color: var(--accent); text-decoration: none; transition: color var(--duration) var(--ease); }
a:hover { color: var(--accent-hover); }

img { max-width: 100%; display: block; }

/* ---------- Layout ---------- */
#topbar {
  position: sticky;
  top: 0;
  z-index: 100;
  backdrop-filter: blur(20px) saturate(180%);
  -webkit-backdrop-filter: blur(20px) saturate(180%);
  background: rgba(7, 13, 26, 0.75);
  border-bottom: 1px solid var(--border);
}

.topwrap {
  max-width: 1200px;
  margin: 0 auto;
  padding: var(--s3) var(--s5);
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: var(--s4);
}

/* ---------- Brand ---------- */
.brand {
  display: flex;
  align-items: center;
  gap: var(--s3);
  color: var(--text-primary);
  font-weight: 700;
  font-size: var(--t-h3);
  letter-spacing: -0.02em;
  transition: opacity var(--duration) var(--ease);
}
.brand:hover { opacity: 0.85; color: var(--text-primary); }
.brand svg { width: 36px; height: 36px; flex-shrink: 0; }
.brandtext { display: flex; flex-direction: column; line-height: 1.2; }
.brandtext em {
  font-style: normal;
  font-size: var(--t-caption);
  font-weight: 400;
  color: var(--text-muted);
  margin-top: 2px;
  max-width: 280px;
}

/* ---------- Navigation ---------- */
.nav {
  display: flex;
  align-items: center;
  gap: var(--s2);
}
.nav a {
  color: var(--text-secondary);
  font-size: var(--t-small);
  font-weight: 500;
  padding: var(--s2) var(--s3);
  border-radius: var(--radius-sm);
  transition: all var(--duration) var(--ease);
  white-space: nowrap;
}
.nav a:hover {
  color: var(--text-primary);
  background: var(--bg-card-hover);
}
.nav a.on {
  color: var(--accent);
  background: var(--accent-soft);
}

/* Language picker */
.langpick {
  display: flex;
  gap: 2px;
  background: var(--bg-input);
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  padding: 2px;
}
.langbtn {
  padding: var(--s1) var(--s2);
  border: none;
  border-radius: var(--radius-sm);
  background: transparent;
  color: var(--text-muted);
  font-family: var(--font-sans);
  font-size: var(--t-caption);
  font-weight: 600;
  cursor: pointer;
  transition: all var(--duration) var(--ease);
}
.langbtn:hover { color: var(--text-primary); }
.langbtn.on {
  background: var(--accent-soft);
  color: var(--accent);
  box-shadow: var(--shadow-xs);
}

/* ---------- Banner (rules status) ---------- */
.banner {
  max-width: 1200px;
  margin: 0 auto;
  padding: var(--s2) var(--s5);
  display: flex;
  align-items: center;
  gap: var(--s4);
  font-size: var(--t-caption);
  border-top: 1px solid var(--border);
}
.banner.ok { color: var(--text-muted); }
.banner.warn { color: var(--warning); }
.banner .badge-ok, .banner .badge-warn {
  font-size: var(--t-caption);
  padding: 2px 8px;
}

/* ---------- Main Content ---------- */
#app {
  position: relative;
  z-index: 1;
  max-width: 1200px;
  margin: 0 auto;
  padding: var(--s7) var(--s5);
}

/* ---------- Hero ---------- */
.hero {
  position: relative;
  padding: var(--s8) 0;
  margin-bottom: var(--s8);
  text-align: center;
}
.hero::before {
  content: '';
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  width: 800px;
  height: 400px;
  background: radial-gradient(ellipse, var(--accent-soft) 0%, transparent 70%);
  pointer-events: none;
  z-index: -1;
}

.lede {
  font-size: var(--t-display);
  font-weight: 800;
  line-height: 1.1;
  letter-spacing: -0.03em;
  margin-bottom: var(--s5);
  max-width: 800px;
  margin-left: auto;
  margin-right: auto;
}
.lede em {
  font-style: normal;
  color: var(--accent);
}

.hero-cta {
  display: flex;
  gap: var(--s3);
  justify-content: center;
  flex-wrap: wrap;
  margin-top: var(--s6);
}

/* Hero trust metrics */
.hero-trust {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: var(--s4);
  margin-top: var(--s6);
  flex-wrap: wrap;
}
.hero-trust span {
  font-size: var(--t-small);
  color: var(--text-muted);
}
.hero-trust b {
  color: var(--accent);
  font-family: var(--font-mono);
  font-size: var(--t-h3);
  font-weight: 700;
  margin-right: 4px;
}
.dot-sep {
  width: 4px;
  height: 4px;
  background: var(--border-strong);
  border-radius: var(--radius-pill);
  display: inline-block;
}

/* Preview card (tool value demonstration) */
.preview-card {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius-xl);
  padding: var(--s6);
  margin-bottom: var(--s5);
  text-align: center;
  position: relative;
  overflow: hidden;
}
.preview-card::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 2px;
  background: linear-gradient(90deg, transparent, var(--accent), transparent);
}
.preview-grid {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: var(--s5);
  margin: var(--s5) 0;
  flex-wrap: wrap;
}
.preview-col {
  background: var(--bg-input);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: var(--s5) var(--s6);
  min-width: 200px;
  transition: all var(--duration) var(--ease);
}
.preview-col.pslf {
  border-color: rgba(52, 211, 153, 0.3);
  background: linear-gradient(135deg, rgba(52, 211, 153, 0.05) 0%, var(--bg-input) 100%);
}
.preview-col.refi {
  border-color: rgba(248, 113, 113, 0.2);
}
.preview-label {
  font-size: var(--t-caption);
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  color: var(--text-muted);
  margin-bottom: var(--s2);
}
.preview-col.pslf .preview-label { color: var(--success); }
.preview-col.refi .preview-label { color: var(--danger); }
.preview-value {
  font-size: clamp(1.75rem, 3vw, 2.5rem);
  font-weight: 800;
  font-family: var(--font-mono);
  letter-spacing: -0.02em;
  line-height: 1.1;
}
.preview-col.pslf .preview-value { color: var(--success); }
.preview-col.refi .preview-value { color: var(--text-secondary); }
.preview-sub {
  font-size: var(--t-caption);
  color: var(--text-muted);
  margin-top: var(--s1);
}
.preview-forgiven {
  font-size: var(--t-small);
  color: var(--success);
  font-weight: 600;
  margin-top: var(--s3);
  padding-top: var(--s3);
  border-top: 1px solid var(--border);
}
.preview-arrow {
  font-size: 1.5rem;
  color: var(--text-muted);
  font-weight: 300;
}
.preview-diff {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: var(--s4);
  flex-wrap: wrap;
  margin-top: var(--s4);
}
.preview-note {
  font-size: var(--t-caption);
  color: var(--text-muted);
}

/* ---------- Buttons ---------- */
.btn-primary, .btn-secondary {
  display: inline-flex;
  align-items: center;
  gap: var(--s2);
  padding: var(--s3) var(--s5);
  border-radius: var(--radius-md);
  font-size: var(--t-small);
  font-weight: 600;
  cursor: pointer;
  transition: all var(--duration) var(--ease);
  border: 1px solid transparent;
  text-decoration: none;
}
.btn-primary {
  background: linear-gradient(135deg, var(--accent) 0%, var(--accent-hover) 100%);
  color: var(--text-inverse);
  box-shadow: 0 4px 16px var(--accent-glow);
}
.btn-primary:hover {
  transform: translateY(-2px);
  box-shadow: 0 8px 24px var(--accent-glow);
  color: var(--text-inverse);
}
.btn-secondary {
  background: var(--bg-card);
  color: var(--text-primary);
  border-color: var(--border-strong);
}
.btn-secondary:hover {
  background: var(--bg-card-hover);
  border-color: var(--accent);
  color: var(--text-primary);
  transform: translateY(-2px);
}

/* ---------- Cards ---------- */
.card {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: var(--s6);
  margin-bottom: var(--s5);
  transition: all var(--duration) var(--ease);
  position: relative;
  overflow: hidden;
}
.card::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 1px;
  background: linear-gradient(90deg, transparent, var(--border-strong), transparent);
}

/* Verdict cards */
.card.verdict {
  background: linear-gradient(135deg, var(--accent-soft) 0%, var(--bg-card) 100%);
}
.card.verdict.pslf::before { background: linear-gradient(90deg, transparent, var(--success), transparent); }
.card.verdict.bad::before { background: linear-gradient(90deg, transparent, var(--danger), transparent); }
.card.verdict.refi::before { background: linear-gradient(90deg, transparent, var(--warning), transparent); }

.card h1 {
  font-size: var(--t-h1);
  font-weight: 700;
  letter-spacing: -0.02em;
  margin-bottom: var(--s3);
}
.card h2 {
  font-size: var(--t-h2);
  font-weight: 700;
  letter-spacing: -0.01em;
  margin-bottom: var(--s3);
}
.card h3 {
  font-size: var(--t-h3);
  font-weight: 600;
  margin-bottom: var(--s2);
}
.sub {
  color: var(--text-secondary);
  font-size: var(--t-small);
  line-height: 1.7;
  margin-bottom: var(--s4);
}

/* ---------- Eyebrow label ---------- */
.eyebrow {
  display: inline-block;
  font-size: var(--t-caption);
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: var(--accent);
  margin-bottom: var(--s3);
}

/* ---------- Big number ---------- */
.big {
  font-size: clamp(2rem, 4vw, 3rem);
  font-weight: 800;
  font-family: var(--font-mono);
  color: var(--accent);
  letter-spacing: -0.02em;
  margin: var(--s3) 0;
}

/* ---------- Tools Grid ---------- */
.tools-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(320px, 1fr));
  gap: var(--s4);
  margin-bottom: var(--s8);
}
.tool-card {
  display: block;
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: var(--s5);
  transition: all var(--duration) var(--ease);
  position: relative;
  overflow: hidden;
  color: var(--text-primary);
}
.tool-card::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 3px;
  background: linear-gradient(90deg, var(--accent), transparent);
  opacity: 0;
  transition: opacity var(--duration) var(--ease);
}
.tool-card:hover {
  transform: translateY(-4px);
  border-color: var(--border-accent);
  box-shadow: var(--shadow-glow), var(--shadow-md);
  color: var(--text-primary);
}
.tool-card:hover::before { opacity: 1; }
.tool-icon {
  width: 48px;
  height: 48px;
  margin-bottom: var(--s4);
  display: flex;
  align-items: center;
  justify-content: center;
  background: var(--accent-soft);
  border-radius: var(--radius-md);
  color: var(--accent);
}
.tool-icon svg { width: 28px; height: 28px; }
.tool-title {
  font-size: var(--t-h3);
  font-weight: 600;
  margin-bottom: var(--s2);
}
.tool-desc {
  font-size: var(--t-small);
  color: var(--text-secondary);
  line-height: 1.6;
  margin-bottom: var(--s4);
}
.tool-flag {
  display: inline-block;
  font-size: var(--t-caption);
  font-weight: 600;
  color: var(--accent);
  background: var(--accent-soft);
  padding: 3px 10px;
  border-radius: var(--radius-pill);
  text-transform: uppercase;
  letter-spacing: 0.05em;
}

/* ---------- Anchor / Stats section ---------- */
.anchor {
  background: linear-gradient(135deg, var(--bg-surface) 0%, var(--bg-card) 100%);
  border: 1px solid var(--border);
  border-radius: var(--radius-xl);
  padding: var(--s7);
  margin-bottom: var(--s8);
  text-align: center;
  position: relative;
  overflow: hidden;
}
.anchor::before {
  content: '';
  position: absolute;
  top: -50%;
  right: -20%;
  width: 400px;
  height: 400px;
  background: radial-gradient(circle, var(--accent-soft) 0%, transparent 70%);
  pointer-events: none;
}
.anchor .figure {
  font-size: clamp(3rem, 6vw, 5rem);
  font-weight: 800;
  font-family: var(--font-mono);
  color: var(--accent);
  line-height: 1;
  margin: var(--s4) 0;
}
.anchor .figure i {
  font-style: normal;
  font-size: 0.4em;
  color: var(--text-muted);
  font-weight: 400;
}
.anchor p {
  color: var(--text-secondary);
  max-width: 600px;
  margin: 0 auto;
  font-size: var(--t-small);
}

/* ---------- Art / Dot grid ---------- */
.art { margin: var(--s4) 0; }
.art-svg { width: 100%; height: auto; display: block; }

/* Dot grid scan animation — a traveling highlight sweeps from dot 1 to 120, loops */
@keyframes dot-scan-on {
  0%, 100% { transform: scale(1); opacity: 1; }
  4% { transform: scale(1.55); opacity: 1; }
  8% { transform: scale(1); opacity: 1; }
}
@keyframes dot-scan-pending {
  0%, 3%, 9%, 100% { transform: scale(1); fill: none; stroke: var(--border-strong); opacity: 0.55; }
  6% { transform: scale(1.55); fill: var(--accent); stroke: var(--accent); opacity: 1; }
}
.dot-on {
  animation: dot-scan-on 14s linear infinite;
  transform-box: fill-box;
  transform-origin: center;
}
.dot:not(.dot-on) {
  animation: dot-scan-pending 14s linear infinite;
  transform-box: fill-box;
  transform-origin: center;
}
@media (prefers-reduced-motion: reduce) {
  .dot-on, .dot:not(.dot-on) { animation: none; }
}
.art figcaption {
  font-size: var(--t-caption);
  color: var(--text-muted);
  margin-top: var(--s3);
  line-height: 1.6;
}

/* Dot grid section: compact two-column layout */
.dot-section {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: var(--s6);
  align-items: center;
}
.dot-section .art { margin: 0; }
.dot-stats {
  display: flex;
  flex-direction: column;
  gap: var(--s4);
}
.dot-stat-row {
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  padding-bottom: var(--s3);
  border-bottom: 1px solid var(--border);
}
.dot-stat-row:last-child { border-bottom: none; }
.dot-stat-label {
  font-size: var(--t-small);
  color: var(--text-muted);
}
.dot-stat-value {
  font-size: var(--t-h3);
  font-weight: 700;
  color: var(--text-primary);
  font-variant-numeric: tabular-nums;
}
.dot-stat-value.accent { color: var(--accent); }
.dot-note {
  font-size: var(--t-caption);
  color: var(--text-muted);
  line-height: 1.6;
  margin-top: var(--s2);
}
@media (max-width: 768px) {
  .dot-section { grid-template-columns: 1fr; gap: var(--s4); }
}

/* ---------- Form ---------- */
.grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
  gap: var(--s4);
  margin-bottom: var(--s4);
}
.field { display: flex; flex-direction: column; gap: var(--s2); }
.field label {
  font-size: var(--t-small);
  font-weight: 600;
  color: var(--text-secondary);
  line-height: 1.35;
  min-height: 2.7em;
  display: flex;
  align-items: flex-end;
}
.field input, .field select {
  background: var(--bg-input);
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  padding: 0 var(--s4);
  min-height: 44px;
  box-sizing: border-box;
  color: var(--text-primary);
  font-family: var(--font-sans);
  font-size: var(--t-body);
  transition: all var(--duration) var(--ease);
  width: 100%;
}
.field input:hover, .field select:hover {
  border-color: var(--border-strong);
}
.field input:focus, .field select:focus {
  outline: none;
  border-color: var(--accent);
  background: var(--bg-input-focus);
  box-shadow: 0 0 0 3px var(--accent-soft);
}
.field input::placeholder { color: var(--text-muted); }
.hint {
  font-size: var(--t-caption);
  color: var(--text-muted);
  line-height: 1.5;
  margin-top: var(--s1);
}

/* Form groups */
.form-group {
  margin-bottom: var(--s5);
}
.form-group-title {
  font-size: var(--t-small);
  font-weight: 700;
  color: var(--accent);
  text-transform: uppercase;
  letter-spacing: 0.05em;
  margin-bottom: var(--s3);
  padding-bottom: var(--s2);
  border-bottom: 1px solid var(--border);
}
.form-actions {
  display: flex;
  justify-content: flex-end;
  margin-top: var(--s4);
  padding-top: var(--s4);
  border-top: 1px solid var(--border);
}
.btn-ghost {
  background: transparent;
  border: 1px solid var(--border-strong);
  color: var(--text-secondary);
  padding: var(--s2) var(--s4);
  border-radius: var(--radius-sm);
  font-size: var(--t-small);
  font-weight: 500;
  cursor: pointer;
  transition: all var(--duration) var(--ease);
  font-family: var(--font-sans);
}
.btn-ghost:hover {
  border-color: var(--accent);
  color: var(--accent);
  background: var(--accent-soft);
}

/* Verdict big number */
.verdict .big {
  font-size: clamp(2rem, 4vw, 3rem);
  font-weight: 800;
  color: var(--accent);
  margin: var(--s3) 0;
  font-variant-numeric: tabular-nums;
  letter-spacing: -0.02em;
}
.verdict.bad .big { color: var(--danger); }
.verdict.refi .big { color: var(--warning); }

/* Checkboxes */
.checks { display: flex; flex-direction: column; gap: var(--s2); }
.check {
  display: flex;
  align-items: center;
  gap: var(--s3);
  cursor: pointer;
  padding: var(--s2) var(--s3);
  border-radius: var(--radius-sm);
  transition: background var(--duration) var(--ease);
}
.check:hover { background: var(--bg-card-hover); }
.check input[type="checkbox"] {
  width: 18px;
  height: 18px;
  accent-color: var(--accent);
  cursor: pointer;
  flex-shrink: 0;
}
.check span {
  font-size: var(--t-small);
  color: var(--text-secondary);
}

/* ---------- KV rows (ledger style) ---------- */
.kv {
  display: flex;
  align-items: baseline;
  gap: var(--s3);
  padding: var(--s2) 0;
  border-bottom: 1px solid var(--border);
}
.kv:last-child { border-bottom: none; }
.kv .k {
  color: var(--text-muted);
  font-size: var(--t-small);
  flex-shrink: 0;
}
.kv .lead {
  flex: 1;
  border-bottom: 1px dotted var(--border);
  transform: translateY(-3px);
}
.kv .v {
  font-family: var(--font-mono);
  font-size: var(--t-small);
  font-weight: 600;
  color: var(--text-primary);
  text-align: right;
}

/* ---------- Chart ---------- */
.chart {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: var(--s5);
  margin-bottom: var(--s5);
}
.chart svg { width: 100%; height: auto; }
.chart-legend {
  display: flex;
  gap: var(--s5);
  margin-top: var(--s4);
  flex-wrap: wrap;
}
.chart-legend span {
  display: flex;
  align-items: center;
  gap: var(--s2);
  font-size: var(--t-caption);
  color: var(--text-secondary);
}
.chart-legend i {
  width: 12px;
  height: 12px;
  border-radius: var(--radius-sm);
  display: inline-block;
}

/* ---------- Two column layout ---------- */
.two {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: var(--s4);
  margin-bottom: var(--s5);
}
@media (max-width: 768px) {
  .two { grid-template-columns: 1fr; }
}

/* ---------- Progress bar ---------- */
.bar {
  width: 100%;
  height: 8px;
  background: var(--bg-input);
  border-radius: var(--radius-pill);
  overflow: hidden;
  margin: var(--s3) 0;
}
.bar i {
  display: block;
  height: 100%;
  background: linear-gradient(90deg, var(--accent), var(--accent-hover));
  border-radius: var(--radius-pill);
  transition: width 0.6s var(--ease);
}

/* ---------- Lists ---------- */
.list {
  list-style: none;
  display: flex;
  flex-direction: column;
  gap: var(--s2);
}
.list li {
  font-size: var(--t-small);
  color: var(--text-secondary);
  line-height: 1.6;
  padding-left: var(--s4);
  position: relative;
}
.list li::before {
  content: '→';
  position: absolute;
  left: 0;
  color: var(--accent);
  font-weight: 600;
}

/* ---------- Badges ---------- */
.badge-ok, .badge-warn, .badge-bad {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  font-size: var(--t-caption);
  font-weight: 600;
  padding: 3px 10px;
  border-radius: var(--radius-pill);
  text-transform: uppercase;
  letter-spacing: 0.03em;
}
.badge-ok { background: var(--success-soft); color: var(--success); }
.badge-warn { background: var(--warning-soft); color: var(--warning); }
.badge-bad { background: var(--danger-soft); color: var(--danger); }

/* ---------- Disclaimer ---------- */
.disc {
  background: var(--bg-input);
  border: 1px solid var(--border);
  border-top: 3px solid var(--warning);
  border-radius: var(--radius-md);
  padding: var(--s4);
  font-size: var(--t-caption);
  color: var(--text-muted);
  line-height: 1.7;
}
.disc b { color: var(--text-secondary); }

/* ---------- Share bar ---------- */
.share {
  display: flex;
  gap: var(--s2);
  margin-top: var(--s4);
}
.share input {
  flex: 1;
  background: var(--bg-input);
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  padding: var(--s2) var(--s3);
  color: var(--text-muted);
  font-family: var(--font-mono);
  font-size: var(--t-caption);
}
.share button {
  background: var(--accent-soft);
  border: 1px solid var(--border-accent);
  color: var(--accent);
  border-radius: var(--radius-sm);
  padding: var(--s2) var(--s4);
  font-size: var(--t-caption);
  font-weight: 600;
  cursor: pointer;
  transition: all var(--duration) var(--ease);
  white-space: nowrap;
}
.share button:hover {
  background: var(--accent);
  color: var(--text-inverse);
}

/* ---------- Sources (rules table) ---------- */
.sources { margin-top: var(--s4); }
.sources summary {
  cursor: pointer;
  font-size: var(--t-small);
  font-weight: 600;
  color: var(--text-secondary);
  padding: var(--s2) 0;
  list-style: none;
  transition: color var(--duration) var(--ease);
}
.sources summary:hover { color: var(--accent); }
.sources summary::-webkit-details-marker { display: none; }
.sources table {
  width: 100%;
  border-collapse: collapse;
  margin-top: var(--s3);
  font-size: var(--t-caption);
}
.sources th {
  text-align: left;
  padding: var(--s2) var(--s3);
  color: var(--text-muted);
  font-weight: 600;
  border-bottom: 1px solid var(--border-strong);
  text-transform: uppercase;
  letter-spacing: 0.05em;
}
.sources td {
  padding: var(--s2) var(--s3);
  border-bottom: 1px solid var(--border);
  color: var(--text-secondary);
}
.sources .mono { font-family: var(--font-mono); color: var(--text-primary); }
.sources a { font-size: var(--t-caption); }

/* ---------- Footer ---------- */
#footer {
  position: relative;
  z-index: 1;
  max-width: 1200px;
  margin: 0 auto;
  padding: var(--s6) var(--s5);
  border-top: 1px solid var(--border);
  font-size: var(--t-caption);
  color: var(--text-muted);
  line-height: 1.8;
  text-align: center;
}

/* ---------- Responsive ---------- */
@media (max-width: 768px) {
  .topwrap { flex-wrap: wrap; }
  .brandtext em { display: none; }
  .nav { flex-wrap: wrap; justify-content: center; }
  .hero { padding: var(--s6) 0; }
  .card { padding: var(--s4); }
  .tools-grid { grid-template-columns: 1fr; }
  .grid { grid-template-columns: 1fr; }
}

/* ---------- Scrollbar ---------- */
::-webkit-scrollbar { width: 8px; height: 8px; }
::-webkit-scrollbar-track { background: var(--bg-base); }
::-webkit-scrollbar-thumb { background: var(--border-strong); border-radius: var(--radius-sm); }
::-webkit-scrollbar-thumb:hover { background: var(--text-muted); }

/* ---------- Selection ---------- */
::selection {
  background: var(--accent-soft);
  color: var(--accent);
}

/* ---------- Focus visible (accessibility) ---------- */
:focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: 2px;
  border-radius: var(--radius-sm);
}

/* ---------- Reduced motion (accessibility) ---------- */
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
    scroll-behavior: auto !important;
  }
}

/* ---------- Form grid (two-column tool forms) ---------- */
.formgrid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: var(--s5);
}
@media (max-width: 720px) {
  .formgrid { grid-template-columns: 1fr; }
}
.formgroup h3 {
  font-size: 0.8rem;
  font-weight: 600;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--accent);
  margin: 0 0 var(--s3) 0;
  padding-bottom: var(--s2);
  border-bottom: 1px solid var(--border);
}
.formgroup .field { margin-bottom: var(--s3); }

/* ---------- Progress bar (emergency fund) ---------- */
.progressbar {
  width: 100%;
  height: 12px;
  background: var(--bg-elevated);
  border-radius: var(--radius-sm);
  overflow: hidden;
  margin: var(--s3) 0;
  border: 1px solid var(--border);
}
.progressfill {
  height: 100%;
  background: linear-gradient(90deg, var(--accent), var(--accent-soft));
  border-radius: var(--radius-sm);
  transition: width 0.4s ease;
  min-width: 2px;
}

/* ---------- Chart area (compound / savings goal bar chart) ---------- */
.chartarea {
  display: flex;
  align-items: flex-end;
  gap: 6px;
  height: 200px;
  padding: var(--s3) 0;
  border-bottom: 1px solid var(--border);
  margin-top: var(--s3);
}
.chartbar {
  flex: 1;
  display: flex;
  flex-direction: column;
  align-items: center;
  height: 100%;
  justify-content: flex-end;
  min-width: 0;
}
.chartbar-fill {
  width: 100%;
  max-width: 32px;
  background: linear-gradient(180deg, var(--accent), var(--accent-soft));
  border-radius: var(--radius-sm) var(--radius-sm) 0 0;
  transition: height 0.4s ease;
  min-height: 2px;
}
.chartbar-label {
  font-size: 0.65rem;
  color: var(--text-muted);
  margin-top: 6px;
  font-family: var(--font-mono);
  white-space: nowrap;
}

/* ---------- Debt row (dynamic debt inputs) ---------- */
.debtrow {
  display: grid;
  grid-template-columns: 1.5fr 1fr 0.8fr 1fr auto;
  gap: 8px;
  align-items: center;
  margin-bottom: 8px;
  padding: 8px;
  background: var(--bg-elevated);
  border-radius: var(--radius-sm);
  border: 1px solid var(--border);
}
@media (max-width: 600px) {
  .debtrow { grid-template-columns: 1fr 1fr; }
  .debtrow .dname { grid-column: 1 / -1; }
}
.debtrow input {
  width: 100%;
  padding: 8px 10px;
  background: var(--bg-base);
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  color: var(--text-primary);
  font-size: 0.85rem;
  font-family: var(--font-mono);
}
.debtrow input:focus {
  outline: none;
  border-color: var(--accent);
}
.debtrow .debtdata-remove {
  background: none;
  border: 1px solid var(--border);
  color: var(--text-muted);
  width: 32px;
  height: 32px;
  border-radius: var(--radius-pill);
  cursor: pointer;
  font-size: 1rem;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: all 0.2s;
}
.debtrow .debtdata-remove:hover {
  border-color: #ef4444;
  color: #ef4444;
  background: rgba(239, 68, 68, 0.1);
}

/* ---------- Amortization table ---------- */
.amort-table {
  width: 100%;
  border-collapse: collapse;
  margin-top: var(--s3);
  font-size: 0.82rem;
}
.amort-table th {
  text-align: left;
  padding: 10px 12px;
  background: var(--bg-elevated);
  color: var(--text-muted);
  font-weight: 600;
  font-size: 0.72rem;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  border-bottom: 1px solid var(--border-strong);
}
.amort-table td {
  padding: 8px 12px;
  border-bottom: 1px solid var(--border);
  color: var(--text-primary);
}
.amort-table tr:hover td {
  background: var(--bg-elevated);
}
.amort-table .mono {
  font-family: var(--font-mono);
  font-size: 0.8rem;
  text-align: right;
}

/* ---------- Small tool cards (homepage more tools) ---------- */
.tools-grid-sm {
  grid-template-columns: repeat(auto-fill, minmax(220px, 1fr));
  gap: var(--s3);
}
.tool-card-sm {
  padding: var(--s4);
}
.tool-card-sm .tool-icon {
  width: 36px;
  height: 36px;
  margin-bottom: var(--s2);
}
.tool-card-sm .tool-icon svg {
  width: 36px;
  height: 36px;
}
.tool-card-sm .tool-title {
  font-size: 0.9rem;
  margin-bottom: 4px;
}
.tool-card-sm .tool-desc {
  font-size: 0.75rem;
  line-height: 1.4;
  margin-bottom: var(--s2);
}
.tool-card-sm .tool-flag {
  font-size: 0.65rem;
}

/* ---------- Article pages ---------- */
.breadcrumb {
  max-width: 760px;
  margin: 0 auto;
  padding: var(--s5) var(--s4) 0;
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 13px;
  color: var(--text-muted);
}
.breadcrumb a {
  color: var(--text-muted);
  text-decoration: none;
  transition: color var(--t-fast);
}
.breadcrumb a:hover {
  color: var(--accent);
}
.breadcrumb-sep {
  opacity: 0.5;
}
.breadcrumb-current {
  color: var(--text-secondary);
}
.article {
  max-width: 760px;
  margin: 0 auto;
  padding: var(--s6) var(--s4);
}
.article-header {
  margin-bottom: var(--s6);
  padding-bottom: var(--s5);
  border-bottom: 1px solid var(--border);
}
.article-meta {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 0.75rem;
  color: var(--text-muted);
  text-transform: uppercase;
  letter-spacing: 0.06em;
  margin-bottom: var(--s3);
}
.article-category {
  color: var(--accent);
  font-weight: 600;
}
.article-dot {
  opacity: 0.4;
}
.article-title {
  font-size: 2rem;
  font-weight: 700;
  line-height: 1.2;
  color: var(--text-primary);
  margin: 0 0 var(--s3) 0;
  letter-spacing: -0.02em;
}
.article-subtitle {
  font-size: 1.1rem;
  line-height: 1.6;
  color: var(--text-secondary);
  margin: 0;
}
.article-body {
  font-size: 1rem;
  line-height: 1.8;
  color: var(--text-primary);
}
.article-h2 {
  font-size: 1.4rem;
  font-weight: 700;
  margin: var(--s6) 0 var(--s3) 0;
  color: var(--text-primary);
  letter-spacing: -0.01em;
}
.article-h3 {
  font-size: 1.15rem;
  font-weight: 600;
  margin: var(--s5) 0 var(--s2) 0;
  color: var(--text-primary);
}
.article-p {
  margin: 0 0 var(--s4) 0;
  color: var(--text-secondary);
}
.article-ul, .article-ol {
  margin: 0 0 var(--s4) 0;
  padding-left: var(--s5);
  color: var(--text-secondary);
}
.article-ul li, .article-ol li {
  margin-bottom: var(--s2);
  line-height: 1.7;
}
.article-quote {
  box-shadow: inset 3px 0 0 var(--accent);
  padding: var(--s3) var(--s4);
  margin: var(--s5) 0;
  background: var(--bg-elevated);
  border-radius: var(--radius-sm);
  font-style: italic;
  color: var(--text-secondary);
}
.article-callout {
  background: var(--accent-soft);
  border: 1px solid var(--accent);
  border-radius: var(--radius-md);
  padding: var(--s4);
  margin: var(--s5) 0;
  color: var(--text-primary);
  font-size: 0.95rem;
  line-height: 1.7;
}
.article-callout strong {
  color: var(--accent);
  display: block;
  margin-bottom: 4px;
}
.article-table {
  width: 100%;
  border-collapse: collapse;
  margin: var(--s5) 0;
  font-size: 0.9rem;
}
.article-table th {
  text-align: left;
  padding: 10px 14px;
  background: var(--bg-elevated);
  color: var(--text-muted);
  font-weight: 600;
  font-size: 0.78rem;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  border-bottom: 1px solid var(--border-strong);
}
.article-table td {
  padding: 10px 14px;
  border-bottom: 1px solid var(--border);
  color: var(--text-secondary);
}
.article-table tr:hover td {
  background: var(--bg-elevated);
}
.article-tools {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
  gap: var(--s3);
  margin-top: var(--s3);
}
.article-tool-link {
  display: block;
  padding: var(--s3);
  background: var(--bg-elevated);
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  text-decoration: none;
  transition: all 0.2s;
}
.article-tool-link:hover {
  border-color: var(--accent);
  transform: translateY(-2px);
}
.article-tool-title {
  display: block;
  font-weight: 600;
  font-size: 0.9rem;
  color: var(--text-primary);
  margin-bottom: 4px;
}
.article-tool-desc {
  display: block;
  font-size: 0.78rem;
  color: var(--text-muted);
  line-height: 1.4;
}

/* ---------- Article cards (homepage) ---------- */
.articles-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(260px, 1fr));
  gap: var(--s3);
}
.article-card {
  display: flex;
  flex-direction: column;
  padding: var(--s4);
  background: var(--bg-elevated);
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  text-decoration: none;
  transition: all 0.2s;
}
.article-card:hover {
  border-color: var(--accent);
  transform: translateY(-2px);
}
.article-card-cat {
  font-size: 0.7rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  color: var(--accent);
  margin-bottom: var(--s2);
}
.article-card-title {
  font-size: 0.95rem;
  font-weight: 600;
  color: var(--text-primary);
  margin: 0 0 var(--s2) 0;
  line-height: 1.4;
}
.article-card-desc {
  font-size: 0.8rem;
  color: var(--text-muted);
  line-height: 1.5;
  margin: 0 0 var(--s3) 0;
  flex: 1;
}
.article-card-meta {
  font-size: 0.72rem;
  color: var(--text-muted);
  display: flex;
  align-items: center;
  gap: var(--s2);
}

/* ============================================================
   Affiliate Marketing Components
   联盟营销组件样式
   ============================================================ */

/* ---------- FTC Disclosure (page-top) ---------- */
.aff-disclosure {
  display: flex;
  align-items: flex-start;
  gap: var(--s2);
  padding: var(--s3) var(--s4);
  background: var(--warning-soft);
  border: 1px solid rgba(251, 191, 36, 0.2);
  border-radius: var(--radius-md);
  font-size: 0.8rem;
  line-height: 1.5;
  color: var(--text-secondary);
  margin-bottom: var(--s4);
}
.aff-disclosure-icon {
  color: var(--warning);
  font-weight: 700;
  flex-shrink: 0;
  margin-top: 1px;
}
.aff-disclosure-text {
  flex: 1;
}
.aff-disclosure-link {
  color: var(--warning);
  text-decoration: underline;
  white-space: nowrap;
  font-weight: 600;
}

/* ---------- Inline disclosure (inside CTA cards) ---------- */
.aff-disclosure-inline {
  font-size: 0.7rem;
  color: var(--text-muted);
  margin-top: var(--s3);
  line-height: 1.4;
  opacity: 0.8;
}

/* ---------- Full disclosure section ---------- */
.aff-disclosure-full {
  background: linear-gradient(90deg, var(--warning-soft), var(--bg-card));
  border: 1px solid rgba(251, 191, 36, 0.15);
}
.aff-disclosure-full h2 {
  color: var(--warning);
  margin-bottom: var(--s3);
}
.aff-disclosure-full p {
  font-size: 0.85rem;
  line-height: 1.6;
  color: var(--text-secondary);
  margin-bottom: var(--s3);
}
.aff-disclosure-full p:last-child {
  margin-bottom: 0;
}

/* ---------- CTA Cards ---------- */
.aff-cta {
  border: 1px solid var(--border-accent);
  background: linear-gradient(135deg, var(--accent-soft), var(--bg-card));
  position: relative;
  overflow: hidden;
}
.aff-cta::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 3px;
  background: linear-gradient(90deg, var(--accent), transparent);
}
.aff-cta-label {
  display: flex;
  align-items: center;
  gap: var(--s2);
  margin-bottom: var(--s2);
}
.aff-tag {
  display: inline-block;
  padding: 2px 8px;
  background: var(--accent-soft);
  color: var(--accent);
  font-size: 0.65rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  border-radius: var(--radius-sm);
}
.aff-tag-sub {
  font-size: 0.7rem;
  color: var(--text-muted);
  text-transform: uppercase;
  letter-spacing: 0.05em;
}
.aff-cta-title {
  font-size: 1.2rem;
  font-weight: 700;
  margin: 0 0 var(--s2) 0;
  color: var(--text-primary);
}
.aff-cta-desc {
  font-size: 0.88rem;
  line-height: 1.6;
  color: var(--text-secondary);
  margin: 0 0 var(--s4) 0;
}
.aff-cta-desc a {
  color: var(--accent);
  text-decoration: underline;
}
.aff-cta-actions {
  display: flex;
  flex-wrap: wrap;
  gap: var(--s3);
  align-items: center;
}
.aff-cta-actions .btn-primary,
.aff-cta-actions .btn-secondary {
  font-size: 0.88rem;
  padding: 10px 20px;
}
.aff-cta-note {
  font-size: 0.75rem;
  color: var(--text-muted);
  font-style: italic;
}

/* ---------- Minimal inline CTA ---------- */
.aff-minimal {
  padding: var(--s3) var(--s4);
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  font-size: 0.85rem;
  line-height: 1.6;
  color: var(--text-secondary);
}
.aff-minimal a {
  color: var(--accent);
  text-decoration: underline;
  font-weight: 600;
}

/* ---------- Comparison Table ---------- */
.aff-table-wrap {
  overflow-x: auto;
  margin: var(--s3) 0;
}
.aff-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 0.82rem;
}
.aff-table th {
  text-align: left;
  padding: var(--s3);
  background: var(--bg-surface);
  color: var(--text-muted);
  font-weight: 600;
  font-size: 0.72rem;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  border-bottom: 2px solid var(--border-strong);
  white-space: nowrap;
}
.aff-table td {
  padding: var(--s3);
  border-bottom: 1px solid var(--border);
  vertical-align: top;
  color: var(--text-secondary);
}
.aff-table tr:hover td {
  background: var(--bg-card-hover);
}
.aff-table-lender a {
  color: var(--accent);
  text-decoration: none;
  font-weight: 600;
}
.aff-table-lender a:hover {
  text-decoration: underline;
}
.aff-table-tagline {
  font-size: 0.72rem;
  color: var(--text-muted);
  margin-top: 2px;
  line-height: 1.4;
}
.aff-table-btn {
  font-size: 0.75rem !important;
  padding: 6px 12px !important;
  white-space: nowrap;
}
.aff-table-note {
  font-size: 0.7rem;
  color: var(--text-muted);
  margin-top: var(--s2);
  line-height: 1.4;
  font-style: italic;
}

/* ---------- Partner Detail Cards ---------- */
.aff-partner-card {
  margin-bottom: var(--s4);
}
.aff-partner-head {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: var(--s2);
}
.aff-partner-head h3 {
  margin: 0;
  font-size: 1.2rem;
  color: var(--text-primary);
}
.aff-partner-tagline {
  font-size: 0.85rem;
  color: var(--accent);
  font-weight: 500;
  margin: 0 0 var(--s3) 0;
}
.aff-partner-desc {
  font-size: 0.88rem;
  line-height: 1.6;
  color: var(--text-secondary);
  margin: 0 0 var(--s3) 0;
}
.aff-partner-highlights {
  margin: 0 0 var(--s3) 0;
  padding-left: var(--s4);
}
.aff-partner-highlights li {
  font-size: 0.82rem;
  color: var(--text-secondary);
  line-height: 1.6;
  margin-bottom: var(--s1);
}
.aff-partner-highlights li::marker {
  color: var(--accent);
}
.aff-partner-meta {
  display: flex;
  gap: var(--s4);
  font-size: 0.75rem;
  color: var(--text-muted);
  margin-bottom: var(--s3);
  flex-wrap: wrap;
}
.aff-partner-meta b {
  color: var(--text-secondary);
}
.aff-partner-cta {
  margin-bottom: var(--s2);
}

/* ---------- Inline contextual affiliate links ---------- */
.aff-inline-link {
  color: var(--accent);
  text-decoration: underline;
  text-underline-offset: 2px;
  font-weight: 500;
}
.aff-inline-link:hover {
  color: var(--accent-hover);
}
.aff-sup {
  font-size: 0.6em;
  color: var(--warning);
  font-weight: 700;
  margin-left: 1px;
  text-decoration: none;
}

/* ---------- Pending notice ---------- */
.aff-pending {
  padding: var(--s3) var(--s4);
  background: var(--info-soft, rgba(96, 165, 250, 0.1));
  border: 1px solid rgba(96, 165, 250, 0.2);
  border-radius: var(--radius-md);
  font-size: 0.82rem;
  line-height: 1.5;
  color: var(--text-secondary);
  margin-bottom: var(--s4);
}
.aff-pending b {
  color: var(--text-primary);
}
.aff-pending a {
  color: var(--accent);
  text-decoration: underline;
}

/* ---------- How to choose grid ---------- */
.aff-choose-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
  gap: var(--s4);
  margin-top: var(--s3);
}
.aff-choose-item h3 {
  font-size: 0.95rem;
  color: var(--text-primary);
  margin: 0 0 var(--s2) 0;
}
.aff-choose-item p {
  font-size: 0.82rem;
  line-height: 1.6;
  color: var(--text-secondary);
  margin: 0;
}
.aff-choose-item a {
  color: var(--accent);
  text-decoration: underline;
}

/* ---------- Coming soon ---------- */
.aff-coming-soon {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(240px, 1fr));
  gap: var(--s3);
  margin-top: var(--s3);
}
.aff-coming-item {
  display: flex;
  gap: var(--s3);
  padding: var(--s3);
  background: var(--bg-card);
  border: 1px dashed var(--border-strong);
  border-radius: var(--radius-md);
  opacity: 0.7;
}
.aff-coming-icon {
  font-size: 1.5rem;
}
.aff-coming-item b {
  display: block;
  font-size: 0.88rem;
  color: var(--text-primary);
  margin-bottom: 2px;
}
.aff-coming-item p {
  font-size: 0.75rem;
  color: var(--text-muted);
  margin: 0;
  line-height: 1.4;
}

/* ---------- Footer links ---------- */
.footer-links {
  margin-bottom: var(--s2);
  font-size: 0.8rem;
}
.footer-links a {
  color: var(--text-muted);
  text-decoration: none;
  transition: color 0.2s;
}
.footer-links a:hover {
  color: var(--accent);
}
.footer-sep {
  color: var(--border-strong);
  margin: 0 var(--s2);
}

/* ---------- Responsive ---------- */
@media (max-width: 640px) {
  .aff-cta-actions {
    flex-direction: column;
    align-items: stretch;
  }
  .aff-cta-actions .btn-primary,
  .aff-cta-actions .btn-secondary {
    text-align: center;
    justify-content: center;
  }
  .aff-table {
    font-size: 0.75rem;
  }
  .aff-table th,
  .aff-table td {
    padding: var(--s2);
  }
  .aff-partner-head {
    flex-direction: column;
    align-items: flex-start;
    gap: var(--s2);
  }
}
