/* csec-ladder — benchmark ladder (buttons) + hundred-square grid + readout.
 * Wide: ladder | grid, readout underneath. ≤ 900: stacked.
 * ≤ 640: ladder, then grid and readout side by side. */
.cs-ladder-fig {
  display: flex; flex-wrap: wrap; align-items: center; justify-content: center;
  gap: 36px 56px;
}
.cs-out { display: contents; }

/* ladder */
.cs-ladder {
  display: flex; flex-direction: column; align-items: stretch; gap: 2px;
  flex: 0 1 460px; width: min(460px, 42%);
}
.cs-rung {
  display: flex; align-items: center; gap: 14px;
  width: 100%; padding: 8px 10px;
  text-align: left; font: inherit; cursor: pointer;
  background: none; border: 0; border-left: 3px solid transparent; border-radius: 4px;
  transition: background .16s, border-color .16s;
}
.cs-rung-name {
  flex: 1; min-width: 0;
  font-family: var(--font-mono); font-size: 14px;
  color: rgba(var(--ink-rgb), .7);
  white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
}
.cs-track { position: relative; flex: 0 0 140px; height: 6px; background: rgba(var(--ink-rgb), .12); border-radius: 3px; }
.cs-track i {
  position: absolute; inset: 0 auto 0 0;
  background: var(--chip-ink); opacity: .5; border-radius: 3px;
  transition: opacity .16s;
}
.cs-rung-val {
  flex: 0 0 60px; text-align: right;
  font-family: var(--font-mono); font-size: 14px; font-variant-numeric: tabular-nums;
  color: rgba(var(--ink-rgb), .7);
}
.cs-rung.hot { background: rgba(var(--ink-rgb), .05); }
.cs-rung.hot .cs-rung-name, .cs-rung.hot .cs-rung-val { color: var(--ink); font-weight: 600; }
.cs-rung.hot .cs-track i { opacity: 1; }
.cs-rung.on { border-left-color: var(--chip-ink); }
.cs-rung:focus-visible { outline: 2px solid var(--accent2); outline-offset: 2px; }

/* hundred-square grid */
.cs-grid {
  display: block; flex: 0 0 auto;
  width: min(360px, 100%); max-width: 360px; height: auto; overflow: visible;
}
.cs-unit { transition: fill .22s, fill-opacity .22s, stroke-opacity .22s; }
.cs-unit.off { fill-opacity: .3; }
.cs-unit.extra { fill-opacity: .08; stroke: var(--cat-emph); stroke-opacity: .4; stroke-width: 1px; }

/* readout */
.cs-readout {
  flex: 1 0 100%;
  display: flex; flex-direction: column; align-items: center; gap: 8px;
  text-align: center;
}
.cs-readout p { margin: 0; font-family: var(--font-mono); line-height: 1.35; }
.cs-readout .cs-n-hero { font-size: 56px; font-weight: 600; line-height: 1; font-variant-numeric: tabular-nums; }
.cs-readout .cs-n-sub { font-size: 15px; font-weight: 300; color: rgba(var(--ink-rgb), .66); }
.cs-readout .cs-n-id { margin-top: 10px; font-size: 18px; font-weight: 600; color: var(--ink); }
.cs-readout .cs-n-note { font-size: 11.5px; font-weight: 300; color: var(--label-ink); }

@container (width <= 900px) {
  .cs-ladder-fig { flex-direction: column; }
  .cs-ladder { flex-basis: auto; width: 100%; max-width: none; }
}
@container (width <= 800px) {
  .cs-ladder { column-gap: 12px; }
  .cs-rung { flex-wrap: wrap; gap: 6px 8px; padding: 8px; }
  .cs-rung-name { order: 1; white-space: normal; font-size: 13px; line-height: 1.25; }
  .cs-rung-val { order: 2; flex: none; font-size: 13px; }
  .cs-track { order: 3; flex: 100%; }
}
@container (width <= 640px) {
  .cs-rung { padding-block: 5px; }
  .cs-out {
    display: flex; align-items: flex-start; justify-content: center; gap: 12px;
    width: 100%; margin-top: 16px;
  }
  .cs-grid { width: min(58%, 320px); min-width: 160px; }
  .cs-readout { flex: 1 1 108px; min-width: 108px; gap: 3px; }
}
