/* ========================================
   App Lite - Modern UI Redesign
   Thai Market + Professional Look
   ======================================== */

/* CSS Variables - Modern Color Palette */
:root {
  /* Base Colors */
  --bg-primary: #080c14;
  --bg-secondary: #0d1526;
  --bg-tertiary: #131d32;
  --bg-card: #0f1a2c;
  --bg-card-hover: #142035;
  
  /* Text Colors */
  --text-primary: #eef4fc;
  --text-secondary: #a8bbd4;
  --text-muted: #6b82a3;
  
  /* Accent Colors */
  --accent-blue: #3b82f6;
  --accent-blue-light: #60a5fa;
  --accent-blue-dark: #2563eb;
  --accent-cyan: #22d3ee;
  --accent-purple: #a855f7;
  --accent-green: #10b981;
  --accent-orange: #f59e0b;
  
  /* Borders & Lines */
  --border-default: #1e2d45;
  --border-hover: #2d4263;
  --border-accent: #3b5078;
  
  /* Gradients */
  --gradient-primary: linear-gradient(135deg, #3b82f6 0%, #2563eb 50%, #1d4ed8 100%);
  --gradient-hero: radial-gradient(ellipse at top right, #1e3a5f 0%, #0d1526 60%, #080c14 100%);
  --gradient-card: linear-gradient(180deg, rgba(59, 130, 246, 0.08) 0%, transparent 100%);
  --gradient-glow: radial-gradient(circle at 50% 0%, rgba(59, 130, 246, 0.15) 0%, transparent 50%);
  
  /* Shadows */
  --shadow-sm: 0 2px 8px rgba(0, 0, 0, 0.3);
  --shadow-md: 0 4px 16px rgba(0, 0, 0, 0.4);
  --shadow-lg: 0 8px 32px rgba(0, 0, 0, 0.5);
  --shadow-glow: 0 0 30px rgba(59, 130, 246, 0.2);
  
  /* Spacing */
  --space-xs: 4px;
  --space-sm: 8px;
  --space-md: 16px;
  --space-lg: 24px;
  --space-xl: 32px;
  --space-2xl: 48px;
  
  /* Border Radius */
  --radius-sm: 6px;
  --radius-md: 10px;
  --radius-lg: 14px;
  --radius-xl: 20px;
  --radius-full: 9999px;
}

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

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  padding: 0;
  font-family: 'Prompt', 'Kanit', 'Sarabun', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
  background: var(--bg-primary);
  color: var(--text-primary);
  line-height: 1.72;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

/* Typography */
h1, h2, h3, h4, h5, h6 {
  font-weight: 600;
  line-height: 1.3;
  margin: 0;
}

h1 {
  font-size: clamp(26px, 4vw, 38px);
  letter-spacing: -0.5px;
}

h2 {
  font-size: clamp(20px, 3vw, 26px);
}

h3 {
  font-size: 18px;
}

p {
  margin: 0 0 14px;
}

a {
  color: var(--accent-blue-light);
  text-decoration: none;
  transition: color 0.2s ease;
}

a:hover {
  color: var(--accent-cyan);
}

/* Focus States for Keyboard Navigation - WCAG 2.1 AA */
a:focus,
.btn:focus {
  outline: 2px solid var(--accent-cyan);
  outline-offset: 2px;
}

a:focus:not(:focus-visible),
.btn:focus:not(:focus-visible) {
  outline: none;
}

a:focus-visible,
.btn:focus-visible {
  outline: 2px solid var(--accent-cyan);
  outline-offset: 2px;
}

/* Page Container */
.page {
  width: min(1200px, 94vw);
  margin: 0 auto;
  padding: var(--space-xl) 0 var(--space-2xl);
}

/* Back Row */
.back-row {
  display: flex;
  flex-wrap: wrap;
  gap: var(--space-sm);
  margin-bottom: var(--space-lg);
}

/* Buttons */
.btn {
  display: inline-flex;
  align-items: center;
  gap: var(--space-sm);
  background: var(--bg-tertiary);
  border: 1px solid var(--border-default);
  color: var(--text-primary);
  padding: 10px 18px;
  border-radius: var(--radius-md);
  font-weight: 500;
  font-size: 14px;
  text-decoration: none;
  transition: all 0.25s cubic-bezier(0.4, 0, 0.2, 1);
  cursor: pointer;
}

.btn:hover {
  text-decoration: none;
  background: var(--bg-card-hover);
  border-color: var(--border-hover);
  transform: translateY(-1px);
}

.btn-primary {
  background: var(--gradient-primary);
  border-color: var(--accent-blue-dark);
  box-shadow: 0 4px 12px rgba(59, 130, 246, 0.3);
}

.btn-primary:hover {
  background: linear-gradient(135deg, #4b92ff 0%, #2563eb 50%, #1d4ed8 100%);
  border-color: var(--accent-blue);
  box-shadow: 0 6px 20px rgba(59, 130, 246, 0.4);
  transform: translateY(-2px);
}

/* Hero Section */
.hero {
  background: var(--gradient-hero);
  border: 1px solid var(--border-default);
  border-radius: var(--radius-xl);
  padding: var(--space-xl);
  margin-bottom: var(--space-xl);
  position: relative;
  overflow: hidden;
}

.hero::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: var(--gradient-glow);
  pointer-events: none;
}

.hero-grid {
  display: grid;
  grid-template-columns: 1.2fr 0.8fr;
  gap: var(--space-xl);
  align-items: center;
  position: relative;
}

.hero-copy {
  position: relative;
  z-index: 1;
}

.kicker {
  display: inline-block;
  margin: 0 0 10px;
  color: var(--accent-cyan);
  font-size: 13px;
  font-weight: 600;
  letter-spacing: 1px;
  text-transform: uppercase;
}

.hero .lead {
  color: var(--text-secondary);
  font-size: 16px;
  line-height: 1.7;
  margin-bottom: var(--space-lg);
}

.cta-row {
  display: flex;
  flex-wrap: wrap;
  gap: var(--space-md);
  margin-top: var(--space-lg);
}

/* Stat Strip */
.stat-strip {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: var(--space-md);
  margin-top: var(--space-xl);
}

.stat-pill {
  background: var(--bg-card);
  border: 1px solid var(--border-default);
  border-radius: var(--radius-lg);
  padding: var(--space-md);
  transition: all 0.3s ease;
}

.stat-pill:hover {
  border-color: var(--border-accent);
  transform: translateY(-2px);
}

.stat-pill strong {
  display: block;
  color: var(--text-primary);
  font-size: 14px;
  margin-bottom: 6px;
}

.stat-pill span {
  color: var(--text-muted);
  font-size: 13px;
  line-height: 1.5;
}

/* Cards */
.card {
  background: var(--bg-card);
  border: 1px solid var(--border-default);
  border-radius: var(--radius-lg);
  padding: var(--space-lg);
  transition: all 0.3s ease;
}

.card:hover {
  border-color: var(--border-hover);
  box-shadow: var(--shadow-md);
}

.card h2 {
  margin-bottom: var(--space-md);
  color: var(--text-primary);
}

.card h3 {
  margin-bottom: var(--space-sm);
  color: var(--text-primary);
}

.card p {
  color: var(--text-secondary);
  line-height: 1.65;
}

.card ul, .card ol {
  color: var(--text-secondary);
  margin: var(--space-sm) 0;
  padding-left: 22px;
  line-height: 1.75;
}

.card li {
  margin: 6px 0;
  line-height: 1.6;
}

/* Tabs Grid - Feature Cards */
.tabs-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: var(--space-md);
}

.tab-card {
  background: var(--bg-card);
  border: 1px solid var(--border-default);
  border-radius: var(--radius-lg);
  padding: var(--space-md);
  transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
  display: flex;
  flex-direction: column;
}

.tab-card:hover {
  background: var(--bg-card-hover);
  border-color: var(--accent-blue);
  transform: translateY(-4px);
  box-shadow: var(--shadow-glow);
}

.tab-card img {
  display: block;
  width: 100%;
  height: auto;
  border: 1px solid var(--border-default);
  border-radius: var(--radius-md);
  background: var(--bg-secondary);
  margin-bottom: var(--space-md);
  transition: transform 0.3s ease;
}

.tab-card:hover img {
  transform: scale(1.02);
}

.tab-card h3 {
  margin: 0 0 var(--space-xs);
  color: var(--text-primary);
  font-size: 17px;
}

.tab-card p {
  margin: 0 0 var(--space-md);
  color: var(--text-muted);
  font-size: 14px;
  flex-grow: 1;
}

.tab-card a {
  font-weight: 600;
  font-size: 14px;
  color: var(--accent-blue-light);
}

.tab-card a:hover {
  color: var(--accent-cyan);
}

/* Grid Layouts */
.grid-2 {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: var(--space-md);
  margin-bottom: var(--space-xl);
}

/* Callout Box */
.callout {
  margin: 0 0 var(--space-xl);
  padding: var(--space-lg);
  background: linear-gradient(180deg, rgba(59, 130, 246, 0.1) 0%, rgba(59, 130, 246, 0.03) 100%);
  border: 1px solid rgba(59, 130, 246, 0.3);
  border-left: 4px solid var(--accent-blue);
  border-radius: var(--radius-lg);
  color: var(--text-primary);
  line-height: 1.6;
}

.callout strong {
  color: var(--accent-blue-light);
}

/* Section Head */
.section-head {
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  gap: var(--space-md);
  align-items: flex-start;
  margin-bottom: var(--space-lg);
}

.eyebrow {
  display: inline-block;
  margin: 0 0 6px;
  color: var(--accent-cyan);
  font-size: 12px;
  font-weight: 600;
  letter-spacing: 1px;
  text-transform: uppercase;
}

/* Subgrid */
.subgrid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: var(--space-md);
  margin-top: var(--space-md);
}

.subcard {
  background: var(--bg-tertiary);
  border: 1px solid var(--border-default);
  border-radius: var(--radius-md);
  padding: var(--space-md);
  transition: all 0.3s ease;
}

.subcard:hover {
  border-color: var(--border-accent);
}

.subcard h3 {
  margin-top: 0;
  margin-bottom: var(--space-sm);
  font-size: 16px;
  color: var(--text-primary);
}

.subcard p, .subcard ul, .subcard ol {
  color: var(--text-secondary);
  font-size: 14px;
}

/* Quick Grid */
.quick-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: var(--space-md);
}

/* Step Cards */
.step-card {
  background: linear-gradient(180deg, rgba(59, 130, 246, 0.08) 0%, rgba(59, 130, 246, 0.02) 100%);
  border: 1px solid rgba(59, 130, 246, 0.2);
  border-left: 4px solid var(--accent-blue);
  border-radius: var(--radius-lg);
  padding: var(--space-md);
  transition: all 0.3s ease;
}

.step-card:hover {
  border-color: var(--accent-blue);
  transform: translateX(4px);
}

.step-card h3 {
  margin-top: 0;
  margin-bottom: var(--space-sm);
  font-size: 16px;
  color: var(--text-primary);
}

.step-card p, .step-card ul, .step-card ol {
  color: var(--text-secondary);
  font-size: 14px;
}

/* Guide Layout */
.guide-layout {
  display: grid;
  grid-template-columns: 280px minmax(0, 1fr);
  gap: var(--space-xl);
  align-items: start;
}

.toc {
  position: sticky;
  top: var(--space-xl);
  background: var(--bg-card);
  border: 1px solid var(--border-default);
  border-radius: var(--radius-lg);
  padding: var(--space-lg);
}

.toc h2 {
  font-size: 18px;
  margin-bottom: var(--space-md);
}

.anchor-list {
  list-style: none;
  padding: 0;
  margin: 0;
  display: flex;
  flex-direction: column;
  gap: var(--space-sm);
}

.anchor-list a {
  display: block;
  padding: 12px var(--space-md);
  border-radius: var(--radius-md);
  background: var(--bg-tertiary);
  border: 1px solid var(--border-default);
  color: var(--text-secondary);
  font-size: 14px;
  transition: all 0.25s ease;
}

.anchor-list a:hover {
  text-decoration: none;
  background: var(--bg-card-hover);
  border-color: var(--accent-blue);
  color: var(--text-primary);
  transform: translateX(4px);
}

/* Section Block */
.section-block {
  margin-bottom: var(--space-xl);
}

/* Image & Figure */
.shot, .shot-compact {
  margin: 0;
  background: var(--bg-secondary);
  border: 1px solid var(--border-default);
  border-radius: var(--radius-lg);
  overflow: hidden;
  transition: all 0.3s ease;
}

.shot:hover, .shot-compact:hover {
  box-shadow: var(--shadow-lg);
  transform: scale(1.01);
}

.shot img, .shot-compact img {
  display: block;
  width: 100%;
  height: auto;
}

.shot figcaption, .shot-compact figcaption {
  padding: var(--space-md);
  border-top: 1px solid var(--border-default);
  color: var(--text-muted);
  font-size: 14px;
  line-height: 1.75;
}

/* Mini Callout */
.mini-callout {
  margin: 0 0 var(--space-md);
  padding: var(--space-md);
  background: var(--bg-tertiary);
  border: 1px solid var(--border-accent);
  border-radius: var(--radius-md);
  color: var(--text-secondary);
  line-height: 1.85;
  font-size: 15px;
}

/* Check List */
.check-list {
  list-style: none;
  padding: 0;
  margin: var(--space-sm) 0 0;
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.check-list li {
  padding: 12px var(--space-md);
  background: var(--bg-card);
  border: 1px solid var(--border-default);
  border-radius: var(--radius-sm);
  color: var(--text-secondary);
  font-size: 14px;
  line-height: 1.8;
}

/* Tags */
.tag-row {
  display: flex;
  flex-wrap: wrap;
  gap: var(--space-sm);
  margin-top: var(--space-md);
}

.tag {
  display: inline-block;
  padding: 5px 12px;
  border-radius: var(--radius-full);
  background: rgba(59, 130, 246, 0.15);
  border: 1px solid rgba(59, 130, 246, 0.3);
  color: var(--accent-blue-light);
  font-size: 12px;
  font-weight: 500;
}

/* Code */
code {
  background: var(--bg-primary);
  border: 1px solid var(--border-default);
  border-radius: var(--radius-sm);
  padding: 2px 6px;
  color: var(--accent-cyan);
  font-family: 'Consolas', 'Monaco', monospace;
  font-size: 13px;
}

pre {
  margin: var(--space-sm) 0 0;
  padding: var(--space-md);
  background: var(--bg-primary);
  border: 1px solid var(--border-default);
  border-radius: var(--radius-md);
  color: var(--text-primary);
  overflow-x: auto;
  line-height: 1.7;
  white-space: pre-wrap;
  font-family: 'Consolas', 'Monaco', monospace;
  font-size: 13px;
}

/* Hero Points */
.hero-points {
  margin: var(--space-md) 0 0;
  padding-left: 20px;
  color: var(--text-secondary);
}

.hero-points li {
  margin: 8px 0;
  line-height: 1.65;
}

/* Note */
.note {
  color: var(--text-muted);
  font-size: 13px;
  line-height: 1.6;
}

/* Footer */
.footer {
  margin-top: var(--space-xl);
  padding-top: var(--space-lg);
  border-top: 1px solid var(--border-default);
  color: var(--text-muted);
  font-size: 14px;
  text-align: center;
}

/* Reading Card */
.reading-card h3 {
  line-height: 1.55;
  margin-bottom: 10px;
}

.reading-card p {
  font-size: 15px;
  line-height: 1.9;
  letter-spacing: 0.01em;
}

.reading-card li {
  line-height: 1.85;
  letter-spacing: 0.01em;
}

/* Badge */
.badge {
  display: inline-block;
  font-size: 11px;
  font-weight: 600;
  padding: 4px 10px;
  border-radius: var(--radius-full);
  background: rgba(34, 211, 238, 0.1);
  border: 1px solid rgba(34, 211, 238, 0.3);
  color: var(--accent-cyan);
  text-transform: uppercase;
  letter-spacing: 0.5px;
}

/* Meta */
.meta {
  color: var(--text-muted);
  font-size: 13px;
}

/* Responsive Design */
@media (max-width: 1024px) {
  .hero-grid, .guide-layout {
    grid-template-columns: 1fr;
  }
  
  .guide-layout .toc {
    position: static;
  }
  
  .stat-strip {
    grid-template-columns: 1fr;
  }
  
  .tabs-grid {
    grid-template-columns: repeat(2, 1fr);
  }
  
  .quick-grid, .subgrid {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 768px) {
  .page {
    padding: var(--space-lg) var(--space-md);
  }
  
  .hero {
    padding: var(--space-lg);
  }
  
  .grid-2 {
    grid-template-columns: 1fr;
  }
  
  .tabs-grid {
    grid-template-columns: 1fr;
  }
  
  .cta-row {
    flex-direction: column;
  }
  
  .cta-row .btn {
    width: 100%;
    justify-content: center;
  }
}

@media (max-width: 480px) {
  .card, .hero, .subcard, .step-card {
    padding: var(--space-md);
  }
  
  h1 {
    font-size: 24px;
  }
  
  h2 {
    font-size: 20px;
  }
  
  .btn {
    padding: 8px 14px;
    font-size: 13px;
  }
}

/* Animation Keyframes */
@keyframes fadeInUp {
  from {
    opacity: 0;
    transform: translateY(20px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

@keyframes pulse {
  0%, 100% {
    opacity: 1;
  }
  50% {
    opacity: 0.7;
  }
}

.hero {
  animation: fadeInUp 0.6s ease-out;
}

.card {
  animation: fadeInUp 0.6s ease-out;
  animation-fill-mode: both;
}

.card:nth-child(1) { animation-delay: 0.1s; }
.card:nth-child(2) { animation-delay: 0.2s; }

.tab-card {
  animation: fadeInUp 0.5s ease-out;
  animation-fill-mode: both;
}

.tab-card:nth-child(1) { animation-delay: 0.05s; }
.tab-card:nth-child(2) { animation-delay: 0.1s; }
.tab-card:nth-child(3) { animation-delay: 0.15s; }
.tab-card:nth-child(4) { animation-delay: 0.2s; }
.tab-card:nth-child(5) { animation-delay: 0.25s; }
.tab-card:nth-child(6) { animation-delay: 0.3s; }
.tab-card:nth-child(7) { animation-delay: 0.35s; }
.tab-card:nth-child(8) { animation-delay: 0.4s; }
.tab-card:nth-child(9) { animation-delay: 0.45s; }

/* Scrollbar Styling */
::-webkit-scrollbar {
  width: 8px;
  height: 8px;
}

::-webkit-scrollbar-track {
  background: var(--bg-secondary);
}

::-webkit-scrollbar-thumb {
  background: var(--border-accent);
  border-radius: var(--radius-full);
}

::-webkit-scrollbar-thumb:hover {
  background: var(--accent-blue);
}

/* Selection */
::selection {
  background: rgba(59, 130, 246, 0.3);
  color: var(--text-primary);
}

/* ========================================
   JavaScript-Enhanced Styles
   ======================================== */

/* Card Hover - Enhanced */
.tab-card.hovered,
.card.hovered,
.step-card.hovered,
.subcard.hovered {
  transform: translateY(-6px);
  box-shadow: var(--shadow-glow);
  border-color: var(--accent-blue);
}

/* Card Focus - Keyboard Navigation */
.tab-card.focused,
.card.focused,
.step-card.focused,
.subcard.focused {
  outline: 2px solid var(--accent-cyan);
  outline-offset: 2px;
}

/* Loading Button State */
.btn.loading,
.btn.btn-loading {
  pointer-events: none;
  opacity: 0.8;
}

.btn .loader {
  display: inline-block;
  width: 14px;
  height: 14px;
  border: 2px solid transparent;
  border-top-color: currentColor;
  border-radius: 50%;
  animation: spin 0.8s linear infinite;
  margin-right: 6px;
}

@keyframes spin {
  to {
    transform: rotate(360deg);
  }
}

/* Mobile Toggle Button */
.mobile-toggle {
  display: none;
  flex-direction: column;
  justify-content: center;
  align-items: center;
  width: 40px;
  height: 40px;
  background: var(--bg-tertiary);
  border: 1px solid var(--border-default);
  border-radius: var(--radius-md);
  cursor: pointer;
  padding: 8px;
  gap: 4px;
}

.mobile-toggle span {
  display: block;
  width: 20px;
  height: 2px;
  background: var(--text-primary);
  transition: all 0.3s ease;
}

.mobile-toggle.active span:nth-child(1) {
  transform: rotate(45deg) translate(4px, 4px);
}

.mobile-toggle.active span:nth-child(2) {
  opacity: 0;
}

.mobile-toggle.active span:nth-child(3) {
  transform: rotate(-45deg) translate(4px, -4px);
}

@media (max-width: 768px) {
  .mobile-toggle {
    display: flex;
  }
}

/* Skip Link */
.skip-link {
  position: absolute;
  top: -100px;
  left: 50%;
  transform: translateX(-50%);
  background: var(--accent-blue);
  color: var(--text-primary);
  padding: 12px 24px;
  border-radius: var(--radius-md);
  text-decoration: none;
  font-weight: 600;
  z-index: 10000;
  transition: top 0.3s ease;
}

.skip-link:focus {
  top: 10px;
  outline: 2px solid var(--accent-cyan);
  outline-offset: 2px;
}

/* Breadcrumb Navigation */
.breadcrumb {
  margin-bottom: var(--space-lg);
}

.breadcrumb ol {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: var(--space-sm);
  padding: 0;
  margin: 0;
  list-style: none;
}

.breadcrumb li {
  display: flex;
  align-items: center;
  gap: var(--space-sm);
  color: var(--text-muted);
  font-size: 14px;
}

.breadcrumb li + li::before {
  content: "›";
  color: var(--border-accent);
  font-size: 16px;
}

.breadcrumb a {
  color: var(--text-secondary);
  text-decoration: none;
  transition: color 0.2s ease;
}

.breadcrumb a:hover {
  color: var(--accent-blue-light);
  text-decoration: underline;
}

.breadcrumb li[aria-current="page"] {
  color: var(--text-primary);
  font-weight: 500;
}

/* Tooltip Styles */
[data-tooltip] {
  position: relative;
  cursor: help;
}

[data-tooltip]::after {
  content: attr(data-tooltip);
  position: absolute;
  bottom: 100%;
  left: 50%;
  transform: translateX(-50%) translateY(-8px);
  background: var(--bg-primary);
  border: 1px solid var(--border-accent);
  color: var(--text-secondary);
  padding: 8px 12px;
  border-radius: var(--radius-md);
  font-size: 13px;
  white-space: nowrap;
  opacity: 0;
  visibility: hidden;
  transition: all 0.2s ease;
  z-index: 1000;
  box-shadow: var(--shadow-md);
}

[data-tooltip]:hover::after {
  opacity: 1;
  visibility: visible;
  transform: translateX(-50%) translateY(-4px);
}

/* Help Icon */
.help-icon {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 18px;
  height: 18px;
  background: var(--bg-tertiary);
  border: 1px solid var(--border-default);
  border-radius: 50%;
  color: var(--text-muted);
  font-size: 11px;
  font-weight: 600;
  margin-left: var(--space-xs);
  cursor: help;
  transition: all 0.2s ease;
}

.help-icon:hover {
  background: var(--accent-blue);
  border-color: var(--accent-blue);
  color: var(--text-primary);
}

/* Contextual Help Box */
.help-box {
  margin: var(--space-md) 0;
  padding: var(--space-md);
  background: var(--bg-tertiary);
  border: 1px dashed var(--border-accent);
  border-radius: var(--radius-md);
  color: var(--text-secondary);
  font-size: 14px;
  line-height: 1.6;
}

.help-box strong {
  color: var(--accent-cyan);
}

.help-box .icon {
  margin-right: var(--space-sm);
}

/* Scroll Animation Base */
.animate-on-scroll {
  opacity: 0;
  transform: translateY(30px);
  transition: opacity 0.6s ease-out, transform 0.6s ease-out;
}

.animate-on-scroll.visible {
  opacity: 1;
  transform: translateY(0);
}

/* Staggered animations based on index */
.tab-card.animate-on-scroll[style*="--animation-index: 0"],
.tab-card:nth-child(1).animate-on-scroll {
  transition-delay: 0.05s;
}

.tab-card.animate-on-scroll[style*="--animation-index: 1"],
.tab-card:nth-child(2).animate-on-scroll {
  transition-delay: 0.1s;
}

.tab-card.animate-on-scroll[style*="--animation-index: 2"],
.tab-card:nth-child(3).animate-on-scroll {
  transition-delay: 0.15s;
}

.tab-card.animate-on-scroll[style*="--animation-index: 3"],
.tab-card:nth-child(4).animate-on-scroll {
  transition-delay: 0.2s;
}

.tab-card.animate-on-scroll[style*="--animation-index: 4"],
.tab-card:nth-child(5).animate-on-scroll {
  transition-delay: 0.25s;
}

.tab-card.animate-on-scroll[style*="--animation-index: 5"],
.tab-card:nth-child(6).animate-on-scroll {
  transition-delay: 0.3s;
}

.tab-card.animate-on-scroll[style*="--animation-index: 6"],
.tab-card:nth-child(7).animate-on-scroll {
  transition-delay: 0.35s;
}

.tab-card.animate-on-scroll[style*="--animation-index: 7"],
.tab-card:nth-child(8).animate-on-scroll {
  transition-delay: 0.4s;
}

.tab-card.animate-on-scroll[style*="--animation-index: 8"],
.tab-card:nth-child(9).animate-on-scroll {
  transition-delay: 0.45s;
}

/* Section Block Animation */
.section-block.animate-on-scroll {
  transition-delay: calc(var(--animation-index, 0) * 0.08s);
}

/* Mobile Menu */
.mobile-menu {
  display: none;
}

@media (max-width: 1024px) {
  .mobile-menu {
    display: block;
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: var(--bg-primary);
    padding: 80px 20px 20px;
    z-index: 999;
    overflow-y: auto;
  }

  .mobile-menu[aria-hidden="true"] {
    display: none;
  }

  .mobile-menu .anchor-list {
    position: static;
    background: transparent;
    border: none;
    padding: 0;
  }

  .mobile-menu-toggle {
    display: flex;
  }

  .toc {
    display: none;
  }
}

@media (max-width: 1024px) {
  .mobile-menu.active + main .toc {
    display: none;
  }
}

/* JavaScript loaded state */
body.js-loaded .hero {
  animation-name: fadeInUp;
}

body.js-loaded .card {
  animation-name: fadeInUp, fadeInUp;
}
