/* Shared owner-approved visual tokens; native controls keep their behavior. */
:root {
  --cm-button-radius: 6px;
  --cm-action: #007d99;
  --cm-action-hover: #00647b;
}
/* Reconcile native per-document and vendor radii, not social/radio icons. */
body :is(button, input[type="button"], input[type="submit"], input[type="reset"], a.button, a.elementor-button, .wp-element-button, .cm-chrome-header .e-n-menu-item:last-child .e-n-menu-title-container) {
  border-radius: var(--cm-button-radius) !important;
}
/* Navigation tabs and icon-only controls retain their quieter treatment. */
body :where(.elementor-widget-button .elementor-button, .elementor-form button.elementor-button, .woocommerce .button) { min-height: 44px; }
body :is(.elementor-widget-button:not(.cm-client-nav .elementor-widget-button) .elementor-button, .elementor-form button.elementor-button, .woocommerce a.button, .woocommerce button.button, .woocommerce input.button, .cm-logout-state a.button, .cm-newsletter-provider button[type="submit"], :where(#ipt_fsqm_form_55) .ipt_fsqm_form_button_submit, .cm-chrome-header .e-n-menu-item:last-child .e-n-menu-title-container) {
  background: var(--cm-action) !important;
  color: #fff !important;
  border-color: transparent;
  font-family: Montserrat, sans-serif;
  font-weight: 700;
  text-decoration: none !important;
  box-shadow: none;
  transform: none;
}
body :is(.elementor-widget-button:not(.cm-client-nav .elementor-widget-button) .elementor-button, .elementor-form button.elementor-button, .woocommerce a.button, .woocommerce button.button, .woocommerce input.button, .cm-logout-state a.button, .cm-newsletter-provider button[type="submit"], :where(#ipt_fsqm_form_55) .ipt_fsqm_form_button_submit, .cm-chrome-header .e-n-menu-item:last-child .e-n-menu-title-container):is(:hover, :active) {
  background: var(--cm-action-hover) !important;
  color: #fff !important;
  text-decoration: none !important;
  transform: none;
}
body :is(.elementor-button, .woocommerce .button, .cm-logout-state a.button, .cm-newsletter-provider button[type="submit"]):focus-visible {
  outline: 3px solid #007d99;
  outline-offset: 4px;
}
body :is(.cm-quote-row, .cm-quote-inline, .cm-legacy-opening, .cm-chrome-header, .cm-chrome-footer) .elementor-button:focus-visible {
  outline-color: #7fd3e6;
}
body :is(button, input[type="submit"]):disabled { cursor: not-allowed; opacity: .6; }

/* Keep real accessible labels; compact presentation begins only after enhancement. */
body .cm-newsletter-provider form.cm-newsletter-fields-enhanced .cm-newsletter-field-label {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip-path: inset(50%);
  white-space: nowrap;
  border: 0;
}
body .cm-newsletter-provider .cm-newsletter-fields-enhanced input:focus::placeholder { opacity: 0; }

/* Copy first in the DOM; quote action at its right on desktop. */
body .elementor .elementor-section.cm-quote-row > .elementor-container {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  align-items: center;
  gap: 32px 48px;
}
body .cm-quote-row > .elementor-container > .elementor-column { width: 100% !important; min-width: 0; }
body .cm-quote-row .cm-quote-action .elementor-button-wrapper { text-align: right; }
body .elementor .cm-quote-row.cm-quote-single > .elementor-container { display: block; }
/* Flatten presentation-only column boxes, not widgets or reading order: the
 * action shares the heading's grid row rather than centering against all copy. */
body .elementor .cm-quote-row:not(.cm-quote-single) > .elementor-container > .elementor-column,
body .elementor .cm-quote-row:not(.cm-quote-single) > .elementor-container > .elementor-column > .elementor-widget-wrap { display: contents; }
body .elementor .cm-quote-single > .elementor-container > .elementor-column > .elementor-widget-wrap,
body .elementor .elementor-element.cm-quote-inline,
body .elementor .elementor-element.cm-article-cta {
  --display: grid;
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  align-items: center;
  gap: 20px 48px;
}
body .cm-quote-row > .elementor-container > .elementor-column > .elementor-widget-wrap > :not(.elementor-widget-button),
body :is(.cm-quote-inline, .cm-article-cta) > :not(.elementor-widget-button) { grid-column: 1; width: 100%; margin: 0; }
body .cm-quote-row > .elementor-container > .elementor-column > .elementor-widget-wrap > .elementor-widget-button,
body :is(.cm-quote-inline, .cm-article-cta) > .elementor-widget-button { grid-column: 2; grid-row: 1; width: auto; margin: 0; justify-self: end; }
body .cm-quote-row .elementor-button,
body :is(.cm-quote-inline, .cm-article-cta) .elementor-button { min-height: 56px; }

/* One footer signature, without a competing filled call action. */
body .cm-chrome-footer .cm-footer-invitation > .e-con-inner { justify-content: center; align-items: center; }
body .cm-chrome-footer .cm-footer-statement { width: 100%; max-width: none; margin: 0; text-align: center; }
body .cm-chrome-footer .cm-footer-statement .elementor-heading-title { font-size: clamp(28px, 3.8vw, 54px); line-height: 1.16; text-wrap: balance; }
body .cm-chrome-footer .cm-footer-accent { white-space: nowrap; }

/* Card count belongs to the row, not a hard-coded four-card width. */
body .cm-project-grid-2 { --cm-project-columns: 2; }
body .cm-project-grid-4 { --cm-project-columns: 4; }
body .elementor .cm-case-related.cm-project-grid > .elementor-container {
  display: grid;
  grid-template-columns: repeat(var(--cm-project-columns, 3), minmax(0, 1fr));
  align-items: start;
  gap: 32px;
}
body .cm-case-related.cm-project-grid .cm-case-project { width: 100% !important; min-width: 0; }
body .cm-case-related.cm-project-grid .cm-case-project > .elementor-widget-wrap { padding: 0; }
/* Match all three measured source ratios. A plain auto ratio lets WordPress
 * auto-sizes containment reserve a 1500px placeholder instead of the artwork. */
body .cm-case-related.cm-project-grid .cm-case-related-image img { display: block; width: 100%; height: auto; aspect-ratio: 905 / 565; object-fit: contain; }
body .cm-case-related.cm-project-grid .cm-case-related-image img[width="910"][height="655"] { aspect-ratio: 910 / 655; }
body .cm-case-related.cm-project-grid .cm-case-related-image img[width="750"][height="502"] { aspect-ratio: 750 / 502; }
/* All 34 inspected cards have an image/heading pair. Shared rows align titles
 * while full-width intrinsic images keep taller artwork uncropped and uninset. */
@supports (grid-template-rows: subgrid) {
  body .cm-case-related.cm-project-grid .cm-case-project { display: grid; grid-template-rows: subgrid; grid-row: span 2; align-self: stretch; }
  body .cm-case-related.cm-project-grid .cm-case-project > .elementor-widget-wrap { display: contents; }
  body .cm-case-related.cm-project-grid .cm-case-project > .elementor-widget-wrap > .elementor-widget { width: 100%; min-width: 0; margin-block: 0; }
}

/* Preserve the inset artwork composition; align title and caption to its edge. */
body .elementor .cm-case-chapter.cm-art-inset-group :is(.cm-case-chapter-title, .cm-case-image-caption) { width: 88%; max-width: none; margin-left: auto; }
body .cm-legacy .cm-note,
body .cm-legacy .cm-note :is(p, li, a) { font-weight: 500; }
body .cm-legacy .cm-note a { color: #00647b; text-decoration: underline; text-underline-offset: 4px; }
@media (max-width: 1024px) {
  body .elementor .cm-case-chapter.cm-art-inset-group :is(.cm-case-chapter-title, .cm-case-image-caption) { width: 100%; }
  body .elementor .cm-case-related.cm-project-grid > .elementor-container { gap: 24px; }
}
@media (max-width: 767px) {
  body .elementor .elementor-section.cm-quote-row > .elementor-container,
  body .elementor .cm-quote-single > .elementor-container > .elementor-column > .elementor-widget-wrap,
  body .elementor .elementor-element.cm-quote-inline,
  body .elementor .elementor-element.cm-article-cta { grid-template-columns: minmax(0, 1fr); gap: 24px; }
  body .cm-quote-row > .elementor-container > .elementor-column > .elementor-widget-wrap > .elementor-widget-button,
  body :is(.cm-quote-inline, .cm-article-cta) > .elementor-widget-button { grid-column: 1; grid-row: auto; width: 100%; justify-self: stretch; }
  body .cm-quote-row .cm-quote-action .elementor-button-wrapper { text-align: left; }
  body .cm-quote-row .elementor-button,
  body :is(.cm-quote-inline, .cm-article-cta) .elementor-button { width: 100%; }
  body .elementor .cm-case-related.cm-project-grid > .elementor-container { grid-template-columns: minmax(0, 1fr); gap: 36px; }
}
