#editor[data-brasa-design] {
  color: var(--brasa-design-ink);
  font-family: var(--brasa-design-body);
  font-size: var(--brasa-design-size);
  line-height: var(--brasa-design-line);
}

#editor[data-brasa-design] a:any-link { color: var(--brasa-design-link); }
#editor[data-brasa-design] a:visited { color: var(--brasa-design-visited); }
#editor[data-brasa-design] :is(ul, ol) > li::marker { color: currentColor; }
#editor[data-brasa-design] .doc-eyebrow { color: var(--brasa-design-accent); }
#editor[data-brasa-design] .doc-divider { background-color: var(--brasa-design-accent); }

body:has(#editor[data-brasa-design]) .style-tile[data-home-style] {
  color: var(--brasa-home-tile-ink, #252525);
  background-color: var(--brasa-home-tile-paper, #fff);
}

body:has(#editor[data-brasa-design]) .style-tile[data-home-style]:is(:hover, [aria-pressed="true"]) {
  background-color: color-mix(in srgb, var(--brasa-home-tile-paper, #fff) 95%, #2164b5);
}

/* Inline formatting and the legacy FONT element both outrank linked style colors and fonts. */
:is(#editor[data-brasa-design], .header-footer-piece[data-brasa-band]) :is(font[color], [style^="color:"], [style*=";color:"], [style*="; color:"]) :is([data-brasa-style], a:any-link):not([contenteditable="false"], [contenteditable="false"] *) {
  color: inherit;
}

:is(#editor[data-brasa-design], .header-footer-piece[data-brasa-band]) :is(font[face], [style^="font-family:"], [style*=";font-family:"], [style*="; font-family:"]) [data-brasa-style]:not([contenteditable="false"], [contenteditable="false"] *) {
  font-family: inherit;
}

:is(#editor[data-brasa-design], .header-footer-piece[data-brasa-band]) :is(font[size], [style^="font-size:"], [style*=";font-size:"], [style*="; font-size:"]) [data-brasa-style]:not([contenteditable="false"], [contenteditable="false"] *) {
  font-size: inherit;
}

:is(#editor[data-brasa-design], .header-footer-piece[data-brasa-band]) :is(b, strong, [style^="font-weight:"], [style*=";font-weight:"], [style*="; font-weight:"]) [data-brasa-style]:not([contenteditable="false"], [contenteditable="false"] *) {
  font-weight: inherit;
}

:is(#editor[data-brasa-design], .header-footer-piece[data-brasa-band]) :is(i, em, [style^="font-style:"], [style*=";font-style:"], [style*="; font-style:"]) [data-brasa-style]:not([contenteditable="false"], [contenteditable="false"] *) {
  font-style: inherit;
}

:is(#editor[data-brasa-design], .header-footer-piece[data-brasa-band]) :is(blockquote, li) > p:where(:not([data-brasa-style])) { margin-block: 0; }
