:root {
  --ink: #111827;
  --muted: #6b7280;
  --bg: #fafaf7;
  --card: #ffffff;
  --line: #e5e7eb;
  --accent: #ea580c;
  --good: #15803d;
  --bad: #b91c1c;
  --judge: #7c3aed;
  --radius: 12px;
  font-family: ui-sans-serif, system-ui, -apple-system, "Segoe UI", Roboto, "Noto Sans", "Noto Sans Devanagari", sans-serif;
  color: var(--ink);
  background: var(--bg);
}
* { box-sizing: border-box; }
[hidden] { display: none !important; }
body { margin: 0; line-height: 1.5; }
a { color: #1d4ed8; }
.wrap { max-width: 1080px; margin: 0 auto; padding: 0 16px; }
.small { font-size: 0.85rem; }
.muted { color: var(--muted); }
.panel { background: var(--card); border: 1px solid var(--line); border-radius: var(--radius); padding: 16px; }
.top { background: #fff; border-bottom: 1px solid var(--line); }
.row { display: flex; align-items: center; justify-content: space-between; min-height: 52px; gap: 12px; flex-wrap: wrap; }
.brand { font-weight: 700; color: var(--ink); text-decoration: none; }
.nav { display: flex; gap: 14px; }
.nav a { color: var(--muted); text-decoration: none; }
.hero { padding: 32px 0 8px; }
.eyebrow { color: var(--accent); font-weight: 600; margin: 0; }
h1 { font-size: clamp(1.5rem, 4vw, 2.2rem); line-height: 1.2; margin: 8px 0; letter-spacing: -0.01em; }
h2 { margin: 36px 0 6px; font-size: 1.35rem; }
.lead { color: var(--muted); margin: 0; }
.pilot { background: #fff7ed; border: 1px solid #fed7aa; color: #9a3412; border-radius: var(--radius); padding: 10px 14px; font-size: 0.9rem; }

#chart { width: 100%; height: auto; display: block; }
#chart text { font-size: 11px; fill: var(--muted); }
#chart .label { fill: var(--ink); font-size: 11px; }
#chart .grid { stroke: var(--line); }
#chart .bar { stroke: #9ca3af; stroke-width: 2; }
#chart .dot { fill: var(--accent); stroke: #fff; stroke-width: 1.5; }
#chart .dot.judge { fill: var(--judge); }

.filters { display: flex; gap: 12px; flex-wrap: wrap; margin: 8px 0; }
.filters label, label.block { font-size: 0.85rem; color: var(--muted); display: flex; flex-direction: column; gap: 4px; }
select { font: inherit; padding: 6px 10px; border: 1px solid var(--line); border-radius: 8px; background: #fff; max-width: 100%; }
.table-wrap { overflow-x: auto; background: #fff; border: 1px solid var(--line); border-radius: var(--radius); }
table { border-collapse: collapse; width: 100%; min-width: 760px; font-size: 0.88rem; }
th { text-align: left; background: #f9fafb; color: var(--muted); font-weight: 600; font-size: 0.78rem; padding: 8px 10px; cursor: pointer; white-space: nowrap; user-select: none; }
th[aria-sort="ascending"]::after { content: " ↑"; }
th[aria-sort="descending"]::after { content: " ↓"; }
td { padding: 8px 10px; border-top: 1px solid var(--line); white-space: nowrap; }
td.num, th.num { text-align: right; font-variant-numeric: tabular-nums; }
.range { color: var(--muted); font-size: 0.78rem; }
.tag { font-size: 0.7rem; padding: 1px 6px; border-radius: 999px; background: #ede9fe; color: var(--judge); margin-left: 6px; }
.cell-bar { display: inline-block; height: 6px; border-radius: 3px; background: var(--accent); vertical-align: middle; margin-left: 6px; opacity: 0.7; }

.gallery { display: grid; grid-template-columns: repeat(auto-fill, minmax(300px, 1fr)); gap: 12px; }
.fail { background: #fff; border: 1px solid var(--line); border-radius: var(--radius); padding: 14px; font-size: 0.88rem; }
.fail h3 { margin: 0 0 4px; font-size: 0.95rem; color: var(--bad); }
.fail .who { color: var(--muted); font-size: 0.78rem; }
.bubble { border-radius: 10px; padding: 8px 10px; margin: 8px 0 0; white-space: pre-wrap; word-break: break-word; }
.bubble.user { background: #eff6ff; }
.bubble.model { background: #f3f4f6; max-height: 160px; overflow: auto; }

.answers { display: grid; grid-template-columns: repeat(auto-fill, minmax(320px, 1fr)); gap: 12px; margin-top: 12px; }
.answer { background: #fff; border: 1px solid var(--line); border-radius: var(--radius); padding: 12px; font-size: 0.88rem; }
.answer h3 { margin: 0; font-size: 0.95rem; display: flex; justify-content: space-between; gap: 8px; }
.answer .text { white-space: pre-wrap; word-break: break-word; max-height: 220px; overflow: auto; background: #f9fafb; border-radius: 8px; padding: 8px; margin: 8px 0; }
.checks { display: flex; flex-wrap: wrap; gap: 6px; }
.check { font-size: 0.72rem; border-radius: 999px; padding: 1px 8px; border: 1px solid var(--line); }
.check.pass { color: var(--good); border-color: #bbf7d0; background: #f0fdf4; }
.check.fail { color: var(--bad); border-color: #fecaca; background: #fef2f2; }
.reason { color: var(--muted); font-size: 0.8rem; margin-top: 6px; }
#case-body { margin-top: 8px; font-size: 0.9rem; white-space: pre-wrap; }
#method-body dl { display: grid; grid-template-columns: max-content 1fr; gap: 6px 16px; margin: 0; }
#method-body dt { color: var(--muted); }
#method-body dd { margin: 0; }
.foot { padding: 32px 16px 40px; border-top: 1px solid var(--line); margin-top: 40px; }
@media (max-width: 640px) {
  #method-body dl { grid-template-columns: 1fr; }
  .nav { display: none; }
}
