/* DC Agency — visual consistency fixes (2026-11-26).
   Loaded last on every page (functions.php, priority 100). Remove the enqueue to roll back. */

/* 1. Process timelines: every step marker looks the same.
   Previously one step (3rd or 4th) was hard-coded as "active" and looked like a bug. */
.process-rail article span::after,
.development-path article i,
.orm-process article i,
.b2b-process-rail article i,
.catalog-process-rail article i,
.md-service-process article i {
  border-color: var(--color-text-primary);
  background: var(--color-accent);
}
.diagnostic-process article span::after,
.hub-process article span::after {
  border-color: var(--color-accent);
  background: var(--color-accent);
}

/* 2. Step grids: no half-empty last row (e.g. 6 steps in 4 columns left a grey block). */
.md-service-process { background: var(--color-surface); }
@media (min-width: 1024px) {
  :is(.md-service-process, .development-path, .orm-process, .b2b-process-rail, .catalog-process-rail, .hub-process):has(article:nth-of-type(6):last-of-type) {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }
  :is(.md-service-process, .development-path, .orm-process, .b2b-process-rail, .catalog-process-rail):has(article:nth-of-type(6):last-of-type) article {
    min-height: 0;
    padding-bottom: var(--space-6, 40px);
  }
  :is(.md-service-process, .development-path, .orm-process, .b2b-process-rail, .catalog-process-rail):has(article:nth-of-type(6):last-of-type) article:nth-of-type(3n)::before {
    right: var(--space-5);
  }
  :is(.md-service-process, .process-rail, .development-path, .orm-process, .b2b-process-rail, .catalog-process-rail, .diagnostic-process, .hub-process):has(article:nth-of-type(4):last-of-type) {
    grid-template-columns: repeat(4, minmax(0, 1fr));
  }
  :is(.md-service-process, .process-rail, .development-path, .orm-process, .b2b-process-rail, .catalog-process-rail, .diagnostic-process, .hub-process):has(article:nth-of-type(5):last-of-type) {
    grid-template-columns: repeat(5, minmax(0, 1fr));
  }
}

/* 3. Numbered module lists edited in Gutenberg: the number is wrapped in <p>,
   so the original "number tile" style did not apply and numbers floated in a blank column. */
.dc-gutenberg-content .module-stack article p:first-child > span:only-child {
  width: 64px;
  height: 64px;
  display: grid;
  place-items: center;
  border: var(--border-width) solid var(--color-accent);
  border-radius: var(--radius-md);
  background: var(--color-accent-soft);
  color: var(--color-text-primary);
  font-family: var(--font-mono);
  font-weight: var(--font-weight-bold);
}
@media (max-width: 760px) {
  .dc-gutenberg-content .module-stack article p:first-child > span:only-child { width: 54px; height: 54px; }
}

/* 4. Universal service pages: the hero "scheme" row duplicated the heading above it
   and highlighted 3 of 5 items at random. */
.service-universal .dc-service-signal { display: none; }

/* 5. Service hub cards: 5, 6 or 9 cards go 3 per row instead of 4 + a lone card. */
@media (min-width: 1100px) {
  .service-hub__grid:has(> :nth-child(5):last-child),
  .service-hub__grid:has(> :nth-child(6):last-child),
  .service-hub__grid:has(> :nth-child(9):last-child) {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }
}

/* 6. Universal service pages: the corner dot on step cards was brighter on the first step only. */
.service-universal .dc-service-step::before { display: none; }

/* 7. Card grids with exactly 4 cards: 4 in a row (or 2×2) instead of 3 + a lone card. */
@media (min-width: 1200px) {
  .service-universal .dc-service-grid:not(.dc-service-grid--two) > .wp-block-group__inner-container:has(> :nth-child(4):last-child),
  .service-universal .dc-service-grid:not(.dc-service-grid--two):has(> :nth-child(4):last-child) {
    grid-template-columns: repeat(4, minmax(0, 1fr));
  }
}
@media (min-width: 761px) and (max-width: 1199px) {
  .service-universal .dc-service-grid:not(.dc-service-grid--two) > .wp-block-group__inner-container:has(> :nth-child(4):last-child),
  .service-universal .dc-service-grid:not(.dc-service-grid--two):has(> :nth-child(4):last-child) {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

/* 8. AI-search "what's included": the two-column card layout broke in the editor version
   (empty left half in every card). Plain cards instead. */
.service-ai-search .ai-search-section--work-scope .dc-service-card { display: block; }
.service-ai-search .ai-search-section--work-scope .dc-service-card::before { margin-bottom: var(--space-3); }

/* ======================================================================
   9–12. Markers, illustrations, hover (2026-11-26, client feedback).
   ====================================================================== */

/* 9. Markers (step numbers, checks, icons) sit on one line with the card heading
   instead of taking a whole row each. Decorative dots and timeline lines are removed.
   "Box" = the card itself, or Gutenberg's inner container inside it.
   All markers share one style: 36px lime circle, mono digits; picture icons get a soft 44px circle. */
:is(.md-service-process, .orm-process, .catalog-process-rail, .b2b-process-rail, .development-path, .md-service-result-grid, .orm-result-grid, .catalog-result-grid, .b2b-result-grid, .development-result-grid, .diagnostic-cards, .b2b-card-grid, .development-focus-grid, .catalog-card-grid, .outcome-grid, .v3-grid--5, .dc-service-grid, .diagnostic-process, .geo-process-rail, .process-rail, .hub-process, .industry-relay, .industry-data-register) :is(:is(article, .v3-card, .dc-service-card):has(> h3):has(> :is(p, span:not(.dc-label), img, i):first-child), :is(article, .v3-card, .dc-service-card) > .wp-block-group__inner-container:has(> h3):has(> :is(p, span:not(.dc-label), img, i):first-child)) {
  display: flex;
  flex-direction: row;
  flex-wrap: wrap;
  align-items: center;
  align-content: flex-start;
  column-gap: var(--space-3);
  row-gap: 0;
}
:is(.md-service-process, .orm-process, .catalog-process-rail, .b2b-process-rail, .development-path, .md-service-result-grid, .orm-result-grid, .catalog-result-grid, .b2b-result-grid, .development-result-grid, .diagnostic-cards, .b2b-card-grid, .development-focus-grid, .catalog-card-grid, .outcome-grid, .v3-grid--5, .dc-service-grid, .diagnostic-process, .geo-process-rail, .process-rail, .hub-process, .industry-relay, .industry-data-register) :is(:is(article, .v3-card, .dc-service-card):has(> h3):has(> :is(p, span:not(.dc-label), img, i):first-child), :is(article, .v3-card, .dc-service-card) > .wp-block-group__inner-container:has(> h3):has(> :is(p, span:not(.dc-label), img, i):first-child)) > * {
  flex: 0 0 100%;
  min-width: 0;
}
:is(.md-service-process, .orm-process, .catalog-process-rail, .b2b-process-rail, .development-path, .md-service-result-grid, .orm-result-grid, .catalog-result-grid, .b2b-result-grid, .development-result-grid, .diagnostic-cards, .b2b-card-grid, .development-focus-grid, .catalog-card-grid, .outcome-grid, .v3-grid--5, .dc-service-grid, .diagnostic-process, .geo-process-rail, .process-rail, .hub-process, .industry-relay, .industry-data-register) :is(:is(article, .v3-card, .dc-service-card):has(> h3):has(> :is(p, span:not(.dc-label), img, i):first-child), :is(article, .v3-card, .dc-service-card) > .wp-block-group__inner-container:has(> h3):has(> :is(p, span:not(.dc-label), img, i):first-child)) > h3 {
  flex: 1 1 7rem;
  margin: 0;
}
:is(.md-service-process, .orm-process, .catalog-process-rail, .b2b-process-rail, .development-path, .md-service-result-grid, .orm-result-grid, .catalog-result-grid, .b2b-result-grid, .development-result-grid, .diagnostic-cards, .b2b-card-grid, .development-focus-grid, .catalog-card-grid, .outcome-grid, .v3-grid--5, .dc-service-grid, .diagnostic-process, .geo-process-rail, .process-rail, .hub-process, .industry-relay, .industry-data-register) :is(:is(article, .v3-card, .dc-service-card):has(> h3):has(> :is(p, span:not(.dc-label), img, i):first-child), :is(article, .v3-card, .dc-service-card) > .wp-block-group__inner-container:has(> h3):has(> :is(p, span:not(.dc-label), img, i):first-child)) > h3 ~ * {
  margin-top: var(--space-3);
  margin-bottom: 0;
}
:is(.md-service-process, .orm-process, .catalog-process-rail, .b2b-process-rail, .development-path, .md-service-result-grid, .orm-result-grid, .catalog-result-grid, .b2b-result-grid, .development-result-grid, .diagnostic-cards, .b2b-card-grid, .development-focus-grid, .catalog-card-grid, .outcome-grid, .v3-grid--5, .dc-service-grid, .diagnostic-process, .geo-process-rail, .process-rail, .hub-process, .industry-relay, .industry-data-register) :is(:is(article, .v3-card, .dc-service-card):has(> h3):has(> :is(p, span:not(.dc-label), img, i):first-child), :is(article, .v3-card, .dc-service-card) > .wp-block-group__inner-container:has(> h3):has(> :is(p, span:not(.dc-label), img, i):first-child)) > :is(p, span, img, i):not(h3 ~ *) {
  flex: 0 0 auto;
  margin: 0;
}
:is(.md-service-process, .orm-process, .catalog-process-rail, .b2b-process-rail, .development-path, .md-service-result-grid, .orm-result-grid, .catalog-result-grid, .b2b-result-grid, .development-result-grid, .diagnostic-cards, .b2b-card-grid, .development-focus-grid, .catalog-card-grid, .outcome-grid, .v3-grid--5, .dc-service-grid, .diagnostic-process, .geo-process-rail, .process-rail, .hub-process, .industry-relay, .industry-data-register) :is(:is(article, .v3-card, .dc-service-card):has(> h3):has(> :is(p, span:not(.dc-label), img, i):first-child), :is(article, .v3-card, .dc-service-card) > .wp-block-group__inner-container:has(> h3):has(> :is(p, span:not(.dc-label), img, i):first-child)) > i:not(h3 ~ *) {
  display: none;
}
:is(.md-service-process, .orm-process, .catalog-process-rail, .b2b-process-rail, .development-path, .md-service-result-grid, .orm-result-grid, .catalog-result-grid, .b2b-result-grid, .development-result-grid, .diagnostic-cards, .b2b-card-grid, .development-focus-grid, .catalog-card-grid, .outcome-grid, .v3-grid--5, .dc-service-grid, .diagnostic-process, .geo-process-rail, .process-rail, .hub-process, .industry-relay, .industry-data-register) :is(:is(article, .v3-card, .dc-service-card):has(> h3):has(> :is(p, span:not(.dc-label), img, i):first-child), :is(article, .v3-card, .dc-service-card) > .wp-block-group__inner-container:has(> h3):has(> :is(p, span:not(.dc-label), img, i):first-child)) > p:not(h3 ~ *) {
  line-height: 0;
}
:is(.md-service-process, .orm-process, .catalog-process-rail, .b2b-process-rail, .development-path, .md-service-result-grid, .orm-result-grid, .catalog-result-grid, .b2b-result-grid, .development-result-grid, .diagnostic-cards, .b2b-card-grid, .development-focus-grid, .catalog-card-grid, .outcome-grid, .v3-grid--5, .dc-service-grid, .diagnostic-process, .geo-process-rail, .process-rail, .hub-process, .industry-relay, .industry-data-register) :is(:is(article, .v3-card, .dc-service-card):has(> h3):has(> :is(p, span:not(.dc-label), img, i):first-child), :is(article, .v3-card, .dc-service-card) > .wp-block-group__inner-container:has(> h3):has(> :is(p, span:not(.dc-label), img, i):first-child)) > p:not(h3 ~ *) > span:only-child,
:is(.md-service-process, .orm-process, .catalog-process-rail, .b2b-process-rail, .development-path, .md-service-result-grid, .orm-result-grid, .catalog-result-grid, .b2b-result-grid, .development-result-grid, .diagnostic-cards, .b2b-card-grid, .development-focus-grid, .catalog-card-grid, .outcome-grid, .v3-grid--5, .dc-service-grid, .diagnostic-process, .geo-process-rail, .process-rail, .hub-process, .industry-relay, .industry-data-register) :is(:is(article, .v3-card, .dc-service-card):has(> h3):has(> :is(p, span:not(.dc-label), img, i):first-child), :is(article, .v3-card, .dc-service-card) > .wp-block-group__inner-container:has(> h3):has(> :is(p, span:not(.dc-label), img, i):first-child)) > p.dc-label:not(h3 ~ *),
:is(.md-service-process, .orm-process, .catalog-process-rail, .b2b-process-rail, .development-path, .md-service-result-grid, .orm-result-grid, .catalog-result-grid, .b2b-result-grid, .development-result-grid, .diagnostic-cards, .b2b-card-grid, .development-focus-grid, .catalog-card-grid, .outcome-grid, .v3-grid--5, .dc-service-grid, .diagnostic-process, .geo-process-rail, .process-rail, .hub-process, .industry-relay, .industry-data-register) :is(:is(article, .v3-card, .dc-service-card):has(> h3):has(> :is(p, span:not(.dc-label), img, i):first-child), :is(article, .v3-card, .dc-service-card) > .wp-block-group__inner-container:has(> h3):has(> :is(p, span:not(.dc-label), img, i):first-child)) > span:not(h3 ~ *):not(.dc-label) {
  position: static;
  width: 36px;
  height: 36px;
  display: inline-grid;
  place-items: center;
  padding: 0;
  border: 0;
  border-radius: var(--radius-pill);
  background: var(--color-accent);
  color: var(--color-accent-text);
  font-family: var(--font-mono);
  font-size: 13px;
  font-weight: var(--font-weight-semibold);
  line-height: 1;
  letter-spacing: 0;
}
:is(.md-service-process, .orm-process, .catalog-process-rail, .b2b-process-rail, .development-path, .md-service-result-grid, .orm-result-grid, .catalog-result-grid, .b2b-result-grid, .development-result-grid, .diagnostic-cards, .b2b-card-grid, .development-focus-grid, .catalog-card-grid, .outcome-grid, .v3-grid--5, .dc-service-grid, .diagnostic-process, .geo-process-rail, .process-rail, .hub-process, .industry-relay, .industry-data-register) :is(:is(article, .v3-card, .dc-service-card):has(> h3):has(> :is(p, span:not(.dc-label), img, i):first-child), :is(article, .v3-card, .dc-service-card) > .wp-block-group__inner-container:has(> h3):has(> :is(p, span:not(.dc-label), img, i):first-child)) > p.dc-label:not(h3 ~ *) {
  line-height: 1;
}
:is(.md-service-process, .orm-process, .catalog-process-rail, .b2b-process-rail, .development-path, .md-service-result-grid, .orm-result-grid, .catalog-result-grid, .b2b-result-grid, .development-result-grid, .diagnostic-cards, .b2b-card-grid, .development-focus-grid, .catalog-card-grid, .outcome-grid, .v3-grid--5, .dc-service-grid, .diagnostic-process, .geo-process-rail, .process-rail, .hub-process, .industry-relay, .industry-data-register) :is(:is(article, .v3-card, .dc-service-card):has(> h3):has(> :is(p, span:not(.dc-label), img, i):first-child), :is(article, .v3-card, .dc-service-card) > .wp-block-group__inner-container:has(> h3):has(> :is(p, span:not(.dc-label), img, i):first-child)) > span.dc-label:not(h3 ~ *) {
  flex: 0 0 100%;
  margin-bottom: var(--space-3);
}
/* universal service pages: the small dash above card titles and the corner dot on steps took a row each */
.service-universal .dc-service-card::before,
.service-universal .dc-service-step::before,
.dc-gutenberg-content .dc-service-card::before,
.dc-gutenberg-content .dc-service-step::before {
  display: none;
}
/* universal steps have no heading: number on the left, text on the right */
:is(.dc-service-step:not(:has(> .wp-block-group__inner-container)), .dc-service-step > .wp-block-group__inner-container):has(> p:first-child > span:only-child) {
  display: flex;
  align-items: flex-start;
  gap: var(--space-3);
}
:is(.dc-service-step:not(:has(> .wp-block-group__inner-container)), .dc-service-step > .wp-block-group__inner-container) > p:first-child:has(> span:only-child) {
  flex: 0 0 auto;
  margin: 0;
  line-height: 0;
}
:is(.dc-service-step:not(:has(> .wp-block-group__inner-container)), .dc-service-step > .wp-block-group__inner-container) > p:first-child:has(> span:only-child) ~ * {
  margin-top: 0;
  padding-top: 7px;
  align-self: flex-start;
}
.dc-service-step p:first-child > span:only-child {
  margin: 0;
  width: 36px;
  height: 36px;
  display: inline-grid;
  place-items: center;
  border: 0;
  border-radius: var(--radius-pill);
  background: var(--color-accent);
  color: var(--color-accent-text);
  font-family: var(--font-mono);
  font-size: 13px;
  font-weight: var(--font-weight-semibold);
  line-height: 1;
}
/* "Who it's for" cards are narrow: the icon stays above the heading, the extra number next to it is dropped */
.audience-grid :is(article, article > .wp-block-group__inner-container) > img:first-child ~ p:not(h3 ~ *) {
  display: none;
}
.audience-grid :is(article, article > .wp-block-group__inner-container) > img:first-child {
  display: block;
  margin-bottom: var(--space-3);
}
/* blue line icons on the SEO page: dark, like the rest of the site's icons */
.audience-grid img.seo-context-icon {
  width: 40px;
  height: 40px;
  padding: 0;
  border: 0;
  background: none;
  filter: brightness(0);
  opacity: .85;
}
/* "Next steps": the one card that is not a link was drawn with a top rule only */
.next-grid article {
  border: var(--border-width) solid var(--color-border);
  border-radius: var(--radius-lg);
  background: transparent;
}
/* checks read better slightly larger than digits */
:is(.md-service-result-grid, .orm-result-grid, .catalog-result-grid, .b2b-result-grid, .development-result-grid) :is(article, .wp-block-group__inner-container) > :is(p:first-child > span:only-child, span:first-child) {
  font-family: var(--font-body);
  font-size: 17px;
  font-weight: var(--font-weight-bold);
}
/* numbered module lists (scope blocks): same marker style */
.dc-gutenberg-content .module-stack article p:first-child > span:only-child,
:is(.md-service-module-stack, .module-stack) article > p:first-child > span:only-child,
:is(.md-service-module-stack, .module-stack) article > span:first-child,
:is(.md-service-module-stack, .module-stack) article > .wp-block-group__inner-container > p:first-child > span:only-child {
  width: 36px;
  height: 36px;
  display: inline-grid;
  place-items: center;
  border: 0;
  border-radius: var(--radius-pill);
  background: var(--color-accent);
  color: var(--color-accent-text);
  font-family: var(--font-mono);
  font-size: 13px;
  font-weight: var(--font-weight-semibold);
  line-height: 1;
}
@media (max-width: 760px) {
  .dc-gutenberg-content .module-stack article p:first-child > span:only-child { width: 36px; height: 36px; }
}
/* timeline lines and corner dots on step cards: no longer needed */
:is(.md-service-process, .orm-process, .catalog-process-rail, .b2b-process-rail, .development-path) article::before,
:is(.md-service-process, .orm-process, .catalog-process-rail, .b2b-process-rail, .development-path) article::after {
  display: none;
}
/* MVT "what we test" cards have no heading: icon next to the text */
.mvt-service__cards article { display: flex; align-items: center; gap: var(--space-3); }
.mvt-service__cards article > .mvt-service__icon { flex: 0 0 auto; margin: 0; }

/* 10. Large illustrations no longer stretch across the whole container.
   Every section heading already carries its own small illustration (section-head::before),
   so the big picture repeated below the cards is hidden. On AI-search pages this also gives
   the card grid its full width back (cards were squeezed to ~120px next to the picture). */
:is(.md-service-process-section, .md-service-results, .ai-search-section--answer-process,
    .ai-search-section--visibility-factors, .ai-search-section--monitoring-result, .next-steps-section)
  :has(> .section-head) > figure:is(.md-service-figure, .ai-search-figure, .diagnostics-editorial) {
  display: none;
}
:is(.ai-search-section--visibility-factors, .ai-search-section--monitoring-result) :has(> .section-head) > :is(.section-head, .dc-service-grid) {
  grid-column: 1 / -1;
}
@media (min-width: 900px) {
  /* "Scope": the picture fills the empty space under the left card */
  .md-service-scope__grid figure.md-service-figure {
    grid-column: 1;
    grid-row: 2;
    align-self: start;
    max-width: 360px;
    margin: var(--space-5) 0 0;
  }
  .md-service-scope__grid .md-service-module-stack { grid-row: 1 / span 2; }
  /* "Boundaries": the picture goes under the right column */
  .md-service-boundaries__box figure.md-service-figure {
    grid-column: 2;
    max-width: 320px;
    margin: var(--space-5) 0 0;
  }
  .md-service-boundaries__box > *:first-child:not(figure),
  .md-service-boundaries__box > .wp-block-group__inner-container > article { grid-row: 1 / span 2; }
}
@media (max-width: 760px) {
  /* module lists: number next to the title on phones (the card is a grid, Gutenberg's inner wrapper is display: contents) */
  :is(.md-service-module-stack, .module-stack) article:has(h3) {
    grid-template-columns: auto minmax(0, 1fr);
    column-gap: var(--space-3);
    align-items: center;
  }
  :is(.md-service-module-stack, .module-stack) article:has(h3) > :not(.wp-block-group__inner-container),
  :is(.md-service-module-stack, .module-stack) article:has(h3) > .wp-block-group__inner-container > * {
    grid-column: 1 / -1;
  }
  :is(.md-service-module-stack, .module-stack) article:has(h3) > :is(p, span):first-child,
  :is(.md-service-module-stack, .module-stack) article:has(h3) > .wp-block-group__inner-container > :is(p, span):first-child {
    grid-column: 1;
    grid-row: 1;
    margin: 0;
    line-height: 0;
  }
  :is(.md-service-module-stack, .module-stack) article:has(h3) > h3,
  :is(.md-service-module-stack, .module-stack) article:has(h3) > .wp-block-group__inner-container > h3 {
    grid-column: 2;
    grid-row: 1;
    margin: 0;
  }
  .service-universal .dc-service-step,
  .dc-gutenberg-content .dc-service-step { min-height: 0; }
}
@media (max-width: 899px) {
  :is(.md-service-scope, .md-service-boundaries) figure.md-service-figure {
    max-width: 420px;
    margin-inline: auto;
  }
}

/* 11. Hover: every card can be "the highlighted one". Previously one card per block was always
   filled lime (as if it were the only thing the agency does); now all cards are equal and the card
   under the cursor gets the lime fill. The fill is an inset shadow so it animates smoothly and stays
   subtle on dark sections. Cards lift by 3px; step rails (shared borders) only fill.
   Markers grow slightly. No movement for touch screens or "reduce motion". */
.entry-card.is-featured, .seo-layer-card.is-featured, .development-card.is-featured, .development-format-card.is-featured,
.next-grid a:nth-child(1) {
  background: var(--color-surface);
  border-color: var(--color-border);
  color: var(--color-text-primary);
  box-shadow: none;
}
.development-card.is-featured p, .development-card.is-featured .dc-label { color: var(--color-text-secondary); }
.development-card.is-featured b { color: var(--color-text-primary); }

@media (hover: hover) {
  :is(.md-service-result-grid, .orm-result-grid, .catalog-result-grid, .b2b-result-grid, .development-result-grid, .diagnostic-cards, .b2b-card-grid, .development-focus-grid, .catalog-card-grid, .outcome-grid, .audience-grid, .v3-grid--5, .mvt-service__cards, .md-service-module-stack, .module-stack) :is(article, .v3-card),
  .service-hub-card,
  .dc-service-card,
  .entry-card,
  .seo-layer-card,
  .development-card,
  .development-format-card,
  .md-service-related-grid a,
  .next-grid > *,
  .next-grid > .wp-block-group__inner-container > *,
  .b2b-related-grid a,
  .orm-related-grid a,
  .development-related-grid a,
  .related-hub-grid article,
  .cases-v2-card,
  :is(.md-service-process, .orm-process, .catalog-process-rail, .b2b-process-rail, .development-path, .process-rail, .hub-process, .diagnostic-process) article,
  .dc-service-step {
    transition: transform .25s ease, box-shadow .25s ease, border-color .25s ease;
  }
  :is(.md-service-result-grid, .orm-result-grid, .catalog-result-grid, .b2b-result-grid, .development-result-grid, .diagnostic-cards, .b2b-card-grid, .development-focus-grid, .catalog-card-grid, .outcome-grid, .audience-grid, .v3-grid--5, .mvt-service__cards, .md-service-module-stack, .module-stack) :is(article, .v3-card):hover,
  .service-hub-card:hover,
  .dc-service-card:hover,
  .entry-card:hover,
  .seo-layer-card:hover,
  .development-card:hover,
  .development-format-card:hover,
  .md-service-related-grid a:hover,
  .next-grid > *:hover,
  .next-grid > .wp-block-group__inner-container > *:hover,
  .b2b-related-grid a:hover,
  .orm-related-grid a:hover,
  .development-related-grid a:hover,
  .related-hub-grid article:hover,
  .cases-v2-card:hover {
    border-color: color-mix(in srgb, var(--color-accent) 70%, var(--color-border));
    box-shadow: inset 0 0 0 100vmax color-mix(in srgb, var(--color-accent) 20%, transparent), var(--shadow-md);
  }
  :is(.md-service-process, .orm-process, .catalog-process-rail, .b2b-process-rail, .development-path, .process-rail, .hub-process, .diagnostic-process) article:hover,
  .dc-service-step:hover {
    box-shadow: inset 0 0 0 100vmax color-mix(in srgb, var(--color-accent) 16%, transparent);
  }
}
@media (hover: hover) and (prefers-reduced-motion: no-preference) {
  :is(.md-service-result-grid, .orm-result-grid, .catalog-result-grid, .b2b-result-grid, .development-result-grid, .diagnostic-cards, .b2b-card-grid, .development-focus-grid, .catalog-card-grid, .outcome-grid, .audience-grid, .v3-grid--5, .mvt-service__cards, .md-service-module-stack, .module-stack) :is(article, .v3-card):hover,
  .service-hub-card:hover,
  .dc-service-card:hover,
  .entry-card:hover,
  .seo-layer-card:hover,
  .development-card:hover,
  .development-format-card:hover,
  .md-service-related-grid a:hover,
  .next-grid > *:hover,
  .next-grid > .wp-block-group__inner-container > *:hover,
  .b2b-related-grid a:hover,
  .orm-related-grid a:hover,
  .development-related-grid a:hover,
  .related-hub-grid article:hover,
  .cases-v2-card:hover {
    transform: translateY(-3px);
  }
  /* markers react */
  :is(article, .v3-card, .dc-service-card, .dc-service-step) :is(p:first-child > span:only-child, :is(article, .v3-card, .dc-service-card, .wp-block-group__inner-container) > span:first-child:not(.dc-label), :is(article, .v3-card, .dc-service-card, .wp-block-group__inner-container) > p.dc-label:first-child) {
    transition: transform .25s ease;
  }
  :is(article, .v3-card, .dc-service-card, .dc-service-step):hover :is(p:first-child > span:only-child, :is(article, .v3-card, .dc-service-card, .wp-block-group__inner-container) > span:first-child:not(.dc-label), :is(article, .v3-card, .dc-service-card, .wp-block-group__inner-container) > p.dc-label:first-child) {
    transform: scale(1.1);
  }
}

/* 12. Hero "stage" scales (Diagnostics → Architecture → Site → SEO → Growth and similar):
   only the first stage was green, as if the agency did nothing else. All stages are equal now,
   and each one reacts on hover. Same for buttons and the hero anchor pills. */
:is(.hub-signal__line, .development-flow, .b2b-flow, .catalog-flow, .orm-signal, .md-service-signal, .signal-line, .diagnostic-flow) span {
  color: var(--color-text-primary);
  font-weight: var(--font-weight-semibold);
  cursor: default;
}
:is(.hub-signal__line, .development-flow, .b2b-flow, .catalog-flow, .orm-signal, .md-service-signal, .signal-line, .diagnostic-flow) span::before {
  border-color: var(--color-text-primary);
  background: var(--color-accent);
  transition: transform .25s ease, box-shadow .25s ease;
}
/* the first stage used to be drawn bigger: same size as the others */
:is(.development-flow, .b2b-flow, .catalog-flow, .orm-signal, .md-service-signal) .active::before {
  width: 14px;
  height: 14px;
  top: calc(var(--space-6) * -1);
}
@media (max-width: 760px) {
  :is(.b2b-flow, .catalog-flow, .orm-signal, .md-service-signal) .active::before {
    width: 10px;
    height: 10px;
    top: calc(var(--space-4) * -1);
  }
  .development-flow .active::before {
    width: 11px;
    height: 11px;
    top: calc(var(--space-5) * -1);
  }
}

@media (hover: hover) and (prefers-reduced-motion: no-preference) {
  :is(.hub-signal__line, .development-flow, .b2b-flow, .catalog-flow, .orm-signal, .md-service-signal, .signal-line, .diagnostic-flow) span:hover::before {
    transform: scale(1.35);
    box-shadow: 0 0 0 5px color-mix(in srgb, var(--color-accent) 35%, transparent);
  }

  /* buttons: slight lift; the secondary one gets a visible state instead of an almost invisible grey */
  .dc-button {
    transition: background .2s ease, color .2s ease, border-color .2s ease, transform .2s ease, box-shadow .2s ease;
  }
  .dc-button:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 20px rgb(18 21 17 / 12%);
  }
  .dc-button:active {
    transform: translateY(0);
    box-shadow: none;
  }
  .dc-button--secondary:hover {
    border-color: var(--color-text-primary);
    background: var(--color-accent-soft);
  }

  /* hero anchor pills */
  .anchor-nav a {
    transition: border-color .2s ease, background .2s ease, transform .2s ease;
  }
  .anchor-nav a:hover {
    border-color: var(--color-text-primary);
    background: var(--color-accent-soft);
    transform: translateY(-1px);
  }
}
@media (hover: hover) and (prefers-reduced-motion: reduce) {
  .dc-button--secondary:hover,
  .anchor-nav a:hover {
    border-color: var(--color-text-primary);
    background: var(--color-accent-soft);
  }
}

/* 13. Links and cards with an arrow ("Подробнее →", "Смотреть кейс →", "↗"): the arrow nudges
   to the right when the link or the whole card is hovered. The arrow is wrapped by assets/js/ui-arrows.js. */
.dc-arrow {
  display: inline-block;
  transition: transform .25s ease;
}
@media (hover: hover) and (prefers-reduced-motion: no-preference) {
  a:hover .dc-arrow,
  button:hover .dc-arrow,
  :is(article, li, .v3-card, [class*="card"]):hover .dc-arrow {
    transform: translateX(4px);
  }
  a:hover .dc-arrow--diag,
  button:hover .dc-arrow--diag,
  :is(article, li, .v3-card, [class*="card"]):hover .dc-arrow--diag {
    transform: translate(3px, -3px);
  }
}

/* 14. Everything clickable reacts on hover (site-wide audit: 387 links/buttons had no hover state).
   Cards: lime fill + lift, as in section 11. Buttons: lift + shadow. Text links: underline. */
@media (hover: hover) {
  .cases-v2-case, .seo-layer-links > a, .v3-card, .v3-selector > a, .dc-blog-card, .dc-blog-feature,
  .geo-related a, .mvt-service__related a, .cases-v2-filter,
  .v3-button, .v3-link, .cg-button, .dc-blog-button, .mvt-service__button, .mvt-service__text-link, .cases-v2-final__button {
    transition: transform .25s ease, box-shadow .25s ease, border-color .25s ease, background-color .25s ease, color .2s ease;
  }
  /* cards */
  .cases-v2-case:hover, .seo-layer-links > a:hover, .v3-card:hover, .v3-selector > a:hover,
  .dc-blog-card:hover, .dc-blog-feature:hover, .geo-related a:hover {
    border-color: color-mix(in srgb, var(--color-accent) 70%, var(--color-border));
    box-shadow: inset 0 0 0 100vmax color-mix(in srgb, var(--color-accent) 20%, transparent), var(--shadow-md);
  }
  /* buttons */
  .v3-button:hover, .cg-button:hover, .dc-blog-button:hover, .mvt-service__button:hover, .cases-v2-final__button:hover {
    box-shadow: 0 8px 20px rgb(18 21 17 / 14%);
    border-color: var(--color-accent);
  }
  .cases-v2-filter:hover:not(.is-active) {
    border-color: var(--color-text-primary);
    background-color: var(--color-accent-soft);
    color: var(--color-text-primary);
  }
  /* text links */
  .dc-service-cases__all:hover, .v3-link:hover, .mvt-service__text-link:hover, .mvt-service__related a:hover,
  :is(h2, h3, h4) > a:hover, .breadcrumbs a:hover, .dc-article-breadcrumbs a:hover, .cg-breadcrumbs a:hover,
  .mvt-service__breadcrumbs a:hover, .site-footer a:not(.brand):hover, .dc-blog-cta a:not([class]):hover,
  main :is(p, li) > a:not([class]):hover, main :is(p, li) > a.has-dc-arrow:not([class*="button"]):not([class*="card"]):hover {
    text-decoration: underline;
    text-decoration-thickness: 1px;
    text-underline-offset: .2em;
  }
  .brand { transition: opacity .2s ease; }
  .brand:hover { opacity: .75; }
  /* anchor pills on universal service pages, like the hero pills */
  .dc-service-anchor-nav a {
    transition: border-color .2s ease, background-color .2s ease, transform .2s ease;
  }
  .dc-service-anchor-nav a:hover {
    border-color: var(--color-text-primary);
    background-color: var(--color-accent-soft);
  }
}
@media (hover: hover) and (prefers-reduced-motion: no-preference) {
  .cases-v2-case:hover, .seo-layer-links > a:hover, .v3-card:hover, .v3-selector > a:hover,
  .dc-blog-card:hover, .dc-blog-feature:hover, .geo-related a:hover {
    transform: translateY(-3px);
  }
  .v3-button:hover, .cg-button:hover, .dc-blog-button:hover, .mvt-service__button:hover, .cases-v2-final__button:hover,
  .cases-v2-filter:hover:not(.is-active), .dc-service-anchor-nav a:hover {
    transform: translateY(-2px);
  }
}
/* text links that are underlined anyway: the underline thickens and turns lime */
@media (hover: hover) {
  :is(p, li) > a:not([class*="button"]):not([class*="card"]) {
    transition: text-decoration-color .2s ease;
  }
  :is(p, li) > a:not([class*="button"]):not([class*="card"]):hover {
    text-decoration-line: underline;
    text-decoration-thickness: 2px;
    text-decoration-color: var(--color-accent-hover);
    text-underline-offset: .2em;
  }
}

/* 15. Step rails where the number and a lime dot each took their own row above the heading
   ("01" / "•" / "Собираем вводные"): the number goes inside the circle, the circle sits on the heading line. */
:is(.diagnostic-process, .geo-process-rail, .process-rail, .hub-process) article span::after,
:is(.diagnostic-process, .geo-process-rail, .process-rail, .hub-process) article span::before {
  display: none;
}
:is(.industry-relay, .industry-data-register) article > .wp-block-group__inner-container > p:first-child > b:only-child,
:is(.industry-relay, .industry-data-register) article > p:first-child > b:only-child {
  width: 36px;
  height: 36px;
  display: inline-grid;
  place-items: center;
  margin: 0;
  padding: 0;
  border: 0;
  border-radius: var(--radius-pill);
  background: var(--color-accent);
  color: var(--color-accent-text);
  font-family: var(--font-mono);
  font-size: 13px;
  font-weight: var(--font-weight-semibold);
  line-height: 1;
  letter-spacing: 0;
}
:is(.diagnostic-process, .geo-process-rail, .process-rail, .hub-process, .industry-relay, .industry-data-register) article :is(p:first-child > span:only-child, p:first-child > b:only-child, span:first-child) {
  margin: 0;
}
.process-rail article span::after,
.service-geo-promotion .geo-process-rail article span::after {
  display: none !important;
}
/* register cards: Gutenberg's inner container was "display: contents", so the circle could not join the heading line */
.industry-data-register article > .wp-block-group__inner-container {
  display: flex !important;
}
/* six steps in one row were too narrow for a circle plus a heading: 3 × 2 like the other step blocks */
@media (min-width: 1181px) {
  .process-rail,
  .service-geo-promotion .geo-process-rail {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }
  .process-rail article,
  .service-geo-promotion .geo-process-rail article {
    min-height: 0;
  }
  .process-rail article:nth-child(3n),
  .service-geo-promotion .geo-process-rail article:nth-child(3n) {
    border-right: 0;
  }
  .process-rail article:nth-child(n+4) {
    border-top: var(--border-width) solid var(--color-border);
  }
  .service-geo-promotion .geo-process-rail article:nth-child(n+4) {
    border-top: var(--border-width) solid color-mix(in srgb, var(--color-text-inverse) 18%, transparent);
  }
}

/* 16. Numbered lists that put the number in a left column on desktop dropped it onto
   its own row above the heading on phones. Same lime circle everywhere; on phones the
   circle sits on the heading line and the description goes full width below. */
:is(.md-service-row-list, .orm-table-list, .orm-module-stack, .catalog-task-list, .catalog-module-stack, .b2b-task-list, .b2b-module-stack, .system-stack, .geo-signal-list) article > span:first-child,
:is(.md-service-row-list, .orm-table-list, .orm-module-stack, .catalog-task-list, .catalog-module-stack, .b2b-task-list, .b2b-module-stack, .system-stack, .geo-signal-list) article > .wp-block-group__inner-container > p:first-child > span:only-child {
  width: 36px;
  height: 36px;
  display: inline-grid;
  place-items: center;
  margin: 0;
  padding: 0;
  border: 0;
  border-radius: var(--radius-pill);
  background: var(--color-accent);
  color: var(--color-accent-text);
  font-family: var(--font-mono);
  font-size: 13px;
  font-weight: var(--font-weight-semibold);
  line-height: 1;
  letter-spacing: 0;
}
:is(.md-service-row-list, .orm-table-list, .orm-module-stack, .catalog-task-list, .catalog-module-stack, .b2b-task-list, .b2b-module-stack, .system-stack, .geo-signal-list) article > .wp-block-group__inner-container > p:first-child:has(> span:only-child) {
  margin: 0;
  line-height: 0;
}
@media (max-width: 760px) {
  :is(.md-service-row-list, .orm-table-list, .orm-module-stack, .catalog-task-list, .catalog-module-stack, .b2b-task-list, .b2b-module-stack, .system-stack, .geo-signal-list) article {
    display: grid !important;
    grid-template-columns: 36px minmax(0, 1fr) !important;
    column-gap: var(--space-3) !important;
    row-gap: var(--space-3);
    align-items: center;
  }
  :is(.md-service-row-list, .orm-table-list, .orm-module-stack, .catalog-task-list, .catalog-module-stack, .b2b-task-list, .b2b-module-stack, .system-stack, .geo-signal-list) article > *,
  :is(.md-service-row-list, .orm-table-list, .orm-module-stack, .catalog-task-list, .catalog-module-stack, .b2b-task-list, .b2b-module-stack, .system-stack, .geo-signal-list) article > .wp-block-group__inner-container > * {
    grid-column: 1 / -1 !important;
    margin-top: 0;
  }
  :is(.md-service-row-list, .orm-table-list, .orm-module-stack, .catalog-task-list, .catalog-module-stack, .b2b-task-list, .b2b-module-stack, .system-stack, .geo-signal-list) article > span:first-child,
  :is(.md-service-row-list, .orm-table-list, .orm-module-stack, .catalog-task-list, .catalog-module-stack, .b2b-task-list, .b2b-module-stack, .system-stack, .geo-signal-list) article > .wp-block-group__inner-container > p:first-child:has(> span:only-child) {
    grid-column: 1 !important;
    grid-row: 1;
  }
  :is(.md-service-row-list, .orm-table-list, .orm-module-stack, .catalog-task-list, .catalog-module-stack, .b2b-task-list, .b2b-module-stack, .system-stack, .geo-signal-list) article > :is(h3, div:not(.wp-block-group__inner-container)),
  :is(.md-service-row-list, .orm-table-list, .orm-module-stack, .catalog-task-list, .catalog-module-stack, .b2b-task-list, .b2b-module-stack, .geo-signal-list) article > .wp-block-group__inner-container > h3 {
    grid-column: 2 !important;
    grid-row: 1;
    margin: 0;
  }
  /* SEO "modules": heading + text sit in their own group; keep it to the right of the circle */
  .module-stack article > .wp-block-group__inner-container > p:first-child + .wp-block-group {
    grid-column: 2 !important;
    width: auto;
    min-width: 0;
  }
  .module-stack article > .wp-block-group__inner-container > p:first-child:has(> span:only-child) {
    align-self: start;
  }
  .module-stack article > .wp-block-group__inner-container > p:first-child + .wp-block-group > .wp-block-group__inner-container {
    width: auto;
  }
}

/* 17. Service pages walk-through (b2b-katalog-s-1c, seo-prodvizhenie and the rest). */

/* Case cards: when a case has no logo picture the theme printed the title as a text "logo",
   right above the same title. Only the heading stays. */
.cases-v2-logo:not(:has(img, svg)) {
  display: none;
}

/* FAQ: opening one question stretched the closed question next to it into a tall empty card */
:is(.faq-list, .faq-grid, .dc-service-faq, .md-service-faq, .orm-faq, .catalog-faq, .b2b-faq, .development-faq),
:is(.faq-list, .faq-grid, .dc-service-faq, .md-service-faq, .orm-faq, .catalog-faq, .b2b-faq, .development-faq) > .wp-block-group__inner-container,
.wp-block-group:has(> .wp-block-group__inner-container > details.wp-block-details),
.wp-block-group__inner-container:has(> details.wp-block-details) {
  align-items: start;
}

/* Cards with a fixed minimum height left half of each card empty */
.md-service-process article,
.md-service-related-grid a,
.md-service-related-grid article,
.decision-grid article,
.metric-grid article,
.measurement-story .metric-grid article,
.related-grid article,
.result-grid article,
.md-service-result-grid article,
.diagnostic-process article,
.diagnostic-cards article,
.outcome-list article,
.process-rail article,
.hub-process article {
  min-height: 0;
}

/* Nothing is "pre-selected": the dark middle card in "Первый шаг" looked like the only option */
.decision-grid .is-primary {
  background: var(--color-surface);
  color: inherit;
}
.decision-grid .is-primary .dc-label,
.decision-grid .is-primary p:not(.dc-label) {
  color: var(--color-text-secondary);
}
.decision-grid .is-primary h3 {
  color: var(--color-text-primary);
}

/* Blue accent lines are not part of the brand palette: lime like everywhere else */
.proof-method {
  border-left-color: var(--color-accent) !important;
}
.related-editorial {
  border-top-color: var(--color-accent) !important;
}

/* Heading glued to the paragraph under it, and label glued to the heading */
body.page .dc-section :is(article, aside, .wp-block-group__inner-container) > h3 + p:not(.dc-label) {
  margin-top: var(--space-2);
}
body.page .dc-section :is(article, aside, div) > h2 + p:not(.dc-label) {
  margin-top: var(--space-4);
}
body.page .dc-section :is(article, aside, div) > p.dc-label + h2 {
  margin-top: var(--space-3);
}

/* Hero side panels: each "01 / 02 / 03" tile was a box inside a box */
:is(.catalog-mini, .b2b-mini, .development-mini, .md-service-mini) div div {
  padding: 0;
  border: 0;
  border-radius: 0;
  background: none;
}

/* 1C catalog: seven data cards in one row were ~120px wide; 4 + 3 instead */
@media (min-width: 1101px) {
  .catalog-data-grid {
    grid-template-columns: repeat(4, minmax(0, 1fr)) !important;
  }
}
/* 1C catalog "Типовой контур": the heading was too big for its column */
.catalog-integration__box article h2 {
  font-size: clamp(1.75rem, 2.4vw, 2.25rem);
}
.catalog-integration__box article p:not(.dc-label) {
  margin-top: var(--space-4);
}

/* SEO page "GEO не заменяет комплексное SEO": heading too large for a narrow side note */
.measurement-story .geo-note h3 {
  font-size: clamp(1.5rem, 2vw, 1.875rem);
  line-height: 1.15;
}

/* Long words in narrow step columns ran past the card edge: a slightly smaller heading instead of breaking words */
:is(.md-service-process, .diagnostic-process, .b2b-process-rail, .development-path, .outcome-grid, .audience-grid, .md-service-result-grid) h3 {
  font-size: clamp(1.05rem, 1.35vw, 1.25rem);
  line-height: 1.2;
  hyphens: manual;
}

/* AI-search page: nested Gutenberg containers inherited the section's two-column grid,
   so the heading, text and button were squeezed into ~160px columns and overlapped */
.dc-service-section > .wp-block-group__inner-container > .wp-block-group:not(.dc-service-grid):not(.dc-service-step-list):not(.faq-list) > .wp-block-group__inner-container {
  display: block;
}
.dc-service-section > .wp-block-group__inner-container > .wp-block-group:not(.dc-service-grid):not(.dc-service-step-list):not(.faq-list) > .wp-block-group__inner-container > * + * {
  margin-top: var(--space-4);
}
.dc-service-final > .wp-block-group__inner-container {
  grid-template-columns: minmax(0, 1fr) !important;
}
.dc-service-final > .wp-block-group__inner-container > .wp-block-group {
  max-width: 760px;
}

/* 18. Universal service template (13 pages: content SEO, AI search, PR, reputation…).
   Gutenberg wraps block content in an extra container, so the two-column FAQ got a single child
   and took the left half only. Steps had a fixed 16rem height and looked like empty strips. */
.faq-list > .wp-block-group__inner-container,
.dc-service-section .faq-list > .wp-block-group__inner-container {
  display: contents !important;
}
.service-universal .dc-service-step,
.dc-gutenberg-content .dc-service-step {
  min-height: 0;
}
/* "Связанные услуги": the category label stretched into a full-width bar */
.dc-service-card > .dc-label,
.dc-service-card > span.dc-label,
.service-universal .dc-service-card > .dc-label,
.dc-service-section .dc-service-card > .dc-label {
  align-self: flex-start;
  justify-self: start;
  width: fit-content;
  max-width: 100%;
}
/* Final call to action: a dark box inside a dark box */
.dc-service-final .wp-block-group__inner-container .wp-block-group__inner-container {
  padding: 0;
  border: 0;
  border-radius: 0;
  background: none;
  box-shadow: none;
}
.dc-service-final > .wp-block-group__inner-container > .wp-block-group {
  padding: 0;
  border: 0;
  background: none;
  box-shadow: none;
}

/* Case cards: "image will be added" placeholders looked unfinished; the card shows text only until a real image exists */
.cases-v2-media:has(.cases-v2-media__image--placeholder) {
  display: none;
}

/* 19. Industry SEO pages (manufacturers, e-commerce, clinics, B2B…): section headings were set at up to 70px
   with very tight tracking, so in half-width columns they ran to 5–6 lines. Same scale as the other service pages. */
.industry-answer h2,
.industry-copy h2,
.industry-heading h2,
.industry-proof h2,
.industry-faq h2,
.industry-final-cta h2,
.industry-section--typographic > div > h2 {
  font-size: clamp(2rem, 3.2vw, 3rem);
  line-height: 1.05;
  letter-spacing: -0.02em;
}
/* final call to action: the dark button disappeared on the dark box */
.industry-final-cta .dc-button,
.industry-final-cta .dc-button--primary {
  background: var(--color-accent);
  border-color: var(--color-accent);
  color: var(--color-accent-text);
}

/* 20. Dark "Краткий ответ" block on the universal template: the illustration was blended as if on a light
   background and showed up as a muddy grey patch. Same treatment as the other dark sections. */
#main-content .dc-service-quick {
  --dc-section-art-blend: screen;
  --dc-section-art-filter: invert(1) hue-rotate(180deg);
}
/* universal cards had a fixed height: one-line cards were mostly empty */
.service-universal .dc-service-card,
.service-universal .dc-service-related a,
.service-universal .dc-service-related article,
.dc-gutenberg-content .dc-service-card {
  min-height: 0;
}

/* 21. MVT page. The case cards are pictures that already contain the title and the figure;
   the same title, category and figure were printed again under each picture. Only the picture stays,
   the whole card is the link. A technical page-address chip was visible in the hero. */
.mvt-service__case-grid article {
  position: relative;
}
.mvt-service__case-grid article > h3 {
  height: 0;
  margin: 0;
  overflow: visible;
  font-size: 0;
  line-height: 0;
}
.mvt-service__case-grid article > h3 a::after {
  content: "";
  position: absolute;
  inset: 0;
  border-radius: inherit;
}
.mvt-service__case-grid article > p,
.mvt-service__case-grid article > strong {
  display: none;
}
.mvt-service__slug {
  display: none;
}

/* Case cards without a picture stretched to the height of the one card that has a picture */
.dc-service-cases__grid {
  align-items: start;
}

/* 22. ORM page: "Связанные услуги" has no illustration, so the label sat alone in the left column
   and the heading floated on the right. Label, heading and intro now stack on the left. */
.orm-related .section-head {
  display: block;
}
.orm-related .section-head > .dc-label {
  margin-bottom: var(--space-3);
}
.orm-metric-grid article,
.orm-related-grid a,
.orm-related-grid article {
  min-height: 0;
}

/* 23. Small leftovers from the site-wide check */
/* final call-to-action box: Gutenberg's wrapper let the long heading widen the column past the box on phones */
.md-service-final-cta__box > .wp-block-group__inner-container > * {
  min-width: 0;
}
/* label glued to the heading on industry, GEO and "Услуги" sections */
body.page main p.dc-label + h2,
body.page main span.dc-label + h2 {
  margin-top: var(--space-3);
}
body.page main article > div > h3 + p,
body.page main article > h3 + p {
  margin-top: var(--space-2);
}
body.page .prose h2 {
  margin-top: var(--space-7);
}
@media (max-width: 760px) {
  /* long Russian words in big headings ran past the screen edge */
  .diagnostics-hero__grid h1 {
    font-size: clamp(1.9rem, 8.6vw, 2.6rem);
    overflow-wrap: break-word;
  }
  .md-service-final-cta__box h2 {
    font-size: clamp(1.6rem, 7.2vw, 2.1rem);
    overflow-wrap: break-word;
  }
}
