:root {
  --page: #FBFAF7;
  --ink: #17262E;
  --rule: #CBD5D8;
  --ranked: #2F6F5E;
  --missed: #7A2E4A;
}
*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body {
  margin: 0;
  background: var(--page);
  color: var(--ink);
  font-family: "Public Sans", system-ui, -apple-system, "Segoe UI", sans-serif;
  font-size: 1.0625rem;
  line-height: 1.6;
}
h1, h2 { font-family: "Fraunces", Georgia, serif; font-weight: 600; line-height: 1.15; margin: 0 0 1rem; }
h1 { font-size: clamp(1.75rem, 4.5vw, 2.75rem); }
h2 { font-size: clamp(1.4rem, 3vw, 1.9rem); }
h3 { font-family: "Public Sans", system-ui, sans-serif; font-size: 1.0625rem; font-weight: 700; margin: 1.5rem 0 0.25rem; }
p, ul, ol, dl, table { margin: 0 0 1rem; }
a { color: var(--ink); text-decoration-thickness: 1px; text-underline-offset: 0.2em; }
a:hover { text-decoration-thickness: 2px; transition: text-decoration-thickness 0.15s; }
a:focus-visible, .button:focus-visible { outline: 3px solid var(--ink); outline-offset: 3px; }
code, .q, .data { font-family: "IBM Plex Mono", ui-monospace, Menlo, monospace; font-size: 0.95em; }

.wrap { max-width: 64rem; margin: 0 auto; padding: 0 1.25rem; }
.site-header { border-bottom: 1px solid var(--rule); }
.site-header .wrap { display: flex; justify-content: space-between; align-items: baseline; gap: 1rem; padding-top: 1rem; padding-bottom: 1rem; flex-wrap: wrap; }
.wordmark { font-weight: 700; text-decoration: none; }
.site-header nav a { margin-left: 1.25rem; }

section { border-top: 1px solid var(--rule); padding: 2.5rem 0; }
section:first-of-type { border-top: 0; }
.row { display: grid; grid-template-columns: 11rem minmax(0, 1fr); gap: 2rem; }
.gutter { font-weight: 700; }
.prose { max-width: 62ch; }
.prose > :last-child { margin-bottom: 0; }

.hero { padding: 3.5rem 0 3rem; }
.hero .query { display: block; font-family: "IBM Plex Mono", ui-monospace, Menlo, monospace; font-size: clamp(2rem, 8vw, 4rem); line-height: 1.1; padding-bottom: 0.5rem; border-bottom: 1px solid var(--ink); max-width: 14ch; margin: 0 0 1.5rem; overflow-wrap: anywhere; }
.counts { display: grid; grid-template-columns: 11rem minmax(0, 1fr); gap: 0.25rem 2rem; margin: 0 0 2rem; }
.counts dt { font-weight: 700; }
.counts dd { margin: 0; font-family: "IBM Plex Mono", ui-monospace, Menlo, monospace; }
.missed { border-left: 0.35rem solid var(--missed); padding-left: 0.6rem; }
.ranked { border-left: 0.35rem solid var(--ranked); padding-left: 0.6rem; }
.returned-line { animation: settle 0.7s ease-out 0.5s both; }
@keyframes settle { from { opacity: 0; transform: translateY(0.6rem); } to { opacity: 1; transform: none; } }
@media (prefers-reduced-motion: reduce) { .returned-line { animation: none; } }

.button { display: inline-block; background: var(--ink); color: var(--page); padding: 0.7rem 1.4rem; border-radius: 0.5rem; text-decoration: none; font-weight: 700; transition: background-color 0.15s; }
.button:hover { background: var(--ranked); }
@media (prefers-reduced-motion: reduce) { .button, a { transition: none; } }

.note { border-top: 1px solid var(--ink); border-bottom: 1px solid var(--ink); padding: 1rem 0; margin: 0 0 2rem; font-weight: 600; }
.table-scroll { overflow-x: auto; }
table { border-collapse: collapse; width: 100%; min-width: 40rem; }
th, td { text-align: left; vertical-align: top; padding: 0.7rem 0.75rem 0.7rem 0; border-top: 1px solid var(--rule); }
th { font-weight: 700; border-top: 1px solid var(--ink); }
caption { text-align: left; font-weight: 700; margin-bottom: 0.5rem; }
.scorecard { display: grid; grid-template-columns: repeat(auto-fit, minmax(9rem, 1fr)); gap: 1.5rem; margin: 0 0 2rem; }
.scorecard dt { font-weight: 700; }
.scorecard dd { margin: 0; font-family: "IBM Plex Mono", ui-monospace, Menlo, monospace; font-size: 2rem; line-height: 1.2; }
pre { font-family: "IBM Plex Mono", ui-monospace, Menlo, monospace; font-size: 0.95rem; border-left: 2px solid var(--rule); margin: 0 0 1rem; padding: 0.25rem 0 0.25rem 1rem; white-space: pre-wrap; overflow-wrap: anywhere; }
.site-footer { border-top: 1px solid var(--rule); padding: 2rem 0 3rem; }

@media (max-width: 40rem) {
  .row, .counts { grid-template-columns: minmax(0, 1fr); gap: 0.5rem; }
  .hero { padding-top: 2rem; }
  .site-header nav a { margin-left: 0; margin-right: 1.25rem; }
}
