/* E / H: прежние фоны и текст, спокойное серебро для действий и линий. */
:root,[data-theme="light"]{
 color-scheme:light;
 --bg:#F8F6F1;--surface:#EFEBE3;--line:#BAB7B3;--control-line:#6A6763;--text-2:#6B5B4D;--text:#1F1D1B;
 --action:#D8D5D0;--on-action:#1F1D1B;--success:#2F6B3F;--error:#B3261E;
 --glass:rgba(31,29,27,.06);--glass-line:rgba(31,29,27,.12);
 --hero-top:74%;--hero-middle:67%;--hero-bottom:92%;
}
[data-theme="dark"]{
 color-scheme:dark;
 --bg:#181311;--surface:#231B17;--line:#746F6B;--control-line:#96938F;--text-2:#BDB09C;--text:#F2EADC;
 --action:#8E8B87;--on-action:#181311;--success:#6FBF86;--error:#F0837A;
 --glass:rgba(255,255,255,.08);--glass-line:rgba(255,255,255,.18);
 --hero-top:80%;--hero-middle:74%;--hero-bottom:96%;
}
:root{--corner:4px;--hero-text:#F2EADC;--hero-base:#181311;--scrim:color-mix(in srgb,var(--hero-base) 72%,transparent);--shadow-color:color-mix(in srgb,var(--hero-base) 24%,transparent)}
html,body{background:var(--bg);color:var(--text)}
.theme-tools{display:flex;align-items:center;gap:.5rem;margin-inline-start:auto}
.theme-toggle{width:40px;height:40px;min-width:40px;min-height:40px;padding:0;display:inline-grid;place-items:center;flex:none;cursor:pointer;color:var(--text);background:var(--glass);border:1px solid var(--line);border-radius:var(--corner)}
.theme-toggle[hidden]{display:none!important}
.theme-toggle svg{width:18px;height:18px;display:block}
[data-theme="dark"] .theme-toggle .theme-moon,:root:not([data-theme="dark"]) .theme-toggle .theme-sun{display:none}
.theme-toggle:hover{background:var(--surface)}
:is(.theme-hub,.theme-workshop,.theme-cabinet,.theme-admin) :is(a,button,input,select,textarea,[tabindex]):focus-visible{
 outline:2px solid var(--text);outline-offset:2px;
}
.hero :is(a,button):focus-visible,.header:not(.is-scrolled) :is(a,button):focus-visible{outline-color:var(--hero-text)}
:is(.theme-primary,.theme-workshop .btn--primary,.theme-admin .login .btn[type="submit"],.theme-cabinet .login button[type="submit"]){
 background:var(--action);color:var(--on-action);border:1px solid var(--control-line);border-radius:var(--corner);min-height:48px;font-weight:500;filter:none;
}
:is(.theme-primary,.theme-workshop .btn--primary,.theme-admin .login .btn[type="submit"],.theme-cabinet .login button[type="submit"]):hover{
 background:var(--action);color:var(--on-action);filter:brightness(.92);transform:none;
}
.theme-workshop .hero__overlay{
 background:linear-gradient(180deg,color-mix(in srgb,var(--hero-base) var(--hero-top),transparent),color-mix(in srgb,var(--hero-base) var(--hero-middle),transparent) 42%,color-mix(in srgb,var(--hero-base) var(--hero-bottom),transparent));
}
.theme-workshop :is(.hero,.header:not(.is-scrolled)){color:var(--hero-text);--accent-soft:var(--hero-text)}
.theme-workshop :is(.hero h1,.hero .kicker,.hero__lead,.hero__facts b,.hero__facts span,.header:not(.is-scrolled) .logo__text){color:var(--hero-text)}
.theme-workshop .header:not(.is-scrolled) :is(.theme-toggle,.workshop-menu-toggle){color:var(--hero-text);background:var(--scrim)}
.theme-workshop .header.is-scrolled{background:var(--surface);color:var(--text)}
.theme-workshop .header .workshop-menu-toggle{background:var(--glass);color:inherit;border:1px solid var(--line)}
.theme-workshop .hero__request{margin-top:1.25rem;padding-inline:1.45rem;width:max-content;max-width:100%;font-size:.95rem;letter-spacing:0;text-transform:none}
.theme-workshop :is(.form__status.is-ok,.detail__status.is-ok){color:var(--success)}
.theme-workshop :is(.form__status.is-error,.field__error){color:var(--error)}
:is(.theme-workshop,.theme-admin,.theme-cabinet) :is(.field input,.field select,.field textarea,.form .field textarea,.login__field input,.search input,.dialog textarea,.detail__comment){background:var(--bg);color:var(--text);border-color:var(--control-line);caret-color:var(--text)}
:is(.theme-workshop,.theme-admin,.theme-cabinet) :is(input,textarea)::placeholder{color:var(--text-2);opacity:1}
:is(.theme-workshop,.theme-admin,.theme-cabinet) .field.has-error :is(input,select,textarea){border-color:var(--control-line);border-style:dashed}
.theme-hub .wk-rule{margin-block:1.1rem 1.6rem}
.theme-hub .masthead__inner{gap:.6rem}
.theme-hub .wk-menu-trigger{margin-inline-start:0}
@media(max-width:640px){
 .theme-hub .wk-panel{padding-block:1.85rem}
 .theme-workshop .hero{padding-block:6rem 1.65rem;min-height:0}
 .theme-workshop .hero__lead{margin-top:.9rem}
 .theme-workshop .hero__facts{margin-top:1.35rem;padding-top:.8rem}
}
.admin-theme-bar{position:fixed;z-index:55;right:1rem;top:.7rem}
.theme-admin .top{padding-inline-end:4rem}
.theme-cabinet .theme-toggle{background:var(--glass);border:1px solid var(--line)}
@media(max-width:420px){
 .theme-workshop .hero__facts b{font-size:clamp(1rem,4.85vw,1.2rem);overflow-wrap:anywhere}
 .theme-workshop .hero__facts span{overflow-wrap:anywhere}
}
/* Works uses the same 9:16 image treatment inline and inside the large viewer. */
.theme-workshop :is(#works,#portfolio) .work__media{--portrait-width:min(100%,56.25vh)}
@supports(height:100dvh){.theme-workshop :is(#works,#portfolio) .work__media{--portrait-width:min(100%,56.25dvh)}}
.theme-workshop :is(#works,#portfolio) .work__slider{width:var(--portrait-width);height:auto;min-height:0;max-height:none;aspect-ratio:9 / 16;border:0;border-radius:0;box-shadow:none;margin:0 auto;background:var(--hero-base,var(--surface))}
.theme-workshop :is(#works,#portfolio) .work__slider:focus-visible{outline-offset:-3px}
.theme-workshop :is(#works,#portfolio) .work__slide img{display:block;width:100%;height:100%;object-fit:cover;object-position:center;background:transparent;border:0;border-radius:0}
.theme-workshop :is(#works,#portfolio) .work__bar{width:var(--portrait-width);margin:0 auto;min-height:44px;gap:.35rem;justify-content:space-between}
.theme-workshop :is(#works,#portfolio) .work__counter{position:static;margin:0;padding:0;background:none;border:0;border-radius:0;box-shadow:none;color:var(--text-2)}
.theme-workshop :is(#works,#portfolio) .work__dots{gap:0}
.theme-workshop :is(#works,#portfolio) .work__dot{display:grid;place-items:center;width:44px;height:44px;margin:0;padding:0;border:0;background:none;box-shadow:none}
.theme-workshop :is(#works,#portfolio) .work__dot::before{content:"";width:18px;height:2px;background:var(--text-2)}
.theme-workshop :is(#works,#portfolio) .work__dot.is-active::before{width:30px;background:var(--text)}
.theme-workshop :is(#works,#portfolio) .work__dot:focus-visible{outline-offset:-3px}
.theme-workshop .split__media img{width:100%;height:auto;aspect-ratio:1;border-radius:var(--corner)}
.theme-workshop .split__media::after{border-color:var(--line)}
.theme-admin .btn--danger{border-color:var(--control-line)}
