/**
 * company: cube one GmbH
 * name: data-integrity-check.css
 * author: Thomas Schäfer
 * created: 22.08.2026
 * change log: 27.08.2026 – Thomas Schäfer – Widen the gap between the result
 *             CTA card and the restart button.
 *             27.08.2026 – Thomas Schäfer – Reuse the BSI banner for the NIS-2 Check.
 *             27.08.2026 – Thomas Schäfer – Theme hero for the EU AI Act Check.
 *             27.08.2026 – Thomas Schäfer – Theme heroes for the Part 11 and
 *             BSI IT-Grundschutz Checks.
 *             26.08.2026 – Thomas Schäfer – Inherit theme-hero headroom instead
 *             of centering the Annex 11 and Data Integrity Check banners.
 *             26.08.2026 – Thomas Schäfer – Theme hero for the Annex 11 Check.
 *             23.08.2026 – Thomas Schäfer – Style question-level regulatory citations.
 *             22.08.2026 – Thomas Schäfer – Add an accessible result transition for
 *             automatic evaluation.
 *             22.08.2026 – Thomas Schäfer – Keep question legends inside each card,
 *             strengthen answer and action contrast, and expand the introduction to full width.
 *             22.08.2026 – Initial compliance assessment component.
 */

.page-hero--banner-data-integrity-check {
  background-image: url("../img/allgemein/cubeone-themenbanner-data-integrity-check.jpg");
}

.page-hero--banner-annex-11-check {
  background-image: url("../img/allgemein/cubeone-themenbanner-annex-11-check.jpg");
}

.page-hero--banner-part-11 {
  background-image: url("../img/allgemein/cubeone-themenbanner-part-11.jpg");
}

.page-hero--banner-bsi-grundschutz,
.page-hero--banner-nis-2 {
  background-image: url("../img/allgemein/cubeone-themenbanner-bsi-grundschutz.jpg");
}

.page-hero--banner-eu-ai-act {
  background-image: url("../img/allgemein/cubeone-themenbanner-eu-ai-act.jpg");
}

.di-check-layout {
  display: grid;
  gap: clamp(2rem, 5vw, 4rem);
}

.di-check-intro {
  margin-bottom: clamp(2rem, 5vw, 3.5rem);
}

.di-check-intro h2 {
  text-align: left;
}

.di-check-intro p {
  color: var(--text-secondary);
}

.di-check-shell {
  --di-line: rgba(255, 255, 255, 0.13);
  --di-surface: rgba(18, 18, 18, 0.96);
  position: relative;
  overflow: hidden;
  border: 1px solid var(--di-line);
  border-radius: var(--radius-xl);
  background:
    linear-gradient(135deg, rgba(249, 115, 22, 0.08), transparent 35%),
    var(--di-surface);
  box-shadow: 0 24px 70px rgba(0, 0, 0, 0.35);
}

.di-check-shell::before {
  content: "";
  position: absolute;
  inset: 0 auto 0 0;
  width: 3px;
  background: linear-gradient(to bottom, var(--accent), rgba(249, 115, 22, 0.1));
}

.di-check-header {
  display: grid;
  gap: 1rem;
  padding: clamp(1.25rem, 4vw, 2rem);
  border-bottom: 1px solid var(--di-line);
}

.di-check-kicker,
.di-question-index,
.di-result-label {
  color: var(--accent-light);
  font-family: "Space Grotesk", sans-serif;
  font-size: 0.75rem;
  font-weight: 700;
  letter-spacing: 0.12em;
  text-transform: uppercase;
}

.di-check-progress-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
}

.di-check-progress {
  flex: 1 1 auto;
  height: 4px;
  overflow: hidden;
  background: rgba(255, 255, 255, 0.1);
}

.di-check-progress-bar {
  display: block;
  width: 50%;
  height: 100%;
  background: var(--accent);
  transform-origin: left center;
  transition: transform 0.25s ease;
}

.di-check-step-label {
  flex: 0 0 auto;
  color: var(--text-secondary);
  font-size: 0.875rem;
  font-variant-numeric: tabular-nums;
}

.di-check-form {
  padding: clamp(1.25rem, 4vw, 2rem);
}

.di-check-step {
  display: grid;
  gap: 1.25rem;
  padding: 0;
  border: 0;
}

.di-check-step[hidden],
.di-check-results[hidden] {
  display: none;
}

.di-question {
  margin: 0;
  padding: 1.25rem;
  border: 1px solid var(--di-line);
  border-radius: var(--radius-md);
  background: rgba(255, 255, 255, 0.025);
}

.di-question legend {
  float: left;
  width: 100%;
  margin: 0 0 1rem;
  padding: 0;
  color: var(--text-primary);
  font-family: "Space Grotesk", sans-serif;
  font-size: clamp(1rem, 2vw, 1.125rem);
  font-weight: 600;
  line-height: 1.5;
}

.di-question-index {
  display: block;
  margin-bottom: 0.35rem;
}

.di-question-source {
  clear: both;
  margin: 0 0 1rem;
  color: var(--text-secondary);
  font-size: 0.875rem;
  line-height: 1.55;
  overflow-wrap: anywhere;
}

.di-question-source a {
  color: var(--accent-light);
  font-weight: 600;
  text-decoration: underline;
  text-decoration-thickness: 1px;
  text-underline-offset: 0.2em;
}

.di-question-source a:hover,
.di-question-source a:focus-visible {
  color: var(--text-primary);
}

.di-question-source a:focus-visible {
  outline: 2px solid var(--accent-light);
  outline-offset: 3px;
}

.di-question-options {
  clear: both;
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(130px, 1fr));
  gap: 0.625rem;
}

.di-option {
  position: relative;
  display: flex;
  min-height: 44px;
  align-items: center;
  justify-content: center;
  padding: 0.75rem;
  border: 1px solid rgba(255, 255, 255, 0.24);
  border-radius: var(--radius-sm);
  background: rgba(255, 255, 255, 0.045);
  color: var(--text-primary);
  cursor: pointer;
  text-align: center;
  transition: border-color 0.2s ease, background-color 0.2s ease, color 0.2s ease;
}

.di-option input {
  position: absolute;
  width: 1px;
  height: 1px;
  overflow: hidden;
  opacity: 0;
}

.di-option:has(input:checked) {
  border-color: var(--accent);
  background: rgba(249, 115, 22, 0.2);
  color: var(--text-primary);
}

.di-option:hover {
  border-color: var(--accent-light);
  background: rgba(249, 115, 22, 0.12);
  color: var(--text-primary);
}

.di-option:has(input:focus-visible) {
  outline: 3px solid rgba(251, 146, 60, 0.65);
  outline-offset: 3px;
}

.di-check-actions {
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  gap: 0.75rem;
  margin-top: 1.5rem;
}

.di-check-actions .btn[hidden] {
  display: none;
}

.di-check-shell .btn-outline:hover,
.di-check-shell .btn-outline:focus-visible {
  background: rgba(249, 115, 22, 0.12);
  color: var(--text-primary);
}

.di-check-shell .btn-outline:focus-visible {
  outline: 3px solid var(--accent-light);
  outline-offset: 3px;
}

.di-check-shell .btn-outline:active {
  background: rgba(249, 115, 22, 0.2);
  color: var(--text-primary);
  transform: none;
}

.di-check-error {
  min-height: 1.5rem;
  margin: 1rem 0 0;
  color: #ffb4a2;
}

.di-check-noscript {
  margin: 0 0 1.25rem;
  padding: 1rem;
  border-left: 3px solid var(--accent);
  background: rgba(249, 115, 22, 0.08);
  color: var(--text-secondary);
}

.di-check-results {
  padding: clamp(1.25rem, 4vw, 2rem);
  animation: di-results-enter 0.18s ease-out;
}

.di-check-results:focus {
  outline: 3px solid var(--accent-light);
  outline-offset: -3px;
}

.di-result-score {
  display: flex;
  align-items: baseline;
  gap: 0.5rem;
  margin: 0.75rem 0;
  color: var(--text-primary);
  font-family: "Space Grotesk", sans-serif;
  font-size: clamp(2.5rem, 8vw, 4.5rem);
  font-weight: 700;
  line-height: 1;
}

.di-result-score span {
  color: var(--text-muted);
  font-size: 1rem;
  font-weight: 500;
}

.di-priority-list {
  display: grid;
  gap: 0.75rem;
  margin: 1.5rem 0;
  padding: 0;
  list-style: none;
}

.di-priority-list li {
  padding: 1rem;
  border-left: 2px solid var(--accent);
  background: rgba(255, 255, 255, 0.035);
  color: var(--text-secondary);
}

.di-result-cta {
  margin-top: 1.5rem;
  margin-bottom: 1.75rem;
  padding: clamp(1.25rem, 4vw, 1.75rem);
  border: 1px solid rgba(249, 115, 22, 0.35);
  border-radius: var(--radius-lg);
  background: linear-gradient(135deg, rgba(249, 115, 22, 0.14), rgba(8, 8, 8, 0.3));
}

.di-result-cta p {
  color: var(--text-secondary);
}

.di-evidence {
  display: grid;
  gap: 1rem;
  margin-top: clamp(3rem, 7vw, 5rem);
}

.di-evidence-card {
  padding: 1.25rem;
  border-top: 1px solid var(--border);
}

.di-evidence-card h3 {
  margin-bottom: 0.5rem;
  font-size: 1.05rem;
}

.di-evidence-card p {
  color: var(--text-secondary);
}

@keyframes di-results-enter {
  from {
    opacity: 0;
    transform: translateY(0.5rem);
  }

  to {
    opacity: 1;
    transform: translateY(0);
  }
}

html:not(.js) .di-check-progress-row,
html:not(.js) .di-check-actions,
html:not(.js) .di-check-results {
  display: none;
}

html:not(.js) .di-check-step[hidden] {
  display: grid;
}

@media (min-width: 768px) {
  .di-check-header {
    grid-template-columns: minmax(0, 1fr);
  }

  .di-evidence {
    grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  }
}

@media (min-width: 1024px) {
  .di-check-layout {
    grid-template-columns: minmax(0, 1fr) minmax(260px, 320px);
    align-items: start;
  }
}

@media (max-width: 767px) {
  .di-question-options {
    grid-template-columns: 1fr;
  }

  .di-check-actions .btn {
    flex: 1 1 100%;
  }
}

@media (prefers-reduced-motion: reduce) {
  .di-check-progress-bar,
  .di-option,
  .di-check-results,
  .di-check-shell .btn-outline {
    animation: none;
    transition: none;
  }

  .di-check-shell .btn-outline:hover,
  .di-check-shell .btn-outline:focus-visible,
  .di-check-shell .btn-outline:active {
    transform: none;
  }
}
