/* Reset and layout primitives */
*, *::before, *::after { box-sizing: border-box; }
html { scroll-behavior: smooth; }

body {
  margin: 0;
  min-height: 100vh;
  background: linear-gradient(180deg, var(--bg-0), var(--bg-1) 48%, var(--bg-2));
  color: var(--text);
  font: 15px/1.55 var(--font-sans);
}

a { color: var(--accent); text-decoration: none; }
a:hover { text-decoration: underline; }

.skip-link {
  position: absolute;
  left: -9999px;
  top: auto;
  width: 1px;
  height: 1px;
  overflow: hidden;
  z-index: 100;
  padding: var(--space-sm) var(--space-lg);
  background: var(--surface);
  color: var(--text);
  border: 2px solid var(--border-focus);
  border-radius: var(--radius-sm);
}
.skip-link:focus {
  position: fixed;
  left: var(--space-lg);
  top: var(--space-lg);
  width: auto;
  height: auto;
}

.site-shell {
  width: min(1560px, calc(100% - 32px));
  margin: 0 auto;
  padding: 18px 0 36px;
  display: grid;
  grid-template-columns: 280px minmax(0, 1fr);
  gap: var(--space-lg);
  position: relative;
}

.sidebar {
  position: sticky;
  top: 20px;
  height: fit-content;
  display: grid;
  gap: var(--space-md);
}

.page { min-width: 0; }

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

[hidden] { display: none !important; }

@media (max-width: 1240px) {
  .site-shell { grid-template-columns: 1fr; }
  .sidebar { position: static; }
}

@media (max-width: 920px) {
  .site-shell { width: min(1560px, calc(100% - 20px)); }
}

@media (max-width: 480px) {
  body { font-size: 14px; }
}

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after {
    animation-duration: 0.01ms !important;
    transition-duration: 0.01ms !important;
  }
}
