/* ─── Shared CSS for all individual tool pages ─────────────── */
*, *::before, *::after { box-sizing: border-box; }
body { background: var(--bg); color: var(--ink); font-family: system-ui, -apple-system, 'Inter', sans-serif; margin: 0; }

/* ─── TOPBAR ─────────────────────────────────────────────── */
.topbar {
  position: sticky; top: 0; z-index: 200;
  background: rgba(251,250,253,0.88);
  backdrop-filter: blur(14px);
  border-bottom: 1px solid var(--line);
  display: flex; align-items: center; justify-content: space-between;
  padding: 0 28px; height: 58px;
}
.topbar-logo { display: flex; align-items: center; gap: 8px; text-decoration: none; }
.logo-mark {
  width: 30px; height: 30px; background: var(--brand); border-radius: 8px;
  display: flex; align-items: center; justify-content: center;
  font-size: 0.85rem; font-weight: 900; color: #fff; letter-spacing: -0.03em;
}
.logo-text { font-size: 1rem; font-weight: 800; color: var(--ink); letter-spacing: -0.02em; }
.logo-text span { color: var(--brand); }
.topbar-right { display: flex; align-items: center; gap: 10px; }
.nav-link {
  font-size: 0.82rem; color: var(--ink-3); text-decoration: none;
  font-weight: 500; padding: 4px 10px; border-radius: 6px; transition: color .15s;
  display: none;
}
@media (min-width: 600px) { .nav-link { display: block; } }
.nav-link:hover { color: var(--brand); }
.nav-btn {
  background: var(--brand); color: #fff;
  font-size: 0.82rem; font-weight: 700;
  padding: 8px 20px; border-radius: 999px;
  text-decoration: none; transition: opacity 0.2s, transform 0.15s;
  white-space: nowrap;
}
.nav-btn:hover { opacity: 0.86; transform: translateY(-1px); }

/* ─── HERO ──────────────────────────────────────────────── */
.hero {
  background: linear-gradient(160deg, var(--brand-faint) 0%, var(--bg) 60%);
  border-bottom: 1px solid var(--line-2);
  padding: 48px 20px 40px; text-align: center;
}
.hero-badge {
  display: inline-flex; align-items: center; gap: 6px;
  background: var(--brand-soft); color: var(--brand-deep);
  font-size: 0.72rem; font-weight: 700;
  letter-spacing: 0.07em; text-transform: uppercase;
  padding: 5px 14px; border-radius: 999px; margin-bottom: 18px;
}
.hero-badge-dot {
  width: 6px; height: 6px; border-radius: 50%;
  background: var(--brand); animation: pulse 2s infinite;
}
@keyframes pulse {
  0%, 100% { opacity: 1; transform: scale(1); }
  50% { opacity: 0.5; transform: scale(0.8); }
}
.hero h1 {
  font-size: clamp(1.8rem, 5vw, 2.8rem); font-weight: 900; color: var(--ink);
  margin: 0 0 12px; line-height: 1.1; letter-spacing: -0.03em;
}
.hero h1 em { font-style: normal; color: var(--brand); }
.hero-sub {
  color: var(--ink-3); font-size: 1rem; margin: 0 auto 24px;
  max-width: 520px; line-height: 1.6;
}
.hero-stats {
  display: flex; align-items: center; justify-content: center;
  gap: 24px; flex-wrap: wrap;
}
.hstat { font-size: 0.8rem; color: var(--ink-4); display: flex; align-items: center; gap: 5px; }
.hstat strong { color: var(--ink-2); font-weight: 700; }

/* ─── PAGE LAYOUT ───────────────────────────────────────── */
.page-wrap { max-width: 680px; margin: 0 auto; padding: 36px 20px 100px; }

/* ─── CARD ──────────────────────────────────────────────── */
.card {
  background: var(--surface); border-radius: var(--r-lg);
  box-shadow: 0 1px 0 rgba(255,255,255,0.9) inset, 0 2px 4px rgba(20,14,50,.04), 0 12px 32px -8px rgba(48,32,110,.12), 0 1px 2px rgba(20,14,50,.06);
  padding: 0; margin-bottom: 16px;
  border: 1px solid rgba(48,32,110,.07); overflow: hidden;
}
.card-hd {
  font-size: 0.72rem; font-weight: 800; text-transform: uppercase; letter-spacing: 0.08em;
  color: var(--ink-3); padding: 16px 28px;
  display: flex; align-items: center; gap: 8px;
  background: linear-gradient(to bottom, var(--bg-2, #f5f4fb), var(--surface));
  border-bottom: 1px solid var(--line-2);
}
.card-hd-line { flex: 1; height: 1px; background: var(--line-2); }
.card-body { padding: 24px 28px 28px; }

/* ─── FORM ──────────────────────────────────────────────── */
.form-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 14px; }
.full { grid-column: 1 / -1; }
@media (max-width: 480px) { .form-grid { grid-template-columns: 1fr; } .full { grid-column: 1; } }

label { display: block; font-size: 0.82rem; font-weight: 600; color: var(--ink-2); margin-bottom: 6px; }
.opt { font-weight: 400; color: var(--ink-4); font-size: 0.76rem; }

input[type="number"], input[type="text"], select, textarea {
  width: 100%; padding: 11px 14px;
  border: 1.5px solid var(--line); border-radius: var(--r-sm);
  background: var(--bg); color: var(--ink);
  font-size: 0.95rem; font-family: inherit; outline: none;
  transition: border-color 0.2s, box-shadow 0.2s;
  appearance: none;
  box-shadow: 0 1px 3px rgba(20,14,50,.06) inset, 0 1px 0 rgba(255,255,255,.8);
}
input:focus, select:focus, textarea:focus {
  border-color: var(--brand);
  box-shadow: 0 0 0 3px var(--brand-glow), 0 1px 3px rgba(20,14,50,.06) inset;
  background: #fff;
}
textarea { resize: vertical; min-height: 80px; }
.hint { font-size: 0.74rem; color: var(--ink-4); margin-top: 5px; line-height: 1.4; }

.toggle-row {
  display: flex; align-items: center; gap: 10px;
  cursor: pointer; user-select: none; margin-bottom: 14px;
}
.toggle-row input[type="checkbox"] { accent-color: var(--brand); width: 17px; height: 17px; cursor: pointer; }
.toggle-row span { font-size: 0.88rem; font-weight: 600; color: var(--ink-2); }
.collapsible { display: none; }
.collapsible.open { display: block; }

/* ─── BUTTON ────────────────────────────────────────────── */
.btn-calc {
  width: 100%; padding: 16px;
  background: linear-gradient(135deg, var(--brand) 0%, oklch(0.52 0.22 285) 100%);
  color: #fff; font-size: 1rem; font-weight: 800; border: none; border-radius: var(--r-sm);
  cursor: pointer; margin-top: 8px;
  transition: transform 0.2s, box-shadow 0.2s;
  display: flex; align-items: center; justify-content: center; gap: 10px;
  position: relative; overflow: hidden;
  box-shadow: 0 4px 16px -4px var(--brand-glow), 0 1px 0 rgba(255,255,255,.15) inset;
  letter-spacing: 0.01em; font-family: inherit;
}
.btn-calc::after {
  content: ""; position: absolute; top: 0; left: -100%; width: 60%; height: 100%;
  background: linear-gradient(90deg, transparent, rgba(255,255,255,.18), transparent);
  transform: skewX(-20deg); transition: left 0.5s;
}
.btn-calc:hover { transform: translateY(-2px); box-shadow: 0 8px 24px -6px var(--brand-glow), 0 1px 0 rgba(255,255,255,.15) inset; }
.btn-calc:hover::after { left: 160%; }
.btn-calc:active { transform: scale(0.97) translateY(1px); box-shadow: none; }
.btn-calc.loading { opacity: 0.7; pointer-events: none; }

/* ─── LOADER ────────────────────────────────────────────── */
.calc-loader {
  display: none; position: fixed; inset: 0; z-index: 9999;
  background: rgba(251,250,253,0.92); backdrop-filter: blur(18px) saturate(1.4);
  align-items: center; justify-content: center; flex-direction: column; gap: 0;
}
.calc-loader.show { display: flex; }
.loader-card {
  background: var(--surface); border-radius: 28px; padding: 44px 52px; text-align: center;
  box-shadow: 0 1px 0 rgba(255,255,255,.9) inset, 0 32px 80px -16px rgba(48,32,110,.28), 0 8px 24px -8px rgba(48,32,110,.14);
  border: 1px solid rgba(48,32,110,.08); min-width: 300px;
  animation: loaderPop 0.3s cubic-bezier(0.22,1,0.36,1) both;
}
@keyframes loaderPop { from { opacity:0; transform:scale(.88) translateY(12px); } to { opacity:1; transform:scale(1); } }
.loader-logo { display: flex; align-items: center; justify-content: center; gap: 10px; margin-bottom: 28px; }
.loader-logo-mark {
  width: 44px; height: 44px;
  background: linear-gradient(135deg, var(--brand) 0%, oklch(0.52 0.22 285) 100%);
  border-radius: 13px; display: flex; align-items: center; justify-content: center;
  font-size: 1.1rem; font-weight: 900; color: #fff;
  box-shadow: 0 6px 20px -4px var(--brand-glow);
  animation: logoPulse 1.5s ease infinite;
}
@keyframes logoPulse {
  0%,100% { box-shadow: 0 6px 20px -4px var(--brand-glow); }
  50% { box-shadow: 0 6px 28px -2px var(--brand-glow), 0 0 0 6px oklch(0.92 0.06 268); }
}
.loader-logo-text { font-size: 1.2rem; font-weight: 900; color: var(--ink); letter-spacing: -0.02em; }
.loader-logo-text span { color: var(--brand); }
.loader-steps { margin-bottom: 24px; }
.loader-step {
  font-size: 0.88rem; font-weight: 600; color: var(--ink-4);
  padding: 4px 0; opacity: 0;
  transition: opacity 0.3s, color 0.3s, transform 0.3s;
  transform: translateY(4px);
  display: flex; align-items: center; justify-content: center; gap: 7px;
}
.loader-step.active { opacity: 1; color: var(--ink-2); transform: translateY(0); }
.loader-step.done { opacity: 0.45; color: var(--ink-4); }
.step-dot {
  width: 7px; height: 7px; border-radius: 50%; background: var(--line); flex-shrink: 0;
  transition: background 0.3s;
}
.loader-step.active .step-dot { background: var(--brand); animation: pulse .8s ease infinite; }
.loader-step.done .step-dot { background: #16a34a; animation: none; }
.loader-progress { height: 4px; background: var(--line); border-radius: 999px; overflow: hidden; }
.loader-progress-fill {
  height: 100%; border-radius: 999px; width: 0%;
  background: linear-gradient(90deg, var(--brand), oklch(0.52 0.22 285));
  transition: width 0.4s cubic-bezier(0.22,1,0.36,1);
}

/* ─── FLOATING BRAND PILL ───────────────────────────────── */
.brand-pill {
  position: fixed; bottom: 24px; right: 24px; z-index: 500;
  background: var(--surface); border-radius: 999px;
  padding: 10px 16px 10px 12px;
  box-shadow: 0 4px 20px rgba(48,32,110,.18), 0 1px 0 rgba(255,255,255,.9) inset, 0 0 0 1px rgba(48,32,110,.08);
  display: flex; align-items: center; gap: 8px; text-decoration: none;
  transition: transform 0.2s, box-shadow 0.2s;
}
.brand-pill:hover { transform: translateY(-2px); box-shadow: 0 8px 28px rgba(48,32,110,.24), 0 1px 0 rgba(255,255,255,.9) inset, 0 0 0 1px rgba(48,32,110,.08); }
.brand-pill-mark {
  width: 26px; height: 26px;
  background: linear-gradient(135deg, var(--brand), oklch(0.52 0.22 285));
  border-radius: 7px; display: flex; align-items: center; justify-content: center;
  font-size: 0.72rem; font-weight: 900; color: #fff;
}
.brand-pill-text { font-size: 0.8rem; font-weight: 700; color: var(--ink-2); line-height: 1.2; }
.brand-pill-text span { display: block; font-size: 0.68rem; color: var(--ink-4); font-weight: 500; }

/* ─── RESULT CARD ───────────────────────────────────────── */
.result-card {
  background: var(--surface); border-radius: var(--r-lg);
  box-shadow: 0 1px 0 rgba(255,255,255,.9) inset, 0 12px 40px -8px rgba(48,32,110,.18), 0 2px 6px rgba(48,32,110,.06);
  padding: 0; margin-bottom: 16px; border: 1.5px solid var(--brand-soft); overflow: hidden;
  animation: slideUp 0.45s cubic-bezier(0.22,1,0.36,1) both;
}
@keyframes slideUp { from { opacity:0; transform:translateY(24px); } to { opacity:1; transform:translateY(0); } }
.result-card-hd {
  background: linear-gradient(135deg, oklch(0.96 0.05 268) 0%, oklch(0.97 0.03 285) 100%);
  padding: 14px 28px; border-bottom: 1px solid var(--brand-soft);
  display: flex; align-items: center; gap: 8px;
}
.result-card-hd-text { font-size: 0.72rem; font-weight: 800; text-transform: uppercase; letter-spacing: 0.08em; color: var(--brand-deep); flex: 1; }
.result-card-hd-badge { font-size: 0.7rem; font-weight: 700; background: var(--brand); color: #fff; padding: 2px 9px; border-radius: 999px; }
.result-body { padding: 20px 28px 28px; }

.sec-title {
  font-size: 0.7rem; font-weight: 800; letter-spacing: 0.08em;
  text-transform: uppercase; color: var(--ink-4);
  margin: 20px 0 8px; display: flex; align-items: center; gap: 8px;
}
.sec-title:first-child { margin-top: 0; }
.sec-title::after { content: ""; flex: 1; height: 1px; background: var(--line-2); }

.rrow {
  display: flex; justify-content: space-between; align-items: flex-start;
  padding: 9px 0; border-bottom: 1px solid var(--line-2);
  gap: 12px; font-size: 0.91rem;
  animation: fadeIn 0.3s ease both;
}
.rrow:last-child { border-bottom: none; }
.rrow .rl { color: var(--ink-3); flex: 1; }
.rrow .rl small { display: block; font-size: 0.72rem; color: var(--ink-4); margin-top: 2px; }
.rrow .rv { font-weight: 700; white-space: nowrap; }
.rv.neg { color: #dc2626; }
.rv.pos { color: #16a34a; }
.rv.neu { color: var(--ink); }
@keyframes fadeIn { from { opacity:0; transform:translateX(-8px); } to { opacity:1; } }

.total-row {
  display: flex; justify-content: space-between; align-items: center;
  padding: 14px 0; border-top: 2px solid var(--line); margin-top: 6px; font-size: 1rem;
}
.total-row .rl { font-weight: 700; color: var(--ink-2); }
.total-row .rv { font-size: 1.1rem; }

.netto-box {
  display: flex; justify-content: space-between; align-items: center;
  padding: 20px 22px;
  background: linear-gradient(135deg, var(--brand-soft) 0%, oklch(0.95 0.04 268) 100%);
  border-radius: var(--r-sm); margin-top: 16px;
  animation: popIn 0.5s cubic-bezier(0.22,1,0.36,1) 0.2s both;
}
@keyframes popIn { from { opacity:0; transform:scale(.94); } to { opacity:1; transform:scale(1); } }
.netto-box .rl { color: var(--brand-deep); font-weight: 800; font-size: 1rem; }
.netto-box .rv { color: var(--brand-deep); font-weight: 900; font-size: 1.7rem; letter-spacing: -0.02em; }

.marge-wrap { margin-top: 18px; }
.marge-meta { display: flex; justify-content: space-between; font-size: 0.8rem; color: var(--ink-3); margin-bottom: 7px; }
.marge-meta strong { color: var(--ink-2); }
.bar-bg { height: 10px; background: var(--line); border-radius: 999px; overflow: hidden; }
.bar-fill { height: 100%; border-radius: 999px; transition: width 0.9s cubic-bezier(0.22,1,0.36,1); }

/* ─── KI RESULT ─────────────────────────────────────────── */
.ki-result-box {
  background: var(--surface); border-radius: var(--r-lg);
  border: 1.5px solid var(--brand-soft); overflow: hidden;
  animation: slideUp 0.45s cubic-bezier(0.22,1,0.36,1) both;
  margin-bottom: 16px;
}
.ki-result-hd {
  background: linear-gradient(135deg, oklch(0.96 0.05 268) 0%, oklch(0.97 0.03 285) 100%);
  padding: 14px 28px; border-bottom: 1px solid var(--brand-soft);
  display: flex; align-items: center; justify-content: space-between;
}
.ki-result-hd-text { font-size: 0.72rem; font-weight: 800; text-transform: uppercase; letter-spacing: 0.08em; color: var(--brand-deep); }
.ki-result-body { padding: 24px 28px 28px; font-size: 0.93rem; color: var(--ink-2); line-height: 1.75; }
.btn-copy {
  display: flex; align-items: center; gap: 7px;
  padding: 9px 18px; border-radius: 999px;
  border: 1.5px solid var(--brand-soft); background: var(--brand-faint);
  color: var(--brand-deep); font-size: 0.78rem; font-weight: 700;
  cursor: pointer; font-family: inherit; transition: all .15s;
  margin-top: 16px;
}
.btn-copy:hover { background: var(--brand-soft); }
.score-circle {
  width: 64px; height: 64px; border-radius: 50%; flex-shrink: 0;
  display: flex; align-items: center; justify-content: center;
  font-size: 1.3rem; font-weight: 900; color: #fff;
}
.tip-row {
  display: flex; align-items: flex-start; gap: 10px;
  padding: 8px 0; border-bottom: 1px solid var(--line-2); font-size: 0.87rem;
}
.tip-row:last-child { border-bottom: none; }

/* ─── INFO BOX ──────────────────────────────────────────── */
.info-box {
  background: var(--bg-2, #f8f7fc);
  border: 1px solid var(--line);
  border-left: 3px solid var(--brand);
  border-radius: 0 var(--r-sm) var(--r-sm) 0;
  padding: 14px 18px;
  font-size: 0.8rem;
  color: var(--ink-3);
  line-height: 1.65;
  margin-top: 8px;
}
.info-box strong { color: var(--ink-2); }

/* ─── Subscriber state: CTAs ausblenden ─────────────────── */
.is-subscribed .brand-pill  { display: none !important; }
.is-subscribed .nav-btn     { display: none !important; }
.is-subscribed .cta-card    { display: none !important; }
.is-subscribed .sm-strip    { display: none !important; }

/* ─── SM STRIP ──────────────────────────────────────────── */
.sm-strip {
  background: var(--brand-faint); border: 1.5px solid var(--brand-soft);
  border-radius: var(--r-md); padding: 18px 20px;
  display: flex; align-items: flex-start; gap: 14px;
  text-decoration: none; transition: border-color 0.2s, box-shadow 0.2s; margin-top: 8px;
}
.sm-strip:hover { border-color: var(--brand); box-shadow: 0 4px 16px var(--brand-glow); }
.sm-strip-icon {
  width: 42px; height: 42px; flex-shrink: 0; background: var(--brand);
  border-radius: 10px; display: flex; align-items: center; justify-content: center;
}
.sm-strip-body strong { display: block; font-size: 0.9rem; font-weight: 800; color: var(--brand-deep); margin-bottom: 3px; }
.sm-strip-body span { font-size: 0.78rem; color: var(--ink-3); line-height: 1.4; }
.sm-strip-arrow { margin-left: auto; font-size: 1.1rem; color: var(--brand); align-self: center; flex-shrink: 0; }

/* ─── PROOF ─────────────────────────────────────────────── */
.proof-row { display: flex; align-items: center; justify-content: center; gap: 20px; flex-wrap: wrap; margin: 20px 0; }
.proof-item { display: flex; flex-direction: column; align-items: center; gap: 4px; }
.proof-num { font-size: 1.5rem; font-weight: 900; color: var(--brand); letter-spacing: -0.03em; line-height: 1; }
.proof-lbl { font-size: 0.72rem; color: var(--ink-4); font-weight: 500; }
.proof-div { width: 1px; height: 36px; background: var(--line); }

/* ─── CTA CARD ──────────────────────────────────────────── */
.cta-card {
  border-radius: var(--r-lg); overflow: hidden; position: relative;
  background: linear-gradient(145deg, var(--brand) 0%, var(--brand-deep) 100%);
  padding: 36px 28px; margin-top: 16px;
  box-shadow: 0 16px 48px -8px var(--brand-glow), 0 1px 0 rgba(255,255,255,.12) inset;
}
.cta-headline { font-size: clamp(1.4rem, 4vw, 2rem); font-weight: 900; color: #fff; line-height: 1.15; letter-spacing: -0.03em; margin: 0 0 8px; }
.cta-headline span { color: oklch(0.82 0.18 268); }
.cta-sub-text { font-size: 0.88rem; color: rgba(255,255,255,.5); margin: 0 0 28px; line-height: 1.5; }
.cta-benefits { display: flex; flex-direction: column; gap: 10px; margin-bottom: 28px; }
.cta-benefit {
  display: flex; align-items: center; gap: 12px;
  background: rgba(255,255,255,.06); border: 1px solid rgba(255,255,255,.08);
  border-radius: 12px; padding: 12px 16px;
}
.cta-benefit-icon { width: 36px; height: 36px; flex-shrink: 0; background: rgba(255,255,255,.1); border-radius: 9px; display: flex; align-items: center; justify-content: center; }
.cta-benefit-body strong { display: block; font-size: 0.88rem; font-weight: 700; color: #fff; }
.cta-benefit-body span { font-size: 0.76rem; color: rgba(255,255,255,.45); }
.btn-cta {
  display: block; background: #fff; color: oklch(0.25 0.20 268);
  font-weight: 900; font-size: 1rem; padding: 16px; border-radius: var(--r-sm);
  text-decoration: none; text-align: center;
  box-shadow: 0 8px 28px rgba(0,0,0,.35); transition: transform 0.2s, box-shadow 0.2s;
}
.btn-cta:hover { transform: translateY(-2px); box-shadow: 0 12px 36px rgba(0,0,0,.45); }
.cta-trust { font-size: 0.72rem; color: rgba(255,255,255,.3); text-align: center; margin-top: 12px; }

/* ─── TOOL FOOTER ───────────────────────────────────────── */
.tool-footer { text-align: center; margin-top: 32px; font-size: 0.74rem; color: var(--ink-4); line-height: 1.6; }
.tool-footer a { color: var(--brand); text-decoration: none; }

/* ─── PDF EXPORT BUTTON ─────────────────────────────────── */
.pdf-export-row {
  display: flex;
  justify-content: flex-end;
  margin-top: 14px;
}
.pdf-export-btn {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 10px 20px;
  background: var(--brand);
  color: #fff;
  font-family: inherit;
  font-size: 0.875rem;
  font-weight: 700;
  border: none;
  border-radius: 10px;
  cursor: pointer;
  box-shadow: 0 4px 14px rgba(124,58,237,.3);
  transition: background .2s, transform .15s, box-shadow .2s;
}
.pdf-export-btn:hover {
  background: var(--brand-deep, #4c1d95);
  transform: translateY(-1px);
  box-shadow: 0 6px 20px rgba(124,58,237,.4);
}
.pdf-export-btn svg {
  flex-shrink: 0;
  opacity: .9;
}
