/* Claims register (Jordan, 12 Nov 2026): summary tiles, search and status filters, a sticky list of sections at
   desktop width, and one row per claim: status pill (word and icon), the claim, its proof under it, and any known
   gap as an inset note. The status text keeps its old reading order ("Proven: automated tests ..."); the colon
   after the pill is read aloud but not shown. */
.cl-row[hidden], .cl-sec[hidden], .cl-tools[hidden] { display: none; }

/* pills: a word and an icon, never colour alone; dark text on a light tint (AA) */
.cl-pill { display: inline-flex; align-items: center; gap: 6px; padding: 3px 10px 3px 8px; border-radius: 999px;
  font-size: 0.82rem; font-weight: 600; line-height: 1.4; white-space: nowrap; border: 1px solid transparent; }
.cl-pill--proven { background: var(--accent-soft); color: var(--accent-deep); border-color: #BCD8D2; }
.cl-pill--partly { background: #FBEBD7; color: #6B4310; border-color: var(--warm-deep); }
.cl-pill--untested { background: var(--card); color: var(--ink); border-color: #9DB0AB; }
.cl-ico { flex: none; }

/* summary */
.cl-summary { list-style: none; margin: var(--space-4) 0 var(--space-3); padding: 0; display: grid; gap: 12px;
  grid-template-columns: repeat(2, minmax(0, 1fr)); max-width: none; }   /* the full shell, like the filter row under it (audit A-20) */
.cl-tile { background: var(--card); border: 1px solid var(--line); border-radius: var(--r-tile); padding: 14px 16px;
  display: flex; flex-direction: column; gap: 4px; }
.cl-tile-n { font-family: var(--font-display); font-size: 2rem; line-height: 1.1; color: var(--accent-deep);
  font-variant-numeric: lining-nums tabular-nums; }   /* the counts sit on one line in every tile (audit A-19) */
.cl-tile-label { display: inline-flex; align-items: center; gap: 6px; font-weight: 600; font-size: 0.92rem; }
.cl-tile--proven .cl-tile-label { color: var(--accent-deep); }
.cl-tile--partly .cl-tile-label { color: #6B4310; }
.cl-tile--untested .cl-tile-label { color: var(--ink); }
.cl-tile--date { grid-column: 1 / -1; justify-content: center; background: transparent; border: 0; padding-inline: 4px; }   /* the date is a line of text beside the tiles, not a fourth tile */
.pg .cl-tile--date p { margin: 0; color: var(--ink-mute); font-size: 0.92rem; }
@media (min-width: 820px) {
  .cl-summary { grid-template-columns: repeat(3, minmax(0, 1fr)) minmax(0, 1.3fr); }
  .cl-tile--date { grid-column: auto; }
}
/* on a phone the three counts are one list, a count and its word on each line, with the date under them, so no tile
   sits alone in a half row (audit A-24) */
@media (max-width: 559px) {
  .cl-summary { grid-template-columns: minmax(0, 1fr); gap: 8px; }
  .cl-tile:not(.cl-tile--date) { flex-direction: row; align-items: center; gap: 14px; padding: 10px 16px; }
  .cl-tile:not(.cl-tile--date) .cl-tile-n { min-width: 1.6em; font-size: 1.7rem; }
}

/* search and filters (shown by claims.js; with scripts off the page is the full list) */
.cl-tools { display: flex; flex-wrap: wrap; align-items: center; gap: 12px 16px; margin: var(--space-3) 0 0;
  padding: 14px 0; border-top: 1px solid var(--line); border-bottom: 1px solid var(--line); }
.cl-search { display: flex; align-items: center; gap: 10px; flex: 1 1 18rem; }
.cl-search span { font-weight: 600; font-size: 0.92rem; white-space: nowrap; }
.cl-search input { flex: 1; min-width: 0; font: inherit; padding: 8px 12px; border: 1px solid #9DB0AB; border-radius: 10px;
  background: var(--card); color: var(--ink); }
.cl-search input:focus-visible, .cl-filters button:focus-visible { outline: 3px solid var(--accent); outline-offset: 2px; }
.cl-filters { display: flex; flex-wrap: wrap; gap: 6px; }
/* on a phone the four filters are two even rows, so "Not yet tested" never sits alone on a line (audit A-24) */
@media (max-width: 559px) {
  .cl-filters { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); width: 100%; }
  .cl-filters button { justify-content: center; }
}
.cl-filters button { display: inline-flex; align-items: center; gap: 6px; font: inherit; font-size: 0.88rem; font-weight: 600;
  padding: 6px 12px; border-radius: 999px; border: 1px solid #9DB0AB; background: var(--card); color: var(--ink); cursor: pointer; }
.cl-filters button[aria-pressed="true"] { background: var(--accent-deep); border-color: var(--accent-deep); color: #fff; }
.pg .cl-shown { margin: 0; flex-basis: 100%; font-size: 0.88rem; color: var(--ink-mute); }

/* sections, with a sticky list of them at desktop width */
.cl-layout { margin-top: var(--space-4); }
.cl-nav { display: none; }
@media (min-width: 1100px) {
  .cl-layout { display: grid; grid-template-columns: 15rem minmax(0, 1fr); gap: 48px; align-items: start; }
  .cl-nav { display: block; position: sticky; top: 80px; max-height: calc(100vh - 100px); overflow: auto; }
  .cl-nav ul { list-style: none; margin: 0; padding: 0; border-left: 1px solid var(--line); }
  .cl-nav a { display: flex; justify-content: space-between; gap: 10px; padding: 6px 0 6px 14px; font-size: 0.88rem;
    color: var(--ink); text-decoration: none; line-height: 1.35; }
  .cl-nav a:hover { color: var(--accent); }
  .cl-n { color: var(--ink-mute); font-variant-numeric: tabular-nums; }
}
.cl-sec { scroll-margin-top: 80px; }
.cl-sec + .cl-sec { margin-top: var(--space-5); }
.cl-sec-head { display: flex; flex-wrap: wrap; align-items: baseline; gap: 4px 14px; margin-bottom: 4px; }
.cl-sec-head h2 { margin: 0; }
.pg .cl-sub { margin: 0; flex-basis: 100%; order: 2; color: var(--ink-mute); font-size: 0.95rem; }   /* the qualifier under a shortened heading */
.pg .cl-counts { margin: 0; font-size: 0.88rem; color: var(--ink-mute); }

/* one row per claim */
.cl-row { position: relative; display: grid; grid-template-columns: 9.5rem minmax(0, 40rem); column-gap: 20px;
  grid-template-areas: "pill claim" ". proof" ". gap"; padding: 18px 0; border-top: 1px solid var(--line);
  scroll-margin-top: 80px; }
.cl-row:target { background: var(--accent-soft); }
.cl-row .cl-claim { grid-area: claim; margin: 0; color: var(--ink); }
.cl-status { display: contents; }
.cl-pill { grid-area: pill; justify-self: start; align-self: start; margin-top: 2px; }
.cl-sep { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
.cl-proof { grid-area: proof; margin-top: 6px; font-size: 0.9rem; line-height: 1.5; color: var(--ink-mute); }
.cl-proof:empty { display: none; }
.cl-proof::first-letter { text-transform: uppercase; }  /* shown after the pill; the text itself is unchanged */
.cl-row .cl-gap { grid-area: gap; margin: 10px 0 0; padding: 8px 12px; border-left: 3px solid #B26B1F; background: #FBF3E8;
  font-size: 0.9rem; line-height: 1.5; color: var(--ink); }
.cl-gap-label { font-weight: 700; color: #6B4310; }
.pg .claims-note { max-width: 32rem;   /* about 75 characters a line (Jordan, 12 Nov 2026) */
   margin: 0 0 12px; padding-bottom: 12px; border-bottom: 1px solid var(--line);   /* under the section heading (Jordan, 12 Nov 2026) */
  font-size: 0.9rem; color: var(--ink-mute); }

/* on a phone each claim is a stacked card */
@media (max-width: 640px) {
  .cl-row { grid-template-columns: minmax(0, 1fr); grid-template-areas: "pill" "claim" "proof" "gap"; row-gap: 8px;
    padding: 14px 16px; margin-top: 10px; border: 1px solid var(--line); border-radius: var(--r-tile); background: var(--card); }
  .cl-proof { margin-top: 0; }
  .cl-row .cl-gap { margin-top: 2px; }
  .cl-search { flex-wrap: wrap; }
  .cl-search span { flex-basis: 100%; }
}
