/* 02-base.css — readable defaults for bare HTML, from tokens only. This is
   what keeps the site usable with the design layer removed. */

body {
  background-color: var(--color-bg);
  color: var(--color-fg);
  font-family: var(--font-body);
  font-size: var(--text-base);

  /* Absorbs editorial-hero.css's 100vw breakout. `clip`, not `hidden`:
     hidden would make body a scroll container and break position: sticky. */
  overflow-x: clip;
}

/* Headings (weight and line-height come from the reset) */
h1 { font-size: var(--text-4xl); font-family: var(--font-heading); }
h2 { font-size: var(--text-3xl); font-family: var(--font-heading); }
h3 { font-size: var(--text-2xl); font-family: var(--font-heading); }
h4 { font-size: var(--text-xl);  font-family: var(--font-heading); }
h5 { font-size: var(--text-lg);  font-family: var(--font-heading); }
h6 { font-size: var(--text-base); font-family: var(--font-heading); }

/* Links: underlined by default so they don't rely on colour alone.
   Structural links (nav, cards, buttons) opt out via their own class. */
a {
  color: inherit;
  text-decoration: underline;
  text-decoration-thickness: var(--link-underline-width);
  text-underline-offset: 0.15em;
}

/* The UA default is a literal 700, which skips --weight-bold. Spectator Text
   has no 700 cut, so this keeps editor bold on a real face. */
b,
strong {
  font-weight: var(--weight-bold);
}

hr {
  border: 0;
  border-top: var(--border-width) solid var(--color-border-soft);
  margin-block: var(--space-8);
}

blockquote {
  border-inline-start: var(--border-width) solid var(--color-border);
  padding-inline-start: var(--space-4);
}

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

pre {
  overflow-x: auto;
  padding: var(--space-4);
  background: var(--color-bg-tone);
}

/* Wide tables scroll inside their own wrapper. */
.table-scroll {
  overflow-x: auto;
}

th,
td {
  text-align: start;
  padding: var(--space-2);
  border-bottom: var(--border-width) solid var(--color-border-soft);
}

figcaption {
  font-family: var(--font-ui);
  font-size: var(--text-sm);
  color: var(--color-fg-tone);
  margin-block-start: var(--space-2);
  text-align: center;
}

/* Icons: em-sized, so they track the surrounding font-size. Retune with
   --icon-size only for a different ratio to the text. */
.icon {
  width: var(--icon-size);
  height: var(--icon-size);
  flex-shrink: 0;
}

/* Selection and placeholders */
::selection {
  background: var(--color-accent);
  color: var(--color-bg);
}

::placeholder {
  color: var(--color-fg-tone);
  opacity: 1;
}
