/* Layout: eine Karte pro Aussage in schmaler Spalte; Ergebnis mit maßstabsgetreuem Koordinatensystem (z-Werte).
   Typfarben: Sonnengelb, Korallenrot, Seeblau, Salbeigrün, Regenbogen in der Mitte. Nur Systemschriften (keine externen Server). */
:root {
  --bg: #f3f5f7;
  --surface: #ffffff;
  --ink: #1d2430;
  --muted: #5a6474;
  --line: #d7dce3;
  --accent: #3b5b8c;
  --sonne: #e9a915;
  --koralle: #e2603f;
  --see: #3a78ad;
  --eiche: #5f945b;
  --flieder: #8c78c2;
  --font-display: "Iowan Old Style", "Palatino Linotype", Palatino, Georgia, serif;
  --font-body: system-ui, -apple-system, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
  --font-mono: ui-monospace, "SF Mono", Consolas, "Liberation Mono", monospace;
  color-scheme: light;
}
@media (prefers-color-scheme: dark) {
  :root {
    --bg: #12161c; --surface: #1a2029; --ink: #e6e9ee; --muted: #9ba5b5; --line: #2d3644; --accent: #9db8e6;
    --sonne: #f2c04a; --koralle: #f0846a; --see: #74a9d8; --eiche: #8fc08a; --flieder: #b3a3e3; color-scheme: dark;
  }
}
* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body { margin: 0; background: var(--bg); color: var(--ink); font-family: var(--font-body); font-size: 17px; line-height: 1.55; }
.page {
  max-width: 760px; margin: 0 auto;
  padding-left: max(16px, env(safe-area-inset-left, 0px));
  padding-right: max(16px, env(safe-area-inset-right, 0px));
  padding-block: 32px 40px;
  display: grid; gap: 28px;
}
h1, h2 { font-family: var(--font-display); font-weight: 650; line-height: 1.15; margin: 0; text-wrap: balance; }
h1 { font-size: clamp(2rem, 6vw, 2.8rem); }
h2 { font-size: 1.6rem; }
p { margin: 0; max-width: 66ch; }
.eyebrow { font-family: var(--font-mono); font-size: 0.76rem; letter-spacing: 0.08em; text-transform: uppercase; color: var(--muted); }
.muted { color: var(--muted); }
.small { font-size: 0.9rem; }
.card { background: var(--surface); border: 1px solid var(--line); border-radius: 14px; padding: 22px; display: grid; gap: 16px; min-width: 0; }
.row { display: flex; flex-wrap: wrap; gap: 10px; align-items: center; }
button, select { font: inherit; }
button { cursor: pointer; }
.btn { border: 1px solid var(--accent); background: var(--accent); color: var(--surface); border-radius: 999px; padding: 10px 20px; font-weight: 600; }
.btn.ghost { background: transparent; color: var(--accent); }
.btn:disabled { opacity: 0.45; cursor: default; }
.link { border: none; background: none; color: var(--accent); padding: 0; text-decoration: underline; font-size: 0.9rem; }
a { color: var(--accent); }
:focus-visible { outline: 3px solid color-mix(in srgb, var(--accent) 55%, transparent); outline-offset: 2px; }
.swatches { display: flex; gap: 8px; flex-wrap: wrap; }
.sw { display: inline-flex; align-items: center; gap: 6px; font-size: 0.88rem; padding: 3px 10px 3px 4px; border: 1px solid var(--line); border-radius: 999px; background: var(--surface); }
.sw i { width: 16px; height: 16px; border-radius: 50%; display: inline-block; }
.rainbow { background: conic-gradient(var(--sonne), var(--koralle), var(--flieder), var(--see), var(--eiche), var(--sonne)); }
.c-sonne { background: var(--sonne); } .c-koralle { background: var(--koralle); } .c-see { background: var(--see); } .c-eiche { background: var(--eiche); }
.choice { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }
.choice button { border: 1px solid var(--line); background: var(--bg); color: var(--ink); border-radius: 12px; padding: 18px 14px; display: grid; gap: 4px; text-align: left; }
.choice button:hover { border-color: var(--accent); }
.choice b { font-family: var(--font-display); font-size: 1.6rem; }
.choice span { font-size: 0.9rem; color: var(--muted); }

.progress { height: 6px; background: var(--line); border-radius: 999px; overflow: hidden; }
.progress > div { height: 100%; background: var(--accent); width: 0; transition: width 0.25s ease; }
.qmeta { display: flex; justify-content: space-between; gap: 10px; flex-wrap: wrap; font-size: 0.88rem; color: var(--muted); }
.interlude { font-size: 0.95rem; color: var(--accent); font-weight: 600; }
.statement { font-family: var(--font-display); font-size: clamp(1.4rem, 4.2vw, 1.85rem); font-weight: 500; line-height: 1.3; min-height: 3.2em; }
.answers { display: grid; gap: 8px; }
.answer { display: flex; align-items: center; gap: 12px; text-align: left; border: 1px solid var(--line); background: var(--bg); color: var(--ink); border-radius: 10px; padding: 12px 14px; }
.answer .dot { width: 18px; height: 18px; border-radius: 50%; border: 2px solid var(--muted); flex: none; }
.answer:hover { border-color: var(--accent); }
.answer[aria-pressed="true"] { border-color: var(--accent); background: color-mix(in srgb, var(--accent) 12%, var(--surface)); }
.answer[aria-pressed="true"] .dot { border-color: var(--accent); background: var(--accent); box-shadow: inset 0 0 0 3px var(--surface); }
.answer kbd { margin-left: auto; font-family: var(--font-mono); font-size: 0.75rem; color: var(--muted); }

.form { display: grid; gap: 14px; }
.field { display: grid; gap: 6px; }
.field label, .field .lab { font-weight: 600; font-size: 0.95rem; }
select, textarea { width: 100%; border: 1px solid var(--line); border-radius: 10px; padding: 10px 12px; background: var(--bg); color: var(--ink); }
textarea { font: inherit; min-height: 5em; resize: vertical; }
.consent { display: flex; gap: 12px; align-items: flex-start; border: 1px solid var(--line); border-radius: 10px; padding: 12px 14px; background: var(--bg); }
.consent input { width: 20px; height: 20px; margin-top: 3px; flex: none; accent-color: var(--accent); }

.result-head { display: grid; gap: 8px; }
.typename { display: flex; align-items: center; gap: 12px; flex-wrap: wrap; }
.typename .big { width: 34px; height: 34px; border-radius: 50%; flex: none; }
.chips { display: flex; gap: 8px; flex-wrap: wrap; }
.chip { font-size: 0.85rem; padding: 3px 10px; border-radius: 999px; border: 1px solid var(--line); background: var(--bg); }
.chip.ok { border-color: var(--eiche); }
.chip.mid { border-color: var(--sonne); }
.chip.low { border-color: var(--koralle); }
.diagram { overflow-x: auto; }
.diagram svg { display: block; width: 100%; min-width: 520px; height: auto; }
svg .axis { stroke: var(--ink); stroke-width: 1.3; }
svg .arrow { fill: var(--ink); }
svg .lbl { font-family: var(--font-body); font-size: 14px; font-weight: 600; fill: var(--ink); }
svg .qn { font-family: var(--font-display); font-size: 22px; font-weight: 650; fill: var(--ink); }
svg .gridl { stroke: var(--line); stroke-dasharray: 3 4; }
svg .midc { fill: var(--surface); stroke: var(--flieder); stroke-width: 2; }
svg .midt { font-family: var(--font-display); font-size: 15px; font-weight: 650; fill: var(--ink); }
svg .you { fill: var(--ink); stroke: var(--surface); stroke-width: 3; }
svg .youl { font-family: var(--font-body); font-size: 13px; font-weight: 700; fill: var(--ink); }
.q-see { fill: color-mix(in srgb, var(--see) 16%, transparent); }
.q-koralle { fill: color-mix(in srgb, var(--koralle) 16%, transparent); }
.q-eiche { fill: color-mix(in srgb, var(--eiche) 16%, transparent); }
.q-sonne { fill: color-mix(in srgb, var(--sonne) 20%, transparent); }
.cols { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 14px; }
@media (max-width: 620px) { .cols { grid-template-columns: 1fr; } }
.box { border: 1px solid var(--line); border-radius: 10px; padding: 14px; display: grid; gap: 6px; min-width: 0; background: var(--bg); align-content: start; }
.box b.t { font-size: 0.78rem; letter-spacing: 0.06em; text-transform: uppercase; color: var(--muted); }
.mbar { display: grid; grid-template-columns: 7.5em 1fr 3.4em; align-items: center; gap: 10px; font-size: 0.95rem; }
.mbar .track { height: 10px; background: var(--line); border-radius: 999px; overflow: hidden; }
.mbar .fill { height: 100%; background: var(--accent); border-radius: 999px; }
.mbar .v { font-family: var(--font-mono); font-size: 0.8rem; color: var(--muted); text-align: right; font-variant-numeric: tabular-nums; }
.rate { display: flex; flex-wrap: wrap; gap: 8px; }
.rate button { border: 1px solid var(--line); background: var(--bg); color: var(--ink); border-radius: 999px; padding: 6px 14px; }
.rate button[aria-pressed="true"] { border-color: var(--accent); background: color-mix(in srgb, var(--accent) 14%, var(--surface)); font-weight: 600; }
.copyout { font-family: var(--font-mono); font-size: 0.8rem; min-height: 9em; }
.ok-msg { color: var(--eiche); font-weight: 600; font-size: 0.92rem; }
.err-msg { color: var(--koralle); font-weight: 600; font-size: 0.92rem; }
details { border-top: 1px solid var(--line); padding-top: 12px; }
summary { cursor: pointer; font-weight: 600; }
.table-wrap { overflow-x: auto; margin-top: 10px; }
table { border-collapse: collapse; width: 100%; font-size: 0.9rem; }
th, td { text-align: left; padding: 6px 8px; border-bottom: 1px solid var(--line); vertical-align: top; }
th { color: var(--muted); font-size: 0.75rem; text-transform: uppercase; letter-spacing: 0.06em; }
td.num { font-family: var(--font-mono); font-variant-numeric: tabular-nums; white-space: nowrap; }
.note { font-size: 0.88rem; color: var(--muted); }
.warn { border-left: 3px solid var(--sonne); padding-left: 12px; display: grid; gap: 4px; }
.site-footer { max-width: 760px; margin: 0 auto; padding: 0 max(16px, env(safe-area-inset-right, 0px)) 32px max(16px, env(safe-area-inset-left, 0px)); font-size: 0.85rem; color: var(--muted); display: flex; gap: 14px; flex-wrap: wrap; }
noscript p { padding: 24px 16px; }
@media (prefers-reduced-motion: reduce) { .progress > div { transition: none; } }
