/* ==========================================================================
   Generatoren (/generatoren/…): Übersicht, Schritt-Formular, Vorschau, Slide-out
   ========================================================================== */
.gen-page { background: #f6f8fb; }
.gen-page main { padding-top: clamp(96px, 10vw, 130px); padding-bottom: 80px; }
.gen-hero { max-width: 860px; margin-bottom: 28px; }
.gen-hero h1 { font-size: clamp(34px, 4.6vw, 58px); line-height: 1.04; margin: 10px 0 14px; }
.gen-hero p { font-size: 17px; color: var(--ink-soft); max-width: 720px; }
.gen-badges { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 16px; padding: 0; list-style: none; }
.gen-badges li { display: inline-flex; gap: 6px; align-items: center; padding: 6px 12px; border-radius: 999px; background: #fff; border: 1px solid var(--line); font-size: 13px; font-weight: 600; }
.gen-badges svg { color: var(--green); }
.gen-crumb { font-size: 13.5px; color: var(--muted); }
.gen-crumb a { color: var(--blue); }
.gen-muted { color: var(--muted); font-size: 14px; }

/* ---------- Übersicht ---------- */
.gen-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(290px, 1fr)); gap: 18px; }
.gen-card { position: relative; display: flex; flex-direction: column; gap: 10px; padding: 26px; background: #fff; border: 1px solid var(--line); border-radius: 18px; color: var(--ink); text-decoration: none; transition: transform .3s var(--ease), box-shadow .3s, border-color .3s; }
.gen-card:hover { transform: translateX(3px); border-color: var(--blue); box-shadow: 0 22px 44px -30px rgba(0, 60, 140, .45); }
.gen-card .gc-ic { display: grid; place-items: center; width: 48px; height: 48px; border-radius: 14px; background: #eaf4ff; color: var(--blue); }
.gen-card .gc-ic svg { width: 26px; height: 26px; fill: none; stroke: currentColor; stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round; }
.gen-card h2 { font-size: 21px; margin: 4px 0 0; }
.gen-card p { margin: 0; font-size: 14.5px; color: var(--ink-soft); }
.gen-card .gc-go { margin-top: auto; padding-top: 8px; font-weight: 700; font-size: 14px; color: var(--blue); }
.gen-card .gc-tag { position: absolute; top: 20px; right: 20px; padding: 3px 9px; border-radius: 999px; background: #e8f8ee; color: #15803d; font-size: 11.5px; font-weight: 700; }
.gen-note { margin-top: 26px; padding: 18px 22px; background: #fff; border: 1px solid var(--line); border-left: 4px solid var(--blue); border-radius: 14px; font-size: 14px; color: var(--ink-soft); }

/* ---------- App-Layout ---------- */
.gen-app { display: grid; grid-template-columns: 230px minmax(0, 1fr) minmax(0, 400px); gap: 20px; align-items: start; scroll-margin-top: 90px; }
.gen-side { position: sticky; top: 92px; }
.gen-nav { list-style: none; margin: 0; padding: 0; display: grid; gap: 4px; }
.gen-nav button { display: flex; gap: 10px; align-items: center; width: 100%; padding: 9px 10px; border: 0; border-radius: 10px; background: none; font: 600 14px var(--f-body); color: var(--ink-soft); text-align: left; cursor: pointer; }
.gen-nav button span { display: grid; place-items: center; flex: none; width: 24px; height: 24px; border-radius: 50%; border: 1.5px solid var(--line); font-size: 12px; background: #fff; }
.gen-nav li.is-done button span { background: var(--green); border-color: var(--green); color: #fff; }
.gen-nav li.is-on button { background: #fff; color: var(--ink); box-shadow: 0 6px 20px -14px rgba(0, 0, 0, .4); }
.gen-nav li.is-on button span { background: var(--blue); border-color: var(--blue); color: #fff; }
.gen-progress { height: 4px; border-radius: 4px; background: #e3e8ef; overflow: hidden; margin: 14px 0 10px; }
.gen-progress i { display: block; height: 100%; width: 0; background: var(--blue); transition: width .4s var(--ease); }
.gen-side .gen-reset { margin-top: 6px; background: none; border: 0; padding: 4px 10px; font: 600 13px var(--f-body); color: var(--muted); text-decoration: underline; cursor: pointer; }

.gen-form { background: #fff; border: 1px solid var(--line); border-radius: 20px; padding: clamp(20px, 3vw, 34px); box-shadow: 0 30px 60px -48px rgba(0, 30, 80, .5); min-width: 0; }
.gen-step { display: none; }
.gen-step.is-on { display: block; animation: genIn .35s var(--ease); }
@keyframes genIn { from { opacity: 0; transform: translateY(8px); } to { opacity: 1; transform: none; } }
@media (prefers-reduced-motion: reduce) { .gen-step.is-on { animation: none; } }
.gen-step h2 { font-size: clamp(22px, 2.4vw, 30px); margin: 0 0 6px; }
.gen-step > p.gen-lead { margin: 0 0 20px; color: var(--ink-soft); font-size: 15px; }
.gen-step h3 { font-size: 16px; margin: 22px 0 10px; padding-top: 16px; border-top: 1px solid var(--line); }
.gen-step h3:first-of-type { border-top: 0; padding-top: 0; }
.gf-row { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 0 14px; }
.gf-row.r3 { grid-template-columns: 2fr 1fr 2fr; }
.gen-f { display: grid; gap: 5px; margin-bottom: 14px; font-size: 13.5px; font-weight: 600; color: var(--ink); }
.gen-f > span small, .gen-opts > legend small { font-weight: 500; color: var(--muted); }
.gen-f input, .gen-f select, .gen-f textarea { width: 100%; min-height: 44px; padding: 10px 12px; font: 15px var(--f-body); color: var(--ink); background: #fff; border: 1.5px solid #d8dee8; border-radius: 10px; }
.gen-f textarea { min-height: 84px; resize: vertical; line-height: 1.45; }
.gen-f input:focus, .gen-f select:focus, .gen-f textarea:focus { outline: none; border-color: var(--blue); box-shadow: 0 0 0 3px rgba(0, 134, 255, .15); }
.gen-f em, .gen-opts em, .gen-check em { font-style: normal; font-weight: 500; font-size: 12.5px; color: var(--muted); }
.is-bad input, .is-bad select, .is-bad textarea { border-color: #e5484d !important; }
.is-bad > legend, .gen-check.is-bad { color: #c4262b; }
.gen-check.is-bad { background: #fff5f5; border-color: #f3c0c0; }

.gen-opts { border: 0; padding: 0; margin: 0 0 16px; min-width: 0; }
.gen-opts > legend { padding: 0; margin-bottom: 8px; font-size: 13.5px; font-weight: 700; }
.gen-choices { display: grid; grid-template-columns: repeat(auto-fill, minmax(200px, 1fr)); gap: 8px; }
.gen-choices.c3 { grid-template-columns: repeat(auto-fill, minmax(160px, 1fr)); }
.gen-choice { position: relative; display: flex; gap: 10px; align-items: flex-start; padding: 11px 12px; border: 1.5px solid #dfe5ee; border-radius: 12px; background: #fff; cursor: pointer; font-size: 14px; font-weight: 600; line-height: 1.3; transition: border-color .2s, background .2s; }
.gen-choice:hover { border-color: #b9c6d8; }
.gen-choice input { flex: none; width: 18px; height: 18px; margin: 1px 0 0; accent-color: var(--blue); }
.gen-choice small { display: block; margin-top: 3px; font-weight: 500; font-size: 12.5px; color: var(--muted); }
.gen-choice:has(input:checked) { border-color: var(--blue); background: #f2f8ff; }
.gen-choice .gen-i { margin-left: auto; }

.gen-check { display: flex; gap: 10px; align-items: flex-start; padding: 12px 14px; margin-bottom: 10px; border: 1.5px solid #dfe5ee; border-radius: 12px; background: #fff; cursor: pointer; font-size: 14px; line-height: 1.45; }
.gen-check input { flex: none; width: 18px; height: 18px; margin: 2px 0 0; accent-color: var(--blue); }
.gen-check:has(input:checked) { border-color: var(--blue); background: #f7fbff; }
.gen-check.gen-liab { border-color: #f0c36b; background: #fffaf0; font-weight: 600; }
.gen-check.gen-liab:has(input:checked) { border-color: var(--green); background: #f2fbf5; }

/* Dienste-Liste (Datenschutz) */
.gen-svc-group { margin: 0 0 18px; border: 1px solid var(--line); border-radius: 14px; overflow: hidden; }
.gen-svc-group > summary { display: flex; justify-content: space-between; align-items: center; gap: 10px; padding: 13px 16px; background: #f8fafc; cursor: pointer; font-weight: 700; font-size: 15px; list-style: none; }
.gen-svc-group > summary::-webkit-details-marker { display: none; }
.gen-svc-group > summary::after { content: '+'; font-size: 20px; color: var(--muted); }
.gen-svc-group[open] > summary::after { content: '–'; }
.gen-svc-group > summary b { margin-left: auto; padding: 2px 8px; border-radius: 999px; background: var(--blue); color: #fff; font-size: 12px; }
.gen-svc-group > summary b:empty { display: none; }
.gen-svc-list { display: grid; grid-template-columns: repeat(auto-fill, minmax(230px, 1fr)); gap: 8px; padding: 12px; }
.gen-svc-search { margin-bottom: 14px; }

.gen-i { display: inline-grid; place-items: center; flex: none; width: 22px; height: 22px; padding: 0; border: 0; border-radius: 50%; background: #e9edf3; color: var(--blue); font: 800 12px/1 Georgia, serif; font-style: italic; cursor: pointer; vertical-align: middle; }
.gen-i:hover { background: #dce7f6; }

.gen-svc-opts { grid-column: 1 / -1; margin: -2px 0 6px; padding: 12px 14px; border-radius: 12px; background: #f6f9fd; border: 1px dashed #c9d6e8; }
.gen-svc-opts .gen-check { margin-bottom: 6px; padding: 8px 10px; font-size: 13px; }
.gen-svc-opts b { display: block; margin-bottom: 8px; font-size: 13px; }

.gen-foot { display: flex; justify-content: space-between; gap: 10px; margin-top: 26px; padding-top: 18px; border-top: 1px solid var(--line); }
.gen-foot .btn { min-width: 140px; }
.gen-foot .btn[hidden] { display: none; }
.gen-foot .js-gen-next { margin-left: auto; }

.gen-hp { position: absolute !important; left: -9999px !important; width: 1px; height: 1px; overflow: hidden; }

/* Ergebnis */
.gen-finish { display: flex; flex-wrap: wrap; align-items: center; gap: 12px; margin-top: 8px; }
.gen-msg { font-size: 14px; font-weight: 600; color: var(--muted); }
.gen-msg.is-ok { color: #15803d; }
.gen-msg.is-err { color: #c4262b; }
.gen-out { margin-top: 22px; padding-top: 20px; border-top: 1px solid var(--line); }
.gen-out-btns { display: flex; flex-wrap: wrap; gap: 8px; margin-bottom: 14px; }
.gen-out-btns .btn { flex: 1 1 180px; }
.gen-code { width: 100%; min-height: 160px; padding: 12px; font: 12.5px/1.5 ui-monospace, SFMono-Regular, Menlo, monospace; color: #e5e9f0; background: #0b0f17; border: 0; border-radius: 12px; resize: vertical; }

/* Vorschau */
.gen-preview-wrap { position: sticky; top: 92px; max-height: calc(100vh - 110px); display: flex; flex-direction: column; background: #fff; border: 1px solid var(--line); border-radius: 20px; overflow: hidden; }
.gen-preview-wrap > b { display: flex; justify-content: space-between; align-items: center; padding: 12px 16px; font-size: 12px; letter-spacing: .1em; text-transform: uppercase; color: var(--muted); border-bottom: 1px solid var(--line); background: #fafbfd; }
.gen-doc { padding: 18px 20px 24px; overflow: auto; font-size: 13.5px; line-height: 1.55; color: var(--ink); -webkit-user-select: none; user-select: none; }
.gen-doc h1 { font-size: 22px; margin: 0 0 12px; }
.gen-doc h2 { font-size: 16px; margin: 18px 0 6px; }
.gen-doc h3 { font-size: 14px; margin: 14px 0 4px; }
.gen-doc p { margin: 0 0 8px; }
.gen-doc ul { margin: 0 0 10px; padding-left: 18px; }
.gen-doc a { color: var(--blue); word-break: break-word; }
.gen-doc.is-final { -webkit-user-select: text; user-select: text; max-height: 560px; border: 1px solid var(--line); border-radius: 14px; margin-bottom: 14px; }

/* Slide-out */
.gen-drawer { position: fixed; inset: 0; z-index: 600; }
.gen-drawer-shade { position: absolute; inset: 0; background: rgba(11, 15, 23, .45); backdrop-filter: blur(3px); opacity: 0; transition: opacity .25s; }
.gen-drawer-box { position: absolute; top: 0; right: 0; bottom: 0; width: min(440px, 100vw); display: flex; flex-direction: column; background: #fff; box-shadow: -30px 0 60px -30px rgba(0, 0, 0, .4); transform: translateX(100%); transition: transform .3s var(--ease); }
.gen-drawer.is-open .gen-drawer-shade { opacity: 1; }
.gen-drawer.is-open .gen-drawer-box { transform: none; }
.gen-drawer-top { display: flex; justify-content: space-between; align-items: center; gap: 10px; padding: 16px 20px; border-bottom: 1px solid var(--line); font-size: 16px; }
.gen-x { display: grid; place-items: center; width: 36px; height: 36px; border: 0; border-radius: 10px; background: #f1f4f8; color: var(--ink); cursor: pointer; }
.gen-drawer-body { padding: 18px 20px 30px; overflow: auto; font-size: 14.5px; line-height: 1.55; color: var(--ink-soft); }
.gen-drawer-body h4 { margin: 18px 0 6px; font-size: 14px; color: var(--ink); }
.gen-drawer-body h4:first-child { margin-top: 0; }
.gen-drawer-body ol, .gen-drawer-body ul { padding-left: 20px; margin: 0 0 10px; }
.gen-drawer-body li { margin-bottom: 4px; }
.gen-drawer-body a { color: var(--blue); word-break: break-word; }
.gen-drawer-body .gd-tag { display: inline-block; padding: 3px 9px; margin: 0 6px 6px 0; border-radius: 999px; font-size: 12px; font-weight: 700; background: #eef3f9; color: var(--ink); }
.gen-drawer-body .gd-tag.ok { background: #e8f8ee; color: #15803d; }
.gen-drawer-body .gd-tag.warn { background: #fff4e0; color: #9a5b00; }
@media (prefers-reduced-motion: reduce) { .gen-drawer-box, .gen-drawer-shade { transition: none; } }

/* Responsiv */
@media (max-width: 1180px) {
  .gen-app { grid-template-columns: 210px minmax(0, 1fr); }
  .gen-preview-wrap { grid-column: 1 / -1; position: static; max-height: 520px; }
}
@media (max-width: 820px) {
  .gen-app { grid-template-columns: minmax(0, 1fr); }
  .gen-side { position: static; }
  .gen-nav { display: flex; overflow-x: auto; gap: 6px; padding-bottom: 4px; scrollbar-width: none; }
  .gen-nav button { white-space: nowrap; padding: 8px 10px; }
  .gen-nav li:not(.is-on) button { font-size: 0; gap: 0; }
  .gen-nav li:not(.is-on) button span { font-size: 12px; }
  .gf-row, .gf-row.r3 { grid-template-columns: minmax(0, 1fr); }
  .gen-foot .btn { min-width: 0; flex: 1; }
}
@media (min-width: 900px) and (max-height: 940px) {
  .gen-page main { padding-top: 90px; }
  .gen-hero h1 { font-size: clamp(30px, 3.6vw, 44px); }
  .gen-form { padding: 22px 26px; }
}
.gen-page .btn-light { box-shadow: inset 0 0 0 1.5px #cfd8e4; }
.gen-out-btns .btn, .gen-foot .btn, .gen-finish .btn { padding-left: 20px; padding-right: 20px; }
.gen-finish .btn[disabled] { opacity: .5; cursor: not-allowed; }

/* ---------- Gewährleistungslabel ---------- */
.gl-app { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1.05fr); gap: 20px; align-items: start; }
.gl-h { font-size: 18px; margin: 26px 0 12px; }
.gl-h:first-child { margin-top: 0; }
.gl-presets { display: grid; grid-template-columns: repeat(5, minmax(0, 1fr)); gap: 8px; }
.gl-preset { display: grid; gap: 6px; justify-items: center; padding: 10px 6px; border: 1.5px solid #dfe5ee; border-radius: 12px; background: #fff; cursor: pointer; font: 600 13px var(--f-body); color: var(--ink); }
.gl-preset[aria-pressed="true"] { border-color: var(--blue); background: #f2f8ff; box-shadow: 0 0 0 3px rgba(0, 134, 255, .15); }
.gl-sw { display: flex; gap: 4px; align-items: center; justify-content: center; width: 100%; height: 34px; border: 2px solid; }
.gl-sw i { width: 10px; height: 10px; border-radius: 50%; }
.gl-colors { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 8px; margin-bottom: 14px; }
.gl-col { display: flex; gap: 8px; align-items: center; padding: 6px 8px; border: 1.5px solid #dfe5ee; border-radius: 10px; font-size: 12.5px; font-weight: 600; cursor: pointer; }
.gl-col input { flex: none; width: 30px; height: 30px; padding: 0; border: 0; border-radius: 6px; background: none; cursor: pointer; }
.gen-f input[type="range"] { min-height: 0; padding: 0; border: 0; accent-color: var(--blue); }
.gl-preview { position: sticky; top: 92px; display: flex; flex-direction: column; background: #fff; border: 1px solid var(--line); border-radius: 20px; overflow: hidden; }
.gl-pv-top { display: flex; justify-content: space-between; align-items: center; padding: 10px 14px; border-bottom: 1px solid var(--line); background: #fafbfd; font-size: 13px; }
.gl-pv-sw { display: inline-flex; padding: 3px; border-radius: 999px; background: #eef2f7; }
.gl-pv-sw button { border: 0; background: none; padding: 5px 12px; border-radius: 999px; font: 600 12.5px var(--f-body); color: var(--ink-soft); cursor: pointer; }
.gl-pv-sw button.is-on { background: #fff; color: var(--ink); box-shadow: 0 1px 4px rgba(0, 0, 0, .12); }
.gl-frame-wrap { display: flex; justify-content: center; background: #e9edf3; padding: 0; }
.gl-frame { display: block; width: 100%; height: min(78vh, 760px); border: 0; background: #f3f4f6; transition: width .3s var(--ease); }
.gl-frame-wrap.is-mob { padding: 14px 0; }
.gl-frame-wrap.is-mob .gl-frame { width: 380px; max-width: 100%; border-radius: 24px; box-shadow: 0 0 0 8px #111827; }
.gl-pv-note { margin: 0; padding: 10px 14px; }
@media (max-width: 1100px) { .gl-app { grid-template-columns: minmax(0, 1fr); } .gl-preview { position: static; } .gl-frame { height: 640px; } }
@media (max-width: 560px) { .gl-presets { grid-template-columns: repeat(3, minmax(0, 1fr)); } .gl-colors { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
