/* PuffinParse benchmark viewer.
 *
 * Styled only through the custom properties of tokens.css (website/assets/tokens.css, copied
 * next to this file by build.py and linked before it); docs/DESIGN.md explains them. No private
 * palette, no web fonts, no framework. Theme: `data-theme` + the shared `puffinparse-theme` key.
 */

* {
  box-sizing: border-box;
}
html {
  -webkit-text-size-adjust: 100%;
}
body {
  margin: 0;
  background: var(--paper);
  color: var(--ink);
  font-family: var(--font-sans);
  font-size: var(--t-md);
  line-height: var(--lh-ui);
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
}
a {
  color: var(--link);
  text-decoration: underline;
  text-decoration-color: var(--link-underline);
  text-decoration-thickness: 1px;
  text-underline-offset: 3px;
  transition: color var(--dur) var(--ease), text-decoration-color var(--dur) var(--ease);
}
a:hover {
  color: var(--scan-ink);
  text-decoration-color: currentColor;
}
code,
pre,
kbd,
.mono {
  font-family: var(--font-mono);
  font-variant-numeric: tabular-nums;
}
code {
  font-size: 0.92em;
}
kbd,
.kbd {
  font-family: var(--font-mono);
  font-size: var(--t-xs);
  border: var(--hair) solid var(--rule);
  border-bottom-width: 2px;
  border-radius: var(--r-1);
  padding: 0 0.35rem;
  color: var(--ink-2);
  background: var(--paper-2);
}
h1,
h2,
h3 {
  margin: 0;
  line-height: var(--lh-tight);
  text-wrap: balance;
  letter-spacing: -0.01em;
}
h1 {
  font-size: var(--t-xl);
  font-weight: var(--w-strong);
}
h2 {
  font-size: var(--t-lg);
  font-weight: var(--w-strong);
}
h3 {
  font-size: var(--t-md);
  font-weight: var(--w-medium);
}
p {
  margin: 0;
}
:focus-visible {
  outline: 2px solid var(--scan-ink);
  outline-offset: 2px;
}
button,
select,
input {
  font: inherit;
  color: inherit;
}
.sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  overflow: hidden;
  clip: rect(0 0 0 0);
  white-space: nowrap;
}
.num {
  text-align: right;
  font-variant-numeric: tabular-nums;
}
.muted {
  color: var(--ink-3);
}
@media (prefers-reduced-motion: reduce) {
  * {
    transition: none !important;
    animation: none !important;
    scroll-behavior: auto !important;
  }
}

/* ------------------------------------------------------------------ chrome */

.wrap {
  width: 100%;
  max-width: var(--page-max);
  margin: 0 auto;
  padding: 0 var(--gutter);
}
.skip-link {
  position: absolute;
  left: -999px;
  top: var(--s-2);
  background: var(--paper);
  padding: var(--s-2) var(--s-3);
  border-radius: var(--r-2);
  z-index: 20;
}
.skip-link:focus {
  left: var(--s-2);
}
header.top {
  border-bottom: var(--hair) solid var(--rule);
  background: var(--paper);
}
.topin {
  max-width: var(--page-max);
  margin: 0 auto;
  padding: 0 var(--gutter);
  display: flex;
  align-items: center;
  gap: var(--s-3);
  height: 3.25rem;
}
.brand {
  display: inline-flex;
  align-items: center;
  gap: var(--s-2);
  font-weight: var(--w-strong);
  font-size: var(--t-base);
  color: var(--ink);
  text-decoration: none;
  white-space: nowrap;
}
.brand:hover {
  color: var(--ink);
}
.brand-sub {
  font-weight: var(--w-regular);
  color: var(--ink-3);
  font-size: var(--t-md);
}
.spacer {
  flex: 1;
}
.site-nav {
  display: flex;
  gap: var(--s-1);
}
.site-nav a {
  color: var(--ink-2);
  text-decoration: none;
  padding: var(--s-1) var(--s-2);
  border-radius: var(--r-1);
}
.site-nav a:hover {
  color: var(--ink);
  background: var(--paper-2);
}
.site-nav a[aria-current="page"] {
  color: var(--ink);
  font-weight: var(--w-medium);
}
.iconbtn {
  display: inline-grid;
  place-items: center;
  min-width: 2rem;
  height: 2rem;
  padding: 0 var(--s-1);
  border: 0;
  border-radius: var(--r-2);
  background: transparent;
  color: var(--ink-2);
  cursor: pointer;
  text-decoration: none;
  font-size: var(--t-base);
  line-height: 1;
}
.iconbtn:hover {
  background: var(--paper-2);
  color: var(--ink);
}
.iconbtn[aria-disabled="true"] {
  color: var(--rule);
  pointer-events: none;
}
main.wrap {
  padding-top: var(--s-6);
  padding-bottom: var(--s-7);
  outline: none;
}
.site-footer {
  border-top: var(--hair) solid var(--rule);
  padding: var(--s-4) 0 var(--s-5);
  font-size: var(--t-xs);
  color: var(--ink-3);
}
.site-footer a {
  color: var(--ink-3);
}
.loading,
.empty {
  color: var(--ink-3);
  padding: var(--s-4) 0;
}
.error {
  max-width: var(--measure);
  display: grid;
  gap: var(--s-3);
}

/* ------------------------------------------------------------------ building blocks */

.page-head {
  display: flex;
  flex-wrap: wrap;
  align-items: flex-end;
  justify-content: space-between;
  gap: var(--s-3) var(--s-5);
  margin-bottom: var(--s-6);
}
.page-head > div {
  display: grid;
  gap: var(--s-2);
  min-width: 0;
}
.lede {
  color: var(--ink-2);
}
.section {
  margin-top: var(--s-7);
  display: grid;
  gap: var(--s-4);
}
.section-head {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: var(--s-3);
}
.caption {
  font-size: var(--t-xs);
  color: var(--ink-3);
  max-width: var(--measure);
}
.label {
  font-size: var(--t-xs);
  text-transform: uppercase;
  letter-spacing: var(--tracking-label);
  color: var(--ink-3);
  font-weight: var(--w-medium);
}

select,
input[type="search"] {
  height: 2.125rem;
  border: var(--hair) solid var(--rule);
  border-radius: var(--r-1);
  background: var(--paper);
  padding: 0 var(--s-2);
  font-size: var(--t-sm);
  max-width: 100%;
  min-width: 0;
}
select {
  padding-right: var(--s-5);
  appearance: none;
  -webkit-appearance: none;
  background-image: linear-gradient(45deg, transparent 50%, var(--ink-3) 50%),
    linear-gradient(135deg, var(--ink-3) 50%, transparent 50%);
  background-position: calc(100% - 13px) 50%, calc(100% - 9px) 50%;
  background-size: 4px 4px;
  background-repeat: no-repeat;
  cursor: pointer;
}
select:hover,
input[type="search"]:hover {
  border-color: var(--ink-3);
}

.btn {
  display: inline-flex;
  align-items: center;
  gap: var(--s-1);
  height: 2rem;
  padding: 0 var(--s-3);
  border: var(--hair) solid var(--rule);
  border-radius: var(--r-2);
  background: var(--paper);
  color: var(--ink);
  font-size: var(--t-sm);
  cursor: pointer;
  text-decoration: none;
  white-space: nowrap;
}
.btn:hover {
  background: var(--paper-2);
  color: var(--ink);
}
.btn.sm {
  height: 1.75rem;
  padding: 0 var(--s-2);
  font-size: var(--t-xs);
}
.btn[disabled] {
  opacity: 0.45;
  cursor: default;
}
.linkbtn {
  border: 0;
  background: none;
  padding: var(--s-1) 0;
  color: var(--ink-2);
  font-size: var(--t-sm);
  cursor: pointer;
  text-decoration: underline;
  text-decoration-color: var(--link-underline);
  text-underline-offset: 3px;
}
.linkbtn:hover {
  color: var(--scan-ink);
}
.toggle {
  border: var(--hair) solid var(--rule);
  background: var(--paper);
  color: var(--ink-2);
  border-radius: var(--r-pill);
  height: 1.875rem;
  padding: 0 var(--s-3);
  font-size: var(--t-sm);
  cursor: pointer;
  white-space: nowrap;
}
.toggle:hover {
  color: var(--ink);
}
.toggle[aria-pressed="true"] {
  background: var(--paper-3);
  color: var(--ink);
  border-color: var(--paper-3);
}

/* segmented control */
.seg {
  display: inline-flex;
  padding: 2px;
  border-radius: var(--r-pill);
  background: var(--paper-2);
  flex-shrink: 0;
}
.seg button {
  border: 0;
  background: none;
  color: var(--ink-2);
  font-size: var(--t-sm);
  padding: 0.2rem 0.75rem;
  border-radius: var(--r-pill);
  cursor: pointer;
  white-space: nowrap;
}
.seg button:hover {
  color: var(--ink);
}
.seg button[aria-pressed="true"] {
  background: var(--paper);
  color: var(--ink);
  box-shadow: 0 0 0 var(--hair) var(--rule);
}

/* disclosure */
details.disclosure {
  border-top: var(--hair) solid var(--rule);
}
details.disclosure:last-of-type {
  border-bottom: var(--hair) solid var(--rule);
}
details.disclosure + details.disclosure {
  border-top: 0;
}
details.disclosure > summary {
  list-style: none;
  cursor: pointer;
  display: flex;
  align-items: center;
  gap: var(--s-2);
  padding: var(--s-3) 0;
  font-size: var(--t-sm);
  color: var(--ink-2);
  font-weight: var(--w-medium);
}
details.disclosure > summary::-webkit-details-marker {
  display: none;
}
details.disclosure > summary::before {
  content: "";
  width: 6px;
  height: 6px;
  border-right: 1.5px solid var(--ink-3);
  border-bottom: 1.5px solid var(--ink-3);
  transform: rotate(-45deg);
  transition: transform var(--dur) var(--ease);
  flex-shrink: 0;
  margin: 0 2px;
}
details.disclosure[open] > summary::before {
  transform: rotate(45deg);
}
details.disclosure > summary:hover {
  color: var(--ink);
}
details.disclosure > summary .count {
  color: var(--ink-3);
  font-weight: var(--w-regular);
}
.disclosure-body {
  padding: 0 0 var(--s-5);
  display: grid;
  gap: var(--s-3);
  min-width: 0;
}
.prose {
  max-width: var(--measure);
  display: grid;
  gap: var(--s-3);
  color: var(--ink-2);
}
.prose ul {
  margin: 0;
  padding-left: 1.1rem;
  display: grid;
  gap: var(--s-1);
}
.prose strong {
  color: var(--ink);
  font-weight: var(--w-medium);
}

/* key/value list */
.kv {
  display: grid;
  grid-template-columns: minmax(6.5rem, max-content) minmax(0, 1fr);
  gap: var(--s-2) var(--s-4);
  margin: 0;
  font-size: var(--t-sm);
}
.kv dt {
  color: var(--ink-3);
}
.kv dd {
  margin: 0;
  min-width: 0;
  overflow-wrap: anywhere;
  color: var(--ink-2);
}
.kv dd.mono {
  font-size: var(--t-xs);
}
.idline {
  display: flex;
  align-items: flex-start;
  gap: var(--s-2);
}
.idline code {
  overflow-wrap: anywhere;
  color: var(--ink);
}

/* code block */
.code-block {
  position: relative;
  background: var(--paper-2);
  border-radius: var(--r-1);
  min-width: 0;
}
.code-block pre {
  margin: 0;
  padding: var(--s-3) 4.5rem var(--s-3) var(--s-3);
  overflow-x: auto;
  font-size: var(--t-xs);
  line-height: 1.6;
  color: var(--ink);
}
.copy-btn {
  position: absolute;
  top: var(--s-2);
  right: var(--s-2);
  border: var(--hair) solid var(--rule);
  background: var(--paper);
  color: var(--ink-2);
  border-radius: var(--r-1);
  font-size: var(--t-xs);
  padding: 0.1rem 0.5rem;
  cursor: pointer;
}
.copy-btn:hover {
  color: var(--ink);
}
.copy-btn.done {
  color: var(--good);
}

/* verdict: CSS-drawn dot (filled = good, half = fair, ring = poor), always with the number */
.vd {
  display: inline-block;
  width: 8px;
  height: 8px;
  border-radius: 50%;
  border: 1.5px solid currentColor;
  flex-shrink: 0;
  vertical-align: 0.05em;
}
.v-good {
  color: var(--good);
}
.v-fair {
  color: var(--fair);
}
.v-poor {
  color: var(--poor);
}
.v-good .vd,
.vd.v-good {
  background: currentColor;
}
.v-fair .vd,
.vd.v-fair {
  background: linear-gradient(90deg, currentColor 50%, transparent 50%);
}
.score {
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  font-family: var(--font-mono);
  font-variant-numeric: tabular-nums;
}
.score .n {
  color: var(--ink);
}
.bar {
  display: inline-block;
  width: 3.5rem;
  height: 3px;
  border-radius: 2px;
  background: var(--rule-2);
  overflow: hidden;
  vertical-align: middle;
  flex-shrink: 0;
}
.bar > i {
  display: block;
  height: 100%;
  background: var(--ink-3);
  opacity: 0.7;
}
.scorebar {
  display: inline-flex;
  align-items: center;
  justify-content: flex-end;
  gap: var(--s-3);
}

/* tables */
.table-wrap {
  overflow-x: auto;
  min-width: 0;
  -webkit-overflow-scrolling: touch;
}
table {
  border-collapse: collapse;
  width: 100%;
  font-size: var(--t-sm);
  font-variant-numeric: tabular-nums;
}
th,
td {
  padding: 0.6rem 0.625rem;
  border-bottom: var(--hair) solid var(--rule-2);
  text-align: left;
  vertical-align: middle;
  white-space: nowrap;
}
th:first-child,
td:first-child {
  padding-left: 0;
}
th:last-child,
td:last-child {
  padding-right: 0;
}
thead th {
  font-size: var(--t-sm);
  color: var(--ink-3);
  font-weight: var(--w-medium);
  border-bottom: var(--hair) solid var(--rule);
  padding-top: 0;
  vertical-align: bottom;
}
tbody th {
  font-weight: var(--w-regular);
}
th.num,
td.num {
  text-align: right;
}
td.best {
  font-weight: var(--w-strong);
  color: var(--ink);
}
td.rank {
  color: var(--ink-3);
  width: 2rem;
}
.sort-btn {
  border: 0;
  background: none;
  padding: 0;
  font: inherit;
  color: inherit;
  letter-spacing: inherit;
  text-transform: inherit;
  cursor: pointer;
  white-space: nowrap;
}
.sort-btn:hover {
  color: var(--ink);
}
th[aria-sort] .sort-btn {
  color: var(--ink);
}
.sort-arrow {
  display: inline-block;
  width: 0.8em;
  font-size: 0.8em;
}
tbody tr:hover > * {
  background: var(--paper-2);
}
.model-id {
  font-family: var(--font-mono);
  font-size: var(--t-sm);
}
a.model-id,
.model-id a {
  text-decoration-color: transparent;
}
a.model-id:hover {
  text-decoration-color: currentColor;
}
.th-sub {
  display: block;
  text-transform: none;
  letter-spacing: 0;
  font-weight: var(--w-regular);
}
.lb-table td.score-cell {
  position: relative;
}
.lb-table .leader .score-cell .n {
  font-weight: var(--w-strong);
}
.lb-table .bbox {
  display: inline-block;
  padding: var(--s-1) var(--s-2);
}
.table-tools .caption {
  max-width: none;
}
.table-tools {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: var(--s-3);
  flex-wrap: wrap;
  margin-bottom: var(--s-2);
}
.sticky-col {
  position: sticky;
  left: 0;
  background: var(--paper);
  z-index: 1;
}
th.cat-group {
  padding-top: var(--s-4);
  font-size: var(--t-sm);
  color: var(--ink-3);
  font-weight: var(--w-medium);
  border-bottom: var(--hair) solid var(--rule);
}
.mhead {
  display: grid;
  line-height: 1.25;
  text-align: right;
}
.mhead .p {
  color: var(--ink-3);
  font-weight: var(--w-regular);
}
.mhead .v {
  color: var(--ink-2);
  font-family: var(--font-mono);
  text-transform: none;
  letter-spacing: 0;
}

/* ------------------------------------------------------------------ leaderboard */

.run-pick select {
  max-width: 22rem;
}
.chart {
  position: relative;
  max-width: 40rem;
}
.chart svg {
  display: block;
  width: 100%;
  height: auto;
  overflow: visible;
}
.chart .grid {
  stroke: var(--rule-2);
}
.chart .axis {
  stroke: var(--rule);
}
.chart .tick,
.chart .axis-label {
  fill: var(--ink-3);
  font-size: 11px;
  font-family: var(--font-sans);
}
.chart .frontier {
  fill: none;
  stroke: var(--ink-3);
  stroke-width: 1;
  stroke-dasharray: 3 3;
}
.chart .dot {
  fill: var(--paper);
  stroke: var(--ink-3);
  stroke-width: 1.5;
}
.chart .front .dot {
  fill: var(--ink-2);
  stroke: var(--ink-2);
}
.chart .top .lbl {
  fill: var(--ink);
  font-weight: var(--w-strong);
}
.chart .hit {
  fill: transparent;
}
.chart .lbl {
  fill: var(--ink-2);
  font-size: 11px;
  font-family: var(--font-mono);
}
.chart .leader-line {
  stroke: var(--rule);
}
.chart .pt:hover .lbl,
.chart .pt:focus .lbl {
  fill: var(--ink);
}
.chart .pt:focus {
  outline: none;
}
.chart .pt:focus .dot {
  stroke: var(--scan-ink);
  stroke-width: 2;
}
.tip {
  position: absolute;
  pointer-events: none;
  background: var(--paper);
  border: var(--hair) solid var(--rule);
  box-shadow: var(--lift);
  border-radius: var(--r-2);
  padding: var(--s-2) var(--s-3);
  font-size: var(--t-xs);
  max-width: 18rem;
  z-index: 5;
}
.bottom-disclosures {
  margin-top: var(--s-7);
}

/* ------------------------------------------------------------------ documents */

.filters {
  display: flex;
  flex-wrap: wrap;
  gap: var(--s-2);
  align-items: center;
  margin-bottom: var(--s-4);
}
.filters input[type="search"] {
  width: 12rem;
}
.filters .spacer {
  flex: 1;
}
.doc-cell {
  white-space: normal;
  min-width: 11rem;
}
.doc-cell a {
  font-weight: var(--w-medium);
  text-decoration-color: transparent;
}
.doc-cell a:hover {
  text-decoration-color: currentColor;
}
.doc-cell .src {
  color: var(--ink-3);
  margin-left: var(--s-2);
  font-size: var(--t-xs);
  white-space: nowrap;
}
.filters label.grow {
  flex: 0 1 14rem;
  display: flex;
}
.filters label.grow input {
  width: 100%;
}
thead th.src-h {
  text-transform: none;
  letter-spacing: 0;
}
.best-cell {
  color: var(--ink-2);
}
td.low a,
td.low {
  color: var(--poor);
}
.pm-cell a {
  text-decoration-color: transparent;
}
.docs-table .count {
  color: var(--ink-3);
}

/* ------------------------------------------------------------------ inspector */

.crumbs {
  display: flex;
  flex-wrap: wrap;
  gap: var(--s-2);
  font-size: var(--t-sm);
  color: var(--ink-3);
  margin-bottom: var(--s-3);
}
.crumbs a {
  color: var(--ink-2);
  text-decoration-color: transparent;
}
.crumbs a:hover {
  text-decoration-color: currentColor;
}
.doc-head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: var(--s-3);
}
.doc-head h1 .ord {
  color: var(--ink-3);
  font-weight: var(--w-regular);
}
.doc-nav {
  display: flex;
  align-items: center;
  gap: 2px;
  flex-shrink: 0;
  font-size: var(--t-sm);
  color: var(--ink-3);
}
.doc-nav .pos {
  font-variant-numeric: tabular-nums;
  padding: 0 var(--s-1);
  min-width: 3.5rem;
  text-align: center;
}
.doc-meta {
  color: var(--ink-2);
  font-size: var(--t-sm);
  margin-top: var(--s-2);
}
.doc-details {
  margin-top: var(--s-4);
  max-width: 48rem;
}
.doc-details > summary {
  padding: var(--s-2) 0;
}
details.doc-details.disclosure,
details.doc-details.disclosure:last-of-type {
  border: 0;
}
.tag-list {
  display: flex;
  flex-wrap: wrap;
  gap: var(--s-1);
}
.tag-list span {
  background: var(--paper-2);
  border-radius: var(--r-1);
  padding: 0 var(--s-2);
  font-size: var(--t-xs);
  color: var(--ink-2);
}

/* model switcher */
.models {
  margin: var(--s-5) 0 var(--s-5);
  position: relative;
}
.chips {
  display: flex;
  gap: var(--s-2);
  overflow-x: auto;
  scrollbar-width: none;
  padding: 2px 2.5rem 2px 2px;
  -webkit-mask-image: linear-gradient(90deg, #000 calc(100% - 2.5rem), transparent);
  mask-image: linear-gradient(90deg, #000 calc(100% - 2.5rem), transparent);
}
.chips::-webkit-scrollbar {
  display: none;
}
.chip {
  display: inline-flex;
  align-items: center;
  gap: var(--s-2);
  padding: 0.3rem 0.6rem;
  border-radius: var(--r-1);
  background: var(--paper-2);
  border: var(--hair) solid transparent;
  color: var(--ink-2);
  font-size: var(--t-sm);
  text-decoration: none;
  white-space: nowrap;
}
.chip:hover {
  color: var(--ink);
  background: var(--paper-3);
}
.chip code {
  font-size: var(--t-sm);
}
.chip .chip-s {
  color: var(--ink-3);
  font-family: var(--font-mono);
  font-size: var(--t-xs);
}
.chip.on {
  background: var(--scan-wash);
  border-color: var(--scan-edge);
  color: var(--ink);
}
.chip.on .chip-s {
  color: var(--ink-2);
}
.model-select {
  display: none;
}
.model-select select {
  width: 100%;
  font-family: var(--font-mono);
}

/* two columns: the page (sticky) and the result */
.insp {
  display: grid;
  grid-template-columns: minmax(0, 5fr) minmax(0, 6fr);
  grid-template-areas:
    "page summary"
    "page work";
  grid-template-rows: auto 1fr;
  gap: var(--s-5) var(--s-7);
  align-items: start;
}
.pagecol {
  grid-area: page;
  position: sticky;
  top: var(--s-4);
  max-height: calc(100vh - 2 * var(--s-4));
  overflow: auto;
  scrollbar-width: thin;
  min-width: 0;
}
.summary {
  grid-area: summary;
  display: grid;
  gap: var(--s-2);
  min-width: 0;
}
.work {
  grid-area: work;
  min-width: 0;
  display: grid;
  gap: var(--s-4);
  align-content: start;
}
.hero {
  justify-self: start;
  display: grid;
  gap: var(--s-1);
  padding: var(--s-3);
  margin-left: calc(-1 * var(--s-3));
}
.hero-n {
  display: flex;
  align-items: center;
  gap: var(--s-3);
  font-family: var(--font-mono);
  font-variant-numeric: tabular-nums;
  font-size: var(--t-2xl);
  font-weight: var(--w-strong);
  line-height: 1;
  color: var(--ink);
  letter-spacing: -0.02em;
}
.hero-n .vd {
  width: 12px;
  height: 12px;
  border-width: 2px;
}
.hero-n .n {
  color: var(--ink);
}
.copy-btn.inline {
  position: static;
  flex-shrink: 0;
}
.hero-n .of {
  font-size: var(--t-base);
  color: var(--ink-3);
  font-weight: var(--w-regular);
  letter-spacing: 0;
}
.verdict {
  font-size: var(--t-base);
  color: var(--ink);
}
.aside {
  font-size: var(--t-sm);
  color: var(--ink-3);
}
.failnote {
  color: var(--poor);
  font-size: var(--t-sm);
  overflow-wrap: anywhere;
}
.metrics {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(8rem, 1fr));
  gap: var(--s-3) var(--s-4);
  margin: 0;
}
.metrics div {
  display: grid;
  gap: 2px;
}
.metrics dt {
  font-size: var(--t-xs);
  color: var(--ink-3);
}
.metrics dd {
  margin: 0;
  font-family: var(--font-mono);
  font-variant-numeric: tabular-nums;
  font-size: var(--t-sm);
}
.summary details.disclosure {
  margin-top: var(--s-2);
}

/* page viewer */
.sv {
  display: grid;
  gap: var(--s-2);
}
.sv-bar {
  display: flex;
  align-items: center;
  gap: var(--s-2);
  min-height: 1.75rem;
  font-size: var(--t-xs);
  color: var(--ink-3);
}
.sv-bar .spacer {
  flex: 1;
}
.sv-open {
  font-size: var(--t-xs);
  color: var(--ink-2);
}
.pager {
  display: inline-flex;
  align-items: center;
  gap: 2px;
}
.pager[hidden] {
  display: none;
}
.pager .iconbtn {
  min-width: 1.75rem;
  height: 1.75rem;
}
.pager-label {
  font-variant-numeric: tabular-nums;
  min-width: 3.5rem;
  text-align: center;
}
.sv-page {
  position: relative;
  border: var(--hair) solid var(--rule);
  background: var(--paper);
  line-height: 0;
}
.sv-media img,
.sv-media canvas {
  display: block;
  width: 100%;
  height: auto;
}
.sv-media .placeholder {
  line-height: var(--lh-ui);
  padding: var(--s-7) var(--s-5);
  color: var(--ink-3);
  text-align: center;
  background: var(--paper-2);
  display: grid;
  gap: var(--s-2);
  justify-items: center;
}
.sv-media .placeholder strong {
  color: var(--ink-2);
  font-weight: var(--w-medium);
}
svg.ov {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  pointer-events: none;
}
svg.ov rect {
  pointer-events: all;
  stroke-width: 1.5;
  fill-opacity: 0.12;
}
.bt-text {
  stroke: var(--box-text);
  fill: var(--box-text);
  background: var(--box-text);
}
.bt-heading {
  stroke: var(--box-title);
  fill: var(--box-title);
  background: var(--box-title);
}
.bt-table {
  stroke: var(--box-table);
  fill: var(--box-table);
  background: var(--box-table);
}
.bt-figure {
  stroke: var(--box-figure);
  fill: var(--box-figure);
  background: var(--box-figure);
}
.bt-list {
  stroke: var(--box-list);
  fill: var(--box-list);
  background: var(--box-list);
}
.bt-furniture {
  stroke: var(--box-furniture);
  fill: var(--box-furniture);
  background: var(--box-furniture);
}
.bt-formula {
  stroke: var(--box-formula);
  fill: var(--box-formula);
  background: var(--box-formula);
}
.bt-other {
  stroke: var(--box-other);
  fill: var(--box-other);
  background: var(--box-other);
}
.sv-legend {
  display: flex;
  flex-wrap: wrap;
  gap: var(--s-1) var(--s-3);
  font-size: var(--t-xs);
  color: var(--ink-3);
}
.sv-legend[hidden] {
  display: none;
}
.sv-legend .sw {
  display: inline-block;
  width: 8px;
  height: 8px;
  border-radius: 2px;
  margin-right: 0.35rem;
  vertical-align: 0;
}

/* tabs: text labels, the active one underlined by the scan line */
.tabs {
  display: flex;
  gap: var(--s-5);
  border-bottom: var(--hair) solid var(--rule);
  overflow-x: auto;
  scrollbar-width: none;
}
.tabs::-webkit-scrollbar {
  display: none;
}
.tab {
  position: relative;
  padding: var(--s-2) 0 var(--s-3);
  color: var(--ink-3);
  text-decoration: none;
  white-space: nowrap;
  font-weight: var(--w-medium);
}
.tab:hover {
  color: var(--ink);
}
.tab[aria-selected="true"] {
  color: var(--ink);
}
.tab[aria-selected="true"]::after {
  content: "";
  position: absolute;
  left: 0;
  right: 0;
  bottom: -1px;
  height: 2px;
  border-radius: 1px;
  background: var(--scan);
}
.tab-body {
  display: grid;
  gap: var(--s-3);
  min-width: 0;
}
.tool-row {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: var(--s-2) var(--s-3);
}
.stats {
  font-size: var(--t-xs);
  color: var(--ink-3);
}
.recheck {
  font-size: var(--t-xs);
  color: var(--ink-3);
}
.recheck.ok::before {
  content: "✓ ";
  color: var(--good);
}
.recheck.warn {
  color: var(--fair);
}

/* check rows */
.check-group {
  display: grid;
}
.check-group h3 {
  font-size: var(--t-xs);
  text-transform: uppercase;
  letter-spacing: var(--tracking-label);
  color: var(--ink-3);
  font-weight: var(--w-medium);
  padding: var(--s-4) 0 var(--s-2);
}
.check-group h3 .gc {
  text-transform: none;
  letter-spacing: 0;
  font-weight: var(--w-regular);
}
.checks {
  list-style: none;
  margin: 0;
  padding: 0;
}
.check {
  display: grid;
  grid-template-columns: 1.25rem minmax(0, 1fr);
  column-gap: var(--s-1);
  padding: 0.45rem 0;
  border-bottom: var(--hair) solid var(--rule-2);
  font-size: var(--t-sm);
}
.check .ck {
  font-weight: var(--w-strong);
  line-height: var(--lh-ui);
}
.check.pass .ck {
  color: var(--good);
}
.check.fail .ck {
  color: var(--poor);
}
.check .ct {
  color: var(--ink);
  overflow-wrap: anywhere;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}
.check .why {
  grid-column: 2;
  color: var(--ink-3);
  font-size: var(--t-xs);
  overflow-wrap: anywhere;
}
.check details {
  grid-column: 2;
  font-size: var(--t-xs);
  color: var(--ink-3);
}
.check details summary {
  cursor: pointer;
}
.bag {
  list-style: none;
  margin: var(--s-1) 0 0;
  padding: 0;
  display: grid;
  gap: 2px;
}
.bag li {
  color: var(--ink-2);
}
.bag .mk {
  display: inline-block;
  width: 1.1rem;
}
.bag .ok .mk {
  color: var(--good);
}
.bag .no .mk {
  color: var(--poor);
}

/* text panes and diffs */
.pane {
  background: var(--paper-2);
  border-radius: var(--r-1);
  padding: var(--s-3) var(--s-4);
  font-family: var(--font-mono);
  font-size: var(--t-xs);
  line-height: 1.7;
  white-space: pre-wrap;
  overflow-wrap: anywhere;
  max-height: 70vh;
  overflow: auto;
  min-width: 0;
}
.pane-head {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: var(--s-2);
  font-size: var(--t-xs);
  color: var(--ink-3);
  margin-bottom: var(--s-1);
}
.pane-head a {
  color: var(--ink-3);
}
.split {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
  gap: var(--s-3);
}
del {
  color: var(--proof-del);
  background: var(--proof-del-wash);
  text-decoration: line-through;
  text-decoration-thickness: 1px;
}
ins {
  color: var(--proof-ins);
  background: var(--proof-ins-wash);
  text-decoration: underline;
  text-underline-offset: 2px;
}
.note {
  font-size: var(--t-sm);
  color: var(--ink-2);
  max-width: var(--measure);
}
.compare {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(17rem, 1fr));
  gap: var(--s-4);
}
.compare .col {
  display: grid;
  gap: var(--s-1);
  align-content: start;
  min-width: 0;
}
.compare .col-head {
  display: flex;
  justify-content: space-between;
  gap: var(--s-2);
  font-size: var(--t-sm);
}
.compare .col-head a {
  font-family: var(--font-mono);
  text-decoration-color: transparent;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.compare .col.on .col-head a {
  font-weight: var(--w-strong);
}
.compare .col-sub {
  font-size: var(--t-xs);
  color: var(--ink-3);
}
.compare .pane {
  max-height: 24rem;
}
.more-rules {
  justify-self: start;
  margin-top: var(--s-2);
}
.reproduce {
  margin-top: var(--s-4);
}
.links {
  font-size: var(--t-xs);
  color: var(--ink-3);
}
.links a {
  color: var(--ink-2);
}

/* keyboard help */
dialog {
  border: var(--hair) solid var(--rule);
  border-radius: var(--r-2);
  background: var(--paper);
  color: var(--ink);
  box-shadow: var(--lift);
  padding: var(--s-5);
  max-width: min(26rem, calc(100vw - 2rem));
}
dialog::backdrop {
  background: rgb(0 0 0 / 0.3);
}
dialog h2 {
  font-size: var(--t-base);
  margin-bottom: var(--s-3);
}
.keys {
  display: grid;
  grid-template-columns: max-content 1fr;
  gap: var(--s-2) var(--s-4);
  margin: 0 0 var(--s-4);
  font-size: var(--t-sm);
}
.keys dd {
  margin: 0;
  color: var(--ink-2);
}

/* ------------------------------------------------------------------ narrow screens */

@media (max-width: 960px) {
  .insp {
    grid-template-columns: minmax(0, 1fr);
    grid-template-areas:
      "summary"
      "page"
      "work";
    grid-template-rows: auto;
    gap: var(--s-5);
  }
  .pagecol {
    position: static;
    max-height: none;
    overflow: visible;
  }
  .sv-page {
    max-width: 36rem;
  }
}
@media (max-width: 640px) {
  main.wrap {
    padding-top: var(--s-5);
  }
  h1 {
    font-size: var(--t-lg);
  }
  .hide-sm {
    display: none;
  }
  .brand-sub {
    display: none;
  }
  .topin {
    gap: var(--s-1);
  }
  .site-nav a {
    padding: var(--s-1) 0.375rem;
  }
  .chips {
    display: none;
  }
  .model-select {
    display: block;
  }
  .split {
    grid-template-columns: minmax(0, 1fr);
  }
  .filters label.grow {
    flex: 1 1 10rem;
  }
  .doc-cell .src {
    display: block;
    margin-left: 0;
  }
  .filters select {
    flex: 1 1 8rem;
  }
  .page-head {
    margin-bottom: var(--s-5);
  }
  .run-pick,
  .run-pick select {
    width: 100%;
    max-width: none;
  }
  .hide-narrow,
  td .bar {
    display: none;
  }
  .doc-head {
    flex-direction: column;
    gap: var(--s-2);
  }
  .doc-nav {
    margin-left: calc(-1 * var(--s-1));
  }
  .tabs {
    gap: var(--s-4);
  }
  .kv {
    grid-template-columns: minmax(0, 1fr);
    gap: 0;
  }
  .kv dd {
    margin-bottom: var(--s-2);
  }
  .hero-n {
    font-size: 2.125rem;
  }
}

/* Header star button: GitHub link with a live star count (website/assets/stars.js). */
.gh-star { display: inline-flex; align-items: center; gap: .35rem; padding: .2rem .55rem; border: 1px solid var(--rule);
  border-radius: var(--r-2); background: var(--paper); color: var(--ink); font-size: .8rem; line-height: 1.6;
  text-decoration: none; white-space: nowrap; }
.gh-star:hover { border-color: var(--ink-3); background: var(--paper-2); color: var(--ink); }
.gh-star-icon { color: var(--ink-2); transition: color var(--dur, .16s) var(--ease, ease); }
.gh-star:hover .gh-star-icon { color: var(--ink); }
.gh-count { margin-left: .1rem; padding-left: .45rem; border-left: 1px solid var(--rule); color: var(--ink-2);
  font-variant-numeric: tabular-nums; }
