/* Hardware page: one big 3D viewer on the stage colours, then the build details on paper cards. */
.hw { background: var(--night); }
.viewer { position: relative; height: 92vh; height: 92svh; min-height: 620px; overflow: hidden;
  background: radial-gradient(ellipse at 55% 55%, #4a37f2 0%, #2a1fc4 45%, #120c5c 100%); }
#hw3d { position: absolute; inset: 0; width: 100%; height: 100%; display: block; cursor: grab; touch-action: none; }
#hw3d:active { cursor: grabbing; }
.viewer .leads { position: absolute; inset: 0; width: 100%; height: 100%; pointer-events: none; }
.viewer .leads path { stroke: rgba(255,247,234,.7); stroke-width: 1.4; fill: none; }
.viewer .leads path.sel { stroke: var(--gold); stroke-width: 2; }
.viewer .leads circle { fill: var(--paper); stroke: var(--night); stroke-width: 1.5; }
.labels { position: absolute; inset: 0; pointer-events: none; }
.lbl { position: absolute; left: 0; top: 0; opacity: 0; transition: opacity .25s; display: flex; gap: 10px; align-items: center; text-align: left;
  background: var(--paper); color: var(--ink); border: 0; border-radius: 12px; padding: 7px 11px; box-shadow: 0 4px 0 rgba(18,12,92,.6); }
.lbl.on { opacity: 1; pointer-events: auto; }
.lbl .t { display: flex; flex-direction: column; min-width: 0; line-height: 1.25; }
.lbl .t b { font: 900 14px var(--ui); }
.lbl .t em { font: 500 12.5px var(--body); font-style: normal; opacity: .8; }
.lbl.lc i { flex: none; width: 14px; height: 14px; border-radius: 50%; box-shadow: 0 0 0 2px var(--paper), 0 0 0 3.5px var(--ink); }
.lbl.lp { cursor: pointer; }
.lbl.lp .t em { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.lbl.lp .n { flex: none; width: 24px; height: 24px; border-radius: 50%; background: var(--ink); color: var(--paper); display: grid; place-items: center; font: 900 12px var(--ui); }
.lbl.lp.sel { box-shadow: 0 0 0 3px var(--gold), 0 4px 0 rgba(18,12,92,.6); }
.lbl.lp.sel .n { background: var(--gold); color: var(--ink); }
.lbl.lp:hover { transform: none; filter: brightness(1.04); }
.lbl.tiny { padding: 2px 7px; border-radius: 7px; font: 700 11px var(--ui); box-shadow: none; background: rgba(255,247,234,.94); white-space: nowrap; }
.lbl.tiny b { font-weight: 900; }

.v-head { position: absolute; left: clamp(20px, 4vw, 56px); top: 92px; max-width: 460px; pointer-events: none; z-index: 1; }
.v-head h1 { font: 400 clamp(34px, 3.4vw, 50px)/1 var(--display); margin: 0 0 10px; text-shadow: 4px 4px 0 var(--rani); }
.v-head p:last-child { margin: 0; color: #dcd7ff; font-size: 16px; }
.v-ctl { position: absolute; left: clamp(20px, 4vw, 56px); bottom: 92px; display: flex; gap: 10px; align-items: center; flex-wrap: wrap; }
.v-ctl .seg { background: var(--glass); border: 1px solid var(--line); border-radius: 16px; }
.slider { display: none; gap: 8px; align-items: center; font: 700 13px var(--ui); background: var(--glass); border: 1px solid var(--line); border-radius: 999px; padding: 7px 14px; }
.slider input { accent-color: var(--gold); width: 140px; }
.view-inside .slider { display: flex; }

.presets { position: absolute; left: 0; right: 0; bottom: 0; display: flex; gap: 8px; align-items: center; padding: 14px clamp(20px, 4vw, 56px); overflow-x: auto;
  background: linear-gradient(rgba(18,12,92,0), rgba(18,12,92,.85)); }
.presets .pl { font: 800 11px var(--ui); letter-spacing: .18em; color: var(--gold); text-transform: uppercase; margin-right: 6px; }
.preset { display: flex; flex-direction: column; align-items: flex-start; gap: 1px; background: rgba(255,255,255,.08); border: 1px solid var(--line); border-radius: 12px; padding: 7px 14px; text-align: left; white-space: nowrap; }
.preset b { font: 800 14px var(--ui); }
.preset i { font-style: normal; font-size: 12px; color: var(--dim); }
.preset.on { background: var(--gold); color: var(--ink); border-color: var(--gold); }
.preset.on i { color: var(--ink); opacity: .75; }
.preset:hover:not(.on) { background: rgba(255,255,255,.16); }
.presets .custom { font: 700 13px var(--ui); color: var(--gold); margin-left: 6px; }

/* details */
.hw-detail { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1.25fr); gap: 20px; padding: 40px clamp(20px, 4vw, 56px) 80px; align-items: start; }
.hw-right { display: grid; gap: 20px; }
.card { background: var(--paper); color: var(--ink); border-radius: 20px; padding: 22px; }
.card h2 { font: 900 20px var(--ui); font-stretch: 112%; margin: 0 0 12px; }
.picker { position: sticky; top: 80px; }
.pk-head h2 { font: 400 34px/1.05 var(--display); color: var(--ink); margin: 0 0 8px; }
.pk-head p { margin: 0 0 16px; font-size: 15.5px; line-height: 1.45; }
.opt { display: block; width: 100%; text-align: left; background: #fff; color: var(--ink); border: 2px solid transparent; border-radius: 14px; padding: 12px 14px; margin-bottom: 10px; box-shadow: 0 3px 0 rgba(26,20,80,.12); }
.opt:hover { border-color: rgba(26,20,80,.2); }
.opt.on { border-color: var(--ink); box-shadow: 0 4px 0 var(--ink); }
.opt-top { display: flex; gap: 10px; justify-content: space-between; align-items: flex-start; }
.opt-top b { font: 800 15px/1.3 var(--ui); }
.tg { font-style: normal; font: 800 11px var(--ui); white-space: nowrap; padding: 3px 9px; border-radius: 999px; background: rgba(26,20,80,.08); }
.opt.on .tg { background: var(--gold); }
.opt-meta { display: flex; gap: 14px; margin: 6px 0 8px; font: 700 13px var(--ui); opacity: .8; }
.opt ul { margin: 0; padding: 0; list-style: none; display: grid; gap: 4px; font-size: 13.5px; line-height: 1.4; }
.opt li { padding-left: 18px; position: relative; }
.opt li::before { position: absolute; left: 0; font-weight: 900; }
.opt li.pro::before { content: "+"; color: #138a2e; }
.opt li.con::before { content: "!"; color: var(--red-d); left: 3px; }
.summary h2 { font: 400 30px/1.05 var(--display); }
.sum-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 12px 16px; }
.sum-grid span { display: block; font: 700 12px var(--ui); letter-spacing: .04em; opacity: .7; margin-bottom: 2px; }
.sum-grid b { font: 900 19px var(--ui); }
.fine { font-size: 13px; opacity: .75; line-height: 1.45; margin: 12px 0 0; }
.wires, .warns { margin: 0; padding: 0; list-style: none; display: grid; gap: 10px; font-size: 14.5px; line-height: 1.45; }
.wires li { display: grid; gap: 2px; }
.wires b { font: 800 14px var(--ui); }
.warns li { padding-left: 22px; position: relative; }
.warns li::before { content: "!"; position: absolute; left: 0; top: 1px; width: 15px; height: 15px; border-radius: 50%; background: var(--red); color: #fff; font: 900 11px/15px var(--ui); text-align: center; }
.bom { width: 100%; border-collapse: collapse; font-size: 14px; }
.bom th { text-align: left; font: 800 11px var(--ui); letter-spacing: .08em; text-transform: uppercase; opacity: .6; padding: 0 8px 8px 0; }
.bom td { padding: 8px 8px 8px 0; border-top: 1px solid rgba(26,20,80,.12); vertical-align: top; }
.bom td:last-child, .bom th:last-child { text-align: right; font: 700 13.5px var(--ui); white-space: nowrap; padding-right: 0; }
.bom tfoot td { font-weight: 900; }
.bom tfoot tr:first-child td { border-top: 2px solid var(--ink); }

@media (max-width: 1000px) {
  .hw-detail { grid-template-columns: 1fr; }
  .picker { position: static; }
}
@media (max-width: 700px) {
  .viewer { min-height: 560px; height: 80svh; }
  .v-head { top: 76px; } .v-head p:last-child { font-size: 14px; }
  .lbl .t em { display: none; }
  .lbl.tiny { display: none; }
  .v-ctl { bottom: 80px; }
}
