:root {
  color-scheme: light;
  --ink: #17211c;
  --paper: #f4f7f5;
  --surface: #ffffff;
  --muted: #66726b;
  --line: #cad4ce;
  --forest: #196348;
  --cobalt: #315fb5;
  --amber: #a65d0a;
  --focus: #f0a202;
  font-family: "Aptos", "Segoe UI", "Helvetica Neue", Arial, sans-serif;
  font-synthesis: none;
  letter-spacing: 0;
  text-rendering: optimizeLegibility;
}

* {
  box-sizing: border-box;
}

html {
  background: var(--paper);
  scroll-behavior: smooth;
}

body {
  display: flex;
  flex-direction: column;
  min-width: 280px;
  min-height: 100vh;
  margin: 0;
  overflow-wrap: anywhere;
  background: var(--paper);
  color: var(--ink);
  line-height: 1.55;
  -webkit-tap-highlight-color: rgba(49, 95, 181, 0.16);
}

a {
  color: inherit;
  touch-action: manipulation;
}

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

.skip-link {
  position: fixed;
  top: 0.75rem;
  left: 0.75rem;
  z-index: 20;
  padding: 0.6rem 0.85rem;
  background: var(--surface);
  color: var(--ink);
  font-weight: 700;
  transform: translateY(-180%);
  transition: transform 120ms ease;
}

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

.masthead {
  border-top: 4px solid var(--cobalt);
  border-bottom: 1px solid #304139;
  background: var(--ink);
  color: #ffffff;
}

.masthead-inner {
  display: flex;
  width: min(100% - 2rem, 1180px);
  min-height: 76px;
  margin: 0 auto;
  align-items: center;
  justify-content: space-between;
  gap: 1.5rem;
}

.brand {
  display: inline-flex;
  min-width: 0;
  align-items: center;
  gap: 0.8rem;
  color: #ffffff;
  text-decoration: none;
}

.brand strong,
.brand small {
  display: block;
}

.brand strong {
  font-family: Charter, "Bitstream Charter", Cambria, Georgia, serif;
  font-size: 1.35rem;
  font-weight: 700;
}

.brand small {
  color: #bfc9c3;
  font-family: ui-monospace, "SFMono-Regular", Consolas, monospace;
  font-size: 0.68rem;
  text-transform: uppercase;
}

.proof-mark {
  display: grid;
  width: 42px;
  height: 42px;
  flex: 0 0 42px;
  place-items: center;
  border: 1px solid #789087;
  color: #ffffff;
  font-family: Cambria, Georgia, serif;
  font-size: 1.55rem;
}

.masthead-link {
  flex: 0 0 auto;
  border-bottom: 1px solid #789087;
  color: #eef3f0;
  font-size: 0.82rem;
  font-weight: 700;
  text-decoration: none;
  text-transform: uppercase;
  transition: border-color 120ms ease, color 120ms ease;
}

.masthead-link:hover {
  border-color: #ffffff;
  color: #ffffff;
}

.page-shell {
  width: min(100% - 2rem, 1180px);
  flex: 1 0 auto;
  margin: 0 auto;
  padding: 3.5rem 0 5rem;
}

.narrow-shell {
  width: min(100% - 2rem, 860px);
}

.catalog-intro,
.page-heading {
  max-width: 760px;
  padding: 0.4rem 0 3rem;
}

.catalog-intro {
  border-left: 4px solid var(--forest);
  padding-left: 1.5rem;
}

.eyebrow {
  margin: 0 0 0.7rem;
  color: var(--forest);
  font-family: ui-monospace, "SFMono-Regular", Consolas, monospace;
  font-size: 0.75rem;
  font-weight: 700;
  text-transform: uppercase;
}

h1,
h2 {
  text-wrap: balance;
}

h1 {
  margin: 0;
  font-family: Charter, "Bitstream Charter", Cambria, Georgia, serif;
  font-size: 3rem;
  line-height: 1.05;
}

.catalog-intro > p:last-child {
  margin: 1rem 0 0;
  color: var(--muted);
  font-size: 1.05rem;
}

.catalog-group + .catalog-group {
  margin-top: 3.2rem;
}

.group-heading {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 1rem;
  border-bottom: 2px solid var(--ink);
  padding-bottom: 0.65rem;
}

.group-heading h2,
.page-shell > h2 {
  margin: 0;
  font-family: Charter, "Bitstream Charter", Cambria, Georgia, serif;
  font-size: 1.3rem;
}

.page-shell > h2 {
  margin-top: 2.5rem;
  margin-bottom: 0.65rem;
}

.group-count {
  color: var(--muted);
  font-family: ui-monospace, "SFMono-Regular", Consolas, monospace;
  font-variant-numeric: tabular-nums;
}

.catalog-list,
.resource-list {
  margin: 0;
  padding: 0;
  list-style: none;
}

.catalog-list > li,
.resource-list > li {
  border-bottom: 1px solid var(--line);
}

.catalog-row {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto 1.5rem;
  min-height: 86px;
  align-items: center;
  gap: 1.5rem;
  padding: 1rem 0.35rem;
  text-decoration: none;
  transition: background-color 120ms ease, color 120ms ease;
}

.catalog-row:hover {
  background: #e8efeb;
  color: #0f5038;
}

.catalog-title {
  min-width: 0;
}

.catalog-title strong,
.catalog-title code {
  display: block;
}

.catalog-title strong {
  font-family: Charter, "Bitstream Charter", Cambria, Georgia, serif;
  font-size: 1.08rem;
}

.catalog-title code,
.identifier,
.catalog-version {
  font-family: ui-monospace, "SFMono-Regular", Consolas, monospace;
}

.catalog-title code {
  margin-top: 0.25rem;
  color: var(--muted);
  font-size: 0.72rem;
}

.catalog-version {
  color: var(--cobalt);
  font-size: 0.78rem;
  font-variant-numeric: tabular-nums;
}

.link-arrow {
  color: var(--amber);
  font-size: 1.15rem;
  font-weight: 700;
}

.breadcrumb {
  display: flex;
  flex-wrap: wrap;
  gap: 0.55rem;
  margin-bottom: 2rem;
  color: var(--muted);
  font-size: 0.82rem;
}

.breadcrumb a,
.back-link {
  color: var(--cobalt);
  font-weight: 700;
  text-underline-offset: 0.18em;
}

.project-heading h1 {
  font-size: 2.45rem;
}

.identifier {
  display: block;
  width: fit-content;
  max-width: 100%;
  margin-top: 1rem;
  color: var(--muted);
  font-size: 0.78rem;
  white-space: normal;
}

.resource-list {
  border-top: 2px solid var(--ink);
}

.resource-link {
  display: flex;
  min-height: 62px;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  padding: 0.9rem 0.35rem;
  font-weight: 700;
  text-decoration: none;
  transition: background-color 120ms ease, color 120ms ease;
}

.resource-link:hover {
  background: #e8eef8;
  color: #214989;
}

.empty-state {
  padding: 1rem 0.35rem;
  color: var(--muted);
}

.back-link {
  display: inline-flex;
  margin-top: 2.5rem;
  align-items: center;
  gap: 0.45rem;
}

.site-footer {
  display: flex;
  width: min(100% - 2rem, 1180px);
  margin: 0 auto;
  justify-content: space-between;
  gap: 1rem;
  border-top: 1px solid var(--line);
  padding: 1.4rem 0 2.4rem;
  color: var(--muted);
  font-family: ui-monospace, "SFMono-Regular", Consolas, monospace;
  font-size: 0.7rem;
  text-transform: uppercase;
}

.redirect-page {
  display: grid;
  min-height: 100vh;
  place-items: center;
}

@media (max-width: 640px) {
  .masthead-inner,
  .page-shell,
  .narrow-shell,
  .site-footer {
    width: min(100% - 1.25rem, 1180px);
  }

  .masthead-inner {
    min-height: 68px;
  }

  .brand small {
    display: none;
  }

  .proof-mark {
    width: 36px;
    height: 36px;
    flex-basis: 36px;
  }

  .masthead-link {
    font-size: 0.7rem;
  }

  .page-shell {
    padding-top: 2.5rem;
  }

  h1,
  .project-heading h1 {
    font-size: 2.2rem;
  }

  .catalog-intro {
    padding-left: 1rem;
  }

  .catalog-row {
    grid-template-columns: minmax(0, 1fr) 1.2rem;
    gap: 0.75rem;
  }

  .catalog-version {
    grid-column: 1;
    grid-row: 2;
  }

  .catalog-row > .link-arrow {
    grid-column: 2;
    grid-row: 1 / span 2;
  }

  .site-footer {
    display: block;
  }

  .site-footer span {
    display: block;
  }
}

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

  .skip-link,
  .catalog-row,
  .resource-link,
  .masthead-link {
    transition: none;
  }
}
