*, *::before, *::after { box-sizing: border-box; }
html, body { height: 100%; margin: 0; }
body {
  font-family: var(--font);
  font-size: 14px;
  line-height: 1.45;
  color: var(--text);
  background: var(--bg);
  -webkit-font-smoothing: antialiased;
}
h1, h2, h3, h4 { margin: 0 0 .5rem; line-height: 1.25; font-weight: 600; }
h1 { font-size: 1.35rem; }
h2 { font-size: 1.1rem; }
h3 { font-size: 1rem; }
h4 { font-size: .9rem; }
p { margin: 0 0 .75rem; }
a { color: var(--brand-strong); text-decoration: none; }
[data-theme='dark'] a { color: var(--brand-accent); }
a:hover { text-decoration: underline; }
button, input, select, textarea { font: inherit; color: inherit; }
img, svg { display: block; }
code, .mono { font-family: var(--font-mono); font-size: .85em; }
hr { border: 0; border-top: 1px solid var(--border-soft); margin: 1rem 0; }

:focus-visible { outline: none; box-shadow: var(--focus); border-radius: 4px; }

.skip-link {
  position: absolute; left: 8px; top: -60px; z-index: 1000;
  background: var(--brand); color: #fff; padding: 8px 12px; border-radius: var(--radius-sm);
}
.skip-link:focus { top: 8px; }

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

.muted { color: var(--muted); }
.small { font-size: .82rem; }
.xsmall { font-size: .74rem; }
.strong { font-weight: 600; }
.nowrap { white-space: nowrap; }
.truncate { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; min-width: 0; }
.row { display: flex; align-items: center; gap: .5rem; }
.row-wrap { display: flex; flex-wrap: wrap; align-items: center; gap: .5rem; }
.col { display: flex; flex-direction: column; gap: .5rem; }
.spacer { flex: 1; }
.grid { display: grid; gap: 1rem; }
.grid-2 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
.grid-3 { grid-template-columns: repeat(3, minmax(0, 1fr)); }
.grid-4 { grid-template-columns: repeat(4, minmax(0, 1fr)); }
.mt-0 { margin-top: 0; } .mt-1 { margin-top: .5rem; } .mt-2 { margin-top: 1rem; }
.mb-0 { margin-bottom: 0; } .mb-1 { margin-bottom: .5rem; } .mb-2 { margin-bottom: 1rem; }

@media (max-width: 1100px) { .grid-4 { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
@media (max-width: 760px) {
  .grid-2, .grid-3 { grid-template-columns: minmax(0, 1fr); }
  .grid-4 { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: .6rem; }
}
@media (prefers-reduced-motion: reduce) {
  * { animation: none !important; transition: none !important; }
}
[hidden] { display: none !important; }
