/* Crucible: Creodin's bench. Tokens from creodin.com/style.css; nothing restated here. */
.crucible { width: 100%; max-width: 1480px; margin: 0 auto; padding: 16px var(--gutter) 48px; }
.crucible h1 { margin: 0 0 12px; font-size: 28px; font-weight: 700; letter-spacing: -0.01em; }
.crucible .mono { font-variant-numeric: tabular-nums; font-family: var(--mono); }

.bench { display: grid; grid-template-columns: 220px minmax(0, 1fr) 360px; gap: 16px; align-items: start; }

/* lit text: a word that is on or off */
.crucible .lit { background: none; border: 0; padding: 4px 8px; color: var(--text-muted); font: inherit; cursor: pointer; border-radius: 8px; }
.crucible .lit:hover { color: var(--text); }
.crucible .lit.on { color: var(--canopy-bright); }
.crucible .lit:focus-visible { outline: 2px solid var(--canopy-bright); outline-offset: 1px; }

/* builds */
.builds { display: flex; flex-direction: column; gap: 2px; position: sticky; top: 12px; }
.buildsHead { display: flex; align-items: center; justify-content: space-between; padding: 0 0 6px; }
.buildsSummary { color: var(--text-muted); font-size: 13px; }
.buildBtn { display: flex; align-items: center; gap: 10px; width: 100%; text-align: left; background: none; border: 0; padding: 7px 8px; color: var(--text-muted); font: inherit; border-radius: 8px; cursor: pointer; }
.buildBtn:hover { color: var(--text); background: var(--line-soft); }
.buildBtn.on { color: var(--text); background: var(--line-soft); }
.buildBtn .dot { width: 8px; height: 8px; border-radius: 50%; background: var(--line-strong); flex: none; }
.buildBtn.pass .dot { background: var(--canopy-bright); }
.buildBtn.fail .dot { background: var(--danger); }
.buildBtn--paste { margin-top: 10px; }
.paste { display: flex; flex-direction: column; gap: 8px; padding: 8px; }
.paste[hidden] { display: none; }
.paste textarea { width: 100%; background: var(--bg-panel); color: var(--text); border: 1px solid var(--line); border-radius: 8px; padding: 8px; font-size: 12px; resize: vertical; }
.pasteError { color: var(--danger); font-size: 12px; }

/* stage */
.stage { display: flex; flex-direction: column; gap: 10px; min-width: 0; }
.stageTitle { margin: 0; font-size: 22px; font-weight: 700; }
.stageAbout { margin: 4px 0 0; color: var(--text-muted); font-size: 14px; line-height: 1.5; max-width: 72ch; }
.controls { display: flex; flex-wrap: wrap; align-items: center; gap: 4px 10px; }
.controls .lit { font-weight: 600; }
.speeds { display: inline-flex; flex-wrap: wrap; gap: 0; }
.speed { background: none; border: 0; padding: 4px 6px; color: var(--text-muted); font: inherit; font-size: 13px; cursor: pointer; border-radius: 6px; }
.speed:hover { color: var(--text); }
.speed.on { color: var(--canopy-bright); }
.clock { color: var(--text-muted); font-size: 13px; margin-left: auto; }
.look { display: inline-flex; }
.view { width: 100%; height: 420px; display: block; border-radius: var(--radius); background: var(--bg-panel); border: 1px solid var(--line-soft); touch-action: none; cursor: grab; }
.view:active { cursor: grabbing; }
.traces { display: grid; grid-template-columns: repeat(auto-fit, minmax(260px, 1fr)); gap: 10px; }
.trace { background: var(--bg-panel); border: 1px solid var(--line-soft); border-radius: var(--radius-sm); padding: 8px 10px 6px; min-width: 0; }
.traceHead { display: flex; justify-content: space-between; gap: 8px; font-size: 12px; color: var(--text-muted); }
.traceLegend { display: flex; gap: 8px; font-weight: 600; }
.traceCanvas { width: 100%; height: 150px; display: block; margin-top: 4px; }

/* panel */
.panel { display: flex; flex-direction: column; gap: 14px; min-width: 0; }
.panelSection h3 { margin: 0 0 6px; font-size: 12px; font-weight: 600; text-transform: uppercase; letter-spacing: 0.08em; color: var(--text-muted); }
.verdict { display: grid; grid-template-columns: 36px 1fr; gap: 2px 8px; padding: 6px 0; border-top: 1px solid var(--line-soft); font-size: 13px; }
.verdict:first-child { border-top: 0; }
.verdict .tag { font-weight: 700; color: var(--text-muted); }
.verdict.pass .tag { color: var(--canopy-bright); }
.verdict.fail .tag { color: var(--danger); }
.verdictNums { grid-column: 2; color: var(--text-muted); font-size: 12px; }
.verdict .because { grid-column: 2; color: var(--text-muted); font-size: 12px; line-height: 1.4; }
.part { display: grid; grid-template-columns: auto auto 1fr; gap: 0 10px; align-items: baseline; padding: 5px 0; border-top: 1px solid var(--line-soft); font-size: 13px; }
.part:first-child { border-top: 0; }
.partId { font-weight: 700; }
.partType { color: var(--text-muted); font-size: 12px; }
.partVals { display: flex; flex-wrap: wrap; gap: 2px 10px; justify-content: flex-end; font-size: 12px; }
.partVals .phase { color: var(--amber); }
.event { display: grid; grid-template-columns: 70px 1fr; gap: 8px; padding: 4px 0; font-size: 13px; }
.event .mono { color: var(--text-muted); font-size: 12px; }
.event.gray { color: var(--amber); }
.note { display: grid; grid-template-columns: 52px 1fr; gap: 8px; padding: 4px 0; font-size: 12px; color: var(--text-muted); line-height: 1.45; }
.noteKind { font-weight: 700; }
.note--gray .noteKind, .note--theory .noteKind { color: var(--amber); }
.knob { display: grid; grid-template-columns: 86px 1fr auto; gap: 6px 8px; align-items: center; padding: 4px 0; font-size: 13px; }
.knob input { width: 100%; min-width: 0; background: var(--bg-panel); color: var(--text); border: 1px solid var(--line); border-radius: 8px; padding: 5px 8px; font-size: 13px; }
.knobUnit { color: var(--text-muted); font-size: 12px; }
.knob .options { grid-column: 2 / span 2; display: flex; flex-wrap: wrap; gap: 0 2px; }
.knobTheory { grid-column: 1 / -1; color: var(--amber); font-size: 12px; }
.engineLine { color: var(--text-muted); font-size: 11px; }

@media (max-width: 1100px) {
	.bench { grid-template-columns: 200px minmax(0, 1fr); }
	.panel { grid-column: 1 / -1; display: grid; grid-template-columns: repeat(auto-fit, minmax(300px, 1fr)); }
}
@media (max-width: 720px) {
	.bench { grid-template-columns: minmax(0, 1fr); }
	.builds { position: static; flex-direction: row; flex-wrap: wrap; gap: 2px 4px; }
	.buildsHead { width: 100%; }
	.buildBtn { width: auto; padding: 5px 8px; }
	.buildBtn--paste { margin-top: 0; }
	.paste { width: 100%; }
	.view { height: 300px; }
	.clock { margin-left: 0; }
	.panel { grid-template-columns: minmax(0, 1fr); }
}
