/* ================================================================
   CryptoCalc - Premium Dark Theme with Amber/Gold Financial Feel
   Redesigned 2026-03-24 | crypto.wellerdeveler.com
   ================================================================ */

/* ── RESET ─────────────────────────────────────────────── */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
html { font-size: 16px; scroll-behavior: smooth; }

/* ── CUSTOM PROPERTIES ─────────────────────────────────── */
:root {
  /* Brand - Amber/Gold financial palette */
  --primary: #d4a012;
  --primary-dark: #b8860b;
  --primary-light: #f0c040;
  --primary-glow: rgba(212, 160, 18, 0.25);
  --secondary: #e8b828;
  --accent: #f5d060;
  --accent-muted: rgba(245, 208, 96, 0.12);

  /* Surfaces - OLED-aware dark with warm undertone */
  --bg-0: #08080c;
  --bg-1: #0e0e14;
  --bg-2: #14141c;
  --bg-3: #1a1a24;
  --bg-card: #111118;
  --bg-card-hover: #16161e;
  --bg-elevated: #1c1c26;

  /* Text hierarchy */
  --text: #eae8e4;
  --text-secondary: #a09888;
  --text-muted: #706858;
  --text-dim: #504840;

  /* Borders */
  --border: rgba(212, 160, 18, 0.08);
  --border-mid: rgba(212, 160, 18, 0.14);
  --border-strong: rgba(212, 160, 18, 0.22);

  /* Semantic */
  --success: #22c55e;
  --success-muted: rgba(34, 197, 94, 0.12);
  --warning: #f59e0b;
  --danger: #ef4444;
  --danger-muted: rgba(239, 68, 68, 0.12);

  /* Shadows - warm-tinted, multi-layer */
  --shadow-sm:
    0 1px 2px rgba(0,0,0,0.3),
    0 1px 3px rgba(0,0,0,0.2);
  --shadow-md:
    0 1px 2px rgba(0,0,0,0.2),
    0 2px 4px rgba(0,0,0,0.15),
    0 4px 8px rgba(0,0,0,0.12),
    0 8px 16px rgba(0,0,0,0.08);
  --shadow-lg:
    0 1px 2px rgba(0,0,0,0.15),
    0 2px 4px rgba(0,0,0,0.12),
    0 4px 8px rgba(0,0,0,0.10),
    0 8px 16px rgba(0,0,0,0.08),
    0 16px 32px rgba(0,0,0,0.06);
  --shadow-glow: 0 0 20px rgba(212, 160, 18, 0.15), 0 0 40px rgba(212, 160, 18, 0.06);

  /* Layout */
  --radius-sm: 8px;
  --radius: 12px;
  --radius-lg: 16px;
  --radius-xl: 20px;
  --radius-full: 9999px;
  --max-width: 1200px;

  /* Typography */
  --font-display: 'Space Grotesk', 'Inter', sans-serif;
  --font-body: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
  --font-mono: 'JetBrains Mono', 'Fira Code', 'Consolas', monospace;

  /* Transitions */
  --ease-smooth: cubic-bezier(0.25, 0.46, 0.45, 0.94);
  --ease-spring: cubic-bezier(0.34, 1.56, 0.64, 1);
  --timing-fast: 150ms;
  --timing-normal: 250ms;
  --timing-slow: 350ms;
}

/* ── LIGHT MODE ────────────────────────────────────────── */
[data-theme="light"] {
  --bg-0: #faf8f4;
  --bg-1: #f4f0ea;
  --bg-2: #eee8de;
  --bg-3: #e6ded2;
  --bg-card: #ffffff;
  --bg-card-hover: #fdfcfa;
  --bg-elevated: #ffffff;
  --text: #1a1408;
  --text-secondary: #5c5040;
  --text-muted: #8c7e6c;
  --text-dim: #b0a490;
  --border: rgba(140, 100, 20, 0.10);
  --border-mid: rgba(140, 100, 20, 0.16);
  --border-strong: rgba(140, 100, 20, 0.24);
  --shadow-sm: 0 1px 3px rgba(140, 100, 20, 0.06);
  --shadow-md:
    0 1px 2px rgba(140, 100, 20, 0.05),
    0 2px 4px rgba(140, 100, 20, 0.04),
    0 4px 8px rgba(140, 100, 20, 0.03);
  --shadow-lg:
    0 2px 4px rgba(140, 100, 20, 0.04),
    0 4px 8px rgba(140, 100, 20, 0.04),
    0 8px 16px rgba(140, 100, 20, 0.03),
    0 16px 32px rgba(140, 100, 20, 0.02);
  --shadow-glow: 0 0 20px rgba(212, 160, 18, 0.08);
}

/* ── BASE ──────────────────────────────────────────────── */
body {
  font-family: var(--font-body);
  background: var(--bg-0);
  color: var(--text);
  line-height: 1.6;
  min-height: 100vh;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

/* Subtle grain texture overlay */
body::after {
  content: '';
  position: fixed;
  inset: 0;
  pointer-events: none;
  z-index: 9999;
  opacity: 0.025;
  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)'/%3E%3C/svg%3E");
}

a { color: var(--primary-light); text-decoration: none; transition: color var(--timing-fast) var(--ease-smooth); }
a:hover { color: var(--accent); }

/* ── SKIP LINK (a11y) ──────────────────────────────────── */
.skip-link {
  position: absolute;
  top: -40px;
  left: 0;
  background: var(--primary);
  color: #000;
  padding: 8px 16px;
  z-index: 10000;
  font-weight: 600;
  border-radius: 0 0 var(--radius-sm) 0;
}
.skip-link:focus { top: 0; }

/* ── NAVIGATION ────────────────────────────────────────── */
.site-nav {
  position: sticky;
  top: 0;
  z-index: 100;
  background: rgba(8, 8, 12, 0.85);
  backdrop-filter: blur(20px) saturate(180%);
  -webkit-backdrop-filter: blur(20px) saturate(180%);
  border-bottom: 1px solid var(--border);
}

[data-theme="light"] .site-nav {
  background: rgba(250, 248, 244, 0.88);
}

.nav-inner {
  max-width: var(--max-width);
  margin: 0 auto;
  padding: 0 24px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: 64px;
}

.nav-brand {
  text-decoration: none;
  font-family: var(--font-display);
  font-size: 1.375rem;
  font-weight: 700;
  letter-spacing: -0.03em;
  color: var(--primary);
  display: flex;
  align-items: center;
  gap: 2px;
}
.nav-brand span { color: var(--text); font-weight: 500; }

/* Inline SVG icon before brand */
.nav-brand::before {
  content: '';
  display: inline-block;
  width: 28px;
  height: 28px;
  margin-right: 8px;
  border-radius: 6px;
  background: linear-gradient(135deg, var(--primary) 0%, var(--accent) 100%);
  mask-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='white'%3E%3Cpath d='M12 2L2 7l10 5 10-5-10-5zM2 17l10 5 10-5M2 12l10 5 10-5'/%3E%3C/svg%3E");
  -webkit-mask-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='white'%3E%3Cpath d='M12 2L2 7l10 5 10-5-10-5zM2 17l10 5 10-5M2 12l10 5 10-5'/%3E%3C/svg%3E");
  mask-size: 18px;
  -webkit-mask-size: 18px;
  mask-repeat: no-repeat;
  -webkit-mask-repeat: no-repeat;
  mask-position: center;
  -webkit-mask-position: center;
  flex-shrink: 0;
}

.nav-links {
  display: flex;
  gap: 4px;
  list-style: none;
}
.nav-links a {
  text-decoration: none;
  color: var(--text-secondary);
  font-size: 0.875rem;
  font-weight: 500;
  padding: 8px 14px;
  border-radius: var(--radius-sm);
  transition: all var(--timing-fast) var(--ease-smooth);
  letter-spacing: 0.005em;
}
.nav-links a:hover { background: var(--bg-3); color: var(--text); }
.nav-links a.active {
  background: var(--accent-muted);
  color: var(--primary);
  font-weight: 600;
}

.nav-right { display: flex; align-items: center; gap: 8px; }

.theme-toggle {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 40px;
  height: 40px;
  border-radius: var(--radius-sm);
  border: 1px solid var(--border-mid);
  background: var(--bg-2);
  color: var(--text-muted);
  cursor: pointer;
  transition: all var(--timing-fast) var(--ease-smooth);
  font-size: 1.125rem;
  line-height: 1;
}
.theme-toggle:hover {
  background: var(--primary);
  color: #000;
  border-color: var(--primary);
  box-shadow: var(--shadow-glow);
}

.nav-hamburger {
  display: none;
  flex-direction: column;
  gap: 5px;
  cursor: pointer;
  padding: 8px;
  background: none;
  border: none;
}
.nav-hamburger span {
  display: block;
  width: 22px;
  height: 2px;
  background: var(--text);
  border-radius: 2px;
  transition: all 0.2s;
}

/* ── HERO ──────────────────────────────────────────────── */
.page-hero {
  position: relative;
  overflow: hidden;
  padding: 80px 24px 88px;
  text-align: center;
  background: var(--bg-1);
  border-bottom: 1px solid var(--border);
}

/* Cinematic amber glow */
.page-hero::before {
  content: '';
  position: absolute;
  top: -40%;
  left: 50%;
  transform: translateX(-50%);
  width: 800px;
  height: 600px;
  background: radial-gradient(ellipse, rgba(212, 160, 18, 0.12) 0%, rgba(212, 160, 18, 0.04) 40%, transparent 70%);
  pointer-events: none;
}

/* Subtle mesh gradient background */
.page-hero::after {
  content: '';
  position: absolute;
  inset: 0;
  background:
    radial-gradient(ellipse at 20% 50%, rgba(212, 160, 18, 0.06) 0%, transparent 50%),
    radial-gradient(ellipse at 80% 50%, rgba(184, 134, 11, 0.04) 0%, transparent 50%);
  pointer-events: none;
}

.page-hero .overline {
  display: inline-block;
  font-size: 0.75rem;
  font-weight: 700;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--primary);
  margin-bottom: 16px;
  position: relative;
  z-index: 1;
}

.page-hero h1 {
  font-family: var(--font-display);
  font-size: clamp(2rem, 5vw, 3.25rem);
  font-weight: 700;
  letter-spacing: -0.03em;
  line-height: 1.08;
  margin-bottom: 16px;
  position: relative;
  z-index: 1;
  background: linear-gradient(135deg, var(--text) 0%, var(--primary-light) 100%);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

.page-hero p {
  font-size: clamp(1rem, 2vw, 1.15rem);
  color: var(--text-secondary);
  max-width: 520px;
  margin: 0 auto;
  position: relative;
  z-index: 1;
  line-height: 1.6;
}

/* Stats bar in hero */
.hero-stats {
  display: flex;
  gap: 32px;
  justify-content: center;
  margin-top: 40px;
  position: relative;
  z-index: 1;
}
.hero-stat {
  text-align: center;
}
.hero-stat-value {
  font-family: var(--font-display);
  font-size: 1.75rem;
  font-weight: 700;
  color: var(--primary);
  letter-spacing: -0.02em;
}
.hero-stat-label {
  font-size: 0.75rem;
  color: var(--text-muted);
  text-transform: uppercase;
  letter-spacing: 0.06em;
  font-weight: 600;
  margin-top: 4px;
}

/* ── SCROLL PROGRESS ───────────────────────────────────── */
.scroll-progress {
  position: fixed;
  top: 0;
  left: 0;
  width: 0%;
  height: 2px;
  background: linear-gradient(90deg, var(--primary), var(--accent));
  z-index: 101;
  transition: width 50ms linear;
}

/* ── AD ────────────────────────────────────────────────── */
.ad-banner {
  background: var(--bg-2);
  border: 1px dashed var(--border-mid);
  text-align: center;
  padding: 20px;
  border-radius: var(--radius-sm);
  color: var(--text-dim);
  font-size: 0.8rem;
  min-height: 90px;
  display: flex;
  align-items: center;
  justify-content: center;
}
.ad-wrap { max-width: var(--max-width); margin: 24px auto; padding: 0 24px; }

/* ── MAIN ──────────────────────────────────────────────── */
.main-content {
  max-width: var(--max-width);
  margin: 0 auto;
  padding: 40px 24px 80px;
}

/* ── SECTION HEADERS ───────────────────────────────────── */
.category-section { margin-bottom: 56px; }

.section-title {
  font-family: var(--font-display);
  font-size: clamp(1.375rem, 3vw, 1.75rem);
  font-weight: 700;
  color: var(--text);
  margin-bottom: 6px;
  letter-spacing: -0.025em;
  line-height: 1.2;
}
.section-subtitle {
  font-size: 0.9375rem;
  color: var(--text-muted);
  margin-bottom: 24px;
  line-height: 1.5;
}

/* ── CALCULATOR CARD GRID ──────────────────────────────── */
.calc-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
  gap: 16px;
}

.calc-card {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 24px;
  display: flex;
  gap: 16px;
  align-items: flex-start;
  text-decoration: none;
  color: var(--text);
  transition: all var(--timing-normal) var(--ease-smooth);
  box-shadow: var(--shadow-sm);
  position: relative;
  overflow: hidden;
}

/* Subtle top-border accent */
.calc-card::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 2px;
  background: linear-gradient(90deg, var(--primary), transparent);
  opacity: 0;
  transition: opacity var(--timing-normal) var(--ease-smooth);
}

.calc-card:hover {
  transform: translateY(-3px);
  box-shadow: var(--shadow-lg), var(--shadow-glow);
  border-color: var(--border-strong);
  background: var(--bg-card-hover);
}
.calc-card:hover::before { opacity: 1; }

.calc-card-icon {
  width: 48px;
  height: 48px;
  border-radius: var(--radius);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.375rem;
  flex-shrink: 0;
  position: relative;
}

/* Subtle glow behind icons */
.calc-card-icon::after {
  content: '';
  position: absolute;
  inset: -4px;
  border-radius: var(--radius);
  background: inherit;
  opacity: 0.15;
  filter: blur(8px);
  z-index: -1;
}

.calc-card-content h3 {
  font-family: var(--font-display);
  font-size: 0.9375rem;
  font-weight: 600;
  margin-bottom: 4px;
  color: var(--text);
  letter-spacing: -0.01em;
}
.calc-card-content p {
  font-size: 0.8125rem;
  color: var(--text-secondary);
  line-height: 1.55;
}

/* ── CALCULATOR LAYOUT (inner pages) ───────────────────── */
.calc-layout {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 24px;
  align-items: start;
}
.calc-layout.single { grid-template-columns: 1fr; max-width: 640px; margin: 0 auto; }
.calc-layout.wide { grid-template-columns: 1fr; max-width: 900px; margin: 0 auto; }

/* ── CARD COMPONENT ────────────────────────────────────── */
.card {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-md);
  overflow: hidden;
}
.card-header {
  background: var(--bg-2);
  border-bottom: 1px solid var(--border);
  padding: 18px 24px;
  display: flex;
  align-items: center;
  gap: 12px;
}
.card-header h2 {
  font-family: var(--font-display);
  font-size: 1.0625rem;
  font-weight: 600;
  color: var(--text);
  letter-spacing: -0.01em;
}
.card-icon {
  width: 36px;
  height: 36px;
  border-radius: var(--radius-sm);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.125rem;
  background: var(--primary);
  color: #000;
  flex-shrink: 0;
}
.card-body { padding: 24px; }

/* ── FORM ELEMENTS ─────────────────────────────────────── */
.form-group { margin-bottom: 20px; }
.form-group label {
  display: block;
  font-size: 0.8125rem;
  font-weight: 600;
  color: var(--text);
  margin-bottom: 6px;
  letter-spacing: 0.01em;
}
.form-hint {
  font-size: 0.75rem;
  color: var(--text-muted);
  margin-bottom: 6px;
}
.form-row {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 16px;
}
.input-wrap { position: relative; }
.input-prefix, .input-suffix {
  position: absolute;
  top: 50%;
  transform: translateY(-50%);
  font-size: 0.875rem;
  color: var(--text-muted);
  font-weight: 500;
  pointer-events: none;
}
.input-prefix { left: 14px; }
.input-suffix { right: 14px; }
.has-prefix input { padding-left: 30px; }
.has-suffix input { padding-right: 38px; }

input[type="number"],
input[type="text"],
input[type="date"],
select,
textarea {
  width: 100%;
  padding: 11px 14px;
  border: 1.5px solid var(--border-mid);
  border-radius: var(--radius-sm);
  font-size: 0.9375rem;
  font-family: var(--font-body);
  color: var(--text);
  background: var(--bg-0);
  transition: border-color var(--timing-fast) var(--ease-smooth),
              box-shadow var(--timing-fast) var(--ease-smooth);
  -webkit-appearance: none;
  appearance: none;
}
input:focus, select:focus, textarea:focus {
  outline: none;
  border-color: var(--primary);
  box-shadow: 0 0 0 3px var(--primary-glow);
}
select {
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='12' viewBox='0 0 12 12'%3E%3Cpath fill='%23a09888' d='M6 8L1 3h10z'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: right 14px center;
  padding-right: 34px;
  cursor: pointer;
}

/* ── BUTTONS ───────────────────────────────────────────── */
.btn {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 12px 24px;
  font-size: 0.9375rem;
  font-weight: 600;
  font-family: var(--font-body);
  border-radius: var(--radius-sm);
  cursor: pointer;
  transition: all var(--timing-fast) var(--ease-smooth);
  text-decoration: none;
  border: none;
  min-height: 44px;
}
.btn-primary {
  background: linear-gradient(135deg, var(--primary) 0%, var(--primary-dark) 100%);
  color: #000;
  font-weight: 700;
}
.btn-primary:hover {
  transform: translateY(-1px);
  box-shadow: 0 4px 16px rgba(212, 160, 18, 0.35), var(--shadow-sm);
}
.btn-secondary {
  background: var(--bg-2);
  color: var(--text);
  border: 1.5px solid var(--border-mid);
}
.btn-secondary:hover { background: var(--bg-3); }
.btn-full { width: 100%; justify-content: center; }
.btn-lg { padding: 14px 28px; font-size: 1rem; }

/* ── TOGGLE GROUP ──────────────────────────────────────── */
.toggle-group {
  display: flex;
  background: var(--bg-0);
  border: 1.5px solid var(--border-mid);
  border-radius: var(--radius-sm);
  padding: 3px;
  gap: 3px;
  margin-bottom: 20px;
}
.toggle-btn {
  flex: 1;
  padding: 8px;
  font-size: 0.8125rem;
  font-weight: 600;
  background: none;
  border: none;
  border-radius: 6px;
  cursor: pointer;
  color: var(--text-muted);
  transition: all var(--timing-fast) var(--ease-smooth);
  font-family: var(--font-body);
}
.toggle-btn.active {
  background: linear-gradient(135deg, var(--primary) 0%, var(--primary-dark) 100%);
  color: #000;
  box-shadow: var(--shadow-sm);
}

/* ── RESULT PANEL ──────────────────────────────────────── */
.result-panel {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-lg);
  overflow: hidden;
}
.result-headline {
  background: linear-gradient(135deg, #b8860b 0%, #d4a012 50%, #f0c040 100%);
  color: #000;
  padding: 24px;
  text-align: center;
  position: relative;
}
.result-headline::after {
  content: '';
  position: absolute;
  inset: 0;
  background: linear-gradient(180deg, rgba(255,255,255,0.1) 0%, transparent 100%);
  pointer-events: none;
}
.result-headline .label {
  font-size: 0.75rem;
  font-weight: 700;
  opacity: 0.7;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  margin-bottom: 4px;
}
.result-headline .amount {
  font-family: var(--font-display);
  font-size: 2.5rem;
  font-weight: 700;
  letter-spacing: -0.03em;
  line-height: 1.1;
}
.result-headline .sub {
  font-size: 0.875rem;
  opacity: 0.7;
  margin-top: 6px;
}
.result-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 1px;
  background: var(--border);
}
.result-item {
  background: var(--bg-card);
  padding: 16px 20px;
}
.r-label {
  font-size: 0.6875rem;
  font-weight: 700;
  color: var(--text-muted);
  text-transform: uppercase;
  letter-spacing: 0.06em;
  margin-bottom: 4px;
}
.r-value {
  font-family: var(--font-display);
  font-size: 1.0625rem;
  font-weight: 700;
  color: var(--text);
}
.r-value.primary { color: var(--primary-light); }
.r-value.secondary { color: var(--secondary); }
.r-value.success { color: var(--success); }
.r-value.danger { color: var(--danger); }

/* ── RESULT ACTIONS ────────────────────────────────────── */
.result-actions { display: flex; gap: 8px; margin-top: 16px; flex-wrap: wrap; }
.btn-copy, .btn-share {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 8px 14px;
  font-size: 0.8125rem;
  font-weight: 600;
  font-family: var(--font-body);
  border-radius: var(--radius-sm);
  border: 1.5px solid var(--border-mid);
  background: var(--bg-2);
  color: var(--text-secondary);
  cursor: pointer;
  transition: all var(--timing-fast) var(--ease-smooth);
  white-space: nowrap;
}
.btn-copy:hover, .btn-share:hover {
  background: var(--primary);
  color: #000;
  border-color: var(--primary);
}
.btn-copy.copied {
  background: var(--success);
  color: #fff;
  border-color: var(--success);
}

/* ── INFO BOX ──────────────────────────────────────────── */
.info-box {
  background: var(--bg-2);
  border: 1px solid var(--border);
  border-left: 3px solid var(--primary);
  border-radius: var(--radius-sm);
  padding: 16px 20px;
  font-size: 0.875rem;
  color: var(--text-secondary);
  line-height: 1.6;
}
.info-box.warning { border-left-color: var(--warning); }
.info-box.danger { border-left-color: var(--danger); }
.info-box.success { border-left-color: var(--success); }

/* ── BREADCRUMB ────────────────────────────────────────── */
.breadcrumb {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 0.8125rem;
  color: var(--text-muted);
  margin-bottom: 24px;
  flex-wrap: wrap;
}
.breadcrumb a { color: var(--primary); text-decoration: none; }
.breadcrumb a:hover { text-decoration: underline; }
.breadcrumb .sep { color: var(--text-dim); }

/* ── CRYPTO TICKER ─────────────────────────────────────── */
.crypto-ticker {
  display: flex;
  gap: 12px;
  flex-wrap: wrap;
  margin-bottom: 16px;
}
.ticker-item {
  background: var(--bg-2);
  border: 1px solid var(--border);
  border-radius: var(--radius-full);
  padding: 6px 14px;
  font-size: 0.8125rem;
  display: flex;
  align-items: center;
  gap: 6px;
}
.ticker-symbol { font-weight: 700; color: var(--primary); }
.ticker-up { color: var(--success); }
.ticker-down { color: var(--danger); }

/* ── SEO CONTENT ───────────────────────────────────────── */
.seo-content {
  margin-top: 56px;
  padding-top: 40px;
  border-top: 1px solid var(--border);
}
.seo-content h2 {
  font-family: var(--font-display);
  font-size: 1.375rem;
  font-weight: 700;
  margin-bottom: 16px;
  letter-spacing: -0.02em;
}
.seo-content h3 {
  font-family: var(--font-display);
  font-size: 1.0625rem;
  font-weight: 600;
  margin: 24px 0 8px;
}
.seo-content p {
  color: var(--text-secondary);
  margin-bottom: 12px;
  line-height: 1.7;
  max-width: 65ch;
}
.seo-content ul, .seo-content ol {
  color: var(--text-secondary);
  margin-left: 24px;
  margin-bottom: 12px;
  line-height: 1.7;
}
.seo-content li { margin-bottom: 4px; }

/* ── AFFILIATE SECTION ─────────────────────────────────── */
.affiliate-section-wrap {
  background: var(--bg-1);
  border-top: 1px solid var(--border);
  border-bottom: 1px solid var(--border);
  padding: 48px 24px;
}
.affiliate-inner { max-width: var(--max-width); margin: 0 auto; }
.affiliate-heading {
  font-family: var(--font-display);
  font-size: 1.0625rem;
  font-weight: 600;
  color: var(--text);
  margin-bottom: 16px;
  letter-spacing: -0.01em;
}
.affiliate-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(240px, 1fr));
  gap: 16px;
}
.aff-card {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 24px;
  text-decoration: none;
  color: var(--text);
  transition: all var(--timing-normal) var(--ease-smooth);
  display: block;
}
.aff-card:hover {
  border-color: var(--border-strong);
  transform: translateY(-2px);
  box-shadow: var(--shadow-md);
}
.aff-card-name {
  font-family: var(--font-display);
  font-size: 0.9375rem;
  font-weight: 600;
  margin-bottom: 6px;
  color: var(--primary);
}
.aff-card-desc {
  font-size: 0.8125rem;
  color: var(--text-secondary);
  margin-bottom: 12px;
  line-height: 1.55;
}
.aff-card-btn {
  display: inline-block;
  padding: 6px 14px;
  background: linear-gradient(135deg, var(--primary), var(--primary-dark));
  color: #000;
  border-radius: var(--radius-sm);
  font-size: 0.8125rem;
  font-weight: 700;
}

/* ── FOOTER ────────────────────────────────────────────── */
.site-footer {
  background: var(--bg-1);
  border-top: 1px solid var(--border);
  padding: 48px 24px;
}
.footer-inner {
  max-width: var(--max-width);
  margin: 0 auto;
  display: grid;
  grid-template-columns: 1fr 2fr;
  gap: 32px;
}
.footer-brand {
  font-family: var(--font-display);
  font-size: 1.25rem;
  font-weight: 700;
  color: var(--primary);
  margin-bottom: 6px;
}
.footer-tagline {
  font-size: 0.875rem;
  color: var(--text-muted);
}
.footer-links {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 16px;
}
.footer-col h4 {
  font-size: 0.6875rem;
  font-weight: 700;
  color: var(--text-secondary);
  margin-bottom: 12px;
  text-transform: uppercase;
  letter-spacing: 0.08em;
}
.footer-col ul { list-style: none; }
.footer-col li { margin-bottom: 6px; }
.footer-col a {
  text-decoration: none;
  font-size: 0.875rem;
  color: var(--text-muted);
  transition: color var(--timing-fast);
}
.footer-col a:hover { color: var(--primary); }
.footer-bottom {
  max-width: var(--max-width);
  margin: 32px auto 0;
  padding-top: 24px;
  border-top: 1px solid var(--border);
  display: flex;
  justify-content: space-between;
  align-items: center;
  font-size: 0.8125rem;
  color: var(--text-muted);
}
.footer-legal { display: flex; gap: 16px; }
.footer-legal a { color: var(--text-muted); text-decoration: none; }
.footer-legal a:hover { color: var(--primary); }

/* ── TABLES ────────────────────────────────────────────── */
table { width: 100%; border-collapse: collapse; font-size: 0.875rem; }
th {
  background: var(--bg-2);
  padding: 10px 16px;
  text-align: left;
  font-weight: 700;
  font-size: 0.75rem;
  color: var(--text-secondary);
  border-bottom: 1px solid var(--border);
  text-transform: uppercase;
  letter-spacing: 0.05em;
}
td {
  padding: 10px 16px;
  border-bottom: 1px solid var(--border);
  color: var(--text-secondary);
}
tr:last-child td { border-bottom: none; }
tr:hover td { background: var(--bg-2); }
.table-wrap {
  overflow-x: auto;
  border: 1px solid var(--border);
  border-radius: var(--radius);
}

/* ── PROGRESS BAR ──────────────────────────────────────── */
.progress-bar-wrap {
  background: var(--bg-2);
  border-radius: var(--radius-full);
  height: 10px;
  overflow: hidden;
  margin: 8px 0;
}
.progress-bar {
  height: 100%;
  border-radius: var(--radius-full);
  background: linear-gradient(90deg, var(--primary), var(--accent));
  transition: width 0.4s var(--ease-smooth);
}

/* ── UTILITY ───────────────────────────────────────────── */
.hidden { display: none !important; }
.mt-1 { margin-top: 12px; }
.mt-2 { margin-top: 20px; }
.mt-3 { margin-top: 32px; }
.text-center { text-align: center; }
.divider { border: none; border-top: 1px solid var(--border); margin: 24px 0; }

.badge {
  display: inline-flex;
  align-items: center;
  padding: 4px 10px;
  border-radius: var(--radius-full);
  font-size: 0.75rem;
  font-weight: 700;
}
.badge-green { background: var(--success-muted); color: var(--success); }
.badge-red { background: var(--danger-muted); color: var(--danger); }
.badge-orange { background: var(--accent-muted); color: var(--primary); }

/* ── ANIMATIONS ────────────────────────────────────────── */
@keyframes fadeSlideUp {
  from { opacity: 0; transform: translateY(16px); }
  to   { opacity: 1; transform: translateY(0); }
}

.result-panel:not(.hidden) { animation: fadeSlideUp var(--timing-slow) var(--ease-smooth) both; }
.result-item { animation: fadeSlideUp var(--timing-slow) var(--ease-smooth) both; }
.result-item:nth-child(1) { animation-delay: 0.05s; }
.result-item:nth-child(2) { animation-delay: 0.10s; }
.result-item:nth-child(3) { animation-delay: 0.15s; }
.result-item:nth-child(4) { animation-delay: 0.20s; }

/* Scroll-triggered fade-in */
.fade-in {
  opacity: 0;
  transform: translateY(24px);
  transition: opacity 0.6s var(--ease-smooth), transform 0.6s var(--ease-smooth);
}
.fade-in.visible {
  opacity: 1;
  transform: translateY(0);
}

/* ── RESPONSIVE ────────────────────────────────────────── */
@media (max-width: 768px) {
  .nav-links { display: none; }
  .nav-hamburger { display: flex; }
  .calc-layout { grid-template-columns: 1fr; }
  .form-row { grid-template-columns: 1fr; }
  .footer-inner { grid-template-columns: 1fr; }
  .footer-links { grid-template-columns: 1fr 1fr; }
  .page-hero { padding: 56px 20px 64px; }
  .hero-stats { gap: 20px; flex-wrap: wrap; }
  .hero-stat-value { font-size: 1.375rem; }
}

@media (max-width: 480px) {
  .footer-links { grid-template-columns: 1fr; }
  .result-grid { grid-template-columns: 1fr; }
  .main-content { padding: 24px 16px 48px; }
  .footer-bottom { flex-direction: column; gap: 12px; text-align: center; }
  .hero-stats { flex-direction: column; gap: 16px; }
}
