/* Layout: blaues Kopfband mit Ablauf, Startkarte, dann Bilder -> Person -> Vorhersagen (Seitenleiste + Antwortspalte) */
:root {
  --navy: #0F2239;
  --deep: #1A3A5C;
  --petrol: #2E86AB;
  --amber: #F59E0B;
  --muted: #65758B;
  --ground: #F4F7FA;
  --surface: #FFFFFF;
  --line: #DCE3EB;
  --ink: var(--navy);
  --band: var(--deep);
  --chip: #E6EEF5;
  --accent-ink: #1F6F93;
  --ok: #2E86AB;
  --font-display: "Playfair Display", Georgia, serif;
  --font-body: Lato, Calibri, Helvetica, Arial, sans-serif;
  --r: 10px;
  color-scheme: light;
}
@media (prefers-color-scheme: dark) {
  :root {
    color-scheme: dark;
    --ground: #070C14; --surface: #0F2239; --ink: #E8EEF5; --muted: #93A3B8; --line: #22395A;
    --band: #0F2239; --chip: #1A3A5C; --petrol: #3B8DB3; --amber: #E08A0B; --accent-ink: #7CC0DE;
  }
}
* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body { margin: 0; background: var(--ground); color: var(--ink); font: 16px/1.55 var(--font-body);
  padding-bottom: env(safe-area-inset-bottom, 0px); }
img { max-width: 100%; }
[hidden] { display: none !important; }
.wrap { max-width: 1180px; margin: 0 auto; padding-inline: max(20px, env(safe-area-inset-left, 0px)); }
h1, h2, h3 { font-family: var(--font-display); text-wrap: balance; margin: 0; line-height: 1.15; }
h2 { font-size: clamp(1.6rem, 3vw, 2.1rem); font-weight: 700; }
h3 { font-size: 1.15rem; font-weight: 700; }
p { margin: 0; }
.lede { color: var(--muted); max-width: 65ch; }
.on-dark { color: #C9D6E4; }
.eyebrow { font-size: .75rem; letter-spacing: .12em; text-transform: uppercase; font-weight: 700; color: var(--accent-ink); }
.eyebrow.on-dark { color: #8EC6E0; }
.sr { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
button, select, input, textarea { font: inherit; color: inherit; }
:focus-visible { outline: 3px solid var(--amber); outline-offset: 2px; }
a { color: var(--accent-ink); }

header.band { background: var(--band); color: #fff; padding-block: calc(env(safe-area-inset-top, 0px) + 40px) 32px; }
header.band .wrap { display: grid; gap: 18px; }
header.band h1 { font-size: clamp(2.6rem, 6vw, 4.2rem); font-weight: 900; }
header.band .lede { font-size: 1.1rem; }
.steps { display: flex; flex-wrap: wrap; gap: 10px 26px; list-style: none; padding: 0; margin: 0; counter-reset: s; }
.steps li { counter-increment: s; display: flex; align-items: center; gap: 10px; font-weight: 700; }
.steps li::before { content: counter(s); display: grid; place-items: center; width: 28px; height: 28px; border-radius: 50%;
  border: 2px solid #5FA8CC; font-size: .9rem; }

main section { padding-block: 44px 8px; display: grid; gap: 22px; }
.sec-head { display: flex; flex-wrap: wrap; align-items: end; justify-content: space-between; gap: 12px 24px; }
.sec-head > div { display: grid; gap: 8px; }
.panel { background: var(--surface); border: 1px solid var(--line); border-radius: var(--r); padding: 18px; }
.stack { display: grid; gap: 12px; }

.btn { border: 0; border-radius: 999px; padding: 11px 20px; font-weight: 700; cursor: pointer; background: var(--deep); color: #fff; }
.btn:disabled { opacity: .5; cursor: not-allowed; }
.btn.ghost { background: transparent; color: var(--ink); border: 1.5px solid var(--line); }
.btn.signal { background: var(--amber); color: #0F2239; }
.btn-sm { padding: 7px 14px; font-size: .88rem; }
.pill { display: inline-flex; align-items: center; gap: 6px; font-size: .8rem; font-weight: 700; padding: 4px 11px; border-radius: 999px; background: var(--chip); }
.pill.ok::before, .pill.todo::before { content: ""; width: 8px; height: 8px; border-radius: 50%; }
.pill.ok::before { background: var(--ok); }
.pill.todo::before { background: var(--amber); }
.status { font-size: .88rem; color: var(--muted); min-height: 1.3em; }
.status.err { color: var(--ink); font-weight: 700; }
.status.err::before { content: "⚠ "; color: var(--amber); }

/* Start */
.start { max-width: 640px; display: grid; gap: 16px; }
.field { display: grid; gap: 6px; font-weight: 700; font-size: .9rem; }
input[type="text"], input:not([type]), select, textarea { background: var(--ground); border: 1.5px solid var(--line); border-radius: 8px; padding: 10px 12px; color: var(--ink); width: 100%; }
#code { text-transform: uppercase; letter-spacing: .08em; max-width: 260px; }
.check { display: grid; grid-template-columns: auto 1fr; gap: 10px; align-items: start; font-size: .92rem; }
.check input { width: 20px; height: 20px; margin-top: 2px; accent-color: var(--petrol); }
.privacy summary { cursor: pointer; font-weight: 700; color: var(--accent-ink); font-size: .9rem; }
.privacy-body { display: grid; gap: 8px; margin-top: 10px; font-size: .9rem; color: var(--muted); max-width: 65ch; }

/* Bilder */
.grid-img { display: grid; grid-template-columns: repeat(auto-fill, minmax(250px, 1fr)); gap: 18px; }
.card { background: var(--surface); border: 1px solid var(--line); border-radius: var(--r); overflow: hidden; display: grid; grid-template-rows: auto 1fr; }
.card img { width: 100%; height: auto; aspect-ratio: 4 / 3; object-fit: cover; display: block; background: var(--chip); }
.card .body { padding: 12px 14px 14px; display: grid; gap: 10px; align-content: start; }
.card .cap { font-size: .9rem; min-height: 2.9em; }
.card.done { border-color: var(--petrol); }
fieldset { border: 0; padding: 0; margin: 0; min-width: 0; }
.scale { display: grid; grid-template-columns: repeat(7, 1fr); gap: 4px; }
.scale.five { grid-template-columns: repeat(5, 1fr); }
.scale.two { grid-template-columns: repeat(2, 1fr); }
.scale input, .seg input { position: absolute; opacity: 0; pointer-events: none; }
.scale label { display: grid; place-items: center; min-height: 38px; padding: 4px; border-radius: 6px; border: 1.5px solid var(--line); cursor: pointer;
  font-size: .85rem; font-variant-numeric: tabular-nums; color: var(--muted); user-select: none; text-align: center; }
.scale label:hover { border-color: var(--petrol); color: var(--ink); }
.scale input:checked + label { background: var(--petrol); border-color: var(--petrol); color: #fff; font-weight: 700; }
.scale input:focus-visible + label, .seg input:focus-visible + label { outline: 3px solid var(--amber); outline-offset: 1px; }
.ends { display: flex; justify-content: space-between; font-size: .72rem; color: var(--muted); }

/* Person */
.demo { display: grid; grid-template-columns: repeat(auto-fit, minmax(200px, 1fr)); gap: 14px; }
.demo label { display: grid; gap: 6px; font-size: .85rem; font-weight: 700; color: var(--muted); }

/* Fragen */
.ask-layout { display: grid; grid-template-columns: minmax(0, 380px) minmax(0, 1fr); gap: 24px; align-items: start; }
@media (max-width: 860px) { .ask-layout { grid-template-columns: 1fr; } }
.side { display: grid; gap: 16px; position: sticky; top: 12px; }
@media (max-width: 860px) { .side { position: static; } }
.qlist { margin: 0; padding-left: 1.2em; display: grid; gap: 6px; font-size: .9rem; }
.qlist .typ { color: var(--muted); font-size: .78rem; }
textarea { min-height: 88px; resize: vertical; }
.seg { display: grid; grid-template-columns: repeat(3, 1fr); border: 1.5px solid var(--line); border-radius: 8px; overflow: hidden; }
.seg label { text-align: center; padding: 8px 4px; font-size: .85rem; font-weight: 700; cursor: pointer; color: var(--muted); }
.seg input:checked + label { background: var(--deep); color: #fff; }

.answers { display: grid; gap: 16px; }
.answer { background: var(--surface); border: 1px solid var(--line); border-radius: var(--r); padding: 18px 20px; display: grid; gap: 14px; }
.answer.pending { border-style: dashed; }
.answer .q { font-family: var(--font-display); font-size: 1.15rem; font-weight: 700; }
.meta { display: flex; flex-wrap: wrap; gap: 8px; }
.why { color: var(--muted); font-size: .92rem; max-width: 70ch; }
.open-text { max-width: 70ch; }
.ev { font-variant-numeric: tabular-nums; }
.ev b { font-family: var(--font-display); font-size: 1.6rem; }
.dist { display: grid; grid-template-columns: repeat(5, minmax(0, 1fr)); gap: 2px; align-items: end; height: 120px; max-width: 460px; }
.dist .col { display: grid; grid-template-rows: auto 1fr; height: 100%; text-align: center; }
.dist .val { font-size: .8rem; font-variant-numeric: tabular-nums; }
.dist .track { display: flex; align-items: end; height: 100%; }
.dist .bar { width: 100%; background: var(--petrol); border-radius: 4px 4px 0 0; min-height: 2px; }
.dist-axis { display: grid; grid-template-columns: repeat(5, minmax(0, 1fr)); gap: 2px; max-width: 460px; border-top: 1px solid var(--line);
  font-size: .78rem; color: var(--muted); text-align: center; padding-top: 4px; }
.yn { display: grid; gap: 6px; max-width: 460px; }
.yn .track { height: 14px; background: var(--chip); border-radius: 999px; overflow: hidden; display: flex; }
.yn .fill { background: var(--petrol); }
.yn .lbl { display: flex; justify-content: space-between; font-size: .8rem; color: var(--muted); }
.fb { border-top: 1px solid var(--line); padding-top: 14px; display: grid; gap: 10px; }
.fb .ask { font-weight: 700; font-size: .95rem; }
.fb textarea { min-height: 56px; font-size: .9rem; }
.fb .row { display: flex; flex-wrap: wrap; gap: 10px; align-items: center; }
.thanks { color: var(--accent-ink); font-weight: 700; font-size: .9rem; }
.empty { display: grid; gap: 8px; }

footer { padding-block: 48px 40px; }
footer .wrap { display: flex; flex-wrap: wrap; justify-content: space-between; gap: 24px; border-top: 1px solid var(--line); padding-top: 24px; }
.sig .name { font-family: var(--font-display); font-weight: 700; font-size: 1.1rem; }
.sig p { color: var(--muted); font-size: .9rem; }
.small { font-size: .82rem; color: var(--muted); max-width: 60ch; }
@media (prefers-reduced-motion: no-preference) { .bar, .fill { transition: height .4s ease, width .4s ease; } }

/* Konfidenzintervall: 80-%-Bereich hell, 95-%-KI petrol, kalibrierter Mittelwert als Punkt */
.ci { display: grid; gap: 6px; max-width: 460px; }
.ci-strip { position: relative; height: 18px; }
.ci-strip::before { content: ""; position: absolute; left: 0; right: 0; top: 8px; height: 2px; background: var(--line); }
.ci-80 { position: absolute; top: 6px; height: 6px; border-radius: 3px; background: var(--chip); }
.ci-95 { position: absolute; top: 4px; height: 10px; border-radius: 5px; background: var(--petrol); opacity: .45; }
.ci-dot { position: absolute; top: 2px; width: 14px; height: 14px; margin-left: -7px; border-radius: 50%;
  background: var(--ink); box-shadow: 0 0 0 2px var(--surface); }
.ci-text { font-size: .88rem; font-variant-numeric: tabular-nums; }
.ci-text .muted, .ci-help p { color: var(--muted); }
.ci-help summary { cursor: pointer; font-size: .8rem; font-weight: 700; color: var(--accent-ink); }
.ci-help p { font-size: .82rem; margin-top: 4px; }
