/* ============================================================
   Calculious Design System
   "Dark Studio Finance" — obsidian + saffron + teal
   ============================================================ */

/* Google Fonts */
@import url('https://fonts.googleapis.com/css2?family=Plus+Jakarta+Sans:wght@300;400;500;600;700;800&family=JetBrains+Mono:wght@400;500;600&display=swap');

/* ── Design Tokens ───────────────────────────────────────── */
:root {
  /* Backgrounds */
  --bg-deep:    #08080F;
  --bg-card:    #111118;
  --bg-surface: #1A1A28;
  --bg-hover:   #222235;

  /* Accents */
  --gold:       #F5A623;
  --gold-dim:   #C47F0D;
  --gold-glow:  rgba(245,166,35,0.18);
  --teal:       #00C9A7;
  --teal-dim:   #008F77;
  --teal-glow:  rgba(0,201,167,0.15);
  --red:        #FF4D6D;
  --red-glow:   rgba(255,77,109,0.15);
  --purple:     #9B59FF;

  /* Text */
  --text-primary:   #F0EEF8;
  --text-secondary: #9B98B8;
  --text-muted:     #5A5778;

  /* Borders */
  --border:     #2A2A3E;
  --border-light: #3A3A55;

  /* Typography */
  --font-sans: 'Plus Jakarta Sans', system-ui, sans-serif;
  --font-mono: 'JetBrains Mono', 'Fira Code', monospace;

  /* Spacing */
  --space-xs:  4px;
  --space-sm:  8px;
  --space-md:  16px;
  --space-lg:  24px;
  --space-xl:  40px;
  --space-2xl: 64px;
  --space-3xl: 96px;

  /* Radius */
  --r-sm:  6px;
  --r-md:  12px;
  --r-lg:  20px;
  --r-xl:  32px;
  --r-full: 9999px;

  /* Shadows */
  --shadow-card:  0 4px 24px rgba(0,0,0,0.4);
  --shadow-gold:  0 0 32px var(--gold-glow);
  --shadow-teal:  0 0 32px var(--teal-glow);
  --shadow-lift:  0 12px 48px rgba(0,0,0,0.6);

  /* Transitions */
  --ease:     cubic-bezier(0.25, 0.46, 0.45, 0.94);
  --ease-out: cubic-bezier(0.16, 1, 0.3, 1);
  --t-fast:   150ms;
  --t-mid:    300ms;
  --t-slow:   600ms;
}

/* ── Reset ───────────────────────────────────────────────── */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
html { scroll-behavior: smooth; -webkit-text-size-adjust: 100%; }
body {
  font-family: var(--font-sans);
  background: var(--bg-deep);
  color: var(--text-primary);
  line-height: 1.6;
  min-height: 100vh;
  overflow-x: hidden;
}
img, svg { display: block; max-width: 100%; }
a { color: inherit; text-decoration: none; }
button { cursor: pointer; border: none; background: none; font: inherit; }
input, select, textarea {
  font: inherit;
  color: inherit;
  background: none;
  border: none;
  outline: none;
}
ul, ol { list-style: none; }

/* ── Typography Scale ────────────────────────────────────── */
.t-hero    { font-size: clamp(2.5rem, 7vw, 5.5rem); font-weight: 800; line-height: 1.05; letter-spacing: -0.03em; }
.t-h1      { font-size: clamp(2rem, 4vw, 3.5rem);   font-weight: 800; line-height: 1.1;  letter-spacing: -0.02em; }
.t-h2      { font-size: clamp(1.5rem, 3vw, 2.5rem); font-weight: 700; line-height: 1.2;  letter-spacing: -0.02em; }
.t-h3      { font-size: clamp(1.1rem, 2vw, 1.5rem); font-weight: 600; line-height: 1.3; }
.t-h4      { font-size: 1.125rem; font-weight: 600; }
.t-body    { font-size: 1rem;     font-weight: 400; line-height: 1.7; }
.t-small   { font-size: 0.875rem; }
.t-xs      { font-size: 0.75rem; }
.t-mono    { font-family: var(--font-mono); }
.t-gold    { color: var(--gold); }
.t-teal    { color: var(--teal); }
.t-red     { color: var(--red); }
.t-muted   { color: var(--text-secondary); }
.t-dim     { color: var(--text-muted); }
.t-center  { text-align: center; }

/* ── Layout ──────────────────────────────────────────────── */
.container {
  width: 100%;
  max-width: 1280px;
  margin: 0 auto;
  padding: 0 var(--space-lg);
}
.container--narrow {
  max-width: 800px;
  margin: 0 auto;
  padding: 0 var(--space-lg);
}
.grid-2 { display: grid; grid-template-columns: repeat(2, 1fr); gap: var(--space-lg); }
.grid-3 { display: grid; grid-template-columns: repeat(3, 1fr); gap: var(--space-lg); }
.grid-4 { display: grid; grid-template-columns: repeat(4, 1fr); gap: var(--space-lg); }
@media (max-width: 900px) { .grid-3 { grid-template-columns: repeat(2, 1fr); } }
@media (max-width: 600px) {
  .grid-2, .grid-3, .grid-4 { grid-template-columns: 1fr; }
  .container { padding: 0 var(--space-md); }
}
.flex     { display: flex; }
.flex-col { display: flex; flex-direction: column; }
.items-center { align-items: center; }
.justify-between { justify-content: space-between; }
.gap-sm { gap: var(--space-sm); }
.gap-md { gap: var(--space-md); }
.gap-lg { gap: var(--space-lg); }

/* ── Header ──────────────────────────────────────────────── */
.site-header {
  position: sticky;
  top: 0;
  z-index: 100;
  background: rgba(8, 8, 15, 0.85);
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
  border-bottom: 1px solid var(--border);
  padding: var(--space-md) 0;
}
.site-header .container {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: var(--space-md);
}
.site-logo {
  display: flex;
  align-items: center;
  gap: 10px;
  flex-shrink: 0;
}
.site-logo svg { width: 36px; height: 36px; }
.site-logo-text {
  font-size: 1.375rem;
  font-weight: 800;
  letter-spacing: -0.03em;
  color: var(--text-primary);
}
.site-logo-text span { color: var(--gold); }

.site-nav {
  display: flex;
  align-items: center;
  gap: var(--space-xs);
}
.site-nav a {
  padding: 8px 16px;
  border-radius: var(--r-full);
  font-size: 0.9rem;
  font-weight: 500;
  color: var(--text-secondary);
  transition: color var(--t-fast), background var(--t-fast);
}
.site-nav a:hover, .site-nav a.active {
  color: var(--text-primary);
  background: var(--bg-surface);
}

.country-switcher {
  display: flex;
  align-items: center;
  gap: var(--space-sm);
  flex-shrink: 0;
}
.country-pill {
  display: flex;
  align-items: center;
  gap: 6px;
  padding: 7px 14px;
  border-radius: var(--r-full);
  background: var(--bg-surface);
  border: 1px solid var(--border);
  font-size: 0.85rem;
  font-weight: 600;
  cursor: pointer;
  transition: all var(--t-fast) var(--ease);
}
.country-pill:hover {
  border-color: var(--gold);
  box-shadow: 0 0 0 2px var(--gold-glow);
}
.country-pill .flag { font-size: 1rem; }

.mobile-menu-toggle {
  display: none;
  flex-direction: column;
  gap: 5px;
  padding: 8px;
  cursor: pointer;
}
.mobile-menu-toggle span {
  display: block;
  width: 22px;
  height: 2px;
  background: var(--text-primary);
  border-radius: 2px;
  transition: all var(--t-mid);
}
@media (max-width: 768px) {
  .mobile-menu-toggle { display: flex; }
  .site-nav {
    display: none;
    position: absolute;
    top: 100%;
    left: 0;
    right: 0;
    background: var(--bg-card);
    border-bottom: 1px solid var(--border);
    flex-direction: column;
    padding: var(--space-md);
    gap: var(--space-xs);
  }
  .site-nav.open { display: flex; }
  .site-nav a { width: 100%; padding: 12px 16px; }
}

/* ── Country Selector Modal ──────────────────────────────── */
.country-modal-overlay {
  position: fixed;
  inset: 0;
  background: rgba(8,8,15,0.9);
  backdrop-filter: blur(12px);
  z-index: 1000;
  display: flex;
  align-items: center;
  justify-content: center;
  opacity: 0;
  pointer-events: none;
  transition: opacity var(--t-mid);
}
.country-modal-overlay.open {
  opacity: 1;
  pointer-events: all;
}
.country-modal {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--r-xl);
  padding: var(--space-xl);
  width: min(520px, 90vw);
  transform: scale(0.95) translateY(16px);
  transition: transform var(--t-mid) var(--ease-out);
  box-shadow: var(--shadow-lift);
}
.country-modal-overlay.open .country-modal {
  transform: scale(1) translateY(0);
}
.country-modal h2 {
  font-size: 1.5rem;
  font-weight: 700;
  margin-bottom: var(--space-xs);
}
.country-modal p {
  color: var(--text-secondary);
  font-size: 0.9rem;
  margin-bottom: var(--space-xl);
}
.country-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: var(--space-md);
}
.country-card {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: var(--space-sm);
  padding: var(--space-lg) var(--space-md);
  border-radius: var(--r-lg);
  border: 2px solid var(--border);
  cursor: pointer;
  transition: all var(--t-mid) var(--ease-out);
  position: relative;
  overflow: hidden;
  transform-style: preserve-3d;
}
.country-card::before {
  content: '';
  position: absolute;
  inset: 0;
  background: radial-gradient(circle at center, var(--gold-glow), transparent 70%);
  opacity: 0;
  transition: opacity var(--t-mid);
}
.country-card:hover, .country-card.selected {
  border-color: var(--gold);
  transform: translateY(-4px) scale(1.02);
  box-shadow: var(--shadow-gold);
}
.country-card:hover::before, .country-card.selected::before { opacity: 1; }
.country-card.selected { background: rgba(245,166,35,0.05); }
.country-card-flag {
  font-size: 2.5rem;
  line-height: 1;
  filter: drop-shadow(0 2px 8px rgba(0,0,0,0.4));
}
.country-card-name { font-weight: 700; font-size: 1rem; }
.country-card-currency { font-size: 0.8rem; color: var(--text-secondary); font-family: var(--font-mono); }
.country-card-check {
  position: absolute;
  top: 10px;
  right: 10px;
  width: 20px;
  height: 20px;
  border-radius: 50%;
  background: var(--gold);
  display: flex;
  align-items: center;
  justify-content: center;
  opacity: 0;
  transform: scale(0);
  transition: all var(--t-mid) var(--ease-out);
}
.country-card.selected .country-card-check { opacity: 1; transform: scale(1); }

/* ── Cards ───────────────────────────────────────────────── */
.card {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--r-lg);
  padding: var(--space-lg);
  transition: all var(--t-mid) var(--ease);
  position: relative;
  overflow: hidden;
}
.card--interactive {
  cursor: pointer;
  transform-style: preserve-3d;
  perspective: 1000px;
}
.card--interactive:hover {
  border-color: var(--border-light);
  transform: translateY(-6px) rotateX(2deg);
  box-shadow: var(--shadow-lift);
}
.card--gold:hover  { border-color: var(--gold); box-shadow: var(--shadow-gold); }
.card--teal:hover  { border-color: var(--teal); box-shadow: var(--shadow-teal); }
.card-icon {
  width: 48px;
  height: 48px;
  border-radius: var(--r-md);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.5rem;
  margin-bottom: var(--space-md);
}
.card-icon--gold { background: var(--gold-glow); }
.card-icon--teal { background: var(--teal-glow); }
.card-icon--red  { background: var(--red-glow); }
.card-glow {
  position: absolute;
  top: -40px; right: -40px;
  width: 120px; height: 120px;
  border-radius: 50%;
  opacity: 0;
  transition: opacity var(--t-mid);
  pointer-events: none;
}
.card--interactive:hover .card-glow { opacity: 1; }
.card-glow--gold { background: radial-gradient(circle, var(--gold-glow), transparent 70%); }
.card-glow--teal { background: radial-gradient(circle, var(--teal-glow), transparent 70%); }

/* ── Buttons ─────────────────────────────────────────────── */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 12px 28px;
  border-radius: var(--r-full);
  font-size: 0.95rem;
  font-weight: 600;
  letter-spacing: 0.01em;
  transition: all var(--t-fast) var(--ease);
  white-space: nowrap;
}
.btn-primary {
  background: var(--gold);
  color: #000;
}
.btn-primary:hover {
  background: #ffb740;
  transform: translateY(-2px);
  box-shadow: 0 8px 24px var(--gold-glow);
}
.btn-secondary {
  background: var(--bg-surface);
  color: var(--text-primary);
  border: 1px solid var(--border);
}
.btn-secondary:hover {
  border-color: var(--border-light);
  transform: translateY(-2px);
  box-shadow: var(--shadow-card);
}
.btn-ghost {
  color: var(--gold);
  padding: 8px 0;
}
.btn-ghost:hover { color: #ffb740; }
.btn-lg { padding: 16px 40px; font-size: 1.05rem; }
.btn-sm { padding: 8px 18px; font-size: 0.85rem; }

/* ── Form Elements ───────────────────────────────────────── */
.form-group { display: flex; flex-direction: column; gap: 6px; }
.form-label {
  font-size: 0.85rem;
  font-weight: 500;
  color: var(--text-secondary);
  letter-spacing: 0.02em;
  text-transform: uppercase;
}
.form-input {
  background: var(--bg-surface);
  border: 1px solid var(--border);
  border-radius: var(--r-md);
  padding: 12px 16px;
  font-size: 1rem;
  color: var(--text-primary);
  transition: border-color var(--t-fast), box-shadow var(--t-fast);
  width: 100%;
}
.form-input:focus {
  border-color: var(--gold);
  box-shadow: 0 0 0 3px var(--gold-glow);
}
.form-input--mono { font-family: var(--font-mono); font-size: 1.1rem; }
.input-prefix-wrap {
  position: relative;
}
.input-prefix {
  position: absolute;
  left: 14px;
  top: 50%;
  transform: translateY(-50%);
  color: var(--gold);
  font-family: var(--font-mono);
  font-weight: 600;
  pointer-events: none;
  font-size: 1rem;
}
.input-prefix-wrap .form-input { padding-left: 36px; }
.form-select {
  background: var(--bg-surface) url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='8' viewBox='0 0 12 8'%3E%3Cpath d='M1 1l5 5 5-5' stroke='%239B98B8' stroke-width='1.5' fill='none' stroke-linecap='round'/%3E%3C/svg%3E") no-repeat right 14px center;
  border: 1px solid var(--border);
  border-radius: var(--r-md);
  padding: 12px 40px 12px 16px;
  font-size: 1rem;
  color: var(--text-primary);
  appearance: none;
  cursor: pointer;
  transition: border-color var(--t-fast), box-shadow var(--t-fast);
  width: 100%;
}
.form-select:focus {
  border-color: var(--gold);
  box-shadow: 0 0 0 3px var(--gold-glow);
}
.toggle-wrap {
  display: flex;
  background: var(--bg-surface);
  border: 1px solid var(--border);
  border-radius: var(--r-full);
  padding: 4px;
  gap: 4px;
}
.toggle-option {
  padding: 8px 20px;
  border-radius: var(--r-full);
  font-size: 0.875rem;
  font-weight: 500;
  color: var(--text-secondary);
  cursor: pointer;
  transition: all var(--t-fast);
  flex: 1;
  text-align: center;
}
.toggle-option.active {
  background: var(--gold);
  color: #000;
  font-weight: 700;
}
.range-input {
  -webkit-appearance: none;
  appearance: none;
  width: 100%;
  height: 4px;
  background: var(--bg-surface);
  border-radius: var(--r-full);
  outline: none;
}
.range-input::-webkit-slider-thumb {
  -webkit-appearance: none;
  width: 20px; height: 20px;
  border-radius: 50%;
  background: var(--gold);
  cursor: pointer;
  box-shadow: 0 0 0 4px var(--gold-glow);
  transition: transform var(--t-fast);
}
.range-input::-webkit-slider-thumb:hover { transform: scale(1.2); }

/* ── Result Display ──────────────────────────────────────── */
.result-hero {
  background: linear-gradient(135deg, var(--bg-surface), var(--bg-card));
  border: 1px solid var(--border-light);
  border-radius: var(--r-lg);
  padding: var(--space-xl);
  text-align: center;
  position: relative;
  overflow: hidden;
}
.result-hero::before {
  content: '';
  position: absolute;
  top: -60px; left: 50%;
  transform: translateX(-50%);
  width: 200px; height: 120px;
  background: radial-gradient(ellipse, var(--gold-glow), transparent 70%);
  pointer-events: none;
}
.result-label {
  font-size: 0.8rem;
  font-weight: 600;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--text-muted);
  margin-bottom: var(--space-sm);
}
.result-value {
  font-family: var(--font-mono);
  font-size: clamp(2rem, 5vw, 3.5rem);
  font-weight: 600;
  color: var(--gold);
  line-height: 1;
  letter-spacing: -0.02em;
}
.result-sub {
  font-size: 0.875rem;
  color: var(--text-secondary);
  margin-top: var(--space-sm);
}
.result-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(160px, 1fr));
  gap: var(--space-md);
  margin-top: var(--space-lg);
}
.result-item {
  background: var(--bg-surface);
  border-radius: var(--r-md);
  padding: var(--space-md);
}
.result-item-label { font-size: 0.75rem; color: var(--text-muted); text-transform: uppercase; letter-spacing: 0.08em; margin-bottom: 4px; }
.result-item-value { font-family: var(--font-mono); font-size: 1.125rem; font-weight: 600; }
.result-item-value--teal { color: var(--teal); }
.result-item-value--red  { color: var(--red); }
.result-item-value--gold { color: var(--gold); }

/* Bracket breakdown */
.bracket-table { width: 100%; border-collapse: collapse; }
.bracket-table th {
  font-size: 0.75rem;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: var(--text-muted);
  text-align: left;
  padding: 8px 12px;
  border-bottom: 1px solid var(--border);
}
.bracket-table td {
  padding: 10px 12px;
  font-size: 0.9rem;
  border-bottom: 1px solid var(--border);
  font-family: var(--font-mono);
}
.bracket-table tr:last-child td { border-bottom: none; }
.bracket-table tr:hover td { background: var(--bg-surface); }
.bracket-bar {
  height: 4px;
  border-radius: 2px;
  background: var(--gold);
  transition: width 0.5s var(--ease-out);
}

/* ── AdSense Slots ───────────────────────────────────────── */
.ad-slot {
  background: var(--bg-surface);
  border: 1px dashed var(--border);
  border-radius: var(--r-md);
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--text-muted);
  font-size: 0.75rem;
  letter-spacing: 0.05em;
  text-transform: uppercase;
  font-family: var(--font-mono);
}
.ad-slot--banner { height: 90px; width: 100%; }
.ad-slot--rect   { height: 250px; }
.ad-slot--skyscraper { height: 600px; width: 160px; }
.ad-slot--inline { height: 280px; width: 100%; }
/* Replace .ad-slot content with real AdSense <ins> tags */

/* ── Section Spacing ─────────────────────────────────────── */
.section      { padding: var(--space-3xl) 0; }
.section--sm  { padding: var(--space-xl) 0; }
.section--lg  { padding: 120px 0; }
.section-label {
  font-size: 0.75rem;
  font-weight: 600;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: var(--gold);
  margin-bottom: var(--space-sm);
}
.section-title { margin-bottom: var(--space-sm); }
.section-desc  { color: var(--text-secondary); max-width: 560px; }

/* ── Tool Page Layout ────────────────────────────────────── */
.tool-layout {
  display: grid;
  grid-template-columns: 420px 1fr;
  gap: var(--space-xl);
  align-items: start;
}
@media (max-width: 960px) {
  .tool-layout { grid-template-columns: 1fr; }
}
.tool-inputs {
  position: sticky;
  top: 80px;
}

/* ── Badges / Tags ───────────────────────────────────────── */
.badge {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  padding: 4px 10px;
  border-radius: var(--r-full);
  font-size: 0.75rem;
  font-weight: 600;
  letter-spacing: 0.04em;
}
.badge--gold   { background: var(--gold-glow);  color: var(--gold); }
.badge--teal   { background: var(--teal-glow);  color: var(--teal); }
.badge--red    { background: var(--red-glow);   color: var(--red); }
.badge--muted  { background: var(--bg-surface); color: var(--text-muted); border: 1px solid var(--border); }

/* ── Tool Cards (Homepage) ───────────────────────────────── */
.tool-card-link { display: block; }
.tool-card { padding: var(--space-xl) var(--space-lg); }
.tool-card-arrow {
  margin-top: var(--space-lg);
  color: var(--gold);
  font-size: 1.2rem;
  transition: transform var(--t-fast);
}
.tool-card-link:hover .tool-card-arrow { transform: translateX(6px); }
.tool-card-link:hover .card { border-color: var(--gold); box-shadow: var(--shadow-gold); }

/* ── Hero Section ────────────────────────────────────────── */
.hero {
  min-height: 90vh;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  text-align: center;
  padding: var(--space-3xl) var(--space-lg);
  position: relative;
  overflow: hidden;
}
.hero-bg {
  position: absolute;
  inset: 0;
  background:
    radial-gradient(ellipse 800px 600px at 50% 0%, rgba(245,166,35,0.07), transparent),
    radial-gradient(ellipse 600px 400px at 80% 60%, rgba(0,201,167,0.05), transparent);
  pointer-events: none;
}
.hero-eyebrow {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  background: var(--bg-surface);
  border: 1px solid var(--border);
  border-radius: var(--r-full);
  padding: 6px 16px;
  font-size: 0.8rem;
  font-weight: 600;
  color: var(--text-secondary);
  letter-spacing: 0.06em;
  text-transform: uppercase;
  margin-bottom: var(--space-xl);
}
.hero-eyebrow span { color: var(--gold); }

/* ── Currency Orb ────────────────────────────────────────── */
.orb-wrap {
  position: relative;
  width: 160px;
  height: 160px;
  margin: var(--space-xl) auto;
  flex-shrink: 0;
}
.orb {
  width: 160px;
  height: 160px;
  border-radius: 50%;
  background: radial-gradient(circle at 35% 35%,
    rgba(245,166,35,0.6),
    rgba(245,166,35,0.15) 50%,
    rgba(8,8,15,0.9) 80%
  );
  box-shadow:
    0 0 60px rgba(245,166,35,0.3),
    0 0 120px rgba(245,166,35,0.15),
    inset 0 1px 0 rgba(255,255,255,0.15);
  display: flex;
  align-items: center;
  justify-content: center;
  animation: orb-float 4s ease-in-out infinite;
  position: relative;
  border: 1px solid rgba(245,166,35,0.3);
}
.orb-ring {
  position: absolute;
  inset: -12px;
  border-radius: 50%;
  border: 1px solid rgba(245,166,35,0.2);
  animation: orb-ring 4s ease-in-out infinite;
}
.orb-ring-2 {
  position: absolute;
  inset: -24px;
  border-radius: 50%;
  border: 1px solid rgba(245,166,35,0.1);
  animation: orb-ring 4s ease-in-out infinite 0.3s;
}
.orb-symbol {
  font-family: var(--font-mono);
  font-size: 3.5rem;
  font-weight: 600;
  color: var(--gold);
  transition: all 0.4s var(--ease-out);
  text-shadow: 0 0 30px var(--gold);
  line-height: 1;
}
@keyframes orb-float {
  0%, 100% { transform: translateY(0) rotateX(0deg); }
  50%       { transform: translateY(-12px) rotateX(3deg); }
}
@keyframes orb-ring {
  0%, 100% { transform: scale(1); opacity: 0.6; }
  50%       { transform: scale(1.05); opacity: 0.3; }
}

/* ── Grid BG dots ────────────────────────────────────────── */
.grid-bg {
  position: absolute;
  inset: 0;
  background-image:
    radial-gradient(circle, rgba(255,255,255,0.04) 1px, transparent 1px);
  background-size: 40px 40px;
  pointer-events: none;
}

/* ── Scroll Reveal ───────────────────────────────────────── */
.reveal {
  opacity: 0;
  transform: translateY(32px);
  transition: opacity 0.7s var(--ease-out), transform 0.7s var(--ease-out);
}
.reveal.visible {
  opacity: 1;
  transform: translateY(0);
}
.reveal-delay-1 { transition-delay: 0.1s; }
.reveal-delay-2 { transition-delay: 0.2s; }
.reveal-delay-3 { transition-delay: 0.3s; }
.reveal-delay-4 { transition-delay: 0.4s; }

/* ── Footer ──────────────────────────────────────────────── */
.site-footer {
  border-top: 1px solid var(--border);
  padding: var(--space-xl) 0 var(--space-lg);
  color: var(--text-muted);
}
.site-footer .container { display: grid; grid-template-columns: 1fr 1fr 1fr 1fr; gap: var(--space-xl); }
@media (max-width: 768px) {
  .site-footer .container { grid-template-columns: 1fr 1fr; gap: var(--space-lg); }
}
@media (max-width: 480px) {
  .site-footer .container { grid-template-columns: 1fr; }
}
.footer-col h4 { color: var(--text-primary); font-size: 0.9rem; font-weight: 600; margin-bottom: var(--space-md); }
.footer-col ul { display: flex; flex-direction: column; gap: 8px; }
.footer-col a { font-size: 0.85rem; color: var(--text-muted); transition: color var(--t-fast); }
.footer-col a:hover { color: var(--text-secondary); }
.footer-bottom {
  border-top: 1px solid var(--border);
  margin-top: var(--space-xl);
  padding-top: var(--space-md);
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: var(--space-sm);
  font-size: 0.8rem;
}
.footer-bottom a { color: var(--gold); }

/* ── Article Styles ──────────────────────────────────────── */
.article-hero {
  padding: var(--space-3xl) 0 var(--space-xl);
  border-bottom: 1px solid var(--border);
  margin-bottom: var(--space-xl);
}
.article-meta { display: flex; align-items: center; gap: var(--space-md); flex-wrap: wrap; margin-bottom: var(--space-md); }
.article-meta span { font-size: 0.8rem; color: var(--text-muted); }
.article-content { max-width: 720px; }
.article-content h2 { font-size: 1.5rem; font-weight: 700; margin: var(--space-xl) 0 var(--space-md); }
.article-content h3 { font-size: 1.15rem; font-weight: 600; margin: var(--space-lg) 0 var(--space-sm); color: var(--gold); }
.article-content p { color: var(--text-secondary); line-height: 1.8; margin-bottom: var(--space-md); }
.article-content ul, .article-content ol { color: var(--text-secondary); line-height: 1.8; margin-bottom: var(--space-md); padding-left: var(--space-lg); }
.article-content ul { list-style: disc; }
.article-content ol { list-style: decimal; }
.article-content li { margin-bottom: 6px; }
.article-content strong { color: var(--text-primary); }
.article-content .example-box {
  background: var(--bg-surface);
  border-left: 3px solid var(--gold);
  border-radius: 0 var(--r-md) var(--r-md) 0;
  padding: var(--space-lg);
  margin: var(--space-lg) 0;
}
.article-content .example-box h4 { color: var(--gold); font-size: 0.85rem; text-transform: uppercase; letter-spacing: 0.1em; margin-bottom: var(--space-sm); }
.article-content .faq-item { border-bottom: 1px solid var(--border); padding: var(--space-md) 0; }
.article-content .faq-q { font-weight: 600; color: var(--text-primary); margin-bottom: 6px; cursor: pointer; }
.article-content .faq-a { color: var(--text-secondary); font-size: 0.95rem; }
.article-sidebar { position: sticky; top: 90px; }
.article-layout { display: grid; grid-template-columns: 1fr 320px; gap: var(--space-xl); align-items: start; }
@media (max-width: 960px) { .article-layout { grid-template-columns: 1fr; } .article-sidebar { position: static; } }
.cta-box {
  background: linear-gradient(135deg, rgba(245,166,35,0.1), rgba(0,201,167,0.05));
  border: 1px solid var(--gold);
  border-radius: var(--r-lg);
  padding: var(--space-xl);
  text-align: center;
  margin: var(--space-xl) 0;
}
.cta-box h3 { font-size: 1.25rem; margin-bottom: var(--space-sm); }
.cta-box p  { color: var(--text-secondary); font-size: 0.9rem; margin-bottom: var(--space-lg); }

/* ── Utility ─────────────────────────────────────────────── */
.divider { height: 1px; background: var(--border); margin: var(--space-xl) 0; }
.pill { background: var(--bg-surface); border: 1px solid var(--border); border-radius: var(--r-full); padding: 4px 12px; font-size: 0.8rem; display: inline-block; }
.chip { background: var(--gold-glow); color: var(--gold); border-radius: var(--r-full); padding: 2px 8px; font-size: 0.75rem; font-weight: 600; display: inline-block; }
.mb-sm { margin-bottom: var(--space-sm); }
.mb-md { margin-bottom: var(--space-md); }
.mb-lg { margin-bottom: var(--space-lg); }
.mb-xl { margin-bottom: var(--space-xl); }
.mt-auto { margin-top: auto; }
.w-full { width: 100%; }
.hidden { display: none !important; }
.sr-only { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0,0,0,0); }

/* ── Article component aliases (unscoped) ────────────────── */
/* These make .example-box, .faq-item etc. work anywhere in articles */
.example-box {
  background: var(--bg-surface);
  border-left: 3px solid var(--gold);
  border-radius: 0 var(--r-md) var(--r-md) 0;
  padding: var(--space-lg);
  margin: var(--space-lg) 0;
  color: var(--text-secondary);
  line-height: 1.8;
}
.example-box h4 { color: var(--gold); font-size: 0.85rem; text-transform: uppercase; letter-spacing: 0.1em; margin-bottom: var(--space-sm); }
.example-box p  { color: var(--text-secondary); line-height: 1.8; margin-bottom: 8px; }
.example-box p:last-child { margin-bottom: 0; }
.example-box strong { color: var(--text-primary); }
.example-box ul { list-style: disc; padding-left: var(--space-lg); color: var(--text-secondary); }
.example-box ul li { margin-bottom: 4px; }
.example-box table { width: 100%; border-collapse: collapse; font-size: 0.88rem; }
.example-box th { font-size: 0.75rem; text-transform: uppercase; letter-spacing: 0.08em; color: var(--text-muted); text-align: left; padding: 8px 4px; border-bottom: 1px solid var(--border); }
.example-box td { padding: 7px 4px; border-bottom: 1px solid var(--border); vertical-align: top; }
.example-box tr:last-child td { border-bottom: none; }

.faq-item { border-bottom: 1px solid var(--border); padding: var(--space-md) 0; }
.faq-item:last-of-type { border-bottom: none; }
.faq-q { font-weight: 600; color: var(--text-primary); margin-bottom: 6px; font-size: 0.95rem; }
.faq-a { color: var(--text-secondary); font-size: 0.9rem; line-height: 1.7; }

.alert {
  border-radius: var(--r-md);
  padding: var(--space-md) var(--space-lg);
  font-size: 0.9rem;
  line-height: 1.7;
  border: 1px solid;
}
.alert strong { display: block; margin-bottom: 4px; }
.alert ul { list-style: disc; padding-left: var(--space-lg); margin-top: 4px; }
.alert ul li { margin-bottom: 4px; }
.alert--warning {
  background: rgba(245,166,35,0.08);
  border-color: rgba(245,166,35,0.35);
  color: var(--text-secondary);
}
.alert--warning strong { color: var(--gold); }
.alert--danger {
  background: var(--red-glow);
  border-color: var(--red);
  color: var(--text-secondary);
}

/* ── Typography extras ───────────────────────────────────── */
.t-lead {
  font-size: clamp(1.05rem, 2vw, 1.25rem);
  color: var(--text-secondary);
  line-height: 1.7;
}

/* ── Radius aliases ──────────────────────────────────────── */
:root {
  --radius-sm: var(--r-sm);
  --radius-md: var(--r-md);
  --radius-lg: var(--r-lg);
  --radius-xl: var(--r-xl);
}

/* ── Article-level prose defaults ────────────────────────── */
.article-content h2,
.article-layout h2:not(.t-h1):not(.t-h2) {
  font-size: 1.35rem;
  font-weight: 700;
  margin: var(--space-xl) 0 var(--space-md);
  color: var(--text-primary);
}
.article-content p,
.article-layout > .article-content > p {
  color: var(--text-secondary);
  line-height: 1.8;
  margin-bottom: var(--space-md);
}
.article-content ul,
.article-content ol {
  color: var(--text-secondary);
  line-height: 1.8;
  margin-bottom: var(--space-md);
  padding-left: var(--space-lg);
}
.article-content ul { list-style: disc; }
.article-content ol { list-style: decimal; }
.article-content li { margin-bottom: 6px; }
.article-content strong { color: var(--text-primary); }

/* ── Reduced Motion ──────────────────────────────────────── */
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after {
    animation-duration: 0.01ms !important;
    transition-duration: 0.01ms !important;
  }
  .reveal { opacity: 1; transform: none; }
}

/* ── Scrollbar ───────────────────────────────────────────── */
::-webkit-scrollbar { width: 6px; }
::-webkit-scrollbar-track { background: var(--bg-deep); }
::-webkit-scrollbar-thumb { background: var(--border-light); border-radius: 3px; }
::-webkit-scrollbar-thumb:hover { background: var(--text-muted); }

/* ── Number counter animation ────────────────────────────── */
.count-up { display: inline-block; }
