:root {
  --brand-gradient: linear-gradient(140deg, #1d4674 0%, #0b1d34 78%);
  --navy: #071b36;
  --navy-soft: #123050;
  --aqua: #17c3c8;
  --aqua-dark: #08777b;
  --paper: #f5f8f7;
  --white: #ffffff;
  --ink: #102135;
  --muted: #607083;
  --line: rgba(7, 27, 54, .14);
  --warning: #8a6300;
  --danger: #c23b3b;
  --success: #1f8b66;
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body {
  margin: 0;
  background: var(--paper);
  color: var(--ink);
  font-family: Inter, -apple-system, BlinkMacSystemFont, "Segoe UI", Arial, sans-serif;
  line-height: 1.6;
}

a { color: inherit; }
img { display: block; max-width: 100%; }
h1, h2, h3, p { margin-top: 0; }
h1, h2, h3 { line-height: 1.12; color: var(--navy); }

.skip-link {
  position: fixed;
  top: 12px;
  left: 12px;
  z-index: 100;
  padding: 12px 18px;
  border-radius: 8px;
  background: var(--white);
  color: var(--navy);
  font-weight: 700;
  transform: translateY(-160%);
  box-shadow: 0 8px 24px rgba(7, 27, 54, .18);
}

.skip-link:focus { transform: translateY(0); }
:focus-visible { outline: 3px solid var(--white); outline-offset: 2px; box-shadow: 0 0 0 6px #005fcc; }

.app-header {
  min-height: 92px;
  padding: 14px clamp(20px, 5vw, 80px);
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
  background: var(--white);
  border-bottom: 1px solid var(--line);
}

.brand { width: 210px; }
.brand img { width: 210px; }
nav { display: flex; gap: 18px; flex-wrap: wrap; font-weight: 700; color: var(--navy); }
nav a { text-decoration-color: var(--aqua); text-underline-offset: 4px; }

main { width: min(1180px, calc(100% - 40px)); margin: 0 auto; padding: 64px 0 90px; }

.hero {
  display: grid;
  grid-template-columns: minmax(0, 1.2fr) minmax(280px, .8fr);
  gap: 28px;
  align-items: stretch;
  margin-bottom: 26px;
}

.hero > div, .notice, .privacy-note, .partner-note, .card {
  background: var(--white);
  border: 1px solid var(--line);
  border-radius: 26px;
  box-shadow: 0 18px 48px rgba(7, 27, 54, .06);
}

.hero > div { padding: clamp(28px, 5vw, 54px); }
.hero h1 { font-size: clamp(42px, 6vw, 76px); margin-bottom: 20px; letter-spacing: -.04em; }
.lead { max-width: 780px; color: var(--muted); font-size: clamp(18px, 2vw, 22px); }
.eyebrow { color: var(--aqua-dark); text-transform: uppercase; letter-spacing: .16em; font-size: 12px; font-weight: 800; margin-bottom: 16px; }
.hero-list { margin: 28px 0 0; padding-left: 22px; color: var(--muted); font-weight: 700; }
.hero-list li + li { margin-top: 8px; }

.notice { padding: 30px; border-left: 6px solid var(--aqua); }
.notice strong { display: block; margin-bottom: 10px; color: var(--navy); font-size: 20px; }
.notice p, .privacy-note p, .partner-note p, .section-text { color: var(--muted); margin-bottom: 0; }

.privacy-note, .partner-note { padding: 28px 32px; margin-bottom: 26px; }
.privacy-note h2, .partner-note h2 { font-size: 24px; margin-bottom: 10px; }
.partner-note { border-left: 6px solid var(--navy-soft); }

.question-count {
  margin: 18px 0 0;
  padding: 12px 14px;
  border-radius: 14px;
  background: #e7f7f4;
  color: var(--navy);
  font-weight: 800;
}

.card { padding: clamp(24px, 4vw, 38px); margin-top: 26px; }
.card h2 { font-size: clamp(28px, 4vw, 42px); margin-bottom: 24px; }
.setup-card { border-left: 6px solid var(--aqua); }
.setup-card label { max-width: 520px; margin-top: 26px; }

.grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 18px;
}

label, .question legend {
  display: block;
  font-weight: 800;
  color: var(--navy);
}

input, select {
  width: 100%;
  margin-top: 8px;
  padding: 12px 14px;
  border: 1px solid rgba(7, 27, 54, .25);
  border-radius: 12px;
  background: var(--white);
  color: var(--ink);
  font: inherit;
  font-size: 20px;
}
input { min-height: 80px; }
select {
  height: 80px !important;
  min-height: 80px;
  padding: 0 58px 0 18px;
  font-size: 20px;
  line-height: 1.25;
  appearance: none;
  background-color: var(--white);
  background-image: linear-gradient(45deg, transparent 50%, #8d9aad 50%), linear-gradient(135deg, #8d9aad 50%, transparent 50%);
  background-position: calc(100% - 25px) 50%, calc(100% - 15px) 50%;
  background-size: 10px 10px, 10px 10px;
  background-repeat: no-repeat;
}
select:has(option[value=""]:checked) { color: #a8b4c2; }
select option { color: var(--ink); }

.questions { display: grid; gap: 16px; margin-top: 24px; }
.question-group {
  border: 1px solid var(--line);
  border-radius: 22px;
  background: #f8fbfa;
  overflow: hidden;
}

.question-group-summary {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  min-height: 70px;
  padding: 18px;
  color: var(--navy);
  cursor: pointer;
  list-style: none;
}
.question-group-summary::-webkit-details-marker { display: none; }
.question-group-summary::marker { content: ""; }
.question-group-summary::after {
  content: "";
  width: 10px;
  height: 10px;
  flex: 0 0 10px;
  border-right: 3px solid var(--navy);
  border-bottom: 3px solid var(--navy);
  transform: rotate(45deg);
  transition: transform .16s ease;
}
.question-group[open] .question-group-summary::after { transform: rotate(225deg); }
.question-group-summary:hover { background: rgba(23, 195, 200, .08); }
.question-group-summary:focus-visible {
  outline: 3px solid #005fcc;
  outline-offset: -3px;
}
.question-group-title {
  font-size: 22px;
  font-weight: 900;
  line-height: 1.25;
}
.question-group-count {
  margin-left: auto;
  padding: 6px 10px;
  border-radius: 999px;
  background: #e7f7f4;
  color: var(--navy);
  font-size: 12px;
  font-weight: 900;
  letter-spacing: .04em;
  text-transform: uppercase;
  white-space: nowrap;
}
.question-group-body {
  display: grid;
  gap: 14px;
  padding: 0 18px 18px;
}
.question {
  border: 1px solid var(--line);
  border-radius: 18px;
  padding: 18px;
  background: #fbfdfc;
}

.question legend { margin-bottom: 12px; }
.radio-row { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 10px; }
.radio-row label {
  position: relative;
  display: flex;
  align-items: center;
  justify-content: center;
  min-height: 50px;
  padding: 10px 14px;
  border: 1px solid var(--line);
  border-radius: 15px;
  background: var(--white);
  color: var(--navy);
  font-weight: 850;
  text-align: center;
  cursor: pointer;
  transition: background .16s ease, border-color .16s ease, color .16s ease, transform .16s ease;
}

.radio-row label:hover {
  border-color: rgba(23, 195, 200, .62);
  transform: translateY(-1px);
}

.radio-row input {
  position: absolute;
  opacity: 0;
  pointer-events: none;
}

.radio-row label:has(input:checked) {
  border-color: var(--navy);
  background: var(--brand-gradient);
  color: var(--white);
}

.radio-row label:has(input:focus-visible) {
  outline: 3px solid #005fcc;
  outline-offset: 3px;
}

.actions, .report-actions {
  display: flex;
  align-items: center;
  gap: 14px;
  flex-wrap: wrap;
  margin-top: 26px;
}

.button {
  border: 0;
  border-radius: 12px;
  padding: 15px 20px;
  font: inherit;
  font-weight: 800;
  cursor: pointer;
}

.primary { background: var(--brand-gradient); color: var(--white); }
.secondary { background: var(--white); color: var(--navy); border: 1px solid var(--line); }
.button:hover { filter: brightness(1.04); }
.report-actions .button {
  min-height: 54px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
}

.result-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
  border-bottom: 1px solid var(--line);
  padding-bottom: 24px;
  margin-bottom: 24px;
}

.report-meta { color: var(--muted); margin: 8px 0 0; font-size: 14px; }

.score {
  min-width: 130px;
  min-height: 130px;
  display: grid;
  place-items: center;
  align-content: center;
  border-radius: 50%;
  background: #e7f7f4;
  color: var(--navy);
  border: 7px solid var(--aqua);
}

.score span { font-size: 42px; line-height: 1; font-weight: 900; }
.score small { color: var(--muted); font-weight: 800; }

.summary-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 16px;
  margin-bottom: 28px;
}

.summary-grid article, .measure, .category-card, .disclaimer-box {
  padding: 18px;
  border-radius: 18px;
  border: 1px solid var(--line);
  background: #fbfdfc;
}

.summary-grid h3, .measure h4 { margin-bottom: 8px; }
.summary-grid p, .measure p, .disclaimer-box p { color: var(--muted); margin-bottom: 0; }
.measure p {
  white-space: pre-line;
  overflow-wrap: break-word;
  hyphens: auto;
  line-height: 1.55;
}
.disclaimer-box { margin: 0 0 28px; border-left: 6px solid var(--warning); }
.disclaimer-box h3 { margin-bottom: 8px; }
#recommendations { padding-left: 22px; color: var(--muted); }
#recommendations li + li { margin-top: 8px; }

.category-list {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 14px;
  margin-bottom: 28px;
}

.category-card h4 { margin: 0 0 10px; color: var(--navy); }
.category-card p { margin: 8px 0 0; color: var(--muted); font-size: 14px; font-weight: 700; }
.bar {
  display: block;
  width: 100%;
  height: 12px;
  border: 0;
  border-radius: 999px;
  background: #e6ebf0;
  overflow: hidden;
  appearance: none;
}
.bar::-webkit-progress-bar { background: #e6ebf0; border-radius: 999px; }
.bar::-webkit-progress-value { background: var(--aqua-dark); border-radius: 999px; }
.bar::-moz-progress-bar { background: var(--aqua-dark); border-radius: 999px; }

.measure-list { display: grid; gap: 14px; }
.measure { border-left: 6px solid var(--aqua); }
.measure.high { border-left-color: var(--danger); }
.measure.medium { border-left-color: var(--warning); }
.measure.good { border-left-color: var(--success); }
.measure .tag { display: inline-block; margin-bottom: 10px; padding: 4px 9px; border-radius: 999px; background: #eef2f7; font-size: 12px; font-weight: 900; color: var(--navy); text-transform: uppercase; letter-spacing: .08em; }
.measure small { display: block; margin-bottom: 8px; color: var(--muted); font-weight: 800; }
.report-actions p { margin: 0; color: var(--muted); }
.save-status {
  flex-basis: 100%;
  padding: 12px 14px;
  border: 1px solid rgba(21, 115, 71, .22);
  border-radius: 14px;
  background: #edf9f3;
  color: var(--success) !important;
  font-weight: 900;
}
.save-status[data-tone="warning"] {
  border-color: rgba(138, 90, 0, .24);
  background: #fff7e6;
  color: var(--warning) !important;
}

footer {
  padding: 30px 20px;
  text-align: center;
  color: #8295a7;
  background: #041328;
}
footer p { margin: 0; }

@media (max-width: 760px) {
  .hero, .result-head { display: block; }
  .app-header { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; }
  .brand { margin-bottom: 0; }
  .app-header nav { width: 100%; margin-top: 14px; }
  .app-menue-klappbar .app-menu-button { display: inline-flex; flex-direction: column; align-items: center; justify-content: center; gap: 5px; width: 48px; min-height: 42px; padding: 0; border: 1px solid var(--line); border-radius: 12px; background: var(--white); cursor: pointer; }
  .app-menu-button span { width: 20px; height: 2px; border-radius: 2px; background: var(--navy); }
  .app-menu-button:focus-visible { outline: none; box-shadow: 0 0 0 3px rgba(23, 195, 200, .35); }
  .app-menue-klappbar .app-header nav { display: none; }
  .app-menue-klappbar .app-header nav.ist-offen { display: grid; grid-template-columns: 1fr; gap: 8px; }
  .app-menue-klappbar .app-header nav.ist-offen a { display: flex; align-items: center; justify-content: center; min-height: 42px; border: 1px solid var(--line); border-radius: 999px; background: var(--white); text-decoration: none; }
  .hero > div { margin-bottom: 26px; }
  .grid, .summary-grid, .category-list { grid-template-columns: 1fr; }
  .question-group-summary {
    align-items: flex-start;
    flex-wrap: wrap;
  }
  .question-group-count { margin-left: 0; }
  .radio-row { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .score { margin-top: 18px; }
  .report-actions .button, .report-actions a.button { width: 100%; }
}

@media print {
  @page {
    size: A4;
    margin: 18mm 17mm;
  }

  * {
    box-shadow: none !important;
    text-shadow: none !important;
    overflow: visible !important;
  }

  html,
  body {
    width: 100%;
    background: white;
  }

  body {
    color: #111;
    font-family: Arial, Helvetica, sans-serif;
    font-size: 10.2pt;
    line-height: 1.42;
  }

  .skip-link,
  .hero,
  .notice,
  .privacy-note,
  .partner-note,
  form,
  .report-actions,
  footer {
    display: none !important;
  }

  .app-header {
    min-height: 0;
    display: block !important;
    margin: 0 0 10mm;
    padding: 0 0 6mm;
    border: 0;
    border-bottom: 1px solid #d8d8d8;
    background: white;
  }

  .app-header nav {
    display: none !important;
  }

  .brand,
  .brand img {
    width: 42mm;
  }

  main {
    width: 100%;
    max-width: 178mm;
    margin: 0;
    padding: 0;
  }

  .card,
  .result,
  .summary-grid article,
  .category-card,
  .measure,
  .disclaimer-box {
    border: 0;
    border-radius: 0;
    background: white;
  }

  .card {
    margin: 0;
    padding: 0;
    border: 0;
  }

  .result {
    display: block !important;
  }

  .result-head {
    display: block;
    margin: 0 0 8mm;
    padding: 0 0 5mm;
    border-bottom: 1px solid #d8d8d8;
  }

  .eyebrow {
    margin-bottom: 2mm;
    color: #333;
    font-size: 8pt;
    letter-spacing: .08em;
  }

  .result h2 {
    margin-bottom: 3mm;
    font-size: 20pt;
    line-height: 1.16;
    letter-spacing: 0;
  }

  .report-meta {
    color: #444;
    font-size: 8.5pt;
    line-height: 1.35;
  }

  .score {
    display: none !important;
  }

  .summary-grid,
  .category-list {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 5mm;
    margin-bottom: 6mm;
  }

  .summary-grid article,
  .category-card,
  .disclaimer-box,
  .measure {
    padding: 0;
    break-inside: auto;
    page-break-inside: auto;
  }

  .summary-grid h3,
  .disclaimer-box h3,
  .category-card h4,
  .measure h4 {
    margin: 0 0 2pt;
    font-size: 12pt;
    line-height: 1.18;
  }

  .summary-grid p,
  .disclaimer-box p,
  .category-card p,
  .measure p,
  #recommendations {
    color: #222;
  }

  .disclaimer-box {
    margin-bottom: 6mm;
    padding: 4mm 0 0;
    border-top: 1px solid #d8d8d8;
  }

  #recommendations {
    margin-bottom: 7mm;
    padding-left: 5mm;
    break-inside: avoid;
    page-break-inside: avoid;
  }

  #recommendations li {
    break-inside: avoid;
    page-break-inside: avoid;
  }

  #recommendations li + li {
    margin-top: 3pt;
  }

  .bar {
    display: none;
  }

  .measure-list {
    display: grid;
    gap: 6mm;
  }

  .measure {
    padding-top: 5mm;
    border-top: 1px solid #d8d8d8;
    break-inside: avoid;
    page-break-inside: avoid;
  }

  .measure p {
    white-space: pre-line;
    overflow-wrap: break-word;
    hyphens: auto;
    line-height: 1.46;
  }

  .measure .tag {
    display: block;
    margin-bottom: 2pt;
    padding: 0;
    background: transparent;
    color: #333;
    font-size: 7.5pt;
    letter-spacing: .04em;
  }

  .measure small {
    margin-bottom: 4pt;
    color: #333;
    font-size: 8pt;
  }
}

/* Menue-Knopf der App-Kopfzeile: nur am Handy sichtbar (JS klappt das Menue) */
.app-menu-button { display: none; }
