/* ============================================================
   crabcc · base layer
   Lightweight resets + element defaults wired to tokens, plus
   a few utility classes the cards and components lean on.
   Kept minimal so consuming pages stay in control.
   ============================================================ */

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

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

body {
  margin: 0;
  background: var(--surface-page);
  color: var(--text-body);
  font-family: var(--font-sans);
  font-size: var(--text-base);
  line-height: var(--lh-base);
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}

/* Headings default to the mono display face */
h1, h2, h3, h4 {
  font-family: var(--font-display);
  color: var(--text-strong);
  font-weight: var(--fw-bold);
  letter-spacing: var(--tracking-snug);
  margin: 0 0 0.5em;
}
h1 { font-size: var(--text-3xl); line-height: var(--lh-3xl); font-weight: var(--fw-black); letter-spacing: var(--tracking-tight); }
h2 { font-size: var(--text-2xl); line-height: var(--lh-2xl); }
h3 { font-size: var(--text-xl);  line-height: var(--lh-xl); }
h4 { font-size: var(--text-lg);  line-height: var(--lh-lg); }

p { margin: 0 0 1em; }

a {
  color: var(--text-accent);
  text-decoration: none;
}
a:hover { text-decoration: underline; text-underline-offset: 2px; }

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

/* Inline code chip */
code {
  background: var(--surface-sunken);
  border: var(--border-hair) solid var(--border-subtle);
  border-radius: var(--radius-sm);
  padding: 0.08em 0.36em;
  color: var(--text-body);
}
pre code { background: none; border: 0; padding: 0; }

::selection {
  background: color-mix(in oklch, var(--accent) 28%, transparent);
}

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

hr {
  border: 0;
  border-top: var(--border-hair) solid var(--border-subtle);
  margin: var(--space-6) 0;
}

/* ---- Utility helpers --------------------------------------- */

/* UPPERCASE eyebrow label — used all over the product chrome */
.ds-eyebrow {
  font-family: var(--font-mono);
  font-size: var(--type-eyebrow-size);
  font-weight: var(--fw-bold);
  text-transform: uppercase;
  letter-spacing: var(--tracking-caps);
  color: var(--text-muted);
}

.ds-mono { font-family: var(--font-mono); }
.ds-sans { font-family: var(--font-sans); }

/* Keyboard key cap */
kbd {
  font-family: var(--font-mono);
  font-size: var(--text-2xs);
  background: var(--surface-card);
  border: var(--border-hair) solid var(--border-strong);
  border-bottom-width: var(--border-thick);
  border-radius: var(--radius-sm);
  padding: 1px 5px;
  color: var(--text-body);
}

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