/* ==========================================================================
   mpu-dauer.de — technische Korrekturen (Navigation, Fokus, Kontrast,
   Scroll-Versatz). Wird nach dem jeweiligen Seiten-CSS geladen; ändert kein
   Layout, keine Typografie und keine Farben außerhalb belegter Defekte.
   ========================================================================== */

/* ---------- Anker/Ergebnisse nicht unter dem klebrigen Header ---------- */
[id] { scroll-margin-top: 88px; }
.zt-result, #check-result, #mt-out, .zt-beta-status { scroll-margin-top: 96px; }
[tabindex="-1"]:focus { outline: none; }

/* ---------- Navigation ohne JavaScript: Linkliste bleibt sichtbar ---------- */
@media (max-width: 860px) {
  html:not(.zt-js) .zt-nav-toggle,
  html:not(.zt-js) .nav-toggle { display: none !important; }

  html:not(.zt-js) .zt-nav-links,
  html:not(.zt-js) .nav-links {
    display: flex !important;
    flex-flow: row wrap;
    align-items: center;
    width: 100%;
    order: 3;
    gap: 4px 18px;
    padding: 8px 0 4px;
  }

  html:not(.zt-js) header .zt-nav-links a:not(.zt-nav-cta),
  html:not(.zt-js) header .nav-links a:not(.nav-cta) {
    display: inline-block !important;
    padding: 8px 2px;
    border-bottom: 0;
  }

  html:not(.zt-js) header .zt-nav-cta,
  html:not(.zt-js) header .nav-cta { margin-top: 0; }
}

/* ---------- Navigation mit JavaScript: echter Button ---------- */
@media (max-width: 860px) {
  html.zt-js header .nav,
  html.zt-js header .masthead-row { flex-wrap: wrap; }

  html.zt-js .zt-nav-toggle,
  html.zt-js .nav-toggle {
    display: flex !important;
    padding: 0;
    cursor: pointer;
  }

  html.zt-js .zt-nav-links,
  html.zt-js .nav-links {
    display: none !important;
    width: 100%;
    order: 4;
  }

  html.zt-js .zt-nav-links.zt-nav-open,
  html.zt-js .nav-links.zt-nav-open {
    display: flex !important;
    flex-direction: column;
    align-items: stretch;
  }

  html.zt-js header .zt-nav-links.zt-nav-open a:not(.zt-nav-cta),
  html.zt-js header .nav-links.zt-nav-open a:not(.nav-cta) {
    display: block !important;
    padding: 12px 6px;
  }
}

@media (min-width: 861px) {
  html.zt-js .zt-nav-toggle,
  html.zt-js .nav-toggle { display: none !important; }
}

/* ---------- Sichtbarer Tastaturfokus ---------- */
html a:focus-visible,
html button:focus-visible,
html summary:focus-visible,
html .table-scroll:focus-visible,
html .zt-nav-toggle:focus-visible,
html .nav-toggle:focus-visible,
html .zt-tool-form input:focus-visible,
html .zt-tool-form select:focus-visible,
html .zt-beta-field input:focus-visible,
html .zt-beta-field select:focus-visible,
html .zt-input:focus-visible {
  outline: 2px solid #A34A31;
  outline-offset: 2px;
}

html .zt-option:focus-within,
html .mt-opt:focus-within {
  outline: 2px solid #A34A31;
  outline-offset: 1px;
}

/* ---------- CTA-/Button-Kontrast: Kaskadenfehler ---------- */
html header .zt-nav-links a.zt-nav-cta,
html header .zt-nav-links a.zt-nav-cta:hover,
html header .zt-nav-links a.zt-nav-cta:focus-visible,
html header .nav-links a.nav-cta,
html header .nav-links a.nav-cta:hover,
html header .nav-links a.nav-cta:focus-visible,
html a.button:not(.zt-secondary),
html a.button:not(.zt-secondary):hover,
html a.button:not(.zt-secondary):focus-visible {
  color: #fff;
  text-decoration: none;
}

html header .zt-nav-links a.zt-nav-cta:hover,
html header .nav-links a.nav-cta:hover { background: #7E3822; border-color: #7E3822; }

html a.button.zt-secondary,
html a.button.zt-secondary:hover { color: #2B1D16; text-decoration: none; }

/* ---------- Hinweis ohne JavaScript (noscript) ---------- */
.zt-noscript-hint { margin: 0 0 12px; font-size: 14px; line-height: 1.5; color: #6B5A4B; }

/* ---------- Tabellen: horizontal erreichbar, kein Seiten-Overflow ---------- */
.table-scroll { overflow-x: auto; max-width: 100%; }
