.display-preferences {
  display: flex;
  align-items: center;
  gap: 14px;
}
.language-control,
.theme-control {
  position: relative;
  flex-direction: row;
  align-items: center;
  gap: 8px;
  min-height: 36px;
  flex-shrink: 0;
}
.language-control::after,
.theme-control::after {
  content: "";
  width: 5px;
  height: 5px;
  border-right: 1px solid currentColor;
  border-bottom: 1px solid currentColor;
  transform: translateY(-2px) rotate(45deg);
  margin-right: 3px;
}
.language-control:hover .language-label,
.language-control:has(select:focus-visible) .language-label,
.theme-control:hover .theme-label,
.theme-control:has(select:focus-visible) .theme-label {
  text-decoration: underline;
  text-underline-offset: 4px;
}
.language-label,
.theme-label {
  font-size: 12px;
  line-height: 1.4;
  white-space: nowrap;
}
.language-control select,
.theme-control select {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  max-width: none;
  opacity: 0;
}
.theme-control {
  display: flex;
  align-items: center;
  color: #b3bdc7;
}
.theme-control select {
  font: inherit;
  font-size: 12px;
  border: 0;
  padding: 8px 3px;
  background: transparent;
  color: #c5cdd5;
  cursor: pointer;
}
.theme-control option {
  background: #1b2025;
  color: #eaf0f5;
}
.theme-control select:focus {
  outline: none;
}
.theme-control select:focus-visible {
  text-decoration: underline;
  text-underline-offset: 4px;
}
.nav-right {
  gap: 24px;
}
nav {
  gap: 25px;
}

:root[data-theme="light"] {
  color-scheme: light;
  --bg: #f6f7f9;
  --surface: #e9edf2;
  --line: #182b421c;
  --text: #202a35;
  --muted: #5b6877;
  --accent: #346489;
}
[data-theme="light"] .site-header {
  background: #f6f7f9ef;
}
[data-theme="light"]
  :is(
    nav a,
    .language-control,
    .theme-control,
    .language-control select,
    .theme-control select
  ) {
  color: #586675;
}
[data-theme="light"] :is(nav a:hover, nav a.active) {
  color: #182d40;
}
[data-theme="light"] :is(.language-control option, .theme-control option) {
  background: #fff;
  color: #202a35;
}
[data-theme="light"] .menu-toggle span {
  background: #243748;
}
[data-theme="light"] .preview {
  border-color: #203b5626;
  box-shadow: 0 22px 50px #1b304321;
}
[data-theme="light"] .preview[aria-pressed="true"] {
  box-shadow: 0 22px 55px #1b304332;
}
[data-theme="light"] .preview-label {
  color: #f4f7fa;
}
[data-theme="light"] .preview-selectors button {
  color: #5b6877;
}
[data-theme="light"] .preview-selectors button[aria-pressed="true"] {
  background: #213d5510;
  color: #243e55;
}
[data-theme="light"] #hero-gallery .gallery-thumb {
  color: #526678;
}
[data-theme="light"] #hero-gallery .gallery-thumb[aria-pressed="true"] {
  color: #263e53;
}
[data-theme="light"] #hero-gallery .gallery-thumb img {
  box-shadow: 0 10px 24px #243b5329;
  border-color: #18385322;
}
[data-theme="light"] .gallery-arrow {
  color: #5a7185;
}
[data-theme="light"] .gallery-arrow:hover {
  color: #243e55;
  background: #24465f0a;
}
[data-theme="light"] .button {
  border-color: #23415a26;
}
[data-theme="light"] .button-primary {
  background: #294f6c;
  color: #fff;
  border-color: #294f6c;
}
[data-theme="light"] .button-primary:hover {
  background: #1e3e56;
}
[data-theme="light"] .button-quiet {
  color: #405b72;
}
[data-theme="light"] .button-quiet:hover {
  background: #294f6c09;
}
[data-theme="light"]
  :is(
    .product-category,
    .product-copy > p,
    .visual-caption p,
    .feature-caption,
    .product-note,
    .about-body > p,
    .faq-list details > p,
    .footer-links,
    .footer-bottom,
    .download-note,
    .download-option small,
    .image-dialog p
  ) {
  color: #586b7d;
}
[data-theme="light"] .feature-tabs button {
  color: #5a6d7e;
}
[data-theme="light"] .feature-tabs button[aria-selected="true"] {
  color: #214c6d;
  border-bottom-color: #4e7796;
}
[data-theme="light"]
  .feature-tabs
  button[aria-selected="true"]
  span:last-child {
  color: #346489;
}
[data-theme="light"] .text-link {
  color: #285b80;
  border-bottom-color: #285b8040;
}
[data-theme="light"] .text-link:hover {
  color: #143e5e;
  border-bottom-color: #143e5e;
}
[data-theme="light"] .download-option {
  color: #304e67;
  background: #fff7;
  border-color: #24456026;
}
[data-theme="light"] a.download-option:hover {
  border-color: var(--accent);
  background: #fff;
}
[data-theme="light"] .platform-icon {
  filter: none;
  opacity: 0.7;
}
[data-theme="light"] .watch-feature-stage {
  background: #e5ebf1;
  border-color: #24456022;
}
[data-theme="light"] .watch-tabs button {
  color: #546b7d;
  border-color: #23415a26;
}
[data-theme="light"] .watch-tabs button[aria-selected="true"] {
  background: #294f6c;
  color: #fff;
  border-color: #294f6c;
}
[data-theme="light"] .about-links a > span:first-child {
  color: #5a6d7e;
}
[data-theme="light"] .about-links a > span:last-child {
  color: #346489;
}
[data-theme="light"] .faq-list summary::after {
  color: #56738a;
}
[data-theme="light"] .footer-links a:hover {
  color: #243e55;
}
[data-theme="light"] .back-top {
  color: #365a77;
  border-color: #294f6c33;
}
[data-theme="light"] .image-dialog {
  background: #f6f7f9;
  border-color: #294f6c33;
}
[data-theme="light"] .dialog-close {
  color: #405b72;
}
[data-theme="light"] .dialog-close:hover {
  background: #294f6c0d;
}
[data-theme="light"] .studio-section {
  --accent: #a6c6df;
}

@media (max-width: 900px) {
  .nav-wrap {
    padding-left: 24px;
    padding-right: 24px;
  }
  .menu-toggle {
    display: flex;
    flex-direction: column;
    gap: 6px;
    justify-content: center;
    width: 44px;
    height: 44px;
    padding: 10px;
    border: 0;
    background: transparent;
  }
  .menu-toggle span {
    height: 1px;
    background: #e1e5e9;
    width: 22px;
  }
  #main-nav {
    position: absolute;
    top: 100%;
    left: 0;
    right: 0;
    display: none;
    flex-direction: column;
    background: #171a1e;
    padding: 25px;
    gap: 25px;
    border-bottom: 1px solid var(--line);
  }
  #main-nav.open {
    display: flex;
  }
  [data-theme="light"] #main-nav {
    background: #f6f7f9;
  }
  .nav-right {
    gap: 12px;
  }
  .language-control {
    padding-left: 0;
    border-left: 0;
  }
}
@media (max-width: 520px) {
  .nav-wrap {
    padding: 0 14px;
  }
  .wordmark {
    font-size: 17px;
    white-space: nowrap;
  }
  .nav-right {
    gap: 6px;
  }
  .display-preferences {
    gap: 12px;
  }
  .language-label,
  .theme-label {
    font-size: 11px;
  }
  .theme-control select {
    font-size: 11px;
  }
  .menu-toggle {
    width: 32px;
    padding: 5px;
  }
}

@media (max-width: 360px) {
  .wordmark {
    font-size: 15px;
  }
  .nav-right {
    gap: 2px;
  }
  .language-control {
    gap: 5px;
  }
  .menu-toggle {
    width: 28px;
  }
}
