/* Shared semantic palette. Brand identity is supplied through accent tokens. */
:root{color-scheme:light;--surface:#ffffff;--surface-raised:#f7f9fb;--surface-soft:#edf2f7;--canvas:#f1f4f7;--text:#1d3042;--secondary:#516478;--border:#d9e1e8;--control-border:#788b9d;--divider:#e1e7ee;--accent:#245a83;--accent-text:#ffffff;--accent-soft:#e6f0f8;--link:#245a83;--focus:#2b77ad;--warning-bg:#fff2d8;--warning-text:#79521a;--green:var(--accent);--lime:var(--accent);--ink:var(--text);--muted:var(--secondary);--paper:var(--surface);--line:var(--border)}
:root[data-theme=dark]{color-scheme:dark;--surface:#20323f;--surface-raised:#253a48;--surface-soft:#2c4556;--canvas:#172630;--text:#f0f5f8;--secondary:#b7c7d2;--border:#354f61;--control-border:#6c879b;--divider:#2e4758;--accent:#9bc8e7;--accent-text:#142c3e;--accent-soft:#2d4d65;--link:#aed5ef;--focus:#acd4f2;--warning-bg:#463c2b;--warning-text:#efcc8e}
html body{background:var(--canvas)!important;color:var(--text)!important}
html :is(#catalogControls,#catalogSidebar,#productPage,#modal,#toriDialog,footer,#ttWelcome,#catalogPage .resultshead,.productcard,.web-product-tabs,.web-tab-panel,.quick-table-scroll,.tablewrap){background:var(--surface)!important;color:var(--text)!important;border-color:var(--border)!important;box-shadow:none}
html :is(#productPage .product-visual,#productPage .product-purchase,#productPage .product-summary,#productPage .web-tab-nav,#columnChoices,.display-options-content,.tori-head,.tori-foot,.tori-prompts button,.tori-answer,#ttWelcome .tt-welcome-copy,#ttWelcome .tt-discover,#ttWelcome #catalogBanner){background:var(--surface-raised)!important;color:var(--text)!important;border-color:var(--border)!important}
html :is(#catalogControls,#catalogPage,#productPage,#toriDialog,#modal,footer,#ttWelcome) :is(h1,h2,h3,h4,b,strong,dt,dd,label,summary){color:var(--text)!important}
html :is(#catalogControls,#catalogPage,#productPage,#toriDialog,#modal,footer,#ttWelcome) :is(p,small,.sub,.tori-brand,.tori-source,.tt-kicker,.tt-discover-heading,.brand-cell,.model-description){color:var(--secondary)!important}
html :is(#catalogControls,#catalogPage,#productPage,#toriDialog,#modal,footer,#ttWelcome) :is(button,input,select,textarea){background:var(--surface)!important;color:var(--text)!important;border-color:var(--border)!important;box-shadow:none}
html :is(#catalogControls,#catalogPage,#productPage,#toriDialog,#modal,footer,#ttWelcome) :is(button:hover,summary:hover){background:var(--surface-soft)!important;color:var(--text)!important}
html :is(#catalogControls,#catalogPage,#productPage,#toriDialog,#modal) :is(.solid,[aria-pressed=true],button.active,.tori-all,#toriForm button){background:var(--accent)!important;color:var(--accent-text)!important;border-color:var(--accent)!important}
html #catalogSidebar :is(.selected,[aria-pressed=true]),html #catalogTable .model-cell button{background:var(--accent-soft)!important;color:var(--text)!important}
html :is(#catalogTable,.quick-table-scroll table) :is(th,thead td){background:var(--surface-soft)!important;color:var(--text)!important;border-color:var(--border)!important}
html :is(#catalogTable,.quick-table-scroll table) td{background:var(--surface)!important;color:var(--text)!important;border-color:var(--border)!important}
html :is(#catalogTable,.quick-table-scroll table) tr:nth-child(even) td{background:var(--surface-raised)!important}
html #catalogTable tbody tr:hover td{background:var(--accent-soft)!important}
html :is(#catalogPage,#productPage,#modal,#ttWelcome,#toriDialog) :is(.pill,.tori-criteria span,#activeFilters button){background:var(--accent-soft)!important;color:var(--text)!important;border-color:var(--border)!important}
html :is(#catalogPage,#productPage,#modal) :is(.pending,.pending-label,.status-pending){background:var(--warning-bg)!important;color:var(--warning-text)!important}
html :is(#productPage,#catalogPage,#toriDialog,#modal,footer) a{color:var(--accent)!important}
html :is(input,textarea)::placeholder{color:var(--secondary)!important;opacity:1}
html :focus-visible{outline:3px solid var(--focus)!important;outline-offset:3px}
html #catalogControls .logo small{color:var(--secondary)!important}
html #catalogControls .logo img{background:#edf1f5;border-radius:6px;padding:4px}
html #ttWelcome .tt-welcome-copy::after{display:none}
html #ttWelcome .tt-help-link,html #ttWelcome .banner-link{color:var(--accent)!important}
html #ttWelcome .tt-help-link{background:transparent!important}
html #productPage :is(dt,dd,.product-toolbar,.catalog-path,.web-tab-panel){border-color:var(--border)!important}
html #productPage #zoomViewport,html :is(.photo-thumbnails button,.photo-thumbnails .photo,#ttWelcome .banner-product>.photo){background:#fff!important;border-color:var(--border)!important}
html .tori-launch{background:var(--accent)!important;color:var(--accent-text)!important;border-color:var(--border)!important}
html .tori-launch :is(small,b,svg){color:var(--accent-text)!important}
html #toriDialog :is(.tori-avatar,svg){color:var(--accent)!important}
html #toriDialog #toriForm button svg{color:var(--accent-text)!important}
#themeSwitch{white-space:nowrap;min-height:36px!important;font-size:12px!important}
html #catalogControls .searchbar{display:flex;flex-wrap:wrap}
html #catalogControls .searchbar .logo{flex:0 0 auto;margin-right:12px}
html #catalogControls #search{flex:1;min-width:160px}
html #catalogControls #brandSelect{max-width:200px}
@media(max-width:650px){html #catalogControls .searchbar .logo{flex:1 0 55%}#themeSwitch{order:0}html #catalogControls #search{flex:1 0 65%;order:1}html #catalogControls #runSearch{order:1}html #catalogControls #brandSelect{order:2;max-width:none;flex:1}html #catalogControls :is(#homeButton,#basketOpen,#toggleFilters){order:3}}
html :is(#productPage,#catalogPage) :is(.catalog-path,.catalog-path span,.catalog-path .current,.breadcrumb,.breadcrumb span){color:var(--secondary)!important}
html[data-theme=dark] #productPage #zoomViewport,html[data-theme=dark] :is(.photo-thumbnails button,.photo-thumbnails .photo,#ttWelcome .banner-product>.photo){background:#fff!important}
html[data-theme=dark] #catalogControls .logo img{filter:brightness(0) invert(.88);background:transparent}
html .tt-discover-heading,html .tt-discover-heading small{color:var(--secondary)!important}
html #catalogPage #categoryTree{background:var(--surface)!important;color:var(--text)!important}
html #catalogSidebar :is(label span,.tree-group-label,.catalog-path){color:var(--secondary)!important}
html #catalogPage #categoryTree button[aria-pressed=true]{background:var(--accent-soft)!important;color:var(--text)!important}
html #catalogPage #categoryTree button[aria-pressed=true] :is(span,small){color:var(--text)!important}
html :is(#catalogControls,#catalogPage,#productPage,#modal) .solid :is(b,small,span){color:var(--accent-text)!important}
html #catalogPage :is(#columnPicker>summary,#displayOptions>summary){background:var(--surface)!important;color:var(--text)!important;border-color:var(--border)!important}
@media(max-width:650px){html #catalogControls #brandSelect{flex:1 0 100%!important;width:100%!important;min-width:100%!important}}

/* Category states apply only to the selected control, never the surrounding tree. */
html #catalogPage #categoryTree :is(summary,button){color:var(--text)!important}
html #catalogPage #categoryTree :is(summary,button) small{color:var(--secondary)!important}
html #catalogPage #categoryTree button[aria-pressed=true]{background:var(--accent-soft)!important;border-left:3px solid var(--accent)!important}
html #catalogPage #categoryTree button[aria-pressed=true] small{color:var(--text)!important}
/* Informative banner: restrained accent, same photo size and palette. */
html #ttWelcome .banner-product{padding:9px 12px!important;border-left:3px solid var(--focus)!important;border-radius:8px;gap:15px}
html #ttWelcome .banner-copy{flex:1;min-width:0}
html #ttWelcome .banner-description{display:-webkit-box;-webkit-line-clamp:2;-webkit-box-orient:vertical;overflow:hidden;white-space:normal;line-height:1.4;max-width:650px;margin:4px 0 8px}
html #ttWelcome .banner-facts{display:flex;flex-wrap:wrap;gap:6px}
html #ttWelcome .banner-fact{display:inline-flex;align-items:baseline;gap:5px;padding:4px 7px;border-radius:5px;background:var(--accent-soft);border:1px solid var(--border);font-size:11px;line-height:1.4}
html #ttWelcome .banner-fact>span{color:var(--secondary)}
html #ttWelcome .banner-fact strong{color:var(--text)!important;font-size:11px;font-weight:700}
@media(max-width:650px){html #ttWelcome .banner-product{padding:8px!important;gap:9px}html #ttWelcome .banner-facts{gap:4px}html #ttWelcome .banner-fact{font-size:10px;padding:3px 5px}html #ttWelcome .banner-fact strong{font-size:10px}html #ttWelcome .banner-description{font-size:11px}}
html #ttWelcome .banner-fact{max-width:100%;flex-wrap:wrap;overflow-wrap:anywhere}
/* Product silhouettes are visible directly in assistant results. */
html #toriDialog .tori-result{display:grid;grid-template-columns:106px minmax(0,1fr);gap:13px;align-items:center;padding:12px}
.tori-product-photo{display:flex;align-items:center;justify-content:center;width:106px;height:116px;border-radius:9px;background:#e5ebef;border:1px solid var(--border);overflow:hidden}
.tori-product-photo img{display:block;width:100%;height:100%;object-fit:contain;padding:7px}
.tori-product-photo>span{color:#506277;font-size:11px;text-align:center;padding:10px}
.tori-product-copy{display:flex;flex-direction:column;align-items:flex-start;gap:5px;min-width:0}
html #toriDialog .tori-format{display:inline-block;background:var(--accent-soft);color:var(--text);border:1px solid var(--border);border-radius:5px;padding:3px 7px;font-size:11px;font-weight:650}
html[data-theme=dark] .tori-product-photo{background:#506575}
html[data-theme=dark] .tori-product-photo>span{color:#edf3f7}
@media(max-width:420px){html #toriDialog .tori-result{grid-template-columns:94px minmax(0,1fr);gap:10px;padding:10px}.tori-product-photo{width:94px;height:110px}}
.selection-editor{width:100%}.selection-editor label{display:block;font-weight:650;margin-bottom:9px}.selection-quantity{display:inline-grid;grid-template-columns:40px 64px 40px;align-items:center;border:1px solid var(--border);border-radius:8px;overflow:hidden;background:var(--surface)}
html #productPage .selection-quantity button,#selectionPanel .selection-quantity button{min-height:40px;padding:5px!important;font-size:20px;border:0!important;border-radius:0;background:var(--surface-soft)!important;color:var(--text)!important;flex:none}
.selection-quantity input{width:100%;min-width:0;text-align:center;border:0!important;border-radius:0;padding:6px!important;background:var(--surface)!important;color:var(--text)!important;font-size:16px;appearance:textfield}.selection-quantity input::-webkit-inner-spin-button{appearance:none}
.selection-hint{margin:10px 0!important;font-size:13px!important;color:var(--text)!important}.selection-editor>small{font-size:11px}
#selectionPanel{position:fixed;z-index:45;right:16px;top:calc(var(--filter-height,90px) + 10px);width:360px;max-width:calc(100vw - 24px);max-height:calc(100dvh - var(--filter-height,90px) - 24px);overflow:auto;background:var(--surface);color:var(--text);border:1px solid var(--border);border-radius:12px;box-shadow:0 12px 40px #10203040}
#selectionPanel[hidden]{display:none}#selectionPanel header{display:flex;justify-content:space-between;align-items:center;padding:15px;background:var(--surface-raised);position:sticky;top:0;border-bottom:1px solid var(--border)}#selectionPanel h2{font-size:18px;margin:0 0 4px}#selectionSummary{font-size:12px;color:var(--secondary)}#selectionPanel button{background:var(--surface);color:var(--text);border:1px solid var(--border);border-radius:6px}#selectionClose{font-size:22px;padding:3px 10px}
#selectionLines article{display:grid;grid-template-columns:58px 1fr;gap:12px;padding:15px;border-bottom:1px solid var(--border)}#selectionLines img{width:58px;height:74px;object-fit:contain;background:var(--surface-soft);border-radius:6px}#selectionLines article>div{grid-column:2}#selectionLines b,#selectionLines small{display:block}#selectionLines small{font-size:10px;color:var(--secondary)}#selectionLines b{font-size:13px;margin:3px 0 9px}#selectionLines p{font-size:12px;line-height:1.5;margin:8px 0;color:var(--text)}#selectionLines progress{width:100%;height:6px;accent-color:var(--focus)}#selectionLines .selection-remove{display:block;border:0;font-size:11px;padding:4px 0;color:var(--secondary)}#selectionPanel footer{padding:13px 15px;border:0;background:var(--surface-raised)!important}#selectionPanel footer p{font-size:11px;color:var(--secondary);margin:4px 0}#selectionReview{width:100%;margin-top:10px;background:var(--accent)!important;color:var(--accent-text)!important;padding:10px}#selectionPanel .selection-empty{padding:20px;font-size:13px}
html #catalogTable .quantity-stepper{background:var(--surface)!important;border-color:var(--border)!important}
/* Quote review is an application screen; print keeps its document layout. */
@media screen{
html #modal.quotation-modal{background:var(--canvas)!important;border-color:var(--border)!important;border-radius:14px}
html #modal.quotation-modal :is(.quote-toolbar,.quote-sheet,.quote-header,.quote-footer,.quote-delivery){background:var(--surface)!important;color:var(--text)!important;border-color:var(--border)!important;box-shadow:none}
html #modal.quotation-modal .quote-toolbar{padding:20px 120px 20px 24px;min-height:92px;align-items:center}
html #modal.quotation-modal .quote-sheet{margin:20px;padding:26px;border-radius:10px}
html #modal.quotation-modal .quote-header{border-bottom:2px solid var(--accent)!important;padding-bottom:20px}
html #modal.quotation-modal :is(.quote-customer,.quote-document-footer,.quote-table-scroll,.quote-summary,.quote-total){border-color:var(--border)!important}
html #modal.quotation-modal :is(.quote-summary,.quote-table th,.quote-brand-heading th){background:var(--surface-soft)!important;color:var(--text)!important}
html #modal.quotation-modal .quote-table td{background:var(--surface)!important;color:var(--text)!important;border-color:var(--border)!important}
html #modal.quotation-modal .quote-table tr:nth-child(even) td{background:var(--surface-raised)!important}
html #modal.quotation-modal :is(.quote-field>span,.quote-section-title>span,.quote-toolbar span,.quote-document-footer,.quote-summary>div){color:var(--secondary)!important}
html #modal.quotation-modal :is(h2,h3,strong,b,label){color:var(--text)!important}
html #modal.quotation-modal :is(.quote-pending,.quote-status){background:var(--warning-bg)!important;color:var(--warning-text)!important;border-color:var(--border)!important}
html #modal.quotation-modal :is(input,textarea){background:var(--surface-raised)!important;color:var(--text)!important;border:1px solid var(--border)!important}
html #modal.quotation-modal .quote-title h2{font-size:23px}
html #modal.quotation-modal .quote-summary{padding:10px 18px}
html #modal.quotation-modal .quote-footer{gap:16px;border-top:1px solid var(--border)!important}
html #modal.quotation-modal .quote-footer button{background:var(--accent)!important;color:var(--accent-text)!important;border-color:var(--accent)!important}
html #modal.quotation-modal .quote-logo img{width:220px;height:auto;max-height:78px}
html[data-theme=dark] #modal.quotation-modal .quote-logo img{filter:brightness(0) invert(.88)}
html #modal.quotation-modal .quote-product .photo{width:62px;height:62px;background:#fff!important;border-color:var(--border)!important}
html dialog.contact-popup{background:var(--surface)!important;color:var(--text)!important;border:1px solid var(--border)}
html dialog.contact-popup :is(input,textarea,button){background:var(--surface-raised)!important;color:var(--text)!important;border-color:var(--border)!important}
html dialog.contact-popup :is(h2,label){color:var(--text)!important}html dialog.contact-popup :is(p,.contact-note){color:var(--secondary)!important}
html dialog.contact-popup .contact-status{background:var(--accent-soft)!important;color:var(--text)!important}
@media(max-width:700px){html #modal.quotation-modal .quote-sheet{margin:10px;padding:16px}html #modal.quotation-modal .quote-toolbar{padding:16px 95px 16px 16px}.quote-fields{grid-template-columns:1fr}.quote-bottom{gap:16px}html #modal.quotation-modal .quote-header{gap:12px}}
}
@media screen{
html #modal.quotation-modal #savedSelections{background:var(--surface)!important;color:var(--text)!important;border:1px solid var(--border)!important;border-radius:10px;margin:20px;padding:20px}
html #modal.quotation-modal #savedSelections :is(h3,label){color:var(--text)!important}
html #modal.quotation-modal #savedSelections p{color:var(--secondary)!important}
html #modal.quotation-modal #savedSelections select{background:var(--surface-raised)!important;color:var(--text)!important;border-color:var(--border)!important}
}
@media screen{html #modal.quotation-modal .quote-delivery-fields select{background:var(--surface-raised)!important;color:var(--text)!important;border-color:var(--border)!important}}

/* One numeric editor across catalog, product, selection and quote. */
@media screen {
 html .number-control,html .selection-quantity,html #catalogTable .quantity-stepper{display:inline-grid;grid-template-columns:36px minmax(48px,1fr) 36px;align-items:stretch;width:136px;max-width:100%;border:1px solid var(--border)!important;border-radius:9px;overflow:hidden;background:var(--surface)!important}
 html .number-control button,html .selection-quantity button,html #catalogTable .quantity-stepper button{min-height:40px;padding:4px!important;border:0!important;border-radius:0!important;background:var(--surface-soft)!important;color:var(--text)!important;font-size:22px;line-height:1;box-shadow:none}
 html .number-control input,html .selection-quantity input,html #catalogTable .quantity-stepper input{box-sizing:border-box;width:100%!important;min-width:0!important;max-width:none!important;margin:0;padding:6px 2px!important;border:0!important;border-radius:0!important;text-align:center;background:var(--surface)!important;color:var(--text)!important;font-size:15px;appearance:textfield}
 html .number-control input::-webkit-inner-spin-button,html .number-control input::-webkit-outer-spin-button{appearance:none;margin:0}
 html .number-control:focus-within,html .selection-quantity:focus-within,html .quantity-stepper:focus-within{outline:2px solid var(--accent);outline-offset:2px}
 html .number-control button:hover,html .selection-quantity button:hover,html #catalogTable .quantity-stepper button:hover{background:var(--accent)!important;color:var(--canvas)!important}
 .quote-table .number-control{min-width:136px}
}

/* Column choices: same palette, touch targets and visible selected values. */
html #catalogTable .column-facet-trigger{display:inline-flex;align-items:center;gap:7px;background:transparent!important;color:var(--text)!important;padding:7px 4px;border:0!important;font-weight:700;text-align:left;white-space:nowrap}
.facet-count{display:inline-grid;place-items:center;min-width:20px;height:20px;padding:0 4px;border-radius:5px;background:var(--accent);color:var(--canvas);font-size:11px}
html #columnFacetPopup{box-sizing:border-box;width:min(440px,calc(100vw - 24px));max-height:calc(100dvh - 32px);padding:0;border:1px solid var(--border);border-radius:16px;background:var(--surface)!important;color:var(--text)!important;overflow:auto;box-shadow:0 24px 80px #0006}
#columnFacetPopup::backdrop{background:#07121a88}
html #columnFacetPopup header{position:static;display:flex;align-items:center;justify-content:space-between;padding:20px;margin:0;border-bottom:1px solid var(--border);background:var(--surface-raised)!important}
#columnFacetPopup h2{font-size:22px;line-height:1.3;margin:4px 0 0}#columnFacetPopup header small{color:var(--muted);font-size:10px;letter-spacing:1.5px;font-weight:700}
#columnFacetPopup header button{width:38px;height:38px;padding:0;font-size:24px}
.facet-search-label{display:block;padding:16px 20px 0;font-size:12px;font-weight:600}
#columnFacetSearch{box-sizing:border-box;width:100%;margin-top:7px;padding:11px}
.facet-explanation{padding:0 20px;color:var(--muted);font-size:12px;line-height:1.5}
#columnFacetOptions{max-height: min(340px,38dvh);overflow-y:auto;padding:0 12px;overscroll-behavior:contain}
#columnFacetOptions label{display:flex;align-items:center;gap:12px;padding:10px 9px;border-radius:7px;min-height:40px;cursor:pointer}
#columnFacetOptions label:hover,#columnFacetOptions label:has(input:checked){background:var(--surface-soft)}
#columnFacetOptions input{flex:0 0 18px;width:18px;height:18px;margin:0;accent-color:var(--accent)}
#columnFacetOptions span{flex:1;overflow-wrap:anywhere}#columnFacetOptions small{color:var(--muted);font-variant-numeric:tabular-nums}
#columnFacetSummary{margin:12px 20px;color:var(--muted);font-size:12px}
html #columnFacetPopup footer{display:flex;justify-content:space-between;gap:12px;padding:16px 20px;margin:0;border-top:1px solid var(--border);background:var(--surface)!important}
.facet-sort-actions{display:flex;flex-wrap:wrap;gap:8px;padding:0 20px 18px}.facet-sort-actions span{flex-basis:100%;font-size:11px;color:var(--muted)}.facet-sort-actions button{font-size:12px;padding:7px 10px}
html #columnFacetPopup input[type=search],html #columnFacetPopup button{background:var(--surface-soft)!important;color:var(--text)!important;border:1px solid var(--border)}
html #columnFacetPopup input::placeholder{color:var(--muted)!important}
html #columnFacetPopup button.solid{background:var(--accent)!important;color:var(--canvas)!important}

/* Larger product thumbnails while keeping the table dense. */
html body #catalogTable .image-cell{width:84px;min-width:84px;text-align:center}
html body #catalogTable .photo{width:72px;height:72px;object-fit:contain;border-radius:8px}
html body.compact-rows #catalogTable .photo{width:64px;height:64px}
html body #catalogTable .photo-link{display:inline-flex;align-items:center;justify-content:center;padding:0;line-height:0}

/* Readable comparisons: neutral values, explicit status badges. */
:root{--compare-same-bg:#e0efe8;--compare-same-text:#24553f;--compare-diff-bg:#f8edda;--compare-diff-text:#694714}
:root[data-theme=dark]{--compare-same-bg:#244a43;--compare-same-text:#cdf3e3;--compare-diff-bg:#51432c;--compare-diff-text:#ffe0a3}
html body #quickView{--q-bg:var(--surface);--q-surface:var(--surface-soft);--q-text:var(--text);--q-muted:var(--secondary);--q-line:var(--border);--q-accent:var(--accent);box-sizing:border-box;width:min(1100px,calc(100vw - 24px));padding:20px;background:var(--surface)!important;color:var(--text)!important;border-color:var(--border);font-size:15px;line-height:1.5;box-shadow:0 18px 60px #0005}
html body #quickView h2{font-size:25px}html body #quickView h3{font-size:18px}
html body #quickView .quick-overview{grid-template-columns:160px minmax(0,1fr)}
html body #quickView .quick-visual{height:180px;border-radius:9px}
html body #quickView :is(dt,dd){font-size:14px;padding:8px}
html body #quickView :is(button,input,select){font-size:14px;min-height:38px;background:var(--surface-soft);color:var(--text);border-color:var(--border)}
html body #quickView .solid{background:var(--accent);color:var(--accent-text)}
html body #quickView :is(.sub,.quick-pages,.quick-match-criteria){font-size:13px;color:var(--secondary)}
html body #quickView .pending{background:var(--warning-bg);color:var(--warning-text)}
html body :is(#quickView,#relatedComparison,#modal) .quick-table-scroll{max-height:360px;border-color:var(--border)}
html body :is(#quickView,#relatedComparison,#modal) .quick-table-scroll :is(th,td){font-size:14px;line-height:1.45;padding:11px;min-width:112px}
html body :is(#quickView,#relatedComparison,#modal) .quick-table-scroll button{font-size:14px;line-height:1.4;padding:6px}
html body :is(#quickView,#relatedComparison,#modal) .quick-table-scroll small{font-size:12px;line-height:1.4;color:var(--secondary)!important}
html body :is(#quickView,#relatedComparison,#modal) .quick-table-scroll td:is(.match-same,.match-different){background:var(--surface)!important;color:var(--text)!important;font-weight:600}
html body :is(#quickView,#relatedComparison,#modal) .quick-table-scroll td.match-same small,html body #quickView .quick-legend .match-same{background:var(--compare-same-bg)!important;color:var(--compare-same-text)!important}
html body :is(#quickView,#relatedComparison,#modal) .quick-table-scroll td.match-different small,html body #quickView .quick-legend .match-different{background:var(--compare-diff-bg)!important;color:var(--compare-diff-text)!important}
html body :is(#quickView,#relatedComparison,#modal) .quick-table-scroll td:is(.match-same,.match-different) small{display:table;padding:3px 7px;border-radius:5px;font-weight:600;white-space:nowrap;margin-top:7px}
html body #quickView .quick-legend{font-size:13px;line-height:1.5;gap:8px}
html body #quickView .quick-legend span{padding:5px 8px}
html body #quickView[data-theme]{--q-bg:var(--surface);--q-surface:var(--surface-soft);--q-text:var(--text);--q-muted:var(--secondary);--q-line:var(--border);--q-accent:var(--accent)}
html body #quickView .quick-product-table tbody th button{color:var(--accent)!important;font-weight:700}
html body #quickView .pill{background:var(--accent-soft);color:var(--text);border-color:var(--border)}

/* Banner editorial preview, distinct from the catalog comparison. */
html body #quickView.banner-showcase{width:min(960px,calc(100vw - 24px));padding:24px}
.banner-showcase-body{display:grid;grid-template-columns:minmax(220px,.85fr) minmax(0,1.15fr);gap:26px;margin-top:12px}
html body #quickView .banner-showcase-photo{display:flex;align-items:center;justify-content:center;align-self:start;width:100%;height:330px;padding:20px;background:#f5f7f9!important;border-radius:14px;border:1px solid var(--border);overflow:hidden}
html body #quickView .banner-showcase-photo .photo{width:100%;height:100%;object-fit:contain;background:transparent;border:0;border-radius:0}
.banner-showcase-description{margin:0 0 18px;color:var(--secondary);font-size:15px;line-height:1.6}
html body #quickView .banner-showcase-info h3{margin:0 0 12px;font-size:16px}
html body #quickView .banner-showcase-info dl{display:block;max-height:350px;overflow:auto;margin:0;padding-right:6px}
.banner-showcase-info dl>div{display:grid;grid-template-columns:minmax(0,1fr) minmax(0,1fr);gap:14px;border-bottom:1px solid var(--border)}
html body #quickView .banner-showcase-info dt,html body #quickView .banner-showcase-info dd{border:0;padding:11px 0;font-size:14px;line-height:1.5}
html body #quickView .banner-showcase-info dt{color:var(--secondary)}
.banner-showcase-footer{display:flex;justify-content:space-between;align-items:center;gap:20px;border-top:1px solid var(--border);padding-top:20px;margin-top:24px}
.banner-showcase-footer>span{font-size:13px;color:var(--secondary)}
html body #quickView .banner-showcase-footer button{padding:12px 18px;font-weight:700;white-space:nowrap}
@media(max-width:850px){.banner-showcase-body{grid-template-columns:200px minmax(0,1fr);gap:18px}html body #quickView .banner-showcase-photo{height:270px}.banner-showcase-footer{flex-wrap:wrap}}

/* Product photography keeps a neutral white canvas in both themes. */
html[data-theme] body #productPage #zoomViewport,
html[data-theme] body #quickView :is(.quick-visual,.banner-showcase-photo),
html[data-theme] body :is(#productPage,#catalogPage,#catalogTable,#quickView,#ttWelcome,#toriDialog,#modal,.quote-drawer) :is(.photo,.photo-link,.cardimage,.photo-thumbnails button,.tori-product-photo,.expanded-photo){background:#fff!important;color:#203247!important}
html[data-theme] body .tori-product-photo>span{color:#506277!important}

/* Visible category selection, including expandable headings in the sidebar. */
html[data-theme] body :is(#catalogSidebar,#catalogPage) #categoryTree :is(summary.active,button[aria-pressed="true"]){background:var(--accent-soft)!important;color:var(--text)!important;border-left:4px solid var(--accent)!important;font-weight:700}
html[data-theme] body :is(#catalogSidebar,#catalogPage) #categoryTree :is(summary.active,button[aria-pressed="true"]) :is(span,small){color:var(--text)!important;opacity:1!important}
html[data-theme] body :is(#catalogSidebar,#catalogPage) #categoryTree :is(summary.active,button[aria-pressed="true"]):hover{background:var(--accent-soft)!important;color:var(--text)!important}

/* Refined hierarchy: quiet surfaces, clear controls, blue reserved for actions. */
html[data-theme] body #catalogControls{border-width:0 0 1px!important;box-shadow:0 3px 16px #102b4310}
html[data-theme] body #catalogControls .logo img{background:transparent;padding:0}
html[data-theme=light] body #catalogControls .logo img{filter:brightness(.48)}
html[data-theme] body :is(#catalogSidebar,#ttWelcome,#catalogPage .resultshead,#productPage,.web-product-tabs){border-color:var(--border)!important;border-radius:12px}
html[data-theme] body #catalogSidebar{border:0!important;background:var(--canvas)!important}
html[data-theme] body #catalogSidebar hr{border:0;border-top:1px solid var(--border);opacity:1}
html[data-theme] body #categoryTree .tree-children{border-color:var(--border)}
html[data-theme] body #categoryTree :is(summary,.tree-item){border-radius:6px}
html[data-theme] body #ttWelcome{background:var(--surface-raised)!important;border:0!important}
html[data-theme] body #ttWelcome :is(.tt-welcome-copy,.tt-discover,#catalogBanner){background:transparent!important}
html[data-theme] body #ttWelcome .banner-product{background:var(--surface)!important;border-left-color:var(--accent)!important}
html[data-theme] body #ttWelcome .banner-fact{background:var(--surface-raised);border-color:transparent}
html[data-theme] body #catalogPage .resultshead{background:transparent!important;border:0!important;padding-left:0}
html[data-theme] body #catalogTable{border-collapse:separate;border-spacing:0}
html[data-theme] body #catalogTable :is(th,td){border-width:0 0 1px!important;border-color:var(--divider)!important;box-shadow:none!important}
html[data-theme] body #catalogTable thead :is(th,td){background:var(--surface-soft)!important}
html[data-theme] body #catalogTable .model-cell button{background:transparent!important;color:var(--link)!important;padding:0;font-weight:750}
html[data-theme] body #catalogTable .column-facet-button{background:transparent!important}
html[data-theme] body :is(#catalogControls,#catalogSidebar,#catalogPage,#productPage,#modal,#toriDialog,#quickView,#selectionPanel) :is(input,select,textarea){border-color:var(--control-border)!important}
html[data-theme] body :is(#catalogControls,#catalogSidebar,#catalogPage,#productPage,#modal,#toriDialog,#quickView) input::placeholder{color:var(--secondary)!important}
html[data-theme] body :is(#productPage .product-summary,#productPage .product-visual){background:var(--surface)!important;border-color:transparent!important}
html[data-theme] body #productPage :is(dt,dd){border-color:var(--divider)!important}
html[data-theme] body #productPage .product-purchase{border-color:var(--border)!important;background:var(--surface-raised)!important}
html[data-theme] body .web-tab-nav{background:var(--surface-raised)!important}
html[data-theme] body .web-tab-nav button{border-color:transparent!important;background:transparent!important;color:var(--secondary)!important}
html[data-theme] body .web-tab-nav button[aria-selected=true]{background:var(--accent-soft)!important;color:var(--text)!important;box-shadow:inset 0 -3px var(--accent)}
html[data-theme] body :is(#catalogPage,#productPage,#modal,#quickView,#toriDialog,footer) a{color:var(--link)!important}
html[data-theme] body :is(.quantity-stepper,.selection-quantity,.number-stepper){border-color:var(--control-border)!important}
html[data-theme] body #selectionLines img{background:#fff}
html[data-theme] body #columnFacetPopup button.solid{color:var(--accent-text)!important}
html[data-theme] body #catalogControls :is(#toggleFilters,#homeButton,#themeSwitch){background:transparent!important;border-color:var(--border)!important;color:var(--text)!important}
html[data-theme] body :is(#catalogControls #runSearch,#selectionReview,#toriForm button){background:var(--accent)!important;color:var(--accent-text)!important;border-color:var(--accent)!important}
html[data-theme] body :is(#catalogControls,#catalogPage,#productPage,#ttWelcome,#modal,#toriDialog) button:disabled{opacity:.55}
html[data-theme] body :is(.pending,.pending-label,.status-pending){border-color:transparent!important;font-weight:600;letter-spacing:.03em}

html[data-theme] body #catalogSidebar #categoryTree{background:transparent!important}
html[data-theme] body #catalogSidebar #categoryTree :is(button:not([aria-pressed=true]),summary:not(.active)){background:transparent!important}
html[data-theme] body #catalogSidebar #categoryTree :is(button:not([aria-pressed=true]),summary:not(.active)):hover{background:var(--surface-soft)!important}
html[data-theme] body :is(#catalogPage,#productPage,#quickView,#ttWelcome,#toriDialog) :is(.photo,.photo-link){border-color:var(--border)!important}

html[data-theme] body #productPage .web-tab-nav button{border-color:transparent!important;background:transparent!important;color:var(--secondary)!important}
html[data-theme] body #productPage .web-tab-nav button[aria-selected=true]{background:var(--accent-soft)!important;color:var(--text)!important;box-shadow:inset 0 -3px var(--accent)!important}
html[data-theme] body #productPage :is(.product-summary,.product-visual){background:var(--surface)!important;border-color:transparent!important}
html[data-theme] body #productPage .web-tab-nav{background:var(--surface-raised)!important}
