/* ============================================================
   DogBench — leaderboard site
   Clean, light, academic look in the spirit of SWE-bench / tau-bench.
   ============================================================ */

:root {
  --bg:        #ffffff;
  --alt:       #f7f8fc;
  --ink:       #14181c;
  --muted:     #5c666e;
  --faint:     #8a949c;
  --line:      #e5e9ec;
  --line-soft: #eef1f3;
  --accent:    #506aea;   /* Promptless purple */
  --accent-ink:#3d52b8;
  --accent-soft:#edf0ff;
  --gold:      #e2a600;
  --shadow:    0 1px 2px rgba(20,24,28,.04), 0 8px 24px rgba(20,24,28,.05);
  --radius:    12px;
  --maxw:      1080px;
  --font: -apple-system, BlinkMacSystemFont, "Segoe UI", Inter, Roboto,
          "Helvetica Neue", Arial, sans-serif;
  --mono: ui-monospace, SFMono-Regular, "SF Mono", Menlo, Consolas, monospace;
}

* { box-sizing: border-box; }

html { max-width: 100%; overflow-x: hidden; scroll-behavior: smooth; }

body {
  margin: 0;
  font-family: var(--font);
  color: var(--ink);
  background: var(--bg);
  overflow-x: hidden;
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}

a { color: var(--accent-ink); text-decoration: none; }
a:hover { text-decoration: underline; }

/* ───────── hero ───────── */
.hero {
  max-width: 820px; margin: 0 auto;
  padding: 76px 24px 40px; text-align: center;
}
.kicker {
  text-transform: uppercase; letter-spacing: .16em; font-size: .74rem;
  font-weight: 700; color: var(--accent); margin: 0 0 14px;
}
.title {
  font-size: clamp(2.8rem, 7vw, 4.4rem); line-height: 1; margin: 0;
  font-weight: 850; letter-spacing: -.035em;
}
.tagline {
  font-size: clamp(1.05rem, 2.4vw, 1.35rem); font-weight: 600;
  color: var(--ink); margin: 18px auto 0; max-width: 34ch;
}
.lede {
  font-size: 1rem; color: var(--muted); margin: 20px auto 0; max-width: 62ch;
}

/* buttons */
.cta { display: flex; flex-wrap: wrap; gap: 10px; justify-content: center; margin: 30px 0 6px; }
.btn {
  display: inline-flex; align-items: center; gap: .4rem;
  padding: 10px 18px; border-radius: 999px;
  border: 1px solid var(--line); background: #fff; color: var(--ink);
  font-size: .92rem; font-weight: 600; transition: .15s ease;
}
.btn:hover { border-color: var(--faint); text-decoration: none; transform: translateY(-1px); }
.btn-primary { background: var(--accent); border-color: var(--accent); color: #fff; }
.btn-primary:hover { background: var(--accent-ink); border-color: var(--accent-ink); }
.btn-row { display: flex; flex-wrap: wrap; gap: 10px; }

/* stats */
.stats {
  display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 14px;
  max-width: 920px;
  margin: 40px auto 0;
}
.stat {
  min-width: 0; padding: 18px 16px; border: 1px solid var(--line);
  border-radius: var(--radius); background: var(--alt);
}
.stat-n {
  display: block; font-size: 1.9rem; font-weight: 800; letter-spacing: -.02em;
  font-variant-numeric: tabular-nums;
}
.stat-l { display: block; font-size: .78rem; color: var(--muted); margin-top: 2px; }
.stat-detail { display: block; margin-top: 1px; color: var(--faint); font-size: .68rem; }

/* ───────── sections ───────── */
.section { max-width: var(--maxw); margin: 0 auto; padding: 64px 24px; }
#leaderboard { max-width: 1280px; }
.section.alt {
  max-width: none; background: var(--alt); border-top: 1px solid var(--line);
  border-bottom: 1px solid var(--line);
}
.section.alt > * { max-width: calc(var(--maxw) - 48px); margin-left: auto; margin-right: auto; }
.section-head { margin-bottom: 22px; }
.section-head h2 {
  font-size: 1.6rem; font-weight: 800; letter-spacing: -.02em; margin: 0;
}
.section-sub { color: var(--muted); margin: 8px 0 0; max-width: 70ch; }
.report-note { font-size: .82rem; color: var(--faint); margin: -8px 0 16px; }
.leaderboard-footnotes { margin-top: 20px; display: grid; gap: 10px; }
.leaderboard-footnotes .report-note { margin: 0; line-height: 1.6; }
.leaderboard-controls {
  display: flex; align-items: center; gap: 18px;
  margin: -5px 0 18px; padding: 15px 17px; border: 1px solid var(--line);
  border-radius: var(--radius); background: var(--alt);
}
.filter-label { color: var(--muted); font-size: .76rem; font-weight: 700; }
.system-filters { display: flex; align-items: center; gap: 18px; }
.system-filter { display: inline-flex; align-items: center; gap: 7px; cursor: pointer; font-size: .84rem; font-weight: 650; }
.system-filter input { width: 17px; height: 17px; margin: 0; accent-color: var(--accent); cursor: pointer; }
.system-filter input:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; }

/* ───────── tables ───────── */
.table-wrap {
  overflow-x: auto; border: 1px solid var(--line); border-radius: var(--radius);
  background: #fff; box-shadow: var(--shadow);
}
table.lb { width: 100%; border-collapse: collapse; font-size: .92rem; }
table.lb thead th {
  text-align: right; white-space: nowrap;
  font-size: .72rem; text-transform: uppercase; letter-spacing: .05em;
  font-weight: 700; color: var(--muted);
  padding: 13px 16px; border-bottom: 2px solid var(--line);
  background: #fbfcfc; position: sticky; top: 0;
}
table.lb thead th.sortable { cursor: pointer; user-select: none; }
table.lb thead th.sortable:hover { color: var(--ink); }
table.lb thead th.active { color: var(--accent-ink); }
table.lb thead th .arr { color: var(--faint); font-weight: 600; }
table.lb thead th.active .arr { color: var(--accent); }
.metric-help {
  display: inline-grid; place-items: center; width: 15px; height: 15px;
  margin-left: 3px; border: 1px solid currentColor; border-radius: 50%;
  color: var(--faint); font-size: .6rem; font-weight: 800; line-height: 1;
  text-transform: none; vertical-align: 1px; cursor: help;
}
.metric-help:hover, .metric-help:focus { color: var(--accent-ink); outline: none; }
.metric-help:focus-visible { box-shadow: 0 0 0 2px rgba(80, 106, 234, .24); }
.metric-tooltip {
  position: fixed; z-index: 100; width: min(320px, calc(100vw - 24px));
  padding: 10px 12px; border: 1px solid var(--line); border-radius: 8px;
  background: #182027; color: #fff; box-shadow: 0 10px 30px rgb(15 24 30 / 22%);
  font: 500 .78rem/1.45 var(--font); letter-spacing: 0; text-align: left;
  text-transform: none; white-space: normal; pointer-events: none;
}
th.c-rank, td.c-rank { text-align: center; width: 46px; }
th.c-agent, td.c-agent { text-align: left; }

table.lb tbody td {
  padding: 12px 16px; text-align: right; border-bottom: 1px solid var(--line-soft);
  font-variant-numeric: tabular-nums; color: var(--ink);
  white-space: nowrap;
}
table.lb tbody tr:last-child td { border-bottom: none; }
table.lb tbody tr:hover td { background: var(--accent-soft); }

.rank-medal {
  display: inline-block;
  font-size: 2rem;
  line-height: 1;
  vertical-align: middle;
}

.ag-name { display: block; font-weight: 700; letter-spacing: -.01em; }
.ag-org { display: block; font-size: .74rem; color: var(--faint); font-family: var(--mono); margin-top: 1px; }
.ag-type {
  display: inline-flex; margin-top: 5px; padding: 2px 6px; border-radius: 999px;
  background: #eef1f3; color: var(--muted); font-size: .62rem; font-weight: 700;
  letter-spacing: .02em; text-transform: uppercase;
}
.ag-type.cloud-agent { background: #fff0d8; color: #805b00; }
td.score { font-weight: 800; color: var(--accent-ink); font-size: 1rem; }
.item-id { font-family: var(--mono); font-size: .82rem; color: var(--ink); }

.subsection-head {
  display: flex; align-items: end; justify-content: space-between; gap: 28px;
  margin: 46px 0 16px;
}
.subsection-head .kicker { margin-bottom: 5px; }
.subsection-head h3 { margin: 0; font-size: 1.22rem; letter-spacing: -.015em; }
.subsection-head > p { max-width: 60ch; margin: 0; color: var(--muted); font-size: .88rem; }
.commercial-table .ag-org { font-family: var(--font); }

.item-count { margin: -8px 0 16px; font-size: .82rem; color: var(--faint); }
.item-row { cursor: pointer; }
.item-row:focus { outline: 2px solid var(--accent); outline-offset: -2px; }
.item-link { display: inline-flex; align-items: baseline; gap: 7px; text-decoration: none; }
.item-repo { color: var(--ink); font: 700 .88rem var(--font); letter-spacing: -.01em; }
.item-pr { color: var(--muted); font: 650 .78rem var(--mono); }
.item-arrow { color: var(--faint); margin-left: 2px; }

.load-error { color: #c0392b; font-size: .9rem; }

/* ───────── documentation owner resources ───────── */
.doc-owner-resources { margin-top: 32px; }
.doc-owner-resources h3 { margin: 0 0 12px; font-size: 1.22rem; letter-spacing: -.015em; }
.doc-owner-resources ul { margin: 0; padding-left: 22px; }
.doc-owner-resources li + li { margin-top: 10px; }
.resource-note { color: var(--muted); font-size: .88rem; }

/* ───────── executive summary ───────── */
.paper-summary {
  max-width: 780px;
  padding-top: 82px;
  padding-bottom: 82px;
}
.section.alt.paper-summary > * { max-width: 732px; }
.paper-summary-head {
  padding-bottom: 22px;
  border-bottom: 1px solid var(--line);
}
.paper-summary-head .kicker { margin-bottom: 9px; }
.paper-summary-head h2 {
  margin: 0;
  font-size: clamp(2rem, 4vw, 2.75rem);
  line-height: 1.12;
  letter-spacing: -.035em;
}
.paper-summary-copy {
  max-width: 66ch;
  margin: 30px 0 0;
  color: #303940;
  font-size: 1.125rem;
  line-height: 1.75;
}
.paper-summary-copy p { margin: 0 0 1.15em; }
.paper-summary-copy .paper-summary-lead {
  color: var(--ink);
  font-size: 1.25rem;
  line-height: 1.7;
}
.paper-summary-copy h3 {
  margin: 2.25em 0 .8em;
  color: var(--ink);
  font-size: clamp(1.3rem, 2.5vw, 1.5rem);
  line-height: 1.35;
  letter-spacing: -.02em;
  text-wrap: balance;
}
.paper-summary-copy strong { color: var(--ink); font-weight: 650; }
.paper-summary-result {
  padding: 20px 24px;
  border-left: 3px solid var(--accent);
  border-radius: 0 8px 8px 0;
  background: var(--accent-soft);
}
.paper-summary-findings {
  margin: 0 0 1.4em;
  padding-left: 1.3em;
}
.paper-summary-findings li { margin: 0 0 .75em; padding-left: .3em; }
.paper-summary-findings li::marker { color: var(--accent); }
.paper-summary-cta {
  margin: 36px 0 0;
  padding-top: 26px;
  border-top: 1px solid var(--line);
}
.paper-summary-cta .btn { padding: 12px 21px; }

@media (max-width: 700px) {
  .subsection-head { align-items: start; flex-direction: column; gap: 8px; }
}

/* ───────── citation ───────── */
.cite-box { position: relative; }
.cite-box pre {
  margin: 0; padding: 22px 20px; overflow-x: auto;
  background: #0f1519; color: #d7e0e4; border-radius: var(--radius);
  font-family: var(--mono); font-size: .82rem; line-height: 1.6;
  border: 1px solid #1c262c;
}
.copy-btn {
  position: absolute; top: 12px; right: 12px; z-index: 2;
  padding: 6px 14px; border-radius: 999px; border: 1px solid #2b3840;
  background: #1a242a; color: #cfd8dc; font-size: .78rem; font-weight: 600;
  cursor: pointer; font-family: var(--font); transition: .15s ease;
}
.copy-btn:hover { background: #24323a; color: #fff; }
.copy-btn.done { background: var(--accent); border-color: var(--accent); color: #fff; }

/* ───────── footer ───────── */
.foot { border-top: 1px solid var(--line); background: var(--alt); }
.foot-inner {
  max-width: var(--maxw); margin: 0 auto; padding: 28px 24px;
  display: flex; align-items: center; justify-content: space-between; flex-wrap: wrap; gap: 10px;
}
.foot-brand { font-weight: 800; display: inline-flex; align-items: center; gap: .4rem; }
.foot-meta { font-size: .82rem; color: var(--muted); }

/* ───────── item visualizer ───────── */
.item-view { min-height: 72vh; background: var(--alt); }
.item-shell { max-width: 1440px; margin: 0 auto; padding: 34px 28px 72px; }
.back-link { display: inline-flex; margin-bottom: 26px; font-size: .88rem; font-weight: 650; color: var(--muted); }
.back-link:hover { color: var(--ink); text-decoration: none; }
.item-loading, .item-error { padding: 80px 0; text-align: center; color: var(--muted); }
.item-error { color: #a12d28; }
.item-hero { display: flex; align-items: flex-start; justify-content: space-between; gap: 28px; }
.item-hero-copy { max-width: 1040px; }
.item-eyebrow { margin: 0 0 12px; }
.outcome-chip {
  display: inline-flex; align-items: center; width: fit-content; padding: 6px 11px;
  border: 1px solid transparent; border-radius: 999px;
  font-size: .72rem; font-weight: 750; letter-spacing: .025em;
}
.outcome-chip.docs-expected { border-color: #cbd7ff; background: #eaf0ff; color: #3852b3; }
.outcome-chip.noop-expected { border-color: #c8e5d6; background: #eaf7f0; color: #257150; }
.item-hero h1 { margin: 0; font-size: clamp(1.8rem, 4vw, 2.8rem); line-height: 1.12; letter-spacing: -.035em; }
.item-id-line { margin: 10px 0 0; color: var(--muted); font: 500 1.05rem/1.45 var(--font); }
.source-link { flex: none; display: inline-flex; padding: 9px 15px; border: 1px solid var(--line); border-radius: 999px; background: #fff; color: var(--ink); font-size: .84rem; font-weight: 700; }
.source-link:hover { border-color: var(--faint); text-decoration: none; }
.item-summary { display: grid; grid-template-columns: .8fr .85fr .9fr 1.35fr 1.05fr; margin: 30px 0 0; border: 1px solid var(--line); border-radius: var(--radius); background: #fff; box-shadow: var(--shadow); overflow: hidden; }
.item-summary > div { min-width: 0; padding: 18px 20px; border-right: 1px solid var(--line-soft); }
.item-summary > div:last-child { border-right: 0; }
.item-summary strong { display: block; font-size: 1.06rem; line-height: 1.25; font-variant-numeric: tabular-nums; overflow-wrap: anywhere; }
.item-summary > div > span { display: block; margin-top: 4px; color: var(--muted); font-size: .75rem; }
.item-summary .summary-label { white-space: nowrap; }
.item-summary .metric-help { display: inline-grid; margin-top: 0; vertical-align: -2px; }
.item-tabs { display: flex; gap: 28px; margin-top: 34px; border-bottom: 1px solid var(--line); }
.item-tabs a { position: relative; padding: 13px 2px 12px; color: var(--muted); font-size: .92rem; font-weight: 700; }
.item-tabs a:hover { color: var(--ink); text-decoration: none; }
.item-tabs a.active { color: var(--ink); }
.item-tabs a.active::after { content: ""; position: absolute; right: 0; bottom: -1px; left: 0; height: 3px; border-radius: 3px 3px 0 0; background: var(--accent); }
.item-tab-panel { padding-top: 26px; }
.tab-intro { display: flex; align-items: flex-end; justify-content: space-between; gap: 24px; margin-bottom: 20px; }
.tab-intro h2 { margin: 0; font-size: 1.35rem; letter-spacing: -.02em; }
.tab-intro p { max-width: 72ch; margin: 5px 0 0; color: var(--muted); font-size: .88rem; }
.field-label { display: grid; gap: 5px; min-width: 220px; color: var(--muted); font-size: .72rem; font-weight: 700; letter-spacing: .04em; text-transform: uppercase; }
.field-label select { width: 100%; padding: 8px 32px 8px 10px; border: 1px solid var(--line); border-radius: 8px; background: #fff; color: var(--ink); font: 500 .86rem var(--font); text-transform: none; letter-spacing: 0; }
.field-label select:focus, .small-button:focus, .filter-group button:focus { outline: 2px solid var(--accent); outline-offset: 2px; }
.evidence-block { margin-top: 14px; border: 1px solid var(--line); border-radius: var(--radius); background: #fff; box-shadow: var(--shadow); overflow: hidden; }
.evidence-head { display: flex; align-items: center; justify-content: space-between; gap: 16px; padding: 17px 19px; border-bottom: 1px solid var(--line-soft); }
.evidence-head h2, .provenance-block h2 { margin: 0; font-size: .98rem; }
.evidence-head p { margin: 3px 0 0; color: var(--muted); font-size: .78rem; }
.evidence-block details { border-top: 0; }
.evidence-block summary { padding: 13px 19px; cursor: pointer; color: var(--accent-ink); font-size: .82rem; font-weight: 700; user-select: none; }
.evidence-block details[open] summary { border-bottom: 1px solid var(--line-soft); }
.input-pre, .patch-scroll { margin: 0; padding: 18px 19px; overflow: auto; background: #fbfcfc; color: #263038; font: .78rem/1.6 var(--mono); white-space: pre; tab-size: 2; }
.input-pre-scroll { max-height: 420px; }
.prompt-parts { display: grid; gap: 12px; max-height: 680px; padding: 16px; overflow: auto; background: #f7f9fa; }
.prompt-part { overflow: hidden; border: 1px solid var(--line-soft); border-radius: 10px; background: #fff; }
.prompt-part-head { display: flex; align-items: baseline; justify-content: space-between; gap: 16px; padding: 10px 13px; border-bottom: 1px solid rgba(28, 41, 48, .08); }
.prompt-part-head strong { font-size: .78rem; letter-spacing: .01em; }
.prompt-part-head span { color: var(--muted); font-size: .69rem; }
.prompt-part pre { margin: 0; padding: 14px 15px 16px; overflow-wrap: anywhere; color: #263038; font: .77rem/1.62 var(--mono); white-space: pre-wrap; }
.prompt-part-shared { border-color: #cfe3d9; background: #fbfefc; }
.prompt-part-shared .prompt-part-head { background: #edf7f1; color: #276346; }
.prompt-part-task { border-color: #d4def4; background: #fcfdff; }
.prompt-part-task .prompt-part-head { background: #eff3fc; color: #395698; }
.prompt-part-setup { border-color: #ddd7ec; background: #fefcff; }
.prompt-part-setup .prompt-part-head { background: #f3eff9; color: #655085; }
.prompt-part-access { border-color: #eadcb9; background: #fffefa; }
.prompt-part-access .prompt-part-head { background: #fcf5e5; color: #765d21; }
.repo-snapshot { display: flex; align-items: center; justify-content: space-between; gap: 22px; padding: 18px 19px; background: #fbfcfc; }
.repo-snapshot > span { flex: none; color: var(--muted); font-size: .78rem; font-weight: 650; }
.repo-snapshot a { display: grid; grid-template-columns: auto minmax(0, 1fr) auto; align-items: center; gap: 14px; min-width: 0; color: var(--ink); }
.repo-snapshot a:hover { color: var(--accent-ink); text-decoration: none; }
.repo-snapshot code { overflow: hidden; color: var(--muted); font: .74rem var(--mono); text-overflow: ellipsis; white-space: nowrap; }
.repo-snapshot a span { color: var(--accent-ink); font-size: .78rem; font-weight: 700; white-space: nowrap; }
.input-pre { max-height: 540px; white-space: pre-wrap; overflow-wrap: anywhere; }
.empty-state { padding: 24px 19px; color: var(--muted); font-size: .86rem; }
.path-list { display: grid; gap: 5px; margin: 0; padding: 14px 20px 17px 38px; border-bottom: 1px solid var(--line-soft); color: var(--muted); font-size: .8rem; }
.path-list code { color: var(--ink); overflow-wrap: anywhere; }
.withheld-block { border-color: #e6d8b8; }
.withheld-block .evidence-head { background: #fffcf4; }
.provenance-block { margin-top: 22px; padding: 18px 20px; border: 1px dashed #cbd2d6; border-radius: var(--radius); }
.provenance-block dl { display: grid; grid-template-columns: repeat(auto-fit, minmax(180px, 1fr)); gap: 14px; margin: 15px 0 0; }
.provenance-block dl div { min-width: 0; }
.provenance-block dt { color: var(--faint); font-size: .7rem; font-weight: 700; letter-spacing: .05em; text-transform: uppercase; }
.provenance-block dd { margin: 3px 0 0; font-size: .8rem; overflow-wrap: anywhere; }
.diff-line { display: block; min-height: 1.6em; padding: 0 7px; margin: 0 -7px; }
.diff-meta { color: #405a6b; background: #edf4f7; font-weight: 650; }
.diff-hunk { color: #68409b; background: #f3eff8; }
.diff-add { color: #175c35; background: #eaf7ef; }
.diff-del { color: #8a2f2a; background: #fceeed; }
.small-button { padding: 8px 13px; border: 1px solid var(--line); border-radius: 8px; background: #fff; color: var(--ink); font: 650 .82rem var(--font); cursor: pointer; }
.small-button:hover { border-color: var(--faint); }

/* patch viewer */
.patch-single { min-width: 0; border: 1px solid var(--line); border-radius: var(--radius); background: #fff; box-shadow: var(--shadow); overflow: hidden; }
.patch-toolbar { display: flex; align-items: flex-end; justify-content: space-between; gap: 24px; min-height: 88px; padding: 15px 18px; border-bottom: 1px solid var(--line); }
.patch-agent-meta { display: grid; gap: 4px; justify-items: end; color: var(--muted); font-size: .74rem; text-align: right; }
.patch-agent-meta strong { color: var(--ink); font-weight: 650; }
.patch-agent-meta span { color: var(--faint); font-family: var(--mono); font-size: .68rem; }
.patch-filebar { display: flex; align-items: center; gap: 18px; min-height: 45px; padding: 7px 12px 7px 18px; border-bottom: 1px solid var(--line); background: #fbfcfc; }
.patch-stats { flex: none; color: var(--muted); font-size: .75rem; }
.patch-stats strong { color: var(--ink); }
.patch-stats span { margin-left: 8px; font-family: var(--mono); font-weight: 700; }
.patch-stats .stat-add { color: #167044; }
.patch-stats .stat-del { color: #a33933; }
.patch-files { display: flex; gap: 6px; min-width: 0; overflow-x: auto; }
.patch-files button { max-width: 330px; flex: none; padding: 5px 9px; overflow: hidden; border: 1px solid var(--line); border-radius: 6px; background: #fff; color: var(--muted); font: .68rem var(--mono); text-overflow: ellipsis; white-space: nowrap; cursor: pointer; }
.patch-files button:hover { border-color: var(--faint); color: var(--ink); }
.score-rationale { display: grid; grid-template-columns: minmax(0, 1.7fr) minmax(220px, .8fr); gap: 24px; padding: 19px 20px; border-bottom: 1px solid var(--line); background: #f7f8ff; }
.score-rationale-kicker { color: var(--accent-ink); font-size: .65rem; font-weight: 800; letter-spacing: .07em; text-transform: uppercase; }
.score-rationale h3 { margin: 3px 0 5px; font-size: 1rem; }
.score-rationale p { max-width: 72ch; margin: 0; color: #39434a; font-size: .82rem; line-height: 1.55; }
.score-rationale-factors { display: grid; align-content: start; gap: 10px; padding-left: 18px; border-left: 1px solid var(--line); }
.score-rationale-factors > div { display: grid; gap: 4px; }
.score-rationale-factors strong { color: var(--faint); font-size: .64rem; letter-spacing: .05em; text-transform: uppercase; }
.score-rationale-factors ul { display: flex; flex-wrap: wrap; gap: 5px; margin: 0; padding: 0; list-style: none; }
.score-rationale-factors li { padding: 3px 7px; border-radius: 5px; background: #fff; color: var(--muted); font-size: .69rem; }
.blocking-links { display: flex; flex-wrap: wrap; gap: 5px; }
.blocking-links a { display: inline-flex; padding: 3px 8px; border: 1px solid #e5c7c4; border-radius: 5px; background: #fff; color: #983e38; font: 700 .7rem var(--mono); }
.blocking-links a:hover { text-decoration: none; border-color: #c95852; }
.patch-scroll { height: 650px; max-height: 68vh; white-space: pre-wrap; overflow-wrap: anywhere; }
.patch-empty { min-height: 320px; display: grid; align-content: center; justify-items: center; padding: 30px; text-align: center; }
.patch-empty strong { font-size: 1rem; }
.patch-empty p { max-width: 38ch; margin: 6px 0 14px; color: var(--muted); font-size: .84rem; }
.status-badge { display: inline-flex; padding: 4px 9px; border-radius: 999px; font-size: .7rem; font-weight: 750; }
.status-fail { background: #fceeed; color: #8a2f2a; }

/* rubric explorer */
.matrix-area { min-width: 0; }
.matrix-scroll { margin-top: 14px; overflow-x: auto; border: 1px solid var(--line); border-radius: var(--radius); background: #fff; box-shadow: var(--shadow); }
.criterion-matrix { width: 100%; min-width: 850px; border-collapse: collapse; table-layout: fixed; }
.criterion-matrix th, .criterion-matrix td { border-bottom: 1px solid var(--line-soft); border-right: 1px solid var(--line-soft); }
.criterion-matrix tr:last-child th, .criterion-matrix tr:last-child td { border-bottom: 0; }
.criterion-matrix th:last-child, .criterion-matrix td:last-child { border-right: 0; }
.criterion-matrix thead th { height: 46px; padding: 8px 5px; background: #fbfcfc; color: var(--muted); font-size: .68rem; font-weight: 750; text-align: center; }
.criterion-matrix thead th:first-child { width: 62px; text-align: center; padding: 8px 4px; }
.criterion-matrix tbody th { background: #fff; text-align: left; }
.criterion-matrix tbody tr.selected th { background: var(--accent-soft); }
.criterion-matrix tbody th button { display: grid; gap: 3px; width: 100%; min-height: 52px; padding: 9px 4px; border: 0; background: transparent; color: var(--ink); font: 500 .73rem/1.3 var(--font); text-align: center; cursor: pointer; }
.criterion-matrix tbody th strong { color: var(--accent-ink); }
.criterion-matrix tbody th span { overflow: hidden; color: var(--muted); text-overflow: ellipsis; white-space: nowrap; }
.criterion-matrix td { height: 52px; padding: 0; text-align: center; }
.verdict-cell { display: grid; place-content: center; width: 100%; min-height: 52px; border: 0; background: transparent; cursor: pointer; }
.verdict-cell span { font-size: 1.1rem; font-weight: 800; line-height: 1; }
.verdict-cell small { margin-top: 3px; color: inherit; font-size: .58rem; }
.verdict-cell.pass { color: #167044; background: #edf8f1; }
.verdict-cell.fail { color: #a33933; background: #fdf0ef; }
.verdict-cell.neutral { color: #5e6870; background: #f4f6f7; }
.verdict-cell.ungraded { color: #a1a8ad; }
.verdict-cell:hover, .verdict-cell.selected { box-shadow: inset 0 0 0 2px currentColor; }
.matrix-empty { padding: 28px; color: var(--muted); font-size: .84rem; text-align: center; }
.criterion-detail { padding: 22px 24px; border: 1px solid var(--line); border-radius: var(--radius); background: #fff; box-shadow: var(--shadow); }
.criterion-detail-head h3 { margin: 8px 0 3px; font-size: 1.1rem; }
.criterion-detail-head p { margin: 0; color: var(--muted); font-size: .76rem; text-transform: capitalize; }
.criterion-tags { display: flex; flex-wrap: wrap; gap: 6px; }
.priority-tag { display: inline-flex; padding: 3px 8px; border-radius: 999px; background: var(--accent-soft); color: var(--accent-ink); font-size: .68rem; font-weight: 750; }
.scoring-tag { display: inline-flex; padding: 3px 8px; border-radius: 999px; font-size: .68rem; font-weight: 750; }
.scoring-tag.requirement { background: #eaf1fb; color: #315f9e; }
.scoring-tag.conditional { background: #fff5db; color: #805b00; }
.scoring-tag.deduction { background: #f8eaea; color: #95433e; }
.criterion-copy { max-height: 260px; margin-top: 18px; padding: 0 12px 0 0; color: #303941; font-size: .84rem; overflow: auto; overflow-wrap: anywhere; }
.criterion-copy pre { margin: 0; white-space: pre-wrap; overflow-wrap: anywhere; font: inherit; }
.criterion-copy p { margin: 9px 0; }
.criterion-copy ul { padding-left: 20px; }
.criterion-copy code { font-family: var(--mono); font-size: .78rem; }
.verdict-popover { position: fixed; z-index: 50; width: min(360px, calc(100vw - 24px)); padding: 16px 17px; border: 1px solid var(--line); border-top: 4px solid #a1a8ad; border-radius: 10px; background: #fff; box-shadow: 0 16px 48px rgb(27 39 48 / 22%); }
.verdict-popover.pass { border-top-color: #279564; }
.verdict-popover.fail { border-top-color: #c95852; }
.verdict-popover-head { display: flex; align-items: start; justify-content: space-between; gap: 18px; }
.verdict-popover-head div { display: grid; gap: 3px; }
.verdict-popover-head span { color: var(--muted); font-size: .72rem; }
.verdict-popover-head strong { font-size: .87rem; }
.verdict-popover-head button { display: grid; place-content: center; width: 27px; height: 27px; padding: 0; border: 1px solid var(--line); border-radius: 6px; background: #fff; color: var(--muted); font: 1.1rem var(--font); cursor: pointer; }
.verdict-criterion { margin: 13px 0 0; color: var(--muted); font-size: .72rem; font-weight: 700; }
.verdict-reason { margin: 7px 0 0; color: var(--ink); font-size: .82rem; line-height: 1.55; }
.verdict-note { margin: 10px 0 0; padding-top: 9px; border-top: 1px solid var(--line-soft); color: var(--muted); font-size: .74rem; }
.item-link { font-weight: 650; }
.item-link:hover { text-decoration: none; color: var(--accent-ink); }

/* ───────── responsive ───────── */
@media (max-width: 960px) {
  .item-summary { grid-template-columns: repeat(3, 1fr); }
  .item-summary > div { border-bottom: 1px solid var(--line-soft); }
  .item-summary > div:nth-child(3) { border-right: 0; }
  .item-summary > div:nth-last-child(-n+2) { border-bottom: 0; }
}

@media (max-width: 760px) {
  .item-shell { padding: 26px 16px 54px; }
  .item-hero, .tab-intro { align-items: stretch; flex-direction: column; }
  .source-link { align-self: flex-start; }
  .item-summary { grid-template-columns: repeat(2, 1fr); }
  .item-summary > div:nth-child(even) { border-right: 0; }
  .item-summary > div:nth-child(3) { border-right: 1px solid var(--line-soft); }
  .item-summary > div:nth-last-child(-n+2) { border-bottom: 1px solid var(--line-soft); }
  .item-summary > div:last-child { border-right: 0; border-bottom: 0; }
  .item-tabs { gap: 20px; overflow-x: auto; }
  .patch-toolbar { align-items: stretch; flex-direction: column; gap: 12px; }
  .patch-agent-meta { justify-items: start; text-align: left; }
  .score-rationale { grid-template-columns: 1fr; gap: 14px; }
  .score-rationale-factors { padding-top: 13px; padding-left: 0; border-top: 1px solid var(--line); border-left: 0; }
  .patch-filebar { align-items: stretch; flex-direction: column; gap: 7px; padding: 10px 12px; }
  .patch-scroll { height: 480px; max-height: none; }
  .field-label { min-width: 0; }
  .repo-snapshot { align-items: flex-start; flex-direction: column; gap: 10px; }
  .repo-snapshot a { grid-template-columns: 1fr; gap: 6px; width: 100%; }
  .prompt-part-head { align-items: flex-start; flex-direction: column; gap: 2px; }
}

@media (max-width: 640px) {
  .stats { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .auth-controls span { display: none; }
  .hero { padding-top: 52px; }
  .stat { padding: 14px 16px; }
  .stat-n { font-size: 1.5rem; }
  .section { padding: 48px 18px; }
  .paper-summary { padding-top: 58px; padding-bottom: 58px; }
  .paper-summary-copy { font-size: 1.0625rem; line-height: 1.75; }
  .paper-summary-copy .paper-summary-lead { font-size: 1.1875rem; }
  .paper-summary-result { padding: 18px; }
  .leaderboard-controls { align-items: flex-start; flex-direction: column; gap: 8px; }
  .system-filters { align-items: flex-start; flex-direction: column; gap: 8px; }
}

/* Submission guide */
.evaluation-invite { border-top: 1px solid var(--line); }

/* Evaluation set and system filters control independent leaderboard dimensions. */
.evaluation-controls { display: flex; align-items: center; flex-wrap: wrap; gap: 12px 18px; margin-bottom: 22px; }
.evaluation-switch { display: inline-flex; gap: 4px; padding: 4px; border: 1px solid var(--line); border-radius: 10px; }
.evaluation-switch button { border: 0; border-radius: 7px; padding: 10px 14px; background: transparent; color: var(--muted); font: 650 .84rem var(--font); cursor: pointer; }
.evaluation-switch button[aria-pressed="true"] { background: var(--accent); color: white; }
.evaluation-switch button:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; }
