h1, .u-text-style-h1 {
  font-size: var(--_typography-tokens---h1--size);
  line-height: var(--_typography-tokens---h1--line-height);
  font-weight: var(--_typography-tokens---h1--weight);
  letter-spacing: var(--_typography-tokens---h1--letter-spacing);
  margin-top: 0;
  margin-bottom: 0;
}

h2, .u-text-style-h2 {
  font-size: var(--_typography-tokens---h2--size);
  line-height: var(--_typography-tokens---h2--line-height);
  font-weight: var(--_typography-tokens---h2--weight);
  letter-spacing: var(--_typography-tokens---h2--letter-spacing);
  margin-top: 0;
  margin-bottom: 0;
}

h3, .u-text-style-h3 {
  font-size: var(--_typography-tokens---h3--size);
  line-height: var(--_typography-tokens---h3--line-height);
  font-weight: var(--_typography-tokens---h3--weight);
  letter-spacing: var(--_typography-tokens---h3--letter-spacing);
  margin-top: 0;
  margin-bottom: 0;
}

h4, .u-text-style-h4 {
  font-size: var(--_typography-tokens---h4--size);
  line-height: var(--_typography-tokens---h4--line-height);
  font-weight: var(--_typography-tokens---h4--weight);
  letter-spacing: var(--_typography-tokens---h4--letter-spacing);
  margin-top: 0;
  margin-bottom: 0;
}

h5, .u-text-style-h5 {
  font-size: var(--_typography-tokens---h5--size);
  line-height: var(--_typography-tokens---h5--line-height);
  font-weight: var(--_typography-tokens---h5--weight);
  letter-spacing: var(--_typography-tokens---h5--letter-spacing);
  margin-top: 0;
  margin-bottom: 0;
}

h6, .u-text-style-h6 {
  font-size: var(--_typography-tokens---h6--size);
  line-height: var(--_typography-tokens---h6--line-height);
  font-weight: var(--_typography-tokens---h6--weight);
  letter-spacing: var(--_typography-tokens---h6--letter-spacing);
  margin-top: 0;
  margin-bottom: 0;
}

p[role="alert"] {
  color: red;
  margin: 0;
}

fieldset {
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
  border: none;
  padding: 0;
  margin: 0;
  min-width: 0;
}

legend {
  margin-bottom: 1rem;
}
.ofl-src-root {
  display: flex;
  flex-direction: column;
  gap: var(--_site-sizes---vertical-gap--medium);
}

/* Tabs -------------------------------------------------------------- */

/*
 * One row, always. Above 767px the labels are CMS category names of any
 * length, so on tablet they used to wrap to a second line and break the
 * tab-strip-on-a-rule look — scroll the overflow sideways instead. The
 * scrollbar is hidden because a partly visible tab at the edge is the
 * affordance; `auto` means no scrolling at all once they already fit.
 */
.ofl-src-tabs {
  display: flex;
  flex-wrap: nowrap;
  gap: 0.625rem;
  overflow-x: auto;
  overscroll-behavior-x: contain;
  -webkit-overflow-scrolling: touch;
  scrollbar-width: none;
  border-bottom: 1px solid var(--border--brand);
}

.ofl-src-tabs::-webkit-scrollbar {
  display: none;
}

.ofl-src-tab {
  appearance: none;
  cursor: pointer;
  /* Never let a long label squash its neighbours — scroll them instead. */
  flex: 0 0 auto;
  white-space: nowrap;
  font-family: var(--_typography-primitives---family--button);
  font-size: 1.125rem;
  font-weight: var(--_typography-primitives---weight--regular);
  padding: var(--_site-sizes---spacing--0-5rem) var(--_site-sizes---spacing--1rem);
  border-radius: var(--_site-sizes---radius--small) var(--_site-sizes---radius--small) 0 0;
  border: 1px solid var(--tab--content-idle);
  border-bottom: 0;
  background: var(--_colour-primitives---neutral--100);
  color: var(--tab--content-idle);
  transition:
    background-color 0.15s ease,
    color 0.15s ease,
    border-color 0.15s ease;
}

.ofl-src-tab:hover {
  background: var(--tab--bg-hover);
  border-color: var(--tab--border-hover);
}

.ofl-src-tab.is-active {
  background: var(--tab--bg-active);
  border-color: var(--tab--bg-active);
  color: var(--tab--content-active);
}

/* Tabs dropdown (≤767px) -------------------------------------------- */

.ofl-src-tabs-dropdown {
  display: none;
  position: relative;
  z-index: 2;
}

.ofl-src-tabs-dropdown-trigger {
  appearance: none;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: space-between;
  width: 100%;
  gap: var(--_site-sizes---spacing--1rem);
  font-family: var(--_typography-primitives---family--button);
  font-size: var(--_typography-tokens---body-medium--size);
  font-weight: var(--_typography-primitives---weight--bold);
  padding: var(--_site-sizes---spacing--0-75rem) var(--_site-sizes---spacing--1-5rem);
  border-radius: var(--_site-sizes---radius--small);
  border: 1px solid var(--border--primary);
  background: var(--surface--background);
  color: var(--tab--content-idle);
}

.ofl-src-tabs-dropdown-trigger svg {
  flex: 0 0 auto;
  color: var(--icon--accent);
  transition: transform 0.15s ease;
}

.ofl-src-tabs-dropdown-trigger svg.is-open {
  transform: rotate(180deg);
}

.ofl-src-tabs-dropdown-panel {
  position: absolute;
  top: calc(100% + var(--_site-sizes---spacing--0-75rem));
  left: 0;
  right: 0;
  z-index: 1;
  overflow: hidden;
  border-radius: var(--_site-sizes---radius--small);
  border: 1px solid var(--tab--border-hover);
  background: var(--surface--background);
}

.ofl-src-tabs-dropdown-option {
  appearance: none;
  cursor: pointer;
  display: block;
  width: 100%;
  text-align: left;
  font-family: var(--_typography-primitives---family--button);
  font-size: var(--_typography-tokens---body-medium--size);
  font-weight: var(--_typography-primitives---weight--bold);
  padding: var(--_site-sizes---spacing--0-75rem) var(--_site-sizes---spacing--1-5rem);
  border: 0;
  background: var(--surface--background);
  color: var(--tab--content-idle);
}

.ofl-src-tabs-dropdown-option.is-active {
  background: var(--tab--bg-active);
  color: var(--tab--content-active);
}

@media (max-width: 767px) {
  .ofl-src-tabs {
    display: none;
  }

  .ofl-src-tabs-dropdown {
    display: block;
  }
}

/* Carousel ------------------------------------------------------------ */

.ofl-src-carousel-wrap {
  position: relative;
  /* Keep the arrows above slides, but below the tabs dropdown. */
  isolation: isolate;
}

/* Invisible sizing reference for the nav buttons: same width formula as
   .ofl-src-slide below, so `aspect-ratio` gives it the exact height of
   one slide's 2:1 image. `top`/`height` percentages resolve against a
   containing block's *height*, not its width, so the button can only be
   centered on the image by nesting it inside a box whose real height
   already equals the image height — not by computing that height from
   `100%` directly on the button itself. */
.ofl-src-nav-anchor {
  position: absolute;
  top: 0;
  width: calc(100% - 40px);
  aspect-ratio: 2 / 1;
  pointer-events: none;
}

.ofl-src-nav-anchor--prev {
  left: 0;
}

.ofl-src-nav-anchor--next {
  right: 0;
}

@media (min-width: 768px) {
  .ofl-src-nav-anchor {
    width: calc((100% - 40px - var(--_site-sizes---spacing--1-5rem)) / 2);
  }
}

@media (min-width: 1024px) {
  .ofl-src-nav-anchor {
    width: calc((100% - 40px - 2 * var(--_site-sizes---spacing--1-5rem)) / 3);
  }
}

.ofl-src-carousel {
  min-width: 0;
  padding: 0 20px;
  overflow: hidden;
  touch-action: pan-y pinch-zoom;
}

.ofl-src-carousel-container {
  display: flex;
  gap: var(--_site-sizes---spacing--1-5rem);
}

.ofl-src-slide {
  flex: 0 0 100%;
  min-width: 0;
  height: auto;
}

@media (min-width: 768px) {
  .ofl-src-slide {
    flex-basis: calc((100% - var(--_site-sizes---spacing--1-5rem)) / 2);
  }
}

@media (min-width: 1024px) {
  .ofl-src-slide {
    flex-basis: calc((100% - 2 * var(--_site-sizes---spacing--1-5rem)) / 3);
  }
}

.ofl-src-nav {
  position: absolute;
  top: 50%;
  z-index: 1;
  display: flex;
  align-items: center;
  justify-content: center;
  width: 2.5rem;
  height: 2.5rem;
  padding: 0;
  border: 2px solid var(--border--primary);
  border-radius: 100rem;
  background-color: var(--surface--background);
  color: var(--icon--accent);
  cursor: pointer;
  pointer-events: auto;
  transform: translateY(-50%);
}

.ofl-src-nav-anchor--prev .ofl-src-nav {
  left: 0;
}

.ofl-src-nav-anchor--next .ofl-src-nav {
  right: 0;
}

.ofl-src-nav:hover {
  background: var(--tab--bg-hover);
}

.ofl-src-nav:disabled {
  cursor: not-allowed;
  background-color: var(--surface--foreground);
}

.ofl-src-nav:disabled svg {
  opacity: 0.5;
  color: var(--input--content-placeholder);
}

.ofl-src-nav--prev svg {
  transform: scaleX(-1);
}

/* Card ------------------------------------------------------------ */

.ofl-src-card {
  display: flex;
  flex-direction: column;
  height: 100%;
}

.ofl-src-card-media {
  margin: 0;
  overflow: hidden;
  aspect-ratio: 2 / 1;
}

.ofl-src-card-media img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}

.ofl-src-card-title {
  margin: 0;
  color: var(--text--accent);
}

.ofl-src-card-media + .ofl-src-card-title {
  margin-top: var(--_site-sizes---spacing--1-5rem);
}

.ofl-src-card-title + .ofl-src-card-description {
  margin-top: var(--_site-sizes---spacing--0-5rem);
}

.ofl-src-card-description {
  color: var(--text--primary);
  font-family: var(--_typography-tokens---body-xlarge--font-family);
  font-size: var(--_typography-tokens---body-xlarge--size);
  line-height: var(--_typography-tokens---body-xlarge--line-height);
}

.ofl-src-card-description p {
  margin: 0 0 0.75rem;
}

.ofl-src-card-description p:last-child {
  margin-bottom: 0;
}

.ofl-src-card-description strong {
  font-weight: var(--_typography-primitives---weight--bold);
}

.ofl-src-card-description a {
  color: var(--text-link--content-idle);
  text-decoration: underline;
}

.ofl-src-card-description a:hover {
  color: var(--text-link--content-hover);
}

.ofl-src-status {
  color: var(--text--secondary);
}

/*
 * Canvas-only stand-in for CMS-driven components. Takes its colour from the
 * surrounding text, like the campaign badge placeholder, so it reads on light
 * and dark sections alike without a palette of its own.
 */

.ofl-canvas-placeholder {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 4px;
  min-height: 96px;
  padding: 16px;
  border: 1px dashed currentColor;
  border-radius: 4px;
  font-size: 14px;
  line-height: 1.4;
  text-align: center;
  opacity: 0.5;
}

.ofl-canvas-placeholder.is-inline {
  display: inline;
  min-height: 0;
  padding: 0 4px;
  font-size: inherit;
  line-height: inherit;
}

