:root {
      --bg: #f5f5f7;
      --card: #ffffff;
      --accent: #2563eb;
      --accent-soft: #dbeafe;
      --text: #111827;
      --muted: #6b7280;
      --border: #e5e7eb;
      --danger: #b91c1c;
      --ok: #15803d;
      --warn: #b45309;
    }

    body {
      font-family: system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
      margin: 0;
      padding: 0;
      color: var(--text);
    }

    .concat-security-quiz-page.page {
      max-width: 1080px;
    }

    h1 {
      font-size: 1.9rem;
      margin-bottom: 0.25rem;
    }

    p.lead {
      margin-top: 0;
      color: var(--muted);
      max-width: 860px;
    }

    .card {
      background: var(--card);
      border-radius: 16px;
      border: 1px solid var(--border);
      padding: 20px 20px 24px;
      box-shadow:
        0 18px 40px rgba(15, 23, 42, 0.08),
        0 0 0 1px rgba(15, 23, 42, 0.02);
      margin-top: 16px;
    }

    .disclaimer {
      border: 1px solid #bfdbfe;
      background: #eff6ff;
      border-radius: 14px;
      padding: 12px 14px;
      color: #1e3a8a;
      display: flex;
      gap: 10px;
      align-items: flex-start;
    }

    .disclaimer strong { color: #1d4ed8; }
    .disclaimer .icon { font-size: 1.1rem; line-height: 1.2rem; margin-top: 1px; }
    .disclaimer .text { font-size: 0.92rem; }
    .disclaimer .text .muted { color: #1e40af; opacity: 0.9; }

    .section-header {
      display: flex;
      align-items: center;
      justify-content: space-between;
      gap: 8px;
      margin-bottom: 4px;
      flex-wrap: wrap;
    }

    .section-title {
      font-weight: 600;
      font-size: 1rem;
      display: flex;
      align-items: center;
      gap: 8px;
    }

    .badge {
      font-size: 0.75rem;
      padding: 2px 8px;
      border-radius: 999px;
      background: var(--accent-soft);
      color: var(--accent);
      font-weight: 600;
      white-space: nowrap;
      display: inline-flex;
      align-items: center;
      gap: 8px;
    }

    /* NEW: UI Reifegrad/Haftung Info */
    .disclaimer-info {
      margin-top: 12px;
      padding: 10px 12px;
      border: 1px solid #bfdbfe;
      background: #eff6ff;
      border-radius: 12px;
      color: #1e3a8a;
      font-size: 0.85rem;
    }
    .disclaimer-info strong { color: #1d4ed8; }
    .disclaimer-info .muted { color: #1e40af; opacity: 0.95; }

    /* NEW: Tooltip on badge */
    .info-dot {
      display: inline-flex;
      align-items: center;
      justify-content: center;
      width: 18px;
      height: 18px;
      border-radius: 999px;
      border: 1px solid #bfdbfe;
      background: #eff6ff;
      color: #1d4ed8;
      font-weight: 800;
      font-size: 12px;
      line-height: 1;
      cursor: help;
      user-select: none;
      position: relative;
      flex: 0 0 auto;
    }

    .tooltip {
      position: absolute;
      left: 50%;
      top: calc(100% + 8px);
      transform: translateX(-50%);
      width: min(420px, 70vw);
      background: #0f172a;
      color: #fff;
      border-radius: 12px;
      padding: 10px 12px;
      font-size: 0.82rem;
      line-height: 1.35;
      box-shadow: 0 18px 40px rgba(15, 23, 42, 0.25);
      display: none;
      z-index: 50;
      text-align: left;
    }
    
    .tooltip:before {
      content: "";
      position: absolute;
      top: -6px;
      left: 50%;
      transform: translateX(-50%);
      border-width: 0 7px 7px 7px;
      border-style: solid;
      border-color: transparent transparent #0f172a transparent;
    }

    .info-dot:hover .tooltip,
    .info-dot:focus-within .tooltip {
      display: block;
    }

    .info-dot button {
      all: unset;
      width: 100%;
      height: 100%;
      display: inline-flex;
      align-items: center;
      justify-content: center;
      cursor: help;
    }
    
    details {
      border-radius: 12px;
      border: 1px solid var(--border);
      padding: 10px 12px 10px;
      background: #f9fafb;
      margin-top: 10px;
    }

    summary {
      cursor: pointer;
      list-style: none;
      display: flex;
      align-items: center;
      justify-content: space-between;
      gap: 10px;
    }

    summary::-webkit-details-marker { display: none; }

    .summary-left {
      display: inline-flex;
      align-items: center;
      gap: 10px;
      flex-wrap: wrap;
      min-width: 0;
    }

    .bucket-title { font-weight: 650; min-width: 0; }
    .bucket-meta {
      font-size: 0.85rem;
      color: var(--muted);
      white-space: nowrap;
    }

    .bucket-status {
      display: inline-flex;
      align-items: center;
      gap: 6px;
      font-size: 0.75rem;
      padding: 2px 8px;
      border-radius: 999px;
      border: 1px solid var(--border);
      background: #fff;
      white-space: nowrap;
    }
    .bucket-status.ok { border-color: #bbf7d0; background: #ecfdf5; color: var(--ok); }
    .bucket-status.warn { border-color: #fed7aa; background: #fff7ed; color: var(--warn); }
    .bucket-status.open { border-color: #dbeafe; background: #eff6ff; color: #1d4ed8; }
    
    .question {
      margin-top: 12px;
      padding-top: 8px;
      border-top: 1px dashed #e5e7eb;
    }

    .question:first-of-type {
      border-top: none;
      padding-top: 4px;
    }

    .question-text {
      font-weight: 500;
      margin-bottom: 4px;
    }

    .question-hint {
      font-size: 0.8rem;
      color: var(--muted);
      margin-bottom: 4px;
    }

    .options {
      display: flex;
      flex-direction: column;
      gap: 4px;
    }

    label.option {
      display: flex;
      align-items: flex-start;
      gap: 8px;
      padding: 4px 6px;
      border-radius: 8px;
      transition: background 0.15s ease, transform 0.05s ease;
    }

    label.option:hover {
      background: #eef2ff;
      transform: translateY(-1px);
    }

    label.option input {
      margin-top: 2px;
    }

    .option-text {
      flex: 1;
      font-size: 0.92rem;
    }

    .option-score {
      font-size: 0.75rem;
      color: var(--muted);
      padding-left: 4px;
      white-space: nowrap; 
    }

    .actions {
      margin-top: 20px;
      display: flex;
      flex-wrap: wrap;
      gap: 10px;
      align-items: center;
    }

    button.primary {
      border: none;
      border-radius: 999px;
      padding: 10px 22px;
      background: var(--accent);
      color: white;
      font-weight: 700;
      font-size: 0.95rem;
      cursor: pointer;
      display: inline-flex;
      align-items: center;
      gap: 8px;
      box-shadow:
        0 10px 20px rgba(37, 99, 235, 0.40),
        0 0 0 1px rgba(37, 99, 235, 0.50);
      transition: transform 0.1s ease, box-shadow 0.1s ease, background 0.1s ease;
    }

    button.primary:hover:not(:disabled) {
      transform: translateY(-1px);
      background: #1d4ed8;
      box-shadow:
        0 16px 30px rgba(37, 99, 235, 0.45),
        0 0 0 1px rgba(30, 64, 175, 0.6);
    }

    button.primary:active:not(:disabled) {
      transform: translateY(0);
      box-shadow:
        0 3px 10px rgba(15, 23, 42, 0.35),
        0 0 0 1px rgba(15, 23, 42, 0.08);
    }

    button.primary:disabled {
      opacity: 0.55;
      cursor: not-allowed;
      box-shadow: none;
    }

    button.primary.is-loading {
      position: relative;
      padding-right: 44px;
    }

    button.primary.is-loading::after {
      content: "";
      position: absolute;
      right: 16px;
      top: 50%;
      width: 14px;
      height: 14px;
      margin-top: -7px;
      border-radius: 50%;
      border: 2px solid rgba(255, 255, 255, 0.45);
      border-top-color: #ffffff;
      animation: quiz-spin 0.8s linear infinite;
    }

    @keyframes quiz-spin {
      to {
        transform: rotate(360deg);
      }
    }

    .helper-text {
      font-size: 0.85rem;
      color: var(--muted);
    }

    .helper-text strong {
      color: var(--accent);
    }

    .warning {
      color: var(--danger);
      font-size: 0.85rem;
      margin-top: 6px;
    }

    .notice {
      font-size: 0.85rem;
      color: var(--muted);
      margin-top: 10px;
      padding: 10px 12px;
      border: 1px solid var(--border);
      background: #f9fafb;
      border-radius: 12px;
    }

    .results-grid {
      display: grid;
      grid-template-columns: minmax(0, 1fr);
      gap: 16px;
      margin-top: 16px;
    }

    .results-charts-grid {
      display: grid;
      grid-template-columns: minmax(0, 1fr);
      gap: 16px;
      align-items: stretch;
    }

    .chart-panel {
      min-width: 0;
    }

    .results-table-wrap {
      width: 100%;
      overflow-x: auto;
      min-width: 0;
    }

    #results-table {
      min-width: 640px;
      table-layout: fixed;
    }

    .lead-form {
      margin-top: 12px;
      padding: 12px;
      border: 1px solid var(--border);
      border-radius: 12px;
      background: #f9fafb;
    }

    .lead-form-head {
      display: flex;
      flex-direction: column;
      gap: 2px;
      margin-bottom: 10px;
    }

    .lead-form-grid {
      display: grid;
      grid-template-columns: repeat(2, minmax(220px, 1fr));
      gap: 12px 14px;
      align-items: start;
    }

    .lead-field {
      display: flex;
      flex-direction: column;
      gap: 5px;
      font-size: 0.85rem;
      color: var(--muted);
      min-width: 0;
    }

    .lead-field input {
      width: 100%;
      min-width: 0;
      box-sizing: border-box;
      border: 1px solid #d1d5db;
      border-radius: 10px;
      padding: 9px 10px;
      background: #fff;
      color: var(--text);
      font-size: 0.92rem;
      outline: none;
      transition: border-color 0.15s ease, box-shadow 0.15s ease;
    }

    .lead-field input:focus {
      border-color: #60a5fa;
      box-shadow: 0 0 0 3px rgba(37, 99, 235, 0.15);
    }

    .lead-form-actions {
      margin-top: 12px;
      display: flex;
      flex-wrap: wrap;
      align-items: center;
      gap: 10px;
    }

    .lead-form.unlocked {
      border-color: #bbf7d0;
      background: #ecfdf5;
    }

    .lead-form.unlocked .lead-form-grid,
    .lead-form.unlocked #lead-submit-btn {
      display: none;
    }

    .lead-form-message-ok {
      color: var(--ok);
    }

    .lead-form-message-error {
      color: var(--danger);
    }

    @media (max-width: 1180px) {
      .results-charts-grid {
        grid-template-columns: minmax(0, 1fr);
      }

      .chart-box {
        height: clamp(360px, 56vw, 620px);
      }
    }

    @media (max-width: 960px) {
      .lead-form-grid {
        grid-template-columns: minmax(0, 1fr);
        gap: 10px;
      }
    }

    table {
      width: 100%;
      border-collapse: collapse;
      font-size: 0.9rem;
    }

    thead tr {
      background: #f3f4f6;
    }

    th, td {
      padding: 6px 8px;
      text-align: left;
      border-bottom: 1px solid var(--border);
      vertical-align: top;
      overflow-wrap: anywhere;
    }

    th {
      font-weight: 600;
      font-size: 0.8rem;
      text-transform: uppercase;
      letter-spacing: 0.04em;
      color: var(--muted);
    }

    tr:last-child td {
      border-bottom: none;
    }

    .score-bar {
      position: relative;
      height: 8px;
      border-radius: 999px;
      background: #e5e7eb;
      overflow: hidden;
      margin-top: 4px;
    }

    .score-bar-fill {
      position: absolute;
      left: 0;
      top: 0;
      bottom: 0;
      border-radius: inherit;
	    background: linear-gradient(90deg, #22c55e, #16a34a);
    }

    .score-label {
      font-size: 0.8rem;
      color: var(--muted);
    }

    .pill {
      display: inline-flex;
      align-items: center;
      gap: 4px;
      border-radius: 999px;
      padding: 2px 8px;
      font-size: 0.75rem;
      background: #ecfdf5;
      color: #15803d;
      font-weight: 650;
      white-space: nowrap;
    }

    .pill.overall {
      background: #eff6ff;
      color: #1d4ed8;
    }

    .eval-text {
      font-size: 0.85rem;
      color: var(--muted);
    }

    .results-actions-row {
      margin-top: 10px;
      display: flex;
      align-items: center;
      justify-content: flex-end;
      gap: 10px;
      flex-wrap: wrap;
    }

    .concat-security-quiz-page.quiz-locked label.option {
      background: #f9fafb;
      color: #9ca3af;
      border: 1px solid #e5e7eb;
      transform: none;
      cursor: default;
    }

    .concat-security-quiz-page.quiz-locked label.option:hover {
      background: #f9fafb;
      transform: none;
    }

    .concat-security-quiz-page.quiz-locked label.option.is-locked-selected {
      background: #f3f4f6;
      border-color: #d1d5db;
    }

    .concat-security-quiz-page.quiz-locked label.option input,
    .concat-security-quiz-page.quiz-locked label.option .option-score {
      accent-color: #9ca3af;
      color: #9ca3af;
      cursor: not-allowed;
    }

    #evaluate-btn.is-locked {
      opacity: 0.6;
      cursor: not-allowed;
    }

    .results-chart-title {
      font-size: 0.8rem;
      color: var(--muted);
      margin-bottom: 4px;
      text-transform: uppercase;
      letter-spacing: .06em;
    }

    .chart-box {
      position: relative;
      width: 100%;
      height: clamp(320px, 34vw, 460px);
    }

    .chart-box-radar {
      display: grid;
      place-items: center;
    }

    .chart-box-radar canvas {
      margin: 0 auto;
    }

    .chart-box canvas {
      width: 100% !important;
      height: 100% !important;
      max-height: none;
    }

    @media (max-width: 700px) {
      #results-table {
        min-width: 560px;
      }

      .chart-box {
        height: clamp(300px, 72vw, 500px);
      }
    }
