/* GearChamber PC Builder: the "Parts list" sheet (fx 142). Loaded after
   builder.css on /pc-builder/. The wrapper carries .gc-pcb, so the palette
   vars and the .pcb-btn styles come from builder.css. Palette vars only on
   screen, square corners, no glow. Print rules at the bottom: plain black on
   white, only the sheet prints. Class prefix pcb-sheet-. */
.gc-pcb.pcb-sheet-root { padding: 0; }
.pcb-sheet-back { position: fixed; inset: 0; z-index: 9994; background: color-mix( in srgb, var( --wp--preset--color--bg ) 70%, transparent ); }
.pcb-sheet { position: fixed; z-index: 9995; inset: 0; overflow-y: auto; overscroll-behavior: contain; background: var( --pcb-bg ); color: var( --pcb-text ); -webkit-overflow-scrolling: touch; }
.pcb-sheet-bar { position: sticky; top: 0; z-index: 2; padding: 12px 16px 10px; background: var( --pcb-surface ); border-bottom: 2px solid var( --pcb-accent ); }
.pcb-sheet-acts { display: flex; flex-wrap: wrap; gap: 8px; }
.pcb-sheet-acts .pcb-btn { flex: 1 1 calc( 33% - 8px ); padding: 0 10px; }
.pcb-sheet-hint { margin: 8px 0 0; font: 400 13px/1.45 var( --pcb-sans ); color: var( --pcb-muted ); }
.pcb-sheet-paper { padding: 20px 16px 28px; font: 400 15px/1.5 var( --pcb-sans ); color: var( --pcb-text ); }
.pcb-sheet-head { padding-bottom: 12px; border-bottom: 2px solid var( --pcb-accent ); }
.pcb-sheet-brand { margin: 0; font: 800 13px/1.3 var( --pcb-head ); letter-spacing: .14em; text-transform: uppercase; color: var( --pcb-accent-text ); }
.gc-pcb .pcb-sheet-head h2 { margin: 2px 0 2px; font: 800 24px/1.2 var( --pcb-head ); }
.gc-pcb .pcb-sheet-head h2:focus { outline: 0; }
.pcb-sheet-date { margin: 0; font: 500 13px/1.4 var( --pcb-mono ); color: var( --pcb-muted ); }
.pcb-sheet-link { margin: 12px 0 0; font: 400 14px/1.5 var( --pcb-sans ); overflow-wrap: anywhere; }
.pcb-sheet-k { display: block; font: 600 11px/1.4 var( --pcb-mono ); letter-spacing: .1em; text-transform: uppercase; color: var( --pcb-muted ); }
.gc-pcb .pcb-sheet-link a { display: inline-block; padding: 4px 0; word-break: break-all; }
.pcb-sheet-rows { list-style: none; margin: 14px 0 0; padding: 0; border-top: 1px solid var( --pcb-line ); }
.pcb-sheet-row { display: block; padding: 12px 0; border-bottom: 1px solid var( --pcb-line ); break-inside: avoid; page-break-inside: avoid; }
.pcb-sheet-cat { display: block; font: 600 11px/1.4 var( --pcb-mono ); letter-spacing: .1em; text-transform: uppercase; color: var( --pcb-muted ); margin-bottom: 2px; }
.pcb-sheet-body { min-width: 0; }
.pcb-sheet-part { display: block; }
.pcb-sheet-part + .pcb-sheet-part { margin-top: 8px; }
.pcb-sheet-pn { display: block; font: 700 15.5px/1.35 var( --pcb-head ); overflow-wrap: anywhere; }
.pcb-sheet-mpn { display: block; margin-top: 2px; font: 500 12.5px/1.4 var( --pcb-mono ); color: var( --pcb-muted ); overflow-wrap: anywhere; }
.pcb-sheet-specs { display: block; margin-top: 2px; font: 400 14px/1.45 var( --pcb-sans ); color: var( --pcb-muted ); }
.pcb-sheet-none { color: var( --pcb-muted ); font-style: italic; }
.pcb-sheet-empty { margin: 18px 0; font: 600 16px/1.4 var( --pcb-head ); color: var( --pcb-muted ); }
.pcb-sheet-need, .pcb-sheet-stores, .pcb-sheet-fine { margin: 14px 0 0; font: 400 14.5px/1.5 var( --pcb-sans ); }
.pcb-sheet-fine { color: var( --pcb-muted ); font-size: 13.5px; margin-top: 6px; }
.pcb-sheet-checks { margin: 16px 0 0; padding: 12px 14px; border: 1px solid var( --pcb-line-2 ); border-left-width: 4px; background: var( --pcb-surface ); break-inside: avoid; page-break-inside: avoid; }
.pcb-sheet-checks.is-error { border-left-color: var( --pcb-err ); }
.pcb-sheet-checks.is-warning { border-left-color: var( --pcb-warn ); }
.gc-pcb .pcb-sheet-checks h3 { font: 600 11px/1.4 var( --pcb-mono ); letter-spacing: .1em; text-transform: uppercase; color: var( --pcb-muted ); }
.pcb-sheet-res { margin: 2px 0 0; font: 700 17px/1.35 var( --pcb-head ); }
.pcb-sheet-counts { margin: 2px 0 0; font: 400 14px/1.45 var( --pcb-sans ); color: var( --pcb-muted ); }
.pcb-sheet-foot { margin-top: 22px; padding-top: 10px; border-top: 1px solid var( --pcb-line ); font: 400 12.5px/1.5 var( --pcb-sans ); color: var( --pcb-muted ); }
.pcb-sheet-fallback { padding: 0 16px 28px; }
.pcb-sheet-fallback[hidden] { display: none; }
.pcb-sheet-fallback label { display: block; margin-bottom: 6px; font: 500 14px/1.45 var( --pcb-sans ); }
.pcb-sheet-fallback textarea { display: block; width: 100%; min-height: 180px; padding: 10px; border: 1px solid var( --pcb-line-2 ); background: var( --pcb-surface ); color: var( --pcb-text ); font: 400 16px/1.45 var( --pcb-mono ); resize: vertical; }

@media ( min-width: 700px ) {
	.pcb-sheet { inset: 3vh 0; margin: 0 auto; width: min( 820px, 100% ); border: 1px solid var( --pcb-line ); }
	.pcb-sheet-acts .pcb-btn { flex: 0 1 auto; padding: 0 18px; }
	.pcb-sheet-bar { padding: 14px 28px 12px; }
	.pcb-sheet-paper { padding: 28px 32px 36px; }
	.pcb-sheet-fallback { padding: 0 32px 32px; }
	.pcb-sheet-row { display: grid; grid-template-columns: 150px minmax( 0, 1fr ); gap: 0 16px; }
	.pcb-sheet-cat { margin: 3px 0 0; }
}

/* Print: only the sheet, black on white, whatever the site theme. The rules
   apply while the sheet is open (html.pcb-sheet-open). */
@page { size: A4; margin: 14mm; }
@media print {
	html.pcb-sheet-open, html.pcb-sheet-open body { background: #fff !important; color: #000 !important; overflow: visible !important; height: auto !important; min-height: 0 !important; }
	html.pcb-sheet-open body::before, html.pcb-sheet-open body::after { display: none !important; content: none !important; }
	html.pcb-sheet-open body > *:not( .pcb-sheet-root ) { display: none !important; }
	html.pcb-sheet-open .pcb-sheet-back, html.pcb-sheet-open .pcb-sheet-bar, html.pcb-sheet-open .pcb-sheet-fallback { display: none !important; }
	html.pcb-sheet-open .pcb-sheet-root { display: block !important; position: static !important; padding: 0 !important; }
	html.pcb-sheet-open .pcb-sheet { position: static !important; inset: auto !important; width: auto !important; margin: 0 !important; border: 0 !important; overflow: visible !important; background: #fff !important; color: #000 !important; }
	html.pcb-sheet-open .pcb-sheet-paper { padding: 0 !important; font-size: 10.5pt; line-height: 1.45; color: #000 !important; background: #fff !important; }
	html.pcb-sheet-open .pcb-sheet *, html.pcb-sheet-open .pcb-sheet-paper * { color: #000 !important; background: transparent !important; box-shadow: none !important; text-shadow: none !important; }
	html.pcb-sheet-open .pcb-sheet-head { border-bottom: 1.5pt solid #000 !important; }
	html.pcb-sheet-open .pcb-sheet-brand { font-size: 10pt; }
	html.pcb-sheet-open .pcb-sheet-head h2 { font-size: 20pt !important; }
	html.pcb-sheet-open .pcb-sheet-date, html.pcb-sheet-open .pcb-sheet-mpn, html.pcb-sheet-open .pcb-sheet-k, html.pcb-sheet-open .pcb-sheet-cat { font-size: 9pt; }
	html.pcb-sheet-open .pcb-sheet-pn { font-size: 11pt; }
	html.pcb-sheet-open .pcb-sheet-specs, html.pcb-sheet-open .pcb-sheet-link, html.pcb-sheet-open .pcb-sheet-need, html.pcb-sheet-open .pcb-sheet-stores { font-size: 10.5pt; }
	html.pcb-sheet-open .pcb-sheet-fine, html.pcb-sheet-open .pcb-sheet-foot { font-size: 9pt; }
	html.pcb-sheet-open .pcb-sheet-link a { text-decoration: none !important; padding: 0; }
	html.pcb-sheet-open .pcb-sheet-rows { border-top: .5pt solid #999 !important; }
	html.pcb-sheet-open .pcb-sheet-row { border-bottom: .5pt solid #999 !important; padding: 7pt 0; display: grid; grid-template-columns: 34mm minmax( 0, 1fr ); gap: 0 4mm; break-inside: avoid; page-break-inside: avoid; }
	html.pcb-sheet-open .pcb-sheet-checks { border: .5pt solid #999 !important; border-left: .5pt solid #999 !important; padding: 7pt 9pt; break-inside: avoid; page-break-inside: avoid; }
	html.pcb-sheet-open .pcb-sheet-res { font-size: 12pt; }
	html.pcb-sheet-open .pcb-sheet-foot { border-top: .5pt solid #999 !important; }
}

@media ( hover: hover ) and ( pointer: fine ) {
	.pcb-sheet-link a:hover { color: var( --pcb-accent-text ); }
}
