/* ==========================================================================
   base.css — Design tokens, reset, typography, layout foundations
   ========================================================================== */

/* ─── Design Tokens ───────────────────────────────────────────────────── */
:root {
  /* Colors */
  --bg:            #0a0a0f;
  --bg-card:       #111118;
  --bg-input:      #16161f;
  --bg-accent:     #1a1a25;
  --border:        rgba(255,255,255,0.08);
  --border-focus:  rgba(255,165,0,0.5);
  --text:          #f0f0f5;
  --text-muted:    #9e9eb8;
  --text-dim:      #7a7a90;
  --amber:         #f59e0b;
  --amber-light:   #fbbf24;
  --amber-dim:     rgba(245,158,11,0.15);
  --amber-glow:    rgba(245,158,11,0.08);
  --green:         #22c55e;
  --green-dim:     rgba(34,197,94,0.12);
  --red:           #ef4444;
  --red-dim:       rgba(239,68,68,0.12);
  --blue:          #60a5fa;
  --blue-dim:      rgba(96,165,250,0.12);

  /* Typography */
  --font-sans:     'Inter', system-ui, -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
  --font-mono:     'JetBrains Mono', 'Fira Code', 'Courier New', monospace;
  --text-xs:       0.75rem;
  --text-sm:       0.875rem;
  --text-base:     1rem;
  --text-lg:       1.125rem;
  --text-xl:       1.25rem;
  --text-2xl:      1.5rem;
  --text-3xl:      1.875rem;
  --text-4xl:      2.25rem;
  --text-5xl:      3rem;

  /* Spacing */
  --space-1:  0.25rem;
  --space-2:  0.5rem;
  --space-3:  0.75rem;
  --space-4:  1rem;
  --space-5:  1.25rem;
  --space-6:  1.5rem;
  --space-8:  2rem;
  --space-10: 2.5rem;
  --space-12: 3rem;
  --space-16: 4rem;
  --space-20: 5rem;

  /* Radius */
  --radius-sm: 0.375rem;
  --radius:    0.625rem;
  --radius-lg: 0.875rem;
  --radius-xl: 1.25rem;

  /* Shadows */
  --shadow-sm:    0 1px 3px rgba(0,0,0,0.4);
  --shadow:       0 4px 16px rgba(0,0,0,0.4);
  --shadow-lg:    0 8px 32px rgba(0,0,0,0.5);
  --shadow-amber: 0 0 20px rgba(245,158,11,0.1);

  /* Transitions */
  --transition: 150ms ease;
  --transition-slow: 250ms ease;

  /* Layout */
  --max-width: 1280px;
  --sidebar-w: 420px;
}

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

html {
  font-size: 16px;
  scroll-behavior: smooth;
  -webkit-text-size-adjust: 100%;
}

body {
  font-family: var(--font-sans);
  font-size: var(--text-base);
  line-height: 1.6;
  color: var(--text);
  background-color: var(--bg);
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  overflow-x: hidden !important;
}

img, svg { display: block; max-width: 100%; }
ul, ol { list-style: none; }
a { color: inherit; text-decoration: none; }
button { cursor: pointer; border: none; background: none; font: inherit; }
input, select, textarea { font: inherit; }

/* ─── Typography ────────────────────────────────────────────────────────── */
h1 { font-size: var(--text-3xl); font-weight: 600; line-height: 1.2; letter-spacing: -0.02em; }
h2 { font-size: var(--text-2xl); font-weight: 600; line-height: 1.3; }
h3 { font-size: var(--text-xl);  font-weight: 500; line-height: 1.4; }
h4 { font-size: var(--text-lg);  font-weight: 500; line-height: 1.4; }
h5 { font-size: var(--text-base);font-weight: 500; line-height: 1.5; }

p { line-height: 1.7; }

.text-xs    { font-size: var(--text-xs); }
.text-sm    { font-size: var(--text-sm); }
.text-base  { font-size: var(--text-base); }
.text-lg    { font-size: var(--text-lg); }
.text-xl    { font-size: var(--text-xl); }
.text-2xl   { font-size: var(--text-2xl); }
.text-3xl   { font-size: var(--text-3xl); }
.text-4xl   { font-size: var(--text-4xl); }
.text-5xl   { font-size: var(--text-5xl); }

.text-muted { color: var(--text-muted); }
.text-dim   { color: var(--text-dim); }
.text-amber { color: var(--amber); }
.text-green { color: var(--green); }
.text-red   { color: var(--red); }
.font-mono  { font-family: var(--font-mono); }
.font-medium { font-weight: 500; }
.font-semibold { font-weight: 600; }
.font-bold   { font-weight: 700; }
.uppercase  { text-transform: uppercase; letter-spacing: 0.08em; }

/* ─── Layout Utilities ───────────────────────────────────────────────────── */
.container  { width: 100%; max-width: var(--max-width); margin: 0 auto; padding: 0 var(--space-6); }
.sr-only    { position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px; overflow: hidden; clip: rect(0,0,0,0); border: 0; }

.flex       { display: flex; }
.flex-col   { flex-direction: column; }
.items-center { align-items: center; }
.justify-between { justify-content: space-between; }
.justify-center  { justify-content: center; }
.gap-1 { gap: var(--space-1); }
.gap-2 { gap: var(--space-2); }
.gap-3 { gap: var(--space-3); }
.gap-4 { gap: var(--space-4); }
.gap-6 { gap: var(--space-6); }
.gap-8 { gap: var(--space-8); }

.grid { display: grid; }
.grid-cols-2 { grid-template-columns: repeat(2, 1fr); }
.grid-cols-3 { grid-template-columns: repeat(3, 1fr); }

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

/* ─── Scrollbar ─────────────────────────────────────────────────────────── */
::-webkit-scrollbar { width: 8px; height: 8px; }
::-webkit-scrollbar-track { background: transparent; }
::-webkit-scrollbar-thumb {
  background: rgba(255,255,255,0.1);
  border-radius: 4px;
  border: 2px solid transparent;
  background-clip: content-box;
}
::-webkit-scrollbar-thumb:hover {
  background: var(--border);
  border: 2px solid transparent;
  background-clip: content-box;
}

/* ─── Reduced Motion ────────────────────────────────────────────────────── */
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation-duration: 0.01ms !important; transition-duration: 0.01ms !important; }
}
/* ==========================================================================
   components.css — Reusable UI components
   ========================================================================== */

/* ─── Site Header ───────────────────────────────────────────────────── */
.site-header {
  position: sticky;
  top: 0;
  z-index: 1000;
  background: rgba(10,10,15,0.95);
  backdrop-filter: blur(12px);
  border-bottom: 1px solid var(--border);
  height: 56px;
  display: flex;
  align-items: center;
}
.site-header .container {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: var(--space-4);
}
.site-logo {
  font-family: var(--font-mono);
  font-size: var(--text-sm);
  font-weight: 600;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--text);
  display: flex;
  align-items: center;
  gap: var(--space-2);
  flex-shrink: 0;
}
.site-logo .logo-icon { color: var(--amber); }
.site-nav {
  display: flex;
  align-items: center;
  gap: var(--space-1);
}
.nav-link {
  font-size: var(--text-sm);
  color: var(--text-muted);
  padding: var(--space-2) var(--space-3);
  border-radius: var(--radius-sm);
  transition: color var(--transition), background var(--transition);
}
.nav-link:hover, .nav-link.active {
  color: var(--text);
  background: var(--bg-accent);
}
.lang-switcher {
  display: flex;
  align-items: center;
  gap: var(--space-1);
  margin-left: var(--space-4);
  padding-left: var(--space-4);
  border-left: 1px solid var(--border);
}
.lang-link {
  font-size: var(--text-xs);
  font-weight: 500;
  color: var(--text-dim);
  padding: var(--space-1) var(--space-2);
  border-radius: var(--radius-sm);
  text-transform: uppercase;
  letter-spacing: 0.06em;
  transition: color var(--transition), background var(--transition);
}
.lang-link:hover, .lang-link.active {
  color: var(--amber);
  background: var(--amber-dim);
}
.mobile-menu-btn {
  display: none;
  color: var(--text-muted);
  padding: var(--space-2);
  flex-shrink: 0;
  z-index: 1100;
  position: relative;
}

/* ─── Site Footer ───────────────────────────────────────────────────── */
.site-footer {
  border-top: 1px solid var(--border);
  padding: var(--space-10) 0 var(--space-8);
  margin-top: var(--space-16);
}
.footer-grid {
  display: grid;
  grid-template-columns: 1fr auto;
  gap: var(--space-8);
  align-items: start;
  margin-bottom: var(--space-8);
}
.footer-brand .site-logo { margin-bottom: var(--space-3); }
.footer-disclaimer {
  font-size: var(--text-sm);
  color: var(--text-dim);
  max-width: 32ch;
}
.footer-links {
  display: flex;
  gap: var(--space-6);
  flex-wrap: wrap;
}
.footer-links a {
  font-size: var(--text-sm);
  color: var(--text-muted);
  transition: color var(--transition);
}
.footer-links a:hover { color: var(--text); }
.footer-bottom {
  border-top: 1px solid var(--border);
  padding-top: var(--space-6);
  display: flex;
  justify-content: space-between;
  align-items: center;
  flex-wrap: wrap;
  gap: var(--space-3);
}
.footer-copyright {
  font-size: var(--text-xs);
  color: var(--text-dim);
}

/* ─── Buttons ────────────────────────────────────────────────────────────── */
.btn {
  display: inline-flex;
  align-items: center;
  gap: var(--space-2);
  padding: var(--space-3) var(--space-5);
  border-radius: var(--radius);
  font-size: var(--text-sm);
  font-weight: 500;
  line-height: 1;
  transition: all var(--transition);
  white-space: nowrap;
}
.btn:focus-visible { outline: 2px solid var(--amber); outline-offset: 2px; }

.btn-primary {
  background: var(--amber);
  color: #000;
  box-shadow: 0 0 0 0 var(--amber);
}
.btn-primary:hover {
  background: var(--amber-light);
  box-shadow: 0 0 16px var(--amber-dim);
}

.btn-secondary {
  background: var(--bg-accent);
  color: var(--text);
  border: 1px solid var(--border);
}
.btn-secondary:hover {
  border-color: var(--amber);
  color: var(--amber);
}

.btn-ghost {
  color: var(--text-muted);
  padding: var(--space-2) var(--space-3);
}
.btn-ghost:hover { color: var(--text); background: var(--bg-accent); }

.btn-sm { padding: var(--space-2) var(--space-3); font-size: var(--text-xs); }
.btn-lg { padding: var(--space-4) var(--space-8); font-size: var(--text-base); }

/* ─── Mode Switch (Basic / Advanced) ───────────────────────────────── */
.mode-switch {
  display: inline-flex;
  background: var(--bg-input);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 3px;
  gap: 2px;
}
.mode-tab {
  padding: var(--space-2) var(--space-4);
  border-radius: calc(var(--radius) - 2px);
  font-size: var(--text-sm);
  font-weight: 500;
  color: var(--text-muted);
  transition: all var(--transition);
}
.mode-tab.active {
  background: var(--amber);
  color: #000;
  box-shadow: var(--shadow-sm);
  font-weight: 600;
}
.mode-tab:hover:not(.active) { color: var(--text); }

/* ─── Scenario Tabs ───────────────────────────────────────────────────── */
.scenario-tabs {
  display: flex;
  gap: var(--space-2);
}
.scenario-tab {
  flex: 1;
  padding: var(--space-2) var(--space-3);
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  font-size: var(--text-xs);
  font-weight: 500;
  text-align: center;
  color: var(--text-muted);
  transition: all var(--transition);
  text-transform: uppercase;
  letter-spacing: 0.06em;
}
.scenario-tab:hover { border-color: var(--amber); color: var(--amber); }
.scenario-tab.active[data-scenario="bear"] { border-color: var(--red); color: var(--red); background: var(--red-dim); }
.scenario-tab.active[data-scenario="base"] { border-color: var(--amber); color: var(--amber); background: var(--amber-dim); }
.scenario-tab.active[data-scenario="bull"] { border-color: var(--green); color: var(--green); background: var(--green-dim); }

/* ─── Form Inputs ─────────────────────────────────────────────────────── */
.field {
  display: flex;
  flex-direction: column;
  gap: var(--space-2);
}
.field-label {
  display: flex;
  align-items: center;
  gap: var(--space-2);
  font-size: var(--text-sm);
  font-weight: 500;
  color: var(--text);
}
.field-label .icon { color: var(--text-dim); width: 14px; height: 14px; flex-shrink: 0; }
.field-hint {
  font-size: var(--text-xs);
  color: var(--text-dim);
  line-height: 1.5;
}
.field-required {
  font-size: var(--text-xs);
  color: var(--amber);
  font-weight: 600;
}

.input {
  width: 100%;
  padding: var(--space-3) var(--space-4);
  background: var(--bg-input);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  color: var(--text);
  font-size: var(--text-sm);
  transition: border-color var(--transition), box-shadow var(--transition);
  appearance: none;
  box-sizing: border-box;
  max-width: 100%;
}
.input::placeholder { color: var(--text-dim); }
.input:focus {
  outline: none;
  border-color: var(--amber);
  box-shadow: 0 0 0 3px var(--amber-glow);
}
.input::-webkit-inner-spin-button,
.input::-webkit-outer-spin-button { opacity: 0.5; }

.input-with-prefix {
  position: relative;
}
.input-with-prefix .prefix {
  position: absolute;
  left: var(--space-3);
  top: 50%;
  transform: translateY(-50%);
  color: var(--text-muted);
  font-size: var(--text-sm);
  pointer-events: none;
}
.input-with-prefix .input { padding-left: var(--space-7); }
.input-with-prefix .input { padding-left: 1.75rem; }

/* Slider */
.slider-wrap { display: flex; flex-direction: column; gap: var(--space-2); }
.slider-row   { display: flex; align-items: center; gap: var(--space-3); }
.slider {
  flex: 1;
  min-width: 0;
  -webkit-appearance: none;
  height: 4px;
  border-radius: 2px;
  background: var(--bg-accent);
  outline: none;
  cursor: pointer;
}
.slider::-webkit-slider-thumb {
  -webkit-appearance: none;
  width: 16px;
  height: 16px;
  border-radius: 50%;
  background: var(--amber);
  cursor: pointer;
  transition: box-shadow var(--transition);
}
.slider::-webkit-slider-thumb:hover { box-shadow: 0 0 0 4px var(--amber-dim); }
.slider:focus::-webkit-slider-thumb  { box-shadow: 0 0 0 4px var(--amber-dim); }
.slider-val {
  font-size: var(--text-sm);
  font-family: var(--font-mono);
  color: var(--amber);
  min-width: 3.5rem;
  text-align: right;
}

/* Stepper */
.stepper {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: var(--space-2);
  background: var(--bg-input);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: var(--space-1) var(--space-2);
}
.stepper-btn {
  width: 28px;
  height: 28px;
  border-radius: var(--radius-sm);
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--text-muted);
  transition: all var(--transition);
  flex-shrink: 0;
}
.stepper-btn:hover { color: var(--amber); background: var(--amber-dim); }
.stepper-val {
  font-size: var(--text-sm);
  font-family: var(--font-mono);
  color: var(--text);
  min-width: 2rem;
  text-align: center;
  background: none;
  border: none;
  outline: none;
  -moz-appearance: textfield;
}
.stepper-val::-webkit-inner-spin-button { display: none; }

/* Toggle reveal */
.toggle-reveal-trigger {
  display: flex;
  align-items: center;
  gap: var(--space-2);
  font-size: var(--text-xs);
  color: var(--text-dim);
  cursor: pointer;
  transition: color var(--transition);
  user-select: none;
}
.toggle-reveal-trigger:hover { color: var(--amber); }
.toggle-reveal-content { display: none; }
.toggle-reveal-content.open { display: flex; flex-direction: column; gap: var(--space-3); }

/* ─── Cards ────────────────────────────────────────────────────────────────── */
.card {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: var(--space-6);
}
.card-sm { padding: var(--space-4); }
.card-lg { padding: var(--space-8); }

/* ─── Accordion Sections ─────────────────────────────────────────────── */
.accordion {
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  overflow: hidden;
}
.accordion + .accordion { margin-top: var(--space-3); }
.accordion-trigger {
  width: 100%;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: var(--space-5) var(--space-6);
  background: var(--bg-card);
  text-align: left;
  transition: background var(--transition);
}
.accordion-trigger:hover { background: var(--bg-accent); }
.accordion-trigger[aria-expanded="true"] { background: var(--bg-accent); }
.accordion-title {
  display: flex;
  align-items: center;
  gap: var(--space-3);
}
.accordion-title-text {
  font-size: var(--text-sm);
  font-weight: 600;
  color: var(--text);
  text-transform: uppercase;
  letter-spacing: 0.06em;
}
.accordion-title-desc {
  font-size: var(--text-xs);
  color: var(--text-dim);
  font-weight: 400;
  text-transform: none;
  letter-spacing: 0;
}
.accordion-icon { color: var(--text-dim); transition: transform var(--transition); flex-shrink: 0; }
.accordion-trigger[aria-expanded="true"] .accordion-icon { transform: rotate(180deg); }
.accordion-content {
  display: none;
  padding: var(--space-5) var(--space-6);
  border-top: 1px solid var(--border);
  background: var(--bg);
}
.accordion-content.open {
  display: flex;
  flex-direction: column;
  gap: var(--space-5);
}

/* ─── Metric Cards ────────────────────────────────────────────────────── */
.metric-card {
  background: var(--bg-accent);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: var(--space-4) var(--space-5);
  display: flex;
  flex-direction: column;
  gap: var(--space-1);
}
.metric-label {
  font-size: var(--text-xs);
  color: var(--text-dim);
  text-transform: uppercase;
  letter-spacing: 0.08em;
  font-weight: 500;
}
.metric-value {
  font-size: var(--text-xl);
  font-weight: 600;
  font-family: var(--font-mono);
  color: var(--text);
  line-height: 1.2;
}
.metric-sub {
  font-size: var(--text-xs);
  color: var(--text-muted);
}
.metric-value.positive { color: var(--green); }
.metric-value.negative { color: var(--red); }
.metric-value.amber    { color: var(--amber); }

/* ─── Risk Badges ─────────────────────────────────────────────────────── */
.risk-badge {
  display: inline-flex;
  align-items: center;
  gap: var(--space-1);
  padding: var(--space-1) var(--space-2);
  border-radius: var(--radius-sm);
  font-size: var(--text-xs);
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.06em;
}
.risk-low    { background: var(--green-dim); color: var(--green); }
.risk-medium { background: var(--amber-dim); color: var(--amber); }
.risk-high   { background: var(--red-dim);   color: var(--red); }

.risk-row {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: var(--space-4);
  padding: var(--space-4) 0;
  border-bottom: 1px solid var(--border);
}
.risk-row:last-child { border-bottom: none; }
.risk-info { flex: 1; }
.risk-title { font-size: var(--text-sm); font-weight: 500; color: var(--text); }
.risk-desc  { font-size: var(--text-xs); color: var(--text-dim); margin-top: 2px; }

/* ─── Hero Result ────────────────────────────────────────────────────── */
.result-hero {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius-xl);
  padding: var(--space-8);
  text-align: center;
  position: relative;
  overflow: hidden;
}
.result-hero::before {
  content: '';
  position: absolute;
  top: 0; left: 50%;
  transform: translateX(-50%);
  width: 200px; height: 1px;
  background: linear-gradient(90deg, transparent, var(--amber), transparent);
  opacity: 0.6;
}
.result-live-badge {
  display: inline-flex;
  align-items: center;
  gap: var(--space-1);
  font-size: var(--text-xs);
  font-weight: 600;
  color: var(--amber);
  text-transform: uppercase;
  letter-spacing: 0.1em;
  margin-bottom: var(--space-4);
}
.result-main-value {
  font-size: var(--text-5xl);
  font-weight: 700;
  font-family: var(--font-mono);
  color: var(--text);
  line-height: 1;
  letter-spacing: -0.03em;
  margin-bottom: var(--space-2);
}
.result-token-count {
  font-size: var(--text-xl);
  font-family: var(--font-sans);
  color: var(--text-muted);
  margin-bottom: var(--space-3);
  font-weight: 600;
}
.result-scenario-label {
  display: inline-flex;
  align-items: center;
  gap: var(--space-2);
  font-size: var(--text-sm);
  color: var(--text-muted);
  background: var(--bg-accent);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: var(--space-2) var(--space-4);
  margin-bottom: var(--space-4);
}
.result-actions {
  display: flex;
  gap: var(--space-3);
  justify-content: center;
  margin-top: var(--space-4);
}

/* ─── Scenario Comparison Table ─────────────────────────────────────────── */
.scenario-table {
  width: 100%;
  border-collapse: collapse;
  font-size: var(--text-sm);
}
.scenario-table th {
  padding: var(--space-2) var(--space-3);
  text-align: left;
  font-size: var(--text-xs);
  font-weight: 600;
  color: var(--text-dim);
  text-transform: uppercase;
  letter-spacing: 0.06em;
  border-bottom: 1px solid var(--border);
}
.scenario-table td {
  padding: var(--space-3) var(--space-3);
  border-bottom: 1px solid var(--border);
  font-family: var(--font-mono);
  color: var(--text-muted);
}
.scenario-table tr:last-child td { border-bottom: none; }
.scenario-table .bear { color: var(--red); }
.scenario-table .bull { color: var(--green); }
.scenario-table .base { color: var(--amber); }

/* ─── Release Schedule ─────────────────────────────────────────────────── */
.release-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: var(--space-3);
}
.release-item {
  background: var(--bg-accent);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: var(--space-4);
  text-align: center;
}
.release-label {
  font-size: var(--text-xs);
  color: var(--text-dim);
  text-transform: uppercase;
  letter-spacing: 0.07em;
  margin-bottom: var(--space-2);
}
.release-value {
  font-size: var(--text-base);
  font-weight: 600;
  font-family: var(--font-mono);
  color: var(--text);
}
.release-sub {
  font-size: var(--text-xs);
  color: var(--text-dim);
  margin-top: var(--space-1);
}

/* ─── Explanation block ───────────────────────────────────────────────── */
.explanation-block {
  background: var(--bg-accent);
  border: 1px solid var(--border);
  border-left: 3px solid var(--amber);
  border-radius: 0 var(--radius) var(--radius) 0;
  padding: var(--space-4) var(--space-5);
  font-size: var(--text-sm);
  color: var(--text-muted);
  line-height: 1.7;
}

/* ─── Section headers inside forms ─────────────────────────────────────── */
.section-block {
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  overflow: hidden;
}
.section-header {
  display: flex;
  align-items: flex-start;
  gap: var(--space-3);
  padding: var(--space-5) var(--space-6);
  background: var(--bg-card);
  border-bottom: 1px solid var(--border);
}
.section-icon { color: var(--amber); margin-top: 2px; flex-shrink: 0; }
.section-title { font-size: var(--text-sm); font-weight: 600; color: var(--text); text-transform: uppercase; letter-spacing: 0.06em; }
.section-desc  { font-size: var(--text-xs); color: var(--text-dim); margin-top: 2px; }
.section-body {
  padding: var(--space-5) var(--space-6);
  background: var(--bg);
  display: flex;
  flex-direction: column;
  gap: var(--space-5);
}

/* ─── Tooltip ─────────────────────────────────────────────────────────────── */
[data-tooltip] { position: relative; }
[data-tooltip]:hover::after {
  content: attr(data-tooltip);
  position: absolute;
  bottom: calc(100% + 8px);
  left: 50%;
  transform: translateX(-50%);
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  padding: var(--space-2) var(--space-3);
  font-size: var(--text-xs);
  color: var(--text-muted);
  white-space: nowrap;
  max-width: 240px;
  white-space: normal;
  z-index: 200;
  box-shadow: var(--shadow);
  pointer-events: none;
}

/* ─── FAQ Accordion ────────────────────────────────────────────────────── */
.faq-item {
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  overflow: hidden;
}
.faq-item + .faq-item { margin-top: var(--space-3); }
.faq-question {
  width: 100%;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: var(--space-4);
  padding: var(--space-5) var(--space-6);
  background: var(--bg-card);
  text-align: left;
  font-size: var(--text-base);
  font-weight: 500;
  color: var(--text);
  transition: background var(--transition);
}
.faq-question:hover { background: var(--bg-accent); }
.faq-question[aria-expanded="true"] { background: var(--bg-accent); color: var(--amber); }
.faq-chevron { color: var(--text-dim); flex-shrink: 0; transition: transform var(--transition); }
.faq-question[aria-expanded="true"] .faq-chevron { transform: rotate(180deg); color: var(--amber); }
.faq-answer {
  display: none;
  padding: var(--space-5) var(--space-6);
  border-top: 1px solid var(--border);
  background: var(--bg);
  font-size: var(--text-sm);
  color: var(--text-muted);
  line-height: 1.7;
}
.faq-answer.open { display: block; }

/* ─── Assumptions list ───────────────────────────────────────────────────── */
.assumption-list {
  display: flex;
  flex-direction: column;
  gap: var(--space-3);
}
.assumption-item {
  display: flex;
  gap: var(--space-3);
  font-size: var(--text-sm);
  color: var(--text-muted);
  line-height: 1.6;
}
.assumption-item::before {
  content: '▪';
  color: var(--amber);
  flex-shrink: 0;
  margin-top: 2px;
}

/* ─── Info icon button ────────────────────────────────────────────────────── */
.info-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 18px; height: 18px;
  border-radius: 50%;
  background: var(--bg-accent);
  border: 1px solid var(--border);
  color: var(--text-dim);
  cursor: help;
  flex-shrink: 0;
}
.info-btn:hover { border-color: var(--amber); color: var(--amber); }

/* ─── Percentage Emphasis ─────────────────────────────────────────────── */
.pct-emphasis {
  display: inline-flex;
  align-items: baseline;
  gap: var(--space-2);
  font-size: var(--text-sm);
  color: var(--text-muted);
}
.pct-emphasis .pct-value {
  font-size: var(--text-lg);
  font-weight: 700;
  font-family: var(--font-mono);
  color: var(--amber);
}

/* ─── Divider ───────────────────────────────────────────────────────────── */
.divider {
  height: 1px;
  background: var(--border);
  margin: var(--space-4) 0;
}

/* ─── Back To Top Button ───────────────────────────────────────────────── */
#back-to-top {
  position: fixed;
  bottom: 24px;
  right: 20px;
  width: 44px;
  height: 44px;
  padding: 4px;
  border-radius: 50%;
  background: var(--amber);
  color: var(--bg);
  display: flex;
  align-items: center;
  justify-content: center;
  box-shadow: 0 4px 16px rgba(0,0,0,0.35);
  cursor: pointer;
  z-index: 900;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.25s ease, transform 0.25s ease;
  transform: translateY(8px);
  border: none;
}
#back-to-top.visible {
  opacity: 1;
  pointer-events: auto;
  transform: translateY(0);
}
#back-to-top:hover {
  background: var(--amber-light, #fbbf24);
  box-shadow: 0 0 20px var(--amber-dim);
}
#back-to-top:focus-visible {
  outline: 2px solid var(--amber);
  outline-offset: 3px;
}

/* ─── Responsive Nav ───────────────────────────────────────────────────── */
@media (max-width: 768px) {
  .mobile-menu-btn { display: flex; }
  .site-nav {
    display: none;
    position: fixed;
    top: 56px;
    left: 0;
    right: 0;
    bottom: 0;
    background: var(--bg);
    flex-direction: column;
    padding: var(--space-6);
    gap: var(--space-2);
    z-index: 1050;
    overflow-y: auto;
  }
  .site-nav.open { display: flex; height: 240px; }
  .nav-link { font-size: var(--text-base); padding: var(--space-3) var(--space-4); }
  .lang-switcher { border-left: none; padding-left: 0; margin-left: 0; margin-top: var(--space-4); padding-top: var(--space-4); border-top: 1px solid var(--border); }

  /* Fix 4: Logo left-aligned on mobile */
  .site-header .container {
    justify-content: space-between;
  }
  .site-logo {
    margin-right: auto;
  }

  /* Fix 3: Footer left-aligned on mobile */
  .footer-grid {
    grid-template-columns: 1fr;
  }
  .footer-brand,
  .footer-brand .site-logo,
  .footer-disclaimer,
  .footer-links,
  .footer-links a,
  .footer-bottom,
  .footer-copyright {
    text-align: left;
    justify-content: flex-start;
  }
  .footer-links {
    flex-direction: column;
    gap: var(--space-2);
    align-items: flex-start;
  }
  .footer-bottom {
    flex-direction: column;
    align-items: flex-start;
    gap: var(--space-3);
  }
  /* Language picker above copyright on mobile */
  .footer-bottom .lang-switcher {
    order: -1;
    border-left: none;
    padding-left: 0;
    margin-left: 0;
    border-top: none;
    margin-top: 0;
    padding-top: 0;
  }
}
/* ==========================================================================
   pages.css — Page-specific layouts and content styles
   ========================================================================== */

/* ─── Home Hero ──────────────────────────────────────────────────────── */
.hero {
  padding: var(--space-20) 0 var(--space-16);
  text-align: center;
  position: relative;
}
.hero::before {
  content: '';
  position: absolute;
  top: 0; left: 50%; transform: translateX(-50%);
  width: 100%; max-width: 600px; height: 1px;
  background: linear-gradient(90deg, transparent, var(--amber), transparent);
  opacity: 0.4;
}
.hero-eyebrow {
  display: inline-flex;
  align-items: center;
  gap: var(--space-2);
  font-size: var(--text-xs);
  font-weight: 600;
  color: var(--amber);
  text-transform: uppercase;
  letter-spacing: 0.12em;
  background: var(--amber-dim);
  border: 1px solid rgba(245,158,11,0.25);
  border-radius: 9999px;
  padding: var(--space-2) var(--space-4);
  margin-bottom: var(--space-6);
}
.hero h1 {
  font-size: clamp(2rem, 5vw, 3.5rem);
  font-weight: 700;
  line-height: 1.1;
  letter-spacing: -0.03em;
  color: var(--text);
  max-width: 18ch;
  margin: 0 auto var(--space-6);
}
.hero-sub {
  font-size: var(--text-lg);
  color: var(--text-muted);
  max-width: 52ch;
  margin: 0 auto var(--space-8);
  line-height: 1.7;
}
.hero-cta {
  display: flex;
  gap: var(--space-3);
  justify-content: center;
  flex-wrap: wrap;
}

/* ─── Calculator Workspace ─────────────────────────────────────────────── */
.calc-workspace {
  display: grid;
  grid-template-columns: var(--sidebar-w) 1fr;
  gap: var(--space-6);
  align-items: start;
  padding: var(--space-2) 0 var(--space-16);
}
.calc-panel {
  position: sticky;
  top: calc(56px + var(--space-4));
  max-height: calc(100vh - 80px);
  overflow-y: auto;
  display: flex;
  flex-direction: column;
  gap: var(--space-4);
  scrollbar-width: thin;
  scrollbar-color: var(--border) transparent;
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius-xl);
  padding: var(--space-3);
}
.calc-panel::-webkit-scrollbar { width: 8px; }
.calc-panel::-webkit-scrollbar-track {
  background: rgba(255,255,255,0.02);
  border-radius: 4px;
}
.calc-panel::-webkit-scrollbar-thumb {
  background: rgba(255,255,255,0.12);
  border-radius: 4px;
  border: 2px solid transparent;
  background-clip: content-box;
  transition: background 0.2s;
}
.calc-panel::-webkit-scrollbar-thumb:hover {
  background: rgba(245,158,11,0.35);
  border: 2px solid transparent;
  background-clip: content-box;
}
.calc-results {
  display: flex;
  flex-direction: column;
  gap: var(--space-6);
  overflow-x: hidden !important;
}

/* Calculator toolbar */
.calc-toolbar {
  display: flex;
  align-items: center;
  /* justify-content: space-between; */
  flex-wrap: wrap;
  gap: var(--space-3);
  margin-bottom: var(--space-4);
}
.calc-actions {
  display: flex;
  align-items: center;
  gap: var(--space-3);
}

/* ─── Content Sections (Home supporting content) ───────────────────────── */
.content-section {
  padding: var(--space-16) 0;
  border-top: 1px solid var(--border);
}
.content-section:first-child { border-top: none; }

.section-label {
  display: inline-block;
  font-size: var(--text-xs);
  font-weight: 600;
  color: var(--amber);
  text-transform: uppercase;
  letter-spacing: 0.1em;
  margin-bottom: var(--space-3);
}
.section-heading {
  font-size: clamp(1.5rem, 3vw, 2.25rem);
  font-weight: 600;
  color: var(--text);
  line-height: 1.2;
  margin-bottom: var(--space-4);
}
.section-body {
  font-size: var(--text-base);
  color: var(--text-muted);
  line-height: 1.7;
  max-width: 60ch;
}

/* ─── Combined Section (What It Does + Who It's For) ───────────── */
.combined-section {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: var(--space-6);
  margin-top: var(--space-6);
}
.combined-card {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: var(--space-8);
}
.combined-card h3 {
  font-size: var(--text-lg);
  font-weight: 600;
  color: var(--text);
  margin-bottom: var(--space-4);
  display: flex;
  align-items: center;
  gap: var(--space-3);
}
.combined-card h3 svg { color: var(--amber); flex-shrink: 0; }

/* ─── Tip Card Layout ───────────────────────────────────────── */
.tip-card-layout {
  display: flex;
  gap: var(--space-6);
  align-items: flex-start;
}
.tip-card-qr {
  flex-shrink: 0;
  width: 120px;
  height: 120px;
  border-radius: var(--radius);
  border: 1px solid var(--border);
  overflow: hidden;
  /* background: #fff; */
  padding: 4px;
}
.tip-card-qr img {
  width: 100%;
  height: 100%;
  object-fit: contain;
}
.tip-card-body { flex: 1; min-width: 0; }
.tip-wallet-label {
  font-size: var(--text-xs);
  font-weight: 600;
  color: var(--text-muted);
  text-transform: uppercase;
  letter-spacing: 0.08em;
  margin-bottom: var(--space-2);
}

/* ─── Logo Image ───────────────────────────────────────────── */
.site-logo .logo-img {
  height: 24px;
  width: auto;
  display: inline-block;
  vertical-align: middle;
  max-width: 100%;
}
.footer-brand .logo-img {
  height: 20px;
  width: auto;
  max-width: 100%;
}

.two-col-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: var(--space-12);
  align-items: start;
}

/* Who it's for list */
.who-for-list {
  display: flex;
  flex-direction: column;
  gap: var(--space-3);
  margin-top: var(--space-6);
}
.who-for-item {
  display: flex;
  align-items: flex-start;
  gap: var(--space-3);
  font-size: var(--text-sm);
  color: var(--text-muted);
  line-height: 1.6;
}
.who-for-item .icon { color: var(--amber); flex-shrink: 0; margin-top: 2px; }

/* Why matters grid */
.why-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: var(--space-4);
  margin-top: var(--space-6);
}
.why-item {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: var(--space-5);
}
.why-term {
  font-size: var(--text-sm);
  font-weight: 600;
  color: var(--amber);
  margin-bottom: var(--space-2);
  font-family: var(--font-mono);
}
.why-desc {
  font-size: var(--text-sm);
  color: var(--text-muted);
  line-height: 1.6;
}

/* Mode cards */
.mode-cards {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: var(--space-4);
  margin-top: var(--space-6);
}
.mode-card {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: var(--space-6);
}
.mode-card-title {
  font-size: var(--text-base);
  font-weight: 600;
  color: var(--text);
  margin-bottom: var(--space-3);
  display: flex;
  align-items: center;
  gap: var(--space-2);
}
.mode-card-body {
  font-size: var(--text-sm);
  color: var(--text-muted);
  line-height: 1.6;
}

/* CTA Section */
.cta-section {
  padding: var(--space-16) 0;
  text-align: center;
  border-top: 1px solid var(--border);
}
.cta-section h2 { margin-bottom: var(--space-4); }
.cta-section p { color: var(--text-muted); max-width: 50ch; margin: 0 auto var(--space-8); }

/* ─── How It Works Steps ───────────────────────────────────────────────── */
.steps-list {
  display: flex;
  flex-direction: column;
  gap: var(--space-6);
  margin-top: var(--space-8);
}
.step-item {
  display: grid;
  grid-template-columns: 48px 1fr;
  gap: var(--space-6);
  align-items: start;
}
.step-number {
  font-family: var(--font-mono);
  font-size: var(--text-2xl);
  font-weight: 700;
  color: var(--amber);
  opacity: 0.4;
  line-height: 1;
  padding-top: 4px;
}
.step-content h3 { font-size: var(--text-lg); margin-bottom: var(--space-2); }
.step-content p { font-size: var(--text-sm); color: var(--text-muted); line-height: 1.7; }
.step-example {
  margin-top: var(--space-3);
  background: var(--bg-accent);
  border: 1px solid var(--border);
  border-left: 3px solid var(--amber);
  border-radius: 0 var(--radius-sm) var(--radius-sm) 0;
  padding: var(--space-3) var(--space-4);
  font-size: var(--text-sm);
  font-family: var(--font-mono);
  color: var(--text-muted);
}

/* Glossary */
.glossary-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: var(--space-4);
  margin-top: var(--space-6);
}
.glossary-item {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: var(--space-4) var(--space-5);
}
.glossary-term {
  font-family: var(--font-mono);
  font-size: var(--text-sm);
  font-weight: 600;
  color: var(--amber);
  margin-bottom: var(--space-2);
}
.glossary-def {
  font-size: var(--text-sm);
  color: var(--text-muted);
  line-height: 1.6;
}

/* ─── Inner page hero ─────────────────────────────────────────────────── */
.page-hero {
  padding: var(--space-16) 0 var(--space-12);
  border-bottom: 1px solid var(--border);
}
.page-hero .section-label { display: block; margin-bottom: var(--space-3); }
.page-hero h1 { margin-bottom: var(--space-4); }
.page-hero p { font-size: var(--text-lg); color: var(--text-muted); max-width: 60ch; }

/* Inner page body */
.page-body {
  padding: var(--space-12) 0 var(--space-16);
}
.page-content { max-width: 720px; }
.page-section {
  margin-bottom: var(--space-10);
}
.page-section h2 { font-size: var(--text-xl); margin-bottom: var(--space-3); }
.page-section p { font-size: var(--text-sm); color: var(--text-muted); line-height: 1.7; }

/* Back link */
.back-link {
  display: inline-flex;
  align-items: center;
  gap: var(--space-2);
  font-size: var(--text-sm);
  color: var(--text-muted);
  margin-bottom: var(--space-8);
  transition: color var(--transition);
}
.back-link:hover { color: var(--amber); }

/* ─── Responsive ──────────────────────────────────────────────────────────── */
@media (max-width: 1024px) {
  .calc-workspace { grid-template-columns: 1fr; }
  .calc-panel { position: static; max-height: none; overflow-y: visible; }
  .two-col-grid { grid-template-columns: 1fr; gap: var(--space-8); }
  .why-grid { grid-template-columns: repeat(2, 1fr); }
}

@media (max-width: 768px) {
  .hero { padding: var(--space-12) 0 var(--space-10); }
  .hero h1 { font-size: 2rem; }
  .hero-sub { font-size: var(--text-base); }
  .content-section { padding: var(--space-10) 0; }
  .why-grid { grid-template-columns: 1fr; }
  .mode-cards { grid-template-columns: 1fr; }
  .glossary-grid { grid-template-columns: 1fr; }
  .release-grid { grid-template-columns: repeat(2, 1fr); }
  .footer-grid { grid-template-columns: 1fr; }
  .footer-links { flex-direction: column; gap: var(--space-2); }
  .step-item { grid-template-columns: 36px 1fr; gap: var(--space-4); }
  .combined-section { grid-template-columns: 1fr; }
  .tip-card-layout { flex-direction: column; align-items: center; text-align: center; }
  .tip-card-qr { width: 100px; height: 100px; }
  /* Fix 1: scenario table scrollable on narrow screens */
  .scenario-table-wrap { overflow-x: auto; -webkit-overflow-scrolling: touch; }
  /* Fix: calc-toolbar wraps cleanly */
  .calc-toolbar { flex-direction: column; align-items: flex-start; }
}

@media (max-width: 480px) {
  .container { padding: 0 var(--space-4); }
  .card { padding: var(--space-4); }
  .release-grid { grid-template-columns: 1fr 1fr; }
  .result-main-value { font-size: var(--text-4xl); }
  .metric-cards-grid { grid-template-columns: 1fr; }
  /* Fix 1: prevent any card overflow at 320-480px */
  .card, .metric-card, .release-item, .why-item, .combined-card, .section-block {
    max-width: 100%;
    box-sizing: border-box;
  }
}

/* Metrics grid */
.metric-cards-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: var(--space-3);
}
@media (max-width: 1200px) { .metric-cards-grid { grid-template-columns: repeat(2, 1fr); } }
@media (max-width: 480px)   { .metric-cards-grid { grid-template-columns: 1fr; } }

/* ─── Basic mode: hide advanced-only result blocks ──────────────────────── */
.basic-mode-hidden {
  display: none !important;
}
/* Tip builder animation */

.text-flicker-in-glow {
	animation: text-flicker-in-glow 4s linear both !important;
}

@keyframes text-flicker-in-glow {
  0% {
    opacity: 0;
  }
  10% {
    opacity: 0;
    text-shadow: none;
  }
  10.1% {
    opacity: 1;
    text-shadow: none;
  }
  10.2% {
    opacity: 0;
    text-shadow: none;
  }
  20% {
    opacity: 0;
    text-shadow: none;
  }
  20.1% {
    opacity: 1;
    text-shadow: 0 0 30px rgba(255, 255, 255, 0.25);
  }
  20.6% {
    opacity: 0;
    text-shadow: none;
  }
  30% {
    opacity: 0;
    text-shadow: none;
  }
  30.1% {
    opacity: 1;
    text-shadow: 0 0 30px rgba(255, 255, 255, 0.45), 0 0 60px rgba(255, 255, 255, 0.25);
  }
  30.5% {
    opacity: 1;
    text-shadow: 0 0 30px rgba(255, 255, 255, 0.45), 0 0 60px rgba(255, 255, 255, 0.25);
  }
  30.6% {
    opacity: 0;
    text-shadow: none;
  }
  45% {
    opacity: 0;
    text-shadow: none;
  }
  45.1% {
    opacity: 1;
    text-shadow: 0 0 30px rgba(255, 255, 255, 0.45), 0 0 60px rgba(255, 255, 255, 0.25);
  }
  50% {
    opacity: 1;
    text-shadow: 0 0 30px rgba(255, 255, 255, 0.45), 0 0 60px rgba(255, 255, 255, 0.25);
  }
  55% {
    opacity: 1;
    text-shadow: 0 0 30px rgba(255, 255, 255, 0.45), 0 0 60px rgba(255, 255, 255, 0.25);
  }
  55.1% {
    opacity: 0;
    text-shadow: none;
  }
  57% {
    opacity: 0;
    text-shadow: none;
  }
  57.1% {
    opacity: 1;
    text-shadow: 0 0 30px rgba(255, 255, 255, 0.55), 0 0 60px rgba(255, 255, 255, 0.35);
  }
  60% {
    opacity: 1;
    text-shadow: 0 0 30px rgba(255, 255, 255, 0.55), 0 0 60px rgba(255, 255, 255, 0.35);
  }
  60.1% {
    opacity: 0;
    text-shadow: none;
  }
  65% {
    opacity: 0;
    text-shadow: none;
  }
  65.1% {
    opacity: 1;
    text-shadow: 0 0 30px rgba(255, 255, 255, 0.55), 0 0 60px rgba(255, 255, 255, 0.35), 0 0 100px rgba(255, 255, 255, 0.1);
  }
  75% {
    opacity: 1;
    text-shadow: 0 0 30px rgba(255, 255, 255, 0.55), 0 0 60px rgba(255, 255, 255, 0.35), 0 0 100px rgba(255, 255, 255, 0.1);
  }
  75.1% {
    opacity: 0;
    text-shadow: none;
  }
  77% {
    opacity: 0;
    text-shadow: none;
  }
  77.1% {
    opacity: 1;
    text-shadow: 0 0 30px rgba(255, 255, 255, 0.55), 0 0 60px rgba(255, 255, 255, 0.4), 0 0 110px rgba(255, 255, 255, 0.2), 0 0 100px rgba(255, 255, 255, 0.1);
  }
  85% {
    opacity: 1;
    text-shadow: 0 0 30px rgba(255, 255, 255, 0.55), 0 0 60px rgba(255, 255, 255, 0.4), 0 0 110px rgba(255, 255, 255, 0.2), 0 0 100px rgba(255, 255, 255, 0.1);
  }
  85.1% {
    opacity: 0;
    text-shadow: none;
  }
  86% {
    opacity: 0;
    text-shadow: none;
  }
  86.1% {
    opacity: 1;
    text-shadow: 0 0 30px rgba(255, 255, 255, 0.6), 0 0 60px rgba(255, 255, 255, 0.45), 0 0 110px rgba(255, 255, 255, 0.25), 0 0 100px rgba(255, 255, 255, 0.1);
  }
  100% {
    opacity: 1;
    text-shadow: 0 0 30px rgba(255, 255, 255, 0.6), 0 0 60px rgba(255, 255, 255, 0.45), 0 0 110px rgba(255, 255, 255, 0.25), 0 0 100px rgba(255, 255, 255, 0.1);
  }
}

