.page-header.tool-hero {
  margin-bottom: 1.1rem;
}

.layout {
  display: grid;
  gap: 1rem;
  margin-bottom: 1.25rem; /* Abstand Tool -> erste Content-Card */
}

.card-head {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 1rem;
}

.tile-options {
  display: grid;
  gap: 0.5rem;
}

.tile {
  border: 1px solid var(--border);
  border-radius: 12px;
  min-height: 44px;
  padding: 0.75rem 0.85rem;
  background: #fff;
  cursor: pointer;
  box-shadow: 0 1px 2px rgba(15, 23, 42, 0.02);
  transition:
  background-color 0.15s linear,
  border-color 0.15s linear,
  box-shadow 0.15s linear;
}

.tile:hover {
  border-color: #b9c4d5;
  background: #fbfdff;
  box-shadow: 0 4px 10px rgba(15, 23, 42, 0.04);
}

.tile input[type="radio"] {
  margin-right: 0.55rem;
}

.tile:has(input:checked) {
  border-color: var(--accent);
  background: var(--accent-soft);
  box-shadow: 0 0 0 1px rgba(38, 94, 199, 0.06);
}

.tile.is-disabled {
  opacity: 0.55;
  cursor: not-allowed;
  background: #f8fafc;
  box-shadow: none;
}

.tile:has(input:disabled):hover {
  border-color: var(--border);
  background: #f8fafc;
  box-shadow: none;
}

/* =========================
   Tool Hero (Intro)
   ========================= */

.tool-hero {
  margin-bottom: 1.1rem;
  padding: 1.2rem 1.05rem 1.15rem;
  border-radius: 18px;
  border: 1px solid rgba(15, 23, 42, 0.08);
  background:
    radial-gradient(1200px 260px at 10% -30%, rgba(38, 94, 199, 0.10), transparent 55%),
    radial-gradient(1000px 240px at 90% 0%, rgba(15, 118, 110, 0.06), transparent 55%),
    rgba(255, 255, 255, 0.9);
  box-shadow: 0 16px 38px rgba(15, 23, 42, 0.055);
  backdrop-filter: saturate(150%) blur(8px);
  -webkit-backdrop-filter: saturate(150%) blur(8px);
}

.tool-hero__kicker {
  margin: 0 0 0.38rem;
  color: #4f6080;
  font-size: 0.78rem;
  font-weight: 760;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.tool-hero h1 {
  margin: 0;
  letter-spacing: -0.03em;
  line-height: 1.06;
  font-size: clamp(1.95rem, 3vw, 2.7rem);
  max-width: 18ch;
  text-wrap: balance;
}

.tool-hero__lead {
  margin: 0.78rem 0 0;
  color: #3f4a5a;
  font-size: 1rem;
  line-height: 1.58;
  max-width: 60rem;
}

.tool-hero__bullets {
  margin: 1rem 0 0;
  padding: 0.88rem 0.9rem;
  border-radius: 15px;
  border: 1px solid rgba(15, 23, 42, 0.07);
  background: rgba(237, 243, 255, 0.48);
  list-style: none;
  display: grid;
  gap: 0.48rem;
}

.tool-hero__bullets li {
  margin: 0;
  padding-left: 1.4rem;
  position: relative;
  color: #243041;
  line-height: 1.38;
}

.tool-hero__bullets li::before {
  content: "✓";
  position: absolute;
  left: 0;
  top: 0;
  color: var(--accent, #265ec7);
  font-weight: 900;
}

.tool-hero__meta {
  margin-top: 0.85rem;
  display: grid;
  gap: 0.28rem;
}

.tool-hero__note {
  margin: 0;
  color: #334155;
  font-size: 0.98rem;
  line-height: 1.5;
}

.tool-hero__disclaimer {
  margin: 0;
  color: var(--muted);
  font-size: 0.91rem;
  line-height: 1.45;
}

.tool-hero__actions {
  margin-top: 0.9rem;
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
}

.tool-hero__actions .primary {
  appearance: none;
  -webkit-appearance: none;
  border: 1px solid var(--accent);
  background: linear-gradient(180deg, #2f6de3 0%, #265ec7 100%);
  color: #fff;
  border-radius: 10px;
  padding: 0.56rem 0.95rem;
  min-height: 38px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font: inherit;
  font-size: 0.94rem;
  font-weight: 610;
  line-height: 1;
  letter-spacing: -0.01em;
  text-decoration: none;
  white-space: nowrap;
  cursor: pointer;
  box-shadow:
    0 1px 2px rgba(15, 23, 42, 0.05),
    0 4px 10px rgba(38, 94, 199, 0.14);
  transition:
    background 160ms ease,
    box-shadow 160ms ease,
    transform 120ms ease;
}

.tool-hero__actions .primary:hover {
  background: linear-gradient(180deg, #3777ef 0%, #2c67d6 100%);
  box-shadow:
    0 1px 2px rgba(15, 23, 42, 0.06),
    0 6px 14px rgba(38, 94, 199, 0.16);
}

.tool-hero__actions .primary:active {
  transform: translateY(1px);
  box-shadow:
    0 1px 2px rgba(15, 23, 42, 0.04),
    0 3px 8px rgba(38, 94, 199, 0.12);
}

.tool-hero__actions .primary:focus-visible {
  outline: 2px solid rgba(29, 78, 216, 0.45);
  outline-offset: 3px;
}

.tool-hero__actions .secondary {
  appearance: none;
  -webkit-appearance: none;
  border: 1px solid var(--border);
  background: #fff;
  color: #243041;
  border-radius: 10px;
  padding: 0.56rem 0.95rem;
  min-height: 38px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font: inherit;
  font-size: 0.94rem;
  font-weight: 530;
  line-height: 1;
  letter-spacing: -0.01em;
  text-decoration: none;
  white-space: nowrap;
  cursor: pointer;
  box-shadow: 0 1px 2px rgba(15, 23, 42, 0.03);
  transition:
    background 160ms ease,
    box-shadow 160ms ease,
    border-color 160ms ease;
}

.tool-hero__actions .secondary:hover {
  background: #f8fafc;
  border-color: #c8d1df;
  box-shadow: 0 2px 6px rgba(15, 23, 42, 0.04);
}

.tool-hero__actions .secondary:focus-visible {
  outline: 2px solid rgba(29, 78, 216, 0.22);
  outline-offset: 3px;
}

/* Desktop */
@media (min-width: 900px) {
  .layout {
    grid-template-columns: 1fr 1fr;
    align-items: start;
  }

  .result:not(.result--neutral) {
    position: sticky;
    top: 1rem;
  }

  .tool-hero {
    padding: 1.35rem 1.35rem 1.18rem;
    border-radius: 20px;
    box-shadow: 0 18px 42px rgba(15, 23, 42, 0.06);
  }

  .tool-hero h1 {
  max-width: 24ch;
  font-size: clamp(1.9rem, 2vw, 2.35rem);
  line-height: 1.08;
}

  .tool-hero__lead {
    font-size: 1.02rem;
    max-width: 62rem;
  }

  .tool-hero__bullets {
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 0.72rem;
    padding: 0.95rem 0.95rem;
  }

  .tool-hero__actions .primary,
  .tool-hero__actions .secondary {
    min-height: 36px;
    padding: 0.52rem 0.9rem;
    font-size: 0.92rem;
  }
}

@media (max-width: 640px) {
  .tool-hero {
    padding: 1rem 0.95rem 0.98rem;
    border-radius: 16px;
  }

  .tool-hero h1 {
    font-size: clamp(1.95rem, 7.6vw, 2.45rem);
    max-width: 9ch;
    line-height: 1.04;
  }

  .tool-hero__lead {
    font-size: 0.97rem;
    line-height: 1.5;
  }

  .tool-hero__bullets {
    margin-top: 0.9rem;
    padding: 0.78rem 0.82rem;
    gap: 0.38rem;
  }

  .tool-hero__meta {
    margin-top: 0.78rem;
    gap: 0.28rem;
  }

  .tool-hero__actions {
    margin-top: 0.85rem;
    gap: 0.5rem;
  }

  .tool-hero__actions .primary,
  .tool-hero__actions .secondary {
    padding: 0.54rem 0.88rem;
    min-height: 38px;
    font-size: 0.92rem;
    flex: 1 1 100%;
  }
}



.field-error {
  margin: 0.35rem 0 0;
  min-height: 1.2rem;
  color: var(--error);
  font-size: 0.92rem;
}

.consistency-feedback {
  margin: 0.4rem 0 0;
  min-height: 1.2rem;
  font-size: 0.9rem;
  color: #6b7280;
}

#optional-details { margin-top: 0.6rem; }
#optional-details > summary {
  cursor: pointer;
  font-weight: 700;
  line-height: 1.35;
  list-style: none;
}

#optional-details > summary::-webkit-details-marker {
  display: none;
}

#optional-details .tile {
  white-space: normal;
  line-height: 1.35;
}

#optional-details fieldset + fieldset {
  margin-top: 1rem;
  padding-top: 0.75rem;
  border-top: 1px solid var(--border);
}

.result {
  background: #fff;
  border: 1px solid rgba(15, 23, 42, 0.08);
  box-shadow: 0 10px 24px rgba(15, 23, 42, 0.04);
}

.result .result-frame {
  min-height: 0;
}

.result.result--neutral {
  padding-top: 0.75rem;
  padding-bottom: 0.75rem;
}

.result--neutral .result-frame {
  min-height: 0;
}

.result .result-placeholder {
  margin: 0.4rem 0 0;
  color: var(--muted);
}

.result .ampel-badge {
  display: inline-flex;
  align-items: center;
  gap: 0.45rem;
  margin: 0;
  font-weight: 650;
  border: 1px solid rgba(15, 23, 42, 0.1);
  border-radius: 999px;
  padding: 0.34rem 0.72rem;
  background: linear-gradient(180deg, #ffffff 0%, #fbfcfe 100%);
  box-shadow: 0 1px 2px rgba(15, 23, 42, 0.03);
  max-width: 100%;
  overflow-wrap: anywhere;
}

.result .score {
  font-size: clamp(2.2rem, 11vw, 3.4rem);
  font-weight: 800;
  letter-spacing: -0.03em;
  line-height: 1.02;
  margin: 0.32rem 0 0.22rem;
}

.result .score-legend-inline {
  font-size: 0.82rem;
  color: var(--muted);
  line-height: 1.3;
  margin: 0.1rem 0 0;
}

.result .score-legend-details {
  margin: 0.25rem 0 0.55rem;
}

.result .score-legend-details > summary {
  display: inline-block;
  font-size: 0.82rem;
  color: var(--muted);
  cursor: pointer;
  text-decoration: underline;
  text-underline-offset: 2px;
  list-style: none;
}

.result .score-legend-details > summary::-webkit-details-marker {
  display: none;
}

.result .score-legend-details > summary:focus-visible {
  outline: 2px solid currentColor;
  outline-offset: 2px;
  border-radius: 6px;
}

.result .score-legend-ranges,
.result .score-legend-note {
  margin: 0;
  font-size: 0.82rem;
  color: var(--muted);
  line-height: 1.35;
}

.result .score-legend-note {
  margin-top: 0.2rem;
}

.result .result-headline {
  margin: 0.9rem 0 0.5rem;
  font-size: 1.12rem;
  font-weight: 750;
  line-height: 1.3;
}

.result .interpretation {
  margin: 0 0 0.8rem;
  font-size: 0.99rem;
  color: #243041;
}

.result .result-subtitle {
  margin: 0.45rem 0 0;
  font-size: 0.95rem;
  font-weight: 650;
}

.result .practical-list {
  margin-top: 0.25rem;
}

.result .confidence {
  margin: 0.2rem 0 0.55rem;
  color: var(--muted);
}

.result .result-section + .result-section {
  margin-top: 1.1rem;
}

.result .result-section h3 {
  margin: 0 0 0.45rem;
  line-height: 1.25;
}

.result .result-section h3,
.result #primary-step-section h3 {
  color: #111827;
  letter-spacing: -0.015em;
}

.result #primary-step-section {
  margin-top: 0.75rem;
  padding: 0.7rem 0.8rem;
  border: 1px solid rgba(15, 23, 42, 0.08);
  border-radius: 12px;
  background: rgba(248, 250, 252, 0.9);
}

.result #primary-step-section h3 {
  margin-top: 0;
  margin-bottom: 0.45rem;
}

.result #primary-step-section ul {
  margin: 0.15rem 0 0;
  padding-left: 1.1rem;
}

.result .score-legend-details__body {
  margin-top: 0.35rem;
  padding: 0.5rem 0.65rem;
  border-radius: 10px;
  background: #f8fafc;
  border: 1px solid rgba(15, 23, 42, 0.06);
}

.result .details-toggle {
  margin-top: 0.75rem;
  border: 1px solid var(--border);
  border-radius: 10px;
  background: #fff;
  color: #243041;
  padding: 0.46rem 0.78rem;
  min-height: 38px;
  font: inherit;
  font-size: 0.95rem;
  font-weight: 600;
  line-height: 1;
  box-shadow: 0 1px 2px rgba(15, 23, 42, 0.02);
  cursor: pointer;
  transition:
    background 160ms ease,
    border-color 160ms ease,
    box-shadow 160ms ease;
}

.result .details-toggle:hover {
  background: #f8f9fb;
  border-color: #c8d1df;
  box-shadow: 0 2px 6px rgba(15, 23, 42, 0.04);
}

.result .details-toggle[aria-expanded="true"] {
  background: #f8f9fb;
}

.result #result-details {
  margin-top: 0.7rem;
}

.result .result-trust {
  margin: 0.8rem 0 0;
  font-size: 0.84rem;
  line-height: 1.45;
  color: var(--muted);
}

.result ul {
  margin-top: 0.35rem;
  padding-left: 1.25rem;
}

.result li {
  margin: 0.3rem 0;
}
