/* Candle Studio (/lab/candle-studio/): the configurator page.

   Since 16 Nov 2026 (Björn: "change the candle studio to the very same style and buttons of the entire web site" ...
   "keep the hexcore color scheme thou, also the menu buttons colours at the top menu was nice, we keep that, just not
   the golden claude look") the page wears the site's own deck: the same header and keys as /lab/ (assets/site.css +
   site.js, copied byte for byte, checked by tests/candle.test.mjs), the hex fabric and the page wash behind it,
   Michroma capitals for the title, tracked capitals for the labels, the cyan kicker, rounded dark panels drawn as the
   deck's cockpit windows (data-hmwin), and the deck's buttons: the one action (the buy box's order button) is the
   deck's spectrum with a dark label, a second button is the deck's dark ghost button whose line turns cyan, a text
   button a soft violet capital line. Chosen controls take the deck's violet line and tint (as the site's switches),
   the markers (sliders, ticks) the violet. The tokens (--hm-*) live in assets/site.css.
   The art still carries its own colour: the wooden model and the three operation colours of the laser file (black
   bending slits, the blue tea-light pocket, red through cuts: kit/<engine>/kit.js LAYERS, so the preview reads like the
   file). No gold, amber, copper or yellow; no glow, shadow, blur, light sweep or moving effect on this page's own
   parts. English only (round 2, 14 Nov 2026). Phone first, 20 px side gutter as on the deck pages, 56 px from 981 px
   up. The page jumps instead of gliding (the deck's smooth scrolling is off here, as before). */

:root{color-scheme:dark;--bg:#05070a;--panel:#0b1017;--field:#06090d;--line:#242e3a;--line-2:#2a3441;--line-3:#3a4a5c;--text:#e8ecf1;
--muted:#a6b1bf;--dim:#7f8b9a;--stage:#0d131b;--btn:rgba(12,17,23,.8);--btn-text:#d6dde6;--on:rgba(156,105,252,.1)}
*{box-sizing:border-box}
html{-webkit-text-size-adjust:100%;text-size-adjust:100%;scroll-behavior:auto}
body.cs{position:relative;margin:0;overflow-x:hidden;background:var(--hm-wash),var(--bg);color:var(--text);font:400 16px/1.55 'Chakra Petch','Segoe UI',sans-serif}
.cs :where(a){color:var(--hm-link);text-underline-offset:3px}
.cs :where(a):hover{color:var(--hm-link-hover)}
.cs :where(h1,h2,h3,p){margin:0}
.cs :where(button,input,select){font:inherit;color:inherit}
.cs :where(:focus-visible){outline:2px solid var(--hm-focus);outline-offset:2px}
.cs [hidden]{display:none!important}
.cs-page{position:relative;z-index:2;max-width:1440px;margin:0 auto}

/* the labels of the deck: tracked capitals */
.cs-back,.cs-group h2,.cs-flat h2,.cs-metrics dt,.cs-explode,.cs-orbit{text-transform:uppercase;letter-spacing:.2em}

.cs-main{padding:0 20px}

/* heading: the deck's kicker (a cyan line and capitals), title and lead */
.cs-heading{display:grid;gap:18px;padding:48px 0 32px;max-width:900px}
.cs-back{display:flex;align-items:center;gap:14px;width:max-content;font-size:13px;font-weight:500;letter-spacing:.24em;color:var(--hm-link)!important;text-decoration:none}
.cs-back::before{content:"";width:36px;height:1px;background:currentColor}
.cs-back:hover{color:#ffffff!important}
.cs-heading h1{font:400 clamp(30px,9vw,44px)/1.05 'Michroma',sans-serif;letter-spacing:.02em;text-transform:uppercase;color:var(--hm-text-hi)}
.cs-heading p{max-width:780px;font-size:18px;line-height:1.6;color:var(--muted)}
.cs-jump{margin-top:6px!important}
/* a design from Candle Studio 1.1.0 (an old link or settings file): the choice to open it as a new design,
   a panel with the deck's violet line (as the chosen controls and the toast) */
.cs-legacy{display:grid;gap:12px;max-width:780px;padding:18px;border:1px solid var(--hm-marker);border-radius:12px;background:var(--panel)}
.cs-legacy h2{font-size:12px;font-weight:600;line-height:1.35;letter-spacing:.2em;text-transform:uppercase;color:var(--hm-accent-soft)}
.cs-heading .cs-legacy p{font-size:16px;color:var(--text)}
/* while that choice waits, the design controls wait too (app.js sets inert): dimmed like a disabled choice */
.cs-controls[inert]{opacity:.45}

/* buttons: the deck's ghost button (dark, a line that turns cyan) and its text button */
.cs-jump a,.cs-btn{display:inline-flex;align-items:center;gap:10px;min-height:46px;padding:0 22px;border:1px solid var(--hm-line-strong);border-radius:12px;
background:var(--btn);color:var(--btn-text)!important;font-size:13px;font-weight:600;letter-spacing:.16em;text-transform:uppercase;text-decoration:none;cursor:pointer;text-align:left;line-height:1.25;transition:border-color .25s,color .25s}
.cs-jump a:hover,.cs-btn:hover{border-color:var(--hm-focus);color:#ffffff!important}
.cs-btn:disabled{opacity:.4;cursor:not-allowed}
.cs-btn:disabled:hover{border-color:var(--hm-line-strong);color:var(--btn-text)!important}
.cs-btn.cs-quiet{min-height:40px;padding:0;border:0;border-radius:0;background:none;color:var(--hm-accent-soft)!important;font-size:12px;letter-spacing:.2em}
.cs-btn.cs-quiet:hover{background:none;color:#ffffff!important;text-decoration:underline;text-underline-offset:5px}
.cs-icon{width:40px;height:40px;border:1px solid var(--line-2);border-radius:10px;background:var(--panel);cursor:pointer;font-size:18px;line-height:1;color:var(--text);transition:border-color .25s}
.cs-icon:hover{border-color:var(--hm-focus)}
.cs-icon[aria-pressed="true"]{border-color:var(--hm-marker);background:var(--on);color:#ffffff}

/* the work area: phone = 3D first, then the controls, then the layout */
.cs-work{display:grid;grid-template-columns:minmax(0,1fr);gap:16px;grid-template-areas:"view" "controls" "flat";padding-bottom:32px}
.cs-controls{grid-area:controls;background:var(--panel);border:1px solid var(--line);border-radius:16px}
.cs-view{grid-area:view;min-width:0}
.cs-flat{grid-area:flat;min-width:0;background:var(--panel);border:1px solid var(--line);border-radius:16px;padding:34px 18px 22px}

.cs-group{padding:20px 18px;border-top:1px solid #1c242e}
.cs-group:first-child{border-top:0;padding-top:34px}
.cs-group:last-child{padding-bottom:30px}
.cs-group h2{font-size:12px;font-weight:600;line-height:1.35;margin-bottom:14px;color:var(--hm-accent-soft)}
.cs-label{display:block;margin:16px 0 6px;font-size:15px;color:var(--text)}
.cs-group h2+.cs-label{margin-top:0}
.cs-range{display:flex;align-items:baseline;justify-content:space-between;gap:12px}
.cs-range output{font-variant-numeric:tabular-nums;color:#ffffff;white-space:nowrap}
.cs-radios{display:grid;gap:6px}
.cs-radio{display:flex;align-items:flex-start;gap:10px;padding:9px 12px;border:1px solid var(--line-2);border-radius:10px;background:var(--field);cursor:pointer;font-size:15px;line-height:1.35}
.cs-radio:hover{border-color:var(--line-3)}
.cs-radio:has(input:checked){border-color:var(--hm-marker);background:var(--on);color:#ffffff}
.cs-radio input{flex:none;width:18px;height:18px;margin:0;accent-color:var(--hm-marker);cursor:pointer}
.cs-radio:has(input:disabled){opacity:.45;cursor:not-allowed;border-color:var(--line-2);background:var(--field)}
.cs-radio input:disabled{cursor:not-allowed}
.cs-radios+.cs-label{margin-top:18px}
.cs-radios+.cs-positions{margin-top:12px}
.cs-work input[type="range"]{display:block;width:100%;height:28px;margin:0;accent-color:var(--hm-marker);cursor:pointer}
.cs-work input[type="range"]:disabled{opacity:.35;cursor:not-allowed}
.cs-hint{margin-top:10px!important;font-size:14px;color:var(--muted)}

/* the body families: the deck's chips; the chosen one with the violet line and tint */
.cs-families{display:grid;grid-template-columns:repeat(4,minmax(0,1fr));gap:6px}
.cs-family{display:grid;justify-items:center;gap:4px;padding:9px 4px 7px;border:1px solid var(--line-2);border-radius:10px;background:var(--field);cursor:pointer;font-size:13px;color:var(--muted)}
.cs-family svg{width:100%;height:46px;fill:none;stroke:#c4cfdd;stroke-width:1.2;vector-effect:non-scaling-stroke}
.cs-family svg path{vector-effect:non-scaling-stroke}
.cs-family:hover{border-color:var(--line-3);color:var(--text)}
.cs-family[aria-pressed="true"]{border-color:var(--hm-marker);background:var(--on);color:#ffffff}
.cs-family[aria-pressed="true"] svg{stroke:#ffffff}

.cs-positions{display:flex;flex-wrap:wrap;gap:6px;margin:10px 0 4px}
.cs-position{width:40px;height:40px;border:1px solid var(--line-2);border-radius:10px;background:var(--field);cursor:pointer;font-variant-numeric:tabular-nums;color:var(--muted)}
.cs-position:hover{border-color:var(--line-3);color:var(--text)}
.cs-position[aria-pressed="true"]{border-color:var(--hm-marker);background:var(--on);color:#ffffff;font-weight:600}
.cs-check{display:flex;gap:12px;align-items:flex-start;margin-top:16px;cursor:pointer;font-size:15px}
.cs-check input{flex:none;width:20px;height:20px;margin:2px 0 0;accent-color:var(--hm-marker);cursor:pointer}
.cs-check small{display:block;font-size:13px;color:var(--muted)}

.cs-buttons{display:flex;flex-wrap:wrap;gap:8px}
.cs-settings .cs-quiet{margin-top:8px}

/* the 3D stage: a cockpit window (the step at its top left and bottom right leaves the room below) */
.cs-stage{position:relative;height:clamp(360px,62vw,520px);background:var(--stage);border:1px solid var(--line);border-radius:16px;overflow:hidden}
.cs-model{position:absolute;inset:0}
.cs-model canvas{display:block;width:100%;height:100%;touch-action:none}
.cs-stage-top{position:absolute;top:0;left:0;right:0;display:flex;justify-content:space-between;align-items:flex-start;gap:12px;padding:30px 14px 12px;pointer-events:none}
.cs-name{font-size:15px;font-weight:600;line-height:1.35;color:#ffffff}
.cs-tools{display:flex;gap:6px;pointer-events:auto}
.cs-stage-bottom{position:absolute;left:0;right:0;bottom:0;display:flex;flex-wrap:wrap;align-items:center;justify-content:space-between;gap:10px 16px;padding:12px 14px 30px}
.cs-finish{display:flex;gap:8px}
.cs-swatch{width:26px;height:26px;border:1px solid var(--line-3);border-radius:8px;background:var(--swatch);cursor:pointer}
.cs-swatch[aria-pressed="true"]{outline:2px solid var(--hm-marker);outline-offset:2px}
.cs-explode{display:flex;align-items:center;gap:10px;font-size:12px;font-weight:600;color:var(--muted)}
.cs-explode input{width:140px!important}
.cs-loading,.cs-fallback{position:absolute;left:12px;right:12px;top:50%;transform:translateY(-50%);text-align:center;color:var(--muted);font-size:15px}
.cs-error{position:absolute;left:12px;right:12px;top:72px;max-width:520px;margin:0 auto;padding:18px;background:var(--panel);border:1px solid var(--hm-warn-line);border-radius:12px;z-index:2}
.cs-error p{margin-bottom:12px;font-size:15px}
.cs-detail{color:var(--hm-warn);font-size:14px!important}
.cs-orbit{margin-top:10px!important;font-size:11px;color:var(--dim)}

/* the figures: the deck's stat boxes */
.cs-metrics{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:10px;margin:14px 0 0}
.cs-metrics>div{padding:14px 16px;border:1px solid #222b36;border-radius:12px;background:var(--panel)}
.cs-metrics dt{font-size:10.5px;line-height:1.35;color:var(--dim)}
.cs-metrics dd{margin:6px 0 0;font:400 20px/1.2 'Michroma',sans-serif;color:var(--hm-text-hi);font-variant-numeric:tabular-nums}
.cs-state{margin-top:12px!important;font-size:14px;color:var(--muted)}

/* the flat layout */
.cs-flat-top{display:flex;flex-wrap:wrap;align-items:baseline;justify-content:space-between;gap:6px 16px}
.cs-flat h2{font-size:12px;font-weight:600;color:var(--hm-accent-soft)}
.cs-size{font-variant-numeric:tabular-nums;color:#ffffff}
.cs-legend{display:flex;flex-wrap:wrap;gap:6px 18px;margin:12px 0 14px;padding:0;list-style:none;font-size:14px;color:var(--muted)}
/* the legend: each colour on a small piece of the sheet's paper colour, as it shows in the file
   (a line for the slits and the cuts, a filled square for the pocket) */
.cs-legend li{display:flex;align-items:center;gap:8px}
.cs-legend i{position:relative;display:block;flex:none;width:18px;height:18px;background:#f3f3f1;border:1px solid var(--line-2)}
.cs-legend i::after{content:"";position:absolute;left:3px;right:3px;top:7px;border-top:2px solid currentColor}
.cs-legend .op-slit{color:#000000}
.cs-legend .op-pocket{color:#0000ff}
.cs-legend .op-pocket::after{top:3px;bottom:3px;border-top:0;background:currentColor}
.cs-legend .op-cut{color:#ff0000}
.cs-sheet{position:relative;height:clamp(200px,52vw,320px);border:1px solid var(--line);border-radius:10px;overflow:hidden}
.cs-sheet canvas{position:absolute;inset:0;width:100%;height:100%;display:block}
body[data-phase="invalid"] .cs-sheet canvas,body[data-phase="pending"] .cs-sheet canvas{opacity:.35}
/* the figures, the layout size and the release are those of the last valid design: faint too */
body[data-phase="invalid"] .cs-metrics dd,body[data-phase="pending"] .cs-metrics dd,body[data-phase="invalid"] #sheet-size,
body[data-phase="pending"] #sheet-size,body[data-phase="invalid"] #release,body[data-phase="pending"] #release{opacity:.35}
/* an invalid design: the last valid model stays only as a faint background behind the message */
body[data-phase="invalid"] .cs-model{opacity:.25}
.cs-release{margin-top:12px!important;font-size:13px;color:var(--dim);font-variant-numeric:tabular-nums}

/* the product and the buy box */
.cs-buy{display:grid;grid-template-columns:minmax(0,1fr);gap:28px;padding:40px 0 56px;border-top:1px solid #1c242e}
.cs-buy-text{display:grid;gap:14px;align-content:start;max-width:820px}
.cs-buy-text h2{font:400 clamp(22px,2.4vw,30px)/1.25 'Michroma',sans-serif;letter-spacing:.05em;text-transform:uppercase;color:var(--hm-text-hi)}
.cs-buy-text p{font-size:16px;line-height:1.65;color:var(--muted)}
.cs-buy-text .cs-price{font-size:18px;font-weight:600;margin-top:6px!important;color:#ffffff}
.cs-two{display:grid;grid-template-columns:minmax(0,1fr);gap:14px 28px;padding:18px 0;border-top:1px solid #1c242e;border-bottom:1px solid #1c242e}
.cs-two h3{font-size:12px;font-weight:600;letter-spacing:.2em;text-transform:uppercase;margin-bottom:10px;color:var(--hm-accent-soft)}
.cs-two ul{margin:0;padding:0 0 0 18px;font-size:15px;line-height:1.55;color:var(--text)}
.cs-two li{margin:0 0 6px;overflow-wrap:anywhere}
.cs-two li::marker{color:var(--hm-marker)}
.cs-buy-text .cs-safety{padding-left:14px;border-left:1px solid var(--hm-marker);color:var(--text)}
.cs-buy-box{min-width:0}
/* the buy box (shop/shop.css) in the deck's shape: a rounded panel, the order button the size of the deck's main
   button (the spectrum and its dark label come from shop.css) */
.cs-buy-box .hm-buy{max-width:none;border-radius:16px}
.cs-buy-box .hm-buy-facts,.cs-buy-box .hm-buy-waiver,.cs-buy-box .hm-buy-design{border-radius:10px}
.cs-buy-box .hm-buy .hm-btn{min-height:58px;border-radius:12px;font-weight:700;letter-spacing:.04em}
.cs-buy-box .hm-buy input[type="email"],.cs-buy-box .hm-buy input[type="text"]{border-radius:10px}
/* the buy box's text links (terms, withdrawal notice, privacy) keep their underline: site.css takes it off every link */
.cs-buy-box .hm-buy a:not(.hm-btn){text-decoration:underline;text-underline-offset:3px}

/* dialog, toast (the footer is the site's own, from /lab/) */
.cs-dialog{width:min(1200px,calc(100vw - 32px));height:min(820px,calc(100vh - 32px));padding:18px;border:1px solid var(--line-2);border-radius:16px;background:var(--panel);color:var(--text)}
.cs-dialog::backdrop{background:rgba(3,5,8,.82)}
.cs-dialog-top{display:flex;justify-content:space-between;align-items:center;gap:12px;margin-bottom:12px}
.cs-dialog h2{font-size:12px;font-weight:600;letter-spacing:.2em;text-transform:uppercase;color:var(--hm-accent-soft)}
.cs-sheet-large{height:calc(100% - 56px)}
.cs-toast{position:fixed;left:16px;right:16px;bottom:16px;max-width:520px;margin:0 auto!important;padding:13px 16px;border:1px solid var(--hm-marker);border-radius:12px;background:var(--hm-raise);color:#ffffff;font-size:15px;opacity:0;visibility:hidden;transition:opacity .15s,visibility .15s;z-index:10}
.cs-toast.show{opacity:1;visibility:visible}
.cs-noscript{padding:16px;text-align:center}

/* a phone: the stage is short, so the message stands in its flow and the stage grows to hold it
   (absolutely placed, its lower part and the button back to the last valid design were cut off) */
@media (max-width:699px){
  .cs-stage:has(>.cs-error:not([hidden])){height:auto;min-height:clamp(360px,62vw,520px)}
  .cs-error{position:relative;top:auto;left:auto;right:auto;width:calc(100% - 24px);margin:84px auto 76px}
}
@media (min-width:700px){
  .cs-metrics{grid-template-columns:repeat(4,minmax(0,1fr))}
  .cs-two{grid-template-columns:repeat(2,minmax(0,1fr))}
  .cs-families{grid-template-columns:repeat(7,minmax(0,1fr))}
  .cs-heading h1{font-size:clamp(40px,4.6vw,66px)}
}
@media (min-width:981px){
  .cs-main{padding:0 56px}
}
@media (min-width:1000px){
  .cs-work{grid-template-columns:340px minmax(0,1fr);grid-template-rows:auto 1fr;grid-template-areas:"controls view" "controls flat";align-items:start}
  .cs-families{grid-template-columns:repeat(4,minmax(0,1fr))}
  .cs-stage{height:clamp(420px,56vh,620px)}
  .cs-sheet{height:300px}
  .cs-buy{grid-template-columns:minmax(0,1fr) minmax(360px,520px);gap:48px}
}
@media (prefers-reduced-motion:reduce){.cs-toast,.cs-btn,.cs-jump a,.cs-icon{transition:none}}
