/* SBMCB — global
   Reset, base typography, and the handful of primitives every other
   stylesheet assumes: focus, the skip link, screen-reader text, and the
   pre-boot state. */

*, *::before, *::after { box-sizing: border-box; }

html, body {
  height: 100%;
}

body {
  margin: 0;
  background: var(--app-bg);
  color: var(--ink);
  font-family: var(--font-ui);
  font-size: var(--fs-base);
  line-height: var(--lh-body);
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}

h1, h2, h3, h4 {
  margin: 0;
  font-weight: 600;
  line-height: var(--lh-tight);
  letter-spacing: -0.01em;
}

h1 { font-size: var(--fs-lg); }
h2 { font-size: var(--fs-md); }
h3 { font-size: var(--fs-sm); }

p { margin: 0; }

a {
  color: var(--accent-ink);
  text-decoration: none;
}

a:hover { text-decoration: underline; }

button {
  font: inherit;
  color: inherit;
  margin: 0;
}

table { border-collapse: collapse; width: 100%; }

/* Every focusable thing shows where it is. Keyboard users navigate this
   console the same way the practitioner navigates the day. */
:focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: 2px;
  border-radius: var(--radius-sm);
}

:focus:not(:focus-visible) { outline: none; }

.skip {
  position: absolute;
  left: var(--s3);
  top: -60px;
  z-index: 60;
  padding: var(--s2) var(--s4);
  background: var(--surface);
  border: 1px solid var(--line-strong);
  border-radius: var(--radius);
  color: var(--ink);
  font-size: var(--fs-sm);
  font-weight: 500;
  transition: top var(--dur) var(--ease);
}

.skip:focus { top: var(--s3); }

.sr-only {
  position: absolute;
  width: 1px; height: 1px;
  padding: 0; margin: -1px;
  overflow: hidden;
  clip: rect(0 0 0 0);
  white-space: nowrap;
  border: 0;
}

/* Numbers that sit in a column must line up, or the column stops being
   readable as a column. */
.num, .mono {
  font-family: var(--font-mono);
  font-variant-numeric: tabular-nums;
  font-size: var(--fs-xs);
  color: var(--ink-2);
}

.tabular { font-variant-numeric: tabular-nums; }

.muted { color: var(--ink-2); }
.faint { color: var(--ink-3); }

.good { color: var(--pos); }
.warn { color: var(--warn); }
.bad  { color: var(--neg); }

.scroll { overflow-y: auto; }

/* Before the scripts have parsed. Deliberately quiet: a spinner would
   promise more than a hundred milliseconds of parsing deserves. */
.boot {
  display: grid;
  place-items: center;
  height: 100vh;
  text-align: center;
  color: var(--ink-3);
}

.boot-mark {
  font-size: var(--fs-tiny);
  letter-spacing: 0.14em;
  text-transform: uppercase;
  font-weight: 600;
  color: var(--ink);
}

.boot-sub { margin-top: var(--s1); font-size: var(--fs-sm); }

.noscript {
  max-width: 62ch;
  margin: 0 auto;
  padding: var(--s8) var(--s6);
}

.noscript h1 { margin-bottom: var(--s2); }
.noscript p { color: var(--ink-2); }

/* Motion in this console is only ever a state change reading as a state
   change. If the reader would rather it did not move, it does not. */
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after {
    animation-duration: 0.001ms !important;
    transition-duration: 0.001ms !important;
    scroll-behavior: auto !important;
  }
}
