/* /css/pages/frontpage-demos-olympiad.css (R-133): the figures of the olympiad-training demos. One block per card
 * id; every selector names an hpd-<id>- class. The frame, the timeline and the colour helpers are in
 * /css/pages/frontpage-demos.css; the markup is in src/presentation/homepage/demos/<id>.ts. */

/* ==== shagai-game */
/* ---- shagai-game: a row of 10 shagai, taken left to right as 1 | 3 | 3 | 3, over the count ladder 10 → 9 → 6 → 3 → 0.
   What is taken lifts, dims and is struck (still readable); Bat's shagai turn the solution colour as he takes them,
   Naran's stay neutral. The row group paints the shagai and their strikes. Bat's last one is outlined "correct"; at
   the end the ladder (the answer) shines */
.hpd-shagai-game-row{fill:var(--hp-demo-tile);stroke:var(--hp-demo-ink);stroke-width:2.5}
.hpd-shagai-game-bat{fill:var(--hp-demo-c)}
.hpd-shagai-game-brace{stroke:var(--hp-demo-ink-2);stroke-width:2.5}
.hpd-shagai-game-win{stroke:var(--hp-demo-ok);stroke-width:3}
.hpd-shagai-game-then{stroke:var(--hp-demo-ink-2);stroke-width:2.5}
.hpd-shagai-game-slot{stroke:var(--hp-demo-blank);stroke-width:2;stroke-dasharray:5 6}
.hpd-shagai-game-start{fill:var(--hp-demo-tile)}
.hpd-shagai-game-lit{fill:var(--hp-demo-c)}
.hp-demo__svg .hpd-shagai-game-lit .hp-demo__t{fill:var(--hp-demo-on-c)}
.hpd-shagai-game-shine{stroke:var(--hp-demo-ok)}

/* the answer is an 18-character chain: at the frame's large size it would run under the tick on a narrow card */
.hpd-shagai-game .hp-demo__value{font-size:clamp(1.125rem,7.5cqi,1.875rem)}

/* ==== euclid-squares */
/* ---- euclid-squares: Euclid's rectangle, 252 × 105 to scale, cut into two 105-squares, two 42-squares and two
   21-squares with nothing left. The squares darken as they shrink toward the common measure; what is left over is grey
   until the next squares cover it; the last 21-square is ringed in "correct" at the check. Proportional figures keep
   the 21 inside its small square clear of the cuts */
.hpd-euclid-squares .hp-demo__t{font-variant-numeric:lining-nums proportional-nums}
.hpd-euclid-squares-paper{fill:var(--hp-demo-paper)}
.hpd-euclid-squares-left{fill:color-mix(in srgb,var(--hp-demo-ink-2) 26%,var(--hp-demo-paper))}
.hpd-euclid-squares-a{fill:color-mix(in srgb,var(--hp-demo-c) 18%,var(--hp-demo-paper))}
.hpd-euclid-squares-b{fill:color-mix(in srgb,var(--hp-demo-c) 42%,var(--hp-demo-paper))}
.hpd-euclid-squares-c{fill:var(--hp-demo-c)}
.hp-demo__svg .hpd-euclid-squares-on{fill:var(--hp-demo-on-c)}
.hpd-euclid-squares-cut{stroke:var(--hp-demo-ink);stroke-width:2.5}
.hpd-euclid-squares-frame{stroke:var(--hp-demo-ink);stroke-width:3}
.hpd-euclid-squares-glow{stroke:var(--hp-demo-c)}
.hpd-euclid-squares-ok{stroke:var(--hp-demo-ok);stroke-width:3.5}

/* ==== rotation-60 */
/* ---- rotation-60: equilateral ABC with P inside (PA = 8, PB = 15, PC = 17). A copy of △APB turns 60° about A onto
   △AP′C while B's track is drawn at the same pace; at the last step the 150° arc at P′ turns back onto ∠APB. Both
   turns are one keyframe each about A, in view-box units. The solution's ink marks the copy, PP′, the right angle and
   the angle marks; the given stays ink */
.hpd-rotation-60-paper{fill:var(--hp-demo-paper)}
.hpd-rotation-60-edge{stroke:var(--hp-demo-ink);stroke-width:3}
.hpd-rotation-60-cev{stroke:var(--hp-demo-ink-2);stroke-width:2.5}
.hpd-rotation-60-copy{fill:var(--hp-demo-c);fill-opacity:.16;stroke:var(--hp-demo-c);stroke-width:2.5}
.hpd-rotation-60-track,.hpd-rotation-60-ask{stroke:var(--hp-demo-ink-2);stroke-width:2.5}
.hpd-rotation-60-pq,.hpd-rotation-60-mark{stroke:var(--hp-demo-c);stroke-width:2.5}
.hpd-rotation-60-arc{stroke:var(--hp-demo-c);stroke-width:3}
.hpd-rotation-60-ok{stroke:var(--hp-demo-ok)}
.hpd-rotation-60-glow{stroke:var(--hp-demo-c);stroke-opacity:.35}
.hpd-rotation-60-dot{fill:var(--hp-demo-ink);stroke:var(--hp-demo-paper);stroke-width:2}
.hpd-rotation-60-dot2{fill:var(--hp-demo-c);stroke:var(--hp-demo-paper);stroke-width:2}
.hp-demo__svg .hpd-rotation-60-in{--hp-demo-len:.2s}
.hp-demo__svg .hpd-rotation-60-pace{--hp-demo-len:.6s;--hp-demo-ease:cubic-bezier(.45,0,.25,1)}
.hp-demo__svg .hpd-rotation-60-turn{transform-box:view-box;transform-origin:61.9px 190px}
.hp-demo--play .hpd-rotation-60-turn,.hp-preview .hpd-rotation-60-turn{animation:hpd-rotation-60-turn calc(var(--hp-demo-len) * var(--hp-demo-speed))
var(--hp-demo-ease) calc((var(--hp-demo-lead) + (var(--hp-demo-b) + var(--hp-demo-o)) * var(--hp-demo-slot)) * var(--hp-demo-speed)) 1 both}
.hp-demo--play .hpd-rotation-60-back,.hp-preview .hpd-rotation-60-back{animation-name:hpd-rotation-60-back}
@keyframes hpd-rotation-60-turn{from{transform:rotate(60deg)}}
@keyframes hpd-rotation-60-back{from{transform:rotate(-60deg)}}
