*,
*::before,
*::after {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

:root {
  --font-sans: "Inter", "Segoe UI", system-ui, -apple-system, sans-serif;
  --color-bg: #0b1120;
  --color-surface: #111827;
  --color-surface-alt: #0f172a;
  --color-border: rgba(148, 163, 184, 0.2);
  --color-text: #f8fafc;
  --color-muted: #94a3b8;
  --color-primary: #6366f1;
  --color-primary-strong: #4f46e5;
  --color-success: #22c55e;
  --color-warning: #f59e0b;
  --color-danger: #ef4444;
  --radius-sm: 10px;
  --radius-md: 16px;
  --radius-lg: 20px;
  --shadow-sm: 0 10px 30px rgba(15, 23, 42, 0.45);
  --shadow-lg: 0 25px 60px rgba(15, 23, 42, 0.6);
  --transition: 180ms ease;
  --max-width: 1200px;
}

body[data-theme="light"] {
  --color-bg: #f8fafc;
  --color-surface: #ffffff;
  --color-surface-alt: #eef2ff;
  --color-border: rgba(15, 23, 42, 0.12);
  --color-text: #0f172a;
  --color-muted: #475569;
  --shadow-sm: 0 10px 24px rgba(15, 23, 42, 0.08);
  --shadow-lg: 0 20px 40px rgba(15, 23, 42, 0.12);
}

html {
  scroll-behavior: smooth;
}

body {
  font-family: var(--font-sans);
  background: radial-gradient(circle at top, rgba(99, 102, 241, 0.08), transparent 40%),
    var(--color-bg);
  color: var(--color-text);
  line-height: 1.6;
  min-height: 100vh;
}

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

a {
  color: inherit;
  text-decoration: none;
}

button,
input,
select {
  font: inherit;
  color: inherit;
  background: transparent;
  border: none;
  outline: none;
}

button {
  cursor: pointer;
}

input,
select {
  border-radius: var(--radius-sm);
  background: var(--color-surface-alt);
  border: 1px solid var(--color-border);
  padding: 0.65rem 0.75rem;
}

input::placeholder {
  color: var(--color-muted);
}

table {
  border-collapse: collapse;
  width: 100%;
}

canvas {
  width: 100%;
  height: 48px;
}

.container {
  width: min(100% - 3rem, var(--max-width));
  margin: 0 auto;
}

.skip-link {
  position: absolute;
  left: 1.5rem;
  top: -48px;
  background: var(--color-primary);
  color: #fff;
  padding: 0.6rem 1rem;
  border-radius: 10px;
  z-index: 20;
  transition: var(--transition);
}

.skip-link:focus {
  top: 1.2rem;
}

.visually-hidden {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}

@media (prefers-reduced-motion: reduce) {
  * {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
    scroll-behavior: auto !important;
  }
}
