/* Head to head (23 Sep 2026). Loaded after the Sheet layer.
   One visual vocabulary for every challenge reveal, canvas and keen1 alike:
   your mark solid in your pen, the answer dashed in the truth colour, the
   challenger dashed in the rival lavender-slate — never coral, never the blue
   board furniture. A compact key under the score names each once. */

/* ---------- tokens ---------- */
:root,:root[data-theme="dark"],:root[data-theme="dark"][data-palette]{--rival:#B7A8E6;--rival-wash:rgba(183,168,230,.16);--ghost:var(--rival)}
:root[data-theme="light"],:root[data-theme="light"][data-palette]{--rival:#5D4C9C;--rival-wash:rgba(93,76,156,.12);--ghost:var(--rival)}
@media (prefers-color-scheme:dark){:root:not([data-theme="light"]){--rival:#B7A8E6;--ghost:var(--rival)}}
@media (prefers-color-scheme:light){:root:not([data-theme]){--rival:#5D4C9C;--ghost:var(--rival)}}

/* ---------- keen1 stages: the friend's mark, dashed, in the rival colour ---------- */
.k-ghost{stroke:var(--rival)}
.k-ghost:not(.k-thin){stroke-width:2.2px}
.k-ghost{stroke-dasharray:7 5}
.k-ghost-fill{fill:var(--rival)}
.k-text--ghost{fill:var(--rival)}

/* ---------- the reveal's key and verdict ---------- */
#controls:has(.duel-shot) .shot-population{display:none}
.duel-shot{display:flex;flex-wrap:wrap;align-items:center;gap:4px 12px;width:100%;margin:0;padding:8px 2px 0;border-top:1px solid var(--es-line,var(--craft-border));font:400 .84rem/1.3 var(--card-label,inherit);color:var(--es-ink-2,var(--ink-2))}
.duel-key{display:flex;flex-wrap:wrap;align-items:center;gap:2px 14px;margin:0;padding:0;list-style:none;min-width:0}
.duel-key li{display:inline-flex;align-items:center;gap:6px;white-space:nowrap;min-width:0}
.duel-key li i{flex:none;display:block;width:18px;height:3px;border-radius:2px}
.duel-key .is-you i{background:var(--pencil)}
.duel-key .is-truth i{background:repeating-linear-gradient(90deg,var(--truth) 0 5px,transparent 5px 8px)}
.duel-key .is-rival{color:var(--es-ink,var(--ink))}
.duel-key .is-rival i{background:repeating-linear-gradient(90deg,var(--rival) 0 6px,transparent 6px 10px);transition:opacity .2s}
.duel-key .is-rival bdi{overflow:hidden;text-overflow:ellipsis;max-width:9em}
.duel-key .is-rival b{font-weight:700;font-variant-numeric:tabular-nums}
.duel-key .is-rival[data-state="pending"] i{opacity:.4}
.duel-key .is-rival[data-state="missing"] i{opacity:.25}
.duel-verdict{flex-basis:100%;font-weight:700;color:var(--es-ink,var(--ink))}
.duel-verdict[data-delta="1"]::before,.duel-verdict[data-delta="-1"]::before{content:"";display:inline-block;width:6px;height:6px;margin:0 7px 1px 1px;border-radius:50%;vertical-align:middle;background:var(--good)}
.duel-verdict[data-delta="-1"]::before{background:var(--rival)}
.duel-missing{flex-basis:100%;font-size:.78rem;color:var(--es-ink-3,var(--ink-3))}
.duel-missing[hidden]{display:none}

/* ---------- the head-to-head card ---------- */
.challenge-standings li.is-owner .hd::before{background:var(--rival)}
#duel .challenge-next .challenge-practice{justify-self:center;width:auto;min-height:44px;font-size:.95rem}

/* ---------- the card's two states (24 Sep) ----------
   New: the card leads the sheet, with a dismiss in its corner and one reserved
   line under the verdict that the settle fills in place. Acted on: one quiet
   line under the sheet. Empty slots take no room in the results grid. */
#results>#duel:empty,#results>#duel-strip:empty{display:none}
:root[data-theme] #duel .challenge-table{position:relative}
:root[data-theme] #duel .challenge-kicker{padding-right:44px}
:root[data-theme] #duel .challenge-dismiss{position:absolute;top:6px;right:6px;display:grid;place-items:center;width:44px;height:44px;margin:0;padding:0;border:0;border-radius:50%;background:transparent;box-shadow:none;color:var(--es-ink-2);font:400 26px/1 var(--card-label,inherit);cursor:pointer}
:root[data-theme] #duel .challenge-dismiss:hover,:root[data-theme] #duel .challenge-dismiss:focus-visible{background:var(--band-none);color:var(--es-ink)}
:root[data-theme] #duel .challenge-record{margin:-6px 0 0;min-height:1.4em;overflow:hidden;white-space:nowrap;text-overflow:ellipsis;font:400 .92rem/1.4 var(--card-label,inherit);color:var(--es-ink-2)}
.challenge-strip{display:flex;align-items:baseline;gap:8px;min-height:48px;margin:0;padding:13px 16px;border:1px solid var(--es-line);border-radius:14px;background:var(--es-surface);font:400 .95rem/1.35 var(--card-label,inherit);color:var(--es-ink-2);outline-offset:2px}
.challenge-strip b{color:var(--es-ink);font-weight:700}
.challenge-strip-mark{flex:none;align-self:center;width:8px;height:8px;border-radius:50%;background:var(--rival)}
