/* Board-source viewer: the drawing stays unchanged; the frame trims CAD margins. */
.page-hardware .hw-pcb-map { max-width:880px; border:1px solid #8bc8e0; border-radius:16px; overflow:hidden; background:#fffdf7; }
.page-hardware .hw-pcb-map__toolbar { background:#d8f1ff; color:#163d52; gap:.6rem; }
.hw-pcb-map__actions { display:flex; flex-wrap:wrap; gap:.5rem; }
.page-hardware .hw-pcb-map__toolbar button { background:#105d86; color:#fff; font:600 .8rem/1.35 var(--font-body,sans-serif); min-height:42px; }
.page-hardware .hw-pcb-map__toolbar button[aria-pressed=true] { background:#173c31; }
.hw-pcb-map__viewport { overflow:hidden; background:#191d20; }
.page-hardware .hw-pcb-map__image { width:175%; margin-left:-36%; }
.page-hardware .hw-pcb-map__image > img { width:100%; max-width:none; max-height:none; height:auto; margin:0; border:0; border-radius:0; }
.page-hardware .hw-pcb-map__pin { min-width:38px; min-height:38px; background:#105d86!important; border-color:#90e9ff!important; }
.page-hardware .hw-pcb-map__pin.is-active { background:#855900!important; border-color:#ffe081!important; }
.hw-pcb-leaders { position:absolute; inset:0; width:100%; height:100%; pointer-events:none; }
.hw-pcb-leaders line.is-active { stroke:#ffe081; stroke-width:.35; }
.hw-pcb-leaders circle.is-active { fill:#fff7bb; stroke:#ffe081; stroke-width:.25; r:.65; }
.hw-pcb-legend { padding:.65rem 1rem; margin:0; font-size:.85rem; color:#264c5c; background:#eaf7fc; }
.hw-component-explorer__detail > button { border:1px solid #105d86; background:#eaf7fc; color:#105d86; border-radius:22px; padding:.5rem .8rem; margin:.35rem .35rem 0 0; min-height:40px; cursor:pointer; font:600 .8rem/1.4 var(--font-body,sans-serif); }
.hw-schematic__nav { display:flex; gap:.5rem; flex-wrap:wrap; padding:1rem; background:#eaf7fc; }
.hw-schematic__nav button { padding:.7rem 1rem; min-height:44px; border:1px solid #105d86; background:#fffdf7; color:#105d86; border-radius:30px; cursor:pointer; font:600 .85rem/1.3 var(--font-body,sans-serif); }
.hw-schematic__nav button[aria-pressed=true] { color:#fff; background:#105d86; }
.hw-schematic__preview { display:block; background:white; }
.hw-schematic__preview:focus-visible { outline:3px solid #105d86; outline-offset:3px; }
.hw-schematic__preview img { display:block; width:100%; height:auto; }
.page-hardware :is(.hw-pcb-map,.hw-schematic) figcaption { padding:1rem; margin:0; color:#304c54; background:#fffdf7; }
@media(max-width:540px) { .page-hardware .hw-pcb-map__toolbar { padding:.8rem; } .hw-pcb-map__actions { width:100%; } .hw-pcb-map__actions button { flex:1; } .page-hardware .hw-pcb-map__pin { min-width:30px; min-height:30px; font-size:.62rem!important; } .hw-pcb-legend { font-size:.75rem; } }

/* Component information is persistent; board pins move directly to its content. */
.page-hardware .hw-circuit-details{margin-block:1.5rem 2rem}
.page-hardware .hw-circuit-details>h3{margin-block:0 1rem}
.page-hardware .hw-component-explorer__detail{scroll-margin-top:calc(var(--header-offset,80px) + 1.5rem)}
.page-hardware .hw-component-explorer__detail:focus-visible{outline:2px solid var(--v-accent);outline-offset:4px}
