/* Tarifrechner – keine externen Schriften (DSGVO), nur Systemschriften */
:root {
  --p: #0f766e;            /* wird per Konfiguration überschrieben */
  --a: #f59e0b;
  --p-ink: #fff;
  --bg: #f4f6f8;
  --card: #fff;
  --ink: #15202b;
  --ink-2: #4a5866;
  --ink-3: #7a8794;
  --line: #e3e8ee;
  --line-2: #cfd7e0;
  --ok: #15803d;
  --ok-bg: #ecfdf3;
  --err: #c0262d;
  --err-bg: #fff1f1;
  --warn-bg: #fff8e6;
  --warn: #8a5a00;
  --r: 14px;
  --r-s: 9px;
  --shadow: 0 1px 2px rgba(16,24,40,.05), 0 4px 16px rgba(16,24,40,.06);
  --font: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
}
* { box-sizing: border-box; }
html, body { margin: 0; padding: 0; }
body { font-family: var(--font); color: var(--ink); background: var(--bg); font-size: 16px; line-height: 1.45; -webkit-font-smoothing: antialiased; }
body.embedded { background: transparent; }
button, input, select, textarea { font: inherit; color: inherit; }
a { color: var(--p); }

.tr { max-width: 980px; margin: 0 auto; padding: 16px; }
.tr-narrow { max-width: 640px; margin: 0 auto; }

/* Kopf */
.tr-top { display: flex; align-items: center; justify-content: space-between; gap: 12px; margin-bottom: 14px; }
.tr-logo { display: flex; align-items: center; gap: 10px; font-weight: 700; font-size: 17px; letter-spacing: -.01em; text-decoration: none; color: var(--ink); }
.tr-logo img { height: 34px; width: auto; display: block; }
.tr-contact { font-size: 14px; color: var(--ink-2); text-align: right; }
.tr-contact a { color: var(--ink-2); text-decoration: none; font-weight: 600; }
.tr-testbadge { display: inline-block; background: var(--warn-bg); color: var(--warn); border: 1px solid #f3d48a; font-size: 12px; font-weight: 700; padding: 3px 8px; border-radius: 99px; letter-spacing: .02em; }

/* Kampagnen-Hero */
.hero { background: var(--p); color: var(--p-ink); border-radius: var(--r); padding: 26px 22px 22px; margin-bottom: 16px; position: relative; overflow: hidden; }
.hero::after { content: ""; position: absolute; right: -60px; top: -60px; width: 220px; height: 220px; border-radius: 50%; background: rgba(255,255,255,.08); }
.hero h1 { margin: 0 0 6px; font-size: clamp(24px, 5.2vw, 34px); line-height: 1.12; letter-spacing: -.02em; position: relative; }
.hero p { margin: 0; opacity: .92; font-size: 17px; position: relative; }
.hero ul { list-style: none; padding: 0; margin: 14px 0 0; display: grid; gap: 6px; position: relative; }
.hero li { display: flex; gap: 8px; align-items: flex-start; font-weight: 500; }
.hero li svg { flex: none; margin-top: 3px; }
.hero-img { width: 100%; max-height: 260px; object-fit: cover; border-radius: var(--r); margin-bottom: 14px; display: block; }

/* Karten */
.card { background: var(--card); border: 1px solid var(--line); border-radius: var(--r); box-shadow: var(--shadow); padding: 20px; }
.card + .card { margin-top: 14px; }
.card h2 { font-size: 19px; margin: 0 0 14px; letter-spacing: -.01em; }
.card h3 { font-size: 16px; margin: 0 0 12px; }
.muted { color: var(--ink-2); }
.small { font-size: 14px; }
.tiny { font-size: 12.5px; color: var(--ink-3); }

/* Fortschritt */
.steps { display: flex; gap: 6px; margin: 2px 0 16px; padding: 0; list-style: none; }
.steps li { flex: 1; font-size: 12.5px; color: var(--ink-3); font-weight: 600; }
.steps li::before { content: ""; display: block; height: 4px; border-radius: 4px; background: var(--line); margin-bottom: 6px; }
.steps li.on { color: var(--ink); }
.steps li.on::before { background: var(--p); }

/* Energie-Auswahl */
.seg { display: grid; grid-template-columns: repeat(3, 1fr); gap: 8px; margin-bottom: 12px; }
.seg button { display: flex; flex-direction: column; align-items: center; gap: 6px; padding: 14px 6px 12px; border: 1.5px solid var(--line-2); background: #fff; border-radius: var(--r-s); cursor: pointer; font-weight: 600; font-size: 14.5px; color: var(--ink-2); transition: border-color .15s, background .15s; }
.seg button svg { width: 26px; height: 26px; }
.seg button[aria-pressed="true"] { border-color: var(--p); background: color-mix(in srgb, var(--p) 7%, #fff); color: var(--ink); box-shadow: inset 0 0 0 1px var(--p); }
.seg button[aria-pressed="true"] svg { color: var(--p); }
.toggle { display: inline-flex; background: var(--bg); border: 1px solid var(--line); border-radius: 99px; padding: 3px; margin-bottom: 16px; }
.toggle button { border: 0; background: transparent; padding: 7px 18px; border-radius: 99px; cursor: pointer; font-weight: 600; font-size: 14.5px; color: var(--ink-2); }
.toggle button[aria-pressed="true"] { background: #fff; color: var(--ink); box-shadow: 0 1px 3px rgba(0,0,0,.12); }

/* Formular */
.grid { display: grid; grid-template-columns: repeat(6, 1fr); gap: 12px 12px; }
.f { grid-column: span 6; display: flex; flex-direction: column; gap: 5px; min-width: 0; }
.f.s3 { grid-column: span 3; } .f.s2 { grid-column: span 2; } .f.s4 { grid-column: span 4; }
@media (max-width: 560px) { .f.s3, .f.s4 { grid-column: span 6; } .f.s2 { grid-column: span 3; } .f.s2.keep { grid-column: span 2; } .f.s4.keep { grid-column: span 4; } }
label.l { font-size: 14px; font-weight: 600; color: var(--ink); }
label.l .opt { font-weight: 400; color: var(--ink-3); }
.in, select.in { width: 100%; height: 48px; padding: 0 13px; border: 1.5px solid var(--line-2); border-radius: var(--r-s); background: #fff; outline: none; font-size: 16px; transition: border-color .15s, box-shadow .15s; appearance: none; -webkit-appearance: none; }
select.in { background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='8'%3E%3Cpath d='M1 1l5 5 5-5' stroke='%234a5866' stroke-width='1.8' fill='none'/%3E%3C/svg%3E"); background-repeat: no-repeat; background-position: right 14px center; padding-right: 36px; }
.in:focus { border-color: var(--p); box-shadow: 0 0 0 3px color-mix(in srgb, var(--p) 18%, transparent); }
.in[readonly] { background: var(--bg); color: var(--ink-2); }
.f.bad .in { border-color: var(--err); background: var(--err-bg); }
.ferr { color: var(--err); font-size: 13px; font-weight: 500; }
.hint { color: var(--ink-3); font-size: 13px; }
.in-unit { position: relative; }
.in-unit .in { padding-right: 56px; }
.in-unit span { position: absolute; right: 14px; top: 50%; transform: translateY(-50%); color: var(--ink-3); font-weight: 600; font-size: 15px; pointer-events: none; }
.presets { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 2px; }
.presets button { border: 1px solid var(--line-2); background: #fff; border-radius: 99px; padding: 6px 12px; font-size: 13.5px; cursor: pointer; color: var(--ink-2); font-weight: 500; }
.presets button[aria-pressed="true"] { border-color: var(--p); color: var(--p); background: color-mix(in srgb, var(--p) 6%, #fff); font-weight: 600; }

.chk { display: flex; gap: 11px; align-items: flex-start; cursor: pointer; font-size: 14.5px; line-height: 1.4; padding: 2px 0; }
.chk input { flex: none; width: 20px; height: 20px; margin: 1px 0 0; accent-color: var(--p); cursor: pointer; }
.chk.bad { color: var(--err); }
.radios { display: grid; gap: 8px; grid-template-columns: 1fr 1fr; }
@media (max-width: 480px) { .radios { grid-template-columns: 1fr; } }
.radio { display: flex; gap: 10px; align-items: center; border: 1.5px solid var(--line-2); border-radius: var(--r-s); padding: 12px 14px; cursor: pointer; font-weight: 600; font-size: 15px; background: #fff; }
.radio input { accent-color: var(--p); width: 18px; height: 18px; margin: 0; }
.radio:has(input:checked) { border-color: var(--p); box-shadow: inset 0 0 0 1px var(--p); background: color-mix(in srgb, var(--p) 5%, #fff); }
.radio small { display: block; font-weight: 400; color: var(--ink-3); font-size: 13px; }

fieldset.grp { border: 0; padding: 0; margin: 0 0 22px; min-width: 0; }
fieldset.grp legend { font-weight: 700; font-size: 16.5px; padding: 0; margin-bottom: 12px; letter-spacing: -.01em; }
.grp-sep { height: 1px; background: var(--line); margin: 4px 0 20px; }

/* Buttons */
.btn { display: inline-flex; align-items: center; justify-content: center; gap: 8px; height: 50px; padding: 0 22px; border-radius: var(--r-s); border: 0; background: var(--p); color: var(--p-ink); font-weight: 700; font-size: 16px; cursor: pointer; text-decoration: none; transition: filter .15s, transform .05s; }
.btn:hover { filter: brightness(1.07); }
.btn:active { transform: translateY(1px); }
.btn[disabled] { opacity: .55; cursor: progress; }
.btn.block { width: 100%; }
.btn.ghost { background: transparent; color: var(--ink-2); border: 1.5px solid var(--line-2); font-weight: 600; }
.btn.sm { height: 40px; padding: 0 14px; font-size: 14.5px; }
.linkbtn { background: none; border: 0; padding: 0; color: var(--p); font-weight: 600; cursor: pointer; font-size: 14.5px; text-decoration: underline; text-underline-offset: 2px; }
.actions { display: flex; gap: 10px; justify-content: space-between; align-items: center; margin-top: 18px; flex-wrap: wrap-reverse; }
.actions .btn:not(.ghost) { flex: 1 1 260px; }

/* Ergebnis */
.sumbar { display: flex; align-items: center; justify-content: space-between; gap: 10px; background: #fff; border: 1px solid var(--line); border-radius: var(--r); padding: 12px 16px; margin-bottom: 12px; font-size: 14.5px; }
.sumbar b { font-weight: 700; }
.filters { display: flex; gap: 8px; flex-wrap: wrap; align-items: center; margin: 0 0 12px; }
.chip { border: 1px solid var(--line-2); background: #fff; border-radius: 99px; padding: 7px 13px; font-size: 13.5px; font-weight: 600; color: var(--ink-2); cursor: pointer; }
.chip[aria-pressed="true"] { background: var(--ink); color: #fff; border-color: var(--ink); }
.filters select { height: 36px; border-radius: 99px; border: 1px solid var(--line-2); padding: 0 32px 0 13px; font-size: 13.5px; font-weight: 600; background: #fff url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='10' height='7'%3E%3Cpath d='M1 1l4 4 4-4' stroke='%234a5866' stroke-width='1.6' fill='none'/%3E%3C/svg%3E") no-repeat right 12px center; appearance: none; -webkit-appearance: none; margin-left: auto; color: var(--ink-2); }
.gv { font-size: 14px; color: var(--ink-2); background: #fff; border: 1px dashed var(--line-2); border-radius: var(--r-s); padding: 10px 14px; margin-bottom: 12px; }

.tcard { background: #fff; border: 1px solid var(--line); border-radius: var(--r); box-shadow: var(--shadow); margin-bottom: 12px; overflow: hidden; }
.tcard.top { border-color: var(--p); box-shadow: 0 0 0 1px var(--p), var(--shadow); }
.tcard-flag { background: var(--p); color: var(--p-ink); font-size: 12.5px; font-weight: 700; padding: 5px 16px; letter-spacing: .02em; }
.tcard-main { display: grid; grid-template-columns: 1fr auto; gap: 14px 20px; padding: 16px 18px; align-items: center; }
.tcard-prov { font-size: 13px; color: var(--ink-3); font-weight: 600; text-transform: uppercase; letter-spacing: .04em; }
.tcard-name { font-size: 18px; font-weight: 700; margin: 2px 0 8px; letter-spacing: -.01em; }
.badges { display: flex; flex-wrap: wrap; gap: 6px; }
.badge { font-size: 12.5px; font-weight: 600; padding: 3px 9px; border-radius: 99px; background: var(--bg); color: var(--ink-2); border: 1px solid var(--line); white-space: nowrap; }
.badge.eco { background: var(--ok-bg); color: var(--ok); border-color: #bfe8cf; }
.badge.bonus { background: #fff7e8; color: #8a5300; border-color: #f7dca6; }
.tprice { text-align: right; }
.tprice .m { font-size: 28px; font-weight: 800; letter-spacing: -.02em; line-height: 1; white-space: nowrap; }
.tprice .m small { font-size: 14px; font-weight: 600; color: var(--ink-2); letter-spacing: 0; }
.tprice .y { font-size: 13px; color: var(--ink-2); margin-top: 4px; white-space: nowrap; }
.tprice .save { font-size: 13px; color: var(--ok); font-weight: 700; margin-top: 2px; }
.tcard-foot { display: flex; align-items: center; justify-content: space-between; gap: 10px; padding: 0 18px 16px; }
.tdetails { border-top: 1px solid var(--line); padding: 12px 18px 14px; background: #fbfcfd; }
.kv { display: grid; grid-template-columns: 1fr auto; gap: 6px 16px; font-size: 14px; margin: 0; }
.kv dt { color: var(--ink-2); } .kv dd { margin: 0; font-weight: 600; text-align: right; }
@media (max-width: 560px) {
  .tcard-main { grid-template-columns: 1fr; }
  .tprice { text-align: left; display: flex; align-items: baseline; gap: 10px; flex-wrap: wrap; }
  .tcard-foot .btn { flex: 1; }
}
.empty { text-align: center; padding: 28px 18px; }
.empty svg { color: var(--ink-3); }

/* Formularlayout mit Tarif-Zusammenfassung */
.layout { display: grid; grid-template-columns: 1fr 300px; gap: 16px; align-items: start; }
.aside { position: sticky; top: 12px; }
@media (max-width: 820px) { .layout { grid-template-columns: 1fr; } .aside { position: static; order: -1; } }
.mini .tcard-name { font-size: 16px; margin-bottom: 6px; }
.mini .price { font-size: 24px; font-weight: 800; letter-spacing: -.02em; }
.mini .price small { font-size: 13.5px; font-weight: 600; color: var(--ink-2); }

.notice { border-radius: var(--r-s); padding: 12px 14px; font-size: 14.5px; margin-bottom: 14px; }
.notice.err { background: var(--err-bg); color: var(--err); border: 1px solid #f5c2c4; }
.notice.warn { background: var(--warn-bg); color: var(--warn); border: 1px solid #f3d48a; }
.notice.ok { background: var(--ok-bg); color: var(--ok); border: 1px solid #bfe8cf; }
.notice.info { background: #f0f6ff; color: #1d4e89; border: 1px solid #cfe0f7; }

.review dl { display: grid; grid-template-columns: minmax(120px, 40%) 1fr; gap: 6px 14px; margin: 0; font-size: 14.5px; }
.review dt { color: var(--ink-2); } .review dd { margin: 0; font-weight: 600; word-break: break-word; }
.review .sec { display: flex; justify-content: space-between; align-items: center; margin: 18px 0 8px; }
.review .sec h3 { margin: 0; }

.done { text-align: center; padding: 34px 20px; }
.done .ic { width: 64px; height: 64px; border-radius: 50%; background: var(--ok-bg); color: var(--ok); display: grid; place-items: center; margin: 0 auto 14px; }
.done h2 { font-size: 24px; margin: 0 0 6px; }
.cid { display: inline-block; font-family: ui-monospace, SFMono-Regular, Menlo, monospace; background: var(--bg); border: 1px solid var(--line); border-radius: 8px; padding: 6px 12px; font-weight: 700; margin: 8px 0 18px; }
.next { text-align: left; max-width: 460px; margin: 0 auto; padding: 0; list-style: none; counter-reset: n; }
.next li { counter-increment: n; display: flex; gap: 12px; margin-bottom: 12px; font-size: 15px; }
.next li::before { content: counter(n); flex: none; width: 26px; height: 26px; border-radius: 50%; background: var(--p); color: var(--p-ink); font-weight: 700; font-size: 13.5px; display: grid; place-items: center; }

.foot { font-size: 12.5px; color: var(--ink-3); margin: 18px 4px 6px; line-height: 1.5; }
.foot a { color: var(--ink-3); }

.spin { width: 18px; height: 18px; border: 2.5px solid currentColor; border-right-color: transparent; border-radius: 50%; animation: sp .7s linear infinite; display: inline-block; }
@keyframes sp { to { transform: rotate(360deg); } }
.loading { display: flex; align-items: center; justify-content: center; gap: 10px; padding: 40px; color: var(--ink-2); }
.hp { position: absolute; left: -9999px; width: 1px; height: 1px; overflow: hidden; }
.bankinfo { font-size: 13px; color: var(--ok); font-weight: 600; }
@media (prefers-reduced-motion: reduce) { * { transition: none !important; animation-duration: 1.5s !important; } }
