/* Shared controls, loaded after page styles. Palette lives in theme.css. */
body { background-color: var(--ct-page); color: var(--ct-text); }
.site-header, .hdr {
  background: var(--ct-header);
  border-bottom: 0;
  box-shadow: 0 4px 18px var(--ct-header-shadow);
}
.header-actions :is(.theme-toggle, .support, .language-toggle) {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  flex: 0 0 36px;
  width: 36px;
  height: 36px;
  padding: 0;
  border: 0;
  border-radius: 10px;
  background: var(--ct-surface-12);
  color: var(--ct-text);
  cursor: pointer;
  font: inherit;
  transition: background .2s ease, box-shadow .2s ease;
}
.theme-toggle[hidden] { display: none; }
.header-actions :is(.theme-toggle, .support, .language-toggle):hover {
  background: var(--ct-surface-25);
  box-shadow: 0 0 15px var(--ct-surface-10);
}
.header-actions :is(.theme-toggle, .support, .language-toggle):focus-visible { outline: 2px solid var(--ct-accent); outline-offset: 3px; }
.header-actions :is(.theme-toggle, .support, .language-toggle) img {
  width: 20px;
  height: 20px;
  object-fit: contain;
  filter: var(--ct-icon-filter);
  opacity: .75;
  transition: opacity .2s ease;
}
.header-actions :is(.theme-toggle, .support, .language-toggle):hover img { opacity: 1; }
.theme-toggle .theme-sun { display: none; }
:root[data-theme="light"] .theme-toggle .theme-moon { display: none; }
:root[data-theme="light"] .theme-toggle .theme-sun { display: block; }
.header-actions { display: flex; align-items: center; gap: 8px; flex-shrink: 0; }
.hdr-in > .header-actions { margin-left: auto; }
.site-header .header-actions .download { height: 36px; min-height: 36px; }
.download, .button, .menu-toggle { font-weight: 600; }
.download, .join-actions .download, .btn-primary, .skip-link,
.product-nav li.active button { color: var(--ct-on-accent); }
.download span, .btn-primary span { color: inherit; }
.product-nav li.active img { filter: var(--ct-on-accent-icon); }
/* Only the texture layer is inverted; its original alpha is preserved. */
.noise {
  position: absolute;
  inset: 0;
  z-index: -1;
  pointer-events: none;
  background-image: url("img/noise-dark.png");
  background-size: inherit;
  background-position: inherit;
  background-repeat: inherit;
  mask-image: linear-gradient(to bottom, #000 60%, transparent 100%);
}
.wiki-home > .noise { mask-size: 100% 520px; mask-repeat: no-repeat; }
body > .noise {
  position: fixed;
  background-position: center;
  background-size: cover;
  mask-image: linear-gradient(to bottom, #000 40%, transparent 100%);
}
[data-theme="light"] .noise { filter: invert(1); }
/* Each theme uses its own artwork; screenshots switch independently. */
:root[data-theme="light"] .product::before {
  background-image: url("img/product/GamingLandingPageBackground-light.png");
}
/* Equal borders and title rows keep both prices on the same baseline. */
.pricing .plan { border-width: 2px; }
.pricing .plan h5 {
  display: inline-flex;
  align-items: center;
  min-height: 34px;
  line-height: 28px;
}
.pricing .plan-plus { background: #29251e; }
:root[data-theme="light"] .pricing .plan-plus { background: #fffaf0; }
.pricing .plan-plus h5 {
  align-self: flex-start;
  padding: 3px 12px;
  border-radius: 7px;
  background: var(--ct-gold-decoration);
  color: #382600;
}
:root[data-theme="light"] .topic-icon,
:root[data-theme="light"] .wiki-nav-link[aria-current="page"] .wiki-nav-icon {
  filter: brightness(0) saturate(100%) invert(34%) sepia(42%) saturate(1357%) hue-rotate(205deg) brightness(92%) contrast(92%);
}
:root[data-theme="light"] #how .container > div:hover,
:root[data-theme="light"] #features .container > div:hover { box-shadow: 0 12px 28px #25284a18; }

@media (max-width: 960px) {
  .site-header .header-actions .download { display: none; }
  .site-header .header-actions { width: auto; margin-left: auto; }
  .site-header[data-menu-ready] .menu-toggle {
    height: 36px;
    padding: 0 10px;
    font-family: inherit;
    font-size: 13px;
    font-weight: 600;
  }
  .site-header nav { order: 4; }
}
@media (max-width: 600px) {
  .site-header .banner { flex-wrap: wrap; align-items: center; gap: 6px; }
  .site-header .banner > p { flex: 1; font-size: clamp(13px, 3.85vw, 15px); }
  .site-header .header-actions { gap: 6px; }
  .hdr-in { gap: 10px; padding-inline: 16px; }
  .hdr-in > .header-actions { flex-basis: 100%; justify-content: flex-end; }
  .hdr .adm-me { flex-wrap: wrap; }
  .wiki-sidebar { top: 80px; }
  html { scroll-padding-top: 80px; }
}
@media (prefers-reduced-motion: reduce) {
  .header-actions :is(.theme-toggle, .support, .language-toggle),
  .header-actions :is(.theme-toggle, .support, .language-toggle) img { transition: none; }
}

/* Flags retain their colors and use the same 36px controls. */
.header-actions .language-toggle img { width: 22px; height: 16px; object-fit: cover; border-radius: 2px; filter: none; opacity: 1; }
@media (max-width: 380px) {
  .site-header .banner { padding-inline: 8px; gap: 4px; }
  .site-header .banner > p, .site-header .logo p { font-size: 12px; }
  .site-header .header-actions { gap: 4px; }
  .site-header[data-menu-ready] .menu-toggle { padding-inline: 7px; }
}
