/* LearnClash Website Styles
   Brand: Dark theme, Electric Blue primary, Lexend typography
   Mobile-first, performance-optimized, modern aesthetic */

/* ============================================
   CSS Variables
   ============================================ */
:root {
  /* Brand Palette */
  --color-primary: #2962FF;       /* Electric Blue */
  --color-primary-light: #60A5FA; /* Lighter Accent for Dark Mode */
  --color-primary-dark: #0039CB;
  --color-primary-glow: rgba(41, 98, 255, 0.5);

  --color-accent-coral: #FF4D4D;
  --color-accent-success: #22C55E;
  --color-accent-gold: #FBBF24;

  /* Surfaces & Backgrounds */
  --color-background: #05080F;   /* Deepest Blue/Black */
  --color-surface: #101830;      /* Dark Blue Surface */
  --color-surface-hover: #1A2644;
  --color-surface-glass: rgba(16, 24, 48, 0.6);
  --color-border: rgba(255, 255, 255, 0.08);
  --color-border-hover: rgba(96, 165, 250, 0.3);

  /* Typography Colors */
  --color-text: #F0F9FF;
  --color-text-secondary: #CBD5E1;
  --color-text-muted: #94A3B8;

  /* 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;
  --space-24: 6rem;
  --space-32: 8rem;

  /* Radius */
  --radius-sm: 0.375rem;
  --radius-md: 0.75rem;
  --radius-lg: 1rem;
  --radius-xl: 1.5rem;
  --radius-2xl: 2rem;
  --radius-full: 9999px;

  /* Typography */
  --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;
  --text-6xl: 4rem;

  /* Transitions */
  --transition-fast: 150ms cubic-bezier(0.4, 0, 0.2, 1);
  --transition-base: 250ms cubic-bezier(0.4, 0, 0.2, 1);
  --transition-smooth: 400ms cubic-bezier(0.16, 1, 0.3, 1);

  /* Layout */
  --max-width-content: 1200px;
  --max-width-text: 720px;
  --header-height: 80px;
}

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

html {
  font-size: 16px;
  scroll-behavior: smooth;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

body {
  font-family: 'Lexend', -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
  font-weight: 400;
  line-height: 1.6;
  color: var(--color-text);
  background-color: var(--color-background);
  /* Modern mesh background */
  background-image: 
    radial-gradient(circle at 10% 20%, rgba(41, 98, 255, 0.06), transparent 25%), 
    radial-gradient(circle at 90% 60%, rgba(34, 197, 94, 0.04), transparent 25%);
  background-attachment: fixed;
  overflow-x: hidden;
  min-height: 100vh;
}

::selection {
  background: var(--color-primary);
  color: white;
}

/* ============================================
   Typography
   ============================================ */
h1, h2, h3, h4 {
  font-weight: 700;
  line-height: 1.1;
  color: var(--color-text);
  letter-spacing: -0.025em;
}

h1 {
  font-size: var(--text-5xl);
  font-weight: 800;
  letter-spacing: -0.04em;
  text-wrap: balance;
}

h2 {
  font-size: var(--text-3xl);
  margin-bottom: var(--space-4);
}

h3 {
  font-size: var(--text-xl);
  margin-bottom: var(--space-3);
  font-weight: 600;
}

p {
  color: var(--color-text-secondary);
  margin-bottom: var(--space-4);
  max-width: 65ch;
  font-weight: 400;
}

a {
  color: var(--color-primary-light);
  text-decoration: none;
  transition: color var(--transition-fast);
  cursor: pointer;
}

a:hover {
  color: var(--color-primary);
  text-decoration: underline;
  text-decoration-thickness: 2px;
  text-underline-offset: 4px;
}

.text-gradient {
  background: linear-gradient(135deg, #FFFFFF 0%, var(--color-primary-light) 100%);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
  display: inline-block;
}

.mono {
  font-family: 'JetBrains Mono', monospace;
  letter-spacing: -0.05em;
}

.text-center { text-align: center; }
.text-muted { color: var(--color-text-muted); }

/* ============================================
   Layout
   ============================================ */
.container {
  width: 100%;
  max-width: var(--max-width-content);
  margin: 0 auto;
  padding: 0 var(--space-6);
}

.container--narrow {
  max-width: var(--max-width-text);
}

/* ============================================
   Components
   ============================================ */
/* Buttons / Badges */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: var(--space-2);
  padding: var(--space-3) var(--space-6);
  font-weight: 700;
  font-size: var(--text-base);
  border-radius: var(--radius-full);
  transition: all var(--transition-base);
  text-decoration: none !important;
  border: 1px solid transparent;
  cursor: pointer;
  line-height: 1.5;
}

.btn--primary {
  background: var(--color-primary);
  color: white;
  box-shadow: 0 4px 20px var(--color-primary-glow);
}

.btn--primary:hover {
  background: var(--color-primary-dark);
  transform: translateY(-2px);
  box-shadow: 0 8px 30px var(--color-primary-glow);
}

.btn--danger {
  background: rgba(239, 68, 68, 0.15);
  color: var(--color-accent-coral);
  border-color: rgba(239, 68, 68, 0.3);
}

.btn--danger:hover {
  background: rgba(239, 68, 68, 0.25);
  transform: translateY(-2px);
  box-shadow: 0 4px 20px rgba(239, 68, 68, 0.2);
}

.badge {
  display: inline-flex;
  align-items: center;
  padding: var(--space-2) var(--space-4);
  background: rgba(41, 98, 255, 0.1);
  color: var(--color-primary-light);
  border: 1px solid rgba(41, 98, 255, 0.2);
  border-radius: var(--radius-full);
  font-size: var(--text-sm);
  font-weight: 600;
  margin-bottom: var(--space-6);
  backdrop-filter: blur(8px);
  box-shadow: 0 0 20px rgba(41, 98, 255, 0.15);
  transition: transform var(--transition-base);
}

.badge:hover {
  transform: translateY(-1px);
  background: rgba(41, 98, 255, 0.15);
}

.app-store-badge {
  height: 54px;
  width: auto;
  transition: all var(--transition-base);
  filter: drop-shadow(0 4px 6px rgba(0,0,0,0.2));
}

.app-store-badge:hover {
  transform: translateY(-2px) scale(1.03);
  filter: drop-shadow(0 8px 12px rgba(41, 98, 255, 0.3));
}

/* Alert Box */
.alert {
  padding: var(--space-4) var(--space-6);
  border-radius: var(--radius-lg);
  margin-bottom: var(--space-6);
  border: 1px solid transparent;
  display: flex;
  gap: var(--space-4);
  align-items: flex-start;
}

.alert--warning {
  background: rgba(251, 191, 36, 0.1);
  border-color: rgba(251, 191, 36, 0.2);
  color: var(--color-accent-gold);
}

.alert--danger {
  background: rgba(239, 68, 68, 0.1);
  border-color: rgba(239, 68, 68, 0.2);
  color: var(--color-accent-coral);
}

/* Glass Card */
.card {
  background: var(--color-surface-glass);
  border: 1px solid var(--color-border);
  border-radius: var(--radius-xl);
  padding: var(--space-8);
  transition: all var(--transition-base);
  position: relative;
  overflow: hidden;
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
}

.card:hover {
  transform: translateY(-4px);
  border-color: var(--color-border-hover);
  background: rgba(26, 38, 68, 0.7);
  box-shadow: 0 20px 40px -10px rgba(0,0,0,0.5), 0 0 20px rgba(41, 98, 255, 0.1);
}

.card::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 1px;
  background: linear-gradient(90deg, transparent, rgba(255,255,255,0.1), transparent);
  opacity: 0.5;
}

/* ============================================
   Header
   ============================================ */
.site-header {
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  z-index: 50;
  padding: var(--space-6) 0;
}

.site-header__inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.logo {
  display: flex;
  align-items: center;
  gap: var(--space-3);
  font-weight: 800;
  font-size: var(--text-xl);
  color: var(--color-text);
  text-decoration: none !important;
  letter-spacing: -0.02em;
}

.logo img {
  height: 40px;
  width: 40px;
}

/* ============================================
   Hero Section
   ============================================ */
.hero {
  position: relative;
  padding: calc(var(--header-height) + var(--space-16)) 0 var(--space-16);
  text-align: center;
  overflow: hidden;
}

/* Hero Background Image */
.hero::before {
  content: '';
  position: absolute;
  top: -10%;
  left: 0;
  width: 100%;
  height: 120%;
  background: url('/assets/hero-bg.webp') no-repeat center top;
  background-size: cover;
  opacity: 0.15;
  mask-image: linear-gradient(to bottom, black 0%, transparent 90%);
  -webkit-mask-image: linear-gradient(to bottom, black 0%, transparent 90%);
  z-index: -1;
  pointer-events: none;
}

.hero__content {
  position: relative;
  z-index: 10;
  max-width: 800px;
  margin: 0 auto;
}

.hero h1 {
  margin-bottom: var(--space-6);
  text-shadow: 0 0 40px rgba(41, 98, 255, 0.2);
}

.hero__subtitle {
  font-size: var(--text-lg);
  color: var(--color-text-secondary);
  margin-bottom: var(--space-10);
  max-width: 600px;
  margin-left: auto;
  margin-right: auto;
  line-height: 1.7;
}

/* Mockup */
.hero__mockup {
  margin-top: var(--space-16);
  position: relative;
  z-index: 5;
  perspective: 2000px;
}

.mockup-container {
  background: #000;
  border: 4px solid #333;
  border-radius: 40px;
  max-width: 320px;
  aspect-ratio: 9/19.5;
  margin: 0 auto;
  box-shadow: 
    0 50px 100px -20px rgba(0,0,0,0.7),
    0 0 0 2px rgba(255,255,255,0.1);
  overflow: hidden;
  position: relative;
  transform: rotateX(10deg);
  transition: transform 0.6s cubic-bezier(0.2, 0.8, 0.2, 1);
}

.mockup-container:hover {
  transform: rotateX(0deg) scale(1.02);
}

.mockup-placeholder {
  width: 100%;
  height: 100%;
  display: flex;
  align-items: center;
  justify-content: center;
  background: linear-gradient(180deg, var(--color-surface) 0%, var(--color-background) 100%);
  color: var(--color-text-muted);
  font-family: 'JetBrains Mono', monospace;
  font-size: var(--text-xs);
}

/* ============================================
   Stats Section
   ============================================ */
.stats-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: var(--space-6);
  margin: var(--space-20) auto 0;
  max-width: 900px;
  position: relative;
}

.stat-card {
  text-align: center;
  padding: var(--space-6);
  background: rgba(16, 24, 48, 0.4);
  border: 1px solid var(--color-border);
  border-radius: var(--radius-lg);
  backdrop-filter: blur(10px);
}

.stat-value {
  font-family: 'JetBrains Mono', monospace;
  font-size: var(--text-3xl);
  font-weight: 800;
  margin-bottom: var(--space-1);
}

.stat-label {
  font-size: var(--text-xs);
  color: var(--color-text-muted);
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.1em;
}

/* ============================================
   Features Grid
   ============================================ */
.features {
  padding: var(--space-24) 0;
  position: relative;
}

.features__grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(320px, 1fr));
  gap: var(--space-6);
  margin-top: var(--space-12);
}

.feature-icon {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 64px;
  height: 64px;
  background: linear-gradient(135deg, rgba(41, 98, 255, 0.2), rgba(41, 98, 255, 0.05));
  color: var(--color-primary-light);
  border-radius: var(--radius-lg);
  margin-bottom: var(--space-6);
  border: 1px solid rgba(41, 98, 255, 0.2);
  box-shadow: 0 4px 20px rgba(41, 98, 255, 0.15);
}

/* ============================================
   Timeline / How It Works
   ============================================ */
.how-it-works {
  padding: var(--space-20) 0;
}

.timeline {
  margin-top: var(--space-16);
  position: relative;
  max-width: 800px;
  margin-left: auto;
  margin-right: auto;
}

.timeline::before {
  content: '';
  position: absolute;
  top: 0;
  bottom: 0;
  left: 32px; /* Center of the 64px bubble */
  width: 2px;
  background: linear-gradient(to bottom, var(--color-primary-dark), var(--color-border));
  z-index: 0;
  transform: translateX(-50%);
}

.timeline-step {
  position: relative;
  padding-left: 90px; /* 64px bubble + spacing */
  margin-bottom: var(--space-12);
  min-height: 80px; /* Ensure height for bubble */
}

.timeline-step:last-child {
  margin-bottom: 0;
}

.timeline-number {
  position: absolute;
  left: 0;
  top: 0;
  width: 64px;
  height: 64px;
  background: var(--color-surface);
  border: 2px solid var(--color-primary);
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-family: 'JetBrains Mono', monospace;
  font-weight: 700;
  font-size: var(--text-xl);
  color: var(--color-primary-light);
  z-index: 1;
  box-shadow: 0 0 0 8px var(--color-background), 0 0 20px rgba(41, 98, 255, 0.3);
}

.timeline-content h3 {
  margin-top: var(--space-2); /* Align text visually with bubble center approx */
}

/* ============================================
   CTA Section
   ============================================ */
.cta-section {
  padding: var(--space-24) var(--space-6);
  text-align: center;
  background: radial-gradient(circle at center, rgba(41, 98, 255, 0.15) 0%, transparent 60%);
  border-top: 1px solid var(--color-border);
  border-bottom: 1px solid var(--color-border);
  position: relative;
  overflow: hidden;
}

.cta-section::after {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 1px;
  background: linear-gradient(90deg, transparent, var(--color-primary), transparent);
  opacity: 0.5;
}

.cta-section h2 {
  max-width: 600px;
  margin: 0 auto var(--space-8);
}

/* ============================================
   Footer
   ============================================ */
.site-footer {
  padding: var(--space-12) 0;
  color: var(--color-text-muted);
  font-size: var(--text-sm);
  background: #020408;
  border-top: 1px solid var(--color-border);
}

.footer__content {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: var(--space-6);
  text-align: center;
}

.footer__nav {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: var(--space-8);
}

.footer__nav a {
  color: var(--color-text-secondary);
  text-decoration: none !important;
  font-weight: 500;
}

.footer__nav a:hover {
  color: var(--color-primary-light);
}

/* ============================================
   Mobile Sticky CTA
   ============================================ */
.sticky-cta {
  position: fixed;
  bottom: 0;
  left: 0;
  right: 0;
  padding: var(--space-4);
  background: rgba(5, 8, 15, 0.9);
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
  border-top: 1px solid var(--color-border);
  display: flex;
  justify-content: center;
  z-index: 100;
  transform: translateY(100%);
  transition: transform var(--transition-base);
}

.sticky-cta.is-visible {
  transform: translateY(0);
}

@media (min-width: 769px) {
  .sticky-cta {
    display: none;
  }
}

/* ============================================
   Animations
   ============================================ */
@keyframes fadeInUp {
  from { opacity: 0; transform: translateY(30px); }
  to { opacity: 1; transform: translateY(0); }
}

[data-animate] {
  opacity: 0;
  animation: fadeInUp 0.8s cubic-bezier(0.2, 0.8, 0.2, 1) forwards;
}

.delay-100 { animation-delay: 150ms; }
.delay-200 { animation-delay: 300ms; }
.delay-300 { animation-delay: 450ms; }
.delay-400 { animation-delay: 600ms; }
.delay-500 { animation-delay: 750ms; }

/* ============================================
   Legal Pages Specifics
   ============================================ */
.legal {
  padding-top: calc(var(--header-height) + var(--space-8));
  padding-bottom: var(--space-24);
}

.legal__header {
  margin-bottom: var(--space-10);
  border-bottom: 1px solid var(--color-border);
  padding-bottom: var(--space-8);
}

.legal__updated {
  font-family: 'JetBrains Mono', monospace;
  font-size: var(--text-sm);
  color: var(--color-text-muted);
  margin-top: var(--space-4);
}

.legal__content h2 {
  font-size: var(--text-2xl);
  margin-top: var(--space-12);
  color: var(--color-text);
  border-left: 4px solid var(--color-primary);
  padding-left: var(--space-4);
}

.legal__content ul, .legal__content ol {
  padding-left: var(--space-5);
  margin-bottom: var(--space-6);
  color: var(--color-text-secondary);
}

.legal__content li {
  margin-bottom: var(--space-2);
}

.legal__content table {
  width: 100%;
  border-collapse: collapse;
  font-size: var(--text-sm);
  margin: var(--space-6) 0;
}

.legal__content th {
  background: var(--color-surface);
  text-align: left;
  padding: var(--space-3) var(--space-4);
  font-weight: 700;
  color: var(--color-text);
}

.legal__content td {
  padding: var(--space-3) var(--space-4);
  border-bottom: 1px solid var(--color-border);
  color: var(--color-text-secondary);
}

.legal__back {
  display: inline-flex;
  margin-bottom: var(--space-8);
  font-size: var(--text-sm);
  font-weight: 600;
  color: var(--color-text-muted);
}

.legal__back:hover {
  color: var(--color-primary-light);
  transform: translateX(-4px);
}

/* Support Page */
.support__contact {
  background: linear-gradient(135deg, rgba(41, 98, 255, 0.15), rgba(41, 98, 255, 0.05));
  border: 1px solid rgba(41, 98, 255, 0.3);
  border-radius: var(--radius-lg);
  padding: var(--space-8);
  text-align: center;
  margin-bottom: var(--space-12);
}

.support__email {
  display: block;
  font-size: var(--text-xl);
  font-weight: 700;
  color: var(--color-primary-light);
  margin-top: var(--space-2);
}

.faq__item {
  margin-bottom: var(--space-4);
  background: var(--color-surface);
  border-radius: var(--radius-lg);
  border: 1px solid var(--color-border);
  overflow: hidden;
}

.faq__item[open] {
  border-color: var(--color-border-hover);
}

.faq__question {
  padding: var(--space-5) var(--space-6);
  color: var(--color-text);
  font-size: var(--text-lg);
  font-weight: 600;
  cursor: pointer;
  list-style: none;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: var(--space-4);
  transition: background var(--transition-fast);
}

.faq__question::-webkit-details-marker {
  display: none;
}

.faq__question::after {
  content: '+';
  font-size: var(--text-xl);
  font-weight: 400;
  color: var(--color-text-muted);
  transition: transform var(--transition-fast);
  flex-shrink: 0;
}

.faq__item[open] .faq__question::after {
  content: '−';
  color: var(--color-primary-light);
}

.faq__question:hover {
  background: var(--color-surface-hover);
}

.faq__answer {
  padding: 0 var(--space-6) var(--space-5);
  margin: 0;
}

/* Legal Page Summary */
.legal__summary {
  background: linear-gradient(135deg, rgba(41, 98, 255, 0.1), rgba(41, 98, 255, 0.02));
  border: 1px solid rgba(41, 98, 255, 0.2);
  border-radius: var(--radius-lg);
  padding: var(--space-6);
  margin-bottom: var(--space-8);
}

.legal__summary p {
  margin: 0;
  color: var(--color-text-secondary);
}

/* Legal Page Table of Contents */
.legal__toc {
  background: var(--color-surface);
  border: 1px solid var(--color-border);
  border-radius: var(--radius-lg);
  padding: var(--space-6);
  margin-bottom: var(--space-10);
}

.legal__toc h2 {
  font-size: var(--text-lg);
  margin: 0 0 var(--space-4) 0;
  padding: 0;
  border: none;
  color: var(--color-text);
}

.legal__toc ol {
  margin: 0;
  padding-left: var(--space-6);
  color: var(--color-text-secondary);
  columns: 2;
  column-gap: var(--space-8);
}

.legal__toc li {
  margin-bottom: var(--space-2);
  break-inside: avoid;
}

.legal__toc a {
  color: var(--color-text-secondary);
  font-size: var(--text-sm);
}

.legal__toc a:hover {
  color: var(--color-primary-light);
}

@media (max-width: 600px) {
  .legal__toc ol {
    columns: 1;
  }
}

/* Legal Page Collapsible Sections */
.legal__details {
  background: var(--color-surface);
  border: 1px solid var(--color-border);
  border-radius: var(--radius-md);
  margin-bottom: var(--space-4);
  overflow: hidden;
}

.legal__details summary {
  padding: var(--space-4) var(--space-5);
  cursor: pointer;
  list-style: none;
  display: flex;
  align-items: center;
  gap: var(--space-3);
  color: var(--color-text);
  font-size: var(--text-base);
  transition: background var(--transition-fast);
}

.legal__details summary::-webkit-details-marker {
  display: none;
}

.legal__details summary::before {
  content: '▶';
  font-size: var(--text-xs);
  color: var(--color-text-muted);
  transition: transform var(--transition-fast);
  flex-shrink: 0;
}

.legal__details[open] summary::before {
  transform: rotate(90deg);
}

.legal__details summary:hover {
  background: var(--color-surface-hover);
}

.legal__details > p,
.legal__details > ul {
  padding: 0 var(--space-5) var(--space-5);
  margin: 0;
}

.legal__details > p:first-of-type {
  padding-top: 0;
}

.legal__details ul {
  padding-left: calc(var(--space-5) + var(--space-4));
  margin-bottom: 0;
}

.legal__details li {
  margin-bottom: var(--space-2);
}

.legal__details li:last-child {
  margin-bottom: 0;
}

/* Legal Page Contact Email */
.legal__contact-email {
  margin-top: var(--space-4);
}

.legal__contact-email a {
  display: inline-block;
  font-size: var(--text-xl);
  font-weight: 700;
  color: var(--color-primary-light);
  background: linear-gradient(135deg, rgba(41, 98, 255, 0.15), rgba(41, 98, 255, 0.05));
  border: 1px solid rgba(41, 98, 255, 0.3);
  border-radius: var(--radius-md);
  padding: var(--space-3) var(--space-6);
  transition: all var(--transition-base);
}

.legal__contact-email a:hover {
  background: linear-gradient(135deg, rgba(41, 98, 255, 0.25), rgba(41, 98, 255, 0.1));
  transform: translateY(-2px);
  text-decoration: none;
}

/* Legal Page H3 styling */
.legal__content h3 {
  font-size: var(--text-lg);
  margin-top: var(--space-8);
  margin-bottom: var(--space-4);
  color: var(--color-text);
}

/* Print Styles for Legal Pages */
@media print {
  body {
    background: white;
    color: black;
  }

  .site-header,
  .site-footer,
  .legal__back {
    display: none;
  }

  .legal {
    padding: 0;
    max-width: 100%;
  }

  .legal__content h2 {
    border-left: none;
    padding-left: 0;
    page-break-after: avoid;
  }

  .legal__details {
    background: none;
    border: 1px solid #ccc;
  }

  .legal__details[open] summary,
  .legal__details summary {
    background: none;
  }

  .legal__summary,
  .legal__toc {
    background: #f5f5f5;
    border: 1px solid #ccc;
  }

  a {
    color: black;
    text-decoration: underline;
  }

  a[href]::after {
    content: " (" attr(href) ")";
    font-size: 0.8em;
    color: #666;
  }

  a[href^="#"]::after,
  a[href^="mailto:"]::after {
    content: "";
  }

  table {
    border: 1px solid #ccc;
  }

  th {
    background: #f5f5f5 !important;
  }
}

/* 404 Page */
.error-page {
  min-height: 80vh;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  text-align: center;
  padding: var(--space-6);
}

.error-page__code {
  font-size: var(--text-6xl);
  font-weight: 800;
  color: var(--color-text-muted);
  opacity: 0.2;
  font-family: 'JetBrains Mono', monospace;
  margin-bottom: var(--space-4);
}

/* ============================================
   Responsive
   ============================================ */
@media (min-width: 768px) {
  html { font-size: 16px; }
  
  .footer__content {
    flex-direction: row;
    justify-content: space-between;
    text-align: left;
  }
  
  .timeline::before {
    left: 50%;
    margin-left: 0; /* Centered by transform */
  }
  
  .timeline-step {
    width: 50%;
    padding-left: 0;
    margin-bottom: 0; /* Reset mobile margin */
    padding-bottom: var(--space-16); /* Add desktop spacing */
  }
  
  /* Remove spacing from last item */
  .timeline-step:last-child {
    padding-bottom: 0;
  }
  
  .timeline-step:nth-child(odd) {
    padding-right: 60px;
    text-align: right;
  }
  
  .timeline-step:nth-child(odd) .timeline-number {
    left: auto;
    right: -32px; /* Half of 64px width to center on line */
  }
  
  .timeline-step:nth-child(even) {
    margin-left: 50%;
    padding-left: 60px;
    text-align: left;
  }
  
  .timeline-step:nth-child(even) .timeline-number {
    left: -32px; /* Half of 64px width to center on line */
  }
  
  .timeline-number {
    top: 0; /* Keep at top */
  }
}

@media (max-width: 767px) {
  :root {
    --text-5xl: 2.25rem;
    --text-4xl: 1.875rem;
    --text-3xl: 1.5rem;
  }
  
  .hero {
    padding-top: calc(var(--header-height) + var(--space-10));
  }
  
  .container {
    padding: 0 var(--space-5);
  }
  
  .stats-grid {
    grid-template-columns: 1fr;
    max-width: 240px;
  }
  
  .mockup-container {
    max-width: 240px;
  }
}