/* Workshop Mode: high contrast, big targets, made for a tablet on the bench. */
.ws-page { --ws-bg: #1e2326; --ws-panel: #282f33; --ws-line: #3a4247; --ws-accent: #a8f0d0; --ws-text: #f2f5f3; --ws-muted: #aab4b8; background: var(--ws-bg); color: var(--ws-text); }
:root[data-theme="light"] .ws-page { --ws-bg: #f5f7f6; --ws-panel: #ffffff; --ws-line: #d7dedb; --ws-accent: #1f6b52; --ws-text: #14191b; --ws-muted: #4d585c; }
.ws-main { padding: 18px 0 110px; }
.ws-start { padding: 40px 0; }
.ws-start h1 { font-size: clamp(32px, 5vw, 52px); margin: 8px 0 12px; }
.ws-start .lede { color: var(--ws-muted); max-width: 60ch; }
.ws-start-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(260px, 1fr)); gap: 14px; margin-top: 26px; align-items: start; }
.ws-start-grid article { padding: 20px; border-radius: 16px; background: var(--ws-panel); border: 1px solid var(--ws-line); }
.ws-start-grid h2 { font-size: 20px; margin: 0 0 8px; }
.ws-start-grid p { color: var(--ws-muted); }
.ws-recent { list-style: none; padding: 0; margin: 10px 0 0; display: grid; gap: 8px; }
.ws-recent a { display: grid; gap: 2px; padding: 12px 14px; border-radius: 12px; border: 1px solid var(--ws-line); color: inherit; text-decoration: none; }
.ws-recent a:hover { border-color: var(--ws-accent); }
.ws-recent small { color: var(--ws-muted); }
.ws-app { width: min(1280px, calc(100% - 32px)); margin: 0 auto; }
.ws-bar { display: flex; flex-wrap: wrap; justify-content: space-between; align-items: flex-end; gap: 12px; padding: 8px 0 14px; }
.ws-kicker { font: 600 12px/1 var(--font-mono); letter-spacing: .12em; text-transform: uppercase; color: var(--ws-accent); }
.ws-title h1 { font-size: clamp(24px, 3.4vw, 36px); margin: 6px 0 0; line-height: 1.1; }
.ws-tools { display: flex; flex-wrap: wrap; gap: 8px; }
.ws-tool { min-height: 44px; padding: 0 14px; border-radius: 12px; border: 1px solid var(--ws-line); background: var(--ws-panel); color: var(--ws-text); font: 600 14px/1 var(--font-ui); cursor: pointer; display: inline-flex; align-items: center; text-decoration: none; }
.ws-tool:hover, .ws-tool[aria-pressed="true"] { border-color: var(--ws-accent); color: var(--ws-accent); }
.ws-tabs { display: none; }
.ws-grid { display: grid; grid-template-columns: minmax(300px, 380px) minmax(0, 1fr); gap: 18px; align-items: start; }
.ws-bom, .ws-step { background: var(--ws-panel); border: 1px solid var(--ws-line); border-radius: 18px; padding: 20px; }
.ws-bom { position: sticky; top: 84px; max-height: calc(100vh - 110px); overflow-y: auto; }
.ws-bom header { display: flex; justify-content: space-between; align-items: baseline; gap: 8px; }
.ws-bom h2 { font-size: 20px; margin: 0; }
.ws-count { font: 600 13px var(--font-mono); color: var(--ws-muted); }
.ws-meter { height: 6px; border-radius: 3px; background: var(--ws-line); margin: 12px 0 6px; overflow: hidden; }
.ws-meter i { display: block; height: 100%; background: var(--ws-accent); border-radius: 3px; transition: width .3s; }
.ws-bom h3 { font: 600 12px/1 var(--font-mono); letter-spacing: .1em; text-transform: uppercase; color: var(--ws-muted); margin: 18px 0 8px; }
.ws-bom ul { list-style: none; margin: 0; padding: 0; display: grid; gap: 6px; }
.ws-bom label { display: grid; grid-template-columns: 30px 52px minmax(0, 1fr); gap: 10px; align-items: center; min-height: 56px; padding: 8px 12px; border-radius: 12px; border: 1px solid var(--ws-line); cursor: pointer; }
.ws-bom input { width: 26px; height: 26px; accent-color: var(--ws-accent); margin: 0; }
.ws-qty { font: 700 17px var(--font-mono); color: var(--ws-accent); text-align: right; }
.ws-what { display: grid; gap: 2px; min-width: 0; }
.ws-what b { font-size: 15.5px; overflow-wrap: anywhere; }
.ws-what code { font: 500 12.5px/1.4 var(--font-mono); color: var(--ws-muted); background: none; padding: 0; overflow-wrap: anywhere; }
.ws-what small { font-size: 12.5px; color: var(--ws-muted); }
.ws-bom label.got { opacity: .55; }
.ws-bom label.got b, .ws-bom label.got code { text-decoration: line-through; }
.ws-bom-actions { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 16px; }
.ws-dots { display: flex; flex-wrap: wrap; gap: 6px; margin-bottom: 10px; }
.ws-dots button { width: 34px; height: 12px; border-radius: 6px; border: 0; background: var(--ws-line); cursor: pointer; padding: 0; }
.ws-dots button.done { background: color-mix(in srgb, var(--ws-accent) 45%, var(--ws-line)); }
.ws-dots button.on { background: var(--ws-accent); }
.ws-step { min-height: 52vh; }
.ws-step h2 { font-size: clamp(26px, 3.6vw, 40px); line-height: 1.12; margin: 10px 0 16px; letter-spacing: -0.01em; }
.ws-media { margin: 0 0 16px; border-radius: 14px; overflow: hidden; background: #0003; }
.ws-media img { display: block; width: 100%; max-height: 52vh; object-fit: contain; }
.ws-body p { font-size: 19px; line-height: 1.6; margin: 0 0 12px; max-width: 70ch; }
.ws-tip { padding: 12px 14px; border-radius: 12px; border-left: 4px solid var(--ws-accent); background: color-mix(in srgb, var(--ws-accent) 10%, transparent); font-size: 16px; }
.ws-tip b { color: var(--ws-accent); margin-right: 6px; }
.ws-code { margin: 14px 0; border-radius: 12px; overflow: hidden; border: 1px solid var(--ws-line); background: #121517; }
.ws-code-bar { display: flex; justify-content: space-between; align-items: center; padding: 6px 6px 6px 14px; font: 600 12px var(--font-mono); letter-spacing: .08em; text-transform: uppercase; color: #aab4b8; border-bottom: 1px solid #2a3135; }
.ws-code pre { margin: 0; padding: 14px 0; overflow-x: auto; font: 14px/1.6 var(--font-mono); color: #e6ebe8; counter-reset: ln; }
.ws-code .ln { display: block; padding: 0 16px 0 0; white-space: pre; }
.ws-code .ln::before { counter-increment: ln; content: counter(ln); display: inline-block; width: 42px; padding-right: 14px; text-align: right; color: #5c676c; }
.ws-code i { font-style: normal; }
.ws-code .k { color: #a8f0d0; } .ws-code .s { color: #f1d48f; } .ws-code .n { color: #9fc7ff; } .ws-code .c { color: #7d878c; font-style: italic; }
.ws-stuck { margin-top: 18px; min-height: 44px; padding: 0 16px; border-radius: 12px; border: 1px dashed var(--ws-line); background: none; color: var(--ws-muted); font: 600 15px var(--font-ui); cursor: pointer; }
.ws-stuck:hover { color: var(--ws-accent); border-color: var(--ws-accent); }
.ws-pager { position: sticky; bottom: 0; display: grid; grid-template-columns: 1fr 1.6fr; gap: 12px; padding: 14px 0 max(14px, env(safe-area-inset-bottom)); background: linear-gradient(transparent, var(--ws-bg) 30%); }
.ws-nav { min-height: 72px; border-radius: 18px; border: 2px solid var(--ws-line); background: var(--ws-panel); color: var(--ws-text); font: 700 21px var(--font-ui); cursor: pointer; }
.ws-nav:disabled { opacity: .35; cursor: default; }
.ws-next { background: var(--ws-accent); border-color: var(--ws-accent); color: #10231c; }
:root[data-theme="light"] .ws-next { color: #fff; }
.ws-drawer { position: fixed; top: 0; right: 0; bottom: 0; z-index: 150; width: min(460px, 100vw); background: var(--ws-panel); border-left: 1px solid var(--ws-line); box-shadow: -20px 0 60px #0008; overflow-y: auto; animation: ws-in .25s ease-out; }
@keyframes ws-in { from { transform: translateX(40px); opacity: 0; } }
.ws-drawer-in { padding: 20px; }
.ws-drawer header { display: flex; justify-content: space-between; align-items: center; gap: 10px; }
.ws-drawer h2 { margin: 0; font-size: 22px; }
.ws-drawer h3 { font: 600 12px/1 var(--font-mono); letter-spacing: .1em; text-transform: uppercase; color: var(--ws-muted); margin: 22px 0 10px; }
.ws-drawer .sub { color: var(--ws-muted); }
.ws-threads { list-style: none; padding: 0; margin: 0; display: grid; gap: 8px; }
.ws-threads a { display: grid; gap: 3px; padding: 12px; border-radius: 12px; border: 1px solid var(--ws-line); color: inherit; text-decoration: none; }
.ws-threads a:hover { border-color: var(--ws-accent); }
.ws-threads small { color: var(--ws-muted); }
.ws-help { display: grid; gap: 12px; }
.ws-help label { display: grid; gap: 6px; font-weight: 600; }
.ws-help textarea { width: 100%; border-radius: 12px; border: 1px solid var(--ws-line); background: var(--ws-bg); color: var(--ws-text); padding: 12px; font: 16px/1.5 var(--font-ui); }
.ws-help .ws-agree { display: flex; gap: 10px; align-items: center; font-weight: 400; }
.ws-help .ws-agree input { width: 22px; height: 22px; accent-color: var(--ws-accent); }
body.ws-big .ws-body p { font-size: 24px; }
body.ws-big .ws-step h2 { font-size: clamp(32px, 4.6vw, 50px); }
body.ws-big .ws-what b { font-size: 18px; }
@media (max-width: 900px) {
  .ws-tabs { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; margin-bottom: 12px; }
  .ws-tabs button { min-height: 52px; border-radius: 14px; border: 2px solid var(--ws-line); background: var(--ws-panel); color: var(--ws-text); font: 700 16px var(--font-ui); cursor: pointer; }
  .ws-tabs button b { font-family: var(--font-mono); color: var(--ws-accent); margin-left: 6px; }
  .ws-tabs button[aria-selected="true"] { border-color: var(--ws-accent); }
  .ws-grid { grid-template-columns: minmax(0, 1fr); }
  .ws-grid[data-tab-now="steps"] .ws-bom, .ws-grid[data-tab-now="parts"] .ws-steps { display: none; }
  .ws-bom { position: static; max-height: none; }
  .ws-tools .ws-tool { min-height: 40px; font-size: 13px; }
}
@media (prefers-reduced-motion: reduce) { .ws-drawer { animation: none; } }
.ws-step, .ws-steps { scroll-margin-top: 84px; }
.ws-bom label { grid-template-columns: 28px 44px minmax(0, 1fr); }

/* Finished: the "you built it" screen. */
.ws-finish { background: var(--ws-panel); border: 1px solid var(--ws-accent, #a8f0d0); border-radius: 18px; padding: clamp(24px, 4vw, 44px); text-align: center; display: grid; justify-items: center; gap: 12px; scroll-margin-top: 84px; }
.ws-finish-mark { font-size: 64px; line-height: 1; animation: ws-pop 0.6s cubic-bezier(.2, 1.6, .4, 1) both; }
@keyframes ws-pop { from { transform: scale(0.3) rotate(-20deg); opacity: 0; } to { transform: none; opacity: 1; } }
@media (prefers-reduced-motion: reduce) { .ws-finish-mark { animation: none; } }
.ws-finish h2 { font-size: clamp(34px, 5vw, 56px); line-height: 1.05; margin: 0; letter-spacing: -0.02em; outline: none; }
.ws-finish p { max-width: 46ch; font-size: 19px; line-height: 1.45; margin: 0; }
.ws-finish-actions { display: grid; grid-template-columns: repeat(auto-fit, minmax(200px, 1fr)); gap: 12px; width: min(560px, 100%); margin-top: 10px; }
.ws-finish-actions .ws-nav { text-decoration: none; display: flex; align-items: center; justify-content: center; }
.ws-finish-more { display: flex; flex-wrap: wrap; gap: 8px; justify-content: center; margin-top: 6px !important; }
.ws-finish-more .ws-tool { text-decoration: none; }
