/* ═══════════════════════════════════════════════════════════
   AGENCY TOOL – BASE STYLES  v2
   Theme-agnostische Basisstile.
   Farben, Radien, Fonts kommen aus den Theme-Dateien.

   Änderungen v2:
    • .card Klasse ergänzt (fehlte, wurde in S2 benutzt)
    • .nav-dot.done: cursor:pointer + Hover-State (Affordanz)
    • .graph-wrap: touch-action:pan-y statt none (scroll bleibt),
      cursor:default (kein falsches crosshair mehr)
    • details > summary: Symbol per CSS (::before), dreht sich beim Öffnen
═══════════════════════════════════════════════════════════ */

/* ── Reset ─────────────────────────────────────────────────── */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
html, body {
  background: var(--bg);
  font-family: var(--font-body);
  color: var(--text);
  min-height: 100vh;
  -webkit-text-size-adjust: 100%;
  overscroll-behavior: none;
  transition: background 0.3s, color 0.3s;
}

/* ── Layout ─────────────────────────────────────────────────── */
.app {
  max-width: 430px;
  margin: 0 auto;
  padding: 0 16px 100px;
}

/* ── Card ────────────────────────────────────────────────────
   Allgemeine Card-Klasse (z. B. für Slider-Container in S2).
─────────────────────────────────────────────────────────── */
.card {
  background: var(--card);
  border: 1.5px solid var(--border);
  border-radius: var(--radius);
  padding: 16px;
  box-shadow: var(--card-shadow);
  margin-bottom: 14px;
}

/* ── Theme Switcher ─────────────────────────────────────────── */
.theme-toggle {
  position: fixed;
  top: 14px; right: 16px;
  z-index: 200;
  width: 42px; height: 42px;
  border-radius: var(--radius-sm);
  border: 1.5px solid var(--border);
  background: var(--card);
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 18px;
  box-shadow: var(--card-shadow);
  transition: transform 0.15s;
}
.theme-toggle:active { transform: scale(0.9); }

.theme-panel {
  position: fixed;
  top: 64px; right: 16px;
  z-index: 200;
  background: var(--card);
  border: 1.5px solid var(--border);
  border-radius: var(--radius);
  padding: 12px;
  width: 195px;
  box-shadow: var(--card-shadow);
  display: none;
}
.theme-panel.open { display: block; }
.theme-panel-label {
  font-size: 11px;
  font-family: var(--font-label);
  color: var(--text-hint);
  text-transform: uppercase;
  letter-spacing: 0.1em;
  margin-bottom: 8px;
}
.theme-opt {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 9px 10px;
  border-radius: var(--radius-sm);
  cursor: pointer;
  font-size: 13px;
  color: var(--text);
  border: 1.5px solid transparent;
  transition: all 0.15s;
}
.theme-opt:hover { background: var(--card2); }
.theme-opt.active { border-color: var(--accent); background: var(--accent-bg); color: var(--accent); }
.theme-swatch {
  width: 22px; height: 22px;
  border-radius: 6px;
  flex-shrink: 0;
  border: 1.5px solid rgba(0,0,0,0.1);
}

/* ── Progress Nav ───────────────────────────────────────────── */
.nav-wrap {
  padding: 20px 0 0;
  display: flex;
  align-items: center;
  gap: 5px;
  margin-bottom: 5px;
}
.nav-dot {
  flex: 1; height: 3px;
  border-radius: 2px;
  background: var(--border);
  cursor: default;
  transition: background 0.2s, opacity 0.15s;
}
.nav-dot.active { background: var(--text); }
/* done-Dots sind klickbar – Cursor und Hover-Feedback hinzugefügt */
.nav-dot.done {
  background: var(--accent);
  cursor: pointer;
}
.nav-dot.done:hover { opacity: 0.65; }

.nav-label {
  font-size: 10px;
  font-family: var(--font-label);
  color: var(--text-hint);
  text-transform: uppercase;
  letter-spacing: 0.12em;
  margin-bottom: 14px;
}

/* ── Summary Strip ──────────────────────────────────────────── */
.summary-strip {
  display: flex;
  flex-wrap: wrap;
  gap: 5px;
  margin-bottom: 14px;
}
.sum-pill {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  padding: 4px 10px;
  border-radius: 20px;
  border: 1px solid var(--border);
  background: var(--card2);
  font-size: 11px;
  color: var(--text-muted);
}

/* ── Typography ─────────────────────────────────────────────── */
.eyebrow {
  font-size: 11px;
  text-transform: uppercase;
  letter-spacing: 0.13em;
  color: var(--text-hint);
  font-family: var(--font-label);
  margin: 0 0 5px;
}
.page-title {
  font-size: 22px;
  font-weight: 700;
  font-family: var(--font-display);
  color: var(--text);
  margin: 0 0 5px;
  line-height: 1.2;
}
.page-desc {
  font-size: 14px;
  color: var(--text-muted);
  line-height: 1.55;
  margin: 0 0 18px;
}
.section-label {
  font-size: 11px;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.1em;
  color: var(--text-hint);
  font-family: var(--font-label);
  margin: 0 0 8px;
}

/* ── Selectable Row ─────────────────────────────────────────── */
.row {
  display: flex;
  align-items: flex-start;
  gap: 11px;
  padding: 12px 14px;
  border-radius: var(--radius-sm);
  border: 1.5px solid var(--border);
  background: var(--card);
  cursor: pointer;
  margin-bottom: 7px;
  transition: all 0.15s;
  -webkit-tap-highlight-color: transparent;
  box-shadow: var(--card-shadow);
}
.row:active { opacity: 0.8; }
.row-dot { width: 12px; height: 12px; border-radius: 50%; flex-shrink: 0; margin-top: 2px; }
.row-title { font-size: 14px; font-weight: 600; color: var(--text); }
.row-sub { font-size: 12px; color: var(--text-muted); margin-top: 2px; line-height: 1.35; }

.row.sel-green  { background: var(--accent-bg);  border-color: var(--accent-border);  }
.row.sel-yellow { background: var(--warn-bg);    border-color: var(--warn-border);    }
.row.sel-red    { background: var(--danger-bg);  border-color: var(--danger-border);  }
.row.sel-purple { background: var(--purple-bg);  border-color: var(--purple-border);  }
.row.sel-neutral{ background: var(--neutral-bg); border-color: var(--neutral-border); }
.row.sel-green  .row-title { color: var(--accent);   }
.row.sel-yellow .row-title { color: var(--warn);     }
.row.sel-red    .row-title { color: var(--danger);   }
.row.sel-purple .row-title { color: var(--purple);   }
.row.sel-green  .row-sub   { color: var(--accent);   opacity: .8; }
.row.sel-yellow .row-sub   { color: var(--warn);     opacity: .8; }
.row.sel-red    .row-sub   { color: var(--danger);   opacity: .8; }

/* ── Checkboxen ─────────────────────────────────────────────── */
.chk-list {
  background: var(--card);
  border: 1.5px solid var(--border);
  border-radius: var(--radius);
  overflow: hidden;
  box-shadow: var(--card-shadow);
  margin-bottom: 8px;
}
.chk-item {
  display: flex;
  align-items: flex-start;
  gap: 11px;
  padding: 12px 14px;
  border-bottom: 1px solid var(--border-light);
  cursor: pointer;
  -webkit-tap-highlight-color: transparent;
  transition: background 0.1s;
}
.chk-item:last-child { border-bottom: none; }
.chk-item:active { background: var(--card2); }
.chk-box {
  width: 20px; height: 20px;
  border-radius: var(--radius-xs);
  border: 1.5px solid var(--border);
  flex-shrink: 0;
  margin-top: 1px;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: all 0.15s;
}
.chk-text { font-size: 13px; line-height: 1.45; flex: 1; }
.tip-btn {
  width: 18px; height: 18px;
  border-radius: 50%;
  border: 1px solid var(--border);
  background: var(--card2);
  font-size: 10px;
  cursor: pointer;
  flex-shrink: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--text-hint);
  font-family: var(--font-body);
  transition: all 0.15s;
}
.tip-btn:active { background: var(--border); }
.tip-box {
  margin: -2px 14px 8px 43px;
  padding: 8px 10px;
  border-radius: var(--radius-xs);
  background: var(--card2);
  border: 1px solid var(--border-light);
  font-size: 12px;
  color: var(--text-muted);
  line-height: 1.4;
}
.dim-header {
  padding: 6px 14px;
  font-size: 10px;
  font-family: var(--font-label);
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: var(--text-hint);
  background: var(--card2);
  border-bottom: 1px solid var(--border-light);
}

/* ── Signal-Kacheln ─────────────────────────────────────────── */
.sig-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0,1fr));
  gap: 7px;
  margin-bottom: 14px;
}
.sig-tile {
  padding: 10px 11px;
  border-radius: var(--radius-sm);
  border: 1.5px solid var(--border);
  font-size: 13px;
  cursor: pointer;
  display: flex;
  align-items: center;
  gap: 8px;
  background: var(--card);
  color: var(--text);
  transition: all 0.15s;
  -webkit-tap-highlight-color: transparent;
  box-shadow: var(--card-shadow);
}
.sig-tile.sel     { background: var(--accent-bg);  border-color: var(--accent-border); color: var(--accent); }
.sig-tile.custom  { background: var(--warn-bg);    border-color: var(--warn-border);   color: var(--warn); }
.sig-tile.add     { border-style: dashed; color: var(--text-hint); justify-content: center; background: transparent; box-shadow: none; }

/* ── Buttons ─────────────────────────────────────────────────── */
.btn-primary {
  width: 100%;
  padding: 16px;
  background: var(--text);
  color: var(--bg);
  border: none;
  border-radius: var(--btn-radius, var(--radius));
  font-size: 15px;
  font-weight: 600;
  font-family: var(--font-body);
  cursor: pointer;
  letter-spacing: 0.01em;
  transition: all 0.15s;
  -webkit-tap-highlight-color: transparent;
  box-shadow: var(--btn-shadow);
}
.btn-primary:disabled { opacity: 0.35; cursor: not-allowed; }
.btn-primary:not(:disabled):active { transform: scale(0.98); }
.btn-back {
  background: none;
  border: none;
  font-size: 13px;
  color: var(--text-muted);
  cursor: pointer;
  padding: 0 0 12px;
  font-family: var(--font-body);
  display: flex;
  align-items: center;
  gap: 5px;
}
.btn-secondary {
  padding: 9px 16px;
  border: 1.5px solid var(--border);
  border-radius: var(--radius-sm);
  background: var(--card);
  font-size: 13px;
  font-family: var(--font-body);
  color: var(--text-muted);
  cursor: pointer;
  transition: all 0.15s;
}

/* ── Zwei-Optionen-Grid ─────────────────────────────────────── */
.two-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; }
.two-btn {
  padding: 14px 10px;
  border-radius: var(--radius-sm);
  border: 1.5px solid var(--border);
  background: var(--card);
  text-align: center;
  cursor: pointer;
  transition: all 0.15s;
  box-shadow: var(--card-shadow);
  -webkit-tap-highlight-color: transparent;
}
.two-btn .t-icon  { font-size: 22px; margin-bottom: 6px; }
.two-btn .t-label { font-size: 13px; font-weight: 600; color: var(--text); }
.two-btn.sel-green  { background: var(--accent-bg);  border-color: var(--accent-border);  }
.two-btn.sel-green  .t-label { color: var(--accent); }
.two-btn.sel-red    { background: var(--danger-bg);  border-color: var(--danger-border);  }
.two-btn.sel-red    .t-label { color: var(--danger); }
.two-btn.sel-yellow { background: var(--warn-bg);    border-color: var(--warn-border);    }
.two-btn.sel-yellow .t-label { color: var(--warn);   }
.two-btn.sel-purple { background: var(--purple-bg);  border-color: var(--purple-border);  }
.two-btn.sel-purple .t-label { color: var(--purple); }

/* ── Agency-Graph ───────────────────────────────────────────── */
.graph-wrap {
  position: relative;
  border-radius: var(--radius);
  border: 1.5px solid var(--border);
  overflow: hidden;
  /* touch-action:pan-y erlaubt vertikales Scrollen über dem Graph –
     kein touch-action:none mehr (blockierte Scroll auf Mobile) */
  touch-action: pan-y;
  /* cursor:default – Graph ist nicht interaktiv, kein falsches crosshair */
  cursor: default;
  background: var(--card);
  aspect-ratio: 1;
  user-select: none;
  -webkit-user-select: none;
  margin-bottom: 10px;
  box-shadow: var(--card-shadow);
}
.graph-wrap svg { display: block; width: 100%; height: 100%; }

.zone-badge {
  display: flex;
  align-items: flex-start;
  gap: 10px;
  padding: 12px 14px;
  border-radius: var(--radius-sm);
  border: 1.5px solid var(--border);
  background: var(--card);
  margin-bottom: 10px;
  transition: all 0.3s;
  box-shadow: var(--card-shadow);
}
.zone-dot  { width: 10px; height: 10px; border-radius: 50%; flex-shrink: 0; margin-top: 3px; }
.zone-name { font-size: 14px; font-weight: 700; margin-bottom: 2px; }
.zone-desc { font-size: 12px; line-height: 1.4; opacity: 0.85; }

.detail-toggle {
  text-align: center;
  padding: 9px;
  border: 1px dashed var(--border);
  border-radius: var(--radius-sm);
  font-size: 12px;
  color: var(--text-muted);
  cursor: pointer;
  margin-bottom: 10px;
  font-family: var(--font-body);
}

/* ── Validierungs-Box ───────────────────────────────────────── */
.val-box {
  padding: 14px;
  border-radius: var(--radius-sm);
  background: var(--card2);
  border: 1.5px solid var(--border);
  margin-top: 10px;
  box-shadow: var(--card-shadow);
}
.val-box-q { font-size: 13px; font-weight: 600; color: var(--text); margin-bottom: 10px; }
.val-opt {
  padding: 10px 12px;
  border-radius: var(--radius-xs);
  border: 1.5px solid var(--border);
  cursor: pointer;
  font-size: 13px;
  color: var(--text);
  margin-bottom: 6px;
  background: var(--card);
  transition: all 0.15s;
}
.val-opt:last-child { margin-bottom: 0; }
.val-opt.sel { background: var(--warn-bg); border-color: var(--warn-border); color: var(--warn); }
.val-message {
  margin-top: 10px;
  padding: 10px 12px;
  border-radius: var(--radius-xs);
  background: var(--accent-bg);
  border: 1px solid var(--accent-border);
  font-size: 13px;
  font-style: italic;
  color: var(--accent);
  line-height: 1.5;
}

/* ── Result Badge ───────────────────────────────────────────── */
.result-badge {
  display: flex;
  align-items: flex-start;
  gap: 10px;
  padding: 13px 14px;
  border-radius: var(--radius-sm);
  border: 1.5px solid var(--border);
  margin-top: 12px;
  box-shadow: var(--card-shadow);
  transition: all 0.3s;
}
.result-badge .rb-icon  { font-size: 20px; flex-shrink: 0; }
.result-badge .rb-label { font-size: 14px; font-weight: 700; }

/* ── Mini Matrix ────────────────────────────────────────────── */
.mini-matrix {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 5px;
  height: 90px;
  margin-bottom: 14px;
}
.mm-cell {
  border-radius: var(--radius-xs);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 11px;
  font-weight: 600;
  color: var(--text-hint);
  border: 1.5px solid var(--border);
  background: var(--card);
  text-align: center;
  transition: all 0.3s;
}
.mm-cell.active { font-weight: 700; }

/* ── Szenario-Box ───────────────────────────────────────────── */
.scen-box {
  padding: 14px;
  border-radius: var(--radius-sm);
  margin-bottom: 12px;
  border: 1.5px solid var(--border);
  box-shadow: var(--card-shadow);
}
.scen-badge {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  font-size: 10px;
  font-family: var(--font-label);
  text-transform: uppercase;
  letter-spacing: 0.1em;
  padding: 3px 10px;
  border-radius: 20px;
  margin-bottom: 10px;
}
.scen-title { font-size: 15px; font-weight: 700; margin-bottom: 3px; }
.scen-desc  { font-size: 13px; line-height: 1.45; opacity: 0.85; }

/* ── Action Cards ───────────────────────────────────────────── */
.action-card {
  display: flex;
  gap: 10px;
  align-items: flex-start;
  padding: 12px 14px;
  border-radius: var(--radius-xs);
  border: 1.5px solid var(--border);
  background: var(--card);
  margin-bottom: 7px;
  box-shadow: var(--card-shadow);
}
.ac-num  { font-size: 11px; font-weight: 700; color: var(--text-hint); flex-shrink: 0; width: 15px; margin-top: 2px; }
.ac-text { font-size: 13px; line-height: 1.5; }

/* ── Onboarding ─────────────────────────────────────────────── */
.ob-step {
  display: flex;
  gap: 13px;
  align-items: flex-start;
  padding: 14px;
  border-radius: var(--radius-sm);
  border: 1.5px solid var(--border);
  background: var(--card);
  margin-bottom: 8px;
  box-shadow: var(--card-shadow);
}
.ob-num {
  width: 30px; height: 30px;
  border-radius: 50%;
  background: var(--text);
  color: var(--bg);
  font-size: 13px;
  font-weight: 700;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  font-family: var(--font-label);
}
.ob-title { font-size: 14px; font-weight: 700; margin-bottom: 3px; }
.ob-desc  { font-size: 12px; color: var(--text-muted); line-height: 1.4; }

/* ── Info Boxes ─────────────────────────────────────────────── */
.info-box {
  padding: 11px 13px;
  border-radius: var(--radius-sm);
  font-size: 12px;
  line-height: 1.5;
  margin-top: 8px;
}
.info-box.warn { background: var(--warn-bg); border: 1px solid var(--warn-border); color: var(--warn); }
.info-box.note { background: var(--card2); border: 1px solid var(--border); color: var(--text-muted); }

/* ── Add Input ──────────────────────────────────────────────── */
.add-input {
  width: 100%;
  padding: 10px 12px;
  border-radius: var(--radius-sm);
  border: 1.5px solid var(--border);
  font-size: 14px;
  font-family: var(--font-body);
  color: var(--text);
  background: var(--card);
  margin-top: 6px;
}
.add-input:focus { outline: none; border-color: var(--accent); }

/* ── Details / Summary ──────────────────────────────────────────
   Symbol wird per CSS generiert – kein hartkodiertes ▶ im HTML nötig.
   Öffnen → Symbol wechselt zu ▼.
─────────────────────────────────────────────────────────── */
details > summary {
  font-size: 12px;
  color: var(--text-muted);
  cursor: pointer;
  padding: 8px 0;
  font-family: var(--font-label);
  text-transform: uppercase;
  letter-spacing: 0.08em;
  list-style: none;
  display: flex;
  align-items: center;
  gap: 5px;
}
details > summary::-webkit-details-marker { display: none; }
details > summary::before {
  content: '▶';
  font-size: 9px;
  display: inline-block;
  transition: transform 0.2s;
  color: var(--text-hint);
}
details[open] > summary::before {
  transform: rotate(90deg);
}

/* ── Utilities ──────────────────────────────────────────────── */
.mt8  { margin-top: 8px; }
.mt12 { margin-top: 12px; }
.mt16 { margin-top: 16px; }
.mb8  { margin-bottom: 8px; }
.mb12 { margin-bottom: 12px; }
.separator { height: 1px; background: var(--border-light); margin: 14px 0; }
