:root {
  color-scheme: light dark;
  --paper: #f5f3ed;
  --ink: #171715;
  --muted: #66645e;
  --line: rgba(23, 23, 21, 0.16);
  --link: #34332f;
}

@media (prefers-color-scheme: dark) {
  :root {
    --paper: #0b0b0a;
    --ink: #eeeeea;
    --muted: #aaa8a0;
    --line: rgba(238, 238, 234, 0.16);
    --link: #d8d6cf;
  }
}

* {
  box-sizing: border-box;
}

html {
  background: var(--paper);
  color: var(--ink);
  font-family: Georgia, "Times New Roman", serif;
  line-height: 1.65;
  text-rendering: optimizeLegibility;
}

body {
  margin: 0;
}

main {
  width: min(100% - 40px, 760px);
  margin: 0 auto;
  padding: 72px 0 96px;
}

.site-nav {
  display: flex;
  flex-wrap: wrap;
  gap: 8px 22px;
  margin-bottom: 56px;
  font-family: system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  font-size: 0.875rem;
}

.site-nav a {
  color: var(--muted);
  text-decoration: none;
}

.site-nav a:hover,
.site-nav a[aria-current="page"] {
  color: var(--ink);
}

.site-nav a[aria-current="page"] {
  text-decoration: underline;
  text-decoration-thickness: 1px;
  text-underline-offset: 0.3em;
}

header {
  padding-bottom: 36px;
  border-bottom: 1px solid var(--line);
}

.brand {
  margin: 0 0 20px;
  color: var(--muted);
  font-family: system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  font-size: 0.75rem;
  font-weight: 700;
  letter-spacing: 0.16em;
  text-transform: uppercase;
}

h1,
h2 {
  line-height: 1.18;
  text-wrap: balance;
}

h1 {
  margin: 0;
  font-size: clamp(2.5rem, 8vw, 4.5rem);
  font-weight: 500;
  letter-spacing: -0.045em;
}

h2 {
  margin: 0 0 16px;
  font-size: 1.35rem;
  font-weight: 600;
  letter-spacing: -0.015em;
}

.updated {
  margin: 18px 0 0;
  color: var(--muted);
  font-family: system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  font-size: 0.875rem;
}

.lede {
  max-width: 650px;
  margin: 22px 0 0;
  color: var(--muted);
  font-size: 1.125rem;
}

section {
  padding-top: 38px;
}

p,
ul {
  margin: 0 0 16px;
}

ul {
  padding-left: 1.3rem;
}

li + li {
  margin-top: 8px;
}

a {
  color: var(--link);
  text-decoration-thickness: 1px;
  text-underline-offset: 0.18em;
}

a:hover {
  text-decoration-thickness: 2px;
}

a:focus-visible {
  border-radius: 2px;
  outline: 2px solid currentColor;
  outline-offset: 3px;
}

strong {
  font-weight: 700;
}

.card-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 14px;
  padding-top: 38px;
}

.card {
  display: block;
  min-height: 180px;
  padding: 24px;
  border: 1px solid var(--line);
  border-radius: 16px;
  color: var(--ink);
  text-decoration: none;
}

.card:hover {
  border-color: var(--muted);
}

.card h2 {
  margin-bottom: 10px;
}

.card p {
  color: var(--muted);
  font-size: 0.925rem;
}

.button-link {
  display: inline-block;
  padding: 12px 18px;
  border: 1px solid var(--ink);
  border-radius: 999px;
  color: var(--paper);
  background: var(--ink);
  font-family: system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  font-size: 0.925rem;
  font-weight: 650;
  text-decoration: none;
}

.button-link:hover {
  opacity: 0.82;
}

.note {
  padding: 18px 20px;
  border: 1px solid var(--line);
  border-radius: 12px;
  color: var(--muted);
}

footer {
  margin-top: 64px;
  padding-top: 22px;
  border-top: 1px solid var(--line);
  color: var(--muted);
  font-family: system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  font-size: 0.8rem;
}

footer p {
  margin: 0;
}

@media (max-width: 520px) {
  main {
    width: min(100% - 32px, 760px);
    padding-top: 44px;
  }

  .site-nav {
    gap: 8px 16px;
    margin-bottom: 38px;
  }

  .card-grid {
    grid-template-columns: 1fr;
  }

  .card {
    min-height: auto;
  }

  header {
    padding-bottom: 28px;
  }

  section {
    padding-top: 32px;
  }
}

@media print {
  :root {
    --paper: #ffffff;
    --ink: #000000;
    --muted: #444444;
    --line: #cccccc;
    --link: #000000;
  }

  main {
    width: 100%;
    padding: 0;
  }

  a {
    text-decoration: none;
  }

  .site-nav,
  footer {
    display: none;
  }
}
