/* Machine vibration severity — on top of calc.css */
#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.hx { cursor: ew-resize; }
#view .handle .knob { fill: var(--surface); stroke: var(--sel); stroke-width: 1.8; }
#view .handle:hover .knob, #view .handle:focus .knob { stroke-width: 2.6; }

/* 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.dimv rect { stroke: var(--steel-200); }
#view .pill.desig rect { stroke: color-mix(in srgb, var(--sel) 45%, transparent); } #view .pill.desig text { fill: var(--x-1e4fbf, #1e4fbf); font-weight: 600; }
#view .pill.desig { cursor: 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; }
.vb-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); }
.vb-edit input { width: 82px; border: 0; outline: none; font: inherit; font-size: 13px; text-align: right; font-variant-numeric: tabular-nums; padding: 3px 2px; }
.vb-edit-name input { width: 180px; text-align: center; }
.vb-edit span { font-size: 11.5px; color: var(--text-3); }
@media print { .vb-edit { display: none !important; } }

/* live strip and flags */
.vb-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; }
.vb-live b { font-weight: 500; color: var(--text-3); margin-right: 5px; }
.vb-live i { font-style: normal; color: var(--text-3); }
.vb-flags { display: inline-flex; gap: 6px; flex-wrap: wrap; }
.vb-flags span { font-size: 11.5px; color: var(--warn-ink); border: 1px solid var(--line); background: var(--warn-bg); border-radius: 999px; padding: 2px 10px; white-space: nowrap; }
main.vb .stage-bar { justify-content: flex-start; gap: 8px; flex-wrap: wrap; }
main.vb .stage-bar .hist { margin-left: auto; }

/* panel */
.vb-seg { margin-bottom: 8px; }
.vb-chips { display: flex; flex-wrap: wrap; gap: 4px; margin: 4px 0 6px; }
.vb-chip { border: 1px solid var(--line); background: var(--surface); border-radius: 999px; padding: 2px 9px; font-size: 12px; color: var(--text-2); cursor: pointer; font-variant-numeric: tabular-nums; }
.vb-chip:hover { border-color: var(--line-2); }
.vb-chip.on { border-color: var(--text); color: var(--text); font-weight: 500; }
#panel input.bad { color: var(--bad); }
#panel .num:has(input.bad) input { border-color: var(--bad); }
#panel select { font: inherit; font-size: 12.5px; border: 1px solid var(--line); border-radius: 7px; padding: 5px 6px; background: var(--surface); color: var(--text); min-width: 0; }
#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); }

/* summary */
.vb-say { margin-top: 6px; font-size: 12.5px; color: var(--text-2); line-height: 1.4; max-width: 36ch; }
.vb-tag { display: inline-block; font-size: 10.5px; color: var(--text-3); border: 1px solid var(--line); border-radius: 999px; padding: 0 7px; margin-left: 4px; white-space: nowrap; }

#checks td.note { white-space: normal; min-width: 200px; line-height: 1.4; }
/* phones: the margins as stacked cards (no sideways scroll) */
@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:last-child { 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; }
}
main.vb .tabs { grid-template-columns: repeat(2, 1fr); }
/* the zone chart */
.vb-zl { font-size: 15px; font-weight: 600; }
.vb-od { fill: var(--surface); stroke-width: 1.6; }
.vb-other { cursor: pointer; }
.vb-other:focus { outline: none; }
.vb-other:focus .vb-od, .vb-other:hover .vb-od { stroke-width: 2.6; }
.vb-bb { stroke-width: 1.3; stroke-dasharray: 6 4; fill: none; }
#view .pill.bnd rect { stroke: var(--steel-200); } #view .pill.bnd text { fill: var(--text-3); }
#view .pill.rd rect { stroke: color-mix(in srgb, var(--sel) 45%, transparent); } #view .pill.rd text { fill: var(--x-1e4fbf, #1e4fbf); font-weight: 600; }
#view .pill.bb rect { stroke: var(--steel-300); stroke-dasharray: 3 2; }
#view .pill.zp.z0 text { fill: var(--olive); font-weight: 600; } #view .pill.zp.z1 text { fill: var(--x-476b2b, #476b2b); font-weight: 600; }
#view .pill.zp.z2 text { fill: var(--x-8a5a12, #8a5a12); font-weight: 600; } #view .pill.zp.z3 text { fill: var(--x-a82c20, #a82c20); font-weight: 600; }
/* readings panel */
.vb-pt { padding: 10px 0 10px; border-bottom: 1px solid var(--line); }
.vb-pt.on { background: linear-gradient(90deg, color-mix(in srgb, var(--sel) 5%, transparent), transparent 70%); }
.vb-ph { display: grid; grid-template-columns: minmax(0, 1fr) auto auto; gap: 6px; align-items: center; margin-bottom: 6px; }
.vb-name { font: inherit; font-size: 13px; font-weight: 600; color: var(--text); border: 1px solid transparent; border-radius: 6px; padding: 3px 6px; min-width: 0; background: transparent; }
.vb-name:hover { border-color: var(--line); }
.vb-name:focus { border-color: var(--sel); outline: none; background: var(--surface); }
.vb-dir button { padding: 3px 9px; }
.vb-comps { display: grid; gap: 4px; }
.vb-comp { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1.2fr) 76px 24px; gap: 6px; align-items: center; }
.vb-comp .num input { width: 100%; }
.vb-row { display: flex; align-items: center; justify-content: space-between; gap: 8px; margin-top: 6px; flex-wrap: wrap; }
.vb-base { display: flex; align-items: center; gap: 8px; font-size: 12.5px; color: var(--text-2); }
.vb-base .num { width: 110px; }
.vb-add, .vb-del, .vb-cdel { font-size: 12px; }
.vb-foot { padding-top: 10px; }
.vb-bt { width: 100%; border-collapse: collapse; font-size: 12.5px; font-variant-numeric: tabular-nums; }
.vb-bt th, .vb-bt td { padding: 4px 6px; text-align: right; border-bottom: 1px solid var(--line); }
.vb-bt th:first-child { text-align: left; font-weight: 500; color: var(--text-2); }
.vb-bt thead th { color: var(--text-3); font-weight: 500; }
/* zone letters */
.vb-z { display: inline-flex; align-items: center; justify-content: center; min-width: 22px; height: 20px; border-radius: 6px; font-size: 12px; font-weight: 600; line-height: 1; padding: 0 6px; }
.vb-z.z0 { background: var(--good-bg); color: var(--olive); } .vb-z.z1 { background: var(--x-edf3e4, #edf3e4); color: var(--x-476b2b, #476b2b); }
.vb-z.z2 { background: var(--x-f8ecd6, #f8ecd6); color: var(--x-8a5a12, #8a5a12); } .vb-z.z3 { background: var(--x-f8e1de, #f8e1de); color: var(--x-a82c20, #a82c20); } .vb-z.zn { background: var(--fill-1); color: var(--text-3); }
/* every point on the zone scale */
.vb-scale { display: grid; gap: 6px; }
.vb-srow { display: grid; grid-template-columns: minmax(110px, 200px) minmax(0, 1fr) auto; gap: 12px; align-items: center; border: 1px solid transparent; background: none; border-radius: 8px; padding: 5px 8px; cursor: pointer; text-align: left; font: inherit; color: var(--text); }
.vb-srow:hover { border-color: var(--line); }
.vb-srow.on { border-color: var(--line-2); background: var(--surface-2); }
.vb-sn { font-size: 13px; overflow-wrap: anywhere; }
.vb-sbar { position: relative; height: 18px; border-radius: 5px; overflow: hidden; background: var(--fill-1); }
.vb-sbar span { position: absolute; top: 0; bottom: 0; display: flex; align-items: center; justify-content: center; }
.vb-sbar span i { font-style: normal; font-size: 10.5px; font-weight: 600; opacity: .8; }
.vb-sbar .z0 { background: var(--good-bg); color: var(--olive); } .vb-sbar .z1 { background: var(--x-edf3e4, #edf3e4); color: var(--x-476b2b, #476b2b); } .vb-sbar .z2 { background: var(--x-f8ecd6, #f8ecd6); color: var(--x-8a5a12, #8a5a12); } .vb-sbar .z3 { background: var(--x-f8e1de, #f8e1de); color: var(--x-a82c20, #a82c20); }
.vb-sbar b { position: absolute; top: 1px; bottom: 1px; width: 4px; margin-left: -2px; border-radius: 2px; box-shadow: 0 0 0 1.5px var(--surface); }
.vb-sv { display: inline-flex; align-items: center; gap: 8px; font-size: 13px; font-variant-numeric: tabular-nums; white-space: nowrap; }
@media (max-width: 760px) {
  .vb-srow { grid-template-columns: minmax(0, 1fr) auto; }
  .vb-sbar { grid-column: 1 / -1; grid-row: 2; }
  .vb-comp { grid-template-columns: minmax(0, 1fr) minmax(0, 1.3fr) 70px 24px; }
}
.vb-btxt { font-size: 11px; font-weight: 500; fill: var(--text-2); stroke: color-mix(in srgb, var(--surface) 85%, transparent); stroke-width: 3px; font-variant-numeric: tabular-nums; }

/* 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-1e4fbf: #749ff5; --x-476b2b: #8faf79; --x-5f8f3a: #98c27c; --x-6e7177: #85827f; --x-8a5a12: #c89e6b;
    --x-a82c20: #eb8171; --x-edf3e4: #282b22; --x-f8e1de: #392b2a; --x-f8ecd6: #322a1c;
  }
}
@media screen {
  :root[data-theme="dark"] {
    --x-1e4fbf: #749ff5; --x-476b2b: #8faf79; --x-5f8f3a: #98c27c; --x-6e7177: #85827f; --x-8a5a12: #c89e6b;
    --x-a82c20: #eb8171; --x-edf3e4: #282b22; --x-f8e1de: #392b2a; --x-f8ecd6: #322a1c;
  }
}
/* theme-auto:end */
