.cdp-cgt {
  /* Keep typography aligned with the active WordPress theme */
  font-family: inherit;
  color: var(--cgt-text, #133251);

  /* Tunable tokens (can be overridden from the theme) */
  --cgt-bg: #ffffff;
  --cgt-border: rgba(19, 50, 81, 0.12);
  --cgt-muted: rgba(19, 50, 81, 0.7);
  --cgt-soft: #f4f8f7;
  --cgt-accent: #133251;
  --cgt-accent-contrast: #ffffff;
  --cgt-green: #5acc8e;
  --cgt-radius: 18px;
  --cgt-shadow: 0 18px 40px rgba(19, 50, 81, 0.14);
  --cgt-cta: linear-gradient(90deg, #05de97 0%, #22c1d1 100%);

  width: 100%;
  max-width: 1240px;
  margin: 0 auto;
  padding: 24px 18px;
  border-radius: 22px;
  position: relative;
  background: linear-gradient(135deg, rgba(5, 222, 151, 0.16) 0%, rgba(34, 193, 209, 0.10) 44%, var(--cgt-soft) 100%);
}

.cdp-cgt__header {
  margin-bottom: 18px;
  max-width: 980px;
}

.cdp-cgt__title {
  margin: 0 0 6px 0;
  font-weight: 800;
  font-size: clamp(1.45rem, 2.5vw, 2rem);
  line-height: 1.05;
  letter-spacing: 0;
  color: #000000;
  font-family: inherit;
}

.cdp-cgt__subtitle {
  margin: 0;
  color: var(--cgt-accent);
  font-weight: 700;
}

.cdp-cgt__intro {
  margin: 10px 0 0 0;
  color: var(--cgt-muted);
  font-size: 0.95em;
  line-height: 1.45;
}

.cdp-cgt__lead {
  position: fixed;
  top: var(--cgt-modal-top, 96px);
  right: 0;
  bottom: 0;
  left: 0;
  height: calc(100vh - var(--cgt-modal-top, 96px));
  min-height: 0;
  background: rgba(19, 50, 81, 0.55);
  display: none;
  align-items: flex-start;
  justify-content: center;
  padding: clamp(18px, 5vh, 48px) 22px;
  z-index: 999999;
  border-radius: 0;
  overflow-y: auto;
  overscroll-behavior: contain;
}

body.cdp-cgt-modal-open {
  overflow: hidden;
}

.cdp-cgt__lead.is-active {
  display: flex;
}

.cdp-cgt__lead-card {
  width: min(560px, 100%);
  background: #fff;
  border-radius: 16px;
  border: 1px solid var(--cgt-border);
  box-shadow: var(--cgt-shadow);
  padding: 22px;
  margin: 0 auto;
  max-height: none;
}

.cdp-cgt__lead-title {
  margin: 0 0 8px 0;
  font-weight: 800;
  font-size: 1.2rem;
  color: var(--cgt-text, #133251);
}

.cdp-cgt__lead-form {
  margin-top: 10px;
}

.cdp-cgt__lead-status {
  margin-top: 8px;
}

.cdp-cgt__lead-continue {
  margin-top: 12px;
  display: none;
  width: 100%;
}

.cdp-cgt__lead-continue.is-visible {
  display: inline-flex;
}

.cdp-cgt__panel {
  background: var(--cgt-bg);
  border: 1px solid var(--cgt-border);
  border-radius: var(--cgt-radius);
  box-shadow: var(--cgt-shadow);
  padding: 20px;
  margin: 16px 0;
}

.cdp-cgt__panel--inputs .cdp-cgt__inputs-grid {
  display: grid;
  grid-template-columns: 1.1fr 1fr;
  gap: 22px;
}

.cdp-cgt__inputs {
  display: flex;
  flex-direction: column;
}

.cdp-cgt__row {
  display: grid;
  grid-template-columns: 220px 1fr;
  gap: 12px;
  align-items: center;
  margin: 10px 0;
}

.cdp-cgt__row--question {
  grid-template-columns: 380px 1fr;
}

.cdp-cgt__choices {
  display: flex;
  flex-wrap: wrap;
  gap: 12px 18px;
}

.cdp-cgt__choice {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  font-weight: 600;
}

.cdp-cgt__choice input {
  margin: 0;
}

.cdp-cgt__row--actions {
  align-items: start;
  grid-template-columns: minmax(260px, max-content) 1fr;
}

.cdp-cgt__label {
  font-weight: 600;
  color: var(--cgt-text, #0f172a);
}

.cdp-cgt__select {
  width: 100%;
  max-width: 420px;
  padding: 10px 40px 10px 12px;
  border: 1px solid var(--cgt-border);
  border-radius: 12px;
  background-color: #fff;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='8' viewBox='0 0 12 8'%3E%3Cpath fill='%230f172a' d='M6 8 0 2.05 1.41.64 6 5.23 10.59.64 12 2.05z'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: right 12px center;
  background-size: 12px 8px;
  -webkit-appearance: none;
  -moz-appearance: none;
  appearance: none;
}

.cdp-cgt__button {
  justify-self: start;
  padding: 12px 20px;
  border: none;
  border-radius: 999px;
  background: var(--cgt-cta);
  color: var(--cgt-accent-contrast);
  cursor: pointer;
  font-weight: 700;
  box-shadow: 0 12px 20px rgba(5, 222, 151, 0.22);
  white-space: normal;
  line-height: 1.15;
}

.cdp-cgt__button:hover {
  filter: brightness(0.97);
}

.cdp-cgt__hint {
  color: #b91c1c;
  font-weight: 600;
  padding-left: 8px;
}

.cdp-cgt__status {
  color: var(--cgt-muted);
  font-weight: 600;
  padding-left: 8px;
}

.cdp-cgt__field-note {
  margin-top: 6px;
  max-width: 420px;
}

.cdp-cgt__coverage-note {
  margin: -4px 0 14px;
  padding: 8px 10px;
  border-left: 3px solid var(--cgt-green);
  background: rgba(90, 204, 142, 0.08);
}

.cdp-cgt__section-title {
  margin: 0 0 10px 0;
  font-weight: 800;
  color: var(--cgt-green);
  font-size: 1.18rem;
  line-height: 1.2;
}

.cdp-cgt__category-block {
  margin-top: 0;
}

.cdp-cgt__mini-title {
  margin: 0 0 8px 0;
  font-weight: 700;
  font-size: 1rem;
}

.cdp-cgt__grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 18px;
}

.cdp-cgt__grid--top {
  margin: 8px 0 14px 0;
  padding: 14px;
  border: 1px solid var(--cgt-border);
  border-radius: 14px;
  background: rgba(19, 50, 81, 0.03);
}

.cdp-cgt__ol {
  margin: 0;
  padding-left: 20px;
  list-style: decimal !important;
}

.cdp-cgt__ol li {
  margin: 6px 0;
  line-height: 1.35;
}

.cdp-cgt__notes {
  margin: 0;
  padding-left: 18px;
  color: var(--cgt-muted);
}

.cdp-cgt__empty {
  list-style: none;
  padding-left: 0;
  color: var(--cgt-muted);
}

.cdp-cgt__table-wrap {
  overflow-x: auto;
  border: 1px solid var(--cgt-border);
  border-radius: 14px;
}

.cdp-cgt__table-wrap + .cdp-cgt__table-wrap {
  margin-top: 16px;
}

.cdp-cgt__table {
  width: 100%;
  border-collapse: separate;
  border-spacing: 0;
  min-width: 640px;
}

.cdp-cgt__table--priorities td:first-child,
.cdp-cgt__table--priorities th:first-child {
  min-width: 320px;
}

.cdp-cgt__table th,
.cdp-cgt__table td {
  text-align: left;
  padding: 10px 12px;
  border-bottom: 1px solid var(--cgt-border);
  vertical-align: top;
}

.cdp-cgt__table thead th {
  background: rgba(19, 50, 81, 0.07);
  font-weight: 700;
  color: var(--cgt-accent);
}

.cdp-cgt__table tbody tr:nth-child(even) td {
  background: rgba(19, 50, 81, 0.02);
}

.cdp-cgt__table tbody tr:last-child td {
  border-bottom: none;
}

.cdp-cgt__matrix {
  margin-top: 10px;
}

.cdp-cgt__cta {
  margin-top: 28px;
  padding-top: 16px;
  border-top: 1px solid var(--cgt-border);
}

.cdp-cgt__cta-buttons {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  justify-content: center;
}

.cdp-cgt__cta .cdp-cgt__button {
  padding: 14px 26px;
  font-size: 1rem;
  min-width: 260px;
}

.il-matrix {
  display: grid;
  grid-template-columns: auto 1fr;
  grid-template-rows: 1fr auto;
  gap: 8px 12px;
  align-items: stretch;
}

.il-matrix__chart {
  position: relative;
  min-height: 560px;
  border: 1px solid var(--cgt-border);
  border-radius: 16px;
  background: rgba(19, 50, 81, 0.03);
  overflow: hidden;
  width: 100%;
}

.il-matrix__y {
  writing-mode: vertical-rl;
  transform: rotate(180deg);
  font-size: 0.85em;
  font-weight: 600;
  color: var(--cgt-muted);
  padding: 8px 0;
  align-self: center;
}

.il-matrix__x {
  grid-column: 2;
  font-size: 0.85em;
  font-weight: 600;
  color: var(--cgt-muted);
  text-align: center;
  padding-right: 6px;
  align-self: center;
}

.il-matrix__midline {
  position: absolute;
  background: var(--cgt-border);
  pointer-events: none;
}

.il-matrix__midline--x {
  height: 1px;
  width: 100%;
  left: 0;
  top: 50%;
}

.il-matrix__midline--y {
  width: 1px;
  height: 100%;
  top: 0;
  left: 50%;
}

.il-matrix__caption {
  position: absolute;
  font-size: 12px;
  font-weight: 600;
  color: var(--cgt-muted);
}

.il-matrix__caption--tl { top: 8px; left: 10px; }
.il-matrix__caption--tr { top: 8px; right: 10px; text-align: right; }
.il-matrix__caption--bl { bottom: 8px; left: 10px; }
.il-matrix__caption--br { bottom: 8px; right: 10px; text-align: right; }

.il-matrix__overlay {
  position: absolute;
  inset: 0;
}

.il-matrix__empty {
  position: absolute;
  inset: 0;
  display: none;
  align-items: center;
  justify-content: center;
  text-align: center;
  padding: 0 24px;
  color: var(--cgt-muted);
  font-size: 0.9em;
}

.il-matrix__item {
  position: absolute;
  padding: 6px 12px;
  border-radius: 999px;
  background: rgba(90, 204, 142, 0.16);
  border: 1px solid rgba(34, 193, 209, 0.35);
  color: var(--cgt-text, #133251);
  font-size: 12px;
  font-weight: 600;
  line-height: 1.2;
  display: inline-block;
  text-align: left;
  max-width: 320px;
  white-space: normal;
  overflow-wrap: anywhere;
}

.il-matrix__list {
  margin: 0;
  padding-left: 16px;
  list-style: disc;
  list-style-position: inside;
}

.il-matrix__list li {
  margin: 0;
  line-height: 1.2;
  list-style: none;
}


.cdp-cgt__small {
  margin: 10px 0 0 0;
  color: var(--cgt-muted);
  font-size: 0.92em;
}

.cdp-cgt__questions {
  color: var(--cgt-muted);
  font-weight: 500;
  opacity: 1;
}

.cdp-cgt__input-needed {
  display: inline-block;
  margin: 6px 0 0 8px;
  padding: 2px 7px;
  border: 1px solid rgba(19, 50, 81, 0.2);
  border-radius: 6px;
  color: var(--cgt-accent);
  background: rgba(34, 193, 209, 0.08);
  font-size: 0.78em;
  font-weight: 700;
}

.cdp-cgt__ec-note {
  margin-top: 6px;
}

.cdp-cgt__section-note {
  margin: 4px 0 12px 0;
}

.cdp-cgt__ec-line {
  color: var(--cgt-accent);
  font-weight: 700;
}

.cdp-cgt__ec-questions {
  margin: 3px 0 0;
  color: var(--cgt-muted);
  font-size: 0.9em;
  line-height: 1.4;
}

.cdp-cgt__divider {
  height: 1px;
  background: var(--cgt-border);
  margin: 18px 0;
}

@media (max-width: 720px) {
  .cdp-cgt__row {
    grid-template-columns: 1fr;
  }
  .cdp-cgt__select {
    max-width: none;
  }
  .cdp-cgt__grid {
    grid-template-columns: 1fr;
  }
  .cdp-cgt__panel--inputs .cdp-cgt__inputs-grid {
    grid-template-columns: 1fr;
  }
  .il-matrix {
    grid-template-columns: 1fr;
  }
  .il-matrix__y {
    writing-mode: horizontal-tb;
    transform: none;
    grid-column: 1;
  }
  .il-matrix__x {
    grid-column: 1;
    text-align: left;
    padding-right: 0;
  }
  .il-matrix__chart {
    min-height: 420px;
  }
  .il-matrix__item {
    font-size: 11px;
    max-width: 260px;
  }
  .cdp-cgt__table {
    min-width: 520px;
  }
  .cdp-cgt__cta-buttons {
    flex-direction: column;
    align-items: stretch;
  }
}


/* Essential Criteria block */
.cdp-cgt__ec {
  margin-top: 14px;
  padding: 12px 14px;
  border: 1px solid var(--cgt-border);
  border-radius: 14px;
  background: rgba(19, 50, 81, 0.03);
}

.cdp-cgt__ec-content {
  margin-top: 10px;
}

.cdp-cgt__ec-group {
  margin-top: 10px;
}

.cdp-cgt__ec-group-title {
  font-weight: 800;
  margin: 8px 0 6px;
  font-size: 1.06rem;
  color: var(--cgt-accent);
}

.cdp-cgt__ec .cdp-cgt__mini-title {
  font-size: 1.2rem;
}

.cdp-cgt__ec-item {
  margin: 7px 0;
  padding: 9px 10px;
  border: 1px solid rgba(19, 50, 81, 0.1);
  border-radius: 10px;
  background: rgba(255, 255, 255, 0.72);
}

.cdp-cgt__ec-item strong {
  font-weight: 800;
}

.cdp-cgt__button--secondary {
  background: #fff;
  color: var(--cgt-accent);
  border: 1px solid var(--cgt-border);
  box-shadow: none;
}

.cdp-cgt__button--secondary:hover {
  background: rgba(15, 23, 42, 0.06);
}


/* UX helpers */
.cdp-cgt__button.is-loading {
  opacity: 0.75;
  cursor: progress;
}

.cdp-cgt__panel.is-flash {
  animation: cdpCgtFlash 1.2s ease-out 1;
}

@keyframes cdpCgtFlash {
  0% { box-shadow: 0 0 0 rgba(0,0,0,0); }
  20% { box-shadow: 0 0 0 4px rgba(15, 23, 42, 0.10); }
  100% { box-shadow: var(--cgt-shadow); }
}


.cdp-cgt__input-table select {
  width: 110px;
  max-width: 100%;
  padding: 8px 34px 8px 10px;
  border: 1px solid var(--cgt-border);
  border-radius: 10px;
  background-color: #fff;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='8' viewBox='0 0 12 8'%3E%3Cpath fill='%230f172a' d='M6 8 0 2.05 1.41.64 6 5.23 10.59.64 12 2.05z'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: right 10px center;
  background-size: 12px 8px;
  -webkit-appearance: none;
  -moz-appearance: none;
  appearance: none;
}
