/* ==========================================================
   Geführter Ablauf (tools.html)
   ========================================================== */
.sr-only { position: absolute; width: 1px; height: 1px; margin: -1px; padding: 0; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; border: 0; }

.wiz-hero { padding: 40px 0 36px; }
.wiz-hero h1 { font-size: clamp(1.9rem, 4.4vw, 3rem); margin-bottom: .3em; }
.wiz-hero p { color: #c5cad3; font-size: 1.1rem; max-width: 640px; margin: 0; }

/* ---------- Fortschrittsleiste ---------- */
.stepper-bar { position: sticky; top: 66px; z-index: 15; background: var(--surface); border-bottom: 1px solid var(--line); box-shadow: 0 6px 18px rgba(14,17,22,.06); }
.stepper-bar .wrap { padding-top: 10px; padding-bottom: 0; }
.stepper { list-style: none; margin: 0; padding: 0 0 10px; display: grid; grid-template-columns: repeat(7, 1fr); gap: 6px; }
.stepper-item button {
  width: 100%; display: flex; flex-direction: column; align-items: center; gap: 4px; padding: 4px 2px;
  border: 0; background: transparent; color: var(--muted); font: inherit; font-size: .78rem; font-weight: 700; cursor: pointer; border-radius: 10px;
}
.stepper-item button:disabled { cursor: not-allowed; opacity: .55; }
.stepper-dot { width: 30px; height: 30px; border-radius: 50%; display: grid; place-items: center; background: var(--surface-2); color: var(--muted); font-weight: 800; font-size: .85rem; border: 2px solid var(--line); transition: all .2s; }
.stepper-item.current .stepper-dot { background: var(--ink); color: var(--lime); border-color: var(--ink); }
.stepper-item.current button { color: var(--text); }
.stepper-item.done .stepper-dot { background: var(--lime); color: var(--ink); border-color: var(--lime-strong); }
.stepper-label { line-height: 1.15; text-align: center; }
.stepper-track { height: 4px; background: var(--surface-2); margin: 0 -20px; }
.stepper-fill { height: 100%; width: 0; background: var(--lime-strong); transition: width .5s ease; }
.stepper-mobile { display: none; margin: 0; padding: 4px 0 8px; font-weight: 700; font-size: .92rem; }

/* ---------- Seite ---------- */
.wiz-main { max-width: 880px; padding-top: 28px; padding-bottom: 80px; }
.wiz-note { font-size: .92rem; color: var(--muted); margin: 0 0 20px; }

/* ---------- Schritt-Karten ---------- */
.step { padding: 0; background: var(--surface); border: 1.5px solid var(--line); border-radius: var(--radius); margin-bottom: 16px; scroll-margin-top: 170px; transition: border-color .25s, background .25s, opacity .25s, box-shadow .25s; }
.step-head { display: grid; grid-template-columns: auto 1fr auto auto; gap: 14px; align-items: center; padding: 20px 24px; }
.step-num { width: 42px; height: 42px; border-radius: 50%; display: grid; place-items: center; font-weight: 800; background: var(--ink); color: var(--lime); }
.step-titles h2 { font-size: 1.25rem; margin: 0; letter-spacing: -.02em; }
.step-titles h2:focus { outline: none; }
.kb .step-titles h2:focus-visible { outline: 3px solid var(--lime-strong); outline-offset: 4px; border-radius: 6px; }
.step-sum { margin: 2px 0 0; color: var(--muted); font-size: .92rem; min-height: 0; }
.step-sum:empty { display: none; }
.step-status { font-size: .74rem; font-weight: 800; letter-spacing: .06em; text-transform: uppercase; padding: 5px 11px; border-radius: 99px; background: var(--surface-2); color: var(--muted); white-space: nowrap; }
.step-status.now { background: var(--lime); color: var(--ink); }
.step-status.done { background: var(--green-soft); color: var(--green); }
.step-status.locked { background: var(--surface-2); color: var(--muted); }
.step-body { padding: 0 24px 24px; }
.step-help { color: var(--muted); margin: 0 0 18px; max-width: 70ch; }
.step-hint { margin: 14px 0 0; min-height: 1.4em; color: var(--muted); font-size: .92rem; }
.step-foot { display: flex; align-items: center; justify-content: space-between; gap: 16px; flex-wrap: wrap; margin-top: 22px; padding-top: 18px; border-top: 1px solid var(--line); }
.step-foot-note { color: var(--muted); font-size: .92rem; }
.step-foot-actions { display: flex; gap: 10px; flex-wrap: wrap; }
.step.is-active { border-color: var(--ink); box-shadow: var(--shadow); }
.step.is-done .step-num { background: var(--lime); color: var(--ink); }
.step.is-done .step-head { padding-bottom: 20px; }

/* Gesperrt: grau hinterlegt, nicht bedienbar */
.step.is-locked { background: var(--surface-2); border-style: dashed; opacity: .62; filter: grayscale(1); }
.step.is-locked .step-num { background: var(--line); color: var(--muted); }
.step.is-locked .step-titles h2 { color: var(--muted); }
.step.is-locked .step-head { padding-bottom: 20px; }

/* ---------- Auswahlkarten ---------- */
fieldset { border: 0; margin: 0; padding: 0; min-width: 0; }
.choice-group { margin: 22px 0 0; display: grid; gap: 10px; }
.choice-group legend { font-weight: 800; font-size: .95rem; margin-bottom: 10px; padding: 0; }
.choice { display: flex; gap: 14px; align-items: flex-start; padding: 16px 18px; border: 1.5px solid var(--line); border-radius: var(--radius-sm); background: var(--bg); cursor: pointer; font-weight: 400; margin: 0; transition: border-color .15s, background .15s; }
.choice:hover { border-color: var(--text); }
.choice:has(input:checked) { border-color: var(--ink); background: var(--surface-2); box-shadow: inset 0 0 0 1px var(--ink); }
.choice input { width: 20px; height: 20px; margin: 3px 0 0; flex: none; accent-color: var(--ink); }
.choice-body b { display: block; font-size: 1.02rem; }
.choice-body small { display: block; color: var(--muted); font-size: .9rem; margin-top: 2px; }
.choice-extra { padding: 4px 4px 0 52px; max-width: 280px; }

/* ---------- Schnelltest ---------- */
.quiz { margin-top: 18px; border: 1px solid var(--line); border-radius: var(--radius-sm); padding: 12px 18px; background: var(--bg); }
.quiz summary { font-weight: 700; }
.quiz-list { display: grid; gap: 4px; margin: 10px 0 14px; }
.quiz-q { display: grid; grid-template-columns: 1fr auto; gap: 8px 16px; align-items: center; padding: 10px 0; border-bottom: 1px solid var(--line); }
.quiz-q legend { float: left; width: calc(100% - 150px); padding: 0; font-weight: 500; }
.quiz-q { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; }
.quiz-opt { display: inline-flex; gap: 6px; align-items: center; margin: 0 0 0 12px; font-weight: 600; cursor: pointer; }
.quiz-opt input { width: 18px; height: 18px; accent-color: var(--ink); }

/* ---------- Plattform-Chips ---------- */
.chips-select { display: flex; flex-wrap: wrap; gap: 10px; }
.chip { margin: 0; font-weight: 700; cursor: pointer; }
.chip input { position: absolute; opacity: 0; width: 1px; height: 1px; }
.chip span { display: inline-flex; align-items: center; gap: 8px; padding: 12px 18px; border: 1.5px solid var(--line); border-radius: var(--radius-sm, 12px); background: var(--bg); transition: all .15s; }
.chip span::before { content: ""; width: 16px; height: 16px; border-radius: 50%; border: 2px solid var(--line); background: var(--surface); }
.chip:hover span { border-color: var(--text); }
.chip input:checked + span { background: var(--ink); border-color: var(--ink); color: var(--paper); }
.chip input:checked + span::before { background: var(--lime) url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%230e1116' stroke-width='4' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M5 12.5l4.5 4.5L19 7.5'/%3E%3C/svg%3E") center/11px no-repeat; border-color: var(--lime); }
.chip input:focus-visible + span { outline: 3px solid var(--lime-strong); outline-offset: 2px; }

/* ---------- Reiter ---------- */
.tabs { margin-top: 4px; }
.tab-list { display: flex; gap: 6px; border-bottom: 2px solid var(--line); margin-bottom: 18px; }
.tab { border: 0; background: transparent; padding: 12px 18px; font: inherit; font-weight: 700; color: var(--muted); cursor: pointer; border-bottom: 3px solid transparent; margin-bottom: -2px; border-radius: 10px 10px 0 0; }
.tab:hover { color: var(--text); }
.tab[aria-selected="true"] { color: var(--text); border-bottom-color: var(--lime-strong); background: var(--surface-2); }
.tab-panel[hidden] { display: none; }

.live-profit { margin: 14px 0 0; font-weight: 700; min-height: 1.4em; }
.add-toast { margin-top: 16px; display: flex; flex-wrap: wrap; gap: 12px 18px; align-items: center; justify-content: space-between; padding: 14px 18px; border-radius: var(--radius-sm); background: var(--green-soft); border: 1.5px solid var(--green); font-weight: 600; }
.add-toast-actions { display: flex; gap: 8px; flex-wrap: wrap; }
.year-hint { margin-top: 16px; display: flex; flex-wrap: wrap; align-items: center; gap: 10px 14px; }

/* ---------- Schritt 4 ---------- */
.success-box { display: flex; gap: 12px; align-items: center; padding: 16px 18px; background: var(--green-soft); border: 1.5px solid var(--green); border-radius: var(--radius-sm); font-weight: 600; }
.success-box .check-mark { width: 26px; height: 26px; border-radius: 50%; background: var(--green); color: #fff; display: grid; place-items: center; font-weight: 800; flex: none; }
.bulk { display: flex; flex-wrap: wrap; gap: 14px 24px; align-items: flex-end; margin-bottom: 16px; padding: 14px 16px; border: 1px solid var(--line); border-radius: var(--radius-sm); background: var(--bg); }
.bulk-item label { margin-bottom: 6px; }
.bulk-item .inline-form input { flex: 0 1 140px; border-radius: 10px; padding: 10px 12px; }
.fix-table td { vertical-align: middle; }
.fix-table input[type="number"] { width: 120px; }
.fix-table input[type="date"], .fix-table select { padding: 8px 10px; border-radius: 8px; }

/* ---------- Ende ---------- */
.wiz-end { display: flex; flex-wrap: wrap; gap: 18px; align-items: center; justify-content: space-between; margin-top: 28px; padding: 28px; border-radius: var(--radius); background: var(--ink); color: var(--paper); }
.wiz-end h2 { margin: 0 0 4px; font-size: 1.4rem; }
.wiz-end .muted { color: #a2a8b3; margin: 0; }
.btn.big { padding: 17px 30px; font-size: 1.05rem; }
.btn:disabled { opacity: .45; cursor: not-allowed; transform: none; }

/* ---------- Überprüfung ---------- */
.review-head { margin-bottom: 22px; }
.review-head h2 { font-size: clamp(1.6rem, 3.4vw, 2.2rem); margin: 18px 0 6px; }
.review-head h2:focus { outline: none; }
.review-grid { display: grid; gap: 16px; grid-template-columns: repeat(auto-fit, minmax(min(300px, 100%), 1fr)); margin-bottom: 16px; }
.review-card { background: var(--surface); border: 1.5px solid var(--line); border-radius: var(--radius); padding: 22px 24px; }
.review-card.wide { margin-bottom: 16px; }
.review-card header { display: flex; justify-content: space-between; align-items: center; gap: 12px; margin-bottom: 14px; }
.review-card h3 { margin: 0; font-size: 1.1rem; }
.review-list { margin: 0; }
.review-row { display: grid; grid-template-columns: 140px 1fr; gap: 12px; padding: 10px 0; border-top: 1px solid var(--line); }
.review-row:first-child { border-top: 0; }
.review-row dt { color: var(--muted); font-size: .88rem; font-weight: 700; }
.review-row dd { margin: 0; display: flex; justify-content: space-between; gap: 10px; align-items: baseline; }
.linklike, .linklike-btn, .review-row .linklike { background: none; border: 0; padding: 0; font: inherit; font-weight: 700; color: var(--link); cursor: pointer; text-decoration: underline; }
.review-row .linklike, .review-row button.linklike { flex: none; }
button.linklike { font-size: .9rem; }
.plain-list { margin: 0; padding-left: 1.1em; }
.plain-list li { margin-bottom: 4px; }
.limit-chips { display: grid; gap: 10px; grid-template-columns: repeat(auto-fit, minmax(min(240px, 100%), 1fr)); }
.limit-chip { display: grid; gap: 2px; padding: 12px 14px; border-radius: var(--radius-sm); border: 1.5px solid var(--line); background: var(--bg); font-size: .9rem; }
.limit-chip.green { border-color: var(--green); background: var(--green-soft); }
.limit-chip.yellow { border-color: var(--yellow); background: var(--yellow-soft); }
.limit-chip.red { border-color: var(--red); background: var(--red-soft); }
.limit-chip span { color: var(--muted); }
.export-card { border-color: var(--ink); box-shadow: var(--shadow); }

/* ---------- Mobil ---------- */
@media (max-width: 760px) {
  .stepper { display: none; }
  .stepper-mobile { display: block; }
  .stepper-bar .wrap { padding-bottom: 0; }
  .stepper-track { margin: 0 -20px; }
  .step-head { grid-template-columns: auto 1fr; padding: 16px 16px; gap: 12px; }
  .step-status { grid-column: 2; justify-self: start; }
  .step-edit { grid-column: 2; justify-self: start; }
  .step-body { padding: 0 16px 18px; }
  .review-row { grid-template-columns: 1fr; gap: 2px; }
  .wiz-end { padding: 20px; }
  .step { scroll-margin-top: 130px; }
  .quiz-q legend { width: 100%; float: none; }
  .quiz-q { display: block; }
  .quiz-opt { margin: 6px 16px 0 0; }
}
@media (prefers-reduced-motion: reduce) {
  .stepper-fill, .step, .stepper-dot { transition: none; }
}

/* ---------- Dunkelmodus: Kontrast für gesperrte Karten ---------- */
@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) .step.is-locked { opacity: .5; }
  :root:not([data-theme="light"]) .stepper-bar { box-shadow: 0 6px 18px rgba(0,0,0,.4); }
}

/* Die Warteliste auf der Prüfen-Seite ist eine dunkle Karte (wie auf der Startseite), sonst ist der helle Text unlesbar */
.review-card.cta-card { background: var(--ink); color: var(--paper); border-color: var(--ink); --muted: #a2a8b3; }
.review-card.cta-card h3 { color: var(--paper); }
