/* ── components.css — the named set, 2026-11-03 ───────────────────────

   WHY THIS FILE EXISTS. Thirteen templates CARRIED 37 inline
   attributes of the kind `style-src 'self'` silently discards, and they
   were there because there was nothing to reach for instead. This is
   the something: a small set of named components, so a page composes
   rather than improvises. As of 2026-11-11 no template carries one —
   the migration is done and the counter that proves it is empty by
   design, not disabled.

   LOADED BETWEEN tokens.css AND app.css, which is deliberate. At equal
   specificity the later sheet wins, so anything `app.css` already says
   about a name keeps saying it and no existing page moves. This file is
   additive for new pages and inert for old ones until they are migrated
   (UX-IMPLEMENTATION-PLAN v1 step 7).

   THREE OF THE EIGHT ARE ADOPTED, NOT DEFINED. `card` (12 rules, 18
   uses), `note` (4 rules, 82 uses) and `finding` already exist in
   `app.css` and are components in everything but name. Redefining them
   here would fight the sheet that wins, so they are named in the plan,
   documented here, and left where they are. The six below are the ones
   that did not exist at all.

   SCALES ARE NOT DECLARED HERE. `--s*` and `--t*` live with the page
   that owns them for now, because only `/preview` and `/admin` use them;
   they move into tokens.css when the first reader page migrates, and
   that is a brand edit rather than a component one.

   THE CLASS LIST — the contract for migrating the inline `style=`
   attributes (UI slice 1, Task 3). Use these names and no others; a
   name not listed here does not exist. Each is named for its JOB.

   ADOPTED from app.css (already defined there, do not redefine):
     small          replaces  style="font-size:.85rem;color:#666"  (7 <p>)
                    and       style="font-size:.85rem"             (2 <td>)

   SHARED (defined here from the first version, and ALSO composed by
   /preview and /admin, which got there first): band tint sub grid2
   grid3 stat fig lab basis-note none chip chips ring. Leave alone. A
   new class may not collide with any class a template or another
   sheet already uses; test_components enforces it.

   DEFINED below, spacing (a block that follows another):
     follow         replaces  style="margin:.6rem 0 0"             (9 <p>)
     follow-tight   replaces  style="margin:.4rem 0 0" (<ul>) and
                              style="margin-top:.4rem" (<table>)   (3)
     tuck           replaces  style="margin-top:-.6rem"             (1)
                    a note pulled up under the heading above it

   DEFINED below, text:
     hint           replaces  style="opacity:.7"  on the "— optional"
                    span after a label                              (5)
     no-value         replaces  style="opacity:.5"  on the dash that
                    stands for "not applicable"                     (1)

   DEFINED below, layout:
     actions        replaces  style="display:flex;gap:.6rem"        (2)
                    a row of buttons or links

   DEFINED below, table rows (put the class on the <tr>):
     current        replaces  style="background:#fff5e8"            (4)
                    the row for the period that is running now
     mismatch       replaces  style="background:#fdf0f0"            (1)
                    the row where two conventions disagree

   NOT COVERABLE BY A CLASS (2, both were in timing.html): the gantt
   bar's horizontal position and width, and the today marker's position.
   Their values are computed per render, so no fixed class can name them.
   They were resolved by moving the geometry into SVG attributes, which
   the CSP does not govern; timing.html now carries no inline style at all.

   MIGRATED NAMES ARE EXEMPT FROM THE COLLISION CHECK. The eight names
   above (follow, follow-tight, tuck, hint, no-value, actions, current,
   mismatch) are used in templates on purpose, so test_components keeps
   them in a literal MIGRATED set that the collision test skips. A ninth
   class is NOT exempt: if a template or sheet already uses its name, the
   test fails and the new class must be renamed.                    */

/* ── band: a full-width section with alternating ground ───────────── */
.band{padding:3rem 0}
.band.tint{background:var(--card);border-top:1px solid var(--hair);
           border-bottom:1px solid var(--hair)}
.band > h2{margin:0 0 .5rem}
.band .sub{color:var(--soft);margin:0 0 2rem;max-width:46ch}

/* ── grid2 / grid3: the only two column layouts ──────────────────── */
.grid2{display:grid;grid-template-columns:1fr 1fr;gap:1.5rem}
.grid3{display:grid;grid-template-columns:repeat(3,1fr);gap:1.5rem}

/* ── stat: a figure with its label, and room for its basis ────────── */
.stat{display:flex;flex-direction:column;gap:.15rem}
.stat .fig{font-family:var(--serif);font-size:2rem;line-height:1.1;
           color:var(--ink)}
.stat .lab{font-size:.875rem;color:var(--soft)}
.stat .basis-note{font-size:.8rem;color:var(--muted)}
/* A figure nobody has is an em dash, not a zero — no answers and no
   yeses are different facts (`/cohort/board` already states this). */
.stat .fig.none{color:var(--muted)}

/* ── chip: a small labelled pill ─────────────────────────────────── */
.chip{display:inline-block;background:var(--paper);
      border:1px solid var(--line);border-left-width:3px;
      border-radius:999px;padding:.4rem 1rem;font-size:.875rem;
      color:var(--soft)}
.chips{display:flex;flex-wrap:wrap;gap:.5rem}

/* ── ring: a graha-coloured circle, for steps and keys ───────────── */
.ring{display:grid;place-items:center;width:2.25rem;height:2.25rem;
      border-radius:50%;border:2px solid var(--ochre);color:var(--ink);
      font-family:var(--serif);font-weight:700}

@media (max-width:820px){
  .grid2,.grid3{grid-template-columns:1fr}
  .band{padding:2rem 0}
}

/* ── follow / follow-tight / tuck: the gap above a block ─────────── */
.follow{margin:.6rem 0 0}
.follow-tight{margin:.4rem 0 0}
.tuck{margin-top:-.6rem}

/* ── hint / no-value: quieter text, by colour and not by opacity ───────
   Opacity composites the text with whatever lies behind it, so its
   contrast depends on the ground; --muted is a measured pair. */
.hint,.no-value{color:var(--muted)}

/* ── actions: a row of buttons or links ──────────────────────────── */
.actions{display:flex;flex-wrap:wrap;gap:.6rem}

/* ── current / mismatch: a table row that is singled out ─────────────
   Both are told apart by more than colour: a left bar as well. */
tr.current{background:var(--warnbg)}
tr.current > :first-child{box-shadow:inset 3px 0 0 var(--ochre)}
tr.mismatch{background:var(--warnbg)}
tr.mismatch > :first-child{box-shadow:inset 3px 0 0 var(--warn)}

