/* ==========================================================================
   wechseln.css: nur für /it-dienstleister-wechseln/ (Präfix wx-). Wird nach
   dem Haupt-Stylesheet geladen. Akzent über rgb(var(--dyn-acc)), Dunkelmodus
   über body.dark. Bausteine: Symptomliste (wx-liste), Fakten (wx-fakt),
   Beispielrechnung (wx-rechnung), Einwände (Akkordeon lstg-faq).
   ========================================================================== */

/* ---- Akzenttext: im Hellmodus abdunkeln ---- */
.wx-page .wx-akz { color: rgb(var(--dyn-acc)); }
body.wx-page:not(.dark) .wx-akz {
  color: color-mix(in srgb, rgb(var(--dyn-acc)) 48%, var(--txt));
  color: oklch(from rgb(var(--dyn-acc)) min(l, .52) c h);
}

/* ---- Bedienbarkeit ---- */
.wx-page .btn { cursor: pointer; }
.wx-page a:focus-visible, .wx-page .btn:focus-visible { outline: 2px solid rgb(var(--dyn-acc)); outline-offset: 3px; border-radius: 4px; }

/* ---- Hero ---- */
.wx-hero .ht-line, .wx-hero .ht-line.long { font-size: clamp(2.3rem, 6.1vw, 5.4rem); white-space: normal; }
.wx-hero .plead { max-width: 580px; }
.wx-hero-cta { display: flex; flex-wrap: wrap; align-items: center; gap: 1rem 1.8rem; margin-top: 2rem; }
.wx-hero-cta .btn.bm { color: #15201e; margin: 0; }
.wx-tel {
  display: inline-flex; align-items: center; gap: .6rem; min-height: 44px;
  font: 700 .98rem/1 "Josefin Sans", sans-serif; letter-spacing: .03em; color: var(--txt); text-decoration: none;
}
.wx-tel svg { flex: none; color: rgb(var(--dyn-acc)); transition: transform .3s cubic-bezier(.2, .85, .3, 1); }
.wx-tel span { border-bottom: 1.5px solid rgba(var(--dyn-acc), .55); transition: border-color .25s; }
.wx-tel:hover span { border-color: rgb(var(--dyn-acc)); }
.wx-tel:hover svg { transform: rotate(-12deg) scale(1.08); }

/* ---- Fließtext-Bausteine ---- */
.wx-intro { max-width: 66ch; margin: 0 0 1.4rem; line-height: 1.72; color: var(--txt-sub); }
.wx-intro a, .wx-fazit a, .wx-mehr a, .wx-hinweis a, .wx-q a, .wx-rechnung td a {
  color: var(--txt); text-decoration: none; border-bottom: 1.5px solid rgba(var(--dyn-acc), .55);
}
.wx-intro a:hover, .wx-fazit a:hover, .wx-mehr a:hover, .wx-hinweis a:hover, .wx-q a:hover, .wx-rechnung td a:hover { border-color: rgb(var(--dyn-acc)); }
.wx-dauer {
  max-width: 62ch; margin: 0 0 1.6rem; padding: .3rem 0 .3rem 1.1rem; line-height: 1.65;
  border-left: 2px solid rgb(var(--dyn-acc)); color: var(--txt);
}
.wx-fazit { max-width: 62ch; margin: 2rem 0 0; line-height: 1.7; color: var(--txt); }
.wx-mehr { margin: 1.4rem 0 0; color: var(--txt-sub); }

/* ---- Symptomliste: redaktionell, ohne Waisenkarte ---- */
.wx-liste { list-style: none; margin: 2.2rem 0 0; padding: 0; counter-reset: zeichen; }
.wx-liste li {
  counter-increment: zeichen; display: grid; grid-template-columns: 3.6rem minmax(0, 1fr) minmax(0, 1.25fr);
  gap: .4rem clamp(1rem, 3vw, 2.6rem); align-items: baseline; padding: 1.35rem 0; border-top: 1px solid var(--line);
  transition: background .3s;
}
.wx-liste li:last-child { border-bottom: 1px solid var(--line); }
.wx-liste li::before {
  content: counter(zeichen, decimal-leading-zero); font: 700 .95rem/1 "Josefin Sans", sans-serif;
  letter-spacing: .06em; color: rgb(var(--dyn-acc));
}
body.wx-page:not(.dark) .wx-liste li::before {
  color: color-mix(in srgb, rgb(var(--dyn-acc)) 48%, var(--txt));
  color: oklch(from rgb(var(--dyn-acc)) min(l, .52) c h);
}
.wx-liste h3 { margin: 0; font: 700 1.3rem/1.2 "Josefin Sans", sans-serif; text-transform: lowercase; color: var(--txt); }
.wx-liste p { margin: 0; font-size: .96rem; line-height: 1.65; color: var(--txt-sub); }
.wx-liste li:hover { background: linear-gradient(90deg, rgba(var(--dyn-acc), .06), transparent 70%); }
body.subpage .reveal-in .wx-liste > li { animation: kapIn .6s cubic-bezier(.22, 1, .36, 1) backwards; }
body.subpage .reveal-in .wx-liste > li:nth-child(2) { animation-delay: .06s; }
body.subpage .reveal-in .wx-liste > li:nth-child(3) { animation-delay: .12s; }
body.subpage .reveal-in .wx-liste > li:nth-child(4) { animation-delay: .18s; }
body.subpage .reveal-in .wx-liste > li:nth-child(5) { animation-delay: .24s; }
body.subpage .reveal-in .wx-liste > li:nth-child(6) { animation-delay: .3s; }
body.subpage .reveal-in .wx-liste > li:nth-child(7) { animation-delay: .36s; }

/* ---- Fakten ---- */
.wx-fakten { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 1rem; margin-top: 1.8rem; }
.wx-fakt {
  display: flex; flex-direction: column; padding: 1.4rem 1.3rem 1.2rem; border: 1px solid var(--line);
  border-radius: 14px; background: var(--kap-card);
  transition: transform .3s cubic-bezier(.2, .85, .3, 1), border-color .3s, background .3s;
}
.wx-fakt:hover { transform: translateY(-3px); border-color: rgba(var(--dyn-acc), .35); background: var(--kap-card-h); }
.wx-zahl { margin: 0; font: 700 clamp(1.9rem, 3vw, 2.6rem)/1 "Josefin Sans", sans-serif; letter-spacing: -.01em; white-space: nowrap; }
.wx-fakt-t { margin: .8rem 0 0; font-size: .92rem; line-height: 1.6; color: var(--txt-sub); flex: 1; }
.wx-q a, .wx-rechnung td:last-child a { display: inline-block; padding: .45em 0; margin: -.45em 0; }
.wx-q { margin: .9rem 0 0; font: 700 .7rem/1.3 "Josefin Sans", sans-serif; letter-spacing: .12em; text-transform: lowercase; color: var(--txt-sub); }

/* ---- Beispielrechnung ---- */
.wx-h3 {
  display: flex; flex-wrap: wrap; align-items: center; gap: .5rem .9rem; margin: 3rem 0 .8rem;
  font: 700 clamp(1.3rem, 2.4vw, 1.75rem)/1.2 "Josefin Sans", sans-serif; text-transform: lowercase; color: var(--txt);
}
.wx-kein {
  padding: .25rem .7rem; border: 1.5px solid rgb(var(--dyn-acc)); border-radius: 999px;
  font-size: .68rem; letter-spacing: .16em; color: var(--txt);
}
.wx-rechnung { margin-top: 1.2rem; }
.wx-tab { width: 100%; border-collapse: collapse; table-layout: fixed; margin: 0 0 2rem; }
.wx-tab th:nth-child(1) { width: 50%; }
.wx-tab th:nth-child(2) { width: 18%; }
.wx-tab th:nth-child(3) { width: 16%; }
.wx-tab th:nth-child(4) { width: 16%; }
.wx-tab:last-child { margin-bottom: 0; }
.wx-tab caption {
  caption-side: top; text-align: left; padding: 0 0 .7rem; font: 700 .72rem/1.2 "Josefin Sans", sans-serif;
  letter-spacing: .18em; text-transform: lowercase; color: var(--txt-sub);
}
.wx-tab th {
  padding: .6rem 1rem .7rem; text-align: left; white-space: nowrap; border-bottom: 2px solid rgb(var(--dyn-acc));
  font: 700 .8rem/1.2 "Josefin Sans", sans-serif; letter-spacing: .1em; text-transform: lowercase; color: var(--txt);
}
.wx-tab th:first-child, .wx-tab td:first-child { padding-left: 0; }
.wx-tab th:nth-child(3), .wx-tab td:nth-child(3) { text-align: right; }
.wx-tab td {
  padding: .95rem 1rem; border-bottom: 1px solid var(--line); vertical-align: baseline;
  font-size: .96rem; line-height: 1.5; color: var(--txt);
}
.wx-tab td:first-child { font-weight: 700; padding-right: 1.5rem; }
.wx-tab td:nth-child(2) { white-space: nowrap; color: var(--txt-sub); }
.wx-tab td:nth-child(3) { white-space: nowrap; font-weight: 700; font-variant-numeric: tabular-nums; }
.wx-tab td:last-child { font-size: .86rem; color: var(--txt-sub); white-space: nowrap; }
.wx-tab tbody tr { transition: background .25s; }
.wx-tab tbody tr:hover { background: rgba(var(--dyn-acc), .05); }
.wx-tab tr.wx-sum td { border-top: 2px solid rgb(var(--dyn-acc)); border-bottom: 0; font-weight: 700; font-size: 1.1rem; color: var(--txt); }
.wx-tab tr.wx-sum:hover { background: none; }
.wx-hinweis {
  max-width: 72ch; margin: 1.6rem 0 0; padding-left: 1rem; border-left: 2px solid rgba(var(--dyn-acc), .7);
  font-size: .9rem; line-height: 1.65; color: var(--txt-sub);
}
.wx-hinweis strong { color: var(--txt); }

/* ---- Einwände (Akkordeon lstg-faq) ---- */
.wx-page .lstg-faq { max-width: 820px; margin-top: 1.6rem; }
.wx-page .lstg-faq-item { scroll-margin-top: 7.5rem; }
.wx-page .lstg-faq-a p { margin: .5rem 0 0; }
.wx-page .lstg-faq-a p:first-child { margin-top: 0; }
.wx-page .lstg-faq-item[open] .lstg-faq-a { animation: wxAuf .4s cubic-bezier(.22, 1, .36, 1); }
.wx-page .lstg-faq-q { cursor: pointer; overflow-wrap: anywhere; hyphens: auto; }
@keyframes wxAuf { from { opacity: 0; transform: translateY(-4px); } to { opacity: 1; transform: none; } }

/* ---- CTA-Band: Telefonzeile ---- */
.wx-page .cta-band-tel { margin: 1.3rem 0 0; font-size: .95rem; color: rgba(255, 255, 255, .74); }
.wx-page .cta-band-tel a { color: #fff; font-weight: 700; text-decoration: none; border-bottom: 1.5px solid #69C5B2; }

/* ---- schmal ---- */
@media (max-width: 1100px) {
  .wx-fakten { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}
@media (max-width: 860px) {
  .wx-liste li { grid-template-columns: 3rem minmax(0, 1fr); }
  .wx-liste li p { grid-column: 2; }
}
@media (max-width: 560px) {
  .wx-hero .ht-line, .wx-hero .ht-line.long { font-size: clamp(2.05rem, 10.6vw, 2.9rem); }
  .wx-fakten { grid-template-columns: minmax(0, 1fr); gap: .7rem; }
  .wx-fakt { padding: 1.15rem 1.1rem 1rem; }
  .wx-liste li { grid-template-columns: 2.4rem minmax(0, 1fr); padding: 1.1rem 0; }
  .wx-liste h3 { font-size: 1.12rem; }
  .wx-hero-cta { gap: .4rem; }
  .wx-hero-cta .btn.bm { width: 100%; }
  .wx-h3 { margin-top: 2.2rem; }
}
/* Tabelle als Zeilenkarten: Posten oben, Menge und Betrag darunter, Quelle zuletzt */
@media (max-width: 680px) {
  .wx-tab { table-layout: auto; }
  .wx-tab thead { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); clip-path: inset(50%); }
  .wx-tab, .wx-tab tbody, .wx-tab caption { display: block; }
  .wx-tab tr { display: grid; grid-template-columns: minmax(0, 1fr) auto; gap: .3rem 1rem; padding: 1rem 0; border-bottom: 1px solid var(--line); }
  .wx-tab td { display: block; padding: 0; border: 0; white-space: normal; }
  .wx-tab td:first-child { grid-column: 1 / -1; padding-right: 0; }
  .wx-tab td:nth-child(2) { grid-column: 1; }
  .wx-tab td:nth-child(3) { grid-column: 2; grid-row: 2; }
  .wx-tab td:last-child { grid-column: 1 / -1; font-size: .8rem; }
  .wx-tab tr.wx-sum { grid-template-columns: minmax(0, 1fr) auto; border-top: 2px solid rgb(var(--dyn-acc)); border-bottom: 0; }
  .wx-tab tr.wx-sum td { border: 0; }
  .wx-tab tr.wx-sum td:first-child { grid-column: 1; }
  .wx-tab tr.wx-sum td:nth-child(3) { grid-row: 1; }
  .wx-tab td:empty { display: none; }
}
@media (prefers-reduced-motion: reduce) {
  .wx-tab tbody tr { transition: none; }
  .wx-fakt, .wx-tel svg, .wx-liste li { transition: none; }
  .wx-fakt:hover { transform: none; }
  body.subpage .reveal-in .wx-liste > li, .wx-page .lstg-faq-item[open] .lstg-faq-a { animation: none; }
}
