/*
 * DDQX Typography Accordion Repair v0.3.0 — core layout consolidation.
 * Live WordPress sources checked: 5P (#5917), CPR (#5919), AHSH (#5314),
 * Roadmaps (#5958), Free Tools (#22874), three pathway pages, About, and
 * White Coat Journey (#10016).
 *
 * Structural surfaces only. Keep the brand's global background and color
 * system, functional tiles, five-step strip, teaching interactions,
 * diagnostic widgets, accordions, and response controls intact.
 */

/* Remove the background treatment from editorial/core ROOT wrappers. */
body .ddqx-reference-journey:is(
  .ddqx-method-page,
  .ddqx-pathway-page,
  .ddqx-about-page,
  .ddqx-resource-hub,
  .ddqx-support-page
),
body.page-id-10016 .ddqx-reference-journey.ddqx-core-reviewed {
  background: transparent !important;
  background-color: transparent !important;
  background-image: none !important;
  border: 0 !important;
  border-radius: 0 !important;
  box-shadow: none !important;
}

/* These are section wrappers, not cards or learning activities. */
body .ddqx-reference-journey:is(
  .ddqx-method-page,
  .ddqx-pathway-page,
  .ddqx-about-page,
  .ddqx-resource-hub,
  .ddqx-support-page
) > :is(.ddqx-section, .ddqx-product-discovery),
body.page-id-10016 .ddqx-reference-journey.ddqx-core-reviewed > .ddqx-section {
  background: transparent !important;
  background-color: transparent !important;
  background-image: none !important;
  /* Keep any section-top divider or accent; remove framed card edges. */
  border-inline: 0 !important;
  border-bottom: 0 !important;
  border-radius: 0 !important;
  box-shadow: none !important;
  padding-inline: 0 !important;
}

/* Flatten colored section cards without collapsing content's vertical rhythm. */
body .ddqx-reference-journey:is(
  .ddqx-method-page,
  .ddqx-pathway-page,
  .ddqx-about-page,
  .ddqx-resource-hub,
  .ddqx-support-page
) > .ddqx-section,
body.page-id-10016 .ddqx-reference-journey.ddqx-core-reviewed > .ddqx-section {
  padding-block: clamp(1.75rem, 3.3vw, 3rem) !important;
}

/* Direct prose and headings within these sections must share a left edge.
 * Nested grids, photos, cards, exercises, and authored centered callouts
 * are deliberately outside the scope of these selectors. */
body .ddqx-reference-journey:is(
  .ddqx-method-page,
  .ddqx-pathway-page,
  .ddqx-about-page,
  .ddqx-resource-hub,
  .ddqx-support-page
) > .ddqx-section > :is(h2, h3, h4, p, ul, ol):not(.has-text-align-center),
body.page-id-10016 .ddqx-reference-journey.ddqx-core-reviewed > .ddqx-section > :is(h2, h3, h4, p, ul, ol):not(.has-text-align-center) {
  margin-inline-start: 0 !important;
  margin-inline-end: 0 !important;
  text-align: start !important;
}

body .ddqx-reference-journey:is(
  .ddqx-method-page,
  .ddqx-pathway-page,
  .ddqx-about-page,
  .ddqx-resource-hub,
  .ddqx-support-page
) > .ddqx-section > :is(p, ul, ol),
body.page-id-10016 .ddqx-reference-journey.ddqx-core-reviewed > .ddqx-section > :is(p, ul, ol) {
  width: 100% !important;
  max-width: min(100%, 94ch) !important;
  box-sizing: border-box;
  overflow-wrap: break-word;
}

/* FREE TOOLS: the index and its introductory hero were two overlapping
 * visible panels in the reported screenshot. Neither performs a special
 * interaction. Preserve the resource items, status tags, and jump buttons. */
body .ddqx-free-tools-index,
body .ddqx-free-tools-index > .ddqx-free-tools-hero {
  background: transparent !important;
  background-color: transparent !important;
  background-image: none !important;
  border: 0 !important;
  border-radius: 0 !important;
  box-shadow: none !important;
}

body .ddqx-free-tools-index {
  width: 100% !important;
  max-width: 100% !important;
  margin-inline: 0 !important;
  padding-inline: 0 !important;
}

body .ddqx-free-tools-index > .ddqx-free-tools-hero {
  width: 100% !important;
  max-width: 100% !important;
  margin: 0 0 clamp(1.75rem, 3vw, 2.75rem) !important;
  padding: clamp(0.5rem, 1.5vw, 1rem) 0 !important;
}

body .ddqx-free-tools-index > :is(.ddqx-free-tools-section, .ddqx-free-tools-upcoming) {
  background: transparent !important;
  background-color: transparent !important;
  background-image: none !important;
  border: 0 !important;
  border-radius: 0 !important;
  box-shadow: none !important;
  padding-inline: 0 !important;
}

/* Small screens: preserve minimum breathing room provided by the site shell
 * and prevent the repair from introducing its own inner horizontal padding. */
@media (max-width: 600px) {
  body .ddqx-reference-journey:is(
    .ddqx-method-page,
    .ddqx-pathway-page,
    .ddqx-about-page,
    .ddqx-resource-hub,
    .ddqx-support-page
  ) > .ddqx-section,
  body.page-id-10016 .ddqx-reference-journey.ddqx-core-reviewed > .ddqx-section {
    padding-block: 1.5rem !important;
  }
}
