:root {
  color-scheme: light dark;
  --bg: #f4f1e9;
  --panel: #fffdf7;
  --text: #18202a;
  --muted: #596570;
  --accent: #006b59;
  --line: #d8d4ca;
  --code: #ebe7dd;
  font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont,
    "Segoe UI", sans-serif;
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  line-height: 1.65;
  overflow-wrap: break-word;
  -webkit-font-smoothing: antialiased;
}

.skip-link {
  position: fixed;
  z-index: 10;
  top: 12px;
  left: 20px;
  padding: 12px 18px;
  background: var(--text);
  color: var(--bg);
  transform: translateY(-180%);
}

.skip-link:focus {
  transform: none;
  color: var(--bg);
}

header,
main,
footer {
  width: min(1080px, calc(100% - 40px));
  margin-inline: auto;
}

header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 22px 0;
  border-bottom: 1px solid var(--line);
}

nav {
  display: flex;
  gap: 12px;
}

.brand,
nav a {
  display: inline-flex;
  min-height: 44px;
  align-items: center;
}

.brand {
  font-weight: 750;
  letter-spacing: -0.02em;
  gap: 10px;
}

nav a {
  padding: 0 4px;
}

a {
  color: inherit;
  text-decoration-thickness: 1px;
  text-underline-offset: 3px;
}

header a,
.note-card h3 a {
  text-decoration: none;
}

a:hover,
a[aria-current] {
  color: var(--accent);
}

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

main {
  padding: 72px 0;
}

.hero {
  max-width: 800px;
  padding-bottom: 64px;
}

.hero h1,
.prose h1,
.note h1 {
  margin: 0.2em 0;
  font-size: clamp(2.4rem, 7vw, 5.2rem);
  letter-spacing: -0.055em;
  line-height: 1.02;
  text-wrap: balance;
}

.hero-actions {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 12px 24px;
  margin-top: 28px;
}

.hero-actions a {
  display: inline-flex;
  align-items: center;
  min-height: 44px;
}

.primary-link {
  gap: 28px;
  padding: 12px 20px;
  background: var(--accent);
  color: var(--panel);
  border: 1px solid var(--accent);
  border-radius: 6px;
  font-weight: 650;
  text-decoration: none;
}

.primary-link:hover {
  background: var(--text);
  color: var(--bg);
}

#current-notes,
.note h2 {
  scroll-margin-top: 24px;
}

.hero p:not(.eyebrow),
.prose > p,
.dek {
  color: var(--muted);
  font-size: 1.15rem;
}

.hero p.activity {
  margin-top: 1.25rem;
  font-size: 0.9rem;
}

.eyebrow,
.meta {
  color: var(--accent);
  font-size: 0.75rem;
  font-weight: 750;
  letter-spacing: 0.12em;
  text-transform: uppercase;
}

.grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(min(100%, 17rem), 1fr));
  gap: 20px;
}

.grid article {
  padding: 24px;
  border: 1px solid var(--line);
  border-radius: 6px;
  background: var(--panel);
  min-width: 0;
  display: flex;
  flex-direction: column;
}

.grid h3 {
  margin: 0.7rem 0;
  font-size: 1.35rem;
  line-height: 1.25;
  text-wrap: balance;
}

.grid article p:last-child {
  color: var(--muted);
}

.note-card h3 a:hover {
  text-decoration: underline;
}

.prose,
.article-shell {
  max-width: 800px;
}

.prose {
  min-height: 65vh;
}

.prose h1,
.note h1 {
  font-size: clamp(2.4rem, 6vw, 4.4rem);
}

.prose h2,
.note h2 {
  margin: 2.2em 0 0.5em;
  font-size: clamp(1.45rem, 3vw, 2rem);
  letter-spacing: -0.025em;
  line-height: 1.2;
}

.prose a,
.note a {
  text-decoration: underline;
}

.note > p,
.note li {
  max-width: 72ch;
  line-height: 1.8;
}

.note .dek {
  max-width: 62ch;
  font-size: 1.25rem;
}

.byline {
  margin: 1.5rem 0 3rem;
  color: var(--muted);
  font-size: 0.9rem;
}

table {
  display: block;
  width: 100%;
  margin: 2rem 0;
  overflow-x: auto;
  border-collapse: collapse;
  background: var(--panel);
}

caption {
  padding: 0 0 0.7rem;
  color: var(--muted);
  font-size: 0.9rem;
  text-align: left;
}

th,
td {
  min-width: 150px;
  padding: 0.85rem 1rem;
  border: 1px solid var(--line);
  text-align: left;
  vertical-align: top;
}

th {
  font-size: 0.85rem;
}

.callout {
  margin: 2rem 0;
  padding: 1.1rem 1.25rem;
  border-left: 4px solid var(--accent);
  background: var(--panel);
}

pre {
  margin: 2rem 0;
  padding: 1.25rem;
  overflow-x: auto;
  border: 1px solid var(--line);
  border-radius: 12px;
  background: var(--code);
  color: var(--text);
  font-size: 0.9rem;
  line-height: 1.55;
}

code {
  font-family: "SFMono-Regular", Consolas, "Liberation Mono", monospace;
}

.checklist,
.references {
  padding-left: 1.4rem;
}

.checklist li + li,
.references li + li {
  margin-top: 0.65rem;
}

.more-notes {
  display: block;
  margin-top: 4rem;
  padding-top: 1.5rem;
  border-top: 1px solid var(--line);
}

.more-notes h2 {
  margin: 0 0 1rem;
  font-size: 1.2rem;
}

.more-notes ul {
  display: grid;
  gap: 1rem;
  margin: 0 0 1.5rem;
  padding: 0;
  list-style: none;
}

.more-notes li {
  display: flex;
  flex-direction: column;
}

.more-notes a {
  padding: 0;
}

.more-notes li a {
  min-height: 0;
  font-size: 1.15rem;
  font-weight: 650;
}

.note-card .meta a {
  text-decoration: none;
}

.section-link {
  margin-top: 1.5rem;
}

.topic {
  padding-top: 2rem;
}

.topic h2 {
  margin: 0 0 1rem;
}

.prose.wide {
  max-width: 1080px;
}

.glossary dt {
  margin-top: 1.4rem;
  font-weight: 700;
}

.glossary dd {
  margin: 0.3rem 0 0;
  color: var(--muted);
}

.news-list {
  padding-left: 1.4rem;
}

.news-list li + li {
  margin-top: 0.75rem;
}

.news-list .meta {
  display: block;
  font-size: 0.7rem;
}

.update-list article {
  padding: 1.5rem 0;
  border-top: 1px solid var(--line);
}

.update-list h2 {
  margin-top: 0.25rem;
}

footer {
  display: flex;
  justify-content: space-between;
  gap: 24px;
  padding: 28px 0 48px;
  border-top: 1px solid var(--line);
  color: var(--muted);
  font-size: 0.9rem;
  align-items: flex-start;
}

footer p {
  margin: 6px 0 0;
}

@media (max-width: 760px) {
  header {
    display: block;
    padding: 12px 0 8px;
  }

  th,
  td {
    min-width: 0;
    padding: 0.7rem;
  }

  nav {
    flex-wrap: wrap;
    gap: 0 14px;
  }

  main {
    padding: 48px 0;
  }

  .hero {
    padding-bottom: 40px;
  }

  footer {
    display: block;
  }

  footer nav {
    margin-top: 16px;
  }
}

@media (prefers-color-scheme: dark) {
  :root {
    --bg: #0d131c;
    --panel: #131d29;
    --text: #edf4f1;
    --muted: #a8b4bd;
    --accent: #8be0c4;
    --line: #263441;
    --code: #111a25;
  }
}

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