/* Custom sections share the site's design tokens; child blocks never add page gutters. */
.custom-section {
  --content-block-gap: clamp(24px, 3vw, 40px);
  scroll-margin-top: 32px;
}

.custom-section--muted {
  background: var(--light);
  padding: clamp(32px, 5vw, 64px) 0;
}

.custom-section--narrow .custom-section__container {
  max-width: min(var(--content-width), 840px);
}

.custom-section .custom-section__title {
  margin-bottom: var(--content-block-gap);
  overflow-wrap: anywhere;
}

.custom-section .content-stream {
  display: flex;
  flex-direction: column;
  gap: var(--content-block-gap);
  min-width: 0;
}

.custom-section .content-stream > * {
  min-width: 0;
  margin-top: 0;
  margin-bottom: 0;
}

.custom-section .content-heading {
  font-size: clamp(23px, 2.5vw, 30px);
  line-height: 1.25;
  overflow-wrap: anywhere;
}

.custom-section .content-prose {
  min-width: 0;
  overflow-wrap: anywhere;
}

.custom-section .content-prose :where(h3, h4) {
  margin-top: 24px;
  margin-bottom: 12px;
  line-height: 1.3;
}

.custom-section .content-prose :where(ul, ol) {
  padding-left: 24px;
  margin-top: 0;
  margin-bottom: 16px;
}

.custom-section .content-prose li + li {
  margin-top: 6px;
}

.custom-section .content-prose blockquote {
  margin: 20px 0;
  padding: 8px 0 8px 20px;
  border-left: 4px solid var(--accent);
}

.custom-section .content-prose a,
.custom-section .content-card__link {
  text-decoration: underline;
  text-underline-offset: 3px;
}

.custom-section .content-prose > :first-child,
.custom-section .content-prose .rich-text > :first-child {
  margin-top: 0;
}

.custom-section .content-prose > :last-child,
.custom-section .content-prose .rich-text > :last-child {
  margin-bottom: 0;
}

.custom-section .content-image,
.custom-section .content-gallery__item {
  margin: 0;
}

.custom-section :where(.content-image__image, .content-gallery__image, .content-image-text__image) {
  width: 100%;
  height: auto;
}

.custom-section .content-caption {
  margin-top: 12px;
  color: var(--muted);
  font-size: 14px;
  overflow-wrap: anywhere;
}

.custom-section .content-gallery,
.custom-section .content-cards {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(min(100%, 18rem), 1fr));
  gap: 24px;
}

.custom-section .content-card {
  min-width: 0;
  display: flex;
  flex-direction: column;
  background: var(--light);
}

.custom-section--muted .content-card {
  background: #ffffff;
}

.custom-section .content-card__image {
  width: 100%;
  height: auto;
  aspect-ratio: 3 / 2;
  object-fit: cover;
}

.custom-section .content-card__body {
  display: flex;
  flex: 1;
  flex-direction: column;
  align-items: flex-start;
  gap: 16px;
  padding: 24px;
}

.custom-section .content-card__title {
  margin: 0;
  font-size: 22px;
  line-height: 1.3;
  overflow-wrap: anywhere;
}

.custom-section .content-card__link {
  margin-top: auto;
  font-weight: 600;
  overflow-wrap: anywhere;
}

.custom-section .content-columns,
.custom-section .content-image-text {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: clamp(24px, 4vw, 48px);
  align-items: start;
}

.custom-section .content-columns--wide-left {
  grid-template-columns: minmax(0, 3fr) minmax(0, 2fr);
}

.custom-section .content-columns--wide-right {
  grid-template-columns: minmax(0, 2fr) minmax(0, 3fr);
}

.custom-section .content-image-text {
  grid-template-areas: "image body";
}

.custom-section .content-image-text--right {
  grid-template-areas: "body image";
}

.custom-section .content-image-text__media {
  grid-area: image;
  min-width: 0;
}

.custom-section .content-image-text__body {
  grid-area: body;
}

.custom-section .content-embed {
  max-width: 100%;
}

.custom-section .content-embed iframe {
  max-width: 100%;
  border: 0;
}

/* Only videos with provider dimensions receive a fixed aspect ratio. */
.custom-section .content-embed__video {
  position: relative;
  height: 0;
  overflow: hidden;
}

.custom-section .content-embed__video :where(iframe, object, embed, video) {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
}

.custom-section .content-table__scroll {
  max-width: 100%;
  overflow-x: auto;
  border: 1px solid #d5d5d5;
}

.custom-section .content-table table {
  width: 100%;
  border-collapse: collapse;
  text-align: left;
}

.custom-section .content-table caption {
  padding: 16px 20px;
  background: var(--light);
  font-size: 18px;
  font-weight: 600;
  text-align: left;
}

.custom-section .content-table :where(th, td) {
  min-width: 9rem;
  padding: 16px 20px;
  border: 1px solid #d5d5d5;
  vertical-align: top;
  overflow-wrap: anywhere;
}

.custom-section .content-table th {
  background: #f4f4f4;
  font-weight: 700;
}

.custom-section .content-table td {
  background: #ffffff;
}

.custom-section .content-table .htLeft { text-align: left; }
.custom-section .content-table .htCenter { text-align: center; }
.custom-section .content-table .htRight { text-align: right; }
.custom-section .content-table .htJustify { text-align: justify; }
.custom-section .content-table .htTop { vertical-align: top; }
.custom-section .content-table .htMiddle { vertical-align: middle; }
.custom-section .content-table .htBottom { vertical-align: bottom; }

.custom-section .content-faq {
  border-top: 1px solid #d5d5d5;
}

.custom-section .content-faq__item {
  border-bottom: 1px solid #d5d5d5;
}

.custom-section .content-faq__question {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 24px;
  padding: 20px 0;
  list-style: none;
  font-size: 20px;
  font-weight: 600;
  cursor: pointer;
  overflow-wrap: anywhere;
}

.custom-section .content-faq__question::-webkit-details-marker {
  display: none;
}

.custom-section .content-faq__question::after {
  content: "";
  flex: 0 0 10px;
  width: 10px;
  height: 10px;
  margin-right: 4px;
  border-right: 2px solid var(--accent);
  border-bottom: 2px solid var(--accent);
  transform: rotate(45deg);
}

.custom-section .content-faq__item[open] > .content-faq__question::after {
  transform: rotate(225deg);
}

.custom-section .content-faq__answer {
  padding-bottom: 24px;
  padding-right: 38px;
}

.custom-section .content-callout {
  padding: 24px;
  border-left: 5px solid var(--accent);
  background: #f5f5f5;
}

.custom-section--muted .content-callout {
  background: #ffffff;
}

.custom-section .content-callout__title {
  font-size: 23px;
  margin-bottom: 16px;
  overflow-wrap: anywhere;
}

.custom-section .content-buttons {
  display: flex;
  flex-wrap: wrap;
  gap: 16px;
}

.custom-section .content-button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 48px;
  max-width: 100%;
  padding: 14px 24px;
  border: 1px solid transparent;
  font-size: 15px;
  font-weight: 600;
  text-align: center;
  overflow-wrap: anywhere;
  transition: background-color 0.2s ease, color 0.2s ease;
}

.custom-section .content-button--primary:hover,
.custom-section .content-button--primary:focus {
  background: #850522;
  color: #ffffff;
}

.custom-section .content-button--secondary,
.custom-section .content-button--secondary:visited {
  border-color: var(--accent);
  background: transparent;
  color: var(--accent);
}

.custom-section .content-button--secondary:hover,
.custom-section .content-button--secondary:focus {
  background: var(--accent);
  color: #ffffff;
}

.custom-section .content-document {
  display: flex;
  align-items: center;
  gap: 20px;
  padding: 20px 24px;
  border: 1px solid #d5d5d5;
  color: var(--accent);
}

.custom-section .content-document__icon {
  flex: 0 0 auto;
  font-size: 32px;
  line-height: 1;
}

.custom-section .content-document__body {
  min-width: 0;
}

.custom-section .content-document__title {
  display: block;
  font-weight: 600;
  text-decoration: underline;
  text-underline-offset: 3px;
  overflow-wrap: anywhere;
}

.custom-section .content-document__meta {
  display: block;
  margin-top: 4px;
  color: var(--muted);
  font-size: 14px;
}

.custom-section :where(a, button, summary, [tabindex]):focus-visible {
  outline: 3px solid var(--accent);
  outline-offset: 4px;
}

@media (max-width: 760px) {
  .custom-section .content-columns,
  .custom-section .content-image-text {
    grid-template-columns: minmax(0, 1fr);
  }

  .custom-section .content-image-text {
    grid-template-areas: "image" "body";
  }
}

@media (max-width: 640px) {
  .custom-section {
    margin-top: 80px;
  }

  .custom-section .content-button {
    width: 100%;
  }

  .custom-section .content-card__body,
  .custom-section .content-callout,
  .custom-section .content-document {
    padding: 20px;
  }
}
