/* Resets + base typography/layout primitives */

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

html {
  -webkit-text-size-adjust: 100%;
}

body {
  margin: 0;
  background: var(--bg);
  color: var(--text-primary);
  font-family: var(--font-ui);
  font-size: var(--fs-base);
  line-height: 1.5;
  -webkit-font-smoothing: antialiased;
  transition: background-color 0.15s ease, color 0.15s ease;
}

img,
svg {
  display: block;
  max-width: 100%;
}

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

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

h1,
h2,
h3,
h4 {
  margin: 0 0 var(--space-3);
  font-weight: 600;
  line-height: 1.25;
}

h1 { font-size: var(--fs-xl); }
h2 { font-size: var(--fs-lg); }
h3 { font-size: var(--fs-md); }

p {
  margin: 0 0 var(--space-3);
  color: var(--text-secondary);
}

code,
.mono {
  font-family: var(--font-mono);
  font-size: 0.92em;
}

ul,
ol {
  margin: 0;
  padding: 0;
  list-style: none;
}

button {
  font-family: inherit;
}

hr {
  border: none;
  border-top: 1px solid var(--border);
  margin: var(--space-5) 0;
}

/* Visible focus ring everywhere, never suppressed without replacement */
:focus-visible {
  outline: none;
  box-shadow: 0 0 0 3px var(--accent-muted);
  border-radius: var(--radius-sm);
}

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

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

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

.text-secondary { color: var(--text-secondary); }
.text-tertiary { color: var(--text-tertiary); }

.mt-2 { margin-top: var(--space-2); }
.mt-4 { margin-top: var(--space-4); }
.mt-6 { margin-top: var(--space-6); }
.mb-0 { margin-bottom: 0; }
