.rv-chat { display: flex; flex-direction: column; gap: 12px; }
.rv-chat[hidden] { display: none; }
.rv-body { display: grid; gap: 4px; min-width: 0; padding-top: 1px; }
.rv-text { margin: 0; font: var(--type-body); overflow-wrap: anywhere; }
.rv-meta { display: flex; flex-wrap: wrap; gap: 2px 10px; margin: 0; color: var(--text-secondary); font: var(--type-label); }
.rv-ref { color: var(--text-primary); font: var(--type-label-strong); }
.rv-el { display: inline; padding: 0; border: 0; background: none; color: var(--text-link); font: inherit; font-weight: var(--weight-semibold); text-decoration: underline; text-decoration-thickness: 1px; text-underline-offset: 2px; cursor: pointer; }
.rv-el:hover { color: var(--text-primary); }
.rv-scope { margin: 0; color: var(--text-secondary); font: var(--type-label); }
.rv-question {
  width: min(100%, 64ch);
  align-self: flex-start;
  border: 1px solid var(--border-strong);
  border-radius: var(--radius-dialog);
  background: var(--surface-raised);
}
.rv-question-head {
  display: flex;
  align-items: center;
  gap: var(--space-8);
  padding: var(--space-12) var(--space-12) 0;
  color: var(--text-secondary);
  font: var(--type-label);
}
.rv-question-head .chat-avatar { flex: none; width: var(--icon-sm); height: var(--icon-sm); }
.rv-question-head strong { min-width: 0; color: var(--text-primary); font: var(--type-body-strong); overflow-wrap: anywhere; }
.rv-question-head > span { margin-left: auto; white-space: nowrap; font-variant-numeric: tabular-nums; }
.rv-question-body { display: grid; grid-template-columns: minmax(0, 1fr); gap: var(--space-8); padding: var(--space-12); }
.rv-question .rv-text { font: var(--type-body-strong); }
.rv-question .rv-text:focus { outline: none; }
.rv-question-details { display: grid; padding: 0 var(--space-12) var(--space-4); min-width: 0; }
.rv-question-details .rv-src summary { min-height: 44px; align-content: center; }
.rv-question { scroll-margin-block-start: var(--space-8); }
.rv-measure { font-weight: var(--weight-semibold); font-variant-numeric: tabular-nums; }
.rv-targets { display: flex; align-items: baseline; flex-wrap: wrap; gap: var(--space-4) var(--space-8); font: var(--type-label); }
.rv-target-label, .rv-src { color: var(--text-secondary); font: var(--type-label); }
.rv-target-values { min-width: 0; overflow-wrap: anywhere; }
.rv-target-values.is-geometry { display: flex; flex-wrap: wrap; gap: var(--space-4); }
.is-geometry .rv-el {
  min-height: var(--size-control-sm);
  padding-inline: var(--space-8);
  border-radius: var(--radius-field);
  background: var(--surface-group);
  text-decoration: none;
}
.rv-src summary { width: fit-content; max-width: 100%; padding-block: var(--space-4); cursor: pointer; }
.rv-source-count { margin-left: var(--space-6); font-variant-numeric: tabular-nums; }
.rv-src ul { display: grid; gap: var(--space-4); margin: var(--space-4) 0 0; padding: 0; list-style: none; }
.rv-src li { display: grid; grid-template-columns: auto minmax(0, 1fr) auto; align-items: baseline; gap: var(--space-6); overflow-wrap: anywhere; }
.rv-src li .si { align-self: start; width: var(--icon-sm); height: var(--icon-sm); }
.rv-src li small { font: inherit; }
.rv-quick {
  display: grid;
  gap: var(--space-6);
  padding: var(--space-8) var(--space-12);
  border-top: 1px solid var(--border-subtle);
}
.rv-quick-row { display: flex; flex-wrap: wrap; gap: var(--space-6); }
.rv-quick-row .btn {
  flex: 1 1 auto;
  min-width: 0;
  min-height: 44px;
  padding-inline: var(--space-8);
  border-radius: var(--radius-field);
  border-color: var(--border-strong);
  background: var(--surface-field);
  font: var(--type-label-strong);
}
.rv-quick-row .btn-l { white-space: normal; text-align: center; }
.rv-proposal {
  display: grid;
  gap: var(--space-4);
  padding: var(--space-8);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-field);
  background: var(--surface-field);
  overflow-wrap: anywhere;
}
.rv-proposal strong { font: var(--type-label-strong); }
.rv-proposal p, .rv-evidence-note { margin: 0; font: var(--type-body); }
.rv-evidence-note { color: var(--text-secondary); }
.rv-question[data-review-kind="machine"] .rv-proposal {
  gap: var(--space-2);
  padding: 0;
  border: 0;
  background: transparent;
}
.rv-machine-references {
  display: flex;
  flex-wrap: wrap;
  gap: var(--space-2) var(--space-8);
  color: var(--text-secondary);
  font: var(--type-label);
  overflow-wrap: anywhere;
}
.rv-machine-scope {
  margin: 0;
  padding: 0 var(--space-12) var(--space-12);
  color: var(--text-secondary);
  font: var(--type-label);
  overflow-wrap: anywhere;
}
.rv-machine-scope strong { color: var(--text-primary); font: var(--type-label-strong); }
.rv-model {
  height: auto;
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-field);
  overflow: hidden;
}
.rv-model-stage { position: relative; display: grid; place-items: center; min-height: clamp(8rem, 19dvh, 12rem); }
.rv-model-stage .vp-frame { position: absolute; inset: 0; width: 100%; height: 100%; border: 0; }
.rv-model-stage > .projection-status { z-index: 1; background: var(--surface-viewport); pointer-events: none; }
.rv-model-empty { display: grid; justify-items: center; padding: var(--space-8); }
.rv-evidence-links { display: flex; flex-wrap: wrap; gap: var(--space-6); }
.rv-evidence-links .btn { min-height: 44px; max-width: 100%; text-decoration: none; }
.rv-compare { width: 100%; border-collapse: collapse; text-align: left; font: var(--type-label); }
.rv-compare :is(th, td) { padding: var(--space-4); border-bottom: 1px solid var(--border-subtle); overflow-wrap: anywhere; }
.rv-compare thead { background: var(--surface-subheader); }
.rv-compare td { font-variant-numeric: tabular-nums; }
.rv-risk-facts {
  display: flex;
  flex-wrap: wrap;
  gap: var(--space-4) var(--space-8);
  margin: 0;
  font: var(--type-label);
}
.rv-risk-facts > div { flex: 1 0 auto; }
.rv-risk-facts dt { color: var(--text-secondary); }
.rv-risk-facts dd { margin: 0; font: var(--type-body-strong); font-variant-numeric: tabular-nums; }
.rv-machines { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: var(--space-8); }
.rv-machines .fleet-station { grid-template-rows: auto auto minmax(0, 1fr) auto auto; align-content: start; }
.rv-machines .fleet-model-stage { height: clamp(3.75rem, 8dvh, 5rem); padding: var(--space-4); }
.rv-machines .fleet-card-head { min-height: 0; padding-block: var(--space-6); }
.rv-machines .fleet-card-info { padding-block-start: var(--space-6); overflow-wrap: anywhere; }
.rv-machines .fleet-card-foot { padding-block: var(--space-2); overflow-wrap: anywhere; }
.rv-machines .fleet-card-head,
.rv-machines .fleet-card-foot,
.rv-machines .fleet-card-info { padding-inline: var(--space-8); }
.rv-machine-pick { padding: var(--space-4) var(--space-8); color: var(--text-link); font: var(--type-label-strong); }
.rv-answer-edit, .rv-answer-label { display: grid; gap: var(--space-6); min-width: 0; }
.rv-quick > [hidden] { display: none; }
.rv-answer-actions { display: flex; flex-wrap: wrap; gap: var(--space-6); }
.rv-answer-actions .btn { min-height: 44px; }
.rv-own { justify-self: start; min-height: 44px; }
.rv-answer-label > span { font: var(--type-body-strong); }
.rv-answer-input {
  width: 100%;
  min-height: 44px;
  padding: var(--space-8);
  border: 1px solid var(--border-control);
  border-radius: var(--radius-field);
  background: var(--surface-field);
  color: var(--text-primary);
  font: var(--type-body);
  resize: vertical;
}
.rv-answer-input::placeholder { color: var(--text-secondary); }
@media (hover: hover) and (pointer: fine) {
  .is-geometry .rv-el:hover, .rv-quick-row .btn:hover { background: var(--surface-hover); color: var(--text-primary); }
  .rv-src summary:hover { color: var(--text-primary); }
}
.rv-hint { margin: 0; color: var(--text-warning); font: var(--type-label); }
.rv-hint:empty { display: none; }
.rv-reply { justify-items: end; gap: 2px; }
.rv-reply .chat-bubble { white-space: normal; }
.rv-reply[data-action="request_changes"] .chat-bubble { background: var(--tag-attention-bg); }
.rv-reply .chat-bubble b { font-weight: var(--weight-semibold); }
.rv-edit { padding: 0; border: 0; background: none; color: var(--text-secondary); font: var(--type-label); text-decoration: underline; text-decoration-thickness: 1px; text-underline-offset: 2px; cursor: pointer; }
.rv-edit:hover { color: var(--text-primary); }
.rv-skip { margin: -4px 0 0; padding-left: 28px; color: var(--text-muted); font: var(--type-label); }
.rv-final { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; margin-top: 4px; }
.rv-who { margin: 0; color: var(--text-secondary); font: var(--type-label); }
.rv-name { flex: 1 1 160px; min-width: 0; height: 32px; padding: 0 10px; border: 1px solid var(--border-control); border-radius: var(--radius-field); background: var(--surface-field); color: var(--text-primary); font: var(--type-body); }
.rv-name:focus { border-color: var(--focus-ring); outline: 1px solid var(--focus-ring); outline-offset: 0; }
.rv-body .chat-problem { margin-top: 4px; }
.chat-h:has(.rv-progress) { position: relative; }
.rv-count { flex: none; color: var(--text-secondary); font: var(--type-label-strong); white-space: nowrap; }
.rv-count[hidden], .rv-progress[hidden] { display: none; }
.rv-progress { position: absolute; right: 0; bottom: 0; left: 0; display: flex; gap: 2px; height: 3px; pointer-events: none; }
.rv-progress i { flex: 1; background: var(--border-subtle); transition: background-color var(--dur-base) var(--ease-ui); }
.rv-progress i[data-state="open"] { background: var(--status-attention); }
.rv-progress i::after {
  content: ""; display: block; height: 100%; transform: scaleX(0); transform-origin: left;
  background: var(--status-done); transition: transform var(--dur-base) var(--ease-ui);
}
.rv-progress i:is([data-state="confirm"], [data-state="request_changes"], [data-state="replace"])::after { transform: scaleX(1); }
.rv-progress i[data-state="request_changes"]::after { background: var(--status-danger); }

.rv-links { display: grid; }
.rv-row { display: grid; grid-template-columns: 10px auto minmax(0, 1fr) auto; align-items: center; gap: 8px; width: 100%; min-height: 30px; padding: 4px 12px; border: 0; border-bottom: 1px solid var(--border-subtle); background: none; color: var(--text-primary); text-align: left; font: var(--type-body); cursor: pointer; }
.rv-row:hover { background: var(--surface-hover); }
.rv-mark { width: 10px; height: 11px; clip-path: polygon(50% 0, 100% 25%, 100% 75%, 50% 100%, 0 75%, 0 25%); background: var(--status-attention); }
.rv-row:is([data-state="confirm"], [data-state="replace"]) .rv-mark { background: var(--status-done); }
.rv-row[data-state="request_changes"] .rv-mark { background: var(--status-danger); }
.rv-ref { font: var(--type-label-strong); white-space: nowrap; }
.rv-sum { overflow: hidden; color: var(--text-secondary); font: var(--type-label); text-overflow: ellipsis; white-space: nowrap; }
.rv-state { color: var(--text-warning); font: var(--type-label); white-space: nowrap; }
.rv-row:is([data-state="confirm"], [data-state="replace"]) .rv-state { color: var(--text-secondary); }
.rv-row[data-state="request_changes"] .rv-state { color: var(--text-danger); }
.rv-links-foot { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 8px; padding: 8px 12px; color: var(--text-secondary); font: var(--type-label); }
.rv-release { padding-inline: 16px; border-bottom: 1px solid var(--border-subtle); }

.chat-toggle { position: relative; }
.chat-badge { position: absolute; top: 2px; right: 0; display: grid; place-items: center; min-width: 16px; height: 16px; padding: 0 4px; border-radius: var(--radius-pill); background: var(--status-attention); color: #1D1D1D; font: 700 10px/16px var(--font-sans); pointer-events: none; }
.chat-badge[hidden] { display: none; }

@media (pointer: coarse), (max-width: 48rem) {
  .rv-quick .btn, .rv-final .btn, .rv-open, .rv-row { min-height: 44px; }
  .rv-name { height: 44px; }
  .rv-name, .rv-answer-input { font-size: 16px; }
  .rv-el, .rv-edit { min-height: 44px; padding-inline: 4px; }
  .is-geometry .rv-el { min-width: var(--size-topbar); min-height: var(--size-topbar); }
  .rv-src summary { display: list-item; min-height: 44px; align-content: center; }
}
@media (prefers-reduced-motion: reduce) {
  .rv-open:active { transform: none; }
}
