:root {
  --spd-red: #e3000f;
  --spd-red-soft: #fde8ea;
  --spd-red-hover: #c4000d;
  --black: #111111;
  --gray-900: #1a1a1a;
  --gray-600: #5c5c5c;
  --gray-300: #d4d4d4;
  --gray-100: #f3f3f3;
  --white: #ffffff;
  --radius: 14px;
  --font: "Outfit", system-ui, sans-serif;
  --max: 680px;
  --nav-h: 5.25rem;
}

*,
*::before,
*::after {
  box-sizing: border-box;
}

html,
body {
  margin: 0;
  min-height: 100%;
}

body {
  font-family: var(--font);
  color: var(--black);
  background:
    radial-gradient(ellipse 80% 50% at 100% -10%, rgba(227, 0, 15, 0.08), transparent 55%),
    radial-gradient(ellipse 60% 40% at 0% 100%, rgba(227, 0, 15, 0.05), transparent 50%),
    linear-gradient(180deg, #fff 0%, #fafafa 100%);
  background-attachment: fixed;
  line-height: 1.45;
  -webkit-font-smoothing: antialiased;
}

button,
input,
textarea {
  font: inherit;
}

.app {
  max-width: var(--max);
  margin: 0 auto;
  padding: 1rem 1.25rem 0;
  min-height: 100dvh;
  display: flex;
  flex-direction: column;
}

.header {
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 0.75rem 0 1.15rem;
  flex-shrink: 0;
}

.logo {
  height: 48px;
  width: auto;
  max-width: min(220px, 70vw);
  display: block;
  object-fit: contain;
}

.view {
  flex: 1;
  display: none;
  flex-direction: column;
  animation: fadeIn 0.35s ease;
  min-height: 0;
}

.view.is-active {
  display: flex;
}

.view[hidden] {
  display: none !important;
}

@keyframes fadeIn {
  from {
    opacity: 0;
    transform: translateY(8px);
  }
  to {
    opacity: 1;
    transform: none;
  }
}

.hero {
  margin-top: auto;
  margin-bottom: auto;
  padding: 1.5rem 0 2.5rem;
}

.eyebrow {
  margin: 0 0 0.75rem;
  color: var(--spd-red);
  font-weight: 600;
  font-size: 0.9rem;
  text-transform: uppercase;
  letter-spacing: 0.08em;
}

.hero h1,
.view-thanks h1 {
  margin: 0 0 1rem;
  font-size: clamp(2rem, 6vw, 2.75rem);
  font-weight: 700;
  letter-spacing: -0.03em;
  line-height: 1.1;
}

.lead {
  margin: 0 0 1.25rem;
  color: var(--gray-600);
  font-size: 1.1rem;
  max-width: 36ch;
}

.lead-secondary {
  margin-top: 0.25rem;
}

a.btn {
  display: inline-block;
  text-decoration: none;
  text-align: center;
}

.trust-list {
  list-style: none;
  margin: 0 0 1.75rem;
  padding: 0;
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
}

.trust-list li {
  margin: 0;
  padding: 0.4rem 0.75rem;
  background: var(--white);
  border: 1px solid var(--gray-300);
  border-radius: 999px;
  font-size: 0.85rem;
  font-weight: 500;
  color: var(--gray-900);
}

.meta {
  margin: 1rem 0 0;
  color: var(--gray-600);
  font-size: 0.9rem;
}

.privacy-note {
  margin: 1.5rem 0 0;
  max-width: min(42rem, 100%);
  color: var(--gray-600);
  font-size: 0.85rem;
  line-height: 1.45;
}

.privacy-note a {
  color: var(--spd-red);
  text-decoration: underline;
  text-underline-offset: 2px;
}

.legal-page {
  padding: 0.5rem 0 2.5rem;
}

.legal-page h1 {
  margin: 0 0 1rem;
  font-size: clamp(1.75rem, 5vw, 2.25rem);
  letter-spacing: -0.03em;
  line-height: 1.15;
}

.legal-page h2 {
  margin: 1.75rem 0 0.5rem;
  font-size: 1.05rem;
}

.legal-page p,
.legal-page li {
  color: var(--gray-600);
  font-size: 0.98rem;
}

.legal-page ul {
  padding-left: 1.2rem;
}

.legal-back {
  margin-top: 2rem;
}


.btn {
  appearance: none;
  border: none;
  border-radius: 999px;
  padding: 0.9rem 1.5rem;
  font-weight: 600;
  cursor: pointer;
  transition: background 0.15s ease, color 0.15s ease, transform 0.12s ease, opacity 0.15s ease;
  -webkit-tap-highlight-color: transparent;
  outline: none;
}

.btn:focus-visible {
  outline: 2px solid var(--spd-red);
  outline-offset: 3px;
}

.btn:active {
  transform: scale(0.98);
}

.btn:disabled {
  opacity: 0.45;
  cursor: not-allowed;
  transform: none;
}

.btn-primary {
  background: var(--spd-red);
  color: var(--white);
}

.btn-primary:hover:not(:disabled) {
  background: var(--spd-red-hover);
}

.btn-ghost {
  background: var(--white);
  color: var(--black);
  border: 1.5px solid var(--gray-300);
}

.btn-ghost:hover:not(:disabled) {
  border-color: var(--black);
}

.survey-body {
  flex: 1;
  overflow-y: auto;
  padding-bottom: 0.5rem;
  min-height: 0;
  -webkit-overflow-scrolling: touch;
}

.progress-wrap {
  margin-bottom: 1.35rem;
  position: sticky;
  top: 0;
  z-index: 5;
  padding: 0.25rem 0 0.75rem;
  background: transparent;
}

.progress-meta {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 0.75rem;
  margin-bottom: 0.5rem;
  font-size: 0.9rem;
  font-weight: 500;
}

.section-chip {
  color: var(--spd-red);
  font-size: 0.8rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.04em;
}

.progress-track {
  height: 6px;
  background: var(--gray-100);
  border-radius: 999px;
  overflow: hidden;
}

.progress-fill {
  height: 100%;
  width: 0%;
  background: var(--spd-red);
  border-radius: inherit;
  transition: width 0.3s ease;
}

.question-card {
  padding-bottom: 1rem;
}

.question-heading {
  display: flex;
  align-items: flex-start;
  gap: 0.9rem;
  margin-bottom: 1rem;
}

.question-icon {
  flex-shrink: 0;
  width: 48px;
  height: 48px;
  border-radius: 14px;
  background: var(--spd-red-soft);
  color: var(--spd-red);
  display: grid;
  place-items: center;
}

.question-icon[hidden] {
  display: none !important;
}

.question-icon svg {
  width: 24px;
  height: 24px;
  display: block;
}

.question-heading-text {
  flex: 1;
  min-width: 0;
}

.hint {
  margin: 0.4rem 0 0;
  color: var(--gray-600);
  font-size: 0.9rem;
}

.question-card h2 {
  margin: 0;
  font-size: clamp(1.2rem, 4.2vw, 1.5rem);
  font-weight: 650;
  letter-spacing: -0.02em;
  line-height: 1.3;
}

.scale-legend {
  margin: 0 0 1rem;
  color: var(--gray-600);
  font-size: 0.88rem;
  line-height: 1.35;
}

.options {
  display: grid;
  grid-template-columns: 1fr;
  gap: 0.65rem;
}

/* 2 Spalten erst ab Tablet, nicht auf dem Handy */
@media (min-width: 640px) {
  .options.cols-auto {
    grid-template-columns: 1fr 1fr;
  }
}

.tile {
  display: flex;
  align-items: center;
  gap: 0.85rem;
  width: 100%;
  text-align: left;
  padding: 0.95rem 1rem;
  border: 1.5px solid var(--gray-300);
  border-radius: var(--radius);
  background: var(--white);
  color: var(--black);
  cursor: pointer;
  transition: border-color 0.15s ease, background 0.15s ease, box-shadow 0.15s ease, transform 0.12s ease;
  box-shadow: 0 1px 0 rgba(0, 0, 0, 0.02);
  min-height: 52px;
}

.tile:hover {
  border-color: #999;
}

.tile:active {
  transform: scale(0.99);
}

.tile.is-selected {
  border-color: var(--spd-red);
  background: var(--spd-red-soft);
  box-shadow: inset 0 0 0 1px var(--spd-red);
}

.tile-label {
  font-weight: 550;
  font-size: 0.98rem;
  width: 100%;
}

.tile.tile-muted {
  border-style: dashed;
  color: var(--gray-600);
}

.tile.tile-muted.is-selected {
  color: var(--black);
}

.tile.scale-tile {
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 0.25rem;
  min-height: 72px;
  padding: 0.7rem 0.35rem;
}

.tile.scale-tile .scale-num {
  width: 36px;
  height: 36px;
  border-radius: 50%;
  font-weight: 700;
  font-size: 0.95rem;
  background: var(--gray-100);
  display: grid;
  place-items: center;
}

.tile.scale-tile.is-selected .scale-num {
  background: var(--spd-red);
  color: var(--white);
}

.options.scale-row {
  grid-template-columns: repeat(5, 1fr);
  gap: 0.45rem;
}

.extra-field {
  margin-top: 1rem;
}

.extra-field label {
  display: block;
  margin-bottom: 0.4rem;
  font-weight: 550;
  font-size: 0.95rem;
}

.extra-field input,
.question-card textarea {
  width: 100%;
  border: 1.5px solid var(--gray-300);
  border-radius: var(--radius);
  padding: 0.9rem 1rem;
  background: var(--white);
  outline: none;
  transition: border-color 0.15s ease;
}

.extra-field input:focus,
.question-card textarea:focus {
  border-color: var(--spd-red);
}

.question-card textarea {
  min-height: 140px;
  resize: vertical;
}

.error {
  margin: 0.85rem 0 0;
  color: var(--spd-red);
  font-size: 0.9rem;
  font-weight: 500;
}

.nav-actions {
  position: sticky;
  bottom: 0;
  z-index: 20;
  display: flex;
  justify-content: space-between;
  gap: 0.75rem;
  margin-top: auto;
  padding: 0.85rem 0 calc(0.85rem + env(safe-area-inset-bottom, 0px));
  background: linear-gradient(180deg, rgba(250, 250, 250, 0) 0%, rgba(250, 250, 250, 0.92) 28%, #fafafa 55%);
  border-top: 1px solid rgba(0, 0, 0, 0.04);
}

.nav-actions .btn {
  min-width: 120px;
  flex: 1;
}

.view-thanks .hero {
  text-align: left;
}

.thanks-icon {
  margin-bottom: 1.25rem;
}

.view-thanks .btn {
  margin-right: 0.5rem;
  margin-bottom: 0.5rem;
}

.answers-debug {
  margin-top: 1.25rem;
  padding: 1rem;
  background: var(--gray-100);
  border-radius: var(--radius);
  overflow: auto;
  font-size: 0.8rem;
  max-height: 280px;
  text-align: left;
}

@media (prefers-reduced-motion: reduce) {
  .view,
  .progress-fill,
  .tile,
  .btn {
    animation: none;
    transition: none;
  }
}
