@font-face {
  font-family: "Canva Sans Local";
  font-style: normal;
  font-weight: 400;
  src: url("../fonts/canva-sans-regular.woff") format("woff");
}

@font-face {
  font-family: "Canva Sans Local";
  font-style: normal;
  font-weight: 700;
  src: url("../fonts/canva-sans-bold.woff") format("woff");
}

@font-face {
  font-family: "Libre Baskerville Local";
  font-style: normal;
  font-weight: 400;
  src: url("../fonts/libre-baskerville.woff") format("woff");
}

:root {
  --bg: #ffffff;
  --ink: #050505;
  --muted: #56616c;
  --line: #2169ac;
  --line-soft: #a8cef0;
  --panel: #f7fbff;
  --blue-50: #eef7ff;
  --blue-100: #c2e1ff;
  --blue-500: #2169ac;
  --blue-700: #174d85;
  --green: #65a80f;
  --green-bg: #eef8e6;
  --orange: #b8620a;
  --orange-bg: #fff4e2;
  --red: #cf4b52;
  --red-bg: #fdf1f1;
  --shadow: 0 18px 50px rgba(33, 105, 172, 0.12);
  --font-sans: "Canva Sans Local", Arial, sans-serif;
  --font-serif: "Libre Baskerville Local", Georgia, serif;
}

* {
  box-sizing: border-box;
}

[hidden] {
  display: none !important;
}

html {
  background: var(--bg);
  color: var(--ink);
  font-family: var(--font-sans);
}

body {
  margin: 0;
  min-width: 320px;
}

body.modal-open {
  overflow: hidden;
}

a {
  color: inherit;
  text-decoration: none;
}

button,
input,
textarea {
  font: inherit;
}

img {
  display: block;
  max-width: 100%;
}

.page {
  min-height: 100svh;
  padding: 36px 40px;
}

.page--center {
  display: grid;
  place-items: center;
}

.page--home {
  min-height: 100svh;
  display: grid;
  place-items: center;
  padding: 0 40px;
}

.page--home .hero {
  min-height: 100svh;
}

.stage {
  width: min(100%, 1280px);
  margin: 0 auto;
}

.stage--full {
  min-height: calc(100svh - 72px);
  display: grid;
  align-content: center;
}

.topbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 16px 24px;
  margin-bottom: 34px;
}

.topbar__left {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 18px;
}

.brand {
  font-family: var(--font-serif);
  font-size: 1.35rem;
}

.mode-toggle {
  display: inline-flex;
  border: 1.5px solid var(--blue-500);
  border-radius: 999px;
  background: var(--bg);
  padding: 3px;
  gap: 2px;
}

.mode-toggle button {
  border: 0;
  border-radius: 999px;
  background: transparent;
  color: var(--muted);
  cursor: pointer;
  font-size: 0.82rem;
  font-weight: 700;
  line-height: 1.2;
  padding: 6px 14px;
  transition: background-color 140ms ease, color 140ms ease;
}

.mode-toggle button:hover,
.mode-toggle button:focus-visible {
  color: var(--blue-700);
  outline: none;
}

.mode-toggle button[aria-pressed="true"] {
  background: var(--blue-500);
  color: #fff;
}

.mode-guard {
  border: 1.5px solid var(--blue-500);
  border-radius: 10px;
  background: var(--blue-50);
  display: grid;
  gap: 14px;
  justify-items: center;
  margin: 0 auto 40px;
  max-width: 620px;
  padding: 22px 24px;
  text-align: center;
}

.mode-guard p {
  margin: 0;
  font-weight: 700;
}

.step-links {
  display: flex;
  flex-wrap: wrap;
  justify-content: flex-end;
  gap: 8px;
}

.step-links a {
  border: 1px solid transparent;
  border-radius: 999px;
  color: var(--muted);
  padding: 7px 12px;
}

.step-links a[aria-current="page"],
.step-links a:hover {
  border-color: var(--line-soft);
  color: var(--blue-700);
}

.hero {
  width: 100%;
  min-height: 640px;
  position: relative;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 56px;
  text-align: center;
  overflow: hidden;
}

.hero__visual {
  width: 351px;
  height: 234px;
  position: relative;
  margin: -8px auto -8px;
  transform: rotate(-4deg);
  opacity: 0;
  animation: hero-pop-in 0.7s cubic-bezier(0.22, 1, 0.36, 1) 0.12s both;
}

.hero__visual::before {
  content: "";
  position: absolute;
  inset: 0;
  background: #bfd2ff;
}

.hero__media {
  position: absolute;
  top: 22px;
  left: 64px;
  z-index: 2;
  width: 222px;
  transform: scaleX(-1);
  opacity: 0.98;
  pointer-events: none;
}

.hero__chip {
  position: absolute;
  top: 24px;
  left: 158px;
  z-index: 1;
  width: 127px;
  opacity: 0.96;
  pointer-events: none;
}

.hero__content {
  position: relative;
  z-index: 1;
  width: min(100%, 980px);
  min-width: 0;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 6px;
}

.hero__brand {
  font-family: var(--font-serif);
  font-size: 7.2rem;
  font-weight: 400;
  line-height: 1.1;
  margin: 0;
  opacity: 0;
  animation: hero-rise-in 0.7s cubic-bezier(0.22, 1, 0.36, 1) both;
}

.hero h1 {
  font-size: 4.4rem;
  font-weight: 400;
  line-height: 1.4;
  margin: 0;
  opacity: 0;
  animation: hero-rise-in 0.7s cubic-bezier(0.22, 1, 0.36, 1) 0.24s both;
}

.hero__subtitle {
  font-size: 1.5rem;
  line-height: 1.05;
  margin: 0;
  opacity: 0;
  animation: hero-rise-in 0.7s cubic-bezier(0.22, 1, 0.36, 1) 0.34s both;
}

.hero__action {
  width: min(100%, 515px);
  height: 93px;
  z-index: 2;
  font-size: 2.25rem;
  font-weight: 400;
  opacity: 0;
  animation: hero-fade-in 0.5s ease-out 0.46s both;
}

@keyframes hero-rise-in {
  from {
    opacity: 0;
    transform: translateY(18px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

@keyframes hero-pop-in {
  from {
    opacity: 0;
    transform: rotate(-4deg) scale(0.85);
  }
  to {
    opacity: 1;
    transform: rotate(-4deg) scale(1);
  }
}

@keyframes hero-fade-in {
  from {
    opacity: 0;
  }
  to {
    opacity: 1;
  }
}

@media (prefers-reduced-motion: reduce) {
  .hero__brand,
  .hero__visual,
  .hero h1,
  .hero__subtitle,
  .hero__action {
    animation: none;
    opacity: 1;
  }
}

.page-title {
  font-size: 3.75rem;
  line-height: 1.3;
  margin: 0 0 28px;
  text-align: center;
}

.copy {
  color: var(--ink);
  font-size: 1.42rem;
  line-height: 1.42;
  margin: 0 auto;
  max-width: 1180px;
  text-align: justify;
}

.action-row + .copy {
  margin-top: 32px;
}

.copy--narrow {
  max-width: 920px;
}

.action-row {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: center;
  gap: 16px;
}

.btn {
  min-height: 52px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  border: 2px solid var(--blue-500);
  border-radius: 8px;
  background: var(--blue-100);
  color: var(--ink);
  cursor: pointer;
  font-weight: 700;
  line-height: 1.2;
  padding: 12px 32px;
  transition: background-color 160ms ease, border-color 160ms ease, transform 160ms ease;
}

.btn:hover,
.btn:focus-visible {
  background: #d7ecff;
  border-color: var(--blue-700);
  outline: none;
}

.btn:active {
  transform: translateY(1px);
}

.btn img {
  width: 20px;
  height: 20px;
}

.btn--wide {
  min-width: 296px;
}

.btn--ghost {
  background: var(--bg);
}

.btn.hero__action {
  font-weight: 400;
}

.icon-button {
  width: 52px;
  height: 52px;
  display: inline-grid;
  place-items: center;
  border: 0;
  border-radius: 50%;
  background: transparent;
  cursor: pointer;
  padding: 0;
}

.icon-button img {
  width: 44px;
  height: 44px;
}

.icon-button--small {
  width: 36px;
  height: 36px;
}

.icon-button--small img {
  width: 26px;
  height: 26px;
}

.choice-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(260px, 320px));
  justify-content: center;
  gap: 42px;
  margin: 36px auto 40px;
  max-width: 1060px;
}

.choice-card {
  min-height: 220px;
  display: grid;
  align-content: center;
  justify-items: center;
  gap: 28px;
  border: 2px solid var(--blue-500);
  border-radius: 8px;
  background: var(--blue-100);
  color: var(--ink);
  cursor: pointer;
  padding: 30px 22px 22px;
  text-align: center;
  transition: background-color 160ms ease, box-shadow 160ms ease, transform 160ms ease;
}

.choice-card:hover,
.choice-card:focus-visible,
.choice-card.is-selected {
  background: #d8edff;
  box-shadow: var(--shadow);
  outline: none;
  transform: translateY(-2px);
}

.choice-card strong {
  display: block;
  font-size: 1.18rem;
  line-height: 1.25;
}

.choice-card span {
  color: #1e2934;
  display: block;
  line-height: 1.32;
  margin-top: 14px;
}

.choice-card img {
  width: 32px;
  height: 32px;
}

.weights {
  display: grid;
  gap: 18px;
  margin: 58px auto 44px;
  max-width: 900px;
}

[data-weights-list] {
  display: grid;
  gap: 11px;
}

.weight-category {
  color: var(--blue-700);
  text-transform: uppercase;
  letter-spacing: 0.04em;
  font-size: 0.85rem;
  font-weight: 700;
}

.weight-category:not(:first-child) {
  margin-top: 10px;
}

.weight-row {
  display: grid;
  grid-template-columns: minmax(180px, 1fr) minmax(220px, 2fr) 88px;
  align-items: center;
  gap: 18px;
}

.weight-row label {
  font-weight: 700;
}

.weight-row input[type="range"] {
  accent-color: var(--blue-500);
  width: 100%;
}

.weight-value-wrap {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 2px;
  border: 1px solid var(--line-soft);
  border-radius: 8px;
  background: var(--blue-50);
  padding: 8px 12px;
}

.weight-value {
  width: 36px;
  border: 0;
  background: transparent;
  padding: 0;
  text-align: right;
  font: inherit;
}

.weight-total {
  display: flex;
  justify-content: center;
  color: var(--blue-700);
  font-weight: 700;
}

.criteria-edit {
  display: grid;
  grid-template-columns: minmax(280px, 1fr) minmax(240px, 320px);
  gap: 48px;
  align-items: start;
  margin: 58px auto 44px;
  max-width: 900px;
}

.criteria-edit__list {
  display: grid;
  gap: 18px;
  margin: 0;
  padding: 0;
  list-style: none;
}

.criteria-edit__row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  font-weight: 700;
}

.criteria-edit__category {
  color: var(--blue-700);
  text-transform: uppercase;
  letter-spacing: 0.04em;
  font-size: 0.85rem;
  font-weight: 700;
  margin-top: 8px;
}

.criteria-edit__category:first-child {
  margin-top: 0;
}

.criteria-edit__actions {
  display: flex;
  flex: none;
}

.criteria-edit__actions .icon-button {
  width: 40px;
  height: 40px;
}

.criteria-edit__actions .icon-button img {
  width: 24px;
  height: 24px;
}

.criteria-edit__add {
  display: grid;
  align-content: start;
  gap: 18px;
  border: 1.5px solid #6b6b6b;
  border-radius: 10px;
  background: var(--panel);
  padding: 24px;
}

.criteria-edit__add > strong {
  font-size: 1.1rem;
}

.criteria-edit__add-field {
  display: grid;
  gap: 6px;
  text-align: left;
}

.criteria-edit__add-field label {
  font-weight: 700;
  font-size: 0.92rem;
}

.criteria-edit__add-field input,
.criteria-edit__add-field select,
.criteria-edit__add-field textarea {
  width: 100%;
  border: 1.5px solid #7b8792;
  border-radius: 8px;
  padding: 10px 12px;
  font: inherit;
  background: var(--bg);
  color: var(--ink);
}

.criteria-edit__add-field textarea {
  min-height: 90px;
  resize: vertical;
}

.criteria-edit__add .btn {
  justify-self: start;
}

.steps-editor {
  display: grid;
  gap: 10px;
  margin: 0 0 14px;
  padding: 0;
  list-style: none;
}

.steps-editor__row {
  display: flex;
  align-items: center;
  gap: 8px;
}

.steps-editor__input {
  flex: 1 1 auto;
  border: 1.5px solid #7b8792;
  border-radius: 8px;
  padding: 9px 12px;
  font: inherit;
  background: var(--bg);
  color: var(--ink);
}

.btn--add-step {
  min-height: auto;
  padding: 9px 16px;
  justify-self: start;
}

.weight-total--error {
  color: var(--red);
}

.compare {
  display: grid;
  grid-template-columns: 1fr auto 1fr;
  align-items: center;
  gap: 24px;
  margin: 84px auto 70px;
  max-width: 980px;
}

.compare-option {
  min-height: 170px;
  display: grid;
  place-items: center;
  border: 2px solid var(--blue-500);
  border-radius: 8px;
  background: var(--blue-100);
  cursor: pointer;
  font-size: 1.45rem;
  font-weight: 700;
  padding: 24px;
  text-align: center;
}

.compare-option:hover,
.compare-option:focus-visible,
.compare-option.is-selected {
  background: #d8edff;
  box-shadow: var(--shadow);
  outline: none;
}

.compare-divider {
  color: var(--muted);
  font-weight: 700;
}

.toolbar {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: flex-end;
  gap: 12px;
  margin-bottom: 46px;
}

.toolbar-status {
  color: var(--blue-700);
  font-weight: 700;
}

.export-menu {
  position: relative;
}

.export-menu__list {
  position: absolute;
  top: calc(100% + 6px);
  left: 0;
  z-index: 10;
  display: grid;
  min-width: 180px;
  border: 2px solid var(--blue-500);
  border-radius: 8px;
  background: var(--bg);
  box-shadow: var(--shadow);
  list-style: none;
  margin: 0;
  padding: 6px;
}

.export-menu__list button {
  border: 0;
  border-radius: 6px;
  background: transparent;
  color: var(--ink);
  cursor: pointer;
  padding: 10px 12px;
  text-align: left;
  width: 100%;
}

.export-menu__list button:hover,
.export-menu__list button:focus-visible {
  background: var(--blue-50);
  outline: none;
}

.action-row--add {
  margin-bottom: 40px;
}

.result-grid {
  display: grid;
  grid-template-columns: 264px 137px repeat(var(--usecase-columns, 4), minmax(260px, 1fr));
  margin: 0 0 28px;
  overflow-x: auto;
}

.result-cell--corner-tl {
  border-top-left-radius: 10px;
}

.result-cell--corner-tr {
  border-top-right-radius: 10px;
}

.result-cell--corner-bl {
  border-bottom-left-radius: 10px;
}

.result-cell--corner-br {
  border-bottom-right-radius: 10px;
}

.rating-scale-row {
  display: inline-flex;
  align-items: center;
  gap: 6px;
}

.rating-scale__info {
  position: relative;
  display: inline-flex;
  cursor: help;
  border-radius: 50%;
}

.rating-scale__info img {
  width: 15px;
  height: 15px;
  opacity: 0.6;
}

.rating-scale__info:hover img,
.rating-scale__info:focus-visible img {
  opacity: 1;
}

.rating-scale__info:focus-visible {
  outline: 2px solid var(--blue-500);
  outline-offset: 2px;
}

.rating-scale__tooltip {
  position: absolute;
  bottom: calc(100% + 8px);
  left: 50%;
  transform: translateX(-50%) translateY(4px);
  width: max-content;
  max-width: min(320px, calc(100vw - 32px));
  max-height: min(320px, calc(100vh - 32px));
  overflow-y: auto;
  background: var(--blue-700);
  color: #fff;
  font-size: 0.75rem;
  font-weight: 400;
  line-height: 1.45;
  padding: 8px 10px;
  border-radius: 6px;
  box-shadow: var(--shadow);
  text-align: left;
  text-transform: none;
  letter-spacing: normal;
  opacity: 0;
  visibility: hidden;
  pointer-events: none;
  transition: opacity 140ms ease, transform 140ms ease;
  z-index: 5;
}

/* Wird per JS gesetzt, wenn oberhalb des Symbols nicht genug Platz ist, damit
   lange Kriterienbeschreibungen nicht über den sichtbaren Bereich hinausragen. */
.rating-scale__tooltip--below {
  bottom: auto;
  top: calc(100% + 8px);
  transform: translateX(-50%) translateY(-4px);
}

.rating-scale__info:hover .rating-scale__tooltip,
.rating-scale__info:focus-visible .rating-scale__tooltip {
  opacity: 1;
  visibility: visible;
  transform: translateX(-50%) translateY(0);
}

.rating-scale {
  display: inline-flex;
  gap: 3px;
}

.rating-scale__option {
  border: 1px solid var(--line-soft);
  background: var(--bg);
  color: var(--muted);
  cursor: pointer;
  font-size: 0.78rem;
  font-weight: 700;
  line-height: 1;
  padding: 5px 4px;
  border-radius: 5px;
  min-width: 24px;
}

.rating-scale__option:hover,
.rating-scale__option:focus-visible {
  border-color: var(--blue-500);
  outline: none;
}

.rating-scale__option--selected {
  background: var(--blue-500);
  border-color: var(--blue-500);
  color: #fff;
}

.rating-scale-step {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 4px;
}

.rating-scale-step:not(:last-child) {
  padding-bottom: 10px;
  margin-bottom: 10px;
  border-bottom: 1px dashed var(--line-soft);
}

.rating-scale-step__label {
  color: var(--muted);
  font-size: 0.78rem;
  font-weight: 700;
  text-align: center;
}

.rating-scale-step__avg {
  color: var(--blue-700);
  font-size: 0.85rem;
  font-weight: 700;
  margin-top: 6px;
}

.result-cell--stepped {
  align-content: center;
  padding-top: 16px;
  padding-bottom: 16px;
}

.result-cell__steps-badge {
  color: var(--blue-700);
  font-weight: 700;
}

.ranking-list {
  display: grid;
  gap: 10px;
  margin: 0;
  padding-left: 22px;
}

.ranking-list__empty {
  color: var(--muted);
  list-style: none;
  margin-left: -22px;
}

.notes-field {
  border: 1.5px solid #7b8792;
  border-radius: 8px;
  margin-top: 12px;
  min-height: 220px;
  padding: 10px 12px;
  resize: vertical;
  width: 100%;
}

.compare-progress {
  color: var(--muted);
  font-weight: 700;
  margin: 0 auto;
  text-align: center;
}

.compare-done {
  color: var(--blue-700);
  font-weight: 700;
  text-align: center;
}

.result-cell {
  position: relative;
  min-height: 72px;
  display: grid;
  align-content: center;
  border: 1.5px solid #6b6b6b;
  padding: 14px 16px;
  overflow-wrap: anywhere;
}

.result-cell--with-info {
  padding-right: 40px;
}

.result-cell--head {
  min-height: 110px;
  align-content: start;
  padding-top: 18px;
  font-weight: 700;
}

.result-cell--muted {
  color: var(--muted);
}

.result-cell__description {
  color: var(--muted);
  font-size: 0.82rem;
  font-weight: 400;
  line-height: 1.3;
  margin-top: 4px;
}

.rating-scale__info.result-cell__info {
  position: absolute;
  top: 50%;
  right: 16px;
  transform: translateY(-50%);
}

.result-cell--center {
  justify-items: center;
  text-align: center;
}

.result-cell--center:has(.weight-input) {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 4px;
}

.result-cell--category {
  grid-column: 1 / -1;
  min-height: auto;
  background: var(--panel);
  color: var(--blue-700);
  text-transform: uppercase;
  letter-spacing: 0.04em;
  font-size: 0.85rem;
  font-weight: 700;
  padding: 8px 16px;
}

.result-cell--total {
  min-height: 48px;
  padding-top: 10px;
  padding-bottom: 10px;
  background: var(--panel);
  color: var(--blue-700);
  font-weight: 700;
  font-size: 1.05rem;
}

.weight-input {
  width: 64px;
  border: 1.5px solid #7b8792;
  border-radius: 8px;
  padding: 6px 8px;
  text-align: right;
}

.weight-check {
  color: var(--blue-700);
  font-weight: 700;
  margin: 0 0 28px;
  text-align: center;
}

.weight-check--error {
  color: var(--red);
}

.btn--add-usecase {
  min-height: auto;
  padding: 10px 18px;
}

.result-band {
  margin: 28px 0;
}

.result-band .result-cell--head {
  min-height: 56px;
  border-radius: 10px 10px 0 0;
}

.result-band__row {
  display: grid;
  grid-template-columns: 360px 1fr;
}

.result-box {
  min-height: 312px;
  border: 1.5px solid #6b6b6b;
  padding: 18px;
}

.result-band__row .result-box:first-child {
  border-radius: 0 0 0 10px;
}

.result-band__row .result-box:last-child {
  border-radius: 0 0 10px 0;
}

.result-box strong {
  display: block;
  margin-bottom: 20px;
}

.dialog-page {
  min-height: calc(100svh - 72px);
  display: grid;
  place-items: center;
}

.modal-overlay {
  position: fixed;
  inset: 0;
  z-index: 20;
  display: grid;
  place-items: center;
  overflow: auto;
  background: rgba(255, 255, 255, 0.82);
  padding: 28px 24px;
}

.modal-overlay[hidden] {
  display: none;
}

.dialog {
  width: min(100%, 950px);
  min-height: 570px;
  position: relative;
  display: flex;
  flex-direction: column;
  border: 2px solid #3a3a3a;
  border-radius: 8px;
  background: var(--bg);
  padding: 48px 88px 42px;
}

.modal-overlay .dialog {
  width: min(calc(100vw - 64px), 860px);
  min-height: 0;
  max-height: calc(100svh - 56px);
  overflow: visible;
  padding: 34px 72px 28px;
}

#use-case-modal .dialog {
  width: min(calc(100vw - 64px), 1180px);
  padding-left: 40px;
  padding-right: 40px;
}

.dialog__body {
  display: flex;
  flex: 1 1 auto;
  flex-direction: column;
  min-height: 0;
}

.modal-overlay .dialog__body {
  overflow-y: auto;
  padding-right: 16px;
  margin-right: -16px;
}

.dialog--use-case {
  background: var(--blue-100);
}

.dialog__add {
  position: absolute;
  top: -36px;
  left: -36px;
  width: 82px;
  height: 82px;
}

.dialog__field {
  display: grid;
  gap: 10px;
  margin-bottom: 15px;
}

.dialog__field label {
  font-weight: 700;
}

.dialog__field input,
.dialog__field select,
.dialog__field textarea {
  width: 100%;
  border: 1.5px solid #7b8792;
  border-radius: 8px;
  padding: 10px 12px;
  font: inherit;
  background: var(--bg);
  color: var(--ink);
}

.dialog__field textarea {
  min-height: 118px;
  resize: vertical;
}

.dialog__hint {
  color: var(--muted);
  font-size: 0.9rem;
}

.dialog__notice {
  border: 1.5px solid var(--red);
  border-radius: 8px;
  background: #fdf1f1;
  margin-bottom: 24px;
  padding: 14px 18px;
}

.dialog__notice strong {
  color: var(--red);
}

.dialog__notice p {
  margin: 6px 0;
}

.dialog__notice ul {
  margin: 0;
  padding-left: 20px;
}

.dialog__notice li {
  margin-bottom: 4px;
}

.dialog__field--large textarea {
  min-height: 90px;
}

.dialog__field--large {
  max-width: 560px;
}

.dialog--criteria .dialog__field--large {
  max-width: 500px;
}

.dialog--use-case .dialog__field--large {
  max-width: none;
}

.precheck-legend {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin: 6px 0 10px;
  padding: 0;
  list-style: none;
}

.precheck-legend__item {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  border-radius: 999px;
  padding: 5px 14px 5px 10px;
  font-size: 0.82rem;
  font-weight: 700;
}

.precheck-legend__item::before {
  content: "";
  width: 9px;
  height: 9px;
  flex: none;
  border-radius: 50%;
}

.precheck-legend__item--green {
  background: var(--green-bg);
  color: #3f6b12;
}

.precheck-legend__item--green::before {
  background: var(--green);
}

.precheck-legend__item--orange {
  background: var(--orange-bg);
  color: var(--orange);
}

.precheck-legend__item--orange::before {
  background: var(--orange);
}

.precheck-legend__item--red {
  background: var(--red-bg);
  color: var(--red);
}

.precheck-legend__item--red::before {
  background: var(--red);
}

.precheck {
  display: grid;
  gap: 12px;
  margin-bottom: 16px;
  min-width: 0;
  /* Reihen sind explizit definiert (statt implizit), damit die Karten per
     subgrid darauf zugreifen und ihre Legende/Helfer/Optionen/Antwort-Zeilen
     zeilenweise mit der Nachbarkarte fluchten - unabhängig davon, wie lang
     Frage- oder Hilfetext oder wie viele Antwortoptionen eine Karte hat. */
  grid-template-rows: repeat(4, auto auto auto auto);
}

@media (min-width: 760px) {
  .precheck {
    grid-template-columns: 1fr 1fr;
  }
}

.precheck__item {
  min-width: 0;
  border: 1.5px solid var(--line-soft);
  border-radius: 8px;
  background: var(--bg);
  margin: 0;
  padding: 12px 16px 14px;
  display: grid;
  grid-template-rows: subgrid;
  grid-row: span 4;
  row-gap: 10px;
}

.precheck__legend {
  margin: 0;
  font-weight: 700;
  line-height: 1.35;
}

.precheck__helper {
  color: var(--muted);
  font-size: 0.85rem;
  line-height: 1.5;
  margin: 0;
  padding-left: 12px;
  border-left: 3px solid var(--line-soft);
}

.precheck__options {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.precheck__option {
  position: relative;
  display: flex;
  align-items: center;
  gap: 10px;
  width: 100%;
  border: 1.5px solid var(--line-soft);
  border-radius: 10px;
  padding: 9px 14px;
  font-size: 0.85rem;
  font-weight: 600;
  line-height: 1.35;
  color: var(--ink);
  background: var(--bg);
  cursor: pointer;
  transition: background 0.15s ease, border-color 0.15s ease;
}

.precheck__option::before {
  content: "";
  flex: 0 0 16px;
  width: 16px;
  height: 16px;
  border-radius: 50%;
  border: 1.5px solid var(--line-soft);
  background: var(--bg);
  transition: border-color 0.15s ease, background 0.15s ease, box-shadow 0.15s ease;
}

.precheck__option input {
  position: absolute;
  width: 1px;
  height: 1px;
  opacity: 0;
}

.precheck__option:hover {
  border-color: var(--blue-500);
}

.precheck__option:hover::before {
  border-color: var(--blue-500);
}

.precheck__option:has(input:focus-visible) {
  outline: 2px solid var(--blue-500);
  outline-offset: 2px;
}

.precheck__option:has(input:checked) {
  border-color: var(--blue-500);
  background: var(--blue-50);
}

.precheck__option:has(input:checked)::before {
  border-color: var(--blue-500);
  background: var(--blue-500);
  box-shadow: inset 0 0 0 3px var(--bg);
}

.precheck__option[data-level="green"]:has(input:checked) {
  border-color: var(--green);
  background: var(--green-bg);
}

.precheck__option[data-level="green"]:has(input:checked)::before {
  border-color: var(--green);
  background: var(--green);
}

.precheck__option[data-level="orange"]:has(input:checked) {
  border-color: var(--orange);
  background: var(--orange-bg);
}

.precheck__option[data-level="orange"]:has(input:checked)::before {
  border-color: var(--orange);
  background: var(--orange);
}

.precheck__option[data-level="red"]:has(input:checked) {
  border-color: var(--red);
  background: var(--red-bg);
}

.precheck__option[data-level="red"]:has(input:checked)::before {
  border-color: var(--red);
  background: var(--red);
}

.precheck__answer {
  min-height: 2.7em;
  margin: 0;
  border-radius: 6px;
  padding: 8px 12px;
  font-size: 0.85rem;
  font-weight: 600;
  line-height: 1.35;
}

/* Vor der Auswahl belegt der Platzhalter denselben Platz wie die spätere
   Rückmeldung, damit die Karte beim Beantworten nicht in der Höhe springt. */
.precheck__answer--empty {
  border: 1.5px dashed var(--line-soft);
  color: var(--muted);
  font-weight: 400;
}

.precheck__answer--green {
  background: var(--green-bg);
  color: #3f6b12;
}

.precheck__answer--orange {
  background: var(--orange-bg);
  color: var(--orange);
}

.precheck__answer--red {
  background: var(--red-bg);
  color: var(--red);
}

.precheck-result {
  border: 1.5px solid var(--line-soft);
  border-radius: 8px;
  background: var(--panel);
  padding: 14px 18px;
}

.precheck-result--green {
  border-color: var(--green);
  background: var(--green-bg);
}

.precheck-result--orange {
  border-color: var(--orange);
  background: var(--orange-bg);
}

.precheck-result--red {
  border-color: var(--red);
  background: var(--red-bg);
}

.precheck-result__headline {
  margin: 0 0 4px;
  font-weight: 700;
}

.precheck-result--green .precheck-result__headline {
  color: #3f6b12;
}

.precheck-result--orange .precheck-result__headline {
  color: var(--orange);
}

.precheck-result--red .precheck-result__headline {
  color: var(--red);
}

.precheck-result__lead {
  margin: 0;
  color: var(--muted);
}

.precheck-result--green .precheck-result__lead,
.precheck-result--orange .precheck-result__lead,
.precheck-result--red .precheck-result__lead {
  color: inherit;
}

.precheck-result__reasons {
  margin: 10px 0 0;
  padding-left: 20px;
}

.precheck-result__reasons li {
  margin-bottom: 4px;
}

.dialog__actions {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-top: auto;
}

.dialog__link {
  display: inline-flex;
  align-items: center;
  gap: 12px;
  border: 0;
  background: transparent;
  color: var(--ink);
  cursor: pointer;
  font-size: 1.15rem;
  padding: 0;
}

.dialog__link img {
  width: 74px;
  height: 74px;
}

.dialog__arrow--back {
  transform: scaleX(-1);
}

.screen-note {
  color: var(--muted);
  font-style: italic;
  line-height: 1.45;
  margin: 52px auto 54px;
  max-width: 880px;
  text-align: center;
}

.screen-note strong {
  color: var(--ink);
  display: block;
  font-style: normal;
  margin-bottom: 12px;
}

.sr-only {
  width: 1px;
  height: 1px;
  position: absolute;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
}

@media (max-width: 900px) {
  .page {
    padding: 24px 18px;
  }

  .page--home {
    padding: 0 18px;
  }

  .topbar {
    align-items: flex-start;
    flex-direction: column;
  }

  .step-links {
    justify-content: flex-start;
  }

  .hero {
    min-height: 100svh;
    gap: 32px;
  }

  .hero__content {
    width: 100%;
  }

  .hero__brand {
    font-size: clamp(3rem, 14vw, 4rem);
    line-height: 1.05;
  }

  .hero__visual {
    width: min(280px, 78vw);
    aspect-ratio: 351 / 234;
    height: auto;
    margin: 0 auto 4px;
  }

  .hero__media {
    top: 9.4%;
    left: 18.2%;
    width: 63.25%;
  }

  .hero__chip {
    top: 10.3%;
    left: 45%;
    width: 36.2%;
  }

  .hero h1,
  .page-title {
    font-size: clamp(1.45rem, 7.2vw, 2.35rem);
  }

  .hero h1 {
    line-height: 1.4;
  }

  .hero__subtitle {
    font-size: clamp(1rem, 4.4vw, 1.5rem);
    margin-top: 0;
  }

  .hero__action {
    width: min(calc(100vw - 36px), 515px);
    height: 70px;
    font-size: clamp(1.8rem, 8vw, 2.25rem);
  }

  .copy {
    font-size: 1.08rem;
  }

  .choice-grid,
  .compare {
    grid-template-columns: 1fr;
  }

  .choice-grid {
    gap: 18px;
  }

  .compare-divider {
    text-align: center;
  }

  .weight-row {
    grid-template-columns: 1fr;
    gap: 8px;
  }

  .criteria-edit {
    grid-template-columns: 1fr;
  }

  .toolbar {
    justify-content: flex-start;
    gap: 12px;
  }

  .result-grid,
  .result-band__row {
    grid-template-columns: 1fr;
  }

  .result-cell {
    min-width: 260px;
  }

  .dialog {
    min-height: auto;
    padding: 52px 22px 28px;
  }

  .dialog__add {
    left: 18px;
    top: -42px;
    width: 84px;
    height: 84px;
  }

  .dialog--criteria .dialog__field--large {
    max-width: none;
  }

  .dialog__field--large {
    max-width: none;
  }

  .dialog__actions {
    align-items: stretch;
    flex-direction: column;
    gap: 18px;
  }
}

