/*
  Cancer Care Domain header and controls refinement.
  Scope: only the text paragraph and animation buttons inside #cancer-care-domain.
  No navbar, translation, route, DB, diagram, or animation logic changes.
*/

/* Make the section header breathe horizontally. */
#cancer-care-domain .kx-cancer-domain-header {
  display: grid !important;
  grid-template-columns: 1fr !important;
  align-items: center !important;
  gap: 14px !important;
  margin-bottom: 18px !important;
}

/* Keep the title compact on one line where possible. */
#cancer-care-domain .kx-cancer-domain-header h2 {
  font-size: clamp(20px, 1.75vw, 30px) !important;
  line-height: 1.15 !important;
  letter-spacing: -0.025em !important;
  font-weight: 850 !important;
  max-width: 100% !important;
  white-space: nowrap !important;
  overflow: hidden !important;
  text-overflow: ellipsis !important;
  margin: 0 !important;
}

/* Restore and stretch the explanatory paragraph across the full width. */
#cancer-care-domain .kx-cancer-domain-header p {
  display: block !important;
  max-width: none !important;
  width: 100% !important;
  margin: 8px 0 4px 0 !important;
  color: rgba(255, 246, 231, 0.72) !important;
  font-size: clamp(14px, 1.05vw, 17px) !important;
  line-height: 1.45 !important;
  font-weight: 500 !important;
}

/* Center the control buttons as one horizontal command row. */
#cancer-care-domain .kx-cancer-controls {
  width: 100% !important;
  display: flex !important;
  justify-content: center !important;
  align-items: center !important;
  gap: 10px !important;
  flex-wrap: wrap !important;
  margin: 10px auto 0 auto !important;
}

/* Increase button text size and improve presence without changing behavior. */
#cancer-care-domain .kx-cancer-controls button {
  min-height: 46px !important;
  padding: 0 18px !important;
  border-radius: 999px !important;
  font-size: clamp(14px, 0.95vw, 16px) !important;
  line-height: 1 !important;
  font-weight: 900 !important;
  letter-spacing: -0.01em !important;
}

/* Keep active button consistent with current visual language. */
#cancer-care-domain .kx-cancer-controls button.is-active {
  border-color: rgba(245, 166, 35, 0.72) !important;
  background: rgba(245, 166, 35, 0.18) !important;
  color: #ffe39a !important;
}

/* Desktop: try to keep the paragraph to one or two lines. */
@media (min-width: 1200px) {
  #cancer-care-domain .kx-cancer-domain-header p {
    font-size: 16px !important;
    line-height: 1.42 !important;
  }
}

/* Smaller screens: allow title and paragraph to wrap naturally. */
@media (max-width: 1050px) {
  #cancer-care-domain .kx-cancer-domain-header h2 {
    white-space: normal !important;
    overflow: visible !important;
    text-overflow: clip !important;
  }

  #cancer-care-domain .kx-cancer-domain-header p {
    line-height: 1.55 !important;
  }

  #cancer-care-domain .kx-cancer-controls {
    justify-content: flex-start !important;
  }
}
