*, *::before, *::after { box-sizing: border-box; }

html {
  scroll-behavior: smooth;
  scroll-padding-top: 96px;
  -webkit-text-size-adjust: 100%;
}

body {
  position: relative;
  isolation: isolate;
  margin: 0;
  min-height: 100dvh;
  background: var(--body-background);
  color: var(--ink);
  font-family: var(--font-sans);
  line-height: 1.5;
  -webkit-font-smoothing: antialiased;
}

body::before {
  content: "";
  position: fixed;
  inset: 0;
  z-index: 9999;
  pointer-events: none;
  background-image: url("/assets/grain.svg");
  background-size: 180px 180px;
  opacity: var(--grain-opacity);
  mix-blend-mode: var(--grain-blend);
}

a { color: inherit; text-decoration: none; }
button { font: inherit; }
svg { display: block; }

.icon-sprite {
  position: absolute;
  width: 0;
  height: 0;
  overflow: hidden;
}

.glyph {
  width: 21px;
  height: 21px;
  fill: none;
  stroke: currentColor;
  stroke-width: 1.55;
  stroke-linecap: square;
  stroke-linejoin: miter;
}

.glyph-mark {
  width: 15px;
  height: 15px;
  fill: currentColor;
  stroke: none;
}

.glyph-fill {
  fill: currentColor;
  stroke: none;
}

.glyph-tone {
  fill: currentColor;
  opacity: 0.14;
  stroke: none;
}

:focus-visible {
  outline: 2px solid var(--focus);
  outline-offset: 4px;
}

::selection {
  background: oklch(0.78 0.12 58 / 0.32);
  color: var(--ink);
}

.skip {
  position: absolute;
  left: -9999px;
  top: auto;
  padding: 8px 12px;
  background: var(--ink);
  color: var(--surface);
  border-radius: var(--radius-sm);
  z-index: 10000;
}

.skip:focus { left: 12px; top: 12px; }

.container {
  max-width: var(--max-w);
  margin: 0 auto;
  padding: 0 var(--gutter);
}

@media (max-width: 680px) {
  html { scroll-padding-top: 132px; }
}
