/*
 * The read-only requirement board (ADR-0090 §13, s1i). Rides the app's design tokens (tokens.css); the
 * `pv-` prefix keeps it out of the sessions/weaver namespace.
 *
 * ⚠ The DIVERGENCE block is the attention surface (§2.3): a diverged requirement must never read as a
 * healthy card at phase 0, so it is visually dominant — a warn-coloured rail on the card, above the phase.
 */
.pv-board { display: flex; flex-direction: column; gap: 8px; }
.pv-card {
  position: relative;
  background: var(--panel);
  border: 1px solid var(--border);
  border-radius: var(--r);
  padding: 10px 12px 8px;
}
.pv-card.pv-attention { border-color: var(--warn); box-shadow: inset 3px 0 0 var(--warn); }

/* The divergence rail — rule, the refused row, then the (escaped) detail. */
.pv-diverged { color: var(--warn); margin-bottom: 6px; }
.pv-diverged .pv-rule { font-family: var(--mono); font-weight: 600; }
.pv-detail { color: var(--muted); white-space: pre-wrap; word-break: break-word; margin-top: 3px; }

.pv-phase { font-weight: 600; color: var(--text); }
/* s1j: the plan-position line, below the phase line, in the ordinary style (never above the divergence). */
.pv-progress { color: var(--muted); font-family: var(--mono); font-size: 12px; margin-top: 2px; }
.pv-ver, .pv-age { color: var(--dim); font-family: var(--mono); font-size: 11px; }
.pv-age { margin-top: 2px; }

/* Stale is a MARK, never a hidden card (§2.4). */
.pv-stale { display: inline-block; margin-left: 6px; padding: 0 7px; border-radius: 20px; border: 1px solid var(--warn); color: var(--warn); font-family: var(--mono); font-size: 10px; font-weight: 600; text-transform: uppercase; letter-spacing: .12em; }

/* s1k: the PRE-FETCH panel — pending is its own state, not "loaded and empty". Its text says "Fetching",
   never "Loading" (the verify's settle predicate rejects that word). */
.pv-panel [data-pv-pending] { color: var(--muted); font-style: italic; }

/* The error PANEL stands in the board — never an empty board (§2.5). */
.pv-panel .pv-status { color: var(--dim); font-family: var(--mono); }
.pv-lastgood { color: var(--dim); font-size: 12px; margin-top: 4px; }

/* s6d: the board BY GROUP — one section per (device, store, group), newest event first, the "group unknown" section last.
   A stale group is MARKED in its header (the same .pv-stale badge a card uses), never collapsed or hidden (rule 4). */
.pv-group { display: flex; flex-direction: column; gap: 6px; }
.pv-group + .pv-group { margin-top: 10px; }
.pv-group-head { display: flex; flex-wrap: wrap; align-items: baseline; gap: 8px; padding-bottom: 3px; border-bottom: 1px solid var(--border); }
.pv-group-id { font-weight: 600; color: var(--text); }
.pv-group-device, .pv-group-store { color: var(--muted); font-family: var(--mono); font-size: 12px; }
.pv-group-count, .pv-group-age { color: var(--dim); font-family: var(--mono); font-size: 11px; }
.pv-group-head .pv-stale { margin-left: 0; }
.pv-group-unknown .pv-group-id { color: var(--muted); font-style: italic; font-weight: 400; }
.pv-group-cards { display: flex; flex-direction: column; gap: 8px; }

/* f1 rule 8: a card a human flag is waiting on — the danger colour, and its line first in the card. */
.pv-card.flagged { border-color: var(--err); box-shadow: 0 0 0 1px var(--err) inset; }
.pv-flag { color: var(--err); font-weight: 600; margin-bottom: 4px; }
.pv-flag-age, .pv-flag-more { color: var(--dim); font-weight: 400; }

/* c4: a card's actions row — at the card's foot. */
.pv-actions { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 8px; }
.pv-act { font-size: 12px; padding: 2px 8px; }
.pv-act:disabled { opacity: 0.5; cursor: progress; }

/* c5: the card's title, its Details toggle, and its open detail. */
.pv-title { font-weight: 600; margin-bottom: 4px; overflow-wrap: anywhere; }
.pv-detail-toggle { margin-top: 6px; }
.pv-detail-open { margin-top: 8px; padding-top: 8px; border-top: 1px solid var(--border, #8884); font-size: 12px; }
.pv-detail-title { font-weight: 600; margin-bottom: 6px; overflow-wrap: anywhere; }
.pv-slice { margin: 2px 0; overflow-wrap: anywhere; }
.pv-recent { margin: 6px 0 0; padding-left: 18px; }
