/**
 * Master Copy Design System
 * Universal UI/UX Design System Methodology
 * 
 * Color Theme: Dark with Amber Accent
 * Contrast Ratio: WCAG AA compliant (4.5:1 minimum)
 */

/* ========================================
   1. SEMANTIC TOKEN ARCHITECTURE
   ======================================== */

:root {
  /* Color Tokens - HSL Format for flexibility */
  /* Primary - Amber accent color */
  --color-primary-h: 45;
  --color-primary-s: 100%;
  --color-primary-l: 50%;
  --color-primary: hsl(var(--color-primary-h), var(--color-primary-s), var(--color-primary-l));
  --color-primary-hover: hsl(var(--color-primary-h), var(--color-primary-s), 55%);
  --color-primary-dim: hsl(var(--color-primary-h), var(--color-primary-s), 45%);
  --color-primary-subtle: hsl(var(--color-primary-h), var(--color-primary-s), 25%);
  
  /* Surface Colors - Dark theme */
  --color-surface-900: hsl(0, 0%, 8%);    /* Deepest background */
  --color-surface-800: hsl(0, 0%, 10%);   /* Primary background */
  --color-surface-700: hsl(0, 0%, 12%);   /* Secondary background */
  --color-surface-600: hsl(0, 0%, 14%);   /* Tertiary background */
  --color-surface-500: hsl(0, 0%, 16%);   /* Card backgrounds */
  --color-surface-400: hsl(0, 0%, 20%);   /* Hover states */
  --color-surface-300: hsl(0, 0%, 24%);   /* Borders */
  --color-surface-200: hsl(0, 0%, 28%);   /* Light borders */
  --color-surface-100: hsl(0, 0%, 32%);   /* Dividers */
  
  /* Text Colors - WCAG AA compliant */
  --color-text-primary: hsl(0, 0%, 91%);   /* 7.5:1 contrast on surface-800 */
  --color-text-secondary: hsl(0, 0%, 65%); /* 4.6:1 contrast on surface-800 */
  --color-text-tertiary: hsl(0, 0%, 45%);  /* Decorative text */
  --color-text-muted: hsl(0, 0%, 38%);     /* Disabled states */
  
  /* Semantic Tokens - Aliases for clarity */
  --bg-primary: var(--color-surface-800);
  --bg-secondary: var(--color-surface-700);
  --bg-tertiary: var(--color-surface-600);
  --bg-card: var(--color-surface-500);
  --bg-hover: var(--color-surface-400);
  
  --text-primary: var(--color-text-primary);
  --text-secondary: var(--color-text-secondary);
  --text-tertiary: var(--color-text-tertiary);
  --text-muted: var(--color-text-muted);
  
  --accent: var(--color-primary);
  --accent-hover: var(--color-primary-hover);
  --accent-dim: var(--color-primary-dim);
  --accent-subtle: var(--color-primary-subtle);
  
  --border: var(--color-surface-300);
  --border-light: var(--color-surface-200);
  --border-subtle: var(--color-surface-100);
  
  /* Status Colors */
  --success-h: 145; --success-s: 63%; --success-l: 42%;
  --success: hsl(var(--success-h), var(--success-s), var(--success-l));
  --success-subtle: hsl(var(--success-h), var(--success-s), 20%);
  
  --warning-h: 25; --warning-s: 100%; --warning-l: 50%;
  --warning: hsl(var(--warning-h), var(--warning-s), var(--warning-l));
  --warning-subtle: hsl(var(--warning-h), var(--warning-s), 20%);
  
  --error-h: 0; --error-s: 72%; --error-l: 51%;
  --error: hsl(var(--error-h), var(--error-s), var(--error-l));
  --error-subtle: hsl(var(--error-h), var(--error-s), 20%);
  
  --info-h: 200; --info-s: 80%; --info-l: 55%;
  --info: hsl(var(--info-h), var(--info-s), var(--info-l));
  --info-subtle: hsl(var(--info-h), var(--info-s), 20%);
  
  /* ========================================
     2. TYPOGRAPHY HIERARCHY
     ======================================== */
  
  /* Font Stacks */
  --font-sans: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, 'Helvetica Neue', Arial, sans-serif;
  --font-mono: 'SF Mono', 'Monaco', 'Inconsolata', 'Fira Code', monospace;
  
  /* Type Scale - Mobile First (base 16px) */
  --text-3xs: clamp(0.625rem, 0.75vw, 0.75rem);    /* 10-12px - Captions */
  --text-2xs: clamp(0.75rem, 0.875vw, 0.8125rem);  /* 12-13px - Small text */
  --text-xs: clamp(0.8125rem, 1vw, 0.875rem);      /* 13-14px - UI elements */
  --text-sm: clamp(0.875rem, 1.125vw, 0.9375rem);   /* 14-15px - Body small */
  --text-base: clamp(0.9375rem, 1.25vw, 1rem);      /* 15-16px - Body */
  --text-md: clamp(1rem, 1.5vw, 1.125rem);         /* 16-18px - Lead text */
  --text-lg: clamp(1.125rem, 2vw, 1.25rem);        /* 18-20px - Subheading */
  --text-xl: clamp(1.25rem, 2.5vw, 1.5rem);        /* 20-24px - H3 */
  --text-2xl: clamp(1.5rem, 3vw, 1.875rem);        /* 24-30px - H2 */
  --text-3xl: clamp(1.875rem, 4vw, 2.5rem);        /* 30-40px - H1 */
  
  /* Line Heights */
  --leading-none: 1;
  --leading-tight: 1.25;
  --leading-snug: 1.35;
  --leading-normal: 1.5;
  --leading-relaxed: 1.625;
  --leading-loose: 2;
  
  /* Letter Spacing */
  --tracking-tighter: -0.05em;
  --tracking-tight: -0.025em;
  --tracking-normal: 0;
  --tracking-wide: 0.025em;
  --tracking-wider: 0.05em;
  --tracking-widest: 0.1em;
  
  /* Font Weights */
  --font-normal: 400;
  --font-medium: 500;
  --font-semibold: 600;
  --font-bold: 700;
  
  /* ========================================
     3. SPACING SYSTEM (8px base unit)
     ======================================== */
  
  --space-0: 0;
  --space-1: 0.25rem;   /* 4px */
  --space-2: 0.5rem;    /* 8px */
  --space-3: 0.75rem;   /* 12px */
  --space-4: 1rem;      /* 16px */
  --space-5: 1.25rem;   /* 20px */
  --space-6: 1.5rem;    /* 24px */
  --space-8: 2rem;      /* 32px */
  --space-10: 2.5rem;   /* 40px */
  --space-12: 3rem;     /* 48px */
  --space-16: 4rem;     /* 64px */
  --space-20: 5rem;     /* 80px */
  --space-24: 6rem;     /* 96px */
  
  /* Semantic Spacing */
  --space-xs: var(--space-2);
  --space-sm: var(--space-4);
  --space-md: var(--space-6);
  --space-lg: var(--space-8);
  --space-xl: var(--space-12);
  --space-2xl: var(--space-16);
  
  /* ========================================
     4. LAYOUT & RADIUS
     ======================================== */
  
  --radius-sm: 4px;
  --radius-md: 6px;
  --radius-lg: 8px;
  --radius-xl: 12px;
  --radius-2xl: 16px;
  --radius-full: 9999px;
  
  --radius: var(--radius-md);
  
  /* Layout */
  --max-width: 720px;
  --max-width-lg: 960px;
  --max-width-xl: 1200px;
  
  /* ========================================
     5. SHADOWS & EFFECTS
     ======================================== */
  
  --shadow-sm: 0 1px 2px 0 rgba(0, 0, 0, 0.3);
  --shadow-md: 0 4px 6px -1px rgba(0, 0, 0, 0.4), 0 2px 4px -2px rgba(0, 0, 0, 0.3);
  --shadow-lg: 0 10px 15px -3px rgba(0, 0, 0, 0.4), 0 4px 6px -4px rgba(0, 0, 0, 0.3);
  --shadow-xl: 0 20px 25px -5px rgba(0, 0, 0, 0.4), 0 8px 10px -6px rgba(0, 0, 0, 0.3);
  
  --shadow-inset: inset 0 2px 4px 0 rgba(0, 0, 0, 0.3);
  
  /* ========================================
     6. ANIMATION & TRANSITIONS
     ======================================== */
  
  /* Durations */
  --duration-instant: 0ms;
  --duration-fast: 100ms;
  --duration-normal: 200ms;
  --duration-slow: 300ms;
  --duration-slower: 500ms;
  
  /* Easing Functions */
  --ease-linear: linear;
  --ease-in: cubic-bezier(0.4, 0, 1, 1);
  --ease-out: cubic-bezier(0, 0, 0.2, 1);
  --ease-in-out: cubic-bezier(0.4, 0, 0.2, 1);
  --ease-spring: cubic-bezier(0.175, 0.885, 0.32, 1.275);
  
  /* Transition Presets */
  --transition-fast: all var(--duration-fast) var(--ease-out);
  --transition-normal: all var(--duration-normal) var(--ease-out);
  --transition-slow: all var(--duration-slow) var(--ease-out);
  --transition-colors: background-color var(--duration-fast) var(--ease-out),
                       border-color var(--duration-fast) var(--ease-out),
                       color var(--duration-fast) var(--ease-out),
                       fill var(--duration-fast) var(--ease-out),
                       stroke var(--duration-fast) var(--ease-out);
  --transition-transform: transform var(--duration-normal) var(--ease-out);
  --transition-opacity: opacity var(--duration-fast) var(--ease-out);
  
  /* Z-Index Scale */
  --z-base: 0;
  --z-dropdown: 100;
  --z-sticky: 200;
  --z-fixed: 300;
  --z-modal-backdrop: 400;
  --z-modal: 500;
  --z-popover: 600;
  --z-tooltip: 700;
}

/* ========================================
   BASE STYLES & RESET
   ======================================== */

*, *::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;
  text-rendering: optimizeLegibility;
}

body {
  font-family: var(--font-sans);
  font-size: var(--text-base);
  font-weight: var(--font-normal);
  line-height: var(--leading-normal);
  color: var(--text-primary);
  background-color: var(--bg-primary);
  min-height: 100vh;
}

/* Reduced motion support */
@media (prefers-reduced-motion: reduce) {
  html {
    scroll-behavior: auto;
  }
  
  *, *::before, *::after {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
    scroll-behavior: auto !important;
  }
}

/* Focus visible for accessibility */
:focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: 2px;
}

:focus:not(:focus-visible) {
  outline: none;
}

/* ========================================
   TYPOGRAPHY HIERARCHY
   ======================================== */

h1, h2, h3, h4, h5, h6 {
  font-family: var(--font-sans);
  font-weight: var(--font-semibold);
  line-height: var(--leading-tight);
  letter-spacing: var(--tracking-tight);
  color: var(--text-primary);
}

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

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

h3 {
  font-size: var(--text-xl);
  margin-top: var(--space-8);
  margin-bottom: var(--space-3);
  color: var(--text-secondary);
}

h4 {
  font-size: var(--text-lg);
  font-weight: var(--font-medium);
  margin-top: var(--space-6);
  margin-bottom: var(--space-2);
  color: var(--text-secondary);
}

h5, h6 {
  font-size: var(--text-base);
  font-weight: var(--font-medium);
  margin-top: var(--space-4);
  margin-bottom: var(--space-2);
  color: var(--text-tertiary);
  text-transform: uppercase;
  letter-spacing: var(--tracking-widest);
}

p {
  margin-bottom: var(--space-4);
  color: var(--text-secondary);
}

/* Lead paragraph */
.lead {
  font-size: var(--text-md);
  line-height: var(--leading-relaxed);
  color: var(--text-secondary);
}

/* Small text */
.small {
  font-size: var(--text-xs);
  line-height: var(--leading-normal);
}

/* Caption/Meta text */
.caption {
  font-size: var(--text-2xs);
  line-height: var(--leading-snug);
  color: var(--text-muted);
  text-transform: uppercase;
  letter-spacing: var(--tracking-wider);
}

/* ========================================
   LINKS
   ======================================== */

a {
  color: var(--accent);
  text-decoration: none;
  transition: var(--transition-colors);
}

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

a:focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: 2px;
  border-radius: var(--radius-sm);
}

/* ========================================
   LAYOUT COMPONENTS
   ======================================== */

.container {
  max-width: var(--max-width);
  margin: 0 auto;
  padding: var(--space-12) var(--space-6);
  animation: fadeInUp var(--duration-slow) var(--ease-out);
}

@media (max-width: 640px) {
  .container {
    padding: var(--space-8) var(--space-4);
  }
}

/* ========================================
   HEADER COMPONENT
   ======================================== */

.header {
  margin-bottom: var(--space-12);
}

.header-row {
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  margin-bottom: var(--space-2);
  gap: var(--space-4);
  flex-wrap: wrap;
}

.header-title {
  font-size: var(--text-3xl);
  font-weight: var(--font-semibold);
  line-height: var(--leading-tight);
  letter-spacing: var(--tracking-tight);
  color: var(--text-primary);
  margin: 0;
}

.header-subtitle {
  font-size: var(--text-sm);
  color: var(--text-tertiary);
  margin: 0;
}

/* ========================================
   NAVIGATION COMPONENTS
   ======================================== */

.nav-section {
  display: flex;
  gap: var(--space-6);
  margin-bottom: var(--space-8);
  padding-bottom: var(--space-4);
  border-bottom: 1px solid var(--border);
  font-size: var(--text-sm);
}

.nav-section a {
  color: var(--text-tertiary);
  font-weight: var(--font-medium);
  transition: var(--transition-colors);
  padding: var(--space-1) 0;
}

.nav-section a:hover,
.nav-section a:focus {
  color: var(--accent);
}

.nav-section a:focus-visible {
  outline-offset: 4px;
}

.nav-links {
  margin-top: var(--space-12);
  padding-top: var(--space-6);
  border-top: 1px solid var(--border);
  display: flex;
  gap: var(--space-6);
  flex-wrap: wrap;
}

.nav-links a {
  color: var(--text-muted);
  font-size: var(--text-sm);
  transition: var(--transition-colors);
}

.nav-links a:hover,
.nav-links a:focus {
  color: var(--accent);
}

/* ========================================
   CARD COMPONENT & VARIANTS
   ======================================== */

.card {
  background: var(--bg-secondary);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: var(--space-5);
  transition: var(--transition-normal);
}

.card:hover {
  border-color: var(--border-light);
  transform: translateY(-1px);
}

.card-interactive {
  cursor: pointer;
}

.card-interactive:hover {
  border-color: var(--accent-subtle);
}

.card-interactive:focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: 2px;
}

/* Card variants */
.card-elevated {
  box-shadow: var(--shadow-md);
}

.card-elevated:hover {
  box-shadow: var(--shadow-lg);
}

.card-flat {
  background: transparent;
  border: 1px solid var(--border);
}

.card-flat:hover {
  background: var(--bg-secondary);
}

.card-filled {
  background: var(--bg-tertiary);
  border: none;
}

/* Card content */
.card-title {
  font-size: var(--text-lg);
  font-weight: var(--font-semibold);
  color: var(--text-primary);
  margin-bottom: var(--space-2);
}

.card-subtitle {
  font-size: var(--text-xs);
  color: var(--text-tertiary);
  margin-bottom: var(--space-3);
}

.card-desc {
  font-size: var(--text-sm);
  color: var(--text-secondary);
  line-height: var(--leading-relaxed);
}

/* ========================================
   BUTTON COMPONENT & VARIANTS
   ======================================== */

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: var(--space-2);
  padding: var(--space-3) var(--space-5);
  background: var(--accent);
  color: var(--bg-primary);
  border: 1px solid transparent;
  border-radius: var(--radius);
  font-family: var(--font-sans);
  font-size: var(--text-sm);
  font-weight: var(--font-medium);
  line-height: var(--leading-none);
  cursor: pointer;
  transition: var(--transition-normal);
}

.btn:hover {
  background: var(--accent-hover);
  transform: translateY(-1px);
}

.btn:active {
  transform: translateY(0);
}

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

/* Button variants */
.btn-secondary {
  background: transparent;
  border-color: var(--border);
  color: var(--text-secondary);
}

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

.btn-ghost {
  background: transparent;
  border-color: transparent;
  color: var(--text-secondary);
}

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

.btn-danger {
  background: var(--error);
  color: var(--text-primary);
}

.btn-danger:hover {
  background: hsl(var(--error-h), var(--error-s), 60%);
}

/* Button sizes */
.btn-sm {
  padding: var(--space-2) var(--space-3);
  font-size: var(--text-xs);
}

.btn-lg {
  padding: var(--space-4) var(--space-6);
  font-size: var(--text-base);
}

/* Button block */
.btn-block {
  width: 100%;
}

/* ========================================
   FORM COMPONENTS
   ======================================== */

.form-group {
  margin-bottom: var(--space-5);
}

.form-label {
  display: block;
  margin-bottom: var(--space-2);
  font-size: var(--text-sm);
  font-weight: var(--font-medium);
  color: var(--text-secondary);
}

.form-input,
.form-select,
.form-textarea {
  width: 100%;
  padding: var(--space-3) var(--space-4);
  background: var(--bg-secondary);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  color: var(--text-primary);
  font-family: var(--font-sans);
  font-size: var(--text-sm);
  line-height: var(--leading-normal);
  transition: var(--transition-colors);
}

.form-input::placeholder,
.form-textarea::placeholder {
  color: var(--text-muted);
}

.form-input:hover,
.form-select:hover,
.form-textarea:hover {
  border-color: var(--border-light);
}

.form-input:focus,
.form-select:focus,
.form-textarea:focus {
  outline: none;
  border-color: var(--accent);
  background: var(--bg-tertiary);
}

.form-input:focus-visible,
.form-select:focus-visible,
.form-textarea:focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: 2px;
}

.form-textarea {
  min-height: 120px;
  resize: vertical;
}

.form-select {
  cursor: pointer;
  appearance: none;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='12' viewBox='0 0 12 12'%3E%3Cpath fill='%23666' d='M6 8L1 3h10z'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: right var(--space-3) center;
  padding-right: var(--space-8);
}

.form-hint {
  margin-top: var(--space-2);
  font-size: var(--text-xs);
  color: var(--text-muted);
}

/* ========================================
   LANGUAGE SWITCHER
   ======================================== */

.lang-switch {
  display: inline-flex;
  background: var(--bg-secondary);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: var(--space-1);
}

.lang-btn {
  padding: var(--space-2) var(--space-3);
  border-radius: var(--radius-sm);
  font-size: var(--text-xs);
  font-weight: var(--font-medium);
  cursor: pointer;
  border: none;
  background: transparent;
  color: var(--text-muted);
  transition: var(--transition-fast);
}

.lang-btn:hover {
  color: var(--text-primary);
}

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

.lang-btn.active {
  background: var(--accent);
  color: var(--bg-primary);
}

/* Language content toggle */
.lang-ja { display: block; }
.lang-en { display: none; }
html[lang="en"] .lang-ja { display: none; }
html[lang="en"] .lang-en { display: block; }

/* ========================================
   INFO/ALERT BOXES
   ======================================== */

.info-box {
  padding: var(--space-4);
  border-left: 3px solid var(--accent);
  background: var(--bg-secondary);
  border-radius: 0 var(--radius) var(--radius) 0;
}

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

/* Box variants */
.alert-box {
  padding: var(--space-4);
  border-left: 3px solid var(--info);
  background: var(--info-subtle);
  border-radius: 0 var(--radius) var(--radius) 0;
}

.success-box {
  border-left-color: var(--success);
  background: var(--success-subtle);
}

.warning-box {
  border-left-color: var(--warning);
  background: var(--warning-subtle);
}

.error-box {
  border-left-color: var(--error);
  background: var(--error-subtle);
}

/* ========================================
   TABLES
   ======================================== */

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

.table th,
.table td {
  padding: var(--space-3) var(--space-4);
  text-align: left;
  border-bottom: 1px solid var(--border);
}

.table th {
  font-weight: var(--font-semibold);
  color: var(--text-primary);
  font-size: var(--text-xs);
  text-transform: uppercase;
  letter-spacing: var(--tracking-wider);
  background: var(--bg-secondary);
}

.table td {
  color: var(--text-secondary);
}

.table tbody tr:hover {
  background: var(--bg-secondary);
}

/* Table variants */
.table-compact th,
.table-compact td {
  padding: var(--space-2) var(--space-3);
}

.table-bordered {
  border: 1px solid var(--border);
}

.table-bordered th,
.table-bordered td {
  border: 1px solid var(--border);
}

/* ========================================
   CODE & PRE
   ======================================== */

code {
  font-family: var(--font-mono);
  font-size: 0.9em;
  background: var(--bg-tertiary);
  padding: 0.15em 0.4em;
  border-radius: var(--radius-sm);
  color: var(--accent);
}

pre {
  background: var(--bg-tertiary);
  padding: var(--space-4);
  border-radius: var(--radius);
  overflow-x: auto;
  border: 1px solid var(--border);
  margin-bottom: var(--space-6);
}

pre code {
  background: none;
  padding: 0;
  color: var(--text-secondary);
}

/* ========================================
   LISTS
   ======================================== */

.list-unstyled {
  list-style: none;
  margin: 0;
  padding: 0;
}

.list-inline {
  display: flex;
  gap: var(--space-4);
  flex-wrap: wrap;
}

/* ========================================
   UTILITY CLASSES
   ======================================== */

/* Text utilities */
.text-center { text-align: center; }
.text-right { text-align: right; }
.text-left { text-align: left; }

.text-primary { color: var(--text-primary); }
.text-secondary { color: var(--text-secondary); }
.text-tertiary { color: var(--text-tertiary); }
.text-muted { color: var(--text-muted); }
.text-accent { color: var(--accent); }
.text-success { color: var(--success); }
.text-warning { color: var(--warning); }
.text-error { color: var(--error); }

/* Spacing utilities */
.mt-0 { margin-top: var(--space-0); }
.mt-1 { margin-top: var(--space-2); }
.mt-2 { margin-top: var(--space-4); }
.mt-3 { margin-top: var(--space-6); }
.mt-4 { margin-top: var(--space-8); }

.mb-0 { margin-bottom: var(--space-0); }
.mb-1 { margin-bottom: var(--space-2); }
.mb-2 { margin-bottom: var(--space-4); }
.mb-3 { margin-bottom: var(--space-6); }
.mb-4 { margin-bottom: var(--space-8); }

/* ========================================
   ANIMATIONS
   ======================================== */

@keyframes fadeIn {
  from {
    opacity: 0;
  }
  to {
    opacity: 1;
  }
}

@keyframes fadeInUp {
  from {
    opacity: 0;
    transform: translateY(10px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

@keyframes slideIn {
  from {
    opacity: 0;
    transform: translateX(-10px);
  }
  to {
    opacity: 1;
    transform: translateX(0);
  }
}

.animate-fadeIn {
  animation: fadeIn var(--duration-normal) var(--ease-out);
}

.animate-fadeInUp {
  animation: fadeInUp var(--duration-normal) var(--ease-out);
}

.animate-slideIn {
  animation: slideIn var(--duration-normal) var(--ease-out);
}

/* Staggered animation delays */
.stagger-1 { animation-delay: var(--duration-fast); }
.stagger-2 { animation-delay: calc(var(--duration-fast) * 2); }
.stagger-3 { animation-delay: calc(var(--duration-fast) * 3); }
.stagger-4 { animation-delay: calc(var(--duration-fast) * 4); }
.stagger-5 { animation-delay: calc(var(--duration-fast) * 5); }

/* ========================================
   FOOTER
   ======================================== */

.footer {
  border-top: 1px solid var(--border);
  padding: var(--space-8) 0;
  margin-top: var(--space-12);
  text-align: center;
  color: var(--text-muted);
  font-size: var(--text-xs);
}

/* ========================================
   RESPONSIVE UTILITIES
   ======================================== */

@media (max-width: 640px) {
  :root {
    --space-12: 2.5rem;
    --space-16: 3rem;
  }
  
  .header-row {
    flex-direction: column;
    align-items: flex-start;
  }
  
  .nav-section {
    gap: var(--space-4);
    font-size: var(--text-xs);
  }
  
  .nav-links {
    flex-direction: column;
    gap: var(--space-3);
  }
  
  .card {
    padding: var(--space-4);
  }
  
  .table {
    font-size: var(--text-xs);
  }
  
  .table th,
  .table td {
    padding: var(--space-2) var(--space-3);
  }
}

/* ========================================
   PRINT STYLES
   ======================================== */

@media print {
  body {
    background: white;
    color: black;
  }
  
  .no-print {
    display: none !important;
  }
  
  a {
    text-decoration: underline;
    color: black;
  }
  
  pre {
    white-space: pre-wrap;
    word-wrap: break-word;
  }
}
