/* Reset, type and page layout. */

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

* {
  margin: 0;
}

html {
  -webkit-text-size-adjust: 100%;
  text-size-adjust: 100%;
  scrollbar-color: var(--line) transparent;
}

body {
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  background: var(--bg);
  color: var(--text);
  font-family: var(--font-sans);
  font-size: var(--fs-15);
  line-height: 1.55;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

main {
  flex: 1;
}

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

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

button {
  cursor: pointer;
}

::selection {
  background: var(--accent);
  color: var(--accent-ink);
}

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

/* ── Type ─────────────────────────────────────────────── */

h1,
h2,
.display {
  font-family: var(--font-display);
  font-weight: 600;
  line-height: 1.05;
  letter-spacing: 0.005em;
}

h1 {
  font-size: var(--fs-44);
}

h2 {
  font-size: var(--fs-24);
  line-height: 1.15;
}

h3 {
  font-size: var(--fs-17);
  font-weight: 600;
  line-height: 1.3;
}

@media (max-width: 640px) {
  h1 {
    font-size: var(--fs-32);
  }
}

p {
  max-width: 68ch;
}

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

a:hover {
  text-decoration: underline;
  text-underline-offset: 3px;
}

.eyebrow {
  font-family: var(--font-display);
  font-size: var(--fs-13);
  font-weight: 500;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--muted);
}

.num {
  font-family: var(--font-mono);
  font-variant-numeric: tabular-nums;
  letter-spacing: -0.01em;
}

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

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

.small {
  font-size: var(--fs-13);
}

.tiny {
  font-size: var(--fs-12);
}

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

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

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

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

kbd {
  display: inline-block;
  min-width: 1.6em;
  padding: 0 5px;
  border: 1px solid var(--line);
  border-bottom-width: 2px;
  border-radius: var(--r-ctl);
  font-family: var(--font-mono);
  font-size: var(--fs-12);
  line-height: 1.5;
  text-align: center;
  color: var(--text-2);
  background: var(--surface);
}

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

.skip-link {
  position: absolute;
  left: var(--s-4);
  top: -100px;
  z-index: 200;
  padding: var(--s-2) var(--s-3);
  background: var(--accent);
  color: var(--accent-ink);
  border-radius: var(--r-ctl);
}

.skip-link:focus {
  top: var(--s-2);
}

/* ── Layout ───────────────────────────────────────────── */

.wrap {
  width: 100%;
  max-width: calc(var(--wrap) + 2 * var(--gutter));
  margin: 0 auto;
  padding: 0 var(--gutter);
}

.page {
  padding-top: var(--s-6);
  padding-bottom: var(--s-8);
}

.page-head {
  display: flex;
  flex-wrap: wrap;
  align-items: flex-end;
  justify-content: space-between;
  gap: var(--s-4);
  padding-bottom: var(--s-4);
  margin-bottom: var(--s-5);
  border-bottom: 1px solid var(--line);
}

.page-head h1 + p,
.page-head .lede {
  margin-top: var(--s-2);
  color: var(--text-2);
}

.section {
  margin-top: var(--s-7);
}

.section-head {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: var(--s-4);
  margin-bottom: var(--s-3);
}

.section-head h2 {
  font-size: var(--fs-20);
}

.section-head a {
  font-size: var(--fs-13);
}

.stack > * + * {
  margin-top: var(--s-3);
}

.row {
  display: flex;
  align-items: center;
  gap: var(--s-2);
}

.row--wrap {
  flex-wrap: wrap;
}

.spacer {
  flex: 1;
}

.card-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(220px, 1fr));
  gap: var(--s-5) var(--s-4);
}

@media (prefers-reduced-motion: reduce) {
  *,
  *::before,
  *::after {
    transition-duration: 0.01ms !important;
    animation-duration: 0.01ms !important;
    scroll-behavior: auto !important;
  }
}
