/* Flow V4: two studio palettes. Embedded products keep their own colors. */
.g-theme-switch{display:inline-grid;place-items:center;flex:0 0 36px;width:36px;height:36px;padding:0;border:1px solid var(--g-line);border-radius:11px;background:transparent;color:var(--g-ink);transition:background .22s,border-color .22s,color .22s;cursor:pointer}
.g-theme-switch svg{width:19px;height:19px;fill:none;stroke:currentColor;stroke-width:1.6;stroke-linecap:round;stroke-linejoin:round}.g-theme-switch .g-theme-sun{display:none}.g-theme-switch:hover{background:#dce7fa;border-color:#94abd2;color:#234d96}.g-theme-switch:focus-visible{outline:2px solid #6394f8!important;outline-offset:3px}
html[data-studio-theme=dark]{color-scheme:dark;--g-paper:#111720;--g-ink:#e7edf7;--g-muted:#a6b1c2;--g-line:#303c4d;--g-dark:#0c111a;--g-dark-line:#273346;--g-accent:#a8c8ff;--zt-panel:#1b2533;--zt-hover:#253750;--zt-muted:#a6b5ca;--zt-blue:#a4c5ff;--zt-cta:#b9d1ff;--zt-cta-ink:#131f32;background:#111720}
html[data-studio-theme=dark] .g-theme-switch .g-theme-sun{display:block}html[data-studio-theme=dark] .g-theme-switch .g-theme-moon{display:none}html[data-studio-theme=dark] .g-theme-switch:hover{background:#273b58;border-color:#648ccf;color:#c4dbff}
html[data-studio-theme=dark] body.g-design .site-head.g-header{background:rgba(15,21,30,.96);border-color:#303c4d;color:var(--g-ink)}
html[data-studio-theme=dark] .g-design.z4-home{--zf-paper:#111720;--zf-night:#0b111b;--zf-mist:#192431;--zf-blue:#1c304e;--zf-deep:#0c1421;--zf-signal:#a7cdff;background:var(--zf-paper);color:var(--g-ink)}
html[data-studio-theme=dark] .g-design.z4-home #main-content{background:var(--zf-paper)}
html[data-studio-theme=dark] .g-design .g-head-cta,html[data-studio-theme=dark] .g-design .g-button,html[data-studio-theme=dark] .g-design .services-market-link,html[data-studio-theme=dark] .g-design .final-actions button,html[data-studio-theme=dark] .g-design .final-actions a{background:var(--zt-cta);border-color:var(--zt-cta);color:var(--zt-cta-ink)}
html[data-studio-theme=dark] .g-design :is(.g-head-cta,.g-button,.services-market-link,.final-actions button,.final-actions a):hover{background:#d2e3ff;color:#131f32;border-color:#d2e3ff}
html[data-studio-theme=dark] .g-design .services-market-link :is(span,b){color:#172944}
html[data-studio-theme=dark] .g-design .g-product-art{box-shadow:0 22px 65px #0005,0 0 0 1px #61799b55;background:#202b39}
html[data-studio-theme=dark] .g-design .g-product-links{border-color:#34455c}html[data-studio-theme=dark] .g-design .g-product-links a{color:var(--g-ink);border-color:#34455c}html[data-studio-theme=dark] .g-design .g-product-number,html[data-studio-theme=dark] .g-design .g-motion-toggle{color:#a7bce0}
html[data-studio-theme=dark] .g-design .g-motion-toggle-icon{border-color:#536b8e}
html[data-studio-theme=dark] .g-design .g-directions .z4-paths button:nth-child(n){background:linear-gradient(145deg,#202c3e,#172130);color:var(--g-ink);border-color:#394b65}
html[data-studio-theme=dark] .g-design .g-directions .z4-paths button:hover{background:linear-gradient(145deg,#2c405b,#1d2c41);border-color:#7299dd;box-shadow:0 13px 36px #0005}
html[data-studio-theme=dark] .g-design .z4-paths small,html[data-studio-theme=dark] .g-design .z4-paths>*>span,html[data-studio-theme=dark] .g-design .g-direction-bottom button{color:var(--zt-muted)}
html[data-studio-theme=dark] .g-design .z4-paths>*>i{border-color:#637996;color:#b6d2ff}html[data-studio-theme=dark] .g-design .z4-paths button:hover i{background:#b9d1ff;color:#132039}
html[data-studio-theme=dark] .g-design .g-direction-bottom button{border-color:#526682}
html[data-studio-theme=dark] .g-design .z8-vision-shell,html[data-studio-theme=dark] .g-design .z9-mobile-shell{color:var(--g-ink)}
html[data-studio-theme=dark] .g-design :is(.z8-vision-copy>small,.z8-vision-head>p,.z8-vision-note,.z9-mobile-copy>small,.z9-mobile-copy>p,.z7-direct small,.z7-direct p,.z4-final small,.z4-final p,.g-process-list p,.g-process-list article>span,.g-process-list article>i,.g-process-note>span,.z18-news-home-head small,.z18-news-home-head p,.z18-news-home-card p,.z18-news-home-card small){color:var(--zt-muted)}
html[data-studio-theme=dark] .g-design .z8-vision-side{background:#243245;color:var(--g-ink)}
html[data-studio-theme=dark] .g-design .z8-vision-side :is(header,footer){border-color:#425775;color:#d9e8ff}
html[data-studio-theme=dark] .g-design .z8-vision-side :is(header span,header b,.z8-vision-metrics small,.z8-vision-feed small){color:#abc3e6}
html[data-studio-theme=dark] .g-design .z8-vision-side :is(.z8-vision-metrics article,.z8-vision-feed article){background:#192535}
html[data-studio-theme=dark] .g-design .z8-vision-side :is(.z8-vision-metrics b,.z8-vision-feed b){color:#e7edf7}
html[data-studio-theme=dark] .g-design .z9-mobile-stage{background:#25364c}html[data-studio-theme=dark] .g-design .z9-mobile-stage:before{background:#354e71}
html[data-studio-theme=dark] .g-design .z9-mobile-index button{background:#26364b;color:#b6c8e3}html[data-studio-theme=dark] .g-design .z9-mobile-index button.is-active{background:#b9d1ff;color:#162338}
html[data-studio-theme=dark] .g-design .z4-final{color:var(--g-ink)}
html[data-studio-theme=dark] .g-design .g-process-note,html[data-studio-theme=dark] .g-design .z18-news-home-card{background:var(--zt-panel);border-color:var(--g-line)}
html[data-studio-theme=dark] .g-design .z18-news-home-card h3 a{color:var(--g-ink)}
html[data-studio-theme=dark] .g-design .g-atlas{background:#141d2a;color:var(--g-ink)}
html[data-studio-theme=dark] .g-design .g-atlas :is(.g-atlas-top>span,.g-atlas-search kbd,.g-atlas-links a>span,.g-atlas-links a small,.g-atlas-bottom a,.g-atlas-bottom>span,.g-atlas-links a i){color:#a6bce0}
html[data-studio-theme=dark] .g-design .g-atlas-search{border-color:#425675}
html[data-studio-theme=dark] .g-design :is(.g-top-nav a,.g-product-links a,.g-atlas-links a):hover,html[data-studio-theme=dark] .g-design .g-atlas-links a:focus-visible{background:var(--zt-hover);color:#c3d9ff}
html[data-studio-theme=dark] .g-design .g-dock a:hover{background:#2a3c58;color:#e8f0ff}html[data-studio-theme=dark] .g-design .g-dock a.is-active:hover{background:#b9d1ff;color:#131f32}
html[data-studio-theme=dark] .g-design .g-process-list article:hover{background:#213249;box-shadow:inset 3px 0 #83adff}
html[data-studio-theme=dark] .g-design :focus-visible{outline-color:#99bfff!important}
/* Catalog uses the same palette; payment/admin/product iframe are independent interfaces. */
html[data-studio-theme=dark] .g-design :is(.market-hero,.marketplace-hero,.marketplace-shell,.directory-hero,.directory-shell){background:var(--g-paper);color:var(--g-ink)}
html[data-studio-theme=dark] .g-design :is(.market-hero-copy>small,.market-hero-copy>p,.marketplace-hero p,.directory-hero p){color:var(--zt-muted)}
html[data-studio-theme=dark] .g-design :is(.market-controls,.market-bottom,.market-card,.market-mrs-card){background:var(--zt-panel);color:var(--g-ink);border-color:#394b65}
html[data-studio-theme=dark] .g-design :is(.market-card h2,.market-mrs-card h2,.market-mrs-card p,.market-mrs-card>span,.market-bottom p,.market-bottom small,.market-card-body>p,.market-card-body>header,.market-card-body>header:before,.market-search input,.market-search span,.market-search input::placeholder,.market-price-filter label){color:var(--zt-muted)}
html[data-studio-theme=dark] .g-design :is(.market-card h2,.market-mrs-card h2){color:var(--g-ink)}
html[data-studio-theme=dark] .g-design .market-card:hover{background:#253750;border-color:#7096d4}
html[data-studio-theme=dark] .g-design :is(.market-price,.market-price-filter select,.market-chips button,.market-card-body>footer button,.market-detail,.market-mrs-card button){background:#293b55;border-color:#526b90;color:#cfdeff}
html[data-studio-theme=dark] .g-design .market-price :is(strong,small){color:#c2d7ff}
html[data-studio-theme=dark] .g-design .market-chips button.is-active{background:#b9d1ff;color:#152239}
html[data-studio-theme=dark] .g-design .market-hero-actions button{background:#b9d1ff;color:#152239}
html[data-studio-theme=dark] .g-design .market-hero-actions a{background:transparent;color:var(--g-ink);border-color:#627caa}
@media(max-width:480px){.g-theme-switch{width:31px;height:33px;flex-basis:31px;border-radius:8px}.g-theme-switch svg{width:17px;height:17px}.g-design .g-head-actions{gap:7px}.g-design .site-head.g-header .g-brand{min-width:0}.g-design .g-head-cta{max-width:96px;text-align:center;line-height:1.12;justify-content:center;padding:8px 7px}}
@media(max-width:360px){.g-design .g-head-cta{display:none}.g-design .g-head-actions{gap:9px}}
@media(prefers-reduced-motion:reduce){.g-theme-switch{transition:none}}
/* Keep source artwork legible instead of multiplying its colors by the dark panel. */
html[data-studio-theme=dark] .g-design .g-product-art .g-product-art-base{mix-blend-mode:normal;filter:brightness(.91) saturate(.94)}
html[data-studio-theme=dark] .g-design [data-agent-note]{background:#263b57;color:#e3edff;border:1px solid #536e94;box-shadow:10px 10px 0 #090e17}
html[data-studio-theme=dark] .g-design [data-agent-note] :is(b,small,p,span){color:#e3edff}
html[data-studio-theme=dark] .g-design .lead-dialog{background:#192331;color:var(--g-ink);border-color:#415574}
html[data-studio-theme=dark] .g-design .lead-dialog header h2{color:var(--g-ink)}
html[data-studio-theme=dark] .g-design :is(.lead-dialog header p,.lead-dialog header small,.lead-form label>span,.lead-form small,.mrs-choice p){color:#aabbd2}
html[data-studio-theme=dark] .g-design :is(.lead-form input,.lead-form textarea,.lead-form select){background:#111b29;border-color:#435975;color:#e5edf9}
html[data-studio-theme=dark] .g-design :is(.lead-form input,.lead-form textarea)::placeholder{color:#8f9fb7}
html[data-studio-theme=dark] .g-design :is(.mrs-choice,.lead-dialog .dialog-close){background:#25354b;border-color:#536b8e;color:#e1ebff}
html[data-studio-theme=dark] .g-design .form-submit{background:#b9d1ff;color:#152239}
html[data-studio-theme=dark] .g-design .form-message{color:#b4d2ff}
html[data-studio-theme=dark] .g-design .final-actions>*:not(:first-child){background:transparent;color:#d9e8ff;border-color:#6e8dbb}
html[data-studio-theme=dark] .g-design .final-actions>*:not(:first-child):hover{background:#38557b;color:white}
html[data-studio-theme=dark] .g-design .site-footer .footer-links :is(a,button){border-color:#354052;color:#b1c1d9}
html[data-studio-theme=dark] .g-design .footer-links:after{color:#9aaac3}

/* V5: header underline polish and marketplace theme consistency. */
html[data-studio-theme=dark] .g-design .g-top-nav a:after{background:#8eb3ff}
html[data-studio-theme=dark] .g-design .g-reading-line{background:#7ea7ff}
html[data-studio-theme=dark] .g-design .g-menu-button i{background:var(--g-ink)}
html[data-studio-theme=light] .market-page{background:#f2f1ec;color:#1d2735}
html[data-studio-theme=light] .market-controls{background:rgba(242,241,236,.94);border-top-color:#d7dfeb;border-bottom-color:#d7dfeb}
html[data-studio-theme=light] :is(.market-search input,.market-price-filter select,.market-chips button,.market-card footer button,.market-detail,.market-bottom button,.market-bottom a,.market-hero-actions a,.market-mrs-card button){background:#fff;color:#21324b;border-color:#c8d4e5}
html[data-studio-theme=light] .market-hero-actions button{background:#17345f;color:#fff;border-color:#17345f}
html[data-studio-theme=light] .market-card{background:#f8fafc;border-color:#d7dfeb;box-shadow:0 16px 38px rgba(17,35,64,.06)}
html[data-studio-theme=light] .market-card:hover{border-color:#83a0cf;box-shadow:0 26px 58px rgba(25,53,96,.12)}
html[data-studio-theme=light] .market-card-media{background:#e8eef8}
html[data-studio-theme=light] .market-card h2{color:#1a2b42}
html[data-studio-theme=light] .market-card p,html[data-studio-theme=light] .market-search span,html[data-studio-theme=light] .market-price-filter label,html[data-studio-theme=light] .market-card-body>header span{color:#5b6c84}
html[data-studio-theme=light] .market-card-body>header{color:#536b94}
html[data-studio-theme=light] .market-price{background:linear-gradient(135deg,#17345f,#0f2444)!important;border-color:#264d87!important}
html[data-studio-theme=light] .market-tags span{border-color:#cad5e7;color:#587090;background:#fff}
html[data-studio-theme=light] .market-bottom{border-top-color:#d7dfeb}
html[data-studio-theme=light] .market-bottom p{color:#60718a}

/* V22.4: final catalog cascade, after geometry.css. */
html[data-studio-theme=dark] body.g-design.market-page{background:#111720;color:#e7edf7}
html[data-studio-theme=light] body.g-design.market-page{background:#f2f1ec;color:#1d2735}
html[data-studio-theme=dark] body.g-design .g-top-nav a:after{display:none}
html[data-studio-theme=dark] body.g-design.z4-home .g-top-nav a:hover{background:#253750;color:#c3d9ff;box-shadow:inset 0 -2px #7096d4}
body.g-design.market-page .market-grid{align-items:stretch}
body.g-design.market-page .market-card{display:flex;flex-direction:column;min-width:0;height:100%}
body.g-design.market-page .market-card[hidden]{display:none!important}
body.g-design.market-page .market-card .market-card-media{display:block;height:auto;aspect-ratio: 16/7;flex:none;position:relative;overflow:hidden;border-bottom:1px solid var(--g-line);background:#12223b}
body.g-design.market-page .market-card .market-card-media img{width:100%;height:100%;object-fit:cover;object-position:center}
body.g-design.market-page .market-card-media .market-price-badge,body.g-design.market-page .market-card-media>span{display:none}
body.g-design.market-page .market-card-body{display:flex;flex-direction:column;flex:1;height:auto;gap:12px;padding:clamp(16px,2vw,26px)}
body.g-design.market-page .market-card h2{margin:8px 0 0;min-height:0;font-size:clamp(20px,2vw,25px);overflow-wrap:anywhere}
body.g-design.market-page .market-price{display:block;margin:0;padding:12px;min-height:78px}
body.g-design.market-page .market-price strong{display:block;font-size:clamp(19px,2vw,25px)!important;line-height:1.2;overflow-wrap:anywhere}
body.g-design.market-page .market-price small{display:block;margin-top:5px;font-size:9px;color:#b8c6df}
body.g-design.market-page .market-card-body>p{min-height:0;margin:0;flex:1}
body.g-design.market-page .market-card-body>footer{margin-top:auto;display:flex;flex-wrap:wrap;gap:8px}
html[data-studio-theme=light] body.g-design.market-page .market-card{background:#f8fafc;border-color:#cdd6e3}
html[data-studio-theme=dark] body.g-design.market-page .market-card{background:#1b2533;border-color:#394b65}
html[data-studio-theme=dark] body.g-design.market-page :is(.market-controls,.market-bottom,.market-mrs-card){background:#1b2533;color:#e7edf7;border-color:#394b65}
html[data-studio-theme=dark] body.g-design.market-page .market-card h2{color:#e7edf7}
html[data-studio-theme=dark] body.g-design.market-page .market-card-body>p{color:#b4c3d8}
html[data-studio-theme=dark] body.g-design.market-page .market-card-body>header:before{color:#a6b5ca}
html[data-studio-theme=dark] body.g-design.market-page :is(.market-card-body>header,.market-card-body>footer){border-color:#394b65}
html[data-studio-theme=dark] body.g-design.market-page .market-search input{background:#1b2533;color:#e7edf7;border-color:#394b65}
@media(max-width:480px){body.g-design.market-page .market-card-media{aspect-ratio:16/8}}

html[data-studio-theme=light] body.g-design.market-page .market-controls{background:#e8ecf1;border-color:#cdd6e3}
html[data-studio-theme=light] body.g-design.market-page .market-card-body>footer{border-color:#cdd6e3}
html[data-studio-theme=light] body.g-design.market-page .market-card:hover{background:#f0f4fb}
html[data-studio-theme=dark] body.g-design.market-page .market-card:hover{background:#253750}

/* V22.5 — clean navigation, no filled hover rectangle in either palette. */
html[data-studio-theme] body.g-design .g-top-nav a:is(:hover,:focus-visible){background:transparent!important;box-shadow:none!important;color:var(--g-accent,#315fce);border-radius:0}
html[data-studio-theme] body.g-design .g-top-nav a:after{display:block!important;background:#3c69bb;height:2px;bottom:8px}
html[data-studio-theme=dark] body.g-design .g-top-nav a:after{background:#83aaff}
html[data-studio-theme] body.g-design .g-top-nav a:is(:hover,:focus-visible):after{right:0}
html[data-studio-theme=dark] body.g-design .g-top-nav a:is(:hover,:focus-visible){color:#c3d9ff}

/* V22.6: one underline only, independent of home hover stylesheet. */
html[data-studio-theme] body.g-design .site-head.g-header .g-top-nav a{background:transparent!important;box-shadow:none!important;border-radius:0!important;border:0!important;text-decoration:none!important}
html[data-studio-theme] body.g-design .site-head.g-header .g-top-nav a::after{content:'';display:block!important;position:absolute;left:0;right:0;bottom:8px;height:2px;background:#315fba;transform:scaleX(0);transform-origin:left;transition:transform .2s ease;pointer-events:none}
html[data-studio-theme=dark] body.g-design .site-head.g-header .g-top-nav a::after{background:#83aaff}
html[data-studio-theme] body.g-design .site-head.g-header .g-top-nav a:is(:hover,:focus-visible)::after{transform:scaleX(1)}
html[data-studio-theme=light] body.g-design .site-head.g-header .g-top-nav a:hover{color:#315fba}
html[data-studio-theme=dark] body.g-design .site-head.g-header .g-top-nav a:hover{color:#c3d9ff}
@media(prefers-reduced-motion:reduce){html[data-studio-theme] body.g-design .site-head.g-header .g-top-nav a::after{transition:none}}
