:root {
  color-scheme: light;
  --ink: #111;
  --muted: #555;
  --faint: #666;
  --paper: #fff;
  --shade: #f2f2f2;
  --line: #aaa;
  --link: #0000cc;
  --visited: #551a8b;
  --caution: #5d4b00;
  --warning: #8b0000;
  --max: 64rem;
  --serif: Georgia, "Times New Roman", Times, serif;
  --sans: Arial, Helvetica, sans-serif;
  --mono: "Courier New", Courier, monospace;
}

* {
  box-sizing: border-box;
}

html {
  background: var(--paper);
}

body {
  min-height: 100vh;
  margin: 0;
  background: var(--paper);
  color: var(--ink);
  font: 16px/1.45 var(--serif);
}

a {
  color: var(--link);
  text-decoration: underline;
}

a:visited {
  color: var(--visited);
}

a:hover,
a:focus-visible {
  color: #b00000;
}

.skip-link {
  position: fixed;
  top: -5rem;
  left: 1rem;
  z-index: 10;
  padding: .45rem .7rem;
  border: 1px solid var(--ink);
  background: var(--paper);
  color: var(--ink);
  font-family: var(--sans);
}

.skip-link:focus {
  top: 1rem;
}

.site-header {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  width: min(calc(100% - 2rem), var(--max));
  margin: 0 auto;
  padding: 1rem 0 .7rem;
  border-bottom: 3px double var(--ink);
}

.brand,
.brand:visited {
  color: var(--ink);
  font-size: 1.5rem;
  font-weight: bold;
  text-decoration: none;
}

nav {
  display: flex;
  gap: 1.2rem;
  font: .9rem/1.3 var(--sans);
}

nav a.active {
  color: var(--ink);
  font-weight: bold;
  text-decoration: none;
}

main,
footer {
  width: min(calc(100% - 2rem), var(--max));
  margin-inline: auto;
}

h1,
h2,
h3,
p {
  margin-top: 0;
}

h1 {
  margin-bottom: .2rem;
  font-size: 2rem;
  line-height: 1.15;
}

h2 {
  font-size: 1.4rem;
  line-height: 1.2;
}

h3 {
  font-size: 1.08rem;
  line-height: 1.3;
}

.hero {
  padding: 2.2rem 0 1.7rem;
  border-bottom: 1px solid var(--line);
}

.subtitle {
  margin-bottom: 1.2rem;
  color: var(--muted);
  font-size: 1.08rem;
  font-style: italic;
}

.hero-copy,
.lede {
  max-width: 72ch;
}

.metric-row {
  display: flex;
  flex-wrap: wrap;
  gap: .4rem 1.5rem;
  margin-top: 1.3rem;
  color: var(--muted);
  font: .85rem/1.4 var(--sans);
}

.metric-row strong {
  color: var(--ink);
  font-family: var(--mono);
}

.registry-section {
  padding: 1.8rem 0 4rem;
}

.section-heading {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 1rem;
  margin-bottom: .8rem;
}

.section-heading h2 {
  margin-bottom: 0;
}

.data-link {
  font-size: .9rem;
}

.toolbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  padding: .75rem;
  border-block: 1px solid var(--line);
  background: var(--shade);
  font: .85rem/1.3 var(--sans);
}

.search {
  display: flex;
  align-items: center;
  gap: .45rem;
  flex: 1;
  max-width: 37rem;
}

.search input {
  width: 100%;
  min-height: 2rem;
  padding: .25rem .4rem;
  border: 1px solid #777;
  border-radius: 0;
  background: var(--paper);
  color: var(--ink);
  font: .9rem var(--sans);
}

.search input:focus-visible,
.category-filters input:focus-visible,
button:focus-visible {
  outline: 2px solid var(--link);
  outline-offset: 2px;
}

.filters {
  display: flex;
  align-items: center;
  gap: .35rem;
}

.category-filters {
  display: flex;
  flex-wrap: wrap;
  gap: .45rem .75rem;
  font: .8rem var(--sans);
}

.category-filters label {
  display: flex;
  align-items: center;
  gap: .3rem;
}

.category-filters input {
  min-height: 2rem;
  width: 9rem;
  padding: .25rem .4rem;
  border: 1px solid #777;
  border-radius: 0;
  background: var(--paper);
  color: var(--ink);
  font: .9rem var(--sans);
}

.category-tokens,
.category-feed-list {
  display: flex;
  flex-wrap: wrap;
  gap: .3rem .5rem;
}

.category-tokens code {
  white-space: nowrap;
}

.category-feed-item {
  white-space: nowrap;
}

.unclassified {
  color: var(--faint);
}

.filter {
  min-height: 2rem;
  padding: .25rem .5rem;
  border: 1px solid #777;
  border-radius: 0;
  background: #e8e8e8;
  color: var(--ink);
  cursor: pointer;
  font: .8rem var(--sans);
}

.filter:hover {
  background: #ddd;
}

.filter.active {
  border-color: var(--ink);
  background: var(--paper);
  font-weight: bold;
}

.status {
  margin-top: 1rem;
  padding: 1rem;
  border: 1px dashed var(--line);
  color: var(--muted);
  text-align: center;
}

.status.error {
  border-color: var(--warning);
  color: var(--warning);
}

.status.empty {
  padding-block: 2rem;
}

.entry-grid {
  margin-top: 1rem;
}

.entry-card {
  padding: 1.15rem .2rem 1.25rem;
  border-bottom: 1px solid var(--line);
}

.card-top {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 1rem;
}

.entry-id {
  color: var(--muted);
  font: .78rem/1.4 var(--mono);
}

.trust-badge {
  color: var(--muted);
  font: .78rem/1.4 var(--sans);
}

.trust-badge.qualified {
  color: var(--caution);
  font-weight: bold;
}

.entry-card h3 {
  margin: .35rem 0 .25rem;
}

.card-abstract {
  max-width: 76ch;
  margin-bottom: .75rem;
}

.card-meta {
  display: flex;
  gap: .75rem 2rem;
  margin-bottom: .65rem;
  color: var(--muted);
  font-size: .88rem;
}

.card-meta small {
  display: block;
  margin-bottom: .1rem;
  color: var(--faint);
  font: .68rem/1.3 var(--sans);
  text-transform: uppercase;
}

.card-meta > div {
  min-width: 0;
}

.card-meta span {
  overflow-wrap: anywhere;
}

.card-footer {
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  gap: .5rem 1rem;
  font-size: .85rem;
}

.repo-link {
  overflow-wrap: anywhere;
}

footer {
  display: flex;
  justify-content: space-between;
  gap: 2rem;
  padding: 1.2rem 0 2rem;
  border-top: 3px double var(--ink);
  color: var(--muted);
  font: .8rem/1.4 var(--sans);
}

.footer-brand {
  color: var(--ink);
  font-family: var(--serif);
  font-weight: bold;
}

.footer-links {
  display: flex;
  gap: 1rem;
}

.about,
.faq {
  max-width: 52rem;
  padding: 2.5rem 0 4rem;
}

.faq > section {
  margin-top: 2.5rem;
  padding-top: 1.5rem;
  border-top: 1px solid var(--line);
}

.faq h3 {
  margin-top: 1.6rem;
  margin-bottom: .35rem;
}

.faq .anchored-heading {
  width: fit-content;
}

.heading-anchor {
  display: inline-flex;
  margin-left: .4rem;
  color: var(--muted);
  opacity: 0;
  text-decoration: none;
  vertical-align: -.1em;
  transition: opacity .12s ease-in-out;
}

.heading-anchor svg {
  fill: currentColor;
}

.heading-anchor:visited {
  color: var(--muted);
}

.faq h2:hover .heading-anchor,
.faq h3:hover .heading-anchor,
.heading-anchor:focus,
.heading-anchor:focus-visible {
  opacity: 1;
}

.heading-anchor:hover,
.heading-anchor:focus-visible {
  color: var(--link);
}

.heading-anchor.copied {
  color: #176f2c;
  opacity: 1;
}

.visually-hidden {
  position: fixed;
  width: 1px;
  height: 1px;
  padding: 0;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}

.clipboard-fallback {
  position: fixed;
  top: 0;
  left: 0;
  width: 1px;
  height: 1px;
  padding: 0;
  border: 0;
  opacity: 0;
}

@media (hover: none) {
  .heading-anchor {
    opacity: 1;
  }
}

.faq li + li {
  margin-top: .35rem;
}

/* These two lists carry full paragraphs rather than short phrases. */
.faq .assertions,
.faq .not-list,
.faq .checkers {
  margin-top: 1rem;
}

.faq .assertions li + li,
.faq .not-list li + li,
.faq .checkers li + li {
  margin-top: .9rem;
}

.faq li > ul,
.faq li > ol {
  margin-top: .35rem;
}

/* Distinguish the nested editorial-floor questions from the checks above. */
.faq .assertions li > ol {
  list-style-type: lower-alpha;
}

.meaning-grid,
.cta {
  margin-top: 2.5rem;
  padding-top: 1.5rem;
  border-top: 1px solid var(--line);
}

.meaning-grid article + article {
  margin-top: 1.5rem;
  padding-top: 1.5rem;
  border-top: 1px dotted var(--line);
}

.eyebrow {
  margin-bottom: .25rem;
  color: var(--muted);
  font: bold .75rem/1.3 var(--sans);
  text-transform: uppercase;
}

.cta {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 1rem;
  padding-bottom: 1.5rem;
  border-bottom: 1px solid var(--line);
}

.cta h2,
.cta p {
  margin-bottom: .2rem;
}

.entry-page {
  min-height: 70vh;
  padding: 2.2rem 0 4rem;
}

.entry-heading {
  max-width: 52rem;
  padding-bottom: 1.5rem;
}

.entry-heading h1 {
  margin-top: .5rem;
  font-size: 2rem;
}

.version-notice {
  margin-bottom: 1.5rem;
  padding: .85rem 1rem;
  border: 2px solid var(--caution);
  background: #fffbea;
}

.version-notice h2 {
  margin: 0;
  color: var(--caution);
  font: bold 1rem/1.3 var(--sans);
}

.version-notice p {
  margin: .25rem 0;
}

.version-history-intro {
  max-width: 72ch;
}

.version-list {
  margin: .8rem 0 0;
  padding: 0;
  border-block: 1px solid var(--line);
  list-style: none;
}

.version-list li {
  display: flex;
  align-items: baseline;
  gap: .5rem;
  padding: .55rem .4rem;
  border-top: 1px dotted var(--line);
}

.version-list li:first-child {
  border-top: 0;
}

.version-state,
.viewing-version {
  padding: .1rem .35rem;
  border: 1px solid var(--line);
  font: bold .7rem/1.3 var(--sans);
  text-transform: uppercase;
}

.version-state.current {
  border-color: #77a67b;
  color: #145c24;
}

.version-state.superseded {
  color: var(--muted);
}

.viewing-version {
  border-style: dashed;
  color: var(--ink);
}

.byline {
  color: var(--muted);
  font-style: italic;
}

.entry-page section {
  padding: 1.5rem 0;
  border-top: 1px solid var(--line);
}

.challenge-links {
  margin-bottom: .75rem;
  font: .9rem/1.4 var(--sans);
}

.challenge-metadata {
  margin-bottom: .75rem;
  padding: .75rem;
  border: 1px solid var(--line);
  background: var(--shade);
}

.challenge-metadata-row {
  display: flex;
  align-items: baseline;
  gap: .75rem;
  margin-top: .45rem;
}

.challenge-module-doc {
  margin-top: .7rem;
  border-top: 1px dotted var(--line);
  padding-top: .55rem;
}

.challenge-module-doc summary {
  cursor: pointer;
  font-weight: bold;
}

.challenge-module-doc pre {
  margin: .6rem 0 0;
  max-height: 24rem;
  overflow: auto;
  padding: .65rem;
  background: var(--paper);
  white-space: pre-wrap;
}

.challenge-no-module-doc {
  margin: .6rem 0 0;
  color: var(--muted);
}

.challenge-frame {
  display: block;
  width: 100%;
  height: 18rem;
  min-height: 10rem;
  max-height: 42rem;
  border: 1px solid var(--line);
  background: var(--paper);
}

.acceptance-callout {
  display: flex;
  gap: .8rem;
  margin-bottom: 1rem;
  padding: .8rem;
  border: 1px solid #77a67b;
  background: #eef8ef;
}

.acceptance-check {
  display: grid;
  flex: 0 0 2rem;
  width: 2rem;
  height: 2rem;
  place-items: center;
  border-radius: 50%;
  background: #19712b;
  color: #fff;
  font: bold 1.25rem/1 var(--sans);
}

.acceptance-callout strong {
  color: #145c24;
  font: bold 1rem/1.3 var(--sans);
}

.acceptance-callout p,
.solution-summary {
  margin: .2rem 0 0;
}

.card-identity {
  display: grid;
  gap: .18rem;
}

.entry-date {
  color: var(--muted);
  font: .75rem/1.3 var(--sans);
}

.accepted-decision {
  color: #19712b;
}

.solution-dependencies {
  margin-top: 1rem;
}

.solution-dependencies summary {
  cursor: pointer;
  font-weight: bold;
}

.dependency-list {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: .35rem 1rem;
  margin: .75rem 0 0;
  padding-left: 1.25rem;
}

.dependency-list li {
  min-width: 0;
}

.dependency-list code {
  display: block;
  color: var(--muted);
  font-size: .72rem;
}

.challenge-fallback {
  max-width: 62ch;
  color: var(--muted);
}

.render-page {
  width: min(calc(100% - 2rem), 90rem);
}

.details {
  margin: 0;
  border-block: 1px solid var(--line);
}

.detail-row {
  display: grid;
  grid-template-columns: minmax(10rem, .7fr) 2fr;
  padding: .55rem .4rem;
  border-top: 1px dotted var(--line);
}

.detail-row:first-child {
  border-top: 0;
}

.detail-row dt {
  font-weight: bold;
}

.detail-row dd {
  margin: 0;
  overflow-wrap: anywhere;
}

.entry-page h3 {
  margin: 1.2rem 0 .4rem;
  font-size: 1rem;
}

code,
pre {
  font-family: var(--mono);
}

.token-list {
  display: flex;
  flex-wrap: wrap;
  gap: .35rem;
}

.token-list code {
  padding: .15rem .3rem;
  border: 1px solid #bbb;
  background: var(--shade);
  font-size: .8rem;
}

.plain-list,
.reason-list,
.warning-list {
  margin: .4rem 0;
  padding-left: 1.5rem;
}

.reason-list {
  padding: .65rem .75rem .65rem 2rem;
  border-left: 2px solid var(--caution);
  background: var(--shade);
}

.warning-list {
  padding: .65rem .75rem .65rem 2rem;
  border-left: 4px solid var(--warning);
  background: #fff8f2;
}

.decision {
  font: bold .8rem/1.3 var(--sans);
  text-transform: uppercase;
}

.score-grid {
  display: grid;
  grid-template-columns: repeat(5, 1fr);
  margin-bottom: 1rem;
  border-block: 1px solid var(--line);
}

.score {
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  padding: .55rem;
  border-right: 1px dotted var(--line);
}

.score:last-child {
  border-right: 0;
}

.score span {
  display: block;
  margin-bottom: .35rem;
  color: var(--muted);
  font: .7rem/1.3 var(--sans);
  text-transform: uppercase;
}

.score strong {
  font: bold 1.1rem/1.3 var(--mono);
}

.no-warnings {
  color: var(--muted);
}

.machine-record pre {
  max-height: 34rem;
  overflow: auto;
  padding: .75rem;
  border: 1px solid var(--line);
  background: var(--shade);
  font-size: .75rem;
  white-space: pre-wrap;
  overflow-wrap: anywhere;
}

[hidden] {
  display: none !important;
}

@media (max-width: 700px) {
  .site-header,
  .section-heading,
  .toolbar,
  .cta,
  footer {
    align-items: flex-start;
    flex-direction: column;
  }

  .site-header {
    gap: .5rem;
  }

  nav {
    flex-wrap: wrap;
  }

  .toolbar,
  .search {
    width: 100%;
  }

  .filters {
    flex-wrap: wrap;
  }

  .card-top,
  .card-meta,
  .card-footer {
    align-items: flex-start;
    flex-direction: column;
  }

  .version-list li {
    flex-wrap: wrap;
  }

  .detail-row {
    grid-template-columns: 1fr;
    gap: .15rem;
  }

  .dependency-list {
    grid-template-columns: 1fr;
  }

  .score-grid {
    grid-template-columns: repeat(2, 1fr);
  }

  .score:nth-child(2n) {
    border-right: 0;
  }
}

@media print {
  body,
  .entry-page {
    min-height: 0;
  }

  body {
    font-size: 11pt;
  }

  .site-header nav,
  .skip-link,
  .toolbar {
    display: none;
  }

  .site-header,
  main {
    width: 100%;
  }

  a,
  a:visited {
    color: var(--ink);
  }

  a[href^="http"]::after {
    content: " (" attr(href) ")";
    font-size: 90%;
    overflow-wrap: anywhere;
  }

  .entry-card,
  .entry-page section {
    break-inside: avoid;
  }

  .machine-record pre {
    max-height: none;
  }
}
