/* Keelvy — Base element styles
   ------------------------------------------------------------------ */

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

html {
  font-family: var(--sans);
  /* Driven by the Contrast axis: soft = 16px, bold = 17px. */
  font-size: var(--ui-size);
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  text-wrap: pretty;
}

body {
  margin: 0;
  background-color: var(--bg-app);
  color: var(--fg-primary);
  font-family: var(--sans);
  /* Geist is variable 100–900, so the Contrast bump is a true weight shift. */
  font-weight: var(--ui-weight);
  font-size: var(--text-base);
  line-height: var(--leading-normal);
}

/* Inline emphasis stays in the RUNNING face. It must NOT set
   font-family: var(--display) — that put a 2°-slope serif at 13.5px inline,
   which was the most visible typesetting defect the old system had. Declared
   once, here only. */
em, i { font-style: italic; }

a { color: var(--accent-text); text-decoration-thickness: 1px; text-underline-offset: 3px; }
a:hover { color: var(--accent-hover); }

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

/* Thin themed scrollbars */
* { scrollbar-width: thin; scrollbar-color: var(--hairline-3) transparent; }
::-webkit-scrollbar { width: 6px; height: 6px; }
::-webkit-scrollbar-track { background: transparent; }
::-webkit-scrollbar-thumb { background: var(--hairline-3); border-radius: var(--radius-pill); }
::-webkit-scrollbar-thumb:hover { background: var(--ink-4); }
