/* Assessment identity colors are screen-only; result severity and printed reports keep their own styles. */
@layer cp-test-identity {
  @media screen {
    [data-cp-test-color-role="surface"] {
      box-sizing: border-box;
      min-width: 0;
      padding: clamp(14px, 2.5vw, 24px);
      border: 1px solid var(--cp-test-border) !important;
      border-top: 6px solid var(--cp-test-accent) !important;
      border-radius: 18px;
      background: linear-gradient(180deg, var(--cp-test-tint), #fff 160px) !important;
    }

    [data-cp-test-color-role="heading"] {
      color: var(--cp-test-accent) !important;
      padding-bottom: 10px;
      border-bottom: 2px solid var(--cp-test-border);
    }

    [data-cp-test-color-role="choice"] {
      box-sizing: border-box;
      border-color: var(--cp-test-border) !important;
      background: var(--cp-test-tint) !important;
      color: var(--cp-test-accent) !important;
      box-shadow: inset 4px 0 0 var(--cp-test-accent) !important;
    }

    [data-cp-test-color-role="choice"] :is(h3, strong) {
      color: inherit !important;
    }

    .clinical-test-group ul a[data-cp-test-color-role="choice"] {
      display: inline-block;
      max-width: 100%;
      margin: 3px 0;
      padding: 7px 12px;
      border: 1px solid var(--cp-test-border);
      border-radius: 10px;
      line-height: 1.5;
      text-decoration: none;
    }

    [data-cp-test-color-role="choice"]:is(.active, .is-active, [aria-selected="true"], [aria-pressed="true"]) {
      border-color: var(--cp-test-accent) !important;
      background: var(--cp-test-accent) !important;
      color: #fff !important;
      box-shadow: inset 0 -4px 0 rgba(255, 255, 255, .35) !important;
    }

    [data-cp-test-color-role="choice"]:is(.active, .is-active, [aria-selected="true"], [aria-pressed="true"]) :is(h3, strong, small, p, .muted, .test-nav-progress, .test-nav-title, .test-nav-meta) {
      color: #fff !important;
    }

    [data-cp-test-color-role="choice"]:is(.active, .is-active, [aria-selected="true"], [aria-pressed="true"]) .test-nav-meta span {
      color: #fff !important;
      background: rgba(255, 255, 255, .15) !important;
      border-color: rgba(255, 255, 255, .4) !important;
    }

    [data-cp-test-color-role="action"] {
      border-color: var(--cp-test-accent) !important;
      background: var(--cp-test-accent) !important;
      color: #fff !important;
    }

    [data-cp-test-color-role="action"]:disabled {
      border-color: #cbd5e1 !important;
      background: #e2e8f0 !important;
      color: #475569 !important;
    }

    [data-cp-test-color-role="surface"] :is(input[type="radio"], input[type="checkbox"]) {
      accent-color: var(--cp-test-accent);
    }

    [data-cp-test-color-role="choice"]:focus-visible,
    [data-cp-test-color-role="action"]:focus-visible {
      outline: 3px solid var(--cp-test-accent) !important;
      outline-offset: 4px;
    }

    @media (max-width: 600px) {
      [data-cp-test-color-role="surface"] {
        padding: 14px 12px;
        border-radius: 14px;
      }
    }
  }
}
