/* Times Ten Slide */
/* the bar */
.tt-form{flex-wrap:nowrap}
.tt-input{width:7.4em;min-height:max(2.5em,42px);padding:0 .5em;border:2px solid var(--ink);border-radius:.6em;background:#fff;color:var(--ink);font:700 1.1em/1 var(--font-head);font-variant-numeric:tabular-nums;user-select:text;-webkit-user-select:text}
.tt-input[aria-invalid=true]{border-color:var(--red);box-shadow:0 0 0 2px var(--red-tint)}
.tt-opsrow{display:inline-flex;flex-wrap:wrap;gap:.55em .9em}
.tt-ops .btn{padding:0 .7em;font-size:1.05em;font-variant-numeric:tabular-nums}
.tt-ops .tt-times{background:var(--tint-blue)}
.tt-ops .tt-times:hover{background:#c4ddfb}
.tt-ops .tt-div{background:var(--tint-orange)}
.tt-ops .tt-div:hover{background:#ffd6ab}
.tt-ops .btn.blocked{opacity:.42}
.tt-ops .btn.blocked:hover{background:#fff}

/* the stage: the number sentence, the chain of numbers and the chart */
/* the number sentence grows with the height of the frame (a tall tablet, a board) */
.tt-stage{display:flex;flex-direction:column;justify-content:center;--sum:max(2.55em,5.6cqh)}
.tt-head{flex:none;height:calc(var(--sum) * 1.15 + 2.95em);display:flex;flex-direction:column;align-items:center;justify-content:center;gap:.25em;padding:.4em .8em 0;overflow:hidden}
.tt-sum{flex:none;max-width:100%;font-size:var(--sum);font-weight:700;line-height:1.12;white-space:nowrap;font-variant-numeric:tabular-nums;letter-spacing:-.01em}
.tt-sum .tt-o.times{color:var(--blue-ink)}
.tt-sum .tt-o.div{color:#b24f00}
.tt-sum .tt-ans{display:inline-block;min-width:1.4em;padding:0 .2em .04em;border:.07em solid var(--ink);border-radius:.18em;background:#fff;text-align:center;vertical-align:baseline}
.tt-sum .tt-ans.q{border-style:dashed;color:var(--soft)}
.tt-sum .tt-ans.wait{border-style:dashed;border-color:#9aa6b4;min-width:2em}
.tt-say{flex:none;margin:0;height:1.9em;display:flex;align-items:center;justify-content:center;font:600 1em/1.3 var(--font-head);color:#2b3440;text-align:center}
.tt-sayin{max-width:100%;text-wrap:balance}
.tt-say.warn .tt-saytext{color:#9c2410;background:var(--red-tint);border:2px solid var(--red);border-radius:.5em;padding:.05em .5em;-webkit-box-decoration-break:clone;box-decoration-break:clone}
.tt-hops{display:inline-flex;vertical-align:-.12em;align-items:center;gap:.3em;margin-right:.5em;line-height:1.1;padding:.06em .6em .08em .45em;border:2px solid var(--ink);border-radius:999px;background:var(--sun);font-weight:700;white-space:nowrap;animation:tt-pop .25s ease-out}
.tt-hopi{width:1.25em;height:.85em;fill:none;stroke:var(--ink);stroke-width:2.4;stroke-linecap:round;stroke-linejoin:round}
@keyframes tt-pop{from{transform:scale(.7)}}

.tt-hist{flex:none;height:2.5em;display:flex;align-items:center;justify-content:center;gap:.3em;padding:0 .8em;overflow:hidden;white-space:nowrap}
.tt-chip{flex:none;padding:.12em .55em .16em;border:2px solid var(--line);border-radius:.5em;background:#fff;font-weight:700;font-size:.98em;font-variant-numeric:tabular-nums;color:#39424e}
.tt-chip.now{border-color:var(--ink);background:var(--gold-tint);color:var(--ink)}
.tt-step{flex:none;display:inline-flex;flex-direction:column;align-items:center;line-height:1;gap:.05em}
.tt-step small{font-size:.72em;font-weight:700}
.tt-step small.times{color:var(--blue-ink)}
.tt-step small.div{color:#b24f00}
.tt-arr{width:1.5em;height:.7em;fill:none;stroke:#5b6573;stroke-width:2.4;stroke-linecap:round;stroke-linejoin:round}
.tt-more{flex:none;font-weight:700;color:var(--soft)}

.tt-pic{flex:none;min-height:0;position:relative}
.tt-pic>svg{position:absolute;inset:0;width:100%;height:100%;display:block}

/* the chart (a trick zero that falls off the chart may hang past the edge of the picture) */
#pic{overflow:visible}
#pic .tt-shadow{fill:var(--ink);opacity:.12}
#pic .tt-outline{fill:none;stroke:var(--ink);stroke-width:3}
#pic .tt-line{fill:none;stroke:var(--ink);stroke-width:2}
#pic .tt-line.pt{stroke-width:4.5}
#pic .tt-slot{fill:#eef3f8}
#pic .tt-name,#pic .tt-val{font-family:Lexend,Arial,sans-serif;font-weight:600;text-anchor:middle}
#pic .tt-name.short,#pic .tt-val{font-weight:700}
#pic .tt-point{fill:var(--red);stroke:var(--ink)}
#pic .tt-pshadow{fill:var(--ink);opacity:.18}
#pic .tt-glint{fill:#fff;opacity:.8}
#pic .tt-edge{fill:var(--red)}

/* the digit cards and the placeholder zeros */
#pic .tt-cards{cursor:grab}
#pic.dragging .tt-cards{cursor:grabbing}
#pic .tt-cface{fill:var(--sun);stroke:var(--ink);stroke-linejoin:round}
#pic .tt-cside{fill:#dfa015;stroke:var(--ink);stroke-linejoin:round}
#pic .tt-cshadow{fill:var(--ink);opacity:.15}
#pic .tt-cshine{fill:#fff;opacity:.55}
#pic .tt-cdig,#pic .tt-pdig{font-family:Lexend,Arial,sans-serif;font-weight:700;text-anchor:middle;fill:var(--ink)}
#pic .tt-pface{fill:#fff;stroke:#39424e;stroke-linecap:round}
#pic .tt-pdig{fill:#39424e;font-weight:600}

/* the arrows of Column values */
#pic .tt-arcline,#pic .tt-archead{fill:none;stroke-width:2.4;stroke-linecap:round;stroke-linejoin:round}
#pic .tt-arclabel{font-family:Lexend,Arial,sans-serif;font-weight:700;text-anchor:middle}
#pic .times .tt-arcline,#pic .times .tt-archead{stroke:var(--blue)}
#pic .times .tt-arclabel{fill:var(--blue-ink)}
#pic .div .tt-arcline,#pic .div .tt-archead{stroke:var(--orange)}
#pic .div .tt-arclabel{fill:#b24f00}

/* Predict first: the cover */
#pic .tt-coverbg{fill:var(--purple)}
#pic .tt-coverline{stroke:#8f6be0;stroke-width:6}
#pic .tt-coveredge{stroke:var(--ink);stroke-width:3}
#pic .tt-coverq{font-family:Lexend,Arial,sans-serif;font-weight:700;text-anchor:middle;fill:#fff;opacity:.9}
.tt-show{position:absolute;transform:translate(-50%,-50%);font-size:1.2em;min-width:5.2em;box-shadow:0 .18em 0 rgba(20,26,34,.25)}
.tt-show.nudge{animation:tt-nudge .45s ease-out}
@keyframes tt-nudge{20%{transform:translate(-50%,-50%) scale(1.12)}50%{transform:translate(-50%,-50%) rotate(-4deg)}80%{transform:translate(-50%,-50%) rotate(3deg)}}

/* Add a zero?: the trick, in the same columns under the chart */
#pic .tt-tbox{fill:#fff;fill-opacity:.85;stroke:var(--red);stroke-width:2;stroke-dasharray:7 5}
#pic .tt-tline{stroke:#e3b2a8;stroke-width:1.5}
#pic .tt-tline.pt{stroke:#c7867a;stroke-width:3}
#pic .tt-tcard rect{fill:#fff;stroke:var(--ink)}
#pic .tt-tcard text{font-family:Lexend,Arial,sans-serif;font-weight:700;text-anchor:middle;fill:var(--ink)}
#pic .tt-tcard.added rect{fill:var(--red-tint);stroke:var(--red)}
#pic .tt-tcard.added text{fill:var(--red)}
#pic .tt-tpoint{fill:var(--ink)}
.tt-cap{position:absolute;display:flex;flex-wrap:wrap;align-items:center;align-content:center;gap:.15em .6em;overflow:hidden;line-height:1.2;pointer-events:none}
.tt-tag{flex:none;padding:.1em .6em .14em;border:2px solid var(--ink);border-radius:999px;background:var(--red);color:#fff;font-weight:700;font-size:.92em;white-space:nowrap;transform:rotate(-2deg)}
.tt-tx{flex:none;display:inline-flex;align-items:center;gap:.35em;font-size:1.1em;white-space:nowrap;font-variant-numeric:tabular-nums}
.tt-tx b.bad{color:var(--red)}
.tt-tx b.ok{color:var(--green)}
.tt-note{font-weight:600;font-size:.95em;color:#39424e}
.tt-mark{width:1.25em;height:1.25em;fill:none;stroke-width:4;stroke-linecap:round;stroke-linejoin:round;animation:tt-stamp .35s ease-out}
.tt-mark.cross{stroke:var(--red)}
.tt-mark.tick{stroke:var(--green)}
@keyframes tt-stamp{from{transform:scale(1.9) rotate(-20deg);opacity:0}}

/* the options */
#side{width:17em;gap:.55em}
#side .ctl{flex-direction:column;align-items:flex-start;gap:.3em}
.tt-side-h{margin:0;font-weight:700;font-size:.9em;color:var(--soft)}
.tt-key{margin-top:auto;display:flex;flex-direction:column;gap:.3em;padding:.5em .6em;border:2px solid var(--line);border-radius:.6em;font-size:.84em;font-weight:600;color:#39424e}
.tt-key>span{display:flex;align-items:center;gap:.5em}
.tt-keyt{width:1.35em;height:1.55em;flex:none}

@media (prefers-reduced-motion:reduce){.tt-hops,.tt-mark,.tt-show.nudge{animation:none}}

/* a middle-sized tool (tablet): the options go under the stage */
@container (max-width:980px){
  .tool-body{flex-direction:column}
  #side{width:auto;flex-direction:row;flex-wrap:wrap;align-items:center;gap:.5em .9em;border-left:0;border-top:2px solid var(--ink);padding:.55em .7em 1.5em;overflow:visible}
  #side .ctl{flex-direction:row;align-items:center}
  .tt-side-h{display:none}
  .tt-key{margin:0;flex-direction:row;flex-wrap:wrap;gap:.3em 1em;padding:.3em .6em}
}
.tt-optbtn,.tt-done{display:none}
/* a narrow tool (phone): the options open over the stage, so that the chart keeps its height */
@container (max-width:680px){
  .tool-bar{gap:.45em .45em;padding:.45em}
  .tt-form .ctl-label{display:none}
  .tt-input{width:7.2em}
  .tt-opsrow{gap:.45em}
  .tt-ops .btn{padding:0 .42em;font-size:1em}
  .tt-optbtn{display:inline-flex}
  .tool-body{position:relative}
  #side{display:none;position:absolute;inset:0;z-index:5;width:auto;flex-direction:column;flex-wrap:nowrap;align-items:flex-start;gap:.6em;border-top:0;padding:.8em 1em 1.6em;overflow:auto}
  #side.open{display:flex}
  #side .ctl{flex-direction:column;align-items:flex-start}
  .tt-done{display:inline-flex;align-self:flex-end}
  .tt-side-h{display:block}
  .tt-key{display:flex;flex-direction:column;margin:.3em 0 0}
  .tt-stage{--sum:max(2.1em,5.3cqh)}
  .tt-head{height:calc(var(--sum) * 1.15 + 3.65em);padding:.3em .4em 0;gap:.2em}
  .tt-say{height:3em;font-size:.95em;line-height:1.3}
  .tt-hist{height:2.3em;padding:0 .4em}
  .tt-cap{gap:.1em .45em}
  .tt-note{font-size:.9em}
}
