:root {
  color-scheme: light;
  --bg: #ffffff;
  --surface: #f6f6f4;
  --border: #e2e1dc;
  --text: #191919;
  --text-2: #5c5c5c;
  --text-3: #8a8a8a;
  --accent: #1b64be;
  --chip-on-bg: #191919;
  --chip-on-text: #ffffff;
  --grid: #ececea;
  --ref: #6b6b6b;
  --s1: #257de0; --s2: #f47230; --s3: #00b894; --s4: #f2a600; --s5: #ee7fac; --s6: #008a17;
}
@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) {
    color-scheme: dark;
    --bg: #141414; --surface: #1e1e1e; --border: #333331; --text: #efefef; --text-2: #a8a8a8; --text-3: #7a7a7a;
    --accent: #6aabf1; --chip-on-bg: #efefef; --chip-on-text: #141414; --grid: #2a2a2a; --ref: #9c9c9c;
    --s1: #338ced; --s2: #e76624; --s3: #00a888; --s4: #d28e05; --s5: #e24d8b; --s6: #0aac23;
  }
}
:root[data-theme="dark"] {
  color-scheme: dark;
  --bg: #141414; --surface: #1e1e1e; --border: #333331; --text: #efefef; --text-2: #a8a8a8; --text-3: #7a7a7a;
  --accent: #6aabf1; --chip-on-bg: #efefef; --chip-on-text: #141414; --grid: #2a2a2a; --ref: #9c9c9c;
  --s1: #338ced; --s2: #e76624; --s3: #00a888; --s4: #d28e05; --s5: #e24d8b; --s6: #0aac23;
}
* { box-sizing: border-box; }
html, body { margin: 0; }
body {
  background: var(--bg); color: var(--text);
  font: 15px/1.5 -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
  -webkit-font-smoothing: antialiased;
}
a { color: var(--accent); text-decoration: none; }
a:hover { text-decoration: underline; }
.wrap { max-width: 1120px; margin: 0 auto; padding: 28px 16px 64px; }
header h1 { font-size: 30px; line-height: 1.15; margin: 0 0 6px; letter-spacing: -0.01em; }
header p { margin: 0; color: var(--text-2); max-width: 760px; }
.links { display: flex; flex-wrap: wrap; gap: 6px 18px; margin-top: 10px; font-size: 14px; }

.controls { margin-top: 24px; border-top: 1px solid var(--border); border-bottom: 1px solid var(--border); padding: 10px 0; }
.row { display: grid; grid-template-columns: 148px minmax(0, 1fr); gap: 6px 12px; align-items: start; padding: 6px 0; }
.row-label { font-size: 13px; font-weight: 600; color: var(--text-2); padding-top: 5px; }
.row-label small { display: block; font-weight: 400; color: var(--text-3); font-size: 12px; }
.chips { display: flex; flex-wrap: wrap; gap: 6px; align-items: center; }
.group-label { font-size: 12px; color: var(--text-3); margin: 0 2px 0 6px; }
.group-label:first-child { margin-left: 0; }
.chip {
  font: inherit; font-size: 13.5px; line-height: 1; padding: 7px 11px; border-radius: 999px; cursor: pointer;
  border: 1px solid var(--border); background: var(--bg); color: var(--text); display: inline-flex; gap: 7px; align-items: center;
}
.chip:hover:not(:disabled) { border-color: var(--text-3); }
.chip[aria-pressed="true"] { background: var(--chip-on-bg); color: var(--chip-on-text); border-color: var(--chip-on-bg); }
.chip:disabled { opacity: .38; cursor: not-allowed; }
.chip:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; }
.dot { width: 9px; height: 9px; border-radius: 50%; flex: none; }
.dash { width: 22px; height: 0; border-top: 2.5px solid currentColor; flex: none; }

.info { display: grid; grid-template-columns: 1fr auto; gap: 8px 24px; align-items: start; margin: 18px 0 6px; }
.info h2 { font-size: 19px; margin: 0; }
.info .meta { color: var(--text-2); font-size: 13.5px; margin-top: 2px; }
.info .meta code { font-size: 12.5px; background: var(--surface); padding: 1px 5px; border-radius: 4px; }
.pill { display: inline-block; font-size: 12.5px; font-weight: 600; padding: 3px 9px; border-radius: 999px; border: 1px solid var(--border); background: var(--surface); }
.toggles { display: flex; flex-wrap: wrap; gap: 6px; justify-content: flex-end; }
.seg { display: inline-flex; border: 1px solid var(--border); border-radius: 8px; overflow: hidden; }
.seg button { font: inherit; font-size: 13px; padding: 6px 10px; border: 0; background: var(--bg); color: var(--text-2); cursor: pointer; }
.seg button + button { border-left: 1px solid var(--border); }
.seg button[aria-pressed="true"] { background: var(--surface); color: var(--text); font-weight: 600; }

.legend { display: flex; flex-wrap: wrap; gap: 6px 18px; font-size: 13px; color: var(--text); margin: 10px 0 2px; min-height: 20px; }
.legend span { display: inline-flex; align-items: center; gap: 7px; }
.legend svg { flex: none; }
.legend .refkey { color: var(--text-2); }
#chart { width: 100%; height: 640px; }
.empty { padding: 80px 0; text-align: center; color: var(--text-2); }
.note-dim { font-size: 12.5px; color: var(--text-3); margin: 2px 0 0; }

table { border-collapse: collapse; width: 100%; font-size: 13.5px; font-variant-numeric: tabular-nums; }
.tablewrap { overflow-x: auto; margin-top: 18px; }
th, td { text-align: right; padding: 7px 10px; border-bottom: 1px solid var(--border); white-space: nowrap; }
th { color: var(--text-2); font-weight: 600; font-size: 12.5px; }
th:first-child, td:first-child, th:nth-child(2), td:nth-child(2) { text-align: left; }
h3 { font-size: 15px; margin: 34px 0 6px; }
.authors { display: flex; flex-wrap: wrap; gap: 2px 14px; font-size: 15px; margin: 4px 0 2px; }
.authors span { position: relative; }
.authors span:not(:last-child)::after { content: "·"; position: absolute; right: -7px; transform: translateX(50%); color: var(--text-3); pointer-events: none; }
.authors a { color: var(--text); }
.authors a:hover { color: var(--accent); }
.logos { display: flex; flex-wrap: wrap; align-items: flex-end; gap: 14px 30px; margin: 12px 0 16px; }
.logos a { display: inline-flex; line-height: 0; }
.logos img { height: 24px; width: auto; display: block; }
.logos img.logo-stanford { height: 21px; }
.logos img.logo-cmu { height: 22px; margin-bottom: -2.0px; } /* hang the g/y descenders so the baseline lines up */
.criteria-link { display: inline-block; margin-top: 8px; font-size: 13.5px; }
.criteria { margin-top: 18px; font-size: 13.5px; scroll-margin-top: 16px; }
.criteria h4 { font-size: 14px; margin: 0; }
.criteria .tablewrap { margin-top: 8px; }
.criteria table { font-variant-numeric: normal; }
.criteria th, .criteria td { text-align: left; white-space: normal; vertical-align: top; }
.criteria td code, .criteria p code { font-size: 12.5px; background: var(--surface); padding: 1px 5px; border-radius: 4px; white-space: nowrap; }
.criteria p { margin: 8px 0 0; color: var(--text); max-width: 820px; }
.criteria th { color: var(--text); }
.criteria .rule { color: var(--text); }
.notes { color: var(--text-2); font-size: 13.5px; max-width: 860px; }
.notes li { margin: 4px 0; }

@media (max-width: 720px) {
  .row { grid-template-columns: minmax(0, 1fr); gap: 4px; }
  .row-label { padding-top: 0; }
  .info { grid-template-columns: 1fr; }
  .toggles { justify-content: flex-start; }
  #chart { height: 560px; }
  header h1 { font-size: 25px; }
  .logos { gap: 12px 16px; }
}

/* ---- shared by /ptxbench/ (benchmark) and /ptxbench/data-recipes/ ---- */
header h1 a { color: inherit; }
header h1 a:hover { text-decoration: none; }
.tabs { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 22px; }
.tab {
  display: inline-flex; align-items: center; font-size: 15px; font-weight: 600; line-height: 1;
  padding: 10px 18px; border-radius: 999px; border: 1px solid var(--border); background: var(--bg); color: var(--text);
}
.tab:hover { border-color: var(--text-3); text-decoration: none; }
.tab[aria-current="page"] { background: var(--chip-on-bg); color: var(--chip-on-text); border-color: var(--chip-on-bg); }
.tab:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; }
.choices { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 14px; margin-top: 26px; max-width: 760px; }
.choice {
  display: block; padding: 18px 20px; border-radius: 12px; border: 1px solid var(--border); background: var(--surface);
  color: var(--text);
}
.choice:hover { border-color: var(--text-3); text-decoration: none; }
.choice:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; }
.choice b { display: flex; align-items: center; justify-content: space-between; font-size: 18px; }
.choice > span { display: block; margin-top: 6px; color: var(--text-2); font-size: 14px; }
@media (max-width: 720px) { .choices { grid-template-columns: minmax(0, 1fr); } }
