/* Freeform / custom content block typography */

.custom-content {
  width: 100%;
  max-width: calc(var(--content-max) + var(--page-pad) * 2);
  margin: 0 auto;
  padding: var(--space-12) var(--page-pad);
}

.static-page + .custom-content {
  padding-top: var(--space-8);
}

.custom-content__inner {
  max-width: var(--hero-copy-max);
  font-size: var(--text-lg);
  line-height: var(--leading-body);
  color: var(--color-text);
}

/* Embeds need the full content column, not the prose measure */
.custom-content__inner:has(iframe) {
  max-width: none;
}

/* Space stacked blocks — not flex, so inline links/text stay inline */
.custom-content__inner > * + * {
  margin-top: var(--space-6);
}

.custom-content__inner > *:first-child {
  margin-top: 0;
}

.custom-content__inner > *:last-child {
  margin-bottom: 0;
}

.custom-content__inner a {
  color: inherit;
  text-decoration: underline;
  text-underline-offset: 0.18em;
  text-decoration-thickness: 1px;
}

.custom-content__inner a:hover {
  text-decoration-thickness: 2px;
}

.custom-content__title {
  margin: 0;
  font-size: clamp(32px, 4vw, var(--text-5xl));
  font-weight: var(--font-weight-bold);
  letter-spacing: var(--tracking-hero);
  line-height: var(--leading-tight);
  color: var(--color-text);
}

.custom-content__heading {
  margin: 0;
  font-size: var(--text-3xl);
  font-weight: var(--font-weight-bold);
  line-height: var(--leading-snug);
  color: var(--color-text);
}

.custom-content__lead {
  margin: 0;
  font-size: var(--text-xl);
  font-weight: var(--font-weight-medium);
  line-height: var(--leading-body-lg);
  color: var(--color-text-secondary);
}

.custom-content__body {
  margin: 0;
  font-size: var(--text-lg);
  font-weight: var(--font-weight-regular);
  line-height: var(--leading-body);
  color: var(--color-text);
}

.custom-content__caption {
  margin: 0;
  font-size: var(--text-md);
  font-weight: var(--font-weight-semibold);
  line-height: var(--leading-body);
  color: var(--color-text-secondary);
}

.custom-content__muted {
  margin: 0;
  font-size: var(--text-base);
  font-weight: var(--font-weight-regular);
  line-height: var(--leading-body);
  color: var(--color-text-muted);
}

.custom-content__accent {
  margin: 0;
  font-size: var(--text-lg);
  font-weight: var(--font-weight-semibold);
  line-height: var(--leading-body);
  color: var(--color-text-accent);
}

.custom-content__img {
  display: block;
  width: 100%;
  max-width: 100%;
  height: auto;
  border-radius: var(--radius-xl);
}

.custom-content__embed {
  display: block;
  width: 100%;
  min-height: 480px;
  height: 70vh;
  max-height: 900px;
  border: 0;
  border-radius: var(--radius-xl);
  background: var(--color-surface);
  box-shadow: var(--shadow-soft);
  /* Keep parent page scroll/focus stable while the embed boots */
  color-scheme: normal;
}

.custom-content__inner strong {
  font-weight: var(--font-weight-bold);
  color: var(--color-text);
}

.accordion__panel-inner .custom-content {
  max-width: none;
  margin: 0;
  padding: 0;
}

.accordion__panel-inner .custom-content__inner {
  max-width: none;
}

@media (max-width: 768px) {
  .custom-content {
    padding: var(--space-9) var(--page-pad);
  }

  .static-page + .custom-content {
    padding-top: var(--space-6);
  }

  .custom-content__heading {
    font-size: var(--text-2xl);
  }
}
