/* Cagewise (domain Cagewise, refonte/DEV-rf-mini-d.md): the home cards, the grid, its cages and their labels.
   Prefixed classes, colours from the tokens of neurostim.css only. */
.cw-day { font-size: var(--ns-size-lg); font-weight: 400; }
.cw-cards { display: grid; grid-template-columns: repeat(auto-fit, minmax(12rem, 1fr)); gap: var(--ns-space-4); margin: 0 0 var(--ns-space-5); }
.cw-card { display: flex; flex-direction: column; gap: var(--ns-space-2); }
.cw-card h3 { margin: 0; }
.cw-card p, .cw-card form { margin: 0; }
.cw-time { font-size: var(--ns-size-2xl); font-weight: 700; font-variant-numeric: tabular-nums; color: var(--ns-text-strong); }
.cw-boards { display: grid; grid-template-columns: repeat(auto-fit, minmax(min(100%, 26rem), 1fr)); gap: 0 var(--ns-space-5); }
.cw-rules { margin-top: var(--ns-space-6); }
.cw-clock { margin: 0 0 var(--ns-space-3); text-align: center; font-size: var(--ns-size-xl); font-weight: 700; font-variant-numeric: tabular-nums; }

/* The grid: a square cell per digit (at least the touch target), a thick line between two cages, the label small in
   the top left corner of a cage. */
.cw-grid { width: min(100%, 26rem); margin: 0 auto var(--ns-space-4); table-layout: fixed; border-collapse: collapse; border: 3px solid var(--ns-ink); }
.cw-grid td { position: relative; min-width: var(--ns-target); padding: 0; text-align: center; border: 1px solid var(--ns-border); background: var(--ns-page); }
.cw-grid td.cw-t { border-top: 3px solid var(--ns-ink); }
.cw-grid td.cw-l { border-left: 3px solid var(--ns-ink); }
.cw-label { position: absolute; top: 2px; left: 3px; font-size: clamp(0.6rem, 2.6vw, 0.8rem); font-weight: 700; line-height: 1; color: var(--ns-text-strong); pointer-events: none; }
.cw-grid input { display: block; width: 100%; aspect-ratio: 1; min-height: var(--ns-target); margin: 0; padding: 0.6em 0 0; text-align: center; font-family: inherit; font-size: clamp(1.1rem, 5.5vw, 1.75rem); font-variant-numeric: tabular-nums; color: var(--ns-accent-darker); caret-color: transparent; background: transparent; border: 0; border-radius: 0; }
.cw-grid input:focus-visible { outline: 3px solid var(--ns-focus); outline-offset: -3px; }
.cw-grid .cw-same { background: var(--ns-accent-soft); }
.cw-grid .cw-bad input { color: var(--ns-error); background: var(--ns-error-soft); }
.cw-actions { display: flex; flex-wrap: wrap; gap: var(--ns-space-3); justify-content: center; }
