/* REQ-126: Requirements and Scope: board, table, swimlanes, the requirement page and its tabs. The colour tokens (:root) and shared components are in ../styles.css; this file never defines :root variables. */

.rs-draft { --st: var(--idle); --st-soft: var(--idle-soft); }
/* REQ-95.1 (Pablo): Suggested is neutral, never a work colour; its blurb muted. */
.rs-suggested { --st: var(--mute); --st-soft: var(--sunken); }
.rq-col.rs-suggested > .rq-blurb { color: var(--mute); }
.rq-suggested-by { display: flex; align-items: center; gap: 6px; margin: 4px 0 0; font-size: 12.5px; color: var(--mute); }
.rq-bulb { font-size: 14px; line-height: 1; }
.rs-to-review { --st: var(--review); --st-soft: var(--review-soft); }
.rs-ready { --st: var(--web); --st-soft: var(--web-soft); }
.rs-in-development { --st: var(--working); --st-soft: var(--working-soft); }
/* REQ-113 (Pablo): Fixing has its own colour, apart from In development, plus the wrench and the word. */
.rs-fixing { --st: var(--fixing); --st-soft: var(--fixing-soft); }
.rq-fixing { margin: 4px 0 0; font-size: 12.5px; }
.rq-fixing-line { margin: 0; font-weight: 700; color: var(--fixing); }
.rq-fixing-failed { list-style: none; display: flex; flex-wrap: wrap; gap: 4px 10px; margin: 2px 0 0; padding: 0; }
.rq-fixing-failed a { color: var(--ink); text-decoration: underline; }
.rq-fixing-more { color: var(--mute); }   /* 'and 3 more' on a board card: a count, not a control (Pablo on #255) */
.rq-fixing-banner { margin: 0 0 12px; padding: 10px 12px; border-radius: 10px; background: var(--fixing-soft); border-left: 4px solid var(--fixing); }
.rq-fixing-title { margin: 0; font-weight: 700; color: var(--ink); overflow-wrap: anywhere; }
.rs-closed { --st: var(--done); --st-soft: var(--done-soft); }
/* REQ-46: In QA, Ready for staging, Ready for release (ink on soft >= 4.5:1, light and dark). */
/* REQ-192.1: Waiting for a build. Pablo's olive pair (--build / --build-soft) comes with the
   next comarondo tokens release; until then it uses the staging pair, which no app uses after REQ-192.4. */
.rs-waiting-for-build { --st: var(--staging); --st-soft: var(--staging-soft); }
.rs-in-qa { --st: var(--qa); --st-soft: var(--qa-soft); }
.rs-ready-for-staging { --st: var(--staging); --st-soft: var(--staging-soft); }
.rs-ready-for-release { --st: var(--release); --st-soft: var(--release-soft); }
.rs-to-approve { --st: var(--needs); --st-soft: var(--needs-soft); }
.rs-waiting { --st: var(--meeting); --st-soft: var(--meeting-soft); }
.rq-waiting { margin: 2px 0 0; font-size: 12.5px; font-weight: 700; color: var(--meeting); }
.rq-assign { display: flex; align-items: center; gap: 8px; margin: 6px 0 0; font-size: 13px; color: var(--mute); }
.rq-assign select { max-width: 100%; }
.rs-blocked { --st: var(--blocked); --st-soft: var(--blocked-soft); }
/* Rejected is done with, so grey; red now means Blocked. */
.rs-rejected { --st: var(--idle); --st-soft: var(--idle-soft); }
/* Swimlanes by epic: a row of status columns per epic. */
.rq-board.rq-lanes { display: flex; flex-direction: column; align-items: stretch; gap: 18px; overflow: visible; }
.rq-lane { border: 1px solid var(--line); border-radius: 18px; padding: 12px; background: var(--panel); min-width: 0; }
.rq-lane.done { opacity: .75; }
.rq-lane-head { display: flex; flex-wrap: wrap; align-items: center; gap: 8px 12px; margin-bottom: 6px; }
.rq-lane-head h2, .rq-lane-head h3 { font: 800 18px/1.2 var(--font-display); margin: 0; flex: 1 1 auto; min-width: 0; }
/* REQ-12: Group by. Lanes and table groups fold with a 44 px chevron; a
   sub-lane is an indented band with an h4. */
.rq-lane-head h4 { font: 800 15px/1.2 var(--font-display); margin: 0; flex: 1 1 auto; min-width: 0; }
.rq-sublane { margin: 10px 0 0 16px; padding: 8px 10px 10px; border-radius: 14px; background: var(--sunken); border-color: var(--line); }
.rq-sublane .rq-col { background: var(--panel); }
.rq-also { margin: 0; font-size: 12px; color: var(--mute); }
.rq-group { display: flex; flex-wrap: wrap; align-items: flex-end; gap: 8px; }
.rq-group .rq-sel select { min-height: 44px; }
.rq-group-hint { flex-basis: 100%; font-size: 12px; color: var(--mute); }
.rq-tbl .rq-grp th { padding: 2px 10px; background: var(--sunken); text-transform: none; letter-spacing: 0; color: var(--ink); white-space: normal; font: inherit; }
.rq-grp-line { display: flex; align-items: center; gap: 8px; }
.rq-grp-line .rq-lane-toggle { margin: 0 0 0 -6px; }
.rq-grp-line b { font: 800 14px/1.2 var(--font-display); }
.rq-tbl .rq-grp.lvl2 th { background: var(--panel); }
.rq-grp.lvl2 .rq-grp-line { padding-left: 16px; }
.rq-grp.lvl2 .rq-grp-line b { font-size: 13px; }
@media (max-width: 760px) { .rq-group { flex-direction: column; align-items: stretch; } .rq-group .rq-sel select { max-width: none; width: 100%; } .rq-sublane { margin-left: 8px; } }
.rq-lane-meta { color: var(--mute); font-size: 13px; }
.rq-lane-bar { flex: 0 0 120px; height: 6px; border-radius: 999px; background: var(--sunken); overflow: hidden; }
.rq-lane-bar i { display: block; height: 100%; background: var(--done); }
.rq-lane-body > .rq-blurb { margin: 0 0 10px; }
/* REQ-40: collapsing a swimlane. A collapsed lane is just its header line. */
.rq-lane-toggle { flex: none; width: 44px; height: 44px; margin: -6px 0 -6px -6px; display: inline-grid; place-items: center; border: 0; border-radius: 12px; background: transparent; color: var(--mute); cursor: pointer; font-size: 16px; }
.rq-lane-toggle:hover { background: var(--accent-soft); color: var(--ink); }
.rq-lane-toggle:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; }
.rq-lane-chev { display: inline-block; transition: transform .15s ease; }
.rq-lane.collapsed .rq-lane-chev, .rq-lane-toggle[aria-expanded="false"] .rq-lane-chev { transform: rotate(-90deg); }
.rq-lane.collapsed { background: var(--sunken); }
.rq-lane.collapsed .rq-lane-head { margin-bottom: 0; }
.rq-lane-all { display: inline-flex; gap: 6px; }
.rq-lane-all[hidden] { display: none; }
.rq-lane-all .btn { min-height: 44px; }
@media (prefers-reduced-motion: reduce) { .rq-lane-chev { transition: none; } }
/* In a swimlane the status columns wrap instead of scrolling sideways, so
   every requirement in the lane is on screen; empty statuses shrink to a
   small box (still a drop target). Phones stack the columns anyway. */
@media (min-width: 761px) {
  .rq-board.rq-lane-row { display: flex; flex-wrap: wrap; align-items: flex-start; overflow-x: visible; }
  .rq-board.rq-lane-row > .rq-col { flex: 1 1 240px; min-width: 240px; max-width: 100%; }
  /* REQ-48: an empty or collapsed status is a 44 px strip (replaces the 150 px box of #11; ISS-45: was 48). */
  .rq-board.rq-lane-row > .rq-col.rq-strip { flex: 0 0 44px; min-width: 44px; align-self: stretch; }
}
.rq-head-act { display: flex; flex-wrap: wrap; align-items: center; gap: 10px; }
.rq-head-act .btn { padding: 11px 16px; font-size: 14px; }
.rq-filters { display: flex; flex-wrap: wrap; align-items: flex-end; gap: 10px; background: var(--panel); border: 1px solid var(--line); border-radius: 16px; padding: 12px; }
.rq-search { flex: 1 1 260px; display: flex; min-width: 0; }
.rq-search .field { width: 100%; }
.rq-filter-sel { display: flex; flex-wrap: wrap; gap: 8px; min-width: 0; }
.rq-sel { display: flex; flex-direction: column; gap: 3px; font: 700 10.5px/1.2 var(--font-mono); letter-spacing: .1em; text-transform: uppercase; color: var(--faint); min-width: 0; }
.rq-sel select { max-width: 180px; }
.rq-count { margin: -14px 0 -10px; font: 600 12px/1.4 var(--font-mono); color: var(--faint); }
.rq-pill { display: inline-flex; align-items: center; font: 700 10.5px/1 var(--font-mono); letter-spacing: .05em; text-transform: uppercase; padding: 4px 8px; border-radius: 999px; white-space: nowrap; color: var(--mute); background: var(--sunken); }
.rq-pill.rs { color: var(--st); background: var(--st-soft); }
.pr-must { color: var(--blocked); background: var(--blocked-soft); }
.pr-should { color: var(--needs); background: var(--needs-soft); }
.pr-could { color: var(--working); background: var(--working-soft); }
.pr-wont { color: var(--idle); background: var(--idle-soft); }
.rq-q { color: var(--panel); background: var(--needs); }
.rq-cm { color: var(--review); background: var(--review-soft); }
.ck { text-transform: none; letter-spacing: 0; font-weight: 600; }
.ck-ok { color: var(--done); background: var(--done-soft); }
.ck-questions, .ck-changes { color: var(--needs); background: var(--needs-soft); }
.rq-id { font: 800 12px/1 var(--font-mono); color: var(--ink); white-space: nowrap; }
/* REQ-43: 'New' on a requirement that moved in the last hour. */
.rq-new { display: inline-flex; align-items: center; padding: 3px 7px; border-radius: 999px; background: var(--accent-soft); color: var(--accent); font: 700 11.5px/1 var(--font-body); white-space: nowrap; cursor: default; }
.rq-new:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; }
.rq-none { font-size: 12px; color: var(--faint); }

/* Board: columns scroll sideways inside their own box; stacked on phones. */
.rq-board { display: grid; grid-auto-flow: column; grid-auto-columns: minmax(260px, 1fr); grid-template-columns: var(--rq-cols, none); gap: 12px; overflow-x: auto; padding-bottom: 8px; align-items: start; scrollbar-width: thin; }
.rq-col { background: var(--sunken); border: 1px solid var(--line); border-top: 4px solid var(--st); border-radius: 16px; padding: 10px; display: flex; flex-direction: column; gap: 8px; min-width: 0; }
.rq-col.collapsed { opacity: .85; }
/* REQ-48: an empty column is a narrow strip: glyph, '0' and its name, read
   out as '<status>, empty'; a column collapsed by hand looks the same but
   keeps its toggle. On a wide board the name runs top to bottom; phones
   stack the columns, so there the strip is one short row. */
.rq-col.rq-strip { padding: 8px 2px; gap: 6px; align-items: center; opacity: 1; }
.rq-col.rq-strip:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; }
.rq-strip-top { display: flex; flex-direction: column; align-items: center; gap: 6px; }
.rq-strip-top .rs-glyph { font-style: normal; color: var(--st); }
.rq-strip-name { font: 800 14px/1.2 var(--font-display); color: var(--mute); white-space: nowrap; }
.rq-strip .rq-col-head { flex-direction: column; justify-content: flex-start; gap: 6px; min-width: 40px; min-height: 44px; padding: 2px 0; }
.rq-strip .rq-col-head b { flex: none; font-size: 14px; white-space: nowrap; }
.rq-strip .rq-strip-link { align-self: center; justify-content: center; min-width: 40px; padding: 0; }
@media (min-width: 761px) {
  .rq-col.rq-strip { align-self: stretch; min-height: 180px; }
  .rq-strip-name, .rq-strip .rq-col-head b { writing-mode: vertical-rl; }
}
@media (max-width: 760px) {
  .rq-col.rq-strip, .rq-strip-top, .rq-strip .rq-col-head { flex-direction: row; }
  .rq-col.rq-strip { min-height: 44px; padding: 4px 10px; }
  .rq-strip-name { flex: 1; color: var(--ink); }
  .rq-strip .rq-col-head { width: 100%; }
  .rq-strip .rq-col-head b { flex: 1; }
}
.rq-col-head { display: flex; align-items: center; gap: 8px; width: 100%; padding: 2px; border: 0; background: none; color: var(--ink); font: inherit; text-align: left; cursor: pointer; border-radius: 8px; }
.rq-col-head b { font: 800 16px/1.2 var(--font-display); flex: 1; min-width: 0; }
.rq-col-head:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; }
.rq-dot { width: 10px; height: 10px; border-radius: 50%; background: var(--st); flex: none; }
.rq-n { font: 700 12px/1 var(--font-mono); color: var(--mute); background: var(--panel); padding: 4px 7px; border-radius: 999px; }
.rq-chev { color: var(--faint); font-size: 12px; }
.rq-blurb { margin: -2px 0 0; font-size: 12.5px; color: var(--mute); }
.rq-col-body { display: flex; flex-direction: column; gap: 8px; min-height: 40px; border-radius: 12px; }
.rq-col-body.drop-end { box-shadow: inset 0 -3px 0 var(--accent); }
.rq-empty { margin: 0; color: var(--mute); font-size: 13.5px; padding: 6px 4px; }
.rq-card { background: var(--panel); border: 1px solid var(--line); border-left: 4px solid var(--st); border-radius: 12px; padding: 10px 12px; display: flex; flex-direction: column; gap: 7px; min-width: 0; cursor: pointer; }
.rq-card:hover { border-color: color-mix(in srgb, var(--accent) 40%, var(--line)); border-left-color: var(--st); }
.rq-card[draggable="true"] { cursor: grab; }
.rq-card.dragging, tr.dragging { opacity: .45; }
.rq-card.drop-before { box-shadow: 0 -3px 0 var(--accent); }
.rq-card-top { display: flex; align-items: center; flex-wrap: wrap; gap: 6px; }
.rq-title { color: var(--ink); text-decoration: none; font-weight: 700; font-size: 14.5px; line-height: 1.3; overflow-wrap: anywhere; }
.rq-title:hover { text-decoration: underline; }
.rq-title:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; border-radius: 4px; }
.rq-meta { display: flex; flex-wrap: wrap; gap: 4px; }
.rq-meta .chip { font-size: 11px; padding: 2px 7px; }
.rq-pmarks { display: inline-flex; gap: 2px; }
/* REQ-93.2: one release per product (the form's fields, the page's rows). */
.rq-releases { display: flex; flex-wrap: wrap; gap: 8px; margin: 0; padding: 0; border: 0; }
.rq-releases legend { padding: 0; margin-bottom: 4px; font: 700 11px/1.2 var(--font-mono); letter-spacing: .1em; text-transform: uppercase; color: var(--mute); }
.rq-rel { display: flex; flex-direction: column; gap: 2px; min-width: 140px; flex: 1; font-size: 12.5px; font-weight: 600; color: var(--mute); }
.rq-rel-rows { list-style: none; margin: 0; padding: 0; display: grid; gap: 2px; }
.rq-rel-rows li.shipped { color: var(--ink); font-weight: 600; }
.rq-pm { font: 700 10.5px/1 var(--font-mono); letter-spacing: .04em; padding: 4px 5px; border-radius: 6px; background: var(--accent-soft); color: var(--ink); }
.rq-card-foot { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 6px; }
.rq-owners { display: inline-flex; align-items: center; }
.rq-owners img { border-radius: 50%; border: 2px solid var(--panel); margin-left: -6px; background: var(--sunken); }
.rq-owners img:first-child { margin-left: 0; }
.rq-checks { display: inline-flex; flex-wrap: wrap; gap: 4px; }
.rq-rank { margin-left: auto; display: inline-flex; gap: 4px; }

/* Table: scrolls inside its own box on narrow screens. */
.rq-table-wrap { overflow-x: auto; background: var(--panel); border: 1px solid var(--line); border-radius: 16px; }
.rq-tbl { width: 100%; border-collapse: collapse; font-size: 13.5px; min-width: 920px; }
.rq-tbl th { text-align: left; font: 700 10.5px/1.2 var(--font-mono); letter-spacing: .1em; text-transform: uppercase; color: var(--faint); padding: 10px; border-bottom: 1px solid var(--line); white-space: nowrap; }
.rq-tbl td { padding: 8px 10px; border-top: 1px solid var(--line); vertical-align: middle; }
.rq-tbl tr[draggable="true"] { cursor: grab; }
.rq-tbl tr.drop-before td { box-shadow: inset 0 3px 0 var(--accent); }
.rq-tbl tbody.drop-end tr:last-child td { box-shadow: inset 0 -3px 0 var(--accent); }
.rq-tbl td.num { font: 700 12px/1 var(--font-mono); color: var(--mute); font-variant-numeric: tabular-nums; }
.rq-tbl td.tt { min-width: 220px; }
.rq-tbl tbody tr:hover td { background: color-mix(in srgb, var(--accent-soft) 45%, transparent); }

/* Detail panel and the new-requirement form: a drawer on the right, full screen on phones. */
body.rq-modal { overflow: hidden; }
.rq-phead { position: relative; display: flex; flex-direction: column; gap: 8px; align-items: stretch; padding: 16px 60px 14px 20px; background: var(--panel); border-bottom: 1px solid var(--line); flex: none; }
.rq-phead h2 { margin: 0; font: 800 22px/1.2 var(--font-display); overflow-wrap: anywhere; }
.rq-pline { display: flex; flex-wrap: wrap; align-items: center; gap: 6px; }
.rq-edit { margin-left: auto; padding: 6px 14px; font-size: 13px; }
.rq-x { position: absolute; top: 12px; right: 14px; width: 36px; height: 36px; font-size: 15px; }
.rq-pbody { flex: 1; min-height: 0; overflow-y: auto; padding: 16px 20px 40px; display: flex; flex-direction: column; gap: 18px; }
.rq-sec { display: flex; flex-direction: column; gap: 8px; min-width: 0; }
.rq-sec h3 { margin: 0; font: 700 11px/1.2 var(--font-mono); letter-spacing: .14em; text-transform: uppercase; color: var(--faint); }
.rq-text { margin: 0; white-space: pre-wrap; overflow-wrap: anywhere; }
.rq-moves { display: flex; flex-direction: column; gap: 8px; background: var(--panel); border: 1px solid var(--line); border-radius: 14px; padding: 12px; }
.rq-note { flex: none; width: 100%; resize: vertical; font-weight: 500; }
.rq-move-btns { display: flex; flex-wrap: wrap; gap: 8px; }
.rq-move-btns .btn { padding: 10px 14px; font-size: 13.5px; }
.rq-confirm { border-radius: 12px; padding: 12px; background: var(--needs-soft); color: var(--ink); display: flex; flex-direction: column; gap: 6px; }
.rq-confirm ul, .rq-gate ul { margin: 0; padding-left: 20px; }
.rq-confirm p { margin: 0; }
.rq-gate { border-radius: 12px; padding: 10px 12px; font-size: 14px; }
.rq-gate.ok { background: var(--done-soft); color: var(--done); }
.rq-gate.gaps { background: var(--needs-soft); color: var(--ink); }
.rq-gate.gaps b { color: var(--needs); }
.rq-dl { margin: 0; display: grid; grid-template-columns: max-content minmax(0, 1fr); gap: 6px 14px; font-size: 14px; background: var(--panel); border: 1px solid var(--line); border-radius: 14px; padding: 12px 14px; }
.rq-dl dt { font: 700 10.5px/1.9 var(--font-mono); letter-spacing: .1em; text-transform: uppercase; color: var(--faint); }
.rq-dl dd { margin: 0; overflow-wrap: anywhere; }
.rq-owner-list, .rq-links { display: flex; flex-wrap: wrap; gap: 6px; }
.rq-links .ref { font: 700 12.5px/1.6 var(--font-mono); color: var(--accent); }
.rq-proto figure { margin: 0; display: flex; flex-direction: column; gap: 4px; }
.rq-proto img { display: block; max-width: 100%; max-height: 360px; border-radius: 10px; border: 1px solid var(--line); background: var(--panel); }
.rq-proto figcaption a { color: var(--accent); overflow-wrap: anywhere; font-size: 13.5px; }
.rq-story { background: var(--panel); border: 1px solid var(--line); border-radius: 14px; padding: 12px 14px; display: flex; flex-direction: column; gap: 6px; }
.rq-story-h { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; }
.rq-by { font: 600 11.5px/1.3 var(--font-mono); color: var(--faint); }
.rq-story h4 { margin: 4px 0 0; font: 700 10.5px/1.2 var(--font-mono); letter-spacing: .12em; text-transform: uppercase; color: var(--faint); }
.rq-story ol { margin: 0; padding-left: 22px; display: flex; flex-direction: column; gap: 3px; font-size: 14px; }
.rq-story .warn { margin: 0; color: var(--needs); font-weight: 700; font-size: 13.5px; }
.rq-comments, .rq-replies { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 10px; }
.rq-replies { margin-top: 8px; padding-left: 14px; border-left: 2px solid var(--line); }
.rq-c { background: var(--panel); border: 1px solid var(--line); border-radius: 12px; padding: 10px 12px; min-width: 0; }
.rq-replies .rq-c { background: var(--sunken); }
.rq-c.open { border-color: color-mix(in srgb, var(--needs) 55%, transparent); }
.rq-c-h { display: flex; flex-wrap: wrap; align-items: center; gap: 6px; font-size: 13px; margin-bottom: 4px; }
.rq-c-h b { font-family: var(--font-mono); font-size: 12px; overflow-wrap: anywhere; }
.rq-c-h time { font: 600 11.5px/1 var(--font-mono); color: var(--faint); }
.kind.k-question { color: var(--review); background: var(--review-soft); }
.kind.k-answer { color: var(--done); background: var(--done-soft); }
.kind.k-ux { color: var(--meeting); background: var(--meeting-soft); }
.qs.open { color: var(--needs); background: var(--needs-soft); }
.qs.done { color: var(--done); background: var(--done-soft); }
.qs.wait { color: var(--review); background: var(--review-soft); }
.kind.k-comment { color: var(--accent); background: var(--accent-soft); }
/* REQ-125: the after-deploy steps on the Work tab. State in words with a shape (Pablo). */
.rq-after-list { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 8px; }
.rq-after-row { display: grid; grid-template-columns: minmax(120px, auto) 1fr auto; gap: 6px 12px; align-items: start; padding: 10px 12px; border: 1px solid var(--line); border-radius: 12px; background: var(--panel); min-width: 0; }
.rq-after-who { display: flex; align-items: center; gap: 6px; font-size: 13px; }
.rq-after-who img { border-radius: 50%; }
.rq-after-what { display: flex; flex-wrap: wrap; align-items: center; gap: 6px; min-width: 0; }
.rq-after-what code { font-family: var(--font-mono); font-size: 12.5px; background: var(--sunken); padding: 3px 6px; border-radius: 6px; overflow-wrap: anywhere; }
.rq-after-copy { min-height: 44px; padding: 6px 12px; font-size: 13px; }
.rq-after-check { grid-column: 2 / 3; margin: 0; color: var(--mute); font-size: 13px; overflow-wrap: anywhere; }
.rq-after-state { grid-column: 3; grid-row: 1; font: 700 12px/1.3 var(--font-mono); white-space: nowrap; }
.rq-after-row.s-done .rq-after-state { color: var(--done); }
.rq-after-row.s-todo { border-color: color-mix(in srgb, var(--needs) 55%, transparent); }
.rq-after-row.s-todo .rq-after-state { color: var(--needs); }
.rq-after-row.s-waiting .rq-after-state { color: var(--mute); }
.rq-after-block { color: var(--needs); font-weight: 600; }
@media (max-width: 600px) { .rq-after-row { grid-template-columns: 1fr; } .rq-after-check, .rq-after-state { grid-column: auto; grid-row: auto; } }
/* REQ-133: the Documents tab. The kind as a chip in words; a private one with a lock and words (Pablo). */
.rq-docs-bar { display: flex; justify-content: flex-end; margin-bottom: 8px; }
.rq-docs-add, .rq-docs-how, .rq-doc-foot .btn { min-height: 44px; }
.rq-docs-empty { margin: 4px 0 10px; }
.rq-docs-hint { margin: 10px 0 0; }
.rq-docs-how { padding: 6px 4px; font-size: 13.5px; text-decoration: underline; text-underline-offset: 3px; }
.rq-docs-list { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 8px; }
.rq-doc { padding: 10px 12px; border: 1px solid var(--line); border-radius: 12px; background: var(--panel); display: flex; flex-direction: column; gap: 4px; min-width: 0; }
.rq-doc-top { display: flex; flex-wrap: wrap; align-items: center; gap: 6px 10px; min-width: 0; }
.rq-doc-menu { margin-left: auto; }   /* REQ-216.10.3: the document's ⋯, at the right of its title */
.rq-doc-kind { display: inline-flex; align-items: center; border-radius: 999px; padding: 0 9px; font: 600 12px/1.8 var(--font-mono); border: 1px solid var(--line); color: var(--ink); background: var(--sunken); }
.rq-doc-kind.k-design { color: var(--review); background: var(--review-soft); }
.rq-doc-kind.k-spec { color: var(--working); background: var(--working-soft); }
.rq-doc-kind.k-research { color: var(--done); background: var(--done-soft); }
.rq-doc-title { color: var(--accent); text-underline-offset: 3px; font-weight: 700; font-size: 15px; overflow-wrap: anywhere; min-height: 24px; display: inline-flex; align-items: center; }
.rq-doc-private { margin: 0; font-size: 13px; font-weight: 600; color: var(--mute); }
.rq-doc-meta { margin: 0; color: var(--mute); font-size: 13px; line-height: 24px; }
.rq-doc-meta img { border-radius: 50%; vertical-align: middle; margin: 0 4px 2px 2px; }
.rq-doc-meta b { color: var(--ink); }
.rq-doc-form { display: flex; flex-direction: column; gap: 10px; padding: 12px; border: 1px solid var(--line); border-radius: 12px; background: var(--sunken); margin-bottom: 8px; }
.rq-doc-field { display: flex; flex-direction: column; gap: 4px; min-width: 0; }
.rq-doc-field label { font-weight: 600; font-size: 13px; }
.rq-doc-field input, .rq-doc-field select { min-height: 44px; font: inherit; padding: 8px 10px; border-radius: 8px; border: 1px solid var(--line); background: var(--panel); color: var(--ink); min-width: 0; width: 100%; box-sizing: border-box; }
.rq-doc-field [aria-invalid="true"] { border-color: var(--blocked); }
.rq-doc-err { margin: 0; font-size: 13px; }
.rq-doc-priv { display: flex; align-items: center; gap: 8px; min-height: 44px; font-size: 14px; }
.rq-doc-priv input { width: 20px; height: 20px; }
.rq-doc-foot { display: flex; justify-content: flex-end; gap: 8px; }
/* REQ-109: the thread newest first: its label, the 'new comments' pill, new-reply marks, reply context. */
.rq-tlist { display: flex; flex-direction: column; gap: 8px; min-width: 0; }
.rq-order { margin: 4px 0 0; font: 700 10.5px/1.2 var(--font-mono); letter-spacing: .12em; text-transform: uppercase; color: var(--faint); }
.rq-newpill { position: sticky; top: calc(var(--rq-stick, 0px) + 8px); z-index: 2; align-self: center; min-height: 44px; padding: 8px 16px; border-radius: 999px; border: 1px solid var(--accent); background: var(--accent-soft); color: var(--accent); font: 700 13px/1 var(--font-sans, inherit); cursor: pointer; }
.rq-newpill:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; }
.rq-newreply { color: var(--accent); background: var(--accent-soft); }
.rq-newest { color: var(--needs); background: var(--needs-soft); }
.rq-c.newest { border-color: var(--accent); border-width: 2px; }
.rq-replyto { font-size: 12px; color: var(--mute); }
.rq-sthread { display: flex; flex-direction: column; gap: 8px; margin-top: 4px; padding-top: 8px; border-top: 1px dashed var(--line); }
.rq-sthread .rq-c { background: var(--sunken); }
.rq-sthread .rq-cform { margin-top: 0; }
.rq-cbtn { padding: 7px 12px; font-size: 13px; }
.rq-answer, .rq-cform { margin-top: 8px; display: flex; flex-wrap: wrap; gap: 8px; align-items: flex-end; }
.rq-answer textarea, .rq-cform textarea { flex: 1 1 220px; resize: vertical; font-weight: 500; }
.rq-answer .btn, .rq-cform .btn { padding: 10px 16px; font-size: 13.5px; }
.rq-answer .err, .rq-cform .err { flex-basis: 100%; margin: 0; }
details.rq-notes summary { cursor: pointer; font: 700 11px/1.2 var(--font-mono); letter-spacing: .14em; text-transform: uppercase; color: var(--faint); }
details.rq-notes pre { white-space: pre-wrap; overflow-wrap: anywhere; margin-top: 8px; }
.rq-fgrid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 12px 14px; align-content: start; }
.rq-f { display: flex; flex-direction: column; gap: 4px; min-width: 0; }
.rq-f > label { font: 700 11px/1.2 var(--font-mono); letter-spacing: .1em; text-transform: uppercase; color: var(--mute); }
.rq-f .field { flex: none; width: 100%; font-weight: 500; }
.rq-f textarea.field { resize: vertical; }
.rq-f-title, .rq-f-why, .rq-f-what, .rq-f-prototype, .rq-f-devices, .rq-f-owners, .rq-formerr { grid-column: 1 / -1; }
.rq-f [aria-invalid="true"] { border-color: var(--blocked); box-shadow: 0 0 0 1px var(--blocked); }
.rq-hint { margin: 0; font-size: 12.5px; color: var(--faint); }
.rq-ferr { margin: 0; font-size: 13px; font-weight: 700; color: var(--blocked); }
.rq-boxes { display: flex; flex-wrap: wrap; gap: 6px; margin: 0; padding: 0; border: 0; border-radius: 10px; }
.rq-box { display: inline-flex; align-items: center; gap: 4px; padding: 7px 10px; border-radius: 999px; background: var(--panel); border: 1px solid var(--line); font-size: 13.5px; font-weight: 600; cursor: pointer; }
.rq-box:has(input:checked) { background: var(--accent-soft); border-color: var(--accent); }
.rq-box input { accent-color: var(--accent); margin: 0; }
/* REQ-93.1: the Products fieldset (its legend looks like the other labels; 44 px chips) and the card marks. */
.rq-products { gap: 8px; }
.rq-products legend { padding: 0; margin-bottom: 4px; font: 700 11px/1.2 var(--font-mono); letter-spacing: .1em; text-transform: uppercase; color: var(--mute); }
.rq-pbox { min-height: 44px; padding: 0 14px; }
.rq-products[aria-invalid="true"] { padding: 4px; }
.rq-ffoot { flex: none; display: flex; flex-wrap: wrap; align-items: center; justify-content: flex-end; gap: 10px; padding: 12px 20px; border-top: 1px solid var(--line); background: var(--panel); }
.rq-ffoot .rq-hint { margin-right: auto; }
.rq-ffoot .btn { padding: 11px 16px; font-size: 14px; }

@media (max-width: 760px) {
  .rq-board { grid-auto-flow: row; grid-auto-columns: auto; grid-template-columns: minmax(0, 1fr); overflow-x: visible; }
  .rq-filter-sel { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); width: 100%; }
  .rq-sel select { max-width: none; width: 100%; }
  .rq-head-act { width: 100%; justify-content: space-between; }
  .rq-phead { padding: 14px 56px 12px 16px; }
  .rq-pbody { padding: 14px 16px 32px; }
  .rq-fgrid { grid-template-columns: minmax(0, 1fr); }
  .rq-ffoot { padding: 10px 16px; }
}
/* REQ-46: the release path's glyphs (⧗ Waiting for a build, ⌕ In QA, ▣ Ready for staging, ★ Ready for release) next to the label. */
.rs-glyph { font-style: normal; margin-right: 4px; color: var(--st, inherit); }
/* REQ-53: a story built by a merged PR, and the automation's own history rows. */
.rq-built { display: inline-flex; align-items: center; min-height: 28px; padding: 2px 10px; border-radius: 999px; background: var(--done-soft); color: var(--done); font: 700 12px/1.2 var(--font-body); text-decoration: none; }
a.rq-built:hover { text-decoration: underline; }
a.rq-built:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; }
.rq-auto { font-weight: 700; color: var(--mute); }
.rq-undo { min-height: 44px; margin-top: 4px; }
/* REQ-54: only an agent picks work up. */
.rq-pickup { margin: 6px 0 0; color: var(--faint); font-size: 12px; }
.rq-col.rq-nodrop { opacity: .6; cursor: not-allowed; }
.rq-col.rq-nodrop * { cursor: not-allowed; }
.rq-picked { display: inline-flex; align-items: center; gap: 6px; font-weight: 700; }
.rq-picked-av { width: 20px; height: 20px; border-radius: 50%; }
.rq-col-link { align-self: flex-start; display: inline-flex; align-items: center; min-height: 44px; padding: 0 4px; font: 700 13px/1 var(--font-body); color: var(--accent); }
.rq-card:has(.idv-nobody) { box-shadow: inset 3px 0 0 var(--needs); }
.rq-journey { margin-left: 4px; }
/* REQ-83: the requirement timeline (Pablo's notes). A side panel of
   max(480px, 40%); a time axis (status lane + markers, aria-hidden) over
   the ordered list of sentences; on a phone only the list. */
.tl-open { min-height: 44px; display: inline-flex; align-items: center; gap: 2px; padding: 0 12px; font-size: 13px; white-space: nowrap; }
.rq-card .rq-card-tl { align-self: flex-start; margin-top: 2px; }
.rq-tbl .rq-row-tl { padding: 0 10px; }
.tl-panel { width: max(480px, 40vw); }
.tl-head .tl-x { position: absolute; top: 12px; right: 12px; width: 44px; height: 44px; }
.tl-filter { flex-wrap: wrap; align-self: flex-start; }
.tl-filter button { min-height: 44px; }
.tl-body { gap: 14px; }
.tl-count, .tl-none, .tl-hidden { margin: 0; color: var(--mute); font-size: 13.5px; }
.tl-hidden { font-style: italic; }
.tl-axis { flex: none; overflow-x: auto; border: 1px solid var(--line); border-radius: 12px; background: var(--panel); padding: 0 10px 8px; }
.tl-axis-in { position: relative; min-height: 132px; margin: 0 22px; }
.tl-ruler { position: sticky; top: 0; height: 22px; border-bottom: 1px solid var(--line); background: var(--panel); z-index: 2; }
.tl-ruler span { position: absolute; top: 4px; transform: translateX(-50%); font: 600 11px/1 var(--font-mono); color: var(--faint); white-space: nowrap; }
.tl-ruler span:first-child { transform: none; }
.tl-lane { position: relative; height: 34px; margin-top: 8px; }
.tl-band { position: absolute; top: 0; bottom: 0; box-sizing: border-box; border-radius: 6px; background: var(--st-soft, var(--sunken)); border: 1px solid var(--st, var(--line)); color: var(--ink); overflow: hidden; display: flex; align-items: center; padding: 0 6px; gap: 6px; }
.tl-band.current { border-right: 2px dashed var(--st, var(--line)); border-top-right-radius: 0; border-bottom-right-radius: 0; }
.tl-band.long { box-shadow: inset 0 -3px 0 var(--needs); }
.tl-band-name { font: 700 11px/1.2 var(--font-body); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.tl-now { margin-left: auto; font: 700 10px/1 var(--font-mono); text-transform: uppercase; color: var(--mute); }
.tl-marks { position: relative; height: 56px; margin-top: 6px; }
.tl-mark { position: absolute; top: 4px; width: 44px; height: 44px; margin-left: -22px; border-radius: 50%; border: 1px solid var(--line); background: var(--panel); color: var(--ink); font-size: 14px; cursor: pointer; display: grid; place-items: center; }
.tl-mark.on { border-color: var(--accent); box-shadow: 0 0 0 2px var(--accent-soft); }
.tl-mark.k-uat-fail, .tl-mark.back { color: var(--blocked); }
.tl-mark.k-uat-pass, .tl-mark.k-closed, .tl-mark.k-signoff { color: var(--done); }
.tl-card { position: absolute; top: 52px; width: 240px; box-sizing: border-box; z-index: 3; padding: 10px 12px; border-radius: 10px; background: var(--panel); border: 1px solid var(--line); box-shadow: 0 8px 24px rgba(0, 0, 0, 0.18); font-size: 13px; }
.tl-card p { margin: 0 0 4px; }
.tl-axis-in:has(.tl-card) { min-height: 300px; }
.tl-list { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; position: relative; }
.tl-list::before { content: ''; position: absolute; left: 13px; top: 14px; bottom: 14px; width: 2px; background: var(--line); }
.tl-item { position: relative; display: grid; grid-template-columns: 28px minmax(0, 1fr); gap: 10px; padding: 8px 0; }
.tl-ic { position: relative; z-index: 1; width: 28px; height: 28px; border-radius: 50%; display: grid; place-items: center; background: var(--sunken); color: var(--mute); font-size: 13px; box-shadow: 0 0 0 4px var(--bg); }
.tl-item.k-uat-fail .tl-ic, .tl-item.k-signoff-rejected .tl-ic { background: var(--blocked-soft); color: var(--blocked); }
.tl-item.k-uat-pass .tl-ic, .tl-item.k-closed .tl-ic, .tl-item.k-signoff .tl-ic, .tl-item.k-signoff-approved .tl-ic, .tl-item.k-approved .tl-ic { background: var(--done-soft); color: var(--done); }
.tl-main { min-width: 0; display: flex; flex-direction: column; gap: 3px; }
.tl-line { margin: 0; overflow-wrap: anywhere; line-height: 1.45; }
.tl-at { font: 600 12.5px/1.4 var(--font-mono); color: var(--mute); }
.tl-av { width: 18px; height: 18px; border-radius: 50%; vertical-align: -4px; margin-right: 4px; }
.tl-item.muted .tl-s { color: var(--mute); font-style: italic; }
.tl-note { margin: 0; color: var(--mute); font-size: 13px; overflow-wrap: anywhere; }
.tl-link { color: var(--accent); font-weight: 700; }
.tl-link:focus-visible, .tl-open:focus-visible, .tl-mark:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; }
.tl-stay { margin: 0; display: flex; flex-wrap: wrap; gap: 6px; align-items: center; font-size: 12.5px; color: var(--faint); }
.tl-chip { display: inline-flex; align-items: center; gap: 4px; padding: 2px 8px; border-radius: 999px; font: 700 11.5px/1.5 var(--font-body); }
.tl-chip.long { color: var(--needs); background: var(--needs-soft); }
.tl-chip.back { color: var(--ink); background: var(--sunken); border: 1px solid var(--line); }
@media (max-width: 600px) {
  .tl-panel { width: 100vw; }
  .tl-axis { display: none; }
}
@media (prefers-reduced-motion: reduce) { .tl-axis { scroll-behavior: auto; } }
/* REQ-89 (Pablo): the requirement panel in tabs. The row sticks to the top
   of the panel's own scroll area (.rq-pbody), with a 1 px line once content
   scrolls under it; single-word names, a muted count (none at 0), Comments'
   "1 for you" in the warning chip style, an 8 px accent dot for news and a
   danger cross on Tests for a fail since the last pass. Phones: the row
   scrolls sideways with snap, a fade and a chevron while more tabs follow. */
.rq-tabs-wrap { position: sticky; top: -16px; z-index: 2; margin: -16px -20px 0; padding: 8px 20px 0; background: var(--bg); }
.rq-pbody.scrolled .rq-tabs-wrap { box-shadow: 0 1px 0 var(--line); }
.rq-tabs { display: flex; gap: 2px; overflow-x: auto; scrollbar-width: none; scroll-snap-type: x proximity; border-bottom: 1px solid var(--line); }
.rq-tabs::-webkit-scrollbar { display: none; }
.rq-tab { flex: none; scroll-snap-align: start; display: inline-flex; align-items: center; gap: 6px; min-height: 44px; padding: 0 12px; border: 0; border-bottom: 3px solid transparent; background: none; color: var(--mute); font: 700 14px/1 var(--font-body); cursor: pointer; white-space: nowrap; }
.rq-tab:hover { color: var(--ink); }
.rq-tab.on { color: var(--ink); border-bottom-color: var(--accent); }
.rq-tab:focus-visible { outline: 2px solid var(--accent); outline-offset: -2px; border-radius: 6px; }
.rq-tab-n { color: var(--faint); font-weight: 600; }
.rq-tab-x { font: 700 11px/1.6 var(--font-body); border-radius: 999px; padding: 0 7px; }
.rq-tab-x.for-you { background: var(--needs-soft); color: var(--needs); }
.rq-tab-x.live { color: var(--accent); }
.rq-tab-dot { width: 8px; height: 8px; border-radius: 50%; background: var(--accent); }
.rq-tab-fail { display: inline-grid; place-items: center; width: 14px; height: 14px; border-radius: 3px; background: var(--blocked-soft); color: var(--blocked); font-size: 10px; font-weight: 800; }
.rq-tabs-more { display: none; }
.rq-tabs-wrap.more .rq-tabs { -webkit-mask-image: linear-gradient(to right, #000 calc(100% - 40px), transparent); mask-image: linear-gradient(to right, #000 calc(100% - 40px), transparent); }
.rq-tabs-wrap.more .rq-tabs-more { display: block; position: absolute; right: 8px; top: 8px; height: 44px; line-height: 44px; color: var(--mute); font-weight: 800; pointer-events: none; }
.rq-tabpanel { display: flex; flex-direction: column; gap: 18px; min-width: 0; }
.rq-tabpanel:focus-visible { outline: 2px solid var(--accent); outline-offset: 4px; border-radius: 6px; }
.rq-deploy-list, .rq-test-list { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 8px; }
.rq-deploy-list li { display: flex; flex-wrap: wrap; gap: 4px 10px; align-items: baseline; }
.rq-deploy-list time { color: var(--faint); font-size: 12px; }
.rq-deploy-rel { min-height: 44px; display: inline-flex; align-items: center; }
.rq-test { flex-wrap: wrap; }
.rq-test-fail { font: 700 11px/1.6 var(--font-body); border-radius: 999px; padding: 0 7px; background: var(--blocked-soft); color: var(--blocked); }
.rq-test-failed { margin: 4px 0 0 12px; padding-left: 14px; color: var(--mute); font-size: 13px; }
@media (max-width: 760px) {
  .rq-tabs-wrap { top: -14px; margin: -14px -16px 0; padding: 6px 16px 0; }
}

/* REQ-52: agent lanes. Avatar (a 44 px link to the card), name, role, a
   diamond when something waits on an answer, a square when something is
   blocked, and per-status count chips (dot + name + count). */
.rq-agent-head { display: flex; flex-wrap: wrap; align-items: center; gap: 4px 10px; flex: 1 1 auto; min-width: 0; }
.rq-agent-av { flex: none; display: inline-grid; place-items: center; width: 44px; height: 44px; margin: -6px 0; border-radius: 50%; }
.rq-agent-av img { width: 32px; height: 32px; border-radius: 50%; background: var(--sunken); }
.rq-agent-av:focus-visible { outline: 2px solid var(--accent); outline-offset: 0; }
.rq-agent-ring { flex: none; width: 28px; height: 28px; margin: 0 8px; border-radius: 50%; border: 2px solid var(--faint); }
.rq-agent-who { display: flex; flex-direction: column; min-width: 0; }
.rq-agent-who h3, .rq-agent-who h4 { margin: 0; }
.rq-agent-name { color: inherit; text-decoration: none; }
.rq-agent-name:hover { text-decoration: underline; }
.rq-agent-name:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; border-radius: 4px; }
.rq-lane-head .rq-agent-who h3 { font: 800 18px/1.2 var(--font-display); }
.rq-lane-head .rq-agent-who h4 { font: 800 15px/1.2 var(--font-display); }
.rq-grp .rq-agent-who h3, .rq-grp .rq-agent-who h4 { font: 800 14px/1.2 var(--font-display); }
.rq-agent-role { font-size: 12.5px; color: var(--mute); }
.rq-agent-flag { display: inline-flex; align-items: center; padding: 3px 8px; border-radius: 999px; font: 700 12px/1.2 var(--font-body); }
.rq-agent-flag.waiting { color: var(--meeting); background: var(--meeting-soft); }
.rq-agent-flag.blocked { color: var(--blocked); background: var(--blocked-soft); }
.rq-lane-counts { display: flex; flex-wrap: wrap; gap: 6px; }
.rq-count-chip { display: inline-flex; align-items: center; gap: 5px; padding: 3px 8px; border-radius: 999px; background: var(--st-soft); color: var(--ink); font: 600 12px/1.2 var(--font-body); white-space: nowrap; }
.rq-count-chip .rq-dot { width: 8px; height: 8px; }
@media (max-width: 760px) { .rq-lane-counts { flex-basis: 100%; } }

/* ── REQ-94: a requirement is a page of its own (#requirements/<ID>) ──
   It takes the board's place (the board stays rendered, hidden, so Back finds
   it as it was) and uses the full width (REQ-47). Back, Previous and Next sit
   at the top, and again at the bottom on phones. The header scrolls away;
   only REQ-89's tab row sticks, under the pinned top bar. */
#reqView.rq-paged > .wrap.rq { display: none; }
.rq-page { gap: 16px; padding-block: 16px 48px; }
.rq-page[hidden] { display: none; }
.rq-page .rq-phead { position: static; padding: 0; background: none; border: 0; gap: 10px; }
.rq-page-nav { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; }
.rq-page-nav .btn { min-height: 44px; display: inline-flex; align-items: center; text-decoration: none; }
.rq-page-nav .rq-back { margin-right: auto; font-weight: 700; }
.rq-page-nav .rq-step:disabled { opacity: 0.55; cursor: default; }
.rq-page-nav.bottom { display: none; }
.rq-ptitle { margin: 0; font: 800 28px/1.2 var(--font-display); overflow-wrap: anywhere; }
.rq-ptitle:focus { outline: none; }
.rq-ptitle:focus-visible { outline: 2px solid var(--accent); outline-offset: 4px; border-radius: 6px; }
.rq-page .rq-pline .rq-owners { display: inline-flex; gap: 2px; align-items: center; }
.rq-page .rq-pline .rq-owners img { border-radius: 50%; }
.rq-pill.rq-prod { background: var(--sunken); color: var(--ink); }
.rq-page .rq-pbody { flex: none; overflow: visible; padding: 0; min-height: 0; }
.rq-page .rq-tabs-wrap { top: var(--rq-stick, 0px); margin: 0 -20px; padding: 8px 20px 0; }
.rq-page.scrolled .rq-tabs-wrap { box-shadow: 0 1px 0 var(--line); }
@media (max-width: 600px) {
  .rq-ptitle { font-size: 22px; }
  .rq-page-nav .rq-back { flex-basis: 100%; }
  .rq-page-nav .rq-step { flex: 1 1 0; justify-content: center; }
  .rq-page-nav.bottom { display: flex; padding-top: 12px; border-top: 1px solid var(--line); }
  .rq-page .rq-tabs-wrap { margin: 0 -16px; padding: 8px 16px 0; }
}
/* The tab panel fills the screen under the row, so switching tabs never
   moves the row: a short tab still lets the page stay where it was. */
.rq-page .rq-tabpanel { min-height: calc(100dvh - var(--rq-stick, 0px) - 64px); }

/* ── REQ-105.1: the Object explorer (#explorer/<ID>) ─────────────────
   The path on the left, the centre, the linked groups on the right, with
   lines drawn in an SVG behind the cards (Pablo: Depends on / Needed by
   dashed with an arrowhead, stories and issue reports solid). On a phone the
   three parts stack as a list and the lines go. */
.rq-card-acts { display: flex; flex-wrap: wrap; gap: 4px; align-self: flex-start; }
.rq-row-acts { white-space: nowrap; }
/* A story's chip: built, not built, or its latest UAT result (words and a tone). */
.rs-built, .rs-uat-pass { --st: var(--done); --st-soft: var(--done-soft); }
.rs-not-built, .rs-uat-blocked, .rs-unknown { --st: var(--idle); --st-soft: var(--idle-soft); }
.rs-uat-fail { --st: var(--blocked); --st-soft: var(--blocked-soft); }
.rs-uat-partial { --st: var(--needs); --st-soft: var(--needs-soft); }
/* An issue report's state (REQ-102's STATE_BADGE tones). */
.rs-iss-new, .rs-iss-confirmed { --st: var(--needs); --st-soft: var(--needs-soft); }
.rs-iss-being-fixed { --st: var(--working); --st-soft: var(--working-soft); }
.rs-iss-fixed { --st: var(--done); --st-soft: var(--done-soft); }
.rs-iss-wont-fix { --st: var(--idle); --st-soft: var(--idle-soft); }

/* REQ-102: Scope (Requirements · Stories · Issue reports). The tab row sits
   above the Requirements page and the two other tabs. Badges: glyph + word,
   never colour alone (Pablo). */
/* Level 1 (the Scope row, shared tabRow.js): underline tabs that scroll away,
   or stick under the top bar on Stories and Issue reports (Pablo). */
.rq-tabs-wrap.tabs-l1 { position: relative; top: auto; z-index: 3; margin: 0 auto; padding-top: 8px; padding-bottom: 0; max-width: 100%; min-width: 0; box-sizing: border-box; }
.rq-tabs-wrap.tabs-l1.sticks { position: sticky; top: var(--scope-stick, 0px); }
.tabs-l1 .rq-tab { font-size: 15px; }
/* Level 2 (a requirement page's sections, REQ-102.1.4): compact pills in a
   raised container, so the two rows never read as one. */
.tabs-l2 .rq-tabs { border-bottom: 0; gap: 4px; padding: 4px; border-radius: 12px; background: var(--sunken); box-shadow: inset 0 0 0 1px var(--line); }
.tabs-l2 .rq-tab { border-bottom: 0; border-radius: 9px; padding: 0 12px; }
.tabs-l2 .rq-tab.on { background: var(--panel); color: var(--ink); box-shadow: 0 0 0 1px var(--line); }
.tabs-l2 .rq-tab:focus-visible { outline-offset: 1px; }
.tone-done { color: var(--done); background: var(--done-soft); }
.tone-blocked { color: var(--blocked); background: var(--blocked-soft); }
.tone-needs { color: var(--needs); background: var(--needs-soft); }
.tone-working { color: var(--working); background: var(--working-soft); }
.tone-idle { color: var(--idle); background: var(--idle-soft); }
.tone-faint { color: var(--faint); background: var(--sunken); }
.st-list, .iss-list { list-style: none; margin: 12px 0 0; padding: 0; display: grid; gap: 8px; }
.st-card, .iss-card { padding: 12px 14px; border: 1px solid var(--line); border-radius: 12px; background: var(--panel); }
.st-link, .iss-link { display: flex; gap: 10px; align-items: baseline; color: var(--ink); text-decoration: none; min-height: 24px; }
.st-link:hover .st-text, .iss-link:hover .iss-title { text-decoration: underline; }
.st-id, .iss-id { flex: none; font: 700 12px/1.4 var(--font-mono); color: var(--faint); }
.st-text, .iss-title { font: 600 15px/1.4 var(--font-body); }
.st-meta, .iss-meta { display: flex; flex-wrap: wrap; gap: 6px; align-items: center; margin: 8px 0 0; color: var(--mute); font-size: 13px; }
.st-chip, .iss-badge { display: inline-flex; align-items: center; gap: 4px; min-height: 24px; padding: 2px 9px; border-radius: 999px; background: var(--sunken); color: var(--mute); font: 700 12px/1.2 var(--font-body); text-decoration: none; }
.st-chip.ok { color: var(--done); background: var(--done-soft); }
.iss-glyph { font-size: 11px; }
.iss-when { color: var(--faint); font-size: 13px; }
.iss-empty { color: var(--mute); padding: 12px 0; }
.iss-filed { margin: 8px 0 0; padding: 10px 12px; border-radius: 10px; background: var(--done-soft); color: var(--done); font-weight: 700; }
.iss-filed a { color: inherit; }
.iss-note { padding: 10px 12px; border-radius: 10px; background: var(--sunken); }
.iss-fields { display: grid; grid-template-columns: max-content 1fr; gap: 6px 16px; margin: 16px 0; }
.iss-fields dt { color: var(--mute); font-weight: 700; }
.iss-fields dd { margin: 0; white-space: pre-wrap; }
.iss-fields ol { margin: 0; padding-left: 20px; }
.iss-shots { display: flex; flex-wrap: wrap; gap: 8px; margin: 8px 0 16px; }
.iss-shot img { display: block; max-width: 220px; max-height: 160px; border-radius: 8px; border: 1px solid var(--line); }
.iss-links ul, .iss-hist ol { padding-left: 20px; }
.iss-links li { display: flex; flex-wrap: wrap; gap: 8px; align-items: center; min-height: 32px; }
.iss-links h2, .iss-hist h2 { font-size: 16px; margin: 20px 0 6px; }
.iss-edit { display: flex; flex-wrap: wrap; gap: 10px; align-items: flex-end; margin: 12px 0; }
.iss-form { display: grid; gap: 16px; max-width: 720px; margin-top: 12px; }
.iss-field { display: grid; gap: 6px; }
.iss-field > label { font-weight: 700; }
.iss-field .field { width: 100%; flex: none; font-weight: 500; }
.iss-req, .iss-hint { color: var(--mute); font-weight: 500; font-size: 13px; margin: 0; }
.iss-err { color: var(--blocked); font-weight: 700; font-size: 13px; margin: 0; }
.iss-err::before { content: '⚠ '; }
.iss-more > summary { min-height: 44px; display: flex; align-items: center; font-weight: 700; cursor: pointer; }
.iss-more[open] > * + * { margin-top: 16px; }
.iss-sev { border: 0; padding: 0; margin: 0; display: grid; grid-template-columns: repeat(auto-fit, minmax(150px, 1fr)); gap: 8px; }
.iss-sev legend { font-weight: 700; margin-bottom: 6px; }
.iss-sev-card { display: grid; grid-template-columns: auto 1fr; gap: 4px 8px; padding: 10px 12px; border: 1px solid var(--line); border-radius: 12px; background: var(--panel); cursor: pointer; min-height: 44px; }
.iss-sev-card:has(input:checked) { border-color: var(--accent); box-shadow: inset 0 0 0 1px var(--accent); }
.iss-sev-card:has(input:focus-visible) { outline: 2px solid var(--accent); outline-offset: 2px; }
.iss-sev-t { display: inline-flex; align-items: center; gap: 6px; }
.iss-sev-m { grid-column: 2; color: var(--mute); font-size: 13px; }
.iss-detected { display: flex; flex-wrap: wrap; gap: 8px; align-items: center; color: var(--mute); margin: 0; }
.iss-add-shot { display: inline-flex; align-items: center; min-height: 44px; justify-self: start; cursor: pointer; }
.iss-add-shot:focus-within { outline: 2px solid var(--accent); outline-offset: 2px; }
.iss-thumbs { list-style: none; padding: 0; margin: 0; display: flex; flex-wrap: wrap; gap: 8px; }
.iss-thumbs li { display: grid; gap: 4px; justify-items: start; }
.iss-thumbs img { width: 120px; height: 90px; object-fit: cover; border-radius: 8px; border: 1px solid var(--line); }
@media (max-width: 640px) { .iss-fields { grid-template-columns: 1fr; } .iss-fields dd { margin-bottom: 8px; } }

/* REQ-102.2.3: a story opened from Scope → Stories lands below the sticky
   rows, outlined for a moment (an outline, not colour alone, says where). */
.rq-story { scroll-margin-top: calc(var(--rq-stick, 0px) + 72px); }
.rq-story:focus { outline: none; }
.rq-story.rq-story-hit, .rq-story:focus-visible { outline: 2px solid var(--accent); outline-offset: 4px; border-radius: 10px; }
/* REQ-102.3.4: an issue report on a requirement's Tests tab. */
.rq-issue { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; }
.rq-issue-t { font-weight: 600; color: var(--ink); }
/* REQ-117.1: "Assigned:" (apart from the owners) and the Assign to picker. */
.rq-assigned { display: inline-flex; align-items: center; gap: 4px; font-size: 12.5px; color: var(--mute); min-width: 0; }
.rq-assigned-k { font-weight: 700; color: var(--ink); }
.rq-assigned img { border-radius: 50%; border: 2px solid var(--panel); background: var(--sunken); }
.rq-assigned-n { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; max-width: 16em; }
.rq-card > .rq-assigned { align-self: flex-start; }
.rq-asg-cell { white-space: nowrap; }
.rq-asg-cell .rq-assigned + .rq-assign-btn { margin-left: 6px; }
.rq-assign-btn { min-height: 32px; }
.rq-assign { margin: auto; padding: 0; width: min(480px, calc(100vw - 32px)); max-height: min(720px, 86dvh); border: 1px solid var(--line); border-radius: 14px; background: var(--bg); color: var(--ink); box-shadow: 0 18px 50px rgba(0, 0, 0, 0.3); }
.rq-assign[open] { display: flex; flex-direction: column; }
.rq-assign:not([open]) { display: none; }
.rq-assign::backdrop { background: rgba(8, 6, 14, 0.5); }
.rq-assign-form { display: flex; flex-direction: column; min-height: 0; flex: 1; align-self: stretch; width: 100%; }
.rq-assign-head { display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 14px 16px 0; }
.rq-assign-head h2 { margin: 0; font-family: var(--font-display); font-weight: 800; font-size: 20px; }
.rq-assign-head .btn.icon { min-width: 44px; min-height: 44px; }
.rq-assign-sub { margin: 2px 16px 10px; color: var(--mute); font-size: 13.5px; overflow-wrap: anywhere; }
.rq-assign-search { display: block; padding: 0 16px 8px; }
.rq-assign-search input { width: 100%; min-height: 44px; box-sizing: border-box; }
.rq-assign-list { overflow-y: auto; flex: 1; min-height: 0; padding: 0 16px; }
.rq-assign-pod { border: 0; margin: 0 0 10px; padding: 0; min-width: 0; }
.rq-assign-pod legend { padding: 6px 0 4px; font-size: 12px; font-weight: 800; text-transform: uppercase; letter-spacing: 0.04em; color: var(--mute); }
.rq-assign-pod legend::before { content: ''; display: inline-block; width: 8px; height: 8px; border-radius: 50%; margin-right: 6px; background: var(--pod, var(--faint)); }
.rq-assign-row { display: flex; align-items: center; gap: 10px; min-height: 44px; padding: 4px 6px; border-radius: 10px; cursor: pointer; }
.rq-assign-row:hover, .rq-assign-row:focus-within { background: var(--sunken); }
.rq-assign-row img { border-radius: 50%; flex: none; background: var(--sunken); }
.rq-assign-who { display: flex; flex-direction: column; flex: 1; min-width: 0; }
.rq-assign-role { font-size: 12.5px; color: var(--mute); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.rq-assign-row input[type="checkbox"] { width: 22px; height: 22px; flex: none; margin: 0; accent-color: var(--accent); }
.rq-assign-foot { display: flex; align-items: center; gap: 8px; padding: 10px 16px 14px; border-top: 1px solid var(--line); }
.rq-assign-count { flex: 1; font-size: 13px; color: var(--mute); }
.rq-assign-foot .btn { min-height: 44px; }
.rq-assign .rq-formerr { margin: 6px 16px 0; }
/* A phone: a full-height sheet. */
@media (max-width: 600px) {
  .rq-assign { width: 100vw; max-width: 100vw; height: 100dvh; max-height: 100dvh; border: 0; border-radius: 0; }
  .rq-assign-foot { padding-bottom: max(14px, env(safe-area-inset-bottom)); }
}
/* REQ-141 (Pablo): 'New updates · they show when you leave the box' under a
   focused field. Its line is reserved from the moment the field takes the
   focus, so nothing shifts when the words appear. Words only, no icon. */
.rq-livehint { flex: 1 0 100%; margin: 2px 0 0; min-height: 18px; line-height: 18px; font-size: 13px; color: var(--mute); }
/* ISS-114: in a narrow box (a story's, on a phone) the hint takes two lines, so
   both are kept: its words appearing never push the page below down (a whole
   page relaid and repainted under the keyboard). A question's answer box too. Up to
   360 px: in a wide fallback font the words take about 324 px (Rex, #291). */
.rq-cform, .rq-answer, .rq-doc-field { container-type: inline-size; }
@container (max-width: 360px) { .rq-livehint { min-height: 36px; } }

/* REQ-173.1: a requirement that changes a screen (mockup and validation first). */
.ck-ui { color: var(--ink); box-shadow: inset 0 0 0 1px var(--line); }
/* REQ-145.2 (row 10): 'Open chat with <agent>' under an agent's comment on the thread. */
.rq-chat { margin: 2px 0 0; font-size: 13px; }

/* REQ-173.3 (Pablo): the Mockups tab. Each mockup full width; versions as a
   Segmented control; covered stories as chips. The frame scrolls inside
   itself at 375 px, never the page. */
.rq-mocks { display: flex; flex-direction: column; gap: 18px; min-width: 0; }
.rq-mock-empty { color: var(--mute); margin: 8px 0; }
.rq-mock { display: flex; flex-direction: column; gap: 8px; min-width: 0; }
.rq-mock-head { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; min-width: 0; }
.rq-mock-head h3 { margin: 0; font: 800 17px/1.2 var(--font-display); }
.rq-mock-stories { display: flex; flex-wrap: wrap; gap: 4px; }
.rq-mock-versions { max-width: 100%; }
.rq-mock-versions button { min-height: 44px; min-width: 44px; }
.rq-mock-meta { margin: 0; color: var(--mute); font-size: 13px; }
.rq-mock-frame { width: 100%; min-width: 0; border: 1px solid var(--line); border-radius: 12px; overflow: hidden; background: var(--panel); }
.rq-mock-frame iframe { display: block; width: 100%; height: min(75vh, 900px); min-height: 420px; border: 0; background: var(--panel); }
.rq-mock-loading { margin: 0; padding: 16px; color: var(--mute); }

/* REQ-173.4 (Pablo, UX notes 2, 3): feedback pins. The box sits beside its
   element, at most 320 px; pins are numbered with Open / Resolved in words. */
.rq-mock-frame { position: relative; }
.rq-mock-tools { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; }
.rq-mock-menu { margin-left: auto; }   /* the card's ⋯: Give feedback, Remove pin n (216.10.3) */
.rq-mock-hint { margin: 0; color: var(--mute); font-size: 13px; }
.rq-pin-box { position: absolute; z-index: 5; box-sizing: border-box; max-width: 320px; padding: 12px; display: flex; flex-direction: column; gap: 8px; background: var(--panel); color: var(--ink); border: 1px solid var(--line); border-radius: 12px; box-shadow: 0 8px 24px rgba(0, 0, 0, 0.18); }
.rq-pin-box textarea { width: 100%; box-sizing: border-box; min-height: 72px; font: inherit; }
.rq-pin-on { margin: 0; font-weight: 700; font-size: 13.5px; overflow-wrap: anywhere; }
.rq-pin-act, .rq-verdict-act { display: flex; flex-wrap: wrap; gap: 8px; }
.rq-pin-act .btn, .rq-verdict-act .btn { min-height: 44px; }
.rq-pin-lists h4 { margin: 8px 0 4px; font: 700 10.5px/1 var(--font-mono); letter-spacing: .14em; text-transform: uppercase; color: var(--faint); }
.rq-pins { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 6px; }
.rq-pin { display: flex; flex-wrap: wrap; align-items: baseline; gap: 6px 8px; padding: 6px 0; border-bottom: 1px solid var(--line); min-width: 0; }
.rq-pin-n { min-width: 24px; height: 24px; padding: 0 6px; box-sizing: border-box; border-radius: 12px; background: var(--ink); color: var(--panel); font: 700 12px/24px var(--font-body); text-align: center; }
.rq-pin--resolved .rq-pin-n { background: transparent; color: var(--ink); box-shadow: inset 0 0 0 2px var(--ink); }
.rq-pin-text { flex: 1 1 200px; min-width: 0; overflow-wrap: anywhere; }
.rq-pin-by, .rq-pin-note { color: var(--mute); font-size: 13px; }
.rq-pin-note { flex-basis: 100%; }
.rq-pin-hit { outline: 2px solid var(--accent); outline-offset: 2px; }
.rq-round .btn { margin-top: 8px; min-height: 44px; }
.rq-round-dlg { max-width: min(480px, calc(100vw - 32px)); background: var(--panel); color: var(--ink); border: 1px solid var(--line); border-radius: 16px; padding: 16px; }

/* REQ-173.5 (Pablo, UX note 6): Steven's OK / Not yet, 44 px. */
.rq-verdict { display: flex; flex-direction: column; gap: 8px; padding: 12px; border: 1px solid var(--line); border-radius: 12px; background: var(--sunken); }
.rq-verdict-q { margin: 0; font-weight: 700; }
.rq-verdict-form label { display: flex; flex-direction: column; gap: 4px; }
.rq-verdict-form textarea { width: 100%; box-sizing: border-box; font: inherit; }

/* REQ-177.1: a release lane's head (product mark, '<product> <version>', planned date,
   release status) and the Shared mark on a card in more than one release lane. */
.rq-rel-head { display: flex; flex-wrap: wrap; align-items: center; gap: 6px 10px; flex: 1 1 auto; min-width: 0; }
.rq-rel-head h3, .rq-rel-head h4 { flex: 0 1 auto; }
.rq-rel-date { color: var(--ink); font-size: 13px; white-space: nowrap; }
.rq-shared { display: inline-flex; align-items: center; padding: 1px 7px; border-radius: 6px; border: 1px solid var(--mute); color: var(--ink); font: 700 10.5px/1.5 var(--font-mono); letter-spacing: .04em; text-transform: uppercase; white-space: nowrap; }

/* REQ-177.2: the Release filter, a multi-select: a button with what is picked and a
   count, opening a list of checkboxes grouped by product (a sheet on a phone). */
.rq-msel { position: relative; }
.rq-msel-btn { display: inline-flex; align-items: center; gap: 6px; min-height: 44px; max-width: 260px; padding: 0 12px; border-radius: 10px; border: 1px solid var(--line); background: var(--panel); color: var(--ink); font: 600 14px/1.2 var(--font-body); text-transform: none; letter-spacing: 0; cursor: pointer; }
.rq-msel-btn.on { border-color: var(--accent); background: var(--accent-soft); }
.rq-msel-text { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; min-width: 0; }
.rq-msel-n { display: inline-grid; place-items: center; min-width: 20px; height: 20px; padding: 0 5px; border-radius: 999px; background: var(--accent); color: var(--on-accent); font: 700 11px/1 var(--font-mono); }
.rq-msel-pop { position: absolute; z-index: 30; top: calc(100% + 6px); left: 0; width: min(340px, 92vw); max-height: 70vh; display: flex; flex-direction: column; background: var(--panel); color: var(--ink); border: 1px solid var(--line); border-radius: 14px; box-shadow: 0 12px 32px rgba(0, 0, 0, .18); text-transform: none; letter-spacing: 0; font: 400 14px/1.4 var(--font-body); }
.rq-msel-pop[hidden] { display: none; }
.rq-msel-title { margin: 0; padding: 12px 14px 4px; font: 800 16px/1.2 var(--font-display); }
.rq-msel-list { overflow: auto; padding: 0 8px; }
.rq-msel-group { border: 0; margin: 0; padding: 6px 0; }
.rq-msel-group legend { padding: 4px 6px; font: 700 10.5px/1.2 var(--font-mono); letter-spacing: .1em; text-transform: uppercase; color: var(--faint); }
.rq-msel-row { display: flex; align-items: center; gap: 10px; min-height: 44px; padding: 4px 6px; border-radius: 8px; cursor: pointer; }
.rq-msel-row:hover { background: var(--sunken); }
.rq-msel-row input { width: 20px; height: 20px; flex: none; accent-color: var(--accent); }
.rq-msel-words { display: flex; flex-direction: column; flex: 1 1 auto; min-width: 0; }
.rq-msel-words small { color: var(--mute); font-size: 12px; }
.rq-msel-count { color: var(--mute); font: 600 12px/1 var(--font-mono); }
.rq-msel-foot { display: flex; gap: 8px; justify-content: space-between; padding: 10px 12px; border-top: 1px solid var(--line); }
.rq-msel-foot .btn { min-height: 44px; flex: 1 1 0; }
.rq-notice { display: flex; align-items: center; justify-content: space-between; gap: 12px; margin-top: 10px; padding: 10px 14px; border-radius: 12px; border: 1px solid var(--line); background: var(--sunken); color: var(--ink); font-size: 14px; }
.rq-notice[hidden] { display: none; }
@media (max-width: 760px) {
  .rq-msel-btn { max-width: none; width: 100%; }
  .rq-msel-pop { position: fixed; z-index: 50; left: 0; right: 0; bottom: 0; top: auto; width: 100%; max-height: 80vh; border-radius: 16px 16px 0 0; }   /* above the Help button (40) */
  .rq-msel-row { min-height: 48px; }
}

/* REQ-175.4.3 (Pablo 7): a requirement card's release chip; the next
   train's is dashed, so it never relies on colour alone. */
.rq-relchip { display: inline-flex; align-items: center; flex: none; min-height: 22px; padding: 0 8px; border: 1px solid var(--line-strong); border-radius: 999px; font: 700 12px/1 var(--font-mono); color: var(--ink); white-space: nowrap; }
.rq-relchip.current { border-color: var(--accent); color: var(--accent); }
.rq-relchip.next { border-style: dashed; color: var(--mute); }

/* REQ-216.1: one header: the title (renamed in place), one chip row, the
   next-step button and the ⋯ menu (actionMenuView.js). */
.rq-page-head { display: grid; grid-template-columns: 1fr auto; gap: 8px 16px; align-items: start; }
.rq-page-head > .rq-page-nav, .rq-page-head > .rq-pline { grid-column: 1 / -1; }
.rq-page-head > .rq-ptitle, .rq-page-head > .rq-rename { grid-column: 1; }
.rq-head-acts { grid-column: 2; grid-row: 2; display: flex; gap: 8px; align-items: center; }
.rq-page-head > .rq-pline { grid-row: 3; }
.rq-ptitle.rq-renamable { cursor: text; border-radius: 8px; }
.rq-ptitle.rq-renamable:hover { background: var(--sunken); }
.rq-rename { display: flex; flex-wrap: wrap; gap: 8px; align-items: center; }
.rq-rename-in { flex: 1 1 280px; min-height: 44px; font: inherit; font-size: 20px; font-weight: 700; }
.rq-next { min-height: 44px; }
.rq-chipset { display: inline-flex; flex-wrap: wrap; gap: 4px; }
.rq-rel.none, .rq-deps { color: var(--mute); }
@media (max-width: 600px) {
  .rq-page-head { grid-template-columns: 1fr; }
  .rq-head-acts { grid-column: 1; grid-row: auto; }
  .rq-head-acts .rq-next { flex: 1 1 auto; }
  .rq-page-head > .rq-pline { grid-row: auto; }
}
.rq-head-links { grid-column: 1 / -1; display: flex; flex-wrap: wrap; gap: 8px; align-items: center; }

/* REQ-216.2: an admin's chips open a picker under the chip row. */
.rq-chipbtn { display: inline-flex; align-items: center; min-height: 32px; padding: 0; border: 0; background: none; border-radius: 999px; cursor: pointer; font: inherit; color: inherit; }
.rq-chipbtn:hover > *, .rq-chipbtn[aria-expanded="true"] > * { outline: 2px solid var(--line); outline-offset: 1px; }
.rq-chipbtn:focus-visible { outline: 2px solid var(--accent, var(--ink)); outline-offset: 2px; }
.rq-pick { margin: 8px 0; padding: 12px; border: 1px solid var(--line); border-radius: 12px; background: var(--panel); max-width: 420px; box-sizing: border-box; }
.rq-pick-opts { display: flex; flex-wrap: wrap; gap: 6px; }
.rq-pick-opt { min-height: 44px; }
.rq-pick-opt.on { font-weight: 700; }
.rq-pick-text { width: 100%; min-height: 44px; }
.rq-pick-list { display: grid; gap: 2px; width: 100%; max-height: 240px; overflow-y: auto; }
.rq-pick-row { display: flex; align-items: center; gap: 8px; min-height: 44px; }
.rq-pick-row .rq-hint { margin: 0; }
.rq-pick .rq-move-btns { margin-top: 8px; }
.rq-pick .rq-move-btns .btn { min-height: 44px; }   /* REQ-216.6.3: Save and Cancel are 44 px targets too */
.rq-pick .err { margin: 8px 0 0; }
.rq-toast .rq-toast-undo { margin-left: 8px; color: inherit; border-color: currentColor; }
@media (max-width: 599px) { .rq-pick { max-width: none; } }
/* REQ-216.6: at phone width the chips are 44 px targets, and a chip's picker is a
   bottom sheet across the screen over a shade that closes it (as the ⋯ menu's). */
.rq-pick-scrim { display: none; }
@media (max-width: 600px) {
  .rq-chipbtn { min-height: 44px; }
  .rq-pick { position: fixed; left: 0; right: 0; bottom: 0; z-index: 40; margin: 0; max-width: none; max-height: 75vh; overflow-y: auto; border-radius: 16px 16px 0 0; padding: 14px 14px calc(14px + env(safe-area-inset-bottom)); box-shadow: var(--shadow-pop); }
  .rq-pick-scrim { display: block; position: fixed; inset: 0; z-index: -1; background: var(--scrim); }
  .rq-pick .rq-move-btns > .btn { flex: 1 1 auto; }
  /* 216.6.1: the next-step button, then ⋯ Actions, each across the page, with its word. */
  .rq-head-acts { flex-direction: column; align-items: stretch; }
  .rq-head-acts > .am, .rq-head-acts .am-btn { width: 100%; }
  .rq-head-acts .am-btn::after { content: " Actions"; font-size: 15px; font-weight: 600; }
}
.rq-head-id { display: block; margin-bottom: 2px; }
/* The Undo toast has its own element (Rex on #230): above the plain one, so both can show. */
.rq-toast.rq-toast-undoable { bottom: 80px; display: flex; align-items: center; gap: 8px; }
.rq-toast.rq-toast-undoable[hidden] { display: none; }
.rq-toast .rq-toast-undo { min-height: 44px; }

/* REQ-216.12: the worked-on block, left of the title (Steven's placement A), above it below
   900 px, a full-width band on a phone. Words plus a shape; Steven's own step in --you. */
.rq-head-main { display: grid; grid-template-columns: 200px minmax(0, 1fr); gap: 20px; align-items: start; }
.rq-head-main > .rq-head-col { min-width: 0; grid-column: 2; }
.rq-head-main > .rq-head-col:only-child { grid-column: 1 / -1; }
.rq-worked { box-sizing: border-box; width: 200px; display: grid; gap: 8px; justify-items: start; padding: 12px; border: 1px solid var(--line); border-radius: 14px; background: var(--panel); }
.rq-wo-face { display: flex; align-items: flex-end; gap: 6px; }
.rq-wo-more { display: flex; gap: 2px; }
.rq-wo-shape { display: inline-flex; align-items: center; justify-content: center; width: 72px; height: 72px; border-radius: 50%; border: 2px solid var(--line); font-size: 32px; line-height: 1; color: var(--mute); }
.rq-wo-text { margin: 0; display: grid; gap: 2px; font-size: 13px; color: var(--mute); }
.rq-wo-text b { font-size: 15px; color: var(--ink); }
.rq-worked.you { border-color: var(--you); background: var(--you-soft); }
.rq-worked.you .rq-wo-shape { border-color: var(--you); color: var(--you); }
.rq-worked.you .rq-wo-text b { color: var(--you); }
.rq-worked .rq-next { width: 100%; }
@media (max-width: 899px) {
  .rq-head-main { grid-template-columns: minmax(0, 1fr); gap: 12px; }
  .rq-head-main > .rq-head-col { grid-column: 1; }
  .rq-worked { width: auto; grid-template-columns: auto minmax(0, 1fr); align-items: center; justify-items: stretch; }
  .rq-worked .rq-next { grid-column: 1 / -1; }
}
@media (max-width: 599px) {
  .rq-worked { margin: 0 -16px; border-radius: 0; border-left: 0; border-right: 0; }
  .rq-wo-face .ag-chip img, .rq-wo-shape { width: 56px; height: 56px; }
  .rq-wo-shape { font-size: 26px; }
}
/* REQ-216.12.6: the board card's short form, words plus a shape; Waiting on you in --you. */
.rq-wo-short { margin: 4px 0 0; display: flex; align-items: center; gap: 6px; font-size: 12.5px; font-weight: 600; color: var(--mute); }
.rq-wo-short .ag-chip img { width: 20px; height: 20px; }
.rq-wo-mark { display: inline-flex; align-items: center; justify-content: center; width: 20px; height: 20px; border-radius: 50%; border: 1.5px solid var(--line); font-size: 11px; line-height: 1; }
.rq-wo-short.you { color: var(--you); background: var(--you-soft); border-radius: 8px; padding: 3px 8px 3px 4px; align-self: flex-start; }
.rq-wo-short.you .rq-wo-mark { border-color: var(--you); }
/* REQ-216.7 (Pablo's m1): the Stories tab as cards. A filter row, then one
   full-width card per story: id and sentence with one ⋯, an attributes strip
   (Part, Status, Owner, PR, Last UAT) and the criteria with a built and a UAT
   mark each. A failed card and criterion are outlined in the fail colour, with
   a ✕ and words, never colour alone. Under 640 px the picker, the criterion
   edit and the ⋯ menu open as bottom sheets. */
.sc-stories { gap: 12px; }
.sc-filters { display: flex; flex-wrap: wrap; gap: 8px; }
.sc-fc { min-height: 44px; display: inline-flex; align-items: center; gap: 6px; padding: 0 14px; border-radius: 999px; border: 1px solid var(--line); background: var(--panel); color: var(--ink); font: 600 13.5px/1 var(--font-body); cursor: pointer; }
.sc-fc .sc-fn { font: 700 11.5px/1 var(--font-mono); color: var(--mute); }
.sc-fc.on { background: var(--ink); color: var(--bg); border-color: var(--ink); }
.sc-fc.on .sc-fn { color: var(--bg); }
.sc-fc:focus-visible, .sc-at-edit:focus-visible, .sc-more:focus-visible, .sc-opt:focus-visible, .sc-pen:focus-visible, .sc-addc:focus-visible, button.sc-m:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; }
.sc-cards { display: flex; flex-direction: column; gap: 12px; }
.sc-none { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; }
/* 'Clear filter' (Pablo on #255): a text link beside the empty filter's line, never a More button. Shared by the Timeline (.tt-reset). */
.sc-reset, .tt-reset { min-height: 44px; padding: 0 4px; border: 0; background: none; color: var(--accent); font: 700 14px/1.2 var(--font-body); text-decoration: underline; cursor: pointer; }
.sc-reset:focus-visible, .tt-reset:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; }
.rq-story.sc-card { border-radius: 16px; padding: 14px 16px; gap: 10px; min-width: 0; }
.rq-story.sc-card.sc-fail { border-color: var(--blocked); }
.sc-head { display: flex; gap: 10px; align-items: flex-start; }
.sc-id { flex: none; padding-top: 3px; }
.sc-txt { flex: 1; margin: 0; font-size: 15px; min-width: 0; overflow-wrap: anywhere; }
.sc-more { min-height: 44px; min-width: 44px; border: 1px solid var(--line); border-radius: 10px; background: transparent; color: var(--mute); font: 700 16px/1 var(--font-body); cursor: pointer; }
.sc-more[aria-expanded="true"] { border-color: var(--accent); color: var(--accent); }
.sc-copied { margin: 4px 12px; font-size: 12.5px; color: var(--done); }
.sc-attrs { position: relative; display: flex; flex-wrap: wrap; gap: 6px; padding: 8px 10px; background: var(--sunken); border-radius: 12px; }
.sc-at { min-height: 36px; display: inline-flex; align-items: center; gap: 6px; padding: 0 10px; border-radius: 10px; background: var(--panel); border: 1px solid var(--line); color: var(--ink); font: 600 12.5px/1.2 var(--font-body); text-decoration: none; max-width: 100%; }
.sc-at .k { font: 700 10px/1 var(--font-mono); letter-spacing: .08em; text-transform: uppercase; color: var(--mute); }
.sc-at .v { display: inline-flex; align-items: center; gap: 6px; min-width: 0; }
.sc-at-edit { cursor: pointer; min-height: 44px; }
.sc-at-edit[aria-expanded="true"] { border-color: var(--accent); }
.sc-at-unset { border-style: dashed; }
.sc-unset { color: var(--mute); font-weight: 500; }
a.sc-at:hover .v { text-decoration: underline; }
.sc-st.s-to-build { border-style: dashed; }
.sc-st.s-building { border-color: var(--working); color: var(--working); }
.sc-st.s-built, .sc-st.s-passed { border-color: var(--done); color: var(--done); }
.sc-st.s-in-qa { border-color: var(--qa); color: var(--qa); }
.sc-st.s-failed, .sc-uat.u-fail { border-color: var(--blocked); color: var(--blocked); }
.sc-err { flex-basis: 100%; margin: 0; }
.sc-pick { position: absolute; left: 10px; top: calc(100% + 4px); z-index: 30; width: min(320px, calc(100% - 20px)); display: flex; flex-direction: column; gap: 6px; padding: 10px; background: var(--panel); border: 1px solid var(--line-strong); border-radius: 14px; box-shadow: 0 12px 30px rgba(0, 0, 0, .18); }
.sc-pick-h { margin: 0 2px 2px; font: 700 11px/1.2 var(--font-mono); letter-spacing: .08em; text-transform: uppercase; color: var(--mute); }
.sc-opts { display: flex; flex-direction: column; gap: 2px; max-height: 300px; overflow: auto; }
.sc-opt { min-height: 44px; display: flex; align-items: center; gap: 6px; padding: 0 10px; border: 0; border-radius: 10px; background: transparent; color: var(--ink); font: 600 14px/1.2 var(--font-body); text-align: left; cursor: pointer; }
.sc-opt:hover, .sc-opt.on { background: var(--accent-soft); }
.sc-cancel { align-self: flex-end; }
.sc-critbox { display: flex; flex-direction: column; gap: 6px; }
.sc-crit { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 4px; }
.sc-c { display: grid; grid-template-columns: 28px minmax(0, 1fr) auto auto; gap: 8px; align-items: start; padding: 6px 8px; border-radius: 10px; font-size: 14px; }
.sc-c .sc-n { font: 700 12px/1.6 var(--font-mono); color: var(--mute); }
.sc-c .rq-crit-text { overflow-wrap: anywhere; }
.sc-c.f { outline: 1.5px solid var(--blocked); background: var(--blocked-soft); }
.sc-marks { display: inline-flex; flex-wrap: wrap; justify-content: flex-end; gap: 6px; }
.sc-m { font: 700 11.5px/1.4 var(--font-mono); white-space: nowrap; padding: 2px 7px; border-radius: 6px; background: var(--sunken); color: var(--mute); border: 0; }
.sc-m.ok { color: var(--done); background: var(--done-soft); }
.sc-m.no { color: var(--blocked); background: var(--panel); }
button.sc-m { cursor: pointer; min-height: 24px; }
.sc-pen { min-width: 32px; min-height: 28px; border: 1px solid transparent; border-radius: 8px; background: transparent; color: var(--mute); cursor: pointer; font-size: 13px; }
.sc-pen:hover { border-color: var(--line); color: var(--accent); }
.sc-note { grid-column: 2 / -1; margin: 0; font-size: 12.5px; color: var(--blocked); }
.sc-c.sc-editing { display: block; }
.sc-cedit { display: flex; flex-direction: column; gap: 6px; }
.sc-cedit .sc-pick-h { display: none; }
.sc-cedit textarea { width: 100%; resize: vertical; }
.sc-cedit-bar { display: flex; flex-wrap: wrap; gap: 8px; }
/* REQ-216.10: the one More button: full width, a ghost, 44 px, under its list's first items (moreButtonView.js). */
.btn.ghost.more-btn { display: flex; align-items: center; justify-content: center; width: 100%; min-height: 44px; margin-top: 4px; border: 1px solid var(--line); border-radius: 12px; background: transparent; color: var(--ink); font: 700 14px/1.2 var(--font-body); cursor: pointer; }
.btn.ghost.more-btn:hover { background: var(--accent-soft); }
.more-btn:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; }
.sc-addc { align-self: flex-start; min-height: 44px; border: 1px dashed var(--line-strong); border-radius: 10px; background: transparent; color: var(--accent); font: 700 13px/1 var(--font-body); padding: 0 12px; cursor: pointer; }
@media (max-width: 640px) {
  .sc-attrs .sc-long, .sc-attrs .sc-pr { display: none; }
  .rq-story.sc-card { padding: 12px; }
  .sc-attrs { gap: 4px; padding: 6px; }
  .sc-at { padding: 0 7px; gap: 4px; }
  .sc-at .k { font-size: 9px; letter-spacing: .04em; }
  .sc-at .sc-caret { display: none; }
  .sc-c .sc-marks { flex-wrap: nowrap; }
  .sc-c { grid-template-columns: 22px minmax(0, 1fr) auto; }
  .sc-c .sc-marks { grid-column: 2 / 3; justify-content: flex-start; }
  .sc-c .sc-pen { grid-column: 3; grid-row: 1; min-height: 44px; min-width: 44px; }
  .sc-pen, button.sc-m { min-height: 44px; }
  /* Bottom sheets: the menu, a chip's picker and a criterion's edit. */
  .sc-pick, .sc-cedit.sc-sheet { position: fixed; left: 0; right: 0; bottom: 0; top: auto; width: auto; z-index: 60; padding: 10px 12px calc(16px + env(safe-area-inset-bottom, 0px)); border-radius: 20px 20px 0 0; border: 1px solid var(--line-strong); background: var(--panel); box-shadow: 0 -10px 30px rgba(0, 0, 0, .25); max-height: 80vh; overflow: auto; }
  .sc-pick::before, .sc-cedit.sc-sheet::before { content: ""; width: 40px; height: 4px; border-radius: 2px; background: var(--line-strong); align-self: center; margin: 0 0 8px; flex: none; }
  .sc-cedit .sc-pick-h { display: block; }
  .sc-opt { font-size: 15px; }
  .sc-cedit-bar .btn { flex: 1; min-height: 44px; }
}

/* REQ-216.4: the Overview's fields edited in place: why and what (click the text)
   and each Details row's Edit button, opening the same editor box as a chip's picker
   (a bottom sheet on a phone, 216.6.2). */
.rq-inplace { display: block; width: 100%; min-height: 44px; padding: 6px 8px; margin: 0; box-sizing: border-box; text-align: left; font: inherit; color: inherit; background: none; border: 1px dashed transparent; border-radius: 8px; cursor: text; }
.rq-inplace:hover { background: var(--sunken); border-color: var(--line); }
.rq-inplace:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; }
.rq-detail-dd { display: flex; flex-wrap: wrap; align-items: center; gap: 4px 8px; }
.rq-detail-btn { min-height: 44px; min-width: 44px; }
.rq-detail-edit { flex-basis: 100%; }
.rq-detail-area { min-height: 96px; }

/* REQ-218.3: the Token cost panel on Overview (Pablo's mockup m1 v1). */
.rq-cost { border: 1px solid var(--line); border-radius: 12px; background: var(--panel); padding: 12px 14px; display: flex; flex-direction: column; gap: 10px; }
.rq-cost-sum { display: flex; flex-wrap: wrap; align-items: center; gap: 4px 10px; cursor: pointer; list-style: none; }
.rq-cost-sum::-webkit-details-marker { display: none; }
.rq-cost-title { font: 700 11px/1.2 var(--font-mono); letter-spacing: .14em; text-transform: uppercase; color: var(--faint); }
.rq-cost-short { color: var(--mute); font-size: 13px; }
.rq-cost[open] .rq-cost-short { display: none; }
.rq-cost-cells { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 10px; margin-bottom: 2px; }
.rq-cost-cell { display: flex; flex-direction: column; gap: 2px; min-width: 0; }
.rq-cost-lab { color: var(--mute); font-size: 12px; }
.rq-cost-val { font: 700 17px/1.3 var(--font-display); color: var(--ink); }
.rq-cost-val.over { color: var(--blocked); }
.rq-cost-val.under { color: var(--done); }
.rq-cost-note { margin: 0; padding: 8px 10px; border-radius: 8px; background: var(--done-soft); color: var(--ink); font-size: 12px; }
.rq-cost-table { width: 100%; border-collapse: collapse; font-size: 13px; }
.rq-cost-table th { text-align: left; font: 700 10px/1.2 var(--font-mono); letter-spacing: .12em; text-transform: uppercase; color: var(--faint); padding: 6px 4px; border-bottom: 1px solid var(--line); }
.rq-cost-table td { padding: 7px 4px; border-bottom: 1px solid var(--line); color: var(--ink); }
@media (max-width: 600px) {
  .rq-cost-sum { min-height: 44px; }
  .rq-cost-cells { grid-template-columns: 1fr 1fr; }
  .rq-cost-table { font-size: 12px; }
}
/* REQ-216.12.7: the owner's own comment or ask: the --you edge and a mark in
   words and a shape ("◆ You" to the owner, "◆ Admin" to others), not colour alone. */
.rq-c.you { border-left: 3px solid var(--you); }
.rq-you { display: inline-flex; align-items: center; gap: 2px; padding: 0 8px; font-weight: 700; color: var(--ink); border: 1.5px solid var(--you); border-radius: 4px; }
.rq-you > span { color: var(--you); }

/* REQ-216.3: the release chip's picker: each release's name, its state in
   words, and why it can't be picked or needs a why; the line that waits for
   Steven's OK. */
.rq-relpick .rq-pick-opt { display: flex; flex-wrap: wrap; align-items: baseline; gap: 2px 10px; text-align: left; min-height: 44px; }
.rq-rel-name { font-weight: 700; }
.rq-rel-state { font: 600 12px/1.3 var(--font-mono); color: var(--mute); }
.rq-rel-why { flex-basis: 100%; font-size: 12.5px; font-weight: 400; color: var(--mute); white-space: normal; }
.rq-rel-prod { margin: 6px 0 2px; font: 700 11px/1.2 var(--font-mono); letter-spacing: .12em; text-transform: uppercase; color: var(--faint); }
.rq-rel-ask { display: grid; gap: 8px; margin-top: 8px; }
.rq-rel-waits { font-size: 13px; color: var(--ink); background: var(--needs-soft); border-radius: 999px; padding: 4px 10px; }
