/* ==========================================================================
   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 #075b51;
  outline-offset: 2px;
}

html .zt-option:focus-within,
html .mt-opt:focus-within {
  outline: 2px solid #075b51;
  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: #06483f; border-color: #06483f; }

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

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

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

:root:root {
  --zt-bg: #f8f6ef; --zt-paper: #fffdf7; --zt-ink: #102d29;
  --zt-muted: #465a54; --zt-accent: #075b51; --zt-accent-dark: #06483f;
  --zt-accent-soft: #e5efe7; --zt-result-dark: #123a32; --zt-result-dark-ink: #fffdf7;
  --zt-result-dark-muted: #c5ddd2; --zt-line: #bdcdc4; --zt-line-soft: #dce6de;
  --zt-radius: 12px; --zt-radius-btn: 8px;
  --bg: #f8f6ef; --surface: #fffdf7; --paper: #fffdf7; --ink: #102d29;
  --muted: #465a54; --brand: #075b51; --brand-dark: #06483f; --brand-soft: #e5efe7; --line: #bdcdc4;
  --serif: var(--zt-font-sans, system-ui, sans-serif);
}
html body { background: #f8f6ef; color: #102d29; }
main :is(.table-scroll, table) + p { margin-block-start: 16px; }
main table th, main table.phases th, main table.zt-cost-table th { background: #125248; color: #fff; }
main table tbody tr:nth-child(even) { background: #f1ece1; }
main :is(th, td) { overflow-wrap: anywhere; }
main :is(input, select, textarea) { max-width: 100%; }

/* Allow article and sidebar grid items to fit narrow screens. */
@media (max-width: 900px) {
  .zt-page-content, .zt-side-panel { grid-template-columns: minmax(0, 1fr); }
  .zt-side-card { overflow-wrap: anywhere; }
}
#etg-rechner button[type="submit"] { width: 100%; }
details.zt-tool-side { align-self: start; }
details.zt-tool-side summary { cursor: pointer; font-weight: 700; }
details.zt-tool-side[open] summary { margin-bottom: 12px; }

/* Common colors for equivalent controls across the page templates. */
main :is(a, button).button:not(.zt-secondary) {
  background: var(--brand);
  border-color: var(--brand);
  color: #fff;
}
main :is(a, button).button:not(.zt-secondary):is(:hover, :focus-visible) {
  background: var(--brand-dark);
  border-color: var(--brand-dark);
}
main p a:any-link:not(.button) { color: var(--brand); }
main p a:any-link:not(.button):hover { color: var(--brand-dark); }
html footer { color: var(--muted); background: var(--bg); }


:root {
  --design-sand: #f1dec0;
  --design-ochre: #e8b45a;
  --design-sage: #c8d0b6;
  --design-mint: #dcece6;
  --design-stroke: #b3b1a4;
}
main .design-feature, main.design-feature { padding-block: 14px 24px; }
.design-feature > :is(.design-intro, .design-etg-stack, .design-cdt-table, .design-table-note) {
  max-width: 660px;
}
.design-breadcrumb {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 8px;
  margin: 0 0 20px;
  color: var(--ink);
  font: 500 13px/1.35 system-ui, sans-serif;
}
.design-breadcrumb a {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  color: var(--brand);
  text-decoration: none;
}
.design-breadcrumb a:hover { text-decoration: underline; }
.design-home-icon {
  position: relative;
  width: 9px;
  height: 8px;
  margin-inline: 2px;
  margin-block-start: 3px;
  border: 1.5px solid currentColor;
  border-top: 0;
  border-radius: 1px;
}
.design-home-icon::before {
  content: "";
  position: absolute;
  width: 8px;
  height: 8px;
  left: -1px;
  top: -4px;
  border-top: 1.5px solid currentColor;
  border-left: 1.5px solid currentColor;
  transform: rotate(45deg);
}
.design-kicker {
  display: inline-block;
  margin: 0 0 10px;
  padding: 3px 12px;
  border-radius: 999px;
  background: var(--design-sand);
  color: var(--ink);
  font: 600 13px/1.35 system-ui, sans-serif;
}
main .design-feature h1, main.design-feature h1 {
  margin: 0;
  max-width: none;
  color: var(--ink);
  font: 800 clamp(32px, 9vw, 52px)/1.04 system-ui, sans-serif;
  letter-spacing: -.047em;
}
.design-feature > :is(.design-intro, .lead, .lede:not(.byline-p)) {
  max-width: 660px;
  margin: 12px 0 22px;
  color: var(--ink);
  font: 400 16px/1.45 system-ui, sans-serif;
}

/* Shared page frame, typography and component appearance. */
:root {
  --design-font: system-ui, sans-serif;
  --design-gutter: clamp(14px, 4vw, 32px);
  --design-shell: 1140px;
}
html body { font: 400 16px/1.6 var(--design-font); }
main :is(.shell, .container), main.container {
  max-width: var(--design-shell);
  margin-inline: auto;
  padding-inline: var(--design-gutter);
}
header.zt-site-header {
  position: sticky;
  top: 0;
  z-index: 20;
  border-bottom: 1px solid var(--ink);
  background: var(--bg);
}
header.zt-site-header .nav {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
  max-width: var(--design-shell);
  margin: 0 auto;
  padding: 10px var(--design-gutter);
}
header a.wordmark {
  display: inline-flex;
  color: var(--ink);
  font: 800 clamp(20px, 5.6vw, 26px)/1.15 var(--design-font);
  letter-spacing: -.055em;
  text-decoration: none;
  background: linear-gradient(var(--design-ochre), var(--design-ochre)) left bottom / 32% 3px no-repeat;
  padding-block-end: 3px;
}
header .zt-nav-toggle-cb, header .zt-nav-toggle { display: none; }
header .zt-nav-links {
  display: flex;
  align-items: center;
  gap: 20px;
  font: 500 14px/1.3 var(--design-font);
}
header .zt-nav-links a { color: var(--ink); text-decoration: none; }
header .zt-nav-links a:not(.zt-nav-cta):hover { color: var(--brand); text-decoration: underline; }
header .zt-nav-links a.zt-nav-cta {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 40px;
  padding-inline: 14px;
  border: 1px solid var(--brand);
  border-radius: 8px;
  background: var(--brand);
  font-weight: 700;
}
main :is(.section-head, .zt-section-header, .zt-article-section, .article-head) h2 {
  font-family: var(--design-font);
  font-weight: 750;
  line-height: 1.16;
  letter-spacing: -.025em;
}
.design-feature > .lede.dropcap::first-letter {
  float: none;
  padding: 0;
  font: inherit;
  color: inherit;
}
.design-feature > :is(.byline, .zt-byline, .byline-p), .design-sources > :is(.zt-byline, .byline-p) {
  max-width: 760px;
  margin-block: 10px 0;
  color: var(--muted);
  font: 400 13px/1.45 var(--design-font);
}
.zt-byline .zt-byline-badge {
  padding: 2px 0;
  border: 0;
  background: none;
  color: inherit;
  font: inherit;
}
main .zt-tool {
  border-color: var(--design-stroke);
  border-radius: 12px;
  background: var(--surface);
}
main .zt-tool-side {
  background: #f2ede2;
  border-color: var(--design-stroke);
}
main .zt-tool-form :is(.zt-input, select) {
  min-height: 41px;
  background: var(--bg);
  border: 1px solid var(--design-stroke);
  border-radius: 6px;
  color: var(--ink);
  font: 400 16px/1.25 var(--design-font);
}
main :is(a, button).button {
  min-height: 44px;
  border-radius: 8px;
  font: 700 15px/1.25 var(--design-font);
  white-space: normal;
}
main table :is(th, td) { font-family: var(--design-font); }
main :is(p, li) { overflow-wrap: anywhere; }
main table.zt-cost-table :is(th, td:last-child) { white-space: normal; }
main .design-feature.zt-page-hero h1, main .article-head.design-feature h1 {
  max-width: 820px;
  font-size: clamp(29px, 7.8vw, 48px);
  text-wrap: balance;
}
main .design-feature.zt-calculator-hero { padding-block-end: 0; }
main .section.zt-intro { padding-block-start: 18px; }
main table th { letter-spacing: normal; text-transform: none; }

footer.footer {
  border-top: 1px solid var(--line);
  padding-block: 28px;
  font: 400 14px/1.5 var(--design-font);
}
footer .themen-footer,
footer :is(.footer-inner, .zt-footer-inner) {
  max-width: var(--design-shell);
  margin-inline: auto;
  padding-inline: var(--design-gutter);
  font-family: var(--design-font);
}
footer .themen-footer { grid-template-columns: repeat(4, minmax(0, 1fr)); }
footer .themen-footer h3 { font: 750 14px/1.35 var(--design-font); color: var(--ink); margin-bottom: 8px; }
footer .themen-footer a { font: inherit; color: var(--muted); }
footer .themen-footer a:hover { color: var(--brand); text-decoration: underline; }
footer :is(.footer-inner, .zt-footer-inner) { display: flex; flex-wrap: wrap; gap: 8px 18px; }
main .zt-tag { max-width: 100%; white-space: normal; overflow-wrap: anywhere; }

@media (max-width: 900px) {
  main :is(.zt-compare, .zt-tool-layout) { grid-template-columns: minmax(0, 1fr); }
  main .zt-tool-layout > .zt-tool-side { border-left: 0; border-top: 1px solid var(--design-stroke); }
}
@media (max-width: 860px) {
  header.zt-site-header .nav { padding-block: 5px; }
  html.zt-js header.zt-site-header .zt-nav-toggle {
    display: grid !important;
    grid-template-columns: 18px auto;
    grid-template-rows: repeat(3, 2px);
    align-content: center;
    justify-content: end;
    gap: 3px 8px;
    width: auto;
    min-width: 72px;
    min-height: 44px;
    border: 0;
    background: transparent;
    color: var(--ink);
    font: 500 14px/1 var(--design-font);
  }
  header .zt-nav-toggle span { width: 18px; height: 2px; background: var(--ink); }
  html.zt-js header .zt-nav-toggle::after {
    content: "Menü";
    grid-area: 1 / 2 / 4;
    align-self: center;
  }
  footer .themen-footer { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}
@media (max-width: 520px) {
  footer .themen-footer { grid-template-columns: minmax(0, 1fr); }
}
