/* Farben angelehnt an den SHFV-Auftritt (Navy/Hellblau/Rot) und die Bögen im Wappen */
@font-face { font-family: 'Barlow Semi Condensed'; font-weight: 600; font-display: swap; src: url(/fonts/barlow-sc-600.woff2) format('woff2'); }
@font-face { font-family: 'Barlow Semi Condensed'; font-weight: 800; font-display: swap; src: url(/fonts/barlow-sc-800.woff2) format('woff2'); }

:root {
  color-scheme: light;
  --navy: #002c58;
  --navy-2: #004380;
  --sky: #69acdf;
  --sky-soft: #e1edfa;
  --red: #bd1d1d;
  --arc-blue: #33497d;
  --arc-red: #cd5a43;
  --bg: #f0f2f3;
  --card: #ffffff;
  --text: #14243a;
  --muted: #5a6b80;
  --line: #d3dbe4;
  --display: 'Barlow Semi Condensed', 'Arial Narrow', sans-serif;
  --body: system-ui, -apple-system, 'Segoe UI', Roboto, sans-serif;
}

* { box-sizing: border-box; }
body { margin: 0; background: var(--bg); color: var(--text); font: 16px/1.55 var(--body); }

.masthead { background: var(--navy); color: #fff; position: relative; padding-bottom: 34px; }
.masthead-inner { max-width: 760px; margin: 0 auto; padding: 22px 16px 6px; display: flex; align-items: center; gap: 18px; }
.crest { background: #fff; border-radius: 50%; padding: 6px; flex: none; width: 88px; height: 88px; box-shadow: 0 0 0 3px var(--navy-2); }
.kicker { margin: 0; font: 600 0.95rem/1.2 var(--display); letter-spacing: 0.08em; text-transform: uppercase; color: var(--sky); }
h1 { margin: 2px 0 0; font: 800 clamp(2rem, 6vw, 3.1rem)/1 var(--display); text-transform: uppercase; letter-spacing: 0.01em; }
.arcs { position: absolute; left: 0; bottom: 0; width: 100%; height: 44px; }
.arcs path { fill: none; stroke-width: 7; vector-effect: non-scaling-stroke; }
.arc-blue { stroke: var(--sky); }
.arc-red { stroke: var(--arc-red); }

main { max-width: 760px; margin: 0 auto; padding: 24px 16px 8px; }
.intro { background: var(--card); border-top: 4px solid var(--navy); padding: 18px 22px; margin-bottom: 18px; }
.intro p { margin: 0 0 0.8em; }
.intro h2 { font: 800 1.9rem/1.1 var(--display); text-transform: uppercase; color: var(--navy); margin: 0 0 0.5em; }
.legend-req { color: var(--muted); font-size: 0.9rem; margin: 0 !important; }
.req { color: var(--red); font-weight: 700; }

.alert { background: #fbeaea; border-left: 5px solid var(--red); padding: 12px 16px; margin-bottom: 18px; font-weight: 600; }

.survey { display: grid; gap: 14px; }
.q { background: var(--card); border: 0; border-left: 4px solid transparent; margin: 0; padding: 18px 22px 20px; min-width: 0; }
.q.has-error { border-left-color: var(--red); }
legend, .legend { display: flex; gap: 12px; align-items: flex-start; float: left; width: 100%; padding: 0; margin-bottom: 12px;
  font: 600 1.2rem/1.3 var(--display); color: var(--navy); }
legend + * , .legend + * { clear: both; }
.num { flex: none; display: inline-grid; place-items: center; min-width: 30px; height: 30px; padding: 0 6px; background: var(--navy); color: #fff;
  font: 800 1rem/1 var(--display); clip-path: polygon(0 0, 100% 0, 88% 100%, 0 100%); }
.hint { margin: -4px 0 12px; color: var(--muted); font-size: 0.92rem; clear: both; }
.field-error { color: var(--red); font-weight: 600; margin: 10px 0 0; }

/* Radios bleiben fokussier- und validierbar, sind aber optisch durch die Kachel ersetzt */
.choice input, .step input { position: absolute; opacity: 0; width: 1px; height: 1px; }
.choice { position: relative; }
.choices { display: flex; flex-wrap: wrap; gap: 8px; clear: both; }
.choice span { display: block; padding: 10px 18px; border: 2px solid var(--line); background: #fff; cursor: pointer; font-weight: 600; min-width: 92px; text-align: center; }
.choice:hover span, .step:hover span { border-color: var(--sky); }
.choice input:checked + span, .step input:checked + span { background: var(--navy); border-color: var(--navy); color: #fff; }
.choice input:focus-visible + span, .step input:focus-visible + span { outline: 3px solid var(--sky); outline-offset: 2px; }

.scale { display: grid; grid-template-columns: repeat(4, 1fr); gap: 6px; clear: both; }
.step { position: relative; }
.step span { display: block; text-align: center; padding: 11px 0; border: 2px solid var(--line); background: #fff; cursor: pointer;
  font: 800 1.25rem/1 var(--display); }

select, input[type=number], textarea { width: 100%; font: inherit; color: inherit; padding: 10px 12px; border: 2px solid var(--line); background: #fff; border-radius: 0; clear: both; display: block; }
input[type=number] { max-width: 180px; }
select:focus, input:focus, textarea:focus { outline: 3px solid var(--sky); outline-offset: 1px; border-color: var(--navy-2); }
[aria-invalid=true] { border-color: var(--red); }

/* Folgefragen nur bei passender Antwort (ohne JavaScript) */
.followup { display: none; border-left-color: var(--sky); }
.survey:has(input[name=post_review][value=Ja]:checked) .if-review,
.survey:has(input[name=progressed][value=Nein]:checked) .if-not-progressed,
.followup.has-error { display: block; }

.submit-row { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 16px; border-top: 4px solid var(--red); }
.submit-row .field-error { flex-basis: 100%; order: 3; margin: 0; }
button, .button-link { display: inline-block; background: var(--red); color: #fff; border: 0; padding: 13px 34px; cursor: pointer; text-decoration: none;
  font: 800 1.2rem/1 var(--display); letter-spacing: 0.06em; text-transform: uppercase; clip-path: polygon(0 0, 100% 0, 94% 100%, 0 100%); }
button:hover, .button-link:hover { background: #9c1515; }
button:focus-visible, .button-link:focus-visible { outline: 3px solid var(--sky); outline-offset: 3px; }

.foot { max-width: 760px; margin: 0 auto; padding: 8px 16px 40px; color: var(--muted); font-size: 0.85rem; }
a { color: var(--navy-2); }
.foot a { color: var(--muted); }

@media (max-width: 520px) {
  .masthead-inner { gap: 12px; }
  .crest { width: 64px; height: 64px; padding: 4px; }
  .q, .intro { padding: 16px; }
  .choice { flex: 1 1 auto; }
  .choice span { min-width: 0; }
  .submit-row button { width: 100%; }
}
