/* ============================================================
   base.css — reset, typography, shared text utilities
   ============================================================ */

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

html,
body {
  height: 100%;
}

body {
  margin: 0;
  font-family: var(--font);
  font-size: var(--t-base);
  line-height: var(--leading);
  color: var(--ink);
  background: var(--bg);
  background-image: var(--glow);
  background-attachment: fixed;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
  overflow: hidden; /* the .stage scrolls, not the page */
}

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

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

button {
  cursor: pointer;
  border: 0;
  background: none;
}

:focus-visible {
  outline: 2px solid var(--accent-2);
  outline-offset: 3px;
  border-radius: var(--r-sm);
}

/* ---------------- Headings ---------------- */

h1,
h2,
h3,
h4 {
  margin: 0 0 var(--s-3);
  line-height: 1.18;
  letter-spacing: -0.02em;
  font-weight: 700;
}

h1 {
  font-size: var(--t-3xl);
  letter-spacing: -0.035em;
}
h2 {
  font-size: var(--t-2xl);
}
h3 {
  font-size: var(--t-lg);
}
h4 {
  font-size: var(--t-md);
}

p {
  margin: 0 0 var(--s-4);
  max-width: var(--measure);
  color: var(--ink-2);
}

ul,
ol {
  margin: 0 0 var(--s-4);
  padding-left: 1.25em;
  max-width: var(--measure);
  color: var(--ink-2);
}

li {
  margin-bottom: var(--s-2);
}

li::marker {
  color: var(--accent-2);
}

strong,
b {
  color: var(--ink);
  font-weight: 650;
}

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

a {
  color: var(--accent-2);
}

/* ---------------- Text utilities ---------------- */

.eyebrow {
  display: inline-flex;
  align-items: center;
  gap: var(--s-2);
  font-size: var(--t-xs);
  font-weight: 700;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--ink-3);
  margin-bottom: var(--s-3);
}

.eyebrow::before {
  content: "";
  width: 22px;
  height: 2px;
  border-radius: 2px;
  background: var(--accent-grad);
}

.lede {
  font-size: var(--t-md);
  color: var(--ink-2);
}

.grad-text {
  background: var(--accent-grad);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
}

/* Key vocabulary word — MJ can scan the page for these */
.term {
  color: var(--ink);
  font-weight: 650;
  background: linear-gradient(transparent 62%, rgba(123, 92, 255, 0.32) 62%);
  padding: 0 2px;
}

.fil {
  font-style: italic;
  color: var(--ink-3);
}

.center {
  text-align: center;
}
.mt-0 {
  margin-top: 0;
}
.mb-0 {
  margin-bottom: 0;
}
.wide {
  max-width: none;
}

.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;
}

/* Scrollbars */
.stage::-webkit-scrollbar,
.sidebar::-webkit-scrollbar {
  width: 10px;
}
.stage::-webkit-scrollbar-thumb,
.sidebar::-webkit-scrollbar-thumb {
  background: var(--line-strong);
  border-radius: var(--r-pill);
  border: 3px solid transparent;
  background-clip: content-box;
}
.stage::-webkit-scrollbar-track,
.sidebar::-webkit-scrollbar-track {
  background: transparent;
}
