/* KI-Security Schnellcheck – Styles
   Design-System: sachlich, professionell, barrierearme Farben
   ------------------------------------------------------------------ */

:root {
  --ki-primary:      #1a56db;
  --ki-primary-dark: #1240a8;
  --ki-danger:       #c81e1e;
  --ki-warning:      #c27803;
  --ki-success:      #057a55;
  --ki-border:       #d1d5db;
  --ki-bg:           #f9fafb;
  --ki-text:         #111827;
  --ki-text-muted:   #6b7280;
  --ki-radius:       6px;
  --ki-shadow:       0 1px 3px rgba(0,0,0,.1), 0 1px 2px rgba(0,0,0,.06);
}

/* ── Wrapper ────────────────────────────────────────────────────── */
.ki-check__wrapper {
  max-width: 760px;
  margin: 0 auto;
  padding: 24px 16px;
  font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
  color: var(--ki-text);
  line-height: 1.5;
}

/* ── Progress-Bar ───────────────────────────────────────────────── */
.ki-check__progress {
  display: flex;
  gap: 4px;
  margin-bottom: 28px;
  overflow-x: auto;
}

.ki-check__progress-step {
  flex: 1;
  min-width: 60px;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 4px;
  opacity: .45;
}

.ki-check__progress-step--active  { opacity: 1; }
.ki-check__progress-step--done    { opacity: .7; }

.ki-check__progress-dot {
  width: 28px;
  height: 28px;
  border-radius: 50%;
  background: var(--ki-border);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 12px;
  font-weight: 600;
}

.ki-check__progress-step--active  .ki-check__progress-dot { background: var(--ki-primary); color: #fff; }
.ki-check__progress-step--done    .ki-check__progress-dot { background: var(--ki-success);  color: #fff; }

.ki-check__progress-label {
  font-size: 10px;
  text-align: center;
  color: var(--ki-text-muted);
}

/* ── Step ───────────────────────────────────────────────────────── */
.ki-check__step {
  background: #fff;
  border: 1px solid var(--ki-border);
  border-radius: var(--ki-radius);
  padding: 28px;
  box-shadow: var(--ki-shadow);
}

.ki-check__step-meta {
  font-size: 12px;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: .06em;
  color: var(--ki-primary);
  margin-bottom: 6px;
}

.ki-check__step-title {
  font-size: 22px;
  font-weight: 700;
  margin: 0 0 8px;
}

.ki-check__step-hint {
  color: var(--ki-text-muted);
  margin: 0 0 20px;
  font-size: 14px;
}

/* ── Info-Boxen ─────────────────────────────────────────────────── */
.ki-check__info-box {
  border-radius: var(--ki-radius);
  padding: 14px 16px;
  margin-bottom: 16px;
  font-size: 14px;
}

.ki-check__info-box h3 {
  margin: 0 0 6px;
  font-size: 14px;
  font-weight: 600;
}

.ki-check__info-box p,
.ki-check__info-box ul,
.ki-check__info-box ol {
  margin: 4px 0 0;
}

.ki-check__info-box li  { margin-bottom: 3px; }

.ki-check__info-box--blue   { background: #eff6ff; border-left: 4px solid var(--ki-primary); }
.ki-check__info-box--yellow { background: #fffbeb; border-left: 4px solid #f59e0b; }
.ki-check__info-box--grey   { background: var(--ki-bg); border: 1px solid var(--ki-border); }

/* ── Formular ───────────────────────────────────────────────────── */
.ki-check__field-group {
  margin-bottom: 20px;
}

.ki-check__label {
  display: block;
  font-weight: 600;
  margin-bottom: 6px;
  font-size: 14px;
}

.ki-check__required { color: var(--ki-danger); }

.ki-check__field-hint {
  font-size: 13px;
  color: var(--ki-text-muted);
  margin: 0 0 8px;
}

.ki-check__input,
.ki-check__textarea {
  width: 100%;
  padding: 8px 12px;
  border: 1px solid var(--ki-border);
  border-radius: var(--ki-radius);
  font-size: 14px;
  font-family: inherit;
  background: #fff;
  box-sizing: border-box;
  transition: border-color .15s;
}

.ki-check__input:focus,
.ki-check__textarea:focus {
  outline: none;
  border-color: var(--ki-primary);
  box-shadow: 0 0 0 3px rgba(26,86,219,.15);
}

.ki-check__input--error {
  border-color: var(--ki-danger);
}

.ki-check__textarea { resize: vertical; min-height: 72px; }

/* ── Radio / Checkbox ───────────────────────────────────────────── */
.ki-check__radio-group,
.ki-check__checkbox-group {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.ki-check__radio-label,
.ki-check__checkbox-label {
  display: flex;
  align-items: flex-start;
  gap: 10px;
  padding: 10px 12px;
  border: 1px solid var(--ki-border);
  border-radius: var(--ki-radius);
  cursor: pointer;
  font-size: 14px;
  transition: background .1s, border-color .1s;
}

.ki-check__radio-label:hover,
.ki-check__checkbox-label:hover {
  background: #f3f4f6;
  border-color: #9ca3af;
}

.ki-check__radio,
.ki-check__checkbox {
  margin-top: 2px;
  flex-shrink: 0;
}

.ki-check__radio-content,
.ki-check__checkbox-content {
  display: flex;
  flex-direction: column;
  gap: 2px;
}

.ki-check__radio-desc {
  font-size: 12px;
  color: var(--ki-text-muted);
}

/* ── Chips ──────────────────────────────────────────────────────── */
.ki-check__chips-area { display: flex; flex-direction: column; gap: 8px; }

.ki-check__chips-input-row {
  display: flex;
  gap: 8px;
}

.ki-check__chip-suggestions {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
}

.ki-check__chips-selected {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
}

.ki-check__chip {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  padding: 3px 10px;
  border-radius: 999px;
  font-size: 12px;
  border: none;
  cursor: pointer;
}

.ki-check__chip--suggestion {
  background: var(--ki-bg);
  border: 1px solid var(--ki-border);
  color: var(--ki-text-muted);
}

.ki-check__chip--suggestion:hover:not(:disabled) {
  background: #e5e7eb;
}

.ki-check__chip--suggestion:disabled {
  opacity: .4;
  cursor: default;
}

.ki-check__chip--selected {
  background: var(--ki-primary);
  color: #fff;
}

.ki-check__chip-remove {
  background: none;
  border: none;
  color: inherit;
  cursor: pointer;
  padding: 0;
  font-size: 14px;
  line-height: 1;
  opacity: .8;
}

/* ── Schutzbedarf-Stufen ────────────────────────────────────────── */
.ki-check__leitfragen {
  background: var(--ki-bg);
  border: 1px solid var(--ki-border);
  border-radius: var(--ki-radius);
  padding: 14px 16px;
  margin-bottom: 20px;
}

.ki-check__leitfragen-title {
  font-size: 13px;
  font-weight: 600;
  margin: 0 0 8px;
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.ki-check__toggle-link {
  background: none;
  border: none;
  color: var(--ki-primary);
  font-size: 12px;
  cursor: pointer;
  text-decoration: underline;
}

.ki-check__leitfragen-list {
  margin: 0;
  padding-left: 18px;
  font-size: 13px;
  color: var(--ki-text-muted);
}

.ki-check__leitfrage { margin-bottom: 5px; }

.ki-check__stufen-group {
  display: flex;
  gap: 10px;
  margin-bottom: 16px;
  flex-wrap: wrap;
}

.ki-check__radio-hidden { display: none; }

.ki-check__stufe-label {
  flex: 1;
  min-width: 130px;
  display: flex;
  flex-direction: column;
  padding: 12px 14px;
  border: 2px solid var(--ki-border);
  border-radius: var(--ki-radius);
  cursor: pointer;
  transition: border-color .15s, background .15s;
}

.ki-check__stufe-label--selected.ki-check__stufe--gruen {
  border-color: #059669;
  background: #ecfdf5;
}

.ki-check__stufe-label--selected.ki-check__stufe--gelb {
  border-color: #d97706;
  background: #fffbeb;
}

.ki-check__stufe-label--selected.ki-check__stufe--rot {
  border-color: #dc2626;
  background: #fef2f2;
}

.ki-check__stufe-name {
  font-weight: 600;
  font-size: 14px;
}

.ki-check__stufe--gruen .ki-check__stufe-name { color: #065f46; }
.ki-check__stufe--gelb  .ki-check__stufe-name { color: #92400e; }
.ki-check__stufe--rot   .ki-check__stufe-name { color: #991b1b; }

.ki-check__stufe-erklaerung {
  font-size: 11px;
  margin-top: 4px;
  color: var(--ki-text-muted);
}

.ki-check__erklaerung {
  border-radius: var(--ki-radius);
  padding: 10px 14px;
  font-size: 13px;
  margin-bottom: 16px;
}

.ki-check__erklaerung--gruen { background: #ecfdf5; border-left: 4px solid #059669; }
.ki-check__erklaerung--gelb  { background: #fffbeb; border-left: 4px solid #d97706; }
.ki-check__erklaerung--rot   { background: #fef2f2; border-left: 4px solid #dc2626; }

/* ── Ampel ──────────────────────────────────────────────────────── */
.ki-check__ampel-list {
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.ki-check__ampel-card {
  border: 1px solid var(--ki-border);
  border-radius: var(--ki-radius);
  overflow: hidden;
}

.ki-check__ampel--rot   { border-left: 4px solid #dc2626; }
.ki-check__ampel--gelb  { border-left: 4px solid #d97706; }
.ki-check__ampel--gruen { border-left: 4px solid #059669; }

.ki-check__ampel-header {
  width: 100%;
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 12px 14px;
  background: #fff;
  border: none;
  cursor: pointer;
  text-align: left;
  font-family: inherit;
}

.ki-check__ampel-header:hover { background: var(--ki-bg); }

.ki-check__ampel-icon   { font-size: 16px; flex-shrink: 0; }
.ki-check__ampel-chevron { margin-left: auto; font-size: 11px; color: var(--ki-text-muted); }

.ki-check__ampel-titel {
  display: flex;
  flex-direction: column;
  gap: 1px;
  font-size: 14px;
}

.ki-check__ampel-kategorie {
  font-size: 11px;
  color: var(--ki-text-muted);
  font-weight: normal;
}

.ki-check__ampel-badge {
  font-size: 11px;
  font-weight: 600;
  padding: 2px 8px;
  border-radius: 999px;
  background: var(--ki-bg);
  border: 1px solid var(--ki-border);
  white-space: nowrap;
}

.ki-check__ampel-body {
  padding: 12px 14px 14px;
  background: var(--ki-bg);
  border-top: 1px solid var(--ki-border);
  font-size: 13px;
}

.ki-check__ampel-text   { margin: 0 0 10px; }

.ki-check__massnahmen {
  margin-top: 8px;
  font-size: 12px;
}

.ki-check__massnahmen ul {
  margin: 4px 0 0;
  padding-left: 18px;
}

.ki-check__massnahmen li { margin-bottom: 3px; }

/* ── Ergebnis ───────────────────────────────────────────────────── */
.ki-check__result-section {
  margin-bottom: 24px;
  padding-bottom: 20px;
  border-bottom: 1px solid var(--ki-border);
}

.ki-check__result-section:last-of-type { border-bottom: none; }

.ki-check__result-section h3 {
  font-size: 15px;
  font-weight: 700;
  margin: 0 0 12px;
}

.ki-check__result-meta-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 6px 16px;
  font-size: 13px;
}

.ki-check__meta-label {
  font-weight: 600;
  display: block;
  font-size: 11px;
  text-transform: uppercase;
  letter-spacing: .04em;
  color: var(--ki-text-muted);
}

.ki-check__prozess-quote {
  margin: 12px 0 0;
  padding: 10px 14px;
  border-left: 3px solid var(--ki-border);
  color: var(--ki-text-muted);
  font-style: italic;
  font-size: 13px;
}

.ki-check__cia-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 13px;
}

.ki-check__cia-table th,
.ki-check__cia-table td {
  padding: 8px 10px;
  text-align: left;
  border-bottom: 1px solid var(--ki-border);
}

.ki-check__cia-table th {
  background: var(--ki-bg);
  font-weight: 600;
  font-size: 12px;
  text-transform: uppercase;
  letter-spacing: .04em;
}

.ki-check__cia-badge {
  display: inline-block;
  padding: 2px 10px;
  border-radius: 999px;
  color: #fff;
  font-size: 12px;
  font-weight: 600;
}

.ki-check__cia-badge--gesamt {
  font-size: 13px;
  padding: 3px 12px;
}

.ki-check__gesamt-hinweis {
  font-size: 11px;
  color: var(--ki-text-muted);
  margin-left: 8px;
}

.ki-check__empfehlung-badge {
  border: 2px solid var(--ki-border);
  border-radius: var(--ki-radius);
  overflow: hidden;
}

.ki-check__empfehlung-label {
  display: block;
  padding: 4px 14px;
  font-size: 11px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: .06em;
  color: #fff;
}

.ki-check__empfehlung-titel {
  font-size: 16px;
  font-weight: 700;
  padding: 12px 14px 4px;
  margin: 0;
}

.ki-check__empfehlung-text {
  padding: 0 14px 12px;
  font-size: 13px;
  color: var(--ki-text-muted);
  margin: 0;
}

.ki-check__naechster-schritt {
  background: var(--ki-bg);
  border-top: 1px solid var(--ki-border);
  padding: 10px 14px;
  font-size: 13px;
}

.ki-check__naechster-schritt strong { display: block; margin-bottom: 3px; }
.ki-check__naechster-schritt p      { margin: 0; }

.ki-check__sales-box {
  background: #fffbeb;
  border: 1px solid #fcd34d;
  border-radius: var(--ki-radius);
  padding: 14px;
  margin-top: 12px;
  font-size: 13px;
}

.ki-check__sales-box h4 {
  margin: 0 0 6px;
  font-size: 13px;
  font-weight: 700;
  color: #92400e;
}

.ki-check__result-actions {
  display: flex;
  gap: 10px;
  flex-wrap: wrap;
  margin: 20px 0 12px;
}

.ki-check__save-success {
  display: flex;
  align-items: center;
  color: var(--ki-success);
  font-size: 14px;
  font-weight: 600;
}

.ki-check__result-disclaimer {
  font-size: 11px;
  color: var(--ki-text-muted);
  border-top: 1px solid var(--ki-border);
  padding-top: 12px;
  margin-top: 4px;
}

/* ── Buttons ────────────────────────────────────────────────────── */
.ki-check__button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 9px 18px;
  border-radius: var(--ki-radius);
  font-size: 14px;
  font-weight: 600;
  font-family: inherit;
  cursor: pointer;
  border: none;
  transition: background .15s, opacity .15s;
  text-decoration: none;
}

.ki-check__button:disabled { opacity: .5; cursor: default; }

.ki-check__button--primary {
  background: var(--ki-primary);
  color: #fff;
}

.ki-check__button--primary:hover:not(:disabled) { background: var(--ki-primary-dark); }

.ki-check__button--secondary {
  background: var(--ki-bg);
  color: var(--ki-text);
  border: 1px solid var(--ki-border);
}

.ki-check__button--secondary:hover:not(:disabled) { background: #e5e7eb; }

.ki-check__button--ghost {
  background: transparent;
  color: var(--ki-text-muted);
  border: 1px solid var(--ki-border);
}

.ki-check__button--ghost:hover:not(:disabled) { background: var(--ki-bg); }

/* ── Navigation ─────────────────────────────────────────────────── */
.ki-check__nav {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-top: 24px;
  padding-top: 16px;
  border-top: 1px solid var(--ki-border);
}

/* ── Access Gate ────────────────────────────────────────────────── */
.ki-check__access-gate {
  max-width: 420px;
  margin: 0 auto;
  text-align: center;
  background: #fff;
  border: 1px solid var(--ki-border);
  border-radius: var(--ki-radius);
  padding: 36px 32px;
  box-shadow: var(--ki-shadow);
}

.ki-check__title    { font-size: 24px; font-weight: 700; margin: 0 0 4px; }
.ki-check__subtitle { color: var(--ki-text-muted); font-size: 14px; margin: 0 0 24px; }

.ki-check__access-form {
  display: flex;
  flex-direction: column;
  gap: 10px;
  text-align: left;
}

.ki-check__access-hint {
  font-size: 12px;
  color: var(--ki-text-muted);
  margin-top: 12px;
}

/* ── Feedback ───────────────────────────────────────────────────── */
.ki-check__error {
  color: var(--ki-danger);
  font-size: 13px;
  margin: 4px 0 0;
}

/* ── Loading ────────────────────────────────────────────────────── */
.ki-check__loading {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  min-height: 200px;
  gap: 12px;
  color: var(--ki-text-muted);
}

.ki-check__spinner {
  width: 32px;
  height: 32px;
  border: 3px solid var(--ki-border);
  border-top-color: var(--ki-primary);
  border-radius: 50%;
  animation: ki-spin .7s linear infinite;
}

@keyframes ki-spin { to { transform: rotate(360deg); } }

/* ── Responsive ─────────────────────────────────────────────────── */
@media (max-width: 540px) {
  .ki-check__step           { padding: 20px 14px; }
  .ki-check__stufen-group   { flex-direction: column; }
  .ki-check__result-meta-grid { grid-template-columns: 1fr; }
  .ki-check__result-actions { flex-direction: column; }
  .ki-check__progress-label { display: none; }
}

