/* Stake verifier (template-stake-verifier.php, assets/fair/verifier.js). Site tokens only, so the season layer applies by
   itself. The result is the page's one bright thing (mines and gems, the Plinko path, cards, roulette pocket); the form
   and the step trail around it stay quiet. The trail's signature: the 4-byte groups of the hash, numbered like the floats
   they become. */
.sv-defs { position: absolute; width: 0; height: 0; overflow: hidden; }

.sv, .sv-range { --sv-gold: var(--fig-gold, #e4ae39); }
.sv { display: grid; gap: 16px; margin-top: 24px; padding: 16px; border: 1px solid var(--line); border-radius: var(--r-3); background: var(--s1); }
/* Grid children size to their content by default: the steps' tables and hashes pushed the page past a phone's edge */
.sv > *, .sv-range > * { min-width: 0; }
.sv__games { margin: 0; padding: 0; border: 0; }
.sv .filters { margin: 0 -16px; padding: 4px 16px; }
.sv-chip { position: relative; flex: none; display: inline-flex; }
.sv-chip input { position: absolute; inset: 0; z-index: 1; margin: 0; opacity: 0; cursor: pointer; }
.sv-chip span { display: inline-flex; align-items: center; height: 40px; padding: 0 12px; border: 1px solid var(--line-2); border-radius: var(--r-2); color: var(--text-2); font: 400 14px/1 var(--font-ui); white-space: nowrap; transition: color var(--t), border-color var(--t), background-color var(--t); }
.sv-chip input:checked + span { border-color: var(--text-3); background: var(--s3); color: var(--text); font-weight: 600; }
.sv-chip input:focus-visible + span { outline: 2px solid var(--focus); outline-offset: 2px; }
@media (hover: hover) { .sv-chip:hover span { border-color: var(--text-3); color: var(--text); } }

.sv__body { display: grid; gap: 20px; }
.sv__inputs { display: grid; gap: 16px; align-content: start; min-width: 0; }
.sv .calc__field, .sv .calc__input, .sv-range .calc__field, .sv-range .calc__input { min-width: 0; }
.sv .calc__input input, .sv-range .calc__input input, .sv-select select { width: 0; }
/* Seeds and hashes are hex: a monospace face keeps them readable, and the 64 characters wrap instead of hiding */
.sv-f--client input { font: 400 14px/1 var(--font-code); }
.sv textarea { flex: 1; width: 0; min-height: 0; padding: 11px 12px; border: 0; background: transparent; color: var(--text); font: 400 14px/1.45 var(--font-code); word-break: break-all; resize: none; field-sizing: content; }
.sv textarea:focus { outline: none; }
@media (min-width: 1100px) { .sv textarea { font-size: 13px; } } /* a 64-character seed in two even lines, not 63 and 1 (6 Nov 2026) */
.sv-row { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 168px); gap: 12px; }
.sv-nonce input { text-align: center; }
.sv-step { flex: none; display: grid; place-items: center; width: 44px; height: 44px; padding: 0; border: 0; background: transparent; color: var(--text-2); cursor: pointer; }
.sv-step .icon { width: 16px; height: 16px; }
.sv-step:focus-visible { outline: 2px solid var(--focus); outline-offset: -4px; border-radius: var(--r-1); }
@media (hover: hover) { .sv-step:hover { color: var(--text); } }
.sv-opts { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 12px; }
.sv-opts:not(:has(.sv-o:not([hidden]))) { display: none; }
.sv-o--wheel + .sv-o--wheel, .sv-o--cards { grid-column: 1 / -1; }
.sv[data-game="wheel"] .sv-o--wheel:first-child { grid-column: auto; }
.sv-o[hidden] { display: none; }
.sv-select select { flex: 1; height: 44px; padding: 0 12px; border: 0; background: transparent; color: var(--text); font: 400 16px/1 var(--font-ui); cursor: pointer; }
.sv-select select:focus { outline: none; }
.sv-select option { background: var(--s1); color: var(--text); }

/* The result */
.sv__out { display: grid; gap: 16px; align-content: start; min-width: 0; padding: 16px; border-radius: var(--r-2); background: var(--s2); }
.sv-check { display: flex; align-items: flex-start; gap: 8px; margin: 0; color: var(--text-2); font-size: 14px; line-height: 1.45; }
.sv-check .icon { flex: none; width: 18px; height: 18px; margin-top: 1px; }
.sv-check.is-ok { color: var(--ok); }
.sv-check.is-bad { color: var(--bad); }
.sv-check.is-bad span, .sv-check.is-ok span { font-weight: 600; }
.sv-stage { display: grid; place-items: center; min-height: 128px; }
.sv-say { margin: 0; color: var(--text); font-size: 15px; line-height: 1.5; }
.sv-say b { font-weight: 600; font-variant-numeric: tabular-nums; }
.sv-acts { display: flex; flex-wrap: wrap; gap: 8px; }
.sv-acts .chip { height: 40px; cursor: pointer; }
.sv-acts .chip:not([hidden]) + .chip:not([hidden]) { margin-left: 0; }
.sv.is-busy .sv-stage, .sv.is-busy .sv-say { opacity: .55; transition: opacity var(--t); }
.sv-empty { margin: 0; color: var(--text-3); font-size: 14px; text-align: center; }

/* Mines: 5 × 5, the pick order on each mine */
.sv-mines { display: grid; grid-template-columns: repeat(5, minmax(0, 1fr)); gap: 8px; width: min(100%, 300px); }
.sv-tile { position: relative; display: grid; place-items: center; aspect-ratio: 1; border-radius: var(--r-1); background: var(--s3); color: color-mix(in oklab, var(--ok) 70%, var(--s3)); box-shadow: inset 0 -3px 0 rgba(0, 0, 0, .28); }
.sv-tile .sv-ico { width: 46%; height: 46%; }
.sv-tile.is-mine { background: color-mix(in oklab, var(--bad) 26%, var(--s2)); color: var(--bad); box-shadow: inset 0 0 0 1px color-mix(in oklab, var(--bad) 45%, transparent), inset 0 -3px 0 rgba(0, 0, 0, .28); }
.sv-tile i { position: absolute; top: 4px; left: 6px; color: var(--text-2); font: 600 12px/1 var(--font-code); font-style: normal; }

/* Dice: the roll on a 0–100 track */
.sv-dice { display: grid; gap: 12px; width: 100%; }
.sv-big { margin: 0; color: var(--heading); font: 600 clamp(44px, 4vw + 28px, 64px)/1 var(--font-ui); font-stretch: var(--head-stretch, 100%); font-variant-numeric: tabular-nums; text-align: center; overflow-wrap: anywhere; }
.sv-track { position: relative; height: 10px; margin: 0 8px; border-radius: 5px; background: var(--s3); }
.sv-track b { position: absolute; top: 50%; width: 20px; height: 20px; margin: -10px 0 0 -10px; border: 3px solid var(--s2); border-radius: 50%; background: var(--sv-gold); }
.sv-ticks { display: flex; justify-content: space-between; margin: 0; color: var(--text-3); font: 400 12px/1 var(--font-code); }

/* Limbo, Wheel: a multiplier */
.sv-multi { display: grid; gap: 12px; justify-items: center; width: 100%; }
.sv-multi .sv-big { color: var(--sv-gold); }
.sv-multi.is-zero .sv-big { color: var(--text-3); }
.sv-strip { display: grid; grid-auto-flow: column; grid-auto-columns: minmax(0, 1fr); gap: 2px; width: 100%; }
.sv-strip i { height: 24px; border-radius: 4px; background: var(--s3); }
.sv-strip i.is-pay { background: color-mix(in oklab, var(--text) 32%, var(--s3)); }
.sv-strip i.is-hit { background: var(--sv-gold); box-shadow: 0 0 0 2px var(--s2), 0 0 0 4px var(--sv-gold); }

/* Plinko: the pegs, the ball's path and the slots */
.sv-plinko { width: 100%; }
.sv-plinko svg { display: block; width: 100%; height: auto; }
.sv-plinko .peg { fill: var(--text-3); }
.sv-plinko .path { fill: none; stroke: var(--sv-gold); stroke-width: 2.5; stroke-linecap: round; stroke-linejoin: round; }
.sv-plinko .ball { fill: var(--sv-gold); stroke: var(--s2); stroke-width: 2; }
.sv-plinko .slot { fill: var(--s3); }
.sv-plinko .slot.is-hit { fill: var(--sv-gold); }
.sv-plinko text { fill: var(--text-3); font: 400 12px var(--font-code); text-anchor: middle; }
.sv-plinko text.is-hit { fill: var(--on-accent); font-weight: 600; }

/* Keno: 40 numbers, 8 to a row */
.sv-keno { display: grid; grid-template-columns: repeat(8, minmax(0, 1fr)); gap: 4px; width: min(100%, 360px); }
.sv-keno span { display: grid; place-items: center; aspect-ratio: 1; border-radius: var(--r-1); background: var(--s3); color: var(--text-3); font: 400 13px/1 var(--font-ui); font-variant-numeric: tabular-nums; }
.sv-keno span.is-hit { background: var(--sv-gold); color: #1d1607; font-weight: 600; }

/* Roulette: the pocket */
.sv-pocket { display: grid; gap: 12px; justify-items: center; }
.sv-pocket b { display: grid; place-items: center; width: 104px; height: 104px; border: 4px solid rgba(255, 255, 255, .14); border-radius: 50%; color: #fff; font: 600 44px/1 var(--font-ui); font-variant-numeric: tabular-nums; box-shadow: inset 0 -6px 0 rgba(0, 0, 0, .25); }
.sv-pocket .is-red { background: #c0392b; }
.sv-pocket .is-black { background: #23252b; }
.sv-pocket .is-green { background: #1f8a4c; }
.sv-pocket span { color: var(--text-2); font-size: 14px; }

/* Diamonds: five gems in their own colours */
.sv-gems { display: flex; justify-content: center; gap: 8px; width: 100%; }
.sv-gem { display: grid; place-items: center; width: min(18%, 64px); aspect-ratio: 1; border-radius: var(--r-1); background: var(--s3); }
.sv-gem .sv-ico { width: 72%; height: 72%; }
.sv-gem.is-pair { box-shadow: inset 0 0 0 2px color-mix(in oklab, var(--text) 30%, transparent); }
.g-green { color: #3ccf78; } .g-purple { color: #a879f2; } .g-yellow { color: #f2c94c; } .g-red { color: #ef5b5b; }
.g-cyan { color: #3fd0e0; } .g-pink { color: #f27fc0; } .g-blue { color: #5b8def; }

/* Cards: in the order Stake draws them */
.sv-cards { display: flex; flex-wrap: wrap; justify-content: center; gap: 8px; }
.sv-card { position: relative; display: grid; place-items: center; width: 46px; height: 64px; border-radius: 6px; background: #f4efe7; color: #1b1d22; font: 600 18px/1 var(--font-ui); box-shadow: 0 2px 0 rgba(0, 0, 0, .35); }
.sv-card.is-red { color: #c0392b; }
.sv-card span { font-size: 15px; }
.sv-card i { position: absolute; top: -8px; left: -8px; display: grid; place-items: center; min-width: 20px; height: 20px; padding: 0 4px; border-radius: 10px; background: var(--s3); color: var(--text-2); font: 600 11px/1 var(--font-code); font-style: normal; }

/* Every step */
.sv-steps { border-top: 1px solid var(--line-2); }
.sv-steps > summary { display: flex; align-items: center; justify-content: space-between; gap: 12px; min-height: 52px; padding-top: 16px; list-style: none; cursor: pointer; }
.sv-steps > summary::-webkit-details-marker { display: none; }
.sv-steps > summary::after { content: ""; flex: none; width: 10px; height: 10px; margin-right: 4px; border-right: 2px solid var(--text-3); border-bottom: 2px solid var(--text-3); transform: rotate(45deg) translateY(-3px); transition: transform var(--t); }
.sv-steps[open] > summary::after { transform: rotate(-135deg) translateY(-3px); }
.sv-steps__h { margin: 0; color: var(--heading); font: 600 20px/1.2 var(--font-ui); }
.sv-trail { display: grid; gap: 24px; margin: 16px 0 0; padding: 0; list-style: none; counter-reset: sv; }
.sv-trail > li { position: relative; display: grid; gap: 12px; min-width: 0; padding-left: 40px; counter-increment: sv; }
.sv-trail > li::before { content: counter(sv); position: absolute; top: -2px; left: 0; display: grid; place-items: center; width: 28px; height: 28px; border: 1px solid var(--line-2); border-radius: 50%; color: var(--text-2); font: 600 13px/1 var(--font-code); }
.sv-trail h3 { margin: 0; color: var(--text); font: 600 16px/1.3 var(--font-ui); }
.sv-trail p { margin: 0; color: var(--text-2); font-size: 14px; line-height: 1.55; }
.sv-trail .sv-ok { color: var(--ok); font-weight: 600; }
.sv-trail .sv-bad { color: var(--bad); font-weight: 600; }
.sv-hex { display: block; padding: 12px; border-radius: var(--r-1); background: var(--bg); color: var(--text); font: 400 13px/1.7 var(--font-code); overflow-wrap: anywhere; }
.sv-hex--g { display: flex; flex-wrap: wrap; gap: 4px 12px; }
.sv-g { position: relative; color: var(--text-3); }
.sv-g.is-used { color: var(--text); text-decoration: underline 1px var(--sv-gold); text-underline-offset: 4px; }
.sv-g sub { margin-left: 2px; color: var(--sv-gold); font-size: 12px; vertical-align: -2px; }
.sv-msg { margin: 0; }
.sv-msg code { color: var(--text); font: 400 13px/1.4 var(--font-code); overflow-wrap: anywhere; }
.sv-tbl { min-width: 0; font-size: 13px; }
.sv-tbl th, .sv-tbl td { padding: 8px; text-align: left; vertical-align: top; }
.sv-tbl td:first-child, .sv-tbl th:first-child { width: 1%; color: var(--text-3); white-space: nowrap; }
.sv-tbl code { font: 400 13px/1.45 var(--font-code); white-space: nowrap; }
.sv-tbl .sv-dec { display: block; color: var(--text-3); font: 400 12px/1.45 var(--font-code); white-space: nowrap; }
.sv-tbl .is-mine { color: var(--bad); font-weight: 600; }
.sv-tbl .is-right { color: var(--text); }

/* A whole seed pair */
.sv-range { display: grid; gap: 16px; margin-top: 24px; padding: 16px; border: 1px solid var(--line); border-radius: var(--r-3); background: var(--s1); }
.sv-range__head { display: grid; gap: 16px; }
.sv-range__h { margin: 0; color: var(--heading); font: 600 20px/1.2 var(--font-ui); }
.sv-range__lede { margin: 8px 0 0; max-width: 70ch; color: var(--text-2); font-size: 14px; line-height: 1.55; }
.sv-range__form { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 12px; align-items: end; }
.sv-range__form .btn { grid-column: 1 / -1; min-height: 48px; }
.sv-range__form .btn:disabled { filter: grayscale(.6); opacity: .55; cursor: default; }
.sv-range__sum { margin: 0; color: var(--text); font-size: 15px; line-height: 1.5; }
.sv-range__note { margin: 0; max-width: 75ch; }
.sv-range #sv-csv { justify-self: start; height: 40px; cursor: pointer; }
.sv-range #sv-csv .icon { width: 16px; height: 16px; }
@media (min-width: 900px) {
	.sv { gap: 20px; padding: 24px; }
	.sv__body { grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: 32px; }
	.sv__out { padding: 20px; }
	.sv-range { padding: 24px; }
	.sv-range__head { grid-template-columns: minmax(0, 1fr) minmax(0, 420px); align-items: end; gap: 32px; }
	.sv-range__form { grid-template-columns: repeat(2, minmax(0, 1fr)) auto; }
	.sv-range__form .btn { grid-column: auto; padding: 0 20px; white-space: nowrap; }
}
@media (min-width: 640px) { .sv .filters { margin: 0; padding: 0; } }

/* Found against expected: one bar per outcome, the expected share as a tick */
.sv-dist { display: grid; gap: 8px; margin: 0; padding: 0; list-style: none; }
.sv-dist li { display: grid; grid-template-columns: minmax(84px, 140px) minmax(0, 1fr) 64px; gap: 12px; align-items: center; }
.sv-dist__l { color: var(--text-2); font-size: 13px; line-height: 1.3; font-variant-numeric: tabular-nums; }
.sv-dist__bar { position: relative; height: 12px; border-radius: 4px; background: var(--s2); }
.sv-dist__bar i { position: absolute; inset: 0 auto 0 0; border-radius: 4px; background: var(--text-3); transform-origin: left; }
.sv-dist__bar u { position: absolute; top: -3px; bottom: -3px; width: 2px; margin-left: -1px; border-radius: 1px; background: var(--sv-gold); }
.sv-dist b { color: var(--text); font-size: 13px; font-weight: 600; font-variant-numeric: tabular-nums; text-align: right; }
.sv-key { display: flex; flex-wrap: wrap; gap: 8px 16px; margin: 0 0 8px; color: var(--text-3); font-size: 12px; }
.sv-key span { display: inline-flex; align-items: center; gap: 6px; }
.sv-key i { display: inline-block; width: 14px; height: 8px; border-radius: 2px; background: var(--text-3); }
.sv-key u { display: inline-block; width: 2px; height: 12px; border-radius: 1px; background: var(--sv-gold); }
/* Mines and Keno: how often each tile or number came up, on a fixed scale (0 to twice the expected share), so ordinary
   noise reads as even and a real hot spot would stand out */
.sv-heat { display: grid; gap: 4px; width: min(100%, 420px); }
.sv-heat--5 { grid-template-columns: repeat(5, minmax(0, 1fr)); width: min(100%, 340px); }
.sv-heat--8 { grid-template-columns: repeat(8, minmax(0, 1fr)); }
.sv-heat span { display: grid; place-items: center; gap: 2px; aspect-ratio: 1; padding: 2px; border-radius: var(--r-1); background: color-mix(in oklab, var(--text) var(--p, 0%), var(--s2)); color: var(--text); font: 400 11px/1.1 var(--font-code); text-align: center; }
.sv-heat span small { color: var(--text-2); font-size: 11px; }
@media (max-width: 479px) {
	.sv-dist li { grid-template-columns: minmax(0, 1fr) 56px; }
	.sv-dist__l { grid-column: 1 / -1; }
	.sv-heat--8 span { font-size: 11px; }
	.sv-heat--8 span small { display: none; }
}
@media (max-width: 359px) {
	.sv-row { grid-template-columns: minmax(0, 1fr); }
	/* Three columns of hex and floats don't fit 320 px: the long numbers wrap instead of hiding past the table's edge */
	.sv-tbl code, .sv-tbl .sv-dec { font-size: 12px; white-space: normal; word-break: normal; overflow-wrap: normal; } /* break at the spaces between bytes, never inside a number (round four) */
	.sv-card { width: 40px; height: 56px; font-size: 16px; }
}
@media (prefers-reduced-motion: reduce) { .sv-steps > summary::after { transition: none; } }
