/* =========================================================================
   WELCHER JOB PASST ZU MIR? – Stylesheet
   Mobile-first · keine externen Abhängigkeiten · Druck-Layout für den Report
   ========================================================================= */

:root {
  --brand: #4338ca;
  --brand-dark: #3730a3;
  --brand-light: #eef2ff;
  --ink: #1c1e26;
  --ink-2: #4b4f5e;
  --muted: #767b8c;
  --surface: #f7f7fa;
  --card: #ffffff;
  --line: #e4e6ee;
  --rot: #d64545;
  --gelb: #e1a10e;
  --gruen: #3f9c5d;
  --blau: #3e6fd6;
  --radius: 14px;
  --shadow: 0 1px 2px rgba(28, 30, 38, 0.06), 0 8px 24px rgba(28, 30, 38, 0.07);
}

* { margin: 0; padding: 0; box-sizing: border-box; }

html { scroll-behavior: smooth; }

body {
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
  color: var(--ink);
  background: var(--surface);
  line-height: 1.65;
  -webkit-font-smoothing: antialiased;
}

img { max-width: 100%; }

.container { max-width: 980px; margin: 0 auto; padding: 0 20px; }
.container-narrow { max-width: 760px; margin: 0 auto; padding: 0 20px; }

/* ---------------- Header ---------------- */

.site-header {
  background: #fff;
  border-bottom: 1px solid var(--line);
  position: sticky;
  top: 0;
  z-index: 10;
}

.site-header .container {
  display: flex;
  align-items: center;
  justify-content: space-between;
  min-height: 60px;
  gap: 12px;
}

.logo {
  display: flex;
  align-items: center;
  gap: 10px;
  font-weight: 800;
  font-size: 1.05rem;
  color: var(--ink);
  text-decoration: none;
  letter-spacing: -0.01em;
}

.logo-mark {
  width: 26px;
  height: 26px;
  border-radius: 50%;
  flex: none;
  background: conic-gradient(var(--rot) 0 25%, var(--gelb) 0 50%, var(--gruen) 0 75%, var(--blau) 0 100%);
}

/* ---------------- Buttons ---------------- */

.btn {
  display: inline-block;
  padding: 12px 24px;
  border-radius: 999px;
  border: 0;
  font-size: 1rem;
  font-weight: 700;
  font-family: inherit;
  text-decoration: none;
  text-align: center;
  cursor: pointer;
  transition: transform 0.12s ease, box-shadow 0.12s ease, background 0.12s ease;
}

.btn-primary {
  background: var(--brand);
  color: #fff;
  box-shadow: 0 6px 18px rgba(67, 56, 202, 0.35);
}

.btn-primary:hover { background: var(--brand-dark); transform: translateY(-1px); }

.btn-big { padding: 16px 34px; font-size: 1.12rem; }

.btn-ghost {
  background: transparent;
  color: var(--ink-2);
  border: 1.5px solid var(--line);
}

.btn-ghost:hover { border-color: var(--muted); color: var(--ink); }

/* ---------------- Hero (Landingpage) ---------------- */

.hero {
  background:
    radial-gradient(1000px 460px at 85% -10%, rgba(225, 161, 14, 0.12), transparent 60%),
    radial-gradient(900px 500px at 0% 110%, rgba(62, 111, 214, 0.12), transparent 60%),
    linear-gradient(180deg, #fff 0%, var(--surface) 100%);
  padding: 68px 0 60px;
  text-align: center;
}

.hero h1 {
  font-size: clamp(2rem, 5.5vw, 3.2rem);
  line-height: 1.12;
  letter-spacing: -0.025em;
  font-weight: 850;
  max-width: 21ch;
  margin: 0 auto 18px;
}

.hero h1 .accent { color: var(--brand); }

.hero .sub {
  font-size: clamp(1.05rem, 2.5vw, 1.25rem);
  color: var(--ink-2);
  max-width: 56ch;
  margin: 0 auto 30px;
}

.trust-row {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 10px 26px;
  margin-top: 26px;
  color: var(--ink-2);
  font-size: 0.95rem;
  font-weight: 600;
}

.trust-row span::before { content: "✓ "; color: var(--gruen); font-weight: 800; }

/* ---------------- Sektionen (Landingpage) ---------------- */

.section { padding: 56px 0; }
.section.alt { background: #fff; }

.section h2 {
  font-size: clamp(1.5rem, 3.5vw, 2rem);
  letter-spacing: -0.02em;
  text-align: center;
  margin-bottom: 12px;
}

.section .section-sub {
  text-align: center;
  color: var(--ink-2);
  max-width: 60ch;
  margin: 0 auto 36px;
}

.steps {
  display: grid;
  gap: 18px;
  grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
}

.step {
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 26px 22px;
  box-shadow: var(--shadow);
}

.step .step-num {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 34px;
  height: 34px;
  border-radius: 50%;
  background: var(--brand-light);
  color: var(--brand);
  font-weight: 800;
  margin-bottom: 12px;
}

.step h3 { margin-bottom: 6px; font-size: 1.08rem; }
.step p { color: var(--ink-2); font-size: 0.97rem; }

.color-grid {
  display: grid;
  gap: 18px;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  margin: 26px 0;
}

.color-card {
  background: var(--card);
  border: 1px solid var(--line);
  border-top: 4px solid var(--cc, var(--brand));
  border-radius: var(--radius);
  padding: 20px;
  box-shadow: var(--shadow);
}

.color-card h3 { margin-bottom: 2px; }
.color-card .small { color: var(--muted); margin-bottom: 8px; }
.color-card p { font-size: 0.95rem; color: var(--ink-2); }

.faq details {
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 16px 20px;
  margin-bottom: 12px;
}

.faq summary { font-weight: 700; cursor: pointer; }
.faq details p { margin-top: 10px; color: var(--ink-2); }

.cta-final {
  text-align: center;
  padding: 64px 0;
  background: linear-gradient(135deg, var(--brand) 0%, var(--brand-dark) 100%);
  color: #fff;
}

.cta-final h2 { color: #fff; font-size: clamp(1.5rem, 3.5vw, 2.1rem); margin-bottom: 10px; letter-spacing: -0.02em; }
.cta-final p { opacity: 0.9; margin-bottom: 26px; }
.cta-final .btn-primary { background: #fff; color: var(--brand); box-shadow: 0 8px 22px rgba(0, 0, 0, 0.25); }
.cta-final .btn-primary:hover { background: var(--brand-light); }

/* ---------------- Footer ---------------- */

.site-footer {
  padding: 34px 0 44px;
  color: var(--muted);
  font-size: 0.88rem;
  text-align: center;
}

.site-footer a { color: var(--muted); }
.site-footer .footer-links { margin-bottom: 10px; display: flex; gap: 18px; justify-content: center; flex-wrap: wrap; }

/* ---------------- Karten (allgemein) ---------------- */

.card {
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  padding: 30px 28px;
  margin: 22px 0;
}

.card h1 { font-size: clamp(1.6rem, 4vw, 2.2rem); letter-spacing: -0.02em; margin-bottom: 8px; }
.card h2 { font-size: 1.35rem; letter-spacing: -0.01em; margin-bottom: 10px; }
.card p { margin-bottom: 12px; }

.center { text-align: center; }
.small { font-size: 0.9rem; }
.muted { color: var(--muted); }

.overline {
  text-transform: uppercase;
  letter-spacing: 0.14em;
  font-size: 0.78rem;
  font-weight: 800;
  color: var(--brand);
  margin-bottom: 8px;
}

/* ---------------- Test-Seite ---------------- */

.progress-wrap {
  position: sticky;
  top: 60px;
  z-index: 9;
  background: var(--surface);
  padding: 14px 0 10px;
}

.progress-track {
  height: 8px;
  border-radius: 999px;
  background: var(--line);
  overflow: hidden;
}

.progress-fill {
  height: 100%;
  width: 0;
  border-radius: 999px;
  background: linear-gradient(90deg, var(--brand) 0%, var(--blau) 100%);
  transition: width 0.3s ease;
}

.progress-text {
  font-size: 0.85rem;
  color: var(--muted);
  margin-top: 6px;
  text-align: center;
}

.question {
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--card);
  box-shadow: var(--shadow);
  padding: 22px 22px 18px;
  margin: 16px 0;
}

.question.unanswered { border-color: var(--rot); box-shadow: 0 0 0 3px rgba(214, 69, 69, 0.12); }

.question legend {
  /* legend fließt sonst außerhalb der Karte – float macht sie zum normalen Block */
  float: left;
  width: 100%;
  font-weight: 700;
  font-size: 1.02rem;
  padding: 0;
  line-height: 1.45;
}

.question .scale { clear: both; }

.q-num {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 26px;
  height: 26px;
  border-radius: 50%;
  background: var(--brand-light);
  color: var(--brand);
  font-size: 0.82rem;
  font-weight: 800;
  margin-right: 8px;
}

.scale {
  display: flex;
  justify-content: space-between;
  gap: 6px;
  margin-top: 16px;
}

.scale-opt {
  flex: 1;
  position: relative;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 8px;
  cursor: pointer;
  padding: 6px 2px;
  border-radius: 10px;
}

.scale-opt input { position: absolute; opacity: 0; pointer-events: none; }

.scale-opt .dot {
  width: 30px;
  height: 30px;
  border-radius: 50%;
  border: 2.5px solid var(--line);
  background: #fff;
  transition: all 0.15s ease;
}

.scale-opt:hover .dot { border-color: var(--brand); }
.scale-opt.selected .dot { background: var(--brand); border-color: var(--brand); box-shadow: 0 0 0 4px var(--brand-light); }

.scale-opt .dot-1, .scale-opt .dot-5 { width: 36px; height: 36px; }
.scale-opt .dot-2, .scale-opt .dot-4 { width: 32px; height: 32px; }

.scale-label {
  font-size: 0.72rem;
  color: var(--muted);
  text-align: center;
  line-height: 1.25;
  min-height: 2em;
}

/* ---------------- Sortier-Blöcke (Teil 2) ---------------- */

.rank-legend {
  display: inline-block;
  font-size: 0.8rem;
  color: var(--ink-2);
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: 999px;
  padding: 4px 14px;
  margin: 8px 0 14px;
}

.rank-list { display: grid; gap: 12px; }

.rank-card {
  display: flex;
  align-items: center;
  gap: 16px;
  width: 100%;
  text-align: left;
  font-family: inherit;
  font-size: 1rem;
  line-height: 1.5;
  color: var(--ink);
  background: #fff;
  border: 1.5px solid var(--line);
  border-radius: 14px;
  padding: 16px 18px;
  cursor: pointer;
  box-shadow: 0 1px 2px rgba(28, 30, 38, 0.05);
  transition: border-color 0.15s ease, background 0.15s ease,
              box-shadow 0.15s ease, transform 0.1s ease;
}

.rank-card:hover {
  border-color: var(--brand);
  box-shadow: 0 4px 14px rgba(67, 56, 202, 0.12);
  transform: translateY(-1px);
}
.rank-card:active { transform: scale(0.985); }

.rank-card .rank-num {
  flex: none;
  width: 34px;
  height: 34px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border-radius: 50%;
  border: 2px dashed #c9cddb;
  font-weight: 800;
  font-size: 1rem;
  color: #fff;
  transition: background 0.15s ease, border-color 0.15s ease;
}

.rank-card.ranked {
  background: var(--brand-light);
  border-color: var(--brand);
  box-shadow: 0 2px 10px rgba(67, 56, 202, 0.14);
}

.rank-card.ranked .rank-num {
  border: 0;
  background: var(--brand);
}

.rank-card.rank-auto { opacity: 0.92; }
.rank-card.rank-auto .rank-num { background: var(--muted); }

.quiz-nav {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 14px;
  margin: 26px 0 60px;
}

.page-hint { color: var(--rot); font-weight: 600; font-size: 0.95rem; text-align: center; margin-top: 10px; min-height: 1.4em; }

/* ---------------- Ergebnis & Report: Diagramm ---------------- */

.chart { margin: 18px 0 10px; display: grid; gap: 12px; }

.bar-row {
  display: grid;
  grid-template-columns: 110px 1fr 64px;
  align-items: center;
  gap: 12px;
}

.bar-name { font-size: 0.9rem; font-weight: 700; color: var(--ink-2); }

.bar-track {
  display: block;
  height: 14px;
  background: var(--surface);
  border-radius: 7px;
  overflow: hidden;
}

.bar-fill {
  display: block;
  height: 100%;
  border-radius: 0 7px 7px 0;
  min-width: 6px;
}

.bar-value { font-size: 0.9rem; font-weight: 800; text-align: right; font-variant-numeric: tabular-nums; }

.result-hero {
  border-top: 6px solid var(--type-color, var(--brand));
  text-align: center;
  padding-top: 36px;
}

.result-hero .subtitle { color: var(--muted); font-weight: 600; margin-bottom: 14px; }
.result-hero .lead { font-size: 1.08rem; max-width: 58ch; margin: 0 auto; }

/* ---------------- Job-Listen ---------------- */

.job-list { list-style: none; display: grid; gap: 10px; margin: 16px 0; }

.job-card {
  display: flex;
  align-items: center;
  gap: 14px;
  border: 1px solid var(--line);
  border-radius: 12px;
  padding: 12px 16px;
  background: #fff;
}

.job-rank {
  flex: none;
  width: 30px;
  height: 30px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border-radius: 50%;
  background: var(--brand-light);
  color: var(--brand);
  font-weight: 800;
  font-size: 0.85rem;
}

.job-info { flex: 1; min-width: 0; display: flex; flex-direction: column; line-height: 1.35; }
.job-info small { color: var(--muted); }

.job-why {
  font-size: 0.85rem;
  color: var(--ink-2);
  margin-top: 6px;
  padding-top: 6px;
  border-top: 1px dashed var(--line);
}

.job-card-why { align-items: flex-start; }
.job-card-why .job-rank, .job-card-why .job-match { margin-top: 2px; }

.job-match {
  flex: none;
  font-weight: 800;
  font-size: 0.88rem;
  color: var(--brand);
  background: var(--brand-light);
  border-radius: 999px;
  padding: 5px 12px;
  font-variant-numeric: tabular-nums;
}

/* ---------------- Listen-Varianten ---------------- */

.check-list, .arrow-list, .dot-list, .cross-list { list-style: none; margin: 12px 0 18px; display: grid; gap: 9px; }

.check-list li::before { content: "✓"; color: var(--gruen); font-weight: 800; margin-right: 10px; }
.cross-list li::before { content: "✕"; color: var(--rot); font-weight: 800; margin-right: 10px; }
.arrow-list li::before { content: "→"; color: var(--brand); font-weight: 800; margin-right: 10px; }
.dot-list li::before { content: "•"; color: var(--brand); font-weight: 800; margin-right: 10px; }

.tip-list { margin: 14px 0 14px 20px; display: grid; gap: 12px; }

/* ---------------- Upsell ---------------- */

.upsell {
  border: 2px solid var(--brand);
  background: linear-gradient(180deg, #fff 0%, var(--brand-light) 130%);
}

.upsell .btn { margin-top: 8px; }

.disclaimer {
  font-size: 0.82rem;
  color: var(--muted);
  max-width: 70ch;
  margin: 26px auto;
  text-align: center;
}

/* ---------------- Report (Detail-Auswertung) ---------------- */

.report-toolbar {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 12px;
  flex-wrap: wrap;
  margin: 22px 0 6px;
}

.report-page {
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  padding: 40px 38px;
  margin: 22px 0;
}

.report-page h2 {
  font-size: 1.45rem;
  letter-spacing: -0.015em;
  margin: 22px 0 10px;
  padding-bottom: 8px;
  border-bottom: 2px solid var(--line);
}

.report-page h2:first-child { margin-top: 0; }
.report-page h3 { margin: 18px 0 8px; font-size: 1.08rem; }
.report-page p { margin-bottom: 12px; }

.report-page.cover {
  text-align: center;
  border-top: 8px solid var(--type-color, var(--brand));
  padding: 56px 38px;
}

.report-page.cover h1 { font-size: clamp(1.9rem, 5vw, 2.7rem); letter-spacing: -0.02em; margin-bottom: 6px; }
.report-page.cover .subtitle { color: var(--muted); font-weight: 600; margin-bottom: 26px; }
.report-page.cover .lead { font-size: 1.06rem; max-width: 56ch; margin: 22px auto 18px; }

.cover-chart { max-width: 520px; margin: 0 auto; text-align: left; }

.band-block { margin: 18px 0; }
.band-block h3 { display: flex; align-items: center; gap: 10px; }

.swatch { width: 16px; height: 16px; border-radius: 5px; display: inline-block; flex: none; }

.report-footer { margin-top: 30px; border-top: 1px solid var(--line); padding-top: 8px; }

/* ---------------- Anti-Jobs (passt eher nicht) ---------------- */

.anti-title { margin: 22px 0 4px; font-size: 1.08rem; }

.job-card-anti { background: #fbf7f7; border-color: #ecdcdc; }
.job-card-anti .job-rank { background: #f3e4e4; color: #a34040; }

.job-match-anti { background: #f3e4e4; color: #a34040; }

/* ---------------- E-Mail-Modal ---------------- */

.modal-overlay {
  position: fixed;
  inset: 0;
  background: rgba(28, 30, 38, 0.55);
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 20px;
  z-index: 50;
}

.modal {
  background: #fff;
  border-radius: var(--radius);
  box-shadow: 0 20px 60px rgba(0, 0, 0, 0.3);
  padding: 28px 26px;
  max-width: 440px;
  width: 100%;
}

.modal h3 { margin-bottom: 8px; font-size: 1.25rem; }

.modal input[type="email"],
.modal input[type="text"] {
  width: 100%;
  font: inherit;
  padding: 12px 14px;
  border: 1.5px solid var(--line);
  border-radius: 10px;
  margin: 12px 0 10px;
}

.modal input[type="email"]:focus,
.modal input[type="text"]:focus { outline: none; border-color: var(--brand); }

.modal-consent {
  display: flex;
  gap: 10px;
  align-items: flex-start;
  font-size: 0.82rem;
  color: var(--ink-2);
  cursor: pointer;
}

.modal-consent input { margin-top: 3px; }

.modal-actions {
  display: flex;
  justify-content: flex-end;
  gap: 10px;
  margin-top: 16px;
}

/* ---------------- Consent-Dialog (blockierendes Overlay) ---------------- */

.consent-overlay {
  position: fixed;
  inset: 0;
  z-index: 200;
  background: rgba(20, 21, 28, 0.62);
  backdrop-filter: blur(3px);
  -webkit-backdrop-filter: blur(3px);
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 20px;
}

body.consent-open { overflow: hidden; }

.consent-modal {
  background: #fff;
  border-radius: 18px;
  box-shadow: 0 24px 70px rgba(0, 0, 0, 0.35);
  max-width: 500px;
  width: 100%;
  padding: 28px 28px 20px;
  animation: consent-in 0.25s ease;
}

@keyframes consent-in {
  from { opacity: 0; transform: translateY(14px) scale(0.98); }
  to   { opacity: 1; transform: none; }
}

.consent-modal h3 { font-size: 1.25rem; margin-bottom: 10px; }
.consent-modal p { font-size: 0.92rem; color: var(--ink-2); }
.consent-modal a { color: var(--brand); }

.consent-actions { display: flex; gap: 12px; margin-top: 20px; }
.consent-actions .btn { flex: 1; text-align: center; padding: 12px 18px; font-size: 0.95rem; }

.consent-note {
  margin-top: 14px;
  font-size: 0.78rem !important;
  color: var(--muted) !important;
  text-align: center;
}

@media (max-width: 480px) {
  .consent-modal { padding: 22px 18px 16px; }
  .consent-actions { flex-direction: column-reverse; }
}

/* ---------------- Responsiv ---------------- */

@media (max-width: 620px) {
  .bar-row { grid-template-columns: 92px 1fr 54px; gap: 8px; }
  .bar-name { font-size: 0.8rem; }
  .card, .report-page { padding: 24px 18px; }
  .report-page.cover { padding: 36px 18px; }
  .job-card { flex-wrap: wrap; row-gap: 6px; }
  .job-info { flex: 1 1 calc(100% - 46px); }
  .job-match { font-size: 0.78rem; padding: 4px 9px; margin-left: 44px; }
  .scale-label { font-size: 0.64rem; }
}

/* ---------------- Druck / PDF ---------------- */

@page { margin: 14mm 12mm; }

@media print {
  body { background: #fff; }
  .site-header, .site-footer, .report-toolbar, .no-print,
  .consent-overlay, .modal-overlay { display: none !important; }
  .container-narrow, .container { max-width: none; padding: 0; }
  .report-page {
    box-shadow: none;
    border: 0;
    border-radius: 0;
    margin: 0;
    padding: 0 2mm;
    page-break-after: always;
  }
  .report-page:last-child { page-break-after: auto; }

  /* Saubere Umbrüche: Überschriften nie allein am Seitenende lassen,
     zusammengehörige Blöcke nicht mitten durchschneiden */
  h2, h3 {
    break-after: avoid-page;
    page-break-after: avoid;
    break-inside: avoid;
    page-break-inside: avoid;
  }
  .band-block, .color-card, .job-card, .chart, .bar-row,
  .check-list li, .arrow-list li, .dot-list li, .cross-list li, .tip-list li {
    break-inside: avoid;
    page-break-inside: avoid;
  }

  .bar-fill { print-color-adjust: exact; -webkit-print-color-adjust: exact; }
  .swatch, .logo-mark, .job-rank, .job-match { print-color-adjust: exact; -webkit-print-color-adjust: exact; }
  a { text-decoration: none; color: inherit; }
}
