/* Outdoor sound propagation — on top of calc.css */
main.nz { --nz-plot: var(--surface); --nz-sec: var(--surface-2); --nz-ink: var(--ink); --nz-grid: var(--fill-1); --nz-ground: var(--x-8a7a5c, #8a7a5c); --nz-grf: var(--x-7f9a62, #7f9a62); --nz-bar: var(--steel-750); --nz-pill: var(--surface); --nz-pill-line: var(--steel-300); --nz-map-op: .8; }
main.nz .tabs { grid-template-columns: repeat(3, 1fr); }
main.nz .stage-bar { justify-content: flex-start; gap: 8px; flex-wrap: wrap; }
main.nz .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.hv { cursor: ns-resize; }
#view .handle .knob { fill: var(--nz-plot); stroke: var(--sel); stroke-width: 1.8; }
#view .handle.sq .knob { stroke-dasharray: 2 2; }
#view .handle:hover .knob, #view .handle:focus .knob { fill: var(--sel); }

/* plan */
.nz-map { opacity: var(--nz-map-op); }
.nz-frame { fill: none; stroke: var(--faint); stroke-width: 1; }
.nz-lim { fill: none; stroke: var(--x-8a3b3f, #8a3b3f); stroke-width: 1.4; stroke-dasharray: 5 3; }
.nz-sb { fill: none; stroke: var(--nz-ink); stroke-width: 1.2; }
.nz-sbt { font-size: 11px; fill: var(--nz-ink); }
.nz-ray { fill: none; stroke: var(--x-6f767e, #6f767e); stroke-width: .9; stroke-dasharray: 3 4; opacity: .7; }
.nz-ray.on { stroke: var(--nz-ink); stroke-width: 1.2; opacity: 1; }
.nz-bar { fill: none; stroke: var(--nz-bar); stroke-linecap: butt; }
.nz-xpt { fill: var(--nz-plot); stroke: var(--nz-ink); stroke-width: 1.3; }
.nz-src { fill: var(--orange); stroke: var(--halo); stroke-width: 1.4; }
.nz-wave { fill: none; stroke: var(--orange); stroke-width: 1.1; opacity: .75; }
.nz-srcg.on .nz-src { stroke: var(--sel); stroke-width: 2; }
.nz-house { fill: var(--nz-plot); stroke: var(--nz-ink); stroke-width: 1.4; stroke-linejoin: round; }
.nz-legt { font-size: 11px; fill: var(--text-3); }
.nz-legn { font-size: 10.5px; fill: var(--text-3); font-variant-numeric: tabular-nums; }
.nz-legc { stroke: rgba(0, 0, 0, .08); stroke-width: .5; }

/* section */
.nz-secbg { fill: var(--nz-sec); stroke: var(--line); }
.nz-ground { fill: none; stroke: var(--nz-ground); stroke-width: 1.6; }
.nz-gr { fill: var(--nz-grf); stroke: none; }
.nz-regb { fill: none; stroke: var(--nz-ground); stroke-width: 1; stroke-dasharray: 2 2; }
.nz-direct { fill: none; stroke: var(--steel-550); stroke-width: 1; stroke-dasharray: 4 3; }
.nz-diff { fill: none; stroke: var(--orange); stroke-width: 1.6; stroke-linejoin: round; }
.nz-diff.clear { stroke-dasharray: 5 3; opacity: .8; }
.nz-barS { fill: var(--steel-350); stroke: var(--nz-bar); stroke-width: 1.2; }
.nz-mast { fill: none; stroke: var(--nz-ink); stroke-width: 1; }
.nz-rmk { fill: none; stroke: var(--nz-ink); stroke-width: 1.4; }
.nz-secT { font-size: 11.5px; font-weight: 600; fill: var(--text-2); }
.nz-note { font-size: 11px; fill: var(--text-3); font-style: italic; }

/* pills */
#view .pill rect { fill: var(--nz-pill); stroke: var(--nz-pill-line); }
#view .pill text { font-size: 11.5px; font-weight: 500; fill: var(--text-2); font-variant-numeric: tabular-nums; }
#view .pill.sp text { fill: var(--x-8f4a20, #8f4a20); font-weight: 600; } #view .pill.sp rect { stroke: color-mix(in srgb, var(--orange) 45%, transparent); }
#view .pill.sp.on rect { stroke: var(--sel); }
#view .pill.rp text { font-weight: 600; fill: var(--text); }
#view .pill.rp.good rect { stroke: color-mix(in srgb, var(--good) 60%, transparent); } #view .pill.rp.good text { fill: var(--good-ink, #23663f); }
#view .pill.rp.warn rect { stroke: color-mix(in srgb, var(--amber) 70%, transparent); } #view .pill.rp.warn text { fill: var(--warn-ink, #8a5a0e); }
#view .pill.rp.bad rect { stroke: color-mix(in srgb, var(--bad) 60%, transparent); } #view .pill.rp.bad text { fill: var(--bad-ink, #b0321f); }
#view .pill.bp text { fill: var(--text); font-weight: 600; }
#view .pill.zp text { fill: var(--x-8f4a20, #8f4a20); }
#view .pill.gp text { fill: var(--x-4d6a33, #4d6a33); }
#view .pill.hp text { fill: var(--text); }
#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; }
.nz-edit { position: absolute; transform: translate(-50%, -50%); z-index: 5; display: flex; align-items: center; gap: 4px; background: var(--surface, #fff); border: 1.5px solid var(--sel); border-radius: 9px; padding: 2px 8px 2px 4px; box-shadow: 0 6px 18px rgba(20, 22, 28, .14); }
.nz-edit input { width: 82px; border: 0; outline: none; font: inherit; font-size: 13px; text-align: right; font-variant-numeric: tabular-nums; padding: 3px 2px; background: transparent; color: var(--text); }
.nz-edit span { font-size: 11.5px; color: var(--text-3); white-space: nowrap; }

/* live strip and flags */
.nz-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; }
.nz-live b { font-weight: 500; color: var(--text-3); margin-right: 5px; }
.nz-flags { display: inline-flex; gap: 6px; flex-wrap: wrap; }
.nz-flags span { font-size: 11.5px; color: var(--text-3); border: 1px solid var(--line); border-radius: 999px; padding: 2px 10px; white-space: nowrap; line-height: 1.4; }
.nz-flags span.bad, .nz-flags span.nz-err { color: var(--bad-ink, #b0321f); border-color: color-mix(in srgb, var(--bad) 35%, transparent); white-space: normal; }

/* panel */
.nz-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); }
.nz-src { border: 1px solid var(--line); border-radius: 9px; padding: 6px 10px 4px; margin-bottom: 8px; cursor: pointer; }
.nz-src.on { border-color: var(--line-2, #d5d9de); background: color-mix(in srgb, var(--sel) 4%, transparent); cursor: default; }
.nz-src-h { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; margin-bottom: 2px; }
.nz-name { border: 0; background: none; padding: 0; font: inherit; font-weight: 600; font-size: 13px; color: var(--text); cursor: text; }
.nz-name:hover { color: var(--sel); }
.nz-sub { font-size: 11.5px; color: var(--text-3); }
.nz-del { margin-left: auto; font-size: 12px; }
.nz-txt { font: inherit; font-size: 13px; border: 1px solid var(--line); border-radius: 6px; padding: 4px 8px; background: var(--surface, #fff); color: var(--text); min-width: 0; }
.nz-rn { width: 180px; }
.nz-oct { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 6px; margin: 6px 0 4px; }
.nz-oct label { display: flex; flex-direction: column; gap: 2px; font-size: 11px; color: var(--text-3); }
.nz-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, #fff); color: var(--text); text-align: right; }

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

/* charts */
.nz-two { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: 16px; }
#dChart, #sChart { touch-action: none; user-select: none; }
#dChart .cdrag { cursor: ew-resize; }
.ch-bg { fill: var(--nz-plot); } .ch-grid { fill: var(--nz-grid); } .ch-ok { fill: color-mix(in srgb, var(--good) 7%, transparent); }
.ch-pill { fill: var(--nz-plot); 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 { stroke: var(--nz-plot); stroke-width: 1.5; }
.nz-chlim { fill: none; stroke: var(--x-8a3b3f, #8a3b3f); stroke-width: 1.2; stroke-dasharray: 5 3; }
.nz-ch1 { fill: none; stroke: var(--nz-ink); stroke-width: 2; stroke-linejoin: round; }
.nz-ch0 { fill: none; stroke: var(--steel-500); stroke-width: 1.5; stroke-linejoin: round; }
.nz-d1 { fill: var(--nz-ink); } .nz-d0 { fill: var(--steel-500); }
.nz-l1 { fill: var(--nz-ink); } .nz-l0 { fill: var(--steel-600); } .nz-ll { fill: var(--x-8a3b3f, #8a3b3f); }
.halo { paint-order: stroke; stroke: var(--nz-plot); stroke-width: 3px; stroke-linejoin: round; }
#checks td.note { white-space: normal; min-width: 200px; line-height: 1.4; }

@media (max-width: 1100px) { .nz-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 { .nz-edit { display: none !important; } }

/* the noise map's 5 dB bands in dark: the light ramp (quiet pale green to loud wine) mirrored by the rule would
   glow pastel at the loud end, so dark gets its own: quiet sits on the paper, louder bands deepen through olive and
   amber to wine, one step heavier each (picked by hand; the map and its legend share these) */
@media screen and (prefers-color-scheme: dark) { :root:not([data-theme="light"]) { --nz-b0: #2b2a26; --nz-b1: #28302a; --nz-b2: #2e392c; --nz-b3: #3b3a27; --nz-b4: #483e26; --nz-b5: #55402a; --nz-b6: #62422e; --nz-b7: #6e4333; --nz-b8: #784237; --nz-b9: #82403c; --nz-b10: #8b3e44; } }
@media screen { :root[data-theme="dark"] { --nz-b0: #2b2a26; --nz-b1: #28302a; --nz-b2: #2e392c; --nz-b3: #3b3a27; --nz-b4: #483e26; --nz-b5: #55402a; --nz-b6: #62422e; --nz-b7: #6e4333; --nz-b8: #784237; --nz-b9: #82403c; --nz-b10: #8b3e44; } }

/* 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-4d6a33: #93ad7e; --x-6e7177: #85827f; --x-6f767e: #7a8087; --x-7f9a62: #aac293; --x-8a3b3f: #d1898a;
    --x-8a7a5c: #8c7f67; --x-8f4a20: #d19372; --x-b3b8be: #4b4e52;
  }
}
@media screen {
  :root[data-theme="dark"] {
    --x-4d6a33: #93ad7e; --x-6e7177: #85827f; --x-6f767e: #7a8087; --x-7f9a62: #aac293; --x-8a3b3f: #d1898a;
    --x-8a7a5c: #8c7f67; --x-8f4a20: #d19372; --x-b3b8be: #4b4e52;
  }
}
/* theme-auto:end */
