/* ════════════════════════════════════════
   CivicIQ — Global Election Education
   Design: Editorial / Magazine — deep ink
   + gold accents, Playfair Display headings
   ════════════════════════════════════════ */

:root {
  --ink: #f0fdf4;
  --ink-soft: #bbf7d0;
  --ink-muted: #86efac;
  --paper: rgba(2, 44, 34, 0.85);
  --paper-light: rgba(6, 78, 59, 0.9);
  --gold: #34d399;
  --gold-light: #10b981;
  --gold-pale: rgba(52, 211, 153, 0.15);
  --red: #ef4444;
  --teal: #14b8a6;
  --accent: var(--gold);
  --radius: 12px;
  --radius-sm: 6px;
  --shadow: 0 4px 24px rgba(0,0,0,0.3);
  --shadow-lg: 0 12px 48px rgba(0,0,0,0.4);
  --font-display: 'Playfair Display', Georgia, serif;
  --font-body: 'DM Sans', system-ui, sans-serif;
  --font-mono: 'DM Mono', monospace;
  --transition: 0.22s cubic-bezier(0.4, 0, 0.2, 1);
}

/* ── Reset ── */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
html { scroll-behavior: smooth; font-size: 16px; }
body {
  font-family: var(--font-body);
  background: linear-gradient(rgba(2, 44, 34, 0.8), rgba(2, 44, 34, 0.8)), url('/static/img/bg.png') no-repeat center center fixed;
  background-size: cover;
  color: var(--ink);
  line-height: 1.65;
  min-height: 100vh;
  overflow-x: hidden;
}
img, svg { display: block; max-width: 100%; }
a { color: var(--gold); text-decoration: underline; text-underline-offset: 3px; }
a:hover { color: var(--gold-light); }
button { cursor: pointer; font-family: var(--font-body); border: none; background: none; }

/* Accessibility */
.sr-only {
  position: absolute; width: 1px; height: 1px;
  padding: 0; margin: -1px; overflow: hidden;
  clip: rect(0,0,0,0); white-space: nowrap; border: 0;
}
.skip-link {
  position: fixed; top: -100px; left: 16px; z-index: 9999;
  background: var(--gold); color: var(--ink); padding: 12px 20px;
  border-radius: var(--radius-sm); font-weight: 600;
  transition: top 0.2s;
}
.skip-link:focus { top: 16px; }
*:focus-visible {
  outline: 3px solid var(--gold);
  outline-offset: 3px;
}

/* ── HEADER ── */
.site-header {
  position: sticky; top: 0; z-index: 100;
  background: #022c22;
  border-bottom: 2px solid var(--gold);
  padding: 0 24px;
}
.header-inner {
  max-width: 1200px; margin: 0 auto;
  display: flex; align-items: center; gap: 32px;
  height: 64px;
}
.logo {
  display: flex; align-items: center; gap: 10px;
  font-family: var(--font-display);
  font-size: 1.5rem; font-weight: 700;
  color: var(--ink);
  flex-shrink: 0;
}
.logo em { color: var(--gold); font-style: normal; }
.logo-icon { font-size: 1.4rem; }

.main-nav { display: flex; gap: 4px; flex: 1; }
.nav-btn {
  padding: 8px 18px; border-radius: 6px;
  color: rgba(245,240,232,0.6);
  font-size: 0.92rem; font-weight: 500;
  transition: var(--transition);
  letter-spacing: 0.02em;
}
.nav-btn:hover, .nav-btn.active {
  background: rgba(201,168,76,0.18);
  color: var(--gold);
}
.nav-btn.active { color: var(--gold); font-weight: 600; }

.header-actions { position: relative; margin-left: auto; }
.translate-btn {
  display: flex; align-items: center; gap: 6px;
  padding: 7px 14px; border-radius: 6px;
  border: 1px solid rgba(201,168,76,0.4);
  color: rgba(245,240,232,0.8);
  font-size: 0.88rem; font-weight: 500;
  transition: var(--transition);
}
.translate-btn:hover {
  background: rgba(201,168,76,0.15); color: var(--gold);
  border-color: var(--gold);
}
.lang-picker {
  position: absolute; right: 0; top: calc(100% + 8px);
  background: var(--paper); border: 1px solid var(--gold);
  border-radius: var(--radius-sm);
  display: flex; flex-direction: column; min-width: 140px;
  overflow: hidden; box-shadow: var(--shadow-lg);
}
.lang-picker button {
  padding: 10px 16px; text-align: left;
  color: rgba(245,240,232,0.8); font-size: 0.9rem;
  transition: var(--transition);
}
.lang-picker button:hover {
  background: rgba(201,168,76,0.2); color: var(--gold);
}
.lang-picker.hidden { display: none; }

/* ── HERO ── */
.hero {
  position: relative; overflow: hidden;
  background: rgba(2, 44, 34, 0.6); /* Transparent layer over bg image */
  padding: 80px 24px 100px;
  text-align: center;
}
.hero-bg {
  position: absolute; inset: 0;
  pointer-events: none; overflow: hidden;
}
.globe-ring {
  position: absolute; border-radius: 50%;
  border: 1px solid rgba(201,168,76,0.1);
  left: 50%; top: 50%; transform: translate(-50%, -50%);
}
.ring-1 { width: 300px; height: 300px; }
.ring-2 { width: 550px; height: 550px; animation: ring-pulse 6s ease-in-out infinite; }
.ring-3 { width: 800px; height: 800px; animation: ring-pulse 8s ease-in-out infinite 1s; }
@keyframes ring-pulse {
  0%, 100% { opacity: 0.3; transform: translate(-50%,-50%) scale(1); }
  50% { opacity: 0.7; transform: translate(-50%,-50%) scale(1.02); }
}

.floating-flags {
  position: absolute; inset: 0;
}
.ff {
  position: absolute; font-size: 2rem;
  animation: float-flag 8s ease-in-out infinite;
  opacity: 0.25;
}
.ff:nth-child(1) { left: 10%; top: 20%; animation-delay: 0s; }
.ff:nth-child(2) { right: 12%; top: 30%; animation-delay: 1.5s; }
.ff:nth-child(3) { left: 20%; bottom: 25%; animation-delay: 3s; }
.ff:nth-child(4) { right: 18%; bottom: 20%; animation-delay: 4.5s; }
.ff:nth-child(5) { left: 45%; top: 8%; animation-delay: 2s; }
@keyframes float-flag {
  0%, 100% { transform: translateY(0) rotate(-3deg); }
  50% { transform: translateY(-18px) rotate(3deg); }
}

.hero-content { position: relative; z-index: 2; max-width: 720px; margin: 0 auto; }
.hero-badge {
  display: inline-block;
  background: rgba(201,168,76,0.15);
  border: 1px solid rgba(201,168,76,0.4);
  color: var(--gold); font-size: 0.85rem; font-weight: 500;
  padding: 6px 16px; border-radius: 100px; letter-spacing: 0.04em;
  margin-bottom: 24px;
  animation: fade-up 0.6s ease both;
}
.hero h1 {
  font-family: var(--font-display);
  font-size: clamp(2.4rem, 5vw, 4rem);
  font-weight: 900; line-height: 1.1;
  color: var(--ink);
  margin-bottom: 20px;
  animation: fade-up 0.6s ease 0.1s both;
}
.hero h1 em { color: var(--gold); font-style: italic; }
.hero-sub {
  font-size: 1.1rem; color: rgba(245,240,232,0.65);
  max-width: 560px; margin: 0 auto 36px;
  animation: fade-up 0.6s ease 0.2s both;
}
.hero-ctas {
  display: flex; gap: 12px; justify-content: center; flex-wrap: wrap;
  margin-bottom: 56px;
  animation: fade-up 0.6s ease 0.3s both;
}
.btn-primary {
  background: var(--gold); color: var(--ink);
  padding: 14px 28px; border-radius: 8px;
  font-weight: 700; font-size: 0.95rem; letter-spacing: 0.02em;
  transition: var(--transition); border: 2px solid var(--gold);
}
.btn-primary:hover {
  background: var(--gold-light); border-color: var(--gold-light);
  transform: translateY(-2px); box-shadow: 0 8px 24px rgba(201,168,76,0.3);
}
.btn-ghost {
  background: transparent; color: rgba(245,240,232,0.85);
  padding: 14px 28px; border-radius: 8px;
  font-weight: 600; font-size: 0.95rem;
  border: 2px solid rgba(245,240,232,0.25);
  transition: var(--transition);
}
.btn-ghost:hover {
  border-color: var(--gold); color: var(--gold);
  transform: translateY(-2px);
}
.hero-stats {
  display: flex; gap: 40px; justify-content: center; flex-wrap: wrap;
  animation: fade-up 0.6s ease 0.4s both;
}
.stat { text-align: center; }
.stat-num {
  display: block; font-family: var(--font-display);
  font-size: 1.8rem; font-weight: 900; color: var(--gold);
}
.stat-label { font-size: 0.8rem; color: rgba(245,240,232,0.5); text-transform: uppercase; letter-spacing: 0.06em; }

@keyframes fade-up {
  from { opacity: 0; transform: translateY(24px); }
  to { opacity: 1; transform: translateY(0); }
}

/* ── MAIN CONTENT ── */
#main-content { max-width: 1200px; margin: 0 auto; padding: 60px 24px; }
.view { animation: fade-up 0.4s ease both; }
.view.hidden { display: none !important; }
.view.active { display: block; }

.section-header { text-align: center; margin-bottom: 48px; }
.section-header h2 {
  font-family: var(--font-display);
  font-size: clamp(1.8rem, 3vw, 2.6rem);
  font-weight: 900; color: var(--ink);
  margin-bottom: 10px;
}
.section-header p { color: #5a6070; font-size: 1rem; }

/* ── COUNTRY GRID ── */
.country-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
  gap: 20px; margin-bottom: 40px;
}
.country-card {
  background: var(--paper-light);
  border: 2px solid transparent;
  border-radius: var(--radius);
  padding: 28px 20px;
  display: flex; flex-direction: column; align-items: center;
  gap: 8px; text-align: center;
  transition: var(--transition);
  position: relative; overflow: hidden;
  cursor: pointer;
}
.country-card::before {
  content: ''; position: absolute; inset: 0;
  background: linear-gradient(135deg, var(--accent) 0%, transparent 100%);
  opacity: 0; transition: var(--transition);
}
.country-card:hover, .country-card:focus-visible {
  border-color: var(--accent, var(--gold));
  transform: translateY(-4px);
  box-shadow: var(--shadow);
}
.country-card:hover::before { opacity: 0.05; }
.cc-flag { font-size: 2.8rem; }
.cc-name { font-family: var(--font-display); font-size: 1.1rem; font-weight: 700; color: var(--ink); }
.cc-system { font-size: 0.78rem; color: #6b7280; line-height: 1.3; }
.cc-arrow {
  position: absolute; right: 14px; top: 50%;
  transform: translateY(-50%);
  color: var(--gold); font-size: 1.2rem; opacity: 0;
  transition: var(--transition);
}
.country-card:hover .cc-arrow, .country-card:focus-visible .cc-arrow { opacity: 1; right: 10px; }

/* ── COUNTRY DETAIL ── */
.country-detail { animation: fade-up 0.4s ease both; }
.back-btn {
  background: none; border: 1px solid #ddd; color: var(--ink);
  padding: 8px 16px; border-radius: 6px;
  font-size: 0.88rem; font-weight: 500; margin-bottom: 32px;
  transition: var(--transition);
}
.back-btn:hover { border-color: var(--gold); color: var(--gold); }
.detail-header { display: flex; align-items: center; gap: 24px; margin-bottom: 20px; flex-wrap: wrap; }
.detail-flag { font-size: 4rem; }
.detail-header h2 {
  font-family: var(--font-display); font-size: 2.2rem; font-weight: 900; color: var(--ink);
}
.detail-meta { font-size: 0.88rem; color: #6b7280; margin-top: 4px; }
.detail-desc { font-size: 1rem; color: #374151; margin-bottom: 24px; max-width: 800px; line-height: 1.7; }

.facts-strip {
  display: flex; flex-wrap: wrap; gap: 10px; margin-bottom: 32px;
}
.fact-chip {
  background: var(--gold-pale); color: var(--ink);
  border-radius: 100px; padding: 6px 14px;
  font-size: 0.82rem; font-weight: 500; line-height: 1.4;
  border: 1px solid rgba(201,168,76,0.3);
}

.detail-tabs { display: flex; gap: 4px; margin-bottom: 32px; border-bottom: 2px solid #e8e4d8; }
.tab-btn {
  padding: 12px 20px; font-size: 0.92rem; font-weight: 600;
  color: #6b7280; border-bottom: 3px solid transparent;
  margin-bottom: -2px; transition: var(--transition);
}
.tab-btn.active, .tab-btn:hover { color: var(--ink); border-bottom-color: var(--gold); }
.tab-content { display: none; }
.tab-content.active { display: block; animation: fade-up 0.3s ease both; }

/* ── TIMELINE ── */
.timeline { position: relative; }
.timeline::before {
  content: ''; position: absolute; left: 80px; top: 0; bottom: 0;
  width: 2px; background: linear-gradient(to bottom, var(--gold), transparent);
}
.tl-item {
  display: flex; gap: 24px; margin-bottom: 28px; position: relative;
  animation: fade-up 0.4s ease both;
}
.tl-item:nth-child(1) { animation-delay: 0.05s; }
.tl-item:nth-child(2) { animation-delay: 0.1s; }
.tl-item:nth-child(3) { animation-delay: 0.15s; }
.tl-item:nth-child(4) { animation-delay: 0.2s; }
.tl-item:nth-child(n+5) { animation-delay: 0.25s; }

.tl-day {
  width: 72px; flex-shrink: 0;
  text-align: right; padding-top: 14px;
  font-family: var(--font-mono); font-size: 0.8rem; font-weight: 500;
  color: var(--gold);
}
.tl-dot {
  width: 16px; height: 16px; flex-shrink: 0;
  margin-top: 16px; margin-left: 8px;
  background: var(--gold); border-radius: 50%;
  position: relative; z-index: 1;
  box-shadow: 0 0 0 4px var(--paper);
}
.tl-content {
  flex: 1; background: var(--paper-light);
  border-radius: var(--radius); padding: 16px 20px;
  border-left: 3px solid var(--gold); margin-left: 16px;
  transition: var(--transition);
}
.tl-content:hover { box-shadow: var(--shadow); transform: translateX(4px); }
.tl-phase {
  font-weight: 700; font-size: 0.95rem; margin-bottom: 4px; color: var(--ink);
  display: flex; align-items: center; justify-content: space-between;
}
.calendar-btn {
  font-size: 0.7rem; color: var(--gold); border: 1px solid var(--gold);
  border-radius: 4px; padding: 2px 6px; text-decoration: none;
  background: rgba(52, 211, 153, 0.05); transition: var(--transition);
}
.calendar-btn:hover { background: var(--gold); color: #022c22; text-decoration: none; }
.tl-desc { font-size: 0.88rem; color: rgba(245,240,232,0.6); line-height: 1.5; }

/* ── STEPS ── */
.steps-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(280px, 1fr)); gap: 20px; }
.step-card {
  background: var(--paper-light);
  border-radius: var(--radius); padding: 24px;
  border: 1px solid #e8e4d8;
  display: flex; gap: 16px; align-items: flex-start;
  transition: var(--transition);
  animation: fade-up 0.4s ease both;
}
.step-card:hover { box-shadow: var(--shadow); border-color: var(--gold); }
.step-num {
  width: 36px; height: 36px; flex-shrink: 0;
  background: var(--ink); color: var(--gold);
  border-radius: 50%; display: flex; align-items: center; justify-content: center;
  font-family: var(--font-mono); font-size: 0.9rem; font-weight: 700;
}
.step-icon { font-size: 1.6rem; flex-shrink: 0; }
.step-title { font-weight: 700; font-size: 0.95rem; margin-bottom: 6px; color: var(--ink); }
.step-detail { font-size: 0.85rem; color: #4b5563; line-height: 1.5; }

.detail-actions { display: flex; gap: 12px; flex-wrap: wrap; margin-top: 32px; }
.btn-outline {
  padding: 10px 20px; border-radius: 8px;
  border: 2px solid var(--gold); color: var(--gold);
  font-weight: 600; font-size: 0.88rem;
  transition: var(--transition);
}
.btn-outline:hover { background: var(--gold); color: var(--ink); }

/* ── COMPARE TABLE ── */
.compare-table-wrap { overflow-x: auto; margin-bottom: 48px; border-radius: var(--radius); box-shadow: var(--shadow); }
.compare-table { width: 100%; border-collapse: collapse; background: var(--paper-light); }
.compare-table thead { background: var(--ink); color: var(--gold); }
.compare-table th {
  padding: 16px 18px; text-align: left;
  font-family: var(--font-mono); font-size: 0.82rem;
  text-transform: uppercase; letter-spacing: 0.06em;
}
.compare-table td {
  padding: 14px 18px; font-size: 0.9rem; color: var(--ink);
  border-bottom: 1px solid #e8e4d8;
}
.compare-table tr:last-child td { border-bottom: none; }
.compare-table tbody tr:hover td { background: var(--gold-pale); }
.flag-cell { font-size: 1.4rem; }
.badge {
  display: inline-block; padding: 3px 10px; border-radius: 100px;
  font-size: 0.78rem; font-weight: 600;
}
.badge-yes { background: #d1fae5; color: #065f46; }
.badge-no { background: #fee2e2; color: #991b1b; }

/* ── CHARTS ── */
.compare-charts { display: grid; grid-template-columns: 1fr 1fr; gap: 24px; }
@media (max-width: 640px) { .compare-charts { grid-template-columns: 1fr; } }
.chart-card {
  background: var(--paper-light); border-radius: var(--radius);
  padding: 28px; border: 1px solid #e8e4d8;
}
.chart-card h3 { font-family: var(--font-display); font-size: 1.1rem; margin-bottom: 20px; color: var(--ink); }
.bar-chart { display: flex; flex-direction: column; gap: 12px; }
.bar-row { display: flex; align-items: center; gap: 12px; }
.bar-label { width: 40px; font-size: 1.2rem; flex-shrink: 0; }
.bar-track { flex: 1; background: #e8e4d8; border-radius: 100px; height: 20px; overflow: hidden; }
.bar-fill {
  height: 100%; border-radius: 100px;
  background: linear-gradient(90deg, var(--ink), var(--gold));
  transition: width 1s cubic-bezier(0.4, 0, 0.2, 1);
}
.bar-val { font-size: 0.82rem; font-weight: 600; color: var(--ink); min-width: 48px; text-align: right; }

/* ── QUIZ ── */
.quiz-picker { display: flex; flex-wrap: wrap; gap: 12px; justify-content: center; margin-bottom: 40px; }
.quiz-country-btn {
  padding: 12px 24px; border-radius: 100px;
  border: 2px solid #e8e4d8; background: var(--paper-light);
  font-size: 1rem; font-weight: 600; color: var(--ink);
  transition: var(--transition);
}
.quiz-country-btn:hover, .quiz-country-btn.active {
  border-color: var(--gold); background: var(--gold-pale); color: var(--ink);
}
.quiz-container { max-width: 680px; margin: 0 auto; }
.quiz-q { font-family: var(--font-display); font-size: 1.3rem; font-weight: 700; margin-bottom: 24px; color: var(--ink); }
.quiz-progress { font-size: 0.82rem; color: #6b7280; margin-bottom: 8px; }
.quiz-progress-bar { height: 4px; background: #e8e4d8; border-radius: 100px; margin-bottom: 28px; overflow: hidden; }
.quiz-progress-fill { height: 100%; background: var(--gold); border-radius: 100px; transition: width 0.5s ease; }
.quiz-options { display: flex; flex-direction: column; gap: 12px; margin-bottom: 24px; }
.quiz-option {
  width: 100%; text-align: left; padding: 16px 20px;
  border: 2px solid #e8e4d8; border-radius: var(--radius);
  background: var(--paper-light); color: var(--ink);
  font-size: 0.95rem; font-weight: 500;
  transition: var(--transition);
}
.quiz-option:hover:not(:disabled) { border-color: var(--gold); background: var(--gold-pale); }
.quiz-option.correct { border-color: #10b981; background: #d1fae5; color: #065f46; }
.quiz-option.wrong { border-color: #ef4444; background: #fee2e2; color: #991b1b; }
.quiz-option:disabled { cursor: default; }
.quiz-feedback { padding: 14px 18px; border-radius: var(--radius-sm); font-size: 0.9rem; font-weight: 500; margin-bottom: 20px; }
.quiz-feedback.correct { background: #d1fae5; color: #065f46; }
.quiz-feedback.wrong { background: #fee2e2; color: #991b1b; }
.quiz-next-btn, .quiz-restart-btn {
  background: var(--ink); color: var(--gold);
  padding: 12px 24px; border-radius: 8px;
  font-weight: 700; font-size: 0.9rem;
  transition: var(--transition);
}
.quiz-next-btn:hover, .quiz-restart-btn:hover { background: var(--gold); color: var(--ink); }
.quiz-score {
  text-align: center; padding: 48px 24px;
  background: var(--paper-light); border-radius: var(--radius);
  border: 2px solid var(--gold);
}
.quiz-score-num {
  font-family: var(--font-display); font-size: 4rem; font-weight: 900;
  color: var(--gold); display: block; margin-bottom: 8px;
}
.quiz-score-label { font-size: 1.1rem; color: var(--ink); margin-bottom: 24px; }

/* ── CHAT ── */
.chat-wrap { max-width: 760px; margin: 0 auto; }
.chat-window {
  min-height: 400px; max-height: 520px; overflow-y: auto;
  background: var(--paper-light);
  border: 1px solid #e8e4d8; border-radius: var(--radius);
  padding: 24px; margin-bottom: 12px;
  scroll-behavior: smooth;
}
.chat-msg {
  display: flex; gap: 12px; margin-bottom: 20px;
  animation: fade-up 0.3s ease both;
}
.chat-msg.user { flex-direction: row-reverse; }
.msg-avatar {
  width: 36px; height: 36px; border-radius: 50%; flex-shrink: 0;
  display: flex; align-items: center; justify-content: center;
  background: var(--ink); font-size: 1.1rem;
}
.chat-msg.user .msg-avatar { background: var(--gold); }
.msg-bubble {
  max-width: 80%; padding: 12px 16px; border-radius: 12px;
  font-size: 0.92rem; line-height: 1.6;
}
.chat-msg.assistant .msg-bubble {
  background: var(--paper-light); border: 1px solid var(--gold);
  border-bottom-left-radius: 4px; color: var(--ink);
}
.chat-msg.user .msg-bubble {
  background: var(--gold); color: #022c22;
  border-bottom-right-radius: 4px;
}
.msg-bubble ul { padding-left: 20px; margin-top: 8px; }
.msg-bubble li { margin-bottom: 4px; }
.msg-bubble strong { color: inherit; }

.typing-indicator { display: flex; gap: 4px; padding: 4px 2px; }
.typing-dot {
  width: 8px; height: 8px; background: var(--gold); border-radius: 50%;
  animation: typing 1.4s ease infinite;
}
.typing-dot:nth-child(2) { animation-delay: 0.2s; }
.typing-dot:nth-child(3) { animation-delay: 0.4s; }
@keyframes typing {
  0%, 60%, 100% { transform: translateY(0); opacity: 0.4; }
  30% { transform: translateY(-8px); opacity: 1; }
}

.chat-suggestions {
  display: flex; flex-wrap: wrap; gap: 8px; margin-bottom: 12px;
}
.suggestion-chip {
  background: var(--paper-light); border: 1px solid var(--gold); border-radius: 100px;
  padding: 7px 14px; font-size: 0.82rem; color: var(--ink);
  transition: var(--transition);
}
.suggestion-chip:hover { border-color: var(--gold); background: var(--gold-pale); }

.chat-input-row {
  display: flex; gap: 10px; align-items: center;
  background: var(--paper-light); border: 2px solid var(--gold);
  border-radius: 12px; padding: 8px 12px;
  transition: var(--transition);
}
.chat-input-row:focus-within { border-color: var(--gold); box-shadow: 0 0 0 3px rgba(201,168,76,0.15); }
.chat-input {
  flex: 1; border: none; outline: none;
  font-family: var(--font-body); font-size: 0.95rem; color: var(--ink);
  background: transparent;
}
.chat-input::placeholder { color: #9ca3af; }
.chat-send {
  width: 40px; height: 40px; border-radius: 8px;
  background: var(--gold); color: #022c22;
  font-size: 1.2rem; font-weight: 700;
  display: flex; align-items: center; justify-content: center;
  transition: var(--transition); flex-shrink: 0;
}
.chat-send:hover { background: var(--gold-light); color: #022c22; }
.chat-send:disabled { opacity: 0.4; cursor: not-allowed; }

.tts-btn {
  display: block; margin-top: 10px; background: transparent; border: 1px solid var(--gold);
  color: var(--gold); border-radius: 6px; padding: 4px 10px; cursor: pointer; font-size: 0.8rem;
  transition: var(--transition);
}
.tts-btn:hover { background: rgba(52, 211, 153, 0.15); color: var(--ink); }

.video-container {
  width: 100%;
  aspect-ratio: 16 / 9;
  background: #000;
  border-radius: 12px;
  overflow: hidden;
  margin-bottom: 24px;
}

/* ── FOOTER ── */
.site-footer {
  background: #022c22; color: var(--ink);
  padding: 32px 24px; margin-top: 80px;
  border-top: 2px solid var(--gold);
}
.footer-inner {
  max-width: 1200px; margin: 0 auto;
  display: flex; flex-direction: column; align-items: center; gap: 12px; text-align: center;
}
.footer-brand { font-size: 1.1rem; color: rgba(245,240,232,0.8); }
.footer-brand strong { font-family: var(--font-display); }
.footer-tagline { font-size: 0.88rem; }
.footer-links { display: flex; gap: 10px; align-items: center; font-size: 0.85rem; }
.footer-links a { color: var(--gold); }
.footer-disclaimer { font-size: 0.78rem; max-width: 480px; line-height: 1.5; }

/* ── TOAST ── */
.toast-container { position: fixed; bottom: 24px; right: 24px; z-index: 9999; display: flex; flex-direction: column; gap: 8px; }
.toast {
  background: var(--paper); color: var(--ink);
  border: 1px solid var(--gold); border-radius: 8px;
  padding: 12px 18px; font-size: 0.88rem; font-weight: 500;
  box-shadow: var(--shadow-lg); min-width: 220px;
  animation: slide-in 0.3s ease both;
}
@keyframes slide-in {
  from { transform: translateX(100%); opacity: 0; }
  to { transform: translateX(0); opacity: 1; }
}

/* ── UTILITIES ── */
.hidden { display: none !important; }

/* ── RESPONSIVE ── */
@media (max-width: 768px) {
  .header-inner { gap: 12px; }
  .main-nav { gap: 0; }
  .nav-btn { padding: 8px 10px; font-size: 0.82rem; }
  .hero { padding: 56px 20px 72px; }
  .hero-stats { gap: 24px; }
  .timeline::before { left: 60px; }
  .tl-day { width: 52px; }
  .compare-charts { grid-template-columns: 1fr; }
}
@media (max-width: 480px) {
  .translate-btn span:not([aria-hidden]) { display: none; }
  .hero-ctas { flex-direction: column; align-items: center; }
  .detail-header { flex-direction: column; gap: 12px; }
}

/* ── PRINT ── */
@media print {
  .site-header, .hero, .site-footer, .chat-input-row { display: none; }
  .view.hidden { display: block !important; }
}
