/* Measuring Cylinder */
#side{width:18.5em;gap:.55em;justify-content:center}
.mc-row{display:flex;flex-wrap:wrap;align-items:center;gap:.45em .55em}
.mc-row .ctl{flex-wrap:nowrap}

/* the picture */
#pic{touch-action:none}
/* only the objects take the pointer: the glass, the liquid and the lens in front of them do not */
#pic .mc-cone,#pic .mc-back,#pic .mc-liquid,#pic .mc-front,#pic .mc-over,#pic .mc-lens,#pic .mc-tray{pointer-events:none}
#pic text{font-family:Lexend,Arial,sans-serif;font-weight:700}
#pic .mc-num,#pic .mc-lnum{fill:var(--ink);dominant-baseline:central;paint-order:stroke;stroke:#fff;stroke-linejoin:round}
#pic .mc-num{stroke-width:3px}
#pic .mc-lnum{stroke-width:5px}
#pic .mc-ins{fill:var(--soft);font-weight:600;dominant-baseline:central}
#pic .mc-ins.small{font-weight:500}
#pic .mc-cap{paint-order:stroke;stroke:#fff;stroke-width:4px;stroke-linejoin:round}
#pic .mc-eyelab{fill:var(--soft);font-weight:600;paint-order:stroke;stroke:#fff;stroke-width:3px}
#pic .mc-tname{fill:var(--ink)}
#pic .mc-tnote{fill:var(--red);font-weight:600}
#pic .mc-sep{stroke:var(--line);stroke-width:1.5}
#pic .mc-thing{cursor:grab;outline:none}
#pic .mc-thing.off{opacity:.35;cursor:not-allowed}
#pic .mc-thing:focus-visible>rect:first-child{stroke:var(--blue);stroke-width:3px;stroke-dasharray:6 4;vector-effect:non-scaling-stroke}
/* a stream pours in, or liquid runs up the tube */
#pic .mc-run{animation:mc-run .5s linear infinite}
#pic .mc-run.up{animation-direction:reverse}
@keyframes mc-run{to{stroke-dashoffset:-40}}
@media (prefers-reduced-motion:reduce){#pic .mc-run{animation:none}}

/* the answer, beside or under the lens */
.mc-read{position:absolute;pointer-events:none;color:var(--ink);font-family:var(--font-head);font-weight:700;line-height:1.1;font-variant-numeric:tabular-nums}
.mc-read.mid{transform:translateY(-50%)}
.mc-lab{font-size:.95em;font-weight:600;color:var(--soft);margin-bottom:.1em}
.mc-big{font-size:var(--big);white-space:nowrap;letter-spacing:-.01em}
.mc-litres{font-size:var(--lit);margin-top:.1em;color:var(--blue-ink)}
.mc-step{font-weight:600;margin-top:.7em;line-height:1.3}
.mc-step+.mc-step{margin-top:.2em}
.mc-step.obj{font-weight:700;color:var(--blue-ink)}
.mc-note{font-size:.95em;font-weight:600;margin-top:.6em;line-height:1.3}
.mc-note.bad{color:#b3260f}
.mc-msg{position:absolute;left:50%;top:.6em;transform:translateX(-50%);max-width:calc(100% - 2em);padding:.45em .9em;background:#fff;border:2px solid var(--ink);border-radius:.6em;font-weight:700;font-size:.95em;text-align:center;box-shadow:0 3px 0 rgba(20,26,34,.12);z-index:2}

/* press and hold */
.mc-hold{touch-action:none;-webkit-touch-callout:none}
.mc-hold .mc-ico{width:1.05em;height:1.05em;color:var(--blue)}
.mc-hold.down{background:var(--ink);color:#fff}
.mc-hold.down .mc-ico{color:#fff}
.mc-hold.down .mc-ico path+path{stroke:var(--ink)}

/* the liquid stepper: the number is hidden until "Show answer" (tap the box to see it) */
.mc-vol{position:relative}
.mc-vol input{width:4.4ch}
.mc-q{display:none;position:absolute;left:50%;top:50%;transform:translate(-50%,-50%);font:700 1.25em/1 var(--font-head);pointer-events:none;color:var(--soft)}
.mc-vol.masked input:not(:focus){color:transparent}
.mc-vol.masked input:not(:focus)+.mc-q{display:block}

/* a shorter label and the Options switch are for a phone only */
.mc-narrow,.mc-opt{display:none}

/* a narrow tool: the panel goes under the picture */
@container (max-width:900px){
  .tool-body{flex-direction:column}
  #side{width:auto;flex:none;flex-direction:row;flex-wrap:wrap;align-content:flex-start;justify-content:flex-start;border-left:0;border-top:2px solid var(--ink);padding:.55em .7em 1.5em;gap:.5em 1.1em}
  .mc-row{flex-wrap:nowrap}
}
/* a phone: three short rows of buttons, and the panel opens with "Options" */
@container (max-width:560px){
  #bar{gap:.5em .5em;padding:.5em .55em}
  #bar .ctl-label,#bar .mc-ico,.mc-wide{display:none}
  .mc-narrow{display:inline}
  #bar .btn{padding:0 .62em}
  .mc-opt{display:inline-flex}
  #bar .spacer{display:none}
  .mc-reset{order:1}
  .mc-answer,#bar>.toggle{order:2}
  #side.closed{display:none}
  #side{gap:.45em .8em;max-height:62%;overflow:auto}
}

/* the shared page head: the title of this tool is long, so the Full screen button needs a smaller gap on a phone */
@media (max-width:420px){.tool-head{gap:8px 10px}}
