/* Fraction Maker */
#pic .part{stroke:var(--ink);stroke-linejoin:round;cursor:pointer;transition:fill .18s}
#pic .part:hover{filter:brightness(.94)}
#pic .shadow{fill:var(--ink);opacity:.1}
#side{width:20em;gap:.5em}
/* centre the cards when there is room; scroll from the top when there is not */
#side::before,#side::after{content:"";margin:auto}
.fr-card{display:grid;grid-template-columns:auto 1fr;align-items:center;gap:.35em .6em;padding:.6em .7em;border:2px solid var(--ink);border-radius:.8em;background:#fff;border-left:.6em solid var(--c)}
.fr-card .ctl-label{justify-self:end}
.fr-card .stepper{justify-self:start}
.fr-line{grid-column:2;height:.28em;width:calc(max(2.2em,40px)*2 + 3.6em + 8px);background:var(--ink);border-radius:.14em}
.fr-facts{grid-column:1/-1;margin:.2em 0 0;padding:0;list-style:none;display:flex;flex-wrap:wrap;gap:0 1em;font-weight:600;font-size:1.05em;line-height:1.35;font-variant-numeric:tabular-nums}
.fr-facts:empty{display:none}
.fr-facts .words{flex-basis:100%;font-weight:700;color:var(--c)}
.fr-q{grid-column:1/-1;display:flex;flex-direction:column;align-items:center;font-weight:700;font-size:3em;line-height:1;color:var(--c);padding:.1em 0}
.fr-q i{display:block;width:1.3em;height:.1em;background:var(--ink);border-radius:.05em;margin:.12em 0}
.fr-sign{align-self:center;display:grid;place-items:center;width:2em;height:2em;border-radius:50%;background:var(--gold);border:2px solid var(--ink);font-weight:700;font-size:1.5em;line-height:1;flex:none}
/* narrow tool (phone): the fraction cards go under the picture, side by side */
@container (max-width:680px){
  .tool-body{flex-direction:column}
  #side{width:auto;flex-direction:row;flex-wrap:wrap;border-left:0;border-top:2px solid var(--ink);padding:.5em;max-height:55%}
  .fr-card{flex:1 1 9em;grid-template-columns:1fr;justify-items:center;padding:.4em}
  .fr-card .ctl-label{display:none}
  .fr-card .stepper{justify-self:center}
  .fr-line{grid-column:1;width:80%}
  .fr-facts{justify-content:center;text-align:center;font-size:.95em}
  #side::before,#side::after{content:none}
}
