/* Scoped final layer: existing storefront imagery and SEO layout stay intact. */
:root{--ux-bg:#f2f5f3;--ux-panel:#fff;--ux-soft:#e8efeb;--ux-text:#172e22;--ux-muted:#4a6455;--ux-line:#a4b9ac;--ux-accent:#175e39;--ux-on:#fff}
html[data-theme="dark"]{--ux-bg:#111d17;--ux-panel:#1b2c22;--ux-soft:#293f31;--ux-text:#edf7f0;--ux-muted:#bed1c3;--ux-line:#65816f;--ux-accent:#b7eb8d;--ux-on:#192b15}
html body [hidden]{display:none!important}
html body.workspace-v167,html body:has(.hub-page){background:var(--ux-bg)!important;color:var(--ux-text)!important}
html body .hub-grid .card,html body.workspace-v167 :is(.card,.dashboard-sidebar,.dashboard-hero,.dashboard-kpis>a,.seller-order-card,.buyer-order-card){background:var(--ux-panel)!important;color:var(--ux-text)!important;border:1px solid var(--ux-line)!important;box-shadow:none!important}
html body.workspace-v167 :is(h1,h2,h3,label,strong,b,.section-heading),html body .hub-page :is(h1,h2,label){color:var(--ux-text)!important}
html body.workspace-v167 :is(.muted,small,.eyebrow,.section-heading>p,.help-v167),html body .hub-page p{color:var(--ux-muted)!important;opacity:1!important}
html body.workspace-v167 :is(input,select,textarea),html body .hub-search input{background:var(--ux-panel)!important;color:var(--ux-text)!important;border:1px solid var(--ux-line)!important;font-size:16px;min-width:0}
html body.workspace-v167 :is(input,textarea)::placeholder{color:var(--ux-muted)!important;opacity:1}
html body.workspace-v167 .dashboard-menu a{color:var(--ux-text)!important;min-height:44px}
html body.workspace-v167 .dashboard-menu a.active{background:var(--ux-accent)!important;color:var(--ux-on)!important}
html body.workspace-v167 :is(.secondary-btn,.help-v167 summary){background:var(--ux-soft)!important;color:var(--ux-text)!important;border-color:var(--ux-line)!important}
html body.workspace-v167 :is(.order-btn,button[type="submit"]){background:var(--ux-accent)!important;color:var(--ux-on)!important}
html body.workspace-v167 .dashboard-content{min-width:0}
html body.workspace-v167 .content-section{scroll-margin-top:24px}
html body.workspace-v167 .section-number{display:none}
html body.workspace-v167 .section-heading{align-items:center;gap:16px;flex-wrap:wrap}
.help-v167{font-size:14px;margin:10px 0}.help-v167 summary{cursor:pointer;border-radius:9px;padding:8px 12px;width:max-content}.help-v167 .sidebar-help{margin:8px 0}
.section-select-v167{display:none}.order-filters-v167{display:flex;gap:12px;align-items:center;flex-wrap:wrap;margin:16px 0}.order-filters-v167 input{flex:2;min-width:180px}.order-filters-v167 select{flex:1;min-width:140px}.order-filters-v167 span{font-size:13px;color:var(--ux-muted)}
.hub-page{padding-block:32px 72px}.hub-page h1{margin-bottom:20px}.hub-search{display:block;max-width:600px;margin-bottom:24px}.hub-grid{display:grid;grid-template-columns:repeat(3,minmax(0,1fr));gap:18px}.hub-grid h2{margin:0 0 16px}.hub-grid nav{display:grid;gap:6px}.hub-grid a{display:block;padding:12px;border-radius:10px;color:var(--ux-text)!important;background:var(--ux-soft);text-decoration:none}.hub-grid a:hover{text-decoration:underline}
.skip-v167{position:fixed;left:12px;top:-100px;z-index:99999;padding:12px;background:var(--ux-panel);color:var(--ux-text)}.skip-v167:focus{top:12px}
html body.workspace-v167 :is(.order-btn,button[type="submit"]) :is(b,strong,span){color:inherit!important}
html body.workspace-v167 .dashboard-menu a.active span{color:var(--ux-text)!important;background:var(--ux-soft)!important}
html body :is(.order-status-chip,.seller-order-status)[data-status="Проверка оплаты"]{background:#fff0c2!important;color:#654800!important;border-color:#a38632!important}
html[data-theme="dark"] body :is(.order-status-chip,.seller-order-status)[data-status="Проверка оплаты"]{background:#443719!important;color:#ffe09b!important;border-color:#ab9255!important}
html body :is(a,button,input,select,textarea,summary):focus-visible{outline:3px solid var(--ux-accent)!important;outline-offset:3px}
@media(max-width:800px){.hub-grid{grid-template-columns:repeat(2,minmax(0,1fr))}html body.workspace-v167 .dashboard-sidebar{position:static!important;padding:14px!important}html body.workspace-v167 .dashboard-menu{display:none!important}.section-select-v167{display:block;width:100%;margin-top:10px;min-height:46px}html body.workspace-v167 .dashboard-sidebar>.help-v167{display:none}.order-filters-v167{align-items:stretch}.order-filters-v167 input,.order-filters-v167 select{width:100%;flex-basis:100%}}
@media(max-width:480px){.hub-grid{grid-template-columns:1fr}.hub-grid .card{padding:20px}html body.workspace-v167 .card{padding:18px!important}html body.workspace-v167 :is(.profile-fields,.seller-settings-grid,.seller-order-grid){min-width:0}html body.workspace-v167 h1{font-size:26px!important}.hub-page h1{font-size:28px}}
@media(prefers-reduced-motion:reduce){html{scroll-behavior:auto!important}*,*::before,*::after{animation:none!important;transition:none!important}}
/* Article typography uses semantic colours in both themes; no decorative stock covers. */
html body:is(.forum-page,.knowledge-article-page){background:var(--ux-bg)!important;color:var(--ux-text)!important}
html body:is(.forum-page,.knowledge-article-page) :is(.card,.forum-topic-row,.forum-topic-card,.forum-categories,.forum-topic-editor,.forum-editor-media,.related-knowledge-grid>a,.knowledge-source){background:var(--ux-panel)!important;color:var(--ux-text)!important;border-color:var(--ux-line)!important}
html body:is(.forum-page,.knowledge-article-page) :is(h1,h2,h3,p,label,b,strong,.forum-author,.forum-topic-title){color:var(--ux-text)!important}
html body:is(.forum-page,.knowledge-article-page) :is(input,textarea,select){background:var(--ux-panel)!important;color:var(--ux-text)!important;border:1px solid var(--ux-line)!important;font-size:16px}
html body:is(.forum-page,.knowledge-article-page) :is(.forum-cat,.knowledge-label,.forum-author>span,.reading-time,.forum-edited-mark){background:var(--ux-soft)!important;color:var(--ux-muted)!important;opacity:1!important}
html body:is(.forum-page,.knowledge-article-page) :is(.article-toc a,.forum-categories a,.editor-toolbar a,.thread-back){color:var(--ux-accent)!important}
.knowledge-body{max-width:72ch;margin-inline:auto;overflow-wrap:anywhere;line-height:1.75;font-size:17px}
.knowledge-body h2{font-size:clamp(21px,3vw,28px)!important;line-height:1.3!important;margin:1.8em 0 .65em!important;scroll-margin-top:100px}
.knowledge-body p{white-space:normal!important;margin:0 0 1em!important;line-height:1.75!important;font-size:17px!important}
.knowledge-body ul{padding-left:1.4em;margin:1em 0}.knowledge-body li{margin:.5em 0}
.article-toc{max-width:72ch;margin:24px auto;padding:18px;background:var(--ux-soft);border-radius:14px}.article-toc summary{cursor:pointer;font-weight:700}.article-toc li{margin:.65em 0}.article-toc a{text-decoration:underline}
.reading-time{color:var(--ux-muted)!important;font-size:14px}.editor-toolbar{display:flex;gap:8px;flex-wrap:wrap;align-items:center;margin:12px 0}.editor-toolbar button{min-height:44px;padding:10px;border:1px solid var(--ux-line);border-radius:10px;background:var(--ux-soft);color:var(--ux-text)}
.editor-preview{border:1px solid var(--ux-line);padding:20px;max-height:520px;overflow:auto}.forum-search-v167{margin:24px 0}.forum-search-v167 label{display:block;margin-bottom:8px}.forum-search-v167>div{display:flex;gap:10px;align-items:center}.forum-search-v167 input[type=search]{flex:1;min-width:0;min-height:46px;border-radius:12px;padding:10px}
@media(max-width:720px){.forum-categories{display:flex!important;gap:8px;overflow-x:auto;align-items:center;padding:12px!important;max-width:100%}.forum-categories h3{display:none}.forum-categories a{white-space:nowrap;flex:0 0 auto;min-height:44px}.forum-layout{display:block!important}.forum-search-v167>div{flex-wrap:wrap}.forum-search-v167 input[type=search]{flex-basis:65%}.forum-editor-grid{grid-template-columns:1fr!important}.knowledge-main-post{padding:20px!important}.forum-topic-editor{padding:12px!important}.article-toc{padding:14px}}
