/* Cubric Studio Docs — base
   Stage register=product, OKLCH only. No #fff/#000, no glassmorphism,
   no gradient text (wordmark exception in .wordmark), no side-stripes
   (sidebar nav-link active is the documented exception per
   c-stage/tokens.css .dropdown-item[aria-selected="true"]).
*/

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

html {
  scroll-behavior: smooth;
  font-size: 14px;
}

body {
  font-family: 'JetBrains Mono', ui-monospace, monospace;
  font-size: var(--t-sm);
  line-height: 1.5;
  color: var(--ink-1);
  background: var(--surface-bar);
  min-height: 100vh;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}

/* ── Typography (product-tight scale) ───────────────────────────────────── */
h1, h2, h3, h4, h5, h6 {
  font-family: inherit;
  color: var(--ink-1);
  letter-spacing: -0.01em;
  line-height: 1.15;
}

h1 {
  font-size: var(--t-xl);
  font-weight: 600;
  letter-spacing: -0.02em;
  line-height: 1.05;
}

h2 {
  font-size: var(--t-lg);
  font-weight: 600;
}

h3 {
  font-size: var(--t-md);
  font-weight: 600;
}

h4 {
  font-size: var(--t-sm);
  font-weight: 600;
}

p {
  color: var(--ink-2);
}

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

em, i {
  font-style: normal;
  color: var(--ink-1);
}

/* ── Wordmark (sole gradient exception) ─────────────────────────────────── */
.wordmark {
  font-family: 'VT323', monospace;
  font-weight: 400;
  letter-spacing: 0.04em;
  background: linear-gradient(100deg, var(--accent-heat) 0%, var(--accent-frost) 100%);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
}

/* ── Kicker (eyebrow / nav-group label) ─────────────────────────────────── */
.kicker {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  font-size: var(--t-xs);
  font-weight: 500;
  letter-spacing: 0.32em;
  text-transform: uppercase;
  color: var(--ink-3);
}

.kicker::before {
  content: "";
  width: 28px;
  height: 1px;
  background: var(--accent-heat);
  flex: none;
}

/* Quiet variant — no heat bar (used for sidebar group titles) */
.kicker--quiet::before {
  display: none;
}

/* ── Links ───────────────────────────────────────────────────────────────── */
a {
  color: var(--ink-1);
  text-decoration: none;
  border-bottom: 1px solid var(--line);
  transition: color var(--t-base) var(--ease),
              border-color var(--t-base) var(--ease);
}

a:hover {
  color: var(--accent-heat);
  border-bottom-color: var(--accent-heat);
}

/* Links that should not show the underline treatment by default */
a.bare,
.logo,
.social-link,
.nav-link,
.toc-list a {
  border-bottom: 0;
}

/* ── Code ────────────────────────────────────────────────────────────────── */
code, pre, kbd, samp {
  font-family: 'JetBrains Mono', ui-monospace, monospace;
  font-feature-settings: "calt" 0;
}

code {
  background: var(--surface-2);
  color: var(--ink-1);
  padding: 1px 6px;
  font-size: 0.92em;
}

pre {
  background: var(--surface-2);
  border: 1px solid var(--line);
  padding: var(--s-3);
  margin: var(--s-4) 0;
  overflow-x: auto;
  font-size: var(--t-sm);
  line-height: 1.55;
  color: var(--ink-1);
}

pre code {
  background: transparent;
  padding: 0;
  font-size: inherit;
}

kbd {
  display: inline-block;
  padding: 2px 6px;
  font-size: var(--t-2xs);
  letter-spacing: 0.04em;
  color: var(--ink-1);
  background: var(--surface-2);
  border: 1px solid var(--line);
  border-bottom-width: 2px;
}

/* ── Accessibility ───────────────────────────────────────────────────────── */
:focus-visible {
  outline: 1px solid var(--accent-frost);
  outline-offset: 2px;
}

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

  html {
    scroll-behavior: auto;
  }
}

/* ── Tabular numerals (for any inline metric) ───────────────────────────── */
.num,
.tabular {
  font-variant-numeric: tabular-nums;
}
