/* Shared close states for all site and configurator dialogs. */
dialog :is(.drawer-head button[data-close],.rm-viewer-head button[data-rm-close],.custom-process-close button,.cart-heading button[data-cart-close],.summary-heading button[data-action="close-summary"],.dialog-head button[data-action^="close-"]):is(:hover,:active){background:#000!important;color:#fff!important;border-color:#000!important}

/* One compact fill rectangle; prevent inherited 44px button minimums. */
dialog :is(.drawer-head button[data-close],.rm-viewer-head button[data-rm-close],.custom-process-close button,.cart-heading button[data-cart-close],.summary-heading button[data-action="close-summary"],.dialog-head button[data-action^="close-"]){box-sizing:border-box!important;display:inline-flex!important;align-items:center!important;justify-content:center!important;flex:0 0 46px!important;width:46px!important;min-width:46px!important;max-width:46px!important;height:22px!important;min-height:22px!important;max-height:22px!important;padding:0!important;border:0!important;border-radius:0!important;font-size:12px!important;font-weight:400!important;line-height:22px!important;white-space:nowrap!important;text-align:center!important}

/* Close controls use their compact fill, never an oversized focus rectangle. */
dialog :is(.drawer-head button[data-close],.rm-viewer-head button[data-rm-close],.custom-process-close button,.cart-heading button[data-cart-close],.summary-heading button[data-action="close-summary"],.dialog-head button[data-action^="close-"]):focus{outline:none!important;box-shadow:none!important}
dialog :is(.custom-process-download,.formal-spec-pdf,.panel-spec-file,.guide-file,.installation-file a):focus{outline:none!important;box-shadow:none!important}
/* One mobile sheet origin, independent of the product resource type. */
@media(max-width:800px){
 :is(#drawer,#photo-viewer,#resource-viewer,dialog.custom-process-dialog,dialog.uxen-cart,.formal-studio .configuration-summary[open]){position:fixed!important;inset:0!important;margin:0!important;width:100vw!important;max-width:100vw!important;height:100dvh!important;max-height:100dvh!important;border:0!important;border-radius:0!important}
 #drawer{padding:0;overflow:hidden}
 #drawer .drawer-head{height:56px;min-height:56px;margin:0;padding:0 12px}
 #drawer:not([data-product-overlay=panel-spec]) #drawer-content{height:calc(100% - 56px);overflow:auto;padding:0;overscroll-behavior:contain}
 #drawer[data-product-overlay=panel-spec] #drawer-content{height:100%}
 .custom-process-dialog .custom-process-body{height:100%}
}
/* Match the softly ended section separators in the five-hole specification. */
:is(.formal-interface-spec,.formal-material-overlay,.formal-product-resources,.formal-interface-install,.formal-interface-material,.formal-mount-install,.formal-trim-material,.formal-tool-guide){background:#c7c7c7;gap:2px}
#drawer :is(.formal-interface-spec,.formal-material-overlay,.formal-product-resources,.formal-interface-install,.formal-interface-material,.formal-mount-install,.formal-trim-material,.formal-tool-guide)>section{background:#fff;border-top:0;margin-top:0;border-radius:4px}
.custom-process-step{position:relative;border-top:0;border-radius:4px}
.custom-process-step::before{content:"";position:absolute;top:0;left:0;right:0;height:2px;border-radius:1px;background:#c7c7c7}

/* Use the specification's rounded white section edges, including guides. */
.custom-process-body{background:#c7c7c7}
.custom-process-body>header,.custom-process-intro{background:#fff}
.custom-process-body .custom-process-step{margin-top:2px;border:0;border-radius:4px;background:#fff}
.custom-process-body .custom-process-step::before{content:none}
/* Rounded ends on existing table/cart rules without changing their spacing. */
dialog :is(.cart-product,.formal-panel-spec dl>div,.formal-interface-spec dl>div){position:relative;border-bottom-color:transparent}
dialog :is(.cart-product,.formal-panel-spec dl>div,.formal-interface-spec dl>div)::after{content:"";position:absolute;left:0;right:0;bottom:-1px;height:1px;background:#d4d4d4;border-radius:1px;pointer-events:none}
dialog :is(.formal-panel-spec dl>div,.formal-interface-spec dl>div):last-child::after{content:none}
@media(max-width:800px){
 #photo-viewer{padding:0;overflow:hidden}
 #photo-viewer .drawer-head,.rm-viewer-head{box-sizing:border-box;height:56px;min-height:56px;margin:0;padding:0 12px;display:flex;align-items:center;justify-content:space-between}
 #photo-content,#rm-viewer-content{box-sizing:border-box;height:calc(100% - 56px);overflow:auto;padding:12px;overscroll-behavior:contain}
}
/* Shared sheet headings and download cards retain one type scale. */
body dialog[open] :is(.drawer-head h2,.panel-spec-title,.cart-heading h2,.summary-heading h2,.custom-process-body>header h2,.rm-viewer-head h2){font-size:12px!important;line-height:20px!important}
#drawer.formal-resource-drawer .panel-spec-title{font-size:12px}
dialog .guide-file{box-sizing:border-box;width:190px;max-width:100%;height:40px;min-height:40px;font-size:max(10px,var(--uxen-copy-min,0px));line-height:12px}

/* Approved sitewide Latin typeface, both viewports. Chinese and Abhaya brand spans retain their fonts. */
@font-face{font-family:"UXEN";src:url("fonts/space-grotesk-variable.woff2") format("woff2");font-style:normal;font-weight:300 700;font-display:swap;unicode-range:U+0000-024F}
@font-face{font-family:"Noto Sans SC";src:url("fonts/space-grotesk-variable.woff2") format("woff2");font-style:normal;font-weight:300 700;font-display:swap;unicode-range:U+0000-024F}

/* User-approved ZETR role scale, 2026-11-19. Typography only. */
html body:is([data-page],.formal-studio){--uxen-copy-min:0px;font-size:14px;line-height:1.2;font-weight:400}
html body:is([data-page],.formal-studio) :is(p,li,dt,dd,blockquote){font-size:14px!important;line-height:1.2!important;font-weight:400!important}
html body:is([data-page],.formal-studio) h1{font-size:20px!important;line-height:1!important;font-weight:700!important}
html body:is([data-page],.formal-studio) :is(h2,h3){font-size:14px!important;line-height:1!important;font-weight:700!important}
html body:is([data-page],.formal-studio) :is(h4,h5,legend){font-size:12px!important;line-height:1.4!important;font-weight:700!important}
html body:is([data-page],.formal-studio) :is(button,input,select,textarea,.button,.option,.text-link,.stepper,.price-row,.card-caption,.card-caption p,.card-caption h2){font-size:12px!important;line-height:1!important;font-weight:400!important}
html body:is([data-page],.formal-studio) :is(.product-name p,.subtle,small,.phase-counter,.preview-selection,.engineering-note,.preview-caption,.preview-selection strong,.field-caption,.quantity-row label,.resource-list h2){font-size:12px!important;line-height:1.4!important}
html body[data-page=product] .product-name h1{font-size:20px!important;line-height:1!important;font-weight:700!important}
html body[data-page=product] .product-information>div:first-child>p{font-size:16px!important;line-height:1.2!important;font-weight:400!important}
html body[data-page=product] .quantity-row label{font-weight:700!important}
html body:is([data-page],.formal-studio) :is(.spec-table,.spec-table p,.spec-table dt,.spec-table dd){font-size:12px!important;line-height:1.2!important;font-weight:400!important}
html body[data-page=index] .home-intro h2{font-size:20px!important;line-height:1!important;font-weight:700!important}
html body[data-page=index] :is(.home-intro p,.home-intro .intro-line){font-size:14px!important;line-height:1.2!important;font-weight:400!important}
html body[data-page=index] .home-design-copy p{font-size:24px!important;line-height:1.29!important;font-weight:400!important}
html body[data-page=index] :is(.official-hero-labels,.official-hero-labels a,.hero-caption,.hero-year,.material-label){font-size:12px!important;line-height:1!important;font-weight:400!important}
html body:is([data-page],.formal-studio) :is(#header #navigation a,#header .menu-toggle,#header .mobile-menu a){font-size:var(--uxen-nav-font-size,12px)!important;line-height:1!important;font-weight:400!important}
html body:is([data-page],.formal-studio) :is(#footer,#footer p,#footer a,#footer span,#footer h2,.page-footer,.page-footer p,.page-footer a){font-size:12px!important;line-height:1!important;font-weight:400!important}
/* Configurator follows product selection roles; preview notes remain auxiliary. */
html body.formal-studio :is(.control-section h2,.control-section h3){font-size:12px!important;line-height:1.4!important;font-weight:700!important}
html body.formal-studio :is(.section-content p,.preview-selection,.engineering-note,.preview-caption,.preview-selection p,.preview-selection strong,.engineering-note p){font-size:12px!important;line-height:1.2!important;font-weight:400!important}
html body.formal-studio .page-heading h1{font-size:20px!important;line-height:1!important;font-weight:700!important}
/* Sheets: 12px section labels and data, 14px subheads and explanatory prose. */
html body:is([data-page],.formal-studio) :is(dialog,#drawer,#configuration-summary,#cart-dialog){font-size:14px!important;line-height:1.2!important;font-weight:400!important}
html body:is([data-page],.formal-studio) :is(dialog,#drawer,#configuration-summary,#cart-dialog) :is(p,li){font-size:14px!important;line-height:1.2!important;font-weight:400!important}
html body:is([data-page],.formal-studio) :is(dialog,#drawer,#configuration-summary,#cart-dialog) :is(h2,h3,h4){font-size:14px!important;line-height:1!important;font-weight:700!important}
html body:is([data-page],.formal-studio) :is(dialog,#drawer,#configuration-summary,#cart-dialog) :is(.drawer-head h2,.panel-spec-title,.cart-heading h2,.summary-heading h2,.custom-process-body>header h2,.rm-viewer-head h2,.dialog-head h2){font-size:12px!important;line-height:1.4!important;font-weight:700!important}
html body:is([data-page],.formal-studio) :is(dialog,#drawer,#configuration-summary,#cart-dialog) :is(dl,dt,dd,th,td,.guide-file,.guide-file span,.pdf-link,.pdf-link span,.download-link,.download-link span,.cart-unit,.cart-total,.cart-total span){font-size:12px!important;line-height:1.2!important;font-weight:400!important}
html body:is([data-page],.formal-studio) :is(dialog,#drawer,#configuration-summary,#cart-dialog) :is(button,input,select,textarea){font-size:12px!important;line-height:1!important;font-weight:400!important}
html body:is([data-page],.formal-studio) :is(dialog,#drawer,#configuration-summary,#cart-dialog) :is(.custom-process-step h3,.custom-process-step h2){font-size:12px!important;line-height:1.4!important;font-weight:700!important}
/* Preserve custom UXEN wordmark typography, including its established weights. */
@media(max-width:800px){
 html body[data-page=index] .home-intro h2{font-size:16px!important;line-height:1.2!important}
 html body[data-page=index] .home-design-copy p{font-size:18px!important;line-height:1.29!important}
}

html body:is([data-page],.formal-studio) :is(dialog,#drawer,#configuration-summary,#cart-dialog) :is(.formal-interface-spec>section>h3:first-child,.formal-panel-spec>section>h3:first-child){font-size:12px!important;line-height:1.4!important;font-weight:700!important}

html body:is([data-page],.formal-studio) :is(dialog,#drawer,#configuration-summary,#cart-dialog) :is(.installation-file,.installation-file a,.installation-file span,.spec-files-heading,.formal-product-resources h3,.formal-product-resources h4){font-size:12px!important;line-height:1.2!important}

html body[data-page=products] #main h1{font-size:20px!important;line-height:1!important;font-weight:700!important}
html body[data-page=about] #main :is(.about-prose h2,.about-patents h3){font-size:14px!important;line-height:1!important;font-weight:700!important}

/* DESIGN refinement: smaller and light on both desktop and mobile. */
html body.formal-studio .page-heading h1{font-size:18px!important;line-height:1.2!important;font-weight:300!important}

/* Five-hole mobile typography preview: Space Grotesk Latin + Noto Sans SC Chinese. */
@media(max-width:800px){
 html body[data-page="product"][data-product-id="fivehole"] #main{font-family:"Noto Sans SC",sans-serif}
 html body[data-page="product"][data-product-id="fivehole"] #main :is(h1,h2,h3,h4,h5,legend){font-family:"Noto Sans SC",sans-serif!important;font-weight:500!important}
 html body[data-page="product"][data-product-id="fivehole"] #main :is(p,li,dt,dd,button,label,input,select){font-family:"Noto Sans SC",sans-serif!important;font-weight:400!important}
}

/* Approved site-wide language pairing; retain existing sizes and weights. */
@font-face{font-family:"UXEN Space Grotesk";src:url("fonts/space-grotesk-variable.woff2") format("woff2");font-style:normal;font-weight:300 700;font-display:swap;unicode-range:U+0000-024F}
html body:is([data-page],.formal-studio),html body:is([data-page],.formal-studio) *{font-family:"UXEN Space Grotesk","Noto Sans SC",sans-serif!important}

/* Restore the approved special UXEN wordmarks without changing sizes. */
html body:is([data-page],.formal-studio) :is(.home-intro strong,.home-design-copy strong,.about-body-brand,.about-inline-brand,.about-direction>span){font-family:"Abhaya Libre",serif!important}

/* About nested prose inherits the same body size at every section. */
html body[data-page=about] #main .about-body-text{font-size:inherit!important;line-height:inherit!important;font-weight:inherit!important}
/* Compact colour indicators, centred independently of text line height. */
html body[data-page=product] .option:has(input[name=color])::before{width:10px;height:10px;top:50%;transform:translateY(-50%);box-sizing:border-box}
html body[data-page=product] .option:has(input[name=color]){padding-left:20px}
html body[data-product-id=faceplate] .option:has(input[name=color])>span:first-of-type::before{width:10px;height:10px;box-sizing:border-box}
html body.formal-studio .panel-dot{width:10px;height:10px;box-sizing:border-box}

/* Plain white colour indicators without a grey ring. */
html body[data-page=product] .option:has(input[name=color][value=white])::before,html body[data-product-id=faceplate] .option:has(input[name=color][value=white])>span:first-of-type::before{border:0;box-shadow:none;background:#fff}
html body.formal-studio [data-action=panel][data-value=white] .panel-dot{border:0;box-shadow:none}
/* About body UXEN wordmarks: slightly larger; keep the restored brand face. */
html body[data-page=about] #main :is(.about-body-brand,.about-inline-brand){font-size:16px!important}
@media(max-width:760px){html body[data-page=about] #main .about-body-brand{font-size:18px!important}}

/* Warranty copy and table cells share the site's 14px body role. */
html body[data-page] .policy-warranty :is(p,h2,h3,th,td){font-size:14px!important;line-height:1.2!important}
html body[data-page] .policy-warranty .policy-eyebrow{font-size:12px!important;line-height:1.2!important}

/* Approved configurator typography: consistent 12px copy on both devices. */
html body.formal-studio :is(p,span,strong,b,small,label,legend,output,input,select,textarea,button,a,summary,h2,h3,h4,h5,h6,li,dt,dd,th,td,.phase-counter){font-size:12px!important}
html body.formal-studio :is(.preview-selection,.preview-selection span,.preview-caption,.preview-caption p,.engineering-note){font-size:12px!important;line-height:1.2!important}
html body.formal-studio .page-heading h1{font-size:18px!important;font-weight:300!important}

html body.formal-studio :is(dialog,#drawer,#configuration-summary,#cart-dialog) :is(p,span,strong,small,label,output,input,button,a,h2,h3,h4,li,dt,dd,th,td){font-size:12px!important}

/* Approved shared file cards in overlays. */
html body :is(dialog,#drawer,#configuration-summary,#cart-dialog) .installation-file{box-sizing:border-box;display:grid!important;grid-template-columns:14px minmax(0,1fr) auto 14px!important;align-items:center!important;width:fit-content!important;max-width:100%!important;min-height:40px!important;height:auto!important;gap:8px!important;padding:10px!important;background:#f2f2f2!important;border:0!important;border-radius:2px!important;color:#555}
html body :is(dialog,#drawer,#configuration-summary,#cart-dialog) .installation-file :is(a,span){min-width:0;white-space:normal!important;line-height:1.5!important}
html body :is(dialog,#drawer,#configuration-summary,#cart-dialog) .installation-file .installation-file-meta{white-space:nowrap!important}
html body :is(dialog,#drawer,#configuration-summary,#cart-dialog) .installation-file>a:last-child{min-height:0!important;padding:0!important;display:flex;align-items:center;justify-content:center}
html body :is(dialog,#drawer,#configuration-summary,#cart-dialog) .installation-file svg{width:14px!important;height:14px!important}

html body dialog :is(.custom-process-download,.panel-spec-file,.formal-spec-pdf){box-sizing:border-box;display:grid!important;grid-template-columns:14px minmax(0,1fr) auto 14px!important;align-items:center!important;width:fit-content!important;max-width:100%!important;height:auto!important;min-height:40px!important;padding:10px!important;gap:8px!important;border:0!important;border-radius:2px!important;background:#f2f2f2!important;color:#555!important}
html body dialog :is(.custom-process-download,.panel-spec-file,.formal-spec-pdf)>span{width:auto!important;min-width:0;line-height:1.5!important}
html body dialog :is(.custom-process-download,.panel-spec-file,.formal-spec-pdf)>svg{width:14px!important;height:14px!important}

/* Video viewers use the same neutral close fill as the five-hole specification. */
dialog .rm-viewer-head button[data-rm-close]{background:transparent!important;color:#000!important}
dialog .rm-viewer-head button[data-rm-close]:is(:hover,:active){background:#000!important;color:#fff!important}

/* User: cart follows the approved specification-sheet type roles on both devices. */
html body:is([data-page],.formal-studio) dialog.uxen-cart :is(.cart-enquiry-field,.cart-enquiry-consent,.cart-enquiry-status,.cart-enquiry-intro h3,.cart-product-info h3){font-size:12px!important;line-height:1.4!important}
html body:is([data-page],.formal-studio) dialog.uxen-cart :is(input,textarea,select):is(:focus,:focus-visible){outline:none;box-shadow:none}

/* Approved cart/summary overlay scrim and specification-matched rounded rules. */
html body dialog:is(.uxen-cart,#configuration-summary)::backdrop{background:rgba(0,0,0,.35);backdrop-filter:blur(10px);-webkit-backdrop-filter:blur(10px)}
dialog:is(.uxen-cart,#configuration-summary) .cart-product{position:relative;border-bottom-color:transparent!important}
dialog:is(.uxen-cart,#configuration-summary) .cart-product::after{content:"";position:absolute;left:0;right:0;bottom:-1px;height:1px;background:#d4d4d4;border-radius:1px;pointer-events:none}
#configuration-summary :is(.summary-saved-configuration,#summary-grand-total){position:relative;border-top-color:transparent}
#configuration-summary :is(.summary-saved-configuration,#summary-grand-total)::before{content:"";position:absolute;left:0;right:0;top:-1px;height:1px;background:#d4d4d4;border-radius:1px;pointer-events:none}

/* True round-ended vector rule, with no underlying square border visible. */
dialog:is(.uxen-cart,#configuration-summary) .cart-product::after,
#configuration-summary :is(.summary-saved-configuration,#summary-grand-total)::before{background-color:transparent;background-image:url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='100%25' height='1'%3E%3Crect width='100%25' height='1' rx='0.5' fill='%23d4d4d4'/%3E%3C/svg%3E");background-size:100% 100%;background-repeat:no-repeat}

/* Approved independent product sections: white rounded blocks on a gray seam.
   Paint only; preserve the existing row boxes, spacing and content positions. */
dialog:is(.uxen-cart,#configuration-summary) .cart-product{isolation:isolate;background:#c7c7c7;box-shadow:12px 0 #c7c7c7,-12px 0 #c7c7c7}
dialog:is(.uxen-cart,#configuration-summary) .cart-product::before{content:"";position:absolute;inset:0 -12px 1px;z-index:-1;background:#fff;border-radius:4px;pointer-events:none}
dialog:is(.uxen-cart,#configuration-summary) .cart-product::after{content:none}

/* Match the existing specification heading: transparent header on a white sheet. */
html body dialog:is(.uxen-cart,#configuration-summary){background:#fff}
html body dialog:is(.uxen-cart,#configuration-summary)>:is(.cart-heading,.summary-heading){background:transparent;height:56px;min-height:56px;margin:0;padding:0 24px;display:flex;align-items:center;justify-content:space-between}
@media(max-width:800px){html body dialog:is(.uxen-cart,#configuration-summary)>:is(.cart-heading,.summary-heading){padding:0 12px}}

/* Saved scenes retain their spacing without an extra heading divider. */
#configuration-summary .summary-saved-configuration::before{content:none!important}

/* Enlarge only isolated thumbnail content; keep the original layout boxes. */
dialog:is(.uxen-cart,#configuration-summary) .cart-product-info img[src*="product-presentation/"]{transform:scale(2);clip-path:inset(25%)}

/* Stone tool thumbnail body matches the wood tool width; frame stays unchanged. */
dialog:is(.uxen-cart,#configuration-summary) .cart-product-info img[src*="product-presentation/2-69-img6.webp"]{transform:scale(1.2);clip-path:inset(8.333333%)}

/* Mobile native sheets: opaque coverage and safe content inside the viewport.
   Prompts and the nonmodal navigation dropdown retain their original geometry. */
@media(max-width:800px){
 html body :is(#drawer,#photo-viewer,#resource-viewer,dialog.custom-process-dialog,#configuration-summary){
  background-color:#fff;box-sizing:border-box;
  --uxen-mobile-safe-top:env(safe-area-inset-top,0px);
  padding-top:var(--uxen-mobile-safe-top)!important;
  padding-bottom:env(safe-area-inset-bottom,0px)!important;
  overscroll-behavior:contain;
 }
}

@media(max-width:800px){
 #drawer[data-product-overlay=panel-spec] .drawer-head,
 dialog.custom-process-dialog .custom-process-close{top:var(--uxen-mobile-safe-top,env(safe-area-inset-top,0px))}
}
