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

body {
  margin: 0;
  min-height: 100vh;
  background: var(--bg);
  color: var(--text);
  font: var(--text-base) / 1.5 var(--font);
  -webkit-text-size-adjust: 100%;
}

h1,
h2,
h3,
p,
ul,
ol {
  margin-top: 0;
}

h1 {
  font-size: var(--text-2xl);
  line-height: 1.2;
}

h2 {
  font-size: var(--text-xl);
  line-height: 1.25;
}

h3 {
  font-size: var(--text-lg);
  line-height: 1.3;
}

a {
  color: var(--accent);
}

a:hover {
  color: var(--accent-hover);
}

code {
  padding: 1px 6px;
  background: var(--surface-muted);
  border-radius: 6px;
  font-family: var(--font-mono);
  font-size: 0.9em;
}

hr {
  border: 0;
  border-top: 1px solid var(--border);
}

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

.container {
  width: 100%;
  max-width: var(--container);
  margin: 0 auto;
  padding: 0 var(--space-4);
}

.container-narrow {
  max-width: 452px;
}

.main {
  padding-top: var(--space-6);
  padding-bottom: var(--space-7);
}

.muted {
  color: var(--muted);
}

.row {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: var(--space-3);
}

.sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  margin: -1px;
  padding: 0;
  overflow: hidden;
  clip-path: inset(50%);
  white-space: nowrap;
}

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

@media (max-width: 480px) {
  .main {
    padding-top: var(--space-5);
  }
}

.display {
  font-size: clamp(2rem, 5vw, 3rem);
  font-weight: 800;
  line-height: 1.1;
}

.text-xs {
  font-size: var(--text-xs);
}

.text-sm {
  font-size: var(--text-sm);
}

.text-lg {
  font-size: var(--text-lg);
}

.text-xl {
  font-size: var(--text-xl);
}

.text-2xl {
  font-size: var(--text-2xl);
}

.fw-500 {
  font-weight: 500;
}

.fw-600 {
  font-weight: 600;
}

.fw-700 {
  font-weight: 700;
}

.fw-800 {
  font-weight: 800;
}

.mono {
  font-family: var(--font-mono);
}

.caption {
  color: var(--muted);
  font-size: var(--text-xs);
}
