/* A consistent vertical day/night control on every public page. */
.header .ap-theme-toggle{display:flex;flex:0 0 30px;flex-direction:column;align-items:center;gap:2px;width:30px;padding:2px;border:1px solid var(--ap-border,#40584c);border-radius:8px;direction:ltr}
.header .ap-theme-button{display:flex;align-items:center;justify-content:center;width:24px;height:28px;min-height:28px;margin:0;padding:3px;border:0;border-radius:5px;background:transparent;color:var(--ap-muted,#b4c4ba);cursor:pointer;line-height:1}
.header .ap-theme-button svg{display:block;flex:0 0 auto;width:19px;height:19px;pointer-events:none}
.header .ap-theme-button:hover{background:#ffffff0d;color:var(--ap-ink,#eef4ef)}
.header .ap-theme-button[aria-pressed="true"]{background:#365541;color:#eef5e9}
.header .ap-theme-button:focus-visible{outline:2px solid var(--ap-focus,#d4e5da);outline-offset:3px}
@media(max-width:760px){
 .header{grid-template-columns:30px auto minmax(0,1fr) auto;column-gap:8px}
 .header .ap-theme-toggle{grid-column:1;grid-row:1/3;align-self:center}
 .header .brand{grid-column:2;grid-row:1/3}
 .header .language-switch{grid-column:3;grid-row:1}
 .header .login{grid-column:3;grid-row:2}
 .header .menu{grid-column:4;grid-row:1/3}
}
@media(max-width:380px){
 .header{grid-template-columns:24px 64px minmax(0,1fr) 24px;column-gap:6px}
 .header .brand img{width:64px}
 .header .ap-theme-toggle{width:24px;flex-basis:24px;padding:1px}
 .header .ap-theme-button{width:20px;height:27px;min-height:27px;padding:2px}
 .header .ap-theme-button svg{width:17px;height:17px}
 .header .language-switch{padding:2px;gap:1px}
 .header .language-switch a{min-width:24px;padding:2px;font-size:10px}
 .header .menu{width:24px;padding-inline:0}
}
@media print{.ap-theme-toggle{display:none!important}}

/* Print styles remain separate; only the on-screen palette changes. */
@media screen{
 html[data-theme="dark"]{color-scheme:dark}
 html[data-theme="light"]{
  color-scheme:light;
  --ap-button-ink:#fff;--ap-accent-ink:#fff;
  --ap-mystic:#477061;--ap-night:#edf4ed;
  --ap-ink:#20382d;--ap-muted:#49614f;--ap-label:#476653;--ap-link:#285d43;--ap-focus:#2a6848;
  --ap-canvas:#f6f9f4;--ap-paper:#fff;--ap-surface:#eaf1e8;--ap-border:#a8bdab;
  --ap-accent:#365f43;--ap-accent-light:#376842;--ap-accent-hover:#284d35;
  --ap-on-dark:#20382d;--ap-on-dark-muted:#49614f;
 }
 html[data-theme="light"] body{background:var(--ap-canvas);color:var(--ap-ink)}
 html[data-theme="light"]{--ap-device-accent:#376842}
 html[data-theme="light"] .header{background:linear-gradient(115deg,#fff,#edf4ed);border-color:var(--ap-border);box-shadow:0 4px 18px #20382d12}
 html[data-theme="light"] .header .brand img,
 html[data-theme="light"] footer>img[alt="Almaty Project"]{filter:brightness(0) saturate(100%);opacity:.85}
 html[data-theme="light"] .header .login{background:#e4eee4;border-color:#91ac96;color:var(--ap-ink)}
 html[data-theme="light"] .header .login:hover{background:#d5e4d5}
 html[data-theme="light"] .header nav.open{background:#fff}
 html[data-theme="light"] .language-switch a{color:var(--ap-muted)}
 html[data-theme="light"] .language-switch a[aria-current],
 html[data-theme="light"] .header .ap-theme-button[aria-pressed="true"]{background:#365f43;color:#fff}
 html[data-theme="light"] .language-switch a:hover,
 html[data-theme="light"] .header .ap-theme-button:hover{background:#dbe8db;color:#20382d}
 html[data-theme="light"] .header .ap-theme-button[aria-pressed="true"]:hover{background:#284d35;color:#fff}
 html[data-theme="light"] :is(.hero,.home .hero){color:var(--ap-ink);background:radial-gradient(ellipse at 76% 10%,#cadfcd77,transparent 58%),linear-gradient(122deg,#f9fcf7,#e8f1e7 58%,#e0ecdf);box-shadow:inset 0 1px 0 #fff}
 html[data-theme="light"] :is(.hero .lead,.hero-bottom,.visual-top,.visual-caption){color:var(--ap-muted)}
 html[data-theme="light"] :is(.visual,.engineering-map){background:linear-gradient(140deg,#eef5eb,#ddeadd);border-color:#98b29b;color:var(--ap-ink);box-shadow:0 15px 35px #20382d0d}
 html[data-theme="light"] :is(.node,.engineering-step){background:#f8fcf5;border-color:#93af97;color:var(--ap-ink)}
 html[data-theme="light"] :is(.visual-top,.visual-caption,.hero-bottom,.engineering-map-heading,.engineering-panel+.engineering-panel,.engineering-map-note){border-color:var(--ap-border)}
 html[data-theme="light"] .network{background-image:radial-gradient(#78978255 1px,transparent 1px)}
 html[data-theme="light"] .bars i:nth-child(2n){background:#8ca994}
 html[data-theme="light"] .engineering-tabs{background:#dfeade;border-color:#b5c9b7}
 html[data-theme="light"] .engineering-tabs button{color:var(--ap-muted)}
 html[data-theme="light"] .engineering-tabs button:hover{background:#d0e1d0;color:var(--ap-ink)}
 html[data-theme="light"] .engineering-tabs button[aria-selected="true"]{background:#365f43;border-color:#365f43;color:#fff}
 html[data-theme="light"] .engineering-highlight{background:#f6faf2;border-color:#9db69e;color:var(--ap-ink)}
 html[data-theme="light"] .engineering-highlight:hover{background:#e6f0e2;border-color:#63866a}
 html[data-theme="light"] .engineering-chain>li:not(:last-child)::before{background:linear-gradient(#7b9d81,#bfd2c1)}
 html[data-theme="light"] .equipment{background:linear-gradient(130deg,#e9f1e6,#f1f7ed)}
 html[data-theme="light"] :is(.home .software-card,.home .equipment-grid>article,.solutions-grid>article){background:linear-gradient(140deg,#fff,#edf4e9);border-color:var(--ap-border);color:var(--ap-ink)}
 html[data-theme="light"] :is(.device-art,.device-art.catalog-photo){background:#e5eee4}
 html[data-theme="light"] :is(.alpha,.related-software){background:linear-gradient(135deg,#f8fcf5,#e7f0e3);border-color:var(--ap-border);color:var(--ap-ink)}
 html[data-theme="light"] :is(.integration,.portal,.software-support){background:#e5efe2;color:var(--ap-ink);border-color:var(--ap-border)}
 html[data-theme="light"] :is(.button.primary,.primary.button){background:#365f43;border-color:#365f43;color:#fff}
 html[data-theme="light"] :is(.button.primary,.primary.button):hover{background:#284d35;color:#fff}
 html[data-theme="light"] :is(.model-code-example,.variant-legend){background:linear-gradient(135deg,#fff,#eaf3e5);border-color:var(--ap-border)}
 html[data-theme="light"] .spec-table thead{background:#dbe8da;color:var(--ap-ink)}
 html[data-theme="light"] .spec-table tbody tr:nth-child(even){background:#edf4e9}
 html[data-theme="light"] .carousel-controls button{background:#f7fbf4;border-color:#789b7e;color:#285d43}
 html[data-theme="light"] .carousel-controls button:hover:not(:disabled){background:#dcebd8;border-color:#5b8063;color:#20382d}
 html[data-theme="light"] .kosmotronika-logo{mix-blend-mode:normal}
 html[data-theme="light"] footer{background:linear-gradient(110deg,#edf4e8,#e0ebdc);color:var(--ap-muted);border-color:var(--ap-border)}
 html[data-theme="light"] footer a{color:var(--ap-link)}

 /* Equipment and software configurators share these semantic colors. */
 html[data-theme="light"] .questionnaire-content{
  --bg:#f6f9f2;--panel:#fff;--panel2:#eaf2e4;--line:#afc2ad;--ink:#20382d;--muted:#536c59;
  --accent:#376842;--accent2:#2b5636;--warm:#856123;--red:#a03932;
  background:var(--bg);color:var(--ink);
 }
 html[data-theme="light"] .questionnaire-content .hero{background:transparent;box-shadow:none}
 html[data-theme="light"] .questionnaire-content :is(select,input,textarea){background:#fbfdf8;border-color:#9db79c;color:var(--ink)}
 html[data-theme="light"] .questionnaire-content select option{background:#fff;color:var(--ink)}
 html[data-theme="light"] .questionnaire-content :is(input,textarea)::placeholder{color:#687f6a}
 html[data-theme="light"] .questionnaire-content :is(input[type="checkbox"],input[type="radio"]){accent-color:#376842}
 html[data-theme="light"] .questionnaire-content :is(.preset:hover,.preset[aria-pressed="true"],.module-choice.chosen,.module-group.has-included){background:#e5f0de;border-color:#6e9767}
 html[data-theme="light"] .questionnaire-content :is(.fixed,.position){background:#eaf2e4;border-color:var(--line);color:var(--ink)}
 html[data-theme="light"] .questionnaire-content .result{background:linear-gradient(145deg,#eaf3df,#f8fcf3);border-color:#829d70;color:var(--ink)}
 html[data-theme="light"] .questionnaire-content :is(.result-top,.note,.output-actions,.request-actions,.ap-feedback){border-color:#a4bea0}
 html[data-theme="light"] .questionnaire-content .order-code{color:#315f32}
 html[data-theme="light"] .questionnaire-content .btn{background:#eef5e8;border-color:#91ac88;color:#20382d}
 html[data-theme="light"] .questionnaire-content .btn:hover{background:#dcebd4;color:#20382d}
 html[data-theme="light"] .questionnaire-content .btn.primary{background:#376842;border-color:#376842;color:#fff}
 html[data-theme="light"] .questionnaire-content .error{color:#a03932}
 html[data-theme="light"] .questionnaire-content #copy-fallback{background:#fff;color:#20382d;border-color:#8aaa86}
 html[data-theme="light"] :is(#code-tooltip.code-tooltip,.questionnaire-content .code-tooltip){background:#fff;color:#20382d;border-color:#6f9568;box-shadow:0 8px 24px #20382d24}
 html[data-theme="light"] .questionnaire-content :is(.tooltip-position,.tooltip-value){color:#315f32}
 html[data-theme="light"] .questionnaire-content .code-char:is(:hover,:focus-visible){background:#dbead2;color:#20382d}

 /* Request controls and basket remain readable outside configurators, too. */
 html[data-theme="light"] .ap-feedback{border-color:#a4bea0}
 html[data-theme="light"] .ap-feedback-btn{background:#edf4e7;color:#20382d;border-color:#8eab85}
 html[data-theme="light"] .ap-feedback-btn:hover{background:#dcebd4}
 html[data-theme="light"] .ap-feedback-btn.primary{background:#376842;color:#fff;border-color:#376842}
 html[data-theme="light"] :is(.ap-feedback-status,.ap-cart-remove,.ap-cart-review-link){color:#315f32}
 html[data-theme="light"] :is(.ap-feedback-email-note,.ap-cart-intro,.ap-cart-item pre,.ap-cart-empty){color:#536c59}
 html[data-theme="light"] .ap-cart-shell{color:#20382d}
 html[data-theme="light"] .ap-cart-item{background:#fff;border-color:#afc2ad}
 html[data-theme="light"] .ap-cart-item input{background:#fbfdf8;color:#20382d;border-color:#8eab85}
 html[data-theme="light"] .ap-cart-review{color:#79541b}
 html[data-theme="light"] .ap-cart-item-invalid{border-color:#b88c48}
 html[data-theme="light"] .ap-cart-pill{box-shadow:0 4px 20px #20382d38}
 html[data-theme="light"] .ap-cart-pill:focus-visible{outline-color:#376842}

 /* The legal-address news retains its own geometry and all existing translations. */
 html[data-theme="light"] dialog[data-address-notice]{background:#f9fcf6;color:#20382d;border-color:#8eaa91;box-shadow:0 24px 90px #20382d50}
 html[data-theme="light"] [data-address-notice] .address-notice-heading{background:linear-gradient(115deg,#e2eedf,#f4f9ef);border-color:#adc2ad}
 html[data-theme="light"] [data-address-notice] :is(.address-notice-title,.address-notice-intro,.address-notice-address,.address-notice-correspondence-address){color:#20382d}
 html[data-theme="light"] [data-address-notice] :is(.address-notice-kicker,.address-notice-copy-status){color:#376842}
 html[data-theme="light"] [data-address-notice] :is(.address-notice-date,.address-notice-unchanged,.address-notice-file-meta){color:#536c59}
 html[data-theme="light"] [data-address-notice] .address-notice-address-label{color:#42694a}
 html[data-theme="light"] [data-address-notice] .address-notice-address-box{background:#fff;border-color:#a6bea1;border-inline-start-color:#376842}
 html[data-theme="light"] [data-address-notice] .address-notice-languages{border-color:#8eaa91}
 html[data-theme="light"] [data-address-notice] .address-notice-languages button{color:#536c59}
 html[data-theme="light"] [data-address-notice] .address-notice-languages button:hover{background:#e1edda;color:#20382d}
 html[data-theme="light"] [data-address-notice] .address-notice-languages button[aria-pressed="true"]{background:#376842;color:#fff}
 html[data-theme="light"] [data-address-notice] :is(.address-notice-copy,.address-notice-close){background:#e7f0e1;color:#315d3c;border-color:#91ac8b}
 html[data-theme="light"] [data-address-notice] :is(.address-notice-copy,.address-notice-close):hover{background:#d4e5cd;color:#20382d}
 html[data-theme="light"] [data-address-notice] .address-notice-download{background:#376842;border-color:#376842;color:#fff}
 html[data-theme="light"] [data-address-notice] .address-notice-download:hover{background:#284d35;border-color:#284d35;color:#fff}
 html[data-theme="light"] [data-address-notice] :is(button,a):focus-visible{outline-color:#376842}
}
