/* Element defaults. */
*,
*::before,
*::after {
  box-sizing: border-box;
}

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

body {
  margin: 0;
  font-family: var(--font-sans);
  font-size: var(--text-base);
  line-height: var(--leading);
  color: var(--color-ink);
  background: var(--color-bg);
  -webkit-font-smoothing: antialiased;
}

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

h1 { font-size: var(--text-2xl); letter-spacing: var(--tracking-title); }
h2 { font-size: var(--text-xl); }
h3 { font-size: var(--text-lg); }

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

p:last-child {
  margin-bottom: 0;
}

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

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

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

button,
input,
select,
textarea {
  font: inherit;
}

input[type="checkbox"],
input[type="radio"] {
  width: 16px;
  height: 16px;
  margin: 0;
  accent-color: var(--color-primary);
}

code,
pre {
  font-family: var(--font-mono);
  font-size: var(--text-sm);
}

img {
  max-width: 100%;
}

/* Components set their own display; hidden must still win (tabs controller). */
[hidden] {
  display: none !important;
}
