/* Tune: category rows with their rated share; a category's statements with the five-square control. */
.tune-title { margin-top: var(--s-4); line-height: 1.04; overflow-wrap: break-word; }
.tune-ink { flex: none; margin-top: var(--s-4); }
.tune-ink[hidden], .tune-cats[hidden], .tune-drivers[hidden] { display: none; }

/* the categories */
.tune-cats { list-style: none; margin: var(--s-5) 0 0; padding: 0; display: grid; }
.tune-cat {
  position: relative; display: grid; grid-template-columns: 1fr auto; align-items: center; column-gap: var(--s-4);
  width: 100%; min-height: 56px; padding: var(--s-2) 0; border: 0; background: transparent; text-align: left;
  -webkit-tap-highlight-color: transparent;
}
.tune-cat-name { font-size: var(--t-row); line-height: 1.25; }
.tune-cat-count { font-size: var(--t-meta); color: var(--ink-55); letter-spacing: 0.04em; }
.tune-cat-bar { position: absolute; left: 0; right: 0; bottom: 0; height: 1px; background: var(--ink-20); }
.tune-cat-bar i { position: absolute; inset: 0 auto 0 0; width: calc(var(--share, 0) * 100%); height: 2px; margin-top: -0.5px; background: var(--ink); transition: width var(--dur-move) var(--ease-spring); }
@media (hover: hover) { .tune-cat:hover .tune-cat-name { text-decoration: underline; text-underline-offset: 3px; } }
.tune-cat:focus-visible { outline: 2px solid var(--ink); outline-offset: 2px; }
.actions .link.mono { font-size: var(--t-meta); letter-spacing: 0.04em; text-decoration: none; }
.actions .link[disabled] { cursor: default; color: var(--ink-55); }

/* a category's statements */
.tune-drivers { list-style: none; margin: var(--s-4) 0 0; padding: 0; display: grid; }
.drv {
  display: grid; grid-template-columns: 1fr auto; grid-template-areas: 'text text' 'skipped control'; align-items: center;
  column-gap: var(--s-4); padding: var(--s-3) 0 0; border-bottom: 1px solid var(--ink-20);
}
.drv-text {
  grid-area: text; font-size: var(--t-body); line-height: 1.4;
  display: -webkit-box; -webkit-box-orient: vertical; -webkit-line-clamp: 3; overflow: hidden;
}
.drv-skipped { grid-area: skipped; letter-spacing: 0.04em; }
.drv.is-off .drv-text { color: var(--ink-55); }

/* the five-square control: 20 px squares on 44 px hits */
.squares { grid-area: control; justify-self: end; display: flex; margin-right: calc((var(--hit) - 20px) / -2); }
.sq { position: relative; width: var(--hit); height: var(--hit); display: grid; place-items: center; padding: 0; border: 0; background: transparent; -webkit-tap-highlight-color: transparent; }
.sq i { width: 20px; height: 20px; border: 1.5px solid var(--ink-55); transition: background var(--dur-fast), border-color var(--dur-fast), transform var(--dur-fast) var(--ease-spring); }
@media (hover: hover) { .sq:hover i { border-color: var(--ink); } }
.sq:active i { transform: scale(0.9); }
.sq[aria-pressed='true'] i { background: var(--fill); border-color: var(--fill); }
.sq.is-ref::after { content: ''; position: absolute; left: 50%; bottom: 3px; width: 2px; height: var(--s-1); transform: translateX(-50%); background: var(--ink); }
.sq:focus-visible { outline: none; }
.sq:focus-visible i { box-shadow: 0 0 0 2px var(--ground), 0 0 0 4px var(--ink); }
.drv-dash { grid-area: control; justify-self: end; align-self: center; width: 20px; height: 6px; margin: var(--s-3) var(--s-3) var(--s-3) 0; border: 1.5px solid var(--ink-20); }

/* room for the control beside the statement */
@media (min-width: 520px) {
  .drv { grid-template-areas: 'text control' 'skipped control'; row-gap: var(--s-1); padding: var(--s-2) 0; min-height: 64px; }
}
