/* Shared controls and the light palette. Engineering plots retain their calibrated dark canvas. */
.site-preferences{display:flex;align-items:center;gap:9px;flex-shrink:0;margin-left:auto}
.theme-toggle,.language-switch button{height:40px;min-width:40px;border:1px solid var(--line);border-radius:7px;background:var(--panel);color:var(--text);font:600 11px 'Segoe UI',Arial,sans-serif;padding:0 10px}
.theme-toggle{font-size:21px;line-height:1}
.language-switch{display:flex;gap:2px;padding:2px;border:1px solid var(--line);border-radius:8px}
.language-switch button{height:34px;min-width:33px;border:0;background:transparent;padding:0 7px;color:var(--muted)}
.language-switch button[aria-pressed=true]{background:var(--a);color:#06251f}
.site-preferences button:hover{border-color:var(--a)}
.header-inner{gap:18px}.header .nav{gap:18px;flex-shrink:0}.header .nav a{white-space:nowrap;font-size:12px}
@media(max-width:1180px){
  .header .nav{display:none;position:absolute;top:81px;left:0;right:0;background:var(--panel);flex-direction:column;align-items:stretch;padding:20px 24px;box-shadow:0 18px 35px #0003}
  .header .nav.open{display:flex}.header .nav a{font-size:15px;padding:9px}.header .hamburger{display:block}
}
@media(max-width:600px){
  .header .wrap{width:calc(100% - 24px)}.header-inner{gap:8px;height:72px}.header .brand{font-size:20px;gap:7px}
  .header .logo{width:30px;height:34px;font-size:21px;border-radius:8px}.site-preferences{gap:5px}
  .header .hamburger{padding:4px 8px;min-height:40px;font-size:22px}.header .nav{top:71px}
  .theme-toggle{min-width:34px;padding:0 7px}.language-switch button{min-width:29px;padding:0 5px}
}
@media(max-width:360px){.header .logo{display:none}.header .brand{font-size:18px}}

:root[data-theme=light]{color-scheme:light;--bg:#f4f7fa;--panel:#fff;--line:#c9d7e2;--text:#183047;--muted:#50677b;--a:#08695e;--v:#67489b}
html[data-theme=light] body{background:var(--bg);color:var(--text)}
html[data-theme=light] .header{background:#f8fbf9f2;border-bottom-color:var(--line)}
html[data-theme=light] :is(.nav,.hamburger){color:var(--text)}
html[data-theme=light] .nav .nav-cta{color:var(--a);border-color:#8cbab4}
html[data-theme=light] .hero{background:radial-gradient(ellipse at 80% 35%,#dfecea,transparent 58%),#f5f8fb}
html[data-theme=light] .grad{background:linear-gradient(105deg,#07665f,#315a95 55%,#70509b);background-clip:text;color:transparent}
html[data-theme=light] :is(.hero p,.stats,.heading p,.contact p,.contact-card>p,.step span,.ticker .wrap,.footer,.layer small,.chips span,.contact-foot,.messenger-copy small,.geo-heading>p,.geo-disclaimer,.calc-intro p,.excavation-intro p,.intro-spec,.backlink,.field-grid label,.field-help,.form-actions p,.results-toolbar p,.metrics span,.metrics small,.steel-grid span,.reinforcement-panel>p,.result-table caption,.verification-note,.method-grid p,.limitations,.calc-footer,.scope-note,.scope-banner p,.intro-section>span,.help,.run-area>p,.excavation-page label,.excavation-metrics span,.excavation-metrics small,.plot-key,.plot-footer>span,.check-row>div>small,.support-result h3,.method-limitations,.privacy-line,.breadcrumbs,.portfolio-intro p,.work-title p,.work-meta,.portfolio-strip,.feature-top,.feature-bottom span,.figure-bar,.work-points p,.related-work span,.partner-field,.partner-visit){color:var(--muted)}
html[data-theme=light] :is(.stats strong,.principle strong,.footer strong,.messenger-copy strong,.layer strong,.card-title,.excavation-metrics strong,.result-table summary,.limitations summary,.source-links strong,.breadcrumbs>span:last-child,.portfolio-note strong,.partner-name){color:var(--text)}
html[data-theme=light] :is(.services,.tech,.faq,.clients,.portfolio-teaser){background:#edf2f6}
html[data-theme=light] :is(.cases,.process,.ticker,.calculations-section){background:#f5f8fa}
html[data-theme=light] :is(.card,.case,.case.feature,.case.wide,.console,.contact-card,.work-card,.portfolio-feature,.portfolio-figure,.related-work a,.calculation-card,.input-panel,.excavation-inputs,.visual-panel,.result-section,.result-table,.reinforcement-panel,.method-grid article,.diagram-panel){background:#fff;border-color:var(--line);color:var(--text)}
html[data-theme=light] :is(.card:hover,.work-card:hover,.calculation-card:hover){border-color:#5c9b95;background:#f9fcfb}
html[data-theme=light] :is(.card .number,.method-index,.method-number,.caption-index,.step small,.case-link,.text-link,.source-links,.sources-row,.scope-note a,.scope-banner a,.input-panel legend span,.text-button,.steel-bottom,.support-result summary strong,.result-table td:first-child,.intro-spec strong,.layer.hot strong,.footer-actions a,.calculation-open,.work-link){color:var(--a)}
html[data-theme=light] :is(.tag,.chips span,.calculation-tags span){background:#e9f1f4;color:#38566c;border-color:#c8d7e0}
html[data-theme=light] :is(.step,.layer,.messenger-link,.run-area,.input-card){background:#f2f6f9;border-color:var(--line)}
html[data-theme=light] .layer.hot{background:#e4f1ec;border-color:#8ebbb2}
html[data-theme=light] .contact{background:radial-gradient(ellipse at 16% 50%,#d9eee9,transparent 65%),#ecf2f7}
html[data-theme=light] :is(.contact-card,.portfolio-feature,.geo-showcase){box-shadow:0 18px 50px #23445c12}
html[data-theme=light] .btn.primary{background:#08695e;color:#fff}
html[data-theme=light] .btn.secondary{background:#fff;border-color:#a4bac9;color:var(--text)}
html[data-theme=light] :is(.export-button,.add-row){background:#e6f3ee;border-color:#99beb4;color:#075b4c}
html[data-theme=light] :is(.scope-note,.scope-banner){background:#e9f3f1;border-color:#bbd6cf}
html[data-theme=light] :is(.field-grid input,.field-grid select,.excavation-page input,.excavation-page select){background:#fff;color:#183047;border-color:#a5bacb}
html[data-theme=light] :is(input,select,button,a):focus-visible{outline-color:#08766a}
html[data-theme=light] .switch-row small{color:#50677b}
html[data-theme=light] .switch-track{background:#d8e3eb;border-color:#8ea7b8}
html[data-theme=light] .switch-track:after{background:#526d80}
html[data-theme=light] .switch-row input:checked+.switch-track{background:#08695e;border-color:#08695e}
html[data-theme=light] :is(.metrics,.excavation-metrics){background:#d1dfe7;border-color:var(--line)}
html[data-theme=light] :is(.metrics>div,.excavation-metrics>div){background:#edf5f5;border-color:var(--line)}
html[data-theme=light] :is(.metrics strong,.steel-grid strong){color:#183047}
html[data-theme=light] .status-pill{background:#e7f4eb;color:#175c3a;border-color:#8ab89c}
html[data-theme=light] .status-pill.fail{background:#fff0eb;color:#963a1e;border-color:#ce967f}
html[data-theme=light] .check-status.pass{background:#e3f2e9;color:#195b3c}
html[data-theme=light] .check-status.fail{background:#fde9e9;color:#8b2738}
html[data-theme=light] .check-status.unverified{background:#f3ecdc;color:#70531c}
html[data-theme=light] :is(.error-box){background:#fff0eb;color:#8c3025;border-color:#c88b7f}
html[data-theme=light] :is(.stale-note){background:#fff3d9;color:#765216}
html[data-theme=light] :is(.verification-note.warning,.form-actions p.stale){color:#825a17}
html[data-theme=light] .small-badge{color:#765821;border-color:#c2b28c}
html[data-theme=light] :is(.result-table th,.excavation-page th){background:#dfeaf0;color:#2c4c62}
html[data-theme=light] :is(.result-table td,.excavation-page td){color:#3a5468;border-color:#d6e1e8}
html[data-theme=light] .excavation-page tr:nth-child(even){background:#f1f6f9}
html[data-theme=light] .result-table tbody tr:hover td{background:#e6f1f1}
html[data-theme=light] .result-table .failed td:last-child{color:#9b3c20}
html[data-theme=light] :is(.equations,.formula,.method-grid .formula){color:#254958}
html[data-theme=light] :is(.check-row,.panel-head,.panel-heading,.form-actions,.file-actions,.plot-footer,.support-result,.method-panel,.excavation-method,.calc-footer,.steel-bottom,.reinforcement-panel,.result-table,.excavation-inputs details,.joint-fields,.method-limitations,.limitations,.figure-bar,.partner-list,.partner-list li,.work-points>div){border-color:var(--line)}
html[data-theme=light] .delete-row{color:#944351}
html[data-theme=light] .profile-info{background:#edf5f3;color:#3b635c;border-color:#c5dcd5}
html[data-theme=light] .diagram-tabs button{background:#edf3f7;color:#486376;border-color:#b5c9d6}
html[data-theme=light] .diagram-tabs button[aria-pressed=true]{background:#dceee6;color:#165d4b;border-color:#87b7a7}
html[data-theme=light] :is(.diagram-legend,.diagram-panel>p){color:#476476}
html[data-theme=light] .diagram-panel>p{border-color:var(--line)}
html[data-theme=light] :is(#ring-svg,.joint-diagram,.intro-section svg,.calculation-symbol,.product-art,.tunnel-visual){background:#101e2e;border-radius:8px}
html[data-theme=light] .plot-scroll svg{border-radius:7px}
html[data-theme=light] .diagram{--a:#81f4df;--line:#273a50;--text:#eff5fc;color:#eff5fc}
html[data-theme=light] .geo-showcase{background:#fff;border-color:var(--line)}
html[data-theme=light] .geo-heading{background:#edf6f3}
html[data-theme=light] .geo-viewer{--a:#81f4df;color:#eff5fc}
html[data-theme=light] .geo-captions{border-color:var(--line)}
html[data-theme=light] .geo-disclaimer strong{color:#355366}
html[data-theme=light] :is(.portfolio-hero,.work-hero){background:radial-gradient(ellipse at 85% 0%,#e1eaf4,transparent 65%)}
html[data-theme=light] :is(.calculation-meta,.calculation-copy p){color:#50677b}
html[data-theme=light] .calculation-live{color:#1b654b;border-color:#9fc6b8}
html[data-theme=light] .calculation-open{border-color:var(--line)}
html[data-theme=light] a.partner-row:hover{background:#e6eff4}
html[data-theme=light] .text-link:hover{color:#164c74}
html[data-theme=light] .console-head{color:var(--muted);border-color:var(--line)}
html[data-theme=light] .messenger-arrow{color:#087584}
html[data-theme=light] .max-link .messenger-arrow{color:#70509b}
html[data-theme=light] .work-open{color:#81f4df}
html[data-theme=light] .skip-link{background:#08695e;color:#fff}
html[data-theme=light] .language-switch button[aria-pressed=true]{background:#08695e;color:#fff}
html[lang=en] .hero h1{font-size:clamp(2.8rem,5.1vw,4.8rem)}
html[lang=en] .check-status{overflow-wrap:anywhere}
@media(max-width:600px){html[lang=en] .hero h1{font-size:clamp(2.5rem,10.3vw,4rem)}}
