/* ==========================================================================
   Debate page stylesheet (spec v2 §C4, §C6, §C7, §C8).
   Rules enforced here:
     - rem-only: every font-size is rem (grep: no "font-size: <n>px").
     - --font-scale on <html> scales ALL text together (§C7).
     - 14 complete themes via [data-theme]; default = Dark Sky Blue (§C8).
     - --glow drives the cross-link hover pulse (§C3).
     - tooltips via [data-tip] (§C5); full justification (§C6).
   Two sides get equal visual weight on purpose — the scores rank them, not the design.
   ========================================================================== */

/* ---- Font scaling: the ONLY thing the A cycle button changes (§C7) ----- */
:root { --font-scale: 1; --font-base: 16px; }
html { font-size: calc(var(--font-base) * var(--font-scale)); }

/* ---- Default theme: Dark Mode Sky Blue (§C8 default) ------------------- */
:root,
html[data-theme="sky-blue"] {
  --bg: #0d1a2b; --surface: #14263c; --surface-2: #1b344f;
  --text: #e8eef6; --muted: #9db4cf; --border: #294863;
  --aff: #4aa3ff; --neg: #ff8f6b; --link: #7cc4ff; --glow: #7cc4ff;
  --tip-bg: #0a1420; --tip-text: #eef5ff;
  --cat-scripture:#b98bff; --cat-scholar:#5bc0ff; --cat-history:#e0b25a;
  --cat-science:#4fd1a5; --cat-logic:#9aa7ff; --cat-statistic:#ff9ecb; --cat-testimony:#8fd06a;
  --atk-fallacy:#ff6b6b; --atk-evidence:#5bc0ff; --atk-counter:#ffab5b;
  --atk-warrant:#c08bff; --atk-weighing:#4fd1a5; --flag:#ffcf5b;
}

/* Dark themes ----------------------------------------------------------- */
html[data-theme="midnight-purple"] {
  --bg:#150f26; --surface:#211636; --surface-2:#2c1e49; --text:#efe9fb; --muted:#b6a6d8;
  --border:#3a2a5c; --aff:#b18bff; --neg:#ff8fd0; --link:#c9a7ff; --glow:#c9a7ff;
  --tip-bg:#0f0a1c; --tip-text:#f3ecff;
}
html[data-theme="forest-night"] {
  --bg:#0c1a12; --surface:#132a1d; --surface-2:#1a3728; --text:#e6f2e9; --muted:#9dc4ac;
  --border:#254a35; --aff:#54c98a; --neg:#e0b25a; --link:#7fe0a8; --glow:#7fe0a8;
  --tip-bg:#08130d; --tip-text:#ecf7ef;
}
html[data-theme="charcoal-amber"] {
  --bg:#161512; --surface:#221f1a; --surface-2:#2f2a22; --text:#f2ece1; --muted:#c3b7a2;
  --border:#3d3527; --aff:#f0a63c; --neg:#5bc0ff; --link:#ffbf66; --glow:#ffbf66;
  --tip-bg:#100f0c; --tip-text:#f7f1e6;
}
html[data-theme="deep-ocean"] {
  --bg:#071824; --surface:#0d2635; --surface-2:#123448; --text:#e3f0f7; --muted:#96bccf;
  --border:#1e4560; --aff:#3fc7d4; --neg:#ff9f7a; --link:#6fdbe6; --glow:#6fdbe6;
  --tip-bg:#04121b; --tip-text:#e9f5fa;
}
html[data-theme="crimson-night"] {
  --bg:#1c0f12; --surface:#2a161b; --surface-2:#391d24; --text:#f7e9ec; --muted:#d3a7b0;
  --border:#4d2830; --aff:#ff7a90; --neg:#ffc04d; --link:#ff9db0; --glow:#ff9db0;
  --tip-bg:#14090c; --tip-text:#fceef1;
}
html[data-theme="slate-green"] {
  --bg:#101917; --surface:#1a2724; --surface-2:#233531; --text:#e6efec; --muted:#a3c0b8;
  --border:#2f4842; --aff:#5ec8a8; --neg:#e6a95c; --link:#84e0c2; --glow:#84e0c2;
  --tip-bg:#0b1210; --tip-text:#ecf5f2;
}

/* Light themes ---------------------------------------------------------- */
html[data-theme="paper-white"] {
  --bg:#f6f7f9; --surface:#ffffff; --surface-2:#eef1f5; --text:#151a21; --muted:#5a6675;
  --border:#d3dae3; --aff:#1f6feb; --neg:#c2410c; --link:#1257c9; --glow:#1f6feb;
  --tip-bg:#1b2430; --tip-text:#f4f7fb;
}
html[data-theme="warm-cream"] {
  --bg:#f6f1e7; --surface:#fffdf8; --surface-2:#efe7d6; --text:#241d12; --muted:#6b5d45;
  --border:#ddd1ba; --aff:#b5651d; --neg:#1f6f8b; --link:#9a5316; --glow:#b5651d;
  --tip-bg:#2a2213; --tip-text:#faf5ea;
}
html[data-theme="day-sky"] {
  --bg:#eef4fb; --surface:#ffffff; --surface-2:#e0eaf6; --text:#122033; --muted:#4d6785;
  --border:#c6d7ea; --aff:#1565c0; --neg:#c14a1f; --link:#0f57ab; --glow:#1565c0;
  --tip-bg:#12233a; --tip-text:#eef5fd;
}
html[data-theme="mint"] {
  --bg:#eef7f1; --surface:#ffffff; --surface-2:#dcefe3; --text:#0f2119; --muted:#4a6a5a;
  --border:#c2ddcd; --aff:#0f7a52; --neg:#b5651d; --link:#0b6644; --glow:#0f7a52;
  --tip-bg:#0f2419; --tip-text:#edf7f1;
}
html[data-theme="lavender"] {
  --bg:#f3f0fa; --surface:#ffffff; --surface-2:#e7e0f4; --text:#1c1430; --muted:#5f5480;
  --border:#d6cbec; --aff:#6d3fc0; --neg:#b5651d; --link:#5a2fab; --glow:#6d3fc0;
  --tip-bg:#1c1330; --tip-text:#f2ecfb;
}
html[data-theme="sandstone"] {
  --bg:#f5efe6; --surface:#fffcf6; --surface-2:#ece1cf; --text:#251d10; --muted:#6d5c3f;
  --border:#dccdb2; --aff:#9a6a1c; --neg:#1f6f8b; --link:#835512; --glow:#9a6a1c;
  --tip-bg:#271f11; --tip-text:#faf4e9;
}
html[data-theme="rose-quartz"] {
  --bg:#faf0f2; --surface:#ffffff; --surface-2:#f3e0e6; --text:#2a141b; --muted:#7a5560;
  --border:#e8cdd5; --aff:#c02f6a; --neg:#1f7a8b; --link:#a82559; --glow:#c02f6a;
  --tip-bg:#2a141b; --tip-text:#fbeef2;
}

/* Light themes share readable (darker) accent tag colors for AA legibility. */
html[data-theme="paper-white"], html[data-theme="warm-cream"], html[data-theme="day-sky"],
html[data-theme="mint"], html[data-theme="lavender"], html[data-theme="sandstone"],
html[data-theme="rose-quartz"] {
  --cat-scripture:#7c3aed; --cat-scholar:#0369a1; --cat-history:#a16207;
  --cat-science:#0f766e; --cat-logic:#4f46e5; --cat-statistic:#be185d; --cat-testimony:#3f7d20;
  --atk-fallacy:#dc2626; --atk-evidence:#0369a1; --atk-counter:#c2410c;
  --atk-warrant:#7c3aed; --atk-weighing:#0f766e; --flag:#b45309; --tip-text:#f4f7fb;
}

/* ---- Base layout ------------------------------------------------------ */
* { box-sizing: border-box; }
body {
  margin: 0; background: var(--bg); color: var(--text);
  font-family: system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
  font-size: 1rem; line-height: 1.55; transition: background .2s, color .2s;
}
p, li, blockquote, .block p { text-align: justify; hyphens: auto; }
a { color: var(--link); text-decoration: none; }
a:hover { text-decoration: underline; }
.wrap { max-width: 78rem; margin: 0 auto; padding: 1.25rem; }

/* ---- Fixed controls (A cycle + theme cycle + help) --------------------- */
.controls { position: fixed; top: .75rem; right: .75rem; display: flex; gap: .4rem; z-index: 50; }
.controls button,
.controls #help-btn {
  font-size: 1rem; font-family: inherit; cursor: pointer; border: 1px solid var(--border);
  background: var(--surface); color: var(--text); border-radius: .5rem;
  padding: .35rem .6rem; line-height: 1; box-shadow: 0 1px 4px rgba(0,0,0,.25);
}
.controls button:hover,
.controls #help-btn:hover { border-color: var(--link); }
/* An <a>, not a <button> — it navigates, so it must be middle-clickable and copyable.
   Matched to the buttons visually; text-decoration and link colour undone to match. */
.controls #help-btn { text-decoration: none; font-weight: 700; }

/* ---- Banner (shared asset at ../banner.jpg; also the link home) -------- */
.banner { position: relative; display: block; margin: 0 0 1rem; }
.banner img {
  display: block; width: 100%; height: auto; max-height: 13rem;
  object-fit: cover; object-position: center 62%;
  border-radius: .6rem; border: 1px solid var(--border);
}
/* Fade the painting into the page background so it belongs in all 14 themes. */
.banner::after {
  content: ""; position: absolute; inset: auto 0 0 0; height: 2.5rem;
  background: linear-gradient(to bottom, transparent, var(--bg));
  border-radius: 0 0 .6rem .6rem; pointer-events: none;
}
.banner:hover img { border-color: var(--link); }

/* ---- Header ----------------------------------------------------------- */
.eyebrow { text-align: center; margin: 0; font-size: .78rem; font-weight: 700; letter-spacing: .15em;
           color: var(--muted); text-transform: uppercase; cursor: help; }
.page-head h1 { font-size: 2.4rem; margin: .2rem 0; color: var(--text); font-family: 'Gabriela', serif; text-align: center; }
.page-head .description { color: var(--muted); font-size: 1.2rem; margin: .2rem 0 .8rem; text-align: center; }
.resolution-label { font-size: .72rem; text-transform: uppercase; letter-spacing: .06em; color: var(--muted);
                     margin: .6rem 0 .3rem; cursor: help; }
.resolution {
  border-left: .3rem solid var(--aff); background: var(--surface);
  margin: 0; padding: .8rem 1rem; border-radius: .4rem; font-size: 1.15rem; font-style: italic;
}

/* ---- Panels ----------------------------------------------------------- */
.panel { background: var(--surface); border: 1px solid var(--border); border-radius: .6rem; padding: 1rem 1.1rem; margin: 1rem 0; }
.panel h2 { font-size: 1.15rem; margin: 0 0 .7rem; }

.score-row { display: flex; align-items: center; gap: .8rem; }
.score-side { display: flex; flex-direction: column; align-items: center; min-width: 6rem; }
.score-side .label { font-size: .75rem; letter-spacing: .08em; color: var(--muted); cursor: help; }
.score-side .total { font-size: 1.7rem; font-weight: 700; }
.score-side.affirmative .total { color: var(--aff); }
.score-side.negative .total { color: var(--neg); }
.score-bar { flex: 1; height: 1.1rem; border-radius: .55rem; overflow: hidden; display: flex; border: 1px solid var(--border); }
.bar-aff { background: var(--aff); }
.bar-neg { background: var(--neg); }

/* §8b — prominent cumulative "thinking time" total, near the top of the score panel. */
.thinking-total { margin-top: .6rem; font-size: .95rem; color: var(--muted); cursor: help; }
.thinking-total b { color: var(--text); font-size: 1.15rem; }
.thinking-icon { margin-right: .2rem; }

.dimension-row { display: flex; flex-wrap: wrap; gap: .5rem; margin-top: .8rem; }
.dim { background: var(--surface-2); border-radius: .4rem; padding: .3rem .6rem; font-size: .85rem; cursor: help; }
.dim .dim-aff { color: var(--aff); font-weight: 700; }
.dim .dim-neg { color: var(--neg); font-weight: 700; }
.dim .dim-label { color: var(--muted); margin-right: .3rem; }

.judge-chips { display: flex; flex-wrap: wrap; gap: .4rem; margin-top: .8rem; }
.chip { font-size: .78rem; background: var(--surface-2); border: 1px solid var(--border); border-radius: 1rem; padding: .25rem .6rem; cursor: help; }
.chip.low-consistency { border-color: var(--flag); }
.chip .aff { color: var(--aff); font-weight: 700; }
.chip .neg { color: var(--neg); font-weight: 700; }

.banner { border-radius: .4rem; padding: .5rem .8rem; margin: .6rem 0 0; font-size: .9rem; border: 1px solid var(--flag); background: var(--surface-2); }
.banner.early { border-color: var(--neg); }
.no-winner { color: var(--muted); font-size: .85rem; margin: .7rem 0 0; }

/* ---- Process panel (§C10) --------------------------------------------- */
.process-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(12rem, 1fr)); gap: .7rem; }
.process-cell { background: var(--surface-2); border-radius: .5rem; padding: .6rem .8rem; cursor: help; }
.process-cell h3 { font-size: .8rem; text-transform: uppercase; letter-spacing: .06em; color: var(--muted); margin: 0 0 .4rem; }
.process-cell .big { font-size: 1.1rem; font-weight: 700; }
.process-cell.flagged { border: 1px solid var(--flag); }
.mismatch-item { color: var(--atk-fallacy); font-size: .82rem; }
/* "Sessions" and each judge-model name inside a cell carry their OWN, more specific tip —
   without resetting the cursor back to default here, the whole cell's help-cursor would
   otherwise mislead the reader into thinking the cell tip covers this word too. */
.process-cell [data-tip] { cursor: help; }
/* Model names (judge panel list, judge-note headers, RFD summaries): a plain-language blurb
   on hover/tap/focus, so "qwen3.5:9b" doesn't have to mean anything to the reader already. */
.model-name { border-bottom: 1px dotted var(--border); cursor: help; }

/* ---- Two columns of cards --------------------------------------------- */
.column-controls { display: flex; justify-content: flex-end; gap: .5rem; margin-bottom: .5rem; }
.column-controls button { font-size: .78rem; font-family: inherit; cursor: pointer; background: var(--surface-2); color: var(--text); border: 1px solid var(--border); border-radius: .4rem; padding: .25rem .55rem; }
.cases { display: grid; grid-template-columns: 1fr 1fr; gap: 1rem; }
.column-head { font-size: 1.3rem; margin: .2rem 0 .6rem; }
.column.affirmative .column-head { color: var(--aff); }
.column.negative .column-head { color: var(--neg); }
/* "argued by <model>" — shown once per column rather than on every card (PAGE_UX_SPEC-style
   density decision): the model is constant for every card underneath it. */
.column-model { font-size: .68rem; font-weight: 400; color: var(--muted); vertical-align: middle;
                border-bottom: 1px dotted var(--border); cursor: help; }
.group-head { font-size: .9rem; color: var(--muted); margin: 1rem 0 .4rem; text-transform: uppercase; letter-spacing: .05em; }

/* ---- Point card (collapsed by default, §C1) --------------------------- */
/* No `overflow: hidden` here: it clipped every tooltip inside a card. The header carries
   its own top radius instead, which is all the overflow rule was ever buying. */
.point-card {
  background: var(--surface); border: 1px solid var(--border); border-left: .28rem solid var(--border);
  border-radius: .5rem; margin: .55rem 0;
}
.point-card.side-affirmative { border-left-color: var(--aff); }
.point-card.side-negative { border-left-color: var(--neg); }
.point-card.pulse { animation: glowpulse 1s ease-in-out infinite; }
.point-card.flash { animation: flash 1.1s ease-out 1; }
@keyframes glowpulse { 0%,100% { box-shadow: 0 0 0 0 transparent; } 50% { box-shadow: 0 0 .1rem .18rem var(--glow); } }
@keyframes flash { 0% { box-shadow: 0 0 0 .25rem var(--glow); } 100% { box-shadow: 0 0 0 0 transparent; } }

.point-head { display: flex; align-items: center; gap: .5rem; padding: .55rem .7rem; cursor: pointer; user-select: none; flex-wrap: wrap; border-radius: .45rem .45rem 0 0; }
.point-head:hover { background: var(--surface-2); }
.toggle { display: inline-block; color: var(--muted); font-size: .8rem; width: 1rem; transition: transform .12s ease; }
/* Without this, opening a card (esp. a nested defense inside "Defenses of this point") gave
   no visual sign it had actually toggled — the .sect chevron rotates on open, this one never
   did, so a reader could reasonably conclude it was not interactive at all. */
.point-card.open > .point-head .toggle { transform: rotate(90deg); }
.point-id { font-family: ui-monospace, monospace; font-size: .78rem; font-weight: 700; background: var(--surface-2); border: 1px solid var(--border); border-radius: .3rem; padding: .1rem .35rem; cursor: help; }
.point-type { font-size: .68rem; letter-spacing: .05em; color: var(--muted); border: 1px solid var(--border); border-radius: .3rem; padding: .1rem .35rem; cursor: help; }
.point-title { font-size: .98rem; font-weight: 600; margin: 0; flex: 1; min-width: 8rem; }
.point-score { font-size: .85rem; font-weight: 700; color: #fff; border-radius: .3rem; padding: .12rem .45rem; }
.point-score .of { font-size: .7rem; opacity: .8; font-weight: 400; }

/* ---- Confidence chips (Phase B / v3 §F) ---------------------------- */
.conf-chip {
  font-size: .68rem; font-weight: 700; letter-spacing: .03em; text-transform: uppercase;
  padding: .1rem .45rem; border-radius: .9rem; border: 1px solid currentColor;
  white-space: nowrap;
}
.conf-established { color: var(--cat-science); }
.conf-leaning { color: var(--cat-scholar); }
.conf-contended { color: var(--atk-counter); }
.conf-weak { color: var(--atk-fallacy); }

/* ---- Standing: sum and per-point average side by side -------------- */
.standing {
  display: flex; flex-direction: column; gap: .3rem;
  margin: .7rem 0 .5rem; padding: .55rem .7rem;
  border: 1px solid var(--border); border-radius: .4rem; background: var(--panel-alt, transparent);
}
.standing-row { display: flex; flex-wrap: wrap; align-items: baseline; gap: .35rem .9rem; }
.standing-side { font-weight: 700; min-width: 6.5rem; }
.standing-affirmative .standing-side { color: var(--aff); }
.standing-negative .standing-side { color: var(--neg); }
.standing-metric { font-size: .86rem; color: var(--muted); border-bottom: 1px dotted var(--border); cursor: help; }
.standing-metric b { color: var(--text); font-size: 1rem; }
/* Average is the volume-independent, decision-relevant number; total is provided for
   reference only and reads as a "score" to a naive eye, so it is deliberately quieter
   than the average even though both use the same markup shape (order + weight only). */
.standing-metric-primary b { font-size: 1.1rem; }
.standing-metric-secondary { opacity: .62; }
.standing-metric-secondary b { font-size: .86rem; }
.standing-count { font-size: .76rem; color: var(--muted); margin-left: auto; }
.standing-metric-thinking { font-size: .76rem; opacity: .75; border-bottom: none; }
.standing-legend { font-size: .78rem; color: var(--muted); margin: 0 0 .3rem; }

.clash-badges { display: flex; gap: .3rem; }
.clash-badges .cb { font-size: .72rem; color: var(--muted); }

.point-body { display: none; padding: 0 .7rem .7rem; }
/* MUST be a direct-child combinator (>), not a descendant selector. With a plain descendant
   selector, a nested defense's OWN .point-body also matched via its ANCESTOR card being
   open — so once AFF-1 (outer) was open, AFF-D1 (nested inside it) stayed visible no matter
   what AFF-D1's own .open/.closed state was; closing AFF-D1 rotated its chevron back but had
   no visible effect, because the outer card alone was enough to satisfy the old selector.
   Found live 2026-08-09. */
.point-card.open > .point-body { display: block; }

.withdrawn-note { color: var(--muted); font-style: italic; font-size: .85rem; }
.point-card.withdrawn { opacity: .72; }
.point-card.withdrawn .point-title { text-decoration: line-through; }

.meta { font-size: .82rem; color: var(--muted); margin: .3rem 0; }
.block { margin: .5rem 0; }
.block-label { display: block; font-size: .68rem; text-transform: uppercase; letter-spacing: .07em; color: var(--muted); }
.block p { margin: .15rem 0; }

.evidence { list-style: none; padding: 0; margin: .2rem 0; }
.evidence li { margin: .3rem 0; font-size: .9rem; }
.ev-id { font-family: ui-monospace, monospace; font-size: .72rem; color: var(--muted); }
.ev-cat { font-size: .68rem; font-weight: 700; letter-spacing: .04em; padding: .05rem .35rem; border-radius: .3rem; border: 1px solid currentColor; }
.target-quote { font-style: italic; color: var(--muted); font-size: .85rem; border-left: .2rem solid var(--border); padding-left: .5rem; }

.cat-scripture { color: var(--cat-scripture); }
.cat-scholar { color: var(--cat-scholar); }
.cat-history { color: var(--cat-history); }
.cat-science { color: var(--cat-science); }
.cat-logic { color: var(--cat-logic); }
.cat-statistic { color: var(--cat-statistic); }
.cat-testimony { color: var(--cat-testimony); }

.attack-tag { font-size: .7rem; font-weight: 700; padding: .05rem .35rem; border-radius: .3rem; border: 1px solid currentColor; }
.atk-evidence { color: var(--atk-evidence); }
.atk-counter-evidence { color: var(--atk-counter); }
.atk-warrant { color: var(--atk-warrant); }
.atk-weighing { color: var(--atk-weighing); }
.atk-fallacy { color: var(--atk-fallacy); }

.xlink { font-family: ui-monospace, monospace; font-size: .82rem; }
.clash { display: flex; flex-wrap: wrap; gap: .4rem; margin-top: .5rem; }
.badge { font-size: .74rem; border: 1px solid var(--border); border-radius: 1rem; padding: .12rem .5rem; }
.badge.attacked { color: var(--neg); }
.badge.defended { color: var(--aff); }

/* ---- Collapsible sections inside a card (PAGE_UX_SPEC §4) -------------
   RULE ORDER IS LOAD-BEARING. Every rule below sits at specificity (0,3,0) or (0,4,0) and
   they deliberately conflict; document order is what resolves them:
     1. base            - every section body starts hidden
     2. [data-sect-*]   - page defaults from <html>, applied before first paint (no flash)
     3. .nested         - §4.4, a defense inside a card ignores those defaults (depth limit)
     4. .open           - an explicit click / Expand all always wins, nested or not
     5. .closed         - an explicit close / Collapse all wins over everything
   Moving any of these above another silently changes which sections open. */
.sect { margin: .5rem 0; border-top: 1px solid var(--border); padding-top: .35rem; }
.sect-head { display: flex; align-items: baseline; gap: .4rem; margin: 0; cursor: pointer;
             font-size: .68rem; font-weight: 600; text-transform: uppercase;
             letter-spacing: .07em; color: var(--muted); }
.sect-head:hover { color: var(--link); }
.sect-chevron { display: inline-block; transition: transform .12s ease; font-size: .8em; }
.sect.open > .sect-head .sect-chevron { transform: rotate(90deg); }
.sect-label { flex: none; }
.sect-peek { flex: 1 1 auto; min-width: 0; overflow: hidden; text-overflow: ellipsis;
             white-space: nowrap; font-weight: 400; text-transform: none;
             letter-spacing: 0; opacity: .8; }
.sect.open > .sect-head .sect-peek { visibility: hidden; }
.sect-body { display: none; }
.sect-body > p { margin: .15rem 0; }
[data-sect-evidence="open"]  .sect-evidence  > .sect-body,
[data-sect-warrant="open"]   .sect-warrant   > .sect-body,
[data-sect-impact="open"]    .sect-impact    > .sect-body,
[data-sect-defenses="open"]  .sect-defenses  > .sect-body,
[data-sect-judges="open"]    .sect-judges    > .sect-body,
[data-sect-derivation="open"] .sect-derivation > .sect-body { display: block; }
.point-card.nested .sect > .sect-body { display: none; }
.point-card .sect.open > .sect-body { display: block; }
.point-card .sect.closed > .sect-body { display: none; }

.nested-defenses { margin: .5rem 0 .2rem; border-top: 1px dashed var(--border); padding-top: .4rem; }
.nested-defenses .point-card { margin: .35rem 0; background: var(--surface-2); }
.nested-label { font-size: .7rem; color: var(--muted); text-transform: uppercase; letter-spacing: .05em; }

/* No border/padding of their own any more: the .sect primitive inside each one draws the
   rule and the chevron, so the page has a single collapse language (PAGE_UX_SPEC §4.3). */
.judges-strip { margin-top: .6rem; }
.sect-judges > .sect-head .sect-peek { font-family: ui-monospace, monospace; }
.split-flag { color: var(--flag); font-weight: 700; }
.judge-note { font-size: .82rem; margin: .4rem 0; border-left: .15rem solid var(--border); padding-left: .5rem; }
.judge-note .judge-name { font-weight: 700; color: var(--muted); }
.judge-note ul { margin: .2rem 0; padding-left: 1rem; }

/* ---- Derivation drill-down (invariant #2 — no false certainty) ------ */
.drilldown { margin-top: .6rem; }
.drill-intro { font-size: .78rem; color: var(--muted); margin: .35rem 0; }
.drill-loo { font-size: .82rem; color: var(--text); margin: .35rem 0; }
.drill-fragile { color: var(--atk-fallacy); font-weight: 700; }
.drill-table { width: 100%; border-collapse: collapse; font-size: .78rem; margin: .35rem 0; }
.drill-table th, .drill-table td { border: 1px solid var(--border); padding: .2rem .4rem; text-align: center; }
.drill-table th { background: var(--surface-2); color: var(--muted); font-weight: 600; }
.drill-table td:first-child { text-align: left; font-weight: 600; }
.drill-total-row { background: var(--surface-2); font-weight: 700; }

/* ---- RFDs (§8c: rendered markdown, not raw text in a <pre>) ----------- */
.rfd { margin: .4rem 0; }
.rfd > summary { cursor: pointer; font-weight: 600; }
.rfd-body { background: var(--surface-2); padding: .7rem .9rem; border-radius: .4rem; font-size: .85rem; }
.rfd-body h4, .rfd-body h5, .rfd-body h6 { margin: .6rem 0 .3rem; color: var(--muted); }
.rfd-body h4:first-child, .rfd-body h5:first-child, .rfd-body h6:first-child { margin-top: 0; }
.rfd-body p { margin: .4rem 0; }
.rfd-body ul { margin: .3rem 0; padding-left: 1.2rem; }
.rfd-body li { margin: .15rem 0; }
/* A judge's inline reference to a point ID (e.g. AFF-D2, NEG-R6:E1), auto-linked to it. */
.point-ref { font-family: ui-monospace, monospace; font-size: .8rem; }

/* ---- Help page (§8d: "how this debate was built") --------------------- */
.help-page { max-width: 46rem; }
.help-section p, .help-section ul { line-height: 1.6; }
.help-section ul { padding-left: 1.3rem; }
.help-section li { margin: .35rem 0; }
.help-section + .help-section { margin-top: 1.2rem; }

/* ---- Bible popup links (§C9) ------------------------------------------ */
.bible-ref, a.bible-ref { color: var(--cat-scripture); border-bottom: 1px dotted var(--cat-scripture); cursor: pointer; }
.bible-ref:hover { text-decoration: none; opacity: .85; }

/* ---- Tooltips (§C5) ---------------------------------------------------
   With JS on, script.js drives ONE fixed node appended to <body> (`.tip`): no ancestor can
   clip it and it clamps itself inside the viewport, which the ::after version could not do
   at a column or window edge. The ::after rules below stay as the JS-off fallback and are
   disabled by the `js` class script.js sets on <html>. */
.tip {
  position: fixed; z-index: 200; display: none; max-width: 20rem;
  background: var(--tip-bg); color: var(--tip-text); font-size: .78rem; line-height: 1.4;
  font-weight: 400; text-align: left; white-space: pre-wrap;
  padding: .4rem .55rem; border-radius: .4rem; box-shadow: 0 3px 12px rgba(0,0,0,.4);
  pointer-events: none;
}
.tip.on { display: block; }

[data-tip] { position: relative; }
html:not(.js) [data-tip]:hover::after {
  content: attr(data-tip); position: absolute; left: 50%; bottom: 125%; transform: translateX(-50%);
  background: var(--tip-bg); color: var(--tip-text); font-size: .78rem; line-height: 1.4;
  font-weight: 400; text-align: left; white-space: pre-wrap; width: max-content; max-width: 20rem;
  padding: .4rem .55rem; border-radius: .4rem; box-shadow: 0 3px 12px rgba(0,0,0,.4); z-index: 60; pointer-events: none;
}
html:not(.js) [data-tip]:hover::before {
  content: ""; position: absolute; left: 50%; bottom: 125%; transform: translate(-50%, 90%);
  border: .35rem solid transparent; border-top-color: var(--tip-bg); z-index: 60; pointer-events: none;
}

/* ---- Footer ----------------------------------------------------------- */
.page-foot { color: var(--muted); font-size: .85rem; margin: 2rem 0 3rem; text-align: center; }

/* ---- Responsive ------------------------------------------------------- */
@media (max-width: 52rem) {
  .cases { grid-template-columns: 1fr; }
  .score-side { min-width: 4.5rem; }
}
