/* Hundreds Chart */
#chart{touch-action:none}
#chart .hc-shadow{fill:var(--ink);opacity:.1}
#chart .hc-cell{cursor:pointer;outline:none}
#chart .hc-cell rect:first-child{stroke:none}
#chart .hc-tri{pointer-events:none}
#chart text{font-family:Lexend,Arial,sans-serif;font-weight:700;fill:var(--ink);pointer-events:none;font-variant-numeric:tabular-nums}
#chart text.on-dark{fill:#fff;stroke:var(--ink);stroke-width:.09em;paint-order:stroke;stroke-linejoin:round}
#chart text.on-light{fill:var(--ink)}
#chart .hc-cover{fill:#5b6573;stroke:var(--ink);stroke-width:2}
#chart .hc-cell:hover .hc-cover{fill:#4b5563}
#chart .hc-cell:focus-visible rect:last-child{stroke:var(--blue);stroke-width:5}
#chart .hc-ring{pointer-events:none}

.hc-nav{display:inline-flex;align-items:center;gap:.35em}
.hc-range{display:inline-block;min-width:6.6em;text-align:center}
.tool-bar .swatches{padding:0 .3em}
.hc-eraser{display:grid;place-items:center;color:var(--red)}
.hc-eraser svg{width:70%;height:70%}

#side{width:18em;gap:.6em}
.hc-tabs{display:flex}
.hc-tabs .btn{flex:1 1 auto;padding:0 .5em}
.hc-panel{display:flex;flex-direction:column;gap:.6em}
.hc-card{display:flex;flex-wrap:wrap;align-items:center;justify-content:space-between;gap:.45em;padding:.5em .6em;border:2px solid var(--ink);border-radius:.8em;background:#fff;border-left:.6em solid var(--c)}
.hc-card .toggle[aria-pressed=true]::before{background-color:var(--c);border-color:var(--c)}
.hc-note{margin:0;font:600 .95em/1.35 var(--font-head);color:var(--ink)}
.hc-hint{margin:0;font:500 .85em/1.35 var(--font-head);color:var(--soft)}
.hc-count .ctl{justify-content:space-between}
.hc-row{display:flex;gap:.5em}
.hc-row .btn{flex:1}
.hc-count .slider input[type=range]{width:7em}
.hc-count .slider output{min-width:5.6em;text-align:left;font-size:.9em}
.hc-big{flex:1;min-height:1.1em;display:grid;place-items:center;font:700 5em/1 var(--font-head);color:var(--teal);font-variant-numeric:tabular-nums;border:2px solid var(--ink);border-radius:.2em;background:#fff}
.hc-hide .btn{width:100%}

/* narrow tool (phone): the panel goes under the chart */
@container (max-width:680px) or (max-aspect-ratio:1/1){
  .tool-bar .ctl-label{display:none}
  .hc-range{min-width:5.4em}
  .tool-bar .swatches{padding:0}
  .tool-body{flex-direction:column}
  #side{width:auto;border-left:0;border-top:2px solid var(--ink);padding:.45em;gap:.45em;max-height:42%}
  .hc-panel{flex-direction:row;flex-wrap:wrap;align-items:center}
  .hc-card{flex:1 1 9em}
  .hc-note,.hc-hint{flex-basis:100%;font-size:.85em}
  .hc-count .ctl{justify-content:flex-start}
  .hc-big{flex:0 0 auto;min-width:2.6em;padding:0 .2em;font-size:2.2em}
  .hc-hide .btn{width:auto;flex:1}
}
