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

html {
  scroll-behavior: smooth;
  background: var(--bg);
}

body {
  margin: 0;
  min-width: 320px;
  min-height: 100vh;
  font-family: var(--font-sans);
  background:
    radial-gradient(circle at 88% 6%, var(--accent-soft), transparent 28rem),
    var(--bg);
  color: var(--text);
  line-height: 1.65;
  transition: background-color 180ms ease, color 180ms ease;
}

a { color: inherit; text-decoration: none; }
button, a { -webkit-tap-highlight-color: transparent; }
button { font: inherit; }
img, svg { display: block; max-width: 100%; }

.container {
  width: min(calc(100% - 40px), var(--container));
  margin-inline: auto;
}

.narrow {
  width: min(calc(100% - 40px), var(--content));
  margin-inline: auto;
}

.site-main { min-height: calc(100vh - var(--header-height)); }

.section { padding: 88px 0; }
.section--compact { padding: 58px 0; }
.section--tint {
  border-block: 1px solid var(--border);
  background: color-mix(in srgb, var(--bg-soft) 48%, transparent);
}

.eyebrow {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  margin-bottom: 18px;
  color: var(--accent);
  font-size: 0.82rem;
  font-weight: 850;
  letter-spacing: 0.11em;
  text-transform: uppercase;
}
.eyebrow::before {
  content: "";
  width: 22px;
  height: 2px;
  border-radius: 999px;
  background: currentColor;
}

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

h1 {
  max-width: 950px;
  margin-bottom: 24px;
  font-size: clamp(2.65rem, 7vw, 5.55rem);
  line-height: 0.99;
  letter-spacing: -0.055em;
}

h2 {
  margin-bottom: 18px;
  font-size: clamp(2rem, 4vw, 3.35rem);
  line-height: 1.07;
  letter-spacing: -0.04em;
}

h3 {
  margin-bottom: 10px;
  font-size: 1.15rem;
  line-height: 1.25;
}

h4 {
  margin-bottom: 8px;
  font-size: 1rem;
}

.lead {
  max-width: 790px;
  color: var(--text-muted);
  font-size: clamp(1.06rem, 2vw, 1.28rem);
}

.muted { color: var(--text-muted); }
.small { font-size: 0.92rem; }

.grid { display: grid; gap: 22px; }
.grid--2 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
.grid--3 { grid-template-columns: repeat(3, minmax(0, 1fr)); }
.grid--4 { grid-template-columns: repeat(4, minmax(0, 1fr)); }
.stack { display: grid; gap: 16px; }

.section-heading {
  display: flex;
  align-items: end;
  justify-content: space-between;
  gap: 28px;
  margin-bottom: 34px;
}
.section-heading > :first-child { max-width: 800px; }
.section-heading h2 { margin-bottom: 10px; }

.skip-link {
  position: fixed;
  left: 16px;
  top: 16px;
  z-index: 999;
  padding: 10px 14px;
  border-radius: 10px;
  background: var(--text);
  color: var(--bg);
  transform: translateY(-160%);
}
.skip-link:focus { transform: translateY(0); }

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

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

.code-chip {
  display: inline-flex;
  align-items: center;
  padding: 2px 8px;
  border: 1px solid var(--border);
  border-radius: 7px;
  background: var(--bg-code);
  font-size: 0.9em;
}

pre {
  position: relative;
  margin: 0;
  padding: 20px;
  overflow-x: auto;
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  background: var(--bg-code);
  color: var(--text);
  font: 0.9rem/1.65 var(--font-mono);
}

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

table {
  width: 100%;
  border-collapse: collapse;
  font-size: 0.95rem;
}
th, td {
  padding: 13px 14px;
  border-bottom: 1px solid var(--border);
  text-align: left;
  vertical-align: top;
}
th { color: var(--text); }
td { color: var(--text-muted); }

.table-wrap {
  overflow-x: auto;
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  background: var(--bg-elevated);
}
.table-wrap table { min-width: 620px; }

@media (max-width: 900px) {
  .container, .narrow {
    width: min(calc(100% - 28px), var(--container));
  }
  .section { padding: 66px 0; }
  .grid--2, .grid--3, .grid--4 { grid-template-columns: 1fr; }
  .section-heading { align-items: start; flex-direction: column; }
}
