/**
 * Base document styles. Depends on tokens.css.
 *
 * DOCTRINE (Micah, 2026-07-28): every semantic tag gets a reasonable,
 * predictable default here, derived from tokens per the v0.3 MVP export.
 * Component classes may override, within reason. Pages should read well
 * with NO classes at all.
 */

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

html,
body {
  margin: 0;
  padding: 0;
}

html {
  /* Classic (non-overlay) scrollbars: reserve the gutter always, so pages
     that scroll and pages that don't lay out at identical widths. */
  scrollbar-gutter: stable;
}

body {
  min-height: 100vh;
  font-family: var(--font-body);
  font-size: var(--text-md);
  line-height: var(--leading-body);
  color: var(--ink);
  background: var(--paper); /* flat cool page per the MVP; gradient backdrop was landing-era */
  display: flex;
  flex-direction: column;
  -webkit-font-smoothing: antialiased;
}

/* Headings per the v0.3 MVP: the BODY face (Source Sans), not DM Sans —
   the export sets titles at 40/600 and section heads at 28/24/700.
   DM Sans is reserved for wordmark/stat/label moments (.stat, .label). */
h1,
h2,
h3 {
  font-family: var(--font-body);
  line-height: var(--leading-tight);
  letter-spacing: var(--tracking-tight);
  margin: 0 0 var(--space-3);
}

h1 { font-size: var(--text-3xl); font-weight: 600; }
h2 { font-size: var(--text-2xl); font-weight: 700; }
h3 { font-size: var(--text-xl); font-weight: 700; }
h4 { font-size: var(--text-lg); font-weight: 700; margin: 0 0 var(--space-2); }
h5 { font-size: var(--text-md); font-weight: 700; margin: 0 0 var(--space-2); }
h6 { font-size: var(--text-sm); font-weight: 700; margin: 0 0 var(--space-2); }

p {
  margin: 0 0 var(--space-3);
}

small { font-size: var(--text-sm); }

strong,
b { font-weight: 600; } /* body emphasis is semibold per the MVP */

ul,
ol {
  margin: 0 0 var(--space-3);
  padding-left: 1.25rem;
}

li { margin-bottom: var(--space-1); }

table {
  border-collapse: collapse;
  font-variant-numeric: tabular-nums;
}

th,
td {
  text-align: left;
  padding: var(--space-2) var(--space-3);
  border-bottom: 1px solid var(--line);
}

th { font-weight: 600; }

code,
pre,
kbd {
  font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
  font-size: 0.9em;
}

pre {
  margin: 0 0 var(--space-3);
  padding: var(--space-3);
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--radius-sm);
  overflow-x: auto;
}

blockquote {
  margin: 0 0 var(--space-3);
  padding-left: var(--space-4);
  border-left: 3px solid var(--line);
  color: var(--muted);
}

hr {
  border: none;
  border-top: 1px solid var(--line);
  margin: var(--space-6) 0;
}

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

a {
  color: var(--accent);
  text-decoration: none;
}

a:hover {
  color: var(--ink);
}

a:focus-visible,
button:focus-visible,
summary:focus-visible,
input:focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: 2px;
}

button {
  font-family: inherit;
  cursor: pointer;
  border: none;
  background: none;
}

img {
  max-width: 100%;
  height: auto;
}
