/**
 * November 2026 redesign pages: shared resets.
 *
 * The page CSS files next to this one are copied unchanged from the hand-off
 * package. This file undoes what the quantum theme (Bootstrap 3 base rules,
 * landing page and #main-container-wrapper rules) does to the page body, so
 * each page renders as its approved design. It was tuned by comparing the
 * computed styles of every element against the package's page.html; see
 * README.md in this folder.
 *
 * Everything is scoped to .qd-page (the page body's wrapper) or to pages
 * that contain one, so other pages are not affected.
 */

/* The page body carries its own H1. */
body:has(.qd-page) .block-page-title-block,
body:has(.qd-page) .region-content > h1.page-header { display: none; }

/* Browser defaults inside the page body. */
#main-container-wrapper .qd-page,
#main-container-wrapper .qd-page *,
#main-container-wrapper .qd-page *::before,
#main-container-wrapper .qd-page *::after { box-sizing: revert; }
#main-container-wrapper .qd-page :is(h1, h2, h3, h4, h5, h6) { color: inherit; line-height: inherit; }
#main-container-wrapper .qd-page img { vertical-align: baseline; max-width: none; }
#main-container-wrapper .qd-page summary { display: list-item; }
#main-container-wrapper .qd-page label { margin-bottom: 0; max-width: none; }
#main-container-wrapper .qd-page :is(input, textarea, select) { color: FieldText; line-height: normal; }
#main-container-wrapper .qd-page legend { color: inherit; }
/* Low specificity: beats the theme's bare "a" rule, not the page CSS's own. */
.qd-page :where(a) { text-decoration-line: underline; }

/*
 * Let the page run edge to edge. The "Section One Column" paragraph wraps
 * its text in a Bootstrap container, row and column with padding; undo that
 * only for the section that holds the page body.
 */
#main-container-wrapper#main-container-wrapper .paragraph--type-section-one-column:has(.qd-page),
#main-container-wrapper#main-container-wrapper .paragraph--type-section-one-column :is(.section-outer, .section-inner, .section-inner-pad, .row-wrapper, .row, .row-inner, .section-grid-item):has(.qd-page) {
  padding: 0;
  margin: 0;
  max-width: none;
  width: auto;
  float: none;
}

/*
 * Rules the theme writes with IDs, which outrank the page CSS's class rules:
 *   #main-container-wrapper a                                   (link gray)
 *   .page-node-type-landing-page #main-container-wrapper
 *     .lp-section-wrapper .section-grid-item h3                 (teal h3)
 * The doubled id outranks those. The link colors below restate the page
 * CSS's own link rules (the same on all six pages), so its hover colors
 * still apply. Inline styles in the page still win over all of this.
 */
#main-container-wrapper#main-container-wrapper .qd-page :is(h1, h2, h3, h4, h5, h6) { color: inherit; }
#main-container-wrapper#main-container-wrapper .qd-page a { color: #156570; }
#main-container-wrapper#main-container-wrapper .qd-page a:hover { color: #3D4C55; }
#main-container-wrapper#main-container-wrapper .qd-page :is(a.qd-tile, a.qd-card):hover { color: #212121; }
