/* surreal-ready v1: written by surreal_ready.py on every build. Do not edit by hand: the next build rewrites it.
   Linked last on every page. Everything except the first rule has zero specificity (:where), so any rule the
   site itself writes wins. A "@group" below is left out when the build already has that kind of element inside a
   region (the site styles it, and a fallback could change how it looks); so these rules only ever touch what the
   client adds. */

/* MEASURED 2026-11-30: Surreal wraps a link region's words in <p> when it publishes. That paragraph must never
   change the button or link it sits in. */
a.cms-editable > p {
  display: inline !important; margin: 0 !important; padding: 0 !important; max-width: none !important;
  position: static !important; float: none !important; border: 0 !important; background: none !important;
  font: inherit !important; color: inherit !important; letter-spacing: inherit !important;
  text-transform: inherit !important; text-align: inherit !important; line-height: inherit !important;
}

/* Words never push the page sideways on a phone; pictures the client adds fit the region. */
:where(.cms-editable) :where(h1, h2, h3, h4, h5, h6, p, li, blockquote, figcaption, td, th, dd, dt) {
  overflow-wrap: break-word;
}
:where(.cms-editable) :where(img) { max-width: 100%; height: auto; }
:where(.cms-editable) :where(.cms-embed) { max-width: 100%; }
:where(.cms-editable) :where(.cms-embed iframe, .cms-embed video) { max-width: 100%; }

:where(.cms-editable) :where(ul, ol) { padding-left: 1.5em; }
:where(.cms-editable) :where(blockquote) {
  margin: 1.25em 0; padding: 0.1em 0 0.1em 1em; border-left: 3px solid rgba(127, 127, 127, 0.6);
}
:where(.cms-editable) :where(pre) {
  max-width: 100%; overflow-x: auto; white-space: pre-wrap; overflow-wrap: anywhere;
  font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace; font-size: 0.9em;
}
:where(.cms-editable) :where(code) { font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace; font-size: 0.92em; }
:where(.cms-editable) :where(table) { border-collapse: collapse; max-width: 100%; margin: 1em 0; }
:where(.cms-editable) :where(th, td) {
  border: 1px solid rgba(127, 127, 127, 0.45); padding: 0.4em 0.6em; text-align: left; vertical-align: top;
  overflow-wrap: anywhere;
}
:where(.cms-editable) :where(hr) { border: 0; border-top: 1px solid rgba(127, 127, 127, 0.45); margin: 1.5em 0; }
:where(.cms-editable) :where(mark) { background: rgba(255, 213, 79, 0.55); color: inherit; }
:where(.cms-editable) :where(figure) { margin: 1.25em 0; max-width: 100%; }
:where(.cms-editable) :where(figcaption) { font-size: 0.875em; opacity: 0.85; margin-top: 0.4em; }
:where(.cms-editable) :where(figure.image) { margin: 1.5em 0; }
:where(.cms-editable) :where(figure.image img) { display: block; }

/* Pictures the client aligns (Surreal's own recipe; lint keeps these classes out of the build itself). */
:where(.cms-editable) :where(.align-left) { float: left; max-width: 50%; margin: 0.25em 1.5em 1em 0; }
:where(.cms-editable) :where(.align-right) { float: right; max-width: 50%; margin: 0.25em 0 1em 1.5em; }
:where(.cms-editable) :where(.align-center) { width: fit-content; margin-inline: auto; }
/* A floated picture at the end of a region stays inside it (only when the region holds one). */
:where(address, article, aside, blockquote, dd, div, dt, fieldset, figure, footer, header, hgroup, li, main, nav,
  section, td, th).cms-editable:has(.align-left, .align-right)::after {
  content: ""; display: block; clear: both;
}
@media (max-width: 40rem) {
  :where(.cms-editable) :where(.align-left, .align-right) {
    display: block; float: none !important; max-width: 100%; margin-inline: auto;
  }
}

/* Editor outline colors (no effect on the public page). Chosen by surreal_ready: lowest contrast 1.6:1 (outline) and 1.6:1 (repeatable) against the 5 background color(s) measured behind the regions. */
:root { --cms-guide-color: #2563eb; --cms-repeatable-color: #b45309; }
