/* Base: the page, the type ramp, links, focus. */

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

html,
body {
  height: 100%;
}

body {
  margin: 0;
  background: var(--ground);
  color: var(--ink);
  font-family: var(--font-sans);
  font-size: var(--t-body);
  line-height: 1.5;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  text-rendering: optimizeLegibility;
  overflow: hidden;
}

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

button {
  background: none;
  border: 0;
  padding: 0;
  cursor: pointer;
  -webkit-tap-highlight-color: transparent;
}

button:disabled {
  cursor: default;
}
button[aria-disabled='true'] {
  cursor: progress;
}

img,
svg {
  display: block;
}

svg {
  flex: none;
}

p,
h1,
h2,
h3,
h4,
ul,
ol,
figure,
blockquote,
pre {
  margin: 0;
}

[hidden] {
  display: none !important;
}

::selection {
  background: var(--accent-wash);
  color: var(--ink);
}

/* Links: accent, underline on hover. */
a {
  color: var(--accent-text);
  text-decoration: none;
}
a:hover {
  color: var(--accent-hover);
  text-decoration: underline;
}

/* Focus is a 2 px accent ring outside a 2 px gap, keyboard only. */
:focus {
  outline: none;
}
:focus-visible {
  outline: none;
  box-shadow: 0 0 0 2px var(--ground), 0 0 0 4px var(--accent);
  border-radius: var(--focus-radius, 8px);
}

/* ------------------------------------------------------------------------------------------ */
/* The type ramp. Serif only at 21 px and above, only for things named or asked. */

.t-display,
.t-title,
.t-question,
.t-heading {
  font-family: var(--font-serif);
  font-weight: 400;
  font-optical-sizing: auto;
  text-wrap: balance;
}
.t-display {
  font-size: var(--t-display);
  line-height: 1.08;
  letter-spacing: -0.015em;
}
.t-title {
  font-size: var(--t-title);
  line-height: 1.1;
  letter-spacing: -0.015em;
}
.t-question {
  font-size: var(--t-question);
  line-height: 1.15;
  letter-spacing: -0.01em;
}
.t-heading {
  font-size: var(--t-heading);
  line-height: 1.2;
  letter-spacing: -0.01em;
}
.t-lead {
  font-size: var(--t-lead);
  line-height: 1.5;
  color: var(--ink-soft);
  text-wrap: pretty;
}
.t-body {
  font-size: var(--t-body);
  line-height: 1.5;
}
.t-meta {
  font-size: var(--t-meta);
  line-height: 1.45;
  color: var(--ink-quiet);
}
.t-small {
  font-size: var(--t-small);
  line-height: 1.45;
  color: var(--ink-quiet);
}
.t-label {
  font-size: var(--t-label);
  font-weight: 600;
  letter-spacing: 0.05em;
  text-transform: uppercase;
  color: var(--ink-placeholder);
}
.tabular {
  font-variant-numeric: tabular-nums;
}
.quiet {
  color: var(--ink-quiet);
}
.soft {
  color: var(--ink-soft);
}
.good {
  color: var(--success);
}
.bad {
  color: var(--danger);
}
.accent {
  color: var(--accent-text);
}

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

.ellipsis {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  min-width: 0;
}

/* Quiet, thin scrollbars that do not shout on a warm page. */
* {
  scrollbar-width: thin;
  scrollbar-color: var(--line-strong) transparent;
}
*::-webkit-scrollbar {
  width: 10px;
  height: 10px;
}
*::-webkit-scrollbar-thumb {
  background: var(--line-strong);
  border-radius: 10px;
  border: 3px solid transparent;
  background-clip: padding-box;
}
*::-webkit-scrollbar-track {
  background: transparent;
}
