/* ============================================================
   ORBIS SE – AI Readiness Assessment
   Global Stylesheet
   ============================================================ */

/* Load Source Sans 3 via <link> tags in the HTML <head> instead of CSS @import for better performance. */

/* ---- CSS Custom Properties (ORBIS Design System) ---- */
:root {
  /* Farben */
  --color-primary:      #154194;
  --color-primary-mid:  #5071af;
  --color-accent:       #8aa0ca;
  --color-accent-hover: #5071af;
  --color-bg:           #f4f7fc;
  --color-surface:      #ffffff;
  --color-text:         #154194;
  --color-text-light:   #5071af;
  --color-border:       #d8e1f0;
  --color-success:      #2e7d32;
  --color-warning:      #e65100;

  /* Typografie */
  --font-primary: 'Source Sans 3', 'Source Sans Pro', 'Open Sans', Arial, sans-serif;
  --font-heading:  'Source Sans 3', 'Source Sans Pro', Arial, sans-serif;

  /* Abstände */
  --space-xs:  4px;
  --space-sm:  8px;
  --space-md:  16px;
  --space-lg:  24px;
  --space-xl:  40px;
  --space-2xl: 64px;

  /* Radien & Schatten */
  --radius-sm: 4px;
  --radius-md: 8px;
  --radius-lg: 12px;
  --shadow-card:  0 2px 12px rgba(var(--primary-rgb), 0.10);
  --shadow-hover: 0 6px 24px rgba(var(--primary-rgb), 0.18);

  /* Übergänge */
  --transition: 0.2s ease;

  /* HUD & theme variables – overridden per theme stylesheet */
  --accent-rgb:            138, 160, 202;
  --primary-rgb:           21, 65, 148;
  --hud-bg-gradient:       linear-gradient(170deg, #0d2046 0%, #154194 45%, #5071af 100%);
  --hud-grid-color-accent: rgba(138,160,202,0.06);
  --hud-grid-color-base:   rgba(21,65,148,0.08);
  --circle-bg-1:           #5071af;
  --circle-bg-2:           #154194;
  --circle-bg-3:           #0d2046;
  --panel-bg:              rgba(13,32,70,0.72);
  --panel-bg-dark:         rgba(13,32,70,0.84);
}

/* ---- Reset & Base ---- */
*, *::before, *::after {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

html {
  font-size: 16px;
  scroll-behavior: smooth;
}

body {
  font-family: var(--font-primary);
  font-size: 1rem;
  line-height: 1.6;
  color: var(--color-text);
  background-color: var(--color-bg);
  -webkit-font-smoothing: antialiased;
}

a {
  color: var(--color-accent);
  text-decoration: none;
  transition: color var(--transition);
}

a:hover {
  color: var(--color-accent-hover);
}

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

ul {
  list-style: none;
}

/* ---- Typography ---- */
h1 {
  font-family: var(--font-heading);
  font-size: 2.5rem;
  font-weight: 700;
  color: var(--color-primary);
  line-height: 1.2;
}

h2 {
  font-family: var(--font-heading);
  font-size: 1.8rem;
  font-weight: 600;
  color: var(--color-primary);
  line-height: 1.3;
}

h3 {
  font-family: var(--font-heading);
  font-size: 1.3rem;
  font-weight: 600;
  color: var(--color-primary);
  line-height: 1.4;
}

p {
  color: var(--color-text);
  line-height: 1.6;
}

/* ---- Layout ---- */
.container {
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 var(--space-lg);
}

.container--narrow {
  max-width: 800px;
  margin: 0 auto;
  padding: 0 var(--space-lg);
}

/* ---- Buttons ---- */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: var(--space-sm);
  padding: 12px 28px;
  border-radius: var(--radius-md);
  font-family: var(--font-primary);
  font-size: 1rem;
  font-weight: 600;
  line-height: 1;
  cursor: pointer;
  border: 2px solid transparent;
  transition: background-color var(--transition), color var(--transition),
              border-color var(--transition), box-shadow var(--transition),
              transform var(--transition);
  text-decoration: none;
  white-space: nowrap;
}

.btn:focus-visible {
  outline: 3px solid var(--color-accent);
  outline-offset: 3px;
}

.btn--primary {
  background-color: var(--color-accent);
  color: #ffffff;
  border-color: var(--color-accent);
}

.btn--primary:hover {
  background-color: var(--color-accent-hover);
  border-color: var(--color-accent-hover);
  color: #ffffff;
  box-shadow: var(--shadow-hover);
  transform: translateY(-1px);
}

.btn--secondary {
  background-color: transparent;
  color: var(--color-primary);
  border-color: var(--color-border);
}

.btn--secondary:hover {
  border-color: var(--color-primary);
  background-color: var(--color-bg);
  color: var(--color-primary);
}

.btn--outline-white {
  background-color: transparent;
  color: #ffffff;
  border-color: rgba(255,255,255,0.5);
}

.btn--outline-white:hover {
  background-color: rgba(255,255,255,0.12);
  border-color: #ffffff;
  color: #ffffff;
}

.btn--large {
  padding: 16px 36px;
  font-size: 1.1rem;
}

.btn:disabled,
.btn[aria-disabled="true"] {
  opacity: 0.5;
  cursor: not-allowed;
  transform: none;
  box-shadow: none;
}

/* ---- Header / Navigation ---- */
.site-header {
  position: sticky;
  top: 0;
  z-index: 100;
  background-color: var(--color-surface);
  border-bottom: 1px solid var(--color-border);
  box-shadow: 0 2px 8px rgba(var(--primary-rgb), 0.06);
}

.site-header__logo {
  display: flex;
  align-items: center;
  text-decoration: none;
}

.site-header__logo img,
.site-header__logo svg {
  height: 36px;
  width: auto;
}

.lang-switcher {
  display: flex;
  align-items: center;
  gap: var(--space-xs);
}

.lang-switcher__btn {
  background: none;
  border: 1px solid transparent;
  border-radius: var(--radius-sm);
  padding: 4px 10px;
  font-family: var(--font-primary);
  font-size: 0.875rem;
  font-weight: 600;
  color: var(--color-text-light);
  cursor: pointer;
  transition: all var(--transition);
  letter-spacing: 0.05em;
}

.lang-switcher__btn:hover,
.lang-switcher__btn.active {
  color: var(--color-primary);
  border-color: var(--color-border);
  background-color: var(--color-bg);
}

.lang-switcher__btn.active {
  color: var(--color-accent);
  border-color: var(--color-accent);
}

.lang-switcher__divider {
  color: var(--color-border);
  font-size: 0.75rem;
}

/* ---- TTS Toggle (header) ---- */
.site-header__inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: 68px;
  padding: 0 var(--space-lg);
  max-width: 1200px;
  margin: 0 auto;
  gap: var(--space-sm);
}

.tts-toggle {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 34px;
  height: 34px;
  border-radius: 50%;
  border: 1px solid var(--color-border);
  background: var(--color-surface);
  cursor: pointer;
  transition: border-color var(--transition), color var(--transition), background var(--transition);
  flex-shrink: 0;
  margin-left: var(--space-sm);
}

.tts-toggle:focus-visible {
  outline: 2px solid var(--color-accent);
  outline-offset: 2px;
}

/* off: muted grey */
.tts-toggle--off {
  color: var(--color-text-light);
  border-color: var(--color-border);
}
.tts-toggle--off:hover {
  border-color: var(--color-accent);
  color: var(--color-accent);
}

/* auto: vivid accent – always active */
.tts-toggle--auto {
  color: var(--color-accent);
  border-color: var(--color-accent);
  background: rgba(var(--accent-rgb), 0.08);
}

/* manual: primary colour */
.tts-toggle--manual {
  color: var(--color-primary);
  border-color: var(--color-primary);
  background: rgba(var(--primary-rgb), 0.06);
}

/* Only show the icon that matches the current mode */
.tts-icon--off,
.tts-icon--auto,
.tts-icon--manual { display: none; }

.tts-toggle--off    .tts-icon--off    { display: block; }
.tts-toggle--auto   .tts-icon--auto   { display: block; }
.tts-toggle--manual .tts-icon--manual { display: block; }

/* ── Theme Picker ──────────────────────────────────────────────────────────── */
#theme-picker { display: none; }

.theme-picker {
  position: relative;
  flex-shrink: 0;
}

.theme-picker__toggle {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 34px;
  height: 34px;
  border-radius: 50%;
  border: 1px solid var(--color-border);
  background: var(--color-surface);
  cursor: pointer;
  color: var(--color-text-light);
  transition: border-color var(--transition), color var(--transition), background var(--transition);
  flex-shrink: 0;
  margin-left: var(--space-sm);
}
.theme-picker__toggle:hover {
  border-color: var(--color-accent);
  color: var(--color-accent);
}
.theme-picker__toggle[aria-expanded="true"] {
  border-color: var(--color-accent);
  color: var(--color-accent);
  background: rgba(var(--accent-rgb), 0.08);
}
.theme-picker__toggle:focus-visible {
  outline: 2px solid var(--color-accent);
  outline-offset: 2px;
}

.theme-picker__panel {
  position: absolute;
  top: calc(100% + 10px);
  right: 0;
  min-width: 210px;
  background: var(--panel-bg-dark, rgba(10,22,38,0.96));
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
  border: 1px solid rgba(var(--accent-rgb), 0.22);
  border-radius: 10px;
  padding: 6px;
  z-index: 9999;
  box-shadow: 0 8px 32px rgba(0,0,0,0.45);
}

.theme-picker__option {
  display: flex;
  align-items: center;
  gap: 10px;
  width: 100%;
  padding: 7px 10px;
  border: 1px solid transparent;
  border-radius: 7px;
  background: transparent;
  cursor: pointer;
  color: rgba(255,255,255,0.70);
  font-size: 0.825rem;
  font-family: var(--font-primary);
  text-align: left;
  transition: background 0.15s, border-color 0.15s, color 0.15s;
}
.theme-picker__option:hover {
  background: rgba(var(--accent-rgb), 0.10);
  color: #fff;
}
.theme-picker__option--active {
  border-color: rgba(var(--accent-rgb), 0.45);
  background: rgba(var(--accent-rgb), 0.12);
  color: #fff;
}
.theme-picker__option--active::after {
  content: '✓';
  margin-left: auto;
  color: rgba(var(--accent-rgb), 1);
  font-size: 0.875rem;
}

.theme-picker__swatches {
  display: flex;
  gap: 3px;
  flex-shrink: 0;
}
.theme-picker__swatch {
  width: 14px;
  height: 14px;
  border-radius: 50%;
  border: 1px solid rgba(255,255,255,0.18);
}
.theme-picker__label {
  flex: 1;
  white-space: nowrap;
}

/* ---- Question label row (label + speak button) ---- */
.question-label-row {
  display: flex;
  align-items: flex-start;
  gap: var(--space-sm);
  margin-bottom: var(--space-md);
}

.question-label-row .question-card__label {
  flex: 1;
  margin-bottom: 0; /* handled by gap */
}

/* ---- Inline speak button ---- */
.speak-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 30px;
  height: 30px;
  flex-shrink: 0;
  border-radius: 50%;
  border: 1px solid var(--color-border);
  background: var(--color-surface);
  color: var(--color-text-light);
  cursor: pointer;
  transition: border-color var(--transition), color var(--transition), background var(--transition);
  margin-top: 2px;
}

.speak-btn:hover {
  border-color: var(--color-primary);
  color: var(--color-primary);
  background: rgba(var(--primary-rgb), 0.06);
}

.speak-btn:focus-visible {
  outline: 2px solid var(--color-accent);
  outline-offset: 2px;
}

/* Speak button inside ai-comment banner */
.ai-comment .speak-btn {
  margin-top: 0;
  align-self: flex-start;
}

/* ---- Hero Section ---- */
.hero {
  background: linear-gradient(135deg, var(--color-primary) 0%, var(--color-primary-mid) 60%, #24507a 100%);
  color: #ffffff;
  padding: var(--space-2xl) 0;
  position: relative;
  overflow: hidden;
}

.hero::before {
  content: '';
  position: absolute;
  top: -50%;
  right: -10%;
  width: 600px;
  height: 600px;
  background: radial-gradient(circle, rgba(var(--accent-rgb), 0.12) 0%, transparent 70%);
  pointer-events: none;
}

.hero__inner {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: var(--space-2xl);
  align-items: center;
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 var(--space-lg);
}

.hero__content {
  position: relative;
  z-index: 1;
}

.hero__label {
  display: inline-flex;
  align-items: center;
  gap: var(--space-sm);
  background: rgba(var(--accent-rgb), 0.15);
  border: 1px solid rgba(var(--accent-rgb), 0.35);
  border-radius: 20px;
  padding: 6px 14px;
  font-size: 0.85rem;
  font-weight: 600;
  color: var(--color-accent);
  margin-bottom: var(--space-lg);
  letter-spacing: 0.04em;
  text-transform: uppercase;
}

.hero h1 {
  color: #ffffff;
  font-size: 2.8rem;
  margin-bottom: var(--space-lg);
}

.hero__subline {
  font-size: 1.15rem;
  color: rgba(255,255,255,0.85);
  margin-bottom: var(--space-xl);
  line-height: 1.7;
}

.hero__cta-group {
  display: flex;
  flex-direction: column;
  gap: var(--space-sm);
}

.hero__trust {
  font-size: 0.875rem;
  color: rgba(255,255,255,0.6);
  margin-top: var(--space-sm);
}

.hero__visual {
  display: flex;
  justify-content: center;
  align-items: center;
  position: relative;
  z-index: 1;
}

/* ---- Illustration: AI Score Graphic ---- */
.score-illustration {
  width: 320px;
  height: 320px;
}

/* ---- Section Base ---- */
.section {
  padding: var(--space-2xl) 0;
}

.section--alt {
  background-color: var(--color-surface);
}

.section__header {
  text-align: center;
  margin-bottom: var(--space-2xl);
}

.section__header p {
  font-size: 1.1rem;
  color: var(--color-text-light);
  margin-top: var(--space-sm);
}

/* ---- Benefits Grid ---- */
.benefits-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: var(--space-lg);
}

.benefit-card {
  background: var(--color-surface);
  border: 1px solid var(--color-border);
  border-radius: var(--radius-lg);
  padding: var(--space-xl) var(--space-lg);
  box-shadow: var(--shadow-card);
  transition: box-shadow var(--transition), transform var(--transition);
}

.benefit-card:hover {
  box-shadow: var(--shadow-hover);
  transform: translateY(-2px);
}

.benefit-card__icon {
  width: 52px;
  height: 52px;
  background: rgba(var(--accent-rgb), 0.10);
  border-radius: var(--radius-md);
  display: flex;
  align-items: center;
  justify-content: center;
  margin-bottom: var(--space-md);
}

.benefit-card__icon svg {
  width: 28px;
  height: 28px;
  color: var(--color-accent);
}

.benefit-card h3 {
  margin-bottom: var(--space-sm);
}

.benefit-card p {
  color: var(--color-text-light);
  font-size: 0.95rem;
}

/* ---- How It Works ---- */
.steps-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: var(--space-lg);
  position: relative;
}

.steps-grid::before {
  content: '';
  position: absolute;
  top: 36px;
  left: calc(16.66% + 26px);
  right: calc(16.66% + 26px);
  height: 2px;
  background: linear-gradient(to right, var(--color-accent), var(--color-accent));
  opacity: 0.25;
}

.step-card {
  text-align: center;
  padding: var(--space-lg);
  position: relative;
}

.step-card__number {
  width: 52px;
  height: 52px;
  background: var(--color-accent);
  color: #ffffff;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.25rem;
  font-weight: 700;
  margin: 0 auto var(--space-md);
  position: relative;
  z-index: 1;
}

.step-card__icon {
  margin-bottom: var(--space-sm);
}

.step-card h3 {
  margin-bottom: var(--space-sm);
}

.step-card p {
  color: var(--color-text-light);
  font-size: 0.95rem;
}

/* ---- Trust Section ---- */
.trust-section {
  background: var(--color-primary);
  color: #ffffff;
  padding: var(--space-xl) 0;
  text-align: center;
}

.trust-section p {
  color: rgba(255,255,255,0.85);
  font-size: 1.1rem;
  margin-bottom: var(--space-xl);
}

.trust-logos {
  display: flex;
  justify-content: center;
  align-items: center;
  gap: var(--space-2xl);
  flex-wrap: wrap;
}

.trust-logo {
  opacity: 0.7;
  filter: brightness(0) invert(1);
  transition: opacity var(--transition);
}

.trust-logo:hover {
  opacity: 1;
}

/* ---- Footer CTA ---- */
.footer-cta {
  background: linear-gradient(135deg, var(--color-accent) 0%, var(--color-accent-hover) 100%);
  padding: var(--space-2xl) 0;
  text-align: center;
  color: #ffffff;
}

.footer-cta h2 {
  color: #ffffff;
  margin-bottom: var(--space-md);
}

.footer-cta p {
  color: rgba(255,255,255,0.85);
  margin-bottom: var(--space-xl);
  font-size: 1.05rem;
}

/* ---- Footer ---- */
.site-footer {
  background: var(--color-primary);
  color: rgba(255,255,255,0.6);
  padding: var(--space-lg) 0;
}

.site-footer__inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: var(--space-md);
  flex-wrap: wrap;
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 var(--space-lg);
}

.site-footer__links {
  display: flex;
  gap: var(--space-lg);
}

.site-footer__links a {
  color: rgba(255,255,255,0.6);
  font-size: 0.875rem;
  transition: color var(--transition);
}

.site-footer__links a:hover {
  color: #ffffff;
}

/* ---- Progress Bar ---- */
.progress-bar-wrapper {
  background: var(--color-surface);
  border-bottom: 1px solid var(--color-border);
  padding: var(--space-md) var(--space-lg);
  position: sticky;
  top: 68px;
  z-index: 90;
}

.progress-bar-inner {
  max-width: 800px;
  margin: 0 auto;
}

.progress-meta {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: var(--space-sm);
  flex-wrap: wrap;
  margin-bottom: var(--space-sm);
}

.progress-phase {
  font-size: 0.875rem;
  font-weight: 600;
  color: var(--color-text-light);
}

.progress-count {
  font-size: 0.875rem;
  color: var(--color-text-light);
}

.progress-count:empty {
  display: none;
}

.progress-track {
  height: 6px;
  background: var(--color-bg);
  border-radius: 3px;
  overflow: hidden;
  border: 1px solid var(--color-border);
}

.progress-fill {
  height: 100%;
  background: linear-gradient(90deg, var(--color-accent) 0%, var(--color-accent-hover) 100%);
  border-radius: 3px;
  transition: width 0.4s ease;
}

/* ---- Assessment Wrapper ---- */
.assessment-wrapper {
  max-width: 800px;
  margin: var(--space-2xl) auto;
  padding: 0 var(--space-lg);
}

/* ---- Question Card ---- */
.question-card {
  background: var(--color-surface);
  border: 1px solid var(--color-border);
  border-radius: var(--radius-lg);
  padding: var(--space-xl);
  box-shadow: var(--shadow-card);
  animation: fadeSlideIn 0.3s ease forwards;
}

@keyframes fadeSlideIn {
  from {
    opacity: 0;
    transform: translateY(16px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

.question-card__phase-badge {
  display: inline-flex;
  align-items: center;
  gap: var(--space-xs);
  background: rgba(var(--accent-rgb), 0.10);
  border: 1px solid rgba(var(--accent-rgb), 0.25);
  border-radius: 20px;
  padding: 4px 12px;
  font-size: 0.8rem;
  font-weight: 600;
  color: var(--color-accent);
  margin-bottom: var(--space-md);
  text-transform: uppercase;
  letter-spacing: 0.04em;
}

.question-card__label {
  font-size: 1.25rem;
  font-weight: 600;
  color: var(--color-primary);
  margin-bottom: var(--space-xl);
  line-height: 1.5;
}

/* ---- Choice Cards ---- */
.choice-grid {
  display: flex;
  flex-direction: column;
  gap: var(--space-sm);
}

.choice-card {
  display: flex;
  align-items: center;
  gap: var(--space-md);
  padding: var(--space-md) var(--space-lg);
  border: 2px solid var(--color-border);
  border-radius: var(--radius-md);
  cursor: pointer;
  transition: all var(--transition);
  background: var(--color-surface);
  user-select: none;
}

.choice-card:hover {
  border-color: var(--color-accent);
  background: rgba(var(--accent-rgb), 0.04);
}

.choice-card:focus-visible {
  outline: 3px solid var(--color-accent);
  outline-offset: 2px;
}

.choice-card.selected {
  border-color: var(--color-primary-mid);
  background: var(--color-primary-mid);
  color: #ffffff;
}

.choice-card.selected .choice-card__text {
  color: #ffffff;
}

.choice-card__indicator {
  width: 22px;
  height: 22px;
  border-radius: 50%;
  border: 2px solid var(--color-border);
  flex-shrink: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: all var(--transition);
  background: transparent;
}

.choice-card.selected .choice-card__indicator {
  border-color: var(--color-accent);
  background: var(--color-accent);
}

.choice-card__check {
  display: none;
  width: 12px;
  height: 12px;
  fill: none;
  stroke: #ffffff;
  stroke-width: 2.5;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.choice-card.selected .choice-card__check {
  display: block;
}

.choice-card__text {
  font-size: 0.975rem;
  color: var(--color-text);
  line-height: 1.4;
}

/* ---- Slider ---- */
.slider-wrapper {
  padding: var(--space-md) 0;
}

.slider-labels {
  display: flex;
  justify-content: space-between;
  margin-bottom: var(--space-sm);
}

.slider-label {
  font-size: 0.8rem;
  color: var(--color-text-light);
  max-width: 40%;
  line-height: 1.3;
}

.slider-label--right {
  text-align: right;
}

.slider-value-display {
  text-align: center;
  font-size: 2rem;
  font-weight: 700;
  color: var(--color-accent);
  margin: var(--space-md) 0;
}

.slider-value-display span {
  font-size: 1rem;
  font-weight: 400;
  color: var(--color-text-light);
}

input[type="range"] {
  -webkit-appearance: none;
  appearance: none;
  width: 100%;
  height: 8px;
  border-radius: 4px;
  background: var(--color-bg);
  border: 1px solid var(--color-border);
  outline: none;
  cursor: pointer;
}

input[type="range"]::-webkit-slider-thumb {
  -webkit-appearance: none;
  appearance: none;
  width: 24px;
  height: 24px;
  border-radius: 50%;
  background: var(--color-accent);
  border: 3px solid #ffffff;
  box-shadow: 0 2px 8px rgba(var(--accent-rgb), 0.4);
  cursor: pointer;
  transition: box-shadow var(--transition), transform var(--transition);
}

input[type="range"]::-webkit-slider-thumb:hover {
  box-shadow: 0 3px 12px rgba(var(--accent-rgb), 0.6);
  transform: scale(1.1);
}

input[type="range"]::-moz-range-thumb {
  width: 24px;
  height: 24px;
  border-radius: 50%;
  background: var(--color-accent);
  border: 3px solid #ffffff;
  box-shadow: 0 2px 8px rgba(var(--accent-rgb), 0.4);
  cursor: pointer;
}

input[type="range"]:focus-visible {
  outline: 3px solid var(--color-accent);
  outline-offset: 3px;
}

/* ---- Freetext ---- */
.freetext-wrapper {
  position: relative;
}

.freetext-wrapper textarea {
  width: 100%;
  min-height: 140px;
  padding: var(--space-md);
  border: 2px solid var(--color-border);
  border-radius: var(--radius-md);
  font-family: var(--font-primary);
  font-size: 0.975rem;
  color: var(--color-text);
  background: var(--color-surface);
  resize: vertical;
  transition: border-color var(--transition);
  line-height: 1.6;
}

.freetext-wrapper textarea:focus {
  outline: none;
  border-color: var(--color-accent);
}

.freetext-wrapper textarea::placeholder {
  color: var(--color-text-light);
}

.char-counter {
  text-align: right;
  font-size: 0.8rem;
  color: var(--color-text-light);
  margin-top: var(--space-xs);
}

.char-counter.warning {
  color: var(--color-warning);
}

/* ---- Freetext bottom row (counter + mic) ---- */
.freetext-bottom-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-top: var(--space-xs);
  gap: var(--space-sm);
}

/* ---- Speech / Mic input ---- */
.mic-row {
  display: flex;
  align-items: center;
  gap: var(--space-sm);
  margin-top: var(--space-sm);
}

/* Inside freetext-bottom-row the mic-row sits inline, remove extra top margin */
.freetext-bottom-row .mic-row {
  margin-top: 0;
}

.mic-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 36px;
  height: 36px;
  border-radius: 50%;
  border: 2px solid var(--color-border);
  background: var(--color-surface);
  color: var(--color-text-light);
  cursor: pointer;
  flex-shrink: 0;
  transition: border-color var(--transition), color var(--transition), background var(--transition), box-shadow var(--transition);
}

.mic-btn:hover {
  border-color: var(--color-accent);
  color: var(--color-accent);
  background: rgba(var(--accent-rgb), 0.06);
}

.mic-btn:focus-visible {
  outline: 2px solid var(--color-accent);
  outline-offset: 2px;
}

.mic-btn.listening {
  border-color: #c0392b;
  color: #c0392b;
  background: rgba(192, 57, 43, 0.08);
  animation: micPulse 1.2s ease infinite;
}

@keyframes micPulse {
  0%, 100% { box-shadow: 0 0 0 0 rgba(192, 57, 43, 0.35); }
  50%       { box-shadow: 0 0 0 7px rgba(192, 57, 43, 0); }
}

.speech-feedback {
  font-size: 0.8rem;
  color: var(--color-text-light);
  font-style: italic;
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  max-width: 200px;
}

.speech-feedback--error {
  color: var(--color-warning);
  font-style: normal;
}

/* ---- KI Comment Banner ---- */
.ai-comment {
  margin-top: var(--space-lg);
  padding: var(--space-md) var(--space-lg);
  background: rgba(var(--primary-rgb), 0.04);
  border: 1px solid rgba(var(--primary-rgb), 0.12);
  border-left: 4px solid var(--color-accent);
  border-radius: 0 var(--radius-md) var(--radius-md) 0;
  display: flex;
  flex-direction: column;
  gap: var(--space-sm);
  align-items: flex-start;
  animation: fadeIn 0.4s ease forwards;
}

@keyframes fadeIn {
  from { opacity: 0; }
  to   { opacity: 1; }
}

.ai-comment__badge {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  background: var(--color-accent);
  color: #ffffff;
  font-size: 0.75rem;
  font-weight: 700;
  padding: 4px 10px;
  border-radius: 20px;
  white-space: nowrap;
  flex-shrink: 0;
  margin-top: 2px;
  letter-spacing: 0.03em;
  text-transform: uppercase;
}

.ai-comment__text {
  font-size: 0.95rem;
  color: var(--color-text);
  line-height: 1.6;
}

/* ---- Loading dots ---- */
.loading-dots {
  display: inline-flex;
  gap: 5px;
  align-items: center;
  padding: var(--space-sm) 0;
  color: var(--color-text-light);
  font-size: 0.9rem;
}

.loading-dots::after {
  content: '';
  display: inline-block;
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: var(--color-accent);
  animation: dotBounce 1.2s ease infinite;
}

.loading-dots::before {
  content: '';
  display: inline-block;
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: var(--color-accent);
  animation: dotBounce 1.2s ease 0.4s infinite;
  opacity: 0.6;
}

@keyframes dotBounce {
  0%, 80%, 100% { transform: scale(0.7); opacity: 0.4; }
  40%           { transform: scale(1);   opacity: 1; }
}

/* ---- Question Navigation ---- */
.question-nav {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: var(--space-md);
  padding-top: var(--space-sm);
}

/* Dark-theme button overrides for question-nav */
.question-nav .btn--secondary {
  background: rgba(255,255,255,0.08);
  border-color: rgba(255,255,255,0.25);
  color: rgba(255,255,255,0.80);
  backdrop-filter: blur(4px);
}
.question-nav .btn--secondary:hover {
  background: rgba(255,255,255,0.16);
  border-color: rgba(255,255,255,0.50);
}
.question-nav .btn--primary {
  background: var(--color-accent);
  border-color: var(--color-accent);
  color: #ffffff;
  box-shadow: 0 0 12px rgba(var(--accent-rgb),0.50);
  margin-left: auto;
}
.question-nav .btn--primary:hover {
  background: var(--color-accent-hover);
  border-color: var(--color-accent-hover);
  box-shadow: 0 0 18px rgba(var(--accent-rgb),0.70);
}
.question-nav .btn--primary:disabled,
.question-nav .btn--primary[aria-disabled="true"] {
  opacity: 0.35;
  cursor: not-allowed;
  box-shadow: none;
}

/* ═══════════════════════════════════════════════════════════════
   HUD BACKGROUND – dark cockpit for the assessment page
   ═══════════════════════════════════════════════════════════════ */

.hud-main {
  background:
    /* Hex grid overlay */
    repeating-linear-gradient(
      60deg,
      transparent,
      transparent 28px,
      var(--hud-grid-color-accent) 28px,
      var(--hud-grid-color-accent) 29px
    ),
    repeating-linear-gradient(
      -60deg,
      transparent,
      transparent 28px,
      var(--hud-grid-color-accent) 28px,
      var(--hud-grid-color-accent) 29px
    ),
    repeating-linear-gradient(
      0deg,
      transparent,
      transparent 28px,
      var(--hud-grid-color-base) 28px,
      var(--hud-grid-color-base) 29px
    ),
    var(--hud-bg-gradient);
  min-height: calc(100vh - 68px);
}

.hud-wrapper {
  max-width: 1400px;
  padding: var(--space-xl) var(--space-lg);
  margin: 0 auto;
}

/* ═══════════════════════════════════════════════════════════════
   CIRCULAR QUESTION LAYOUT  –  AI AGENT HUD
   ═══════════════════════════════════════════════════════════════ */

.question-card.circle-layout {
  background: none;
  border: none;
  box-shadow: none;
  padding: 0;
}

/* Two-column: circle 2/3, panel 1/3 */
.circle-layout {
  display: flex;
  align-items: center;
  gap: var(--space-xl);
  min-height: calc(100vh - 160px);
}

.circle-construct {
  flex: 0 0 66.66%;
  min-width: 0;
  display: flex;
  justify-content: center;
  align-items: center;
  transition: flex-basis 0.55s cubic-bezier(0.22, 1, 0.36, 1);
}

/* ── Ring container: 80vmin, capped ── */
.ring-container {
  position: relative;
  width: min(80vmin, 700px);
  aspect-ratio: 1 / 1;
}

/* ── Full-size SVG overlay for decorative rings and scan arc ── */
.hud-svg {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  pointer-events: none;
  overflow: visible;
}

/* Ring tracks */
.hud-ring-track {
  fill: none;
  stroke: rgba(var(--accent-rgb), 0.12);
  stroke-width: 0.4;
}
.hud-ring-track--dots {
  stroke: rgba(var(--accent-rgb), 0.08);
  stroke-width: 0.25;
  stroke-dasharray: 0.5 2;
}
.hud-ring-track--inner {
  stroke: rgba(255, 255, 255, 0.06);
  stroke-width: 0.5;
}

/* Tick marks */
.hud-tick {
  stroke: rgba(var(--accent-rgb), 0.35);
  stroke-width: 0.5;
  stroke-linecap: round;
}

/* Rotating scan arc */
.hud-scan-group {
  transform-origin: 50px 50px;   /* SVG viewBox center */
  animation: hudScan 4s linear infinite;
}

@keyframes hudScan {
  from { transform: rotate(0deg); }
  to   { transform: rotate(360deg); }
}

.hud-scan-arc {
  fill: none;
  stroke: var(--color-accent);
  stroke-width: 0.7;
  stroke-linecap: round;
  opacity: 0.85;
  filter: drop-shadow(0 0 2px rgba(var(--accent-rgb),0.9));
}

.hud-scan-tip {
  fill: #ffffff;
  filter: drop-shadow(0 0 1.5px var(--color-accent));
}

/* ── Ring dots ── */
.ring-dot {
  position: absolute;
  width: 10px;
  height: 10px;
  border-radius: 50%;
  transform: translate(-50%, -50%);
  border: 1.5px solid rgba(var(--accent-rgb), 0.35);
  background: rgba(var(--primary-rgb), 0.6);
  transition: background var(--transition), border-color var(--transition), box-shadow var(--transition);
}

.ring-dot--answered {
  background: var(--color-accent);
  border-color: var(--color-accent);
  box-shadow: 0 0 6px rgba(var(--accent-rgb), 0.70);
}

.ring-dot--answered:not(.ring-dot--current) {
  cursor: pointer;
}

.ring-dot--answered:not(.ring-dot--current):hover {
  background: #ffffff;
  box-shadow: 0 0 10px rgba(255, 255, 255, 0.80);
}

.ring-dot--answered:not(.ring-dot--current):focus-visible {
  outline: 2px solid var(--color-accent);
  outline-offset: 3px;
}

.ring-dot--answered.ring-dot--scanning {
  animation: dotScanPulse 0.38s ease-out forwards;
}

@keyframes dotScanPulse {
  0%   {
    transform: translate(-50%, -50%) scale(2.2);
    box-shadow: 0 0 0 5px rgba(255,255,255,0.55), 0 0 18px rgba(255,255,255,0.80);
  }
  100% {
    transform: translate(-50%, -50%) scale(1);
    box-shadow: 0 0 6px rgba(var(--accent-rgb),0.70);
  }
}

.ring-dot--current {
  width: 16px;
  height: 16px;
  background: var(--color-accent);
  border: 2.5px solid #ffffff;
  box-shadow: 0 0 0 3px rgba(var(--accent-rgb), 0.40),
              0 0 14px rgba(var(--accent-rgb), 0.80);
  animation: dotPulse 2s ease-in-out infinite;
  cursor: default;
}

@keyframes dotPulse {
  0%,100% { box-shadow: 0 0 0 3px rgba(var(--accent-rgb),0.40), 0 0 14px rgba(var(--accent-rgb),0.80); }
  50%      { box-shadow: 0 0 0 6px rgba(var(--accent-rgb),0.15), 0 0 22px rgba(var(--accent-rgb),0.60); }
}

/* ── Main circle ── */
.main-circle {
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  width: 53%;
  aspect-ratio: 1 / 1;
  border-radius: 50%;
  background: linear-gradient(160deg, var(--circle-bg-1) 0%, var(--circle-bg-2) 55%, var(--circle-bg-3) 100%);
  border: 3px solid var(--color-accent);
  box-shadow:
    0 0 0 6px rgba(var(--accent-rgb),0.12),
    0 0 0 12px rgba(var(--accent-rgb),0.05),
    0 0 60px rgba(var(--accent-rgb),0.20),
    inset 0 1px 0 rgba(255,255,255,0.08),
    0 20px 60px rgba(0,0,0,0.60);
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: space-between;
  padding: 9% 8% 7%;
  text-align: center;
  overflow: hidden;
  animation: circleIn 0.5s cubic-bezier(0.22, 1, 0.36, 1) forwards;
}

@keyframes circleIn {
  from { opacity: 0; transform: translate(-50%, -50%) scale(0.92); }
  to   { opacity: 1; transform: translate(-50%, -50%) scale(1); }
}

/* ── Boot sequence ── */
.ring-container.is-booting .hud-scan-group,
.ring-container.is-booting .hud-ring-track,
.ring-container.is-booting .hud-ring-track--dots { opacity: 0; }

/* Normal question cards: full animation */
.ring-container:not(.is-booting):not(.intro-hud-idle) .hud-scan-group {
  animation: hudScan 4s linear infinite, bootFadeIn 0.6s ease forwards;
}
.ring-container:not(.is-booting):not(.intro-hud-idle) .hud-ring-track {
  animation: bootFadeIn 0.4s ease forwards;
}
.ring-container:not(.is-booting):not(.intro-hud-idle) .hud-ring-track--dots {
  animation: bootFadeIn 0.5s 0.1s ease both;
}
/* Intro idle: rings fade in but HUD is frozen — no rotation, dimmed scan arc */
.ring-container.intro-hud-idle .hud-ring-track,
.ring-container.intro-hud-idle .hud-ring-track--dots {
  animation: bootFadeIn 0.5s ease both;
}
.ring-container.intro-hud-idle .hud-scan-group {
  animation: bootFadeIn 0.5s ease both;
  opacity: 0.38; /* dim, clearly inactive while remaining visible */
}
@keyframes bootFadeIn {
  from { opacity: 0; }
  to   { opacity: 1; }
}

/* Intro dots: stagger in during boot */
.ring-dot--intro {
  opacity: 0;
  animation: dotBootIn 0.3s ease forwards;
}
@keyframes dotBootIn {
  from { opacity: 0; transform: translate(-50%, -50%) scale(0.4); }
  to   { opacity: 1; transform: translate(-50%, -50%) scale(1); }
}

/* CRT scanline overlay on the HUD circle during intro */
.intro-crt::before {
  content: '';
  position: absolute;
  inset: 0;
  border-radius: 50%;
  background: repeating-linear-gradient(
    0deg,
    transparent,
    transparent 3px,
    rgba(0, 0, 0, 0.10) 3px,
    rgba(0, 0, 0, 0.10) 4px
  );
  pointer-events: none;
  z-index: 10;
}

/* ── Intro card ── */
.intro-card {
  /* CRT power-on flicker + slide in */
  animation: crtPowerOn 0.75s ease both, introCardIn 0.5s cubic-bezier(0.22, 1, 0.36, 1) both;
}
@keyframes crtPowerOn {
  0%   { filter: brightness(0) blur(4px); }
  12%  { filter: brightness(2.4) blur(1px); }
  30%  { filter: brightness(0.55); }
  55%  { filter: brightness(1.35); }
  78%  { filter: brightness(0.88); }
  100% { filter: brightness(1); }
}
@keyframes introCardIn {
  from { opacity: 0; transform: translateY(12px); }
  to   { opacity: 1; transform: translateY(0); }
}
.intro-card--exit {
  animation: introCardOut 0.38s cubic-bezier(0.55, 0, 1, 0.45) forwards !important;
}
@keyframes introCardOut {
  from { opacity: 1; transform: translateY(0) scale(1); }
  to   { opacity: 0; transform: translateY(-10px) scale(0.98); }
}

/* Boot status text inside circle */
.intro-boot-status {
  font-size: 0.62rem;
  letter-spacing: 0.14em;
  color: #33ff66;
  font-family: 'Courier New', Courier, monospace;
  transition: color 0.2s;
  text-shadow: 0 0 6px rgba(51, 255, 100, 0.6);
}

/* ── Intro panel ── */
.intro-panel {
  display: flex;
  align-items: stretch;
}

/* ── CRT Terminal window ── */
.intro-terminal {
  position: relative;
  width: 100%;
  font-family: 'Courier New', Courier, monospace;
  font-size: 0.785rem;
  line-height: 1.55;
  background: #0c0c0c;
  border: 1px solid #2a2a2a;
  border-radius: 4px;
  overflow: hidden;
  box-shadow:
    0 0 0 1px #111,
    0 0 40px rgba(51, 255, 100, 0.05),
    0 12px 40px rgba(0, 0, 0, 0.65);
  animation: panelSlideIn 0.5s 0.15s cubic-bezier(0.22, 1, 0.36, 1) both;
}
/* Scanline overlay on terminal glass */
.intro-terminal::after {
  content: '';
  position: absolute;
  inset: 0;
  background: repeating-linear-gradient(
    0deg,
    transparent,
    transparent 3px,
    rgba(0, 0, 0, 0.12) 3px,
    rgba(0, 0, 0, 0.12) 4px
  );
  pointer-events: none;
  z-index: 4;
}

/* Retro title bar (Windows 3.1 / DOS Box) */
.intro-terminal__titlebar {
  display: flex;
  justify-content: space-between;
  align-items: center;
  background: #000080;
  color: #ffffff;
  font-size: 0.72rem;
  font-weight: bold;
  padding: 4px 10px;
  letter-spacing: 0.03em;
  user-select: none;
  position: relative;
  z-index: 5;
}

/* Scrollable output area */
.intro-terminal__output {
  padding: 10px 14px 4px;
  min-height: 200px;
  max-height: 300px;
  overflow-y: auto;
  scrollbar-width: none;
}
.intro-terminal__output::-webkit-scrollbar { display: none; }

/* Terminal line base */
.term-line {
  white-space: pre;
  min-height: 1.55em;
}
.term-title   { color: #ffffff; font-weight: bold; }
.term-copy    { color: #888888; }
.term-ok      { color: #33ff66; text-shadow: 0 0 4px rgba(51,255,100,0.4); }
.term-feature { color: #ffff55; }

/* CTA: terminal prompt line, revealed on boot complete */
.intro-cta--terminal {
  display: none;
  width: 100%;
  padding: 7px 14px 12px;
  background: transparent;
  border: none;
  border-top: 1px solid rgba(255, 255, 255, 0.07);
  font-family: 'Courier New', Courier, monospace;
  font-size: 0.785rem;
  text-align: left;
  cursor: pointer;
  flex-direction: column;
  align-items: flex-start;
  gap: 4px;
  position: relative;
  z-index: 5;
  transition: background 0.15s;
}
.intro-cta--terminal.intro-cta--ready {
  display: flex;
  animation: termPromptGlow 1.6s ease-in-out infinite;
}
.term-prompt-row {
  display: flex;
  align-items: center;
}
.term-press-enter {
  color: rgba(51, 255, 100, 0.55);
  font-size: 0.72rem;
  letter-spacing: 0.08em;
  padding-left: 2px;
  animation: cursorBlink 1.2s step-end infinite;
}
.intro-cta--terminal:hover,
.intro-cta--terminal:focus-visible {
  background: rgba(51, 255, 100, 0.07);
  outline: 1px solid rgba(51, 255, 100, 0.28);
  outline-offset: -1px;
}
@keyframes termPromptGlow {
  0%, 100% { text-shadow: 0 0 3px rgba(51,255,100,0.25); }
  50%       { text-shadow: 0 0 10px rgba(51,255,100,0.70), 0 0 2px #fff; }
}
.term-prompt-path { color: #ffff55; }
.term-prompt-cmd  { color: #ffffff; margin-left: 6px; }

/* Blinking block cursor ▋ */
.term-cursor {
  color: #33ff66;
  margin-left: 3px;
  animation: cursorBlink 1s step-end infinite;
}
@keyframes cursorBlink {
  0%, 100% { opacity: 1; }
  50%       { opacity: 0; }
}

/* Orange underline bar at bottom – ORBIS logo echo */
.main-circle::after {
  content: '';
  position: absolute;
  bottom: 0;
  left: 18%;
  width: 64%;
  height: 3px;
  background: linear-gradient(90deg, transparent, var(--color-accent), transparent);
  border-radius: 2px;
}

/* ── HUD corner brackets ── */
.hud-corners {
  position: absolute;
  inset: 0;
  pointer-events: none;
}

.hud-corner {
  position: absolute;
  width: 14px;
  height: 14px;
  border-color: var(--color-accent);
  border-style: solid;
  opacity: 0.55;
}

.hud-corner--tl { top: 10%;  left: 10%;  border-width: 1.5px 0 0 1.5px; }
.hud-corner--tr { top: 10%;  right: 10%; border-width: 1.5px 1.5px 0 0; }
.hud-corner--bl { bottom: 10%; left: 10%;  border-width: 0 0 1.5px 1.5px; }
.hud-corner--br { bottom: 10%; right: 10%; border-width: 0 1.5px 1.5px 0; }

/* ── Main circle text elements ── */
.main-circle__phase {
  display: inline-flex;
  align-items: center;
  background: rgba(var(--accent-rgb),0.15);
  border: 1px solid rgba(var(--accent-rgb),0.50);
  border-radius: 20px;
  padding: 2px 10px;
  font-size: 0.62rem;
  font-weight: 700;
  color: var(--color-accent);
  text-transform: uppercase;
  letter-spacing: 0.08em;
  white-space: nowrap;
  flex-shrink: 0;
  animation: phaseBlink 3s ease-in-out infinite;
}

@keyframes phaseBlink {
  0%,90%,100% { opacity: 1; }
  95%         { opacity: 0.55; }
}

.main-circle__logo {
  width: 55%;
  max-width: 110px;
  flex-shrink: 0;
}

.main-circle__logo svg {
  width: 100%;
  height: auto;
  display: block;
  filter: drop-shadow(0 0 6px rgba(138,160,202,0.55)) drop-shadow(0 0 14px rgba(255,255,255,0.15));
}

.main-circle__num {
  font-size: 0.65rem;
  color: rgba(255,255,255,0.40);
  flex-shrink: 0;
  letter-spacing: 0.10em;
  margin-top: 2px;
  font-family: 'Courier New', monospace;
}

.main-circle__question,
.main-circle__optional {
  display: none;
}

/* Screen-reader only utility */
.sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0,0,0,0);
  white-space: nowrap;
  border: 0;
}

.main-circle__nav {
  display: flex;
  gap: 6px;
  align-items: center;
  justify-content: center;
  width: 100%;
  flex-shrink: 0;
  margin-bottom: 4px;
}

/* Buttons inside the dark circle */
.main-circle .btn--secondary {
  background: rgba(255,255,255,0.08);
  border-color: rgba(255,255,255,0.25);
  color: rgba(255,255,255,0.80);
  backdrop-filter: blur(4px);
}
.main-circle .btn--secondary:hover {
  background: rgba(255,255,255,0.16);
  border-color: rgba(255,255,255,0.50);
}
.main-circle .btn--primary {
  background: var(--color-accent);
  border-color: var(--color-accent);
  color: #ffffff;
  box-shadow: 0 0 12px rgba(var(--accent-rgb),0.50);
}
.main-circle .btn--primary:hover {
  background: var(--color-accent-hover);
  border-color: var(--color-accent-hover);
  box-shadow: 0 0 18px rgba(var(--accent-rgb),0.70);
}
.main-circle .btn--primary:disabled,
.main-circle .btn--primary[aria-disabled="true"] {
  opacity: 0.35;
  cursor: not-allowed;
  box-shadow: none;
}

/* Small button variant */
.btn--sm {
  padding: 5px 13px;
  font-size: 0.8rem;
}

/* Speak button now lives in the answer panel header */
.speak-btn--in-circle {
  display: none;
}

/* ── Answer panel wrapper – takes the 1/3 flex slot ── */
.answer-panel {
  flex: 0 0 33.33%;
  min-width: 0;
  display: grid;
  grid-template-columns: 1fr;
  grid-template-rows: auto auto;
  gap: var(--space-md);
  align-items: start;
  animation: panelSlideIn 0.4s cubic-bezier(0.22, 1, 0.36, 1) forwards;
  transition: flex-basis 0.55s cubic-bezier(0.22, 1, 0.36, 1);
}

/* Grid placement – default: single column */
.answer-box   { grid-column: 1; grid-row: 1; }
.question-nav { grid-column: 1; grid-row: 2; }

/* ── has-ai: circle 1/3, panel 2/3 split into two equal columns ── */
.circle-layout.has-ai .circle-construct {
  flex-basis: 33.33%;
}
.circle-layout.has-ai .answer-panel {
  flex-basis: 66.66%;
  grid-template-columns: 1fr 1fr;
}
.circle-layout.has-ai .ai-box {
  grid-column: 2;
  grid-row: 1;
  display: flex;
  animation: aiBoxReveal 0.4s cubic-bezier(0.22, 1, 0.36, 1) forwards;
}
.circle-layout.has-ai .question-nav {
  grid-column: 1 / -1;
  grid-row: 2;
}

@keyframes aiBoxReveal {
  from { opacity: 0; transform: translateX(16px); }
  to   { opacity: 1; transform: translateX(0); }
}

/* ── Answer box (input controls) ── */
.answer-box {
  background: var(--panel-bg);
  border: 1px solid rgba(var(--accent-rgb), 0.25);
  border-left: 3px solid var(--color-accent);
  border-radius: var(--radius-lg);
  padding: var(--space-xl);
  box-shadow:
    0 8px 32px rgba(0,0,0,0.40),
    inset 0 1px 0 rgba(255,255,255,0.05);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  /* text on dark bg */
  color: rgba(255,255,255,0.90);
}

/* ── AI comment box – hidden by default, shown via .has-ai on card ── */
.ai-box {
  display: none;
  background: var(--panel-bg-dark);
  border: 1px solid rgba(var(--accent-rgb), 0.22);
  border-left: 3px solid var(--color-accent);
  border-radius: var(--radius-lg);
  padding: var(--space-lg) var(--space-xl);
  box-shadow:
    0 4px 20px rgba(0,0,0,0.35),
    0 0 0 1px rgba(var(--accent-rgb),0.06);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  color: rgba(255,255,255,0.90);
  flex-direction: column;
  justify-content: flex-start;
}

/* Override ai-comment inner styles for dark background */
.ai-box .ai-comment {
  margin-top: 0;
  background: transparent;
  border: none;
  border-radius: 0;
  padding: 0;
  box-shadow: none;
}
.ai-box .ai-comment__text {
  color: rgba(255,255,255,0.85);
}
.ai-box .loading-dots {
  color: rgba(255,255,255,0.50);
}

@keyframes panelSlideIn {
  from { opacity: 0; transform: translateX(20px); }
  to   { opacity: 1; transform: translateX(0); }
}

.answer-box__header {
  margin-bottom: var(--space-lg);
  padding-bottom: var(--space-md);
  border-bottom: 1px solid rgba(var(--accent-rgb),0.20);
  display: flex;
  align-items: flex-start;
  gap: var(--space-sm);
}

.answer-box__title {
  font-size: 1rem;
  font-weight: 700;
  color: #ffffff;
  line-height: 1.45;
  flex: 1;
}

/* Speak button in answer panel header */
.answer-box__header .speak-btn {
  flex-shrink: 0;
  margin-top: 1px;
  background: rgba(255,255,255,0.08);
  border-color: rgba(255,255,255,0.25);
  color: rgba(255,255,255,0.65);
}
.answer-box__header .speak-btn:hover {
  background: rgba(var(--accent-rgb),0.25);
  border-color: var(--color-accent);
  color: var(--color-accent);
  box-shadow: 0 0 8px rgba(var(--accent-rgb),0.50);
}

/* Adapt answer inputs for dark panel */
.answer-box .choice-card {
  background: rgba(255,255,255,0.05);
  border-color: rgba(255,255,255,0.15);
  color: rgba(255,255,255,0.88);
}
.answer-box .choice-card:hover {
  border-color: var(--color-accent);
  background: rgba(var(--accent-rgb),0.10);
}
.answer-box .choice-card.selected {
  border-color: var(--color-accent);
  background: rgba(var(--accent-rgb),0.22);
  color: #ffffff;
}
.answer-box .choice-card__text { color: inherit; }
.answer-box .choice-card__indicator {
  border-color: rgba(255,255,255,0.30);
  background: transparent;
}
.answer-box .choice-card.selected .choice-card__indicator {
  border-color: var(--color-accent);
  background: var(--color-accent);
}
.answer-box .freetext-wrapper textarea {
  background: rgba(255,255,255,0.06);
  border-color: rgba(255,255,255,0.18);
  color: #ffffff;
}
.answer-box .freetext-wrapper textarea::placeholder { color: rgba(255,255,255,0.35); }
.answer-box .freetext-wrapper textarea:focus { border-color: var(--color-accent); }
.answer-box .char-counter { color: rgba(255,255,255,0.40); }
.answer-box .slider-label { color: rgba(255,255,255,0.55); }
.answer-box .slider-value-display { color: #ffffff; }
.answer-box .speech-feedback { color: rgba(255,255,255,0.50); }

/* Progress bar dark-theme override */
.progress-bar-wrapper {
  background: rgba(12, 24, 36, 0.95);
  border-bottom-color: rgba(var(--accent-rgb),0.25);
}
.progress-phase, .progress-count { color: rgba(var(--accent-rgb),0.80); }
.progress-track { background: rgba(255,255,255,0.06); border-color: rgba(255,255,255,0.10); }

/* ---- Score Preview ---- */
.score-preview {
  background: var(--color-surface);
  border: 1px solid var(--color-border);
  border-radius: var(--radius-lg);
  padding: var(--space-xl);
  box-shadow: var(--shadow-card);
  animation: fadeSlideIn 0.3s ease forwards;
}

.score-preview__total {
  text-align: center;
  margin-bottom: var(--space-xl);
}

.score-preview__number {
  font-size: 4rem;
  font-weight: 700;
  color: var(--color-accent);
  line-height: 1;
}

.score-preview__max {
  font-size: 1.5rem;
  color: var(--color-text-light);
  font-weight: 400;
}

.score-preview__label {
  font-size: 1rem;
  color: var(--color-text-light);
  margin-top: var(--space-sm);
}

.dimension-bars {
  display: flex;
  flex-direction: column;
  gap: var(--space-md);
  margin-bottom: var(--space-lg);
}

.dimension-bar {
  display: grid;
  grid-template-columns: 160px 1fr 50px;
  gap: var(--space-md);
  align-items: center;
}

.dimension-bar__label {
  font-size: 0.9rem;
  font-weight: 600;
  color: var(--color-text);
}

.dimension-bar__track {
  height: 10px;
  background: var(--color-bg);
  border-radius: 5px;
  overflow: hidden;
  border: 1px solid var(--color-border);
}

.dimension-bar__fill {
  height: 100%;
  border-radius: 5px;
  background: linear-gradient(90deg, var(--color-accent) 0%, var(--color-accent-hover) 100%);
  transition: width 0.8s ease;
}

.dimension-bar__value {
  font-size: 0.9rem;
  font-weight: 700;
  color: var(--color-accent);
  text-align: right;
}

.score-preview__note {
  text-align: center;
  color: var(--color-text-light);
  font-size: 0.95rem;
  padding: var(--space-md) var(--space-lg);
  background: var(--color-bg);
  border-radius: var(--radius-md);
  border: 1px solid var(--color-border);
}

/* ---- Contact Form ---- */
.contact-form {
  background: var(--color-surface);
  border: 1px solid var(--color-border);
  border-radius: var(--radius-lg);
  padding: var(--space-xl);
  box-shadow: var(--shadow-card);
  animation: fadeSlideIn 0.3s ease forwards;
}

.contact-form__header {
  margin-bottom: var(--space-xl);
}

.contact-form__header h2 {
  margin-bottom: var(--space-sm);
}

.contact-form__header p {
  color: var(--color-text-light);
}

.form-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: var(--space-md);
  margin-bottom: var(--space-md);
}

.form-group {
  display: flex;
  flex-direction: column;
  gap: var(--space-xs);
}

.form-group--full {
  grid-column: 1 / -1;
}

.form-group label {
  font-size: 0.875rem;
  font-weight: 600;
  color: var(--color-text);
}

.form-group input {
  padding: 11px var(--space-md);
  border: 2px solid var(--color-border);
  border-radius: var(--radius-md);
  font-family: var(--font-primary);
  font-size: 0.975rem;
  color: var(--color-text);
  background: var(--color-surface);
  transition: border-color var(--transition);
  width: 100%;
}

.form-group input:focus {
  outline: none;
  border-color: var(--color-accent);
}

.form-group input.error {
  border-color: var(--color-warning);
}

.form-group__error {
  font-size: 0.8rem;
  color: var(--color-warning);
  display: none;
}

.form-group__error.visible {
  display: block;
}

.privacy-row {
  display: flex;
  align-items: flex-start;
  gap: var(--space-md);
  padding: var(--space-md);
  background: var(--color-bg);
  border-radius: var(--radius-md);
  border: 1px solid var(--color-border);
  margin: var(--space-md) 0;
  cursor: pointer;
}

.privacy-checkbox {
  width: 20px;
  height: 20px;
  border: 2px solid var(--color-border);
  border-radius: var(--radius-sm);
  flex-shrink: 0;
  margin-top: 2px;
  display: flex;
  align-items: center;
  justify-content: center;
  background: var(--color-surface);
  transition: all var(--transition);
  cursor: pointer;
}

.privacy-checkbox.checked {
  background: var(--color-accent);
  border-color: var(--color-accent);
}

.privacy-checkbox.checked::after {
  content: '';
  display: block;
  width: 5px;
  height: 9px;
  border: 2px solid #ffffff;
  border-top: none;
  border-left: none;
  transform: rotate(45deg) translateY(-1px);
}

.privacy-text {
  font-size: 0.875rem;
  color: var(--color-text-light);
  line-height: 1.5;
}

.privacy-text a {
  color: var(--color-accent);
  text-decoration: underline;
}

.form-required-note {
  font-size: 0.8rem;
  color: var(--color-text-light);
  margin-bottom: var(--space-md);
}

.privacy-error {
  font-size: 0.8rem;
  color: var(--color-warning);
  display: none;
  margin-top: calc(-1 * var(--space-sm));
}

.privacy-error.visible {
  display: block;
}

/* ---- Result Page ---- */
.result-page {
  max-width: 900px;
  margin: 0 auto;
  padding: var(--space-2xl) var(--space-lg);
}

.result-header {
  text-align: center;
  margin-bottom: var(--space-2xl);
}

.result-header h1 {
  margin-bottom: var(--space-sm);
}

.result-header__subtitle {
  color: var(--color-text-light);
  font-size: 1.05rem;
}

/* ---- Score Circle ---- */
.score-circle-wrapper {
  display: flex;
  flex-direction: column;
  align-items: center;
  margin-bottom: var(--space-2xl);
}

.score-circle {
  position: relative;
  width: 200px;
  height: 200px;
  margin-bottom: var(--space-lg);
}

.score-circle svg {
  transform: rotate(-90deg);
  width: 200px;
  height: 200px;
}

.score-circle__track {
  fill: none;
  stroke: var(--color-bg);
  stroke-width: 14;
}

.score-circle__fill {
  fill: none;
  stroke-width: 14;
  stroke-linecap: round;
  stroke-dasharray: 502;
  stroke-dashoffset: 502;
  transition: stroke-dashoffset 1.5s ease;
}

.score-circle__fill--green  { stroke: var(--color-success); }
.score-circle__fill--orange { stroke: var(--color-accent); }
.score-circle__fill--red    { stroke: var(--color-warning); }

.score-circle__center {
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  text-align: center;
}

.score-circle__value {
  font-size: 2.8rem;
  font-weight: 700;
  line-height: 1;
  color: var(--color-primary);
}

.score-circle__max {
  font-size: 1rem;
  color: var(--color-text-light);
}

.score-level-badge {
  display: inline-flex;
  align-items: center;
  gap: var(--space-sm);
  padding: 8px 20px;
  border-radius: 20px;
  font-weight: 700;
  font-size: 1rem;
  margin-bottom: var(--space-sm);
}

.score-level-badge--leader  { background: rgba(46, 125, 50, 0.12); color: var(--color-success); border: 1px solid rgba(46, 125, 50, 0.3); }
.score-level-badge--enabler { background: rgba(var(--accent-rgb), 0.12); color: var(--color-accent);  border: 1px solid rgba(var(--accent-rgb), 0.3); }
.score-level-badge--starter { background: rgba(230, 81, 0, 0.10);  color: var(--color-warning); border: 1px solid rgba(230, 81, 0, 0.25); }

.score-level-desc {
  color: var(--color-text-light);
  font-size: 0.95rem;
}

/* ---- Result Dimension Bars ---- */
.result-dimensions {
  background: var(--color-surface);
  border: 1px solid var(--color-border);
  border-radius: var(--radius-lg);
  padding: var(--space-xl);
  box-shadow: var(--shadow-card);
  margin-bottom: var(--space-xl);
}

.result-dimensions h2 {
  margin-bottom: var(--space-xl);
}

/* ---- KI Analysis Card ---- */
.ai-analysis {
  background: var(--color-surface);
  border: 1px solid var(--color-border);
  border-radius: var(--radius-lg);
  padding: var(--space-xl);
  box-shadow: var(--shadow-card);
  margin-bottom: var(--space-xl);
}

.ai-analysis h2 {
  margin-bottom: var(--space-xl);
}

.ai-analysis-section {
  margin-bottom: var(--space-xl);
}

.ai-analysis-section:last-child {
  margin-bottom: 0;
}

.ai-analysis-section h3 {
  display: flex;
  align-items: center;
  gap: var(--space-sm);
  margin-bottom: var(--space-md);
  padding-bottom: var(--space-sm);
  border-bottom: 2px solid var(--color-bg);
}

.ai-analysis-section__icon {
  width: 32px;
  height: 32px;
  background: rgba(var(--accent-rgb), 0.10);
  border-radius: var(--radius-sm);
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}

.ai-analysis-section__icon svg {
  width: 18px;
  height: 18px;
  color: var(--color-accent);
}

.ai-analysis-section p {
  color: var(--color-text);
  line-height: 1.7;
}

.next-steps-list {
  counter-reset: steps;
  display: flex;
  flex-direction: column;
  gap: var(--space-md);
}

.next-step-item {
  display: flex;
  gap: var(--space-md);
  align-items: flex-start;
  padding: var(--space-md) var(--space-lg);
  background: var(--color-bg);
  border-radius: var(--radius-md);
  border-left: 4px solid var(--color-accent);
}

.next-step-item__number {
  counter-increment: steps;
  width: 32px;
  height: 32px;
  background: var(--color-accent);
  color: #ffffff;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: 700;
  font-size: 0.9rem;
  flex-shrink: 0;
}

.next-step-item__text {
  color: var(--color-text);
  line-height: 1.6;
  padding-top: 5px;
}

/* ---- Skeleton Loading ---- */
.skeleton {
  background: linear-gradient(90deg,
    var(--color-bg) 25%,
    var(--color-border) 50%,
    var(--color-bg) 75%
  );
  background-size: 200% 100%;
  border-radius: var(--radius-md);
  animation: shimmer 1.5s infinite;
}

@keyframes shimmer {
  0%   { background-position: 200% 0; }
  100% { background-position: -200% 0; }
}

.skeleton--text {
  --skeleton-text-last-width: 70%;
  height: 1.2em;
  margin-bottom: 0.6em;
  border-radius: var(--radius-sm);
}

.skeleton--text:last-child { width: var(--skeleton-text-last-width); }

/* ---- Result CTA ---- */
.result-cta {
  display: flex;
  gap: var(--space-md);
  flex-wrap: wrap;
  justify-content: center;
  margin-top: var(--space-xl);
  margin-bottom: var(--space-2xl);
}

/* ---- Responsive ---- */
@media (max-width: 1200px) {
  h1 { font-size: 2.2rem; }
}

@media (max-width: 768px) {
  :root {
    --space-2xl: 40px;
  }

  h1 { font-size: 1.8rem; }
  h2 { font-size: 1.4rem; }

  .hero__inner {
    grid-template-columns: 1fr;
    gap: var(--space-xl);
    text-align: center;
  }

  .hero__visual { display: none; }

  .hero__cta-group {
    align-items: center;
  }

  .benefits-grid,
  .steps-grid {
    grid-template-columns: 1fr;
  }

  .steps-grid::before { display: none; }

  .trust-logos {
    gap: var(--space-xl);
  }

  .site-footer__inner {
    flex-direction: column;
    text-align: center;
    gap: var(--space-sm);
  }

  .site-footer__links {
    justify-content: center;
    flex-wrap: wrap;
    gap: var(--space-md);
  }

  .progress-bar-wrapper {
    top: 0;
  }

  .form-grid {
    grid-template-columns: 1fr;
  }

  .form-group--full {
    grid-column: 1;
  }

  .dimension-bar {
    grid-template-columns: 120px 1fr 45px;
  }

  .question-card,
  .score-preview,
  .contact-form {
    padding: var(--space-lg);
  }

  /* ── HUD: circular layout stacks vertically on mobile ── */
  .hud-wrapper {
    padding: var(--space-md);
  }

  .circle-layout {
    flex-direction: column;
    align-items: center;
    min-height: unset;
    gap: 0;
  }

  .circle-construct {
    flex: none;
    width: 100%;
  }

  .ring-container {
    width: min(80vmin, 400px);
    margin: 0 auto;
  }

  /* Answer panel – full width, single column on mobile */
  .answer-panel {
    flex: none;
    width: 100%;
    grid-template-columns: 1fr !important;   /* override has-ai 2-col */
    grid-template-rows: auto auto auto;
    margin-top: -16px;
    position: relative;
    z-index: 10;
    animation: drawerSlideUp 0.4s cubic-bezier(0.22, 1, 0.36, 1) forwards;
  }

  .answer-box    { grid-column: 1 !important; grid-row: 1;
    border-radius: var(--radius-lg) var(--radius-lg) 0 0;
    border-left: 1px solid rgba(var(--accent-rgb), 0.25);
    border-top: 3px solid var(--color-accent);
  }

  /* AI box: show below answers when active, hide otherwise */
  .circle-layout.has-ai .ai-box {
    grid-column: 1 !important; grid-row: 2;
    border-radius: 0;
  }

  .question-nav  { grid-column: 1 !important; grid-row: 3;
    border-radius: 0 0 var(--radius-lg) var(--radius-lg);
    background: rgba(10, 22, 38, 0.70);
    backdrop-filter: blur(12px);
    padding: var(--space-md) var(--space-lg);
  }

  /* Keep circle full-width on mobile regardless of has-ai */
  .circle-layout.has-ai .circle-construct {
    flex-basis: auto !important;
    width: 100%;
  }

  @keyframes drawerSlideUp {
    from { opacity: 0; transform: translateY(30px); }
    to   { opacity: 1; transform: translateY(0); }
  }

  .result-cta {
    flex-direction: column;
    align-items: center;
  }

  .result-dimensions,
  .ai-analysis {
    padding: var(--space-lg);
  }
}

@media (max-width: 576px) {
  .site-header__inner {
    padding: 0 var(--space-md);
  }

  .assessment-wrapper {
    padding: 0 var(--space-md);
    margin: var(--space-xl) auto;
  }

  .result-page {
    padding: var(--space-xl) var(--space-md);
  }

  .score-circle {
    width: 160px;
    height: 160px;
  }

  .score-circle svg {
    width: 160px;
    height: 160px;
  }

  .score-circle__value {
    font-size: 2rem;
  }
}
