:root {
  color-scheme: light dark;
  --background: #f7f8fa;
  --surface: #ffffff;
  --text: #16191d;
  --muted: #5c6570;
  --border: #d7dce2;
  --gi: #126782;
  --vala: #7b4ba1;
  --focus: #a14500;
}

* {
  box-sizing: border-box;
}

html {
  min-width: 280px;
  background: var(--background);
  font-family: Inter, ui-sans-serif, system-ui, sans-serif;
  letter-spacing: 0;
}

body {
  min-height: 100vh;
  margin: 0;
  color: var(--text);
  display: flex;
  flex-direction: column;
}

a {
  color: inherit;
}

.site-header {
  width: min(1080px, calc(100% - 48px));
  min-height: 72px;
  margin: 0 auto;
  border-bottom: 1px solid var(--border);
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
}

.wordmark {
  font-family: ui-monospace, SFMono-Regular, Consolas, monospace;
  font-size: 1rem;
  font-weight: 700;
  text-decoration: none;
}

.source-link {
  color: var(--muted);
  font-size: 0.875rem;
  font-weight: 600;
  text-underline-offset: 4px;
}

main {
  width: min(1080px, calc(100% - 48px));
  margin: 0 auto;
  flex: 1;
}

.introduction {
  padding: 72px 0 48px;
}

.eyebrow {
  margin: 0 0 12px;
  color: var(--gi);
  font-size: 0.8125rem;
  font-weight: 700;
  text-transform: uppercase;
}

h1 {
  margin: 0;
  font-family: ui-monospace, SFMono-Regular, Consolas, monospace;
  font-size: 3rem;
  line-height: 1.1;
}

.summary {
  max-width: 640px;
  margin: 18px 0 32px;
  color: var(--muted);
  font-size: 1.125rem;
  line-height: 1.6;
}

.protocol {
  width: min(440px, 100%);
  color: var(--muted);
  display: grid;
  grid-template-columns: auto minmax(28px, 1fr) auto minmax(28px, 1fr) auto;
  align-items: center;
  gap: 12px;
  font-family: ui-monospace, SFMono-Regular, Consolas, monospace;
  font-size: 0.8125rem;
}

.protocol i {
  height: 1px;
  background: var(--border);
}

.protocol strong {
  color: var(--text);
  font-size: 0.75rem;
}

.references {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 20px;
  padding-bottom: 72px;
}

.reference {
  min-height: 240px;
  padding: 28px;
  border: 1px solid var(--border);
  border-top: 4px solid;
  border-radius: 8px;
  background: var(--surface);
  display: flex;
  flex-direction: column;
  text-decoration: none;
  transition: border-color 120ms ease, transform 120ms ease;
}

.reference:hover {
  transform: translateY(-2px);
}

.reference:focus-visible,
.source-link:focus-visible,
.wordmark:focus-visible {
  outline: 3px solid var(--focus);
  outline-offset: 4px;
}

.reference-gi {
  border-top-color: var(--gi);
}

.reference-vala {
  border-top-color: var(--vala);
}

.reference-label {
  color: var(--muted);
  font-size: 0.75rem;
  font-weight: 700;
  text-transform: uppercase;
}

.reference-title {
  margin-top: 16px;
  font-size: 1.375rem;
  font-weight: 750;
  line-height: 1.25;
}

.reference-description {
  margin-top: 12px;
  color: var(--muted);
  line-height: 1.6;
}

.reference-action {
  margin-top: auto;
  padding-top: 28px;
  font-size: 0.875rem;
  font-weight: 700;
}

footer {
  width: min(1080px, calc(100% - 48px));
  margin: 0 auto;
  padding: 24px 0 32px;
  border-top: 1px solid var(--border);
  color: var(--muted);
  font-size: 0.8125rem;
}

@media (max-width: 680px) {
  .site-header,
  main,
  footer {
    width: min(100% - 32px, 1080px);
  }

  .site-header {
    min-height: 64px;
  }

  .introduction {
    padding: 48px 0 36px;
  }

  h1 {
    font-size: 2.5rem;
  }

  .references {
    grid-template-columns: minmax(0, 1fr);
    padding-bottom: 48px;
  }

  .reference {
    min-height: 220px;
    padding: 24px;
  }
}

@media (prefers-color-scheme: dark) {
  :root {
    --background: #111418;
    --surface: #191d22;
    --text: #f1f4f7;
    --muted: #aab3bd;
    --border: #343b43;
    --gi: #58bad3;
    --vala: #c998e4;
    --focus: #ffb05c;
  }
}
