/* ==========================================================================
   AI Chat Exporter — Global Stylesheet
   Design tokens for Light / Dark / System themes + shared components.

   Theming model: every color that changes with the theme is a custom property.
   Three blocks define them: :root (light default), html.dark, and a media
   query for system preference when no manual class is set.
   ========================================================================== */

/* ─────────────────────────────────────
   THEME TOKENS
   ───────────────────────────────────── */
/* Brand (theme-independent) */
:root {
  --color-primary: #3b82f6;
  --color-primary-glow: rgba(59, 130, 246, 0.15);
  --color-success: #10b981;
  --color-warning: #f59e0b;
  --color-accent: #8b5cf6;
  --color-danger: #ef4444;
  --color-danger-glow: rgba(239, 68, 68, 0.15);

  /* Browser brands (theme-independent) */
  --color-firefox: #ff7139;
  --color-firefox-glow: rgba(255, 113, 57, 0.15);
  --color-edge: #107c10;
  --color-edge-blue: #0078d4;
  --color-edge-blue-glow: rgba(0, 120, 212, 0.15);
  --color-chrome: #4285f4;
  --color-chrome-glow: rgba(66, 133, 244, 0.15);

  /* Fonts */
  --font-sans: 'Outfit', system-ui, -apple-system, 'Segoe UI', sans-serif;
  --font-mono: 'JetBrains Mono', 'Fira Code', 'Cascadia Code', monospace;
  --max-width: 860px;

  /* ── Light theme (default) ── */
  --bg-base: #ffffff;
  --bg-surface: rgba(241, 245, 249, 0.72);
  --bg-surface-hover: rgba(226, 232, 240, 0.9);
  --bg-code: rgba(241, 245, 249, 0.92);
  --bg-elevated: rgba(15, 23, 42, 0.02);
  --bg-soft: rgba(255, 255, 255, 0.65);
  --bg-soft-hover: rgba(226, 232, 240, 0.6);

  --text-primary: #0f172a;
  --text-secondary: #475569;
  --text-muted: #94a3b8;

  --border-color: rgba(15, 23, 42, 0.08);
  --border-hover: rgba(15, 23, 42, 0.16);

  --shadow-soft: 0 8px 24px rgba(15, 23, 42, 0.06);
  --shadow-strong: 0 20px 50px rgba(15, 23, 42, 0.12);

  --primary-tint: rgba(59, 130, 246, 0.06);
  --primary-tint-strong: rgba(59, 130, 246, 0.12);
  --white-wash: rgba(255, 255, 255, 0.6);

  /* Gradient stops */
  --grad-heading-start: #0f172a;
  --grad-heading-end: #2563eb;
  --grad-section-start: #0f172a;
  --grad-section-end: #94a3b8;
  --grad-logo-start: #0f172a;
  --grad-logo-end: #64748b;

  /* Button text colors */
  --text-btn-primary: #1d4ed8;
  --text-btn-primary-hover: #1e40af;
  --text-firefox: #ea580c;
  --text-firefox-hover: #c2410c;
  --text-chrome: #4285f4;
  --text-chrome-hover: #1e66d4;
  --text-edge: #0078d4;
  --text-edge-hover: #005fb3;

  color-scheme: light;
}

html.dark {
  /* ── Dark theme ── */
  --bg-base: #0b111e;
  --bg-surface: rgba(19, 30, 49, 0.6);
  --bg-surface-hover: rgba(30, 48, 77, 0.8);
  --bg-code: rgba(15, 23, 42, 0.8);
  --bg-elevated: rgba(255, 255, 255, 0.02);
  --bg-soft: rgba(255, 255, 255, 0.02);
  --bg-soft-hover: rgba(255, 255, 255, 0.06);

  --text-primary: #f8fafc;
  --text-secondary: #94a3b8;
  --text-muted: #64748b;

  --border-color: rgba(148, 163, 184, 0.08);
  --border-hover: rgba(148, 163, 184, 0.2);

  --shadow-soft: 0 8px 24px rgba(0, 0, 0, 0.2);
  --shadow-strong: 0 20px 50px rgba(0, 0, 0, 0.5);

  --primary-tint: rgba(59, 130, 246, 0.1);
  --primary-tint-strong: rgba(59, 130, 246, 0.18);
  --white-wash: rgba(255, 255, 255, 0.04);

  --grad-heading-start: #f8fafc;
  --grad-heading-end: #93c5fd;
  --grad-section-start: #ffffff;
  --grad-section-end: #cbd5e1;
  --grad-logo-start: #ffffff;
  --grad-logo-end: #cbd5e1;

  --text-btn-primary: #8ab4f8;
  --text-btn-primary-hover: #a3c7fa;
  --text-firefox: #ff9166;
  --text-firefox-hover: #ffa480;
  --text-chrome: #8ab4f8;
  --text-chrome-hover: #a3c7fa;
  --text-edge: #4da6ff;
  --text-edge-hover: #80c1ff;

  color-scheme: dark;
}

/* ── System preference (auto switch, no manual class) ── */
@media (prefers-color-scheme: dark) {
  html:not(.light):not(.dark) {
    --bg-base: #0b111e;
    --bg-surface: rgba(19, 30, 49, 0.6);
    --bg-surface-hover: rgba(30, 48, 77, 0.8);
    --bg-code: rgba(15, 23, 42, 0.8);
    --bg-elevated: rgba(255, 255, 255, 0.02);
    --bg-soft: rgba(255, 255, 255, 0.02);
    --bg-soft-hover: rgba(255, 255, 255, 0.06);

    --text-primary: #f8fafc;
    --text-secondary: #94a3b8;
    --text-muted: #64748b;

    --border-color: rgba(148, 163, 184, 0.08);
    --border-hover: rgba(148, 163, 184, 0.2);

    --shadow-soft: 0 8px 24px rgba(0, 0, 0, 0.2);
    --shadow-strong: 0 20px 50px rgba(0, 0, 0, 0.5);

    --primary-tint: rgba(59, 130, 246, 0.1);
    --primary-tint-strong: rgba(59, 130, 246, 0.18);
    --white-wash: rgba(255, 255, 255, 0.04);

    --grad-heading-start: #f8fafc;
    --grad-heading-end: #93c5fd;
    --grad-section-start: #ffffff;
    --grad-section-end: #cbd5e1;
    --grad-logo-start: #ffffff;
    --grad-logo-end: #cbd5e1;

    --text-btn-primary: #8ab4f8;
    --text-btn-primary-hover: #a3c7fa;
    --text-firefox: #ff9166;
    --text-firefox-hover: #ffa480;
    --text-chrome: #8ab4f8;
    --text-chrome-hover: #a3c7fa;
    --text-edge: #4da6ff;
    --text-edge-hover: #80c1ff;

    color-scheme: dark;
  }
}

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

html {
  scroll-behavior: smooth;
}

body {
  font-family: var(--font-sans);
  background-color: var(--bg-base);
  color: var(--text-primary);
  line-height: 1.7;
  min-height: 100vh;
  overflow-x: hidden;
  transition:
    background-color 0.25s ease,
    color 0.25s ease;
}

/* Radial background glow */
body::before {
  content: '';
  position: absolute;
  top: -10%;
  left: 50%;
  transform: translateX(-50%);
  width: 100vw;
  height: 60vh;
  background: radial-gradient(circle, var(--primary-tint) 0%, rgba(0, 0, 0, 0) 70%);
  z-index: -1;
  pointer-events: none;
}

a {
  color: var(--color-primary);
}

img {
  max-width: 100%;
  height: auto;
}

code {
  font-family: var(--font-mono);
  background: var(--bg-code);
  padding: 2px 6px;
  border-radius: 6px;
  font-size: 0.88em;
  border: 1px solid var(--border-color);
}

/* ─────────────────────────────────────
   HEADER / NAV
   ───────────────────────────────────── */
header {
  max-width: 1100px;
  margin: 0 auto;
  padding: 20px;
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 16px;
  border-bottom: 1px solid var(--border-color);
}

.logo-container {
  display: flex;
  align-items: center;
  gap: 10px;
  text-decoration: none;
  color: var(--text-primary);
}

.logo-img {
  width: 32px;
  height: 32px;
  border-radius: 8px;
  box-shadow: 0 4px 12px var(--primary-tint-strong);
  transition: transform 0.3s ease;
}

.logo-container:hover .logo-img {
  transform: rotate(10deg) scale(1.05);
}

.logo-text {
  font-size: 1.15rem;
  font-weight: 700;
  letter-spacing: -0.02em;
  background: linear-gradient(135deg, var(--grad-logo-start) 0%, var(--grad-logo-end) 100%);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

.nav-links,
.header-nav {
  display: flex;
  gap: 10px;
  align-items: center;
}

.nav-link {
  color: var(--text-secondary);
  text-decoration: none;
  font-size: 0.9rem;
  font-weight: 500;
  padding: 6px 14px;
  border-radius: 8px;
  border: 1px solid var(--border-color);
  background: var(--bg-soft);
  transition: all 0.2s ease;
  white-space: nowrap;
  display: inline-flex;
  align-items: center;
  gap: 6px;
}

.nav-link:hover {
  color: var(--text-primary);
  border-color: var(--border-hover);
  background: var(--bg-soft-hover);
}

.covai-link {
  opacity: 0.85;
  border: 1px solid var(--border-color);
  padding: 4px 8px;
  border-radius: 4px;
  font-family: var(--font-mono);
  font-size: 0.85rem;
  text-decoration: none;
  color: inherit;
  background: var(--bg-soft);
  transition: all 0.2s ease;
  white-space: nowrap;
}

.covai-link:hover {
  opacity: 1;
  color: var(--text-primary);
  border-color: var(--border-hover);
}

/* ─────────────────────────────────────
   THEME TOGGLE
   ───────────────────────────────────── */
.theme-toggle {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  padding: 4px;
  border-radius: 10px;
  border: 1px solid var(--border-color);
  background: var(--bg-soft);
  flex-shrink: 0;
}

.theme-toggle button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 28px;
  height: 28px;
  border: none;
  border-radius: 7px;
  background: transparent;
  color: var(--text-muted);
  cursor: pointer;
  font-size: 1rem;
  line-height: 1;
  transition: all 0.2s ease;
}

.theme-toggle button:hover {
  color: var(--text-primary);
  background: var(--bg-soft-hover);
}

.theme-toggle button[aria-pressed='true'] {
  background: var(--primary-tint-strong);
  color: var(--color-primary);
}

/* ─────────────────────────────────────
   BREADCRUMB
   ───────────────────────────────────── */
.breadcrumb {
  max-width: var(--max-width);
  margin: 24px auto 0;
  padding: 0 20px;
  font-size: 0.85rem;
  color: var(--text-muted);
}

.breadcrumb a {
  color: var(--color-primary);
  text-decoration: none;
}

.breadcrumb a:hover {
  text-decoration: underline;
}

.breadcrumb span {
  margin: 0 6px;
}

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

main.wide {
  max-width: 1100px;
}

/* ─────────────────────────────────────
   HERO
   ───────────────────────────────────── */
.hero {
  margin-bottom: 48px;
}

.badge {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-size: 0.82rem;
  font-weight: 600;
  color: var(--color-primary);
  background: var(--primary-tint);
  padding: 5px 14px;
  border-radius: 20px;
  margin-bottom: 16px;
  border: 1px solid var(--primary-tint-strong);
}

h1 {
  font-size: 2.5rem;
  font-weight: 800;
  line-height: 1.15;
  letter-spacing: -0.03em;
  margin-bottom: 16px;
  background: linear-gradient(to right, var(--grad-heading-start), var(--grad-heading-end));
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

@media (max-width: 640px) {
  h1 {
    font-size: 1.9rem;
  }
}

.hero-subtitle {
  font-size: 1.15rem;
  color: var(--text-secondary);
  max-width: 640px;
  margin: 0 0 28px;
  line-height: 1.6;
  font-weight: 400;
}

.hero-center {
  text-align: center;
}

.hero-center .hero-subtitle {
  margin-left: auto;
  margin-right: auto;
}

/* ─────────────────────────────────────
   CTA BUTTONS
   ───────────────────────────────────── */
.cta-group {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  margin-top: 24px;
}

.cta-group.compact {
  margin-top: 1rem;
}

.btn {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 12px 24px;
  border-radius: 10px;
  font-weight: 600;
  font-size: 0.95rem;
  text-decoration: none;
  transition: all 0.2s ease;
  border: 1px solid var(--border-color);
  cursor: pointer;
  justify-content: center;
}

.btn-primary {
  background: linear-gradient(135deg, var(--primary-tint-strong), var(--primary-tint));
  border-color: rgba(59, 130, 246, 0.35);
  color: var(--text-btn-primary);
}

.btn-primary:hover {
  background: linear-gradient(135deg, rgba(59, 130, 246, 0.22), rgba(59, 130, 246, 0.1));
  border-color: rgba(59, 130, 246, 0.55);
  transform: translateY(-1px);
  box-shadow: 0 4px 20px var(--primary-tint-strong);
  color: var(--text-btn-primary-hover);
}

.btn-secondary {
  background: var(--bg-soft);
  color: var(--text-secondary);
}

.btn-secondary:hover {
  background: var(--bg-soft-hover);
  color: var(--text-primary);
  border-color: var(--border-hover);
}

/* ─────────────────────────────────────
   TYPOGRAPHY / SECTIONS
   ───────────────────────────────────── */
.content-section {
  margin-bottom: 8px;
}

h2 {
  font-size: 1.6rem;
  font-weight: 800;
  letter-spacing: -0.02em;
  margin: 48px 0 20px;
  color: var(--text-primary);
  border-bottom: 1px solid var(--border-color);
  padding-bottom: 10px;
}

h3 {
  font-size: 1.2rem;
  font-weight: 700;
  margin: 28px 0 12px;
  color: var(--text-primary);
}

h4 {
  font-size: 1.05rem;
  font-weight: 700;
  margin: 20px 0 8px;
  color: var(--text-primary);
}

p {
  margin-bottom: 16px;
  color: var(--text-secondary);
  font-size: 1.02rem;
}

p strong {
  color: var(--text-primary);
}

ul,
ol {
  margin-bottom: 16px;
  padding-left: 24px;
  color: var(--text-secondary);
}

li {
  margin-bottom: 8px;
}

li strong {
  color: var(--text-primary);
}

.section-title {
  font-size: 1.75rem;
  font-weight: 800;
  letter-spacing: -0.02em;
  margin-bottom: 40px;
  background: linear-gradient(to right, var(--grad-section-start), var(--grad-section-end));
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
  text-align: center;
}

/* ─────────────────────────────────────
   FEATURE CARDS
   ───────────────────────────────────── */
.features-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
  gap: 16px;
  margin: 24px 0 32px;
}

.feature-card {
  background: var(--bg-surface);
  border: 1px solid var(--border-color);
  padding: 24px;
  border-radius: 14px;
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
  transition: all 0.2s ease;
}

.feature-card:hover {
  background: var(--bg-surface-hover);
  border-color: var(--border-hover);
  transform: translateY(-2px);
  box-shadow: var(--shadow-soft);
}

.feature-card h3,
.feature-card h4 {
  font-size: 1.05rem;
  font-weight: 700;
  margin-bottom: 8px;
  color: var(--text-primary);
}

.feature-card p {
  font-size: 0.92rem;
  color: var(--text-secondary);
  margin-bottom: 0;
  line-height: 1.5;
}

.feature-icon {
  width: 44px;
  height: 44px;
  border-radius: 10px;
  background: var(--primary-tint);
  color: var(--color-primary);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.25rem;
  margin-bottom: 20px;
  border: 1px solid var(--primary-tint-strong);
}

/* ─────────────────────────────────────
   TABLES
   ───────────────────────────────────── */
.table-wrapper {
  overflow-x: auto;
  margin: 20px 0 32px;
  border-radius: 12px;
  border: 1px solid var(--border-color);
}

table {
  width: 100%;
  border-collapse: collapse;
  font-size: 0.92rem;
}

thead {
  background: var(--primary-tint);
}

th {
  padding: 12px 16px;
  text-align: left;
  font-weight: 700;
  color: var(--text-primary);
  border-bottom: 1px solid var(--border-color);
  white-space: nowrap;
}

td {
  padding: 10px 16px;
  color: var(--text-secondary);
  border-bottom: 1px solid var(--border-color);
}

tr:last-child td {
  border-bottom: none;
}

tr:hover td {
  background: var(--bg-elevated);
}

td strong {
  color: var(--text-primary);
}

/* ─────────────────────────────────────
   STEPS / WORKFLOW
   ───────────────────────────────────── */
.steps {
  counter-reset: step;
  margin: 24px 0 32px;
}

.step {
  counter-increment: step;
  display: flex;
  gap: 16px;
  margin-bottom: 20px;
  padding: 20px;
  background: var(--bg-surface);
  border: 1px solid var(--border-color);
  border-radius: 12px;
}

.step::before {
  content: counter(step);
  display: flex;
  align-items: center;
  justify-content: center;
  min-width: 36px;
  height: 36px;
  border-radius: 50%;
  background: var(--primary-tint-strong);
  color: var(--color-primary);
  font-weight: 800;
  font-size: 0.95rem;
  flex-shrink: 0;
}

.step-content h3,
.step-content h4 {
  font-size: 1.02rem;
  font-weight: 700;
  margin-bottom: 4px;
  color: var(--text-primary);
}

.step-content p {
  font-size: 0.92rem;
  color: var(--text-secondary);
  margin-bottom: 0;
}

/* ─────────────────────────────────────
   CALLOUTS
   ───────────────────────────────────── */
.callout {
  padding: 20px 24px;
  border-radius: 12px;
  margin: 24px 0;
  border-left: 4px solid;
  background: var(--bg-surface);
}

.callout-info {
  background: var(--primary-tint);
  border-color: var(--color-primary);
}

.callout-success {
  background: rgba(16, 185, 129, 0.06);
  border-color: var(--color-success);
}

.callout-warning {
  background: rgba(245, 158, 11, 0.06);
  border-color: var(--color-warning);
}

.callout p {
  margin-bottom: 8px;
  font-size: 0.98rem;
}

.callout p:last-child {
  margin-bottom: 0;
}

.callout strong {
  color: var(--text-primary);
}

/* ─────────────────────────────────────
   FAQ
   ───────────────────────────────────── */
.faq {
  margin: 48px 0;
}

.faq-item {
  border: 1px solid var(--border-color);
  border-radius: 12px;
  margin-bottom: 12px;
  overflow: hidden;
  background: var(--bg-surface);
}

.faq-question {
  width: 100%;
  padding: 16px 20px;
  background: transparent;
  border: none;
  color: var(--text-primary);
  font-family: var(--font-sans);
  font-size: 1rem;
  font-weight: 600;
  text-align: left;
  cursor: pointer;
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 12px;
  transition: background 0.2s ease;
}

.faq-question:hover {
  background: var(--bg-surface-hover);
}

.faq-question::after {
  content: '+';
  font-size: 1.3rem;
  color: var(--color-primary);
  transition: transform 0.2s ease;
  flex-shrink: 0;
}

.faq-item.open .faq-question::after {
  content: '\2212';
}

.faq-answer {
  padding: 0 20px;
  max-height: 0;
  overflow: hidden;
  transition:
    max-height 0.3s ease,
    padding 0.3s ease;
}

.faq-item.open .faq-answer {
  padding: 0 20px 16px;
  max-height: 600px;
}

.faq-answer p {
  font-size: 0.95rem;
  color: var(--text-secondary);
}

/* ─────────────────────────────────────
   RELATED PAGES / CARD LINKS
   ───────────────────────────────────── */
.related-pages {
  margin: 48px 0 0;
  padding: 28px;
  background: var(--bg-surface);
  border: 1px solid var(--border-color);
  border-radius: 14px;
}

.related-pages > h2 {
  margin-top: 0;
  margin-bottom: 16px;
  font-size: 1.3rem;
  border-bottom: none;
  padding-bottom: 0;
}

.related-pages h3 {
  margin-top: 0;
  margin-bottom: 16px;
  font-size: 1.1rem;
}

.related-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
  gap: 10px;
}

.related-link {
  display: block;
  padding: 10px 14px;
  border: 1px solid var(--border-color);
  border-radius: 8px;
  color: var(--color-primary);
  text-decoration: none;
  font-size: 0.9rem;
  font-weight: 500;
  transition: all 0.2s ease;
  background: var(--bg-soft);
}

.related-link:hover {
  background: var(--primary-tint);
  border-color: var(--primary-tint-strong);
  color: var(--color-primary);
}

.related-link h3,
.related-link h4 {
  margin: 0;
  font-size: 1rem;
  color: var(--text-primary);
}

.related-link p {
  margin: 2px 0 0;
  font-size: 0.82rem;
  color: var(--text-secondary);
}

.guide-card {
  display: block;
  padding: 14px;
  border: 1px solid var(--border-color);
  border-radius: 10px;
  background: var(--bg-soft);
  text-decoration: none;
  transition:
    border-color 0.15s ease,
    background 0.15s ease;
}

.guide-card:hover,
.guide-card:focus-visible {
  border-color: var(--color-primary);
  background: var(--primary-tint);
}

.guide-card:focus-visible {
  outline: 2px solid var(--color-primary);
  outline-offset: 2px;
}

.guide-card-title {
  font-weight: 600;
  color: var(--text-primary);
  margin-bottom: 4px;
}

.guide-card-desc {
  font-size: 0.82rem;
  color: var(--text-secondary);
}

.guides-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(220px, 1fr));
  gap: 14px;
}

/* ─────────────────────────────────────
   PLATFORM BADGES (index)
   ───────────────────────────────────── */
.platforms {
  background: var(--bg-elevated);
  border: 1px solid var(--border-color);
  border-radius: 16px;
  padding: 30px;
  margin-bottom: 60px;
}

.platforms-title {
  font-size: 0.95rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.1em;
  color: var(--text-secondary);
  margin-bottom: 20px;
  text-align: center;
}

.platform-list {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  justify-content: center;
}

.platform-badge {
  font-size: 0.9rem;
  font-weight: 500;
  background: var(--bg-soft);
  border: 1px solid var(--border-color);
  padding: 6px 14px;
  border-radius: 8px;
  color: var(--text-primary);
  text-decoration: none;
  transition: all 0.2s ease;
}

.platform-badge:hover {
  background: var(--bg-soft-hover);
  border-color: var(--border-hover);
  color: var(--text-primary);
}

/* ─────────────────────────────────────
   STORE BUTTONS (index hero)
   ───────────────────────────────────── */
.store-buttons {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 20px;
  margin: 24px 0 16px;
}

.store-btn {
  display: flex;
  align-items: center;
  gap: 14px;
  text-decoration: none;
  padding: 16px 28px;
  border-radius: 12px;
  font-weight: 600;
  font-size: 1rem;
  transition: all 0.25s cubic-bezier(0.4, 0, 0.2, 1);
  border: 1px solid var(--border-color);
  box-shadow: var(--shadow-soft);
  background: var(--bg-soft);
}

.store-btn svg,
.store-btn img {
  width: 24px;
  height: 24px;
  flex-shrink: 0;
  object-fit: contain;
}

.store-btn.firefox {
  background: linear-gradient(135deg, rgba(255, 113, 57, 0.1), rgba(255, 113, 57, 0.03));
  border-color: rgba(255, 113, 57, 0.25);
  color: var(--text-firefox);
}

.store-btn.firefox:hover {
  background: linear-gradient(135deg, rgba(255, 113, 57, 0.18), rgba(255, 113, 57, 0.06));
  border-color: rgba(255, 113, 57, 0.5);
  box-shadow: 0 0 25px var(--color-firefox-glow);
  transform: translateY(-2px);
  color: var(--text-firefox-hover);
}

.store-btn.chrome {
  background: linear-gradient(135deg, rgba(66, 133, 244, 0.1), rgba(66, 133, 244, 0.03));
  border-color: rgba(66, 133, 244, 0.25);
  color: var(--text-chrome);
}

.store-btn.chrome:hover {
  background: linear-gradient(135deg, rgba(66, 133, 244, 0.18), rgba(66, 133, 244, 0.06));
  border-color: rgba(66, 133, 244, 0.5);
  box-shadow: 0 0 25px var(--color-chrome-glow);
  transform: translateY(-2px);
  color: var(--text-chrome-hover);
}

.store-btn.edge {
  background: linear-gradient(135deg, rgba(0, 120, 212, 0.1), rgba(0, 120, 212, 0.03));
  border-color: rgba(0, 120, 212, 0.25);
  color: var(--text-edge);
}

.store-btn.edge:hover {
  background: linear-gradient(135deg, rgba(0, 120, 212, 0.18), rgba(0, 120, 212, 0.06));
  border-color: rgba(0, 120, 212, 0.5);
  box-shadow: 0 0 25px var(--color-edge-blue-glow);
  transform: translateY(-2px);
  color: var(--text-edge-hover);
}

.store-btn.primary-btn {
  padding: 18px 36px;
  font-size: 1.1rem;
}

.btn-label-sub {
  display: block;
  font-size: 0.75rem;
  font-weight: 400;
  color: var(--text-secondary);
  text-align: left;
  margin-bottom: 2px;
}

.btn-label-main {
  display: block;
  font-size: 1.05rem;
  font-weight: 700;
}

.secondary-downloads {
  max-width: 600px;
  margin: 40px auto 80px;
  padding: 24px;
  background: var(--bg-soft);
  border: 1px solid var(--border-color);
  border-radius: 16px;
  text-align: center;
}

.secondary-title {
  font-size: 1rem;
  font-weight: 600;
  color: var(--text-primary);
  margin-bottom: 8px;
}

.secondary-subtitle {
  font-size: 0.9rem;
  color: var(--text-secondary);
  margin-bottom: 0;
  line-height: 1.5;
}

.secondary-subtitle a {
  color: var(--color-primary);
  text-decoration: none;
  font-weight: 500;
}

.secondary-subtitle a:hover {
  text-decoration: underline;
}

.hero-preview-container {
  margin-top: 40px;
  text-align: center;
}

.hero-preview-container img {
  width: 100%;
  max-width: 860px;
  border-radius: 12px;
  border: 1px solid var(--border-hover);
  box-shadow: var(--shadow-strong);
  transition: transform 0.3s ease;
}

/* ─────────────────────────────────────
   VIDEO CARD (index features)
   ───────────────────────────────────── */
.video-card {
  background: rgba(220, 38, 38, 0.05);
  border-color: rgba(239, 68, 68, 0.2);
}

.video-card:hover {
  background: rgba(220, 38, 38, 0.08);
  border-color: rgba(239, 68, 68, 0.3);
}

.video-card .feature-icon {
  background: rgba(239, 68, 68, 0.15);
  color: var(--color-danger);
  border-color: rgba(239, 68, 68, 0.2);
}

.video-card .feature-desc {
  margin-bottom: 16px;
}

.watch-demo-btn {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 8px 14px;
  font-size: 0.85rem;
  background: rgba(220, 38, 38, 0.2);
  border: 1px solid rgba(239, 68, 68, 0.4);
  color: var(--text-primary);
  border-radius: 8px;
  text-decoration: none;
  font-weight: 600;
  transition: all 0.2s ease;
}

.watch-demo-btn:hover {
  background: rgba(220, 38, 38, 0.28);
  border-color: rgba(239, 68, 68, 0.55);
}

/* ─────────────────────────────────────
   FOOTER
   ───────────────────────────────────── */
footer {
  max-width: 1100px;
  margin: 0 auto;
  border-top: 1px solid var(--border-color);
  padding: 32px 20px;
  text-align: center;
  font-size: 0.88rem;
  color: var(--text-muted);
}

footer a {
  color: var(--text-secondary);
  text-decoration: none;
}

footer a:hover {
  color: var(--text-primary);
}

.footer-links {
  display: flex;
  justify-content: center;
  gap: 16px;
  margin-bottom: 12px;
  flex-wrap: wrap;
  align-items: center;
}

.footer-sep {
  color: var(--border-hover);
}

/* ─────────────────────────────────────
   DOCUMENT CARD (privacy / license / etc.)
   ───────────────────────────────────── */
.doc-card {
  max-width: 800px;
  margin: 40px auto 80px;
  background: var(--bg-surface);
  border: 1px solid var(--border-color);
  padding: 40px;
  border-radius: 16px;
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
}

.doc-card header {
  max-width: none;
  margin-bottom: 30px;
  padding: 0 0 20px;
  border-bottom: 1px solid var(--border-color);
  display: block;
}

.doc-card h1 {
  font-size: 2.25rem;
}

.back-link {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  color: var(--color-primary);
  text-decoration: none;
  font-weight: 500;
  margin-bottom: 20px;
  font-size: 0.95rem;
  transition: transform 0.2s ease;
}

.back-link:hover {
  transform: translateX(-3px);
}

.updated-date {
  color: var(--text-secondary);
  font-size: 0.9rem;
  margin-top: 8px;
}

.highlight-box {
  padding: 20px;
  border-radius: 8px;
  margin: 30px 0;
  font-size: 1.02rem;
}

.highlight-box strong {
  color: var(--text-primary);
}

.highlight-box p {
  margin: 0;
}

.highlight-green {
  background: rgba(16, 185, 129, 0.07);
  border-left: 4px solid var(--color-success);
}

.highlight-blue {
  background: var(--primary-tint);
  border-left: 4px solid var(--color-primary);
}

/* ─────────────────────────────────────
   CODE BLOCKS
   ───────────────────────────────────── */
pre {
  background: var(--bg-code);
  border: 1px solid var(--border-color);
  border-radius: 10px;
  padding: 20px;
  overflow-x: auto;
  font-family: var(--font-mono);
  font-size: 0.88rem;
  line-height: 1.6;
  color: var(--text-secondary);
  margin-top: 12px;
  white-space: pre-wrap;
  word-break: break-word;
}

pre code {
  background: none;
  border: none;
  padding: 0;
  font-size: inherit;
}

/* ─────────────────────────────────────
   RESPONSIVE
   ───────────────────────────────────── */
@media (max-width: 640px) {
  h2 {
    font-size: 1.35rem;
  }
  .features-grid {
    grid-template-columns: 1fr;
  }
  .step {
    flex-direction: column;
    gap: 10px;
  }
  header {
    flex-direction: column;
    gap: 12px;
  }
  .nav-links,
  .header-nav {
    flex-wrap: wrap;
    justify-content: center;
  }
  .cta-group {
    flex-direction: column;
  }
  .btn {
    justify-content: center;
  }
  .doc-card {
    padding: 24px;
  }
  .store-buttons {
    flex-direction: column;
    align-items: center;
  }
  .store-btn {
    width: 100%;
    justify-content: center;
  }
}
