:root {
  color-scheme: dark;
  --background: #111111;
  --text: #f0f1ef;
  --muted: #a1a8a2;
  --line: #343a36;
  --accent: #78dfa0;
  --content-width: 48rem;
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  font-synthesis: none;
  text-rendering: optimizeLegibility;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

* {
  box-sizing: border-box;
}

html {
  min-width: 320px;
  background: var(--background);
  scroll-behavior: smooth;
}

body {
  margin: 0;
  background: var(--background);
  color: var(--text);
  font-size: 1rem;
  line-height: 1.68;
}

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

a:hover {
  color: #b2f4c8;
}

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

.skip-link {
  position: absolute;
  z-index: 2;
  top: 0.75rem;
  left: 0.75rem;
  padding: 0.5rem 0.75rem;
  transform: translateY(-160%);
  background: var(--text);
  color: var(--background);
  font-weight: 650;
}

.skip-link:focus {
  transform: translateY(0);
}

.site-header,
.site-footer {
  display: flex;
  width: min(var(--content-width), calc(100% - 3rem));
  margin-inline: auto;
  align-items: center;
  justify-content: space-between;
}

.site-header {
  min-height: 5.5rem;
  gap: 1.5rem;
  border-bottom: 1px solid var(--line);
}

.wordmark {
  color: var(--text);
  font-size: 0.96rem;
  font-weight: 650;
  letter-spacing: -0.02em;
  text-decoration: none;
  white-space: nowrap;
}

.wordmark span {
  padding-inline: 0.2rem;
  color: var(--accent);
  font-weight: 400;
}

nav,
.footer-links {
  display: flex;
  align-items: center;
  gap: clamp(0.8rem, 3vw, 1.6rem);
}

nav a,
.footer-links a {
  color: var(--muted);
  font-size: 0.9rem;
  text-decoration: none;
}

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

.page-content {
  width: min(var(--content-width), calc(100% - 3rem));
  margin: 0 auto;
  padding-block: clamp(3.75rem, 9vw, 6.5rem) 5rem;
}

h1,
h2,
p {
  margin: 0;
}

h1 {
  max-width: 15ch;
  font-size: clamp(2.4rem, 7vw, 4rem);
  font-weight: 630;
  letter-spacing: -0.055em;
  line-height: 1.06;
}

.lead {
  max-width: 60ch;
  margin-top: 1.6rem;
  color: #d5dad6;
  font-size: clamp(1.1rem, 2.6vw, 1.3rem);
  line-height: 1.6;
}

.intro-detail,
.updated {
  margin-top: 1rem;
  color: var(--muted);
  font-size: 0.94rem;
}

section {
  margin-top: 3.3rem;
  padding-top: 1.5rem;
  border-top: 1px solid var(--line);
}

h2 {
  margin-bottom: 0.8rem;
  font-size: 1.15rem;
  font-weight: 620;
  letter-spacing: -0.025em;
  line-height: 1.3;
}

section p + p {
  margin-top: 0.85rem;
}

.legal-content {
  padding-top: clamp(3.25rem, 7vw, 5rem);
}

.legal-content h1 {
  font-size: clamp(2.5rem, 6vw, 3.5rem);
}

.legal-content section:first-of-type {
  margin-top: 2.8rem;
}

code {
  padding: 0.08em 0.28em;
  border: 1px solid #3a403c;
  border-radius: 0.25rem;
  color: #d8e2db;
  font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
  font-size: 0.9em;
  overflow-wrap: anywhere;
}

.site-footer {
  min-height: 5rem;
  gap: 1rem;
  border-top: 1px solid var(--line);
  color: var(--muted);
  font-size: 0.83rem;
}

.site-footer p {
  white-space: nowrap;
}

@media (max-width: 600px) {
  .site-header,
  .site-footer,
  .page-content {
    width: calc(100% - 2rem);
  }

  .site-header {
    min-height: 4.75rem;
    align-items: flex-start;
    flex-direction: column;
    justify-content: center;
    gap: 0.6rem;
    padding-block: 0.8rem;
  }

  nav {
    gap: 1.25rem;
  }

  nav a {
    font-size: 0.86rem;
  }

  .page-content {
    padding-block: 3.25rem 4rem;
  }

  section {
    margin-top: 2.6rem;
    padding-top: 1.25rem;
  }

  .site-footer {
    min-height: 5.75rem;
    align-items: flex-start;
    flex-direction: column;
    justify-content: center;
    gap: 0.35rem;
  }

  .footer-links {
    gap: 1.15rem;
  }
}

@media (prefers-reduced-motion: reduce) {
  html {
    scroll-behavior: auto;
  }
}
