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

html {
  font-size: 100%;
  -webkit-text-size-adjust: 100%;
  scroll-behavior: smooth;
  scroll-padding-top: var(--space-20);
  text-rendering: optimizeLegibility;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  color-scheme: light dark;
}

body {
  background: var(--color-surface-base);
  color: var(--color-text-primary);
  font-family: var(--font-body);
  font-size: var(--text-base);
  font-weight: var(--weight-body);
  line-height: 1.6;
}

img, video, canvas, svg { display: block; max-width: 100%; }
input, button, textarea, select { font: inherit; color: inherit; }
p, h1, h2, h3, h4 { overflow-wrap: break-word; }
ul { list-style: none; }
a { color: var(--color-interactive); }
[hidden] { display: none !important; }

h1, h2, h3 { font-family: var(--font-display); font-weight: var(--weight-heading); text-wrap: balance; }
h1 { font-size: var(--text-3xl); line-height: 1.1; letter-spacing: -0.03em; }
h2 { font-size: var(--text-2xl); line-height: 1.2; letter-spacing: -0.02em; }
h3 { font-size: var(--text-xl); line-height: 1.3; letter-spacing: -0.01em; }

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

::selection { background: var(--color-accent); color: var(--color-on-accent); }
::-webkit-scrollbar { width: 6px; }
::-webkit-scrollbar-track { background: transparent; }
::-webkit-scrollbar-thumb { background: var(--color-border-default); border-radius: 999px; }

.container {
  width: 100%;
  max-width: var(--container-max);
  margin: 0 auto;
  padding-inline: var(--space-6);
}
@media (min-width: 1024px) { .container { padding-inline: var(--space-8); } }

.grid-12 { display: grid; grid-template-columns: repeat(12, 1fr); gap: var(--space-6); }
.grid-12 > * { grid-column: 1 / -1; }
@media (min-width: 768px) {
  .col-4 { grid-column: span 4; }
  .col-5 { grid-column: span 5; }
  .col-7 { grid-column: span 7; }
  .col-8 { grid-column: span 8; }
}

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

.skip-link {
  position: absolute; left: var(--space-4); top: calc(var(--space-12) * -2);
  z-index: var(--z-toast);
  background: var(--color-surface-overlay); padding: var(--space-3) var(--space-5);
  border-radius: var(--radius-md); box-shadow: var(--shadow-md);
}
.skip-link:focus { top: var(--space-4); }

@media (prefers-reduced-motion: reduce) {
  * { animation-duration: 0.01ms !important; transition-duration: 0.01ms !important; scroll-behavior: auto !important; }
}
@media (min-width: 768px) { .col-3 { grid-column: span 3; } }
