/* Progressive product-layer styles; the core curriculum remains usable without JavaScript. */
.cpu-audiences {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 12px;
  margin: 20px 0;
}

.cpu-audience {
  display: grid;
  grid-template-columns: 34px 1fr;
  min-height: 72px;
  gap: 2px 10px;
  align-content: center;
  padding: 12px 14px;
  border: 1px solid rgba(21, 72, 127, 0.18);
  border-radius: 14px;
  background: #fff;
  color: #14223a;
  font: inherit;
  text-align: left;
  text-decoration: none;
  cursor: pointer;
}

.cpu-audience > span {
  grid-row: 1 / span 2;
  align-self: center;
  font-size: 24px;
}

.cpu-audience strong,
.cpu-audience small {
  grid-column: 2;
}

.cpu-audience small {
  color: #56627a;
  font-size: 13px;
  line-height: 1.35;
}

.cpu-audience:hover {
  border-color: #205fa6;
  box-shadow: 0 7px 18px rgba(21, 72, 127, 0.12);
}

.cpu-audience:focus-visible,
.cpu-palette button:focus-visible,
.cpu-palette a:focus-visible,
.cpu-evidence button:focus-visible,
.cpu-evidence a:focus-visible {
  outline: 3px solid #f0b429;
  outline-offset: 3px;
}

.cpu-contract {
  margin: 10px 0 18px;
  border: 1px solid rgba(21, 72, 127, 0.16);
  border-radius: 12px;
  background: #f7faff;
}

.cpu-contract summary {
  min-height: 48px;
  padding: 12px 16px;
  font-weight: 800;
  color: #15487f;
  cursor: pointer;
}

.cpu-contract-copy {
  padding: 0 16px 14px;
  color: #34445f;
}

.cpu-palette {
  width: min(720px, calc(100vw - 32px));
  max-height: min(760px, calc(100vh - 40px));
  padding: 0;
  border: 0;
  border-radius: 18px;
  background: #fff;
  color: #14223a;
  box-shadow: 0 24px 80px rgba(20, 34, 58, 0.35);
}

.cpu-palette::backdrop {
  background: rgba(20, 34, 58, 0.55);
  backdrop-filter: blur(3px);
}

.cpu-palette-head {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 16px;
  padding: 20px 22px 10px;
}

.cpu-palette-head h2 {
  margin: 0;
  font-size: clamp(22px, 4vw, 30px);
}

.cpu-palette-close,
.cpu-quick-actions button,
.cpu-quick-actions a,
.cpu-feedback button,
.cpu-support-actions a {
  min-height: 44px;
  padding: 9px 13px;
  border: 1px solid #b9c7d8;
  border-radius: 10px;
  background: #fff;
  color: #15487f;
  font: inherit;
  font-weight: 800;
  text-decoration: none;
  cursor: pointer;
}

.cpu-palette-label {
  display: grid;
  gap: 7px;
  padding: 8px 22px;
  font-weight: 800;
}

.cpu-palette-input {
  min-height: 52px;
  padding: 10px 14px;
  border: 2px solid #6f8198;
  border-radius: 12px;
  color: #14223a;
  font: inherit;
  font-size: 18px;
}

.cpu-palette-input:focus {
  border-color: #205fa6;
  outline: 3px solid rgba(32, 95, 166, 0.2);
}

.cpu-palette-status {
  margin: 4px 22px 8px;
  color: #56627a;
}

.cpu-palette-results {
  display: grid;
  gap: 8px;
  max-height: 360px;
  overflow: auto;
  margin: 0;
  padding: 0 22px;
  list-style: none;
}

.cpu-result a {
  display: grid;
  min-height: 48px;
  gap: 2px;
  padding: 10px 12px;
  border: 1px solid #d8e1ec;
  border-radius: 10px;
  color: #15487f;
  text-decoration: none;
}

.cpu-result a:hover {
  border-color: #205fa6;
  background: #f3f7fc;
}

.cpu-result span,
.cpu-result small {
  color: #56627a;
}

.cpu-quick-actions,
.cpu-feedback,
.cpu-support-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  align-items: center;
}

.cpu-quick-actions {
  padding: 16px 22px 22px;
}

.cpu-evidence {
  margin: 16px 0;
  padding: clamp(16px, 3vw, 24px);
  border: 1px solid rgba(37, 107, 91, 0.25);
  border-radius: 16px;
  background: #f4fbf8;
}

.cpu-evidence h3 {
  margin: 0 0 6px;
  color: #15487f;
}

.cpu-provenance {
  color: #4f5f73;
}

.cpu-support-actions,
.cpu-feedback {
  margin-top: 12px;
}

.cpu-provenance {
  margin: 14px 0 0;
  padding-top: 12px;
  border-top: 1px solid #c9ddd5;
  font-size: 14px;
}

@media (max-width: 820px) {
  .cpu-audiences {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

@media (max-width: 560px) {
  .cpu-audiences {
    grid-template-columns: 1fr;
  }

  .cpu-audience {
    min-height: 68px;
  }

  .cpu-palette {
    width: calc(100vw - 16px);
    max-height: calc(100vh - 16px);
  }

  .cpu-palette-head,
  .cpu-palette-label,
  .cpu-quick-actions {
    padding-left: 14px;
    padding-right: 14px;
  }

  .cpu-palette-results {
    padding: 0 14px;
  }
}

@media (prefers-reduced-motion: reduce) {
  .cpu-audience {
    transition: none;
  }
}

@media print {
  .cpu-audiences,
  .cpu-palette,
  .cpu-feedback,
  .cpu-quick-actions {
    display: none !important;
  }
}
