/* Experimental home look only. #home is unchanged. */
body.cdh-dark[data-route="home-preview"] {
  --cd-liquid-edge:rgba(193,205,255,.38);
  --cd-liquid-panel:linear-gradient(125deg,rgba(19,32,76,.70),rgba(27,30,75,.64) 48%,rgba(98,33,91,.46));
  --cd-liquid-glow:0 24px 62px rgba(6,9,39,.29),0 7px 42px rgba(237,47,126,.11);
  --cd-liquid-highlight:rgba(249,247,255,.30);
}
body[data-route="home-preview"] .scene {
  background:radial-gradient(ellipse 55% 70% at 7% 64%,rgba(34,89,176,.25),transparent 80%),radial-gradient(ellipse 55% 68% at 93% 30%,rgba(214,33,113,.20),transparent 80%),linear-gradient(115deg,#0b142e,#13122d 49%,#27152e)!important;
}
body[data-route="home-preview"] .cde-home{padding-top:70px}
body[data-route="home-preview"] .cde-preview.cd-glass--framed{
  border:1px solid rgba(199,203,248,.40)!important;border-radius:23px;
  background:linear-gradient(126deg,color-mix(in srgb,#17214f var(--cd-preview-fill,70%),transparent),color-mix(in srgb,#1b1e49 var(--cd-preview-fill,70%),transparent) 48%,color-mix(in srgb,#662056 var(--cd-preview-fill,70%),transparent))!important;
  -webkit-backdrop-filter:blur(var(--cd-preview-blur,20px)) saturate(145%)!important;backdrop-filter:blur(var(--cd-preview-blur,20px)) saturate(145%)!important;
  box-shadow:inset 0 1px rgba(255,255,255,.30),0 24px 75px rgba(2,5,31,.32),0 12px 60px rgba(238,55,140,.13)!important;
}
body[data-route="home-preview"] .cde-live-availability.cd-glass--rimless,
body[data-route="home-preview"] .cde-mode-links.cd-glass--rimless{
  background:linear-gradient(118deg,color-mix(in srgb,#193366 calc(var(--cd-preview-fill,70%) * .48),transparent),color-mix(in srgb,#341f5c calc(var(--cd-preview-fill,70%) * .40),transparent) 57%,color-mix(in srgb,#d33782 calc(var(--cd-preview-fill,70%) * .27),transparent))!important;
  -webkit-backdrop-filter:blur(var(--cd-preview-blur,20px)) saturate(150%)!important;backdrop-filter:blur(var(--cd-preview-blur,20px)) saturate(150%)!important;
  box-shadow:inset 0 1px rgba(229,233,255,.20),0 12px 34px rgba(4,8,37,.13)!important;
}
body[data-route="home-preview"] :is(.cde-preview,.cde-live-availability,.cde-mode-links)::before{
  background:radial-gradient(ellipse 72% 22% at 33% -3%,rgba(240,244,255,.30),transparent 87%)!important;opacity:var(--cd-preview-sheen,.70)!important;
}
body[data-route="home-preview"] .cde-option{
  border-color:rgba(185,186,245,.31);
  background:linear-gradient(110deg,rgba(29,48,91,.61),rgba(64,33,85,.40));
  border-radius:11px;box-shadow:inset 0 1px rgba(255,255,255,.08);
}
body[data-route="home-preview"] .cde-option:hover:not(:disabled){border-color:rgba(255,130,199,.76);background:linear-gradient(110deg,rgba(45,55,112,.70),rgba(125,40,106,.51))}
body[data-route="home-preview"] .cde-option.is-selected{border-color:rgba(255,104,177,.83);background:linear-gradient(105deg,rgba(90,43,107,.65),rgba(162,48,114,.51))}
body[data-route="home-preview"] .cde-cta{border-radius:12px;background:linear-gradient(110deg,#e93f91,#d43a78);box-shadow:0 11px 30px rgba(232,45,133,.22),inset 0 1px rgba(255,255,255,.29)}
body[data-route="home-preview"] .cde-cta:hover{background:linear-gradient(110deg,#fb54a4,#e64187)}
body[data-route="home-preview"] .cde-frame{border-radius:16px 16px 9px 9px}
body[data-route="home-preview"] .cde-kicker,body[data-route="home-preview"] .cde-mode-picker-label>span{color:#ff9ccb}
body[data-route="home-preview"] .cde-copy h1 span{color:#fa589b}

body[data-route="home-preview"] #app{display:block}
body[data-route="home-preview"] .cd-home-compare{
  position:relative;z-index:4;max-width:1280px;width:100%;margin:18px auto 0;
  padding:13px 16px;border:1px solid rgba(218,205,251,.30);border-radius:16px;
  color:#ffc0db;background:linear-gradient(110deg,rgba(24,32,78,.78),rgba(85,33,84,.65));
  -webkit-backdrop-filter:blur(16px);backdrop-filter:blur(16px);
  box-shadow:inset 0 1px rgba(255,255,255,.19),0 12px 32px rgba(5,5,29,.22);
}
body[data-route="home-preview"] .cd-home-compare-top{display:flex;align-items:center;justify-content:space-between;gap:12px;flex-wrap:wrap}
body[data-route="home-preview"] .cd-home-compare-top>strong{font-size:11px;font-weight:850;letter-spacing:.12em}
body[data-route="home-preview"] .cd-home-compare nav{display:flex;gap:7px;flex-wrap:wrap}
body[data-route="home-preview"] .cd-home-compare a{font-size:12px;font-weight:750;color:#efdefa;padding:8px 12px;border-radius:9px;border:1px solid rgba(229,208,255,.19);text-decoration:none}
body[data-route="home-preview"] .cd-home-compare a[aria-current="page"]{background:rgba(243,65,145,.22);border-color:rgba(255,124,185,.45);color:#fff}
body[data-route="home-preview"] .cd-home-compare a:hover{background:rgba(93,83,160,.29);color:#fff}
body[data-route="home-preview"] .cd-home-compare-settings{margin-top:11px;border-top:1px solid rgba(232,214,249,.15);padding-top:10px}
body[data-route="home-preview"] .cd-home-compare-settings summary{cursor:pointer;display:list-item;width:max-content;font-size:13px;font-weight:750;color:#fae4ff}
body[data-route="home-preview"] .cd-home-compare-settings summary span{margin-left:6px}
body[data-route="home-preview"] .cd-home-control-grid{display:flex;align-items:end;flex-wrap:wrap;gap:15px 22px;padding-top:14px}
body[data-route="home-preview"] .cd-home-control-grid label{display:flex;flex-direction:column;gap:7px;font-size:12px;font-weight:700;color:#f2dcef}
body[data-route="home-preview"] .cd-home-control-grid output{font-variant-numeric:tabular-nums;color:#ffa2d0}
body[data-route="home-preview"] .cd-home-control-grid input{width:145px;accent-color:#f052a0}
body[data-route="home-preview"] .cd-home-control-grid select,
body[data-route="home-preview"] .cd-home-reset{min-height:32px;background:rgba(30,30,74,.75);border:1px solid rgba(223,184,248,.35);color:#fff;border-radius:8px;padding:6px 9px;font-size:12px}
body[data-route="home-preview"] .cd-home-reset{cursor:pointer}
body[data-route="home-preview"][data-preview-tint="blue"] .cde-preview.cd-glass--framed{background:linear-gradient(120deg,color-mix(in srgb,#183e87 var(--cd-preview-fill,70%),transparent),color-mix(in srgb,#182c68 var(--cd-preview-fill,70%),transparent))!important}
body[data-route="home-preview"][data-preview-tint="pink"] .cde-preview.cd-glass--framed{background:linear-gradient(120deg,color-mix(in srgb,#542057 var(--cd-preview-fill,70%),transparent),color-mix(in srgb,#9e306d var(--cd-preview-fill,70%),transparent))!important}
@media(max-width:700px){body[data-route="home-preview"] .cd-home-compare{margin-top:12px}body[data-route="home-preview"] .cd-home-compare nav{width:100%}body[data-route="home-preview"] .cd-home-compare a{padding:7px 9px}body[data-route="home-preview"] .cde-home{padding-top:56px}}
@media(prefers-reduced-transparency:reduce){body[data-route="home-preview"] .cde-preview.cd-glass--framed{background:rgba(24,29,64,.94)!important}}

/* Preview v3: one shared material system for EVERY glass surface on the test home. */
body.cdh-dark[data-route="home-preview"]{
  --cd-prev-deep:#172b60;
  --cd-prev-mid:#292557;
  --cd-prev-warm:#71345f;
  --cd-prev-light:rgba(246,241,255,.38);
  --cd-prev-glow:rgba(247,72,161,.16);
}
body.cdh-dark[data-route="home-preview"][data-preview-tint="blue"]{
  --cd-prev-deep:#173d7c;--cd-prev-mid:#24396c;--cd-prev-warm:#29497e;
  --cd-prev-glow:rgba(66,144,255,.18);
}
body.cdh-dark[data-route="home-preview"][data-preview-tint="pink"]{
  --cd-prev-deep:#4b254f;--cd-prev-mid:#743461;--cd-prev-warm:#a23c79;
  --cd-prev-glow:rgba(255,76,166,.20);
}
body.cdh-dark[data-route="home-preview"] :is(
  .site-header,.site-footer,.cd-home-compare,
  .cde-preview.cd-glass--framed,.cde-live-availability.cd-glass--rimless,
  .cde-mode-links.cd-glass--rimless,.cde-quiz h2,.cde-option
){
  background:linear-gradient(120deg,
    color-mix(in srgb,var(--cd-prev-deep) var(--cd-preview-fill,70%),transparent),
    color-mix(in srgb,var(--cd-prev-mid) var(--cd-preview-fill,70%),transparent) 53%,
    color-mix(in srgb,var(--cd-prev-warm) var(--cd-preview-fill,70%),transparent))!important;
  -webkit-backdrop-filter:blur(var(--cd-preview-blur,20px)) saturate(145%)!important;
  backdrop-filter:blur(var(--cd-preview-blur,20px)) saturate(145%)!important;
  box-shadow:inset 0 1px color-mix(in srgb,var(--cd-prev-light) calc(var(--cd-preview-sheen,.70) * 100%),transparent),
    0 13px 34px rgba(5,6,29,.17),0 9px 35px var(--cd-prev-glow)!important;
}
/* Same editable reflection on primary cards and floating groups, separate from content. */
body.cdh-dark[data-route="home-preview"] :is(
  .cde-preview.cd-glass--framed,.cde-live-availability.cd-glass--rimless,
  .cde-mode-links.cd-glass--rimless
)::before{
  background:radial-gradient(ellipse 80% 28% at 30% -4%,var(--cd-prev-light),transparent 86%)!important;
  opacity:var(--cd-preview-sheen,.70)!important;
}
/* Keep interactive feedback visible above the shared glass fill. */
body.cdh-dark[data-route="home-preview"] .cde-option:hover:not(:disabled){
  border-color:rgba(255,153,205,.80)!important;
  filter:brightness(1.16);
}
body.cdh-dark[data-route="home-preview"] .cde-option.is-selected{
  border-color:#fb5aab!important;filter:brightness(1.12);
}
body.cdh-dark[data-route="home-preview"] .cde-option.is-right{
  border-color:#52dba0!important;box-shadow:inset 0 1px rgba(255,255,255,.18),0 0 0 1px rgba(82,219,160,.18)!important;
}
body.cdh-dark[data-route="home-preview"] .cde-option.is-wrong{border-color:#ff638f!important}
@media(prefers-reduced-transparency:reduce){
  body.cdh-dark[data-route="home-preview"] :is(.site-header,.site-footer,.cd-home-compare,.cde-preview.cd-glass--framed,.cde-live-availability.cd-glass--rimless,.cde-mode-links.cd-glass--rimless,.cde-quiz h2,.cde-option){
    background:#252444!important;-webkit-backdrop-filter:none!important;backdrop-filter:none!important;
  }
}

/* v4 — localized light reflection on every glass surface, including wide bars. */
body.cdh-dark[data-route="home-preview"] :is(
  .site-header,.site-footer,.cd-home-compare,
  .cde-preview.cd-glass--framed,.cde-live-availability.cd-glass--rimless,
  .cde-mode-links.cd-glass--rimless,.cde-quiz h2,.cde-option
){
  background:
    radial-gradient(ellipse 38% 18% at 28% 0%,
      color-mix(in srgb,#ffffff calc(var(--cd-preview-sheen,.70) * 30%),transparent),
      transparent 100%),
    linear-gradient(120deg,
      color-mix(in srgb,var(--cd-prev-deep) var(--cd-preview-fill,70%),transparent),
      color-mix(in srgb,var(--cd-prev-mid) var(--cd-preview-fill,70%),transparent) 53%,
      color-mix(in srgb,var(--cd-prev-warm) var(--cd-preview-fill,70%),transparent))!important;
}
body.cdh-dark[data-route="home-preview"] .cde-cta{
  position:relative;z-index:5;pointer-events:auto!important;
}
@media(prefers-reduced-transparency:reduce){
 body.cdh-dark[data-route="home-preview"] :is(.site-header,.site-footer,.cd-home-compare,.cde-preview.cd-glass--framed,.cde-live-availability.cd-glass--rimless,.cde-mode-links.cd-glass--rimless,.cde-quiz h2,.cde-option){background:#252444!important}
}

/* v5: CTA is also a glass surface and follows every preview control. */
body.cdh-dark[data-route="home-preview"] .cde-cta{
  border:1px solid color-mix(in srgb,var(--cd-prev-light) 75%,#f85aa8)!important;
  background:
    radial-gradient(ellipse 70% 23% at 30% 0%,
      color-mix(in srgb,#fff calc(var(--cd-preview-sheen,.70) * 36%),transparent),transparent 100%),
    linear-gradient(112deg,
      color-mix(in srgb,var(--cd-prev-warm) var(--cd-preview-fill,70%),transparent),
      color-mix(in srgb,var(--cd-prev-mid) var(--cd-preview-fill,70%),transparent) 65%,
      color-mix(in srgb,var(--cd-prev-deep) var(--cd-preview-fill,70%),transparent))!important;
  -webkit-backdrop-filter:blur(var(--cd-preview-blur,20px)) saturate(160%)!important;
  backdrop-filter:blur(var(--cd-preview-blur,20px)) saturate(160%)!important;
  box-shadow:inset 0 1px color-mix(in srgb,#fff calc(var(--cd-preview-sheen,.70) * 42%),transparent),
    0 10px 27px var(--cd-prev-glow)!important;
  color:#fff!important;
}
body.cdh-dark[data-route="home-preview"] .cde-cta:hover{
  border-color:rgba(255,197,225,.88)!important;
  filter:brightness(1.16);
  transform:translateY(-2px);
}
@media(prefers-reduced-transparency:reduce){
  body.cdh-dark[data-route="home-preview"] .cde-cta{
    background:#793669!important;-webkit-backdrop-filter:none!important;backdrop-filter:none!important;
  }
}

/* v6 — 1:1 laboratory material recipes applied by the constructor. */
body.cdh-dark[data-route="home-preview"]{
  --cd-lab-fill:.70;--cd-lab-sheen:.70;--cd-lab-accent:255 102 166;
}
body.cdh-dark[data-route="home-preview"][data-preview-tint="blue"]{--cd-lab-accent:103 164 255}
body.cdh-dark[data-route="home-preview"][data-preview-tint="violet"]{--cd-lab-accent:184 126 255}
html:root body.cdh-dark[data-view="home"][data-route="home-preview"] [data-preview-glass]{
  -webkit-backdrop-filter:blur(var(--cd-preview-blur,20px)) saturate(140%)!important;
  backdrop-filter:blur(var(--cd-preview-blur,20px)) saturate(140%)!important;
  background:
    radial-gradient(ellipse 68% 20% at 32% 0%,rgb(255 255 255 / calc(var(--cd-lab-sheen) * .26)),transparent 100%),
    linear-gradient(129deg,rgb(21 22 48 / var(--cd-lab-fill)),rgb(var(--cd-lab-accent) / .12))!important;
  box-shadow:inset 0 1px rgba(255,255,255,.18),0 16px 38px rgba(6,8,28,.20)!important;
}
html:root body.cdh-dark[data-view="home"][data-route="home-preview"] [data-preview-glass="deep"]{
  background:
    radial-gradient(ellipse 68% 20% at 32% 0%,rgb(255 255 255 / calc(var(--cd-lab-sheen) * .26)),transparent 100%),
    linear-gradient(135deg,rgb(10 14 34 / .84),rgb(39 25 54 / var(--cd-lab-fill)))!important;
}
html:root body.cdh-dark[data-view="home"][data-route="home-preview"] [data-preview-glass="pink"]{
  background:
    radial-gradient(ellipse 68% 20% at 32% 0%,rgb(255 255 255 / calc(var(--cd-lab-sheen) * .26)),transparent 100%),
    linear-gradient(128deg,rgb(88 26 74 / var(--cd-lab-fill)),rgb(242 65 145 / .18))!important;
}
html:root body.cdh-dark[data-view="home"][data-route="home-preview"] [data-preview-glass="frost"]{
  background:
    radial-gradient(ellipse 68% 20% at 32% 0%,rgb(255 255 255 / calc(var(--cd-lab-sheen) * .26)),transparent 100%),
    linear-gradient(130deg,rgb(231 216 255 / .19),rgb(86 72 121 / var(--cd-lab-fill)))!important;
}
html:root body.cdh-dark[data-view="home"][data-route="home-preview"] [data-preview-glass="overlay"]{
  background:
    radial-gradient(ellipse 68% 20% at 32% 0%,rgb(255 255 255 / calc(var(--cd-lab-sheen) * .26)),transparent 100%),
    rgb(10 11 35 / .26)!important;
}
html:root body.cdh-dark[data-view="home"][data-route="home-preview"] [data-preview-glass="active"]{
  border-color:rgb(var(--cd-lab-accent) / .78)!important;
  box-shadow:inset 0 1px rgba(255,255,255,.23),0 0 23px rgb(var(--cd-lab-accent) / .16)!important;
}
html:root body.cdh-dark[data-view="home"][data-route="home-preview"] [data-preview-glass="interactive"]:is(:hover,:focus-visible){
  background:rgb(var(--cd-lab-accent) / .25)!important;
  box-shadow:inset 0 1px rgba(255,255,255,.3),0 0 24px rgb(var(--cd-lab-accent) / .15)!important;
}
html:root body.cdh-dark[data-view="home"][data-route="home-preview"] [data-preview-glass]::before{
  opacity:var(--cd-lab-sheen)!important;
}
body.cdh-dark[data-route="home-preview"] .cd-home-builder{
  margin-top:18px;border-top:1px solid rgba(233,209,252,.17);padding-top:14px;
}
body.cdh-dark[data-route="home-preview"] .cd-home-builder-heading{display:flex;flex-wrap:wrap;align-items:baseline;gap:12px;margin-bottom:12px}
body.cdh-dark[data-route="home-preview"] .cd-home-builder-heading strong{font-size:15px;color:#ffe3f4}
body.cdh-dark[data-route="home-preview"] .cd-home-builder-heading small{color:#d1bcd9}
body.cdh-dark[data-route="home-preview"] .cd-home-builder-grid{display:grid;grid-template-columns:repeat(5,minmax(150px,1fr));gap:12px}
body.cdh-dark[data-route="home-preview"] .cd-home-builder-grid label{display:grid;gap:6px;font-size:12px;font-weight:750;color:#e8d8ef}
body.cdh-dark[data-route="home-preview"] .cd-home-builder-grid select{
  min-height:36px;width:100%;background:#25203f;border:1px solid rgba(223,184,248,.35);
  color:#fff;border-radius:9px;padding:7px 9px;font-size:12px;
}
body.cdh-dark[data-route="home-preview"] .cd-home-builder-grid .cd-prev-all select{border-color:rgba(255,121,189,.68);background:#3a224c}
@media(max-width:950px){body.cdh-dark[data-route="home-preview"] .cd-home-builder-grid{grid-template-columns:repeat(3,minmax(0,1fr))}}
@media(max-width:560px){body.cdh-dark[data-route="home-preview"] .cd-home-builder-grid{grid-template-columns:repeat(2,minmax(0,1fr))}}

/* Constructor feedback: states have a visible resting appearance too. */
html:root body.cdh-dark[data-view="home"][data-route="home-preview"] [data-preview-glass="interactive"]{
  background:
    radial-gradient(ellipse 68% 20% at 32% 0%,rgb(255 255 255 / calc(var(--cd-lab-sheen) * .26)),transparent 100%),
    linear-gradient(129deg,rgb(32 26 70 / var(--cd-lab-fill)),rgb(var(--cd-lab-accent) / .28))!important;
  border-color:rgb(var(--cd-lab-accent) / .47)!important;
}
html:root body.cdh-dark[data-view="home"][data-route="home-preview"] [data-preview-glass="active"]{
  background:
    radial-gradient(ellipse 68% 20% at 32% 0%,rgb(255 255 255 / calc(var(--cd-lab-sheen) * .26)),transparent 100%),
    linear-gradient(129deg,rgb(48 24 75 / var(--cd-lab-fill)),rgb(var(--cd-lab-accent) / .32))!important;
}

/* v8 — optional frame independent of the selected lab material. */
html:root body.cdh-dark[data-view="home"][data-route="home-preview"] [data-preview-frame="framed"]{
  border:1px solid rgba(247,194,226,.48)!important;
  outline:1px solid rgba(243,197,246,.13);
  outline-offset:-3px;
}
html:root body.cdh-dark[data-view="home"][data-route="home-preview"] [data-preview-frame="rimless"]{
  border-color:transparent!important;
  outline:none!important;
}
body.cdh-dark[data-route="home-preview"] .cd-home-builder-item{
  display:grid;grid-template-columns:repeat(2,minmax(0,1fr));column-gap:9px;row-gap:8px;
  padding:10px;border-radius:12px;background:rgba(21,23,53,.30);
  border:1px solid rgba(244,200,247,.13);
}
body.cdh-dark[data-route="home-preview"] .cd-home-builder-item>strong{grid-column:1/-1;font-size:12px;color:#ffcee5}
body.cdh-dark[data-route="home-preview"] .cd-home-builder-item label{min-width:0}
body.cdh-dark[data-route="home-preview"] .cd-home-builder-item select{min-width:0}
body.cdh-dark[data-route="home-preview"] .cd-home-builder-grid{grid-template-columns:repeat(3,minmax(0,1fr))}
body.cdh-dark[data-route="home-preview"] .cd-home-builder-grid>.cd-prev-all{align-self:end}
@media(max-width:850px){body.cdh-dark[data-route="home-preview"] .cd-home-builder-grid{grid-template-columns:repeat(2,minmax(0,1fr))}}
@media(max-width:520px){body.cdh-dark[data-route="home-preview"] .cd-home-builder-grid{grid-template-columns:1fr}}
