/* Aluminium member design — on top of calc.css (light-only, like calc.css) */
main.st .tabs { grid-template-columns: repeat(3, 1fr); }
main.st .stage-bar { justify-content: flex-start; gap: 8px; flex-wrap: wrap; }
main.st .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); }

/* parts */
.st-wheel { fill: var(--x-ece3d2, #ece3d2); stroke: var(--x-6d5a3a, #6d5a3a); stroke-width: 1; stroke-linejoin: round; }
.st-web { fill: var(--steel-50); stroke: var(--steel-550); stroke-width: .8; }
.st-hole { fill: var(--surface-2); stroke: var(--steel-500); stroke-width: .8; }
.st-hub { fill: var(--steel-200); stroke: var(--steel-700); stroke-width: 1; }
.st-key { fill: var(--steel-700); }
.st-bore { fill: var(--surface); stroke: var(--steel-700); stroke-width: .9; }
.st-pitch { fill: none; stroke: var(--steel-550); stroke-width: .7; stroke-dasharray: 7 3 1.5 3; pointer-events: none; }
.st-worm { fill: url(#hatchSteel); stroke: var(--steel-750); stroke-width: 1; stroke-linejoin: round; }
.st-wormf { fill: var(--steel-250); stroke: var(--steel-750); stroke-width: 1; }
.st-shaft { fill: var(--steel-200); stroke: var(--steel-700); stroke-width: 1; }
.st-rim { fill: url(#hatchBronze); stroke: var(--x-6d5a3a, #6d5a3a); stroke-width: 1; stroke-linejoin: round; }
.st-body { fill: url(#hatchIron); stroke: var(--steel-700); stroke-width: 1; stroke-linejoin: round; }
.st-axis { stroke: var(--steel-550); stroke-width: .7; stroke-dasharray: 9 3 1.5 3; fill: none; pointer-events: none; }
.st-ctr { stroke: var(--steel-700); stroke-width: .9; }
.st-ext { fill: none; stroke: var(--steel-400); stroke-width: .8; }
.st-dim { fill: none; stroke: var(--steel-550); stroke-width: .9; }
.st-dimh { fill: var(--steel-550); }
.st-lead { stroke: color-mix(in srgb, var(--load) 55%, transparent); stroke-width: .9; pointer-events: none; }
.st-cap { font-size: 11.5px; fill: var(--text-3); }
.st-sec { font-size: 11px; font-weight: 600; fill: var(--text-2); letter-spacing: .04em; }
.st-load line, .st-load path.sh { stroke: var(--load); stroke-width: 1.8; fill: none; }
.st-load path.hd { fill: var(--load); stroke: none; }
.st-load.st-grey line, .st-load.st-grey path.sh { stroke: var(--steel-550); } .st-load.st-grey path.hd { fill: var(--steel-550); }
.st-spin { fill: none; stroke: var(--sel); stroke-width: 1.2; }
.st-spinh { fill: var(--sel); }
.st-dot { fill: var(--load); }
.st-x { stroke: var(--load); stroke-width: 1.6; fill: var(--surface); }
.st-name { font-size: 12.5px; font-weight: 600; fill: var(--text); }
.st-role { font-size: 11px; fill: var(--text-3); }
.st-nm { cursor: text; }
.st-nm:hover .st-name, .st-nm:focus .st-name { fill: var(--sel); }
.st-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.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.lock rect { stroke: color-mix(in srgb, var(--good) 45%, transparent); } #view .pill.lock text { fill: var(--good); font-weight: 600; }
#view .pill.free rect { stroke: color-mix(in srgb, var(--amber) 55%, transparent); } #view .pill.free text { fill: var(--x-9a6b12, #9a6b12); 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; }
.st-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); }
.st-edit input { width: 82px; border: 0; outline: none; font: inherit; font-size: 13px; text-align: right; font-variant-numeric: tabular-nums; padding: 3px 2px; }
.st-edit-name input { width: 180px; text-align: center; }
.st-edit span { font-size: 11.5px; color: var(--text-3); }

/* live strip and flags */
.st-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; }
.st-live b { font-weight: 500; color: var(--text-3); margin-right: 5px; }
.st-live i { font-style: normal; color: var(--text-3); }
.st-flags { display: inline-flex; gap: 6px; flex-wrap: wrap; }
.st-flags span { font-size: 11.5px; color: var(--text-3); border: 1px solid var(--line); border-radius: 999px; padding: 2px 10px; white-space: nowrap; }

/* panel */
.st-seg { margin-bottom: 6px; }
.st-lab { font-size: 12px; color: var(--text-3); margin: 8px 0 4px; }
.st-lab:first-child { margin-top: 0; }
.st-cards { display: grid; gap: 4px; }
.st-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; }
.st-card b { font-weight: 500; }
.st-card span { font-size: 11.5px; color: var(--text-3); line-height: 1.35; }
.st-card:hover { border-color: var(--line-2); }
.st-card.on { border-color: var(--text); box-shadow: inset 0 0 0 1px var(--text); }
.st-chips { display: flex; flex-wrap: wrap; gap: 4px; margin: 2px 0 6px; }
.st-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; }
.st-chip:hover { border-color: var(--line-2); }
.st-chip.on { border-color: var(--text); color: var(--text); font-weight: 500; }
.st-sel select { width: 100%; }
#panel input.bad { color: var(--bad); }
#panel .num:has(input.bad) input { border-color: var(--bad); }
.st-check { display: flex; align-items: center; gap: 8px; font-size: 12.5px; color: var(--text-2); margin: 6px 0 2px; cursor: pointer; }

/* summary */
.st-say { margin-top: 6px; font-size: 12.5px; color: var(--text-2); line-height: 1.4; max-width: 34ch; }
.st-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; }
.st-lockv { font-weight: 600; }
.st-lockv.lock { color: var(--good); } .st-lockv.free { color: var(--x-9a6b12, #9a6b12); }

/* forces and chart */
.st-two { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: 16px; }
.st-kv { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: 0 18px; }
.st-kv h3 { grid-column: 1 / -1; font-size: 12px; font-weight: 500; color: var(--text-3); margin: 10px 0 2px; }
.st-kv h3:first-child { margin-top: 0; }
.st-kv > div { display: grid; grid-template-columns: minmax(0, 1fr) auto; gap: 0 10px; padding: 6px 0; border-bottom: 1px solid var(--line); font-size: 12.5px; }
.st-kv span { color: var(--text-2); }
.st-kv b { font-weight: 500; text-align: right; font-variant-numeric: tabular-nums; white-space: nowrap; }
.st-kv i { grid-column: 1 / -1; font-style: normal; font-size: 11.5px; color: var(--text-3); }
#nchart .ndrag { cursor: ew-resize; }
.st-rest { margin-top: 10px; }
#nchart { touch-action: none; user-select: none; }

/* materials */
table.st-alt { width: 100%; border-collapse: collapse; font-size: 12.5px; font-variant-numeric: tabular-nums; }
.st-alt th { font-weight: 500; font-size: 11.5px; color: var(--text-3); text-align: right; padding: 6px 8px; border-bottom: 1px solid var(--line); white-space: nowrap; }
.st-alt td { text-align: right; padding: 5px 8px; border-bottom: 1px solid var(--line); white-space: nowrap; }
.st-alt th.l, .st-alt td.l { text-align: left; }
.st-alt td.l { white-space: normal; }
.st-alt tr.sel td { background: var(--sel-bg); }
.st-alt td.meth { color: var(--text-3); }

@media (max-width: 1100px) { .st-two { grid-template-columns: minmax(0, 1fr); } }
@media (max-width: 760px) {
  .st-kv { grid-template-columns: minmax(0, 1fr); }
  table.st-alt thead { display: none; }
  table.st-alt, .st-alt tbody, .st-alt tr, .st-alt td { display: block; width: 100%; }
  .st-alt tr { display: grid; grid-template-columns: minmax(0, 1fr) auto; gap: 2px 10px; padding: 8px 0; border-bottom: 1px solid var(--line); }
  .st-alt td { border: 0; padding: 0; text-align: left; white-space: normal; }
  .st-alt td:nth-child(1) { font-weight: 500; }
  .st-alt td:nth-child(3)::before { content: "factor "; color: var(--text-3); }
  .st-alt td:nth-child(4)::before { content: "allowable "; color: var(--text-3); }
  .st-alt td:nth-child(5), .st-alt td:nth-child(6) { text-align: right; }
}
#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); }
#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: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: "allowed "; color: var(--text-3); }
  #checks td:nth-child(4) { grid-column: 1 / -1; grid-row: 3; font-size: 12px; color: var(--text-3); }
}
@media print { .st-edit { display: none !important; } }

/* connection parts */
main.st .stage-bar .seg { flex: 0 0 auto; }
.st-support { fill: url(#hatchIron); stroke: var(--steel-700); stroke-width: 1; }
.st-plate { fill: var(--steel-blue); fill-opacity: .92; stroke: var(--steel-800); stroke-width: 1.2; }
.st-plateS { fill: url(#hatchPlate); stroke: var(--steel-800); stroke-width: 1.1; }
.st-beam { fill: var(--steel-50); stroke: var(--steel-700); stroke-width: 1; }
.st-flange { fill: var(--steel-250); stroke: var(--steel-700); stroke-width: 1; }
.st-webS { fill: url(#hatchIron); stroke: var(--steel-700); stroke-width: 1; }
.st-weld { fill: var(--steel-750); stroke: none; }
.st-weldE { fill: url(#hatchWeld); stroke: var(--steel-750); stroke-width: .8; }
.st-hole { fill: var(--surface); stroke: var(--steel-800); stroke-width: 1; }
.st-bolt { fill: var(--steel-350); stroke: var(--steel-800); stroke-width: 1; }
.st-boltX { stroke: var(--steel-800); stroke-width: .9; }
.st-shank { fill: var(--steel-350); stroke: var(--steel-800); stroke-width: .9; }
.st-hot { fill: none; stroke: var(--bad); stroke-width: 2; stroke-dasharray: 4 3; pointer-events: none; }
.st-grp { min-height: 120px; }
.st-grp svg { display: block; width: 100%; max-width: 420px; height: auto; margin: 0 auto; }
.st-grp .st-gcap { margin: 6px 0 0; font-size: 12px; color: var(--text-2); line-height: 1.45; }

.st-gt { font-size: 11.5px; fill: var(--text-2); }
.st-load.st-thin line { stroke-width: 1.5; }
.st-check input { margin: 0; }

/* aluminium member: section, HAZ, welds, elevation */
.al-sec { fill: url(#hatchAl); stroke: none; }
.al-secO { fill: none; stroke: var(--steel-800); stroke-width: 1.2; stroke-linejoin: round; pointer-events: none; }
.al-haz { fill: url(#hatchHaz); stroke: none; }
.al-leg .al-haz { stroke: var(--x-c9875c, #c9875c); stroke-width: .8; }
#view .handle .knob.al-wknob { stroke: var(--load-ink); }
#view .handle:hover .knob.al-wknob, #view .handle:focus .knob.al-wknob { fill: var(--load-ink); }
#view .handle.hw { cursor: move; }
#view .pill.weldp rect { stroke: color-mix(in srgb, var(--x-c9875c, #c9875c) 60%, transparent); } #view .pill.weldp text { fill: var(--x-8a4b22, #8a4b22); font-weight: 600; }
#view .pill.rhoc rect { stroke: color-mix(in srgb, var(--sel) 35%, transparent); } #view .pill.rhoc text { fill: var(--x-1e4fbf, #1e4fbf); }
.al-mem { fill: var(--steel-blue); stroke: var(--steel-800); stroke-width: 1.1; }
.al-flg { stroke: var(--x-9aa8b8, #9aa8b8); stroke-width: .8; }
.al-sup { fill: var(--surface); stroke: var(--steel-700); stroke-width: 1; }
.al-ground { stroke: var(--steel-700); stroke-width: 1; }
.al-wall { stroke: var(--steel-700); stroke-width: .9; }
.al-tw { stroke: var(--x-8a4b22, #8a4b22); stroke-width: 1.6; }
.al-udl { stroke: var(--load); stroke-width: 1.2; }
.al-mom { fill: none; stroke: var(--load); stroke-width: 1.8; }
.al-momh { fill: var(--load); }
.al-welds { display: grid; gap: 6px; margin-bottom: 8px; }
.al-weld { display: grid; grid-template-columns: minmax(0, 1fr) auto auto; gap: 8px; align-items: center; }
.al-weld input { font: inherit; font-size: 12.5px; border: 1px solid var(--line); border-radius: 7px; padding: 4px 8px; min-width: 0; }
.al-wpos { font-size: 11.5px; color: var(--text-3); white-space: nowrap; }
.al-x { font-size: 15px; line-height: 1; padding: 2px 8px; }
.al-kv { grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); }
.al-cls table { width: 100%; }
.al-ct tr.al-acth td { padding-top: 10px; color: var(--text-2); font-size: 12px; border-bottom: 1px solid var(--line); }
.al-ct tr.al-acth b { font-weight: 600; color: var(--text); }
.al-warn { margin: 10px 0 0; padding-left: 18px; font-size: 12px; color: var(--text-2); line-height: 1.45; }
#lchart { touch-action: none; user-select: none; }
#lchart .ldrag { cursor: ew-resize; }
#lchart .ch-l { font-size: 11.5px; font-weight: 600; }
#lchart .halo { paint-order: stroke; stroke: var(--halo); stroke-width: 3px; fill: var(--text-2); }
@media (max-width: 760px) {
  .al-ct.st-alt td:nth-child(3)::before { content: "limits "; color: var(--text-3); }
  .al-ct.st-alt td:nth-child(4)::before { content: "class "; color: var(--text-3); }
  .al-ct.st-alt td:nth-child(5)::before { content: "ρc "; color: var(--text-3); }
  .al-ct.st-alt tr.al-acth { display: block; }
}
.st-two.al-one { grid-template-columns: minmax(0, 1fr); }

/* 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-6d5a3a: #a69579; --x-6e7177: #85827f; --x-8a4b22: #cd9473; --x-9a6b12: #cfa76a;
    --x-9aa8b8: #515b67; --x-c9875c: #eab18d; --x-ece3d2: #363025; --x-f4dccb: #3e2f24;
  }
}
@media screen {
  :root[data-theme="dark"] {
    --x-1e4fbf: #749ff5; --x-6d5a3a: #a69579; --x-6e7177: #85827f; --x-8a4b22: #cd9473; --x-9a6b12: #cfa76a;
    --x-9aa8b8: #515b67; --x-c9875c: #eab18d; --x-ece3d2: #363025; --x-f4dccb: #3e2f24;
  }
}
/* theme-auto:end */
