/* Seite /ratgeber/ticketgebuehren-prozent-vs-festpreis: ausfuehrlicher Kostenratgeber.
   Nur Tokens aus styles.css, keine eigenen Farben. */

/* ---- Artikelbreite: .article__body begrenzt sonst auch .article__wide --- */
.artikel .article__body { max-width: none; }
.artikel .article__body > :not(.article__wide) { max-width: var(--container-prose); }
.artikel .article__body > p { max-width: min(68ch, var(--container-prose)); }
.artikel .article__wide { margin-block: var(--s-8); }
.artikel .note:first-child { margin-top: 0; }

/* ---- Hero: Text links, Gegenueberstellung rechts ------------------------- */
.artikel-hero {
  display: grid;
  grid-template-columns: minmax(0, 1.1fr) minmax(0, 1fr);
  gap: var(--s-12);
  align-items: center;
}
.artikel-hero__text .hero__sub { margin-bottom: var(--s-5); }
.artikel-hero__text .hero__lead { margin-bottom: var(--s-4); }
.artikel-hero__text .hero__lead:last-child { margin-bottom: 0; }
.artikel-hero__frage { margin: 0 0 var(--s-4); font-weight: 700; font-size: 1.1rem; }
@media (max-width: 900px) {
  .artikel-hero { grid-template-columns: minmax(0, 1fr); gap: var(--s-10); }
}

/* Interaktive Gegenueberstellung (reines CSS, Radio-Buttons) */
.modelle {
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: var(--r-card);
  box-shadow: var(--shadow-md);
  padding: var(--s-8) clamp(var(--s-4), 3vw, var(--s-8)) var(--s-6);
  display: grid;
  gap: var(--s-5);
}
.modelle__wahl {
  position: relative;
  display: grid;
  grid-template-columns: 1fr 1fr;
  padding: 4px;
  background: var(--paper);
  border: 1px solid var(--line);
  border-radius: var(--r-pill);
}
.modelle__wahl label {
  display: flex; align-items: center; justify-content: center;
  min-height: 44px; padding: 6px 12px;
  border-radius: var(--r-pill);
  font-weight: 700; cursor: pointer; color: var(--muted);
  transition: background-color .15s ease, color .15s ease;
}
.modelle__wahl label:hover { color: var(--ink); }
/* Radio liegt unsichtbar ueber seinem Label (44 px Trefferflaeche, fokussierbar) */
.modelle__wahl input {
  position: absolute; top: 4px; height: 44px; width: calc(50% - 4px);
  margin: 0; opacity: 0; pointer-events: none;
}
#m-prozent { left: 4px; }
#m-fest { right: 4px; }
.modelle__wahl input:checked + label { background: var(--tann); color: var(--card); }
.modelle__wahl input:focus-visible + label { outline: 3px solid var(--amber); outline-offset: 2px; }

.modelle__panels { display: grid; }
.modelle__panel { grid-area: 1 / 1; display: grid; gap: var(--s-4); align-content: start; }
.modelle:has(#m-fest:checked) .modelle__panel--prozent,
.modelle:has(#m-prozent:checked) .modelle__panel--fest { visibility: hidden; }
.modelle__titel { margin: 0; font-weight: 700; }
.modelle__hinweis { margin: 0; color: var(--muted); font-size: .92rem; }
.modelle__legende { font-size: .85rem; gap: var(--s-2) var(--s-5); }
.modelle__swatch--fix { background: var(--tann); }
.modelle__swatch--zahlung { background: var(--tann-tint); border: 1px solid var(--tann); }
.modelle__annahme { margin: 0; padding-top: var(--s-3); border-top: 1px solid var(--line); color: var(--muted); font-size: .85rem; }

.balken {
  list-style: none; margin: 0; padding: 0;
  display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: var(--s-4);
  align-items: end;
}
.balken li { display: grid; gap: var(--s-2); justify-items: center; text-align: center; min-width: 0; }
.balken__wert { font-family: var(--font-mono); font-variant-numeric: tabular-nums; font-weight: 600; font-size: .85rem; white-space: nowrap; }
.balken__spur {
  width: min(100%, 72px); height: 170px;
  display: flex; flex-direction: column; justify-content: flex-end;
  border-bottom: 2px solid var(--line-strong);
}
.balken__teil { display: block; height: var(--wert); min-height: 3px; }
.balken__teil--var { background: color-mix(in srgb, var(--amber) 45%, var(--card)); border: 2px dashed var(--amber-700); border-bottom: 0; border-radius: 6px 6px 0 0; }
.balken__teil--fix { background: var(--tann); }
.balken__teil--zahlung { background: var(--tann-tint); border: 1px solid var(--tann); border-bottom: 0; border-radius: 6px 6px 0 0; }
.balken__x { font-size: .8rem; color: var(--muted); }

/* Inhaltsverzeichnis: lange H2 als Liste in zwei Spalten statt Pillen */
.artikel-toc ol { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: var(--s-2) var(--s-4); }
.artikel-toc a { width: 100%; border-radius: var(--r-btn); justify-content: flex-start; text-align: left; line-height: 1.3; padding-block: 8px; }
@media (max-width: 760px) { .artikel-toc ol { grid-template-columns: minmax(0, 1fr); } }

/* ---- Gebuehrentabelle (Sektion 2) --------------------------------------- */
.gebuehren { border: 1px solid var(--line); border-radius: var(--r-card); background: var(--card); overflow: hidden; }
.gebuehren__kopf,
.gebuehr {
  display: grid;
  grid-template-columns: minmax(0, .8fr) minmax(0, 1.2fr) minmax(0, 1.2fr);
  gap: var(--s-6);
  padding: var(--s-5) var(--s-6);
}
.gebuehren__kopf { background: var(--paper); border-bottom: 1px solid var(--line); font-size: .78rem; font-weight: 700; letter-spacing: .08em; text-transform: uppercase; color: var(--muted); padding-block: var(--s-3); }
.gebuehr + .gebuehr { border-top: 1px solid var(--line); }
.gebuehr h3 { margin: 0; font-size: 1.08rem; line-height: 1.3; }
.gebuehr p { margin: 0; line-height: 1.55; }
.gebuehr p + p { margin-top: var(--s-2); }
.gebuehr__bsp { border-left: 3px solid var(--tann); padding-left: var(--s-4); }
.gebuehr__formel {
  display: inline-block; font-family: var(--font-mono); font-variant-numeric: tabular-nums;
  font-weight: 600; font-size: .9rem; background: var(--tann-tint); color: var(--tann-700);
  padding: 2px 10px; border-radius: 6px;
}
.gebuehr--ohne-bsp .gebuehr__was { grid-column: 2 / -1; }
@media (max-width: 860px) {
  .gebuehren__kopf { display: none; }
  .gebuehr { grid-template-columns: minmax(0, 1fr); gap: var(--s-3); padding: var(--s-5); }
  .gebuehr--ohne-bsp .gebuehr__was { grid-column: auto; }
}

/* ---- Modellvergleich: drei Kostenverlaeufe ------------------------------- */
.verlauf { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: var(--s-5); }
.verlauf__item { background: var(--card); border: 1px solid var(--line); border-radius: var(--r-card); padding: var(--s-6); display: grid; gap: var(--s-4); align-content: start; }
.verlauf__item p { margin: 0; }
.verlauf__icon { width: 64px; height: 40px; color: var(--tann); }
.verlauf__item:nth-child(-n+2) .verlauf__icon { color: var(--amber-700); }
@media (max-width: 860px) { .verlauf { grid-template-columns: minmax(0, 1fr); } }
.artikel__merksatz { font-weight: 700; font-size: 1.15rem; }

/* ---- Beispielrechnung (K13 .costs) --------------------------------------- */
.annahmen { list-style: none; margin: var(--s-5) 0 0; padding: 0; }
.artikel .costs { margin-top: 0; }
.costs__model { color: var(--ink); }
.costs__text { margin: 0; color: var(--muted); }
.rechenweg { margin: 0; padding: 0; list-style: none; display: grid; gap: var(--s-3); counter-reset: weg; }
.rechenweg li {
  counter-increment: weg; position: relative;
  padding: var(--s-3) var(--s-4) var(--s-3) 2.6em;
  border: 1px solid var(--line); border-radius: var(--r-btn); background: var(--paper);
}
.rechenweg li::before { content: counter(weg); position: absolute; left: var(--s-4); top: var(--s-3); font-family: var(--font-mono); font-weight: 600; color: var(--tann); }
.rechenweg__formel { display: block; margin-top: var(--s-1); font-family: var(--font-mono); font-variant-numeric: tabular-nums; font-size: .88rem; color: var(--muted); }
.costs__model .rechenweg__formel { margin-top: var(--s-2); }
.costs__sum strong { font-weight: 600; }
.rechenweg__summe { margin: calc(-1 * var(--s-2)) 0 0; font-family: var(--font-mono); font-variant-numeric: tabular-nums; font-size: .88rem; color: var(--muted); }
.costs__result strong { font-family: var(--font-sans); font-size: clamp(1.1rem, 1rem + .5vw, 1.3rem); font-weight: 700; }

/* ---- Einkaufswagen (K15 .carts) ------------------------------------------ */
.artikel .carts { margin-top: 0; }
.cart__badge { justify-self: start; }
@media (max-width: 640px) { .artikel .carts { grid-template-columns: minmax(0, 1fr); } }
/* Je Karte ein gezeichneter Einkaufswagen, die Tickets liegen im Korb */
.cart__order--wagen { flex-direction: column; justify-content: flex-start; gap: var(--s-4); border: 0; padding: var(--s-2) 0 0; }
.cart__wagen { position: relative; display: block; width: min(100%, 260px); aspect-ratio: 200 / 140; color: var(--ink); }
.cart__gestell { position: absolute; inset: 0; width: 100%; height: 100%; }
/* Korbflaeche im SVG: x 38 bis 192, y 32 bis 96 (Trapez), Tickets mittig darin */
.cart__wagen .cart__tickets {
  position: absolute; left: 24%; right: 8%; top: 25%; height: 43%;
  display: flex; align-items: center; justify-content: center; gap: 6%;
}
.cart__wagen .cart__ticket { width: 24%; max-width: 46px; height: auto; aspect-ratio: 3 / 2; border-radius: 5px; }
.cart__mal {
  position: absolute; top: 0; right: 0;
  font-family: var(--font-mono); font-weight: 700; font-size: 1rem;
  padding: 2px 10px; border-radius: var(--r-pill);
  background: var(--amber); color: var(--ink);
}

/* ---- Gewinnschwelle und Rechner ------------------------------------------ */
.artikel__cta { margin-top: var(--s-6); }
.artikel__rechner { scroll-margin-top: 96px; }
.artikel__rechner .rechner { margin-top: 0; }

/* ---- Kostenfallen -------------------------------------------------------- */
.fallen { display: grid; gap: var(--s-3); margin-top: var(--s-6); }
.fallen__item { background: var(--card); border: 1px solid var(--line); border-left: 4px solid var(--tann); border-radius: var(--r-btn); padding: var(--s-5) var(--s-6); }
.fallen__item h3 { margin: 0 0 var(--s-2); font-size: 1.1rem; }
.fallen__item p { margin: 0; }

.artikel .faq { margin-top: var(--s-6); }

/* Abschluss-Band: Linkzeile nicht auf Absatzbreite umbrechen */
.cta-band .cta-band__links { max-width: none; align-items: center; }
.artikel .annahmen { padding-left: 0; }
.artikel .rechner__range { min-height: 44px; }
