/* sling angles — on top of calc.css */
main.sl .stage-bar { justify-content: flex-start; gap: 6px; flex-wrap: wrap; }
main.sl .sl-mode { grid-auto-columns: auto; }
main.sl .sl-mode button { padding-left: 12px; padding-right: 12px; }
main.sl .stage-bar .sl-tools { margin-left: auto; display: flex; align-items: center; gap: 4px; }
#view { display: block; width: 100%; height: auto; flex: 1; min-height: 0; user-select: none; touch-action: none; }
#view.dragging, #view.dragging * { cursor: grabbing !important; }
#view .hit { fill: transparent; stroke: none; }
#view .handle { cursor: grab; }
#view .handle.v { cursor: ns-resize; }
#view .handle .knob { fill: var(--surface); stroke: var(--sel); stroke-width: 1.8; }
#view .handle .knob.sq { stroke-width: 1.6; }
#view .handle:hover .knob { fill: var(--sel); }
#view .handle.pt .knob { stroke: var(--ink); stroke-width: 1.6; }
#view .handle.pt:hover .knob { fill: var(--ink); }
#view .handle.cg { cursor: move; }
#view .sl-orbit { fill: transparent; cursor: ew-resize; }

/* the lift */
.sl-load, .sl-face { fill: var(--steel-150); stroke: var(--ink); stroke-width: 1.1; stroke-linejoin: round; }
.sl-ghost { fill: none; stroke: var(--text-4); stroke-width: 1; stroke-dasharray: 5 4; }
.sl-leg { stroke-width: 2.4; fill: none; stroke-linecap: round; }
.sl-leg.focus { stroke-width: 4; }
.sl-leg.slack { stroke: var(--steel-500); stroke-width: 1.8; stroke-dasharray: 4 3; }
.sl-leg.plan { stroke-width: 1.6; }
.sl-wrap { stroke-width: 1.4; }
.sl-pin { fill: var(--surface); stroke: var(--ink); stroke-width: 1.2; }
.sl-rope { stroke: var(--text-4); stroke-width: 1; }
.sl-shank, .sl-hookp { stroke: var(--ink); stroke-width: 2.2; fill: none; stroke-linecap: round; }
.sl-plumb { stroke: var(--steel-500); stroke-width: .8; stroke-dasharray: 6 3 2 3; }
.sl-wline { stroke: var(--load); stroke-width: 1.8; }
.sl-bar { fill: var(--x-cfd4da, #cfd4da); stroke: var(--ink); stroke-width: 1.1; }
.sl-beam { fill: var(--steel-250); stroke: var(--ink); stroke-width: 1.1; }
.sl-bar-g, .sl-beam-g { cursor: ns-resize; }
.sl-bail, .sl-link { stroke: var(--ink); stroke-width: 1.4; fill: none; }
.sl-flat { fill: color-mix(in srgb, var(--bad) 5.5%, transparent); }
.sl-flat-edge { stroke: color-mix(in srgb, var(--bad) 55%, transparent); stroke-width: 1; fill: none; stroke-dasharray: 1 3; stroke-linecap: round; }
.sl-flatl { fill: var(--x-b3473b, #b3473b); font-weight: 500; }
.sl-arc { fill: none; stroke: var(--text-2); stroke-width: 1; }
.sl-ref { stroke: var(--steel-500); stroke-width: .8; }
.sl-ang { fill: var(--text); font-weight: 500; font-variant-numeric: tabular-nums; }
.sl-ang.warn, .sl-ptl.warn { fill: var(--bad); }
.sl-hz { stroke: var(--load); stroke-width: 1.8; }
.sl-hzl { fill: var(--load); font-weight: 500; }
.sl-note, .sl-vs { fill: var(--text-3); }
.sl-vt { fill: var(--text); font-weight: 600; }
.sl-ptl { fill: var(--text); font-weight: 500; }
.sl-warnl { fill: var(--bad); font-weight: 500; }
.sl-split { stroke: var(--line); }
.sl-x { stroke: var(--sel); stroke-width: 1.2; pointer-events: none; }
.sl-ground { stroke: var(--steel-700); stroke-width: 1.2; }
.sl-part { cursor: move; }
.sl-part rect { stroke-width: 1.2; }
.sl-part.sel rect { stroke-width: 2.2; }
.sl-partl { font-weight: 500; }

/* pills */
#view .pill rect { fill: var(--surface); stroke: var(--steel-300); }
#view .pill text { 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.mass text, #view .pill.cogp text { fill: var(--text); font-weight: 600; }
#view .pill.leg text { font-weight: 600; }
#view .pill.info text { fill: var(--text-2); }
#view .pill.editable { cursor: text; }
#view .pill.editable:hover rect { stroke: var(--sel); stroke-width: 1.4; }
#view .pill.editable:focus { outline: none; }
#view .pill.editable:focus rect { stroke: var(--sel); stroke-width: 1.6; }

/* configuration picker */
.sl-cfgs { display: flex; flex-wrap: wrap; gap: 2px; }
.sl-cfgs[hidden] { display: none; }
.sl-cfg { display: inline-flex; align-items: center; gap: 1px; border: 0; background: none; border-radius: 8px; padding: 2px 6px 2px 4px; cursor: pointer; font-size: 12px; color: var(--text-2); }
.sl-cfg svg { width: 24px; height: 20px; }
.sl-cfg:hover { box-shadow: inset 0 0 0 1px var(--line); }
.sl-cfg.on { box-shadow: inset 0 0 0 1px var(--text); color: var(--text); background: var(--bg); font-weight: 500; }

/* editors */
.stage { position: relative; }
.sl-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); }
.sl-edit input { width: 82px; border: 0; outline: none; font: inherit; font-size: 13px; text-align: right; font-variant-numeric: tabular-nums; padding: 3px 2px; }
.sl-edit span { font-size: 11.5px; color: var(--text-3); }
.sl-pop { position: absolute; z-index: 6; width: 180px; background: var(--surface); border: 1px solid var(--line-2); border-radius: 10px; box-shadow: 0 10px 30px rgba(20, 22, 28, .14); padding: 8px 10px; display: grid; gap: 5px; }
.sl-pop-h { font-size: 11.5px; font-weight: 600; color: var(--text-2); }
.sl-pop label { display: grid; grid-template-columns: 18px minmax(0, 1fr); align-items: center; gap: 6px; font-size: 12.5px; color: var(--text-3); }
.sl-pop .num input { width: 100%; border: 1px solid var(--line); border-radius: 7px; padding: 4px 8px; padding-right: 30px; font-size: 13px; text-align: right; outline: none; }
.sl-pop p { margin: 0; font-size: 11px; color: var(--text-3); }

/* examples menu */
.ex-wrap { position: relative; }

/* panel */
.tabs.n1 { grid-template-columns: 1fr; } .tabs.n3 { grid-template-columns: repeat(3, 1fr); }
.sl-seg { margin-bottom: 6px; }
.sl-trio { display: grid; grid-template-columns: repeat(auto-fit, minmax(0, 1fr)); gap: 4px; }
.sl-trio .num input { width: 100%; padding-right: 22px; }
.sl-trio .num .u { right: 7px; }
.sl-ptrow { display: grid; grid-template-columns: 18px minmax(0, 1fr); align-items: center; gap: 6px; padding: 2px 0; }
.sl-ptrow b { font-size: 12px; color: var(--text-2); font-weight: 600; }
.sl-kv { display: flex; flex-wrap: wrap; gap: 2px 14px; font-size: 12px; color: var(--text-2); padding: 4px 0 2px; align-items: baseline; }
.sl-kv b { font-weight: 600; color: var(--text); }
.srcs a { color: var(--text-3); font-size: 11px; }
.sl-add { font-size: 12.5px; color: var(--sel); padding: 6px 2px 2px; }
.sl-part-row { border: 1px solid var(--line); border-radius: 9px; padding: 6px 8px; margin-bottom: 6px; }
.sl-part-row.sel { background: var(--sel-bg); }
.sl-part-h { display: grid; grid-template-columns: 10px minmax(0, 1fr) 26px; gap: 6px; align-items: center; }
.sl-part-h i { width: 10px; height: 10px; border-radius: 3px; }
.sl-part-h input.name { border: 0; border-bottom: 1px solid transparent; font-size: 13px; font-weight: 500; padding: 3px 2px; outline: none; min-width: 0; background: none; }
.sl-part-h input.name:focus { border-bottom-color: var(--text-2); }
.sl-part-h .num input { width: 100%; padding-right: 26px; }
.sl-part-g { display: grid; grid-template-columns: 46px minmax(0, 1fr); gap: 4px 6px; align-items: center; margin-top: 4px; min-width: 0; }
.sl-part-g > .num { display: block; min-width: 0; }
.sl-part-g > .num input { width: 100%; padding-right: 30px; }
.sl-trio3 { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 4px; min-width: 0; }
.sl-trio3 .num { display: block; position: relative; min-width: 0; }
.sl-trio3 .num input { width: 100%; min-width: 0; padding-left: 20px; padding-right: 22px; }
.sl-trio3 .num .ax { position: absolute; left: 7px; top: 50%; transform: translateY(-50%); font-size: 11px; color: var(--text-3); pointer-events: none; }
.sl-trio3 .num .u { right: 6px; }
.sl-cgrow { display: flex; align-items: center; justify-content: space-between; gap: 6px; font-size: 12px; color: var(--text-3); min-width: 0; }
.sl-cgrow .ghost { font-size: 12px; padding: 2px 8px; color: var(--sel); }
.warnt { color: var(--warn); font-weight: 500; }
.sl-part-g .k { font-size: 11.5px; color: var(--text-3); }
.sl-pex { display: flex; flex-wrap: wrap; gap: 6px; }
#panel input.bad { color: var(--bad); }
#panel .num:has(input.bad) input { border-color: var(--bad); }
#panel .grp .btn.small { margin-top: 6px; }
#panel input:disabled { color: var(--text-3); background: var(--bg); }

/* summary */
.sl-say { font-size: 12.5px; color: var(--text-2); margin-top: 6px; max-width: 40ch; line-height: 1.45; }
.sl-stats { grid-template-columns: repeat(auto-fit, minmax(122px, 1fr)); }
.sl-stats .stat { padding: 14px 14px; }
.sl-stats .stat .v { white-space: nowrap; }
#checks tr.adv td.l:first-child { color: var(--text-2); }
#checks td.chk span, #checks td.chk .th { cursor: help; }
.margins td.note { white-space: normal; min-width: 240px; }

/* failure previews */
.sl-pv { position: fixed; z-index: 60; width: 220px; padding: 8px 8px 9px; background: var(--surface); border: 1px solid var(--line); border-radius: 10px; box-shadow: 0 8px 28px rgba(20, 24, 30, .14); pointer-events: none; font-size: 12px; color: var(--text); }
.sl-pv[hidden] { display: none; }
.sl-pv svg { display: block; width: 204px; height: auto; margin: 4px 0 6px; }
.sl-pv .pv-h { font-weight: 600; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.sl-pv .pv-c { color: var(--text-2); line-height: 1.35; }
.sl-pv .pv-m { margin-top: 4px; color: var(--text-3); }
@media print { .sl-pv { display: none !important; } }

/* four legs */
.sl-four { display: grid; grid-template-columns: minmax(0, 5fr) minmax(0, 6fr); gap: 24px; align-items: start; }
.sl-ft { width: 100%; border-collapse: collapse; font-size: 13px; }
.sl-ft th { font-weight: 500; font-size: 12px; color: var(--text-3); text-align: left; padding: 4px 6px 6px; border-bottom: 1px solid var(--line); }
.sl-ft th button { border: 0; background: none; font: inherit; color: inherit; cursor: pointer; padding: 2px 6px; border-radius: 6px; text-align: left; }
.sl-ft th button:hover { background: var(--fill-1); color: var(--text); }
.sl-ft th.on button { color: var(--text); font-weight: 600; background: var(--fill-1); }
.sl-ft td { padding: 6px; border-bottom: 1px solid var(--fill-1); }
.sl-ft td.on { background: var(--surface-2); }
.sl-fv { font-weight: 600; font-variant-numeric: tabular-nums; display: block; }
.sl-fbar { display: block; height: 4px; border-radius: 2px; background: var(--grid); margin-top: 3px; overflow: hidden; }
.sl-fbar b { display: block; height: 100%; opacity: .55; }
#mis, #chart { display: block; width: 100%; height: auto; touch-action: none; user-select: none; }

/* charts */
.ch-t { fill: var(--text-3); font-variant-numeric: tabular-nums; }
.ch-a { fill: var(--text-2); }
.ch-l { font-weight: 600; }
.ch-bad { fill: color-mix(in srgb, var(--bad) 6%, transparent); }
.ch-badl { fill: var(--x-b3473b, #b3473b); }
.ch-ok { fill: color-mix(in srgb, var(--good) 7%, transparent); }
.ch-lim { stroke: var(--bad); stroke-width: 1.2; stroke-dasharray: 6 4; }
.ch-cur { stroke: var(--sel); stroke-width: 1.2; }
.ch-pill rect { fill: var(--sel); }
.ch-pill text { fill: var(--on-accent); font-weight: 600; }
.ch-hit { fill: transparent; cursor: ew-resize; }

@media (max-width: 900px) { .sl-four { grid-template-columns: minmax(0, 1fr); } }
@media (max-width: 640px) {
  .margins th:nth-child(4), .margins td.note { display: none; }
  .margins td.l { white-space: normal; }
  .margins td, .margins th { padding-left: 5px; padding-right: 5px; }
  .sl-cfg span { display: none; }
  .sl-cfg { padding: 2px 6px; }
}
.sl-leg.hidden { stroke-width: 1.2; stroke-dasharray: 4 3; opacity: .55; }
.sl-lead { stroke: var(--steel-500); stroke-width: .8; }
main.sl .card.stage { padding-left: 6px; padding-right: 6px; }
main.sl .card.stage > .stage-bar { margin: 0 -6px; }
.sl-lenrow { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; margin-top: 6px; font-size: 12.5px; color: var(--text-2); }
.sl-lenrow select { width: auto; padding: 4px 6px; }
.sl-lenrow .small-note { margin: 0; }
#view .pill.leg2 text.l1 { font-weight: 600; }
#view .pill.leg2 text.l2 { fill: var(--text-2); font-weight: 500; }
.sl-slackl { fill: var(--text-4); font-weight: 500; }
.sl-pin.hid { stroke-dasharray: 2 2; fill: none; }
.sl-face.top { fill: var(--steel-50); }
#view .pill.zone rect { fill: var(--x-fdf1ef, #fdf1ef); stroke: color-mix(in srgb, var(--bad) 35%, transparent); }
#view .pill.zone text { fill: var(--x-a3382d, #a3382d); font-weight: 500; }
.sl-foot { display: flex; flex-wrap: wrap; gap: 4px 18px; align-items: center; padding: 8px 14px; border-top: 1px solid var(--line); font-size: 12px; color: var(--text-2); }
.sl-foot[hidden] { display: none; }
.sl-foot .sw { display: inline-block; width: 14px; height: 10px; border-radius: 2px; vertical-align: -1px; margin-right: 6px; }
.sl-foot .sw.zone { background: var(--load-bg); border: 1px dotted var(--bad); }
.sl-foot .sw.leg { height: 3px; border-radius: 2px; vertical-align: 2px; }
.sl-tip { position: absolute; z-index: 7; pointer-events: none; background: color-mix(in srgb, var(--text) 92%, transparent); color: var(--on-accent); font-size: 12px; font-weight: 500; padding: 5px 9px; border-radius: 7px; white-space: nowrap; font-variant-numeric: tabular-nums; }
.sl-tip[hidden] { display: none; }
.sl-ext { stroke: var(--steel-400); stroke-width: .7; }
.sl-ctr { stroke: var(--text-4); stroke-width: 1.1; }
.sl-gd { stroke: var(--text-4); stroke-width: .8; stroke-dasharray: 3 3; fill: none; }
.sl-gd.hot { stroke: var(--sel); }
#view .pill.gdp rect { stroke: color-mix(in srgb, var(--sel) 35%, transparent); } #view .pill.gdp text { fill: var(--x-1e4fbf, #1e4fbf); }
.sl-lug { fill: var(--x-cfd4da, #cfd4da); stroke: var(--ink); stroke-width: 1.1; stroke-linejoin: round; }
.sl-mom { fill: none; stroke: var(--moment); stroke-width: 1.8; }
#view .pill.mom rect { stroke: color-mix(in srgb, var(--moment) 35%, transparent); } #view .pill.mom text { fill: var(--moment); font-weight: 600; }
#view .pill.act { cursor: pointer; } #view .pill.act rect { fill: var(--sel-bg); stroke: color-mix(in srgb, var(--sel) 45%, transparent); } #view .pill.act text { fill: var(--x-1e4fbf, #1e4fbf); font-weight: 600; }
#view .pill.act:hover rect { stroke: var(--sel); }
.sl-pout { fill: none; stroke-width: 1.2; pointer-events: none; }
.sl-pout.sel { stroke-width: 2.2; }
.sl-snap { stroke: var(--x-d6336c, #d6336c); stroke-width: 1; stroke-dasharray: 4 3; pointer-events: none; }
.sl-snap-e { stroke: var(--x-d6336c, #d6336c); stroke-width: 2.6; opacity: .55; pointer-events: none; }
#view .handle.rsz { cursor: nwse-resize; }
#view .handle.rsz .knob { fill: var(--surface); stroke: var(--steel-700); stroke-width: 1.2; }
#view .handle.rsz:hover .knob { fill: var(--sel); stroke: var(--sel); }
#view .handle.pcg { cursor: move; }
#checks td.chk { display: flex; align-items: center; gap: 8px; }
#checks td.chk .th { flex: none; width: 46px; height: 46px; margin: -8px 0; }
/* the thumbnails reach a few px past their rows: room under the last one, so the table's scroll box doesn't cut it */
.table-wrap:has(> #checks) { padding-bottom: 4px; }
#checks td { padding-top: 5px; padding-bottom: 5px; }
/* labels are written in full: they wrap rather than truncate */
main.sl .f > label span { white-space: normal; overflow: visible; text-overflow: clip; }
main.sl .f { align-items: center; }
/* the scrolling panel fades out at its lower edge, so a field cut by the scroll reads as "more below" */
main.sl #panel { -webkit-mask-image: linear-gradient(to bottom, #000 calc(100% - 28px), transparent); mask-image: linear-gradient(to bottom, #000 calc(100% - 28px), transparent); padding-bottom: 28px; }
#checks .of { display: none; color: var(--text-3); font-size: 11.5px; }
@media (max-width: 640px) {
  #checks th:nth-child(3), #checks td:nth-child(3) { display: none; }
  #checks .of { display: block; }
  #checks td { white-space: normal; }
  #checks td.chk { gap: 6px; }
  #checks td.chk .th { width: 38px; height: 38px; }
  #checks .ms { min-width: 0; }
}
#view .gh { display: none; }
#view.cog-hot .gh { display: inline; }
/* decoration never takes the pointer from a handle underneath */
#view .sl-plumb, #view .sl-leg, #view .sl-arc, #view .sl-ref, #view .sl-gd, #view .sl-ext, #view .ln-dim, #view .sl-flat, #view .sl-flat-edge,
#view .sl-wline, #view .sl-hz, #view .sl-rope, #view .sl-lead, #view .sl-ctr, #view .sl-mom, #view .sl-wrap, #view .sl-ghost, #view .sl-pin,
#view .sl-split, #view .sl-hook, #view .sl-snap, #view .sl-snap-e, #view .sl-face, #view text:not(.pill text) { pointer-events: none; }

/* margin pills never wrap ("+71" over "%" on phones) */
#checks .ms { white-space: nowrap; }
/* rule rows (no allowable) and a level load: a quiet outlined tag in the margin column instead of a margin */
#checks .ms.gtag { background: none; box-shadow: inset 0 0 0 1px var(--line-2); color: var(--text-2); font-weight: 500; white-space: nowrap; }

/* 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-4f7d2f: #91b979; --x-6e7177: #85827f; --x-7b4fa6: #b995e1; --x-a3382d: #e58779;
    --x-a33d6b: #e187ab; --x-b3473b: #ec8d80; --x-b4532a: #ea9574; --x-cfd4da: #3d3b38; --x-d6336c: #f98ba6;
    --x-fdf1ef: #2d2524;
  }
}
@media screen {
  :root[data-theme="dark"] {
    --x-1e4fbf: #749ff5; --x-4f7d2f: #91b979; --x-6e7177: #85827f; --x-7b4fa6: #b995e1; --x-a3382d: #e58779;
    --x-a33d6b: #e187ab; --x-b3473b: #ec8d80; --x-b4532a: #ea9574; --x-cfd4da: #3d3b38; --x-d6336c: #f98ba6;
    --x-fdf1ef: #2d2524;
  }
}
/* theme-auto:end */
