/* The elements themselves, before any component: the ground, the type, links, focus and motion. */
*,
*::before,
*::after {
  box-sizing: border-box;
}

html {
  background: var(--ground);
  color: var(--text);
  font-family: var(--font-sans);
  font-size: var(--ui-size);
  line-height: var(--ui-leading);
  /* Figures line up in columns everywhere, in Geist as in Geist Mono. */
  font-variant-numeric: tabular-nums;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  text-size-adjust: 100%;
}

body {
  margin: 0;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
}

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

/* Geist Mono for every number, time, ID and model name: the elements that hold them are mono by
   themselves, and .mono marks the rest. */
time,
data,
code,
kbd,
samp,
.mono {
  font-family: var(--font-mono);
}

/* The type roles of the foundations board, largest first. */
.display {
  font-size: var(--display-size);
  line-height: var(--display-leading);
  font-weight: 500;
  letter-spacing: -0.02em;
}

.heading {
  font-size: var(--heading-size);
  line-height: var(--heading-leading);
  font-weight: 500;
  letter-spacing: -0.01em;
}

.finding {
  font-size: var(--finding-size);
  line-height: var(--finding-leading);
  color: var(--text-reading);
}

.reading {
  max-width: var(--reading-width);
  font-size: var(--reading-size);
  line-height: var(--reading-leading);
  color: var(--text-reading);
}

.title {
  font-size: var(--title-size);
  line-height: var(--title-leading);
  font-weight: 500;
}

.label {
  font-size: var(--label-size);
  line-height: var(--label-leading);
  font-weight: 500;
}

.meta {
  font-size: var(--meta-size);
  line-height: var(--meta-leading);
  color: var(--text-muted);
}

.small {
  font-size: var(--small-size);
  line-height: var(--small-leading);
}

.figure {
  font-family: var(--font-mono);
  font-size: var(--figure-size);
  line-height: var(--figure-leading);
}

.secondary {
  color: var(--text-secondary);
}

.muted {
  color: var(--text-muted);
}

a {
  color: inherit;
  text-decoration: none;
  transition: color var(--duration-quick) var(--ease);
}

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

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

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

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

/* For screen readers only. */
.visually-hidden {
  position: absolute;
  width: 1px;
  height: 1px;
  overflow: hidden;
  clip-path: inset(50%);
  white-space: nowrap;
}

/* Motion stops for whoever asks for less of it: no animation, no transition. */
@media (prefers-reduced-motion: reduce) {
  *,
  *::before,
  *::after {
    animation: none !important;
    transition: none !important;
    scroll-behavior: auto !important;
  }
}
