/* assembly.css -- the styles of assembly.html (configurator, 3D viewer chrome, Artwork tab).
   Loaded by <link rel="stylesheet" href="assembly.css?v=..."> in the page's <head>; run stamp_assets.py
   after changing it. Colours are tokens on :root with a prefers-color-scheme: dark override. */

:root {
  --bg:       #ffffff;
  --bg-alt:   #f2f2f7;
  --fg:       #1c1c1e;
  --fg-muted: #636366;
  --accent:   #0a84ff;
  --sep:      #d1d1d6;
  --err:      #d02020;
  --ok:       #34c759;
  --warn:     #ff9500;
  --card-r:   10px;
  --p85:      #e8f4fd; --n85: #fdecea;
}
@media (prefers-color-scheme: dark) {
  :root {
    --bg: #000; --bg-alt: #1c1c1e; --fg: #f2f2f7;
    --fg-muted: #aeaeb2; --sep: #3a3a3c;
    --p85: #1a2a3a; --n85: #3a1a1a;
  }
}
* { box-sizing: border-box; }
body {
  margin: 0; padding: 24px 16px 48px;
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  font-size: 15px; color: var(--fg); background: var(--bg);
  -webkit-font-smoothing: antialiased;
}
input, select, button { font-family: inherit; font-size: 14px; }
.page { max-width: 1100px; margin: 0 auto; }
h1 { font-size: 28px; font-weight: 700; margin: 0 0 4px; letter-spacing: -.02em; }
.subtitle { color: var(--fg-muted); margin: 0 0 28px; font-size: 14px; }

/* ── section card ── */
.card {
  background: var(--bg-alt); border-radius: var(--card-r);
  padding: 18px 20px; margin-bottom: 18px;
}
.card h2 {
  font-size: 13px; font-weight: 600; text-transform: uppercase;
  letter-spacing: .06em; color: var(--fg-muted); margin: 0 0 14px;
}

/* ── form rows ── */
.row { display: flex; align-items: center; gap: 10px; margin-bottom: 10px; }
.row:last-child { margin-bottom: 0; }
.row label { min-width: 110px; color: var(--fg-muted); font-size: 13px; }
.row select, .row input[type=text] {
  flex: 1; padding: 7px 10px;
  border: 1px solid var(--sep); border-radius: 7px;
  background: var(--bg); color: var(--fg);
  -webkit-appearance: none; appearance: none;
}
.row select:focus, .row input:focus {
  outline: 2px solid var(--accent); outline-offset: -1px;
  border-color: transparent;
}

/* ── chassis 3D viewer ── */
/* Tabs and the viewer are pinned together, so neither moves when the Configuration
   card below them changes height and the tabs stay reachable from any scroll position. */
#pinned-top {
  position: sticky; top: 0; z-index: 20; background: var(--bg);
  padding-top: 6px; margin-bottom: 20px;
}
#chassis-viewer-card {
  padding: 0; overflow: hidden; background: var(--bg-alt); margin-bottom: 0;
}
#chassis-canvas-wrap { position: relative; width: 100%; height: 340px; min-height: 160px; overflow: hidden; max-width: 100%; }
#chassis-canvas-wrap:fullscreen { width: 100vw !important; height: 100vh !important; }
#viewer-resize-corner {
  position: absolute; bottom: 0; right: 0; width: 22px; height: 22px;
  cursor: nwse-resize; z-index: 6; overflow: hidden;
}
#viewer-resize-corner::after {
  content: ''; position: absolute; bottom: 3px; right: 3px;
  width: 0; height: 0;
  border-style: solid; border-width: 0 0 14px 14px;
  border-color: transparent transparent rgba(255,255,255,0.55) transparent;
}
#chassis-canvas { display: block; width: 100%; height: 100%; }
#bg-color-btn {
  position: relative;
  width: 26px; height: 26px; border-radius: 50%; display: block;
  background: conic-gradient(red, yellow, lime, cyan, blue, magenta, red);
  box-shadow: 0 0 0 2px rgba(255,255,255,0.6), 0 1px 4px rgba(0,0,0,0.3);
  cursor: pointer; opacity: 0.8; transition: opacity .15s;
}
#bg-color-btn:hover { opacity: 1; }
#bg-color-picker {
  position: absolute; inset: 0; width: 100%; height: 100%;
  opacity: 0; cursor: pointer; border: none; padding: 0;
}
/* The viewer's progress: a card over the 3D view itself, not a strip across the top of the window (Steven,
   2026-11-04). While the fused panel is being built the view under it is out of date, so the view dims too. */
#chassis-loading {
  position: absolute; top: 50%; left: 50%; transform: translate(-50%, -50%); z-index: 7;
  max-width: calc(100% - 32px); box-sizing: border-box;
  display: none; flex-wrap: wrap; align-items: center; justify-content: center; gap: 6px 8px;
  padding: 10px 16px; border-radius: 10px;
  background: rgba(15, 23, 42, 0.88); backdrop-filter: blur(4px);
  color: #e2e8f0; font-size: 13px; font-weight: 500; pointer-events: none;
  box-shadow: 0 4px 16px rgba(0,0,0,0.4);
}
#chassis-loading .note { display: none; flex-basis: 100%; text-align: center; font-size: 12px; font-weight: 400; color: #cbd5e1; }
#chassis-canvas-wrap.view-stale #chassis-loading .note { display: block; }
#chassis-canvas { transition: filter .25s; }
#chassis-canvas-wrap.view-stale #chassis-canvas { filter: grayscale(0.7) brightness(0.7); }
@keyframes chassis-spin { to { transform: rotate(360deg); } }
/* A new configuration arriving (assembly.html _coverViews): the 3D view is covered in its own background colour until
   every piece is in, under the toolbar and the progress card; the Artwork tab's panel likewise (Steven, 2026-11-06). */
#chassis-cover { position: absolute; inset: 0; z-index: 4; display: none; background: #cccccc; }
body.viewer-covered #chassis-cover { display: block; }
#art-cover { position: absolute; inset: 0; z-index: 6; display: none; align-items: center; justify-content: center;
             gap: 8px; background: var(--bg-alt); color: var(--fg); font-size: 13px; font-weight: 500; cursor: progress; }
body.art-covered #art-cover { display: flex; }
#art-cover::before {
  content: ''; display: inline-block; width: 12px; height: 12px; flex-shrink: 0;
  border: 2px solid var(--sep); border-top-color: var(--fg);
  border-radius: 50%; animation: chassis-spin 0.7s linear infinite;
}
#chassis-loading::before {
  content: ''; display: inline-block; width: 12px; height: 12px; flex-shrink: 0;
  border: 2px solid rgba(255,255,255,0.25); border-top-color: #e2e8f0;
  border-radius: 50%; animation: chassis-spin 0.7s linear infinite;
}
#chassis-loading .bar {
  width: 132px; height: 4px; border-radius: 2px; flex-shrink: 0;
  background: rgba(255,255,255,0.22); overflow: hidden;
}
#chassis-loading .bar > i {
  display: block; height: 100%; width: 0; border-radius: 2px;
  background: #e2e8f0; transition: width .2s linear;
}
@media (prefers-reduced-motion: reduce) {
  #chassis-loading::before, #art-cover::before { animation-duration: 2.4s; }
  #chassis-loading .bar > i { transition: none; }
  #chassis-canvas { transition: none; }
}
#lid-toggle {
  padding: 6px 13px; border: none; border-radius: 7px;
  background: #1a6fd8; color: #fff;
  font-size: 12px; font-weight: 500; cursor: pointer;
  transition: opacity .15s; display: none;
}
#lid-toggle:hover { opacity: .85; }
#lid-toggle.lid-off { background: #cccccc; color: #000; }

#aux-power-section, #midpanel-section {
  margin-top: 18px;
  padding: 14px 16px;
  background: var(--card-bg, #fff);
  border: 1px solid var(--border, #ddd);
  border-radius: 8px;
}
#aux-power-section .panel-label { margin-bottom: 8px; }
#aux-power-sel, #midpanel-sel {
  width: 100%; padding: 6px 8px; border-radius: 5px;
  border: 1px solid var(--border, #ccc);
  background: var(--input-bg, #fff); color: var(--fg, #222);
  font-size: 13px;
}

#fullscreen-btn {
  position: absolute; bottom: 10px; right: 26px;
  width: 28px; height: 28px; padding: 0; border: none; border-radius: 5px;
  background: rgba(0,0,0,0.38); color: #fff; cursor: pointer;
  display: flex; align-items: center; justify-content: center;
  opacity: 0.7; transition: opacity .15s; z-index: 5;
}
#fullscreen-btn:hover { opacity: 1; }
#viewer-toolbar {
  position: absolute; top: 10px; left: 10px; z-index: 5;
  display: flex; flex-direction: column; align-items: stretch; gap: 8px;
}
#viewer-toolbar > button { width: 130px; text-align: center; }
#labels-toggle {
  padding: 6px 13px; border: none; border-radius: 7px;
  background: #1a6fd8; color: #fff;
  font-size: 12px; font-weight: 500; cursor: pointer; transition: opacity .15s;
}
#labels-toggle:hover { opacity: .85; }
#labels-toggle.labels-off { background: #cccccc; color: #000; }
.slot-label {
  font: 700 9px/1 system-ui, -apple-system, sans-serif;
  color: #fff; background: rgba(20,30,48,.82);
  border: 1px solid rgba(255,255,255,.38); border-radius: 4px;
  padding: 1px 4px; white-space: nowrap; user-select: none;
  letter-spacing: .02em; box-shadow: 0 1px 3px rgba(0,0,0,.45);
}
.slot-label-front  { background: rgba(26,111,216,.88); }
.slot-label-rear   { background: rgba(197,34,31,.85); }
.slot-label-bottom { background: rgba(30,126,52,.85); }

/* ── slot grid ── */
.panel-section { margin-bottom: 24px; }
.panel-section:last-child { margin-bottom: 0; }
.panel-label {
  font-size: 12px; font-weight: 600; text-transform: uppercase;
  letter-spacing: .07em; color: var(--fg-muted); margin: 0 0 8px;
}
.slots { display: grid; grid-template-columns: repeat(4, 1fr); gap: 10px; }
.slots.bottom-slots { margin-left: 12.5%; }
@media (max-width: 600px) { .slots { grid-template-columns: 1fr 1fr; } }
@media (max-width: 600px) { .slots.bottom-slots { margin-left: 0; } }

.slot-card {
  border: 1.5px solid var(--sep); border-radius: var(--card-r);
  padding: 12px 12px 10px; background: var(--bg);
  transition: border-color .15s;
}
.slot-card.ready   { border-color: var(--ok); }
.slot-card.pending { border-color: var(--warn); }
.slot-card.pending::after {
  content: 'STEP pending — will be skipped';
  display: block; font-size: 10px; color: var(--warn);
  margin-top: 4px; font-style: italic;
}

.slot-label {
  font-size: 18px; font-weight: 700; margin-bottom: 10px;
  letter-spacing: -.01em;
}
.slot-label .panel-tag {
  font-size: 10px; font-weight: 500; padding: 1px 5px;
  border-radius: 4px; margin-left: 6px; vertical-align: middle;
  background: var(--bg-alt); color: var(--fg-muted);
}
.slot-card select { width: 100%; margin-bottom: 6px; display: block; }
.slot-card select:last-child { margin-bottom: 0; }
.mod-filter {
  width: 100%; padding: 4px 7px; font-size: 13px; display: block;
  border: 1px solid var(--sep); border-radius: 6px; margin-bottom: 4px;
  background: var(--bg); color: var(--fg);
}
.mode-toggle-row { margin-bottom: 6px; }
.mode-toggle-row select { font-size: 12px; padding: 2px 4px; }
.pt-ui .mod-filter { font-size: 12px; }
.pt-ui select { font-size: 12px; }

/* ── size estimate ── */
.size-estimate {
  font-size: 13px; color: var(--fg-muted);
  flex: 1; min-height: 20px;
}
.size-estimate b { color: var(--fg); font-weight: 600; }
.size-estimate em { font-style: normal; color: var(--warn); }

/* ── small utility buttons (Load / Save) ── */
.btn-sm {
  padding: 4px 13px; border: 1px solid var(--sep); border-radius: 6px;
  background: var(--bg); color: var(--fg); cursor: pointer;
  font-size: 12px; font-weight: 500; transition: background .12s;
}
.btn-sm:hover { background: var(--sep); }
.btn-sm:disabled { opacity: .38; cursor: default; pointer-events: none; }

/* ── generate + progress (inline, right of button) ── */
.actions { display: flex; gap: 14px; align-items: center; flex-wrap: wrap; }
.btn-gen {
  padding: 12px 28px; border: none; border-radius: 10px;
  background: var(--accent); color: #fff;
  font-size: 16px; font-weight: 600; cursor: pointer;
  transition: opacity .15s; white-space: nowrap; flex-shrink: 0;
}
.btn-gen:disabled { opacity: .45; cursor: default; }
.btn-gen:not(:disabled):hover { opacity: .85; }

#progress-area {
  flex: 1; min-width: 200px;
}
#progress-label {
  font-size: 12px; color: var(--fg-muted);
  margin-bottom: 4px; word-break: break-all;
}
.progress-wrap {
  background: var(--sep); border-radius: 4px; height: 6px; overflow: hidden;
}
.progress-bar {
  height: 100%; width: 0%; background: var(--accent);
  transition: width .08s linear; border-radius: 4px;
}
#progress-status { display: none; font-size: 13px; margin-top: 6px; }
#progress-status.ok    { display: block; color: var(--ok); }
#progress-status.error { display: block; color: var(--err); }
#progress-status.warn  { display: block; color: var(--warn, #c77700); }

/* ── slots container locked during generation ── */
#slots-container.generating { pointer-events: none; opacity: 0.5; }

/* ── bom load inline status ── */
#bom-load-status { display: none; font-size: 13px; border-radius: 6px; padding: 4px 10px;
  margin: 0 14px; flex: 1 1 auto; min-width: 0; overflow: hidden; text-overflow: ellipsis;
  white-space: nowrap; }
#bom-load-status.ok    { display: block; background: #e5f7ea; color: #1a7a35; }
#bom-load-status.error { display: block; background: #fdecea; color: var(--err); }
#bom-load-status.loading { display: block; background: #e8f0fb; color: #1a4f9c; white-space: normal; }
@media (prefers-color-scheme: dark) {
  #bom-load-status.ok    { background: #0a3a1a; color: #5ed97a; }
  #bom-load-status.error { background: #3a0a0a; color: #ff7070; }
  #bom-load-status.loading { background: #0f2340; color: #8fb8f0; }
}

/* ── status bar ── */
#status {
  padding: 10px 14px; border-radius: 8px; font-size: 14px;
  display: none; margin-top: 14px;
}
#status.info  { background: #e5f0ff; color: #0055cc; display: block; }
#status.ok    { background: #e5f7ea; color: #1a7a35; display: block; }
#status.error { background: #fdecea; color: var(--err); display: block; }
@media (prefers-color-scheme: dark) {
  #status.info  { background: #0a2a5c; color: #82b4ff; }
  #status.ok    { background: #0a3a1a; color: #5ed97a; }
  #status.error { background: #3a0a0a; color: #ff7070; }
}

a.back { font-size: 13px; color: var(--accent); text-decoration: none; }
a.back:hover { text-decoration: underline; }
.btn-cancel {
  padding: 12px 22px; border: none; border-radius: 10px;
  background: var(--fg-muted); color: #fff;
  font-size: 16px; font-weight: 600; cursor: pointer;
  transition: opacity .15s; white-space: nowrap; flex-shrink: 0;
}
.btn-cancel:hover { opacity: .75; }
/* ── Read Me ── */
#readme-btn {
  padding: 6px 14px; border: none; border-radius: 7px;
  background: #1a6fd8; color: #fff; font-size: 12px; font-weight: 600;
  cursor: pointer; transition: opacity .15s;
}
#readme-btn:hover { opacity: .85; }
.info-btn {
  width: 17px; height: 17px; flex-shrink: 0; border-radius: 50%;
  border: 1px solid var(--sep); background: transparent; color: var(--fg-muted);
  font: italic 700 11px/1 Georgia, serif; cursor: pointer; padding: 0;
}
.info-btn:hover { color: var(--accent); border-color: var(--accent); }
#fuse-info-overlay {
  display: none; position: fixed; inset: 0; z-index: 2000; background: rgba(0,0,0,.5);
}
#fuse-info-overlay.open { display: flex; align-items: center; justify-content: center; padding: 24px 16px; }
#fuse-info-modal {
  position: relative; background: var(--bg); color: var(--fg); width: 100%; max-width: 560px;
  border: 1px solid var(--sep); border-radius: 12px; box-shadow: 0 10px 50px rgba(0,0,0,.35);
  padding: 22px 26px 24px; max-height: calc(100vh - 60px); overflow-y: auto;
  font-size: 13px; line-height: 1.55;
}
#fuse-info-modal h2 { font-size: 17px; margin: 0 0 10px; }
#fuse-info-modal p  { margin: 9px 0; }
#fuse-info-modal .hint { color: var(--fg-muted); }
#fuse-info-close {
  position: absolute; top: 6px; right: 12px; border: 0; background: none;
  font-size: 24px; line-height: 1; cursor: pointer; color: var(--fg-muted);
}
#readme-overlay {
  display: none; position: fixed; inset: 0; z-index: 2000;
  background: rgba(0,0,0,.5);
}
#readme-overlay.open { display: flex; align-items: flex-start; justify-content: center; padding: 40px 16px; }
#readme-modal {
  background: #fff; color: #1a1a1a; width: 100%; max-width: 840px;
  border-radius: 12px; box-shadow: 0 10px 50px rgba(0,0,0,.35);
  padding: 26px 34px 34px; max-height: calc(100vh - 80px); overflow-y: auto;
  font-size: 13px; line-height: 1.55;
}
#readme-modal h2 { font-size: 18px; margin: 0 0 4px; }
#readme-close {
  float: right; border: none; background: #eef0f3; color: #333;
  width: 30px; height: 30px; border-radius: 50%; font-size: 17px;
  cursor: pointer; line-height: 1; margin: -6px -10px 0 0;
}
#readme-close:hover { background: #d9dde3; }
#readme-modal ol { margin: 6px 0 6px 1.4em; padding: 0; }
#readme-modal > ol { margin-top: 12px; }
#readme-modal li { margin: 7px 0; }
#readme-modal ol ol { margin-top: 5px; }
#readme-modal a { color: #1a6fd8; }
#readme-modal .rm-note { color: #555; }
#readme-modal h3 { font-size: 14px; margin: 16px 0 2px; }
#readme-modal ul { margin: 4px 0 4px 1.3em; padding: 0; }
#readme-modal ul ul { margin-top: 4px; list-style: circle; }

/* ── Tabs ── */
.tabbar { display: flex; gap: 4px; border-bottom: 1px solid var(--sep); margin-bottom: 12px; }
.tab-btn {
  padding: 9px 18px; border: none; background: none; color: var(--fg-muted);
  font-size: 14px; font-weight: 600; cursor: pointer; border-bottom: 2px solid transparent;
  margin-bottom: -1px; transition: color .12s;
}
.slot-card.slot-covered { opacity: .55; }
.slot-covered-note { font-size: 12px; color: var(--fg-muted); font-style: italic; }
.tab-btn:hover { color: var(--fg); }
.tab-btn.active { color: var(--accent); border-bottom-color: var(--accent); }

.tab-btn:disabled { opacity: .4; cursor: default; }
.tab-btn:disabled:hover { color: var(--fg-muted); }

/* ── Artwork tab ── */
.art-head { display: flex; align-items: center; gap: 16px; flex-wrap: wrap; margin-bottom: 12px; }
.art-seg { display: inline-flex; border: 1px solid var(--sep); border-radius: 7px; overflow: hidden; }
.art-seg button { padding: 5px 12px; border: none; border-right: 1px solid var(--sep); background: var(--bg);
                  color: var(--fg); font-size: 12px; font-weight: 500; cursor: pointer; }
.art-seg button:last-child { border-right: none; }
.art-seg button.active { background: var(--accent); color: #fff; }
.art-seg button:disabled { opacity: .4; cursor: default; }
.art-seg button:focus-visible, #art-props :focus-visible { outline: 2px solid var(--accent); outline-offset: 1px; }
#art-stage-wrap { position: relative; height: 340px; border-radius: 8px; overflow: hidden;
                  background: repeating-conic-gradient(var(--bg) 0 25%, var(--bg-alt) 0 50%) 0 0 / 16px 16px;
                  border: 1px solid var(--sep); }
#art-stage { position: absolute; inset: 0; }
#art-card:fullscreen { width: 100vw; height: 100vh; margin: 0; border-radius: 0; overflow: auto;
                       display: flex; flex-direction: column; background: var(--bg-alt); }
#art-card:fullscreen #art-stage-wrap { flex: 1 1 auto; height: auto; min-height: 240px; }
#art-card:fullscreen .art-note { display: none; }
#art-fs-btn { margin-left: auto; }
#art-loading { position: absolute; top: 8px; left: 50%; transform: translateX(-50%); font-size: 12px;
               background: rgba(15, 23, 42, .85); color: #e2e8f0; padding: 4px 10px; border-radius: 6px; }
#art-status { min-height: 18px; margin: 6px 0 2px; font-size: 12px; }
.art-status-warn { color: var(--warn); }
.art-status-error { color: var(--err); }
#art-props { display: flex; flex-wrap: wrap; gap: 8px 18px; align-items: center; margin-top: 6px; }
.art-prop { display: flex; align-items: center; gap: 6px; font-size: 13px; }
.art-prop > label { color: var(--fg-muted); font-size: 12px; }
.art-prop input[type=text] { width: 220px; }
.art-prop textarea { width: 240px; min-height: 40px; padding: 4px 7px; border: 1px solid var(--sep);
                     border-radius: 6px; background: var(--bg); color: var(--fg); font: 13px/1.35 ui-monospace, Menlo, monospace; resize: vertical; }
.art-prop-text { align-items: flex-start; }
.art-head2 { margin: -4px 0 10px; gap: 14px; font-size: 12px; }
.art-seg-sm button { padding: 3px 9px; font-size: 12px; min-width: 28px; }
.art-check { display: inline-flex; align-items: center; gap: 6px; color: var(--fg-muted); font-size: 12px; }
.art-check select { padding: 2px 6px; border: 1px solid var(--sep); border-radius: 6px; background: var(--bg); color: var(--fg); font-size: 12px; }
.art-prop input[type=number] { width: 72px; font-variant-numeric: tabular-nums; }
.art-prop input[type=text], .art-prop input[type=number], .art-prop select {
  padding: 4px 7px; border: 1px solid var(--sep); border-radius: 6px; background: var(--bg); color: var(--fg); font-size: 13px; }
.art-hint { color: var(--fg-muted); font-size: 12px; }
.art-swatch { width: 14px; height: 14px; border-radius: 3px; border: 1px solid var(--sep); display: inline-block; }
.art-note { color: var(--fg-muted); font-size: 12px; margin: 12px 0 0; max-width: 72ch; }

/* ── Panel configurator ── */
.pc-row { display: flex; align-items: flex-start; gap: 34px; flex-wrap: wrap; }
.pc-pair { display: inline-block; }
.pc-pair-row { display: flex; }
.pc-dd { position: relative; line-height: 0; }
.pc-trigger { display:block; position:relative; padding:0; background:#fff;
  border:1px solid #b6bcc4; cursor:pointer; font:inherit; line-height:0; border-radius:8px 0 0 8px; }
.pc-dd-right .pc-trigger { border-radius:0 8px 8px 0; border-left:none; }

.pc-trigger:hover { border-color:#3b82f6; z-index:2; }
.pc-trigger:focus { outline:2px solid #3b82f6; outline-offset:1px; z-index:3; }
.pc-chev { position:absolute; right:5px; bottom:4px; width:0; height:0;
  border-left:8px solid transparent; border-right:8px solid transparent;
  border-top:11px solid #d0021b; filter:drop-shadow(0 1px 1px rgba(255,255,255,.9)); }
.pc-trigger:hover .pc-chev, .pc-dd.open .pc-chev { border-top-color:#8a0012; }
.pc-menu { position:absolute; left:0; top:100%; z-index:20; margin:5px 0 0; padding:5px;
  list-style:none; box-sizing:border-box; width:138px; background:#fff; border:1px solid #999;
  border-radius:8px; box-shadow:0 10px 28px rgba(0,0,0,.22); max-height:60vh;
  overflow-y:auto; overflow-x:hidden; scrollbar-gutter:stable; display:none; line-height:0; }
.pc-dd.open .pc-menu { display:block; }
.pc-menu li { padding:3px; border-radius:5px; cursor:pointer; border:2px solid transparent; }
.pc-menu li:hover { background:#e8f0fe; }
.pc-menu li[aria-selected="true"] { background:#e8f0fe; border-color:#3b82f6; }
.pc-cap { margin-top:5px; font-size:11px; letter-spacing:.10em; color:#8a9099;
  text-transform:uppercase; text-align:center; line-height:1.4; }
.pc-pn { font-family:Menlo,monospace; font-size:16px; margin-top:14px; color:#111; }

/* ── Power tab ── */
#tab-power .card { padding: 18px 20px; }
.pw-hdr { display: flex; align-items: baseline; gap: 10px; flex-wrap: wrap; margin-bottom: 12px; }
.pw-hdr strong { font-size: 15px; font-weight: 700; }
.pw-hdr span { font-size: 12px; color: var(--fg-muted); }
.pw-hdr a { font-size: 12px; color: var(--accent); text-decoration: none; white-space: nowrap; }
.pw-hdr a:hover { text-decoration: underline; }
.pw-badge { font-size: 13px; color: var(--fg-muted); }
.pw-badge b { color: var(--fg); font-weight: 600; }
.pw-empty { padding: 30px 10px; text-align: center; color: var(--fg-muted); font-size: 14px; }
.pw-tbl { width: 100%; border-collapse: collapse; font-size: 13px; }
.pw-tbl th { padding: 5px 10px; text-align: center; font-size: 10px; font-weight: 600;
             color: var(--fg-muted); text-transform: uppercase; letter-spacing: .04em; white-space: nowrap; }
.pw-tbl th.left { text-align: left; }
.pw-tbl td { padding: 5px 10px; white-space: nowrap; }
.pw-tbl .grp-hdr-nom { background: color-mix(in srgb, var(--p85) 40%, transparent); border-radius: 4px 4px 0 0; text-align: center; }
.pw-tbl .grp-hdr-wc  { background: color-mix(in srgb, var(--n85) 25%, transparent); border-radius: 4px 4px 0 0; text-align: center; }
.pw-tbl .nom { background: color-mix(in srgb, var(--p85) 40%, transparent); }
.pw-tbl .wc  { background: color-mix(in srgb, var(--n85) 20%, transparent); }
.pw-tbl .num { text-align: right; font-variant-numeric: tabular-nums; font-family: monospace; }
.pw-tbl .muted { color: var(--fg-muted); }
.pw-tbl .model { font-weight: 600; font-family: monospace; }
.pw-tbl .qty { text-align: center; font-variant-numeric: tabular-nums; }
.pw-tbl tbody tr { border-top: 1px solid var(--sep); }
.pw-tbl .pw-sep { width: 8px; }
.pw-tbl tfoot tr:first-child td { border-top: 2px solid var(--sep); font-weight: 600; }
.pw-tbl tfoot .pw-va td { font-style: italic; }
.pw-tbl .tot-lbl { color: var(--fg-muted); padding-left: 4px; }
.pw-nodata-note { margin-top: 10px; font-size: 12px; color: var(--warn); }

/* a build in progress: everything but Cancel and the progress display is inert (assembly.html _setGenerating) */
body.generating [inert] { opacity: .5; cursor: progress; }

/* Export tab, per panel (Steven 2026-11-03): Generate .fpd > Fuse (one step in); keep-outs always on (2026-11-06) */
.opt-row { display: none; align-items: center; gap: 10px; margin: 4px 0; cursor: pointer; }
.opt-row input { width: 18px; height: 18px; flex-shrink: 0; }
.opt-row.lvl1 { margin-left: 28px; }
.opt-row.disabled { opacity: 0.45; cursor: default; }
/* panel renders (render.js, internal): two rows and a width; the estimate beside it */
.render-row { margin-top: 6px; }
#render-width-row { margin-top: 2px; font-size: 13px; gap: 6px; }
#render-width { width: 76px; padding: 3px 6px; font: inherit; font-variant-numeric: tabular-nums; }
.render-est { color: var(--fg); opacity: .7; font-size: 12px; font-variant-numeric: tabular-nums; }
.render-est.bad { color: var(--warn); opacity: 1; }
#render-status { display: flex; flex-wrap: wrap; align-items: center; gap: 6px 10px; margin: 8px 0; font-size: 13px; }
#render-status .bar { flex: 1 1 160px; max-width: 320px; height: 6px; border-radius: 3px; background: var(--sep);
                      overflow: hidden; }
#render-status .bar > i { display: block; height: 100%; width: 0; background: var(--accent); transition: width .3s; }
#render-status.error #render-label { color: var(--warn); }
/* F6 (Steven 2026-11-04): the fuse / .fpd notes beside the checkbox group, not under it; below it only when the
   window is too narrow for both */
.export-grid { display: flex; flex-wrap: wrap; align-items: flex-start; gap: 4px 28px; }
.export-opts { flex: 0 0 auto; }
.export-notes { flex: 1 1 300px; min-width: 0; max-width: 72ch; display: flex; flex-direction: column; gap: 8px;
                padding-top: 4px; font-size: 12px; line-height: 1.45; color: var(--fg-muted); }
.export-notes .note { margin: 0; }

/* Steven 2026-11-03: BOM actions on the title line; load messages right of the subtitle (no extra height) */
.title-row { display: flex; align-items: center; justify-content: space-between; gap: 12px; flex-wrap: wrap; margin-top: 12px; }
.title-row h1 { margin: 0; }
#bom-actions { display: flex; gap: 8px; flex: none; flex-wrap: wrap; }
.subtitle-row { display: flex; align-items: center; justify-content: space-between; gap: 12px; flex-wrap: wrap; margin: 4px 0 16px; }
.subtitle-row .subtitle { margin: 0; }
/* Project Name in the pinned tab bar, after Cabling */
/* Project Name takes the rest of the tab bar (Steven, 2026-11-04) */
.tab-project { flex: 1; min-width: 0; display: flex; align-items: center; gap: 8px; margin-left: 16px; font-size: 13px; font-weight: 700; color: var(--fg-muted); white-space: nowrap; }
.tab-project input { flex: 1; min-width: 120px; padding: 4px 8px; font-size: 13px; font-weight: 400; }

/* Artwork: import text from a .fpd (the geometry warning first and loud: a hole moved in Front Panel Express is
   never taken in, and must not pass unnoticed) */
#art-import-overlay { display: none; position: fixed; inset: 0; z-index: 2000; background: rgba(0,0,0,.5); }
#art-import-overlay.open { display: flex; align-items: flex-start; justify-content: center; padding: 40px 16px; }
#art-import-modal {
  position: relative; background: var(--bg); color: var(--fg); width: 100%; max-width: 760px;
  border: 1px solid var(--sep); border-radius: 12px; box-shadow: 0 10px 50px rgba(0,0,0,.35);
  padding: 22px 26px 18px; max-height: calc(100vh - 80px); overflow-y: auto; font-size: 13px; line-height: 1.5;
}
#art-import-modal h2 { font-size: 17px; margin: 0 0 10px; }
#art-import-close { position: absolute; top: 6px; right: 12px; border: 0; background: none; font-size: 24px;
                    line-height: 1; cursor: pointer; color: var(--fg-muted); }
.imp-file { color: var(--fg-muted); margin: 0 0 12px; }
.imp-geo { border-radius: 8px; padding: 10px 14px; margin: 0 0 14px; }
.imp-geo.ok { background: rgba(52,199,89,.12); border: 1px solid rgba(52,199,89,.5); }
.imp-geo.unchecked { background: rgba(255,149,0,.14); border: 1px solid var(--warn); }
.imp-geo.bad { background: #ffe3e3; color: #7a0010; border: 2px solid #d70015; font-weight: 600; }
.imp-geo.bad ul { font-weight: 400; margin: 6px 0 2px 1.2em; padding: 0; }
.imp-geo.bad .imp-geo-title { font-size: 15px; }
.imp-list { border-top: 1px solid var(--sep); }
.imp-row { display: flex; gap: 10px; align-items: flex-start; padding: 7px 2px; border-bottom: 1px solid var(--sep); }
.imp-row input { margin-top: 3px; }
.imp-kind { min-width: 64px; font-weight: 600; text-transform: capitalize; }
.imp-kind.deleted { color: #d70015; } .imp-kind.added { color: #248a3d; }
.imp-what { flex: 1; } .imp-what q { font-family: ui-monospace, Menlo, monospace; }
.imp-issue { color: #b25000; display: block; }
.imp-none { color: var(--fg-muted); padding: 8px 2px; }
.art-import-actions { display: flex; justify-content: flex-end; gap: 8px; margin-top: 14px; }
.imp-progress { padding: 18px 0 10px; }
.imp-prog-label { margin: 0 0 8px; color: var(--fg); }
.imp-file.imp-warn { color: var(--warn); }
