/* Layout: ein ruhiger Lesestreifen (max. 760px), eine Frage pro Bildschirm, feste Navigation unten. */

/* Schrift lokal ausgeliefert (Inter, SIL Open Font License), keine Verbindung zu Google Fonts. */
@font-face {
  font-family: "Inter";
  font-style: normal;
  font-weight: 100 900;
  font-display: swap;
  src: url("fonts/inter-latin-ext-wght-normal.woff2") format("woff2-variations");
  unicode-range: U+0100-02BA, U+02BD-02C5, U+02C7-02CC, U+02CE-02D7, U+02DD-02FF, U+0304, U+0308, U+0329, U+1D00-1DBF, U+1E00-1E9F, U+1EF2-1EFF, U+2020, U+20A0-20AB, U+20AD-20C0, U+2113, U+2C60-2C7F, U+A720-A7FF;
}
@font-face {
  font-family: "Inter";
  font-style: normal;
  font-weight: 100 900;
  font-display: swap;
  src: url("fonts/inter-latin-wght-normal.woff2") format("woff2-variations");
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
}

:root {
  color-scheme: light;
  --bg: #F4F6F9;
  --surface: #FFFFFF;
  --ink: #0F1D33;
  --muted: #55627A;
  --navy: #0B2447;
  --accent: #1F5FD1;
  --accent-ink: #FFFFFF;
  --sel: #E6EFFC;
  --border: #D3DAE5;
  --track: #DFE5EE;
  --ok-bg: #E6F4EC;
  --ok-ink: #1E7A4F;
  --err-bg: #FCEBEA;
  --err-ink: #A12A22;
  --focus: #1F5FD1;
  --ring: rgba(31, 95, 209, .14);
  --font: "Inter", system-ui, -apple-system, "Segoe UI", Roboto, Arial, sans-serif;
}
@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) {
    color-scheme: dark;
    --bg: #0C1424; --surface: #131E33; --ink: #EAF0FA; --muted: #A3B1C8; --navy: #9CBBF2;
    --accent: #5B94F0; --accent-ink: #08142B; --sel: #1B2E52; --border: #2A3A57; --track: #24324D;
    --ok-bg: #12301F; --ok-ink: #6FD3A0; --err-bg: #3A1816; --err-ink: #FF9F98;
    --focus: #8DB4F7; --ring: rgba(141, 180, 247, .18);
  }
}
:root[data-theme="dark"] {
  color-scheme: dark;
  --bg: #0C1424; --surface: #131E33; --ink: #EAF0FA; --muted: #A3B1C8; --navy: #9CBBF2;
  --accent: #5B94F0; --accent-ink: #08142B; --sel: #1B2E52; --border: #2A3A57; --track: #24324D;
  --ok-bg: #12301F; --ok-ink: #6FD3A0; --err-bg: #3A1816; --err-ink: #FF9F98;
  --focus: #8DB4F7; --ring: rgba(141, 180, 247, .18);
}

* { box-sizing: border-box; }
html { height: 100%; }
body {
  margin: 0; min-height: 100%;
  background: var(--bg); color: var(--ink);
  font-family: var(--font); font-size: 18px; line-height: 1.55;
  padding-inline: 20px; padding-block: 0;
  -webkit-font-smoothing: antialiased;
}
.wrap { max-width: 760px; margin-inline: auto; min-height: 100vh; min-height: 100dvh; display: flex; flex-direction: column; padding-top: 28px; }
.brandline { font-size: 13px; letter-spacing: .14em; text-transform: uppercase; color: var(--muted); font-weight: 600; }

button, input, textarea { font: inherit; color: inherit; }
:focus-visible { outline: 3px solid var(--focus); outline-offset: 2px; }
.sr { position: absolute; left: -9999px; width: 1px; height: 1px; overflow: hidden; }
.noscript { max-width: 760px; margin: 40px auto; padding: 20px; background: var(--surface); border: 1px solid var(--border); border-radius: 12px; }

/* Sprachumschalter */
.langbar { display: flex; justify-content: space-between; align-items: center; gap: 12px; }
.langbar.end { justify-content: flex-end; margin-bottom: 18px; }
.lang { display: inline-flex; flex: none; border: 1.5px solid var(--border); border-radius: 10px; overflow: hidden; background: var(--surface); }
.lang button { border: 0; background: transparent; padding: 0 14px; min-height: 40px; font-weight: 600; font-size: 15px; letter-spacing: .04em; color: var(--muted); cursor: pointer; transition: background-color .15s ease, color .15s ease; }
.lang button[aria-pressed="true"] { background: var(--accent); color: var(--accent-ink); }
.lang button:hover:not([aria-pressed="true"]) { background: var(--sel); color: var(--ink); }
.lang button:focus-visible { outline-offset: -3px; }

/* Startseite */
.start { margin-block: 28px 40px; background: var(--surface); border: 1px solid var(--border); border-radius: 20px; padding: clamp(24px, 6vw, 56px); position: relative; overflow: hidden; }
.ridge { position: absolute; right: 0; bottom: 0; width: min(70%, 420px); height: auto; opacity: .9; pointer-events: none; }
.ridge path.a { fill: var(--sel); }
.ridge path.b { fill: var(--track); opacity: .6; }
.start > *:not(.ridge) { position: relative; }
.start h1 { margin: 22px 0 14px; font-size: clamp(32px, 7vw, 52px); line-height: 1.08; letter-spacing: -.02em; color: var(--navy); font-weight: 700; text-wrap: balance; max-width: 14ch; }
.start p { max-width: 52ch; color: var(--muted); margin: 0 0 14px; font-size: 19px; }
.facts { list-style: none; padding: 0; margin: 26px 0 30px; display: grid; gap: 12px; }
.facts li { display: flex; align-items: center; gap: 12px; font-size: 17px; font-weight: 500; }
.facts svg { width: 22px; height: 22px; flex: none; stroke: var(--accent); fill: none; stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round; }
.privacy-short { font-size: 14.5px !important; line-height: 1.5; margin-top: 22px !important; max-width: 60ch !important; }

.btn { display: inline-flex; align-items: center; justify-content: center; gap: 10px; min-height: 54px; padding: 0 28px; border-radius: 12px; border: 1.5px solid transparent; font-weight: 600; font-size: 17px; cursor: pointer; text-decoration: none; transition: filter .15s ease, background-color .15s ease, box-shadow .15s ease; }
.btn.primary { background: var(--accent); color: var(--accent-ink); }
.btn.primary:hover:not(:disabled) { filter: brightness(1.1); box-shadow: 0 0 0 4px var(--ring); }
.btn.primary:disabled { background: var(--track); color: var(--muted); cursor: not-allowed; }
.btn.ghost { background: transparent; color: var(--muted); padding: 0 14px; font-weight: 500; font-size: 16px; }
.btn.ghost:hover:not(:disabled) { color: var(--ink); background: var(--track); }
.btn.ghost:disabled { opacity: .4; cursor: not-allowed; }
.btn.big { min-height: 60px; padding: 0 34px; font-size: 18px; }
.spinner { width: 18px; height: 18px; border: 2.5px solid currentColor; border-right-color: transparent; border-radius: 50%; animation: spin .8s linear infinite; }
@keyframes spin { to { transform: rotate(360deg); } }

/* Fragen */
.top { padding-top: 6px; }
.cat { font-size: 13px; letter-spacing: .12em; text-transform: uppercase; color: var(--muted); font-weight: 600; margin: 0; }
.top .langbar { margin-bottom: 18px; }
.meta { display: flex; justify-content: space-between; gap: 12px; font-size: 15px; color: var(--muted); font-variant-numeric: tabular-nums; margin-bottom: 10px; }
.bar { height: 6px; background: var(--track); border-radius: 99px; overflow: hidden; }
.bar > i { display: block; height: 100%; background: var(--accent); border-radius: 99px; transition: width .35s ease; }
.qbody { flex: 1; padding-block: 36px 28px; }
h1.q { margin: 0 0 12px; font-size: clamp(26px, 5.4vw, 36px); line-height: 1.2; letter-spacing: -.015em; font-weight: 650; color: var(--navy); text-wrap: balance; outline: none; }
.hint { margin: 0 0 26px; color: var(--muted); font-size: 18px; }
.count { font-variant-numeric: tabular-nums; }

.grid { display: grid; gap: 12px; grid-template-columns: 1fr; border: 0; padding: 0; margin: 0; min-width: 0; }
@media (min-width: 640px) { .grid.two { grid-template-columns: 1fr 1fr; } }

/* Hover bewegt nichts: nur Rand, Hintergrund und ein weicher Ring blenden ein. */
.card { position: relative; display: flex; align-items: center; gap: 14px; min-height: 64px; padding: 14px 18px; background: var(--surface); border: 1.5px solid var(--border); border-radius: 12px; cursor: pointer; font-size: 17.5px; line-height: 1.4; transition: border-color .18s ease, background-color .18s ease, box-shadow .18s ease; min-width: 0; }
.card:hover { border-color: var(--accent); background: var(--sel); box-shadow: 0 0 0 4px var(--ring); }
.card input { position: absolute; opacity: 0; width: 1px; height: 1px; pointer-events: none; }
.mark { flex: none; width: 24px; height: 24px; border: 2px solid var(--muted); border-radius: 6px; display: grid; place-items: center; background: var(--surface); transition: background-color .18s ease, border-color .18s ease; }
.card:hover .mark { border-color: var(--accent); }
.mark::after { content: ""; width: 6px; height: 11px; border: solid var(--accent-ink); border-width: 0 2.5px 2.5px 0; transform: rotate(45deg) scale(0); margin-top: -2px; transition: transform .15s ease; }
.card:has(input:checked) { border-color: var(--accent); background: var(--sel); box-shadow: inset 0 0 0 1px var(--accent); }
.card:has(input:checked):hover { box-shadow: inset 0 0 0 1px var(--accent), 0 0 0 4px var(--ring); }
.card:has(input:checked) .mark { border-color: var(--accent); background: var(--accent); }
.card:has(input:checked) .mark::after { transform: rotate(45deg) scale(1); }
.card:has(input:focus-visible) { outline: 3px solid var(--focus); outline-offset: 2px; }
.card:has(input:disabled) { opacity: .5; cursor: not-allowed; border-color: var(--border); background: var(--surface); box-shadow: none; }
.card:has(input:disabled) .mark { border-color: var(--muted); }
.txt { flex: 1; min-width: 0; overflow-wrap: anywhere; }

.other { margin-top: 14px; }
.flabel { display: block; font-size: 15px; color: var(--muted); margin-bottom: 6px; }
.field { width: 100%; background: var(--surface); border: 1.5px solid var(--border); border-radius: 12px; padding: 14px 16px; font-size: 18px; }
textarea.field { min-height: 190px; resize: vertical; line-height: 1.5; }
.field:focus { border-color: var(--accent); outline: 3px solid var(--focus); outline-offset: 1px; }
.field[aria-invalid="true"] { border-color: var(--err-ink); }
.under { display: flex; justify-content: space-between; margin-top: 8px; font-size: 15px; color: var(--muted); font-variant-numeric: tabular-nums; }

/* Skala 0 bis 10 */
.scale { display: grid; grid-template-columns: repeat(11, 1fr); gap: 8px; border: 0; padding: 0; margin: 0; min-width: 0; }
@media (max-width: 560px) { .scale { grid-template-columns: repeat(6, 1fr); } }
.sc { position: relative; display: grid; place-items: center; min-height: 58px; border: 1.5px solid var(--border); border-radius: 12px; background: var(--surface); font-size: 20px; font-weight: 500; cursor: pointer; font-variant-numeric: tabular-nums; transition: border-color .18s ease, background-color .18s ease, box-shadow .18s ease; }
.sc:hover { border-color: var(--accent); background: var(--sel); box-shadow: 0 0 0 4px var(--ring); }
.sc input { position: absolute; opacity: 0; width: 1px; height: 1px; }
.sc:has(input:checked), .sc:has(input:checked):hover { background: var(--accent); color: var(--accent-ink); border-color: var(--accent); }
.sc:has(input:focus-visible) { outline: 3px solid var(--focus); outline-offset: 2px; }
.ends { display: flex; justify-content: space-between; gap: 16px; margin-top: 12px; font-size: 15px; color: var(--muted); }

/* Absende-Seite */
.panel { background: var(--surface); border: 1px solid var(--border); border-radius: 16px; padding: clamp(18px, 4vw, 28px); margin-top: 8px; }
.panel .flabel { font-size: 16px; color: var(--ink); font-weight: 600; margin-bottom: 8px; }
.note { margin: 14px 0 0; font-size: 14.5px; line-height: 1.55; color: var(--muted); }
.note strong { color: var(--ink); font-weight: 600; }
.ts { margin-top: 18px; min-height: 66px; }
.msg { margin-top: 16px; padding: 12px 16px; border-radius: 12px; font-size: 16px; line-height: 1.5; }
.msg.err { background: var(--err-bg); color: var(--err-ink); }
.msg.info { background: var(--sel); color: var(--ink); }
.hp { position: absolute; left: -9999px; width: 1px; height: 1px; overflow: hidden; }

/* Navigation unten */
.nav { position: sticky; bottom: 0; display: flex; justify-content: space-between; align-items: center; gap: 12px; background: var(--bg); padding-block: 14px; padding-bottom: calc(14px + env(safe-area-inset-bottom, 0px)); border-top: 1px solid var(--border); margin-top: auto; }

/* Erfolg */
.done { margin-block: 22px 20px; background: var(--ok-bg); border: 1px solid var(--border); border-radius: 20px; padding: clamp(24px, 6vw, 52px); text-align: center; }
.done .check { width: 84px; height: 84px; border-radius: 50%; background: var(--surface); color: var(--ok-ink); display: grid; place-items: center; margin: 0 auto 22px; }
.done .check svg { width: 42px; height: 42px; stroke: currentColor; fill: none; stroke-width: 2.6; stroke-linecap: round; stroke-linejoin: round; }
.done h1 { margin: 0 0 14px; font-size: clamp(30px, 6vw, 42px); color: var(--navy); letter-spacing: -.02em; outline: none; }
.done p { margin: 0 auto 14px; max-width: 50ch; color: var(--ink); }
.done .small { font-size: 15.5px; color: var(--muted); }

/* Debug-Navigation: nur sichtbar mit #debug in der Adresse. */
.dbg { position: fixed; left: 0; right: 0; bottom: calc(96px + env(safe-area-inset-bottom, 0px)); display: flex; justify-content: space-between; align-items: center; padding-inline: 10px; pointer-events: none; z-index: 50; }
.dbg button { pointer-events: auto; width: 46px; height: 46px; border-radius: 50%; border: 1.5px solid var(--border); background: var(--navy); color: var(--bg); font-size: 22px; line-height: 1; cursor: pointer; opacity: .85; display: grid; place-items: center; transition: opacity .15s ease, box-shadow .15s ease; }
.dbg button:hover:not(:disabled) { opacity: 1; box-shadow: 0 0 0 4px var(--ring); }
.dbg button:disabled { opacity: .25; cursor: not-allowed; }
.dbg .tag { pointer-events: none; font-size: 12px; font-weight: 600; letter-spacing: .08em; text-transform: uppercase; color: var(--muted); background: var(--surface); border: 1px solid var(--border); border-radius: 99px; padding: 4px 10px; font-variant-numeric: tabular-nums; }

@media (prefers-reduced-motion: reduce) {
  * { transition: none !important; }
  .spinner { animation-duration: 2.4s; }
}
