/* === Palette + base === */
:root{
  --bg: #fdf7f4;
  --card: #ffffff;
  --soft: #fff7f5;
  --text: #000000;
  --muted: #0c575280;
  --accent: #0c5752;
  --accent-2: #ffc4c0;
  --ok: #0c5752;
  --danger: #c0392b;
  --radius: 16px;
  --ring: 2px;
  --shadow-elev: 0 10px 30px rgba(12,87,82,.12), inset 0 1px 0 rgba(255,255,255,.6);
  --shadow-soft: 0 6px 18px rgba(12,87,82,.10);
  --grad: linear-gradient(135deg, var(--accent) 0%, var(--accent-2) 100%);
}
*, *::before, *::after{ box-sizing: border-box; }

body{
  background:
    radial-gradient(900px 420px at 12% -10%, rgba(255,196,192,.20), transparent 60%),
    radial-gradient(900px 420px at 88% 110%, rgba(12,87,82,.10), transparent 60%),
    var(--bg);
  color: var(--text);
}

/* Form card */
.spf-form{
  max-width: 720px;
  margin: clamp(12px, 4vw, 48px) auto;
  padding: clamp(14px, 3.2vw, 28px);
  background: linear-gradient(180deg, rgba(12,87,82,.04), rgba(255,196,192,.04)), var(--card);
  border-radius: var(--radius);
  box-shadow: var(--shadow-elev);
  border: 1px solid rgba(12,87,82,.16);
  overflow: hidden;
}

/* Stepper */
.spf-stepper{ mask-image: linear-gradient(to right, transparent 0, black 24px, black calc(100% - 24px), transparent 100%); }
.spf-step{ color: var(--muted); }
.spf-step::before{
  content:'';
  display: grid; place-items: center;
  width: 38px; height: 38px; margin: 0 auto 6px; border-radius: 999px;
  background: #fff;
  border: 1px solid rgba(12,87,82,.25);
  color: var(--text);
  box-shadow: var(--shadow-soft);
}
@media (min-width:680px){
  .spf-step::after{
    content:''; position:absolute; top: 24px; left: calc(50% + 24px); right: calc(-50% - 24px); height: 2px;
    background: linear-gradient(to right, rgba(12,87,82,.20), rgba(12,87,82,.10));
  }
  .spf-step:last-child::after{ display:none; }
}
.spf-step.is-active{ color: var(--accent); }

/* aktiver Step */
.spf-step.is-active::before {
  border-color: transparent;
  background: #1b615d;
  color: #fff;
}

/* erledigter Step */
.spf-step.is-complete {
  color: #1b615d;
}

.spf-step.is-complete::before {
  background: #1b615d;
  color: #fff;
}

.spf-step.is-complete::after {
  background: #1b615d;
}


/* Step content */
.spf-stepper + .spf-steps{ border-top: 1px solid rgba(12,87,82,.16); }
.spf-step-content{ display:none; text-align:center; border-radius:12px; }
.spf-step-content.is-active{ display:block; animation: spf-fade-slide .36s cubic-bezier(.2,.7,.2,1); }
@keyframes spf-fade-slide{ from{opacity:0; transform:translateY(10px);} to{opacity:1; transform:translateY(0);} }

/* Cards */
.spf-card-container{
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(160px, 1fr));
  gap: clamp(10px, 2vw, 16px);
  justify-content: center;
  align-items: stretch;
}
.spf-card{
  /* background: var(--soft); */
  border: 1px solid rgba(12,87,82,.20);
  color: var(--text);
  padding: 14px;
  border-radius: 14px;
  cursor: pointer;
  transition: transform .12s ease, box-shadow .12s ease, border-color .12s ease, background .12s ease;
  user-select: none;
}
.spf-card .spf-icon{
  width: 42px; height: 42px; margin: 0 auto 8px;
  border-radius: 12px;
  background: #fff;
  display:grid; place-items:center;
  border: 1px solid rgba(12,87,82,.15);
  box-shadow: inset 0 1px 0 rgba(255,255,255,.6);
}
.spf-card .spf-icon svg{
  width: 24px; height: 24px; stroke: var(--accent); fill: none; stroke-width: 2;
}
.spf-card:hover{
  border-color: rgba(12,87,82,.35);
  box-shadow: 0 10px 24px rgba(12,87,82,.15);
  transform: translateY(-1px);
}
.spf-card.selected{
  background:
    radial-gradient(120% 80% at 0% 0%, rgba(12,87,82,.08), transparent 60%),
    radial-gradient(120% 80% at 100% 100%, rgba(255,196,192,.20), transparent 60%),
    var(--soft);
  border-color: var(--accent);
  box-shadow: 0 0 0 3px rgba(12,87,82,.18);
}

/* Inputs */
.spf-step-content label{ color: var(--accent); font-weight: 600; display:block; text-align:left; }
.spf-step-content input{
  display:block; width:100%; max-width:100%;
  padding:12px 14px; margin-top:6px;
  border-radius:12px; border:1px solid rgba(12,87,82,.28);
  background:#fff; color:var(--text); background-clip:padding-box;
  box-shadow: inset 0 1px 2px rgba(12,87,82,.06); outline:none;
}
.spf-step-content input::placeholder{ color: rgba(12,87,82,.6); }
.spf-step-content input:focus{
  border-color: var(--accent);
  box-shadow: 0 0 0 3px rgba(12,87,82,.18), inset 0 1px 2px rgba(12,87,82,.08);
}

/* Buttons */
.spf-actions{ display:flex; gap:12px; justify-content: space-between; margin-top:16px; flex-wrap: wrap; }
.spf-btn{
  background: #ffc4c0;
  color: #000;
  padding: 12px 16px;
  border: none;
  border-radius: 12px;
  cursor: pointer;
  font-weight: 600;
  box-shadow: 0 10px 20px rgba(12,87,82,.20);
}
.spf-btn.spf-prev{
  background: linear-gradient(180deg, rgba(12,87,82,.06), rgba(255,196,192,.06));
  color: var(--accent);
  border: 1px solid rgba(12,87,82,.28);
}
.spf-btn:disabled{ opacity:.6; cursor:not-allowed; }

/* Spinner */
.spf-spinner{
  width: 56px; height: 56px;
  margin: 16px auto;
  border-radius: 999px;
  border: 4px solid rgba(12,87,82,.20);
  border-top: 4px solid transparent;
  border-image: conic-gradient(from 0deg, var(--accent), var(--accent-2), var(--accent)) 1;
  animation: spf-spin 1s linear infinite;
  box-shadow: inset 0 0 0 2px rgba(12,87,82,.08);
}
@keyframes spf-spin{ to{ transform: rotate(360deg); } }

/* Animated success check */
.spf-check-wrap{ text-align:center; padding: 16px 0 8px; }
.spf-check{
  width: 88px; height: 88px; display:block; margin: 0 auto 10px;
}
.spf-check-circle{
  stroke: var(--accent); stroke-width: 2; stroke-dasharray: 157; stroke-dashoffset: 157;
  animation: circle-draw .6s ease forwards .05s;
}
.spf-check-tick{
  stroke: #fff; stroke-width: 3; stroke-linecap: round; stroke-linejoin: round;
  filter: drop-shadow(0 0 0 rgba(0,0,0,0));
  stroke-dasharray: 48; stroke-dashoffset: 48;
  animation: tick-draw .35s ease-out forwards .45s;
}
.spf-check{ background: var(--grad); border-radius: 999px; padding: 16px; }
@keyframes circle-draw{ to{ stroke-dashoffset: 0; } }
@keyframes tick-draw{ to{ stroke-dashoffset: 0; } }

.spf-btn.spf-home{ display:inline-block; margin-top: 8px; }

/* Focus visibility */
.spf-card:focus-visible,
.spf-btn:focus-visible,
.spf-step:focus-visible{ box-shadow: 0 0 0 3px rgba(255,196,192,.55); outline: none; }

/* Small screens */
@media (max-width: 420px){
  .spf-form{ padding: 14px; }
  .spf-card{ padding: 12px; }
  .spf-step::before{ width: 34px; height: 34px; }
  .spf-steps .spf-btn{ width: 100%; }
}

/* --- CORE: stepper layout & visibility --- */
.spf-stepper{
  display: grid;
  grid-auto-flow: column;
  grid-auto-columns: minmax(84px, 1fr);
  gap: clamp(8px, 1.6vw, 16px);
  list-style: none;
  padding: 0 6px 10px;
  margin: 0 0 22px 0;
  overflow-x: auto;
  scrollbar-width: thin;
  scroll-snap-type: x mandatory;
  -webkit-overflow-scrolling: touch;
}
.spf-step{
  position: relative;
  text-align: center;
  font-size: 12px;
  color: var(--muted);
  scroll-snap-align: center;
  padding-top: 4px;
}

/* show only active panel */

/* Icon-Zeile mit Multiplikator */
.spf-iconRow{
  display: inline-flex;
  align-items: center;
  gap: 6px;               /* zarter Abstand zwischen Icon und × Zahl */
  margin-bottom: 6px;
}

.spf-sim{
  width: 42px;
  height: 42px;
  border-radius: 12px;
  background: #fff;
  display: grid;
  place-items: center;
  border: 1px solid rgba(12,87,82,.15);
  box-shadow: inset 0 1px 0 rgba(255,255,255,.6);
}

.spf-sim svg{
  width: 24px;
  height: 24px;
  stroke: var(--accent);
  stroke-linecap: round;
  stroke-linejoin: round;
}

.spf-mult{
  font-size: 13px;                 /* filigran */
  line-height: 1;
  color: rgba(12,87,82,.75);       /* dezent */
  font-weight: 600;
  letter-spacing: .2px;
  font-variant-numeric: tabular-nums; /* saubere Zahlenausrichtung */
}
