/**
 * Thiscovery Page Builder styles
 * Copyright (c) 2026 D Cube Consulting. All rights reserved.
 * License: AGPL-3.0-or-later
 */

/* Inherit Thiscovery theme tokens (fallbacks apply if that theme is inactive). */
.thiscovery-page-builder-public-shell,
.engagement-pages-public-shell,
.engagement-page,
.thiscovery-page-builder-admin-wrap,
.engagement-pages-admin-wrap,
.ep-align:not([data-ep-colored="1"]) {
  --ep-t-font: var(--yg-font-family, inherit);
  --ep-t-heading-font: var(--yg-heading-font-family, inherit);
  --ep-t-font-size: var(--yg-font-size, 1rem);
  --ep-t-text: var(--yg-text-main, var(--hh-text-color-main, #0b0c0c));
  --ep-t-muted: var(--yg-text-secondary, var(--hh-text-color-secondary, #505a5f));
  --ep-t-heading: var(--yg-text-main, var(--hh-text-color-main, #0b0c0c));
  --ep-t-link: var(--yg-link-color, var(--bs-link-color, #1d70b8));
  --ep-t-primary: var(--yg-button-bg, var(--bs-primary, #1d70b8));
  --ep-t-success: var(--bs-success, #00703c);
  --ep-t-danger: var(--bs-danger, #d4351c);
  --ep-t-warning: var(--bs-warning, #f47738);
  --ep-t-info: var(--bs-info, #1d70b8);
  --ep-t-card: var(--yg-card-bg, #ffffff);
  --ep-t-card-text: var(--yg-card-text, var(--ep-t-text));
  --ep-t-surface: var(--yg-bg-page, var(--hh-background-color-page, #f8f8f8));
  --ep-t-border: var(--yg-panel-border-color, #b1b4b6);
  --ep-t-radius: var(--yg-panel-border-radius, 4px);
  --ep-t-shadow: var(--yg-panel-shadow, none);
  --ep-t-h1: var(--yg-h1-font-size, 1.75rem);
  --ep-t-h2: var(--yg-h2-font-size, 1.35rem);
  --ep-t-hero-bg: var(--yg-topbar-bg, var(--bs-primary, #003078));
  --ep-t-hero-fg: var(--yg-topbar-text, #ffffff);
  font-family: var(--ep-t-font);
  font-size: var(--ep-t-font-size);
  color: var(--ep-t-text);
}

.engagement-page h1,
.engagement-page h2,
.engagement-page h3,
.engagement-page h4,
.engagement-page h5,
.engagement-page h6,
.thiscovery-page-builder-public-shell h1,
.thiscovery-page-builder-public-shell h2,
.thiscovery-page-builder-public-shell h3,
.thiscovery-page-builder-public-shell h4,
.thiscovery-page-builder-public-shell h5,
.thiscovery-page-builder-public-shell h6 {
  font-family: var(--ep-t-heading-font);
  color: var(--ep-t-heading);
}

.engagement-page a:not(.btn),
.thiscovery-page-builder-public-shell a:not(.btn) {
  color: var(--ep-t-link);
}
.engagement-page .ep-contact-card__email a,
.thiscovery-page-builder-public-shell .ep-contact-card__email a {
  color: var(--ep-contact-card-accent, var(--ep-t-danger, #d4351c));
}

/* Builder colour pickers override theme tokens on that block only. */
.ep-align[data-ep-colored="1"] {
  --ep-t-heading: var(--ep-fg, var(--yg-text-main, var(--hh-text-color-main, #0b0c0c)));
  --ep-t-text: var(--ep-fg, var(--yg-text-main, var(--hh-text-color-main, #0b0c0c)));
  --ep-t-muted: var(--ep-fg, var(--yg-text-secondary, var(--hh-text-color-secondary, #505a5f)));
  --ep-t-card-text: var(--ep-fg, var(--yg-card-text, var(--ep-t-text)));
  --ep-t-link: var(--ep-fg, var(--yg-link-color, var(--bs-link-color, #1d70b8)));
  --ep-t-card: var(--ep-bg, var(--yg-card-bg, #ffffff));
  --ep-t-surface: var(--ep-bg, var(--yg-bg-page, var(--hh-background-color-page, #f8f8f8)));
  --ep-t-border: var(--ep-border, var(--yg-panel-border-color, #b1b4b6));
}

/* Nested blocks without their own picker keep the site theme. */
.ep-align[data-ep-colored="1"] .ep-align:not([data-ep-colored="1"]) {
  --ep-fg: initial;
  --ep-bg: initial;
  --ep-border: initial;
}

/* Public + admin engagement page layout */

.thiscovery-page-builder-public-shell {
  width: 100%;
  margin: 0 auto;
  padding: 28px clamp(20px, 4vw, 48px) 56px;
  box-sizing: border-box;
}

/* Fallbacks only — page Settings → Page width sets inline max-width and wins. */
.thiscovery-page-builder-public-shell[data-ep-width="narrow"] { max-width: 720px; }
.thiscovery-page-builder-public-shell[data-ep-width="standard"] { max-width: 960px; }
.thiscovery-page-builder-public-shell[data-ep-width="comfortable"] { max-width: 1100px; }
.thiscovery-page-builder-public-shell[data-ep-width="wide"] { max-width: 1440px !important; }
.thiscovery-page-builder-public-shell[data-ep-width="extra_wide"] { max-width: 1600px; }

.thiscovery-page-builder-public-shell[data-ep-width="full"] {
  max-width: none !important;
  padding-left: clamp(24px, 5vw, 72px);
  padding-right: clamp(24px, 5vw, 72px);
}

/* Prefer shell-level width; keep article fluid inside the shell */
.engagement-page {
  display: block;
  width: 100%;
  max-width: none !important;
  margin: 0;
}

.thiscovery-page-builder-admin-wrap {
  padding-top: 12px;
}

/* Admin preview: honour page width on the article itself */
.thiscovery-page-builder-admin-wrap .engagement-page[data-ep-width="narrow"] { max-width: 720px !important; margin-left: auto; margin-right: auto; }
.thiscovery-page-builder-admin-wrap .engagement-page[data-ep-width="standard"] { max-width: 960px !important; margin-left: auto; margin-right: auto; }
.thiscovery-page-builder-admin-wrap .engagement-page[data-ep-width="comfortable"] { max-width: 1100px !important; margin-left: auto; margin-right: auto; }
.thiscovery-page-builder-admin-wrap .engagement-page[data-ep-width="wide"] { max-width: 1440px !important; margin-left: auto; margin-right: auto; }
.thiscovery-page-builder-admin-wrap .engagement-page[data-ep-width="extra_wide"] { max-width: 1600px !important; margin-left: auto; margin-right: auto; }
.thiscovery-page-builder-admin-wrap .engagement-page[data-ep-width="full"] { max-width: none !important; }

.engagement-page-body {
  display: flex;
  flex-direction: column;
  gap: 28px;
}

.ep-page-full {
  display: flex;
  flex-direction: column;
  gap: 28px;
}

.ep-page-columns {
  display: grid;
  gap: 28px;
  align-items: start;
}

.ep-page-columns--main {
  grid-template-columns: 1fr;
}

.ep-page-columns--left {
  grid-template-columns: minmax(220px, 0.35fr) minmax(0, 1fr);
}

.ep-page-columns--right {
  grid-template-columns: minmax(0, 1fr) minmax(220px, 0.35fr);
}

.ep-page-columns--both {
  grid-template-columns: minmax(200px, 0.3fr) minmax(0, 1fr) minmax(200px, 0.3fr);
}

.ep-page-col {
  display: flex;
  flex-direction: column;
  gap: 28px;
  min-width: 0;
}

.ep-container {
  background: var(--ep-t-surface);
  border: 1px solid var(--ep-t-border);
  border-radius: var(--ep-t-radius);
  padding: 20px 18px;
}

.ep-container__title {
  margin: 0 0 14px;
  color: var(--ep-t-heading);
  font-family: var(--ep-t-heading-font);
  font-size: var(--ep-t-h2);
  line-height: 1.3;
}

.ep-container__body {
  display: flex;
  flex-direction: column;
  gap: 20px;
}
.ep-container__body--cols-2,
.ep-container__body--cols-3,
.ep-container__body--cols-4 {
  display: grid;
  gap: 20px;
  align-items: stretch;
}
.ep-container__body--cols-2 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
.ep-container__body--cols-3 { grid-template-columns: repeat(3, minmax(0, 1fr)); }
.ep-container__body--cols-4 { grid-template-columns: repeat(4, minmax(0, 1fr)); }
.ep-container__col {
  display: flex;
  flex-direction: column;
  gap: 16px;
  min-width: 0;
  height: 100%;
}
/* Nested blocks are wrapped in .ep-align — stretch through that wrapper. */
.ep-container__col > .ep-align {
  display: flex;
  flex-direction: column;
  flex: 1 1 auto;
  min-height: 0;
  height: 100%;
}
.ep-container__col .ep-contact {
  display: flex;
  flex-direction: column;
  flex: 1 1 auto;
  min-height: 0;
  height: 100%;
}
.ep-container__col .ep-contact__card {
  display: flex;
  flex-direction: column;
  flex: 1 1 auto;
}
@media (max-width: 720px) {
  .ep-container__body--cols-2,
  .ep-container__body--cols-3,
  .ep-container__body--cols-4 {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 900px) {
  .ep-page-columns--left,
  .ep-page-columns--right,
  .ep-page-columns--both {
    grid-template-columns: 1fr;
  }

  /* Main column first on small screens, then side columns */
  .ep-page-col--main {
    order: 1;
  }
  .ep-page-col--left,
  .ep-page-col--right {
    order: 2;
  }
  .ep-page-columns--both .ep-page-col--left {
    order: 2;
  }
  .ep-page-columns--both .ep-page-col--right {
    order: 3;
  }
}

.ep-page-nav {
  margin-bottom: 16px;
  font-size: 0.95rem;
}
.ep-page-nav a {
  color: var(--ep-t-primary);
  font-weight: 600;
  text-decoration: none;
}
.ep-page-nav a:hover { text-decoration: underline; }

.ep-directory__hero {
  padding: 28px 24px;
  margin-bottom: 28px;
  background: var(--ep-t-heading);
  color: var(--ep-t-hero-fg, #fff);
  border-radius: var(--ep-t-radius);
}
.ep-directory__hero h1 {
  margin: 0 0 10px;
  color: var(--ep-t-hero-fg, #fff);
  font-size: 1.75rem;
  line-height: 1.25;
}
.ep-directory__hero p {
  margin: 0;
  opacity: 0.92;
  font-size: 1.05rem;
  line-height: 1.5;
  max-width: 40rem;
}
.ep-directory__heading {
  color: var(--ep-t-heading);
  font-size: 1.25rem;
  margin: 0 0 14px;
  font-weight: 700;
  letter-spacing: -0.01em;
}
.ep-directory__grid,
.ep-collection .ep-directory__grid {
  /* Flex (not auto-fill grid): empty tracks otherwise absorb free space and
     defeat justify-content center/end on wide pages. */
  display: flex;
  flex-wrap: wrap;
  align-items: stretch;
  justify-content: flex-start;
  gap: 1rem 1.15rem;
  margin: 0 0 2rem;
  width: 100%;
}
@media (min-width: 720px) {
  .ep-directory__grid,
  .ep-collection .ep-directory__grid {
    gap: 1.1rem 1.25rem;
  }
}
@media (max-width: 560px) {
  .ep-collection-card {
    max-width: none;
    flex: 1 1 100%;
  }
}

/* Block horizontal position within the page shell */
.ep-align {
  width: 100%;
}
.ep-align--center .ep-directory__heading {
  text-align: center;
}
.ep-align--end .ep-directory__heading {
  text-align: right;
}
.ep-align--center .ep-directory__grid,
.ep-align--center .ep-collection .ep-directory__grid {
  justify-content: center;
}
.ep-align--end .ep-directory__grid,
.ep-align--end .ep-collection .ep-directory__grid {
  justify-content: flex-end;
}
.ep-align--center > .ep-block:not(.ep-hero):not(.ep-collection):not(.ep-directory-list) {
  margin-left: auto;
  margin-right: auto;
  max-width: 42rem;
}
.ep-align--end > .ep-block:not(.ep-hero):not(.ep-collection):not(.ep-directory-list) {
  margin-left: auto;
  margin-right: 0;
  max-width: 42rem;
}
.ep-align--center .ep-hero.has-image .ep-hero-body,
.ep-align--center .ep-hero-body {
  text-align: center;
  align-items: center;
}
.ep-align--end .ep-hero.has-image .ep-hero-body,
.ep-align--end .ep-hero-body {
  text-align: right;
  align-items: flex-end;
}

.ep-block.ep-collection {
  width: 100%;
}

.ep-collection-card {
  background: var(--ep-t-card);
  border: 1px solid var(--ep-t-border);
  border-radius: var(--ep-t-radius, 10px);
  overflow: hidden;
  display: flex;
  flex-direction: column;
  min-height: 100%;
  flex: 0 1 300px;
  width: 100%;
  max-width: 300px;
  box-shadow: 0 1px 2px rgba(16, 24, 40, 0.04);
  transition: box-shadow .18s ease, transform .18s ease, border-color .18s ease;
}
.ep-collection-card:hover {
  border-color: var(--ep-t-border);
  box-shadow: 0 6px 16px rgba(16, 24, 40, 0.08);
  transform: translateY(-1px);
}
.ep-collection-card.is-featured {
  border-color: var(--ep-t-primary);
  box-shadow: 0 0 0 1px var(--ep-t-primary), 0 6px 16px rgba(29, 112, 184, 0.1);
}
.ep-collection-card__media {
  display: block;
  position: relative;
  height: 132px;
  aspect-ratio: auto;
  background: linear-gradient(135deg, var(--ep-t-heading) 0%, var(--ep-t-primary) 55%, #5694ca 100%);
  overflow: hidden;
  text-decoration: none;
  flex-shrink: 0;
}
.ep-collection-card.no-media .ep-collection-card__media {
  height: 96px;
}
.ep-collection-card__media img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}
.ep-collection-card__media-fallback {
  position: absolute;
  inset: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  color: rgba(255, 255, 255, 0.9);
  font-size: 1.5rem;
}
.ep-collection-card--form .ep-collection-card__media {
  background: linear-gradient(135deg, var(--ep-t-primary) 0%, var(--ep-t-heading) 100%);
}
.ep-collection-card--space .ep-collection-card__media {
  background: linear-gradient(135deg, var(--ep-t-heading) 0%, var(--ep-t-success) 100%);
}
.ep-collection-card--event .ep-collection-card__media {
  background: linear-gradient(135deg, var(--ep-t-primary) 0%, var(--ep-t-heading) 100%);
}
.ep-collection__more {
  margin: -0.35rem 0 1.5rem;
}
.ep-collection__more a {
  font-weight: 600;
  text-decoration: none;
}
.ep-collection__more a:hover {
  text-decoration: underline;
}
.ep-collection__more i {
  margin-left: 0.35rem;
  font-size: 0.85em;
}
.ep-collection-card__badge {
  position: absolute;
  top: 10px;
  left: 10px;
  background: var(--ep-t-card);
  color: var(--ep-t-heading);
  font-size: 0.68rem;
  font-weight: 800;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  padding: 3px 7px;
  border-radius: 999px;
}
.ep-collection-card__body {
  display: flex;
  flex-direction: column;
  gap: 6px;
  padding: 12px 14px 14px;
  flex: 1;
}
.ep-collection-card__eyebrow {
  font-size: 0.7rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  color: var(--ep-t-muted);
}
.ep-collection-card__title {
  margin: 0;
  font-size: 1rem;
  line-height: 1.3;
  font-weight: 700;
}
.ep-collection-card__title a {
  color: var(--ep-t-text);
  text-decoration: none;
}
.ep-collection-card__title a:hover {
  color: var(--ep-t-primary);
}
.ep-collection-card__summary {
  margin: 0;
  color: var(--ep-t-muted);
  font-size: 0.875rem;
  line-height: 1.4;
  flex: 1;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}
.ep-collection-card__footer {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  margin-top: 6px;
  padding-top: 10px;
  border-top: 1px solid var(--ep-t-border);
}
.ep-collection-card__meta {
  font-size: 0.8rem;
  color: var(--ep-t-muted);
}
.ep-collection-card__cta {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  font-weight: 700;
  font-size: 0.85rem;
  color: var(--ep-t-primary);
  text-decoration: none;
  white-space: nowrap;
}
.ep-collection-card__cta:hover {
  color: var(--ep-t-heading);
  text-decoration: underline;
}

/* Legacy bland card styles kept for any leftover markup */
.ep-directory-card {
  background: var(--ep-t-card);
  border: 1px solid var(--ep-t-border);
  border-radius: var(--ep-t-radius);
  padding: 18px 16px;
  display: flex;
  flex-direction: column;
  gap: 8px;
  min-height: 160px;
}
.ep-directory-card--featured {
  border-left: 6px solid var(--ep-t-primary);
}
.ep-directory-card__title {
  margin: 0;
  font-size: 1.1rem;
  line-height: 1.3;
}
.ep-directory-card__title a {
  color: var(--ep-t-heading);
  text-decoration: none;
}
.ep-directory-card__title a:hover { text-decoration: underline; }
.ep-directory-card__category {
  font-size: 0.8rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.03em;
  color: var(--ep-t-muted);
}
.ep-directory-card__summary {
  margin: 0;
  color: var(--ep-t-text);
  font-size: 0.95rem;
  line-height: 1.45;
  flex: 1;
}
.ep-directory-card__meta {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  align-items: center;
  justify-content: space-between;
  margin-top: 4px;
  font-size: 0.85rem;
  color: var(--ep-t-muted);
}
.ep-directory-card__cta {
  font-weight: 700;
  color: var(--ep-t-primary);
}

.ep-phases__list {
  list-style: none;
  margin: 0;
  padding: 0;
  display: flex;
  flex-direction: column;
  gap: 0;
}
.ep-phases__item {
  display: grid;
  grid-template-columns: 28px 1fr;
  gap: 12px;
  position: relative;
  padding-bottom: 18px;
}
.ep-phases__item:not(:last-child)::before {
  content: "";
  position: absolute;
  left: 12px;
  top: 22px;
  bottom: 0;
  width: 2px;
  background: var(--ep-t-border);
}
.ep-phases__marker {
  width: 16px;
  height: 16px;
  margin: 4px auto 0;
  border-radius: 50%;
  border: 2px solid var(--ep-t-border);
  background: var(--ep-t-card);
}
.ep-phases__item--done .ep-phases__marker {
  background: var(--ep-t-success);
  border-color: var(--ep-t-success);
}
.ep-phases__item--current .ep-phases__marker {
  background: var(--ep-t-primary);
  border-color: var(--ep-t-primary);
  box-shadow: 0 0 0 4px rgba(29, 112, 184, 0.2);
}
.ep-phases__label {
  font-weight: 700;
  color: var(--ep-t-text);
  font-size: 1.05rem;
}
.ep-phases__desc {
  color: var(--ep-t-muted);
  margin-top: 2px;
  font-size: 0.95rem;
}
.ep-phases__status {
  display: inline-block;
  margin-top: 6px;
  font-size: 0.75rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.03em;
  color: var(--ep-t-muted);
}
.ep-phases__item--current .ep-phases__status { color: var(--ep-t-primary); }
.ep-phases__item--done .ep-phases__status { color: var(--ep-t-success); }

/* Plan / roadmap style */
.ep-phases-plan {
  list-style: none;
  margin: 0;
  padding: 0;
  display: grid;
  grid-template-columns: repeat(var(--ep-phase-count, 3), minmax(0, 1fr));
  gap: 0;
  align-items: stretch;
}
.ep-phases-plan__step {
  display: flex;
  flex-direction: column;
  min-width: 0;
  position: relative;
}
.ep-phases-plan__rail {
  display: flex;
  align-items: center;
  justify-content: center;
  position: relative;
  height: 40px;
  margin-bottom: 10px;
}
.ep-phases-plan__step:not(:last-child) .ep-phases-plan__rail::after {
  content: "";
  position: absolute;
  left: 50%;
  right: -50%;
  top: 50%;
  height: 3px;
  background: var(--ep-t-border);
  transform: translateY(-50%);
  z-index: 0;
}
.ep-phases-plan__step--done:not(:last-child) .ep-phases-plan__rail::after,
.ep-phases-plan__step--current:not(:last-child) .ep-phases-plan__rail::after {
  background: var(--ep-t-primary);
}
.ep-phases-plan__num {
  position: relative;
  z-index: 1;
  width: 32px;
  height: 32px;
  border-radius: 50%;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-weight: 700;
  font-size: 0.9rem;
  background: var(--ep-t-card);
  border: 2px solid var(--ep-t-border);
  color: var(--ep-t-muted);
}
.ep-phases-plan__step--done .ep-phases-plan__num {
  background: var(--ep-t-success);
  border-color: var(--ep-t-success);
  color: var(--ep-t-hero-fg, #fff);
}
.ep-phases-plan__step--current .ep-phases-plan__num {
  background: var(--ep-t-primary);
  border-color: var(--ep-t-primary);
  color: var(--ep-t-hero-fg, #fff);
  box-shadow: 0 0 0 4px rgba(29, 112, 184, 0.2);
}
.ep-phases-plan__card {
  margin: 0 6px;
  padding: 14px 12px;
  background: var(--ep-t-card);
  border: 1px solid var(--ep-t-border);
  border-radius: var(--ep-t-radius);
  min-height: 110px;
  display: flex;
  flex-direction: column;
  gap: 6px;
}
.ep-phases-plan__step--current .ep-phases-plan__card {
  border-color: var(--ep-t-primary);
  box-shadow: 0 0 0 2px rgba(29, 112, 184, 0.12);
}
.ep-phases-plan__label {
  font-weight: 700;
  color: var(--ep-t-heading);
  font-size: 1rem;
  line-height: 1.3;
}
.ep-phases-plan__desc {
  color: var(--ep-t-muted);
  font-size: 0.9rem;
  line-height: 1.4;
  flex: 1;
}
.ep-phases-plan__status {
  font-size: 0.72rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.03em;
  color: var(--ep-t-muted);
}
.ep-phases-plan__step--current .ep-phases-plan__status { color: var(--ep-t-primary); }
.ep-phases-plan__step--done .ep-phases-plan__status { color: var(--ep-t-success); }

.ep-contact {
  display: flex;
  flex-direction: column;
}
.ep-contact__card {
  display: flex;
  flex-direction: column;
  flex: 1 1 auto;
  background: var(--ep-t-card);
  color: var(--ep-t-card-text);
  border: 1px solid var(--ep-t-border);
  border-radius: var(--ep-t-radius);
  box-shadow: var(--ep-t-shadow);
  padding: var(--yg-card-padding, 16px);
}
.ep-container .ep-contact__card {
  background: var(--ep-t-card);
}
.ep-contact__org {
  font-size: 0.78rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  color: var(--ep-t-muted);
  margin-bottom: 6px;
}
.ep-contact__name {
  font-weight: 700;
  font-size: 1.1rem;
  color: var(--ep-t-heading);
  line-height: 1.3;
}
.ep-contact__role {
  color: var(--ep-t-muted);
  margin-bottom: 10px;
  font-size: 0.95rem;
}
.ep-contact__details {
  margin: 0 0 12px;
}
.ep-contact__row {
  display: grid;
  grid-template-columns: 72px 1fr;
  gap: 8px;
  margin: 0 0 8px;
  font-size: 0.95rem;
}
.ep-contact__row dt {
  margin: 0;
  font-weight: 700;
  color: var(--ep-t-muted);
}
.ep-contact__row dd {
  margin: 0;
  color: var(--ep-t-text);
}
.ep-contact__notes {
  margin: 0 0 12px;
  color: var(--ep-t-muted);
  font-size: 0.92rem;
  line-height: 1.45;
}
.ep-contact__cta {
  margin-top: auto;
  padding-top: 4px;
  align-self: flex-start;
  width: auto;
}

@media (max-width: 800px) {
  .ep-phases-plan {
    grid-template-columns: 1fr;
    gap: 12px;
  }
  .ep-phases-plan__step:not(:last-child) .ep-phases-plan__rail::after {
    display: none;
  }
  .ep-phases-plan__card { margin: 0; }
}

.ep-events__list {
  list-style: none;
  margin: 0;
  padding: 0;
  display: flex;
  flex-direction: column;
  gap: 14px;
}
.ep-events__item {
  display: grid;
  grid-template-columns: 120px 1fr;
  gap: 14px;
  padding: 14px;
  border: 1px solid var(--ep-t-border);
  border-radius: var(--ep-t-radius);
  background: var(--ep-t-card);
}
.ep-events__date {
  display: block;
  font-weight: 700;
  color: var(--ep-t-heading);
}
.ep-events__time, .ep-events__location {
  color: var(--ep-t-muted);
  font-size: 0.9rem;
}
.ep-events__title {
  display: block;
  margin-bottom: 4px;
  color: var(--ep-t-text);
}
.ep-events__body .btn { margin-top: 8px; }

.ep-team__intro {
  color: var(--ep-t-muted);
  margin: 0 0 12px;
}
.ep-team__list {
  list-style: none;
  margin: 0;
  padding: 0;
  display: flex;
  flex-direction: column;
  gap: 14px;
}
.ep-team__person {
  padding-bottom: 12px;
  border-bottom: 1px solid var(--ep-t-border);
}
.ep-team__person:last-child {
  border-bottom: 0;
  padding-bottom: 0;
}
.ep-team__name { display: block; color: var(--ep-t-heading); }
.ep-team__role, .ep-team__phone { color: var(--ep-t-muted); font-size: 0.92rem; }
.ep-team__bio { margin: 6px 0 0; font-size: 0.92rem; line-height: 1.45; }

.ep-contact-card__intro {
  color: var(--ep-t-muted);
  margin: 0 0 20px;
}
.ep-contact-card__grid {
  list-style: none;
  margin: 0;
  padding: 0;
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(260px, 300px));
  gap: 24px;
  justify-content: start;
}
.ep-contact-card__person {
  --ep-contact-card-accent: var(--ep-t-danger, #d4351c);
  background: var(--ep-t-card, #fff);
  color: var(--ep-t-card-text);
  border: 1px solid #e5e7eb;
  border-bottom: 4px solid var(--ep-contact-card-accent);
  border-radius: var(--ep-t-radius, 8px);
  padding: 28px 22px 24px;
  text-align: center;
  box-shadow: 0 1px 2px rgba(11, 12, 12, 0.04);
  min-width: 0;
}
.ep-contact-card__photo-wrap {
  width: 140px;
  height: 140px;
  margin: 0 auto 20px;
  border-radius: 50%;
  border: 3px solid var(--ep-contact-card-accent);
  padding: 3px;
  background: #fff;
  box-sizing: border-box;
}
.ep-contact-card__photo {
  width: 100%;
  height: 100%;
  object-fit: cover;
  border-radius: 50%;
  display: block;
}
.ep-contact-card__photo--empty {
  display: flex;
  align-items: center;
  justify-content: center;
  background: var(--ep-t-surface, #f3f2f1);
  color: var(--ep-t-muted);
  font-weight: 700;
  font-size: 1.6rem;
  letter-spacing: 0.02em;
}
.ep-contact-card__name {
  margin: 0 0 8px;
  font-size: 1.2rem;
  font-weight: 700;
  line-height: 1.3;
  color: var(--ep-t-heading);
}
.ep-contact-card__role {
  margin: 0 0 10px;
  color: var(--ep-t-muted);
  font-size: 0.98rem;
  line-height: 1.4;
}
.ep-contact-card__org {
  margin: 0 0 16px;
  color: var(--ep-t-muted);
  font-size: 0.95rem;
  line-height: 1.4;
}
.ep-contact-card__email {
  margin: 0;
  font-size: 0.95rem;
  line-height: 1.4;
}
.ep-contact-card__email a {
  color: var(--ep-contact-card-accent, var(--ep-t-danger, #d4351c));
  text-decoration: underline;
  word-break: break-word;
  overflow-wrap: anywhere;
}
.ep-contact-card__email a:hover,
.ep-contact-card__email a:focus {
  text-decoration-thickness: 2px;
}

@media (max-width: 640px) {
  .ep-contact-card__grid {
    grid-template-columns: 1fr;
    justify-content: stretch;
  }
  .ep-contact-card__person {
    max-width: none;
  }
}

.ep-updates {
  padding: 20px 18px;
  background: var(--ep-t-surface);
  border: 1px solid var(--ep-t-border);
  border-radius: var(--ep-t-radius);
}
.ep-updates__intro { margin: 0 0 12px; color: var(--ep-t-text); }
.ep-updates__row {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}
.ep-updates__row .form-control { flex: 1; min-width: 180px; }
.ep-updates__success {
  font-weight: 600;
  color: var(--ep-t-success);
}

.ep-comments {
  padding: 20px 18px;
  background: var(--ep-t-card);
  border: 1px solid var(--ep-t-border);
  border-radius: var(--ep-t-radius);
}
.ep-comments__intro { margin: 0 0 14px; color: var(--ep-t-muted); }
.ep-comments__list {
  list-style: none;
  margin: 0 0 1.5rem;
  padding: 0;
  display: flex;
  flex-direction: column;
  gap: 12px;
}
.ep-comments__item {
  padding: 12px 14px;
  background: var(--ep-t-surface);
  border: 1px solid var(--ep-t-border);
  border-radius: var(--ep-t-radius, 6px);
}
.ep-comments__meta {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  align-items: baseline;
  margin-bottom: 6px;
}
.ep-comments__date { font-size: 0.85rem; color: var(--ep-t-muted); }
.ep-comments__body { color: var(--ep-t-text); line-height: 1.5; }
.ep-comments__form-title { font-size: 1.05rem; margin: 0 0 12px; color: var(--ep-t-heading); }
.ep-comments__success { font-weight: 600; color: var(--ep-t-success); margin-bottom: 12px; }
.ep-comments__error { font-weight: 600; color: var(--ep-t-danger); margin-bottom: 12px; }
.ep-comments__error-list {
  margin: 8px 0 0;
  padding-left: 1.2rem;
  font-weight: 400;
}
.ep-comments__empty { margin-bottom: 1rem; }
.ep-comments__form .form-group,
.ep-comments__form .mb-3 {
  margin-bottom: 1rem;
}
.ep-comments__captcha {
  margin: 4px 0 1rem;
}
.ep-comments__captcha .form-group { margin-bottom: 0; }
.ep-comments__actions {
  margin-top: 4px;
  display: flex;
  justify-content: flex-start;
}
.ep-comments__actions .btn {
  margin: 0;
}

.ep-comment-history-hint { margin-bottom: 12px; }
.ep-mod-comment__meta {
  font-size: 0.85rem;
  margin: -2px 0 8px;
}
.ep-mod-comment__head {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  align-items: center;
  margin-bottom: 8px;
}
.ep-mod-comment__body {
  margin-bottom: 10px;
  line-height: 1.45;
  color: var(--ep-t-text);
}
.ep-mod-comment__actions .ep-inline-form {
  display: inline-flex;
  gap: 6px;
  flex-wrap: wrap;
}
.ep-subscription-filters {
  display: flex;
  align-items: center;
  gap: 8px;
  flex-wrap: wrap;
}
.ep-subscription-filters .ep-label {
  margin: 0;
}
.ep-subscription-table th,
.ep-subscription-table td {
  vertical-align: middle;
}
.ep-subscription-table__actions {
  text-align: right;
  white-space: nowrap;
  width: 1%;
}

.ep-accordion__item {
  border: 1px solid var(--yg-accordion-border-color, var(--ep-t-border));
  border-radius: var(--yg-accordion-border-radius, var(--ep-t-radius));
  margin-bottom: var(--yg-accordion-margin-bottom, 8px);
  background: var(--ep-bg, var(--yg-accordion-bg, var(--ep-t-card)));
  box-shadow: var(--yg-accordion-shadow, none);
  overflow: hidden;
  padding: 0;
}
.ep-accordion__summary {
  cursor: pointer;
  position: relative;
  display: block;
  width: 100%;
  text-align: left;
  font-weight: var(--yg-accordion-header-font-weight, 700);
  font-size: var(--yg-accordion-header-font-size, inherit);
  color: var(--ep-fg, var(--yg-accordion-header-text, var(--ep-t-heading)));
  background: var(--ep-bg, var(--yg-accordion-header-bg, transparent));
  padding: var(--yg-accordion-header-padding-y, 12px) var(--yg-accordion-header-padding-x, 14px);
  list-style: none;
}
.ep-accordion__summary::-webkit-details-marker,
.ep-accordion__summary::marker { display: none; content: none; }
.ep-accordion__item[open] > .ep-accordion__summary {
  background: var(--ep-bg, var(--yg-accordion-header-open-bg, var(--yg-accordion-header-bg, transparent)));
  color: var(--ep-fg, var(--yg-accordion-header-open-text, var(--yg-accordion-header-text, var(--ep-t-heading))));
  border-bottom: 1px solid var(--yg-accordion-border-color, var(--ep-t-border));
}
.ep-accordion__body {
  padding: var(--yg-accordion-content-padding, 14px);
  color: var(--ep-fg, var(--yg-accordion-content-text, var(--ep-t-text)));
  font-size: var(--yg-accordion-content-font-size, inherit);
  line-height: 1.6;
  background: var(--ep-bg, var(--yg-accordion-bg, var(--ep-t-card)));
}

.ep-accordion__body .ep-sector-cards,
.ep-sector-cards {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  gap: 12px;
  margin: 0;
}
.ep-accordion__body a.ep-sector-card,
a.ep-sector-card {
  display: flex;
  flex-direction: column;
  gap: 6px;
  min-height: 132px;
  padding: 14px 16px 12px;
  border: 1px solid var(--ep-t-border, #d0d5dd);
  border-radius: 10px;
  background: #fff;
  color: var(--ep-t-text, #1a1a2e);
  text-decoration: none;
  box-shadow: 0 1px 2px rgba(16, 24, 40, 0.04);
  transition: box-shadow .18s ease, transform .18s ease, border-color .18s ease;
}
.ep-accordion__body a.ep-sector-card:hover,
.ep-accordion__body a.ep-sector-card:focus,
a.ep-sector-card:hover,
a.ep-sector-card:focus {
  text-decoration: none;
  color: var(--ep-t-text, #1a1a2e);
  border-color: var(--ep-t-primary, #d1002d);
  box-shadow: 0 6px 16px rgba(16, 24, 40, 0.08);
  transform: translateY(-1px);
}
.ep-sector-card__kicker {
  font-size: 0.7rem;
  font-weight: 700;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  color: var(--ep-t-muted, #667085);
}
.ep-sector-card__title {
  font-size: 1rem;
  font-weight: 700;
  line-height: 1.3;
  color: var(--ep-t-heading, #1a1a2e);
}
.ep-sector-card__blurb {
  font-size: 0.88rem;
  line-height: 1.4;
  color: var(--ep-t-text, #3a3c42);
  flex: 1;
}
.ep-sector-card__cta {
  margin-top: 4px;
  font-size: 0.82rem;
  font-weight: 700;
  color: var(--ep-t-primary, #d1002d);
}

.ep-callout {
  padding: 16px 18px;
  border-radius: var(--ep-t-radius);
  border-left: 8px solid var(--ep-t-primary);
  background: var(--ep-t-surface);
}
.ep-callout--success { border-left-color: var(--ep-t-success); }
.ep-callout--warning { border-left-color: var(--ep-t-warning); background: color-mix(in srgb, var(--ep-t-warning) 12%, var(--ep-t-card)); }
.ep-callout--neutral { border-left-color: var(--ep-t-muted); }
.ep-callout__title { display: block; margin-bottom: 6px; color: var(--ep-t-text); }
.ep-callout__body { color: var(--ep-t-text); line-height: 1.55; }

.ep-image { margin: 0; }
.ep-image__img {
  display: block;
  width: 100%;
  height: auto;
  border-radius: var(--ep-t-radius);
}
.ep-image figcaption {
  margin-top: 8px;
  color: var(--ep-t-muted);
  font-size: 0.9rem;
}

.ep-oembed { margin: 0; }
.ep-oembed__title {
  margin: 0 0 8px;
  color: var(--ep-t-text);
  font-weight: 600;
}
.ep-oembed__media {
  position: relative;
  width: 100%;
  aspect-ratio: 16 / 9;
  overflow: hidden;
  border-radius: var(--ep-t-radius);
  background: #111;
}
.ep-oembed__media iframe,
.ep-oembed__media .oembed_snippet,
.ep-oembed__media .oembed_snippet > iframe {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  border: 0;
  max-width: 100%;
}
.ep-oembed__media .oembed_snippet {
  display: block;
}

.ep-hubspot-form { margin: 0; }
.ep-hubspot-form__title {
  margin: 0 0 12px;
  color: var(--ep-t-text);
  font-weight: 600;
  font-size: 1.25rem;
}
.ep-hubspot-form .hs-form-frame {
  min-height: 120px;
}

.ep-custom-html { margin: 0; }
.ep-custom-html__title {
  margin: 0 0 12px;
  color: var(--ep-t-text);
  font-weight: 600;
  font-size: 1.25rem;
}
.ep-custom-html__body {
  min-width: 0;
}
.ep-custom-html-field {
  font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
  font-size: 13px;
  line-height: 1.45;
}

.ep-repeat-item { margin-bottom: 8px; }

@media (max-width: 640px) {
  .ep-events__item { grid-template-columns: 1fr; }
}

.engagement-page-toolbar {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
  align-items: center;
  margin-bottom: 20px;
  padding: 12px 14px;
  background: var(--ep-t-surface);
  border: 1px solid var(--ep-t-border);
  border-radius: var(--ep-t-radius);
}

.engagement-page-toolbar .ep-inline-form {
  display: inline;
  margin: 0;
}

.engagement-page-toolbar .ep-public-link {
  margin-left: auto;
  font-size: 13px;
  color: var(--ep-t-muted);
}

.ep-block {
  margin: 0;
}
.ep-align[data-ep-radius] > .ep-block:not(.ep-contact-card) {
  border-radius: var(--ep-t-radius);
}
.ep-align[data-ep-radius] > .ep-block:not(.ep-collection):not(.ep-directory-list):not(.ep-contact-card) {
  overflow: hidden;
}

.ep-hero {
  position: relative;
  display: block;
  overflow: hidden;
  background: var(--ep-bg, var(--ep-t-hero-bg));
  border: var(--ep-border-width, 1px) solid var(--ep-border, var(--ep-t-border));
  border-radius: var(--ep-t-radius);
  min-height: 220px;
  color: var(--ep-fg, var(--ep-t-hero-fg, #ffffff));
  box-sizing: border-box;
}

.ep-hero.ep-hero--no-border {
  border: none !important;
}

.ep-hero.has-image {
  min-height: 280px;
}

.ep-hero-image {
  display: block;
  width: 100%;
  height: 220px;
  object-fit: cover;
}

.ep-hero.has-image .ep-hero-image {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  min-height: 280px;
  object-fit: cover;
  z-index: 0;
}

.ep-hero.has-image::after {
  content: "";
  position: absolute;
  inset: 0;
  z-index: 1;
  pointer-events: none;
  background: linear-gradient(
    to top,
    rgba(0, 22, 56, 0.82) 0%,
    rgba(0, 48, 120, 0.45) 45%,
    rgba(0, 48, 120, 0.2) 100%
  );
}

.ep-hero-body {
  position: relative;
  z-index: 2;
  padding: 28px 24px;
  background: var(--ep-bg, var(--ep-t-hero-bg));
  color: var(--ep-fg, var(--ep-t-hero-fg, #ffffff));
}

.ep-hero.has-image .ep-hero-body {
  background: transparent;
  min-height: 280px;
  display: flex;
  flex-direction: column;
  justify-content: flex-end;
  padding: 40px 28px 28px;
}

.ep-hero-body h1 {
  margin: 0 0 12px;
  color: var(--ep-fg, var(--ep-t-hero-fg, #ffffff));
  font-family: var(--ep-t-heading-font);
  font-size: var(--ep-t-h1);
  line-height: 1.25;
  font-weight: 700;
}

.ep-hero-sub {
  margin: 0 0 20px;
  color: var(--ep-fg, var(--ep-t-hero-fg, #ffffff));
  opacity: 0.92;
  font-size: 1.05rem;
  line-height: 1.5;
}

.ep-hero-body .btn {
  margin-top: 4px;
  align-self: flex-start;
}

.ep-rich-text {
  padding: 8px 4px;
}

.ep-rich-text h2 {
  color: var(--ep-t-heading);
  margin: 0 0 12px;
  font-size: 1.35rem;
  line-height: 1.3;
}

.ep-rich-text-body {
  color: var(--ep-t-text);
  font-size: 1.05rem;
  line-height: 1.65;
}

.ep-survey-cta {
  padding: 28px 24px;
  border-left: 8px solid var(--ep-t-primary);
  background: var(--ep-t-surface);
  border-radius: 0 4px 4px 0;
  text-align: left;
}

.ep-survey-cta .ep-survey-intro {
  margin: 0 0 16px;
  color: var(--ep-t-text);
  font-size: 1.05rem;
  line-height: 1.5;
}

.ep-survey-cta .ep-survey-meta {
  margin-top: 10px;
  color: var(--ep-t-muted);
  font-size: 0.9rem;
}

.ep-downloads {
  padding: 8px 4px;
}

.ep-downloads h2 {
  color: var(--ep-t-heading);
  font-size: 1.25rem;
  margin: 0 0 12px;
}

.ep-downloads ul {
  list-style: none;
  padding: 0;
  margin: 0;
}

.ep-downloads li {
  margin: 0 0 10px;
}

.ep-downloads a {
  display: inline-flex;
  gap: 10px;
  align-items: center;
  color: var(--ep-t-primary);
  font-weight: 600;
  text-decoration: underline;
}

.ep-section-editor .ep-section {
  border: 1px solid var(--ep-t-border);
  border-radius: var(--ep-t-radius);
  padding: 14px;
  margin-bottom: 12px;
  background: var(--ep-t-card);
}

.ep-section-editor .ep-section-head {
  display: flex;
  gap: 8px;
  align-items: center;
  margin-bottom: 10px;
}

.ep-section-editor .ep-section-head strong {
  flex: 1;
}

.ep-section-editor .ep-download-row {
  display: grid;
  grid-template-columns: 1fr 1fr auto;
  gap: 8px;
  margin-bottom: 8px;
}

.ep-page-list .ep-page-card {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  align-items: center;
  border-bottom: 1px solid var(--ep-t-border);
  padding: 14px 0;
}

.ep-page-list .ep-page-meta {
  color: var(--ep-t-muted);
  font-size: 13px;
  margin-top: 4px;
}

.ep-page-actions {
  display: flex;
  gap: 6px;
  flex-wrap: wrap;
  align-items: center;
}

@media (max-width: 640px) {
  .thiscovery-page-builder-public-shell {
    padding: 16px 12px 32px;
  }

  /* Hero with image: show image as a banner, text below (avoids heavy crop/overlay) */
  .ep-hero {
    min-height: 0;
  }

  .ep-hero.has-image {
    min-height: 0;
    display: flex;
    flex-direction: column;
  }

  .ep-hero.has-image .ep-hero-image {
    position: relative;
    inset: auto;
    width: 100%;
    height: auto;
    min-height: 0;
    max-height: none;
    aspect-ratio: 16 / 9;
    object-fit: cover;
    object-position: center;
    z-index: 0;
  }

  .ep-hero.has-image::after {
    display: none;
  }

  .ep-hero.has-image .ep-hero-body {
    position: relative;
    z-index: 1;
    min-height: 0;
    justify-content: flex-start;
    padding: 20px 16px;
    background: var(--ep-bg, #003078);
  }

  .ep-hero-body {
    padding: 22px 18px;
  }

  .ep-hero-body h1 {
    font-size: 1.4rem;
  }

  .ep-page-list .ep-page-card {
    flex-direction: column;
    align-items: flex-start;
  }
}

/* —— Studio builder (forms-like) —— */
.ep-studio {
  overflow: hidden;
  display: flex;
  flex-direction: column;
}
.ep-studio__form {
  display: flex;
  flex-direction: column;
  min-height: 0;
  flex: 1;
  overflow: hidden;
}
.ep-studio__form > script {
  display: none !important;
}
.ep-studio__tabs {
  display: flex; gap: 0; padding: 0 1.25rem;
  border-bottom: 1px solid #e5e7eb; background: #fff;
  align-items: stretch; flex-wrap: wrap; flex-shrink: 0;
}
.ep-studio__help-link {
  margin-left: auto;
  display: inline-flex; align-items: center; gap: .4rem;
  padding: .7rem .4rem .65rem;
  color: #64748b; font-weight: 600; font-size: .88rem;
  text-decoration: none; white-space: nowrap;
}
.ep-studio__help-link:hover { color: #2563eb; }
.ep-studio__tab {
  appearance: none; border: 0; background: transparent;
  padding: .95rem 1rem .85rem; margin: 0; font-weight: 600; font-size: .92rem;
  color: #64748b; border-bottom: 2px solid transparent; cursor: pointer;
}
.ep-studio__tab:hover { color: #0f172a; }
.ep-studio__tab.is-active { color: #2563eb; border-bottom-color: #2563eb; }
.ep-studio__panel { display: none; flex: 1; }
.ep-studio__panel.is-active { display: flex; flex-direction: column; min-height: 0; }
.ep-studio__panel[data-ep-panel="settings"] { overflow: hidden; }
.ep-studio__rail {
  display: flex;
  flex-direction: column;
  min-height: 0;
  height: 100%;
  background: #fff;
  border-right: 1px solid #e5e7eb;
  overflow: hidden;
}
.ep-studio-rail__item {
  cursor: pointer;
  -webkit-user-drag: none;
  align-items: flex-start;
}
.ep-studio-rail__item.is-active {
  background: #f1f5f9;
  border-color: #e2e8f0;
}
.ep-studio-rail__text {
  min-width: 0;
  display: flex;
  flex-direction: column;
  gap: .12rem;
}
.ep-studio-rail__summary {
  display: block;
  color: #64748b;
  font-size: .72rem;
  line-height: 1.35;
  font-weight: 400;
}
.ep-settings-workspace {
  display: grid;
  grid-template-columns: 250px minmax(0, 1fr);
  grid-template-rows: minmax(0, 1fr);
  flex: 1;
  min-height: 520px;
  background: #f8fafc;
  overflow: hidden;
}
.ep-settings-main {
  overflow: auto;
  -webkit-overflow-scrolling: touch;
  background: #fff;
  min-height: 0;
}
.ep-settings-pane { display: none; padding: 1.5rem 1.75rem 2rem; max-width: 860px; }
.ep-settings-pane.is-active { display: block; }
.ep-settings-pane__title {
  margin: 0 0 1rem;
  font-size: 1.2rem;
  font-weight: 650;
}
.ep-settings-pane[data-ep-settings-pane="css"],
.ep-settings-pane[data-ep-settings-pane="versions"] {
  max-width: none;
}
.ep-settings-pane .ep-studio__settings {
  padding: 0;
  max-width: none;
}
@media (max-width: 991px) {
  .ep-settings-workspace {
    grid-template-columns: 1fr;
    min-height: 0;
    height: auto !important;
    overflow: visible;
  }
  .ep-studio__rail {
    height: auto;
    border-right: 0;
    border-bottom: 1px solid #e5e7eb;
  }
}
.ep-studio__workspace {
  display: grid;
  grid-template-columns: 240px minmax(0, 1fr);
  grid-template-rows: minmax(0, 1fr);
  gap: 0;
  flex: 1;
  min-height: 520px;
  background: #f8fafc;
  overflow: hidden;
}
.ep-studio__canvas {
  position: relative; padding: 1.25rem 1.35rem 2rem; overflow: auto;
  min-height: 0; height: 100%;
  background: #f8fafc;
  border-left: 1px solid #e5e7eb; transition: background .15s, box-shadow .15s;
  min-width: 0;
  -webkit-overflow-scrolling: touch;
}
.ep-layout-bar {
  display: flex;
  flex-wrap: wrap;
  gap: .5rem;
  align-items: center;
  margin-bottom: 1rem;
  padding: .75rem 1rem;
  background: #fff;
  border: 1px solid #e5e7eb;
  border-radius: 12px;
  box-shadow: 0 1px 2px rgba(16, 24, 40, .04);
}
.ep-layout-bar__label { font-weight: 700; font-size: .82rem; margin: 0; color: #0f172a; }
.ep-layout-bar__select {
  min-width: 140px;
  max-width: 220px;
  padding: .4rem .6rem;
  border: 1px solid #e2e8f0;
  border-radius: 8px;
  background: #fff;
}
.ep-layout-bar__hint { margin: 0; font-size: .82rem; color: #64748b; flex: 1 1 100%; }
.ep-builder-board { display: flex; flex-direction: column; gap: .75rem; }
.ep-builder-columns {
  display: grid;
  gap: .85rem;
  align-items: stretch;
  width: 100%;
  min-width: 0;
}
/* Explicit areas so hidden side columns do not collapse the layout */
.ep-builder-columns[data-layout="main"] {
  grid-template-columns: minmax(0, 1fr);
  grid-template-areas: "main";
}
.ep-builder-columns[data-layout="left"] {
  grid-template-columns: minmax(200px, 280px) minmax(0, 1fr);
  grid-template-areas: "left main";
}
.ep-builder-columns[data-layout="right"] {
  grid-template-columns: minmax(0, 1fr) minmax(200px, 280px);
  grid-template-areas: "main right";
}
.ep-builder-columns[data-layout="both"] {
  grid-template-columns: minmax(180px, 240px) minmax(0, 1fr) minmax(180px, 240px);
  grid-template-areas: "left main right";
}
.ep-builder-columns > [data-ep-region="left"] { grid-area: left; }
.ep-builder-columns > [data-ep-region="main"] { grid-area: main; }
.ep-builder-columns > [data-ep-region="right"] { grid-area: right; }
.ep-region.is-hidden,
.ep-region[hidden] { display: none !important; }
.ep-region {
  background: #fff;
  border: 2px dashed #cbd5e1;
  border-radius: 12px;
  min-height: 180px;
  display: flex;
  flex-direction: column;
  overflow: visible;
  min-width: 0;
}
.ep-builder-columns > .ep-region:not(.is-hidden):not([hidden]) {
  box-shadow: 0 1px 2px rgba(16, 24, 40, .04);
  min-height: 220px;
}
.ep-builder-columns [data-ep-region="left"] .ep-region__head,
.ep-builder-columns [data-ep-region="right"] .ep-region__head {
  background: #eff6ff;
  border-bottom-color: #dbeafe;
}
.ep-builder-columns [data-ep-region="left"] .ep-region__label,
.ep-builder-columns [data-ep-region="right"] .ep-region__label {
  color: #2563eb;
}
.ep-section-placeholder {
  min-height: 52px; border: 2px dashed #93c5fd; border-radius: 12px; background: #eff6ff;
}
.ep-edit-stage {
  margin-bottom: 1rem; background: var(--ep-t-card); border: 1px solid #93c5fd; border-radius: 12px;
  box-shadow: 0 10px 30px rgba(15, 23, 42, .12); overflow: hidden;
}
.ep-edit-stage.d-none { display: none !important; }
.ep-edit-stage__bar {
  display: flex; justify-content: space-between; align-items: center; gap: .75rem;
  padding: .7rem 1rem; background: #eff6ff; border-bottom: 1px solid #bfdbfe;
}
.ep-edit-stage__bar strong { font-size: .92rem; color: var(--ep-t-text); }
.ep-edit-stage__body { padding: .85rem 1rem 1.15rem; }
.ep-edit-stage__body > .ep-section-card {
  border: 0; box-shadow: none; border-radius: 0;
}
.ep-edit-stage__body > .ep-section-card.is-expanded {
  border-color: transparent; box-shadow: none;
}
.ep-studio.is-editing-section .ep-builder-board {
  opacity: .72;
}
.ep-studio.is-editing-section [data-ep-placeholder] {
  pointer-events: none;
}
.ep-edit-stage:not(.d-none) {
  position: relative;
  z-index: 30;
}
.ep-edit-stage:not(.d-none) .ep-section-card.is-editing {
  pointer-events: auto;
}
.ep-region[data-ep-region="full"] { min-height: 140px; }
.ep-region__head {
  display: flex; justify-content: space-between; align-items: center;
  padding: .55rem .85rem; background: #f8fafc; border-bottom: 1px solid #e5e7eb;
  border-radius: 10px 10px 0 0;
}
.ep-region__label { font-size: .72rem; font-weight: 700; text-transform: uppercase; letter-spacing: .04em; color: #64748b; }
.ep-region__hint { font-size: .72rem; color: #94a3b8; }
.ep-region__list {
  flex: 1 1 auto;
  min-height: 110px;
  padding: .75rem;
  display: flex;
  flex-direction: column;
  gap: .75rem;
  transition: background .12s, box-shadow .12s;
}
.ep-region__list:not(:has([data-ep-section])) {
  justify-content: center;
  align-items: center;
}
.ep-region__list:not(:has([data-ep-section]))::after {
  content: attr(data-empty-label);
  display: flex;
  align-items: center;
  justify-content: center;
  min-height: 88px;
  width: 100%;
  text-align: center;
  color: #94a3b8;
  font-size: .88rem;
  font-weight: 600;
  border: 1px dashed #e2e8f0;
  border-radius: 10px;
  background: #f8fafc;
  padding: 1.25rem .75rem;
}
.ep-region__list.is-drop-target,
.ep-container-children.is-drop-target { background: #eff6ff; }
.ep-region__list.is-drag-over,
.ep-container-children.is-drag-over {
  background: #dbeafe; box-shadow: inset 0 0 0 2px #93c5fd;
}
.ep-container-zone {
  border-top: 1px dashed #e5e7eb; padding: .75rem .85rem 1rem; background: #f8fafc;
}
.ep-container-zone__label {
  font-size: .78rem; font-weight: 600; color: var(--ep-t-muted); margin-bottom: .5rem;
}
.ep-container-zone__grid {
  display: grid;
  gap: .65rem;
  align-items: start;
}
.ep-container-zone__grid[data-cols="2"] { grid-template-columns: repeat(2, minmax(0, 1fr)); }
.ep-container-zone__grid[data-cols="3"] { grid-template-columns: repeat(3, minmax(0, 1fr)); }
.ep-container-zone__grid[data-cols="4"] { grid-template-columns: repeat(4, minmax(0, 1fr)); }
.ep-container-col__label {
  font-size: .72rem; font-weight: 700; text-transform: uppercase; letter-spacing: .04em;
  color: var(--ep-t-muted); margin-bottom: .35rem;
}
.ep-container-children {
  min-height: 64px; display: flex; flex-direction: column; gap: .55rem;
  border: 1px dashed var(--ep-t-muted); border-radius: 8px; padding: .5rem;
  transition: background .12s, box-shadow .12s;
}
@media (max-width: 900px) {
  .ep-container-zone__grid[data-cols="2"],
  .ep-container-zone__grid[data-cols="3"],
  .ep-container-zone__grid[data-cols="4"] {
    grid-template-columns: 1fr;
  }
}
/* Keep side-by-side columns in normal admin widths; stack only on small screens */
@media (max-width: 900px) {
  .ep-builder-columns[data-layout="left"],
  .ep-builder-columns[data-layout="right"],
  .ep-builder-columns[data-layout="both"] {
    grid-template-columns: 1fr;
    grid-template-areas:
      "left"
      "main"
      "right";
  }
  .ep-layout-bar { grid-template-columns: 1fr; }
}
.ep-studio__canvas.is-drop-target { background: #eff6ff; }
.ep-studio__canvas.is-drag-over { box-shadow: inset 0 0 0 2px #93c5fd; }
.ep-canvas-empty {
  display: none !important;
}
.ep-canvas-empty.d-none { display: none !important; }
.ep-canvas-empty__inner { text-align: center; padding: 2rem 1.5rem; }
.ep-canvas-empty__inner i { font-size: 2rem; color: var(--ep-t-muted); margin-bottom: .75rem; }
.ep-canvas-empty__inner p { margin: 0 0 .35rem; font-size: 1.05rem; font-weight: 600; color: var(--ep-t-text); }
.ep-canvas-empty__inner span { font-size: .88rem; color: var(--ep-t-muted); }
.ep-studio__palette {
  display: flex;
  flex-direction: column;
  min-height: 0;
  height: 100%;
  background: #fff;
  overflow: hidden;
  padding: 0;
  max-height: none;
  border-right: 0;
}
.ep-palette__scroll {
  flex: 1 1 auto;
  min-height: 0;
  overflow-y: auto;
  overflow-x: hidden;
  padding: .75rem .85rem 1.25rem;
  -webkit-overflow-scrolling: touch;
}
.ep-palette__title {
  font-size: .78rem; font-weight: 700; text-transform: uppercase; letter-spacing: .04em;
  color: #94a3b8; margin: 0 0 .75rem .35rem;
}
.ep-palette__group { margin-bottom: 1rem; }
.ep-palette__group-label {
  font-size: .72rem; font-weight: 600; text-transform: uppercase; letter-spacing: .03em;
  color: #94a3b8; margin: 0 .35rem .4rem;
}
.ep-palette__item {
  display: flex; align-items: center; gap: .65rem; width: 100%; text-align: left;
  border: 1px solid transparent; background: transparent; border-radius: 8px;
  padding: .55rem .6rem; margin: 0 0 .15rem; color: #0f172a; cursor: grab;
  transition: background .12s, border-color .12s;
}
.ep-palette__item:hover { background: #f1f5f9; border-color: #e2e8f0; }
.ep-palette__item.is-dragging { opacity: .55; }
.ep-studio-rail__item.ep-palette__item { cursor: pointer; -webkit-user-drag: none; }
.ep-palette__icon {
  width: 1.6rem; height: 1.6rem; display: inline-flex; align-items: center; justify-content: center;
  color: #475569; flex-shrink: 0;
}
.ep-palette__label { font-size: .9rem; font-weight: 500; line-height: 1.2; }
.ep-palette__clear { margin-top: .75rem; width: 100%; }
.ep-studio__settings { padding: 1.5rem 1.75rem 2rem; max-width: 860px; }
.ep-studio__hint { color: var(--ep-t-muted); font-size: .9rem; margin-bottom: 1rem; }
.ep-studio__nav {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: .75rem;
  padding: .7rem 1rem;
  border-bottom: 1px solid var(--ep-t-border, #e5e7eb);
  background: #f8fafc;
  position: sticky;
  top: 0;
  z-index: 5;
  flex-shrink: 0;
}
.ep-studio__nav-title {
  flex: 1;
  min-width: 0;
  font-weight: 700;
  color: var(--ep-t-heading, #0f172a);
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.ep-studio__nav-actions {
  display: flex;
  align-items: center;
  gap: .5rem;
  flex-shrink: 0;
  margin-inline-start: .5rem;
}
.ep-studio__nav-actions .btn,
.ep-studio__footer-actions .btn {
  display: inline-flex;
  align-items: center;
  gap: .45rem;
  min-height: 2.4rem;
  padding: .45rem 1rem;
  font-size: .95rem;
  font-weight: 700;
  white-space: nowrap;
}
.ep-studio__footer {
  display: flex; justify-content: space-between; align-items: center; gap: .75rem; flex-wrap: wrap;
  padding: .9rem 1.25rem; border-top: 1px solid #e5e7eb; background: #fff;
  flex-shrink: 0;
  position: relative;
  z-index: 6;
}
.ep-studio__footer-actions {
  display: flex;
  align-items: center;
  gap: .5rem;
  flex-wrap: wrap;
  margin-inline-start: auto;
}
.ep-set-toolbar {
  display: flex;
  gap: .5rem;
  margin-bottom: .85rem;
}
.ep-set-acc {
  border: 1px solid #e2e8f0;
  border-radius: 10px;
  margin-bottom: .55rem;
  background: #fff;
}
.ep-set-acc > summary {
  display: flex;
  flex-wrap: wrap;
  align-items: baseline;
  gap: .25rem .75rem;
  cursor: pointer;
  list-style: none;
  padding: .8rem 1rem;
}
.ep-set-acc > summary::-webkit-details-marker { display: none; }
.ep-set-acc > summary::after {
  content: "\f107";
  font-family: FontAwesome;
  margin-inline-start: auto;
  color: #94a3b8;
}
.ep-set-acc[open] > summary::after { content: "\f106"; }
.ep-set-acc__title { font-weight: 700; color: #0f172a; }
.ep-set-acc__summary { font-size: .82rem; color: #64748b; font-weight: 500; }
.ep-set-acc__body { padding: .15rem 1rem 1.1rem; border-top: 1px solid #e2e8f0; }
.ep-set-acc__intro { margin: .75rem 0 1rem; color: #64748b; font-size: .92rem; }
.ep-field {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  column-gap: .4rem;
  align-items: center;
}
.ep-field > .ep-label {
  grid-column: 1;
  grid-row: 1;
  margin-bottom: 0;
}
.ep-field > .form-control,
.ep-field > .input-group,
.ep-field > .ep-rich-editor,
.ep-field > .help-block,
.ep-field > .ep-hint,
.ep-field > select,
.ep-field > p {
  grid-column: 1 / -1;
}
.ep-check-setting {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  column-gap: .4rem;
  align-items: center;
  margin-bottom: .75rem;
}
.ep-check-setting > div:first-child,
.ep-check-setting > label {
  grid-column: 1;
  grid-row: 1;
}
.ep-guide { display: contents; }
.ep-guide__toggle {
  grid-column: 2;
  grid-row: 1;
  justify-self: end;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 1.6rem;
  height: 1.6rem;
  padding: 0;
  border: 0;
  border-radius: 999px;
  background: none;
  color: #64748b;
  font-size: 1rem;
  line-height: 1;
  cursor: pointer;
}
.ep-guide__toggle:hover,
.ep-guide__toggle:focus,
.ep-guide__toggle.is-open {
  color: #2563eb;
  background: #eff6ff;
}
.ep-guide__panel {
  grid-column: 1 / -1;
  grid-row: 2;
  margin: .4rem 0 .15rem;
  padding: .65rem .75rem;
  border-radius: 8px;
  background: #eff6ff;
  border: 1px solid #bfdbfe;
  color: #1e3a8a;
  font-size: .9rem;
}
.ep-guide__panel > :last-child { margin-bottom: 0; }
.ep-guide__panel p { margin: 0 0 .4rem; }
.ep-section__title { margin: 0 0 1rem; font-size: 1.05rem; font-weight: 700; }
.ep-label { display: block; font-weight: 600; margin-bottom: .35rem; font-size: .9rem; }
.ep-optional { font-weight: 400; color: var(--ep-t-muted); font-size: .85rem; }
.ep-hint { font-size: .85rem; margin-top: .5rem; }
.ep-copy-feedback { margin-top: .5rem; font-size: .85rem; font-weight: 600; }
.ep-field-note {
  display: flex; gap: .5rem; align-items: flex-start; margin-bottom: .5rem;
  font-size: .85rem; color: var(--ep-t-muted);
}
.ep-field-note i { margin-top: .15rem; color: var(--ep-t-muted); }
.ep-rich-editor { margin-top: .35rem; }
.ep-rich-editor textarea.ep-tinymce { min-height: 8rem; }
.ep-rich-editor .tox-tinymce {
  border-radius: 8px;
  border-color: var(--ep-t-border, #d0d5dd);
}
.ep-studio .tox-tinymce-aux,
.ep-studio .tox.tox-silver-sink,
body .tox-tinymce-aux { z-index: 2400; }

@media (max-width: 768px) {
  .ep-studio__nav-title { flex-basis: 100%; order: -1; }
  .ep-studio__nav-actions { width: 100%; margin-inline-start: 0; }
  .ep-studio__nav-actions .btn { flex: 1 1 auto; justify-content: center; }
}

.ep-sections-list { display: flex; flex-direction: column; gap: .75rem; }
.ep-sections-list.is-sorting .ep-section-card { transition: transform .1s; }
.ep-section-card {
  background: #fff;
  border: 1px solid #dce1e7;
  border-radius: 10px;
  box-shadow: 0 1px 2px rgba(16, 24, 40, .04);
  overflow: hidden;
}
.ep-section-card.is-collapsed .ep-section-card__body { display: none; }
.ep-section-card.is-expanded {
  border-color: #93c5fd; box-shadow: 0 0 0 2px rgba(37, 99, 235, .12);
}
.ep-section-card.is-reordering {
  opacity: .85; box-shadow: 0 12px 28px rgba(15, 23, 42, .16);
  border-color: #2563eb; z-index: 5; position: relative;
}
.ep-section-card__header {
  display: flex; align-items: center; gap: .75rem; padding: .75rem 1rem; cursor: pointer;
  background: linear-gradient(180deg, #fafbfc 0%, #f4f6f8 100%);
  border-bottom: 1px solid #e8ebef;
}
.ep-section-card.is-collapsed .ep-section-card__header {
  border-bottom: 0;
}
.ep-section-card__handle {
  cursor: grab; touch-action: none; user-select: none; width: 1.75rem; height: 1.75rem;
  display: inline-flex; align-items: center; justify-content: center; border-radius: 6px;
  color: #64748b; flex-shrink: 0;
}
.ep-section-card__handle:hover { background: #e2e8f0; color: #0f172a; }
.ep-section-card__handle:active, .ep-sections-list.is-sorting .ep-section-card__handle { cursor: grabbing; }
.ep-section-card__title { display: flex; align-items: center; gap: .5rem; flex: 1; min-width: 0; }
.ep-section-card__index {
  display: inline-flex; align-items: center; justify-content: center;
  width: 1.5rem; height: 1.5rem; border-radius: 999px; background: #e8eef7;
  color: #344054; font-size: .75rem; font-weight: 700;
}
.ep-section-card__name {
  font-weight: 600; color: #1f2937; white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
}
.ep-section-card__type-badge {
  font-size: .7rem; font-weight: 600; text-transform: uppercase; letter-spacing: .02em;
  padding: .15rem .45rem; border-radius: 999px; background: #eef2ff; color: #3730a3;
  white-space: nowrap;
}
.ep-section-card__actions { display: flex; gap: .25rem; flex-shrink: 0; }
.ep-section-card__body { padding: 1rem 1.1rem 1.15rem; border-top: 0; }
.ep-section-card--child { border-style: solid; border-radius: 10px; }
.ep-section-card--container > .ep-section-card__header {
  background: linear-gradient(180deg, #fafbfc 0%, #f4f6f8 100%);
}
.ep-hero-sub.richtext-output,
.ep-hero-sub.richtext-output p { color: var(--ep-fg, var(--ep-t-hero-fg, #fff)); }
.ep-hero-sub.richtext-output a { color: var(--ep-fg, var(--ep-t-hero-fg, #fff)); text-decoration: underline; }

/* Custom colours from builder (CSS variables on .ep-align) */
.ep-align[data-ep-colored="1"] > .ep-block:not(.ep-hero):not(.ep-contact-card) {
  background-color: var(--ep-bg, transparent);
  color: var(--ep-fg, inherit);
  border-radius: var(--ep-t-radius);
  padding: 12px 14px;
}
.ep-align[data-ep-colored="1"] > .ep-block:not(.ep-hero) > h1,
.ep-align[data-ep-colored="1"] > .ep-block:not(.ep-hero) > h2,
.ep-align[data-ep-colored="1"] > .ep-block:not(.ep-hero) > h3,
.ep-align[data-ep-colored="1"] > .ep-block:not(.ep-hero) > h4,
.ep-align[data-ep-colored="1"] > .ep-block:not(.ep-hero) > h5,
.ep-align[data-ep-colored="1"] > .ep-block:not(.ep-hero) > h6,
.ep-align[data-ep-colored="1"] > .ep-contact .ep-contact__name,
.ep-align[data-ep-colored="1"] > .ep-contact .ep-contact__role,
.ep-align[data-ep-colored="1"] > .ep-contact .ep-contact__org,
.ep-align[data-ep-colored="1"] > .ep-contact .ep-contact__notes,
.ep-align[data-ep-colored="1"] > .ep-contact .ep-contact__row dt,
.ep-align[data-ep-colored="1"] > .ep-contact .ep-contact__row dd,
.ep-align[data-ep-colored="1"] > .ep-container > .ep-container__title {
  color: var(--ep-fg, var(--ep-t-heading));
}
.ep-align[data-ep-colored="1"] > .ep-contact a:not(.btn) {
  color: var(--ep-fg, var(--ep-t-link));
}
.ep-align[data-ep-colored="1"] > .ep-contact-card .ep-contact-card__name,
.ep-align[data-ep-colored="1"] > .ep-contact-card .ep-contact-card__role,
.ep-align[data-ep-colored="1"] > .ep-contact-card .ep-contact-card__org,
.ep-align[data-ep-colored="1"] > .ep-contact-card .ep-contact-card__intro {
  color: var(--ep-fg, var(--ep-t-heading));
}
.ep-align[data-ep-colored="1"] > .ep-contact-card .ep-contact-card__person {
  background: var(--ep-bg, var(--ep-t-card, #fff));
}

.ep-color-fields {
  margin: 0 0 1rem;
  padding: 12px 14px;
  background: var(--ep-t-surface);
  border: 1px solid var(--ep-t-border);
  border-radius: 10px;
}
.ep-color-fields__title {
  font-weight: 700;
  font-size: 0.9rem;
  color: var(--ep-t-text);
  margin-bottom: 4px;
}
.ep-color-input {
  display: flex;
  align-items: center;
  gap: 8px;
}
.ep-color-input__picker {
  width: 42px;
  height: 38px;
  padding: 0;
  border: 1px solid var(--ep-t-border);
  border-radius: 6px;
  background: var(--ep-t-card);
  cursor: pointer;
  flex-shrink: 0;
}
.ep-color-input__text {
  flex: 1;
  min-width: 0;
  font-family: ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, monospace;
}
.ep-color-presets {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  margin-top: 8px;
}
.ep-color-presets__swatch {
  width: 24px;
  height: 24px;
  border-radius: 999px;
  border: 1px solid rgba(0, 0, 0, 0.15);
  padding: 0;
  cursor: pointer;
  box-shadow: inset 0 0 0 1px rgba(255, 255, 255, 0.35);
}
.ep-color-presets__swatch:hover,
.ep-color-presets__swatch:focus {
  outline: 2px solid var(--ep-t-primary);
  outline-offset: 1px;
}
.ep-radius-input {
  display: flex;
  align-items: center;
  gap: 8px;
  max-width: 280px;
}
.ep-radius-input__number {
  max-width: 110px;
}
.ep-radius-input__unit {
  color: var(--ep-t-muted);
  font-size: 0.9rem;
  flex-shrink: 0;
}
.ep-radius-presets {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  margin-top: 8px;
}
.ep-radius-presets__chip {
  border: 1px solid var(--ep-t-border);
  background: var(--ep-t-card);
  color: var(--ep-t-text);
  border-radius: 999px;
  padding: 2px 10px;
  font-size: 0.8rem;
  line-height: 1.5;
  cursor: pointer;
}
.ep-radius-presets__chip:hover,
.ep-radius-presets__chip:focus {
  border-color: var(--ep-t-primary);
  outline: none;
}
.ep-rich-text-body.richtext-output,
.ep-survey-intro.richtext-output { line-height: 1.65; }
.ep-block .richtext-output img { max-width: 100%; height: auto; }
.ep-block .richtext-output .te-image-wrap { margin: 0 0 1rem; }
.ep-block .richtext-output .te-image-wrap img { display: block; }
.ep-block .richtext-output iframe { max-width: 100%; }
.ep-block .richtext-output table {
  width: 100%;
  border-collapse: collapse;
  margin: 1rem 0;
}
.ep-block .richtext-output th,
.ep-block .richtext-output td {
  border: 1px solid var(--ep-t-border, #d0d5dd);
  padding: .5rem .75rem;
  vertical-align: top;
}
.ep-block .richtext-output th { font-weight: 700; background: var(--ep-t-surface, #f8fafc); }

@media (max-width: 991px) {
  .ep-studio__workspace { grid-template-columns: 1fr; min-height: 0; height: auto !important; }
  .ep-studio__palette {
    max-height: none; height: auto; border-top: 1px solid var(--ep-t-border);
  }
  .ep-palette__scroll {
    display: grid; grid-template-columns: repeat(auto-fill, minmax(140px, 1fr)); gap: .35rem;
    overflow: visible;
  }
  .ep-palette__title, .ep-palette__group-label { grid-column: 1 / -1; }
}


.ep-button-block { margin: .75rem 0; }
.ep-btn { display: inline-flex; align-items: center; gap: .4rem; font-weight: 600; }
.ep-btn--primary { background: var(--ep-t-primary, #1d70b8); border-color: var(--ep-t-primary, #1d70b8); color: #fff; }
.ep-btn--secondary { background: var(--ep-t-surface, #f3f2f1); border-color: var(--ep-t-border, #b1b4b6); color: var(--ep-t-text, #0b0c0c); }
.ep-btn--outline { background: transparent; border: 2px solid var(--ep-t-primary, #1d70b8); color: var(--ep-t-primary, #1d70b8); }

/* Space embed panels — page-builder native (not HumHub space chrome) */
.ep-space-embed { margin: 0 0 1.25rem; }
.ep-space-panel {
  background: var(--ep-t-card, #fff);
  border: 1px solid var(--ep-t-border, #d0d5dd);
  border-radius: calc(var(--ep-t-radius, 4px) + 2px);
  overflow: hidden;
  box-shadow: var(--ep-t-shadow, none);
}
.ep-space-panel__header {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 1rem;
  padding: 1rem 1.15rem .85rem;
  border-bottom: 1px solid var(--ep-t-border, #e5e7eb);
  background: linear-gradient(180deg, var(--ep-t-surface, #f8fafc) 0%, var(--ep-t-card, #fff) 100%);
}
.ep-space-panel__eyebrow {
  display: block;
  font-size: .75rem;
  font-weight: 600;
  letter-spacing: .04em;
  text-transform: uppercase;
  color: var(--ep-t-muted, #505a5f);
  margin-bottom: .2rem;
}
.ep-space-panel__heading {
  margin: 0;
  font-size: 1.15rem;
  font-family: var(--ep-t-heading-font, inherit);
  color: var(--ep-t-heading, #0b0c0c);
  line-height: 1.3;
}
.ep-space-panel__cta {
  flex: 0 0 auto;
  display: inline-flex;
  align-items: center;
  gap: .35rem;
  font-size: .875rem;
  font-weight: 600;
  text-decoration: none;
  color: var(--ep-t-link, #1d70b8);
  white-space: nowrap;
  margin-top: .15rem;
}
.ep-space-panel__cta:hover { text-decoration: underline; }
.ep-space-panel__empty {
  margin: 0;
  padding: 1.25rem 1.15rem;
  color: var(--ep-t-muted, #505a5f);
}
.ep-space-list {
  list-style: none;
  margin: 0;
  padding: .35rem 0;
}
.ep-space-list--compact { padding-bottom: 0; }
.ep-space-list__item { margin: 0; }
.ep-space-list__link {
  display: flex;
  gap: .85rem;
  align-items: flex-start;
  padding: .85rem 1.15rem;
  text-decoration: none;
  color: inherit;
  border-left: 3px solid transparent;
  transition: background .15s ease, border-color .15s ease;
}
.ep-space-list__link:hover {
  background: var(--ep-t-surface, #f8fafc);
  border-left-color: var(--ep-space-accent, var(--ep-t-primary, #1d70b8));
  text-decoration: none;
  color: inherit;
}
.ep-space-list__icon {
  flex: 0 0 auto;
  width: 2.1rem;
  height: 2.1rem;
  border-radius: 999px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  background: var(--ep-t-surface, #f3f2f1);
  color: var(--ep-t-primary, #1d70b8);
  font-size: .95rem;
}
.ep-space-list__icon--progress { background: #e8f1fb; color: #1d70b8; }
.ep-space-list__icon--review { background: #fff3e0; color: #f47738; }
.ep-space-list__icon--done { background: #e7f5ee; color: #00703c; }
.ep-space-list__icon--pending { background: #f3f2f1; color: #505a5f; }
.ep-space-list__icon--event {
  background: color-mix(in srgb, var(--ep-space-accent, var(--ep-t-primary, #1d70b8)) 16%, white);
  color: var(--ep-space-accent, var(--ep-t-primary, #1d70b8));
}
.ep-space-list__main {
  display: flex;
  flex-direction: column;
  gap: .2rem;
  min-width: 0;
}
.ep-space-list__title {
  font-weight: 600;
  color: var(--ep-t-heading, #0b0c0c);
  line-height: 1.35;
}
.ep-space-list__summary {
  color: var(--ep-t-muted, #505a5f);
  font-size: .925rem;
  line-height: 1.45;
}
.ep-space-list__meta {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: .45rem .65rem;
  font-size: .8rem;
  color: var(--ep-t-muted, #505a5f);
}
.ep-space-pill {
  display: inline-flex;
  align-items: center;
  padding: .1rem .45rem;
  border-radius: 999px;
  font-size: .72rem;
  font-weight: 700;
  letter-spacing: .02em;
  text-transform: uppercase;
  background: var(--ep-t-surface, #f3f2f1);
  color: var(--ep-t-muted, #505a5f);
}
.ep-space-pill--progress { background: #e8f1fb; color: #1d70b8; }
.ep-space-pill--review { background: #fff3e0; color: #b35c00; }
.ep-space-pill--done { background: #e7f5ee; color: #00703c; }
.ep-space-pill--pending { background: #f3f2f1; color: #505a5f; }
.ep-space-gallery {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(140px, 1fr));
  gap: .65rem;
  padding: 1rem 1.15rem 1.15rem;
}
.ep-space-gallery__item {
  display: block;
  aspect-ratio: 1;
  overflow: hidden;
  border-radius: var(--ep-t-radius, 4px);
  background: var(--ep-t-surface, #f3f2f1);
  border: 1px solid var(--ep-t-border, #e5e7eb);
}
.ep-space-gallery__item img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
  transition: transform .25s ease;
}
.ep-space-gallery__item:hover img { transform: scale(1.04); }
.ep-space-files .ep-space-list + .ep-space-list {
  border-top: 1px solid var(--ep-t-border, #e5e7eb);
}
@media (max-width: 575px) {
  .ep-space-panel__header { flex-direction: column; align-items: stretch; }
  .ep-space-gallery { grid-template-columns: repeat(2, 1fr); }
}

.ep-space-comments {
  margin: 0 1.15rem .85rem 3.7rem;
  padding: .55rem .75rem;
  background: var(--ep-t-surface, #f8fafc);
  border: 1px solid var(--ep-t-border, #e5e7eb);
  border-radius: var(--ep-t-radius, 4px);
}
.ep-space-comments__item + .ep-space-comments__item {
  margin-top: .55rem;
  padding-top: .55rem;
  border-top: 1px solid var(--ep-t-border, #e5e7eb);
}
.ep-space-comments__meta {
  display: flex;
  flex-wrap: wrap;
  gap: .35rem .65rem;
  font-size: .78rem;
  color: var(--ep-t-muted, #505a5f);
  margin-bottom: .15rem;
}
.ep-space-comments__body {
  font-size: .9rem;
  line-height: 1.4;
  color: var(--ep-t-text, #0b0c0c);
}
.ep-space-comments__more {
  display: inline-flex;
  align-items: center;
  gap: .3rem;
  margin-top: .55rem;
  font-size: .82rem;
  font-weight: 600;
  text-decoration: none;
}
.ep-space-list__comments-count i { margin-right: .15rem; }
@media (max-width: 575px) {
  .ep-space-comments { margin-left: 1.15rem; }
}

/* —— In-product Help —— */
.ep-help-page { margin-bottom: 2rem; }
.ep-help-header {
  display: flex; justify-content: space-between; align-items: flex-start;
  gap: 1rem; margin-bottom: 1.25rem;
}
.ep-help-kicker { font-size: .78rem; font-weight: 700; text-transform: uppercase; letter-spacing: .04em; color: #94a3b8; }
.ep-help-title { margin: .15rem 0 0; font-size: 1.6rem; font-weight: 700; color: #0f172a; }
.ep-help-sub { margin: .3rem 0 0; color: #64748b; }
.ep-help-header__actions { display: flex; flex-wrap: wrap; gap: .5rem; }
.ep-help-section { margin: 0 0 2rem; }
.ep-help-section__title { margin: 0 0 .35rem; font-size: 1.15rem; font-weight: 700; color: #0f172a; }
.ep-help-section__intro { margin: 0 0 1rem; color: #64748b; }
.ep-help-cards {
  display: grid; grid-template-columns: repeat(auto-fill, minmax(260px, 1fr)); gap: .85rem;
}
.ep-help-card {
  display: flex; gap: .85rem; align-items: flex-start;
  padding: 1rem 1.1rem; background: #fff; border: 1px solid #e5e7eb;
  border-radius: 12px; text-decoration: none; color: inherit; min-height: 100%;
}
.ep-help-card:hover {
  border-color: #93c5fd; box-shadow: 0 6px 18px rgba(37, 99, 235, .08); text-decoration: none;
}
.ep-help-card__icon {
  width: 2.1rem; height: 2.1rem; border-radius: 8px; background: #eff6ff; color: #2563eb;
  display: inline-flex; align-items: center; justify-content: center; flex-shrink: 0;
}
.ep-help-card__title { display: block; font-weight: 700; color: #0f172a; margin-bottom: .25rem; }
.ep-help-card__summary { display: block; font-size: .88rem; color: #64748b; line-height: 1.4; }
.ep-help-layout {
  display: grid; grid-template-columns: 220px minmax(0, 1fr); gap: 1.5rem; align-items: start;
}
.ep-help-nav {
  position: sticky; top: 1rem; background: #fff; border: 1px solid #e5e7eb;
  border-radius: 12px; padding: .75rem .6rem 1rem;
}
.ep-help-nav__group {
  font-size: .72rem; font-weight: 700; text-transform: uppercase; letter-spacing: .04em;
  color: #94a3b8; padding: .65rem .65rem .25rem;
}
.ep-help-nav__link {
  display: block; padding: .45rem .65rem; border-radius: 8px;
  color: #334155; text-decoration: none; font-size: .9rem;
}
.ep-help-nav__link:hover { background: #f1f5f9; text-decoration: none; }
.ep-help-nav__link.is-active { background: #eff6ff; color: #2563eb; font-weight: 600; }
.ep-help-body a {
  color: #2563eb;
  text-decoration: underline;
  text-underline-offset: .12em;
}
.ep-help-body a:hover { color: #1d4ed8; }
.ep-help-body h2 { margin: 1.6rem 0 .6rem; font-size: 1.2rem; }
.ep-help-body h3 { margin: 1.25rem 0 .45rem; font-size: 1.05rem; }
.ep-help-body p, .ep-help-body ul, .ep-help-body ol { margin: 0 0 .85rem; }
.ep-help-body table { width: 100%; border-collapse: collapse; margin: 0 0 1rem; font-size: .92rem; }
.ep-help-body th, .ep-help-body td {
  border: 1px solid #e5e7eb; padding: .45rem .65rem; text-align: left; vertical-align: top;
}
.ep-help-body th { background: #f8fafc; }
.ep-help-body code { background: #f1f5f9; padding: .1rem .3rem; border-radius: 4px; font-size: .88em; }
@media (max-width: 991px) {
  .ep-help-layout { grid-template-columns: 1fr; }
  .ep-help-nav { position: static; }
}

/* —— Pages list (matches Thiscovery Forms homepage) —— */
.ep-list-page { margin-bottom: 2rem; }
.ep-list-header {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  gap: 1rem;
  margin-bottom: 1.25rem;
}
.ep-list-title {
  margin: 0;
  font-size: 1.6rem;
  font-weight: 700;
  color: #0f172a;
}
.ep-list-sub { margin: .3rem 0 0; color: #64748b; }
.ep-list-header__actions { display: flex; flex-wrap: wrap; gap: .5rem; }
.ep-list-empty {
  text-align: center;
  padding: 3rem 1.5rem;
  background: #fff;
  border: 1px dashed #cbd5e1;
  border-radius: 14px;
  color: #64748b;
}
.ep-list-empty i { font-size: 2.25rem; margin-bottom: .75rem; opacity: .55; }
.ep-list-empty h3 { color: #0f172a; margin-bottom: .5rem; }
.ep-list-filters {
  display: flex;
  flex-wrap: wrap;
  gap: .5rem;
  align-items: center;
  margin: 0 0 1rem;
  padding: .75rem;
  background: #fff;
  border: 1px solid #e5e7eb;
  border-radius: 12px;
}
.ep-list-filters__search {
  position: relative;
  flex: 1 1 220px;
  min-width: 180px;
}
.ep-list-filters__search i {
  position: absolute;
  left: .75rem;
  top: 50%;
  transform: translateY(-50%);
  color: #94a3b8;
}
.ep-list-filters__search input {
  width: 100%;
  padding: .4rem .75rem .4rem 2rem;
  border: 1px solid #e2e8f0;
  border-radius: 8px;
  background: #f8fafc;
}
.ep-list-filters select {
  min-width: 140px;
  max-width: 260px;
  padding: .4rem .6rem;
  border: 1px solid #e2e8f0;
  border-radius: 8px;
  background: #fff;
}
.ep-folder-jump { min-width: 200px; max-width: 320px; }
.ep-folder-crumbs {
  display: flex; flex-wrap: wrap; gap: .35rem; align-items: center;
  margin: 0 0 .85rem; color: #64748b; font-size: .92rem;
}
.ep-folder-crumbs a { color: #2563eb; text-decoration: none; font-weight: 600; }
.ep-folder-crumbs a:hover { text-decoration: underline; }
.ep-folder-crumbs__sep { color: #cbd5e1; }
.ep-folder-toolbar { display: flex; flex-wrap: wrap; gap: .4rem; margin: 0; align-items: center; }
.ep-folder-toolbar__delete { display: inline; margin: 0; }
.ep-folder-form {
  max-width: 560px;
  background: #fff;
  border: 1px solid #e5e7eb;
  border-radius: 12px;
  padding: 1.15rem 1.25rem;
  box-shadow: 0 4px 14px rgba(15, 23, 42, .04);
}
.ep-folder-form__actions { display: flex; flex-wrap: wrap; gap: .5rem; margin-top: .35rem; }
.ep-cms {
  display: grid;
  grid-template-columns: 280px minmax(0, 1fr);
  gap: 0;
  min-height: 520px;
  background: #fff;
  border: 1px solid #e5e7eb;
  border-radius: 14px;
  overflow: hidden;
}
.ep-cms-rail {
  background: #fff;
  border-right: 1px solid #e5e7eb;
  padding: .75rem .65rem 1.25rem;
  overflow: auto;
}
.ep-cms-rail__label {
  font-size: .72rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: .04em;
  color: #94a3b8;
  margin: .85rem .5rem .35rem;
}
.ep-cms-rail__label:first-child { margin-top: .2rem; }
.ep-cms-folder {
  display: flex;
  align-items: flex-start;
  gap: .65rem;
  padding: .55rem .6rem;
  border-radius: 8px;
  color: inherit;
  text-decoration: none;
  border: 1px solid transparent;
}
.ep-cms-folder--nested {
  padding-left: calc(.6rem + var(--ep-depth, 0) * 1rem);
}
.ep-cms-folder:hover { background: #f8fafc; color: inherit; text-decoration: none; }
.ep-cms-folder.is-active {
  background: #eff6ff;
  border-color: #dbeafe;
}
.ep-cms-folder__icon {
  width: 1.7rem;
  height: 1.7rem;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  color: #64748b;
  flex-shrink: 0;
  margin-top: .1rem;
}
.ep-cms-folder.is-active .ep-cms-folder__icon { color: #2563eb; }
.ep-cms-folder__body { min-width: 0; display: flex; flex-direction: column; gap: .1rem; }
.ep-cms-folder__name {
  font-weight: 600;
  color: #0f172a;
  line-height: 1.25;
}
.ep-cms-folder__count { font-size: .75rem; color: #64748b; }
.ep-cms-main {
  min-width: 0;
  padding: 1rem 1.15rem 1.35rem;
  background: #f8fafc;
}
.ep-cms-main__head {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  gap: .75rem;
  margin-bottom: .85rem;
}
.ep-cms-main__title {
  margin: 0;
  font-size: 1.15rem;
  font-weight: 700;
  color: #0f172a;
}
.ep-cms-main__meta { margin: .2rem 0 0; color: #64748b; }
.ep-cms-main .ep-list-filters {
  margin-bottom: .85rem;
}
.ep-cms-main .ep-list-empty {
  border-radius: 12px;
}
@media (max-width: 991px) {
  .ep-cms { grid-template-columns: 1fr; }
  .ep-cms-rail { border-right: 0; border-bottom: 1px solid #e5e7eb; max-height: 240px; }
}
.ep-folder-grid {
  display: grid; grid-template-columns: repeat(auto-fill, minmax(220px, 1fr));
  gap: .75rem; margin: 0 0 1.1rem;
}
.ep-folder-card {
  display: flex; align-items: center; gap: .75rem;
  padding: .85rem 1rem; background: #fff; border: 1px solid #e5e7eb;
  border-radius: 12px; text-decoration: none; color: inherit;
  box-shadow: 0 4px 14px rgba(15, 23, 42, .04);
}
.ep-folder-card:hover { border-color: #93c5fd; color: inherit; text-decoration: none; }
.ep-folder-card__icon {
  width: 2.25rem; height: 2.25rem; border-radius: 8px; background: #eff6ff; color: #2563eb;
  display: flex; align-items: center; justify-content: center; flex-shrink: 0;
}
.ep-folder-card__name { display: block; font-weight: 700; color: #0f172a; }
.ep-folder-card__meta { display: block; margin-top: .15rem; color: #64748b; font-size: .82rem; }
.ep-page-table-wrap {
  background: #fff;
  border: 1px solid #e5e7eb;
  border-radius: 12px;
  overflow: auto;
  box-shadow: 0 4px 14px rgba(15, 23, 42, .04);
}
.ep-page-table {
  width: 100%;
  border-collapse: collapse;
  margin: 0;
  min-width: 720px;
}
.ep-page-table thead th {
  background: #f8fafc;
  color: #64748b;
  font-size: .72rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: .04em;
  padding: .75rem 1rem;
  border-bottom: 1px solid #e5e7eb;
  white-space: nowrap;
  vertical-align: middle;
}
.ep-page-table tbody td {
  padding: .85rem 1rem;
  border-bottom: 1px solid #f1f5f9;
  vertical-align: middle;
}
.ep-page-table tbody tr:last-child td { border-bottom: 0; }
.ep-page-table tbody tr:hover td { background: #f8fafc; }
.ep-page-table__actions-col,
.ep-page-table__status-col,
.ep-page-table__num-col,
.ep-page-table__type-col,
.ep-page-table__date-col { width: 1%; white-space: nowrap; }
.ep-page-table__num-col { text-align: center; }
.ep-page-table__page-col { min-width: 240px; }
.ep-page-table__url-col,
.ep-page-table__date-col { color: #64748b; font-size: .85rem; }
.ep-page-row__actions {
  display: inline-flex;
  align-items: center;
  gap: .35rem;
  flex-wrap: nowrap;
}
.ep-page-row__delete { display: inline; margin: 0; }
.ep-page-row__title {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: .45rem;
  font-size: 1rem;
  font-weight: 650;
  line-height: 1.3;
}
.ep-page-row__title a { color: #0f172a; text-decoration: none; min-width: 0; }
.ep-page-row__title a:hover { color: #2563eb; }
.ep-page-row--child .ep-page-row__title { padding-left: 1.15rem; }
.ep-page-row--child .ep-page-row__title::before {
  content: "↳";
  color: #94a3b8;
  font-weight: 400;
  margin-right: .15rem;
}
.ep-page-row__chip {
  display: inline-flex;
  align-items: center;
  padding: .12rem .55rem;
  border-radius: 999px;
  background: #f1f5f9;
  color: #64748b;
  font-size: .72rem;
  font-weight: 600;
  line-height: 1.35;
  white-space: nowrap;
  flex-shrink: 0;
}
.ep-page-row__chip--icon {
  width: 1.35rem;
  height: 1.35rem;
  padding: 0;
  justify-content: center;
}
.ep-page-row__desc {
  margin-top: .2rem;
  color: #64748b;
  font-size: .85rem;
  line-height: 1.4;
}
.ep-page-row__stat {
  display: inline-block;
  min-width: 1.75rem;
  font-weight: 650;
  color: #0f172a;
  font-variant-numeric: tabular-nums;
}
.ep-page-row__path {
  font-size: .82rem;
  background: #f8fafc;
  border: 1px solid #e5e7eb;
  border-radius: 6px;
  padding: .12rem .4rem;
  color: #475569;
}
.ep-list-pager {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 1rem;
  flex-wrap: wrap;
  margin-top: 1.25rem;
}
.ep-list-pager__count { color: #64748b; font-size: .9rem; }
.ep-list-section-title {
  font-size: 1.1rem;
  margin: 1.5rem 0 .75rem;
  color: #0f172a;
}
.ep-template-list { list-style: none; padding: 0; margin: 0 0 2rem; }
.ep-template-list li { padding: .55rem 0; border-bottom: 1px solid #e5e7eb; }
@media (max-width: 767px) {
  .ep-list-header { flex-direction: column; }
  .ep-page-table { min-width: 980px; }
}

/* Page appearance tokens (studio + theme admin) */
.ep-style-accs { margin: 1rem 0 0; }
.ep-style-acc {
  border: 1px solid #e2e8f0;
  border-radius: 10px;
  margin-bottom: .5rem;
  background: #fff;
}
.ep-style-acc > summary {
  cursor: pointer;
  font-weight: 600;
  padding: .75rem 1rem;
  list-style: none;
}
.ep-style-acc > summary::-webkit-details-marker { display: none; }
.ep-style-acc > summary::after {
  content: "\f107";
  font-family: FontAwesome;
  float: right;
  color: #94a3b8;
}
.ep-style-acc[open] > summary::after { content: "\f106"; }
.ep-style-acc__body {
  padding: .15rem 1rem 1rem;
  border-top: 1px solid #e2e8f0;
}
.ep-style-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(160px, 1fr));
  gap: .85rem 1rem;
  padding-top: .85rem;
}
.ep-style-grid__item--color {
  grid-column: 1 / -1;
  max-width: 26rem;
}
.ep-style-color {
  display: flex;
  align-items: center;
  gap: .45rem;
}
.ep-style-color__swatch {
  width: 2.4rem;
  height: 2.4rem;
  padding: 0;
  border: 1px solid #cbd5e1;
  border-radius: 8px;
  background: #fff;
  cursor: pointer;
  flex-shrink: 0;
}
.ep-css-editor {
  font-family: ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, monospace;
  font-size: .85rem;
  min-height: 12rem;
}
.ep-preview-banner { margin: .75rem 1rem 0; }
.ep-studio__settings--versions { max-width: none; }
