/* ==========================================================================
   Expert Portal v2 — custom CSS (app-wide). Scoped to .ep-* classes.
   Loads in preview + published app only (the editor still shows Inter headings).
   ========================================================================== */
@import url('https://fonts.googleapis.com/css2?family=Hanken+Grotesk:wght@500;600;700;800&display=swap');

:root {
  --ep-navy: #091a42;
  --ep-pink: #d6246f;
  --ep-ink: #101828;
  --ep-body: #344054;
  --ep-muted: #667085;
  --ep-border: #e4e7ec;
  --ep-soft: #eef1f7;
  --ep-display: 'Hanken Grotesk', Inter, system-ui, -apple-system, 'Segoe UI', sans-serif;
}

/* headings + display numbers use Hanken Grotesk */
.ab-heading,
.ep-row-title a,
.ep-pay p,
.ep-paybig p { font-family: var(--ep-display) !important; letter-spacing: -0.015em; }
.ab-heading { margin: 0; }

/* ---------- header ---------- */
.ep-topbar > .column-element__column,
.ep-actions > .column-element__column { min-width: 0; }
.ep-brand { cursor: pointer; }
.ep-brand .ab-image { width: 116px !important; max-width: 116px !important; }
.ep-brand .ab-image__img { width: 116px; max-width: none; height: auto; }
.ep-user p { margin: 0; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.ep-signin .ab-button, .ep-signout .ab-button { white-space: nowrap; }
.ep-nav .menu-element__container--horizontal { justify-content: flex-end; gap: 1.4em; }
.ep-nav .ab-link { white-space: nowrap; text-underline-offset: 8px; text-decoration-thickness: 2px; }
@media (max-width: 640px) { .ep-user { display: none; } }

/* ---------- cards ---------- */
.element__wrapper:has(> .element__inner-wrapper > .ep-card) > .element__inner-wrapper {
  box-shadow: 0 1px 2px rgba(16, 24, 40, 0.05), 0 12px 32px -18px rgba(9, 26, 66, 0.28);
}

/* ---------- hero ---------- */
.ep-eyebrow p { margin: 0; font-weight: 700; letter-spacing: 0.14em; text-transform: uppercase; }
.ep-hero-title .ab-heading { line-height: 1.08; max-width: 760px; }
.ep-hero-lead p { margin: 0; line-height: 1.55; max-width: 620px; }
@media (max-width: 640px) {
  .ep-hero-title .ab-heading { font-size: 32px !important; }
}

/* ---------- one content column for header, hero, list and project page ---------- */
.ep-header, .ep-hero, .ep-listwrap, .ep-page { max-width: 1120px; margin-left: auto; margin-right: auto; }

/* ---------- search bar: one row, straight on the navy ---------- */
.ep-search { display: flex; align-items: center; gap: 12px; max-width: 880px; }
.ep-search > div:first-child { flex: 1 1 auto; min-width: 0; display: flex; align-items: center; gap: 12px; }
.ep-search > div:first-child > .element__wrapper { margin: 0 !important; min-width: 0; max-width: none; }
.ep-search > div:first-child > .element__wrapper:first-child { flex: 1 1 auto; }
.ep-search > div:first-child > .element__wrapper:nth-child(2) { flex: 0 0 210px; }
.ep-search .ab-form-group { margin-bottom: 0 !important; }
.ep-search .ab-form-group__label { display: none; }
.ep-search > .form-container-element__submit-button { flex: 0 0 auto; margin: 0 !important; }
.ep-search input.ab-input,
.ep-search .ab-dropdown__selected {
  height: 52px; box-sizing: border-box;
  background: #ffffff !important; border-color: transparent !important;
}
.ep-search input.ab-input:focus,
.ep-search .ab-dropdown__selected:focus,
.ep-search .ab-dropdown__selected:focus-visible { box-shadow: 0 0 0 3px rgba(244, 154, 193, 0.75); outline: none; }
.ep-search .form-container-element__submit-button .ab-button {
  height: 52px; box-sizing: border-box; display: inline-flex; align-items: center; justify-content: center;
  padding-top: 0; padding-bottom: 0;
}
.ep-search .form-container-element__submit-button .ab-button:focus-visible { outline: 3px solid #f49ac1; outline-offset: 2px; }
@media (max-width: 720px) {
  .element__wrapper:has(> .element__inner-wrapper > .ep-hero) > .element__inner-wrapper { padding-top: 44px; padding-bottom: 52px; }
  .ep-search, .ep-search > div:first-child { flex-direction: column; align-items: stretch; gap: 10px; }
  .ep-search > div:first-child > .element__wrapper:nth-child(2) { flex: 0 0 auto; }
  .ep-search .form-container-element__submit-button .ab-button { width: 100%; }
}

/* ---------- project list ---------- */
.ep-listhead > .column-element__column { min-width: 0; }
.ep-count p, .ep-clear p { margin: 0; }
.ep-rowgrid > .column-element__column { min-width: 0; }
.element__wrapper:has(> .element__inner-wrapper > .ep-row) { cursor: pointer; }
.element__wrapper:has(> .element__inner-wrapper > .ep-row) > .element__inner-wrapper {
  transition: border-color 0.12s ease, box-shadow 0.12s ease, transform 0.12s ease;
}
.element__wrapper:has(> .element__inner-wrapper > .ep-row):hover > .element__inner-wrapper {
  border-color: #b9c3d9 !important;
  box-shadow: 0 12px 28px -16px rgba(9, 26, 66, 0.35);
  transform: translateY(-1px);
}
.ep-chip p {
  display: inline-block; margin: 0; padding: 3px 10px; border-radius: 999px;
  background: var(--ep-soft); font-weight: 600; letter-spacing: 0.01em;
}
.ep-row-title a { display: block; line-height: 1.3; text-decoration: none; }
.ep-meta p { margin: 0; }
.ep-pay p { margin: 0; font-weight: 800; line-height: 1.1; }
.ep-pay p em, .ep-paybig p em {
  display: block; margin-top: 2px; font-family: Inter, system-ui, sans-serif; font-style: normal;
  font-size: 12px; font-weight: 500; letter-spacing: 0; color: var(--ep-muted);
}
@media (max-width: 640px) { .ep-pay p { text-align: left !important; } }
.ep-empty .ab-heading { margin-bottom: 6px; }

/* ---------- description snippet on project cards ---------- */
.ep-snip { max-width: 70ch; }
.ep-snip.element--no-value { display: none; }
.ep-snip > .markdown { max-height: 4.8em; overflow: hidden; line-height: 1.6; }
.ep-snip.ep-snip--clamped > .markdown {
  -webkit-mask-image: linear-gradient(to bottom, #000 55%, transparent);
  mask-image: linear-gradient(to bottom, #000 55%, transparent);
}
.ep-snip.ep-snip--open > .markdown { max-height: none; -webkit-mask-image: none; mask-image: none; }
.ep-snip p, .ep-snip ul, .ep-snip ol { margin: 0 0 0.6em; line-height: 1.6; }
.ep-snip ul, .ep-snip ol { padding-left: 20px; }
.ep-snip .markdown > :last-child { margin-bottom: 0; }
.ep-snip h1, .ep-snip h2, .ep-snip h3, .ep-snip h4, .ep-snip h5, .ep-snip h6 {
  margin: 0 0 0.3em; font-family: inherit; font-size: inherit; line-height: 1.6; font-weight: 700; color: var(--ep-ink);
}
.ep-more {
  margin: 2px 0 0; padding: 4px 0; border: 0; background: none; cursor: pointer;
  font: inherit; font-size: 14px; font-weight: 600; color: var(--ep-navy);
  text-decoration: underline; text-underline-offset: 3px;
}
.ep-more:hover { color: var(--ep-pink); }
.ep-more:focus-visible { outline: 2px solid var(--ep-pink); outline-offset: 2px; border-radius: 4px; }

/* ---------- project page ---------- */
.ep-proj > .column-element__column { min-width: 0; }
@media (min-width: 960px) {
  .ep-proj > .column-element__column:last-child { position: sticky; top: 16px; align-self: flex-start; }
}
.ep-back a { text-decoration: none; }
.ep-proj-title .ab-heading { line-height: 1.15; }
.ep-facts > .column-element__column { min-width: 0; }
.ep-fact p { margin: 0; line-height: 1.35; font-weight: 600; }
.ep-fact p strong {
  display: block; margin-bottom: 3px; font-size: 11px; font-weight: 600; letter-spacing: 0.06em;
  text-transform: uppercase; color: #475467 !important;
}
.ep-desc p { margin: 0 0 12px; line-height: 1.65; }
.ep-desc p:last-child { margin-bottom: 0; }
.ep-desc ul, .ep-desc ol { margin: 0 0 12px; padding-left: 20px; line-height: 1.65; }
.ep-label p { margin: 0; font-weight: 700; letter-spacing: 0.12em; text-transform: uppercase; }
.ep-paybig p { margin: 0; font-weight: 800; line-height: 1.05; }
.ep-small p, .ep-fine p, .ep-lead p, .ep-support p { margin: 0; line-height: 1.55; }
.ep-start .ab-button { box-shadow: 0 10px 22px -10px rgba(214, 36, 111, 0.6); }
.ep-auth .ab-button { width: 100%; justify-content: center; }

/* ---------- sign-in + survey return ---------- */
.ep-auth-logo .ab-image { width: 132px !important; max-width: 132px !important; }
.ep-auth-logo .ab-image__img { width: 132px; max-width: none; height: auto; }
.ep-support a { color: var(--ep-navy); font-weight: 600; word-break: break-all; }
