/* Shared results. Each published version is immutable, named by number and
   digest. Reviewer decisions (amber while a person is needed, sage or red once
   recorded) stay separate from task acceptance and run outcomes. */
#reviews-view { min-width:0; }
#reviews-view [hidden] { display:none !important; }
.reviews-summary { margin:-10px 0 22px; font-size:13px; color:var(--muted); }
.reviews-actions { display:flex; flex-wrap:wrap; align-items:center; gap:8px; }
.reviews-empty { font-size:13px; line-height:1.6; color:var(--muted); }
.reviews-field { display:grid; gap:6px; margin:0 0 16px; font-size:13px; font-weight:550; }
.reviews-field>span { color:var(--ink); }
.reviews-field select,.reviews-field input,.reviews-field textarea { width:100%; min-width:0; font-weight:400; }

.reviews-layout { display:grid; grid-template-columns:248px minmax(0,1fr); gap:32px; align-items:start; }

/* Sidebar: two quiet lists, not boxes. */
.reviews-sidebar { display:grid; gap:28px; min-width:0; }
.reviews-section-heading { display:flex; align-items:center; justify-content:space-between; gap:12px; }
.reviews-queue h2,.reviews-library h2 { font-size:15px; }
.reviews-queue>select { width:100%; margin:10px 0 4px; font-size:13px; }
.reviews-list { list-style:none; margin:6px 0 0; padding:0; }
.reviews-list li+li { border-top:1px solid var(--line); }
#reviews-view .reviews-item { display:grid; justify-items:start; justify-content:stretch; gap:3px; width:100%; min-height:0; padding:10px 10px; border-radius:var(--radius-control); white-space:normal; text-align:left; color:var(--ink); font-weight:400; }
.reviews-item strong { font-size:13.5px; font-weight:560; line-height:1.4; overflow-wrap:anywhere; }
.reviews-item-meta { display:inline-flex; align-items:center; gap:7px; font-size:12px; color:var(--muted); }
.reviews-item-meta::before { content:""; width:7px; height:7px; border-radius:50%; flex-shrink:0; box-shadow:inset 0 0 0 1.5px var(--human); }
.reviews-item[data-decision="approved"] .reviews-item-meta::before { background:var(--done); box-shadow:none; }
.reviews-item[data-decision="changes_requested"] .reviews-item-meta::before { background:var(--danger); box-shadow:none; }
#reviews-view .reviews-item[aria-current="true"] { background:var(--surface); box-shadow:inset 0 0 0 1px var(--line); }
.reviews-sidebar .reviews-empty { padding:10px 0 0; }

/* Detail: the result reads like a document, with its facts in a side rail. */
.reviews-detail { display:grid; grid-template-columns:minmax(0,1fr) 236px; grid-template-areas:"head head" "notice notice" "main side"; gap:0 36px; padding:28px 32px 32px; min-width:0; }
.reviews-detail>.reviews-section-heading { grid-area:head; align-items:flex-start; padding-bottom:20px; margin-bottom:24px; border-bottom:1px solid var(--line); }
.reviews-detail>.reviews-version-notice { grid-area:notice; }
.reviews-side { grid-area:side; display:grid; gap:26px; align-content:start; min-width:0; }
.reviews-main { grid-area:main; min-width:0; }
.reviews-detail-empty { grid-column:1/-1; min-height:300px; display:grid; place-content:center; text-align:center; max-width:40ch; margin:auto; }
.reviews-artifact-title { font-family:var(--font-display); font-size:28px; line-height:1.15; font-weight:650; letter-spacing:-.02em; overflow-wrap:anywhere; }
.reviews-side h3,.artifact-attachments h3 { margin:0 0 10px; font-size:13px; font-weight:600; color:var(--ink); }

.reviews-version-notice { display:flex; flex-wrap:wrap; align-items:center; justify-content:space-between; gap:10px 16px; margin:0 0 24px; padding:10px 14px; border-left:3px solid var(--warning); border-radius:var(--radius-control); background:var(--warning-bg); font-size:13px; }
.reviews-version-notice p { max-width:68ch; }

/* Decision: who still has to decide, or what they decided. */
.reviews-decision { padding:14px 16px; border-left:3px solid var(--human); border-radius:var(--radius-control); background:var(--human-soft); }
.reviews-decision .eyebrow { margin-bottom:2px; }
.reviews-decision h3 { margin:0 0 6px; font-family:var(--font-display); font-size:18px; font-weight:640; color:var(--human); }
.reviews-decision p { font-size:13px; line-height:1.55; }
.reviews-decision .reviews-context { margin:0 0 6px; font-size:12px; color:var(--muted); }
.reviews-decision.approved { border-left-color:var(--done); background:var(--done-soft); }
.reviews-decision.approved h3 { color:var(--done); }
.reviews-decision.changes_requested { border-left-color:var(--danger); background:var(--danger-bg); }
.reviews-decision.changes_requested h3 { color:var(--danger); }
.reviews-note { white-space:pre-wrap; overflow-wrap:anywhere; }
.reviews-decision .reviews-separate { margin-top:10px; font-size:12px; color:var(--muted); }

/* Version history: a quiet timeline, newest first. */
.reviews-versions { list-style:none; margin:0; padding:0; }
.reviews-version { position:relative; padding-left:20px; }
.reviews-version::before { content:""; position:absolute; left:4px; top:0; bottom:0; width:1px; background:var(--line-strong); }
.reviews-version:first-child::before { top:16px; }
.reviews-version:last-child::before { bottom:calc(100% - 16px); }
.reviews-version:only-child::before { display:none; }
.reviews-version::after { content:""; position:absolute; left:0; top:12px; width:9px; height:9px; border-radius:50%; background:var(--surface); box-shadow:inset 0 0 0 2px var(--human); }
.reviews-version.approved::after { background:var(--done); box-shadow:none; }
.reviews-version.changes_requested::after { background:var(--danger); box-shadow:none; }
.reviews-version-button { display:grid; justify-items:start; justify-content:stretch; gap:1px; min-height:0; font-weight:400; width:100%; padding:6px 8px; border:0; border-radius:var(--radius-control); background:transparent; color:var(--ink); text-align:left; }
.reviews-version-button:hover { background:var(--surface-hover); }
.reviews-version-button[aria-current="true"] { background:var(--surface-hover); }
.reviews-version-button strong { font-size:13px; font-weight:600; }
.reviews-version-state { font-size:12px; color:var(--human); }
.reviews-version.approved .reviews-version-state { color:var(--done); }
.reviews-version.changes_requested .reviews-version-state { color:var(--danger); }
.reviews-version-meta { font-size:12px; color:var(--faint); }

/* Provenance: digest in mono, de-emphasised. */
.reviews-provenance { display:grid; gap:10px; padding-top:18px; border-top:1px solid var(--line); }
.reviews-context { display:grid; gap:2px; font-size:12px; line-height:1.55; color:var(--muted); }
.reviews-digest { font-size:12px; color:var(--muted); }
.reviews-digest code { display:block; margin:2px 0 6px; font-size:12px; line-height:1.5; color:var(--faint); overflow-wrap:anywhere; }
.reviews-provenance .reviews-actions .button { min-height:30px; padding-left:0; padding-right:10px; font-size:12.5px; }
.reviews-provenance .reviews-actions .button:hover { background:transparent; text-decoration:underline; text-underline-offset:3px; }

.reviews-content { min-height:120px; padding:0 0 28px; overflow-wrap:anywhere; }
.reviews-markdown { max-width:72ch; font-size:15px; line-height:1.75; min-width:0; }
.reviews-markdown pre { max-width:100%; overflow:auto; }

/* Your decision, after reading the content. */
.reviews-review-form { padding:22px 0 24px; border-top:1px solid var(--line); }
.reviews-review-form h3 { font-family:var(--font-display); font-size:16px; font-weight:620; }
.reviews-review-form .help { margin:4px 0 16px; max-width:68ch; }
.reviews-review-form select { max-width:280px; }

/* Publisher. */
.reviews-editor { margin:0 0 28px; padding:24px 28px; }
.reviews-editor h2 { margin:2px 0 6px; font-size:20px; }
.reviews-editor .help { margin:0 0 20px; max-width:68ch; }
.reviews-editor .reviews-field { max-width:720px; }
.reviews-preview { margin:0 0 18px; padding:10px 14px; border-radius:var(--radius-control); background:var(--surface-subtle); }
.reviews-preview summary { font-size:13px; font-weight:550; }
.reviews-preview[open] summary { margin-bottom:14px; }
.reviews-saved-preview { margin:16px 0; padding:16px 0 0; border-top:1px solid var(--line); }
.reviews-saved-preview h3 { margin:0 0 10px; font-size:14px; }

/* Files, comparison and attachments (also used by Work and Discussion). */
.artifact-file-meta,.artifact-diff-heading { font-size:12px; color:var(--muted); overflow-wrap:anywhere; }
.artifact-file-body { margin:12px 0; }
.artifact-file-image { display:block; max-width:100%; max-height:70vh; border-radius:var(--radius-control); background:var(--sunk); }
.artifact-file-text,.artifact-diff-lines { max-height:60vh; margin:0; overflow:auto; padding:12px 14px; border-radius:var(--radius-control); background:var(--code); color:var(--ink); font-size:12px; line-height:1.6; white-space:pre-wrap; overflow-wrap:anywhere; }
.artifact-diff-lines span { display:block; }
.artifact-diff-lines .added { background:var(--done-soft); color:var(--done); }
.artifact-diff-lines .removed { background:var(--danger-bg); color:var(--danger); }
.artifact-compare { margin:0; padding:14px 0; border-top:1px solid var(--line); }
.artifact-compare summary,.artifact-attachment summary,.artifact-attach summary { font-size:13px; color:var(--muted); line-height:1.7; }
.artifact-compare[open] summary,.artifact-attach[open] summary { color:var(--ink); }
.artifact-compare .reviews-actions { align-items:flex-end; margin-top:12px; }
.artifact-compare .reviews-field { margin:0; }
.artifact-diff { margin-top:12px; }
.artifact-attachments { margin:16px 0; }
.reviews-side .artifact-attachments { margin:0; padding-top:18px; border-top:1px solid var(--line); }
.artifact-attachment-list { margin:0 0 8px; padding-left:16px; font-size:13px; line-height:1.6; }
.artifact-attachment-list .help { margin:0; list-style:none; margin-left:-16px; }
.artifact-attach select { width:100%; margin:8px 0; }

@media (max-width:1320px) {
  .reviews-detail { grid-template-columns:minmax(0,1fr); grid-template-areas:"head" "notice" "side" "main"; }
  .reviews-side { grid-template-columns:repeat(auto-fit,minmax(220px,1fr)); gap:20px 28px; margin-bottom:28px; }
  .reviews-side .artifact-attachments,.reviews-provenance { padding-top:0; border-top:0; }
}
@media (max-width:960px) { .reviews-layout { grid-template-columns:220px minmax(0,1fr); gap:20px; } .reviews-detail { padding:22px; } }
@media (max-width:700px) {
  .reviews-layout { grid-template-columns:1fr; }
  .reviews-sidebar { grid-template-columns:1fr; gap:20px; }
  .reviews-editor { padding:20px; }
}
@media (max-width:560px) {
  .reviews-detail { padding:18px 16px; }
  .reviews-artifact-title { font-size:22px; }
  .reviews-detail>.reviews-section-heading { flex-wrap:wrap; }
  .reviews-review-form select { max-width:none; }
}
#reviews-view .reviews-queue,#reviews-view .reviews-library { padding:0; }
