/* Mine and tunnel ventilation — on top of calc.css */
main.vt .tabs { grid-template-columns: repeat(3, 1fr); }
main.vt .stage-bar { justify-content: flex-start; gap: 8px; flex-wrap: wrap; }
main.vt .stage-bar .hist { margin-left: auto; }
#view { display: block; width: 100%; height: auto; user-select: none; touch-action: none; }
#view .hit, #fanChart .hit { fill: transparent; stroke: none; }
#view .handle, #fanChart .handle { cursor: grab; }
#view .handle.hx { cursor: ew-resize; }
#view .handle.hy, #fanChart .handle.hy { cursor: ns-resize; }
#view .handle .knob, #fanChart .handle .knob { fill: var(--surface); stroke: var(--sel); stroke-width: 1.8; }
#view .handle:hover .knob, #view .handle:focus .knob, #fanChart .handle:hover .knob, #fanChart .handle:focus .knob { fill: var(--sel); }
#fanChart { touch-action: none; }

/* long section */
.vt-ground { fill: none; stroke: var(--steel-400); stroke-width: 1; stroke-dasharray: 6 4; }
.vt-head { fill: var(--bg); stroke: none; }
.vt-wall { fill: none; stroke: var(--steel-700); stroke-width: 1.4; }
.vt-face { fill: none; stroke: var(--steel-700); stroke-width: 2.4; stroke-linecap: round; }
.vt-ductl { fill: var(--sel-line); stroke: var(--moment); stroke-width: 1; stroke-linejoin: round; }
.vt-fan rect { fill: var(--steel-200); stroke: var(--steel-750); stroke-width: 1.2; }
.vt-fan path { fill: none; stroke: var(--steel-750); stroke-width: 1.4; stroke-linecap: round; }
.vt-flow { fill: none; stroke: var(--moment); stroke-width: 1.6; }
.vt-flowh { fill: var(--moment); }
.vt-ret { fill: none; stroke: var(--x-8f979f, #8f979f); stroke-width: 1.4; stroke-dasharray: 7 5; }
.vt-reth { fill: var(--x-8f979f, #8f979f); }
.vt-mach-d rect { fill: var(--weld); stroke: var(--warn); stroke-width: 1; }
.vt-mach-d circle { fill: var(--text-2); stroke: none; }
.vt-axt { font-size: 11px; fill: var(--text-3); }
.vt-name { font-size: 12.5px; font-weight: 600; fill: var(--text); }
.vt-role { font-size: 11px; fill: var(--text-3); }
.vt-nm { cursor: text; }
.vt-nm:hover .vt-name, .vt-nm:focus .vt-name { fill: var(--sel); }
.vt-nm:focus { outline: none; }

/* cross-section */
.vt-open { fill: var(--surface); stroke: var(--steel-700); stroke-width: 1.6; stroke-linejoin: round; }
.vt-floor { fill: none; stroke: var(--x-8f979f, #8f979f); stroke-width: 1; }
.vt-duct { fill: var(--sel-line); stroke: var(--moment); stroke-width: 1.4; }

/* 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.qq rect { stroke: color-mix(in srgb, var(--moment) 45%, transparent); } #view .pill.qq text { fill: var(--x-2c4a91, #2c4a91); }
#view .pill.pw rect { stroke: rgba(23, 24, 26, .35); } #view .pill.pw text { fill: var(--text); font-weight: 600; }
#view .pill.gr rect { stroke: color-mix(in srgb, var(--good) 45%, transparent); } #view .pill.gr text { fill: var(--olive); font-weight: 600; }
#view .pill.bad rect { stroke: color-mix(in srgb, var(--bad) 55%, transparent); } #view .pill.bad text { fill: var(--x-b0321f, #b0321f); font-weight: 600; }
#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; }
.vt-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); }
.vt-edit input { width: 82px; border: 0; outline: none; font: inherit; background: transparent; color: inherit; font-size: 13px; text-align: right; font-variant-numeric: tabular-nums; padding: 3px 2px; }
.vt-edit-name input { width: 180px; text-align: center; }
.vt-edit span { font-size: 11.5px; color: var(--text-3); white-space: nowrap; }

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

/* panel */
.vt-seg { margin-bottom: 6px; }
.vt-seg button { white-space: normal; line-height: 1.25; }
.vt-pts { width: 100%; border-collapse: collapse; margin: 4px 0 8px; font-size: 12.5px; }
.vt-pts th { font-weight: 500; color: var(--text-3); text-align: left; padding: 2px 4px; font-size: 11.5px; }
.vt-pts td { padding: 2px 4px; }
.vt-pts input { width: 100%; box-sizing: border-box; font: inherit; font-variant-numeric: tabular-nums; padding: 5px 7px; border: 1px solid var(--line); border-radius: 7px; background: var(--surface); }
.vt-pts input:focus { border-color: var(--sel); outline: none; }
.vt-pts td:last-child { width: 30px; }
.vt-x { width: 26px; height: 26px; padding: 0; line-height: 1; font-size: 15px; color: var(--text-3); }
.vt-mach { display: grid; gap: 6px; margin: 6px 0 8px; }
.vt-m { display: grid; grid-template-columns: minmax(0, 1fr) 104px 56px 26px; gap: 6px; align-items: center; }
.vt-m > input { min-width: 0; font: inherit; font-size: 12.5px; padding: 6px 8px; border: 1px solid var(--line); border-radius: 7px; background: var(--surface); }
.vt-m > input:focus { border-color: var(--sel); outline: none; }
.vt-m .num input { width: 100%; }
input.bad { border-color: var(--bad) !important; }

/* summary */
.vt-stats { grid-template-columns: repeat(3, minmax(0, 1fr)); }
.vt-big { font-weight: 600; }
.vt-say { display: block; margin-top: 8px; font-size: 12.5px; color: var(--text-2); line-height: 1.45; }
.vt-tag { display: inline-flex; align-items: center; font-size: 10.5px; line-height: 1; color: var(--text-3); border: 1px solid var(--line); border-radius: 999px; padding: 2px 7px; margin-left: 4px; }

/* charts */
.vt-fanc { fill: none; stroke: var(--moment); stroke-width: 2; }
.vt-sys { fill: none; stroke: var(--text-2); stroke-width: 2; }
.vt-fpt { fill: var(--surface); stroke: var(--moment); stroke-width: 1.4; }
.vt-need { fill: none; stroke: var(--load-ink); stroke-width: 2; }
.vt-duty { stroke: var(--halo); stroke-width: 1.6; }
.vt-lfan { fill: var(--x-2c4a91, #2c4a91); }
.vt-lsys { fill: var(--text-2); }
.vt-lneed { fill: var(--load-ink); }
.vt-cpill rect { fill: var(--surface); stroke: var(--steel-300); }
.vt-cpill text { font-size: 11.5px; font-weight: 600; fill: var(--text); font-variant-numeric: tabular-nums; }
.vt-qline { fill: none; stroke: var(--moment); stroke-width: 2; }
.vt-pline { fill: none; stroke: var(--text-2); stroke-width: 2; }
.vt-req { fill: none; stroke: var(--load-ink); stroke-width: 1.4; stroke-dasharray: 5 4; }
.vt-lq { fill: var(--x-2c4a91, #2c4a91); }
.vt-lp { fill: var(--text-2); }
.vt-lreq { fill: var(--load-ink); }
main.vt .fb-chart text { paint-order: stroke; stroke: var(--surface, #fff); stroke-width: 3px; stroke-linejoin: round; }

@media (max-width: 760px) {
  .vt-stats { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .vt-m { grid-template-columns: minmax(0, 1fr) 96px 52px 26px; }
}


/* margins: the detail column wraps so the table fits its card at 1000 px */
@media (min-width: 761px) { #checks td.note { white-space: normal; min-width: 12em; line-height: 1.35; } }

/* 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-2c4a91: #81a0e0; --x-6e7177: #85827f; --x-8f979f: #61676d; --x-b0321f: #ef8470;
  }
}
@media screen {
  :root[data-theme="dark"] {
    --x-2c4a91: #81a0e0; --x-6e7177: #85827f; --x-8f979f: #61676d; --x-b0321f: #ef8470;
  }
}
/* theme-auto:end */
