/*
 * Gutenberg blocks, in the theme's own tokens.
 *
 * Scope
 * -----
 * Every rule is scoped to :is(.ad-prose, .editor-styles-wrapper). The first
 * is the article body on the front end; the second is what the block editor
 * wraps its canvas in. One file therefore styles both, which is the only way
 * "what you see is what you get" stays true after the first edit.
 *
 * The scope also keeps these rules off the rest of the site: the front page,
 * the legal pages and the portfolio are hand-built PHP with their own CSS,
 * and a bare `h2 {}` here would reach all of them.
 *
 * Deliberately absent
 * -------------------
 * No syntax highlighting and no copy button on code blocks, no table of
 * contents, no reading-progress bar. The brief rules them out and the site
 * has none of them anywhere else.
 *
 * Direction
 * ---------
 * Logical properties throughout, so RTL needs no second stylesheet. The two
 * exceptions are deliberate: code and keyboard keys are forced to LTR,
 * because a shell command or a file path reversed by the bidi algorithm is
 * not merely ugly, it is wrong.
 */

/* ============================================================ the flow */

:is(.ad-prose, .editor-styles-wrapper) > * + * { margin-block-start: 1.3em; }
:is(.ad-prose, .editor-styles-wrapper) > :first-child { margin-block-start: 0; }

/* ========================================================== core/heading */

:is(.ad-prose, .editor-styles-wrapper) h2 {
  margin-block-start: 2.2em;
  font-size: clamp(24px, 3vw, 30px);
  font-weight: 700;
  letter-spacing: -.02em;
  line-height: 1.25;
  color: var(--ad-color-text);
}

:is(.ad-prose, .editor-styles-wrapper) h3 {
  margin-block-start: 1.9em;
  font-size: 20px;
  font-weight: 700;
  letter-spacing: -.01em;
  line-height: 1.35;
  color: var(--ad-color-text);
}

:is(.ad-prose, .editor-styles-wrapper) h4 {
  margin-block-start: 1.6em;
  font-size: 16px;
  font-weight: 700;
  line-height: 1.4;
  color: var(--ad-color-text);
}

/* ======================================================== core/paragraph */

:is(.ad-prose, .editor-styles-wrapper) p {
  color: var(--ad-color-text-secondary);
  /*
   * Justified, per the brief. Hyphenation is on for the Latin runs; Hebrew
   * does not hyphenate, and inter-word justification is how Hebrew
   * typography has always set a measure, so the two settings do not fight.
   */
  text-align: justify;
  text-justify: inter-word;
  hyphens: auto;
}

/* Captions, citations and anything inside a control read as a label, not as
   a measure, so none of them are justified. */
:is(.ad-prose, .editor-styles-wrapper) :is(figcaption, cite, th, td, .wp-element-caption),
:is(.ad-prose, .editor-styles-wrapper) .wp-block-pullquote p,
:is(.ad-prose, .editor-styles-wrapper) .wp-block-button__link {
  text-align: start;
  hyphens: manual;
}

/* ----------------------------------------------------------- inline link */

:is(.ad-prose, .editor-styles-wrapper) a {
  color: var(--ad-color-accent);
  /* Never colour alone: the underline carries the link for anyone who cannot
     separate the accent from the body colour (SC 1.4.1). */
  text-decoration: underline;
  text-decoration-thickness: 1px;
  text-underline-offset: 3px;
}

:is(.ad-prose, .editor-styles-wrapper) a:hover,
:is(.ad-prose, .editor-styles-wrapper) a:focus-visible {
  color: var(--ad-color-text);
}

/* ------------------------------------------------------------ inline set */

:is(.ad-prose, .editor-styles-wrapper) :is(strong, b) {
  font-weight: 700;
  color: var(--ad-color-text);
}

/*
 * Inline code, forced LTR.
 *
 * unicode-bidi: isolate rather than plain direction, so the run is taken out
 * of the surrounding paragraph's bidi resolution entirely. Without it a
 * command ending in a bracket or a slash has that character pushed to the
 * wrong end of the run inside Hebrew copy.
 */
:is(.ad-prose, .editor-styles-wrapper) :not(pre) > code {
  padding: 2px 7px;
  font-family: var(--ad-font-mono);
  font-size: .875em;
  direction: ltr;
  unicode-bidi: isolate;
  color: var(--ad-color-text);
  background: var(--ad-color-panel);
  border: 1px solid var(--ad-color-border-subtle);
}

/* Highlight. 7.4:1 both ways, so it stays readable when an editor picks it
   without thinking about contrast. */
:is(.ad-prose, .editor-styles-wrapper) mark {
  padding: 1px 6px;
  background: var(--ad-color-accent);
  color: var(--ad-color-on-accent);
}

:is(.ad-prose, .editor-styles-wrapper) kbd {
  padding: 2px 8px;
  font-family: var(--ad-font-mono);
  font-size: .85em;
  direction: ltr;
  unicode-bidi: isolate;
  color: var(--ad-color-text);
  background: var(--ad-color-panel);
  border: 1px solid var(--ad-color-border-input);
  /* The thicker bottom edge is the only thing that makes a key read as a
     key once the corners are square. */
  border-block-end-width: 3px;
}

/* ============================================================= core/list */

:is(.ad-prose, .editor-styles-wrapper) :is(ul, ol) {
  padding-inline-start: 1.7em;
  color: var(--ad-color-text-secondary);
  list-style: none;
}

:is(.ad-prose, .editor-styles-wrapper) li { position: relative; }
:is(.ad-prose, .editor-styles-wrapper) li + li { margin-block-start: .55em; }
:is(.ad-prose, .editor-styles-wrapper) li > :is(ul, ol) { margin-block-start: .55em; }

/* A square accent bullet. The disc is the one shape this design does not
   have, and ::marker cannot be positioned, so the bullets are drawn. */
:is(.ad-prose, .editor-styles-wrapper) ul > li::before {
  content: "";
  position: absolute;
  inset-inline-start: -1.15em;
  inset-block-start: .62em;
  inline-size: 6px;
  block-size: 6px;
  background: var(--ad-color-accent);
}

/* Nested one level in: smaller and quieter, so the hierarchy is visible
   without indentation alone carrying it. */
:is(.ad-prose, .editor-styles-wrapper) li ul > li::before {
  inline-size: 5px;
  block-size: 5px;
  background: var(--ad-color-text-meta);
}

:is(.ad-prose, .editor-styles-wrapper) ol {
  counter-reset: ad-li;
  padding-inline-start: 2.4em;
}

:is(.ad-prose, .editor-styles-wrapper) ol > li { counter-increment: ad-li; }

:is(.ad-prose, .editor-styles-wrapper) ol > li::before {
  content: counter(ad-li) ".";
  position: absolute;
  inset-inline-start: -2.4em;
  inline-size: 2em;
  text-align: end;
  font-family: var(--ad-font-mono);
  font-size: 13px;
  color: var(--ad-color-text-meta);
}

:is(.ad-prose, .editor-styles-wrapper) ol ol > li::before { content: counter(ad-li, lower-alpha) "."; }

/* ============================================================ core/quote */

:is(.ad-prose, .editor-styles-wrapper) .wp-block-quote {
  margin-block: 2.2em;
  padding-inline-start: 26px;
  border-inline-start: 2px solid var(--ad-color-accent);
}

:is(.ad-prose, .editor-styles-wrapper) .wp-block-quote p {
  font-size: 19px;
  line-height: 1.65;
  color: var(--ad-color-text);
  text-align: start;
}

:is(.ad-prose, .editor-styles-wrapper) cite {
  display: block;
  margin-block-start: 14px;
  font-family: var(--ad-font-mono);
  font-style: normal;
  font-size: 11px;
  letter-spacing: .14em;
  text-transform: uppercase;
  color: var(--ad-color-text-meta);
}

/* ========================================================= core/pullquote */

/*
 * A short accent bar over a large statement.
 *
 * The design mockup set the statement in a serif. This theme has no serif
 * face and loads none, so the statement is the heaviest weight of the body
 * face instead, which is what every other display line on the site uses.
 */
:is(.ad-prose, .editor-styles-wrapper) .wp-block-pullquote {
  margin-block: 2.6em;
  padding: 0;
  border: 0;
  text-align: start;
  color: inherit;
}

:is(.ad-prose, .editor-styles-wrapper) .wp-block-pullquote::before {
  content: "";
  display: block;
  inline-size: 64px;
  block-size: 3px;
  margin-block-end: 22px;
  background: var(--ad-color-accent);
}

:is(.ad-prose, .editor-styles-wrapper) .wp-block-pullquote blockquote { margin: 0; }

:is(.ad-prose, .editor-styles-wrapper) .wp-block-pullquote p {
  font-size: clamp(23px, 3.4vw, 33px);
  font-weight: 700;
  letter-spacing: -.02em;
  line-height: 1.3;
  color: var(--ad-color-text);
}

/* ============================================================ core/image */

:is(.ad-prose, .editor-styles-wrapper) .wp-block-image {
  margin-block: 2.2em;
}

:is(.ad-prose, .editor-styles-wrapper) .wp-block-image img {
  display: block;
  inline-size: 100%;
  block-size: auto;
  border: 1px solid var(--ad-color-hairline);
}

:is(.ad-prose, .editor-styles-wrapper) :is(figcaption, .wp-element-caption) {
  margin-block-start: 12px;
  font-family: var(--ad-font-mono);
  font-size: 11px;
  letter-spacing: .08em;
  line-height: 1.5;
  color: var(--ad-color-text-meta);
}

/*
 * alignwide breaks out of the 760px measure by the same amount on both
 * sides. It is a fixed 70px rather than a viewport calculation because the
 * article sits in a grid cell, not in the page, so 100vw is not its parent.
 *
 * alignfull is given the same treatment on purpose: a true full-bleed image
 * would escape the grid column and sit under the sticky sidebar.
 */
:is(.ad-prose, .editor-styles-wrapper) :is(.alignwide, .alignfull) {
  max-inline-size: none;
  margin-inline: -70px;
}

/* ========================================================== core/gallery */

:is(.ad-prose, .editor-styles-wrapper) .wp-block-gallery {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 12px;
  margin-block: 2.2em;
  align-items: start;
}

:is(.ad-prose, .editor-styles-wrapper) .wp-block-gallery .wp-block-image {
  margin: 0;
  inline-size: auto;
}

/* ============================================================ core/table */

/*
 * The figure is the scroller, not the page. A table that does not fit must
 * scroll inside its own box; letting the page scroll sideways drags the
 * header and the whole article with it (SC 1.4.10).
 *
 * inc/blocks.php adds tabindex and a group role to this figure so the
 * scroller can be reached and panned from the keyboard (SC 2.1.1).
 */
:is(.ad-prose, .editor-styles-wrapper) .wp-block-table {
  margin-block: 2.2em;
  overflow-x: auto;
  -webkit-overflow-scrolling: touch;
}

:is(.ad-prose, .editor-styles-wrapper) .wp-block-table:focus-visible {
  outline: 2px solid var(--ad-color-accent);
  outline-offset: 3px;
}

:is(.ad-prose, .editor-styles-wrapper) .wp-block-table table {
  inline-size: 100%;
  /* Below this the columns stop being readable and scrolling is the honest
     answer; above it the table simply fits. */
  min-inline-size: 460px;
  border-collapse: collapse;
  font-size: 15px;
}

:is(.ad-prose, .editor-styles-wrapper) .wp-block-table :is(th, td) {
  padding: 13px 16px;
  text-align: start;
  vertical-align: top;
  border-block-end: 1px solid var(--ad-color-hairline);
}

:is(.ad-prose, .editor-styles-wrapper) .wp-block-table th {
  font-family: var(--ad-font-mono);
  font-size: 11px;
  font-weight: 400;
  letter-spacing: .14em;
  text-transform: uppercase;
  color: var(--ad-color-text-meta);
  border-block-end-color: var(--ad-color-border-input);
}

:is(.ad-prose, .editor-styles-wrapper) .wp-block-table td { color: var(--ad-color-text-secondary); }

/* Core's own stripe rule sets a background on the table element; this
   replaces it rather than layering on top of it. */
:is(.ad-prose, .editor-styles-wrapper) .wp-block-table.is-style-stripes table { background: transparent; }

:is(.ad-prose, .editor-styles-wrapper) .wp-block-table.is-style-stripes tbody tr:nth-child(odd) {
  background: var(--ad-color-panel);
}

:is(.ad-prose, .editor-styles-wrapper) .wp-block-table.is-style-stripes :is(th, td) { border-block-end-color: transparent; }

:is(.ad-prose, .editor-styles-wrapper) .wp-block-table.is-style-stripes th {
  border-block-end-color: var(--ad-color-border-input);
}

/* ============================== core/code and core/preformatted (LTR only) */

:is(.ad-prose, .editor-styles-wrapper) :is(.wp-block-code, .wp-block-preformatted, pre) {
  margin-block: 2.2em;
  padding: 20px 22px;
  /*
   * Forced LTR. A shell command, a file path or a JSON fragment reordered by
   * the bidi algorithm is not merely ugly, it is a different string. isolate
   * takes the whole block out of the surrounding paragraph direction.
   */
  direction: ltr;
  text-align: left;
  unicode-bidi: isolate;
  font-family: var(--ad-font-mono);
  font-size: 14px;
  line-height: 1.65;
  tab-size: 2;
  color: var(--ad-color-text);
  background: var(--ad-color-panel);
  border: 1px solid var(--ad-color-border-subtle);
  overflow-x: auto;
  white-space: pre;
}

/*
 * The scroller needs a visible focus ring, because inc/blocks.php makes it
 * focusable: a reader who tabs into a code block has to be able to see that
 * they are in it.
 */
:is(.ad-prose, .editor-styles-wrapper) :is(.wp-block-code, .wp-block-preformatted, pre):focus-visible {
  outline: 2px solid var(--ad-color-accent);
  outline-offset: 3px;
}

:is(.ad-prose, .editor-styles-wrapper) pre code {
  padding: 0;
  font-size: inherit;
  color: inherit;
  background: none;
  border: 0;
}

/* ================================================ core/group block styles */

:is(.ad-prose, .editor-styles-wrapper) .wp-block-group:is(.is-style-act-result, .is-style-act-tip, .is-style-act-note) {
  margin-block: 2.2em;
  padding: 24px 28px;
}

:is(.ad-prose, .editor-styles-wrapper) .wp-block-group:is(.is-style-act-result, .is-style-act-tip, .is-style-act-note) > * + * {
  margin-block-start: 1em;
}

/* "תוצאה" — the measured outcome the section was building towards. */
:is(.ad-prose, .editor-styles-wrapper) .wp-block-group.is-style-act-result {
  background: var(--ad-color-panel);
  border-inline-start: 3px solid var(--ad-color-accent);
}

/* "טיפ" — practical advice, quieter than the accent. */
:is(.ad-prose, .editor-styles-wrapper) .wp-block-group.is-style-act-tip {
  background: var(--ad-color-panel);
  border: 1px solid var(--ad-color-hairline);
}

/* "שימו לב" — a caution. The only place --ad-color-warn is used. */
:is(.ad-prose, .editor-styles-wrapper) .wp-block-group.is-style-act-note {
  background: var(--ad-color-panel);
  border: 1px solid var(--ad-color-warn);
  border-inline-start-width: 3px;
}

:is(.ad-prose, .editor-styles-wrapper) .wp-block-group.is-style-act-note :is(h2, h3, h4, strong) {
  color: var(--ad-color-warn);
}

/* ========================================================== core/details */

:is(.ad-prose, .editor-styles-wrapper) .wp-block-details {
  margin-block: 0;
  border-block-end: 1px solid var(--ad-color-hairline);
}

:is(.ad-prose, .editor-styles-wrapper) .wp-block-details summary {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 18px;
  /* Comfortably over the 44px target minimum, because the whole row is the
     control and a FAQ is read on a phone. */
  min-block-size: 56px;
  padding-block: 12px;
  font-size: 17px;
  font-weight: 700;
  color: var(--ad-color-text);
  cursor: pointer;
  list-style: none;
}

:is(.ad-prose, .editor-styles-wrapper) .wp-block-details summary::-webkit-details-marker { display: none; }

:is(.ad-prose, .editor-styles-wrapper) .wp-block-details summary::after {
  content: "+";
  flex: 0 0 auto;
  font-family: var(--ad-font-mono);
  font-size: 22px;
  line-height: 1;
  color: var(--ad-color-accent);
}

:is(.ad-prose, .editor-styles-wrapper) .wp-block-details[open] summary::after { content: "\2013"; }

:is(.ad-prose, .editor-styles-wrapper) .wp-block-details summary:focus-visible {
  outline: 2px solid var(--ad-color-accent);
  outline-offset: -2px;
}

:is(.ad-prose, .editor-styles-wrapper) .wp-block-details > :not(summary) {
  margin-block-start: 0;
  padding-block-end: 20px;
}

:is(.ad-prose, .editor-styles-wrapper) .wp-block-details > :not(summary) + :not(summary) {
  margin-block-start: 1em;
}

/* ========================================================== core/buttons */

:is(.ad-prose, .editor-styles-wrapper) .wp-block-buttons {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  margin-block: 2.2em;
}

:is(.ad-prose, .editor-styles-wrapper) .wp-block-button__link {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-block-size: var(--ad-size-btn);
  padding-inline: 24px;
  font-size: 15px;
  font-weight: 700;
  text-decoration: none;
  /* Core writes a radius from its own defaults; nothing in this design is
     rounded, and this is the one place the cascade needs telling twice. */
  border-radius: 0;
  background: var(--ad-color-accent);
  color: var(--ad-color-on-accent);
  border: 1px solid var(--ad-color-accent);
  transition: background-color .2s ease, color .2s ease, border-color .2s ease;
}

:is(.ad-prose, .editor-styles-wrapper) .wp-block-button__link:hover,
:is(.ad-prose, .editor-styles-wrapper) .wp-block-button__link:focus-visible {
  background: var(--ad-color-text);
  border-color: var(--ad-color-text);
  color: var(--ad-color-bg);
}

:is(.ad-prose, .editor-styles-wrapper) .wp-block-button.is-style-outline .wp-block-button__link {
  background: transparent;
  color: var(--ad-color-text);
  border-color: var(--ad-color-border-input);
}

:is(.ad-prose, .editor-styles-wrapper) .wp-block-button.is-style-outline .wp-block-button__link:hover,
:is(.ad-prose, .editor-styles-wrapper) .wp-block-button.is-style-outline .wp-block-button__link:focus-visible {
  background: transparent;
  border-color: var(--ad-color-accent);
  color: var(--ad-color-accent);
}

/* ======================================================== core/separator */

:is(.ad-prose, .editor-styles-wrapper) .wp-block-separator {
  margin-block: 2.8em;
  margin-inline: auto;
  inline-size: 120px;
  block-size: 1px;
  border: 0;
  background: var(--ad-color-border-input);
  opacity: 1;
}

:is(.ad-prose, .editor-styles-wrapper) .wp-block-separator.is-style-wide {
  inline-size: 100%;
  background: var(--ad-color-hairline);
}

:is(.ad-prose, .editor-styles-wrapper) .wp-block-separator.is-style-dots {
  inline-size: auto;
  block-size: auto;
  background: none;
  text-align: center;
  line-height: 1;
}

:is(.ad-prose, .editor-styles-wrapper) .wp-block-separator.is-style-dots::before {
  content: "\00B7\00B7\00B7";
  font-family: var(--ad-font-mono);
  font-size: 26px;
  letter-spacing: .9em;
  /* The tracking adds a trailing gap; this puts the group back on centre. */
  padding-inline-start: .9em;
  color: var(--ad-color-text-meta);
}

/* =============================================== core/embed (YouTube 16:9) */

:is(.ad-prose, .editor-styles-wrapper) .wp-block-embed {
  margin-block: 2.4em;
}

:is(.ad-prose, .editor-styles-wrapper) .wp-block-embed__wrapper {
  position: relative;
  aspect-ratio: 16 / 9;
  overflow: hidden;
  background: var(--ad-color-panel);
  border: 1px solid var(--ad-color-hairline);
}

/* Core's own responsive-embed technique uses a padding-top spacer; with
   aspect-ratio doing the work the spacer would double the height. */
:is(.ad-prose, .editor-styles-wrapper) .wp-block-embed__wrapper::before { content: none; }

:is(.ad-prose, .editor-styles-wrapper) .wp-block-embed iframe {
  position: absolute;
  inset: 0;
  inline-size: 100%;
  block-size: 100%;
  border: 0;
}

/* An embed whose provider is not 16:9 keeps its own shape. */
:is(.ad-prose, .editor-styles-wrapper) .wp-block-embed:is(.wp-embed-aspect-4-3, .wp-embed-aspect-1-1, .wp-embed-aspect-9-16) .wp-block-embed__wrapper {
  aspect-ratio: auto;
}

/* ========================================================== core/columns */

:is(.ad-prose, .editor-styles-wrapper) .wp-block-columns {
  display: flex;
  gap: 32px;
  margin-block: 2.2em;
}

:is(.ad-prose, .editor-styles-wrapper) .wp-block-column {
  flex: 1 1 0;
  min-inline-size: 0;
}

:is(.ad-prose, .editor-styles-wrapper) .wp-block-column > * + * { margin-block-start: 1.1em; }

/* ============================================================= core/file */

:is(.ad-prose, .editor-styles-wrapper) .wp-block-file {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 16px;
  margin-block: 2.2em;
  padding: 18px 20px;
  background: var(--ad-color-panel);
  border: 1px solid var(--ad-color-hairline);
}

:is(.ad-prose, .editor-styles-wrapper) .wp-block-file > a:not(.wp-block-file__button) {
  /*
   * The file name is a download link in its own right, not a word in a
   * sentence, so SC 2.5.8's inline exception does not cover it and it carries
   * a full target like the button beside it. It measured 171x31 before this.
   */
  display: inline-flex;
  align-items: center;
  min-block-size: var(--ad-size-hit);
  font-weight: 700;
  color: var(--ad-color-text);
  text-decoration: none;
}

:is(.ad-prose, .editor-styles-wrapper) .wp-block-file > a:not(.wp-block-file__button):hover {
  color: var(--ad-color-accent);
}

:is(.ad-prose, .editor-styles-wrapper) .wp-block-file__button {
  display: inline-flex;
  align-items: center;
  min-block-size: var(--ad-size-hit);
  margin-inline-start: auto;
  padding-inline: 18px;
  font-size: 14px;
  font-weight: 700;
  text-decoration: none;
  border-radius: 0;
  background: var(--ad-color-accent);
  color: var(--ad-color-on-accent);
}

:is(.ad-prose, .editor-styles-wrapper) .wp-block-file__button:hover {
  background: var(--ad-color-text);
  color: var(--ad-color-bg);
}

/* ======================================================== core/footnotes */

/* The superscript reference inside the body. */
:is(.ad-prose, .editor-styles-wrapper) sup a {
  font-family: var(--ad-font-mono);
  font-size: 11px;
  text-decoration: none;
  /*
   * The glyph is 13x22. SC 2.5.8's inline exception does cover a reference
   * sitting in a run of text, but a target that small is a miss waiting to
   * happen on a phone. Padding on an inline box does not push the lines
   * apart, so the hit area grows for nothing.
   */
  padding-inline: 7px;
  padding-block: 9px;
}

:is(.ad-prose, .editor-styles-wrapper) .wp-block-footnotes {
  margin-block-start: 2.8em;
  padding-block-start: 24px;
  padding-inline-start: 1.6em;
  border-block-start: 1px solid var(--ad-color-hairline);
  font-size: 15px;
  line-height: 1.7;
  color: var(--ad-color-text-meta);
  /* The drawn ol marker above is for editorial lists; a footnote list wants
     the real one, which carries the back-reference anchor. */
  list-style: decimal;
  counter-reset: none;
}

:is(.ad-prose, .editor-styles-wrapper) .wp-block-footnotes > li { counter-increment: none; }
:is(.ad-prose, .editor-styles-wrapper) .wp-block-footnotes > li::before { content: none; }

/* The back-reference arrow, same reasoning: it was 15x14. */
:is(.ad-prose, .editor-styles-wrapper) .wp-block-footnotes a {
  padding-inline: 7px;
  padding-block: 8px;
}

:is(.ad-prose, .editor-styles-wrapper) .wp-block-footnotes li::marker {
  font-family: var(--ad-font-mono);
  font-size: 13px;
  color: var(--ad-color-text-meta);
}

/* ========================================================== breakpoints */

@media (max-width: 1100px) {
  /* Inside a single-column article there is nothing to break out of. */
  :is(.ad-prose, .editor-styles-wrapper) :is(.alignwide, .alignfull) { margin-inline: 0; }
}

@media (max-width: 781px) {
  :is(.ad-prose, .editor-styles-wrapper) .wp-block-columns { flex-direction: column; }
}

@media (max-width: 640px) {
  :is(.ad-prose, .editor-styles-wrapper) .wp-block-gallery {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  :is(.ad-prose, .editor-styles-wrapper) :is(.wp-block-code, .wp-block-preformatted, pre) {
    padding: 16px;
    font-size: 13px;
  }

  :is(.ad-prose, .editor-styles-wrapper) .wp-block-group:is(.is-style-act-result, .is-style-act-tip, .is-style-act-note) {
    padding: 20px 18px;
  }

  :is(.ad-prose, .editor-styles-wrapper) .wp-block-file { gap: 12px; }

  :is(.ad-prose, .editor-styles-wrapper) .wp-block-file__button { margin-inline-start: 0; }
}
