/* openTMSnat — Tarif-Auswahl A–C und Vergleichstabelle, gemeinsam für die Startseite (index.html #preis)
   und die App (views/tarife.html, Seite „Tarif wählen“). Verhalten: js/tarife-tabelle.js. Tokens aus css/design.css.
   Bis 11.11.2026 stand dieser Block in css/landing.css. */
/* ============================================================
   Tarife Starter · Basic · Premium.
   Auswahl A–C und Vergleichstabelle sind ein Block (js/tarife-tabelle.js):
   - data-modus="einzeln": links die drei Tarife mit Preis, rechts nur die Spalte des gewählten
     Tarifs (data-sel). Die drei Spalten liegen übereinander in derselben Zelle und blenden über.
     Die Auswahl ist so hoch wie die Tabelle, die Kopfzeile mit den Preisen gibt es dann nur für Vorleseprogramme.
   - data-modus="alle" (und ohne JS): alle drei Spalten mit Kopfzeile, die Auswahl ist ausgeblendet.
   - data-anim: kurz gesetzt beim Umschalten, für die Einblende-Animation.
   Basic ist empfohlen (Textmarker, Hervorhebung in „alle“), Premium trägt fließende Regenbogenfarben.
   ============================================================ */
.tarife { --tt-hl: var(--otms-tint); --tt-plus: var(--otms-tint); --tw-mark: var(--otms-tint);
    --rb: #d6006f, #e04e00, #b87900, #12904a, #0068d6, #6a32d8, #d6006f;
    max-width: 1200px; margin: 0 auto; padding: 72px var(--otms-pad) 0; scroll-margin-top: 76px; }
@supports (color: color-mix(in srgb, red 50%, blue)) {
    .tarife { --tt-hl: color-mix(in srgb, var(--otms-accent) 6%, var(--otms-surface));
        --tt-plus: color-mix(in srgb, var(--otms-accent) 13%, var(--otms-surface));
        --tw-mark: color-mix(in srgb, var(--otms-accent) 34%, transparent); }
}
.dark .tarife { --rb: #ff6fb5, #ff8f57, #f2c14e, #52d98f, #63b4ff, #ad8fff, #ff6fb5; }
.tt-sprite { position: absolute; width: 0; height: 0; overflow: hidden; }
.tt-i { width: 20px; height: 20px; flex: none; fill: none; stroke: currentColor; stroke-width: 1.6; stroke-linecap: round; stroke-linejoin: round; }
.tarife-kopf { max-width: 760px; }
.tarife-kopf .otms-muted { font-size: 17px; margin: 0; }
.tarife-body { max-width: 1040px; margin-top: 28px; display: grid; grid-template-columns: minmax(0, 1fr); gap: 24px 32px; align-items: stretch; }
.tarife[data-modus="einzeln"] .tarife-body { grid-template-columns: minmax(0, .62fr) minmax(0, 1fr); }
.tarife:not([data-modus="einzeln"]) .tarife-wahl { display: none; }

/* Auswahl A–C: Name in Großbuchstaben und Preis wie in der Tabelle, so hoch wie die Tabelle */
.tarife-wahl__in { display: flex; flex-direction: column; height: 100%; }
.tw { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; flex: 1; }
.tw li { flex: 1; display: flex; border-top: 1px solid var(--otms-line); }
.tw li:last-child { border-bottom: 1px solid var(--otms-line); }
.tw-opt { flex: 1; position: relative; display: grid; grid-template-columns: 34px minmax(0, 1fr) auto; align-items: center; gap: 16px; padding: 16px 14px;
    cursor: pointer; transition: background-color .2s ease, box-shadow .2s ease; }
.tw-opt:hover { background: var(--otms-tint); }
.tw-opt:has(input:checked) { background: var(--otms-tint); box-shadow: inset 0 0 0 2px var(--otms-ink); }
.tw-opt input { position: absolute; opacity: 0; width: 1px; height: 1px; }
.tw-opt:has(input:focus-visible) { outline: 2px solid var(--otms-focus); outline-offset: 2px; }
.tw-opt:has(input:checked) .otms-oval { background: var(--otms-pencil); border-color: var(--otms-pencil); color: transparent; }
.tw-text { display: grid; justify-items: start; gap: 7px; min-width: 0; }
.tw-name { font: 700 22px/1 var(--otms-f-display); letter-spacing: .05em; text-transform: uppercase; }
.tw-preis { font: 600 38px/1 var(--otms-f-display); white-space: nowrap; }
.tw-preis small, .tt-preis small { font-size: .5em; font-weight: 600; letter-spacing: .02em; white-space: nowrap; }
.tw-sub { font-size: 14px; font-weight: 500; line-height: 1.3; }
.tw-mark { position: relative; z-index: 0; white-space: nowrap; }
.tw-mark::before { content: ""; position: absolute; z-index: -1; left: -.16em; right: -.24em; bottom: .02em; height: .48em;
    background: var(--tw-mark); border-radius: .3em .12em .38em .16em; transform: rotate(-1.4deg) skewX(-12deg); }

/* Premium: fließende Regenbogenfarben in Schrift und Textmarker */
.tt-regenbogen { background: linear-gradient(90deg, var(--rb)) 0 0 / 200% 100% repeat-x;
    -webkit-background-clip: text; background-clip: text; color: transparent; -webkit-text-fill-color: transparent;
    animation: tt-regenbogen 7s linear infinite; }
.tw-mark--premium::before { background: linear-gradient(90deg, var(--rb)) 0 0 / 200% 100% repeat-x; opacity: .24; animation: tt-regenbogen 7s linear infinite; }
.dark .tw-mark--premium::before { opacity: .32; }
.tarife[data-aus] .tt-regenbogen, .tarife[data-aus] .tw-mark--premium::before { animation-play-state: paused; }
.tt-basic { color: var(--otms-accent); }
@keyframes tt-regenbogen { to { background-position: 200% 0; } }
@media (forced-colors: active) { .tt-regenbogen { background: none; color: CanvasText; -webkit-text-fill-color: CanvasText; } }

.tt-badge { display: inline-block; padding: 5px 8px 4px; border-radius: var(--otms-r); background: var(--otms-accent); color: var(--otms-on-accent);
    font: 600 11px/1 var(--otms-f-display); letter-spacing: .14em; text-transform: uppercase; white-space: nowrap; }
.tarife-alle { width: 100%; margin-top: 18px; gap: 10px; }
.tarife:not([data-js]) .tarife-zurueck { display: none; }
.tarife[data-modus="einzeln"] .tarife-zurueck { visibility: hidden; }
.tarife-zurueck { min-height: 36px; padding: 0; }

/* Vergleichstabelle */
.tt { position: relative; min-width: 0; border: 1px solid var(--otms-line); background: var(--otms-surface); }
.tt-row { display: grid; grid-template-columns: minmax(0, 1.35fr) repeat(3, minmax(0, 1fr)); }
.tt-row > * { grid-row: 1; min-width: 0; box-shadow: var(--tt-sh, none); }
.tt-row + .tt-row > * { --tt-top: inset 0 1px 0 var(--otms-line); }
.tt-row > .tt-k { grid-column: 1; --tt-sh: var(--tt-top, 0 0 transparent); }
.tt-row > :nth-child(2) { grid-column: 2; } .tt-row > :nth-child(3) { grid-column: 3; } .tt-row > :nth-child(4) { grid-column: 4; }
.tt-c { display: flex; align-items: center; justify-content: center; text-align: center; --tt-sh: inset 1px 0 0 var(--otms-line), var(--tt-top, 0 0 transparent); }
.tt-row > :nth-child(3) { background: var(--tt-hl); --tt-sh: inset 2px 0 0 var(--otms-accent), inset -2px 0 0 var(--otms-accent), var(--tt-top, 0 0 transparent); }
.tt-head > :nth-child(3) { --tt-sh: inset 2px 0 0 var(--otms-accent), inset -2px 0 0 var(--otms-accent), inset 0 3px 0 var(--otms-accent); }
.tt-cta > :nth-child(3) { --tt-sh: inset 2px 0 0 var(--otms-accent), inset -2px 0 0 var(--otms-accent), inset 0 -2px 0 var(--otms-accent), var(--tt-top, 0 0 transparent); }
.tt-k { display: flex; align-items: center; gap: 10px; padding: 11px 16px; font-size: 15px; font-weight: 500; line-height: 1.3; }
.tt-k .tt-i { color: var(--otms-accent); }
.tt-v { display: block; padding: 11px 12px; font-size: 15px; line-height: 1.35; }
.tt-ecke { align-items: flex-start; }
.tt-tier { display: grid; grid-template-rows: 22px auto auto auto; justify-items: center; align-content: start; gap: 6px; height: 100%; padding: 16px 10px 16px; }
.tt-tier .tt-badge { grid-row: 1; align-self: start; }
.tt-tier .tt-name { grid-row: 2; } .tt-tier .tt-preis { grid-row: 3; } .tt-tier .tt-sub { grid-row: 4; }
.tt-name { font: 700 22px/1 var(--otms-f-display); letter-spacing: .05em; text-transform: uppercase; }
.tt-preis { margin-top: 4px; font: 600 40px/1 var(--otms-f-display); white-space: nowrap; }
.tt-sub { font-size: 13px; font-weight: 500; line-height: 1.3; }
.tt-v.tt-zahl { font: 600 22px/1 var(--otms-f-display); font-variant-numeric: tabular-nums; }
.tt-ja, .tt-nein { display: inline-block; font-size: 18px; line-height: 1; }
.tt-nein { font-size: 15px; opacity: .6; }
.tt-plus { display: inline-block; padding: 7px 10px; border: 1px solid var(--otms-accent); border-radius: var(--otms-r); background: var(--tt-plus);
    font-size: 14px; font-weight: 600; line-height: 1.3; color: var(--otms-ink); text-wrap: balance; }
.tt-cta .tt-v { width: 100%; padding: 14px 12px 16px; }
.tt-cta .otms-btn { width: 100%; min-height: 48px; padding: 0 10px; font-size: 15px; letter-spacing: .05em; }
/* Bricht der Knopftext um („Kostenlos testen“ auf dem Handy), mittig und mit Zeilenabstand (wie blog.css .post-end-aktion) */
.tt-cta .otms-btn { text-align: center; line-height: 1.2; padding-block: 6px; }
.tt-kurz { display: none; }
.tt-nw { white-space: nowrap; }
.dark .tarife { --tw-mark: color-mix(in srgb, var(--otms-accent) 50%, transparent); }
.dark .tt-nein { opacity: .85; }

/* Einzeln: eine Wertespalte, die drei Tarife liegen übereinander und blenden gestaffelt über.
   Name und Preis stehen links in der Auswahl; die Kopfzeile bleibt nur für Vorleseprogramme. */
.tarife[data-modus="einzeln"] .tt-head { position: absolute; width: 1px; height: 1px; overflow: hidden; clip-path: inset(50%); white-space: nowrap; }
.tarife[data-modus="einzeln"] .tt-head + .tt-row > * { --tt-top: 0 0 transparent; }
.tarife[data-modus="einzeln"] .tt-row { grid-template-columns: minmax(0, 1.15fr) minmax(0, 1fr); }
.tarife[data-modus="einzeln"] .tt-row > :nth-child(3) { background: none; --tt-sh: inset 1px 0 0 var(--otms-line), var(--tt-top, 0 0 transparent); }
.tarife[data-modus="einzeln"] .tt-row > .tt-c { grid-column: 2;
    transition: opacity .35s ease calc(var(--i, 0) * 16ms), transform .4s cubic-bezier(.2, .7, .2, 1) calc(var(--i, 0) * 16ms), visibility 0s; }
.tarife[data-modus="einzeln"]:not([data-sel="starter"]) .tt-row > :nth-child(2),
.tarife[data-modus="einzeln"]:not([data-sel="basic"]) .tt-row > :nth-child(3),
.tarife[data-modus="einzeln"]:not([data-sel="premium"]) .tt-row > :nth-child(4) {
    opacity: 0; transform: translateY(6px); visibility: hidden; pointer-events: none;
    transition: opacity .18s ease, transform .18s ease, visibility 0s linear .18s; }

/* Umschalten zwischen „einzeln“ und „alle“ */
@keyframes tt-auf { from { opacity: 0; transform: translateY(8px); } to { opacity: 1; transform: none; } }
.tarife[data-anim="alle"] .tt-row > .tt-c { animation: tt-auf .45s cubic-bezier(.2, .7, .2, 1) both; animation-delay: calc(var(--i, 0) * 14ms + var(--tt-col, 0) * 70ms); }
.tarife[data-anim="alle"] .tt-row > :nth-child(3) { --tt-col: 1; }
.tarife[data-anim="alle"] .tt-row > :nth-child(4) { --tt-col: 2; }
.tarife[data-anim="alle"] .tarife-zurueck, .tarife[data-anim="einzeln"] .tarife-wahl__in { animation: tt-auf .4s cubic-bezier(.2, .7, .2, 1) both; }
@media (prefers-reduced-motion: reduce) {
    .tarife *, .tarife *::before { transition: none !important; animation: none !important; }
}

/* Schmal: die drei Tarife nebeneinander über der Tabelle */
/* Nach der Breite der Tarif-Fläche, nicht des Fensters: in der App fehlen links 232 px Seitenleiste
   (bei 768 px Fensterbreite überlappten sonst Karten und Tabelle). Container: .tarife (unten). */
@container tarife (max-width: 760px) {
    .tarife[data-modus="einzeln"] .tarife-body { grid-template-columns: minmax(0, 1fr); gap: 16px; }
    .tw { flex-direction: row; gap: 8px; }
    .tw li, .tw li:last-child { border: 1px solid var(--otms-line); }
    .tw-opt { grid-template-columns: minmax(0, 1fr); justify-items: center; align-content: start; text-align: center; gap: 10px; padding: 22px 6px 14px; }
    .tw-text { justify-items: center; gap: 6px; }
    .tw-opt .tt-badge { position: absolute; top: -10px; left: 50%; transform: translateX(-50%); }
    .tw-name { font-size: 18px; }
    .tw-preis { font-size: 28px; }
    .tw-preis small { display: block; margin-top: 4px; font-size: 15px; }
    .tw-sub { font-size: 13px; }
    .tarife-alle { margin-top: 14px; }
}
@container tarife (max-width: 600px) {
    .tt-lang { display: none; } .tt-kurz { display: inline; }
    .tt-k { padding: 12px; font-size: 14px; gap: 8px; }
    .tt-v { padding: 10px 8px; font-size: 14px; }
    .tt-tier { padding: 18px 6px 14px; }
    .tt-preis { font-size: 30px; }
    .tt-name { font-size: 19px; }
    .tt-plus { font-size: 13px; padding: 6px 8px; }
    .tw-name { font-size: 16px; letter-spacing: .03em; }
    .tw-preis { font-size: 24px; }
    .tw-preis small { font-size: 14px; }
    .tw-sub { font-size: 12px; }
    .tw-opt { padding-inline: 4px; }
    .tarife[data-modus="einzeln"] .tt-row { grid-template-columns: minmax(0, 1.45fr) minmax(0, 1fr); }
    /* Alle Tarife auf dem Handy: Zeilenname über den drei Werten */
    .tarife:not([data-modus="einzeln"]) .tt-row { grid-template-columns: repeat(3, minmax(0, 1fr)); }
    .tarife:not([data-modus="einzeln"]) .tt-row > .tt-k { grid-column: 1 / -1; grid-row: 1; padding-bottom: 2px; }
    .tarife:not([data-modus="einzeln"]) .tt-row > .tt-c { grid-row: 2; --tt-top: 0 0 transparent; }
    .tarife:not([data-modus="einzeln"]) .tt-row > :nth-child(2) { grid-column: 1; --tt-sh: none; }
    .tarife:not([data-modus="einzeln"]) .tt-row > :nth-child(3) { grid-column: 2; }
    .tarife:not([data-modus="einzeln"]) .tt-row > :nth-child(4) { grid-column: 3; }
    .tarife:not([data-modus="einzeln"]) .tt-cta > .tt-k, .tarife:not([data-js]) .tt-ecke { display: none; }
    .tarife:not([data-modus="einzeln"]) .tt-head > :nth-child(3) { --tt-sh: inset 2px 0 0 var(--otms-accent), inset -2px 0 0 var(--otms-accent), inset 0 3px 0 var(--otms-accent); }
    .tarife:not([data-modus="einzeln"]) .tt-preis { font-size: 24px; }
    .tarife:not([data-modus="einzeln"]) .tt-preis small { display: block; margin-top: 3px; font-size: 13px; }
    .tarife:not([data-modus="einzeln"]) .tt-name { font-size: 16px; }
    .tarife:not([data-modus="einzeln"]) .tt-sub { font-size: 12px; }
    .tarife:not([data-modus="einzeln"]) .tt-tier .tt-badge { font-size: 10px; letter-spacing: .08em; padding: 4px 5px 3px; }
    .tarife:not([data-modus="einzeln"]) .tt-plus-zusatz { display: none; }
    /* Auch in der Einzelansicht umbrechen: sonst ragen „Weitermachen bis zum nächsten Test“ und „Monat nicht genutzt?“
       aus ihrer Spalte und bei 320 px aus der Seite (Prüfung 14.11.2026; gilt auch für die App-Seite „Tarif wählen“) */
    .tarife .tt-nw { white-space: normal; }
    .tarife:not([data-modus="einzeln"]) .tt-plus { font-size: 12px; padding: 6px 5px; }
    .tarife:not([data-modus="einzeln"]) .tt-cta .otms-btn { font-size: 13px; letter-spacing: .04em; padding: 0 4px; }
    .tarife:not([data-modus="einzeln"]) .tt-cta .tt-v { padding: 12px 5px 14px; }
}
.tt-head > .tt-c { align-items: stretch; }
.tt-head .tt-tier { width: 100%; }

.tarife { container: tarife / inline-size; }
