:root {
  color-scheme: light dark;
  --header-transition: 0.12s;
  --bg-surface: #0f172a;
  --bg-surface-light: #ffffff;
  --text-color: #0b1425;
  --text-on-dark: #f8fafc;
  --accent: #1d4ed8;
  --muted: #5f6b8b;
  --border-subtle: rgba(15, 23, 42, 0.12);
}

body {
  margin: 0;
  font-family: "Inter", system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  color: var(--text-color);
  background: var(--bg-surface-light);
  line-height: 1.6;
  direction: var(--flow-dir, ltr);
}

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

a:focus-visible,
button:focus-visible,
[role="button"]:focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: 2px;
}

[data-auto-hide-header] {
  position: sticky;
  top: 0;
  z-index: 100;
  background: var(--bg-surface-light);
  transition: transform var(--header-transition) ease, opacity var(--header-transition) ease;
  will-change: transform;
}

.header--hidden {
  transform: translateY(-100%);
  opacity: 0;
}

@media (prefers-reduced-motion: reduce) {
  [data-auto-hide-header],
  .header--hidden {
    transition: none;
  }
}

.m-0 { margin: 0; }
.p-0 { padding: 0; }
.text-muted { color: var(--muted); }
.grid { display: grid; }
.flex { display: flex; }
.gap-sm { gap: 0.75rem; }
.gap-md { gap: 1.5rem; }

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