/* Optional shared surface. Colours match the event summary in the same context. */
.content-surface {
  box-sizing: border-box;
  display: flow-root;
  min-width: 0;
  margin-block: 1.5rem;
  padding: clamp(1rem, 2vw, 1.5rem);
  border: 1px solid var(--surface-border, var(--color-border));
  border-radius: 0.5rem;
  background: var(--surface-panel, var(--color-surface));
  color: var(--surface-text, var(--color-text));
  box-shadow: var(--surface-card-shadow, none);
  backdrop-filter: var(--surface-card-backdrop, none);
  overflow-wrap: anywhere;
}

.content-surface > :first-child { margin-top: 0; }
.content-surface > :last-child { margin-bottom: 0; }
.content-surface :where(header) > :first-child { margin-top: 0; }
.content-surface :where(.frame) > :last-child { margin-bottom: 0; }
.content-surface > [id] { scroll-margin-top: calc(var(--topbar-height) + 1.5rem); }
.content-surface:has(> .rsgridfixed--flush) { margin-block: 0; }
.content-surface :where(h1, h2, h3, h4, h5, h6) {
  color: var(--surface-heading, var(--color-heading));
}

.content-surface .ce-header--kicker { margin-bottom: 1.1rem; }
.content-surface .ce-kicker {
  margin: 0 0 0.55rem;
  color: var(--surface-muted, var(--color-text-soft));
  font-size: 0.82rem;
  font-weight: 700;
  line-height: 1.4;
  text-transform: uppercase;
}
.content-surface .ce-headline--kicker {
  margin: 0;
  color: var(--surface-heading, var(--color-heading));
  font-size: clamp(2rem, 4vw, 3.35rem);
  line-height: 1.08;
  letter-spacing: 0;
}
.content-surface a:where(:not([class]), [class=""]):not(:has(img)) {
  color: var(--surface-heading, var(--color-link));
  text-decoration-line: underline;
  text-decoration-color: currentColor;
  text-underline-offset: 0.2em;
}
.content-surface a:where(:not([class]), [class=""]):not(:has(img)):focus-visible {
  outline: 3px solid currentColor;
  outline-offset: 3px;
}

/* The box owns a direct child's width; the child fills its padded interior.
   Hero columns and nested grids stay within their available column width. */
.content-surface > :is(.layout-width-regular, .layout-width-content,
  .layout-width-text, .layout-width-narrow, .layout-width-wide, .layout-width-full) {
  width: 100%;
  max-width: 100%;
  margin-inline: 0;
}
.content-surface :is(.layout-width-wide, .layout-width-full) {
  max-width: 100%;
  margin-inline: 0;
}
.page-content > .content-surface:has(> .layout-width-text) {
  max-width: var(--layout-width-text);
  margin-inline: auto;
}
.page-content > .content-surface:has(> .layout-width-narrow) {
  max-width: var(--layout-width-narrow);
  margin-inline: auto;
}
@media (min-width: 641px) {
  .page-content > .content-surface:has(> .layout-width-wide) {
    width: var(--layout-width-wide);
    margin-inline: calc((100% - var(--layout-width-wide)) / 2);
  }
  .page-content > .content-surface:has(> .layout-width-full) {
    width: var(--layout-width-full);
    margin-inline: calc((100% - var(--layout-width-full)) / 2);
  }
}
.page-hero-column > .content-surface:first-child { margin-top: 0; }
.page-hero-column > .content-surface:last-child { margin-bottom: 0; }

@media (max-width: 520px) {
  .content-surface .rslinkbutton + .rslinkbutton:not(.rslinkbutton--text) {
    margin-top: 0.65rem;
  }
}

@media print {
  .content-surface {
    box-shadow: none;
    backdrop-filter: none;
    background: var(--color-surface);
    color: var(--color-text);
  }
  .page-content > .content-surface {
    width: 100%;
    max-width: 100%;
    margin-inline: 0;
  }
}
