/* Shared tokens are also used by the purchase calculation cards. */
:root {
  --surface: #fff;
  --surface-soft: #eaf0f8;
  --accent: #087df6;
  --accent-soft: #087df60c;
  color-scheme: light;
  background: var(--pale);
}

:root[data-theme="dark"] {
  --pale: #0b1524;
  --surface: #111f32;
  --surface-soft: #16263b;
  --text: #edf4ff;
  --muted: #aab7ca;
  --border: #26374d;
  --accent: #6db7ff;
  --accent-soft: #112e4f;
  color-scheme: dark;
}

/* The header always sits over the navy hero in both themes. */
[data-theme-toggle] {
  display: inline-flex;
  flex: 0 0 auto;
  align-items: center;
  justify-content: center;
  gap: 8px;
  min-width: 44px;
  min-height: 44px;
  padding: 10px 12px;
  border: 1px solid #ffffff66;
  border-radius: 3px;
  background: #07132840;
  color: #fff;
  font-size: .8125rem;
  font-weight: 500;
  line-height: 1.4;
  white-space: nowrap;
  transition: background .2s, border-color .2s;
}
[data-theme-toggle]:hover {
  border-color: #d7e8ff;
  background: #ffffff16;
}
[data-theme-toggle] svg {
  display: block;
  flex: 0 0 18px;
  width: 18px;
  height: 18px;
  fill: none;
  stroke: currentColor;
  stroke-width: 1.6;
  stroke-linecap: round;
  stroke-linejoin: round;
}

/* Page surfaces and secondary copy. */
[data-theme="dark"] .brand-strip,
[data-theme="dark"] .process,
[data-theme="dark"] .footer,
[data-theme="dark"] .car-card {
  background: var(--surface);
}
[data-theme="dark"] .car-card,
[data-theme="dark"] .car-footer {
  border-color: var(--border);
}
[data-theme="dark"] .car-card:hover {
  box-shadow: 0 14px 30px #00000026;
}
[data-theme="dark"] .brands,
[data-theme="dark"] .catalog-count,
[data-theme="dark"] .car-make,
[data-theme="dark"] .car-footer > span,
[data-theme="dark"] .demo-caption,
[data-theme="dark"] .car-specs dt,
[data-theme="dark"] .footer nav,
[data-theme="dark"] .footer-bottom,
[data-theme="dark"] .form-note,
[data-theme="dark"] .request-progress {
  color: var(--muted);
}
[data-theme="dark"] .car-visual,
[data-theme="dark"] .car-dialog-photo {
  background: var(--surface-soft);
}
[data-theme="dark"] .photo-badge {
  background: #111f32ed;
  color: var(--text);
}
[data-theme="dark"] .filter:hover {
  border-color: #61758f;
}
[data-theme="dark"] .filter.active {
  border-color: var(--accent);
  background: var(--accent-soft);
  color: var(--accent);
}
[data-theme="dark"] .text-link:hover,
[data-theme="dark"] .car-footer .text-link,
[data-theme="dark"] .collection-bottom .text-link,
[data-theme="dark"] .footer nav a:hover,
[data-theme="dark"] .subtle-link:hover {
  color: var(--accent);
}
[data-theme="dark"] .subtle-link {
  border-color: #61758f;
}
[data-theme="dark"] .footer .brand img {
  filter: brightness(0) invert(1);
}
[data-theme="dark"] .skip-link {
  background: var(--surface);
  color: var(--text);
}

/* Geography panel and its decorative globe. */
[data-theme="dark"] .region-panel {
  background: var(--surface-soft);
}
[data-theme="dark"] .region-copy {
  background: linear-gradient(0deg, var(--surface-soft) 90%, transparent);
}
[data-theme="dark"] .region-tab small,
[data-theme="dark"] .orbital-label {
  color: var(--muted);
}
[data-theme="dark"] .region-tab.active,
[data-theme="dark"] .region-tab.active small,
[data-theme="dark"] .region-tab:hover,
[data-theme="dark"] .region-copy .eyebrow,
[data-theme="dark"] .region-copy .text-link {
  color: var(--accent);
}
[data-theme="dark"] .region-tab:hover {
  background: var(--accent-soft);
}
[data-theme="dark"] .globe-core,
[data-theme="dark"] .globe-meridian,
[data-theme="dark"] .globe-latitude {
  border-color: #4a6b91;
}
[data-theme="dark"] .globe-core {
  background: radial-gradient(ellipse at 70% 30%, #6db7ff16, transparent 60%);
}
[data-theme="dark"] .globe-marker {
  border-color: var(--surface-soft);
  background: var(--accent);
  box-shadow: 0 0 0 10px #6db7ff1f;
}

/* Process and FAQ use the same readable stroke color as secondary text. */
[data-theme="dark"] .step-symbol {
  border-color: var(--border);
  background: var(--surface);
}
[data-theme="dark"] .step-symbol svg {
  stroke: var(--accent);
}
[data-theme="dark"] .step:hover .step-symbol {
  border-color: var(--accent);
  background: var(--accent-soft);
}
[data-theme="dark"] .step:not(:last-child)::after {
  border-color: var(--border);
}
[data-theme="dark"] .faq-list summary span::before,
[data-theme="dark"] .faq-list summary span::after {
  background: var(--muted);
}

/* Dialogs, inputs, selection states and validation feedback. */
[data-theme="dark"] dialog {
  background: var(--surface);
  color: var(--text);
  box-shadow: 0 24px 90px #00000080;
}
[data-theme="dark"] dialog::backdrop {
  background: #010713cc;
}
[data-theme="dark"] .dialog-close {
  background: var(--surface-soft);
  color: var(--text);
}
[data-theme="dark"] .dialog-close:hover {
  background: #28415f;
}
[data-theme="dark"] .request-dialog label,
[data-theme="dark"] .budget-fieldset legend,
[data-theme="dark"] .request-summary span {
  color: var(--muted);
}
[data-theme="dark"] .request-dialog input:not([type="radio"]),
[data-theme="dark"] .request-dialog textarea {
  background: var(--pale);
  border-color: #3a4d66;
  color: var(--text);
}
[data-theme="dark"] .request-dialog input::placeholder,
[data-theme="dark"] .request-dialog textarea::placeholder,
[data-theme="dark"] .lead-form input::placeholder,
[data-theme="dark"] .lead-form textarea::placeholder {
  color: #93a4bc;
  opacity: 1;
}
[data-theme="dark"] .request-dialog input:not([type="radio"]):focus,
[data-theme="dark"] .request-dialog textarea:focus,
[data-theme="dark"] .lead-form input:focus,
[data-theme="dark"] .lead-form textarea:focus {
  border-color: var(--accent);
}
[data-theme="dark"] .budget-options span {
  border-color: #3a4d66;
  color: var(--text);
}
[data-theme="dark"] .budget-options input:checked + span {
  background: var(--accent-soft);
  border-color: var(--accent);
  color: var(--accent);
}
[data-theme="dark"] .request-summary,
[data-theme="dark"] .button-back {
  background: var(--surface-soft);
  color: var(--text);
}
[data-theme="dark"] .button-back:hover {
  background: #223b58;
}
[data-theme="dark"] .validation-message {
  color: #ffaaa0;
}
[data-theme="dark"] .success-icon {
  background: var(--accent-soft);
  color: var(--accent);
}
[data-theme="dark"] .form-result {
  background: var(--surface-soft);
  border-color: #3d618b;
  color: var(--text);
}
[data-theme="dark"] .credits-dialog a {
  color: var(--accent);
  border-color: #41658e;
}

/* Use the icon where the navigation needs the horizontal space. */
@media (max-width: 1280px) {
  [data-theme-toggle] {
    width: 44px;
    height: 44px;
    padding: 10px;
  }
  [data-theme-toggle] [data-theme-label] {
    display: none;
  }
}
@media (max-width: 700px) {
  .nav-shell { gap: 10px; }
  .nav-shell > [data-theme-toggle] { margin-left: auto; }
  .nav-shell > [data-theme-toggle] + .menu-toggle { margin-left: 0; }
}
@media (prefers-reduced-motion: reduce) {
  [data-theme-toggle] { transition: none; }
}
@media print {
  [data-theme-toggle] { display: none !important; }
}
