:root { color-scheme: dark; }
:root[data-theme="light"] {
  color-scheme: light;
  --bg: #f6f8fb;
  --bg-soft: #edf2f7;
  --surface: #ffffff;
  --surface-2: #eaf0f7;
  --surface-3: #dce6f2;
  --line: #d9e2ed;
  --line-strong: #b9c7d7;
  --text: #142237;
  --ink: #2e4058;
  --ink-dim: #4b5d73;
  --ink-faint: #607087;
  --accent: #173f74;
  --accent-strong: #092e5f;
  --accent-soft: rgba(23, 63, 116, .08);
  --danger: #a3202a;
  --shadow: 0 10px 40px rgba(9, 30, 60, .06);
}

/* Brand marks, navigation and footer retain their dark presentation. */
.nav, footer {
  color-scheme: dark;
  --text: #f3f5f7;
  --ink: #d9dee5;
  --ink-dim: #a6b2c2;
  --ink-faint: #99a9bc;
  --accent: #d9ecff;
  --line: rgba(255, 255, 255, .1);
  --line-strong: rgba(255, 255, 255, .22);
  --surface: rgba(255, 255, 255, .04);
  --surface-2: rgba(255, 255, 255, .08);
  color: var(--text);
  background: #080b0f;
}
.nav-inner { width: min(calc(100% - 40px), 1440px); gap: 16px; }
.main { gap: 18px; }
.nav-preferences { display: flex; flex: 0 0 auto; align-items: center; gap: 10px; }
.nav-preferences .language-switcher { margin-left: 0; }
.site-theme-toggle {
  display: inline-flex;
  flex: 0 0 112px;
  align-items: center;
  justify-content: center;
  gap: 8px;
  width: 112px;
  min-width: 112px;
  max-width: 112px;
  height: 44px;
  padding: 0 12px;
  border: 1px solid var(--line-strong);
  border-radius: 999px;
  background: var(--surface);
  color: var(--text);
  font: 500 13px/1 "Inter", sans-serif;
  white-space: nowrap;
  cursor: pointer;
}
.site-theme-toggle:hover { background: var(--surface-2); }
.site-theme-toggle svg { flex: 0 0 20px; }
[data-site-theme-light-label], :root[data-theme="light"] [data-site-theme-dark-label] { display: none; }
:root[data-theme="light"] [data-site-theme-light-label] { display: inline; }
.site-theme-sun, :root[data-theme="light"] .site-theme-moon { display: none; }
:root[data-theme="light"] .site-theme-sun { display: block; }
:where(a, button, input, textarea, select):focus-visible { outline: 3px solid #65aaff; outline-offset: 3px; }

.page-title, .trp-intro h2, .config-intro h1, .configurator-header h1, .config-success h1 { overflow-wrap: anywhere; hyphens: auto; }

:root[data-theme="light"] body {
  background: radial-gradient(circle at 80% 0%, #e7eefb, transparent 36%), linear-gradient(180deg, #f8faff, #f3f6fa);
}
:root[data-theme="light"] .hero-glow { background: radial-gradient(circle at 20% 20%, rgba(62, 117, 207, .1), transparent 40%); }
:root[data-theme="light"] .dot { background: #246b4e; box-shadow: 0 0 12px rgba(36, 107, 78, .2); }
:root[data-theme="light"] :is(.btn-primary, .form-submit, .trp-login-btn, .form-tab.active, .career-filter.active, .engine-filter.active, .config-primary-button, .career-join-fallback-action) { background: #142237; color: #fff; }
:root[data-theme="light"] :is(.btn-primary, .form-submit, .trp-login-btn, .config-primary-button, .career-join-fallback-action):hover { background: #244c7b; color: #fff; }
:root[data-theme="light"] :is(input, textarea, select) { accent-color: #173f74; }
:root[data-theme="light"] :is(input, textarea):focus { border-color: #567ba9; background: #fff; }
:root[data-theme="light"] :is(input, textarea)::placeholder { color: var(--ink-faint); opacity: 1; }
:root[data-theme="light"] .form-error { color: #92202c; border-color: #dca9af; background: #fff0f1; }
:root[data-theme="light"] .form-success { border-color: #b2d0be; background: #edf7f0; }
:root[data-theme="light"] :is(.form-tabs, .placeholder-tag, .career-facts div, .career-language-switch, .career-linkedin-card, .career-follow-card) { border-color: var(--line); background: var(--surface-2); }
:root[data-theme="light"] :is(.career-lang.active, .career-follow-card:hover) { background: #d6e3f3; }
:root[data-theme="light"] .career-apply-form .field select { color: var(--text); background: #fff; border-color: var(--line-strong); appearance: auto; -webkit-appearance: auto; }
:root[data-theme="light"] .career-apply-form .field select option { color: var(--text); background: #fff; }
:root[data-theme="light"] .career-apply-form .field select:focus { border-color: #567ba9; background: #fff; }
:root[data-theme="light"] .career-linkedin-card .linkedin-mark,
:root[data-theme="light"] .career-follow-card .linkedin-mark { color: #fff; background: #173f74; }

:root[data-theme="light"] .home-engines { background: #edf2f8; }
:root[data-theme="light"] .home-engine-models a { background: #f8faff; }
:root[data-theme="light"] .home-engine-models a:hover { background: #e1eaf5; }
:root[data-theme="light"] .home-engine-visual { background: radial-gradient(circle at 50% 44%, rgba(57, 131, 255, .1), transparent 55%), #f8faff; }
:root[data-theme="light"] :is(.home-engine-spec strong, .home-engine-link span, .engine-hero h1 em, .engine-card-link span) { color: #1c5ca8; }
:root[data-theme="light"] :is(.home-engine-visual img, .engine-card-visual img, .engine-product-image img) { filter: drop-shadow(0 18px 20px rgba(10, 30, 60, .16)); }
:root[data-theme="light"] .engine-page { background: #f6f8fb; }
:root[data-theme="light"] .engine-hero { background: radial-gradient(circle at 76% 28%, rgba(46, 125, 255, .1), transparent 42%), linear-gradient(145deg, #f8faff, #eaf0f8); }
:root[data-theme="light"] .engine-grid-glow { opacity: .3; background-image: linear-gradient(rgba(23, 52, 95, .08) 1px, transparent 1px), linear-gradient(90deg, rgba(23, 52, 95, .08) 1px, transparent 1px); }
:root[data-theme="light"] .engine-card { background: linear-gradient(150deg, #fff, #f0f5fc); }
:root[data-theme="light"] .engine-card-unit { color: var(--ink-dim); }
:root[data-theme="light"] .engine-compare-section { background: #eaf0f7; }
:root[data-theme="light"] :is(.compare-shell, .engine-product .engine-product-capabilities) { background: #fff; }
:root[data-theme="light"] .compare-models { background: #e1eaf5; }
:root[data-theme="light"] .engine-table-footer .engine-datasheet-button { border-color: #b9c7d7; background: #e8edf4; color: #243954; }
:root[data-theme="light"] .engine-table-footer .engine-datasheet-button:hover { background: #d6e1ed; color: #142237; }

:root[data-theme="light"] .configuration-page {
  --line: #d9e2ed; --line-strong: #b9c7d7; --ink-dim: #4b5d73; --ink-faint: #607087;
  background: radial-gradient(circle at 82% 8%, rgba(112, 159, 220, .12), transparent 45%), linear-gradient(180deg, #f7faff, #edf2f8);
}
:root[data-theme="light"] :is(.access-card, .config-form, .config-progress, .success-card) { border-color: var(--line); background: linear-gradient(145deg, #fff, #f3f7fc); box-shadow: var(--shadow); }
:root[data-theme="light"] .config-orbit { border-color: rgba(23, 52, 95, .1); }
:root[data-theme="light"] :is(.config-intro-points span, .access-card-icon, .quantity-option, .configurator .config-review > .review-section, .config-success .success-summary > .review-section, .success-reference) { border-color: var(--line); background: #eaf1fa; }
:root[data-theme="light"] .config-progress li span { background: #fff; }
:root[data-theme="light"] .config-progress li.active span { color: #fff; background: #173f74; }
:root[data-theme="light"] .config-progress li.complete span { color: #186239; border-color: #93b8a3; }
:root[data-theme="light"] :is(.config-field label em, .config-consent em) { color: #173f74; }
:root[data-theme="light"] :is(.config-field input, .config-field textarea, .config-field select, .quantity-option input[type="number"]) { background: #fff; }
:root[data-theme="light"] :is(.engine-choice-card > span, .engine-advice-choice > span, .choice-tile > span) { background: #fff; }
:root[data-theme="light"] :is(.engine-choice-card input:checked + span, .engine-advice-choice input:checked + span, .choice-tile input:checked + span) { border-color: #567ba9; background: #e3edf9; }
:root[data-theme="light"] .config-form-actions { background: #eaf0f7; }
:root[data-theme="light"] .config-error { color: #92202c; border-color: #dca9af; background: #fff0f1; }
:root[data-theme="light"] .success-mark { color: #186239; border-color: #93b8a3; background: #edf7f0; }

:root[data-theme="light"] .analytics-choice { color-scheme: light; color: #142237; background: #fff; border-color: #b9c7d7; box-shadow: 0 16px 60px rgba(9, 30, 60, .18); }
:root[data-theme="light"] .analytics-choice :is(h2, p) { color: #142237; }
:root[data-theme="light"] .analytics-choice a { color: #174f96; }
:root[data-theme="light"] .analytics-choice [data-error] { color: #92202c; }
:root[data-theme="light"] :is(.analytics-actions button, .analytics-choice .analytics-close) { color: #142237; background: #e9eff7; border-color: #9cabc0; }
:root[data-theme="light"] :is(.analytics-actions button, .analytics-choice .analytics-close):hover { background: #dce5f0; }

@media (max-width: 1600px) { .nav-cta { display: none; } }
@media (max-width: 1400px) {
  :root { --nav-height: 88px; }
  .wordmark { --logo-width: 128px; }
  .nav-preferences { margin-left: auto; }
  .nav-toggle { display: inline-flex; flex: 0 0 48px; margin-left: 0; }
  .nav-preferences .language-switcher-current, .nav-preferences .language-switcher-chevron { display: none; }
  .nav-preferences .language-switcher summary { width: 48px; padding: 0; justify-content: center; }
  .main { position: absolute; top: calc(100% + 10px); left: 20px; right: 20px; display: none; flex-direction: column; align-items: stretch; gap: 0; margin-left: 0; background: rgba(10, 13, 18, .98); border: 1px solid var(--line); border-radius: 22px; max-height: calc(100dvh - var(--nav-height) - 24px); overflow-y: auto; box-shadow: var(--shadow); }
  .main.open { display: flex; }
  .main a { padding: 16px 18px; border-bottom: 1px solid var(--line); }
  .main a.nav-linkedin { width: auto; height: auto; justify-content: flex-start; border-radius: 0; }
}
@media (max-width: 640px) {
  .nav-inner { gap: 8px; }
  .nav-preferences { gap: 8px; }
  .nav-toggle { width: 44px; height: 44px; flex-basis: 44px; }
  .nav-preferences .language-switcher summary { width: 44px; height: 44px; }
  .site-theme-toggle { width: 44px; min-width: 44px; max-width: 44px; flex-basis: 44px; padding: 0; }
  .site-theme-toggle [data-site-theme-label] { display: none; }
}
@media (max-width: 520px) { .wordmark { --logo-width: 90px; } }
@media print {
  .nav-preferences { display: none; }
}

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  .reveal { transition: none; }
}
