









.md .tf-ton-ok      { --ton: var(--ok);      --ton-f: var(--ok-flaeche);     --ton-l: var(--ok-linie);     --ton-t: var(--ok-tief); }
.md .tf-ton-warn    { --ton: var(--warn);    --ton-f: var(--warn-flaeche);   --ton-l: var(--warn-linie);   --ton-t: var(--warn-tief); }
.md .tf-ton-risiko  { --ton: var(--fehler);  --ton-f: var(--fehler-flaeche); --ton-l: var(--fehler-linie); --ton-t: var(--fehler-tief); }
.md .tf-ton-info    { --ton: var(--p);       --ton-f: var(--p-flaeche);      --ton-l: var(--p-linie);      --ton-t: var(--p-tief); }
.md .tf-ton-akzent  { --ton: var(--s);       --ton-f: var(--s-flaeche);      --ton-l: var(--s-linie);      --ton-t: var(--s-tief); }
.md .tf-ton-neutral { --ton: var(--text-3);  --ton-f: var(--flaeche-2);      --ton-l: var(--linie);        --ton-t: var(--text-2); }

.md template.tf-orig { display: none; }
.md .tf-ic { width: 16px; height: 16px; flex: none; fill: none; stroke: currentColor; stroke-width: 1.4;
  stroke-linecap: round; stroke-linejoin: round; }


.md .tf-zahl, .md .tf-geld, .md .tf-proz { font-variant-numeric: tabular-nums; font-weight: 600; color: var(--text); white-space: nowrap; }
.md .tf-geld { padding: 0 4px; border-radius: 4px; background: var(--flaeche-3); }
.md .tf-proz-balken {
  background-image: linear-gradient(var(--p-linie), var(--p-linie)), linear-gradient(var(--linie), var(--linie));
  background-repeat: no-repeat; background-position: 0 100%, 0 100%;
  background-size: var(--tf-p, 0%) 2px, 100% 2px; padding-bottom: 2px;
}
.md .tf-datum { white-space: nowrap; text-decoration: underline dotted var(--linie-stark); text-underline-offset: 3px; }
.md .tf-tasten { white-space: nowrap; }
.md kbd.tf-taste {
  font-family: var(--mono); font-size: 11.5px; line-height: 1.5; padding: 0 5px; margin: 0 1px;
  border: 1px solid var(--linie-stark); border-bottom-width: 2px; border-radius: 5px; background: var(--flaeche); color: var(--text);
}
.md .tf-stand {
  display: inline-block; padding: 0 7px; border-radius: 999px; font-size: 12px; line-height: 1.55; white-space: nowrap;
  border: 1px solid var(--ton-l); background: var(--ton-f); color: var(--ton-t);
}
.md .tf-zeichen { display: inline-flex; vertical-align: -3px; color: var(--ton); }
.md .tf-zeichen-roh { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }


.md p.tf-leit { font-size: 15px; line-height: 1.5; font-weight: 500; color: var(--text); margin-bottom: 14px; }


.md .tf-karte {
  margin: 12px 0; padding: 12px 14px; border: 1px solid var(--linie); border-radius: var(--r-2); background: var(--flaeche-2);
}
.md .tf-karte-kopf { font-weight: 600; font-size: 13.5px; line-height: 1.35; color: var(--text); margin-bottom: 4px; }
.md .tf-karte-text { line-height: 1.55; }
.md .tf-karte-leit { border-color: var(--s-linie); background: var(--s-flaeche); }
.md .tf-karte-leit .tf-karte-kopf { color: var(--s-tief); }
.md .tf-karten { margin: 12px 0; }
.md .tf-karten > .tf-karte { margin: 0 0 10px; }
.md .tf-karten > .tf-karte:last-of-type { margin-bottom: 0; }
.md .tf-karten-raster { display: grid; grid-template-columns: repeat(auto-fit, minmax(240px, 1fr)); gap: 10px; }
.md .tf-karten-raster > .tf-karte { margin: 0; }


.md .tf-marke { display: grid; grid-template-columns: minmax(84px, max-content) 1fr; gap: 4px 12px; align-items: baseline; margin: 6px 0; }
.md .tf-marke-name {
  justify-self: start; padding: 1px 7px; border: 1px solid var(--linie-stark); border-radius: 6px;
  font-size: 11px; font-weight: 600; letter-spacing: .06em; color: var(--text-2); line-height: 1.5; white-space: nowrap;
}
.md .tf-marke-text { min-width: 0; }
.md .tf-rahmen {
  margin: 0 0 14px; padding: 8px 12px; border: 1px solid var(--linie); border-radius: var(--r-2);
  background: var(--flaeche-2); font-size: 12.5px; color: var(--text-2);
}
.md .tf-rahmen > .tf-marke { margin: 3px 0; }
.md .tf-rahmen .tf-marke-name { border-color: var(--linie); color: var(--text-3); }


.md .tf-hinweis {
  display: flex; gap: 10px; align-items: flex-start; margin: 12px 0; padding: 10px 12px;
  border: 1px solid var(--ton-l); background: var(--ton-f); border-radius: var(--r-2);
}
.md .tf-hinweis > .tf-ic { color: var(--ton); margin-top: 2px; }
.md .tf-hinweis > p { margin: 0; }
.md .tf-fazit { margin: 14px 0; padding: 12px 14px; border: 1px solid var(--linie-stark); border-radius: var(--r-2); background: var(--flaeche); }
.md .tf-fazit > p { margin: 0; font-weight: 500; }


.md ul.tf-chips { display: flex; flex-wrap: wrap; gap: 6px; padding: 0; list-style: none; }
.md ul.tf-chips > li {
  margin: 0; padding: 2px 10px; border: 1px solid var(--linie); border-radius: 999px; background: var(--flaeche-2);
  font-size: 12.5px; line-height: 1.5;
}
.md ol.tf-schritte { list-style: none; padding: 0; counter-reset: tf-schritt; }
.md ol.tf-schritte > li { position: relative; margin: 0 0 8px; padding: 1px 0 0 32px; counter-increment: tf-schritt; min-height: 22px; }
.md ol.tf-schritte > li::before {
  content: counter(tf-schritt); position: absolute; left: 0; top: 0; width: 22px; height: 22px; box-sizing: border-box;
  border: 1px solid var(--linie-stark); border-radius: 50%; background: var(--flaeche); display: flex;
  align-items: center; justify-content: center; font-size: 11.5px; font-weight: 600; color: var(--text-2);
  font-variant-numeric: tabular-nums;
}
.md ul.tf-status { list-style: none; padding: 0; }
.md ul.tf-status > li {
  margin: 0 0 6px; padding: 5px 10px; border: 1px solid var(--ton-l); border-radius: var(--r-1); background: var(--ton-f);
}
.md ul.tf-status > li.tf-ton-neutral { background: none; }
.md dl.tf-raster { margin: 0 0 10px; display: grid; grid-template-columns: minmax(110px, max-content) 1fr; }
.md .tf-raster-z { display: contents; }
.md .tf-raster dt, .md .tf-raster dd { margin: 0; padding: 6px 0; border-top: 1px solid var(--linie); }
.md .tf-raster dt { font-weight: 600; padding-right: 16px; color: var(--text); }
.md .tf-raster-z:first-child > * { border-top: 0; }
.md .tf-raster-voll > dd { grid-column: 1 / -1; }


.md table.tf-tabelle .tf-num { text-align: right; font-variant-numeric: tabular-nums; }


.md .tf-fa { margin: 10px 0; padding: 10px 14px; border: 1px solid var(--linie); border-radius: var(--r-2); }
.md .tf-fa > :last-child { margin-bottom: 0; }
.md .tf-fa > p.tf-frage, .md .tf-fa > p:first-child { font-weight: 600; margin-bottom: 4px; }


.md .tf-brief { margin: 14px 0; border: 1px solid var(--linie-stark); border-radius: var(--r-2); background: var(--flaeche); overflow: hidden; }
.md .tf-brief-kopf {
  display: flex; align-items: center; justify-content: space-between; gap: 10px; padding: 6px 10px 6px 14px;
  border-bottom: 1px solid var(--linie); background: var(--flaeche-2);
}
.md .tf-brief-name { font-size: 11px; font-weight: 600; letter-spacing: .06em; text-transform: uppercase; color: var(--text-3); }
.md .tf-kopieren {
  font: inherit; font-size: 12px; padding: 2px 10px; border: 1px solid var(--linie-stark); border-radius: var(--r-1);
  background: var(--flaeche); color: var(--text-2); cursor: pointer;
}
.md .tf-kopieren:hover { color: var(--text); border-color: var(--text-3); }
.md .tf-kopieren.kopiert { color: var(--ok); border-color: var(--ok-linie); }
.md .tf-brief-text { padding: 14px 18px; }
.md .tf-brief-text > :last-child { margin-bottom: 0; }


.md .tf-bericht {
  margin: 14px 0; padding: 10px 12px 12px; border: 1px solid var(--linie); border-radius: var(--r-2);
  background: var(--flaeche-2); font-size: 12.5px; color: var(--text-2);
}
.md .tf-bericht-kopf { font-size: 11px; font-weight: 600; letter-spacing: .06em; text-transform: uppercase; color: var(--text-3); margin: 0 0 8px 2px; }
.md .tf-bericht-raster { display: flex; flex-direction: column; gap: 8px; }


.md .tf-spalten { columns: 2 260px; column-gap: 8px; }
.md .tf-spalten > * { break-inside: avoid; display: block; margin: 0 0 8px; }
.md .tf-spalten > :last-child { margin-bottom: 0; }
.md .tf-bericht-teil { min-width: 0; padding: 8px 10px; border: 1px solid var(--linie); border-radius: var(--r-1); background: var(--flaeche); }
.md .tf-bericht-name { display: inline-block; margin-bottom: 4px; font-size: 11px; font-weight: 600; letter-spacing: .06em; color: var(--text-2); }
.md .tf-bericht-rumpf > :last-child { margin-bottom: 0; }
.md .tf-bericht-rumpf p { margin: 0 0 6px; }
.md .tf-bericht-rumpf ul, .md .tf-bericht-rumpf ol { margin-bottom: 6px; }
.md .tf-bericht-rumpf .nkv { margin: 8px 0; }


.md .tf-uebersicht { margin: 12px 0; display: flex; flex-direction: column; gap: 10px; }
.md .tf-uebersicht > .tf-spalten { column-gap: 10px; }
.md .tf-uebersicht > .tf-spalten > :not(:last-child) { margin-bottom: 10px; }
.md .tf-abschnitt { min-width: 0; padding: 12px 14px; border: 1px solid var(--linie); border-radius: var(--r-2); background: var(--flaeche-2); }
.md .tf-abschnitt-kopf { font-weight: 600; font-size: 13.5px; color: var(--text); margin-bottom: 6px; }
.md .tf-abschnitt > :last-child { margin-bottom: 0; }


.md .tf-text > :last-child { margin-bottom: 0; }



.answer.md:has(> [data-tf-o]) { display: flex; flex-direction: column; row-gap: 10px; }
.answer.md:has(> [data-tf-o]) > * { margin-top: 0; margin-bottom: 0; }
.answer.md > [data-tf-o="0"] { order: 0; }
.answer.md > [data-tf-o="1"] { order: 1; }
.answer.md > [data-tf-o="2"] { order: 2; }
.answer.md > [data-tf-o="3"] { order: 3; }

@media (max-width: 560px) {
  .md .tf-marke { grid-template-columns: 1fr; gap: 2px; }
  .md dl.tf-raster { grid-template-columns: 1fr; }
  .md .tf-raster dd { border-top: 0; padding-top: 0; }
}


.md .nkv-ansicht-text { margin: 12px 0; }
.md .nkv-ansicht-text > :last-child, .md .nkv-ansicht-extra > :last-child, .md .tf-extra > :last-child { margin-bottom: 0; }


.ans-knopf {
  position: fixed; z-index: 60; width: 26px; height: 26px; padding: 0; display: inline-flex; align-items: center; justify-content: center;
  border: 1px solid var(--linie-stark); border-radius: var(--r-1); background: var(--flaeche); color: var(--text-2);
  cursor: pointer; box-shadow: 0 1px 2px rgba(0,0,0,.06);
}
.ans-knopf[hidden] { display: none; }
.ans-knopf:hover, .ans-knopf:focus-visible { color: var(--text); border-color: var(--text-3); }
.ans-knopf svg { width: 14px; height: 14px; fill: none; stroke: currentColor; stroke-width: 1.3; }
.ans-menue {
  position: fixed; z-index: 61; min-width: 200px; max-width: 280px; padding: 4px; display: flex; flex-direction: column;
  border: 1px solid var(--linie-stark); border-radius: var(--r-2); background: var(--flaeche); color: var(--text);
  box-shadow: 0 8px 24px rgba(0,0,0,.12); font-size: 12.5px;
}
.ans-menue[hidden] { display: none; }
.ans-kopf { padding: 5px 9px 4px; font-size: 11px; font-weight: 600; letter-spacing: .06em; text-transform: uppercase; color: var(--text-3); }
.ans-eintrag {
  display: flex; align-items: baseline; justify-content: space-between; gap: 10px; width: 100%; padding: 6px 9px;
  border: 1px solid transparent; border-radius: var(--r-1); background: none; color: inherit; font: inherit; text-align: left; cursor: pointer;
}
.ans-eintrag:hover, .ans-eintrag:focus-visible { background: var(--flaeche-2); border-color: var(--linie); outline: none; }
.ans-eintrag.an { font-weight: 600; cursor: default; }
.ans-eintrag.an::after { content: "✓"; margin-left: auto; color: var(--text-2); font-weight: 400; }
.ans-eintrag.an .ans-hinweis { margin-right: 6px; }
.ans-eintrag.laeuft { cursor: progress; opacity: .8; }
.ans-hinweis { font-size: 11px; font-weight: 400; color: var(--text-3); white-space: nowrap; }
.ans-trenner { height: 1px; margin: 4px 6px; background: var(--linie); }


.answer.md > [data-tf-o="2"] ~ [data-tf-o="2"] > .tf-bericht-kopf { display: none; }
.ans-kopf-zwei { padding-top: 2px; }
