/**
 * marnamic Card Contract 2.0
 *
 * This is the final, context-independent card layer. It deliberately loads
 * after archive, detail, blog and interaction CSS so the same component keeps
 * its anatomy wherever HivePress or WordPress renders it.
 *
 * Intentional media variants:
 * - actor cards: contained logo on a cream identity tile
 * - listing and editorial cards: cropped 16:10 image
 *
 * Everything else follows one 8px spacing grid and one action hierarchy.
 */

/* Peer panels in the desktop matching workspace share the card geometry.
 * Keep mobile edge-to-edge dialogs outside this rule. */
@media (min-width: 1100px) {
  body.wp-child-theme-marnamic.wp-child-theme-marnamic.wp-child-theme-marnamic
    :is(.hp-page.marnamic-archive-workspace, .hp-page.site-main) .hp-page__sidebar
    :is(.marnamic-archive-filter-shell.marnamic-archive-filter-dialog,
        .marnamic-archive-map-shell, .marnamic-map-hotfix--archive,
        .marnamic-map-hotfix--archive [id^="marnamic-hotfix-map-"]) {
    border-radius: var(--marnamic-card-radius, 8px) !important;
  }
}

body.wp-child-theme-marnamic {
  --marnamic-card-radius: var(--marnamic-ui-radius-md, 8px);
  --marnamic-card-media-radius: 6px;
  --marnamic-card-space: 16px;
  --marnamic-card-gap: 8px;
  --marnamic-card-control-height: 44px;
  --marnamic-card-surface: #1b2b2f;
  --marnamic-card-surface-hover: #203438;
  --marnamic-card-border: rgba(161, 192, 195, 0.32);
  --marnamic-card-border-hover: rgba(97, 165, 172, 0.72);
  --marnamic-card-divider: rgba(161, 192, 195, 0.18);
  --marnamic-card-shadow: 0 6px 18px rgba(0, 0, 0, 0.14);
  --marnamic-card-shadow-hover: 0 12px 28px rgba(0, 0, 0, 0.2);
}

/* -------------------------------------------------------------------------
   Shared shell
   ------------------------------------------------------------------------- */

body.wp-child-theme-marnamic.wp-child-theme-marnamic
  :is(
    .hp-vendor--view-block.marnamic-card,
    .hp-listing--view-block.marnamic-card,
    .post--archive
  ) {
  position: relative !important;
  display: flex !important;
  box-sizing: border-box !important;
  width: 100% !important;
  min-width: 0 !important;
  height: 100% !important;
  min-height: 0 !important;
  margin: 0 !important;
  padding: 0 !important;
  overflow: hidden !important;
  flex-direction: column !important;
  color: var(--marnamic-cream, #f1e9dd) !important;
  background: var(--marnamic-card-surface) !important;
  border: 1px solid var(--marnamic-card-border) !important;
  border-radius: var(--marnamic-card-radius) !important;
  box-shadow: var(--marnamic-card-shadow) !important;
  transform: translateY(0) !important;
  transition:
    background-color 160ms ease,
    border-color 160ms ease,
    box-shadow 160ms ease,
    transform 160ms ease !important;
}

body.wp-child-theme-marnamic.wp-child-theme-marnamic
  :is(
    .hp-vendor--view-block.marnamic-card,
    .hp-listing--view-block.marnamic-card,
    .post--archive
  ):hover {
  background: var(--marnamic-card-surface-hover) !important;
  border-color: var(--marnamic-card-border-hover) !important;
  box-shadow: var(--marnamic-card-shadow-hover) !important;
  transform: translateY(-2px) !important;
}

body.wp-child-theme-marnamic.wp-child-theme-marnamic
  :is(
    .hp-vendor--view-block.marnamic-card,
    .hp-listing--view-block.marnamic-card,
    .post--archive
  ):active {
  transform: translateY(0) !important;
}

/* Yellow is allowed as a temporary keyboard-focus signal on the dark card,
 * never as a persistent card hover or selected state. */
body.wp-child-theme-marnamic.wp-child-theme-marnamic
  :is(
    .hp-vendor--view-block.marnamic-card,
    .hp-listing--view-block.marnamic-card,
    .post--archive
  ):has(:focus-visible) {
  outline: 2px solid var(--marnamic-action-focus, #e7fd87) !important;
  outline-offset: 3px !important;
}

/* -------------------------------------------------------------------------
   Media contract
   ------------------------------------------------------------------------- */

body.wp-child-theme-marnamic.wp-child-theme-marnamic
  .marnamic-card--vendor
  .hp-vendor__header,
body.wp-child-theme-marnamic.wp-child-theme-marnamic.marnamic-vendor-discovery
  .hp-vendor--view-block.marnamic-card
  .hp-vendor__header,
body.wp-child-theme-marnamic.wp-child-theme-marnamic.marnamic-archive-search-results.marnamic-archive-search-results--vendor
  .hp-vendor--view-block.marnamic-card
  .hp-vendor__header,
body.wp-child-theme-marnamic.wp-child-theme-marnamic
  .marnamic-card--listing
  .hp-listing__header {
  width: 100% !important;
  margin: 0 !important;
  padding: var(--marnamic-card-space) var(--marnamic-card-space) 0 !important;
}

body.wp-child-theme-marnamic.wp-child-theme-marnamic
  .marnamic-card--vendor
  .hp-vendor__image,
body.wp-child-theme-marnamic.wp-child-theme-marnamic.marnamic-vendor-discovery
  .hp-vendor--view-block.marnamic-card
  .hp-vendor__image,
body.wp-child-theme-marnamic.wp-child-theme-marnamic.marnamic-archive-search-results.marnamic-archive-search-results--vendor
  .hp-vendor--view-block.marnamic-card
  .hp-vendor__image,
body.wp-child-theme-marnamic.wp-child-theme-marnamic
  .marnamic-card--listing
  .hp-listing__image {
  --marnamic-vendor-card-image-height: auto;
  --marnamic-vendor-card-image-min-height: 0;
  --marnamic-vendor-card-image-aspect-ratio: 16 / 9;
  display: block !important;
  width: 100% !important;
  min-width: 0 !important;
  height: auto !important;
  min-height: 0 !important;
  max-height: none !important;
  margin: 0 !important;
  padding: 0 !important;
  overflow: hidden !important;
  border: 0 !important;
  border-radius: var(--marnamic-card-media-radius) !important;
  box-shadow: none !important;
}

/* Actor identity tile. */
body.wp-child-theme-marnamic.wp-child-theme-marnamic
  .marnamic-card--vendor
  .hp-vendor__image
  > a,
body.wp-child-theme-marnamic.wp-child-theme-marnamic.marnamic-vendor-discovery
  .hp-vendor--view-block.marnamic-card
  .hp-vendor__image
  > a,
body.wp-child-theme-marnamic.wp-child-theme-marnamic.marnamic-archive-search-results.marnamic-archive-search-results--vendor
  .hp-vendor--view-block.marnamic-card
  .hp-vendor__image
  > a {
  display: flex !important;
  box-sizing: border-box !important;
  width: 100% !important;
  min-width: 0 !important;
  height: var(--marnamic-vendor-card-image-height, 128px) !important;
  min-height: var(--marnamic-vendor-card-image-min-height, 128px) !important;
  aspect-ratio: var(--marnamic-vendor-card-image-aspect-ratio, auto) !important;
  align-items: center !important;
  justify-content: center !important;
  margin: 0 !important;
  padding: var(--marnamic-vendor-card-image-padding, 16px) !important;
  overflow: hidden !important;
  background: var(--marnamic-vendor-card-image-background, var(--marnamic-logo-tile, #f1e9dd)) !important;
  border: 0 !important;
  border-radius: var(--marnamic-vendor-card-image-radius, var(--marnamic-card-media-radius)) !important;
  box-shadow: none !important;
}

body.wp-child-theme-marnamic.wp-child-theme-marnamic
  .marnamic-card--vendor
  .hp-vendor__image
  :is(img, .styleguide-logo-tile),
body.wp-child-theme-marnamic.wp-child-theme-marnamic.marnamic-vendor-discovery
  .hp-vendor--view-block.marnamic-card
  .hp-vendor__image
  :is(img, .styleguide-logo-tile),
body.wp-child-theme-marnamic.wp-child-theme-marnamic.marnamic-archive-search-results.marnamic-archive-search-results--vendor
  .hp-vendor--view-block.marnamic-card
  .hp-vendor__image
  :is(img, .styleguide-logo-tile) {
  display: block !important;
  width: var(--marnamic-vendor-card-media-width, auto) !important;
  max-width: var(--marnamic-vendor-card-media-max-width, 100%) !important;
  height: var(--marnamic-vendor-card-media-height, auto) !important;
  max-height: var(--marnamic-vendor-card-media-max-height, 96px) !important;
  object-fit: var(--marnamic-vendor-card-media-object-fit, contain) !important;
  object-position: 50% 50% !important;
}

/* Listing media uses the same inset frame, with content-cropping instead of
 * logo containment. */
body.wp-child-theme-marnamic.wp-child-theme-marnamic
  .marnamic-card--listing
  .hp-listing__image
  :is(a, img, video, .styleguide-card-image) {
  width: 100% !important;
  height: 100% !important;
  aspect-ratio: 16 / 10 !important;
  border-radius: var(--marnamic-card-media-radius) !important;
}

body.wp-child-theme-marnamic.wp-child-theme-marnamic
  .marnamic-card--listing
  .hp-listing__image
  :is(img, video) {
  display: block !important;
  object-fit: cover !important;
}

body.wp-child-theme-marnamic.wp-child-theme-marnamic
  .marnamic-card--listing
  .hp-listing__featured-badge {
  position: absolute !important;
  top: 26px !important;
  right: 26px !important;
  left: auto !important;
  padding: 5px 9px !important;
  color: var(--marnamic-action-selected-text, #132124) !important;
  background: var(--marnamic-action-selected, #61a5ac) !important;
  border: 1px solid var(--marnamic-action-selected, #61a5ac) !important;
  border-radius: 999px !important;
}

/* Circularity is part of the actor identity and always sits on the media tile. */
body.wp-child-theme-marnamic.wp-child-theme-marnamic
  .hp-vendor--view-block.marnamic-card.marnamic-card--vendor
  .marnamic-card__circularity-score,
body.wp-child-theme-marnamic.wp-child-theme-marnamic
  .marnamic-card--vendor-summary
  .marnamic-card__circularity-score {
  position: absolute !important;
  top: 26px !important;
  right: 26px !important;
  bottom: auto !important;
  left: auto !important;
  z-index: 4 !important;
  display: inline-flex !important;
  min-height: 32px !important;
  align-items: center !important;
  gap: 7px !important;
  margin: 0 !important;
  padding: 4px 5px 4px 11px !important;
  color: var(--marnamic-mint, #a1c0c3) !important;
  background: rgba(19, 33, 36, 0.94) !important;
  border: 1px solid rgba(97, 165, 172, 0.72) !important;
  border-radius: 999px !important;
  box-shadow: 0 7px 18px rgba(0, 0, 0, 0.24) !important;
  font-size: 13px !important;
  font-weight: 700 !important;
  line-height: 1 !important;
  pointer-events: none !important;
}

body.wp-child-theme-marnamic.wp-child-theme-marnamic
  .hp-vendor--view-block.marnamic-card.marnamic-card--vendor
  .marnamic-card__circularity-score
  strong,
body.wp-child-theme-marnamic.wp-child-theme-marnamic
  .marnamic-card--vendor-summary
  .marnamic-card__circularity-score
  strong {
  display: inline-flex !important;
  min-width: 26px !important;
  height: 22px !important;
  align-items: center !important;
  justify-content: center !important;
  padding: 0 6px !important;
  color: var(--marnamic-dark, #132124) !important;
  background: var(--marnamic-teal, #61a5ac) !important;
  border-radius: 999px !important;
}

/* -------------------------------------------------------------------------
   Content contract
   ------------------------------------------------------------------------- */

body.wp-child-theme-marnamic.wp-child-theme-marnamic
  .marnamic-card
  :is(.hp-vendor__content, .hp-listing__content),
body.wp-child-theme-marnamic.wp-child-theme-marnamic.marnamic-vendor-discovery
  .hp-vendor--view-block.marnamic-card
  .hp-vendor__content,
body.wp-child-theme-marnamic.wp-child-theme-marnamic.marnamic-archive-search-results.marnamic-archive-search-results--vendor
  .hp-vendor--view-block.marnamic-card
  .hp-vendor__content {
  display: flex !important;
  min-width: 0 !important;
  min-height: 0 !important;
  flex: 1 1 auto !important;
  flex-direction: column !important;
  gap: var(--marnamic-card-gap) !important;
  margin: 0 !important;
  padding: var(--marnamic-card-space) !important;
}

body.wp-child-theme-marnamic.wp-child-theme-marnamic
  .marnamic-card
  :is(.hp-vendor__name, .hp-listing__title),
body.wp-child-theme-marnamic.wp-child-theme-marnamic.marnamic-vendor-discovery
  .hp-vendor--view-block.marnamic-card
  .hp-vendor__name,
body.wp-child-theme-marnamic.wp-child-theme-marnamic.marnamic-archive-search-results.marnamic-archive-search-results--vendor
  .hp-vendor--view-block.marnamic-card
  .hp-vendor__name {
  display: -webkit-box !important;
  min-height: 48px !important;
  margin: 0 !important;
  overflow: hidden !important;
  color: var(--marnamic-cream, #f1e9dd) !important;
  font-size: 20px !important;
  font-weight: 400 !important;
  line-height: 24px !important;
  letter-spacing: -0.02em !important;
  -webkit-box-orient: vertical !important;
  -webkit-line-clamp: 2 !important;
}

body.wp-child-theme-marnamic.wp-child-theme-marnamic
  .marnamic-card
  :is(.hp-vendor__name, .hp-listing__title)
  a {
  color: inherit !important;
  text-decoration: none !important;
}

body.wp-child-theme-marnamic.wp-child-theme-marnamic .marnamic-card__meta {
  display: flex !important;
  min-width: 0 !important;
  flex-direction: column !important;
  gap: var(--marnamic-card-gap) !important;
}

body.wp-child-theme-marnamic.wp-child-theme-marnamic .marnamic-card__description {
  display: -webkit-box !important;
  min-height: 0 !important;
  margin: 0 !important;
  overflow: hidden !important;
  color: var(--marnamic-text-muted, rgba(241, 233, 221, 0.72)) !important;
  font-size: 15px !important;
  line-height: 22px !important;
  -webkit-box-orient: vertical !important;
  -webkit-line-clamp: 3 !important;
}

body.wp-child-theme-marnamic.wp-child-theme-marnamic .marnamic-card__identity {
  display: flex !important;
  min-height: 20px !important;
  min-width: 0 !important;
  flex-wrap: wrap !important;
  align-items: baseline !important;
  gap: 6px 8px !important;
}

/* Actor cards expose their identity in reading order: name, region,
 * primary competency, then specialty tags. Keeping this on the shared card
 * template makes archive, search and related profile previews consistent. */
body.wp-child-theme-marnamic.wp-child-theme-marnamic
  .marnamic-card--vendor
  .hp-vendor__name {
  height: 24px !important;
  min-height: 24px !important;
  max-height: 24px !important;
  white-space: nowrap !important;
  text-overflow: ellipsis !important;
  -webkit-line-clamp: 1 !important;
}

body.wp-child-theme-marnamic.wp-child-theme-marnamic
  .marnamic-card--vendor
  .marnamic-card__identity {
  min-height: 40px !important;
  flex-direction: column !important;
  align-items: flex-start !important;
  gap: 2px !important;
}

body.wp-child-theme-marnamic.wp-child-theme-marnamic
  .marnamic-card--vendor
  .marnamic-card__region {
  width: 100% !important;
  min-height: 20px !important;
}

body.wp-child-theme-marnamic.wp-child-theme-marnamic
  .marnamic-card--vendor
  .marnamic-card__region--empty {
  visibility: hidden !important;
}

body.wp-child-theme-marnamic.wp-child-theme-marnamic
  .marnamic-card--vendor
  .hp-vendor__content
  > .marnamic-status-badges {
  display: flex !important;
  min-height: 28px !important;
  align-items: center !important;
  margin: 0 !important;
}

body.wp-child-theme-marnamic.wp-child-theme-marnamic
  .marnamic-card--vendor
  .marnamic-card__meta--vendor {
  gap: var(--marnamic-card-gap) !important;
}

body.wp-child-theme-marnamic.wp-child-theme-marnamic
  .marnamic-card--listing
  .hp-listing__details--primary {
  margin: 0 !important;
}

body.wp-child-theme-marnamic.wp-child-theme-marnamic
  .marnamic-card--listing
  .hp-listing__created-date {
  display: none !important;
}

body.wp-child-theme-marnamic.wp-child-theme-marnamic
  .marnamic-card--listing
  .hp-listing__category
  a,
body.wp-child-theme-marnamic.wp-child-theme-marnamic .marnamic-card__role {
  padding: 0 !important;
  color: var(--marnamic-lime, #e7fd87) !important;
  background: transparent !important;
  border: 0 !important;
  border-radius: 0 !important;
  font-size: 13px !important;
  font-weight: 800 !important;
  letter-spacing: 0.04em !important;
  line-height: 18px !important;
  text-transform: uppercase !important;
}

body.wp-child-theme-marnamic.wp-child-theme-marnamic
  :is(.marnamic-card__region, .marnamic-card__location) {
  display: inline-flex !important;
  min-width: 0 !important;
  align-items: center !important;
  gap: 6px !important;
  color: var(--marnamic-mint, #a1c0c3) !important;
  font-size: 14px !important;
  font-weight: 650 !important;
  line-height: 20px !important;
}

body.wp-child-theme-marnamic.wp-child-theme-marnamic .marnamic-card__tags {
  display: flex !important;
  height: 62px !important;
  min-height: 62px !important;
  min-width: 0 !important;
  max-height: 62px !important;
  flex-wrap: wrap !important;
  align-content: flex-start !important;
  gap: 6px !important;
  overflow: hidden !important;
}

body.wp-child-theme-marnamic.wp-child-theme-marnamic .marnamic-card__tag {
  display: inline-flex !important;
  max-width: 100% !important;
  height: 28px !important;
  min-height: 28px !important;
  align-items: center !important;
  padding: 5px 9px !important;
  overflow: hidden !important;
  color: var(--marnamic-mint, #a1c0c3) !important;
  background: rgba(161, 192, 195, 0.08) !important;
  border: 1px solid rgba(161, 192, 195, 0.24) !important;
  border-radius: 999px !important;
  font-size: 13px !important;
  font-weight: 650 !important;
  line-height: 16px !important;
  text-overflow: ellipsis !important;
  white-space: nowrap !important;
}

/* -------------------------------------------------------------------------
   Action contract
   ------------------------------------------------------------------------- */

body.wp-child-theme-marnamic.wp-child-theme-marnamic
  .marnamic-card
  :is(.hp-vendor__footer, .hp-listing__footer),
body.wp-child-theme-marnamic.wp-child-theme-marnamic.marnamic-vendor-discovery
  .hp-vendor--view-block.marnamic-card
  .hp-vendor__footer,
body.wp-child-theme-marnamic.wp-child-theme-marnamic.marnamic-archive-search-results.marnamic-archive-search-results--vendor
  .hp-vendor--view-block.marnamic-card
  .hp-vendor__footer {
  display: grid !important;
  width: 100% !important;
  min-width: 0 !important;
  max-width: 100% !important;
  min-height: calc(var(--marnamic-card-control-height) + var(--marnamic-card-space)) !important;
  grid-template-columns: minmax(0, 1fr) auto !important;
  gap: var(--marnamic-card-gap) !important;
  align-self: stretch !important;
  align-items: center !important;
  justify-self: stretch !important;
  margin-top: auto !important;
  padding: 0 var(--marnamic-card-space) var(--marnamic-card-space) !important;
  background: transparent !important;
  border: 0 !important;
}

body.wp-child-theme-marnamic.wp-child-theme-marnamic .marnamic-card__cta {
  display: inline-flex !important;
  width: 100% !important;
  min-width: 0 !important;
  height: var(--marnamic-card-control-height) !important;
  min-height: var(--marnamic-card-control-height) !important;
  max-height: var(--marnamic-card-control-height) !important;
  align-items: center !important;
  justify-content: center !important;
  gap: 8px !important;
  padding: 0 16px !important;
  color: var(--marnamic-action-secondary-text, #f1e9dd) !important;
  background: var(--marnamic-action-secondary, rgba(15, 25, 27, 0.78)) !important;
  border: 1px solid var(--marnamic-action-secondary-border, rgba(161, 192, 195, 0.34)) !important;
  border-radius: var(--marnamic-ui-radius-md, 8px) !important;
  box-shadow: none !important;
  font-size: 16px !important;
  font-weight: 700 !important;
  line-height: var(--marnamic-action-text-line-height, 1.25) !important;
  text-align: center !important;
  text-decoration: none !important;
  transition:
    background-color 160ms ease,
    border-color 160ms ease,
    box-shadow 160ms ease,
    transform 160ms ease !important;
}

body.wp-child-theme-marnamic.wp-child-theme-marnamic
  .marnamic-card__cta:not(.marnamic-card__matching-cta):is(:hover, :focus-visible) {
  color: var(--marnamic-action-secondary-text, #f1e9dd) !important;
  background: var(--marnamic-action-secondary-hover, #203337) !important;
  border-color: var(--marnamic-action-secondary-border-hover, #61a5ac) !important;
  box-shadow: 0 6px 16px rgba(0, 0, 0, 0.16) !important;
  transform: translateY(-1px) !important;
}

body.wp-child-theme-marnamic.wp-child-theme-marnamic
  .marnamic-card__cta:active {
  box-shadow: none !important;
  transform: translateY(0) !important;
}

body.wp-child-theme-marnamic.wp-child-theme-marnamic
  .marnamic-card
  :is(.hp-vendor__actions, .hp-listing__actions) {
  display: flex !important;
  min-width: 0 !important;
  gap: var(--marnamic-card-gap) !important;
  align-items: center !important;
  justify-content: flex-end !important;
  margin: 0 !important;
}

body.wp-child-theme-marnamic.wp-child-theme-marnamic
  .marnamic-card
  :is(.hp-vendor__actions, .hp-listing__actions):empty {
  display: none !important;
}

body.wp-child-theme-marnamic.wp-child-theme-marnamic
  .marnamic-card
  :is(
    .hp-vendor__action,
    .hp-listing__action,
    .hp-vendor__actions .hp-link,
    .hp-listing__actions .hp-link
  ) {
  display: inline-flex !important;
  width: var(--marnamic-card-control-height) !important;
  min-width: var(--marnamic-card-control-height) !important;
  max-width: var(--marnamic-card-control-height) !important;
  height: var(--marnamic-card-control-height) !important;
  min-height: var(--marnamic-card-control-height) !important;
  max-height: var(--marnamic-card-control-height) !important;
  align-items: center !important;
  justify-content: center !important;
  margin: 0 !important;
  padding: 0 !important;
  color: var(--marnamic-mint, #a1c0c3) !important;
  background: var(--marnamic-action-secondary, rgba(15, 25, 27, 0.78)) !important;
  border: 1px solid var(--marnamic-action-secondary-border, rgba(161, 192, 195, 0.34)) !important;
  border-radius: var(--marnamic-ui-radius-md, 8px) !important;
  box-shadow: none !important;
  text-decoration: none !important;
}

body.wp-child-theme-marnamic.wp-child-theme-marnamic
  .marnamic-card
  :is(
    .hp-vendor__action,
    .hp-listing__action,
    .hp-vendor__actions .hp-link,
    .hp-listing__actions .hp-link
  ):is(:hover, :focus-visible, :active, [aria-pressed="true"], .is-active) {
  color: var(--marnamic-action-selected-text, #132124) !important;
  background: var(--marnamic-action-selected, #61a5ac) !important;
  border-color: var(--marnamic-action-selected, #61a5ac) !important;
}

/* Matching is the only card conversion and the only persistent yellow action. */
body.wp-child-theme-marnamic.wp-child-theme-marnamic
  .marnamic-card__matching-cta {
  display: none !important;
  color: var(--marnamic-action-accent-text, #132124) !important;
  background: var(--marnamic-action-accent, #e7fd87) !important;
  border-color: var(--marnamic-action-accent, #e7fd87) !important;
}

body.wp-child-theme-marnamic.wp-child-theme-marnamic
  .marnamic-card__matching-cta:is(:hover, :focus-visible, :active) {
  color: var(--marnamic-action-accent-text, #132124) !important;
  background: var(--marnamic-action-accent-hover, #dffc5f) !important;
  border-color: var(--marnamic-action-accent-hover, #dffc5f) !important;
}

/* Every actor-card context uses the same primary action row: profile fills
 * the available width, message stays square. Filtered discovery adds Matching
 * as a second full-width row. The self-match guard may omit that conversion. */
body.wp-child-theme-marnamic.wp-child-theme-marnamic
  .hp-vendor--view-block.marnamic-card.marnamic-card--vendor
  .hp-vendor__footer {
  grid-template-areas: "profile message" !important;
  grid-template-columns: minmax(0, 1fr) var(--marnamic-card-control-height) !important;
}

body.wp-child-theme-marnamic.wp-child-theme-marnamic
  .marnamic-card--vendor
  .marnamic-card__cta--profile {
  grid-area: profile !important;
}

body.wp-child-theme-marnamic.wp-child-theme-marnamic
  .marnamic-card--vendor
  .hp-vendor__actions {
  grid-area: message !important;
}

/* Sidebar and HivePress compatibility rules historically shrink icon actions
 * to 40px. The card contract keeps both cells on the shared 44px control
 * rhythm, independent of where the actor card is embedded. */
body.wp-child-theme-marnamic.wp-child-theme-marnamic
  .marnamic-card--vendor
  .hp-vendor__footer
  .hp-vendor__actions,
body.wp-child-theme-marnamic.wp-child-theme-marnamic
  .marnamic-card--vendor
  .hp-vendor__footer
  .hp-vendor__actions
  > :is(.hp-vendor__action, .hp-link) {
  width: var(--marnamic-card-control-height) !important;
  min-width: var(--marnamic-card-control-height) !important;
  max-width: var(--marnamic-card-control-height) !important;
  height: var(--marnamic-card-control-height) !important;
  min-height: var(--marnamic-card-control-height) !important;
  max-height: var(--marnamic-card-control-height) !important;
}

body.wp-child-theme-marnamic.wp-child-theme-marnamic.hp-template--vendors-view-page.marnamic-archive-search-results.marnamic-archive-search-results--vendor
  .hp-vendor--view-block.marnamic-card.marnamic-card--vendor
  .hp-vendor__footer:has(.marnamic-card__matching-cta),
body.wp-child-theme-marnamic.wp-child-theme-marnamic.marnamic-styleguide
  .styleguide-card--result.hp-vendor--view-block.marnamic-card
  .hp-vendor__footer:has(.marnamic-card__matching-cta) {
  grid-template-areas:
    "profile message"
    "matching matching" !important;
}

body.wp-child-theme-marnamic.wp-child-theme-marnamic.hp-template--vendors-view-page.marnamic-archive-search-results.marnamic-archive-search-results--vendor
  .marnamic-card--vendor
  .marnamic-card__matching-cta,
body.wp-child-theme-marnamic.wp-child-theme-marnamic.marnamic-styleguide
  .styleguide-card--result
  .marnamic-card__matching-cta {
  display: inline-flex !important;
  grid-area: matching !important;
}

body.wp-child-theme-marnamic.wp-child-theme-marnamic
  .marnamic-card--vendor
  .hp-vendor__footer:not(:has(.hp-vendor__actions:not(:empty)))
  .marnamic-card__cta--profile {
  grid-column: 1 / -1 !important;
}

/* -------------------------------------------------------------------------
   Public actor-profile summary and action panel
   ------------------------------------------------------------------------- */

body.wp-child-theme-marnamic.wp-child-theme-marnamic
  .hp-vendor__summary.marnamic-card--vendor-summary {
  --marnamic-profile-summary-columns: minmax(0, 1fr);
  --marnamic-profile-summary-areas:
    "image"
    "status"
    "name"
    "description"
    "actions"
    "tags"
    "contact"
    "phases";
  --marnamic-profile-summary-rows: auto;
  --marnamic-profile-summary-gap: var(--marnamic-card-gap);
  --marnamic-profile-summary-padding: var(--marnamic-card-space);
  --marnamic-profile-image-height: clamp(184px, 46vw, 232px);
  --marnamic-profile-image-min-height: clamp(184px, 46vw, 232px);
  --marnamic-profile-image-padding: 16px;
  --marnamic-profile-image-max-width: 90%;
  --marnamic-profile-image-max-height: clamp(148px, 38vw, 196px);
  --marnamic-profile-name-size: 20px;
  --marnamic-profile-name-line-height: 28px;
  --marnamic-profile-description-size: 15px;
  --marnamic-profile-description-line-height: 1.6;
  position: relative !important;
  display: grid !important;
  min-width: 0 !important;
  grid-template-columns: var(--marnamic-profile-summary-columns);
  grid-template-areas: var(--marnamic-profile-summary-areas);
  grid-template-rows: var(--marnamic-profile-summary-rows);
  gap: var(--marnamic-profile-summary-gap) !important;
  margin: 0 !important;
  padding: var(--marnamic-profile-summary-padding) !important;
  overflow: hidden !important;
  color: var(--marnamic-cream, #f1e9dd) !important;
  background: var(--marnamic-card-surface) !important;
  border: 1px solid var(--marnamic-card-border) !important;
  border-radius: var(--marnamic-card-radius) !important;
  box-shadow: var(--marnamic-card-shadow) !important;
}

body.wp-child-theme-marnamic.wp-child-theme-marnamic
  .hp-vendor__summary.marnamic-card--vendor-summary
  .hp-vendor__image {
  grid-area: image;
  display: flex !important;
  width: 100% !important;
  height: var(--marnamic-profile-image-height) !important;
  min-height: var(--marnamic-profile-image-min-height) !important;
  align-items: center !important;
  justify-content: center !important;
  margin: 0 !important;
  padding: var(--marnamic-profile-image-padding) !important;
  overflow: hidden !important;
  background: var(--marnamic-logo-tile, #f1e9dd) !important;
  border: 0 !important;
  border-radius: var(--marnamic-card-media-radius) !important;
  box-shadow: none !important;
}

body.wp-child-theme-marnamic.wp-child-theme-marnamic
  .hp-vendor__summary.marnamic-card--vendor-summary
  .hp-vendor__image
  :is(a, img) {
  margin: 0 !important;
  padding: 0 !important;
  background: transparent !important;
  border: 0 !important;
  border-radius: inherit !important;
  box-shadow: none !important;
}

body.wp-child-theme-marnamic.wp-child-theme-marnamic
  .hp-vendor__summary.marnamic-card--vendor-summary
  .hp-vendor__image
  > a {
  display: flex;
  width: 100% !important;
  height: 100% !important;
  align-items: center;
  justify-content: center;
}

body.wp-child-theme-marnamic.wp-child-theme-marnamic
  .hp-vendor__summary.marnamic-card--vendor-summary
  .hp-vendor__image
  img {
  width: auto !important;
  max-width: var(--marnamic-profile-image-max-width) !important;
  height: auto !important;
  max-height: var(--marnamic-profile-image-max-height) !important;
  object-fit: contain !important;
}

/* Real company images are frameless in cards and profile summaries. The
 * explicit placeholder state keeps the cream identity tile and inset icon. */
body.wp-child-theme-marnamic.wp-child-theme-marnamic
  .hp-vendor--view-block.marnamic-card--vendor
  .hp-vendor__image.marnamic-vendor-image--uploaded {
  --marnamic-card-media-radius: var(--marnamic-ui-radius-sm, 6px);
  --marnamic-vendor-card-image-height: auto;
  --marnamic-vendor-card-image-min-height: 0;
  --marnamic-vendor-card-image-aspect-ratio: 16 / 9;
  --marnamic-vendor-card-image-padding: 0;
  --marnamic-vendor-card-image-background: transparent;
  --marnamic-vendor-card-image-radius: var(--marnamic-ui-radius-sm, 6px);
  --marnamic-vendor-card-media-width: 100%;
  --marnamic-vendor-card-media-max-width: none;
  --marnamic-vendor-card-media-height: 100%;
  --marnamic-vendor-card-media-max-height: none;
  --marnamic-vendor-card-media-object-fit: cover;
}

body.wp-child-theme-marnamic.wp-child-theme-marnamic
  .hp-vendor--view-page
  .hp-vendor__image.marnamic-vendor-image--uploaded {
  --marnamic-profile-image-padding: 0;
  --marnamic-profile-image-max-width: 100%;
  --marnamic-profile-image-max-height: 100%;
  --marnamic-logo-tile: transparent;
  --marnamic-card-media-radius: var(--marnamic-ui-radius-sm, 6px);
}

body.wp-child-theme-marnamic.wp-child-theme-marnamic
  .hp-vendor__summary.marnamic-card--vendor-summary
  .hp-vendor__name {
  grid-area: name;
  min-height: 28px;
  margin: 0 !important;
  color: var(--marnamic-cream, #f1e9dd) !important;
  font-size: var(--marnamic-profile-name-size) !important;
  font-weight: 400 !important;
  line-height: var(--marnamic-profile-name-line-height) !important;
  letter-spacing: -0.02em !important;
}

body.wp-child-theme-marnamic.wp-child-theme-marnamic
  .hp-vendor__summary.marnamic-card--vendor-summary
  > .marnamic-status-badges {
  min-height: 28px !important;
  margin: 0 !important;
}

body.wp-child-theme-marnamic.wp-child-theme-marnamic
  .hp-vendor__summary.marnamic-card--vendor-summary
  :is(.hp-vendor__details, .hp-vendor__description, .marnamic-vendor-contact) {
  width: 100% !important;
  min-width: 0 !important;
  margin: 0 !important;
  padding-top: var(--marnamic-profile-section-padding, 14px) !important;
  border-top: var(--marnamic-profile-section-border, 1px solid var(--marnamic-card-divider)) !important;
}

body.wp-child-theme-marnamic.wp-child-theme-marnamic
  .hp-vendor__summary.marnamic-card--vendor-summary
  .hp-vendor__description {
  grid-area: description;
  color: var(--marnamic-text-muted, rgba(241, 233, 221, 0.72)) !important;
  font-size: var(--marnamic-profile-description-size) !important;
  line-height: var(--marnamic-profile-description-line-height) !important;
}

body.wp-child-theme-marnamic.wp-child-theme-marnamic
  .hp-vendor__summary.marnamic-card--vendor-summary
  .marnamic-vendor-profile-tags {
  grid-area: tags;
}

body.wp-child-theme-marnamic.wp-child-theme-marnamic
  .hp-vendor__summary.marnamic-card--vendor-summary
  .marnamic-vendor-contact {
  --marnamic-vendor-contact-padding: 24px 0 0;
  --marnamic-vendor-contact-background: transparent;
  --marnamic-vendor-contact-border: 0;
  --marnamic-vendor-contact-radius: 0;
  --marnamic-profile-section-padding: 24px;
  grid-area: contact;
}

body.wp-child-theme-marnamic.wp-child-theme-marnamic
  .hp-vendor__summary.marnamic-card--vendor-summary
  .marnamic-vendor-profile-phases {
  grid-area: phases;
}

body.wp-child-theme-marnamic.wp-child-theme-marnamic
  .hp-vendor__actions--primary.marnamic-card__detail-actions {
  display: grid !important;
  width: 100% !important;
  min-width: 0 !important;
  grid-template-columns: minmax(0, 1fr) !important;
  gap: var(--marnamic-card-gap) !important;
  align-items: stretch !important;
  margin: 0 !important;
  padding: var(--marnamic-card-space) !important;
  background: var(--marnamic-card-surface) !important;
  border: 1px solid var(--marnamic-card-border) !important;
  border-radius: var(--marnamic-card-radius) !important;
  box-shadow: var(--marnamic-card-shadow) !important;
}

body.wp-child-theme-marnamic.wp-child-theme-marnamic
  .hp-vendor__actions--primary.marnamic-card__detail-actions
  > .hp-vendor__action {
  display: inline-flex !important;
  width: 100% !important;
  min-width: 0 !important;
  max-width: none !important;
  height: var(--marnamic-card-control-height) !important;
  min-height: var(--marnamic-card-control-height) !important;
  max-height: var(--marnamic-card-control-height) !important;
  align-items: center !important;
  justify-content: center !important;
  gap: 8px !important;
  margin: 0 !important;
  padding: 0 16px !important;
  border-radius: var(--marnamic-ui-radius-md, 8px) !important;
  font-size: 16px !important;
  font-weight: 700 !important;
  line-height: var(--marnamic-action-text-line-height, 1.25) !important;
  text-align: center !important;
  text-decoration: none !important;
}

body.wp-child-theme-marnamic.wp-child-theme-marnamic
  .hp-vendor__actions--primary.marnamic-card__detail-actions
  > .hp-vendor__action--message {
  color: var(--marnamic-action-secondary-text, #f1e9dd) !important;
  background: var(--marnamic-action-secondary, rgba(15, 25, 27, 0.78)) !important;
  border: 1px solid var(--marnamic-action-secondary-border, rgba(161, 192, 195, 0.34)) !important;
}

body.wp-child-theme-marnamic.wp-child-theme-marnamic
  .hp-vendor__actions--primary.marnamic-card__detail-actions
  > .hp-vendor__action--message:is(:hover, :focus-visible) {
  color: var(--marnamic-action-secondary-text, #f1e9dd) !important;
  background: var(--marnamic-action-secondary-hover, #203337) !important;
  border-color: var(--marnamic-action-secondary-border-hover, #61a5ac) !important;
}

/* -------------------------------------------------------------------------
   Editorial card variant
   ------------------------------------------------------------------------- */

body.wp-child-theme-marnamic.wp-child-theme-marnamic .post--archive .post__header,
body.wp-child-theme-marnamic.wp-child-theme-marnamic
  .post--archive
  .post__header--cover {
  display: flex !important;
  width: 100% !important;
  margin: 0 !important;
  flex-direction: column !important;
}

body.wp-child-theme-marnamic.wp-child-theme-marnamic .post--archive .post__image {
  order: 0 !important;
  position: relative !important;
  width: auto !important;
  height: auto !important;
  aspect-ratio: 16 / 10 !important;
  margin: var(--marnamic-card-space) var(--marnamic-card-space) 0 !important;
  overflow: hidden !important;
  background: var(--marnamic-panel-soft, #203337) !important;
  border-radius: var(--marnamic-card-media-radius) !important;
}

body.wp-child-theme-marnamic.wp-child-theme-marnamic
  .post--archive
  .post__image
  :is(a, img, .styleguide-card-image) {
  display: block !important;
  width: 100% !important;
  height: 100% !important;
  aspect-ratio: 16 / 10 !important;
  border-radius: var(--marnamic-card-media-radius) !important;
}

body.wp-child-theme-marnamic.wp-child-theme-marnamic
  .post--archive
  .post__image
  img {
  object-fit: cover !important;
}

body.wp-child-theme-marnamic.wp-child-theme-marnamic
  .post--archive
  .post__image
  a::after {
  border-radius: var(--marnamic-card-media-radius) !important;
}

body.wp-child-theme-marnamic.wp-child-theme-marnamic
  .post--archive
  .post__categories {
  order: 1 !important;
  display: flex !important;
  flex-wrap: wrap !important;
  gap: 6px !important;
  margin: 0 !important;
  padding: var(--marnamic-card-space) var(--marnamic-card-space) 0 !important;
}

body.wp-child-theme-marnamic.wp-child-theme-marnamic
  .post--archive
  .post__categories
  a {
  min-height: 28px !important;
  padding: 5px 9px !important;
  color: var(--marnamic-text-muted, rgba(241, 233, 221, 0.72)) !important;
  background: rgba(161, 192, 195, 0.08) !important;
  border: 1px solid rgba(161, 192, 195, 0.24) !important;
  border-radius: 999px !important;
  font-size: 11px !important;
  line-height: 16px !important;
}

body.wp-child-theme-marnamic.wp-child-theme-marnamic
  .post--archive
  .post__categories
  a:is(:hover, :focus-visible) {
  color: var(--marnamic-action-selected-text, #132124) !important;
  background: var(--marnamic-action-selected, #61a5ac) !important;
  border-color: var(--marnamic-action-selected, #61a5ac) !important;
}

body.wp-child-theme-marnamic.wp-child-theme-marnamic .post--archive .post__title {
  order: 2 !important;
  display: -webkit-box !important;
  min-height: 48px !important;
  margin: 0 !important;
  padding: 12px var(--marnamic-card-space) 0 !important;
  overflow: hidden !important;
  font-size: 20px !important;
  font-weight: 400 !important;
  line-height: 24px !important;
  letter-spacing: -0.02em !important;
  text-wrap: pretty !important;
  -webkit-box-orient: vertical !important;
  -webkit-line-clamp: 2 !important;
}

body.wp-child-theme-marnamic.wp-child-theme-marnamic
  .post--archive
  .post__title
  a {
  color: var(--marnamic-cream, #f1e9dd) !important;
}

body.wp-child-theme-marnamic.wp-child-theme-marnamic
  .post--archive
  .post__title
  a:hover {
  color: var(--marnamic-mint, #a1c0c3) !important;
}

body.wp-child-theme-marnamic.wp-child-theme-marnamic
  .post--archive
  .post__content {
  display: flex !important;
  min-height: 0 !important;
  flex: 1 1 auto !important;
  flex-direction: column !important;
  padding: var(--marnamic-card-space) !important;
}

body.wp-child-theme-marnamic.wp-child-theme-marnamic
  .post--archive
  .post__text {
  margin: 0 0 var(--marnamic-card-space) !important;
}

body.wp-child-theme-marnamic.wp-child-theme-marnamic
  .post--archive
  .post__text
  p {
  font-size: 15px !important;
  line-height: 22px !important;
  -webkit-line-clamp: 3 !important;
}

body.wp-child-theme-marnamic.wp-child-theme-marnamic
  .post--archive
  .post__details {
  display: grid !important;
  grid-template-areas:
    "date date"
    "comments readmore" !important;
  grid-template-columns: auto 1fr !important;
  gap: var(--marnamic-card-gap) !important;
  align-items: center !important;
  margin-top: auto !important;
  padding-top: var(--marnamic-card-space) !important;
  border-top: 1px solid var(--marnamic-card-divider) !important;
}

body.wp-child-theme-marnamic.wp-child-theme-marnamic
  .post--archive
  :is(.post__comments, .post__readmore) {
  display: inline-flex !important;
  width: auto !important;
  min-width: 0 !important;
  height: var(--marnamic-card-control-height) !important;
  min-height: var(--marnamic-card-control-height) !important;
  max-height: var(--marnamic-card-control-height) !important;
  align-items: center !important;
  justify-content: center !important;
  margin: 0 !important;
  padding: 0 14px !important;
  border-radius: var(--marnamic-ui-radius-md, 8px) !important;
  font-size: 13px !important;
  font-weight: 700 !important;
  line-height: var(--marnamic-action-text-line-height, 1.25) !important;
  letter-spacing: 0 !important;
  text-transform: none !important;
}

body.wp-child-theme-marnamic.wp-child-theme-marnamic
  .post--archive
  .post__comments {
  grid-area: comments !important;
  justify-self: start !important;
  color: var(--marnamic-action-secondary-text, #f1e9dd) !important;
  background: var(--marnamic-action-secondary, rgba(15, 25, 27, 0.78)) !important;
  border: 1px solid var(--marnamic-action-secondary-border, rgba(161, 192, 195, 0.34)) !important;
}

body.wp-child-theme-marnamic.wp-child-theme-marnamic
  .post--archive
  .post__comments:is(:hover, :focus-visible) {
  background: var(--marnamic-action-secondary-hover, #203337) !important;
  border-color: var(--marnamic-action-secondary-border-hover, #61a5ac) !important;
}

/* Weiterlesen is the single primary task of an editorial card: teal, never
 * the yellow conversion accent. */
body.wp-child-theme-marnamic.wp-child-theme-marnamic
  .post--archive
  .post__readmore {
  grid-area: readmore !important;
  justify-self: end !important;
  color: var(--marnamic-action-primary-text, #132124) !important;
  background: var(--marnamic-action-primary, #61a5ac) !important;
  border: 1px solid var(--marnamic-action-primary, #61a5ac) !important;
}

body.wp-child-theme-marnamic.wp-child-theme-marnamic
  .post--archive
  .post__readmore:is(:hover, :focus-visible) {
  color: var(--marnamic-action-primary-text, #132124) !important;
  background: var(--marnamic-action-primary-hover, #78b8be) !important;
  border-color: var(--marnamic-action-primary-hover, #78b8be) !important;
}

body.wp-child-theme-marnamic.wp-child-theme-marnamic
  .post--archive
  .post__author {
  display: none !important;
}

/* -------------------------------------------------------------------------
   Legacy detail-summary fallback

   Current profile summaries carry .marnamic-card--vendor-summary and use the
   same compact media rhythm as every other actor card. Keep this fallback
   only for markup that reaches the page before the class filter can run.
   ------------------------------------------------------------------------- */

body.wp-child-theme-marnamic.wp-child-theme-marnamic
  .hp-vendor--view-page
  .hp-vendor__summary:not(.marnamic-card--vendor-summary) {
  position: relative !important;
  padding: var(--marnamic-card-space) !important;
  background: var(--marnamic-card-surface) !important;
  border: 1px solid var(--marnamic-card-border) !important;
  border-radius: var(--marnamic-card-radius) !important;
  box-shadow: var(--marnamic-card-shadow) !important;
}

body.wp-child-theme-marnamic.wp-child-theme-marnamic
  .hp-vendor--view-page
  .hp-vendor__summary:not(.marnamic-card--vendor-summary)
  .hp-vendor__image {
  width: 100% !important;
  min-height: clamp(176px, 18vw, 220px) !important;
  margin: 0 !important;
  padding: clamp(14px, 2vw, 22px) !important;
  background: var(--marnamic-logo-tile, #f1e9dd) !important;
  border: 0 !important;
  border-radius: var(--marnamic-card-media-radius) !important;
}

/* Active and legacy HivePress summary markup share one desktop identity hero.
 * The active card changes its responsive variables; the fallback retains
 * explicit declarations because older markup has no component contract. */
@media (min-width: 900px) {
  body.wp-child-theme-marnamic.wp-child-theme-marnamic.hp-template--vendor-view-page
    .hp-vendor--view-page
    .hp-vendor__summary.marnamic-card--vendor-summary {
    --marnamic-profile-summary-columns: minmax(280px, 340px) minmax(0, 1fr);
    --marnamic-profile-summary-areas:
      "image status"
      "image name"
      "image description"
      "image actions"
      "tags tags"
      "contact contact"
      "phases phases";
    --marnamic-profile-summary-rows: auto auto minmax(0, 1fr) auto auto auto auto;
    --marnamic-profile-summary-gap: 18px clamp(24px, 3vw, 40px);
    --marnamic-profile-summary-padding: clamp(24px, 3vw, 36px);
    --marnamic-profile-image-height: 100%;
    --marnamic-profile-image-min-height: 300px;
    --marnamic-profile-image-padding: clamp(20px, 2.4vw, 30px);
    --marnamic-profile-image-max-width: 100%;
    --marnamic-profile-image-max-height: 280px;
    --marnamic-profile-name-size: 2rem;
    --marnamic-profile-name-line-height: 1.12;
    --marnamic-profile-description-size: 1rem;
    --marnamic-profile-description-line-height: 1.65;
    align-items: start;
  }

  body.wp-child-theme-marnamic.wp-child-theme-marnamic.hp-template--vendor-view-page
    .hp-vendor--view-page
    .hp-vendor__summary.marnamic-card--vendor-summary
    .hp-vendor__image {
    align-self: stretch;
  }

  body.wp-child-theme-marnamic.wp-child-theme-marnamic.hp-template--vendor-view-page
    .hp-vendor--view-page
    .hp-vendor__summary.marnamic-card--vendor-summary
    .hp-vendor__name {
    min-width: 0;
    padding-right: 0;
    overflow-wrap: anywhere;
    letter-spacing: 0;
  }

  body.wp-child-theme-marnamic.wp-child-theme-marnamic.hp-template--vendor-view-page
    .hp-vendor__summary.marnamic-card--vendor-summary > .marnamic-status-badges {
    grid-area: status;
    position: static !important;
    justify-content: flex-start;
    max-width: 100%;
    pointer-events: auto;
  }

  body.wp-child-theme-marnamic.wp-child-theme-marnamic.hp-template--vendor-view-page
    .hp-vendor--view-page
    .hp-vendor__summary.marnamic-card--vendor-summary
    .hp-vendor__description {
    --marnamic-profile-section-padding: 0;
    --marnamic-profile-section-border: 0;
    max-width: 68ch;
  }

  body.wp-child-theme-marnamic.wp-child-theme-marnamic.hp-template--vendor-view-page
    .hp-vendor--view-page
    .hp-vendor__summary.marnamic-card--vendor-summary
    :is(.marnamic-vendor-profile-tags, .marnamic-vendor-contact) {
    margin-top: 0;
  }

  body.wp-child-theme-marnamic.wp-child-theme-marnamic.hp-template--vendor-view-page
    .hp-vendor--view-page
    .hp-vendor__summary:not(.marnamic-card--vendor-summary) {
    display: grid !important;
    grid-template-columns: minmax(240px, 30%) minmax(0, 1fr) !important;
    grid-template-areas:
      "image name"
      "image description"
      "tags tags"
      "contact contact"
      "phases phases" !important;
    grid-template-rows: auto minmax(0, 1fr) auto auto auto;
    gap: 18px clamp(24px, 3vw, 40px) !important;
    align-items: start;
    padding: clamp(24px, 3vw, 36px) !important;
  }

  body.wp-child-theme-marnamic.wp-child-theme-marnamic.hp-template--vendor-view-page
    .hp-vendor--view-page
    .hp-vendor__summary:not(.marnamic-card--vendor-summary)
    .hp-vendor__image {
    grid-area: image;
    min-height: 280px !important;
    height: 100%;
    align-self: stretch;
  }

  body.wp-child-theme-marnamic.wp-child-theme-marnamic.hp-template--vendor-view-page
    .hp-vendor--view-page
    .hp-vendor__summary:not(.marnamic-card--vendor-summary)
    .hp-vendor__name {
    grid-area: name;
    min-width: 0;
    padding-right: min(22vw, 230px);
    font-size: clamp(1.65rem, 2.5vw, 2.35rem) !important;
    line-height: 1.12 !important;
  }

  body.wp-child-theme-marnamic.wp-child-theme-marnamic.hp-template--vendor-view-page
    .hp-vendor--view-page
    .hp-vendor__summary:not(.marnamic-card--vendor-summary)
    .hp-vendor__description {
    grid-area: description;
    margin: 0 !important;
    padding: 0 !important;
    border-top: 0 !important;
  }

  body.wp-child-theme-marnamic.wp-child-theme-marnamic.hp-template--vendor-view-page
    .hp-vendor--view-page
    .hp-vendor__summary:not(.marnamic-card--vendor-summary)
    .marnamic-vendor-profile-tags {
    grid-area: tags;
  }

  body.wp-child-theme-marnamic.wp-child-theme-marnamic.hp-template--vendor-view-page
    .hp-vendor--view-page
    .hp-vendor__summary:not(.marnamic-card--vendor-summary)
    .marnamic-vendor-contact {
    grid-area: contact;
  }

  body.wp-child-theme-marnamic.wp-child-theme-marnamic.hp-template--vendor-view-page
    .hp-vendor--view-page
    .hp-vendor__summary:not(.marnamic-card--vendor-summary)
    .marnamic-vendor-profile-phases {
    grid-area: phases;
  }
}

/* On wide screens, company details and expertise form one balanced row.
 * This shortens the card without squeezing either section at tablet widths. */
@media (min-width: 1120px) {
  body.wp-child-theme-marnamic.wp-child-theme-marnamic.hp-template--vendor-view-page
    .hp-vendor--view-page
    .hp-vendor__summary.marnamic-card--vendor-summary {
    --marnamic-profile-summary-areas:
      "image status"
      "image name"
      "image description"
      "image actions"
      "contact tags"
      "phases phases";
    --marnamic-profile-summary-rows: auto auto minmax(0, 1fr) auto auto auto;
  }

  body.wp-child-theme-marnamic.wp-child-theme-marnamic.hp-template--vendor-view-page
    .hp-vendor--view-page
    .hp-vendor__summary.marnamic-card--vendor-summary
    .marnamic-vendor-contact {
    align-self: start;
  }

  /* Guests get no contact panel; the expertise overview takes the full row. */
  body.wp-child-theme-marnamic.wp-child-theme-marnamic.hp-template--vendor-view-page
    .hp-vendor--view-page
    .hp-vendor__summary.marnamic-card--vendor-summary:not(:has(.marnamic-vendor-contact)) {
    --marnamic-profile-summary-areas:
      "image status"
      "image name"
      "image description"
      "image actions"
      "tags tags"
      "phases phases";
  }
}

/* An owner's native action widget can contain only whitespace. Hide that
 * empty shell even when the optional connections stylesheet is not enqueued. */
body.wp-child-theme-marnamic.wp-child-theme-marnamic.hp-template--vendor-view-page
  .hp-vendor__actions--primary.marnamic-vendor-actions--own-profile {
  display: none !important;
}

body.wp-child-theme-marnamic.wp-child-theme-marnamic.hp-template--vendor-view-page
  .hp-vendor__summary.marnamic-card--vendor-summary
  > .hp-vendor__actions--primary.marnamic-card__detail-actions:not(.marnamic-vendor-actions--own-profile) {
  display: grid !important;
  grid-area: actions !important;
  min-width: 0;
  margin: 0 !important;
  padding: 0 !important;
  background: transparent !important;
  border: 0 !important;
  box-shadow: none !important;
}

@media (min-width: 1180px) {
  body.wp-child-theme-marnamic.wp-child-theme-marnamic.hp-template--vendor-view-page
    .hp-vendor__summary.marnamic-card--vendor-summary:has(> .marnamic-vendor-actions--own-profile) {
    --marnamic-profile-summary-areas:
      "image status"
      "image name"
      "image description"
      "contact tags"
      "phases phases";
    --marnamic-profile-summary-rows: auto auto minmax(0, 1fr) auto auto;
  }
}

/* Detail-side provider cards and discovery cards share the same vertical
 * anatomy. Their container width may differ; their component does not. */
body.wp-child-theme-marnamic.wp-child-theme-marnamic
  .hp-page__sidebar
  :is(.hp-vendor--view-block, .hp-listing--view-block).marnamic-card {
  height: auto !important;
  min-height: 0 !important;
  max-height: none !important;
  flex-direction: column !important;
}

/* -------------------------------------------------------------------------
   Responsive contract
   ------------------------------------------------------------------------- */

@media (max-width: 720px) {
  body.wp-child-theme-marnamic {
    --marnamic-card-space: 12px;
  }

  /* Phone actor cards follow the reading order users act on: identity image
   * and status, company name, role/location, specialisms and the profile CTA.
   * Desktop keeps equal-height rows; a one-column phone list sizes each card
   * from its real content instead of reserving a sparse 400px minimum. */
  body.wp-child-theme-marnamic.wp-child-theme-marnamic
    .hp-vendor--view-block.marnamic-card.marnamic-card--vendor,
  body.wp-child-theme-marnamic.wp-child-theme-marnamic.marnamic-vendor-discovery
    .hp-page__content .hp-vendors.hp-block.hp-grid
    .hp-vendor--view-block.marnamic-card.marnamic-card--vendor,
  body.wp-child-theme-marnamic.wp-child-theme-marnamic.marnamic-archive-search-results.marnamic-archive-search-results--vendor
    .hp-page__content .hp-vendors.hp-block.hp-grid
    .hp-vendor--view-block.marnamic-card.marnamic-card--vendor {
    block-size: auto !important;
    height: auto !important;
    min-block-size: 0 !important;
    min-height: 0 !important;
  }

  body.wp-child-theme-marnamic.wp-child-theme-marnamic
    .marnamic-card--vendor .hp-vendor__content {
    flex: 0 1 auto !important;
    gap: 8px !important;
    padding: 12px !important;
  }

  body.wp-child-theme-marnamic.wp-child-theme-marnamic
    .marnamic-card--vendor .hp-vendor__name {
    order: 1 !important;
    height: 26px !important;
    min-height: 26px !important;
    max-height: 26px !important;
    font-size: 20px !important;
    line-height: 26px !important;
  }

  body.wp-child-theme-marnamic.wp-child-theme-marnamic
    .marnamic-card--vendor .marnamic-card__meta--vendor {
    order: 2 !important;
    gap: 6px !important;
  }

  body.wp-child-theme-marnamic.wp-child-theme-marnamic
    .marnamic-card--vendor .marnamic-card__identity {
    min-height: 40px !important;
    gap: 4px 8px !important;
  }

  body.wp-child-theme-marnamic.wp-child-theme-marnamic
    .marnamic-card--vendor .marnamic-card__tags {
    height: auto !important;
    min-height: 0 !important;
    max-height: 56px !important;
    gap: 5px !important;
  }

  body.wp-child-theme-marnamic.wp-child-theme-marnamic
    .marnamic-card--vendor .hp-vendor__footer {
    min-height: 56px !important;
    margin-top: 0 !important;
    padding: 0 12px 12px !important;
  }

  /* A real company image is visual profile content, not a compact logo tile.
   * Let it span the mobile summary width in the same 16:9 ratio communicated
   * by the upload field. Placeholder artwork deliberately keeps the compact,
   * padded identity-tile treatment declared above. */
  body.wp-child-theme-marnamic.wp-child-theme-marnamic.hp-template--vendor-view-page
    .hp-vendor--view-page
    .hp-vendor__summary.marnamic-card--vendor-summary
    .hp-vendor__image.marnamic-vendor-image--uploaded {
    height: auto !important;
    min-height: 0 !important;
    aspect-ratio: 16 / 9 !important;
    padding: 0 !important;
    background: transparent !important;
    border: 0 !important;
    border-radius: var(--marnamic-card-media-radius, 6px) !important;
  }

  body.wp-child-theme-marnamic.wp-child-theme-marnamic.hp-template--vendor-view-page
    .hp-vendor--view-page
    .hp-vendor__summary.marnamic-card--vendor-summary
    .hp-vendor__image.marnamic-vendor-image--uploaded
    img {
    width: 100% !important;
    max-width: none !important;
    height: 100% !important;
    max-height: none !important;
    aspect-ratio: 16 / 9 !important;
    object-fit: cover !important;
    object-position: 50% 50% !important;
  }

  body.wp-child-theme-marnamic.wp-child-theme-marnamic
    .marnamic-card--vendor
    .hp-vendor__image
    > a,
  body.wp-child-theme-marnamic.wp-child-theme-marnamic.marnamic-vendor-discovery
    .hp-vendor--view-block.marnamic-card
    .hp-vendor__image
    > a,
  body.wp-child-theme-marnamic.wp-child-theme-marnamic.marnamic-archive-search-results.marnamic-archive-search-results--vendor
    .hp-vendor--view-block.marnamic-card
    .hp-vendor__image
    > a {
    height: 120px !important;
    min-height: 120px !important;
  }

  body.wp-child-theme-marnamic.wp-child-theme-marnamic
    .hp-vendor--view-block.marnamic-card.marnamic-card--vendor
    .marnamic-card__circularity-score,
  body.wp-child-theme-marnamic.wp-child-theme-marnamic
    .marnamic-card--vendor-summary
    .marnamic-card__circularity-score,
  body.wp-child-theme-marnamic.wp-child-theme-marnamic
    .marnamic-card--listing
    .hp-listing__featured-badge {
    top: 22px !important;
    right: 22px !important;
  }

  body.wp-child-theme-marnamic.wp-child-theme-marnamic
    .post--archive
    .post__title {
    padding-top: 12px !important;
  }
}

@media (max-width: 520px) {
  body.wp-child-theme-marnamic.wp-child-theme-marnamic
    .post--archive
    .post__details {
    grid-template-areas:
      "date"
      "comments"
      "readmore" !important;
    grid-template-columns: minmax(0, 1fr) !important;
  }

  body.wp-child-theme-marnamic.wp-child-theme-marnamic
    .post--archive
    :is(.post__comments, .post__readmore) {
    width: 100% !important;
    justify-self: stretch !important;
  }
}

@media (prefers-reduced-motion: reduce) {
  body.wp-child-theme-marnamic.wp-child-theme-marnamic
    :is(
      .hp-vendor--view-block.marnamic-card,
      .hp-listing--view-block.marnamic-card,
      .post--archive
    ) {
    transition: none !important;
  }
}

/* One media format for company images everywhere: a 16:9 tile in the
 * cream tone of the placeholder artwork (#e9e1d6), in cards and in the profile, for uploaded logos
 * and placeholder artwork alike. Logos are shown whole and centred with an
 * even inner margin, never cropped. */
html body.wp-child-theme-marnamic.wp-child-theme-marnamic
  .hp-vendor--view-block.marnamic-card--vendor
  .hp-vendor__image.marnamic-vendor-image--uploaded {
  --marnamic-vendor-card-image-padding: 14px 22px;
  --marnamic-vendor-card-image-background: #e9e1d6;
  --marnamic-vendor-card-media-object-fit: contain;
  background: #e9e1d6 !important;
}

html body.wp-child-theme-marnamic.wp-child-theme-marnamic
  .hp-vendor--view-block.marnamic-card--vendor
  .hp-vendor__image.marnamic-vendor-image--uploaded
  img {
  object-fit: contain !important;
  object-position: 50% 50% !important;
  background: transparent !important;
  /* White logo backgrounds melt into the cream tile. */
  mix-blend-mode: multiply;
}

html body.wp-child-theme-marnamic.wp-child-theme-marnamic.wp-child-theme-marnamic
  .hp-vendor--view-page
  .hp-vendor__summary.marnamic-card--vendor-summary
  .hp-vendor__image.hp-vendor__image {
  --marnamic-logo-tile: #e9e1d6;
  height: auto !important;
  min-height: 0 !important;
  aspect-ratio: 16 / 9 !important;
  align-self: start !important;
  padding: 18px 28px !important;
  background: #e9e1d6 !important;
}

html body.wp-child-theme-marnamic.wp-child-theme-marnamic
  .hp-vendor--view-page
  .hp-vendor__summary.marnamic-card--vendor-summary
  .hp-vendor__image
  img {
  width: 100% !important;
  max-width: 100% !important;
  height: 100% !important;
  max-height: 100% !important;
  aspect-ratio: auto !important;
  object-fit: contain !important;
  object-position: 50% 50% !important;
  mix-blend-mode: multiply;
}

html body.wp-child-theme-marnamic.wp-child-theme-marnamic
  .hp-vendor--view-page
  .hp-vendor__summary.marnamic-card--vendor-summary
  .hp-vendor__image.marnamic-vendor-image--placeholder
  img {
  width: auto !important;
  height: 72% !important;
}

/* Company names are shown in full: they wrap onto further lines instead of
 * being cut off with an ellipsis. */
html body.wp-child-theme-marnamic.wp-child-theme-marnamic.wp-child-theme-marnamic
  .hp-vendor--view-block.marnamic-card.marnamic-card--vendor
  .hp-vendor__name.hp-vendor__name,
html body.wp-child-theme-marnamic.wp-child-theme-marnamic.wp-child-theme-marnamic
  .hp-vendor--view-block.marnamic-card.marnamic-card--vendor
  .hp-vendor__name.hp-vendor__name a {
  display: block !important;
  min-height: 0 !important;
  height: auto !important;
  max-height: none !important;
  overflow: visible !important;
  white-space: normal !important;
  text-overflow: clip !important;
  -webkit-line-clamp: unset !important;
  overflow-wrap: break-word !important;
  hyphens: manual !important;
  text-wrap: balance;
}
