/* Spreader and lifting beams — on top of calc.css */
main.spb .tabs { grid-template-columns: repeat(3, 1fr); }
main.spb .stage-bar { justify-content: flex-start; gap: 8px; flex-wrap: wrap; }
main.spb .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.hx { cursor: ew-resize; }
#view .handle.hy { cursor: ns-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); }

/* rigging and beam */
.spb-wire { stroke: var(--steel-500); stroke-width: 1.2; stroke-dasharray: 5 3; }
.spb-hook { fill: none; stroke: var(--steel-750); stroke-width: 2.2; stroke-linecap: round; }
.spb-link { fill: var(--surface); stroke: var(--steel-750); stroke-width: 1.6; }
.spb-sling { stroke: var(--steel-750); stroke-width: 2; stroke-linecap: round; }
.spb-sling.hot { stroke: var(--sel); stroke-width: 2.6; }
.spb-beam { fill: var(--steel-200); stroke: var(--steel-700); stroke-width: 1.1; }
.spb-beam.hot { fill: var(--sel-bg-2); stroke: var(--sel); }
.spb-fl, .spb-wall { stroke: var(--steel-500); stroke-width: .8; }
.spb-cl { stroke: var(--steel-500); stroke-width: .7; stroke-dasharray: 8 3 1.5 3; pointer-events: none; }
.spb-lug { fill: var(--steel-250); stroke: var(--steel-700); stroke-width: 1; }
.spb-hole { fill: var(--surface); stroke: var(--steel-700); stroke-width: 1; }
.spb-loadbox { fill: var(--steel-50); stroke: var(--steel-600); stroke-width: 1; }
.spb-cg circle { fill: var(--surface); stroke: var(--text); stroke-width: 1.2; }
.spb-cg path { fill: var(--text); }
.spb-arc { fill: none; stroke: var(--sel); stroke-width: 1.2; stroke-dasharray: 3 2.5; pointer-events: none; }
.spb-dim { stroke: var(--steel-550); stroke-width: .9; }
.spb-dimh { fill: var(--steel-550); }
.spb-ext { stroke: var(--steel-400); stroke-width: .8; }
.spb-load line { stroke: var(--load); stroke-width: 1.8; }
.spb-load path { fill: var(--load); stroke: none; }
.spb-name { font-size: 12.5px; font-weight: 600; fill: var(--text); }
.spb-role { font-size: 11px; fill: var(--text-3); }
.spb-nm { cursor: text; }
.spb-nm:hover .spb-name, .spb-nm:focus .spb-name { fill: var(--sel); }
.spb-nm:focus { outline: none; }

/* 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.load rect { stroke: color-mix(in srgb, var(--load) 35%, transparent); } #view .pill.load text { fill: var(--load); font-weight: 600; }
#view .pill.comp rect { stroke: var(--steel-350); } #view .pill.comp text { fill: var(--text-2); font-weight: 600; }
#view .pill.low rect { stroke: color-mix(in srgb, var(--bad) 50%, transparent); } #view .pill.low text { fill: var(--bad-ink); }
#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: pointer; }
#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; }
.spb-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); }
.spb-edit input { width: 82px; border: 0; outline: none; font: inherit; font-size: 13px; text-align: right; font-variant-numeric: tabular-nums; padding: 3px 2px; }
.spb-edit-name input { width: 180px; text-align: center; }
.spb-edit span { font-size: 11.5px; color: var(--text-3); }

/* live strip */
.spb-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; }
.spb-live b { font-weight: 500; color: var(--text-3); margin-right: 5px; }
.spb-live i { font-style: normal; color: var(--text-3); }

/* panel */
.spb-seg { margin-bottom: 6px; }
.spb-cards { display: grid; gap: 4px; }
.spb-card { display: grid; gap: 1px; text-align: left; border: 1px solid var(--line); background: var(--surface); border-radius: 8px; padding: 6px 10px; cursor: pointer; color: var(--text); font-size: 12.5px; }
.spb-card b { font-weight: 500; }
.spb-card span { font-size: 11.5px; color: var(--text-3); line-height: 1.35; }
.spb-card:hover { border-color: var(--line-2); }
.spb-card.on { border-color: var(--text); box-shadow: inset 0 0 0 1px var(--text); }
#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); }
.f > label span { overflow: visible; text-overflow: clip; white-space: normal; line-height: 1.3; }

/* summary */
.spb-say { margin-top: 6px; font-size: 12.5px; color: var(--text-2); line-height: 1.4; max-width: 36ch; }
.spb-stats { grid-template-columns: repeat(5, minmax(0, 1fr)); }
.spb-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: 220px; line-height: 1.4; }

/* charts and connections */
.spb-two { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: 16px; }
#cap .cdrag { cursor: ew-resize; }
#cap, #along { touch-action: pan-y; user-select: none; }
table.spb-conn { width: 100%; border-collapse: collapse; font-size: 12.5px; font-variant-numeric: tabular-nums; }
.spb-conn th { font-weight: 500; font-size: 11.5px; color: var(--text-3); text-align: right; padding: 6px 8px; border-bottom: 1px solid var(--line); }
.spb-conn td { text-align: right; padding: 6px 8px; border-bottom: 1px solid var(--line); }
.spb-conn th.l, .spb-conn td.l { text-align: left; }
.spb-conn b { font-weight: 500; }

@media (max-width: 1200px) { .spb-stats { grid-template-columns: repeat(3, minmax(0, 1fr)); } .spb-stats .stat:nth-child(4) { border-left: 0; } .spb-stats .stat:nth-child(n+4) { border-top: 1px solid var(--line); } }
@media (max-width: 1100px) { .spb-two { grid-template-columns: minmax(0, 1fr); } }
@media (max-width: 640px) {
  .spb-stats { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .spb-stats .stat { border-left: 0; border-top: 1px solid var(--line); }
  .spb-stats .stat:nth-child(even) { border-left: 1px solid var(--line); }
  .spb-stats .stat:nth-child(-n+2) { border-top: 0; }
  #typeSeg { order: 3; width: 100%; display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); }
  #typeSeg button { white-space: normal; line-height: 1.2; padding-left: 4px; padding-right: 4px; }
}

/* 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-6e7177: #85827f; --x-b4554a: #e99589; --x-d9a39b: #b58a83; --x-ecd9cf: #3e322c;
  }
}
@media screen {
  :root[data-theme="dark"] {
    --x-1e4fbf: #749ff5; --x-6e7177: #85827f; --x-b4554a: #e99589; --x-d9a39b: #b58a83; --x-ecd9cf: #3e322c;
  }
}
/* theme-auto:end */
