/* Inter, self-hosted. The fallback is Arial adjusted to Inter's metrics so nothing jumps on load. */
@font-face {
  font-family: "Inter";
  src: url("/fonts/inter-latin.woff2") format("woff2");
  font-weight: 100 900;
  font-display: swap;
}
@font-face {
  font-family: "Inter Fallback";
  src: local("Arial");
  ascent-override: 89.79%;
  descent-override: 22.36%;
  line-gap-override: 0%;
  size-adjust: 107.89%;
}

/* Neutral greys, no tint. Dark first. Three text steps, all well above WCAG AA:
   fg for titles and links (about 16:1), fg-2 for body copy (about 10:1),
   fg-3 for labels and dates (about 6:1). */
:root {
  color-scheme: light;
  --bg: #fafafa;
  --fg: oklch(18% 0 0);
  --fg-2: oklch(36% 0 0);
  --fg-3: oklch(50% 0 0);
  --underline: oklch(18% 0 0 / 0.28);
}
.dark {
  color-scheme: dark;
  --bg: #181818;
  --fg: oklch(96% 0 0);
  --fg-2: oklch(81% 0 0);
  --fg-3: oklch(67% 0 0);
  --underline: oklch(96% 0 0 / 0.3);
}

*,
*::before,
*::after {
  box-sizing: border-box;
}
html {
  background: var(--bg);
  -webkit-text-size-adjust: 100%;
}
body {
  margin: 0;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  color: var(--fg);
  font-family: "Inter", "Inter Fallback", ui-sans-serif, system-ui, sans-serif;
  font-size: 15px;
  line-height: 1.6;
  letter-spacing: -0.006em;
  font-feature-settings: "cv11";
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}
h1,
h2,
p,
ul {
  margin: 0;
  font-size: inherit;
}
ul {
  padding: 0;
  list-style: none;
}
a {
  color: inherit;
  text-decoration: none;
}
button {
  font: inherit;
  letter-spacing: inherit;
  color: inherit;
  background: none;
  border: 0;
  padding: 0;
  cursor: pointer;
}
::selection {
  background: var(--fg);
  color: var(--bg);
}
:focus-visible {
  outline: 2px solid var(--fg);
  outline-offset: 3px;
  border-radius: 2px;
}

/* Anything that goes somewhere is underlined, quietly; hover inks it. */
.link {
  text-decoration-line: underline;
  text-decoration-thickness: 1px;
  text-underline-offset: 4px;
  text-decoration-color: var(--underline);
  transition: text-decoration-color 150ms ease;
}
.link:hover,
a:hover .link {
  text-decoration-color: currentColor;
}

/* Shell */
.site-header,
main,
.site-footer {
  width: 100%;
  max-width: 640px;
  margin-inline: auto;
  padding-inline: 20px;
}
.site-header {
  display: flex;
  flex-wrap: wrap;
  align-items: baseline;
  justify-content: space-between;
  gap: 8px 24px;
  padding-top: 40px;
}
.site-header > a {
  font-weight: 500;
}
.site-header nav,
.site-footer div {
  display: flex;
  gap: 16px;
}
.site-header nav,
.site-footer {
  color: var(--fg-2);
}
.site-header nav a,
.site-footer a,
.site-footer button {
  transition: color 150ms ease;
}
.site-header nav a:hover,
.site-footer a:hover,
.site-footer button:hover,
.site-header nav a[aria-current] {
  color: var(--fg);
}
.site-header nav a[aria-current] {
  text-decoration: underline 1px;
  text-underline-offset: 6px;
}
main {
  flex: 1;
  padding-top: 64px;
}
.site-footer {
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  gap: 8px 24px;
  margin-top: 96px;
  padding-bottom: 40px;
  font-size: 14px;
}
:root:not(.dark) .when-dark,
.dark .when-light {
  display: none;
}

/* Content */
.intro,
.page-title p {
  color: var(--fg-2);
  text-wrap: pretty;
}
.intro p + p {
  margin-top: 16px;
}
.page-title {
  margin-bottom: 48px;
}
.page-title h1 {
  font-weight: 500;
}
.page-title p {
  margin-top: 12px;
}
section + section {
  margin-top: 56px;
}
.intro + section {
  margin-top: 64px;
}
h2 {
  margin-bottom: 16px;
  font-weight: 400;
  color: var(--fg-3);
}
.row {
  display: block;
  padding-block: 8px;
}
.row-head {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 24px;
}
.row-title {
  min-width: 0;
}
.meta {
  flex-shrink: 0;
  font-variant-numeric: tabular-nums;
  color: var(--fg-3);
}
.sub {
  display: block;
  margin-top: 2px;
  color: var(--fg-2);
}
.titles {
  column-gap: 32px;
}
.titles li {
  break-inside: avoid;
  padding-block: 4px;
}

@media (min-width: 640px) {
  .site-header {
    padding-top: 64px;
  }
  main {
    padding-top: 80px;
  }
  .titles {
    columns: 2;
  }
}

@media (prefers-reduced-motion: reduce) {
  .link,
  .site-header nav a,
  .site-footer a,
  .site-footer button {
    transition: none;
  }
}
