/*
 * Közös témarendszer. A régi színértékek a komponensekben tartalékértékként
 * megmaradnak: sötét módban az eredeti fekete és türkiz arculat változatlan.
 * A márkatürkiz (#00dff5) és a szövegek kontrasztos türkize külön szerepet kap.
 */
:root {
  color-scheme: dark;
  --danger: #e8a0b2;
  --warning: #c1b8ed;
  --good: #00dff5;
  --theme-danger-ink: #e8a0b2;
  --theme-warning-ink: #c1b8ed;
  --theme-rating-good: #00dff5;
  --theme-rating-warn: #c1b8ed;
  --theme-rating-bad: #e8a0b2;
  --theme-rating-neutral: #9eafbc;
  --theme-status-warn-bg: #1c1929;
  --theme-status-warn-border: #4f456d;
  --theme-status-bad-bg: #271b22;
  --theme-status-bad-border: #704753;
  --scene-shadow: #0003;
}
:root[data-theme="light"] {
  color-scheme: light;
  --bg: #f4f7f8;
  --panel: #ffffff;
  --panel2: #eef3f5;
  --panel-deep: #eaf0f2;
  --border: #cbd7dd;
  --line: #cbd7dd;
  --text: #172a33;
  --muted: #52646e;
  --cyan-soft: #006c78;
  --danger: #a83c58;
  --warning: #65529d;
  --good: #006c78;
  --theme-page: #f4f7f8;
  --theme-sidebar: #eaf0f2;
  --theme-card: #ffffff;
  --theme-inset: #eef3f5;
  --theme-tint: #e4f1f3;
  --theme-track: #dce6eb;
  --theme-line: #cbd7dd;
  --theme-line-strong: #8b9fa9;
  --theme-ink: #172a33;
  --theme-body: #344e5b;
  --theme-muted: #52646e;
  --theme-accent-ink: #006c78;
  --theme-danger-ink: #a83c58;
  --theme-warning-ink: #65529d;
  --theme-rating-good: #00727d;
  --theme-rating-warn: #65529d;
  --theme-rating-bad: #a83c58;
  --theme-rating-neutral: #52646e;
  --theme-dialog-shadow: #172a3330;
  --theme-status-warn-bg: #f3effa;
  --theme-status-warn-border: #d8cfea;
  --theme-status-bad-bg: #fff0f4;
  --theme-status-bad-border: #e7c7d1;
  --scene-shadow: #243e4d16;
}

/* A fejlécen belüli vezérlők minden oldalon azonos helyen találhatók. */
.header-actions {
  display: flex;
  align-items: center;
  gap: 12px;
  flex: none;
}
.site-header .header-actions {
  margin-left: auto;
}
.header-actions .header-cta {
  margin-left: 0;
}
.theme-toggle {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  min-height: 44px;
  min-width: 106px;
  padding: 10px 12px;
  border: 1px solid var(--theme-line-strong, #44535e);
  border-radius: 8px;
  color: var(--text);
  background: var(--panel);
  font:
    700 14px/1.3 Arial,
    "Helvetica Neue",
    sans-serif;
  cursor: pointer;
}
.theme-toggle:hover {
  border-color: var(--theme-accent-ink, #00dff5);
  background: var(--theme-tint, #13242b);
}
.theme-toggle:focus-visible {
  outline: 2px solid var(--theme-accent-ink, #00dff5);
  outline-offset: 4px;
}
.theme-toggle svg {
  width: 19px;
  height: 19px;
  flex: none;
  fill: none;
  stroke: currentColor;
  stroke-width: 1.7;
  stroke-linecap: round;
  stroke-linejoin: round;
}
.theme-toggle .theme-moon,
[data-theme="light"] .theme-toggle .theme-sun {
  display: none;
}
[data-theme="light"] .theme-toggle .theme-moon {
  display: block;
}

/* Az eredeti logó változatlan képfájl, világos háttéren is olvasható alapon. */
[data-theme="light"] .brand img,
[data-theme="light"] .footer-brand img {
  background: #05080a;
  border-radius: 7px;
  padding: 5px 7px;
}
[data-theme="light"] .explanation-dialog::backdrop {
  background: rgb(23 42 51 / 28%);
}
[data-theme="light"] .grade-scale .selected {
  color: #fff;
}
[data-theme="light"] .brand > span span {
  color: var(--theme-accent-ink);
}

/* Csak a témaváltáskor animálunk, nem minden mérési frissítéskor. */
.theme-changing body,
.theme-changing .site-header,
.theme-changing .topbar,
.theme-changing .sidebar,
.theme-changing .panel,
.theme-changing .bento-card,
.theme-changing .explanation-dialog,
.theme-changing .theme-toggle {
  transition:
    background-color 0.18s ease,
    color 0.18s ease,
    border-color 0.18s ease;
}
@media (max-width: 980px) {
  .free-audit .topbar {
    grid-template-columns: 125px minmax(0, 1fr) auto;
  }
}
@media (max-width: 600px) {
  .header-inner,
  .header-actions {
    gap: 10px;
  }
  .free-landing .header-cta {
    display: none;
  }
  .free-landing .brand > span {
    padding-left: 12px;
    font-size: 12px;
  }
  .free-audit .topbar {
    grid-template-columns: minmax(0, 1fr) auto;
    padding-inline: 14px;
  }
  .free-audit .brand-copy {
    display: none;
  }
  .free-audit .brand img {
    width: 100px;
  }
  .legal-page .theme-toggle {
    min-width: 44px;
    width: 44px;
    padding: 10px;
  }
  .legal-page [data-theme-label] {
    display: none;
  }
  .legal-page .header-cta {
    max-width: 130px;
  }
}
@media (prefers-reduced-motion: reduce) {
  .theme-changing *,
  .theme-changing *::before,
  .theme-changing *::after {
    transition: none !important;
  }
}
@media print {
  .theme-toggle {
    display: none !important;
  }
}

/* V23: egységes, visszafogott állapotszínek, szöveges minősítés mellett. */
.error,
.badge.fail,
.badge.magas {
  color: var(--theme-danger-ink);
  border-color: var(--theme-status-bad-border);
  background: var(--theme-status-bad-bg);
}
.badge.warning,
.badge.közepes,
.callout.warning {
  color: var(--theme-warning-ink);
  border-color: var(--theme-status-warn-border);
  background: var(--theme-status-warn-bg);
}
.badge.pass {
  color: var(--theme-accent-ink, #00dff5);
  background: var(--theme-tint, #10232a);
}
.free-audit .warning {
  border-color: var(--theme-status-warn-border);
}
