/* ============================================================
   Review layer — production-team edits and typed feedback.

   The brief speaks in Spectral; the tooling speaks in Archivo.
   Nothing here restyles the brief itself — the layer sits over it
   the way a production assistant's pencil sits over a prompt book.
   ============================================================ */

.rv {
  --rv-edit:   #8a5d0f;            /* ochre, darkened for AA on paper */
  --rv-edit-l: #d99a1f;
  --rv-note:   #c9283e;            /* scarlet: someone has said something */
  --rv-ok:     #2f6b46;            /* committed */
  --rv-panel:  #f7f6f1;
  --rv-shadow: 0 1.5rem 3rem -1rem rgba(26, 20, 54, 0.35);
  --rv-bar-h:  3rem;
}

.rv-sr {
  position: absolute;
  width: 1px; height: 1px;
  margin: -1px; padding: 0;
  overflow: hidden;
  clip: rect(0 0 0 0);
  white-space: nowrap;
}

/* ── Editable regions ──────────────────────────────────── */

/* An editable line has to look editable at rest, or nobody finds it. A text
   cursor is what ordinary prose already shows, so it said nothing at all. */
.rv [data-edit] {
  cursor: pointer;
  border-radius: 2px;
  transition: background-color 0.12s ease, box-shadow 0.12s ease;
}
.rv [data-edit]:hover {
  background: rgba(217, 154, 31, 0.22);
  box-shadow: 0 0 0 0.3rem rgba(217, 154, 31, 0.22);
  text-decoration: underline;
  text-decoration-style: solid;
  text-decoration-color: var(--rv-edit-l);
  text-decoration-thickness: 1px;
  text-underline-offset: 0.18em;
}


.rv [data-edit].is-target {
  animation: rv-flash 1.6s ease;
}
@keyframes rv-flash {
  0%, 40% { background: rgba(217, 154, 31, 0.42); box-shadow: 0 0 0 0.4rem rgba(217, 154, 31, 0.42); }
  100%    { background: transparent; box-shadow: none; }
}

/* A field carrying a committed edit keeps a rule in the margin for as long as
   the edit is not yet in the briefs. */
.rv [data-edit].is-edited {
  position: relative;
  box-shadow: -0.75rem 0 0 -0.6rem var(--rv-edit-l);
}
.rv [data-edit].is-edited::after {
  content: attr(data-edit-badge);
  font-family: var(--sans);
  font-size: 0.5625rem;
  font-weight: 700;
  letter-spacing: 0.09em;
  text-transform: uppercase;
  color: var(--rv-edit);
  background: rgba(217, 154, 31, 0.18);
  border-radius: 1rem;
  padding: 0.05rem 0.45rem;
  margin-left: 0.45rem;
  white-space: nowrap;
  vertical-align: 0.1em;
}
.rv [data-edit].has-note::before {
  content: attr(data-note-count);
  position: absolute;
  left: -1.5rem;
  top: 0.1em;
  width: 1.1rem; height: 1.1rem;
  display: grid;
  place-items: center;
  font-family: var(--sans);
  font-size: 0.625rem;
  font-weight: 700;
  color: #fff;
  background: var(--rv-note);
  border-radius: 50%;
}
.rv [data-edit].has-note { position: relative; }

/* ── The hovering field toolbar ────────────────────────── */

/* One instance, pinned beside the clicked line so its buttons remain reachable. */
.rv-tools {
  position: absolute;
  z-index: 35;
  display: flex;
  gap: 1px;
  background: var(--ink);
  border-radius: 0.3rem;
  box-shadow: 0 0.4rem 1rem -0.3rem rgba(26, 20, 54, 0.5);
  overflow: hidden;
}
.rv-tools[hidden] { display: none; }
.rv-tools button {
  appearance: none;
  border: 0;
  background: var(--ink-2);
  color: var(--paper);
  font-family: var(--sans);
  font-size: 0.6875rem;
  font-weight: 600;
  letter-spacing: 0.02em;
  padding: 0.45rem 0.7rem;
  display: flex;
  align-items: center;
  gap: 0.35rem;
  cursor: pointer;
  line-height: 1;
}
.rv-tools button:focus-visible { outline: 2px solid var(--ochre); outline-offset: -2px; }
.rv-tools button:hover { background: var(--scarlet); }
.rv-tools button svg { width: 0.75rem; height: 0.75rem; fill: currentColor; }

/* ── Drawer editor ─────────────────────────────────────── */

.rv-editor {
  font-family: var(--sans);
  background: var(--rv-panel);
  border: 1px solid var(--hairline);
  border-left: 3px solid var(--rv-edit-l);
  border-radius: 0.3rem;
  padding: 0.7rem 0.8rem 0.6rem;
  margin: 0.2rem 0;
  box-shadow: var(--rv-shadow);
}
.rv-editor__ta {
  width: 100%;
  display: block;
  font-family: var(--serif);
  font-size: 1rem;
  line-height: 1.6;
  color: var(--ink);
  background: #fff;
  border: 1px solid var(--hairline);
  border-radius: 0.2rem;
  padding: 0.55rem 0.65rem;
  resize: vertical;
  min-height: 3.5rem;
}
.rv-editor__ta:focus {
  outline: 2px solid var(--rv-edit-l);
  outline-offset: 0;
  border-color: transparent;
}
.rv-editor__foot {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  flex-wrap: wrap;
  margin-top: 0.55rem;
}
.rv-editor__hint {
  font-size: 0.6875rem;
  color: var(--slate);
  margin-right: auto;
  display: flex;
  align-items: center;
  gap: 0.35rem;
  min-width: 0;
}
.rv-editor__hint b { color: var(--rv-ok); font-weight: 700; }
.rv-editor__marks {
  font-size: 0.625rem;
  color: var(--slate);
  letter-spacing: 0.02em;
  flex-basis: 100%;
  margin-top: 0.3rem;
}
.rv-editor__marks code {
  font-family: ui-monospace, SFMono-Regular, Menlo, monospace;
  background: rgba(26, 20, 54, 0.07);
  border-radius: 2px;
  padding: 0 0.2rem;
}

.rv-btn {
  appearance: none;
  font-family: var(--sans);
  font-size: 0.75rem;
  font-weight: 600;
  letter-spacing: 0.01em;
  border-radius: 0.25rem;
  padding: 0.4rem 0.8rem;
  border: 1px solid var(--hairline);
  background: #fff;
  color: var(--ink);
  cursor: pointer;
  line-height: 1.2;
}
.rv-btn:hover { border-color: var(--slate); }
.rv-btn--go { background: var(--ink); border-color: var(--ink); color: var(--paper); }
.rv-btn--go:hover { background: var(--scarlet); border-color: var(--scarlet); }
.rv-btn--rec { background: var(--scarlet); border-color: var(--scarlet); color: #fff; }
.rv-btn--rec:hover { background: var(--scarlet-d); }
.rv-btn--ghost { background: transparent; border-color: transparent; color: var(--slate); }
.rv-btn--ghost:hover { color: var(--ink); background: rgba(26, 20, 54, 0.06); }
.rv-btn[disabled] { opacity: 0.45; cursor: not-allowed; }

/* The save guard: asked inside the editor, so the words in question stay
   visible behind it rather than being hidden by a browser dialog. */
.rv-editor.is-guarding .rv-editor__foot { opacity: 0.35; pointer-events: none; }
.rv-guard {
  display: flex;
  align-items: center;
  gap: 0.6rem;
  flex-wrap: wrap;
  margin-top: 0.6rem;
  padding-top: 0.6rem;
  border-top: 1px solid var(--hairline);
}
.rv-guard p {
  margin: 0;
  margin-right: auto;
  font-size: 0.75rem;
  font-weight: 600;
  color: var(--ink);
}
.rv-guard__act { display: flex; gap: 0.4rem; }

.rv-close {
  appearance: none;
  border: 0;
  background: transparent;
  color: var(--paper);
  font-size: 1rem;
  line-height: 1;
  cursor: pointer;
  padding: 0.15rem 0.3rem;
  border-radius: 0.2rem;
}
.rv-close:hover { background: rgba(255, 255, 255, 0.16); }

/* Version list */
.rv-ver {
  border-top: 1px solid var(--hairline-2);
  padding: 0.55rem 0;
  display: grid;
  gap: 0.3rem;
}
.rv-ver:first-child { border-top: 0; padding-top: 0; }
.rv-ver__meta {
  display: flex;
  align-items: baseline;
  gap: 0.45rem;
  flex-wrap: wrap;
  font-size: 0.6875rem;
  color: var(--slate);
}
.rv-ver__tag {
  font-size: 0.5625rem;
  font-weight: 700;
  letter-spacing: 0.09em;
  text-transform: uppercase;
  border-radius: 1rem;
  padding: 0.08rem 0.45rem;
}
.rv-ver__tag--now  { background: var(--rv-ok); color: #fff; }
.rv-ver__tag--base { background: rgba(26, 20, 54, 0.1); color: var(--ink); }
.rv-ver__tag--old  { background: rgba(217, 154, 31, 0.22); color: var(--rv-edit); }
.rv-ver__who { font-weight: 700; color: var(--ink); }
.rv-ver__text {
  font-family: var(--serif);
  font-size: 0.875rem;
  line-height: 1.55;
  color: var(--ink);
  background: #fff;
  border: 1px solid var(--hairline-2);
  border-radius: 0.2rem;
  padding: 0.45rem 0.55rem;
  margin: 0;
}
.rv-ver__text del { background: rgba(201, 40, 62, 0.14); color: var(--scarlet-d); text-decoration: line-through; }
.rv-ver__text ins { background: rgba(47, 107, 70, 0.16); color: var(--rv-ok); text-decoration: none; }
.rv-ver__act { display: flex; gap: 0.4rem; }

/* Voice capture */
.rv-mic {
  display: flex;
  align-items: center;
  gap: 0.6rem;
  padding: 0.2rem 0 0.6rem;
}
.rv-mic__dot {
  width: 2.25rem; height: 2.25rem;
  border-radius: 50%;
  display: grid;
  place-items: center;
  background: rgba(201, 40, 62, 0.12);
  color: var(--scarlet);
  flex: none;
}
.rv-mic__dot svg { width: 1.1rem; height: 1.1rem; fill: currentColor; }
.rv-mic.is-live .rv-mic__dot {
  background: var(--scarlet);
  color: #fff;
  animation: rv-pulse 1.4s ease-in-out infinite;
}
@keyframes rv-pulse {
  0%, 100% { box-shadow: 0 0 0 0 rgba(201, 40, 62, 0.5); }
  50%      { box-shadow: 0 0 0 0.6rem rgba(201, 40, 62, 0); }
}
.rv-mic__state { font-size: 0.75rem; color: var(--slate); }
.rv-mic__state b { display: block; color: var(--ink); font-size: 0.8125rem; }

.rv-wave { display: flex; align-items: center; gap: 2px; height: 1.5rem; margin-left: auto; }
.rv-wave i {
  width: 2px;
  background: var(--scarlet);
  border-radius: 1px;
  height: 20%;
  opacity: 0.35;
}
.rv-mic.is-live .rv-wave i { animation: rv-bar 0.9s ease-in-out infinite; opacity: 1; }
@keyframes rv-bar { 0%, 100% { height: 18%; } 50% { height: 100%; } }

.rv-quote {
  font-family: var(--serif);
  font-size: 0.8125rem;
  line-height: 1.55;
  color: var(--ink);
  background: #fff;
  border: 1px solid var(--hairline-2);
  border-left: 3px solid var(--rv-note);
  border-radius: 0.2rem;
  padding: 0.5rem 0.6rem;
  margin: 0 0 0.5rem;
}
.rv-quote__ctx {
  font-family: var(--sans);
  font-size: 0.625rem;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--slate);
  display: block;
  margin-bottom: 0.25rem;
}

/* Feedback list item */
.rv-note {
  border-top: 1px solid var(--hairline-2);
  padding: 0.6rem 0;
  display: grid;
  gap: 0.35rem;
}
.rv-note:first-child { border-top: 0; padding-top: 0; }
.rv-note__meta {
  display: flex;
  align-items: baseline;
  gap: 0.45rem;
  flex-wrap: wrap;
  font-size: 0.6875rem;
  color: var(--slate);
}
.rv-note__who { font-weight: 700; color: var(--ink); }
.rv-note__src {
  font-size: 0.5625rem;
  font-weight: 700;
  letter-spacing: 0.09em;
  text-transform: uppercase;
  background: rgba(201, 40, 62, 0.14);
  color: var(--scarlet-d);
  border-radius: 1rem;
  padding: 0.08rem 0.45rem;
}
.rv-badge {
  font-family: var(--sans);
  font-size: 0.5625rem;
  font-weight: 700;
  letter-spacing: 0.02em;
  border-radius: 1rem;
  padding: 0.08rem 0.45rem;
  line-height: 1.4;
}
.rv-badge--queued,
.rv-badge--held {
  background: var(--ochre);
  color: var(--ink);
}
.rv-badge--progress {
  background: var(--rv-edit);
  color: var(--paper);
}
.rv-badge--done {
  background: var(--rv-ok);
  color: #fff;
}
.rv-badge--declined,
.rv-badge--reverted {
  background: var(--scarlet);
  color: #fff;
}
.rv-badge--reply {
  background: var(--ink-3);
  color: var(--paper);
}
.rv-badge--ask {
  background: var(--ochre-d);
  color: var(--paper);
}
.rv-asks {
  appearance: none;
  font-family: var(--sans);
  font-size: 0.6875rem;
  font-weight: 700;
  letter-spacing: 0.01em;
  border: 1px solid var(--ochre-d);
  background: var(--paper);
  color: var(--ochre-d);
  border-radius: 1rem;
  padding: 0.28rem 0.75rem;
  margin: 0 0 0.75rem;
  cursor: pointer;
}
.rv-asks[aria-pressed="true"] {
  background: var(--ochre);
  border-color: var(--ochre-d);
  color: var(--ink);
}
.rv-note__where {
  font-family: var(--sans);
  font-size: 0.6875rem;
  font-weight: 600;
  color: var(--ink);
  background: none;
  border: 0;
  padding: 0;
  cursor: pointer;
  text-align: left;
  text-decoration: underline;
  text-decoration-color: var(--hairline);
  text-underline-offset: 0.15em;
}
.rv-note__where:hover { color: var(--scarlet); }
.rv-note__text {
  font-family: var(--serif);
  font-size: 0.875rem;
  line-height: 1.55;
  margin: 0;
  white-space: pre-wrap;
  overflow-wrap: anywhere;
}
.rv-note.is-done { opacity: 0.5; }
.rv-note.is-done .rv-note__text { text-decoration: line-through; }

/* ── The toolbar ───────────────────────────────────────── */

.rv-bar {
  position: fixed;
  z-index: 50;
  right: 1rem;
  bottom: calc(1rem + env(safe-area-inset-bottom, 0px));
  display: flex;
  align-items: stretch;
  gap: 1px;
  font-family: var(--sans);
  background: var(--ink-3);
  border-radius: 0.4rem;
  box-shadow: var(--rv-shadow);
  overflow: hidden;
}
.rv-bar__tag {
  display: flex;
  align-items: center;
  gap: 0.4rem;
  background: var(--scarlet);
  color: #fff;
  font-size: 0.625rem;
  font-weight: 700;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  padding: 0 0.7rem;
}
.rv-bar__tag i {
  width: 0.4rem; height: 0.4rem;
  border-radius: 50%;
  background: #fff;
  animation: rv-blink 2.4s ease-in-out infinite;
}
@keyframes rv-blink { 0%, 100% { opacity: 1; } 50% { opacity: 0.25; } }
.rv-bar button {
  appearance: none;
  border: 0;
  background: var(--ink);
  color: var(--paper);
  font-family: var(--sans);
  font-size: 0.75rem;
  font-weight: 600;
  padding: 0.6rem 0.8rem;
  cursor: pointer;
  display: flex;
  align-items: center;
  gap: 0.4rem;
}
.rv-bar button:hover { background: var(--ink-2); }
.rv-bar button b {
  font-size: 0.625rem;
  background: var(--ochre);
  color: var(--ink);
  border-radius: 1rem;
  padding: 0.05rem 0.4rem;
}
.rv-bar button b.rv-z { background: var(--ink-3); color: var(--paper); }
.rv-bar button b.rv-n { background: var(--scarlet); color: #fff; }

/* ── Drawer ────────────────────────────────────────────── */

.rv-drawer {
  position: fixed;
  z-index: 60;
  top: 0; right: 0; bottom: 0;
  width: min(30rem, 100vw);
  display: flex;
  flex-direction: column;
  font-family: var(--sans);
  background: var(--rv-panel);
  border-left: 1px solid var(--hairline);
  box-shadow: var(--rv-shadow);
  transform: translateX(100%);
  transition: transform 0.22s cubic-bezier(0.22, 1, 0.36, 1);
  padding-top: env(safe-area-inset-top, 0px);
  padding-bottom: env(safe-area-inset-bottom, 0px);
}
.rv-drawer.is-open { transform: translateX(0); }
@media (prefers-reduced-motion: reduce) { .rv-drawer { transition: none; } }

.rv-drawer__head {
  background: var(--ink);
  color: var(--paper);
  padding: 0.8rem 0.9rem 0;
  flex: none;
}
.rv-drawer__top { display: flex; align-items: center; gap: 0.6rem; }
.rv-drawer__title {
  margin: 0;
  margin-right: auto;
  font-size: 0.8125rem;
  font-weight: 700;
  letter-spacing: 0.1em;
  text-transform: uppercase;
}
.rv-tabs { display: flex; gap: 0.3rem; margin-top: 0.7rem; }
.rv-tabs button {
  appearance: none;
  border: 0;
  border-bottom: 2px solid transparent;
  background: transparent;
  color: rgba(237, 235, 227, 0.62);
  font-family: var(--sans);
  font-size: 0.75rem;
  font-weight: 600;
  padding: 0.35rem 0.55rem;
  cursor: pointer;
  display: flex;
  align-items: center;
  gap: 0.35rem;
}
.rv-tabs button[aria-selected="true"] { color: #fff; border-bottom-color: var(--ochre); }
.rv-tabs button span {
  font-size: 0.625rem;
  background: var(--ink-3);
  border-radius: 1rem;
  padding: 0.05rem 0.4rem;
}
.rv-drawer__body { flex: 1; overflow: auto; padding: 0.9rem; }
.rv-drawer__foot {
  flex: none;
  border-top: 1px solid var(--hairline);
  padding: 0.6rem 0.9rem calc(0.6rem + env(safe-area-inset-bottom, 0px));
  display: flex;
  gap: 0.45rem;
  flex-wrap: wrap;
  background: #fff;
}

.rv-group { margin-bottom: 1.1rem; }
.rv-group__h {
  display: flex;
  align-items: baseline;
  gap: 0.45rem;
  font-size: 0.6875rem;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--ink);
  border-bottom: 1px solid var(--hairline);
  padding-bottom: 0.3rem;
  margin: 0 0 0.5rem;
}
.rv-group__h em {
  font-style: normal;
  font-weight: 500;
  letter-spacing: 0;
  text-transform: none;
  color: var(--slate);
  font-size: 0.6875rem;
}

.rv-empty {
  text-align: center;
  color: var(--slate);
  font-size: 0.8125rem;
  padding: 2.5rem 1rem;
  line-height: 1.6;
}
.rv-empty svg { width: 2rem; height: 2rem; fill: var(--hairline); display: block; margin: 0 auto 0.6rem; }

/* ── Admin: the whole board at once ────────────────────── */

.rv-admin {
  position: fixed;
  inset: 0;
  z-index: 70;
  display: flex;
  flex-direction: column;
  font-family: var(--sans);
  background: var(--paper);
  padding-top: env(safe-area-inset-top, 0px);
}
.rv-admin__head {
  flex: none;
  background: var(--ink);
  color: var(--paper);
  padding: 0.8rem var(--pad-x);
  display: flex;
  align-items: center;
  gap: 0.7rem;
  flex-wrap: wrap;
}
.rv-admin__title { margin: 0; font-size: 1rem; font-weight: 700; letter-spacing: 0.01em; }
.rv-admin__sub {
  margin: 0;
  margin-right: auto;
  font-size: 0.6875rem;
  color: rgba(237, 235, 227, 0.6);
  letter-spacing: 0.04em;
}
.rv-admin__body { flex: 1; overflow: auto; padding: 1.2rem var(--pad-x) 3rem; }
.rv-admin__grid {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 22rem);
  gap: 1.5rem;
  align-items: start;
  max-width: 78rem;
  margin: 0 auto;
}
@media (max-width: 62rem) { .rv-admin__grid { grid-template-columns: minmax(0, 1fr); } }

.rv-filter {
  display: flex;
  gap: 0.35rem;
  flex-wrap: wrap;
  margin-bottom: 0.9rem;
}
.rv-filter button {
  appearance: none;
  font-family: var(--sans);
  font-size: 0.6875rem;
  font-weight: 600;
  border: 1px solid var(--hairline);
  background: #fff;
  color: var(--slate);
  border-radius: 1rem;
  padding: 0.25rem 0.7rem;
  cursor: pointer;
}
.rv-filter button[aria-pressed="true"] {
  background: var(--ink);
  border-color: var(--ink);
  color: var(--paper);
}

.rv-card {
  background: var(--leaf);
  border: 1px solid var(--hairline-2);
  border-radius: 0.4rem;
  padding: 0.9rem;
  margin-bottom: 0.7rem;
}
.rv-card__h {
  display: flex;
  align-items: baseline;
  gap: 0.5rem;
  flex-wrap: wrap;
  margin-bottom: 0.5rem;
}
.rv-card__ep {
  font-size: 0.625rem;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  background: var(--ink);
  color: var(--paper);
  border-radius: 0.2rem;
  padding: 0.1rem 0.4rem;
}
.rv-card__where { font-size: 0.8125rem; font-weight: 600; color: var(--ink); }
.rv-card__id {
  font-family: ui-monospace, SFMono-Regular, Menlo, monospace;
  font-size: 0.625rem;
  color: var(--slate);
  margin-left: auto;
}

.rv-md {
  width: 100%;
  min-height: 22rem;
  font-family: ui-monospace, SFMono-Regular, Menlo, monospace;
  font-size: 0.6875rem;
  line-height: 1.6;
  color: var(--ink);
  background: #fff;
  border: 1px solid var(--hairline);
  border-radius: 0.3rem;
  padding: 0.7rem;
  resize: vertical;
  white-space: pre;
  overflow-wrap: normal;
  overflow-x: auto;
}
.rv-side {
  position: sticky;
  top: 1rem;
  background: var(--leaf);
  border: 1px solid var(--hairline-2);
  border-radius: 0.4rem;
  padding: 0.9rem;
}
.rv-side__h {
  margin: 0 0 0.2rem;
  font-size: 0.6875rem;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}
.rv-side__note {
  margin: 0 0 0.6rem;
  font-size: 0.6875rem;
  line-height: 1.55;
  color: var(--slate);
}

.rv-card__place {
  margin: 0 0 0.45rem;
  font-size: 0.6875rem;
  color: var(--slate);
}
.rv-retire {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.45rem;
  margin-top: 0.55rem;
  padding-top: 0.55rem;
  border-top: 1px solid var(--hairline-2);
  font-size: 0.75rem;
}
.rv-retire input[type="text"] {
  font-family: var(--sans);
  font-size: 0.75rem;
  border: 1px solid var(--hairline);
  border-radius: 0.2rem;
  padding: 0.25rem 0.4rem;
  width: 7rem;
}
.rv-bar__warn {
  font-size: 0.625rem;
  font-weight: 700;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: #fff;
  background: var(--scarlet);
  padding: 0 0.7rem;
  display: flex;
  align-items: center;
}
.rv-editor .rv-flag { margin-bottom: 0.45rem; text-transform: none; letter-spacing: 0.02em; }
.rv-stat {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 0.5rem;
  margin-bottom: 1rem;
}
.rv-stat div {
  background: var(--leaf);
  border: 1px solid var(--hairline-2);
  border-radius: 0.3rem;
  padding: 0.55rem 0.65rem;
}
.rv-stat b {
  display: block;
  font-size: 1.5rem;
  font-weight: 700;
  line-height: 1.1;
  font-variant-numeric: tabular-nums;
}
.rv-stat span {
  font-size: 0.625rem;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--slate);
}

/* ── Toast ─────────────────────────────────────────────── */

.rv-toast {
  position: fixed;
  z-index: 80;
  left: 50%;
  bottom: calc(1.2rem + env(safe-area-inset-bottom, 0px));
  transform: translate(-50%, 1.5rem);
  font-family: var(--sans);
  font-size: 0.75rem;
  font-weight: 600;
  background: var(--ink);
  color: var(--paper);
  border-radius: 0.3rem;
  padding: 0.5rem 0.9rem;
  box-shadow: var(--rv-shadow);
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.16s ease, transform 0.16s ease;
  max-width: calc(100vw - 2rem);
}
.rv-toast.is-on { opacity: 1; transform: translate(-50%, 0); }

/* The mockup banner: this build persuades, it does not persist. */
.rv-flag {
  font-family: var(--sans);
  font-size: 0.625rem;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--scarlet-d);
  background: rgba(201, 40, 62, 0.12);
  border: 1px dashed rgba(201, 40, 62, 0.4);
  border-radius: 0.25rem;
  padding: 0.3rem 0.55rem;
  margin-bottom: 0.8rem;
  line-height: 1.5;
}

@media (max-width: 40rem) {
  .rv-bar__tag { display: none; }
  .rv-bar button { font-size: 0.6875rem; padding: 0.55rem 0.6rem; }
  .rv-bar__warn { font-size: 0.5rem; padding: 0 0.45rem; }
  .rv [data-edit].has-note::before { left: -1.15rem; }
  .rv-stat { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}

/* A single review workspace beside the selected line. */
.rv [data-edit].is-reviewing {
  background: rgba(217, 154, 31, 0.15);
  outline: 2px solid var(--rv-edit-l);
  outline-offset: 4px;
}
.rv-drawer__context { padding-top: 0.65rem; }
.rv-drawer__context p { margin: 0.5rem 0 0; font-size: 0.75rem; line-height: 1.5; }
.rv-drawer__back {
  appearance: none; border: 0; background: transparent; color: var(--paper);
  font: inherit; font-size: 0.6875rem; padding: 0.25rem 0; cursor: pointer;
  text-decoration: underline; text-underline-offset: 3px;
}
.rv-drawer__back + .rv-drawer__back { float: right; }
.rv-close { min-width: 2rem; min-height: 2rem; }
.rv-section-title {
  display: block; font-family: var(--sans); font-size: 0.75rem; font-weight: 700;
  color: var(--ink); margin: 0 0 0.6rem;
}
.rv-compose { margin-bottom: 1.5rem; }
.rv-compose textarea { min-height: 8rem; }
.rv-compose .rv-editor__hint { flex-basis: 100%; margin-bottom: 0.25rem; }
.rv-drawer .rv-editor { border: 0; padding: 0; margin: 0; box-shadow: none; }
.rv-drawer .rv-editor__hint { flex-basis: 100%; }
.rv-drawer__body { min-height: 0; overscroll-behavior: contain; }
.rv-drawer :is(button, textarea):focus-visible { outline: 2px solid var(--ochre); outline-offset: 2px; }
@media (min-width: 70rem) {
  .rv-drawer-open body { padding-right: 30rem; }
  .rv-drawer-open .shell { grid-template-columns: minmax(0, 1fr); }
  .rv-drawer-open .rail { display: none; }
  .rv-drawer-open .rv-bar { right: calc(30rem + 1rem); }
}
