.cpdi-shell {
  --cpdi-accent: #2b2640;
  --cpdi-accent-hover: #443c65;
  --cpdi-orange: #f2823d;
  --cpdi-mint: #6fae58;
  --cpdi-ink: #2b2640;
  --cpdi-muted: #6c6484;
  --cpdi-surface: #f4f1fc;
  --cpdi-line: #dad0f1;
  box-sizing: border-box;
  width: 100%;
  /* WordPress block themes add a later, generated content-width rule directly
     to every child of wp-block-post-content. Keep the diagnostics canvas owned
     by the plugin so it is identical in preview, staging and production. */
  max-width: 820px !important;
  margin: 2rem auto;
  padding: clamp(1.25rem, 4vw, 2rem);
  border: 1px solid var(--cpdi-line);
  border-radius: 22px;
  background: #fff;
  color: var(--cpdi-ink);
  font-family: "Segoe UI", Arial, sans-serif;
  font-weight: 400;
}

.cpdi-shell *,
.cpdi-shell *::before,
.cpdi-shell *::after {
  box-sizing: border-box;
}

.cpdi-shell > h1,
.cpdi-hero h1 {
  max-width: none;
  margin: 0 0 0.75rem;
  color: var(--cpdi-ink);
  font-size: clamp(1.75rem, 5vw, 2.4rem);
  font-weight: 700;
  line-height: 1.15;
}

.cpdi-shell > p {
  max-width: 65ch;
}

.cpdi-hero {
  display: grid;
  grid-template-columns: minmax(0, 1fr);
  gap: clamp(1.5rem, 4vw, 3rem);
  align-items: center;
  margin-bottom: 1.5rem;
}

.cpdi-hero img {
  display: block;
  width: 100%;
  max-height: 420px;
  object-fit: cover;
  border-radius: 24px;
}

.cpdi-eyebrow {
  margin: 0 0 0.75rem;
  color: var(--cpdi-accent);
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.08em;
}

.cpdi-intro {
  max-width: 65ch;
}

.cpdi-block {
  min-width: 0;
  margin: 0 0 1.5rem;
  padding: clamp(1rem, 3vw, 2rem);
  border: 1.5px solid var(--cpdi-line);
  border-left: 5px solid var(--cpdi-mint);
  border-radius: 14px;
  background: #fff;
  box-shadow: none;
}

.cpdi-block legend {
  max-width: 100%;
  padding: 0 0.25rem;
  color: var(--cpdi-ink);
  font-size: clamp(1.2rem, 3vw, 1.35rem);
  font-weight: 700;
}

.cpdi-question {
  padding: 1rem 0;
  border-bottom: 1px solid var(--cpdi-line);
}

.cpdi-question:last-child {
  border-bottom: 0;
}

.cpdi-hint {
  color: var(--cpdi-muted);
}

.cpdi-option,
.cpdi-consent {
  display: flex;
  gap: 0.7rem;
  align-items: flex-start;
  padding: 0.7rem;
  border-radius: 12px;
  cursor: pointer;
}

.cpdi-option:hover {
  background: var(--cpdi-surface);
}

.cpdi-option input,
.cpdi-consent input {
  flex: 0 0 auto;
  margin-top: 0.25rem;
  accent-color: var(--cpdi-accent);
}

.cpdi-field {
  display: grid;
  gap: 0.4rem;
  margin: 1rem 0;
}

.cpdi-field input,
.cpdi-field textarea,
.cpdi-field-input {
  width: 100%;
  min-width: 0;
  padding: 0.75rem;
  border: 1.5px solid var(--cpdi-line);
  border-radius: 10px;
  background: #fff;
  color: var(--cpdi-ink);
  font: inherit;
}

.cpdi-field textarea,
textarea.cpdi-field-input {
  min-height: 110px;
  resize: vertical;
}

.cpdi-submit {
  min-height: 48px;
  padding: 0.9rem 1.5rem;
  border: 0;
  border-radius: 999px;
  background: var(--cpdi-accent);
  color: #fff;
  font: inherit;
  font-weight: 700;
  cursor: pointer;
}

.cpdi-submit:hover {
  background: var(--cpdi-accent-hover);
}

.cpdi-submit:disabled {
  opacity: 0.55;
  cursor: wait;
}

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

.cpdi-error {
  padding: 1rem;
  border-radius: 12px;
  background: #fff0f0;
  color: #8b1d1d;
}

.cpdi-result {
  padding: clamp(1.25rem, 4vw, 2rem);
  border-radius: 20px;
  border: 1.5px solid var(--cpdi-line);
  background: var(--cpdi-surface);
}

.cpdi-score {
  font-size: 1.2rem;
}

.cpdi-honeypot {
  position: absolute !important;
  left: -10000px !important;
  width: 1px !important;
  height: 1px !important;
  opacity: 0 !important;
}

.cpdi-catalog {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(min(100%, 280px), 1fr));
  gap: 1rem;
  margin: 0;
  padding: 0;
  list-style: none;
}

.cpdi-catalog a {
  display: flex;
  min-height: 92px;
  align-items: center;
  padding: 1.25rem;
  border-radius: 16px;
  background: var(--cpdi-surface);
  color: var(--cpdi-ink);
  font-weight: 700;
  text-decoration: none;
  transition: background-color 0.2s ease, transform 0.2s ease;
}

.cpdi-catalog a:hover {
  background: #fff0e6;
  transform: translateY(-2px);
}

.cpdi-shell details > summary {
  cursor: pointer;
  font-weight: 600;
}

.cpdi-shell .smart-captcha {
  max-width: 100%;
  overflow: hidden;
  margin-top: 1rem;
}

.cpdi-progress {
  margin: 0 0 1rem;
  color: var(--cpdi-muted);
  font-weight: 700;
}

.cpdi-page-nav {
  display: flex;
  flex-wrap: wrap;
  gap: 0.75rem;
  margin-top: 1.5rem;
}

.cpdi-next {
  min-height: 48px;
  padding: 0.9rem 1.5rem;
  border: 0;
  border-radius: 999px;
  background: var(--cpdi-accent);
  color: #fff;
  font: inherit;
  font-weight: 700;
  cursor: pointer;
}

.cpdi-next:hover {
  background: var(--cpdi-accent-hover);
}

.cpdi-prev {
  min-height: 48px;
  padding: 0.9rem 1.5rem;
  border: 1.5px solid var(--cpdi-line);
  border-radius: 999px;
  background: #fff;
  color: var(--cpdi-ink);
  font: inherit;
  font-weight: 700;
  cursor: pointer;
}

.cpdi-prev:hover {
  background: var(--cpdi-surface);
}

.cpdi-character-counter {
  display: block;
  margin-top: 0.35rem;
  color: var(--cpdi-muted);
  text-align: right;
  font-size: 0.85rem;
}

@media (max-width: 700px) {
  .cpdi-shell {
    margin: 0;
    border-right: 0;
    border-left: 0;
    border-radius: 0;
  }
}

@media (min-width: 760px) {
  .cpdi-hero:has(img) {
    grid-template-columns: minmax(280px, 2fr) minmax(0, 3fr);
  }
}

@media (max-width: 759px) {
  .cpdi-shell {
    padding-block: 2rem;
  }

  .cpdi-block {
    border-radius: 16px;
  }

  .cpdi-submit {
    width: 100%;
  }
}

.cpdi-score, .cpdi-result p, .cpdi-block > p { white-space: pre-line; }
.cpdi-shell { font-size: 18px; line-height: 1.6; }
.cpdi-shell [data-result-gauge] { width: 180px; max-width: 100%; margin: 1rem auto; }
.cpdi-result h3 { font-size: 1.15em; margin-top: 1.5rem; }
.cpdi-result-bar { display: inline-block; width: min(70%, 400px); height: 18px; overflow: hidden; vertical-align: middle; border: 1px solid var(--cpdi-line); border-radius: 999px; background: #fff; }
.cpdi-result-bar-fill { display: block; height: 100%; border-radius: inherit; background: linear-gradient(90deg, var(--cpdi-mint), var(--cpdi-orange)); }
.cpdi-result-bar-label { display: inline-block; margin-left: .5rem; font-weight: 700; vertical-align: middle; }
.cpdi-result [data-result-cap] { font-weight: 600; }
.cpdi-result [data-followup-form] { margin-top: 1rem; }

@media print {
  body:has(.cpdi-shell) header:not(.cpdi-hero),
  body:has(.cpdi-shell) footer,
  body:has(.cpdi-shell) #masthead,
  body:has(.cpdi-shell) #colophon,
  body:has(.cpdi-shell) .site-header,
  body:has(.cpdi-shell) .site-footer { display: none !important; }
  .cpdi-shell, .cpdi-shell * { -webkit-print-color-adjust: exact !important; print-color-adjust: exact !important; }
  .cpdi-shell { max-width: none; margin: 0; padding: 0; border: 0; }
  .cpdi-result { padding: 0; border: 0; background: #fff; }
  .cpdi-result-bar { background: #fff !important; border-color: #777 !important; }
  .cpdi-result-bar-fill { background: #6fae58 !important; }
  .cpdi-result [data-followup-form], .cpdi-result button { display: none !important; }
}
