/*
 * comp-u-shape — the U + the mix (chapter 4). Recreated from the live
 * figure (svelte-1acn8r2). Roles: star = var(--cat-emph), foil = ink,
 * ns = var(--cat-ghost). `.compact` is the 1:1 layout under 960px.
 */
.cu-hint { margin: 0 0 8px; font-family: var(--font-mono); font-size: 11px; line-height: 1.5; letter-spacing: .02em; color: var(--muted); }

.cu-rail { stroke: rgba(var(--ink-rgb), .14); stroke-width: 1px; }
.cu-split { stroke: rgba(var(--ink-rgb), .18); stroke-width: 1px; }
.cu-band { font-family: var(--font-mono); font-size: 14px; font-weight: 500; fill: var(--ink); }
.cu-band-n, .cu-sub { font-family: var(--font-mono); font-size: 12px; font-weight: 300; letter-spacing: -.02em; fill: var(--muted); }
.cu-cap { font-family: var(--font-mono); font-size: 14px; fill: rgba(var(--ink-rgb), .72); }

.cu-u-line { fill: none; stroke: var(--ink); stroke-width: 1.6px; stroke-dasharray: 3 5; stroke-linecap: round; stroke-linejoin: round; }
.cu-u-dot { fill: var(--ink); stroke: var(--bg); stroke-width: 2px; }
.cu-u-val {
  font-family: var(--font-mono); font-size: 14px; font-weight: 500; fill: var(--ink);
  paint-order: stroke; stroke: var(--bg); stroke-width: 5px; stroke-linejoin: round;
}

.cu-halo { fill: none; stroke: var(--bg); stroke-width: 5px; stroke-linejoin: round; stroke-linecap: round; }
.cu-slope { fill: none; stroke: var(--cat-ghost); stroke-width: 1.35px; stroke-opacity: .82; stroke-linejoin: round; stroke-linecap: round; }
.cu-slope.star { stroke: var(--cat-emph); stroke-width: 2.6px; stroke-opacity: 1; }
.cu-slope.foil { stroke: var(--ink); stroke-width: 1.9px; stroke-opacity: 1; }
.cu-slope.on { stroke-width: 2.6px; stroke-opacity: 1; }
.cu-node { fill: var(--cat-ghost); stroke: var(--bg); stroke-width: 1.8px; }
.cu-node.star { fill: var(--cat-emph); }
.cu-node.foil { fill: var(--ink); }
.cu-node.on { r: 4.4; }
.cu-node-val {
  font-family: var(--font-mono); font-size: 12px; fill: var(--muted);
  paint-order: stroke; stroke: var(--bg); stroke-width: 4px; stroke-linejoin: round;
}
.cu-node-val.star, .cu-node-val.foil { fill: var(--ink); }
.cu-name { font-family: var(--font-mono); font-size: 12px; fill: var(--muted); cursor: pointer; outline: none; }
.cu-name.star { fill: var(--cat-emph); font-weight: 500; }
.cu-name.foil { fill: var(--ink); font-weight: 500; }
.cu-name:focus-visible { outline: 2px solid var(--accent2); outline-offset: 2px; }
.cu .dim { opacity: .12; }
:is(.cu-halo, .cu-slope, .cu-node, .cu-node-val, .cu-name) {
  transition: opacity .26s var(--rv-ease), stroke-width .26s var(--rv-ease), fill-opacity .26s var(--rv-ease);
}

.cu.compact .cu-band { font-size: 11px; }
.cu.compact .cu-band-n, .cu.compact .cu-node-val { font-size: 11px; }
.cu.compact .cu-u-val { font-size: 11px; }
.cu.compact .cu-node-val.crowd { display: none !important; }   /* too close to the star's label (comp-u-shape.js) */

.cu-legend { display: flex; flex-wrap: wrap; gap: 6px 14px; margin: 14px 0 0; padding: 0; list-style: none; }
.cu-legend-item {
  display: inline-flex; align-items: center; gap: 7px;
  min-height: 28px; margin: 0; padding: 4px 0;
  font-family: var(--font-mono); font-size: 12px; color: var(--muted);
  background: none; border: 0; appearance: none; cursor: pointer;
}
.cu-legend-item.star { color: var(--cat-emph); }
.cu-legend-item.foil { color: var(--ink); }
.cu-legend-item.on { text-decoration: underline; text-underline-offset: 3px; }
.cu-swatch { flex: none; width: 10px; height: 10px; border-radius: 50%; background: var(--cat-ghost); }
.cu-swatch.star { background: var(--cat-emph); }
.cu-swatch.foil { background: var(--ink); }

@media (prefers-reduced-motion: reduce) {
  :is(.cu-halo, .cu-slope, .cu-node, .cu-node-val, .cu-name) { transition: none; }
}
