:root {
  --bg: #0f1115; --panel: #171a21; --panel2: #1e222b; --line: #2a2f3a;
  --fg: #e6e8ec; --muted: #8b93a1; --accent: #5b8cff; --mono: ui-monospace, SFMono-Regular, Menlo, monospace;
  --converged: #35c07a; --majority: #4aa3ff; --judge: #f0a63a; --nocon: #f4585e; --expired: #7b8394;
}
* { box-sizing: border-box; }
body { margin: 0; background: var(--bg); color: var(--fg);
  font: 14px/1.55 system-ui, -apple-system, Segoe UI, Roboto, sans-serif; }
a { color: var(--accent); text-decoration: none; }
a:hover { text-decoration: underline; }
.muted { color: var(--muted); }
code, .mono { font-family: var(--mono); }

header { border-bottom: 1px solid var(--line); background: linear-gradient(180deg, #141824, #0f1115); }
.bar { max-width: 980px; margin: 0 auto; padding: .8rem 1.2rem; display: flex; align-items: center; gap: 1.2rem; flex-wrap: wrap; }
.brand { font-weight: 700; font-size: 1.05rem; color: var(--fg); }
.brand:hover { text-decoration: none; }
.brand small { display: block; font-weight: 400; font-size: .72rem; color: var(--muted); }
.logo { color: var(--accent); }
nav { display: flex; gap: .3rem; }
nav a { padding: .35rem .7rem; border-radius: 7px; color: var(--muted); }
nav a.active { background: var(--panel2); color: var(--fg); }
.stats { margin-left: auto; font-size: .8rem; color: var(--muted); display: flex; gap: 1rem; }
.stats b { color: var(--fg); }

main { max-width: 980px; margin: 1.4rem auto; padding: 0 1.2rem; }
h1 { font-size: 1.25rem; margin: 0 0 .3rem; }
.sub { color: var(--muted); margin: 0 0 1.2rem; }

table { width: 100%; border-collapse: collapse; background: var(--panel); border: 1px solid var(--line); border-radius: 10px; overflow: hidden; }
th, td { text-align: left; padding: .6rem .8rem; border-bottom: 1px solid var(--line); }
th { font-size: .72rem; text-transform: uppercase; letter-spacing: .04em; color: var(--muted); background: var(--panel2); }
tr:last-child td { border-bottom: none; }
tbody tr:hover { background: var(--panel2); }
td .qid { font-family: var(--mono); font-size: .82rem; }

.badge { display: inline-block; padding: .12rem .5rem; border-radius: 999px; font-size: .72rem; font-weight: 600;
  border: 1px solid transparent; }
.b-CONVERGED { color: var(--converged); border-color: color-mix(in srgb, var(--converged) 40%, transparent); background: color-mix(in srgb, var(--converged) 12%, transparent); }
.b-MAJORITY  { color: var(--majority);  border-color: color-mix(in srgb, var(--majority) 40%, transparent);  background: color-mix(in srgb, var(--majority) 12%, transparent); }
.b-JUDGE     { color: var(--judge);     border-color: color-mix(in srgb, var(--judge) 40%, transparent);     background: color-mix(in srgb, var(--judge) 12%, transparent); }
.b-NO_CONSENSUS { color: var(--nocon);  border-color: color-mix(in srgb, var(--nocon) 40%, transparent);     background: color-mix(in srgb, var(--nocon) 12%, transparent); }
.b-EXPIRED   { color: var(--expired);   border-color: color-mix(in srgb, var(--expired) 40%, transparent);   background: color-mix(in srgb, var(--expired) 12%, transparent); }

.cards { display: grid; grid-template-columns: repeat(auto-fit, minmax(180px, 1fr)); gap: .8rem; margin: 0 0 1.2rem; }
.card { background: var(--panel); border: 1px solid var(--line); border-radius: 10px; padding: .9rem 1rem; }
.card .k { color: var(--muted); font-size: .74rem; text-transform: uppercase; letter-spacing: .03em; }
.card .v { font-size: 1.5rem; font-weight: 700; margin-top: .2rem; }

.back { display: inline-block; margin-bottom: .8rem; color: var(--muted); }
.verdict.ok::after { content: " ✓"; color: var(--converged); }
.verdict.no::after { content: " ✗"; color: var(--nocon); }
.dissent { color: var(--nocon); }
.judged { margin: -.4rem 0 1.2rem; }
.judged .k { color: var(--muted); font-size: .74rem; text-transform: uppercase; letter-spacing: .03em; margin-right: .4rem; }

.bar-meter { position: relative; height: 8px; border-radius: 999px; background: var(--panel2); overflow: hidden; min-width: 120px; }
.bar-meter > span { position: absolute; inset: 0 auto 0 0; background: linear-gradient(90deg, var(--majority), var(--converged)); border-radius: 999px; }
.rate { font-variant-numeric: tabular-nums; }

footer { max-width: 980px; margin: 2rem auto; padding: 1rem 1.2rem; border-top: 1px solid var(--line); color: var(--muted); font-size: .8rem; }
.empty { padding: 2rem; text-align: center; color: var(--muted); background: var(--panel); border: 1px dashed var(--line); border-radius: 10px; }
