/* Digimojo Design System v1.0.
   Token uebernommen aus digimojo-hubs/src/styles/tokens.css, Dark-Mode-Satz aus
   digimojo-cockpit/assets/cockpit.css, Formular- und Wizard-Muster aus Framework-Check.
   Schriften liegen lokal, kein Fremd-CDN (DSGVO/TTDSG). */

/* Schriften */
@font-face{font-family:'IBM Plex Sans';font-style:normal;font-weight:400;font-display:swap;src:url('/fonts/ibm-plex-sans-400.woff2') format('woff2')}
@font-face{font-family:'IBM Plex Sans';font-style:normal;font-weight:600;font-display:swap;src:url('/fonts/ibm-plex-sans-600.woff2') format('woff2')}
@font-face{font-family:'IBM Plex Sans';font-style:normal;font-weight:700;font-display:swap;src:url('/fonts/ibm-plex-sans-700.woff2') format('woff2')}
@font-face{font-family:'IBM Plex Mono';font-style:normal;font-weight:500;font-display:swap;src:url('/fonts/ibm-plex-mono-500.woff2') format('woff2')}

:root {
  --navy: #0A4073;
  --accent: #328EBB;
  --cta: #FE8F00;
  --cta-hover: #FE8000;
  --ok: #077400;
  --crit: #E11919;

  --bg: #FBFAF8;
  --surface: #FFFFFF;
  --border: #EBEBEB;
  --text: #2A3642;
  --text-secondary: #5B6B7A;

  --space-1: 8px;
  --space-2: 16px;
  --space-3: 24px;
  --space-4: 32px;
  --space-6: 48px;
  --space-8: 64px;

  --radius: 8px;
  --radius-card: 16px;
  --radius-pill: 999px;
  --shadow-subtle: 0 1px 2px rgba(10, 64, 115, .06);
  --shadow-elevated: 0 8px 24px -8px rgba(10, 64, 115, .18);

  --font: 'IBM Plex Sans', ui-sans-serif, system-ui, -apple-system, "Segoe UI", Roboto, Arial, sans-serif;
  --font-mono: 'IBM Plex Mono', ui-monospace, SFMono-Regular, Menlo, monospace;
}

@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) {
    --navy: #DCE7F3;
    --accent: #6FB7DF;
    --ok: #45B569;
    --crit: #F16D6D;
    --bg: #0F1620;
    --surface: #182029;
    --border: #2A3441;
    --text: #E6EBF0;
    --text-secondary: #A9B6C2;
    --shadow-subtle: 0 1px 2px rgba(0, 0, 0, .35);
    --shadow-elevated: 0 8px 24px -8px rgba(0, 0, 0, .5);
  }
}

*, *::before, *::after { box-sizing: border-box; }
::selection { background: #ECFEAA; color: var(--navy); }

body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font-family: var(--font);
  font-size: 17px;
  line-height: 1.6;
  -webkit-text-size-adjust: 100%;
}

h1, h2, h3 { color: var(--navy); line-height: 1.25; margin: 0 0 var(--space-2); }
h1 { font-size: 38px; font-weight: 700; letter-spacing: -0.01em; }
h2 { font-size: 28px; font-weight: 600; }
h3 { font-size: 20px; font-weight: 600; }
p { margin: 0 0 var(--space-2); }
a { color: var(--accent); }

.eyebrow {
  font-family: var(--font-mono);
  font-size: 13px;
  font-weight: 500;
  text-transform: uppercase;
  letter-spacing: .12em;
  color: var(--text-secondary);
  margin: 0 0 var(--space-1);
}

/* Grundgeruest: links Erzaehlung, rechts der Assistent */
.huelle {
  max-width: 1120px;
  margin: 0 auto;
  padding: var(--space-6) var(--space-3) var(--space-8);
  display: grid;
  gap: var(--space-4);
}
@media (min-width: 62rem) {
  .huelle { grid-template-columns: 1fr 1.35fr; gap: var(--space-6); align-items: start; }
  .spalte-links { position: sticky; top: var(--space-4); }
}

.vorspann { color: var(--text-secondary); }

/* Schrittanzeige links */
.schrittliste { list-style: none; margin: var(--space-3) 0; padding: 0; }
.schrittliste li {
  display: flex;
  gap: var(--space-1);
  align-items: center;
  padding: 6px 0;
  color: var(--text-secondary);
  font-size: 15px;
}
.schrittliste li[data-zustand="aktiv"] { color: var(--navy); font-weight: 600; }
.schrittliste li[data-zustand="fertig"] { color: var(--text-secondary); }

/* Zustandsanzeige je Schritt: offen ist ein leerer Kreis, aktiv ein Ring in Navy,
   erledigt der gruene Haken. So hat jeder Zustand ein eigenes Zeichen. */
.haken {
  flex: none;
  width: 16px;
  height: 16px;
  border-radius: var(--radius-pill);
  border: 2px solid var(--border);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-size: 14px;
  font-weight: 700;
  line-height: 1;
  color: transparent;
}
.schrittliste li[data-zustand="aktiv"] .haken { border-color: var(--navy); border-width: 3px; }
.schrittliste li[data-zustand="fertig"] .haken { border-color: transparent; color: var(--ok); }

.beruhigung {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-card);
  padding: var(--space-2);
  box-shadow: var(--shadow-subtle);
}
.beruhigung h3 { font-size: 17px; margin-bottom: 4px; }
.beruhigung p { margin: 0; font-size: 15px; color: var(--text-secondary); }

/* Karte mit dem aktuellen Schritt */
.karte {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-card);
  box-shadow: var(--shadow-elevated);
  overflow: hidden;
}
.fortschritt { height: 6px; background: var(--border); }
.fortschritt > span {
  display: block;
  height: 100%;
  width: 0;
  background: var(--navy);
  transition: width .3s ease;
}
.karteninhalt { padding: var(--space-3); }
@media (max-width: 40rem) { .karteninhalt { padding: var(--space-2); } }

.schrittzeile {
  display: flex;
  justify-content: space-between;
  font-family: var(--font-mono);
  font-size: 13px;
  font-weight: 500;
  text-transform: uppercase;
  letter-spacing: .12em;
  color: var(--text-secondary);
  margin-bottom: var(--space-2);
}

.frage { font-size: 22px; font-weight: 600; color: var(--navy); margin: 0 0 4px; }
.erklaerung { font-size: 15px; color: var(--text-secondary); margin: 0 0 var(--space-2); }

fieldset { border: 0; padding: 0; margin: 0 0 var(--space-3); }
legend { font-size: 15px; font-weight: 600; margin-bottom: var(--space-1); padding: 0; }
.freiwillig { font-weight: 400; font-size: 0.82em; color: var(--text-secondary); }

/* Auswahlkacheln, Muster aus Framework-Check */
.kacheln { display: grid; gap: 10px; }
.kacheln[data-spalten="2"] { grid-template-columns: repeat(2, 1fr); }
@media (max-width: 30rem) { .kacheln[data-spalten="2"] { grid-template-columns: 1fr; } }

.kachel {
  display: flex;
  align-items: center;
  gap: 12px;
  width: 100%;
  padding: 14px 16px;
  text-align: left;
  font: inherit;
  font-size: 16px;
  color: var(--text);
  background: var(--surface);
  border: 2px solid var(--border);
  border-radius: var(--radius);
  cursor: pointer;
  transition: border-color .2s, background-color .2s;
}
.kachel:hover { border-color: var(--accent); }
.kachel[aria-pressed="true"], .kachel[data-gewaehlt="ja"] {
  border-color: var(--cta);
  background: rgba(254, 143, 0, .08);
}
.marke {
  flex: none;
  width: 22px;
  height: 22px;
  border-radius: var(--radius-pill);
  border: 2px solid var(--border);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-size: 13px;
  font-weight: 700;
  color: transparent;
}
.kachel[aria-pressed="true"] .marke, .kachel[data-gewaehlt="ja"] .marke {
  border-color: var(--cta);
  background: var(--cta);
  color: #fff;
}
/* Mehrfachauswahl bekommt ein Quadrat, Einfachauswahl den Kreis. Die Form sagt
   damit schon vor dem Klick, ob mehrere Antworten moeglich sind. */
.kacheln[data-mehrfach="ja"] .marke { border-radius: 5px; }

/* Eingabefelder */
.feld { margin-bottom: var(--space-2); }
label { display: block; font-size: 15px; font-weight: 600; margin-bottom: 6px; }
input[type="email"], input[type="text"] {
  width: 100%;
  padding: 11px 16px;
  font: inherit;
  font-size: 16px;
  color: var(--text);
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  box-shadow: var(--shadow-subtle);
}
input:focus {
  outline: none;
  border-color: var(--navy);
  box-shadow: 0 0 0 3px rgba(10, 64, 115, .12);
}
button:focus-visible, a:focus-visible, .kachel:focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: 2px;
}

.einwilligung { display: flex; gap: 12px; align-items: flex-start; margin: var(--space-2) 0; }
.einwilligung input { margin-top: 5px; flex: none; width: 18px; height: 18px; accent-color: var(--navy); }
.einwilligung label { font-weight: 400; font-size: 14px; color: var(--text-secondary); margin: 0; }

/* Knoepfe */
.knopfzeile {
  display: flex;
  justify-content: space-between;
  gap: var(--space-1);
  border-top: 1px solid var(--border);
  padding-top: var(--space-2);
  margin-top: var(--space-2);
}
.knopf {
  font: inherit;
  font-weight: 600;
  font-size: 15px;
  padding: 12px 24px;
  border-radius: var(--radius);
  cursor: pointer;
  transition: background-color .2s, border-color .2s, color .2s;
}
.knopf-haupt { background: var(--cta); color: #fff; border: 2px solid var(--cta); box-shadow: var(--shadow-subtle); }
.knopf-haupt:hover:not([disabled]) { background: var(--cta-hover); border-color: var(--cta-hover); }
.knopf-haupt[disabled] { opacity: .45; cursor: not-allowed; }
.knopf-still { background: transparent; color: var(--text-secondary); border: 2px solid var(--border); }
.knopf-still:hover { border-color: var(--text-secondary); color: var(--text); }

.kleingedrucktes { font-size: 13px; color: var(--text-secondary); margin: var(--space-2) 0 0; }
.meldung { margin: var(--space-1) 0 0; font-size: 15px; min-height: 1.6em; }
.meldung[data-art="fehler"] { color: var(--crit); }

/* Inhaltsbloecke der linken Spalte */
.bausteine-titel { font-size: 20px; margin: var(--space-3) 0 0; }
.bausteine-titel + .bausteine { margin-top: 12px; }

.bausteine { list-style: none; margin: var(--space-3) 0 0; padding: 0; display: grid; gap: 12px; }
.bausteine h3 { font-size: 16px; margin-bottom: 2px; }
.bausteine p { margin: 0; font-size: 15px; color: var(--text-secondary); }

.hinweis {
  background: #EAF3FA;
  border: 1px solid #CBE2F0;
  border-radius: var(--radius-card);
  padding: var(--space-2);
  margin: var(--space-3) 0 0;
}
.hinweis h3 { font-size: 17px; margin-bottom: 4px; }
.hinweis p { margin: 0; font-size: 15px; }
@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) .hinweis { background: rgba(50, 142, 187, .12); border-color: rgba(50, 142, 187, .35); }
}

footer.fuss {
  grid-column: 1 / -1;
  border-top: 1px solid var(--border);
  padding-top: var(--space-2);
  margin-top: var(--space-4);
  font-size: 14px;
  color: var(--text-secondary);
}
.fusslinks { display: flex; flex-wrap: wrap; gap: var(--space-2); margin-top: 4px; }
footer.fuss a { color: var(--text-secondary); }

.versteckt { display: none !important; }

/* Folgeseiten (Danke, Bestaetigt): eine Spalte, schmaler, zentriert.
   Bewusst als Klasse und nicht als style-Attribut: die Content-Security-Policy
   in public/_headers erlaubt keine Inline-Styles, sie wuerden wirkungslos bleiben.
   Zusammengesetzter Selektor, damit die Regel die Zweispalten-Regel im
   Media-Query unabhaengig von der Reihenfolge schlaegt. */
.huelle.einspaltig {
  max-width: 46rem;
  grid-template-columns: 1fr;
}

.abschnittstitel {
  font-size: 15px;
  font-weight: 600;
  color: var(--text-secondary);
  margin: 0 0 12px;
}

.karte-abstand { margin-top: var(--space-3); }
.karte-abstand .bausteine { margin-top: 0; }

/* Eigener Absatz fuer einen einzelnen Knopf. Flex statt Textfluss, weil ein
   inline-block mit Innenabstand sonst ueber die Zeile nach oben hinausragt und
   den Kasten darueber ueberlappt. */
.knopfabsatz { display: flex; margin: var(--space-3) 0 0; }
a.knopf { display: inline-flex; align-items: center; text-decoration: none; }

.zwischenfrage { font-size: 20px; margin-top: var(--space-4); }

/* Nachfrage, die erst durch eine Auswahl erscheint (heute: "etwas anderes").
   Leicht eingerueckt und mit Kante, damit erkennbar ist, wozu sie gehoert. */
.nachfrage {
  margin: 12px 0 0;
  padding-left: 14px;
  border-left: 2px solid var(--cta);
}

@media (max-width: 40rem) {
  h1 { font-size: 30px; }
  h2 { font-size: 24px; }
}
