/* Acid Noir · the projects site (index.html) — built on assets/css/site.css tokens.
   The grain and vignette overlays are switched off here: a review page has to show the art as rendered. */

body.rv::before,
body.rv::after {
  display: none;
}

body.rv {
  --acid: var(--acid-lime);
  --rail: 340px;
  --line: color-mix(in srgb, var(--gaslight-olive) 70%, transparent);
  --panel: color-mix(in srgb, var(--smog-blue) 14%, var(--precinct-ink));
  --panel-2: color-mix(in srgb, var(--smog-blue) 26%, var(--precinct-ink));
  --pin: var(--hot-magenta);
  font-size: 16px;
  line-height: 1.45;
}

.rv-acid-lime { --acid: var(--acid-lime); }
.rv-acid-cyan { --acid: var(--electric-cyan); }
.rv-acid-orange { --acid: var(--siren-orange); }
.rv-acid-magenta { --acid: var(--hot-magenta); }

.rv kbd {
  display: inline-block;
  min-width: 1.5em;
  padding: 0 0.35em;
  border: 1px solid currentColor;
  font-family: var(--font-mono);
  font-size: 11px;
  line-height: 1.5;
  text-align: center;
  opacity: 0.8;
}

/* ---------- header ---------- */

.rv-header {
  position: sticky;
  top: 0;
  z-index: 50;
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 8px 20px;
  padding: 10px var(--gutter);
  border-bottom: 1px solid var(--line);
  background: color-mix(in srgb, var(--precinct-ink) 94%, transparent);
  backdrop-filter: blur(6px);
}

.rv-brand {
  font-family: var(--font-display);
  font-size: 26px;
  line-height: 1;
  letter-spacing: -0.01em;
  text-decoration: none;
  text-transform: uppercase;
  white-space: nowrap;
}

.rv-brand .hijack { color: var(--acid-lime); font-size: 1em; line-height: inherit; }

/* the project selector: a case-file tab beside the brand */
.rv-project__select {
  appearance: none;
  padding: 5px 28px 4px 10px;
  border: 1px solid var(--gaslight-olive);
  border-radius: 0;
  background: transparent url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='10' height='6'%3E%3Cpath d='M0 0h10L5 6z' fill='%23b5a584'/%3E%3C/svg%3E") no-repeat right 9px center;
  color: var(--fog);
  font-size: 12px;
  cursor: pointer;
}

.rv-project__select:hover,
.rv-project__select:focus-visible { border-color: var(--acid-lime); }
.rv-project__select option { background: var(--precinct-ink); color: var(--fog); }

.rv-count {
  padding: 2px 8px;
  border: 1px solid var(--line);
  color: var(--nicotine);
  text-decoration: none;
  white-space: nowrap;
}

.rv-count.has-open {
  border-color: var(--pin);
  color: var(--pin);
}

.rv-nav {
  display: flex;
  gap: 16px;
}

.rv-nav a {
  padding: 4px 0 2px;
  border-bottom: 2px solid transparent;
  color: var(--nicotine);
  text-decoration: none;
}

.rv-nav a:hover { color: var(--fog); }
.rv-nav a[aria-current="page"] { border-bottom-color: var(--acid-lime); color: var(--fog); }

.rv-tools {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 8px;
  margin-left: auto;
}

.rv-store { font-size: 11px; }

.rv-banner {
  position: sticky;
  top: var(--header-h, 52px);
  z-index: 49;
  padding: 8px var(--gutter);
  background: var(--electric-cyan);
  color: var(--precinct-ink);
}

/* Commands keep their case inside .mono text */
.rv-code {
  font-family: var(--font-mono);
  font-size: 12px;
  letter-spacing: 0;
  text-transform: none;
  color: var(--fog);
  overflow-wrap: anywhere;
}

/* ---------- buttons, fields, chips ---------- */

.rv-btn {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 6px 12px 5px;
  border: 1px solid var(--acid);
  background: var(--acid);
  color: var(--precinct-ink);
  font-family: var(--font-mono);
  font-size: 12px;
  letter-spacing: 0.08em;
  line-height: 1.4;
  text-decoration: none;
  text-transform: uppercase;
  white-space: nowrap;
  cursor: pointer;
}

.rv-btn:hover,
.rv-btn:focus-visible {
  background: transparent;
  color: var(--acid);
}

.rv-btn--ghost,
.rv-btn--small:not(.is-on) {
  background: transparent;
  color: var(--acid);
}

.rv-btn--ghost:hover,
.rv-btn--ghost:focus-visible {
  background: var(--acid);
  color: var(--precinct-ink);
}

.rv-btn--small { padding: 4px 9px 3px; font-size: 11px; }

.rv-btn--danger {
  margin-left: auto;
  border-color: var(--hot-magenta);
  background: transparent;
  color: var(--hot-magenta);
}

.rv-btn--danger:hover { background: var(--hot-magenta); color: var(--precinct-ink); }

#annotateBtn[aria-pressed="true"] {
  border-color: var(--electric-cyan);
  background: var(--electric-cyan);
  color: var(--precinct-ink);
}

.rv-field {
  display: block;
  width: 100%;
  min-width: 0;
  padding: 7px 9px;
  border: 1px solid var(--gaslight-olive);
  border-radius: 0;
  background: rgb(0 0 0 / 0.35);
  color: var(--fog);
  font: inherit;
  font-size: 15px;
  resize: vertical;
}

.rv-field:focus { border-color: var(--acid); outline: none; }

.rv-field--select {
  display: inline-block;
  width: auto;
  padding: 4px 8px;
  font-family: var(--font-mono);
  font-size: 13px;
}

.rv-chips {
  display: flex;
  flex-wrap: wrap;
  gap: 4px;
}

.rv-chip {
  padding: 3px 8px 2px;
  border: 1px solid var(--line);
  background: transparent;
  color: var(--nicotine);
  font-family: var(--font-mono);
  font-size: 11px;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  cursor: pointer;
}

.rv-chip:hover { color: var(--fog); border-color: var(--fog); }
.rv-chip.is-on { border-color: var(--acid); color: var(--acid); }

.rv-range {
  width: min(100%, 420px);
  accent-color: var(--acid);
}

/* ---------- layout ---------- */

.rv-main {
  display: block;
  max-width: 1720px;
  margin: 0 auto;
  padding: 0 var(--gutter) 40px;
  outline: none;
}

.rv-loading { padding: 40px 0; }

.rv-section {
  padding: 28px 0 8px;
  scroll-margin-top: 64px;
}

.rv-section + .rv-section { border-top: 1px solid var(--line); margin-top: 24px; }

.rv-section__head {
  display: flex;
  flex-wrap: wrap;
  align-items: baseline;
  justify-content: space-between;
  gap: 4px 16px;
  margin-bottom: 16px;
}

.rv-section__head p { margin: 0; }

.rv-h1,
.rv-h2 {
  margin: 0;
  font-family: var(--font-serif);
  font-weight: 500;
  line-height: 1.05;
  letter-spacing: -0.01em;
}

.rv-h1 { font-size: clamp(2rem, 4vw, 3rem); }
.rv-h2 { font-size: clamp(1.7rem, 3vw, 2.4rem); }
.rv-h2::first-letter { color: var(--acid); }

.rv-h3 { margin: 0 0 8px; font-size: 1.25rem; font-weight: 500; }

.rv-split {
  display: grid;
  grid-template-columns: minmax(0, 1fr);
  gap: 20px;
  align-items: start;
}

.rv-split__main { min-width: 0; }

@media (min-width: 1100px) {
  .rv-split { grid-template-columns: minmax(0, 1fr) var(--rail); }
  .rv-split > .rv-panel { position: sticky; top: calc(var(--header-h, 52px) + 16px); max-height: calc(100vh - var(--header-h, 52px) - 32px); }
}

.rv-empty {
  padding: 20px;
  border: 1px dashed var(--line);
  background: var(--panel);
}

.rv-empty p { margin: 0 0 6px; }

.rv-footer {
  margin-top: 32px;
  padding-top: 16px;
  border-top: 1px solid var(--line);
  font-size: 11px;
}

.rv-footer p { margin: 0 0 4px; }

/* ---------- cards ---------- */

.rv-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(min(100%, 240px), 1fr));
  gap: 14px;
}

.rv-card {
  display: flex;
  flex-direction: column;
  min-width: 0;
  border: 1px solid var(--line);
  background: var(--panel);
  text-decoration: none;
}

.rv-card:hover,
.rv-card:focus-visible {
  border-color: var(--acid);
  color: inherit;
}

.rv-card__thumb {
  position: relative;
  display: grid;
  place-items: center;
  aspect-ratio: 3 / 2;
  overflow: hidden;
  background: #fff;
}

.rv-card__thumb img {
  width: 100%;
  height: 100%;
  object-fit: contain;
}

.rv-card__thumb iframe {
  width: 100%;
  height: 100%;
  border: 0;
  pointer-events: none;
}

.rv-card__thumb:has(iframe) { background: #0b0b0a; }

.rv-card__thumb img.is-study { opacity: 0.45; filter: grayscale(0.6); }

.rv-card__thumb:has(.is-study),
.rv-card__thumb:has(.rv-card__none) { background: var(--precinct-ink); }

.rv-card__tag {
  position: absolute;
  top: 8px;
  left: 8px;
  padding: 1px 6px;
  background: var(--precinct-ink);
  color: var(--nicotine);
  font-size: 10px;
}

.rv-card__none {
  display: grid;
  place-items: center;
  width: 100%;
  height: 100%;
  color: var(--gaslight-olive);
  background: repeating-linear-gradient(135deg, transparent 0 14px, rgb(255 255 255 / 0.04) 14px 15px);
}

.rv-card__body {
  display: flex;
  flex-direction: column;
  gap: 2px;
  padding: 10px 12px 12px;
}

.rv-card__name { font-size: 1.15rem; font-weight: 500; }
.rv-card__role { font-size: 11px; }

.rv-card__meta {
  display: flex;
  justify-content: space-between;
  gap: 8px;
  color: var(--nicotine);
  font-size: 11px;
}

.rv-card__count { color: var(--pin); }

/* ---------- figures, stages, pins ---------- */

.rv-files { display: grid; gap: 22px; }

.rv-files__bar { display: flex; justify-content: flex-end; }

.rv-pair {
  display: grid;
  grid-template-columns: minmax(0, 1fr);
  gap: 14px;
  align-items: start;
}

@media (min-width: 900px) {
  .rv-pair.is-two { grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); }
}

.rv-fig { min-width: 0; margin: 0; }

.rv-fig figcaption {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 4px;
  margin-top: 6px;
  font-size: 11px;
  overflow-wrap: anywhere;
}

.rv-fig figcaption b { color: var(--fog); font-weight: 400; }

.rv-stage {
  position: relative;
  width: 100%;
  background: #111;
  outline: 1px solid var(--line);
}

.rv-stage > img,
.rv-stage > video {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: contain;
  user-select: none;
  -webkit-user-drag: none;
}

.rv-stage.has-pop { z-index: 20; }

.is-annotating .rv-stage:not(.rv-stage--study) {
  outline: 2px solid var(--electric-cyan);
  cursor: crosshair;
}

.rv-stage--video { cursor: pointer; }

/* a live study (Acid Noir): the iframe renders, the shield over it takes the clicks */
.rv-stage > iframe {
  display: block;
  width: 100%;
  height: 100%;
  border: 0;
  pointer-events: none;
}

.rv-shield { position: absolute; inset: 0; }

.rv-builds { margin-bottom: 10px; }

.rv-pins {
  position: absolute;
  inset: 0;
  pointer-events: none;
}

.rv-pin {
  position: absolute;
  display: grid;
  place-items: center;
  width: 26px;
  height: 26px;
  margin: -13px 0 0 -13px;
  padding: 0;
  border: 2px solid var(--precinct-ink);
  border-radius: 50%;
  background: var(--pin);
  color: #fff;
  font-family: var(--font-mono);
  font-size: 12px;
  font-weight: 700;
  line-height: 1;
  box-shadow: 0 0 0 2px rgb(255 255 255 / 0.75), 0 2px 6px rgb(0 0 0 / 0.5);
  cursor: pointer;
  pointer-events: auto;
  transition: transform 0.12s;
}

.rv-pin:hover { transform: scale(1.15); }

.rv-pin.is-older {
  border-style: dashed;
  border-color: var(--pin);
  background: var(--precinct-ink);
  color: var(--pin);
}

.rv-pin.is-resolved,
.rv-pin.is-wontfix {
  background: var(--gaslight-olive);
  color: var(--fog);
  opacity: 0.85;
}

.rv-pin.is-active { box-shadow: 0 0 0 3px var(--acid-lime), 0 2px 8px rgb(0 0 0 / 0.6); transform: scale(1.15); }

.rv-pin.is-draft {
  background: var(--electric-cyan);
  color: var(--precinct-ink);
  cursor: default;
}

/* ---------- popover ---------- */

.rv-pop {
  position: absolute;
  z-index: 30;
  display: grid;
  gap: 8px;
  width: min(320px, calc(100vw - 32px));
  padding: 12px;
  border: 1px solid var(--acid);
  background: var(--panel-2);
  box-shadow: 0 10px 30px rgb(0 0 0 / 0.55);
  cursor: auto;
}

.rv-pop__meta,
.rv-pop__by { margin: 0 24px 0 0; font-size: 11px; }

.rv-pop__actions { display: flex; flex-wrap: wrap; gap: 6px; }

.rv-pop__close {
  position: absolute;
  top: 4px;
  right: 6px;
  padding: 0 6px;
  border: 0;
  background: none;
  color: var(--nicotine);
  font-size: 22px;
  line-height: 1;
  cursor: pointer;
}

@media (max-width: 699px) {
  .rv-pop {
    position: fixed;
    inset: auto 0 0 0 !important;
    width: 100%;
    max-height: 70vh;
    overflow: auto;
    border-width: 2px 0 0;
  }
}

.rv-status {
  display: inline-block;
  margin-right: 6px;
  padding: 0 5px;
  border: 1px solid currentColor;
  font-size: 10px;
  text-transform: uppercase;
}

.rv-status.is-open { color: var(--pin); }
.rv-status.is-resolved { color: var(--acid-lime); }
.rv-status.is-wontfix { color: var(--nicotine); }

.rv-tag {
  display: inline-block;
  margin-right: 6px;
  padding: 0 5px;
  background: var(--pin);
  color: var(--precinct-ink);
  font-size: 10px;
}

/* ---------- player ---------- */

.rv-player { min-width: 0; }

.rv-scrub {
  margin-top: 8px;
  user-select: none;
}

.rv-bands {
  position: relative;
  height: 22px;
  margin-bottom: 3px;
}

.rv-bands--static { margin-top: 12px; }

.rv-band {
  position: absolute;
  top: 0;
  bottom: 0;
  overflow: hidden;
  padding: 0 4px;
  border: 0;
  border-left: 1px solid var(--precinct-ink);
  background: color-mix(in srgb, var(--smog-blue) 55%, var(--precinct-ink));
  color: var(--fog);
  font-family: var(--font-mono);
  font-size: 10px;
  line-height: 22px;
  letter-spacing: 0.05em;
  text-align: left;
  text-transform: uppercase;
  white-space: nowrap;
  text-overflow: ellipsis;
  cursor: pointer;
}

.rv-band--b { background: color-mix(in srgb, var(--gaslight-olive) 55%, var(--precinct-ink)); }
.rv-band:hover { background: var(--acid); color: var(--precinct-ink); }
.rv-band span { pointer-events: none; }

.rv-track {
  position: relative;
  height: 30px;
  cursor: ew-resize;
  touch-action: none;
}

.rv-rail {
  position: absolute;
  top: 13px;
  left: 0;
  right: 0;
  height: 4px;
  background: var(--gaslight-olive);
}

.rv-head {
  position: absolute;
  top: 3px;
  width: 3px;
  height: 24px;
  margin-left: -1px;
  background: var(--acid);
  box-shadow: 0 0 0 1px var(--precinct-ink);
  pointer-events: none;
}

.rv-ticks {
  position: absolute;
  inset: 0;
}

.rv-tick {
  position: absolute;
  top: 0;
  width: 16px;
  height: 12px;
  margin-left: -8px;
  padding: 0;
  border: 0;
  border-radius: 2px;
  background: var(--pin);
  color: #fff;
  font-family: var(--font-mono);
  font-size: 9px;
  line-height: 12px;
  cursor: pointer;
}

.rv-tick.is-resolved,
.rv-tick.is-wontfix { background: var(--gaslight-olive); }

.rv-controls {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 6px;
  margin-top: 4px;
}

.rv-ctl {
  min-width: 42px;
  padding: 5px 8px 4px;
  border: 1px solid var(--line);
  background: transparent;
  color: var(--fog);
  font-family: var(--font-mono);
  font-size: 12px;
  cursor: pointer;
}

.rv-ctl:hover { border-color: var(--acid); color: var(--acid); }
.rv-ctl--play { min-width: 52px; border-color: var(--acid); color: var(--acid); }

.rv-readout {
  margin: 0 6px;
  color: var(--fog);
  font-size: 12px;
  font-variant-numeric: tabular-nums;
  white-space: nowrap;
}

.rv-controls .rv-btn { margin-left: auto; }

.rv-anim__label { margin: 8px 0 0; font-size: 11px; overflow-wrap: anywhere; }

/* ---------- notes panel ---------- */

.rv-panel {
  display: flex;
  flex-direction: column;
  min-width: 0;
  border: 1px solid var(--line);
  background: var(--panel);
}

.rv-panel__head {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 6px;
  padding: 10px 12px;
  border-bottom: 1px solid var(--line);
}

.rv-panel__head h3 { margin: 0; font-size: 12px; color: var(--nicotine); }

.rv-notes {
  margin: 0;
  padding: 0;
  overflow-y: auto;
  list-style: none;
}

.rv-notes__empty { padding: 14px 12px; font-size: 11px; }

.rv-note + .rv-note { border-top: 1px solid color-mix(in srgb, var(--gaslight-olive) 40%, transparent); }

.rv-note__btn {
  display: flex;
  gap: 10px;
  width: 100%;
  padding: 10px 12px;
  border: 0;
  background: transparent;
  color: inherit;
  font: inherit;
  text-align: left;
  text-decoration: none;
  cursor: pointer;
}

.rv-note__btn:hover,
.rv-note.is-active .rv-note__btn { background: var(--panel-2); color: inherit; }

.rv-note__no {
  flex: none;
  display: grid;
  place-items: center;
  width: 22px;
  height: 22px;
  border-radius: 50%;
  background: var(--pin);
  color: #fff;
  font-family: var(--font-mono);
  font-size: 11px;
  font-weight: 700;
}

.rv-note.is-resolved .rv-note__no,
.rv-note.is-wontfix .rv-note__no { background: var(--gaslight-olive); }

.rv-note__body { display: grid; gap: 3px; min-width: 0; }
.rv-note__meta { font-size: 10px; color: var(--nicotine); overflow-wrap: anywhere; }
.rv-note__text { font-size: 15px; line-height: 1.35; overflow-wrap: anywhere; white-space: pre-wrap; }
.rv-note.is-resolved .rv-note__text,
.rv-note.is-wontfix .rv-note__text { color: var(--nicotine); }
.rv-note__reply { font-size: 14px; font-style: italic; color: var(--acid-lime); overflow-wrap: anywhere; }
.rv-note__by { font-size: 10px; }

/* ---------- item view ---------- */

.rv-item__head { margin-bottom: 14px; }
.rv-item__head p { margin: 4px 0 0; }
.rv-back { display: inline-block; margin-bottom: 8px; text-decoration: none; color: var(--nicotine); }

.rv-item__bar {
  display: flex;
  flex-wrap: wrap;
  align-items: flex-end;
  gap: 10px 16px;
  margin-bottom: 10px;
}

.rv-vstrip {
  display: flex;
  flex: 1 1 320px;
  gap: 8px;
  min-width: 0;
  overflow-x: auto;
  padding-bottom: 4px;
}

.rv-vchip {
  display: grid;
  flex: 0 0 auto;
  gap: 1px;
  width: 220px;
  padding: 8px 10px;
  border: 1px solid var(--line);
  background: var(--panel);
  text-decoration: none;
}

.rv-vchip b { color: var(--fog); font-weight: 400; }
.rv-vchip .mono--dim { font-size: 10px; }
.rv-vchip.is-on { border-color: var(--acid); }
.rv-vchip.is-on b { color: var(--acid); }

.rv-vchip__prompt {
  display: -webkit-box;
  overflow: hidden;
  font-size: 13px;
  line-height: 1.3;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
}

.rv-item__modes { display: flex; gap: 6px; }

.rv-vinfo {
  margin-bottom: 18px;
  padding: 10px 14px;
  border-left: 3px solid var(--acid);
  background: var(--panel);
}

.rv-vinfo p { margin: 0; }
.rv-vinfo__prompt { font-size: 17px; }
.rv-vinfo__changes { margin: 4px 0 6px; padding-left: 20px; }
.rv-vinfo__meta { font-size: 11px; overflow-wrap: anywhere; }

/* ---------- compare ---------- */

.rv-compare { display: grid; gap: 12px; }

.rv-compare__bar {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 10px 16px;
}

.rv-compare__file { margin: 10px 0 0; font-size: 12px; color: var(--nicotine); overflow-wrap: anywhere; }

.rv-ov {
  position: relative;
  width: 100%;
  overflow: hidden;
  background: #111;
  outline: 1px solid var(--line);
  touch-action: none;
}

.rv-ov--swipe { cursor: ew-resize; }

.rv-ov img,
.rv-ov__top {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
}

.rv-ov img { object-fit: contain; user-select: none; -webkit-user-drag: none; }

.rv-ov__line {
  position: absolute;
  top: 0;
  bottom: 0;
  width: 2px;
  margin-left: -1px;
  background: var(--acid);
  pointer-events: none;
}

.rv-ov__lab {
  position: absolute;
  top: 8px;
  padding: 1px 6px;
  background: var(--precinct-ink);
  font-size: 11px;
  pointer-events: none;
}

.rv-ov__lab--a { left: 8px; }
.rv-ov__lab--b { right: 8px; color: var(--acid); }
.rv-ov__cap { gap: 10px; }

/* ---------- all notes ---------- */

.rv-allnotes { display: grid; gap: 18px; margin-top: 14px; }
.rv-allnotes__group { border: 1px solid var(--line); background: var(--panel); padding: 12px 0 0; }
.rv-allnotes__group h3 { padding: 0 12px; }

/* ---------- toast ---------- */

.rv-toast {
  position: fixed;
  left: 50%;
  bottom: 18px;
  z-index: 200;
  max-width: calc(100vw - 32px);
  padding: 8px 14px;
  background: var(--fog);
  color: var(--precinct-ink);
  opacity: 0;
  transform: translate(-50%, 10px);
  transition: opacity 0.2s, transform 0.2s;
  pointer-events: none;
}

.rv-toast.is-on { opacity: 1; transform: translate(-50%, 0); }

/* ---------- sound timeline ---------- */

.rv-sound {
  min-width: 0;
  margin-top: 14px;
  padding-top: 10px;
  border-top: 1px solid var(--line);
}

.rv-sound__bar {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 6px 14px;
  margin-bottom: 6px;
}

.rv-sound__bar h3 {
  margin: 0;
  color: var(--acid);
  font-size: 13px;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.rv-sound__legend { display: flex; flex-wrap: wrap; gap: 10px; font-size: 11px; }

.rv-sound__legend span::before {
  content: "";
  display: inline-block;
  width: 9px;
  height: 9px;
  margin-right: 5px;
  background: var(--clip);
  vertical-align: -1px;
}

.rv-sound__meta { font-size: 11px; }

.rv-sound__about {
  display: grid;
  gap: 6px;
  margin: 6px 0 0;
  padding: 12px 14px 12px 32px;
  border: 1px solid var(--line);
  background: var(--panel);
}

.rv-sound__about b { color: var(--acid); font-weight: 500; }
.rv-sound__zoom { display: flex; gap: 4px; margin-left: auto; }
.rv-sound__zoom .rv-ctl { min-width: 32px; }

.rv-sound__scroll {
  overflow-x: auto;
  overflow-y: hidden;
  border: 1px solid var(--line);
  background: var(--panel);
}

.rv-sound__inner {
  position: relative;
  min-width: 100%;
  padding-bottom: 4px;
  cursor: ew-resize;
  user-select: none;
}

.rv-sound__ruler {
  position: relative;
  height: 18px;
  border-bottom: 1px solid var(--line);
}

.rv-sound__tick {
  position: absolute;
  top: 0;
  bottom: 0;
  padding-left: 3px;
  border-left: 1px solid color-mix(in srgb, var(--gaslight-olive) 60%, transparent);
  color: var(--nicotine);
  font-family: var(--font-mono);
  font-size: 9px;
  line-height: 18px;
  white-space: nowrap;
  pointer-events: none;
}

.rv-sound__tick.is-major { border-left-color: var(--gaslight-olive); color: var(--fog); }

.rv-sound__head {
  position: absolute;
  top: 0;
  bottom: 0;
  width: 2px;
  margin-left: -1px;
  background: var(--acid);
  box-shadow: 0 0 0 1px var(--precinct-ink);
  pointer-events: none;
  z-index: 3;
}

.rv-lane {
  position: relative;
  height: 28px;
  border-bottom: 1px solid color-mix(in srgb, var(--gaslight-olive) 30%, transparent);
}

.rv-lane__group {
  height: 14px;
  border-top: 1px solid var(--line);
  background: color-mix(in srgb, var(--clip) 7%, transparent);
}

.rv-lane__group span {
  position: sticky;
  left: 0;
  display: inline-block;
  padding: 0 6px;
  color: var(--clip);
  font-size: 9px;
  line-height: 14px;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  pointer-events: none;
}

.is-voice { --clip: var(--electric-cyan); }
.is-sfx { --clip: var(--siren-orange); }
.is-music { --clip: var(--acid-lime); }
.is-ambience { --clip: var(--nicotine); }

.rv-clip {
  position: absolute;
  top: 2px;
  bottom: 2px;
  min-width: 3px;
  overflow: hidden;
  padding: 0;
  border: 0;
  border-left: 2px solid var(--clip);
  background: color-mix(in srgb, var(--clip) 18%, transparent);
  color: var(--fog);
  text-align: left;
  cursor: pointer;
}

.rv-clip canvas {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  opacity: 0.75;
}

.rv-clip__label {
  position: relative;
  display: block;
  overflow: hidden;
  padding: 0 4px;
  font-family: var(--font-mono);
  font-size: 10px;
  line-height: 24px;
  white-space: nowrap;
  text-overflow: ellipsis;
  text-shadow: 0 0 3px var(--precinct-ink), 0 0 2px var(--precinct-ink);
  pointer-events: none;
}

.rv-clip:hover { background: color-mix(in srgb, var(--clip) 32%, transparent); }
.rv-clip:focus-visible,
.rv-clip.is-on { outline: 2px solid var(--fog); outline-offset: -2px; z-index: 1; }
.rv-clip.is-edited { outline: 1px dashed var(--clip); outline-offset: -1px; }
.rv-clip.is-on.is-edited { outline: 2px dashed var(--fog); outline-offset: -2px; }

.rv-clip.is-noted::after {
  content: "";
  position: absolute;
  top: 0;
  right: 0;
  border-top: 8px solid var(--pin);
  border-left: 8px solid transparent;
}

/* one cue */

.rv-cue {
  margin-top: 10px;
  padding: 12px;
  border: 1px solid var(--line);
  background: var(--panel-2);
}

.rv-cue[hidden] { display: none; }

.rv-cue__title {
  position: relative;
  margin: 0 0 8px;
  padding-right: 28px;
  overflow-wrap: anywhere;
}

.rv-cue__title .mono { font-size: 11px; }
.rv-cue__title .rv-pop__close { top: -6px; right: -6px; }

.rv-cue__strip {
  position: relative;
  height: 64px;
  border: 1px solid var(--line);
  border-left: 2px solid var(--clip);
  background: color-mix(in srgb, var(--clip) 10%, var(--precinct-ink));
  cursor: ew-resize;
}

.rv-cue__canvas { display: block; width: 100%; height: 64px; }

.rv-cue__head {
  position: absolute;
  top: 0;
  bottom: 0;
  width: 2px;
  margin-left: -1px;
  background: var(--acid);
  pointer-events: none;
}

.rv-cue__axis {
  position: relative;
  height: 16px;
  margin-bottom: 10px;
  color: var(--nicotine);
  font-size: 9px;
}

.rv-cue__axis span { position: absolute; top: 2px; transform: translateX(-50%); white-space: nowrap; }
.rv-cue__axis span:first-child { transform: none; }
.rv-cue__axis span:last-child { transform: translateX(-100%); }

.rv-cue__grid {
  display: grid;
  grid-template-columns: minmax(0, 1fr);
  gap: 14px;
}

@media (min-width: 900px) {
  .rv-cue__grid { grid-template-columns: minmax(0, 1.3fr) minmax(0, 1fr); }
}

.rv-cue__row {
  display: grid;
  grid-template-columns: 92px minmax(0, 1fr) 56px;
  align-items: center;
  gap: 4px 10px;
  margin-bottom: 6px;
  font-size: 12px;
}

.rv-cue__row input[type="range"] { width: 100%; accent-color: var(--acid); }
.rv-cue__row output { color: var(--fog); font-variant-numeric: tabular-nums; text-align: right; }
.rv-cue__was { grid-column: 2 / 4; min-height: 0; font-size: 10px; }
.rv-cue__was:empty { display: none; }
.rv-cue__hint { margin: 6px 0 0; font-size: 10px; }

.rv-cue__side { display: flex; flex-direction: column; gap: 8px; min-width: 0; }
.rv-cue__play { display: flex; flex-wrap: wrap; gap: 6px; }

.rv-cue__notes {
  margin: 0;
  padding: 0;
  list-style: none;
  font-size: 11px;
}

.rv-cue__notes:empty { display: none; }

.rv-link {
  padding: 0;
  border: 0;
  background: none;
  color: var(--nicotine);
  font: inherit;
  text-align: left;
  text-decoration: underline;
  cursor: pointer;
}

.rv-link:hover { color: var(--acid); }

/* ---------- phones ---------- */

@media (max-width: 699px) {
  .rv-header { gap: 6px 12px; padding: 8px var(--gutter); }
  .rv-brand { font-size: 21px; }
  .rv-project { margin-left: auto; }
  .rv-nav { order: 3; width: 100%; gap: 14px; font-size: 11px; }
  .rv-tools { order: 4; width: 100%; margin-left: 0; }
  .rv-store { display: none; }
  .rv-header { position: static; }
  .rv-banner { top: 0; }
  .rv-grid { grid-template-columns: minmax(0, 1fr); }
  .rv-readout { order: 10; width: 100%; margin: 2px 0 0; }
  .rv-controls .rv-btn { margin-left: 0; }
  .rv-ctl { min-width: 40px; }
}

/* ---------- voice casting ---------- */

.rv-cast {
  margin-top: 18px;
  padding-top: 12px;
  border-top: 1px solid var(--line);
  --acid: var(--electric-cyan);
}

.rv-cast__tabs { margin: 8px 0 10px; }

.rv-cast__grid {
  display: grid;
  grid-template-columns: minmax(0, 1fr);
  gap: 12px;
}

@media (min-width: 900px) {
  .rv-cast__grid { grid-template-columns: minmax(240px, 34%) minmax(0, 1fr); }
}

.rv-cast__opts {
  margin: 0;
  padding: 0;
  max-height: 460px;
  overflow-y: auto;
  list-style: none;
  border: 1px solid var(--line);
  background: var(--panel);
}

.rv-cast__opt {
  display: flex;
  gap: 10px;
  width: 100%;
  padding: 8px 10px;
  border: 0;
  border-bottom: 1px solid var(--line);
  background: transparent;
  color: var(--fog);
  font: inherit;
  text-align: left;
  cursor: pointer;
}

.rv-cast__opt:hover { background: var(--panel-2); }
.rv-cast__opt.is-on { background: color-mix(in srgb, var(--acid) 16%, var(--panel)); box-shadow: inset 3px 0 0 var(--acid); }
.rv-cast__opt.is-playing .rv-cast__n { background: var(--acid); color: var(--precinct-ink); }

.rv-cast__n {
  flex: none;
  width: 22px;
  height: 22px;
  border: 1px solid var(--line);
  font-size: 11px;
  line-height: 20px;
  text-align: center;
}

.rv-cast__body { display: flex; flex-direction: column; gap: 2px; min-width: 0; }
.rv-cast__body b { font-size: 15px; font-weight: 500; }
.rv-cast__body .mono { font-size: 11px; overflow-wrap: anywhere; }

.rv-cast__badges { display: flex; flex-wrap: wrap; gap: 4px; margin-top: 2px; }

.rv-cast__badge {
  padding: 0 5px;
  border: 1px solid var(--line);
  color: var(--nicotine);
  font-family: var(--font-mono);
  font-size: 10px;
  white-space: nowrap;
}

.rv-cast__badge.is-cast { border-color: var(--acid-lime); color: var(--acid-lime); }
.rv-cast__badge.is-login { border-color: var(--siren-orange); color: var(--siren-orange); }
.rv-cast__badge.is-long { border-color: var(--pin); color: var(--pin); }
.rv-cast__badge.is-score { border-color: var(--electric-cyan); color: var(--electric-cyan); }

.rv-cast__side {
  min-width: 0;
  padding: 12px;
  border: 1px solid var(--line);
  background: var(--panel-2);
}

.rv-cast__head {
  display: grid;
  grid-template-columns: auto minmax(0, 1fr) auto;
  gap: 10px;
  align-items: start;
}

.rv-cast__head b { font-size: 18px; font-weight: 500; }
.rv-cast__head p { margin: 2px 0 0; font-size: 11px; overflow-wrap: anywhere; }
.rv-cast__head .rv-cast__notes { font-size: 14px; font-family: var(--font-serif); }
.rv-cast__who { margin: 10px 0 6px; font-size: 11px; }

.rv-cast__lines { margin: 0; padding: 0; list-style: none; }

.rv-cast__line {
  display: grid;
  grid-template-columns: auto minmax(0, 1fr) auto;
  gap: 4px 8px;
  align-items: center;
  padding: 6px 0;
  border-top: 1px solid var(--line);
}

.rv-cast__line > .rv-ctl:nth-of-type(2),
.rv-cast__line > .rv-ctl:nth-of-type(3) { grid-row: 2; font-size: 11px; }
.rv-cast__line > .rv-ctl:nth-of-type(2) { grid-column: 2; justify-self: start; }
.rv-cast__line > .rv-ctl:nth-of-type(3) { grid-column: 3; }
.rv-cast__line.is-on .rv-cast__text q { color: var(--acid); }
.rv-cast__line.is-playing > .rv-ctl:first-child { border-color: var(--acid); color: var(--acid); }

.rv-cast__text { min-width: 0; font-family: var(--font-serif); font-size: 16px; }
.rv-cast__text .mono { font-size: 11px; }
.rv-cast__fit { font-size: 11px; color: var(--nicotine); white-space: nowrap; }
.rv-cast__fit.is-long { color: var(--pin); }

.rv-cast__actions {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 6px;
  margin-top: 10px;
}

.rv-cast__actions .rv-btn { margin-left: auto; }
.rv-cast__auto { font-size: 11px; color: var(--nicotine); }
.rv-ctl:disabled, .rv-btn:disabled { opacity: 0.45; cursor: default; }

/* the cue panel's real-recording options */
.rv-rec { margin-top: 12px; padding-top: 10px; border-top: 1px solid var(--line); }
.rv-rec__head { margin: 0 0 6px; font-size: 12px; }
.rv-rec__list { margin: 0; padding: 0; list-style: none; }
.rv-rec__item {
  display: grid;
  grid-template-columns: auto minmax(0, 1fr);
  gap: 2px 8px;
  align-items: center;
  padding: 5px 0;
  border-top: 1px solid var(--line);
}
.rv-rec__item > .mono { grid-column: 2; font-size: 11px; overflow-wrap: anywhere; }
.rv-rec__item.is-on b { color: var(--acid); }
.rv-rec__item b { font-weight: 500; }

/* ---------- sign-in (Supabase) ---------- */

.rv-auth {
  position: relative;
  display: flex;
  align-items: center;
  gap: 8px;
}

.rv-auth[hidden] { display: none; }

.rv-auth__who {
  max-width: 240px;
  overflow: hidden;
  color: var(--nicotine);
  font-size: 11px;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.rv-auth__form {
  position: absolute;
  top: calc(100% + 8px);
  right: 0;
  z-index: 60;
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 8px;
  width: min(360px, calc(100vw - 32px));
  padding: 12px;
  border: 1px solid var(--acid-lime);
  background: var(--panel-2);
  box-shadow: 0 10px 30px rgb(0 0 0 / 0.55);
}

.rv-auth__form[hidden] { display: none; }
.rv-auth__form p { grid-column: 1 / -1; margin: 0; font-size: 10px; }

/* ---------- members-only splash (Supabase on, signed out): the title and Continue, nothing else ---------- */

.is-gated .rv-header { display: none; }

.rv-splash {
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: flex-start;
  gap: 32px;
  min-height: calc(100vh - 40px);
  min-height: calc(100svh - 40px);
}

.rv-splash__title { color: var(--fog); }
.rv-splash__title .hijack { color: var(--acid-lime); font-size: 1em; line-height: inherit; }
.rv-splash__lede { margin: 0; max-width: 34em; font-size: 1.15rem; color: var(--nicotine); }
.rv-splash__go,
.rv-splash__actions .rv-btn { padding: 12px 28px 11px; font-size: 14px; }
