/* The page itself: reset, body, type, and the page frame. */

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

html {
  -webkit-text-size-adjust: 100%;
  scroll-padding-top: 5rem;
}

body {
  margin: 0;
  min-height: 100vh;
  background: var(--bg);
  color: var(--ink);
  font-family: var(--font-sans);
  font-size: var(--text-t3);
  line-height: 1.6;
  display: flex;
  flex-direction: column;
}

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

a {
  color: var(--moss);
  text-underline-offset: 0.18em;
}
a:hover {
  color: var(--moss-strong);
}

h1,
h2,
h3 {
  margin: 0;
  line-height: 1.2;
  font-weight: 700;
  letter-spacing: -0.01em;
}
h1 {
  font-size: var(--text-t1);
}
h2,
h3 {
  font-size: var(--text-t2);
  line-height: 1.35;
}

p {
  margin: 0 0 1em;
}
p:last-child {
  margin-bottom: 0;
}

ul {
  margin: 0;
  padding-left: 1.25em;
}
li + li {
  margin-top: 0.35em;
}

:focus-visible {
  outline: 2px solid var(--sunrise);
  outline-offset: 2px;
  border-radius: 4px;
}

.small {
  font-size: var(--text-t4);
  line-height: 1.5;
}
.muted {
  color: var(--ink-soft);
}
.faint {
  color: var(--ink-faint);
}

.visually-hidden {
  position: absolute;
  width: 1px;
  height: 1px;
  overflow: hidden;
  clip: rect(0 0 0 0);
  white-space: nowrap;
}

.skip-link {
  position: absolute;
  left: 1rem;
  top: -3rem;
  z-index: 100;
  background: var(--sunrise);
  color: var(--on-sunrise);
  padding: 0.5rem 1rem;
  border-radius: var(--radius-sm);
}
.skip-link:focus {
  top: 1rem;
}

main {
  flex: 1;
  width: 100%;
}

.page {
  width: 100%;
  max-width: var(--page-width);
  margin: 0 auto;
  padding: 2rem 1rem 4rem;
}
@media (min-width: 640px) {
  .page {
    padding: 2.5rem 1.5rem 5rem;
  }
}

.stack > * + * {
  margin-top: 2.5rem;
}

.prose {
  max-width: 44rem;
}
.prose h2 {
  margin: 2rem 0 0.6rem;
}
.prose ul {
  margin-bottom: 1em;
}

.grid {
  display: grid;
  gap: 1rem;
  grid-template-columns: 1fr;
}
@media (min-width: 640px) {
  .grid {
    grid-template-columns: repeat(2, 1fr);
    gap: 1.25rem;
  }
}
@media (min-width: 960px) {
  .grid-3 {
    grid-template-columns: repeat(3, 1fr);
  }
}

.split {
  display: grid;
  gap: 2rem;
}
@media (min-width: 860px) {
  .split {
    grid-template-columns: minmax(0, 3fr) minmax(0, 2fr);
    align-items: start;
  }
}
