/* Research pane and research card (ACQ-RESEARCH-2). Theme tokens only, so light and dark follow theme.css. */
.research .rs-sub { margin: 2px 0 0; font-size: 12.5px; }
.research .rs-crumb { margin: 0 0 4px; font-size: 12.5px; }
.research .rs-rule { font-size: 12.5px; }

/* Status, flags, chips */
.rs-status { display: inline-block; font-size: 11.5px; font-weight: 600; padding: 1px 8px; border-radius: 10px; background: var(--hx-accent-soft); color: var(--hx-accent-fg); text-transform: lowercase; }
.rs-status.done { background: var(--hx-ok-soft); color: var(--hx-ok-fg); }
.rs-status.review, .rs-status.needs-input, .rs-status.deferred { background: var(--hx-warn-soft); color: var(--hx-warn); }
.rs-status.stopped, .rs-status.failed { background: var(--hx-fail-soft); color: var(--hx-fail); }
.rs-flag { display: inline-block; font-size: 11px; padding: 0 7px; border-radius: 10px; border: 1px solid var(--hx-border); color: var(--hx-muted); margin-left: 4px; }
.rs-flag.late, .rs-flag.gate { border-color: var(--hx-warn-border, var(--hx-warn)); color: var(--hx-warn); background: var(--hx-warn-soft); }
.rs-flag.halt, .rs-flag.stale { border-color: var(--hx-fail); color: var(--hx-fail); background: var(--hx-fail-soft); }
.rs-flag.review { color: var(--hx-warn); }
.rs-flag.finding { color: var(--hx-accent-fg); border-color: var(--hx-accent); }
.rs-chips { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 8px; }
.rs-chip { display: inline-flex; align-items: center; gap: 4px; font: inherit; font-size: 12px; padding: 1px 9px; border-radius: 12px; border: 1px solid var(--hx-border); background: var(--hx-card); color: var(--hx-fg); cursor: pointer; }
.rs-chip::before { content: ""; width: 8px; height: 8px; border-radius: 50%; background: var(--finding-cite); }
.rs-chip.proposed::before { background: var(--finding-proposed); }
.rs-chip.accepted::before, .rs-chip.corrected::before { background: var(--finding-accepted); }
.rs-chip.rejected::before { background: var(--finding-rejected); }
.rs-chip:hover, .rs-chip.on { border-color: var(--accent); box-shadow: 0 0 0 2px color-mix(in srgb, var(--accent) 30%, transparent); }
.rs-chip.static { cursor: default; }

/* Card on the board thread */
.rs-card { margin: 0 0 12px; border-left: 3px solid var(--hx-accent); }
.rs-card-head { display: flex; gap: 8px; align-items: center; flex-wrap: wrap; }
.rs-kind { font-size: 12px; font-weight: 600; color: var(--hx-accent-fg); }
.rs-open { margin-left: auto; font-size: 12px; padding: 2px 10px; }
.rs-q { font-size: 14.5px; font-weight: 600; margin: 6px 0 4px; overflow-wrap: anywhere; }
.rs-meta { display: flex; flex-wrap: wrap; gap: 4px; font-size: 12px; }

/* Spend strip */
.rs-spend { display: flex; flex-wrap: wrap; gap: 14px; align-items: center; font-size: 13px; padding: 8px 12px; border: 1px solid var(--hx-border); border-radius: 8px; background: var(--hx-card); margin: 8px 0 12px; }
.rs-gates { display: inline-flex; align-items: center; gap: 8px; flex-wrap: wrap; }
.rs-gate-bar { position: relative; display: inline-block; width: 160px; height: 8px; border-radius: 4px; background: var(--hx-border-soft); }
.rs-gate-fill { display: block; height: 100%; border-radius: 4px; background: var(--hx-accent); }
.rs-gate-fill.over { background: var(--hx-warn); }
.rs-gate-tick { position: absolute; top: -3px; width: 2px; height: 14px; background: var(--hx-fg); opacity: 0.6; }

/* List */
.rs-new { margin: 0 0 12px; }
.rs-new summary { cursor: pointer; font-weight: 600; font-size: 13.5px; }
.rs-form { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; margin-top: 10px; font-size: 12.5px; }
.rs-form label { display: flex; flex-direction: column; gap: 4px; }
.rs-form .rs-wide { grid-column: 1 / -1; }
.rs-form .hx-input { width: 100%; box-sizing: border-box; font: inherit; }
.rs-filter { display: flex; flex-wrap: wrap; gap: 6px; margin: 4px 0 10px; }
.rs-filter .hx-btn { font-size: 12px; padding: 2px 10px; }
.rs-filter .hx-btn.on { background: var(--hx-accent); color: var(--on-accent); }
.rs-list { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 8px; }
.rs-row { display: flex; flex-direction: column; gap: 4px; color: inherit; text-decoration: none; }
.rs-row .rs-q { margin: 0; }
.rs-row-meta { display: flex; flex-wrap: wrap; gap: 6px; align-items: center; font-size: 12px; }

/* One request */
.rs-head { margin-bottom: 8px; }
.rs-title { overflow-wrap: anywhere; }
.rs-head-chips { display: flex; flex-wrap: wrap; gap: 8px; align-items: center; margin: 6px 0; font-size: 12.5px; }
.rs-runner { font-family: var(--hx-mono); font-size: 11.5px; padding: 1px 8px; border-radius: 10px; border: 1px solid var(--hx-border); }
.rs-stepper { display: flex; flex-wrap: wrap; list-style: none; margin: 8px 0 4px; padding: 0; font-size: 12px; }
.rs-stepper li { padding: 3px 12px 3px 16px; border: 1px solid var(--hx-border); margin-right: -1px; color: var(--hx-muted); background: var(--hx-card); }
.rs-stepper li:first-child { border-radius: 12px 0 0 12px; }
.rs-stepper li:last-child { border-radius: 0 12px 12px 0; }
.rs-stepper li.past { color: var(--hx-ok-fg); background: var(--hx-ok-soft); }
.rs-stepper li.now { color: var(--on-accent); background: var(--hx-accent); font-weight: 600; }
.rs-stepper li.rs-off.now { background: var(--hx-warn); }
.rs-why { margin: 2px 0; font-size: 12.5px; }
.rs-budget { font-size: 12px; }
.rs-banner { display: flex; gap: 12px; align-items: center; justify-content: space-between; flex-wrap: wrap; margin: 8px 0; }
.rs-banner.warn { background: var(--hx-warn-soft); color: var(--hx-warn); border: 1px solid var(--hx-warn-border, var(--hx-warn)); }
.rs-layout { display: grid; grid-template-columns: minmax(0, 1.2fr) minmax(0, 1fr); gap: 16px; align-items: start; }
.rs-section-head { display: flex; gap: 8px; align-items: center; flex-wrap: wrap; margin-bottom: 6px; }
.rs-section-head h2 { font-size: 14px; margin: 0; }
.rs-small { font-size: 11.5px; padding: 1px 8px; }
.rs-progress { display: flex; gap: 6px; align-items: center; font-size: 12.5px; padding: 4px 2px; }
.rs-dot { width: 7px; height: 7px; border-radius: 50%; background: var(--hx-accent); flex: none; }
.rs-system { font-size: 12px; padding: 3px 2px; font-style: italic; }
.rs-action { font-size: 12.5px; padding: 4px 2px; }
.rs-finding { margin-bottom: 10px; border-left: 3px solid var(--finding-proposed); }
.rs-finding.accepted, .rs-finding.corrected { border-left-color: var(--finding-accepted); }
.rs-finding.rejected { border-left-color: var(--finding-rejected); opacity: 0.8; }
.rs-finding header { display: flex; gap: 6px; align-items: center; font-size: 12px; }
.rs-finding p { margin: 6px 0; font-size: 13.5px; }
.rs-cite { font-size: 12px; }
.rs-review { font-size: 11.5px; font-weight: 600; color: var(--hx-warn); }
.rs-review.accepted, .rs-review.corrected { color: var(--hx-ok-fg); }
.rs-review.rejected { color: var(--hx-muted); }
.rs-review-actions { display: flex; gap: 4px; margin-top: 4px; }
.rs-review-actions .hx-btn { white-space: nowrap; }
.rs-table td:last-child { min-width: 132px; }
.rs-reply-row { display: flex; gap: 8px; margin-top: 8px; flex-wrap: wrap; }
.rs-stop { margin-left: auto; color: var(--hx-fail); }
.rs-side { display: flex; flex-direction: column; gap: 12px; min-width: 0; }
.rs-map { height: 340px; border-radius: 6px; overflow: hidden; border: 1px solid var(--hx-border); background: var(--hx-border-soft); }
.rs-missing { font-size: 12px; margin: 6px 0 0; }
.rs-table { width: 100%; border-collapse: collapse; font-size: 12.5px; }
.rs-table th { text-align: left; font-weight: 600; color: var(--hx-muted); border-bottom: 1px solid var(--hx-border); padding: 4px; }
.rs-table td { border-bottom: 1px solid var(--hx-border-soft); padding: 6px 4px; vertical-align: top; overflow-wrap: anywhere; }
.rs-table tr:hover td { background: var(--aq-hover, transparent); }

@media (max-width: 900px) {
  .rs-layout { grid-template-columns: minmax(0, 1fr); }
  .rs-side { order: -1; }
  .rs-map { height: 260px; }
}
@media (max-width: 520px) {
  .rs-form { grid-template-columns: 1fr; }
  .rs-table thead { display: none; }
  .rs-table tr { display: block; border-bottom: 1px solid var(--hx-border); padding: 6px 0; }
  .rs-table td { display: block; border: 0; padding: 2px 0; }
  .rs-gate-bar { width: 110px; }
  .rs-stepper li { padding: 2px 8px; }
}
