/* Jump Strategy */
/* the calculation: large steppers at the top */
.js-calc{display:inline-flex;align-items:center;gap:.4em}
.js-calc .stepper{font-size:1.1em}
.js-calc .stepper input{width:3ch}
.js-calc .seg .btn{font-size:1.15em;padding:0 .55em;min-width:2em}
.js-eq{font:700 1.5em/1 var(--font-head);min-width:3.4ch;white-space:nowrap;font-variant-numeric:tabular-nums}
.js-strats .btn.off{opacity:.38;cursor:help}
.js-strats .btn.off:hover{background:#fff}

/* the controls at the side */
#side{width:19.2em;gap:.55em}
.js-group{display:flex;flex-direction:column;gap:.42em}
.js-row{display:flex;flex-wrap:wrap;align-items:center;gap:.42em}
.js-row>.btn{flex:1 1 auto;padding:0 .6em}
.js-next{font-size:1.12em;min-height:max(2.75em,46px)}
.js-ico{width:1.5em;height:1.1em;flex:none}
.js-speed .ctl{flex-wrap:nowrap;justify-content:space-between}
.js-speed .seg{flex:1}
.js-speed .seg .btn,.js-new .seg .btn{flex:1 1 auto;padding:0 .5em}
.js-new{border-top:2px solid var(--grid-strong);padding-top:.5em}
.js-new>.ctl-label{font:600 .82em var(--font-head);color:var(--soft)}
.js-new .seg{display:flex}
.js-new .js-row .seg{flex:0 1 auto}
.js-tail{flex-direction:row;flex-wrap:wrap;gap:.42em}
.js-tail:empty{display:none}

/* the stage */
#pic text{font-family:Lexend,Arial,sans-serif;font-weight:700;text-anchor:middle}
#pic .js-heading{fill:var(--soft);font-weight:600;text-anchor:start}
#pic .js-axis{stroke:var(--ink);stroke-linecap:round}
#pic .js-axis-shadow{stroke:var(--ink);opacity:.07;stroke-linecap:round}
#pic .js-axis-head{fill:var(--ink);stroke:var(--ink);stroke-width:1.5;stroke-linejoin:round}
#pic .js-arc{fill:none;stroke-linecap:round}
#pic .js-case{fill:none;stroke:var(--ink);stroke-linecap:round;opacity:.9}
#pic .js-head{stroke:var(--ink);stroke-width:1.4;stroke-linejoin:round}
#pic .js-label rect{fill:#fff;stroke-width:2.2}
#pic .js-tick{stroke:var(--ink);stroke-linecap:round}
#pic .js-n,#pic .js-w,#pic .js-q,#pic .js-more,#pic .js-brace-text,#pic .js-total{paint-order:stroke;stroke:#fff;stroke-width:.16em;stroke-linejoin:round}
#pic .js-n{fill:var(--ink)}
#pic .js-ans-box{fill:var(--gold-tint);stroke:var(--ink);stroke-width:2.5}
#pic .js-ans-box.big{fill:var(--gold);stroke-width:3}
#pic .js-answer .js-n{stroke:none}
#pic .js-ten-box{fill:var(--blue-tint);stroke:var(--blue);stroke-width:2}
#pic .js-target-box{fill:#fff;stroke:var(--soft);stroke-width:2;stroke-dasharray:5 4}
#pic .js-q-box{fill:#fff;stroke:var(--blue);stroke-width:2.5;stroke-dasharray:6 4}
#pic .js-q{fill:var(--blue);stroke:none}
#pic .js-w{fill:var(--ink)}
#pic .js-w.f{fill:var(--blue)}
#pic .js-w.b{fill:var(--red)}
#pic .js-more{fill:var(--soft)}
#pic .js-brace{fill:none;stroke:var(--purple);stroke-linecap:round;stroke-linejoin:round}
#pic .js-brace-text{fill:var(--purple)}
#pic .js-total-box{fill:var(--gold);stroke:var(--ink);stroke-width:2.5}
#pic .js-total{fill:var(--ink);stroke:none}
#pic .js-hit{fill:transparent;cursor:pointer;outline:none}
#pic .js-hit:hover{fill:rgba(31,111,209,.07)}
#pic .js-hit:focus-visible{stroke:var(--blue);stroke-width:3}
#pic .js-pop{transform-box:fill-box;transform-origin:50% 60%}

/* the frog */
#pic .js-frog{pointer-events:none}
#pic .js-frog-shadow{fill:var(--ink)}
#pic .js-frog-body{fill:#2fa85b}
#pic .js-frog-leg{fill:var(--green)}
#pic .js-frog-belly{fill:var(--green-tint)}
#pic .js-frog-eye{fill:#fff}
#pic .js-frog-cheek{fill:var(--pink);opacity:.45}

/* a message instead of the line, and a short note when a strategy is not offered */
.js-msg{position:absolute;left:50%;top:50%;transform:translate(-50%,-50%);width:max-content;max-width:min(30em,88%);margin:0;padding:.8em 1.1em;background:#fff;border:2px solid var(--ink);border-left:.5em solid var(--red);border-radius:.8em;font:600 1.15em/1.4 var(--font-head);text-align:center}
.js-note{position:absolute;right:.6em;top:.6em;max-width:min(24em,80%);margin:0;padding:.45em .75em;background:var(--gold-tint);border:2px solid var(--ink);border-radius:.6em;font:600 .92em/1.35 var(--font-head);pointer-events:none}

/* tall frames (tablet, phone): the controls go under the stage */
/* (a fixed height, so that the stage does not change size when a button shows or hides) */
@container (orientation:portrait){
  .tool-body{flex-direction:column}
  .js-strat{order:5}
  #side{width:auto;height:12.2em;flex-direction:row;flex-wrap:wrap;align-content:flex-start;border-left:0;border-top:2px solid var(--ink);padding:.55em .7em .5em;gap:.55em 1.2em;overflow:auto;border-bottom:1.6em solid #fff}
  .js-group,.js-opts{flex-direction:row;flex-wrap:wrap;align-items:center}
  .js-play{flex:1 1 100%;flex-wrap:nowrap}
  .js-next{flex:1.4 1 auto}
  .js-play .js-row{flex:3 1 auto;flex-wrap:nowrap}
  .js-new{border-top:0;padding-top:0}
  .js-new>.ctl-label{align-self:center}
}
/* a phone: smaller calculation, the strategies in two columns, no Compare; the panel scrolls */
@container (max-width:560px){
  .tool-bar{gap:.45em .5em;padding:.45em .5em}
  .js-calc{gap:.3em}
  .js-calc .stepper{font-size:1em}
  .js-calc .seg .btn{font-size:1.1em;padding:0 .45em;min-width:0}
  .js-eq{display:none}
  .js-strat{flex:1 1 100%}
  .js-strat>.ctl-label{display:none}
  .js-strats{display:grid;grid-template-columns:1fr 1fr;flex:1}
  .js-strats .btn{margin:0;border-radius:0}
  .js-strats .btn:nth-child(2n){margin-left:-2px}
  .js-strats .btn:nth-child(n+3){margin-top:-2px}
  .js-strats .btn:nth-child(1){border-radius:.6em 0 0 0}
  .js-strats .btn:nth-child(2){border-radius:0 .6em 0 0}
  .js-strats .btn:nth-child(3){border-radius:0 0 0 .6em}
  .js-strats .btn:nth-child(4){border-radius:0 0 .6em 0}
  .js-compare{display:none!important}
  #side{height:15em;gap:.45em .6em;padding:.5em .5em .4em}
  .js-play{flex-wrap:wrap}
  .js-next{flex:1 1 60%}
  .js-play .js-row{flex:1 1 100%}
  .js-speed .ctl-label,.js-new>.ctl-label{display:none}
  .js-group,.js-opts,.js-opts .js-row,.js-new .js-row{flex:1 1 100%}
}
