/* The Judge — dark-chrome instrument page. Vanilla, no deps, CSS only.
   Companion to capture-leaderboard/board.css + capture-scanner/scanner.css:
   plated stat tiles, sectioned readout headings, an evidence table set in
   mono, and a verdict panel for the adversarial-review correction. */

.jdg-wrap { max-width: 62rem; counter-reset: jdgsec; }

/* ── lede ── */
.jdg-wrap > p:first-of-type {
  color: #e8e8f0;
  font-size: 1.06rem;
  line-height: 1.75;
}

/* ── section headings: numbered instrument readouts ── */
.jdg-wrap h2:not(.jdg-end) {
  display: flex;
  align-items: center;
  gap: 0.8rem;
  margin: 3rem 0 1rem;
  padding: 0;
  border-bottom: none;
  font: 800 1.35rem/1.25 Inter, system-ui, sans-serif;
  letter-spacing: -0.015em;
  color: #e8e8f0;
}
.jdg-wrap h2:not(.jdg-end)::before {
  counter-increment: jdgsec;
  content: "\00a7 " counter(jdgsec, decimal-leading-zero);
  flex: none;
  font: 700 0.62rem/1 "JetBrains Mono", ui-monospace, monospace;
  letter-spacing: 0.18em;
  color: #e05050;
  padding: 0.32rem 0.5rem;
  background: rgba(204, 0, 0, 0.06);
  border: 1px solid #4a2020;
  border-radius: 3px;
}
.jdg-wrap h2:not(.jdg-end)::after {
  content: "";
  position: static;
  flex: 1;
  width: auto;
  height: 1px;
  background: #2a2a32;
  box-shadow: none;
}

/* ── headline stat tiles: the instrument panel ── */
.jdg-stat { display: flex; flex-wrap: wrap; gap: 12px; margin: 1.7rem 0 1.3rem; }
.jdg-stat > div {
  flex: 1 1 12rem;
  padding: 0.95rem 1.05rem 0.9rem;
  background: linear-gradient(#17171c, #121216);
  border: 1px solid #3a3a44;
  border-top: 2px solid #3a3a44;
  border-radius: 6px;
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.04), 0 2px 10px rgba(0, 0, 0, 0.35);
}
.jdg-stat > div:has(.n.spine)   { border-top-color: #2a5a2a; }
.jdg-stat > div:has(.n.aligned) { border-top-color: #881111; }
.jdg-stat > div:has(.n.null)    { border-top-color: #5a4a2a; }
.jdg-stat .n {
  font: 800 1.75rem/1.1 "JetBrains Mono", ui-monospace, monospace;
  font-variant-numeric: tabular-nums;
  letter-spacing: -0.02em;
}
.jdg-stat .n.spine   { color: #3fb950; text-shadow: 0 0 12px rgba(63, 185, 80, 0.28); }
.jdg-stat .n.aligned { color: #ff4444; text-shadow: 0 0 12px rgba(204, 0, 0, 0.35); }
.jdg-stat .n.null    { color: #d29922; text-shadow: 0 0 12px rgba(210, 153, 34, 0.25); }
.jdg-stat .k {
  margin-top: 0.45rem;
  font: 600 0.6rem/1.5 "JetBrains Mono", ui-monospace, monospace;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: #7a7a88;
}

/* ── evidence table: mono numerics, plated header ── */
.jdg-wrap table {
  width: 100%;
  margin: 1.4rem 0 1.8rem;
  border: 1px solid #3a3a44;
  background: linear-gradient(#141419, #101014);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.04), 0 2px 10px rgba(0, 0, 0, 0.3);
}
.jdg-wrap th {
  background: linear-gradient(#1e1e24, #17171c);
  border: none;
  border-bottom: 1px solid #3a3a44;
  padding: 0.6rem 0.8rem;
  font: 700 0.62rem/1.5 "JetBrains Mono", ui-monospace, monospace;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: #a8a8b4;
  white-space: nowrap;
}
.jdg-wrap th:not(:first-child) { border-left: 1px solid #2a2a32; }
.jdg-wrap td {
  border: none;
  border-bottom: 1px solid #1e1e24;
  padding: 0.6rem 0.8rem;
  font-size: 0.88rem;
  line-height: 1.55;
  color: #c8c8d0;
  vertical-align: top;
}
.jdg-wrap td:not(:first-child) {
  border-left: 1px solid rgba(42, 42, 50, 0.6);
  font-family: "JetBrains Mono", ui-monospace, monospace;
  font-size: 0.78rem;
  font-variant-numeric: tabular-nums;
}
.jdg-wrap td:last-child { color: #e8e8f0; }
.jdg-wrap tbody tr:last-child td { border-bottom: none; }
.jdg-wrap tr:hover td { background: rgba(255, 255, 255, 0.018); }

/* ── verdict panel: the adversarial-review correction ── */
.jdg-wrap blockquote {
  margin: 1.7rem 0;
  padding: 0.95rem 1.25rem 1rem;
  background: linear-gradient(#17171c, #121216);
  border: 1px solid #3a3a44;
  border-left: 3px solid #CC0000;
  border-radius: 0 6px 6px 0;
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.04), 0 2px 10px rgba(0, 0, 0, 0.3),
              0 0 14px rgba(204, 0, 0, 0.06);
  color: #c8c8d0;
  font-style: normal;
}
.jdg-wrap blockquote::before {
  content: "Adversarial review \2014 verdict";
  display: block;
  margin-bottom: 0.55rem;
  font: 700 0.6rem/1 "JetBrains Mono", ui-monospace, monospace;
  letter-spacing: 0.22em;
  text-transform: uppercase;
  color: #e05050;
}
.jdg-wrap blockquote p { margin: 0; }

/* ── stack list: where it sits among the instruments ── */
.jdg-wrap ul { list-style: none; margin: 1.1rem 0 1.8rem; padding: 0; }
.jdg-wrap ul li {
  position: relative;
  margin: 0 0 0.6rem;
  padding: 0.7rem 0.95rem 0.7rem 1.1rem;
  background: linear-gradient(#17171c, #121216);
  border: 1px solid #2a2a32;
  border-radius: 6px;
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.03);
  font-size: 0.92rem;
  line-height: 1.65;
  transition: border-color 0.15s;
}
.jdg-wrap ul li::before {
  content: "";
  position: absolute;
  left: 0;
  top: 6px;
  bottom: 6px;
  width: 2px;
  border-radius: 1px;
  background: #881111;
}
.jdg-wrap ul li:hover { border-color: #3a3a44; }
.jdg-wrap ul li > strong:first-child { color: #e8e8f0; }

/* ── end matter: read it / run it ── */
.jdg-wrap h2.jdg-end {
  display: flex;
  align-items: center;
  gap: 0.7rem;
  margin: 3.6rem 0 0.9rem;
  padding: 0;
  border-bottom: none;
  font: 700 0.68rem/1.4 "JetBrains Mono", ui-monospace, monospace;
  letter-spacing: 0.3em;
  text-transform: uppercase;
  color: #7a7a88;
}
.jdg-wrap h2.jdg-end::before { content: ""; flex: none; width: 14px; height: 2px; background: #CC0000; }
.jdg-wrap h2.jdg-end::after {
  content: "";
  position: static;
  flex: 1;
  width: auto;
  height: 1px;
  background: #2a2a32;
  box-shadow: none;
}
.jdg-wrap h2.jdg-end ~ ul { margin: 0.9rem 0 2rem; }
.jdg-wrap h2.jdg-end ~ ul li {
  margin: 0;
  padding: 0.5rem 0.4rem 0.5rem 1.35rem;
  background: none;
  border: none;
  border-bottom: 1px solid rgba(42, 42, 51, 0.6);
  border-radius: 0;
  box-shadow: none;
  font-family: "JetBrains Mono", ui-monospace, monospace;
  font-size: 0.8rem;
  line-height: 1.65;
  color: #a8a8b4;
}
.jdg-wrap h2.jdg-end ~ ul li::before {
  content: "\2192";
  position: absolute;
  left: 0.1rem;
  top: 0.5rem;
  bottom: auto;
  width: auto;
  background: none;
  color: #e05050;
}
.jdg-wrap h2.jdg-end ~ ul li:hover { background: rgba(255, 255, 255, 0.015); border-color: rgba(42, 42, 51, 0.6); }

/* print-appearance footnote */
.jdg-wrap h2.jdg-end ~ p {
  margin: 1.1rem 0 0;
  padding: 0.8rem 0 0 0.9rem;
  border-top: 1px solid #2a2a32;
  border-left: 2px solid #881111;
  font-size: 0.84rem;
  line-height: 1.7;
  color: #7a7a88;
}

/* ── cross-reference rail: the bias-study family (layout-supplied) ── */
.jdg-xref { margin: 2.4rem 0 1rem; }
.jdg-xref-head {
  display: flex;
  align-items: center;
  gap: 0.7rem;
  margin-bottom: 0.9rem;
  font: 600 0.68rem/1.4 "JetBrains Mono", ui-monospace, monospace;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: #7a7a88;
}
.jdg-xref-head::before { content: ""; flex: none; width: 14px; height: 2px; background: #CC0000; }
.jdg-xref-head::after { content: ""; flex: 1; height: 1px; background: #2a2a32; }
.jdg-xref-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 12px; }
.jdg-xref-card {
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
  padding: 14px 16px 15px;
  background: linear-gradient(#17171c, #121216);
  border: 1px solid #3a3a44;
  border-radius: 8px;
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.04), 0 2px 10px rgba(0, 0, 0, 0.3);
  text-decoration: none;
  transition: border-color 0.15s, box-shadow 0.15s;
}
.jdg-xref-card:hover {
  border-color: #55556a;
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.05), 0 2px 10px rgba(0, 0, 0, 0.3),
              0 0 14px rgba(204, 0, 0, 0.08);
}
.jdg-xref-card:focus-visible { outline: 2px solid #CC0000; outline-offset: 3px; }
.jdg-xref-tag {
  align-self: flex-start;
  font: 700 0.56rem/1 "JetBrains Mono", ui-monospace, monospace;
  letter-spacing: 0.2em;
  text-transform: uppercase;
  color: #e05050;
  padding: 0.28rem 0.5rem;
  background: rgba(204, 0, 0, 0.06);
  border: 1px solid #4a2020;
  border-radius: 3px;
}
.jdg-xref-card b {
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  font: 700 0.98rem/1.3 Inter, system-ui, sans-serif;
  letter-spacing: -0.01em;
  color: #e8e8f0;
}
.jdg-xref-card b::after {
  content: "\2192";
  color: #7a7a88;
  font-weight: 400;
  transition: color 0.15s, transform 0.15s;
}
.jdg-xref-card:hover b::after { color: #ff6a6a; transform: translateX(2px); }
.jdg-xref-desc { margin: 0; font: 400 0.82rem/1.6 Inter, system-ui, sans-serif; color: #a8a8b4; }
.jdg-xref-foot { margin: 0.9rem 0 0; font: 400 0.8rem/1.6 Inter, system-ui, sans-serif; color: #7a7a88; }
.jdg-xref-foot a {
  color: #ff6a6a;
  text-decoration: none;
  border-bottom: 1px dotted rgba(204, 0, 0, 0.5);
  transition: color 0.15s, border-color 0.15s;
}
.jdg-xref-foot a:hover { color: #ff9a9a; border-bottom-color: #CC0000; }

/* ── responsive ── */
@media (max-width: 768px) {
  .jdg-wrap table { display: block; overflow-x: auto; }
  .jdg-xref-grid { grid-template-columns: 1fr; }
  .jdg-wrap h2:not(.jdg-end) { font-size: 1.2rem; }
  .jdg-stat .n { font-size: 1.5rem; }
  /* The methods list is 12rem + 6rem + text in fixed columns; on a 390px phone that forced the
     layout viewport to 426px and shrank the whole page. Name and record count share a line,
     the description goes under them. */
  .jdg-methods li { grid-template-columns: minmax(0, 1fr) auto; gap: .2rem .8rem; }
  .jdg-methods li > span:last-child { grid-column: 1 / -1; }
  /* the "measured" tag takes its own line so the verdict gets the full box width */
  .jdg-verdict { flex-direction: column; gap: .5rem; }
}
@media (prefers-reduced-motion: reduce) {
  .jdg-wrap ul li, .jdg-xref-card, .jdg-xref-card b::after, .jdg-xref-foot a { transition: none; }
  .jdg-xref-card:hover b::after { transform: none; }
}

/* ── The measured half ──────────────────────────────────────────────────────
   The page had prose and a stylesheet and no evidence, while six judging methods
   over the same 780 responses sat two directories away. 2026-09-28: the readout
   panel, the agreement rates and the contamination intervals are now drawn, not
   only printed — a whisker against a zero line is the object the whole section
   is about. Nothing here adds a number judge.json did not carry. */
.jdg-page {
  --jdg-plate: linear-gradient(180deg, #17171c 0%, #111116 100%);
  --jdg-plate-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.045), 0 2px 14px rgba(0, 0, 0, 0.45);
  --jdg-tick: #5a5a6a;
  --jdg-tick-strong: #8e8ea0;
}
.jdg-verdict {
  display: flex; gap: 1.2rem; align-items: flex-start;
  margin: 2rem 0 2.2rem; padding: 1.25rem 1.4rem 1.2rem;
  background: var(--jdg-plate);
  border: 1px solid var(--border-chrome, #3a3a44);
  border-left: 3px solid var(--accent, #CC0000); border-radius: 4px;
  box-shadow: var(--jdg-plate-shadow), 0 0 22px rgba(204, 0, 0, 0.06);
  position: relative;
}
.jdg-verdict::before {
  content: ''; position: absolute; left: 0; right: 0; top: 0; height: 5px;
  background: repeating-linear-gradient(90deg, var(--jdg-tick) 0 1px, transparent 1px 8px) left top / 100% 4px no-repeat;
  opacity: .8;
}
.jdg-verdict p { margin: 0 0 .6rem; font-size: 1.08rem; line-height: 1.6; color: #e8e8f0; }
.jdg-verdict p b {
  font-family: 'JetBrains Mono', monospace; font-weight: 700; font-size: .94em; color: #fff;
  font-variant-numeric: tabular-nums; padding: 0 .1em;
  background: rgba(204, 0, 0, .16); border-bottom: 1px solid rgba(204, 0, 0, .55); border-radius: 2px;
}
.jdg-verdict p.jdg-vrun { margin: 0; font-family: 'JetBrains Mono', monospace; font-size: .74rem; color: var(--text-muted, #7a7a88); }
.jdg-vtag {
  flex: none; font: 700 .62rem/1 'JetBrains Mono', monospace; letter-spacing: .16em;
  text-transform: uppercase; color: var(--accent, #CC0000);
  writing-mode: vertical-rl; transform: rotate(180deg);
  border-left: 1px solid #3a3a44; padding: 0 0 0 .6rem; align-self: stretch;
}
.jdg-block { margin: 3rem 0 0; }
.jdg-block h2 {
  font: 800 1.45rem/1.2 Inter, system-ui, sans-serif; letter-spacing: -.02em; color: #e8e8f0;
  margin: 0 0 .7rem; padding: 0 0 .8rem; border: none; position: relative;
}
.jdg-block h2::after {
  content: ''; position: absolute; left: 0; bottom: 0; width: 161px; height: 11px;
  background:
    repeating-linear-gradient(90deg, var(--jdg-tick-strong) 0 1px, transparent 1px 40px) left bottom / 100% 11px no-repeat,
    repeating-linear-gradient(90deg, var(--jdg-tick) 0 1px, transparent 1px 8px) left bottom / 100% 5px no-repeat,
    linear-gradient(#CC0000, #CC0000) left bottom / 40px 2px no-repeat;
  box-shadow: none;
}
.jdg-sub { font-size: .9rem; line-height: 1.6; color: #b8b8c4; max-width: 76ch; margin: 0 0 1.1rem; }

/* the six methods: a plated list */
.jdg-methods {
  list-style: none; margin: 1rem 0 0; padding: .3rem .9rem; display: grid; gap: 0;
  background: var(--jdg-plate); border: 1px solid #3a3a44; border-radius: 4px; box-shadow: var(--jdg-plate-shadow);
}
.jdg-methods li {
  display: grid; grid-template-columns: 12rem 6rem 1fr; gap: .8rem; align-items: baseline;
  font-size: .86rem; line-height: 1.55; color: #b8b8c4;
  padding: .6rem 0; border-bottom: 1px solid #1f1f26;
}
.jdg-methods li:last-child { border-bottom: none; }
.jdg-methods b { font-family: 'JetBrains Mono', monospace; font-size: .78rem; color: #e8e8f0; }
.jdg-n { font-family: 'JetBrains Mono', monospace; font-size: .68rem; color: #6f6f7c; }

/* evidence tables: plated, mono numerics */
.jdg-tbl {
  width: 100%; border-collapse: collapse; margin: 1rem 0 0; font-size: .82rem;
  background: var(--jdg-plate); border: 1px solid #3a3a44; border-radius: 4px; box-shadow: var(--jdg-plate-shadow);
}
.jdg-tbl th {
  text-align: left; padding: .6rem .7rem; border: none; border-bottom: 1px solid #3a3a44;
  background: linear-gradient(180deg, #1e1e24, #17171c);
  font: 700 .62rem/1 'JetBrains Mono', monospace; letter-spacing: .16em; text-transform: uppercase; color: #a8a8b4;
  white-space: nowrap;
}
.jdg-tbl th + th { border-left: 1px solid #24242c; }
.jdg-tbl td { padding: .6rem .7rem; border: none; border-bottom: 1px solid #1f1f26; color: #b8b8c4; vertical-align: middle; }
.jdg-tbl td + td {
  border-left: 1px solid rgba(36, 36, 44, .7);
  font-family: 'JetBrains Mono', monospace; font-size: .8rem; font-variant-numeric: tabular-nums; white-space: nowrap;
}
.jdg-tbl tbody tr:last-child td { border-bottom: none; }
.jdg-tbl tr:hover td { background: rgba(255, 255, 255, .02); }
.jdg-weak td { color: #e0a0a0; }
.jdg-sig td { color: #e8e8f0; }
.jdg-contam td:last-child { font-size: .68rem; letter-spacing: .06em; text-transform: uppercase; color: #6f6f7c; }
.jdg-sig td:last-child { color: var(--accent, #CC0000); }

/* agreement rate strips */
.jdg-rate { display: inline-block; vertical-align: middle; width: 6rem; height: 7px; margin-right: .6rem; background: #1a1a20; border-radius: 2px; overflow: hidden; }
.jdg-rate i { display: block; height: 100%; background: linear-gradient(90deg, #55556a, #9a9aae); border-radius: 2px; }
.jdg-weak .jdg-rate i { background: linear-gradient(90deg, #881111, #CC0000); }

/* contamination whiskers: interval against a zero line */
.jdg-cicell { min-width: 15rem; }
.jdg-ci {
  position: relative; display: inline-block; vertical-align: middle; width: 9rem; height: 14px; margin-right: .7rem;
  background: #1a1a20; border-radius: 2px;
  background-image: repeating-linear-gradient(90deg, rgba(90, 90, 106, .3) 0 1px, transparent 1px 25%);
}
.jdg-ci i { position: absolute; display: block; }
.jdg-ci-zero { left: 50%; top: -2px; bottom: -2px; width: 1px; background: var(--jdg-tick-strong); }
.jdg-ci-bar { top: 4px; height: 6px; background: #3f3f4a; border-radius: 1px; }
.jdg-sig .jdg-ci-bar { background: linear-gradient(90deg, #881111, #CC0000); box-shadow: 0 0 6px rgba(204, 0, 0, .35); }
.jdg-ci-mean { top: 1px; bottom: 1px; width: 2px; margin-left: -1px; background: #fff; box-shadow: 0 0 4px rgba(255, 255, 255, .5); }
.jdg-ci-text { vertical-align: middle; }

/* topic spread */
.jdg-topics {
  margin: 1rem 0 0; display: grid; gap: .35rem; padding: .8rem .9rem;
  background: var(--jdg-plate); border: 1px solid #3a3a44; border-radius: 4px; box-shadow: var(--jdg-plate-shadow);
}
.jdg-topic {
  display: grid; grid-template-columns: 3rem 1fr 3rem 4.5rem; gap: .6rem; align-items: center;
  font-family: 'JetBrains Mono', monospace; font-size: .7rem; color: #8a8a96;
}
.jdg-topic i {
  display: block; height: 9px; border-radius: 2px;
  background: linear-gradient(90deg, var(--accent-dim, #881111), var(--accent, #CC0000));
  box-shadow: 0 0 6px rgba(204, 0, 0, .18);
}
.jdg-topic b { color: #e8e8f0; text-align: right; }
.jdg-topic em { font-style: normal; color: #6f6f7c; }

@media (max-width: 768px) {
  /* The methods list is 12rem + 6rem + text in fixed columns; on a 390px phone that forced the
     layout viewport to 426px and shrank the whole page. Name and record count share a line,
     the description goes under them. */
  .jdg-methods li { grid-template-columns: minmax(0, 1fr) auto; gap: .2rem .8rem; }
  .jdg-methods li > span:last-child { grid-column: 1 / -1; }
  /* the "measured" tag takes its own line so the verdict gets the full box width */
  .jdg-verdict { flex-direction: column; gap: .5rem; padding: 1rem 1rem .9rem; }
  .jdg-vtag { writing-mode: horizontal-tb; transform: none; border-left: none; padding: 0; align-self: flex-start; }
  .jdg-verdict p { font-size: 1rem; }
  .jdg-block h2 { font-size: 1.25rem; }
  .jdg-tbl { display: block; overflow-x: auto; -webkit-overflow-scrolling: touch; }
  /* the plate scrolls sideways; keep the name column readable instead of wrapping word by word */
  .jdg-tbl td:first-child { min-width: 12rem; }
  .jdg-rate { width: 4rem; }
  .jdg-ci { width: 7rem; }
  .jdg-cicell { min-width: 0; }
}
