/* 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; }
}
@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. */
.jdg-verdict {
  display: flex; gap: .9rem; align-items: flex-start;
  margin: 1.8rem 0; padding: .9rem 1.1rem;
  background: var(--bg-surface, #16161a);
  border: 1px solid var(--border-chrome, #3a3a44);
  border-left: 3px solid var(--accent, #CC0000); border-radius: 2px;
}
.jdg-verdict p { margin: 0; font-size: .92rem; line-height: 1.6; color: var(--text, #c8c8d0); }
.jdg-vrun { margin-top: .4rem !important; font-size: .74rem !important; color: var(--text-muted, #7a7a88) !important; }
.jdg-vtag {
  flex: none; font-family: 'JetBrains Mono', monospace; font-size: .58rem;
  letter-spacing: .16em; text-transform: uppercase; color: var(--accent, #CC0000);
  border: 1px solid var(--accent-dim, #881111); border-radius: 2px;
  padding: .15em .45em; margin-top: .2rem;
}
.jdg-block { margin: 2.2rem 0 0; }
.jdg-sub { font-size: .86rem; line-height: 1.6; color: var(--text-muted, #8a8a96); max-width: 74ch; }
.jdg-methods { list-style: none; margin: 1rem 0 0; padding: 0; display: grid; gap: .5rem; }
.jdg-methods li {
  display: grid; grid-template-columns: 12rem 6rem 1fr; gap: .8rem; align-items: baseline;
  font-size: .84rem; color: var(--text-muted, #8a8a96);
  padding-bottom: .45rem; border-bottom: 1px solid #1f1f26;
}
.jdg-methods b { font-family: 'JetBrains Mono', monospace; font-size: .76rem; color: var(--text-bright, #e8e8f0); }
.jdg-n { font-family: 'JetBrains Mono', monospace; font-size: .68rem; color: #6f6f7c; }
.jdg-tbl { width: 100%; border-collapse: collapse; margin: 1rem 0 0; font-size: .8rem; }
.jdg-tbl th {
  text-align: left; padding: .45rem .55rem; border-bottom: 1px solid #3a3a44;
  font-family: 'JetBrains Mono', monospace; font-size: .64rem; letter-spacing: .12em;
  text-transform: uppercase; color: #8a8a96;
}
.jdg-tbl td { padding: .45rem .55rem; border-bottom: 1px solid #1f1f26; color: #b8b8c4; position: relative; }
.jdg-tbl td i {
  position: absolute; left: 0; bottom: 0; height: 2px; display: block;
  background: var(--accent-dim, #881111);
}
.jdg-weak td { color: #e0a0a0; }
.jdg-sig td { color: var(--text-bright, #e8e8f0); }
.jdg-sig td:last-child { color: var(--accent, #CC0000); font-family: 'JetBrains Mono', monospace; font-size: .68rem; }
.jdg-topics { margin: 1rem 0 0; display: grid; gap: .3rem; }
.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, #CC0000), var(--accent-dim, #881111)); }
.jdg-topic b { color: #e8e8f0; text-align: right; }
.jdg-topic em { font-style: normal; color: #6f6f7c; }
