/* The existing palette is retained in dark mode. */
.utility .shell { min-height: 38px; }
/* A native button supplies keyboard activation for the two-state switch. */
.theme-switch { display: inline-flex; align-items: center; gap: 8px; margin-left: auto; min-height: 44px; flex-shrink: 0; padding: 4px 0 4px 4px; background: none; color: inherit; border: 0; border-radius: 24px; cursor: pointer; }
.theme-switch__track { position: relative; display: block; width: 68px; height: 32px; background: #d6e2db; border-radius: 20px; box-shadow: inset 0 0 0 1px #708c7c; transition: background-color .2s; }
.theme-switch__thumb { position: absolute; width: 28px; height: 28px; top: 2px; left: 2px; background: #fff; border-radius: 50%; box-shadow: 0 1px 3px #0004; transition: transform .2s ease; }
.theme-switch svg { position: absolute; width: 16px; height: 16px; top: 8px; z-index: 1; }
.theme-switch__sun { left: 8px; color: #254736; }
.theme-switch__moon { right: 8px; color: #4a6759; }
.theme-switch[aria-checked="true"] .theme-switch__track { background: #175c45; }
.theme-switch[aria-checked="true"] .theme-switch__thumb { transform: translateX(36px); }
.theme-switch[aria-checked="true"] .theme-switch__sun { color: #d3e8d9; }
.theme-switch[aria-checked="true"] .theme-switch__moon { color: #254736; }
.theme-switch__label { width: 28px; font-size: 11px; font-weight: 700; }
@media (prefers-reduced-motion: reduce) { .theme-switch__track, .theme-switch__thumb { transition: none; } }
.support-short { display: none; }
.utility a { white-space: nowrap; }
.rfq-form :is(input, select, textarea) { color-scheme: light; color: var(--ink); }
/* Switch palettes immediately so button text never changes ahead of its surface. */
body.engineering-mode .button { transition: border-color .25s, transform .25s; }
html[data-theme="light"] body.engineering-mode {
  --navy: #eaf1ed;
  --accent-bright: #175c45;
  --accent-highlight: #175c45;
  --line: #c4d0c9;
  --ink: #102a22;
  --muted: #42574e;
  color: var(--ink);
  background-color: #f7faf8;
}
html[data-theme="light"] :is(.utility, .site-header, .hero, .page-hero, .capabilities, .affiliations, .capability-cta, footer) {
  color: var(--ink);
  background-color: #eaf1ed;
}
html[data-theme="light"] :is(.utility, .site-header, footer) { border-color: var(--line); }
html[data-theme="light"] .menu-toggle { color: var(--ink); border-color: #6f877a; }
html[data-theme="light"] .utility .icon { filter: none; }
/* Concentrate shading behind the copy and reveal the photo on the right. */
html[data-theme="dark"] .hero::after {
  background: linear-gradient(90deg, rgba(3, 13, 20, .78), rgba(3, 13, 20, .65) 52%, rgba(3, 13, 20, .12) 78%, rgba(3, 13, 20, .04));
}
html[data-theme="light"] .hero::after {
  background: linear-gradient(90deg, rgba(247, 250, 248, .90), rgba(247, 250, 248, .82) 52%, rgba(247, 250, 248, .22) 78%, rgba(247, 250, 248, .08));
}
html[data-theme] .hero .hero-photo, html[data-theme] .capability-hero-video { opacity: 1; }
/* Wider internal-page headings need a little more protection behind the copy. */
html[data-theme="dark"] .page-hero::after { background: linear-gradient(90deg, rgba(3, 13, 20, .78), rgba(3, 13, 20, .66) 60%, rgba(3, 13, 20, .08)); }
html[data-theme="light"] .page-hero::after { background: linear-gradient(90deg, rgba(247, 250, 248, .90), rgba(247, 250, 248, .82) 60%, rgba(247, 250, 248, .12)); }
@media (max-width: 760px) {
  html[data-theme="dark"] .hero::after, html[data-theme="dark"] .hero.hero--page::after { background: linear-gradient(90deg, rgba(3, 13, 20, .72), rgba(3, 13, 20, .62)); }
  html[data-theme="light"] .hero::after, html[data-theme="light"] .hero.hero--page::after { background: linear-gradient(90deg, rgba(247, 250, 248, .82), rgba(247, 250, 248, .72)); }
}
html[data-theme="light"] :is(.hero, .page-hero) :is(.hero-copy, .capability-statement, .breadcrumb, .spec, .overline) { color: var(--ink); }
html[data-theme="light"] :is(.hero-tags a, .hero-tags span, .quote-panel, .page-home .capability-visual .quote-panel, .affiliation-grid a) {
  color: var(--ink);
  background: #f7faf8;
  border-color: var(--line);
}
html[data-theme="light"] body.engineering-mode .hero .license { background: #f7faf8; color: var(--ink); }
html[data-theme="light"] :is(.capabilities, .affiliations, .capability-cta) :is(p, .overline, .text-link, em) { color: var(--muted); }
html[data-theme="light"] .hero .button--outline { background: #fff; color: var(--ink); border-color: #6f877a; }
html[data-theme="light"] .hero .button--outline:hover { background: #e0ebe4; }
html[data-theme="light"] .drop-menu { background: #fff; color: var(--ink); border-color: var(--line); }
html[data-theme="light"] .closing { background: #eaf1ed; color: var(--ink); }
html[data-theme="light"] .closing::after { background: linear-gradient(90deg, #eaf1ed, rgba(234, 241, 237, .96)); }
html[data-theme="light"] .closing .button--light { background: #175c45; color: #fff; border-color: #175c45; }
html[data-theme="light"] .closing .button--light:hover { background: #104432; }
html[data-theme="light"] :is(.footer-grid h3, .footer-grid .brand) { color: var(--ink); }
html[data-theme="light"] .copyright { border-color: var(--line); }
html[data-theme="light"] .engineering-register { color: #e6f4eb; }
html[data-theme="light"] :is(a, button, summary, input, select, textarea):focus-visible { outline-color: #175c45; }
@media (max-width: 480px) {
  .utility .shell { gap: 6px; }
  .support-full { display: none; }
  .support-short { display: inline; }
  .theme-switch__label { display: none; }
}
