/* ==========================================================================
   Base — reset, typography defaults, focus, motion, selection, scrollbars.
   ========================================================================== */

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

html {
  -webkit-text-size-adjust: 100%;
  text-size-adjust: 100%;
}

html,
body {
  height: 100%;
}

body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font-family: var(--font-sans);
  font-size: var(--text-14);
  line-height: var(--leading-normal);
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  text-rendering: optimizeLegibility;
}

h1, h2, h3, h4, h5, h6, p, dl, dd, figure, blockquote {
  margin: 0;
}

h1, h2, h3, h4, h5, h6 {
  font-weight: var(--weight-semibold);
  line-height: var(--leading-tight);
  letter-spacing: var(--tracking-title);
  text-wrap: balance;
}

p {
  text-wrap: pretty;
}

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

button {
  cursor: pointer;
}

button:disabled {
  cursor: not-allowed;
}

a {
  color: inherit;
  text-underline-offset: 3px;
}

img, svg, canvas, video {
  display: block;
  max-width: 100%;
}

code, kbd, pre, samp {
  font-family: var(--font-mono);
  font-size: 0.923em;
  letter-spacing: 0;
}

pre {
  margin: 0;
}

table {
  border-collapse: collapse;
}

/* Numbers that change or get compared line up. */
td, th, time, output, data {
  font-variant-numeric: tabular-nums;
}

:focus-visible {
  outline: 2px solid var(--focus);
  outline-offset: 2px;
}

:focus:not(:focus-visible) {
  outline: none;
}

::selection {
  background: var(--accent-soft);
  color: var(--text);
}

* {
  scrollbar-width: thin;
  scrollbar-color: var(--line-strong) transparent;
}

[hidden] {
  display: none !important;
}

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

.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;
}

.u-mono {
  font-family: var(--font-mono);
  font-size: var(--text-13);
  letter-spacing: 0;
  font-variant-numeric: tabular-nums;
}

.u-num {
  font-variant-numeric: tabular-nums;
}
