/* Undo the Bricks defaults the static site never had. Load FIRST in the child theme.
   Bricks 2.x puts its own CSS in a cascade layer, so these plain rules win over it. :where() keeps their
   specificity at zero, so every rule from the site itself (Tailwind, child-theme.css, the global classes)
   still wins over them. Each value is "revert": the element goes back to the browser default, which is
   what the static page had (a <section> is a block, a <span> stays inline). */

/* Bricks ships html { font-size: 62.5% }, which shrinks every rem-based size to 62.5%. */
html { font-size: 100%; }

:where(.brxe-block, .brxe-div, .brxe-container, .brxe-section, .brxe-text-basic, .brxe-heading, .brxe-image) {
  display: revert;
  flex-direction: revert;
  flex-wrap: revert;
  align-items: revert;
  align-self: revert;
  justify-content: revert;
  width: revert;
  max-width: revert;
}

/* Bricks wraps page content in #brx-content; the static page's equivalent is a plain <main>. */
:where(#brx-content) { display: block; position: revert; flex: revert; width: revert; }

/* Bricks makes <body class="brx-body"> a centred flex column; the static body is a plain block. */
:where(.brx-body) { display: revert; flex-direction: revert; margin: revert; width: revert; }

/* Bricks wraps the footer template in its own <footer id="brx-footer">. The site's `footer` rules
   (child-theme.css) are written for the site's inner <footer class="on-dark">, so take them back off the
   wrapper and off the floating bar that sits inside it next to that footer. */
#brx-footer { background: none; color: inherit; padding: 0; }
#brx-footer > .sticky-cta .btn-lime:hover { color: var(--ink); text-decoration: none; }
#brx-footer > .sticky-cta .btn-ghost:hover { color: #fff; text-decoration: none; }
#brx-footer > .mbar .mbar-item:hover { color: #fff; text-decoration: none; }

/* Bricks base rules (frontend-layer.min.css, @layer bricks) that restyle bare HTML elements. The static
   site had browser defaults here, so each one goes back to "revert". Zero specificity: the site's own rules
   still win wherever they set the same property. */
:where(html) { line-height: revert; -webkit-text-size-adjust: revert; text-size-adjust: revert; }
:where(body) { -moz-osx-font-smoothing: revert; transition: revert; background-position: revert; }
:where(*) { border-color: revert; }
:where(::before, ::after) { outline: revert; }
:where(a) { border-color: revert; color: revert; cursor: revert; text-decoration: revert; }
:where(h1, h2, h3, h4, h5, h6) { text-rendering: revert; font-size: revert; line-height: revert; margin: revert; }
:where(h1 a, h2 a, h3 a, h4 a, h5 a, h6 a) { color: revert; }
:where(p) { margin-block: revert; }
:where(img) { outline: revert; vertical-align: revert; }
:where(iframe, audio) { max-width: revert; }
:where(svg:not([width])) { min-width: revert; }
:where(svg:not([height])) { min-height: revert; }
:where(button) { border: revert; cursor: revert; outline: revert; padding: revert; font-family: revert; text-align: revert; font-size: revert; line-height: revert; margin: revert; overflow: revert; text-transform: revert; -webkit-appearance: revert; }
:where(input, select, textarea) { font-family: revert; text-align: revert; font-size: revert; line-height: revert; margin: revert; border-style: revert; border-width: revert; box-shadow: revert; color: revert; outline: revert; padding: revert; transition: revert; width: revert; cursor: revert; -webkit-appearance: revert; appearance: revert; background-color: revert; background-image: revert; background-position: revert; background-repeat: revert; background-size: revert; border-radius: revert; height: revert; min-height: revert; }
:where(label) { color: revert; display: revert; font-weight: revert; margin-bottom: revert; }
:where(blockquote) { border-left-style: revert; border-left-width: revert; font-family: revert; font-size: revert; margin: revert; padding: revert; position: revert; }
:where(blockquote cite) { display: revert; font-size: revert; font-style: revert; margin-top: revert; opacity: revert; text-transform: revert; }
:where(figcaption) { color: revert; font-size: revert; margin: revert; text-align: revert; }
:where(hr) { box-sizing: revert; height: revert; overflow: revert; border: revert; margin: revert; }
:where(pre) { background-color: revert; color: revert; font-family: revert; font-size: revert; margin: revert; padding: revert; white-space: revert; }
:where(table) { width: revert; }
:where(small) { font-size: revert; }
:where(sub, sup) { font-size: revert; line-height: revert; position: revert; vertical-align: revert; top: revert; bottom: revert; }
:where(code, kbd, samp) { font-family: revert; font-size: revert; }
:where(abbr[title]) { border-bottom: revert; text-decoration: revert; }
:where(fieldset) { padding: revert; }
:where(legend) { box-sizing: revert; color: revert; display: revert; max-width: revert; padding: revert; white-space: revert; }
:where(input, textarea)::placeholder { color: revert; }

/* Bricks class names that collide with the site's own (LESSONS: gallery, post-meta). Bricks' WordPress-gallery
   rule is NOT in its cascade layer, so .gallery needs plain class specificity here (this file loads after Bricks
   and before the site's classes, so the site's own .gallery rule still wins). */
.gallery { display: revert; flex-flow: revert; margin: revert; }
:where(.post-meta) { display: revert; align-items: revert; gap: revert; }
