/* agent-erstellen.distart.de
   Farben/Typo nach ~/knowledge-base/DISTART_DESIGN_HANDBOOK.md, ABER wo die
   gelebte Website davon abweicht, gilt die Website (gemessen an distart.de,
   2026-08-05): CTA ist Purple #6412B0 mit border-radius .75rem und
   font-weight 500 — nicht der Orange-Gradient in Pillenform aus dem Handbook.
   Grundregel bleibt: hell vor dunkel, weisser Grund, Abschnitte in #F5F4F3. */

:root {
  --purple-600: #6412B0;
  --purple-700: #39006C;
  --purple-100: #F9F2FF;
  --red-600: #E8003A;
  --yellow-600: #FFA526;
  --green-700: #00A98A;
  --green-100: #F0FFFC;
  --blue-600: #1966FF;
  --blue-100: #F2F7FF;
  --red-100: #FFF2F5;

  --black: #0A0B0D;
  --gray-700: #333740;
  --gray-600: #474D59;
  --gray-500: #5C6373;
  --gray-400: #ACB2BF;
  --gray-300: #CED1D9;
  --gray-200: #E4E7EB;
  --gray-100: #F2F4F7;
  /* Der warme Grauton, mit dem distart.de Abschnitte absetzt. */
  --sand: #F5F4F3;
  --white: #FFFFFF;

  --cta: linear-gradient(135deg, #E8003A, #FFA526);
  --ai: linear-gradient(135deg, #6412B0, #1966FF, #2BECC9);

  --display: 'Oswald', 'Arial Narrow', Impact, sans-serif;
  --body: 'Roboto', system-ui, -apple-system, 'Segoe UI', Helvetica, Arial, sans-serif;

  --wrap: 1040px;
}

* { box-sizing: border-box; }

html { scroll-behavior: smooth; }
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  * { transition: none !important; animation: none !important; }
}

body {
  margin: 0;
  background: var(--white);
  color: var(--gray-700);
  font-family: var(--body);
  font-size: 16px;
  line-height: 1.5;
  -webkit-font-smoothing: antialiased;
}

::selection { background: var(--purple-600); color: #fff; }

.wrap { max-width: var(--wrap); margin: 0 auto; padding: 0 24px; }

/* ── Typo-Bausteine ─────────────────────────────────────────── */

/* Abschnitts-Label als Pill — so setzt distart.de sie ein ("Digitaler Wandel"),
   in der Textschrift, nicht als Oswald-Versalien. */
.kicker {
  display: inline-block;
  font-family: var(--body);
  font-weight: 500;
  font-size: 14px;
  color: var(--purple-600);
  background: rgba(100, 18, 176, 0.1);
  border-radius: 28px;
  padding: 6px 16px;
  margin: 0 0 18px;
}

h1, h2, h3 { color: var(--black); margin: 0; letter-spacing: -0.02em; }
h1 { font-size: clamp(38px, 6.5vw, 68px); font-weight: 900; line-height: 1.02; }
h2 { font-size: clamp(26px, 3.6vw, 38px); font-weight: 700; line-height: 1.12; }
h3 { font-size: 20px; font-weight: 700; line-height: 1.25; }

p { margin: 0 0 16px; }
.lead { font-size: clamp(16px, 1.9vw, 19px); color: var(--gray-600); max-width: 58ch; }

a { color: var(--purple-600); }

/* ── Buttons ────────────────────────────────────────────────── */

/* Buttons nach distart.de, nicht nach dem Handbook: Die Website nutzt Purple
   als CTA-Farbe (--primary--accent: #6412b0), border-radius .75rem und
   font-weight 500 — nicht den Orange-Gradient in Pillenform, den das Handbook
   beschreibt. Im Zweifel gilt, was live steht. */
.btn {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  border: 1px solid transparent;
  border-radius: 12px;
  min-height: 48px;
  padding: 12px 24px;
  font-family: var(--body);
  font-size: 16px;
  font-weight: 500;
  cursor: pointer;
  text-decoration: none;
  transition: background-color 300ms cubic-bezier(.165,.84,.44,1), color 300ms, border-color 300ms;
}
.btn:focus-visible { outline: 3px solid var(--purple-600); outline-offset: 3px; }

.btn-cta {
  background: var(--purple-600);
  color: #fff;
}
.btn-cta:hover { background: var(--purple-700); }

.btn-ghost {
  background: transparent;
  color: var(--gray-700);
  box-shadow: inset 0 0 0 1px rgba(0, 0, 0, 0.2);
}
.btn-ghost:hover { box-shadow: inset 0 0 0 1px var(--purple-600); color: var(--purple-600); }

.btn-sm { min-height: 40px; padding: 8px 18px; font-size: 14px; }

/* ── Header ─────────────────────────────────────────────────── */

.site-head {
  border-bottom: 1px solid var(--gray-200);
  background: var(--white);
}
.site-head .wrap {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  height: 68px;
}
.brand { flex: none; display: inline-flex; align-items: center; }
.brand img { display: block; height: 26px; width: auto; }
.head-note { font-size: 13px; color: var(--gray-500); text-align: right; min-width: 0; }

/* Auf schmalen Geraeten wuerde der Zusatz neben der Wortmarke die Seite
   breiter machen als den Viewport — dann faellt er weg. */
@media (max-width: 620px) {
  .head-note { display: none; }
}

/* ── Hero ───────────────────────────────────────────────────── */

.hero { padding: 72px 0 64px; background: var(--white); position: relative; overflow: hidden; }
.hero::after {
  content: '';
  position: absolute;
  inset: auto 0 0 0;
  height: 4px;
  background: var(--ai);
}
.hero h1 { margin-bottom: 18px; }
.hero h1 .grad {
  background: var(--ai);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
}
.hero-actions { display: flex; gap: 12px; flex-wrap: wrap; margin-top: 26px; }

/* ── Sektionen ──────────────────────────────────────────────── */

section { padding: 64px 0; }
.sec-alt { background: var(--sand); }

.cards {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(min(240px, 100%), 1fr));
  gap: 16px;
  margin-top: 32px;
}
.card {
  background: var(--white);
  border: 1px solid var(--gray-200);
  border-radius: 14px;
  padding: 22px;
}
.card .num {
  font-family: var(--display);
  font-size: 12px;
  font-weight: 700;
  letter-spacing: 1.2px;
  color: var(--purple-600);
  display: block;
  margin-bottom: 10px;
}
.card h3 { margin-bottom: 6px; }
.card p { margin: 0; font-size: 15px; color: var(--gray-600); }

/* ── Anatomie: die acht Bausteine ───────────────────────────── */
/* <details> statt JS-Flip-Karten: nativ aufklappbar, funktioniert ohne
   Skript und laesst sich live vorfuehren. */

.anat {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(min(420px, 100%), 1fr));
  gap: 12px;
  margin-top: 32px;
}

.anat-item {
  background: var(--white);
  border: 1px solid var(--gray-200);
  border-radius: 14px;
  padding: 16px 20px;
  transition: border-color 160ms ease;
}
.anat-item:hover { border-color: var(--purple-400, #B37FE3); }
.anat-item[open] { border-color: var(--purple-600); }

.anat-item summary {
  display: flex;
  align-items: baseline;
  gap: 10px;
  cursor: pointer;
  list-style: none;
  flex-wrap: wrap;
}
.anat-item summary::-webkit-details-marker { display: none; }
.anat-item summary::after {
  content: '+';
  margin-left: auto;
  font-size: 20px;
  line-height: 1;
  color: var(--purple-600);
  flex: none;
}
.anat-item[open] summary::after { content: '−'; }

.anat-n {
  font-family: var(--display);
  font-size: 12px;
  font-weight: 700;
  letter-spacing: 1.2px;
  color: var(--purple-600);
  flex: none;
}
.anat-label {
  font-family: var(--display);
  font-size: 17px;
  font-weight: 700;
  letter-spacing: 0.8px;
  text-transform: uppercase;
  color: var(--black);
}
.anat-q { font-size: 14px; color: var(--gray-500); }

.anat-item p {
  margin: 12px 0 0;
  font-size: 15px;
  line-height: 1.6;
  color: var(--gray-600);
}
.anat-item p b { color: var(--black); font-weight: 700; }

.anat-risk[open] { border-color: var(--red-600); }
.anat-risk .anat-n, .anat-risk summary::after { color: var(--red-600); }

/* ── Steckbrief-Formular ────────────────────────────────────── */

.form-head {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 20px;
  flex-wrap: wrap;
  margin-bottom: 26px;
}
.form-tools { display: flex; gap: 8px; align-items: center; flex-wrap: wrap; }
.counter {
  font-family: var(--display);
  font-size: 12px;
  font-weight: 700;
  letter-spacing: 1px;
  color: var(--gray-500);
  text-transform: uppercase;
  white-space: nowrap;
}

/* min() verhindert, dass die Spalten-Mindestbreite den Viewport sprengt —
   ohne das laeuft die Seite auf dem Handy horizontal ueber. */
.fields {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(min(380px, 100%), 1fr));
  gap: 14px;
}
.field {
  background: var(--white);
  border: 1px solid var(--gray-200);
  border-radius: 14px;
  padding: 16px 18px 18px;
  transition: border-color 200ms ease, box-shadow 200ms ease;
}
.field:focus-within {
  border-color: var(--purple-600);
  box-shadow: 0 0 0 3px var(--purple-100);
}
.field.flash {
  border-color: var(--purple-600);
  box-shadow: 0 0 0 3px var(--purple-100);
}
.field-head {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 8px;
}
.field-label {
  font-family: var(--display);
  font-size: 14px;
  font-weight: 700;
  letter-spacing: 1px;
  text-transform: uppercase;
  color: var(--black);
}
.field-hint { font-size: 12px; color: var(--gray-500); text-align: right; }

.field textarea {
  width: 100%;
  border: none;
  background: transparent;
  resize: vertical;
  font-family: var(--body);
  font-size: 15px;
  line-height: 1.55;
  color: var(--gray-700);
  outline: none;
  padding: 0;
  min-height: 4.4em;
}
.field textarea::placeholder { color: var(--gray-400); }

/* Grenzen-Feld: zweigeteilt, gruen/rot nach Handbook-Funktionsfarben */
.field-split { grid-column: 1 / -1; }
.split {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(min(240px, 100%), 1fr));
  gap: 12px;
}
.split-box { border-radius: 10px; padding: 12px 14px; }
.split-ok { background: var(--green-100); border: 1px solid rgba(0, 169, 138, 0.3); }
.split-stop { background: var(--red-100); border: 1px solid rgba(232, 0, 58, 0.25); }
.split-box .split-label {
  font-family: var(--display);
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 1px;
  text-transform: uppercase;
  margin-bottom: 6px;
}
.split-ok .split-label { color: var(--green-700); }
.split-stop .split-label { color: var(--red-600); }
.split-box textarea { min-height: 3.4em; font-size: 14px; }

/* ── Parallele: Kollegin ↔ Agent ────────────────────────────── */

.pair {
  margin: 30px 0;
  display: grid;
  gap: 1px;
  background: var(--gray-200);
  border: 1px solid var(--gray-200);
  border-radius: 14px;
  overflow: hidden;
}
.pair > div {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 16px;
  padding: 13px 20px;
  background: var(--white);
  align-items: baseline;
}
.pair-head {
  background: var(--purple-100) !important;
  font-family: var(--display);
  font-size: 12px;
  font-weight: 700;
  letter-spacing: 1.2px;
  text-transform: uppercase;
  color: var(--purple-600);
}
.p-a { font-size: 15px; color: var(--gray-600); }
.p-b {
  font-family: var(--display);
  font-size: 15px;
  font-weight: 700;
  letter-spacing: 0.8px;
  text-transform: uppercase;
  color: var(--black);
}

/* Auf schmalen Geraeten untereinander, mit Pfeil als Verbindung. */
@media (max-width: 640px) {
  .pair > div { grid-template-columns: 1fr; gap: 2px; padding: 12px 16px; }
  .pair-head { display: none !important; }
  .p-b::before { content: '→ '; color: var(--purple-600); }
}

/* ── Übersetzung Steckbrief → Werkzeug ──────────────────────── */

.mapping { margin: 30px 0; display: grid; gap: 1px; background: var(--gray-200); border: 1px solid var(--gray-200); border-radius: 14px; overflow: hidden; }
.mapping > div {
  display: grid;
  grid-template-columns: minmax(180px, 1fr) 2fr;
  gap: 16px;
  padding: 14px 20px;
  background: var(--white);
  align-items: baseline;
}
@media (max-width: 640px) {
  .mapping > div { grid-template-columns: 1fr; gap: 4px; }
}
.m-from {
  font-family: var(--display);
  font-size: 14px;
  font-weight: 700;
  letter-spacing: 0.8px;
  text-transform: uppercase;
  color: var(--purple-600);
}
.m-to { font-size: 15px; color: var(--gray-700); }

/* ── Ergebnis / Downloads ───────────────────────────────────── */

.result {
  background: var(--white);
  border: 1px solid var(--gray-200);
  border-radius: 16px;
  padding: 32px;
  display: grid;
  grid-template-columns: 1fr auto;
  gap: 24px;
  align-items: center;
}
@media (max-width: 720px) { .result { grid-template-columns: 1fr; } }
.result h3 { margin-bottom: 8px; }
.result p { margin: 0; font-size: 15px; color: var(--gray-600); }

/* Eckdaten der Weiterbildung — Label/Wert-Paare wie im Distart-Praxisguide. */
/* Vier Eckdaten — zweispaltig, damit sie als 2x2 aufgehen statt 3+1. */
.facts {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(min(400px, 100%), 1fr));
  gap: 16px 24px;
  margin: 26px 0;
  padding: 0;
  max-width: 880px;
}
.facts > div {
  border-left: 3px solid var(--purple-600);
  padding-left: 14px;
}
.facts dt {
  font-family: var(--display);
  font-size: 12px;
  font-weight: 700;
  letter-spacing: 1.2px;
  text-transform: uppercase;
  color: var(--purple-600);
  margin-bottom: 2px;
}
.facts dd { margin: 0; font-size: 15px; color: var(--gray-700); }

.dl {
  display: flex;
  align-items: center;
  gap: 14px;
  background: var(--white);
  border: 1px solid var(--gray-200);
  border-radius: 14px;
  padding: 18px 20px;
  text-decoration: none;
  color: inherit;
  transition: border-color 140ms ease, transform 140ms ease;
}
.dl:hover { border-color: var(--purple-600); transform: translateY(-2px); }
.dl .dl-icon {
  width: 42px; height: 42px; flex: none;
  border-radius: 10px;
  background: var(--purple-100);
  color: var(--purple-600);
  display: grid; place-items: center;
  font-family: var(--display); font-weight: 700; font-size: 13px;
}
.dl strong { display: block; color: var(--black); font-size: 15.5px; }
.dl span { font-size: 13.5px; color: var(--gray-500); }

/* Noch nicht hinterlegte Datei: sichtbar, aber nicht klickbar. */
.dl-soon { cursor: default; opacity: 0.65; }
.dl-soon:hover { border-color: var(--gray-200); transform: none; }
.dl .soon {
  font-family: var(--display);
  font-style: normal;
  font-size: 10px;
  font-weight: 700;
  letter-spacing: 1px;
  text-transform: uppercase;
  color: var(--gray-500);
  border: 1px solid var(--gray-300);
  border-radius: 4px;
  padding: 1px 6px;
  margin-left: 8px;
  vertical-align: middle;
}

/* ── Footer ─────────────────────────────────────────────────── */

.site-foot {
  background: var(--sand);
  border-top: 1px solid var(--gray-200);
  padding: 40px 0;
  font-size: 14px;
  color: var(--gray-600);
}
.site-foot .wrap { display: flex; justify-content: space-between; gap: 20px; flex-wrap: wrap; }
.site-foot a { color: var(--gray-600); }

/* ── PDF-Dokument (nur beim Drucken sichtbar) ───────────────── */

#pdf { display: none; }

@media print {
  @page { size: A4; margin: 14mm; }

  body { background: #fff; font-size: 10.5pt; }
  body > *:not(#pdf) { display: none !important; }

  #pdf {
    display: block;
    color: #000;
    -webkit-print-color-adjust: exact;
    print-color-adjust: exact;
  }

  .pdf-head {
    display: flex;
    align-items: baseline;
    justify-content: space-between;
    border-bottom: 2px solid var(--purple-600);
    padding-bottom: 8px;
    margin-bottom: 18px;
  }
  .pdf-head img { height: 26px; width: auto; display: block; }
  .pdf-head .pdf-title {
    font-family: var(--display);
    font-size: 11pt;
    font-weight: 700;
    letter-spacing: 1px;
    text-transform: uppercase;
    color: var(--purple-600);
  }

  .pdf-row { break-inside: avoid; margin-bottom: 11px; }
  .pdf-row .k {
    font-family: var(--display);
    font-size: 9.5pt;
    font-weight: 700;
    letter-spacing: 1px;
    text-transform: uppercase;
    color: var(--purple-600);
    margin-bottom: 2px;
  }
  .pdf-row .v { white-space: pre-wrap; line-height: 1.45; }
  .pdf-row .v.empty { color: #888; font-style: italic; }

  .pdf-split { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }
  .pdf-split .box { border: 1px solid #ccc; border-radius: 5px; padding: 8px 10px; }
  .pdf-split .box.ok { border-color: var(--green-700); }
  .pdf-split .box.stop { border-color: var(--red-600); }

  /* Der Prompt startet immer auf einer neuen Seite — der Umbruch muss auf der
     ganzen Zeile sitzen, sonst bleibt die Ueberschrift als Waise zurueck. */
  .pdf-row.prompt { break-before: page; }

  .pdf-prompt {
    background: var(--gray-100);
    border-left: 3px solid var(--purple-600);
    padding: 12px 14px;
    white-space: pre-wrap;
    font-size: 9pt;
    line-height: 1.5;
  }

  .pdf-ad {
    break-inside: avoid;
    margin-top: 20px;
    border-radius: 8px;
    padding: 16px 18px;
    background: var(--gray-100);
    border-top: 4px solid transparent;
    border-image: var(--cta) 1;
  }
  .pdf-ad .k {
    font-family: var(--display);
    font-size: 10pt;
    font-weight: 700;
    letter-spacing: 1px;
    text-transform: uppercase;
    color: var(--red-600);
    margin-bottom: 4px;
  }
  .pdf-ad p { margin: 0 0 8px; font-size: 9.5pt; line-height: 1.45; }

  /* Eckdaten als Label/Wert-Paare, wie im Distart-Praxisguide. */
  .pdf-facts { margin: 0 0 8px; }
  .pdf-facts > div { display: flex; gap: 8px; font-size: 9.5pt; line-height: 1.5; }
  .pdf-facts .fk {
    font-family: var(--display);
    font-weight: 700;
    font-size: 8.5pt;
    letter-spacing: 0.8px;
    text-transform: uppercase;
    color: var(--purple-600);
    flex: none;
    width: 78px;
  }

  .pdf-cta-url {
    margin-top: 5px;
    font-size: 8.5pt;
    color: var(--gray-600);
  }

  .pdf-cta {
    display: inline-block;
    margin-top: 4px;
    background: var(--purple-600);
    color: #fff !important;
    text-decoration: none;
    font-weight: 700;
    font-size: 9.5pt;
    padding: 7px 14px;
    border-radius: 20px;
  }

  .pdf-foot {
    margin-top: 16px;
    padding-top: 8px;
    border-top: 1px solid #ccc;
    font-size: 8.5pt;
    color: #555;
    display: flex;
    justify-content: space-between;
    gap: 12px;
  }
}
