/* Room acoustics — on top of calc.css (light only, like calc.css) */
main.rv { --rv-ink: var(--ink); --rv-plot: var(--surface); --rv-grid: var(--fill-1); }
main.rv .tabs { grid-template-columns: repeat(3, 1fr); }
main.rv .stage-bar { justify-content: flex-start; gap: 8px; flex-wrap: wrap; }
main.rv .stage-bar .hist { margin-left: auto; }
#view { display: block; width: 100%; height: auto; user-select: none; touch-action: none; }
#view .hit { fill: transparent; stroke: none; }
#view .handle { cursor: grab; }
#view .handle.hm { cursor: move; } #view .handle.hz { cursor: ns-resize; } #view .handle.hx { cursor: nwse-resize; } #view .handle.hy { cursor: nesw-resize; }
#view .handle .knob { fill: var(--surface); stroke: var(--sel); stroke-width: 1.8; }
#view .handle:hover .knob, #view .handle:focus .knob { fill: var(--sel); }

/* the room */
.rv-face { stroke: var(--steel-550); stroke-width: 1; stroke-linejoin: round; cursor: pointer; }
.rv-face.on { stroke: var(--sel); stroke-width: 2; }
.rv-patch { stroke: var(--x-6f767e, #6f767e); stroke-width: 1; cursor: pointer; }
.rv-patch.far { stroke: var(--steel-550); stroke-dasharray: 4 3; }
.rv-patch.on { stroke: var(--sel); stroke-width: 2; }
.rv-e { fill: none; stroke: var(--rv-ink); stroke-width: 1.3; stroke-linejoin: round; }
.rv-en { fill: none; stroke: var(--steel-550); stroke-width: 1; stroke-dasharray: 5 4; }
.rv-mast { fill: none; stroke: var(--steel-550); stroke-width: .9; stroke-dasharray: 2 2; }
.rv-ray { fill: none; stroke: var(--rv-ink); stroke-width: 1.2; stroke-dasharray: 5 3; }
.rv-src { fill: var(--orange); stroke: var(--halo); stroke-width: 1.4; }
.rv-wave { fill: none; stroke: var(--orange); stroke-width: 1.1; opacity: .75; }
.rv-rcv { fill: var(--surface); stroke: var(--rv-ink); stroke-width: 1.6; }
.rv-leg { stroke: var(--faint); stroke-width: .6; }
.rv-legt { font-size: 11px; fill: var(--text-3); }
.rv-rc { fill: none; stroke: var(--moment); stroke-width: 1; stroke-dasharray: 3 3; opacity: .8; }

/* pills */
#view .pill rect { fill: var(--surface); stroke: var(--steel-300); }
#view .pill text { font-size: 11.5px; font-weight: 500; fill: var(--text-2); font-variant-numeric: tabular-nums; }
#view .pill.dp text { fill: var(--text); font-weight: 600; }
#view .pill.fp { cursor: pointer; } #view .pill.fp.on rect { stroke: var(--sel); stroke-width: 1.4; } #view .pill.fp.on text { fill: var(--text); font-weight: 600; }
#view [data-pickf]:hover .pill rect { stroke: var(--sel); }
#view .pill.rp text { fill: var(--text); }
#view .pill.tp text { font-weight: 600; fill: var(--text); }
#view .pill.tp.good rect { stroke: color-mix(in srgb, var(--good) 60%, transparent); } #view .pill.tp.good text { fill: var(--good-ink, #23663f); }
#view .pill.tp.warn rect { stroke: color-mix(in srgb, var(--amber) 70%, transparent); } #view .pill.tp.warn text { fill: var(--warn-ink, #8a5a0e); }
#view .pill.tp.bad rect { stroke: color-mix(in srgb, var(--bad) 60%, transparent); } #view .pill.tp.bad text { fill: var(--bad-ink, #b0321f); }
#view .pill.editable { cursor: text; }
#view .pill.editable:hover rect, #view .pill.editable:focus rect { stroke: var(--sel); stroke-width: 1.4; }
#view .pill.editable:focus { outline: none; }

/* editors in the drawing */
.stage { position: relative; }
.rv-edit { position: absolute; transform: translate(-50%, -50%); z-index: 5; display: flex; align-items: center; gap: 4px; background: var(--surface); border: 1.5px solid var(--sel); border-radius: 9px; padding: 2px 8px 2px 4px; box-shadow: 0 6px 18px rgba(20, 22, 28, .14); }
.rv-edit input { width: 82px; border: 0; outline: none; font: inherit; font-size: 13px; text-align: right; font-variant-numeric: tabular-nums; padding: 3px 2px; }
.rv-edit span { font-size: 11.5px; color: var(--text-3); white-space: nowrap; }

/* live strip and flags */
.rv-live { display: flex; flex-wrap: wrap; gap: 4px 18px; padding: 8px 14px; border-top: 1px solid var(--line); font-size: 12.5px; color: var(--text-2); font-variant-numeric: tabular-nums; min-height: 38px; align-items: center; }
.rv-live b { font-weight: 500; color: var(--text-3); margin-right: 5px; }
.rv-flags { display: inline-flex; gap: 6px; flex-wrap: wrap; }
.rv-flags span { font-size: 11.5px; color: var(--text-3); border: 1px solid var(--line); border-radius: 999px; padding: 2px 10px; white-space: normal; line-height: 1.4; }
.rv-flags span.bad, .rv-flags span.rv-err { color: var(--bad-ink, #b0321f); border-color: color-mix(in srgb, var(--bad) 35%, transparent); }

/* panel */
.rv-seg { margin-bottom: 6px; }
#panel input.bad { color: var(--bad); }
#panel .num:has(input.bad) input { border-color: var(--bad); }
#panel.fade-b { -webkit-mask-image: linear-gradient(to bottom, #000 calc(100% - 32px), transparent); mask-image: linear-gradient(to bottom, #000 calc(100% - 32px), transparent); }
#panel.fade-t { -webkit-mask-image: linear-gradient(to bottom, transparent, #000 28px); mask-image: linear-gradient(to bottom, transparent, #000 28px); }
#panel.fade-t.fade-b { -webkit-mask-image: linear-gradient(to bottom, transparent, #000 28px, #000 calc(100% - 32px), transparent); mask-image: linear-gradient(to bottom, transparent, #000 28px, #000 calc(100% - 32px), transparent); }
#panel div.rv-face { border: 1px solid var(--line); border-radius: 9px; padding: 6px 10px 8px; margin-bottom: 8px; cursor: pointer; }
#panel div.rv-face.on { border-color: var(--line-2, #d5d9de); background: color-mix(in srgb, var(--sel) 4%, transparent); }
.rv-face-h { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; margin-bottom: 4px; font-size: 13px; }
.rv-sub { font-size: 11.5px; color: var(--text-3); }
#panel div.rv-face select, #panel .rv-prow select { width: 100%; max-width: 100%; font: inherit; font-size: 12.5px; border: 1px solid var(--line); border-radius: 6px; padding: 4px 6px; background: var(--surface); color: var(--text); white-space: normal; }
.rv-full { margin: 4px 0 0; font-size: 11.5px; color: var(--text-3); line-height: 1.35; }
.rv-prow { display: grid; grid-template-columns: minmax(0, 7em) minmax(0, 1fr); gap: 8px; align-items: center; margin-top: 6px; }
.rv-prow .f { margin: 0; }
.rv-name { border: 0; background: none; padding: 0; font: inherit; font-weight: 600; font-size: 13px; color: var(--text); cursor: text; }
.rv-name:hover { color: var(--sel); }
.rv-del { margin-left: auto; font-size: 12px; }
.rv-txt { font: inherit; font-size: 13px; border: 1px solid var(--line); border-radius: 6px; padding: 4px 8px; background: var(--surface); color: var(--text); min-width: 0; }
.rv-oct { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 6px; margin: 6px 0 4px; }
.rv-oct label { display: flex; flex-direction: column; gap: 2px; font-size: 11px; color: var(--text-3); }
.rv-oct input { width: 100%; box-sizing: border-box; font: inherit; font-size: 12.5px; font-variant-numeric: tabular-nums; border: 1px solid var(--line); border-radius: 6px; padding: 4px 6px; background: var(--surface); color: var(--text); text-align: right; }

/* summary */
.rv-say { margin-top: 6px; font-size: 12.5px; color: var(--text-2); line-height: 1.4; max-width: 40ch; }
.rv-big { font-weight: 600; color: var(--text); }

/* charts */
.rv-two { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: 16px; }
#tChart, #lChart { touch-action: none; user-select: none; }
#lChart .cdrag { cursor: ew-resize; }
.ch-bg { fill: var(--rv-plot); } .ch-grid { fill: var(--rv-grid); } .ch-ok { fill: color-mix(in srgb, var(--good) 8%, transparent); }
.ch-pill { fill: var(--surface); stroke: var(--sel); } .ch-pt { font-size: 11.5px; font-weight: 600; fill: var(--sel); }
.ch-vl { stroke: var(--sel); stroke-width: 1.2; stroke-dasharray: 4 3; fill: none; }
.ch-dot { fill: var(--rv-ink); stroke: var(--halo); stroke-width: 1.5; }
.rv-tg { fill: none; stroke: var(--good); stroke-width: 1.2; stroke-dasharray: 5 3; }
.rv-tg.b { stroke: var(--x-8a5a0e, #8a5a0e); }
.rv-rcl { fill: none; stroke: var(--moment); stroke-width: 1; stroke-dasharray: 3 3; }
.rv-c1 { fill: none; stroke: var(--rv-ink); stroke-width: 2; stroke-linejoin: round; }
.rv-c0 { fill: none; stroke: var(--steel-500); stroke-width: 1.5; stroke-linejoin: round; }
.rv-c0.d { stroke-dasharray: 5 3; }
.rv-d1 { fill: var(--rv-ink); } .rv-d0 { fill: var(--steel-500); }
.rv-l1 { fill: var(--rv-ink); } .rv-l0 { fill: var(--steel-650); } .rv-lt { fill: var(--x-23663f, #23663f); }
.halo { paint-order: stroke; stroke: var(--halo); stroke-width: 3px; stroke-linejoin: round; }
#checks td.note { white-space: normal; min-width: 200px; line-height: 1.4; }

@media (max-width: 1100px) { .rv-two { grid-template-columns: minmax(0, 1fr); } }
@media (max-width: 760px) {
  #checks thead { display: none; }
  #checks, #checks tbody { display: block; width: 100%; }
  #checks tr { display: grid; grid-template-columns: minmax(0, 1fr) auto; gap: 4px 10px; padding: 9px 0; border-bottom: 1px solid var(--line); }
  #checks td { display: block; border: 0; padding: 0; text-align: left; white-space: normal; }
  #checks td.chk { grid-column: 1; grid-row: 1; }
  #checks td:nth-child(5) { grid-column: 2; grid-row: 1; align-self: center; }
  #checks td:nth-child(2) { grid-column: 1; grid-row: 2; font-size: 12.5px; }
  #checks td:nth-child(3) { grid-column: 2; grid-row: 2; font-size: 12.5px; text-align: right; }
  #checks td:nth-child(2)::before { content: "actual "; color: var(--text-3); }
  #checks td:nth-child(3)::before { content: "limit "; color: var(--text-3); }
  #checks td:nth-child(4) { grid-column: 1 / -1; grid-row: 3; font-size: 12px; color: var(--text-3); min-width: 0; }
}
@media print { .rv-edit { display: none !important; } }

/* theme-auto:start · generated by scripts/theme/hexmap.py: dark values (the rule of scripts/theme/colour.py) for
   colours that are not tokens, written as var(--x-rrggbb, #rrggbb): light is the fallback, unchanged */
@media screen and (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) {
    --x-23663f: #79ae8a; --x-6e7177: #85827f; --x-6f767e: #7a8087; --x-8a5a0e: #c89e6a; --x-aac8a4: #6f866b;
  }
}
@media screen {
  :root[data-theme="dark"] {
    --x-23663f: #79ae8a; --x-6e7177: #85827f; --x-6f767e: #7a8087; --x-8a5a0e: #c89e6a; --x-aac8a4: #6f866b;
  }
}
/* theme-auto:end */
