/* questions-rfis-merged.css — item 1.32 HALF ONE. Lane cc-132-nav, 2026-09-17.
 *
 * css/styles.css is one of the FROZEN FOUR, so this is a separate stylesheet per
 * the additive-only convention. Every value is a design token from
 * css/styles.css; no literal colours except the two neutral alpha washes used
 * for chip backgrounds, which have no token equivalent.
 *
 * The theme is a CLASS (:root.light), not data-theme — see CLAUDE.md Rule 4's
 * 2026-08-02 correction. Nothing here branches on theme: every colour is a
 * token, so both palettes follow automatically.
 */

.qrm-card { }

.qrm-hdr-note {
  font-size: 11px;
  color: var(--text-secondary);
  font-family: var(--font-mono);
  margin-left: auto;
  padding-left: 12px;
}
.qrm-hdr-note code {
  font-family: var(--font-mono);
  color: var(--text-secondary);
}

/* ── COUNTS ─────────────────────────────────────────────────────────────────
 * Each chip carries a number AND the name of what it counts. The label is not
 * decoration: an unlabelled integer beside another unlabelled integer is the
 * defect this section exists to retire.
 */
.qrm-counts {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin: 0 0 10px;
}
.qrm-chip {
  display: inline-flex;
  align-items: baseline;
  gap: 6px;
  padding: 5px 10px;
  border: 1px solid var(--border-color);
  border-radius: var(--radius-sm);
  background: rgba(127, 127, 127, 0.06);
  font-size: 12px;
  line-height: 1.35;
  color: var(--text);
  max-width: 100%;
}
.qrm-chip b {
  font-family: var(--font-mono);
  font-size: 14px;
  font-weight: 600;
}
.qrm-chip-what { color: var(--text-secondary); }

.qrm-chip-rfi   b { color: var(--red); }
.qrm-chip-open  b { color: var(--yellow); }
.qrm-chip-tier  b { color: var(--yellow); }
.qrm-chip-ans   b { color: var(--green); }
.qrm-chip-doc   b { color: var(--green); }
.qrm-chip-dis   b { color: var(--gray-500); }

.qrm-src {
  font-size: 11px;
  line-height: 1.5;
  color: var(--text-secondary);
  margin: 0 0 12px;
}
.qrm-src-sm { margin: 6px 0 14px; }
.qrm-src code {
  font-family: var(--font-mono);
  font-size: 10.5px;
  padding: 1px 4px;
  border-radius: 3px;
  background: rgba(127, 127, 127, 0.1);
}
.qrm-src strong { color: var(--yellow); }

/* ── FILTERS ────────────────────────────────────────────────────────────────
 * A disabled filter is visibly disabled and carries a title saying why. It is
 * NOT hidden: a filter that silently disappears is indistinguishable from one
 * that returned nothing.
 */
.qrm-filters {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  margin: 0 0 4px;
}
.qrm-filter {
  font: inherit;
  font-size: 12px;
  padding: 5px 11px;
  border: 1px solid var(--border-color);
  border-radius: 999px;
  background: transparent;
  color: var(--text-secondary);
  cursor: pointer;
}
.qrm-filter:hover:not(:disabled) {
  border-color: var(--primary);
  color: var(--text);
}
.qrm-filter.active {
  background: var(--primary);
  border-color: var(--primary);
  color: #fff;
  font-weight: 600;
}
.qrm-filter-n {
  font-family: var(--font-mono);
  font-size: 11px;
  opacity: 0.85;
}
.qrm-filter-disabled,
.qrm-filter:disabled {
  opacity: 0.4;
  cursor: not-allowed;
  text-decoration: line-through;
}

/* ── SUBHEADS ──────────────────────────────────────────────────────────────── */
.qrm-sub {
  font-size: 12px;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  color: var(--text-secondary);
  margin: 18px 0 8px;
  padding-bottom: 5px;
  border-bottom: 1px solid var(--border-color);
}

/* ── EMPTY STATES ───────────────────────────────────────────────────────────
 * Prose, deliberately. Never a table with no rows, never a 0.
 */
.qrm-empty {
  font-size: 12.5px;
  line-height: 1.55;
  color: var(--text-secondary);
  margin: 0 0 4px;
  padding: 10px 12px;
  border: 1px dashed var(--border-color);
  border-radius: var(--radius-sm);
  background: rgba(127, 127, 127, 0.03);
}

/* ── ROWS ───────────────────────────────────────────────────────────────────
 * Committed RFIs read first and are marked with the red accent; pending
 * questions read below in amber; dismissed rows are muted but present, because
 * a dismissal is recoverable and auditable from this surface.
 */
.qrm-list {
  list-style: none;
  margin: 0;
  padding: 0;
}
.qrm-row {
  display: flex;
  gap: 10px;
  align-items: flex-start;
  padding: 9px 10px;
  border-bottom: 1px solid var(--border-color);
  font-size: 13px;
  line-height: 1.45;
}
.qrm-row:last-child { border-bottom: none; }

.qrm-tag {
  flex: 0 0 auto;
  font-family: var(--font-mono);
  font-size: 11px;
  font-weight: 600;
  padding: 2px 7px;
  border-radius: var(--radius-sm);
  border: 1px solid var(--border-color);
  color: var(--text-secondary);
  white-space: nowrap;
}
.qrm-committed  .qrm-tag { color: var(--red);    border-color: var(--red); }
.qrm-question   .qrm-tag { color: var(--yellow); border-color: var(--yellow); }
.qrm-answered   .qrm-tag { color: var(--green);  border-color: var(--green); }
.qrm-dismissed  .qrm-tag { color: var(--gray-500); }

.qrm-body {
  display: flex;
  flex-direction: column;
  gap: 3px;
  min-width: 0;
}
.qrm-q { color: var(--text); overflow-wrap: anywhere; }
.qrm-q em { color: var(--text-secondary); }
.qrm-meta {
  font-size: 11px;
  color: var(--text-secondary);
  overflow-wrap: anywhere;
}
.qrm-dismissed .qrm-q { color: var(--text-secondary); }

@media (max-width: 640px) {
  .qrm-row { flex-direction: column; gap: 5px; }
  .qrm-chip { font-size: 11.5px; }
}

/* ───────────────────────────────────────────────────────────────────────────
   THE ACTION LAYER — added by lane cc-132-polish, 2026-09-18, item 1.32,
   authority RB_WORD.md:1044 ("the question controls are unstyled browser
   defaults crammed together against a styled surface, which reads as
   unfinished").

   MEASURED CAUSE: the action layer shipped in the HALF-ONE expansion (+15,180
   bytes of JS) and this stylesheet was NOT extended with it — the prior deploy
   record lists it as "unchanged". Every one of .qrm-acts, .qrm-ta, .qrm-btn,
   .qrm-act-btns, .qrm-act-note, .qrm-act-msg, .qrm-answer-shown and .qrm-sr
   had ZERO matching selectors in this file, so the browser drew its defaults.

   TOKENS ONLY — no literal hex and no colour functions, per this file's own
   and CLAUDE.md Critical Rule 4. The one #fff is on .qrm-btn-primary text and
   matches .qrm-filter.active above, which is the established pattern here.
   ─────────────────────────────────────────────────────────────────────────── */

.qrm-acts {
  display: flex;
  flex-direction: column;
  gap: 7px;
  margin-top: 8px;
  padding: 9px 10px;
  border: 1px solid var(--border-color);
  border-radius: var(--radius-sm);
  background: var(--surface);
}

/* Visually hidden, still read aloud — the textarea's label. */
.qrm-sr {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0 0 0 0);
  white-space: nowrap;
  border: 0;
}

.qrm-ta {
  font: inherit;
  font-size: 13px;
  line-height: 1.45;
  width: 100%;
  box-sizing: border-box;
  padding: 7px 9px;
  border: 1px solid var(--border-color);
  border-radius: var(--radius-sm);
  background: var(--card-bg);
  color: var(--text);
  resize: vertical;
  min-height: 42px;
}
.qrm-ta::placeholder { color: var(--text-secondary); }
.qrm-ta:focus {
  outline: none;
  border-color: var(--primary);
  box-shadow: 0 0 0 2px var(--sidebar-hover);
}

.qrm-act-btns {
  display: flex;
  flex-wrap: wrap;
  gap: 7px;
  align-items: center;
}

.qrm-btn {
  font: inherit;
  font-size: 12.5px;
  font-weight: 500;
  line-height: 1;
  padding: 7px 13px;
  border: 1px solid var(--border-color);
  border-radius: var(--radius-sm);
  background: var(--card-bg);
  color: var(--text);
  cursor: pointer;
  white-space: nowrap;
  transition: border-color .12s ease, background .12s ease, color .12s ease;
}
.qrm-btn:hover:not(:disabled) {
  border-color: var(--primary);
  color: var(--primary);
}
.qrm-btn:focus-visible {
  outline: 2px solid var(--primary);
  outline-offset: 1px;
}
.qrm-btn:disabled {
  opacity: .5;
  cursor: default;
}

/* The one action a PM takes most often reads as the primary one. */
.qrm-btn-primary {
  background: var(--primary);
  border-color: var(--primary);
  color: #fff;
  font-weight: 600;
}
.qrm-btn-primary:hover:not(:disabled) {
  background: var(--primary-hover);
  border-color: var(--primary-hover);
  color: #fff;
}

/* Setting something aside is not an equal-weight action to answering it. */
.qrm-btn-quiet {
  background: transparent;
  color: var(--text-secondary);
}
.qrm-btn-quiet:hover:not(:disabled) {
  border-color: var(--yellow);
  color: var(--yellow);
}

.qrm-act-msg {
  margin: 0;
  font-size: 12px;
  line-height: 1.45;
  color: var(--text-secondary);
  min-height: 0;
}
.qrm-act-msg:empty { display: none; }
.qrm-act-msg.good { color: var(--green); }
.qrm-act-msg.bad  { color: var(--red); }

.qrm-act-note {
  margin: 7px 0 0;
  font-size: 12px;
  line-height: 1.5;
  color: var(--text-secondary);
}

/* A recorded answer is content, not chrome — it reads as the answer. */
.qrm-answer-shown {
  margin-top: 8px;
  padding: 8px 10px;
  border-left: 3px solid var(--green);
  border-radius: 0 var(--radius-sm) var(--radius-sm) 0;
  background: var(--surface);
  font-size: 13px;
  line-height: 1.5;
  color: var(--text);
  overflow-wrap: anywhere;
}
.qrm-answer-label {
  display: block;
  font-size: 11px;
  font-weight: 600;
  letter-spacing: .03em;
  text-transform: uppercase;
  color: var(--text-secondary);
  margin-bottom: 2px;
}
.qrm-answer-shown em { color: var(--text-secondary); }

@media (max-width: 640px) {
  .qrm-act-btns { flex-direction: column; align-items: stretch; }
  .qrm-btn { width: 100%; text-align: center; }
}

/* === TRADE GROUPS (item 1.32, lane cc-132-groups, 2026-09-18) ==============
   Authority RB_WORD.md:1122 -- questions grouped by trade, ALL groups start
   collapsed, each header carrying its trade with an open count and a closed
   count. css/styles.css is FROZEN, so these live here; every value is a token.
   ========================================================================= */
.qrm-ghint {
  margin: 14px 0 8px;
  font-size: 12px;
  color: var(--text-secondary);
}
.qrm-groups {
  display: flex;
  flex-direction: column;
  gap: 6px;
}
.qrm-group {
  border: 1px solid var(--border-color);
  border-radius: var(--radius-sm);
  overflow: hidden;
  background: var(--surface);
}
/* The header is the whole control -- a PM clicks anywhere on the row, not a
   caret the width of a character. */
.qrm-ghead {
  display: flex;
  align-items: center;
  gap: 10px;
  width: 100%;
  padding: 10px 12px;
  background: transparent;
  border: 0;
  font: inherit;
  color: var(--text);
  text-align: left;
  cursor: pointer;
}
.qrm-ghead:hover { background: var(--sidebar-hover); }
.qrm-ghead:focus-visible {
  outline: 2px solid var(--blue);
  outline-offset: -2px;
}
.qrm-gcaret {
  flex: 0 0 auto;
  width: 0; height: 0;
  border-left: 5px solid var(--text-secondary);
  border-top: 4px solid transparent;
  border-bottom: 4px solid transparent;
  transition: transform .12s ease;
}
.qrm-group.is-open .qrm-gcaret { transform: rotate(90deg); }
.qrm-gname {
  flex: 1 1 auto;
  font-size: 13px;
  font-weight: 600;
  overflow-wrap: anywhere;
}
.qrm-gcounts {
  flex: 0 0 auto;
  display: flex;
  align-items: center;
  gap: 8px;
}
/* OPEN is the work, so it carries the weight. DONE is context and recedes --
   but it is still stated, because "where the work sits" needs both. */
.qrm-gc {
  font-size: 11px;
  white-space: nowrap;
  color: var(--text-secondary);
}
.qrm-gc b {
  font-size: 13px;
  font-weight: 700;
  margin-right: 3px;
}
.qrm-gc-open { color: var(--text); }
.qrm-gc-open b { color: var(--blue); }
.qrm-gc-closed b { color: var(--text-secondary); font-weight: 600; }

.qrm-gbody {
  border-top: 1px solid var(--border-color);
  padding: 4px 12px 10px;
}
.qrm-gbody .qrm-list { margin-top: 6px; }
.qrm-gbody .qrm-empty { margin: 8px 0; }

@media (max-width: 640px) {
  .qrm-ghead { flex-wrap: wrap; }
  .qrm-gname { flex: 1 1 100%; order: 1; }
  .qrm-gcaret { order: 0; }
  .qrm-gcounts { order: 2; width: 100%; padding-left: 15px; }
}
