/* =========================================================================
   10 Fragen zum Traumberuf — Design-Tokens und Basisstile
   Werte übernommen aus dem Design-Handoff.
   Markenfarbe: nur --accent ändern, alles andere zieht nach.
   ========================================================================= */

/* Schriften werden selbst ausgeliefert, NICHT über die Google-Fonts-CDN.
   Beim Einbinden per CDN würde bei jedem Aufruf die IP-Adresse des Besuchers
   an Google übertragen — dafür bräuchte es eine Einwilligung.
   Wie die Dateien nach public/fonts kommen, steht in der README.
   Fehlen sie, greifen automatisch die Systemschriften. */
@font-face {
  font-family: 'Instrument Serif';
  src: url('/fonts/instrument-serif-400.woff2') format('woff2');
  font-weight: 400; font-style: normal; font-display: swap;
}
@font-face {
  font-family: 'Manrope';
  src: url('/fonts/manrope-400.woff2') format('woff2');
  font-weight: 400; font-style: normal; font-display: swap;
}
@font-face {
  font-family: 'Manrope';
  src: url('/fonts/manrope-500.woff2') format('woff2');
  font-weight: 500; font-style: normal; font-display: swap;
}
@font-face {
  font-family: 'Manrope';
  src: url('/fonts/manrope-600.woff2') format('woff2');
  font-weight: 600; font-style: normal; font-display: swap;
}
@font-face {
  font-family: 'Manrope';
  src: url('/fonts/manrope-700.woff2') format('woff2');
  font-weight: 700; font-style: normal; font-display: swap;
}

:root {
  /* --- Farben ---------------------------------------------------------- */
  --accent: #0d4b86;          /* ggf. durch offiziellen DVAG-Wert ersetzen */
  --accent-06: #0d4b8610;
  --accent-10: #0d4b861a;
  --dark: #142433;
  --dot: #7fb2e0;
  --panel-cool: #f4f6f9;
  --page: #f2f0ec;
  --app-bg: #fbfaf8;
  --card: #ffffff;
  --muted-surface: #f2f0ec;
  --seg-track: #eceae5;
  --border-control: #e2dfd8;
  --border-card: #edeae4;
  --border-card-2: #e4e1da;
  --mark-border: #ddd9d1;
  --disabled: #e6e3dd;

  --text: #142433;
  --text-control: #3a3833;
  --text-2: #5e5b55;
  --text-3: #6f6c65;
  --text-muted: #8d8a83;
  --text-weak: #9c988f;
  --text-disabled: #a8a49c;
  --on-dark: #fbfaf8;

  --ok: #2e7d5b;
  --warn: #9a6b1f;
  --danger: #a33a3a;

  /* --- Typografie ------------------------------------------------------ */
  --serif: 'Instrument Serif', Georgia, 'Times New Roman', serif;
  --sans: 'Manrope', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
  --mono: ui-monospace, SFMono-Regular, Menlo, monospace;

  /* --- Radien ---------------------------------------------------------- */
  --r-chip: 6px;
  --r-mark: 7px;
  --r-tab: 9px;
  --r-control: 13px;
  --r-card-s: 14px;
  --r-btn: 16px;
  --r-card: 18px;
  --r-hero: 20px;
  --r-pill: 999px;

  --shadow-tab: 0 1px 2px rgba(0, 0, 0, .07);
}

/* --- Reset ------------------------------------------------------------- */
*, *::before, *::after { box-sizing: border-box; }

html, body {
  margin: 0;
  padding: 0;
  background: var(--app-bg);
  color: var(--text);
  font-family: var(--sans);
  -webkit-font-smoothing: antialiased;
  -webkit-text-size-adjust: 100%;
}

body { min-height: 100dvh; }

button {
  font-family: inherit;
  cursor: pointer;
  border: 0;
  background: none;
  color: inherit;
}

input, textarea, select { font-family: inherit; }

a { color: var(--accent); }

/* Sichtbarer Fokusring — im Prototyp nicht enthalten, für Bedienung per
   Tastatur aber nötig. */
:focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: 2px;
  border-radius: 4px;
}

.sr-only {
  position: absolute; width: 1px; height: 1px;
  padding: 0; margin: -1px; overflow: hidden;
  clip: rect(0 0 0 0); white-space: nowrap; border: 0;
}

/* --- Grundgerüst ------------------------------------------------------- */
/* Mobil: volle Breite. Ab 700px: zentriert auf max. 480px. */
.shell {
  display: flex;
  flex-direction: column;
  min-height: 100dvh;
  max-width: 480px;
  margin: 0 auto;
  background: var(--app-bg);
  position: relative;
}

@media (min-width: 700px) {
  body { background: var(--page); }
  .shell {
    min-height: 100dvh;
    box-shadow: 0 0 0 1px var(--border-card);
  }
}

.screen {
  display: flex;
  flex-direction: column;
  flex: 1;
  animation: fadeUp .32s ease;
}

@keyframes fadeUp {
  from { opacity: 0; transform: translateY(8px); }
  to   { opacity: 1; transform: none; }
}

@media (prefers-reduced-motion: reduce) {
  .screen { animation: none; }
  * { transition-duration: .01ms !important; }
}

/* Kopf und Fuß stehen fest, die Mitte scrollt */
.head { padding: 64px 20px 14px; background: var(--app-bg); flex: none; }
.body { flex: 1; overflow-y: auto; padding: 18px 20px 20px; }
.foot {
  flex: none;
  padding: 14px 20px 30px;
  border-top: 1px solid var(--border-card);
  background: var(--app-bg);
}

.pad { padding: 0 20px 30px; }

/* --- Typografie-Klassen ------------------------------------------------ */
.kicker {
  font: 600 10px/1 var(--sans);
  letter-spacing: .18em;
  text-transform: uppercase;
  color: var(--accent);
}

.display-xl { font: 400 40px/1.05 var(--serif); letter-spacing: -.01em; margin: 0; }
.display-l  { font: 400 30px/1.1  var(--serif); margin: 0; }
.display-m  { font: 400 27px/1.15 var(--serif); margin: 0; text-wrap: pretty; }
.display-s  { font: 400 25px/1.1  var(--serif); margin: 0; }

.body-l { font: 400 15px/1.6 var(--sans); color: var(--text-2); text-wrap: pretty; }
.body-m { font: 400 13.5px/1.55 var(--sans); color: var(--text-2); }
.body-s { font: 400 12.5px/1.45 var(--sans); color: var(--text-2); }

.hint  { font: 500 12.5px/1.45 var(--sans); color: var(--text-muted); }
.meta  { font: 500 11.5px/1.4 var(--sans); color: var(--text-muted); }
.eyebrow {
  font: 600 10.5px/1 var(--sans);
  letter-spacing: .1em;
  text-transform: uppercase;
  color: var(--text-muted);
}

/* --- Buttons ----------------------------------------------------------- */
.btn {
  width: 100%;
  height: 54px;
  border-radius: var(--r-btn);
  font: 600 15.5px/1 var(--sans);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  transition: all .16s ease;
}

.btn-lg { height: 56px; font-size: 16px; }
.btn-sm { height: 50px; font-size: 15px; }
.btn-xs { height: 44px; font-size: 14px; border-radius: var(--r-card-s); }

.btn-primary { background: var(--accent); color: var(--on-dark); }
.btn-dark    { background: var(--dark);   color: var(--on-dark); }
.btn-ghost {
  background: var(--card);
  border: 1px solid var(--border-control);
  color: var(--text-control);
}
.btn[disabled], .btn[aria-disabled='true'] {
  background: var(--disabled);
  color: var(--text-disabled);
  border-color: transparent;
}
/* Gesperrte Buttons bleiben klickbar und geben eine Begründung aus. */
.btn[aria-disabled='true'] { cursor: pointer; }

.btn-back {
  width: 34px; height: 34px;
  border-radius: 11px;
  border: 1px solid var(--border-control);
  background: var(--card);
  color: var(--text-2);
  font-size: 16px;
  display: inline-flex; align-items: center; justify-content: center;
  flex: none;
}

/* --- Fortschritt ------------------------------------------------------- */
.progress-row { display: flex; align-items: center; gap: 12px; }
.step-count { font: 600 12px/1 var(--sans); color: var(--text-muted); }

.progress {
  margin-top: 14px;
  height: 3px;
  border-radius: 2px;
  background: #e6e3dd;
  overflow: hidden;
}
.progress > i {
  display: block; height: 100%;
  background: var(--accent);
  border-radius: 2px;
  transition: width .3s ease;
}

/* --- Antwortoptionen --------------------------------------------------- */
.options { display: flex; flex-direction: column; gap: 9px; margin-top: 22px; }

.opt {
  width: 100%;
  padding: 15px 16px;
  border-radius: var(--r-card-s);
  border: 1px solid var(--border-control);
  background: var(--card);
  color: var(--text-control);
  font: 600 14.5px/1.35 var(--sans);
  text-align: left;
  display: flex;
  align-items: center;
  gap: 11px;
  transition: all .16s ease;
}
.opt[aria-pressed='true'] {
  border: 1.5px solid var(--accent);
  background: var(--accent-06);
  color: var(--text);
  padding: 14.5px 15.5px; /* gleicht die dickere Kontur aus */
}

.mark {
  width: 22px; height: 22px; flex: none;
  border-radius: var(--r-pill);
  border: 1.5px solid var(--mark-border);
  background: var(--card);
  display: inline-flex; align-items: center; justify-content: center;
  font-size: 12px; color: transparent;
  transition: all .16s ease;
}
.mark-square { border-radius: var(--r-mark); }
.opt[aria-pressed='true'] .mark {
  background: var(--accent);
  border-color: var(--accent);
  color: #fff;
}

/* --- Skala 0–10 -------------------------------------------------------- */
.scale {
  display: grid;
  grid-template-columns: repeat(6, 1fr);
  gap: 8px;
  margin-top: 26px;
}
@media (min-width: 700px) {
  .scale { grid-template-columns: repeat(11, 1fr); gap: 6px; }
}

.scale button {
  height: 52px;
  border-radius: var(--r-control);
  border: 1px solid var(--border-control);
  background: var(--card);
  color: var(--text-control);
  font: 600 15px/1 var(--sans);
  transition: all .16s ease;
}
.scale button[aria-checked='true'] {
  background: var(--accent);
  border-color: var(--accent);
  color: var(--on-dark);
}

.poles {
  display: flex; justify-content: space-between;
  margin-top: 12px;
  font: 500 11.5px/1 var(--sans);
  color: var(--text-muted);
}

/* --- Karten ------------------------------------------------------------ */
.card {
  background: var(--card);
  border: 1px solid var(--border-card);
  border-radius: var(--r-btn);
  padding: 16px;
}
.card + .card, .card-stack > * + * { margin-top: 10px; }

.card-dark { background: var(--dark); color: var(--on-dark); border-color: transparent; }
.card-muted { background: var(--muted-surface); border-color: transparent; }
.card-accent { background: var(--accent); color: var(--on-dark); border-color: transparent; }

.chips { display: flex; flex-wrap: wrap; gap: 7px; margin-top: 10px; }
.chip {
  padding: 7px 11px;
  border-radius: var(--r-pill);
  background: var(--muted-surface);
  font: 600 12.5px/1 var(--sans);
  color: var(--text-control);
}

.badge {
  padding: 6px 10px;
  border-radius: var(--r-pill);
  font: 600 11px/1 var(--sans);
  background: var(--muted-surface);
  color: var(--text-3);
  white-space: nowrap;
}
.badge-hot { background: var(--accent); color: var(--on-dark); }
.badge-dark { background: var(--dark); color: var(--on-dark); display: inline-flex; align-items: center; gap: 6px; padding: 6px 11px; font-size: 10.5px; }
.badge-dark::before {
  content: ''; width: 6px; height: 6px; border-radius: 50%;
  background: var(--dot); flex: none;
}

/* --- Formular ---------------------------------------------------------- */
.field { display: flex; flex-direction: column; gap: 7px; }
.field + .field { margin-top: 12px; }
.field label {
  font: 600 11.5px/1 var(--sans);
  letter-spacing: .08em;
  text-transform: uppercase;
  color: var(--text-muted);
}
.field input, .field textarea, .field select {
  height: 52px;
  padding: 0 15px;
  border: 1px solid var(--border-control);
  border-radius: var(--r-card-s);
  background: var(--card);
  font-size: 15px;
  color: var(--text);
  width: 100%;
}
.field textarea { height: auto; padding: 12px 15px; resize: vertical; }
.field input:focus, .field textarea:focus, .field select:focus {
  outline: none;
  border-color: var(--accent);
  box-shadow: 0 0 0 3px var(--accent-10);
}
.field input[aria-invalid='true'] { border-color: var(--danger); }
.field-error { font: 500 11.5px/1.4 var(--sans); color: var(--danger); }

.consent {
  display: flex; gap: 11px; align-items: flex-start;
  padding: 14px 15px;
  border: 1px solid var(--border-control);
  border-radius: var(--r-card-s);
  background: var(--card);
  margin-top: 12px;
  text-align: left;
  width: 100%;
  transition: all .16s ease;
}
.consent[aria-pressed='true'] { border-color: var(--accent); background: var(--accent-06); }
.consent .mark { width: 21px; height: 21px; border-radius: var(--r-chip); margin-top: 1px; }
.consent span { font: 400 12.5px/1.45 var(--sans); color: var(--text-2); }

.status-line { font: 500 11.5px/1.4 var(--sans); color: var(--text-weak); margin-top: 12px; }

/* --- Bildflächen ------------------------------------------------------- */
/* Kopfbild auf der Startseite. Das Porträt ist freigestellt, der Verlauf
   dahinter ersetzt den Hintergrund. Der Ausschnitt portrait-hero zeigt Kopf
   und Schultern — deshalb hier "cover" mit Ausrichtung nach oben, damit beim
   Beschneiden nur unten etwas wegfällt und nie das Gesicht. */
.hero {
  height: 260px;
  border-radius: var(--r-hero);
  overflow: hidden;
  position: relative;
  background: linear-gradient(158deg, #eaeff5 0%, #f4f2ee 62%, #f0ece5 100%);
}
.hero img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center top;
  display: block;
}

@media (max-height: 700px) {
  .hero { height: 210px; }
}

.avatar {
  border-radius: var(--r-card-s);
  background: linear-gradient(158deg, #eaeff5, #f4f2ee);
  overflow: hidden;
  flex: none;
}
.avatar img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center 12%;
  display: block;
}
.avatar-52 { width: 52px; height: 52px; }
.avatar-44 { width: 44px; height: 44px; border-radius: 12px; }
.avatar-36 { width: 36px; height: 36px; border-radius: 10px; }

.logo { height: 30px; width: auto; opacity: .85; }

/* --- Sonstiges --------------------------------------------------------- */
.toast {
  min-height: 18px;
  margin-top: 10px;
  text-align: center;
  font: 500 11.5px/1.5 var(--sans);
  color: var(--text-weak);
}

.footnote {
  margin-top: 12px;
  text-align: center;
  font: 500 12px/1.5 var(--sans);
  color: var(--text-muted);
}

.legal-links {
  margin-top: 18px;
  text-align: center;
  font: 500 11.5px/1.6 var(--sans);
  color: var(--text-muted);
}
.legal-links a { color: var(--text-muted); text-decoration: underline; }

.spacer { flex: 1; min-height: 20px; }

.tiles { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }
.tile {
  border-radius: var(--r-btn);
  padding: 16px;
  background: var(--card);
  border: 1px solid var(--border-card);
}
.tile .num { font: 400 32px/1 var(--serif); }
.tile .num small { font-size: 17px; color: var(--text-weak); }
.tile .lbl { font: 500 11.5px/1.3 var(--sans); color: var(--text-muted); margin-top: 6px; }
.tile-accent { background: var(--accent); border-color: transparent; color: var(--on-dark); }
.tile-accent .lbl { color: var(--on-dark); opacity: .75; }

.check-circle {
  width: 54px; height: 54px;
  border-radius: 50%;
  background: var(--accent);
  color: var(--on-dark);
  display: flex; align-items: center; justify-content: center;
  font-size: 24px;
}
