/* Dark engineering studio. Decorative fields are static background layers,
   below content and images. Layout and photographic assets are shared with light. */
html[data-theme=dark]{color-scheme:dark;--navy:#141619;--navy2:#1d2125;--ink:#f3f1eb;--muted:#b6bcb7;--line:#3d4447;--blue:#efac96;--cyan:#efac96;--paper:#242a2d;--white:#141619;--red:#b1372d;--air:#83c9db;--heat:#efa282;--electric:#b4ce87;--accent:#efac96;--soft:#a9b2ac;--surface:#1d2125;--raised:#272d30}
html[data-theme=dark] ::selection{background:#b1372d;color:#fff}
html[data-theme=dark] :is(body,.editorial-hero,footer){background:#141619;color:var(--ink)}
html[data-theme=dark] header{background:#141619f5;color:var(--ink);border-color:var(--line)}
html[data-theme=dark] :is(.brand,.menu-toggle,.footer-top>div a,.requisites dd){color:var(--ink)}
html[data-theme=dark] :is(.brand>span,.footer-top .brand>span,.eyebrow,.text-link,.card .index,.mini-icon,.milestone-state.current,.hero h1 em,.heat-story h2 em,.dialogue-cta .eyebrow,.cta .eyebrow,.director-contact a){color:var(--accent)}
html[data-theme=dark] :is(.brand small,.section-title>p,.page-head .lead,.hero-copy>p,.editorial-intro p,.application-copy p,.heat-story p,.team-section .section-title>p,.team-grid .person-info p,.team-grid.compact .person-info p,.dialogue-cta p,.card p,.news-card p,.heat-benefit p,.heat-benefit p+p,.contact-live p,.director-contact>p){color:var(--muted)}
html[data-theme=dark] :is(.hero .eyebrow,.hero-stage,.hero-bottom p,.metric-note,.art-label,.hero-art figcaption,.visual-caption,.portrait-note,.heat-story .eyebrow,.team-grid .person-info .person-patronymic,.team-grid .person-detail,.footer-top p,.footer-bottom,.requisites dt,.contact-info .small,.telegram-options small,.director-contact dt,.communication-actions>.assistant-caption,.communication-actions>.channel-caption){color:var(--soft)}
html[data-theme=dark] :is(.header-inner nav a:hover,.header-inner nav a[aria-current],.footer-top a:hover,.team-grid .person-info .eyebrow,.team-grid.compact .person-info .eyebrow){color:var(--accent)}
html[data-theme=dark] .header-inner nav{border-color:var(--line)}
html[data-theme=dark] .header-inner nav .nav-contact{background:transparent;border-color:var(--line)}
html[data-theme=dark] .button{background:var(--red);color:#fff}
html[data-theme=dark] :is(.button:hover,.hero .button:not(.outline):hover){background:#c9473b}
html[data-theme=dark] :is(.button.outline,.button.outline-dark){background:transparent;border-color:#69706f;color:var(--ink)}
html[data-theme=dark] :is(.button.outline:hover,.button.outline-dark:hover,.hero .actions [data-chat-open]:hover){background:var(--raised);border-color:#a9b2ac}
html[data-theme=dark] .hero .actions [data-chat-open]{background:transparent;color:var(--ink)}
html[data-theme=dark] .publication-design .hero-art{background:#202427}
html[data-theme=dark] .publication-design .hero-art:before{background:linear-gradient(180deg,#141619b3,transparent 20%,transparent 82%,#141619b3)}
html[data-theme=dark] .publication-design .hero-art img{filter:none}
html[data-theme=dark] .publication-design .hero-art .hero-workshop-light{display:none}
html[data-theme=dark] .publication-design .hero-art .hero-workshop-dark{display:block}
html[data-theme=dark] .hero-art:after{border-color:#b9c3bb40}
html[data-theme=dark] .page-head:after{color:#747e78}
html[data-theme=dark] .status-dot{background:#c89d82;box-shadow:0 0 0 4px #c89d8218}
html[data-theme=dark] .application-image{background:var(--surface)}
html[data-theme=dark] :is(.heat-story,.team-section,.project-strip,.dialogue-cta,.cta,.heat-benefit){background:var(--surface);color:var(--ink);border-color:var(--line)}
html[data-theme=dark] .heat-stream.hot{color:var(--heat)}
html[data-theme=dark] .heat-stream.cold{color:var(--air)}
html[data-theme=dark] .heat-core{border-color:var(--line)}
html[data-theme=dark] .heat-core>span{color:var(--ink)}
html[data-theme=dark] .heat-core small{color:var(--soft)}
html[data-theme=dark] .heat-fins{background:repeating-linear-gradient(110deg,transparent 0,transparent 9px,#b1896566 10px,#c0b9a7 11px,#373934 14px,transparent 16px),linear-gradient(90deg,#263d46,#464139,#573827)}
html[data-theme=dark] :is(.project-milestones>div,.principles article,.team-grid .person-detail,.hero-bottom>div,.spec-row,.footer-bottom,.director-contact,.document-row,.requisites>div){border-color:var(--line)}
html[data-theme=dark] :is(.application-secondary>a>span:last-child,.doc-symbol){color:var(--accent)}
html[data-theme=dark] .milestone-state{color:#bbc3b7}
html[data-theme=dark] .project-milestones small{color:var(--soft)}
html[data-theme=dark] .milestone-state.done{color:#b8cfad}
html[data-theme=dark] .milestone-state.current{color:var(--accent)}
html[data-theme=dark] .principles article>span{color:var(--accent)}
html[data-theme=dark] #form-result{background:#28362d;border-color:#7c9c81;color:#edf5e9}
html[data-theme=dark] #form-result[data-error=true]{background:#3b2724;border-color:#d7907e;color:#ffe0d7}
html[data-theme=dark] #form-result:focus{outline-color:var(--accent)}
html[data-theme=dark] .telegram-options>a{border-color:#69706f;color:var(--ink)}
html[data-theme=dark] .telegram-options>a:hover{background:var(--raised);border-color:#a9b2ac}
html[data-theme=dark] :is(.card,.roadmap-track,.current-stage){background:var(--surface);border-color:var(--line)}
html[data-theme=dark] .roadmap-track li{border-color:#58645c}
html[data-theme=dark] .roadmap-track li:before{background:#a5bc8b}
html[data-theme=dark] .roadmap-track li>span{color:var(--soft)}
html[data-theme=dark] .testing-loop{background:#242c27;border-color:#53604e}
html[data-theme=dark] :is(.note,.form-note){background:#292925;color:#d4d2c6;border-color:#b88e6d}
html[data-theme=dark] .form-note p{color:#d0d3c8}
html[data-theme=dark] :is(.pill,.pill.neutral){background:#303a2e;color:#d0d9c4}
html[data-theme=dark] .news-visual{background:#26332c;color:#c8d4bb;border-color:#67745d}
html[data-theme=dark] .news-visual.secondary{background:#372d27;color:#e1c0a4;border-color:#856c5a}
html[data-theme=dark] :is(input,select,textarea){background:#191e21;border-color:#69716a;color:var(--ink)}
html[data-theme=dark] :is(input,textarea)::placeholder{color:#a4aca5;opacity:1}
html[data-theme=dark] :is(input,select,textarea):focus{border-color:var(--accent);outline-color:var(--accent)}
html[data-theme=dark] :is(.filters button,.back-link){color:var(--soft);border-color:var(--line)}
html[data-theme=dark] .filters button[aria-pressed=true]{background:var(--raised);color:var(--ink);border-color:var(--accent)}
html[data-theme=dark] :is(a,button,summary):focus-visible{outline-color:var(--accent)}
/* All states of the interactive cycle, not just the surrounding panel. */
html[data-theme=dark] .cycle-interactive{background:var(--surface);color:var(--ink);border-color:var(--line)}
html[data-theme=dark] :is(.cycle-toolbar,.cycle-key,.cycle-navigation){color:var(--soft);border-color:var(--line)}
html[data-theme=dark] .motion-toggle{background:#242b26;color:var(--ink);border-color:#79866d}
html[data-theme=dark] .motion-toggle strong{color:#b5c8a0}
html[data-theme=dark] .motion-toggle[aria-pressed=true]{background:#33422c;border-color:#a7bd8d}
html[data-theme=dark] .motion-toggle[aria-pressed=true] strong{color:#d4e6b8}
html[data-theme=dark] .cycle-svg text{fill:var(--ink)}
html[data-theme=dark] .cycle-svg .flow-label{fill:var(--soft)}
html[data-theme=dark] .cycle-node>rect{fill:#242b2c;stroke:#7c8b7b}
html[data-theme=dark] .cycle-node.active>rect{fill:#344230;stroke:#bfd1a5}
html[data-theme=dark] :is(.cycle-node .node-index,.cycle-node.active .node-index){fill:#bfccae}
html[data-theme=dark] .node-glyph{stroke:#c1cdb5}
html[data-theme=dark] .cycle-tabs{background:#202824}
html[data-theme=dark] .cycle-tabs button{border-color:#505c4d;color:#cad2c2}
html[data-theme=dark] .cycle-tabs button span{color:#a9b59b}
html[data-theme=dark] .cycle-tabs button[aria-selected=true]{background:#35442e;border-color:#a7bd8d;color:#f2f4ed}
html[data-theme=dark] .cycle-tabs button[aria-selected=true] span{color:#cfdfba}
html[data-theme=dark] .cycle-panel{background:#191e21;color:var(--ink)}
html[data-theme=dark] .cycle-number{color:#b2bea3}
html[data-theme=dark] .cycle-panel p{color:var(--muted)}
html[data-theme=dark] .cycle-navigation button{background:#252e26;color:#e0e6d7;border-color:#879b74}
html[data-theme=dark] .cycle-navigation [role=status]{color:#bdc9b1}
html[data-theme=dark] .mobile-cycle rect{fill:#344230;stroke:#b8cd9a}
html[data-theme=dark] .mobile-cycle g{stroke:#c9dbb0}
html[data-theme=dark] .mobile-flow-label{color:#c4d1b6}
/* Shared chat and its profile are also part of the selected theme. */
html[data-theme=dark] .kx-chat-toggle{background:#272e2b;color:#f0f3e9;border-color:#718066;box-shadow:0 5px 22px #0005}
html[data-theme=dark] .kx-chat-toggle.has-reply{background:#b1372d;border-color:#e58d77;color:white}
html[data-theme=dark] .kx-chat{background:#181e1b;color:#edf1e8;border-color:#68795d;box-shadow:0 20px 80px #0008}
html[data-theme=dark] .kx-chat-head{background:#263027;border-color:#4b5946}
html[data-theme=dark] .kx-chat-head button{color:#e1e8d9}
html[data-theme=dark] :is(.kx-chat-head small,.kx-memory-note,.kx-chat-bottom button,.kx-profile p){color:#bbc8b2}
html[data-theme=dark] .kx-message{background:#2b3529;color:#edf2e5}
html[data-theme=dark] .kx-message.user{background:#49372f;color:#fae9dc}
html[data-theme=dark] .kx-message.pending{color:#c5d2ba}
html[data-theme=dark] .kx-message.arrived{animation:none;box-shadow:inset 3px 0 #a6bf8d}
html[data-theme=dark] .kx-message.pending:after{background:#bccfaa}
html[data-theme=dark] .kx-chat-suggestions button{background:#222c23;color:#d2e1c3;-webkit-text-fill-color:#d2e1c3;border-color:#7a8d6c}
html[data-theme=dark] .kx-chat-form{border-color:#54634d}
html[data-theme=dark] :is(.kx-chat-form textarea,.kx-profile input:not([type=checkbox])){background:#151b16;color:#f0f5e9;border-color:#7b8d6d}
html[data-theme=dark] .kx-chat-bottom .kx-telegram{color:#d2e1c3;border-color:#718267}
html[data-theme=dark] :is(.kx-chat-bottom .kx-telegram:hover,.kx-chat-bottom .kx-telegram:focus-visible){background:#33432c;outline-color:#b4c89d}
html[data-theme=dark] .kx-new-reply{background:#aec78d;color:#192013;border-color:#aec78d}
html[data-theme=dark] .kx-profile{background:#181e1b;color:#edf1e8}
html[data-theme=dark] .kx-profile button{background:#2b3828;color:#e3eed6;border-color:#8da476}

/* Material vocabulary: fine grain, engraved arcs and directed light.
   Keep the image URLs relative: both theme directories load this stylesheet. */
html[data-theme=dark]{
 --graphite-grain:url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='180' height='180' viewBox='0 0 180 180'%3E%3Cfilter id='grain'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='.82' numOctaves='3' stitchTiles='stitch'/%3E%3CfeColorMatrix type='saturate' values='0'/%3E%3CfeComponentTransfer%3E%3CfeFuncA type='linear' slope='.13'/%3E%3C/feComponentTransfer%3E%3C/filter%3E%3Cpath fill='%23fff' filter='url(%23grain)' d='M0 0h180v180H0z'/%3E%3C/svg%3E");
 --engraved-field:url('./dark-field.svg');
 --thermal-flow:url('./dark-flow.svg');
}
html[data-theme=dark] body{
 background-image:var(--graphite-grain),repeating-linear-gradient(90deg,transparent 0 127px,#c5d1d504 127px 128px);
 background-size:180px 180px,auto;
}
html[data-theme=dark] header{
 background:linear-gradient(115deg,#26282af5,#141619f5 65%);
 box-shadow:0 10px 35px #0002,inset 0 1px #dbe0dc09;
}
html[data-theme=dark] .header-inner nav{background:transparent}
html[data-theme=dark] .editorial-hero{
 background-color:#141619;
 background-image:var(--graphite-grain),var(--engraved-field),radial-gradient(ellipse at 8% 10%,#60504455,transparent 53%),linear-gradient(115deg,#20262a,#141619 55%,#22292d);
 background-size:180px 180px,1020px 850px,auto,auto;
 background-position:0 0,-460px -180px,0 0,0 0;
 background-repeat:repeat,no-repeat,no-repeat,no-repeat;
}
html[data-theme=dark] .editorial-hero h1{text-shadow:0 3px 30px #0005}
html[data-theme=dark] .editorial-hero .hero-copy h1 em{color:#f2b49d}
html[data-theme=dark] .editorial-hero .hero-copy .eyebrow{color:#d2b6a5}
html[data-theme=dark] .publication-design .hero-art{
 background:#202427;
 box-shadow:-28px 20px 70px #0003,inset 1px 0 #b9c3bb20;
}
html[data-theme=dark] .publication-design .hero-art:before{
 background:linear-gradient(90deg,#191d2080,transparent 18%),linear-gradient(180deg,#14161990,transparent 18%,transparent 80%,#141619b3);
}
html[data-theme=dark] .hero-art:after{border-color:#d3d7cf70}
html[data-theme=dark] .hero-art :is(.art-label,figcaption){color:#e2e0d5;text-shadow:0 1px 4px #000,0 0 16px #000}
html[data-theme=dark] .hero-bottom{
 background:linear-gradient(110deg,#ffffff04,transparent 60%);
 border-top:1px solid #a9b0aa38;
}
html[data-theme=dark] .hero-bottom>div{border-top:0}
html[data-theme=dark] .hero-bottom strong{text-shadow:0 2px 25px #d8c0a01c}
html[data-theme=dark] .metric-note{border-bottom-color:#a9b0aa38}
/* A cropped turbine section occupies the previously empty introductory margin. */
html[data-theme=dark] .editorial-intro{
 background-image:var(--engraved-field),radial-gradient(ellipse at 0% 50%,#3e4e543f,transparent 60%);
 background-size:600px 500px,auto;
 background-position:-235px 45%,0 0;
 background-repeat:no-repeat;
}
html[data-theme=dark] .application-section{
 background-image:linear-gradient(125deg,transparent 5%,#90a6b708 42%,transparent 70%);
}
html[data-theme=dark] .application-image{
 border:1px solid #adbfc33d;
 box-shadow:0 18px 42px #0006;
}
html[data-theme=dark] .application-copy{
 background:linear-gradient(150deg,#c5d8df09,transparent 68%);
 border-color:#62727880;
 padding-inline:20px;
}
html[data-theme=dark] .application-card:hover .application-image{border-color:#dca08890}
/* Heat has its own flow geometry and cold/warm lighting, not the hero's rings. */
html[data-theme=dark] :is(.heat-story,.heat-benefit){
 --muted:#ced2cf;--soft:#c3cbc6;--line:#536266;
 background-color:#263238;
 background-image:var(--graphite-grain),var(--thermal-flow),radial-gradient(ellipse at 100% 80%,#8b4a2b66,transparent 63%),linear-gradient(110deg,#26343b,#222a2e 48%,#332c29);
 background-size:180px 180px,cover,auto,auto;
 background-position:0 0,center,0 0,0 0;
 background-repeat:repeat,no-repeat,no-repeat,no-repeat;
 border-color:#64717770;
 box-shadow:inset 0 1px #d4e8ef13,inset 0 -1px #0005;
}
html[data-theme=dark] .heat-visual{
 background:var(--graphite-grain),linear-gradient(135deg,#28363c,#141b20 52%,#382a23);
 background-size:180px 180px,auto;
 border-color:#819291;
 box-shadow:10px 10px 0 #11181c88,0 28px 60px #0005,inset 0 1px #e6ead733;
}
/* Tall studio light fields meet a soft floor under the existing full portraits. */
html[data-theme=dark] :is(.team-section,.team-portrait-section){
 --muted:#c5cbc7;--soft:#bdc6c0;--line:#4b575c;
 background-color:#1c2226;
 background-image:var(--graphite-grain),linear-gradient(0deg,#10161999,transparent 20%),repeating-linear-gradient(90deg,transparent 0,transparent calc(25% - 1px),#cedce40c calc(25% - 1px),#cedce40c 25%),radial-gradient(ellipse at 50% 0%,#52636e44,transparent 68%);
 background-size:180px 180px,auto,auto,auto;
 border-block:1px solid #a5bbc122;
 box-shadow:inset 0 1px #ffffff06;
}
html[data-theme=dark] .team-grid .person-card{
 background:radial-gradient(ellipse at 24% 101%,#000a,transparent 34%),radial-gradient(ellipse at 20% 60%,#6c7e8a44,transparent 55%);
 border-bottom-color:#82959b80;
}
/* The timeline reads as a drafting surface, with an engraved coordinate grid. */
html[data-theme=dark] .project-strip{
 --muted:#c5cbc7;--soft:#c2cdc7;--line:#63757b;
 background-color:#28353b;
 background-image:var(--graphite-grain),linear-gradient(90deg,#1e292f33,#1e292fb3 85%),repeating-linear-gradient(0deg,transparent 0 47px,#b6d3df0b 47px 48px),repeating-linear-gradient(90deg,transparent 0 47px,#b6d3df0b 47px 48px),radial-gradient(ellipse at 8% 0%,#5b79895c,transparent 75%);
 background-size:180px 180px,auto,auto,auto,auto;
 border-color:#7e959c66;
 box-shadow:inset 0 1px #dbe5de0f,inset 0 -1px #0004;
}
html[data-theme=dark] .project-milestones>div{position:relative}
html[data-theme=dark] .project-milestones>div:before{
 content:'';position:absolute;width:5px;height:5px;border-radius:50%;top:-3px;left:0;
 background:#ddac92;box-shadow:0 0 0 4px #ddac9214;
}
html[data-theme=dark] .company-links{
 background-image:var(--engraved-field);
 background-size:640px 535px;
 background-position:-240px 45%;
 background-repeat:no-repeat;
}
html[data-theme=dark] :is(.dialogue-cta,.cta){
 --muted:#dbd1cb;--soft:#d4c8be;--line:#7b6052;
 background-color:#302622;
 background-image:var(--graphite-grain),var(--engraved-field),radial-gradient(ellipse at 94% 30%,#a95a3566,transparent 65%),linear-gradient(115deg,#211f20,#3b2e28);
 background-size:180px 180px,1100px 920px,auto,auto;
 background-position:0 0,right -360px center,0 0,0 0;
 background-repeat:repeat,no-repeat,no-repeat,no-repeat;
 border-color:#946c5480;
 box-shadow:inset 0 1px #efd7c520;
}
html[data-theme=dark] .telegram-options>a{background:#171b1d66}
html[data-theme=dark] .communication-actions>.button{
 background:linear-gradient(115deg,#ba4032,#a02d25);
 border:1px solid #e785694d;
 box-shadow:0 8px 24px #100a0870,inset 0 1px #efb79b33;
}
html[data-theme=dark] .communication-actions>.button:hover{background:#c9473b}
/* Interior mastheads carry the same industrial material without busy text panels. */
html[data-theme=dark] .page-head{
 background-color:#1c252a;
 background-image:var(--graphite-grain),var(--engraved-field),linear-gradient(100deg,#14191c44,transparent),radial-gradient(ellipse at 100% 30%,#5e6f7944,transparent 65%);
 background-size:180px 180px,850px 710px,auto,auto;
 background-position:0 0,right -220px center,0 0,0 0;
 background-repeat:repeat,no-repeat,no-repeat,no-repeat;
 border-bottom-color:#70848b70;
}
html[data-theme=dark] .page-head:after{color:#cea993}
html[data-theme=dark] :is(.card,.roadmap-track,.current-stage){
 background-image:var(--graphite-grain),linear-gradient(135deg,#9eb5c314,transparent 65%);
 background-size:180px 180px,auto;
 box-shadow:inset 0 1px #d4e4e912,0 12px 36px #0002;
}
html[data-theme=dark] footer{
 background-color:#101214;
 background-image:var(--graphite-grain),radial-gradient(ellipse at 0% 0%,#38464a55,transparent 65%);
 background-size:180px 180px,auto;
 border-color:#343a3d;
}
@media(max-width:1190px){
 html[data-theme=dark] .team-grid .person-card{
  background:radial-gradient(ellipse at 50% 101%,#000a,transparent 26%),radial-gradient(ellipse at 50% 75%,#6c7e8a44,transparent 60%);
 }
}
@media(max-width:1000px){
 html[data-theme=dark] .header-inner nav{background:#1b2023}
}
@media(max-width:700px){
 html[data-theme=dark] .editorial-hero{background-size:180px 180px,740px 620px,auto,auto;background-position:0 0,-380px -110px,0 0,0 0}
 html[data-theme=dark] .publication-design .hero-art{box-shadow:0 20px 44px #0004}
 html[data-theme=dark] .editorial-intro{background-size:520px 435px,auto;background-position:-340px -65px,0 0}
 html[data-theme=dark] .application-copy{padding-inline:14px}
 html[data-theme=dark] :is(.heat-story,.heat-benefit){background-size:180px 180px,950px 710px,auto,auto;background-position:0 0,60% center,0 0,0 0}
 html[data-theme=dark] .heat-story h2{font-size:clamp(32px,8.8vw,38px)}
 html[data-theme=dark] .heat-visual{box-shadow:6px 6px 0 #11181c88,0 18px 35px #0004}
 html[data-theme=dark] .project-strip{background-size:180px 180px,auto,96px 96px,96px 96px,auto}
 html[data-theme=dark] .company-links{background-size:520px 435px;background-position:-320px -60px}
 html[data-theme=dark] :is(.dialogue-cta,.cta){background-size:180px 180px,800px 670px,auto,auto;background-position:0 0,right -400px bottom -60px,0 0,0 0}
 html[data-theme=dark] .page-head{background-size:180px 180px,600px 500px,auto,auto;background-position:0 0,right -370px center,0 0,0 0}
}
