/* ===== base: reset, typography, primitives ===== */

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

html,
body {
  margin: 0;
  height: 100%;
  overflow: hidden; /* the shell scrolls its panes, never the window */
}

body {
  font-family: var(--sans);
  font-size: var(--fs-body);
  color: var(--ink);
  background: var(--bg);
  background-image:
    radial-gradient(1200px 700px at 78% -12%, var(--bg-grad-a), transparent 60%),
    radial-gradient(900px 600px at 10% 112%, var(--bg-grad-b), transparent 55%);
  -webkit-font-smoothing: antialiased;
  user-select: none;
}

/* The faint survey grid is the one piece of decoration, and it belongs to the
 * subject: this is a mapping console. Masked so it fades rather than tiles to
 * the window edge. */
body::before {
  content: "";
  position: fixed;
  inset: 0;
  z-index: 0;
  pointer-events: none;
  opacity: 0.5;
  background-image:
    linear-gradient(var(--grid) 1px, transparent 1px),
    linear-gradient(90deg, var(--grid) 1px, transparent 1px);
  background-size: 46px 46px;
  mask: radial-gradient(circle at 62% 24%, #000, transparent 88%);
}

h1, h2, h3, h4, p, figure {
  margin: 0;
}

h1 {
  font-family: var(--disp);
  font-size: var(--fs-h1);
  font-weight: 700;
  letter-spacing: -0.01em;
  text-wrap: balance;
}

h2 {
  font-family: var(--disp);
  font-size: var(--fs-h2);
  font-weight: 650;
  text-wrap: balance;
}

h3 {
  font-family: var(--disp);
  font-size: var(--fs-h3);
  font-weight: 600;
}

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

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

/* Figures that sit in columns must line up; this is on by default and turned
 * off nowhere. */
.num,
td.num,
.mono {
  font-family: var(--mono);
  font-variant-numeric: tabular-nums;
}

/* An uppercase micro-label — the console's recurring structural device. It
 * marks a field's meaning, never decorates. */
.label {
  font-size: var(--fs-micro);
  letter-spacing: 1.7px;
  text-transform: uppercase;
  color: var(--ink-3);
  font-weight: 600;
}

.muted {
  color: var(--ink-2);
}

.hidden {
  display: none !important;
}

:focus-visible {
  outline: none;
  box-shadow: var(--focus);
  border-radius: var(--r-sm);
}

::-webkit-scrollbar {
  width: 10px;
  height: 10px;
}
::-webkit-scrollbar-track {
  background: transparent;
}
::-webkit-scrollbar-thumb {
  background: var(--stroke-2);
  border-radius: var(--r-pill);
  border: 3px solid transparent;
  background-clip: content-box;
}
::-webkit-scrollbar-thumb:hover {
  background: var(--ink-3);
  background-clip: content-box;
}

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