/* ==========================================================================
   Debate index (homepage) — layered ON TOP of engine/template/style.css.
   That file owns every colour token and all 14 themes; this file adds only
   the index grid. Never declare a literal colour here: use the tokens, or a
   theme will break. rem-only font sizes, same rule as the template.
   ========================================================================== */

/* ---- Banner ----------------------------------------------------------- */
.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);
}
.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;
}

/* ---- Head + filters --------------------------------------------------- */
.index-head h1 { font-size: 2rem; margin: .2rem 0; }
.index-head .lede { color: var(--muted); font-size: 1.05rem; margin: .2rem 0 1rem; }

.filters { display: flex; flex-wrap: wrap; align-items: center; gap: .4rem; margin: 0 0 1rem; }
.filters button {
  font-family: inherit; font-size: .78rem; cursor: pointer; color: var(--text);
  background: var(--surface); border: 1px solid var(--border); border-radius: 1rem;
  padding: .25rem .7rem;
}
.filters button:hover { border-color: var(--link); }
.filters button[aria-pressed="true"] { background: var(--surface-2); border-color: var(--link); font-weight: 700; }
.filters input {
  font-family: inherit; font-size: .82rem; color: var(--text); background: var(--surface);
  border: 1px solid var(--border); border-radius: .4rem; padding: .3rem .6rem; min-width: 12rem;
  margin-left: auto;
}
.filters input:focus { outline: none; border-color: var(--link); }

/* ---- Card grid -------------------------------------------------------- */
.debate-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(24rem, 1fr)); gap: 1rem; }
.debate-card {
  display: flex; flex-direction: column; gap: .5rem;
  background: var(--surface); border: 1px solid var(--border); border-left: .28rem solid var(--border);
  border-radius: .6rem; padding: .9rem 1rem; color: inherit; text-decoration: none;
}
a.debate-card:hover { border-color: var(--link); text-decoration: none; box-shadow: 0 0 0 .12rem var(--glow); }
.debate-card.is-unpublished { opacity: .92; border-left-style: dashed; }
.debate-card.state-active { border-left-color: var(--aff); }
.debate-card.state-archived { border-left-color: var(--muted); }
.debate-card.state-paused { border-left-color: var(--flag); }

.card-top { display: flex; align-items: baseline; gap: .5rem; flex-wrap: wrap; }
.card-topic { font-size: 1.2rem; font-weight: 700; margin: 0; flex: 1 1 12rem; }
.state-chip {
  font-size: .66rem; font-weight: 700; letter-spacing: .06em; text-transform: uppercase;
  border: 1px solid currentColor; border-radius: .9rem; padding: .1rem .5rem; white-space: nowrap;
}
.state-chip.s-active { color: var(--cat-science); }
.state-chip.s-published { color: var(--cat-scholar); }
.state-chip.s-paused { color: var(--flag); }
.state-chip.s-archived { color: var(--muted); }
.round-chip { font-size: .7rem; color: var(--muted); }

.card-res { font-style: italic; font-size: .88rem; margin: 0; color: var(--text);
            border-left: .18rem solid var(--border); padding-left: .55rem; text-align: left; }
.card-desc { font-size: .85rem; color: var(--muted); margin: 0; text-align: left; }

/* ---- Mini score bar --------------------------------------------------- */
.mini-score { display: flex; align-items: center; gap: .5rem; }
.mini-score .ms-num { font-size: .95rem; font-weight: 700; min-width: 2.8rem; text-align: center; }
.mini-score .ms-aff { color: var(--aff); }
.mini-score .ms-neg { color: var(--neg); }
.mini-bar { flex: 1; display: flex; height: .6rem; border-radius: .3rem; overflow: hidden; border: 1px solid var(--border); }
.mini-bar .b-aff { background: var(--aff); }
.mini-bar .b-neg { background: var(--neg); }
.pending { font-size: .82rem; color: var(--muted); font-style: italic; }

/* ---- Deliberation row ------------------------------------------------- */
.delib { display: flex; flex-wrap: wrap; align-items: center; gap: .35rem .6rem; font-size: .8rem; color: var(--muted); }
.delib b { color: var(--text); font-weight: 700; }
.depth-chip {
  font-size: .66rem; font-weight: 700; letter-spacing: .05em; text-transform: uppercase;
  border: 1px solid currentColor; border-radius: .9rem; padding: .1rem .5rem; white-space: nowrap;
  color: var(--flag);
}
.depth-chip.d-met { color: var(--cat-science); }

.card-foot { display: flex; flex-wrap: wrap; gap: .3rem .8rem; font-size: .76rem; color: var(--muted);
             border-top: 1px solid var(--border); padding-top: .45rem; margin-top: auto; }

.empty { color: var(--muted); font-style: italic; padding: 2rem 0; }
/* Filter/search state (index.php's apply()): a hidden card is a class, not an inline style. */
.debate-card.filtered-out { display: none; }
.index-foot { color: var(--muted); font-size: .85rem; margin: 2rem 0 3rem; text-align: center; }

@media (max-width: 52rem) {
  .banner img { max-height: 7rem; object-position: center 70%; }
  .debate-grid { grid-template-columns: 1fr; }
  .filters input { margin-left: 0; width: 100%; }
}

/* Per-point average beside the sum: a bare total rewards volume, so never show it alone
   (engine invariant — see verdict.standing). Absent on debates published before it existed. */
.per-point { font-size: .78rem; color: var(--muted); margin: -.2rem 0 0; text-align: left; }
.per-point b { font-size: .85rem; }

/* ---- Category sections (CATEGORIES_SPEC.md) --------------------------- */
/* Operator feedback 2026-08-20: a chevron alone didn't read as a distinct container. Each
   section now gets its own tinted background + a real accent-colored frame + lift, so it
   reads as a container at a glance, not just a collapsible list item. color-mix() keeps
   this theme-safe (never a literal colour -- every one of the 14 themes tints itself off
   its own --link, so this never needs a per-theme value). */
.cat-section {
  background: color-mix(in srgb, var(--link) 13%, var(--surface));
  border: .12rem solid color-mix(in srgb, var(--link) 42%, var(--border));
  border-radius: .8rem; margin: 0 0 1.1rem; overflow: hidden; scroll-margin-top: 1rem;
  box-shadow: 0 .15rem .55rem color-mix(in srgb, var(--link) 16%, transparent);
}
/* Collapsed must never read as "empty" or go unnoticed: dashed + de-tinted (still visibly
   part of the same family of boxes, just visibly "closed"), plus an explicit "N hidden"
   line rendered right in the header (not just the chevron). */
.cat-section:not([open]) {
  border-style: dashed;
  background: color-mix(in srgb, var(--link) 5%, var(--surface-2));
  box-shadow: none;
}

.cat-head {
  display: flex; flex-wrap: wrap; align-items: center; gap: .5rem .7rem; cursor: pointer;
  list-style: none; padding: .9rem 1.1rem; user-select: none;
}
.cat-head::-webkit-details-marker { display: none; }
.cat-chev {
  flex: none; width: 0; height: 0; margin-top: .2rem;
  border-left: .4rem solid transparent; border-right: .4rem solid transparent;
  border-top: .55rem solid var(--link); transition: transform .15s ease;
}
.cat-section[open] > .cat-head .cat-chev { transform: rotate(180deg); }
/* Same display font as the page's own <h1> (index.php loads Gabriela already; nothing
   extra to fetch here) -- titles are the strongest signal a container carries, so they
   read as headings in their own right, not list-item labels. */
.cat-name {
  font-family: 'Gabriela', serif; font-size: 1.7rem; font-weight: 700;
  letter-spacing: .01em; color: var(--text);
}
.cat-count { font-size: .8rem; color: var(--muted); white-space: nowrap; margin-left: auto; }
.cat-action {
  font-size: .74rem; font-weight: 700; letter-spacing: .04em; text-transform: uppercase;
  color: var(--link); white-space: nowrap;
}
.cat-action-open, .cat-action-closed { display: none; }
.cat-section[open] > .cat-head .cat-action-open { display: inline; }
.cat-section:not([open]) > .cat-head .cat-action-closed { display: inline; }
.cat-hidden-line { display: none; flex-basis: 100%; font-size: .8rem; color: var(--muted); }
.cat-section:not([open]) > .cat-head .cat-hidden-line { display: block; }

.cat-blurb { color: var(--muted); font-size: .85rem; margin: -.3rem 1.1rem .8rem; text-align: left; }
/* A container containing containers: the body sits in its own inset panel, closer to --bg
   than the bold outer frame, so the individual debate cards read as boxes nested one level
   further inside the category's box -- not just a flat list under a coloured header. */
.cat-body {
  background: color-mix(in srgb, var(--bg) 55%, var(--surface));
  margin: 0 .7rem .7rem; padding: 1rem .9rem; border-radius: .55rem;
  border: 1px solid color-mix(in srgb, var(--link) 12%, var(--border));
}
.cat-body .debate-grid { margin: 0 0 1rem; }
.cat-body .debate-grid:last-child { margin-bottom: 0; }
/* Operator feedback 2026-08-20: inside a category, every card was the same flat --surface,
   so a run of debates read as one undifferentiated block. Zebra-tint every other card, just
   off --link like the section framing above -- close enough to --surface to stay calm, far
   enough to separate one card from its neighbour at a glance. Scoped to .cat-body so the
   cards outside any category (there are none left, but belt-and-suspenders) stay plain. */
.cat-body .debate-card:nth-child(even) {
  background: color-mix(in srgb, var(--link) 7%, var(--surface));
}
.subcat-head {
  font-size: .92rem; font-weight: 700; color: var(--muted); text-transform: uppercase;
  letter-spacing: .03em; margin: 0 0 .5rem; scroll-margin-top: 1rem;
}

/* ---- Sponsor call-to-action (2026-09-20) ------------------------------
   One block, token-only like everything else here. Reads as an invitation, not an ad:
   surface card, the affirmative accent on the left, the whole thing one link. */
.sponsor-cta {
  display: flex; align-items: center; gap: .9rem;
  background: var(--surface); border: 1px solid var(--border); border-left: .28rem solid var(--aff);
  border-radius: .6rem; padding: .8rem 1rem; margin: 0 0 1.25rem;
  color: inherit; text-decoration: none;
}
.sponsor-cta:hover { border-color: var(--link); text-decoration: none; box-shadow: 0 0 0 .12rem var(--glow); }
.sponsor-cta-heart { font-size: 1.6rem; line-height: 1; flex: 0 0 auto; }
.sponsor-cta-text { display: flex; flex-direction: column; gap: .15rem; flex: 1 1 auto; text-align: left; }
.sponsor-cta-text strong { font-size: 1.1rem; }
.sponsor-cta-text span { color: var(--muted); font-size: .95rem; }
.sponsor-cta-go { font-size: 1.4rem; color: var(--link); flex: 0 0 auto; }
@media (max-width: 40rem) { .sponsor-cta-go { display: none; } }

/* ---- Denominational Score Card (denominations.json) --------------------
   Deliberately NOT another .cat-section. Those are tinted, rounded, --link-accented
   cards; this is a brass ledger -- square corners, an inset double rule, an uppercase
   display title -- so it reads as a different KIND of thing at a glance rather than as
   one more category. Accent is --cat-history, which every theme already defines (the
   light themes redefine it at style.css:102), so this needs no per-theme value.

   The one rule that matters visually: a bar is FILLED only where the judging panel found
   the surviving record established something. Hollow means a side led on points without
   anchoring an argument that survived attack. Fill-vs-outline carries that meaning, not
   hue, so it still reads with the colour removed. */
.scorecard {
  background: linear-gradient(color-mix(in srgb, var(--cat-history) 7%, var(--surface)),
                              color-mix(in srgb, var(--cat-history) 3%, var(--surface)));
  border: .1rem solid color-mix(in srgb, var(--cat-history) 50%, var(--border));
  border-radius: .3rem; margin: 0 0 1.25rem; overflow: hidden; scroll-margin-top: 1rem;
  box-shadow: inset 0 0 0 .22rem var(--bg),
              inset 0 0 0 .32rem color-mix(in srgb, var(--cat-history) 28%, var(--border));
}
.scorecard:not([open]) { border-style: double; border-width: .22rem; }
.sc-head {
  display: flex; flex-wrap: wrap; align-items: baseline; gap: .5rem .8rem;
  list-style: none; cursor: pointer; padding: 1rem 1.3rem; user-select: none;
}
.sc-head::-webkit-details-marker { display: none; }
.sc-title {
  font-family: 'Gabriela', serif; font-size: 1.55rem; letter-spacing: .06em;
  text-transform: uppercase; color: color-mix(in srgb, var(--cat-history) 62%, var(--text));
}
.sc-rule { flex: 1 1 4rem; height: .1rem; background: color-mix(in srgb, var(--cat-history) 45%, transparent); }
.sc-cta { font-size: .72rem; font-weight: 700; letter-spacing: .1em; text-transform: uppercase;
          color: var(--cat-history); white-space: nowrap; }
.scorecard[open] .sc-cta-closed, .scorecard:not([open]) .sc-cta-open { display: none; }
.sc-tag { flex-basis: 100%; font-size: .84rem; color: var(--muted); }
.sc-tag b { color: var(--text); }

.sc-body { padding: 0 0 1rem; }
.sc-lede { font-size: .84rem; color: var(--muted); margin: 0 1.3rem .7rem; text-align: left; }
.sc-lede b { color: var(--text); }
.sc-key { display: flex; flex-wrap: wrap; gap: .3rem .9rem; font-size: .7rem; color: var(--muted);
          margin: 0 1.3rem .6rem; }
.sc-key span { display: inline-flex; align-items: center; gap: .3rem; }
.sc-key i { display: inline-block; width: .7rem; height: .7rem; flex: none; }
.sc-key .k-for     { background: var(--cat-history); }
.sc-key .k-against { background: var(--muted); }
.sc-key .k-open    { border: .1rem dashed var(--cat-history); }
.sc-key .k-nothing { border: .1rem dotted var(--muted); }
.sc-key .k-none    { border: .1rem solid var(--border); }
.sc-key .k-empty   { height: .12rem; background: repeating-linear-gradient(90deg, var(--muted) 0 .12rem, transparent .12rem .3rem); }
.sc-key .k-ghost   { height: 0; border-top: .1rem dashed color-mix(in srgb, var(--flag) 80%, var(--text)); }
.sc-key .k-q       { background: repeating-linear-gradient(45deg, var(--cat-history) 0 .12rem, transparent .12rem .26rem); }
/* Matches what .sc-bar.is-thin::before actually paints: brass under a --bg scrim. */
.sc-key .k-thin    { background: color-mix(in srgb, var(--cat-history) 42%, var(--bg));
                     border-top: .14rem dotted var(--text); }

/* Flex rows rather than a CSS table, for one reason: the detail panel has to open directly
   under the row whose bar was clicked. With 25 rows the grid is ~4,000px tall, so a single
   panel at the foot of the card would open a whole screen-height away from the bar. A CSS
   table cannot carry a full-width cell (there is no colspan in CSS), and a flex column can.
   Fixed cell widths keep every column aligned exactly as the table did. */
.sc-scroll { overflow-x: auto; padding: .2rem 0 .4rem; }
.sc-grid { display: flex; flex-direction: column; min-width: min-content; }
.sc-row { display: flex; align-items: flex-end; }
/* Zebra comes from a server-set class, not :nth-child -- a detail row inserted mid-grid
   would otherwise reshuffle every stripe below it. */
.sc-row.is-alt .sc-cell { background: color-mix(in srgb, var(--cat-history) 4%, transparent); }
.sc-name {
  position: sticky; left: 0; z-index: 2; width: 11rem; min-width: 11rem; flex: none;
  padding: .5rem .7rem .5rem 1.3rem; align-self: stretch;
  display: flex; flex-direction: column; justify-content: flex-end;
  background: linear-gradient(to right, var(--surface) 84%, transparent);
  border-right: .1rem solid color-mix(in srgb, var(--cat-history) 30%, var(--border));
}
.sc-name b { display: block; font-family: 'Gabriela', serif; font-size: .98rem; line-height: 1.15; }
.sc-name i { display: block; font-style: normal; font-size: .64rem; text-transform: uppercase;
             letter-spacing: .07em; color: var(--muted); margin-top: .15rem; }
.sc-name em { display: block; font-style: normal; font-size: .68rem; color: var(--muted); margin-top: .3rem; }
.sc-name em b { display: inline; font-family: inherit; font-size: .72rem; color: var(--cat-history); }

.sc-cell { width: 3.1rem; min-width: 3.1rem; flex: none; padding: 1.1rem .12rem .1rem; text-align: center; }
.sc-track { position: relative; height: 4.6rem; display: flex; align-items: flex-end; justify-content: center; }
.sc-mid { position: absolute; left: 0; right: 0; bottom: 50%; height: 0;
          border-top: 1px dashed color-mix(in srgb, var(--text) 30%, transparent); }
.sc-noslot { width: 1.55rem; height: .12rem; opacity: .6;
             background: repeating-linear-gradient(90deg, var(--muted) 0 .12rem, transparent .12rem .3rem); }

.sc-bar {
  all: unset; box-sizing: border-box; cursor: pointer; display: block; position: relative;
  width: 1.55rem; min-height: .12rem; border-radius: .16rem .16rem 0 0;
}
.sc-bar:focus-visible { outline: .12rem solid var(--link); outline-offset: .12rem; }
.sc-bar:hover { filter: brightness(1.18); }
/* Established, and it is this tradition's side. */
.sc-bar.v-for {
  background: linear-gradient(to top, color-mix(in srgb, var(--cat-history) 88%, var(--bg)), var(--cat-history));
}
/* Established, and it is the other side: still solid (something WAS settled), but plainly
   not the tradition's, and hatched so the difference survives without colour. */
.sc-bar.v-against {
  background: repeating-linear-gradient(45deg,
    color-mix(in srgb, var(--muted) 75%, var(--bg)) 0 .2rem, transparent .2rem .4rem),
    color-mix(in srgb, var(--muted) 35%, transparent);
  border: 1px solid color-mix(in srgb, var(--muted) 70%, var(--border));
}
/* Nothing established -- hollow, whatever the height says. Hollow still has to read as a
   BAR: outline plus the faintest wash, or a dotted 1px edge disappears at this size and the
   column looks blank, which is a different (and wrong) claim than "nothing was settled". */
.sc-bar.v-open {
  border: .12rem dashed var(--cat-history);
  background: color-mix(in srgb, var(--cat-history) 12%, transparent);
}
.sc-bar.v-nothing {
  border: .12rem dotted color-mix(in srgb, var(--muted) 85%, var(--text));
  background: color-mix(in srgb, var(--muted) 12%, transparent);
}
.sc-bar.v-none {
  border: .12rem solid color-mix(in srgb, var(--muted) 55%, var(--border));
  background: color-mix(in srgb, var(--muted) 6%, transparent);
}
.sc-bar.is-open   { box-shadow: 0 0 0 .14rem var(--glow); }
/* A finding whose losing side barely turned up (see SC_WALKOVER_RATIO in index.php). The
   bar keeps its fill, because the engine really did find something established -- but it is
   drawn back and capped with a dotted edge so it cannot sit on the page looking as firm as
   a finding that survived a real contest. Applied only to solid bars: a hollow one already
   says nothing was established.

   A scrim overlay rather than `opacity`, deliberately: opacity dims the whole element
   including its own dotted cap, and the cap is the part that has to stay crisp. One
   pseudo-element both washes the fill back and draws the cap. */
.sc-bar.is-thin::before {
  content: ""; position: absolute; inset: 0; border-radius: inherit;
  background: color-mix(in srgb, var(--bg) 58%, transparent);
  border-top: .14rem dotted var(--text);
}
/* A qualified stance -- the body holds this side with a caveat the citation spells out. */
.sc-bar.is-q::after {
  content: ""; position: absolute; inset: 0 0 auto 0; height: .42rem;
  background: repeating-linear-gradient(45deg, var(--bg) 0 .12rem, transparent .12rem .26rem);
  opacity: .85;
}
.sc-warn { position: absolute; top: -1.05rem; left: 50%; transform: translateX(-50%);
           font-size: .62rem; line-height: 1; color: var(--flag); }
/* Where the per-point average would put this bar -- shown only where the two readings
   actually disagree, so it stays a signal rather than decoration. */
.sc-ghost { position: absolute; left: -.1rem; right: -.1rem; height: 0; pointer-events: none;
            border-top: .1rem dashed color-mix(in srgb, var(--flag) 80%, var(--text)); }

.sc-pct { font-size: .6rem; color: var(--muted); line-height: 1.5; }
.sc-word { font-size: .6rem; line-height: 1.1; color: var(--muted); height: 2.1rem; overflow: hidden;
           padding-top: .18rem;
           border-top: 1px solid color-mix(in srgb, var(--cat-history) 22%, var(--border)); }
.sc-cell:has(.sc-bar.is-open) .sc-word { color: var(--text); font-weight: 700; }

.sc-foot { font-size: .76rem; color: var(--muted); margin: .8rem 1.3rem 0; text-align: left; }
.sc-foot b { color: var(--text); }

/* ---- Score card: the panel that opens when a bar is clicked ------------ */
/* Inserted as a row inside the horizontally scrolling grid, so it sits directly under its
   own denomination. `sticky left:0` pins it to the left edge of the scroll viewport instead
   of letting it slide away with the columns. */
.sc-detail-row {
  position: sticky; left: 0; z-index: 3; width: 58rem; max-width: 92vw; flex: none;
}
.sc-detail {
  background: color-mix(in srgb, var(--bg) 62%, var(--surface));
  border: 1px solid var(--border); border-left: .25rem solid var(--cat-history);
  border-radius: .5rem; padding: .9rem 1rem; margin: .7rem 1.3rem 0; font-size: .85rem;
}
.sc-detail h4 { margin: 0 0 .2rem; font-size: 1.05rem; font-family: 'Gabriela', serif; }
.sc-res { font-style: italic; font-size: .84rem; color: var(--text); margin: .1rem 0 .7rem;
          padding-left: .6rem; border-left: .15rem solid var(--border); text-align: left; }
/* What the record ESTABLISHED sits above the score, because it is the only part of this
   panel that is a finding about the resolution rather than about the debating. */
.sc-finding { display: flex; flex-wrap: wrap; align-items: baseline; gap: .4rem .6rem;
              border-radius: .4rem; padding: .5rem .65rem; margin: 0 0 .7rem;
              border: 1px solid var(--border); background: color-mix(in srgb, var(--bg) 40%, transparent); }
.sc-vchip { font-size: .66rem; font-weight: 700; letter-spacing: .07em; text-transform: uppercase;
            border: 1px solid currentColor; border-radius: .9rem; padding: .08rem .55rem; white-space: nowrap; }
.sc-finding.is-for     { border-color: color-mix(in srgb, var(--cat-history) 55%, var(--border)); }
.sc-finding.is-for     .sc-vchip { color: var(--cat-history); }
.sc-finding.is-against .sc-vchip { color: var(--muted); }
.sc-finding.is-open    .sc-vchip, .sc-finding.is-nothing .sc-vchip { color: var(--flag); }
.sc-finding.is-none    .sc-vchip { color: var(--muted); }
.sc-why { flex: 1 1 14rem; font-size: .78rem; color: var(--muted); }
/* Sits inside the finding box, under the verdict chip: the qualification belongs with the
   claim it qualifies, not in a footnote below the scores. */
.sc-thin-warn {
  flex-basis: 100%; font-size: .78rem; color: var(--muted);
  border-top: 1px dashed color-mix(in srgb, var(--flag) 40%, var(--border));
  padding-top: .4rem; margin-top: .1rem;
}
.sc-thin-warn b { color: var(--flag); }

.sc-stance { display: flex; flex-wrap: wrap; align-items: baseline; gap: .4rem; margin: 0 0 .3rem; }
.sc-side { font-size: .66rem; font-weight: 700; letter-spacing: .07em; text-transform: uppercase;
           border: 1px solid currentColor; border-radius: .9rem; padding: .08rem .55rem; white-space: nowrap; }
.sc-side.is-aff { color: var(--aff); }
.sc-side.is-neg { color: var(--neg); }
.sc-qchip { font-size: .64rem; font-weight: 700; letter-spacing: .06em; text-transform: uppercase;
            color: var(--flag); border: 1px solid currentColor; border-radius: .9rem; padding: .08rem .5rem; }
.sc-detail .sc-note { margin: .1rem 0 .3rem; color: var(--text); text-align: left; }
.sc-cite { margin: 0 0 .7rem; font-size: .74rem; color: var(--muted); text-align: left; }
.sc-cite b { color: var(--text); font-weight: 400; }
.sc-scores { display: flex; flex-wrap: wrap; gap: .4rem .8rem; align-items: center; margin: 0 0 .3rem; }
.sc-scores .num { font-weight: 700; }
.sc-scores .is-aff { color: var(--aff); }
.sc-scores .is-neg { color: var(--neg); }
.sc-split { flex: 1 1 8rem; display: flex; height: .55rem; border-radius: .3rem; overflow: hidden;
            border: 1px solid var(--border); }
.sc-split i { display: block; }
.sc-split .a { background: var(--aff); }
.sc-split .n { background: var(--neg); }
.sc-detail .sc-sub { font-size: .76rem; color: var(--muted); margin: 0 0 .6rem; text-align: left; }
.sc-detail .sc-sub b { color: var(--text); }
.sc-flag { background: color-mix(in srgb, var(--flag) 12%, transparent);
           border: 1px solid color-mix(in srgb, var(--flag) 45%, var(--border));
           border-radius: .35rem; padding: .45rem .6rem; margin: 0 0 .6rem;
           font-size: .78rem; text-align: left; }
.sc-flag b { color: var(--flag); }
.sc-meta { display: flex; flex-wrap: wrap; gap: .3rem .8rem; font-size: .74rem; color: var(--muted);
           border-top: 1px solid var(--border); padding-top: .45rem; }
.sc-chip { font-size: .64rem; font-weight: 700; letter-spacing: .05em; text-transform: uppercase;
           border: 1px solid currentColor; border-radius: .9rem; padding: .05rem .45rem; color: var(--flag); }
.sc-chip.ok { color: var(--cat-science); }
.sc-go { display: inline-block; margin-top: .5rem; font-weight: 700; font-size: .85rem; }

/* ---- Score card: the rich hover tip ------------------------------------
   Separate from the sitewide [data-tip] tooltip in engine/template/script.js ON PURPOSE.
   That one sets .textContent so a tip can never inject markup, and it is right to keep
   that guarantee; this one needs real structure -- colour, icons, a rule, several rows --
   so it gets its own node and escapes every value it interpolates itself.

   Every colour here is mixed TOWARDS --tip-text rather than used raw. The accent tokens
   (--aff, --neg, --flag...) are chosen for contrast against --bg, and on the seven light
   themes --bg is light while --tip-bg stays dark -- so a raw accent would be a dark colour
   on a dark tip. Mixing toward the tip's own foreground keeps every one legible in all 14. */
.sc-tip {
  position: fixed; z-index: 90; top: 0; left: 0; width: max-content; max-width: min(27rem, 92vw);
  background: var(--tip-bg); color: var(--tip-text);
  border: 1px solid color-mix(in srgb, var(--cat-history) 45%, var(--border));
  border-radius: .55rem; padding: .7rem .85rem;
  box-shadow: 0 .5rem 1.5rem rgba(0, 0, 0, .5);
  font-size: .8rem; line-height: 1.5; text-align: left;
  pointer-events: none;            /* never let the tip eat the click it is inviting */
  opacity: 0; visibility: hidden; transform: translateY(.25rem);
  transition: opacity .12s ease, transform .12s ease, visibility .12s;
}
.sc-tip.on { opacity: 1; visibility: visible; transform: none; }
.sc-tip .sct-title {
  font-family: 'Gabriela', serif; font-size: .95rem; line-height: 1.25;
  margin: 0 0 .15rem; color: var(--tip-text);
}
.sc-tip .sct-res { font-style: italic; font-size: .74rem; margin: 0 0 .45rem;
               color: color-mix(in srgb, var(--tip-text) 58%, transparent); }
.sc-tip .sct-row { display: flex; gap: .45rem; align-items: flex-start; margin: .22rem 0; }
.sc-tip .sct-row .sct-ico { flex: none; width: 1.15rem; text-align: center; }
.sc-tip .sct-row .sct-txt { flex: 1 1 auto; }
.sc-tip .sct-hr { height: 1px; margin: .5rem 0 .45rem;
              background: color-mix(in srgb, var(--tip-text) 20%, transparent); }
.sc-tip .sct-dim { color: color-mix(in srgb, var(--tip-text) 60%, transparent); }
.sc-tip b { color: var(--tip-text); font-weight: 700; }
.sc-tip .sct-aff { color: color-mix(in srgb, var(--aff) 65%, var(--tip-text)); font-weight: 700; }
.sc-tip .sct-neg { color: color-mix(in srgb, var(--neg) 65%, var(--tip-text)); font-weight: 700; }
.sc-tip .sct-k-for     { color: color-mix(in srgb, var(--cat-science) 60%, var(--tip-text)); font-weight: 700; }
.sc-tip .sct-k-against { color: color-mix(in srgb, var(--neg) 60%, var(--tip-text)); font-weight: 700; }
.sc-tip .sct-k-open,
.sc-tip .sct-k-nothing { color: color-mix(in srgb, var(--flag) 62%, var(--tip-text)); font-weight: 700; }
.sc-tip .sct-k-none    { color: color-mix(in srgb, var(--tip-text) 62%, transparent); font-weight: 700; }
.sc-tip .sct-warn      { color: color-mix(in srgb, var(--flag) 62%, var(--tip-text)); }
.sc-tip .sct-cta {
  margin-top: .5rem; padding-top: .45rem; font-weight: 700;
  border-top: 1px dashed color-mix(in srgb, var(--tip-text) 22%, transparent);
  color: color-mix(in srgb, var(--link) 55%, var(--tip-text));
}
/* A hover tip is meaningless on a touch device -- the first tap would open the panel
   anyway, which is the better answer there. */
@media (hover: none) { .sc-tip { display: none; } }

@media (max-width: 52rem) {
  .sc-name { width: 8.5rem; min-width: 8.5rem; padding-left: .7rem; }
  .sc-lede, .sc-key, .sc-foot { margin-left: .8rem; margin-right: .8rem; }
  .sc-detail { margin-left: .8rem; margin-right: .8rem; }
  .sc-title { font-size: 1.25rem; }
}
