/**
 * Base — reset, type, shells
 */
*,
*::before,
*::after {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  min-height: 100vh;
  font-family: var(--font-ui);
  font-size: var(--text-body);
  font-weight: 400;
  line-height: 1.65;
  color: var(--color-text);
  background-color: var(--color-canvas);
  background-image:
    linear-gradient(rgb(34 44 54 / 0.35) 1px, transparent 1px),
    linear-gradient(90deg, rgb(34 44 54 / 0.35) 1px, transparent 1px);
  background-size: 48px 48px;
  background-position: center top;
}

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

a {
  color: var(--color-link);
  text-decoration-thickness: 1px;
  text-underline-offset: 0.18em;
  transition: color var(--transition-fast), text-decoration-thickness var(--transition-fast);
}

a:hover {
  color: var(--color-text);
  text-decoration-thickness: 2px;
}

a:focus-visible,
button:focus-visible,
input:focus-visible,
select:focus-visible,
textarea:focus-visible {
  outline: none;
  box-shadow: var(--shadow-focus);
}

h1,
h2,
h3 {
  margin: 0 0 var(--space-4);
  font-weight: 600;
  color: var(--color-text);
}

h1 {
  font-size: var(--text-h1);
  line-height: 0.96;
  letter-spacing: -0.045em;
}

h2 {
  font-size: var(--text-h2);
  line-height: 1.02;
  letter-spacing: -0.035em;
}

h3 {
  font-size: var(--text-h3);
  line-height: 1.15;
  letter-spacing: -0.02em;
}

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

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

.skip-link {
  position: absolute;
  left: var(--space-4);
  top: -100px;
  z-index: var(--z-skip);
  padding: var(--space-3) var(--space-4);
  border-radius: var(--radius-sm);
  background: var(--color-accent);
  color: var(--color-accent-ink);
  font-weight: 600;
  text-decoration: none;
}

.skip-link:focus {
  top: var(--space-4);
}

.shell {
  width: min(100% - (var(--gutter) * 2), var(--page-max));
  margin-inline: auto;
}

.shell--content {
  width: min(100% - (var(--gutter) * 2), var(--content-max));
  margin-inline: auto;
}

.shell--reading {
  width: min(100% - (var(--gutter) * 2), var(--reading-max));
  margin-inline: auto;
}

main {
  display: block;
  min-height: 50vh;
}

.meta,
.eyebrow {
  font-family: var(--font-data);
  font-size: var(--text-meta);
  font-weight: 500;
  line-height: 1.4;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--color-text-muted);
}

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

.text-faint {
  color: var(--color-text-faint);
}

.data-num {
  font-family: var(--font-data);
  font-size: var(--text-data);
  font-weight: 500;
  line-height: 1;
  letter-spacing: -0.035em;
}

@media (prefers-reduced-motion: reduce) {
  html {
    scroll-behavior: auto;
  }

  *,
  *::before,
  *::after {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
  }
}
