/* ==========================================================================
   RESPONSIVE SAFETY NET (live site)
   Phones 360-767px, tablets 768-1023px, desktop 1024px and up.
   Loaded after styles.css. Prevents horizontal overflow and keeps every
   block readable at each width.
   ========================================================================== */
/* clip (not hidden) keeps the sideways guard but doesn't make the page a scroll box,
   so position: sticky headers stay stuck to the screen. Older browsers keep hidden. */
html, body { max-width: 100%; overflow-x: hidden; overflow-x: clip; overflow-y: visible; }
img, video, svg { max-width: 100%; height: auto; }
.page-shell, .site-main-content, .content-padded, section { min-width: 0; max-width: 100%; }
.site-main-content { width: 100%; }


/* About card: stacked on phones, side by side from 768px */
.about-card { display: grid; grid-template-columns: minmax(0, 1fr); gap: 1.25rem; }
@media (min-width: 768px) {
  .about-card { grid-template-columns: minmax(0, 1.25fr) minmax(0, 0.95fr); }
}
.about-portrait-wrap img { width: 100%; height: auto; object-fit: cover; }

/* Process steps wrap instead of squeezing */
.lifecycle-steps-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 0.75rem; }
@media (min-width: 768px) {
  .lifecycle-steps-grid { grid-template-columns: repeat(auto-fit, minmax(120px, 1fr)); }
}

/* Horizontal carousel scrolls with touch and snaps to cards */
.carousel-peek-container { position: relative; }
.carousel-peek-track {
  display: flex;
  overflow-x: auto;
  scroll-snap-type: x mandatory;
  -webkit-overflow-scrolling: touch;
  overscroll-behavior-x: contain;
}
.carousel-peek-track > * { flex: 0 0 auto; scroll-snap-align: start; }

/* Tool icons wrap */
.tools-icons-row { display: flex; flex-wrap: wrap; gap: 1rem; justify-content: center; }

/* Forms and modals fit the screen */
.contact-form-container { width: 100%; max-width: 100%; }
.site-modal-box { width: calc(100vw - 2rem); max-width: 100%; }
@media (min-width: 768px) {
  .site-modal-box { width: auto; }
}

/* Headings, video blocks and media */
.content-heading { font-size: clamp(1.6rem, 4vw, 2.4rem); font-weight: 800; line-height: 1.15; }
.media-block img, .media-block video {
  width: 100%;
  aspect-ratio: 16 / 9;
  object-fit: cover;
  display: block;
  border-radius: 6px;
  background: #111;
}
.media-block video + img, .media-block img + video, .media-block video + video { margin-top: 1rem; }
.media-caption { font-size: 0.85rem; margin-top: 0.5rem; }

/* ==========================================================================
   CARD LAYOUTS (per container: mobile, tablet and desktop column counts)
   Breakpoints: phone below 768px, tablet 768 to 1023px, desktop 1024px and up.
   ========================================================================== */
.cards-grid-2col {
  display: grid;
  gap: 1.25rem;
  grid-template-columns: repeat(var(--cols-m, 1), minmax(0, 1fr));
}
@media (min-width: 768px) {
  .cards-grid-2col { grid-template-columns: repeat(var(--cols-t, 2), minmax(0, 1fr)); }
}
@media (min-width: 1024px) {
  .cards-grid-2col { grid-template-columns: repeat(var(--cols-d, 2), minmax(0, 1fr)); }
}
.card-slot { min-width: 0; }
.card-slot[hidden] { display: none; }
.cards-more-sentinel { height: 1px; }

/* One row of cards, swipeable, at every screen size */
.card-row-scroller {
  display: flex;
  gap: 1.25rem;
  overflow-x: auto;
  scroll-snap-type: x mandatory;
  -webkit-overflow-scrolling: touch;
  overscroll-behavior-x: contain;
  padding-bottom: 0.5rem;
}
.card-row-scroller > .card-slot {
  flex: 0 0 calc((100% - (var(--cols-m, 1) - 1) * 1.25rem) / var(--cols-m, 1));
  scroll-snap-align: start;
}
@media (min-width: 768px) {
  .card-row-scroller > .card-slot {
    flex-basis: calc((100% - (var(--cols-t, 2) - 1) * 1.25rem) / var(--cols-t, 2));
  }
}
@media (min-width: 1024px) {
  .card-row-scroller > .card-slot {
    flex-basis: calc((100% - (var(--cols-d, 2) - 1) * 1.25rem) / var(--cols-d, 2));
  }
}

/* Paged grid */
.cards-pager {
  display: flex;
  gap: 0.75rem;
  align-items: center;
  justify-content: center;
  margin-top: 1rem;
}
.cards-pager[hidden] { display: none; }
.cards-pager button {
  border: 2px solid #000;
  background: #fff;
  color: #000;
  border-radius: 999px;
  padding: 0.4rem 0.9rem;
  font-weight: 700;
  cursor: pointer;
}
.cards-pager button:disabled { opacity: 0.35; cursor: default; }
.pager-status { font-size: 0.85rem; }

/* Swipe galleries with dots (video blocks and process stages) */
.media-swipe-track {
  display: flex;
  overflow-x: auto;
  scroll-snap-type: x mandatory;
  -webkit-overflow-scrolling: touch;
  overscroll-behavior-x: contain;
}
.media-slide { flex: 0 0 100%; min-width: 0; scroll-snap-align: start; }
.media-slide img, .media-slide video {
  width: 100%;
  aspect-ratio: 16 / 9;
  object-fit: cover;
  display: block;
  border-radius: 6px;
  background: #111;
}
.media-swipe.is-stage .media-slide img, .media-swipe.is-stage .media-slide video { aspect-ratio: 16 / 10; }
.media-dots { display: flex; gap: 0.45rem; justify-content: center; margin-top: 0.6rem; }
.media-dot {
  width: 10px;
  height: 10px;
  border-radius: 50%;
  border: 1.5px solid #000;
  background: transparent;
  padding: 0;
  cursor: pointer;
}
.media-dot.is-active { background: #000; }

/* Expandable long text */
.expandable-wrap { margin-bottom: 0.25rem; }
.expandable.is-clamped {
  display: -webkit-box;
  -webkit-line-clamp: var(--expand-lines, 4);
  -webkit-box-orient: vertical;
  overflow: hidden;
}
.expand-btn {
  margin-top: 0.6rem;
  font: inherit;
  font-weight: 700;
  color: #000;
  cursor: pointer;
  background: none;
  border: 0;
}
.expand-btn[hidden] { display: none; }
.expand-underline { padding: 0; text-decoration: underline; text-underline-offset: 4px; }
.expand-pill { background: #fff; border: 2px solid #000; border-radius: 999px; padding: 0.45rem 1rem; }
.expand-shape { background: #fff; border: 2px solid #000; border-radius: 10px; padding: 0.55rem 1.1rem; }

/* About card: photo placement and media */
.about-portrait-wrap video { width: 100%; height: auto; object-fit: cover; display: block; border-radius: 6px; background: #111; }
.about-card.photo-top { grid-template-columns: minmax(0, 1fr); }
.about-card.photo-top .about-portrait-wrap { order: -1; }
@media (min-width: 768px) {
  .about-card.photo-left .about-portrait-wrap { order: -1; }
  .about-card.photo-top { grid-template-columns: minmax(0, 1fr); }
}

/* Button icons, full-width media and spacers */
.btn-icon {
  width: 1.1em;
  height: 1.1em;
  object-fit: contain;
  display: inline-block;
  vertical-align: middle;
  margin-left: 0.4em;
}
/* Full width: the media runs edge to edge, past the page padding */
.media-block.is-full-width {
  width: 100vw;
  max-width: 100vw;
  position: relative;
  left: 50%;
  margin-left: -50vw;
  margin-right: 0;
}
.media-block.is-full-width img,
.media-block.is-full-width video { border-radius: 0; }
.spacer { display: block; }
.spacer-rule { display: block; width: 100%; }

/* ==========================================================================
   ROUND 8: equal-height cards, card descriptions, aspect ratios, downloads,
   accessibility, About photo
   ========================================================================== */
[data-card-height="equal"] .card-slot,
[data-card-height="equal"] .project-card { height: 100%; }
[data-card-height="equal"] .project-card { height: 100%; display: flex; flex-direction: column; }
[data-card-height="equal"] .card-info-pane { flex: 1 1 auto; display: flex; flex-direction: column; justify-content: space-between; }
.card-desc { margin-top: 0.35rem; }
.card-desc-text { font-size: 0.85rem; line-height: 1.45; margin: 0; }
.card-desc-text.is-clamped {
  display: -webkit-box;
  -webkit-line-clamp: var(--desc-lines, 3);
  -webkit-box-orient: vertical;
  overflow: hidden;
}
.card-more {
  margin-top: 0.3rem;
  background: none;
  border: 0;
  padding: 0;
  font: inherit;
  font-weight: 700;
  text-decoration: underline;
  color: inherit;
  cursor: pointer;
}
.card-more[hidden] { display: none; }
.card-dialog { border: 0; border-radius: 12px; padding: 0; max-width: min(640px, calc(100vw - 2rem)); }
.card-dialog::backdrop { background: rgba(0, 0, 0, 0.55); }
.card-dialog-body { padding: 1.5rem; position: relative; }
.card-dialog-close {
  position: absolute; top: 0.5rem; right: 0.5rem; width: 40px; height: 40px;
  border: 0; background: none; font-size: 1.6rem; cursor: pointer;
}
.card-dialog-text { white-space: pre-line; line-height: 1.6; margin-top: 1.5rem; }

.media-block.aspect-auto img, .media-block.aspect-auto video,
.about-portrait-wrap.aspect-auto img, .about-portrait-wrap.aspect-auto video { aspect-ratio: auto; height: auto; }
.media-block.aspect-16-9 img, .media-block.aspect-16-9 video,
.about-portrait-wrap.aspect-16-9 img, .about-portrait-wrap.aspect-16-9 video { aspect-ratio: 16 / 9; }
.media-block.aspect-4-3 img, .media-block.aspect-4-3 video,
.about-portrait-wrap.aspect-4-3 img, .about-portrait-wrap.aspect-4-3 video { aspect-ratio: 4 / 3; }
.media-block.aspect-1-1 img, .media-block.aspect-1-1 video,
.about-portrait-wrap.aspect-1-1 img, .about-portrait-wrap.aspect-1-1 video { aspect-ratio: 1 / 1; }
.media-block.aspect-4-5 img, .media-block.aspect-4-5 video,
.about-portrait-wrap.aspect-4-5 img, .about-portrait-wrap.aspect-4-5 video { aspect-ratio: 4 / 5; }
.media-block.aspect-9-16 img, .media-block.aspect-9-16 video,
.about-portrait-wrap.aspect-9-16 img, .about-portrait-wrap.aspect-9-16 video { aspect-ratio: 9 / 16; }

.media-downloads { display: flex; flex-wrap: wrap; gap: 0.75rem; margin-top: 0.5rem; }
.media-download { font-weight: 700; text-decoration: underline; text-underline-offset: 4px; }

.skip-link {
  position: absolute; left: -9999px; top: 0; z-index: 9999;
  background: #000; color: #fff; padding: 0.6rem 1rem; font-weight: 700;
}
.skip-link:focus { left: 0.5rem; top: 0.5rem; }
.a11y-on :focus-visible { outline: 3px solid #000; outline-offset: 3px; }

/* ==========================================================================
   ROUND 8 UPDATE: header and footer details, backgrounds
   ========================================================================== */
.site-details { display: grid; grid-template-columns: 1fr auto 1fr; gap: 1rem; padding: 0.75rem 1.25rem; align-items: stretch; }
.site-details-col { display: flex; flex-direction: column; gap: 0.35rem; min-height: 100%; }
.site-details-left { justify-self: start; text-align: left; }
.site-details-center { justify-self: center; text-align: center; }
.site-details-right { justify-self: end; text-align: right; }
.site-detail { display: flex; }
.site-detail-middle { margin-top: auto; margin-bottom: auto; }
.site-detail-bottom { margin-top: auto; }
.site-detail a { color: inherit; text-decoration: underline; text-underline-offset: 3px; }

.bg-wrap { position: relative; isolation: isolate; overflow: hidden; }
.bg-layer { position: absolute; inset: 0; z-index: 0; background-size: cover; background-position: center; background-repeat: no-repeat; pointer-events: none; }
.bg-video { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; z-index: 0; pointer-events: none; }
.bg-content { position: relative; z-index: 1; }
@media (prefers-reduced-motion: reduce) { .bg-video { display: none; } }

/* Markdown body text */
.md-body > :first-child { margin-top: 0; }
.md-body > :last-child { margin-bottom: 0; }
.md-body p { margin: 0 0 0.75em; }
.md-body h1, .md-body h2, .md-body h3, .md-body h4, .md-body h5, .md-body h6 { margin: 0.6em 0 0.35em; line-height: 1.25; }
.md-body h1 { font-size: 1.6rem; } .md-body h2 { font-size: 1.35rem; } .md-body h3 { font-size: 1.15rem; }
.md-body ul, .md-body ol { margin: 0 0 0.75em; padding-left: 1.25rem; }
.md-body li { margin: 0.15em 0; }
.md-body code { font-family: ui-monospace, Menlo, Consolas, monospace; font-size: 0.9em; background: rgba(0,0,0,0.06); padding: 0 0.25em; border-radius: 3px; }
.md-body pre { overflow: auto; background: #f3f3f3; padding: 0.75rem; border-radius: 6px; margin: 0 0 0.75em; }
.md-body pre code { background: none; padding: 0; }
.md-body blockquote { border-left: 3px solid #ccc; margin: 0 0 0.75em; padding-left: 0.75rem; color: #555; }
.md-body hr { border: 0; border-top: 1px solid #ccc; margin: 1rem 0; }
.md-body img { max-width: 100%; height: auto; border-radius: 6px; display: block; margin: 0.5rem 0; }
.md-body table { border-collapse: collapse; margin: 0 0 0.75em; max-width: 100%; display: block; overflow-x: auto; }
.md-body th, .md-body td { border: 1px solid #ccc; padding: 0.35rem 0.5rem; text-align: left; }
.md-body a { color: inherit; text-decoration: underline; text-underline-offset: 3px; }

/* ==========================================================================
   Header, footer and 404 items
   ========================================================================== */
.bar-custom { display: flex; flex-direction: column; gap: 0.75rem; padding: 1rem 1.25rem; }
.bar-item { display: flex; }
.bar-align-left { justify-content: flex-start; text-align: left; }
.bar-align-center { justify-content: center; text-align: center; }
.bar-align-right { justify-content: flex-end; text-align: right; }
.bar-item .md-body { width: 100%; }
.bar-button { display: inline-flex; align-items: center; gap: 0.4rem; color: inherit; font-weight: 700; text-decoration: underline; text-underline-offset: 4px; }
.bar-icon { width: 18px; height: 18px; object-fit: contain; }
.bar-image { max-width: 100%; height: auto; border-radius: 6px; }
.nf-page { min-height: 60vh; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 1rem; text-align: center; padding: 4rem 1.5rem; }
.nf-page .bar-item { justify-content: center; }

/* ==========================================================================
   Header behaviour: sticky, not sticky, glass pill on scroll
   The pill is a full-width, one-row bar that sits a set distance in from each side of the screen.
   Scrolling only switches classes; the transitions do the morph.
   ========================================================================== */
:root {
  --pill-ease: cubic-bezier(0.22, 0.8, 0.24, 1);
}
header[data-header-mode="sticky"] { position: sticky; top: 0; z-index: 40; }
header[data-header-mode="static"] { position: relative; }
header[data-header-mode="pill"] {
  position: sticky;
  top: var(--pill-top, 12px);
  z-index: 40;
  width: auto;
  margin-left: 0;
  margin-right: 0;
  /* The same padding at the top and when pinned, so the page below never moves */
  padding: var(--pill-pad-y, 8px) var(--pill-pad-x, 18px);
  background-color: transparent;
  transition: margin 0.55s var(--pill-ease), padding 0.55s var(--pill-ease), border-radius 0.55s var(--pill-ease),
    background-color 0.55s ease, box-shadow 0.55s ease, backdrop-filter 0.55s ease, -webkit-backdrop-filter 0.55s ease, top 0.55s var(--pill-ease);
}
header[data-header-mode="pill"].is-pill {
  margin-left: var(--pill-side, 12px);
  margin-right: var(--pill-side, 12px);
  border-radius: var(--pill-radius, 999px);
  background-color: var(--pill-tint, rgba(255, 255, 255, 0.55));
  backdrop-filter: blur(var(--pill-blur, 14px)) saturate(1.3);
  -webkit-backdrop-filter: blur(var(--pill-blur, 14px)) saturate(1.3);
  box-shadow: 0 6px 24px rgba(0, 0, 0, 0.12);
}
/* One row, always: the same layout at the top and when pinned, so nothing reflows on scroll */
header[data-header-mode="pill"] .hdr-inner {
  display: flex;
  flex-direction: row;
  flex-wrap: nowrap;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  min-width: 0;
  transition: transform 0.55s var(--pill-ease), opacity 0.4s ease;
}
/* Each item in the row sizes to its content (no item takes the full width) */
header[data-header-mode="pill"] .hdr-inner > * { flex: 0 1 auto; width: auto; min-width: 0; }
header[data-header-mode="pill"] .hdr-inner .breadcrumb-bar { flex: 0 0 auto; }
/* Floating breadcrumbs and page title: copies of the page's own, shown while the header is pinned */
.pill-float {
  position: fixed;
  z-index: 45;
  top: var(--pill-top, 12px);
  box-sizing: border-box;
  padding: var(--pill-pad-y, 8px) var(--pill-pad-x, 18px);
  border-radius: var(--pill-radius, 999px);
  background-color: var(--pill-tint, rgba(255, 255, 255, 0.55));
  backdrop-filter: blur(var(--pill-blur, 14px)) saturate(1.3);
  -webkit-backdrop-filter: blur(var(--pill-blur, 14px)) saturate(1.3);
  box-shadow: 0 6px 24px rgba(0, 0, 0, 0.12);
  white-space: nowrap;
  max-width: calc(100vw - 2 * var(--pill-side, 12px));
  overflow: hidden;
  text-overflow: ellipsis;
  opacity: 0;
  transform: translateY(-10px) scale(0.94);
  transform-origin: top center;
  pointer-events: none;
  transition: opacity 0.45s ease, transform 0.6s var(--pill-ease), background-color 0.45s ease, backdrop-filter 0.45s ease;
}
.pill-float.is-on { opacity: 1; transform: none; pointer-events: auto; }
.pill-float-title {
  left: var(--pill-side, 12px);
  font-weight: 700;
  font-size: var(--title-size, 1.05rem);
  line-height: 1.2;
  transition-delay: 0.08s;
}
.pill-float-crumbs { right: var(--pill-side, 12px); font-size: 0.85rem; transition-delay: 0.14s; }
.pill-float-crumbs .crumb-sep svg { width: 10px; height: 10px; }
.pill-float-crumbs a, .pill-float-crumbs span { color: inherit; }
/* The page's own breadcrumb and title stay in place, just faded out */
.breadcrumb-bar.pill-hidden, .banner-heading.pill-hidden { opacity: 0; pointer-events: none; transition: opacity 0.35s ease; }
/* Mobile: the title sits on top, and the header pill drops below it */
@media (max-width: 767px) {
  .pill-float-title { left: var(--pill-side, 12px); right: var(--pill-side, 12px); top: var(--pill-top, 12px); text-align: center; white-space: normal; }
  body.has-title-float header[data-header-mode="pill"].is-pill { top: calc(var(--pill-top, 12px) + 52px); }
  /* On phones the breadcrumbs stay in the header row: no floating copy */
  .breadcrumb-bar.pill-hidden { opacity: 1; pointer-events: auto; }
  .pill-float-crumbs { display: none; }
}
/* Tablet and desktop: the title sits far left, breadcrumbs far right, the header pill below both */
@media (min-width: 768px) {
  body.has-float-row header[data-header-mode="pill"].is-pill { top: calc(var(--pill-top, 12px) + 52px); }
}
/* Edge colour fringe on the glass (aberration), an option set in the admin */
header[data-header-mode="pill"].is-pill[data-aberration="on"], .pill-float.is-on.has-aberration { background-image: linear-gradient(90deg, rgba(255, 40, 120, 0.12), rgba(255, 255, 255, 0) 30%, rgba(0, 190, 255, 0.12)); }
header[data-header-mode="pill"].is-pill[data-aberration="on"],
.pill-float.is-on.has-aberration {
  box-shadow: inset 1.5px 0 0 rgba(255, 40, 120, 0.45), inset -1.5px 0 0 rgba(0, 190, 255, 0.45), inset 0 1.5px 0 rgba(255, 255, 255, 0.7), 0 6px 24px rgba(0, 0, 0, 0.14);
}
@media (prefers-reduced-motion: reduce) {
  header[data-header-mode="pill"], header[data-header-mode="pill"] .hdr-inner, .pill-float, .breadcrumb-bar, .banner-heading { transition: none !important; }
}

/* ==========================================================================
   Popups and action buttons
   ========================================================================== */
.block-anchor { display: block; height: 0; scroll-margin-top: 90px; }
.pop {
  --pop-bg: #111111;
  --pop-fg: #ffffff;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.45rem;
  box-sizing: border-box;
  min-height: 44px;
  padding: 0.6rem 1.1rem;
  font: inherit;
  font-size: 0.95rem;
  font-weight: 700;
  line-height: 1.1;
  text-decoration: none;
  color: var(--pop-fg);
  background-color: var(--pop-bg);
  border: 0;
  border-radius: 999px;
  cursor: pointer;
  box-shadow: 0 8px 22px rgba(0, 0, 0, 0.18);
  transition: transform 0.25s ease, box-shadow 0.25s ease, filter 0.25s ease;
  -webkit-tap-highlight-color: transparent;
}
.pop:hover, .pop:focus-visible { transform: translateY(-2px); box-shadow: 0 12px 28px rgba(0, 0, 0, 0.22); }
.pop:focus-visible { outline: 3px solid #000; outline-offset: 3px; }
.pop-icon { width: 20px; height: 20px; object-fit: contain; flex: 0 0 auto; }
.pop-shape-pill { border-radius: 999px; }
.pop-shape-circle { border-radius: 50%; width: 56px; height: 56px; min-height: 0; padding: 0; }
.pop-shape-square { border-radius: 14px; }
.pop-style-icon { padding: 0; min-height: 0; width: 56px; height: 56px; border-radius: 50%; }
.pop-style-icon.pop-shape-square { border-radius: 14px; }
.pop-style-icon.pop-shape-pill { width: auto; min-width: 56px; padding: 0 1rem; border-radius: 999px; }
.pop-style-icon .pop-icon { width: 26px; height: 26px; }
/* Glass: see-through with a blur, like the header pill */
.pop-style-glass {
  background-color: color-mix(in srgb, var(--pop-bg) 35%, transparent);
  color: var(--pop-fg);
  backdrop-filter: blur(14px) saturate(1.3);
  -webkit-backdrop-filter: blur(14px) saturate(1.3);
  border: 1px solid rgba(255, 255, 255, 0.45);
  box-shadow: inset 1.5px 0 0 rgba(255, 40, 120, 0.35), inset -1.5px 0 0 rgba(0, 190, 255, 0.35), 0 8px 22px rgba(0, 0, 0, 0.14);
}
/* Positions for sticky buttons */
.pop-wrap-fixed { position: fixed; z-index: 60; display: flex; flex-direction: column; gap: 10px; max-width: calc(100vw - 32px); }
.pop-wrap-br { right: 16px; bottom: 16px; align-items: flex-end; }
.pop-wrap-bl { left: 16px; bottom: 16px; align-items: flex-start; }
.pop-wrap-tr { right: 16px; top: 16px; align-items: flex-end; }
.pop-wrap-tl { left: 16px; top: 16px; align-items: flex-start; }
.pop-wrap-inline { display: flex; justify-content: center; margin: 1.25rem 0; }
/* Message bubble that tells the visitor what to do */
.pop-msg {
  position: relative;
  max-width: 260px;
  display: flex;
  align-items: flex-start;
  gap: 0.4rem;
  padding: 0.55rem 0.7rem;
  border-radius: 12px;
  background: #fff;
  color: #111;
  font-size: 0.85rem;
  line-height: 1.35;
  box-shadow: 0 6px 18px rgba(0, 0, 0, 0.16);
  opacity: 0;
  transform: translateY(6px) scale(0.96);
  transition: opacity 0.35s ease, transform 0.4s cubic-bezier(0.2, 0.8, 0.2, 1);
}
.pop-msg.is-on { opacity: 1; transform: none; }
.pop-msg[hidden] { display: none; }
.pop-msg-x { border: 0; background: none; font-size: 1.1rem; line-height: 1; cursor: pointer; color: inherit; padding: 0 0 0 0.2rem; }
/* Animations for sticky buttons (set in the admin) */
.pop-anim-pulse { animation: pop-pulse 2.2s ease-in-out infinite; }
.pop-anim-bounce { animation: pop-bounce 1.8s ease-in-out infinite; }
.pop-anim-slide { animation: pop-slide 0.7s cubic-bezier(0.2, 0.8, 0.2, 1) both; }
@keyframes pop-pulse { 0%, 100% { box-shadow: 0 0 0 0 rgba(0, 0, 0, 0.25); } 50% { box-shadow: 0 0 0 12px rgba(0, 0, 0, 0); } }
@keyframes pop-bounce { 0%, 100% { transform: translateY(0); } 50% { transform: translateY(-6px); } }
@keyframes pop-slide { from { transform: translateX(120%); opacity: 0; } to { transform: none; opacity: 1; } }
@media (prefers-reduced-motion: reduce) {
  .pop, .pop-msg, .pop-anim-pulse, .pop-anim-bounce, .pop-anim-slide { animation: none !important; transition: none !important; }
}
.pop-glyph { font-family: Georgia, serif; font-size: 1.4rem; font-weight: 700; line-height: 1; }

/* ==========================================================================
   Card templates: six looks for the cards in a grid (set in the admin, "Card look")
   ========================================================================== */
[data-card-tpl] .project-card { position: relative; }

/* 2. Overlay: the photo fills the card, text sits on a dark fade at the bottom */
[data-card-tpl="overlay"] .project-card { min-height: 320px; border-radius: 18px; overflow: hidden; display: flex; flex-direction: column; justify-content: flex-end; background: #111; color: #fff; box-shadow: 0 10px 30px rgba(0,0,0,0.2); }
[data-card-tpl="overlay"] .card-image-wrap { position: absolute; inset: 0; }
[data-card-tpl="overlay"] .card-image-wrap img { width: 100%; height: 100%; object-fit: cover; }
[data-card-tpl="overlay"] .card-info-pane { position: relative; z-index: 1; padding: 1.4rem 1.2rem 1.2rem; background: linear-gradient(to top, rgba(0,0,0,0.82), rgba(0,0,0,0)); }
:where([data-card-tpl="overlay"]) .card-info-pane h3.card-title, :where([data-card-tpl="overlay"]) .card-info-pane .card-meta, :where([data-card-tpl="overlay"]) .card-info-pane .card-desc-text { color: #fff; }

/* 3. Split: photo on the left, text on the right */
[data-card-tpl="split"] .project-card { display: grid; grid-template-columns: minmax(120px, 42%) 1fr; border-radius: 14px; overflow: hidden; border: 1px solid rgba(0,0,0,0.08); background: #fff; }
[data-card-tpl="split"] .card-image-wrap { height: 100%; min-height: 170px; }
[data-card-tpl="split"] .card-image-wrap img { width: 100%; height: 100%; object-fit: cover; display: block; }
[data-card-tpl="split"] .card-info-pane { padding: 1.1rem 1.2rem; }

/* 4. Minimal: no box, a coloured rule above, a wide photo, quiet type */
[data-card-tpl="minimal"] .project-card { background: transparent; box-shadow: none; border-top: 3px solid currentColor; padding-top: 1rem; }
[data-card-tpl="minimal"] .card-image-wrap { aspect-ratio: 16 / 9; margin-bottom: 0.9rem; border-radius: 0; }
:where([data-card-tpl="minimal"]) .card-info-pane h3.card-title { font-weight: 600; font-size: 1.25rem; letter-spacing: 0.01em; }

/* 5. Glass: a frosted panel floats over the photo */
[data-card-tpl="glass"] .project-card { min-height: 320px; border-radius: 22px; overflow: hidden; display: flex; align-items: flex-end; background: #222; }
[data-card-tpl="glass"] .card-image-wrap { position: absolute; inset: 0; }
[data-card-tpl="glass"] .card-image-wrap img { width: 100%; height: 100%; object-fit: cover; }
[data-card-tpl="glass"] .card-info-pane { position: relative; z-index: 1; width: calc(100% - 28px); box-sizing: border-box; margin: 14px; padding: 1rem 1.1rem; border-radius: 18px; background: rgba(255,255,255,0.22); border: 1px solid rgba(255,255,255,0.45); backdrop-filter: blur(16px) saturate(1.4); -webkit-backdrop-filter: blur(16px) saturate(1.4); }

/* 6. Bold: a solid colour block, big uppercase title, the photo faded behind */
[data-card-tpl="bold"] .project-card { background: var(--c-primary, #1c1c1c); color: #fff; border-radius: 0; padding: 1.6rem; min-height: 260px; display: flex; flex-direction: column; justify-content: flex-end; overflow: hidden; }
[data-card-tpl="bold"] .card-image-wrap { position: absolute; inset: 0; opacity: 0.22; }
[data-card-tpl="bold"] .card-image-wrap img { width: 100%; height: 100%; object-fit: cover; }
[data-card-tpl="bold"] .card-info-pane { position: relative; z-index: 1; }
:where([data-card-tpl="bold"]) .card-info-pane h3.card-title { font-size: clamp(1.8rem, 4vw, 2.6rem); line-height: 0.98; text-transform: uppercase; font-weight: 900; letter-spacing: -0.01em; }
:where([data-card-tpl="bold"]) .card-info-pane .card-meta, :where([data-card-tpl="bold"]) .card-info-pane .card-desc-text { opacity: 0.85; color: inherit; }

/* Body text that is cut to a number of lines (Read more) */
.md-body-text.is-clamped { display: -webkit-box; -webkit-line-clamp: var(--read-lines, 4); -webkit-box-orient: vertical; overflow: hidden; }
.read-more-btn { margin-top: 0.3rem; border: 0; background: none; padding: 0; font: inherit; font-weight: 700; text-decoration: underline; text-underline-offset: 3px; cursor: pointer; color: inherit; }
.pop-msg-body { margin: 0; }
.pop-msg-body p { margin: 0; }

/* ==========================================================================
   Card looks inspired by the reference set: sheet, ticket, editorial, stats, poster
   Adjustments (radius, padding, photo shape, overlay, blur, shadow, border, colours, align) come from
   CSS variables the admin sets on the grid. Only grids with adjustments carry data-cd.
   ========================================================================== */
[data-cd] .project-card { border-radius: var(--cd-radius, 16px); box-shadow: 0 var(--cd-shadow, 10px) calc(var(--cd-shadow, 10px) * 2) rgba(0, 0, 0, 0.14); border: var(--cd-border, 0px) solid rgba(0, 0, 0, 0.12); }
[data-cd] .card-image-wrap { aspect-ratio: var(--cd-ratio, auto); }
[data-cd] .card-info-pane { text-align: var(--cd-align, left); }
[data-cd][data-card-tpl="classic"] .project-card, [data-cd][data-card-tpl="minimal"] .project-card,
[data-cd][data-card-tpl="split"] .project-card { padding: var(--cd-pad, 16px); background-color: var(--cd-bg, transparent); color: var(--cd-fg, inherit); }
[data-card-tpl="overlay"] .card-info-pane { background: linear-gradient(to top, rgba(0,0,0, var(--cd-overlay, 0.82)), rgba(0,0,0,0)); }
[data-card-tpl="glass"] .card-info-pane { backdrop-filter: blur(var(--cd-blur, 16px)) saturate(1.4); -webkit-backdrop-filter: blur(var(--cd-blur, 16px)) saturate(1.4); }

/* Sheet: the photo sits on top, a white sheet overlaps it with a soft shadow */
[data-card-tpl="sheet"] .project-card { background: transparent; box-shadow: none; border: 0; overflow: visible; display: flex; flex-direction: column; }
[data-card-tpl="sheet"] .card-image-wrap { position: relative; border-radius: var(--cd-radius, 22px); overflow: hidden; aspect-ratio: var(--cd-ratio, 4 / 3); }
[data-card-tpl="sheet"] .card-image-wrap img { width: 100%; height: 100%; object-fit: cover; display: block; }
[data-card-tpl="sheet"] .card-info-pane { position: relative; margin: -28px 10px 0; padding: 1.1rem 1.25rem 1.2rem; background: var(--cd-bg, #ffffff); color: var(--cd-fg, #111111); border-radius: var(--cd-radius, 22px); box-shadow: 0 14px 30px rgba(0,0,0,0.12); }

/* Ticket: notches on the sides, a dashed tear line, the photo inset */
[data-card-tpl="ticket"] .project-card { background: var(--cd-bg, #fbf7ef) !important; color: var(--cd-fg, #1b1b1b); border-radius: var(--cd-radius, 14px); padding: 0; overflow: visible; display: flex; flex-direction: column; }
[data-card-tpl="ticket"] .project-card::before, [data-card-tpl="ticket"] .project-card::after { content: ""; position: absolute; top: 56%; width: 24px; height: 24px; border-radius: 50%; background: var(--cd-page, #e6e1d6); transform: translateY(-50%); z-index: 2; }
[data-card-tpl="ticket"] .project-card::before { left: -12px; }
[data-card-tpl="ticket"] .project-card::after { right: -12px; }
[data-card-tpl="ticket"] .card-image-wrap { margin: 10px; border-radius: calc(var(--cd-radius, 14px) - 6px); overflow: hidden; aspect-ratio: var(--cd-ratio, 16 / 10); }
[data-card-tpl="ticket"] .card-image-wrap img { width: 100%; height: 100%; object-fit: cover; display: block; }
[data-card-tpl="ticket"] .card-info-pane { margin: 0 18px; padding: 1.1rem 0 1.2rem; border-top: 2px dashed currentColor; background: transparent; }

/* Editorial: a big numbered corner (the card's place in the grid) and an exhibition-poster feel */
[data-card-tpl="editorial"] { counter-reset: cardno; }
[data-card-tpl="editorial"] .project-card { counter-increment: cardno; background: var(--cd-bg, #ececea); color: var(--cd-fg, #111111); border-radius: var(--cd-radius, 4px); padding: var(--cd-pad, 20px); display: flex; flex-direction: column; gap: 0.9rem; }
[data-card-tpl="editorial"] .project-card::before { content: counter(cardno, decimal-leading-zero); position: absolute; top: var(--cd-pad, 20px); right: var(--cd-pad, 20px); font-size: clamp(3rem, 7vw, 5.5rem); font-weight: 900; line-height: 0.85; letter-spacing: -0.04em; color: var(--cd-accent, #111111); }
[data-card-tpl="editorial"] .card-info-pane { order: 0; padding: 0.8rem 4.5rem 0 0; border-top: 1px solid currentColor; }
[data-card-tpl="editorial"] .card-title { font-size: clamp(1.3rem, 2.2vw, 1.8rem); font-weight: 800; line-height: 1.05; }
[data-card-tpl="editorial"] .card-image-wrap { order: 1; aspect-ratio: var(--cd-ratio, 4 / 5); }
[data-card-tpl="editorial"] .card-image-wrap img { width: 100%; height: 100%; object-fit: cover; display: block; }

/* Stats: a dark full-bleed photo with a fade, the title, and a row of figures */
[data-card-tpl="stats"] .project-card { position: relative; background: var(--cd-bg, #0d1410); color: var(--cd-fg, #ffffff); border-radius: var(--cd-radius, 26px); overflow: hidden; min-height: 380px; display: flex; flex-direction: column; justify-content: flex-end; }
[data-card-tpl="stats"] .card-image-wrap { position: absolute; inset: 0; }
[data-card-tpl="stats"] .card-image-wrap img { width: 100%; height: 100%; object-fit: cover; }
[data-card-tpl="stats"] .card-info-pane { position: relative; z-index: 1; padding: var(--cd-pad, 20px); background: linear-gradient(to top, rgba(0,0,0, var(--cd-overlay, 0.82)) 40%, rgba(0,0,0,0)); }
[data-card-tpl="stats"] .card-meta { display: flex; flex-wrap: wrap; gap: 0.5rem 1rem; border-top: 1px solid rgba(255,255,255,0.25); padding-top: 0.7rem; margin-top: 0.7rem; }
[data-card-tpl="stats"] .card-title { font-size: clamp(1.25rem, 2.2vw, 1.6rem); font-weight: 700; }

/* Poster: a tall card, the photo framed by a white margin, bold caps underneath */
[data-card-tpl="poster"] .project-card { background: var(--cd-bg, #ffffff); color: var(--cd-fg, #111111); border-radius: var(--cd-radius, 0px); padding: var(--cd-pad, 12px); display: flex; flex-direction: column; }
[data-card-tpl="poster"] .card-image-wrap { aspect-ratio: var(--cd-ratio, 3 / 4); margin: 0 0 var(--cd-pad, 12px); overflow: hidden; }
[data-card-tpl="poster"] .card-image-wrap img { width: 100%; height: 100%; object-fit: cover; display: block; }
[data-card-tpl="poster"] .card-info-pane { padding: 0 0.3rem 0.3rem; }
[data-card-tpl="poster"] .card-title { font-size: clamp(1.1rem, 2vw, 1.6rem); font-weight: 900; text-transform: uppercase; letter-spacing: -0.01em; line-height: 1; }
[data-card-tpl="poster"] .card-meta { font-size: 0.7rem; letter-spacing: 0.06em; text-transform: uppercase; }

/* The home button on the default 404 page can carry an icon */
.nf-home-icon { width: 18px; height: 18px; object-fit: contain; margin-right: 0.45rem; vertical-align: -3px; }
/* The new looks take the card's own text colour (so a cream or light card stays readable). Text & type still wins. */
:where([data-card-tpl="sheet"], [data-card-tpl="ticket"], [data-card-tpl="editorial"], [data-card-tpl="stats"], [data-card-tpl="poster"]) .card-info-pane h3.card-title,
:where([data-card-tpl="sheet"], [data-card-tpl="ticket"], [data-card-tpl="editorial"], [data-card-tpl="stats"], [data-card-tpl="poster"]) .card-info-pane .card-meta,
:where([data-card-tpl="sheet"], [data-card-tpl="ticket"], [data-card-tpl="editorial"], [data-card-tpl="stats"], [data-card-tpl="poster"]) .card-info-pane .card-desc-text { color: inherit; }

/* Card buttons: pill (default), solid, outline. Several buttons can sit in one card. */
.card-action-row { display: flex; flex-wrap: wrap; gap: 0.5rem; }
.btn-more-pill.card-btn-solid { background: #111; color: #fff; border-color: #111; }
.btn-more-pill.card-btn-outline { background: transparent; border: 2px solid currentColor; color: inherit; }
.card-look-scope { height: 100%; }
.card-look-scope > .project-card { height: 100%; }
/* Button labels stay on one line, even at a larger size */
.btn-more-pill, .btn-large-action, .bar-button, .pop { white-space: nowrap; }

/* SVG icons: drawn as a mask in the current text colour, so they change colour with the text (and with Text & type > Icons) */
.svg-icon {
  display: inline-block;
  width: 1em;
  height: 1em;
  flex: 0 0 auto;
  vertical-align: -0.125em;
  background-color: currentColor;
  -webkit-mask: var(--icon-src) center / contain no-repeat;
  mask: var(--icon-src) center / contain no-repeat;
}
/* A card with no photo: no empty picture box. The text panels of the text-led looks drop the default grey. */
[data-card-tpl] .card-image-wrap:empty { display: none; }
[data-card-tpl="editorial"] .card-info-pane, [data-card-tpl="minimal"] .card-info-pane, [data-card-tpl="poster"] .card-info-pane { background: transparent; }

/* ==========================================================================
   Layouts: columns, split and magazine grid. On phones every layout stacks into one column.
   ========================================================================== */
.lay { display: grid; grid-template-columns: var(--lay-template, 1fr 1fr); gap: var(--lay-gap, 24px); align-items: stretch; margin: 0 0 1.5rem; }
.lay-tile { min-width: 0; }
.lay-span-2 { grid-column: span 2; }
.lay-span-3 { grid-column: span 3; }
.lay-span-4 { grid-column: span 4; }
.lay-tile img { display: block; width: 100%; height: 100%; min-height: 160px; object-fit: cover; border-radius: 14px; }
.lay-tall img { min-height: 380px; }
.lay-empty { min-height: 160px; border-radius: 14px; background: rgba(0, 0, 0, 0.05); }
.lay-reverse > :first-child { order: 2; }
.lay-tile .md-body-text { margin: 0; }
@media (max-width: 767px) {
  .lay { grid-template-columns: minmax(0, 1fr); }
  .lay-span-2, .lay-span-3, .lay-span-4 { grid-column: span 1; }
  .lay-reverse > :first-child { order: 0; }
  .lay-tall img { min-height: 220px; }
}

/* ==========================================================================
   Features: steps (a row or a list, numbered) and stats (figures, open or boxed)
   ========================================================================== */
.feat { margin: 0 0 1.75rem; }
.feat-center { text-align: center; }
.feat-steps.feat-row { display: grid; grid-template-columns: repeat(var(--feat-cols, 3), minmax(0, 1fr)); gap: 1.5rem; }
.feat-steps.feat-list { display: flex; flex-direction: column; }
.feat-step { display: flex; gap: 1rem; align-items: flex-start; padding: 1rem 0; }
.feat-rules .feat-step { border-top: 1px solid currentColor; }
.feat-row .feat-step { flex-direction: column; gap: 0.6rem; }
.feat-num { font-size: 0.85rem; font-weight: 700; letter-spacing: 0.06em; opacity: 0.7; min-width: 2.2rem; }
.feat-title { font-weight: 700; font-size: 1.05rem; line-height: 1.3; margin-bottom: 0.25rem; }
.feat-text { font-size: 0.92rem; line-height: 1.5; opacity: 0.85; }
.feat-stats { display: grid; grid-template-columns: repeat(var(--feat-cols, 3), minmax(0, 1fr)); gap: 1.25rem; }
.feat-stat { padding: 0.5rem 0; }
.feat-boxed .feat-stat { border: 1px solid currentColor; border-radius: 14px; padding: 1.25rem; opacity: 1; }
.feat-fig { font-size: clamp(2.2rem, 5vw, 3.6rem); font-weight: 800; line-height: 1; letter-spacing: -0.02em; }
.feat-label { font-weight: 700; margin-top: 0.5rem; }
@media (max-width: 767px) {
  .feat-steps.feat-row, .feat-stats { grid-template-columns: minmax(0, 1fr); }
  .feat-row .feat-step { flex-direction: row; }
}

/* ==========================================================================
   Components: navigation bar (plain or pill), FAQ (opens with no script), booking strip
   ========================================================================== */
.cmp { margin: 0 0 1.5rem; }
.cmp-nav { display: flex; align-items: center; gap: 1.25rem; flex-wrap: wrap; padding: 0.6rem 0; }
.cmp-align-between { justify-content: space-between; }
.cmp-align-left { justify-content: flex-start; }
.cmp-align-center { justify-content: center; }
.cmp-align-right { justify-content: flex-end; }
.cmp-brand { font-weight: 800; letter-spacing: -0.01em; }
.cmp-links { list-style: none; display: flex; gap: 1rem; flex-wrap: wrap; margin: 0; padding: 0; }
.cmp-links a { color: inherit; text-decoration: none; font-weight: 600; }
.cmp-links a:hover { text-decoration: underline; }
.cmp-nav-pill { background: rgba(255,255,255,0.7); border: 1px solid rgba(0,0,0,0.08); border-radius: 999px; padding: 0.5rem 0.9rem; box-shadow: 0 6px 20px rgba(0,0,0,0.06); }
.cmp-cta { display: inline-flex; align-items: center; padding: 0.55rem 1.1rem; border-radius: 999px; background: #111; color: #fff; font-weight: 700; text-decoration: none; font-size: 0.9rem; }
.cmp-faq { border-top: 1px solid currentColor; }
.cmp-q { border-bottom: 1px solid currentColor; padding: 0.9rem 0; }
.cmp-q summary { cursor: pointer; list-style: none; font-weight: 700; font-size: 1.02rem; display: flex; gap: 0.75rem; align-items: baseline; }
.cmp-q summary::-webkit-details-marker { display: none; }
.cmp-q summary::after { content: "+"; margin-left: auto; font-weight: 400; font-size: 1.3rem; line-height: 1; }
.cmp-q[open] summary::after { content: "–"; }
.cmp-q-n { font-size: 0.8rem; opacity: 0.6; min-width: 2rem; }
.cmp-a { padding: 0.6rem 0 0.2rem 2.75rem; font-size: 0.95rem; line-height: 1.55; opacity: 0.9; }
.cmp-booking { display: grid; grid-template-columns: minmax(0, 1fr) auto; gap: 1rem 1.5rem; align-items: center; padding: 1.25rem; border: 1px solid currentColor; border-radius: 18px; }
.cmp-b-title { margin: 0 0 0.25rem; font-size: 1.2rem; }
.cmp-b-sub { margin: 0; opacity: 0.8; font-size: 0.92rem; }
.cmp-booking > .cmp-cta { grid-column: 2; grid-row: 1; justify-self: end; }
.cmp-slots { grid-column: 1 / -1; grid-row: 2; display: grid; grid-template-columns: repeat(auto-fit, minmax(140px, 1fr)); gap: 0.6rem; }
.cmp-slot { border: 1px solid currentColor; border-radius: 12px; padding: 0.6rem 0.8rem; display: flex; flex-direction: column; gap: 0.15rem; opacity: 0.95; }
.cmp-slot-k { font-size: 0.7rem; text-transform: uppercase; letter-spacing: 0.08em; opacity: 0.65; }
.cmp-slot-v { font-weight: 700; }
@media (max-width: 767px) {
  .cmp-nav { justify-content: center; }
  .cmp-booking { grid-template-columns: minmax(0, 1fr); }
  .cmp-booking > .cmp-cta { grid-column: 1; grid-row: auto; justify-self: stretch; justify-content: center; }
}

/* Sticky buttons: one stack per corner. Buttons in a row sit beside each other; rows stack. */
.pop-stack { position: fixed; z-index: 60; display: flex; flex-direction: column; gap: 10px; max-width: calc(100vw - 32px); }
.pop-stack-br { right: 16px; bottom: 16px; align-items: flex-end; }
.pop-stack-bl { left: 16px; bottom: 16px; align-items: flex-start; }
.pop-stack-tr { right: 16px; top: 16px; align-items: flex-end; }
.pop-stack-tl { left: 16px; top: 16px; align-items: flex-start; }
.pop-row { display: flex; gap: 10px; align-items: flex-end; flex-wrap: wrap; }
.pop-stack-br .pop-row, .pop-stack-tr .pop-row { justify-content: flex-end; }
.pop-stack-bl .pop-row, .pop-stack-tl .pop-row { justify-content: flex-start; }
.pop-wrap-stack { display: flex; flex-direction: column; align-items: inherit; }
.pop-wrap-stack .pop-msg { position: relative; }
.studio-empty { min-height: 90px; display: grid; place-items: center; border: 1px dashed rgba(0,0,0,0.25); border-radius: 12px; margin: 1rem 0; font-size: 0.85rem; opacity: 0.7; }

/* ==========================================================================
   Loaders: a cover for a block or a page (it fades out after its duration), and a
   hold on a button. Four types, four patterns. No script runs for the cover itself.
   ========================================================================== */
.ld-wrap { position: relative; }
.ld-cover { position: absolute; inset: 0; z-index: 4; display: flex; align-items: center; justify-content: center; gap: 8px; overflow: hidden;
  background: var(--c-bg, #ffffff); color: var(--c-text-dark, #111111); pointer-events: none; animation: ld-out 0.35s ease var(--ld-dur, 800ms) forwards; }
.ld-page { position: fixed; inset: 0; z-index: 200; background: var(--c-bg, #ffffff); pointer-events: all; }
@keyframes ld-out { to { opacity: 0; visibility: hidden; } }
/* skeleton */
.ld-t-skeleton { flex-direction: column; align-items: stretch; justify-content: center; padding: 1.25rem; }
.ld-sk { display: block; height: 14px; border-radius: 8px; background: rgba(0,0,0,0.09); margin-bottom: 10px; }
.ld-sk-l { width: 70%; height: 22px; } .ld-sk-m { width: 90%; } .ld-sk-s { width: 45%; }
/* dots */
.ld-t-dots .ld-dot { width: 10px; height: 10px; border-radius: 50%; background: currentColor; opacity: 0.7; animation: ld-bounce 0.9s ease-in-out infinite; }
.ld-t-dots .ld-dot:nth-child(2) { animation-delay: 0.15s; } .ld-t-dots .ld-dot:nth-child(3) { animation-delay: 0.3s; }
@keyframes ld-bounce { 0%, 100% { transform: translateY(0); } 50% { transform: translateY(-8px); } }
/* spinner */
.ld-spin { width: 28px; height: 28px; border-radius: 50%; border: 3px solid rgba(0,0,0,0.15); border-top-color: currentColor; animation: ld-rot 0.8s linear infinite; }
@keyframes ld-rot { to { transform: rotate(360deg); } }
/* percent bar: the bar fills over the duration */
.ld-bar { width: 60%; max-width: 320px; height: 8px; border-radius: 999px; background: rgba(0,0,0,0.1); overflow: hidden; display: block; }
.ld-bar-fill { display: block; height: 100%; width: 0; background: currentColor; border-radius: 999px; animation: ld-fill var(--ld-dur, 800ms) linear forwards; }
@keyframes ld-fill { to { width: 100%; } }
/* patterns */
.ld-p-pulse .ld-sk, .ld-p-pulse.ld-t-dots .ld-dot { animation: ld-pulse 1.2s ease-in-out infinite; }
@keyframes ld-pulse { 50% { opacity: 0.35; } }
.ld-p-shimmer .ld-sk { background: linear-gradient(90deg, rgba(0,0,0,0.07) 25%, rgba(0,0,0,0.16) 50%, rgba(0,0,0,0.07) 75%); background-size: 200% 100%; animation: ld-shimmer 1.4s linear infinite; }
@keyframes ld-shimmer { to { background-position: -200% 0; } }
.ld-p-bounce .ld-dot { animation-name: ld-bounce; }
.ld-p-fade { animation-timing-function: linear; }
/* a button holding for its loader */
[data-ld-btn].is-loading { position: relative; color: transparent !important; pointer-events: none; }
[data-ld-btn].is-loading::after { content: ""; position: absolute; inset: 0; margin: auto; width: 1em; height: 1em; border-radius: 50%; border: 2px solid currentColor; border-right-color: transparent; color: inherit; animation: ld-rot 0.7s linear infinite; }
[data-ld-btn].is-loading .pop-label { visibility: hidden; }

/* ==========================================================================
   Questionnaire flows: a modal with a progress bar, one question per screen,
   large choice cards, a 1 to N scale, Back / Next. Styled from the references:
   one question at a time, a clear progress line, and a plain primary button.
   ========================================================================== */
.flow-overlay { position: fixed; inset: 0; z-index: 300; display: grid; place-items: center; padding: 16px; background: rgba(15, 13, 10, 0.45); backdrop-filter: blur(3px); }
.flow-card { width: min(520px, 100%); max-height: calc(100vh - 32px); overflow: auto; background: #ffffff; color: #111111; border-radius: 22px; padding: 18px 22px 18px; box-shadow: 0 30px 80px rgba(0,0,0,0.25); display: flex; flex-direction: column; gap: 14px; }
.flow-top { display: flex; align-items: center; gap: 12px; }
.flow-progress { flex: 1; height: 6px; border-radius: 999px; background: rgba(0,0,0,0.08); overflow: hidden; }
.flow-progress > span { display: block; height: 100%; background: currentColor; background: #111111; border-radius: 999px; transition: width 0.3s ease; }
.flow-x { width: 34px; height: 34px; border-radius: 50%; border: 0; background: rgba(0,0,0,0.06); font-size: 20px; line-height: 1; cursor: pointer; color: inherit; }
.flow-body { display: flex; flex-direction: column; gap: 10px; padding: 6px 0 4px; }
.flow-step-no { font: 600 11px/1 ui-monospace, monospace; letter-spacing: 0.08em; text-transform: uppercase; opacity: 0.55; }
.flow-q { margin: 0; font-size: clamp(1.25rem, 3.4vw, 1.6rem); line-height: 1.2; font-weight: 700; }
.flow-text { margin: 0; opacity: 0.75; font-size: 0.95rem; line-height: 1.5; }
.flow-options { display: flex; flex-direction: column; gap: 10px; margin-top: 6px; }
.flow-opt { display: flex; align-items: center; gap: 12px; width: 100%; text-align: left; padding: 14px 16px; border-radius: 14px; border: 1.5px solid rgba(0,0,0,0.12); background: #ffffff; font: inherit; font-size: 1rem; color: inherit; cursor: pointer; transition: border-color 0.15s, background 0.15s; }
.flow-opt:hover { border-color: rgba(0,0,0,0.35); }
.flow-opt.is-on { border-color: #111111; background: #f4f4f2; box-shadow: inset 0 0 0 1px #111111; }
.flow-dot { width: 18px; height: 18px; border-radius: 50%; border: 2px solid rgba(0,0,0,0.25); flex: 0 0 auto; }
.flow-opt.is-on .flow-dot { border-color: #111111; background: radial-gradient(circle, #111111 45%, transparent 50%); }
.flow-box { width: 18px; height: 18px; border-radius: 5px; border: 2px solid rgba(0,0,0,0.25); flex: 0 0 auto; }
.flow-opt.is-on .flow-box { background: #111111; border-color: #111111; box-shadow: inset 0 0 0 3px #ffffff; }
.flow-scale { display: grid; grid-template-columns: repeat(auto-fit, minmax(38px, 1fr)); gap: 8px; margin-top: 6px; }
.flow-num { aspect-ratio: 1; min-height: 38px; border-radius: 12px; border: 1.5px solid rgba(0,0,0,0.14); background: #ffffff; font: inherit; font-weight: 600; cursor: pointer; color: inherit; }
.flow-num.is-on { background: #111111; color: #ffffff; border-color: #111111; }
.flow-scale-labels { display: flex; justify-content: space-between; font-size: 12px; opacity: 0.6; }
.flow-input { width: 100%; padding: 13px 14px; border-radius: 12px; border: 1.5px solid rgba(0,0,0,0.14); font: inherit; font-size: 1rem; color: inherit; background: #ffffff; box-sizing: border-box; }
.flow-input:focus { outline: 2px solid #111111; outline-offset: 2px; }
.flow-long { resize: vertical; min-height: 110px; }
.flow-error { margin: 0; color: #b42318; font-size: 0.9rem; }
.flow-req { font-size: 11px; opacity: 0.55; }
.flow-foot { display: flex; align-items: center; justify-content: space-between; gap: 10px; padding-top: 6px; }
.flow-btn { display: inline-flex; align-items: center; justify-content: center; padding: 12px 22px; border-radius: 999px; border: 1.5px solid #111111; background: #111111; color: #ffffff; font: inherit; font-weight: 700; cursor: pointer; text-decoration: none; }
.flow-btn-ghost { background: transparent; color: inherit; border-color: rgba(0,0,0,0.25); }
.flow-busy { opacity: 0.6; font-size: 0.95rem; }
.flow-handoff { display: flex; gap: 10px; flex-wrap: wrap; margin-top: 8px; }
@media (max-width: 480px) { .flow-card { border-radius: 18px; padding: 14px 16px; } .flow-foot { flex-direction: column-reverse; align-items: stretch; } }

/* ==========================================================================
   Questionnaire styles: card (default), full page, phone, side panel, inline.
   Looks: light or dark. Progress: bar, numbers or dots.
   ========================================================================== */
.flow-style-fullscreen { background: #ffffff; backdrop-filter: none; padding: 0; place-items: stretch; }
.flow-style-fullscreen .flow-card { width: 100%; max-width: none; height: 100%; max-height: none; border-radius: 0; box-shadow: none; justify-content: center; padding: 32px clamp(20px, 8vw, 120px); }
.flow-style-fullscreen .flow-q { font-size: clamp(1.9rem, 4.6vw, 3rem); }
.flow-style-phone { place-items: center; }
.flow-style-phone .flow-card { width: min(380px, 100%); height: min(660px, calc(100vh - 32px)); border-radius: 36px; padding: 22px 20px; }
.flow-style-side { place-items: stretch end; background: rgba(15, 13, 10, 0.3); }
.flow-style-side .flow-card { width: min(440px, 100%); height: 100%; max-height: none; border-radius: 22px 0 0 22px; }
.flow-inline { margin: 1.5rem 0; display: flex; justify-content: center; }
.flow-inline .flow-card { width: 100%; max-width: 560px; max-height: none; overflow: visible; box-shadow: 0 6px 24px rgba(0,0,0,0.08); border: 1px solid rgba(0,0,0,0.1); }
.flow-dots { display: flex; gap: 6px; flex: 1; align-items: center; }
.flow-dots i { width: 9px; height: 9px; border-radius: 50%; background: rgba(0,0,0,0.15); }
.flow-dots i.is-done { background: #111111; }
.flow-dots i.is-now { background: #111111; box-shadow: 0 0 0 3px rgba(0,0,0,0.15); }
.flow-count { font: 600 13px/1 ui-monospace, monospace; opacity: 0.7; min-width: 3.5rem; }
.flow-look-dark .flow-card { background: #141414; color: #f5f5f4; }
.flow-look-dark.flow-style-fullscreen { background: #141414; }
.flow-look-dark .flow-x { background: rgba(255,255,255,0.1); }
.flow-look-dark .flow-progress { background: rgba(255,255,255,0.14); }
.flow-look-dark .flow-progress > span { background: #f5f5f4; }
.flow-look-dark .flow-dots i { background: rgba(255,255,255,0.2); }
.flow-look-dark .flow-dots i.is-done, .flow-look-dark .flow-dots i.is-now { background: #f5f5f4; }
.flow-look-dark .flow-opt { background: #1f1f1f; border-color: rgba(255,255,255,0.14); color: inherit; }
.flow-look-dark .flow-opt:hover { border-color: rgba(255,255,255,0.4); }
.flow-look-dark .flow-opt.is-on { background: #2a2a2a; border-color: #f5f5f4; box-shadow: inset 0 0 0 1px #f5f5f4; }
.flow-look-dark .flow-dot, .flow-look-dark .flow-box { border-color: rgba(255,255,255,0.35); }
.flow-look-dark .flow-opt.is-on .flow-dot { border-color: #f5f5f4; background: radial-gradient(circle, #f5f5f4 45%, transparent 50%); }
.flow-look-dark .flow-opt.is-on .flow-box { background: #f5f5f4; border-color: #f5f5f4; box-shadow: inset 0 0 0 3px #141414; }
.flow-look-dark .flow-num { background: #1f1f1f; border-color: rgba(255,255,255,0.14); color: inherit; }
.flow-look-dark .flow-num.is-on { background: #f5f5f4; color: #141414; border-color: #f5f5f4; }
.flow-look-dark .flow-input { background: #1f1f1f; color: inherit; border-color: rgba(255,255,255,0.2); }
.flow-look-dark .flow-btn { background: #f5f5f4; color: #141414; border-color: #f5f5f4; }
.flow-look-dark .flow-btn-ghost { background: transparent; color: #f5f5f4; border-color: rgba(255,255,255,0.3); }
@media (max-width: 480px) { .flow-style-phone .flow-card { height: calc(100vh - 24px); border-radius: 24px; } }

/* ==========================================================================
   Measured skeleton: shapes sized and placed to match the content under the cover
   ========================================================================== */
.ld-t-skeleton { display: block; }
.ld-shape { position: absolute; display: block; background: rgba(0,0,0,0.09); }
.ld-shape-text { background: rgba(0,0,0,0.11); }
.ld-shape-media { background: rgba(0,0,0,0.08); }
.ld-shape-box { background: rgba(0,0,0,0.06); }
.ld-p-pulse .ld-shape { animation: ld-pulse 1.2s ease-in-out infinite; }
.ld-p-shimmer .ld-shape { background-image: linear-gradient(90deg, transparent 25%, rgba(255,255,255,0.55) 50%, transparent 75%); background-size: 200% 100%; background-repeat: no-repeat; animation: ld-shimmer 1.4s linear infinite; }
.ld-p-bounce .ld-shape { animation: ld-pulse 1.4s ease-in-out infinite; }
.ld-p-fade .ld-shape { animation: none; }

/* ==========================================================================
   DVD loader: an icon bounces inside its box, off the edges (frame, dashed or none), and
   changes to the next icon of the list on each bounce.
   ========================================================================== */
.ld-t-dvd { display: block; padding: 0; }
.ld-dvd-field { position: absolute; inset: 0; overflow: hidden; }
.ld-dvd-icon { position: absolute; left: 0; top: 0; will-change: transform; object-fit: contain; pointer-events: none; }
.ld-edge-frame { box-shadow: inset 0 0 0 2px currentColor; }
.ld-edge-dashed { box-shadow: inset 0 0 0 2px transparent; outline: 2px dashed currentColor; outline-offset: -2px; }
.ld-edge-none { box-shadow: none; }

/* ==========================================================================
   Surfaces: a colour with opacity, glass with five patterns (blur and tint), an image or a
   vector, or a video behind the content. Used by loaders, questionnaire cards and glass buttons.
   ========================================================================== */
.surf { isolation: isolate; }
/* glass needs a positioned box for its pattern, except loader covers, which are already positioned */
.surf-glass.surf-needs-pos { position: relative; }
.surf-color { background-color: var(--c-bg, #ffffff); }
.surf-glass { background: var(--surf-tint, rgba(255,255,255,0.35)); -webkit-backdrop-filter: blur(var(--surf-blur, 12px)) saturate(1.25); backdrop-filter: blur(var(--surf-blur, 12px)) saturate(1.25); }
.surf-glass::before { content: ""; position: absolute; inset: 0; pointer-events: none; z-index: -1; border-radius: inherit; }
/* bent: a ridged, lens-like glass */
.surf-bent::before { background: repeating-linear-gradient(100deg, rgba(255,255,255,0.32) 0 6px, rgba(255,255,255,0) 6px 22px, rgba(0,0,0,0.05) 22px 26px, rgba(0,0,0,0) 26px 44px); }
/* frosted: a fine grain over the blur */
.surf-frosted::before { opacity: 0.55; background-image: url("data:image/svg+xml;utf8,%3Csvg xmlns='http://www.w3.org/2000/svg' width='160' height='160'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.9' numOctaves='2' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)' opacity='0.5'/%3E%3C/svg%3E"); }
/* mosaic: square tiles */
.surf-mosaic::before { background: repeating-linear-gradient(0deg, rgba(255,255,255,0.28) 0 1px, transparent 1px 24px), repeating-linear-gradient(90deg, rgba(255,255,255,0.28) 0 1px, transparent 1px 24px); }
/* diamond: rotated tiles */
.surf-diamond::before { background: repeating-linear-gradient(45deg, rgba(255,255,255,0.3) 0 1px, transparent 1px 18px), repeating-linear-gradient(-45deg, rgba(255,255,255,0.3) 0 1px, transparent 1px 18px); }
.surf-image, .surf-vector { background-repeat: no-repeat; }
.surf-video-el { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; z-index: -2; pointer-events: none; }
.flow-overlay > .surf-video-el { position: absolute; }
.pop-glass-bent, .pop-glass-frosted, .pop-glass-mosaic, .pop-glass-diamond { position: relative; }
.pop-glass-frosted::before, .pop-glass-mosaic::before, .pop-glass-diamond::before, .pop-glass-bent::before { content: ""; position: absolute; inset: 0; border-radius: inherit; pointer-events: none; }
.pop-glass-bent::before { background: repeating-linear-gradient(100deg, rgba(255,255,255,0.3) 0 6px, transparent 6px 22px); }
.pop-glass-mosaic::before { background: repeating-linear-gradient(0deg, rgba(255,255,255,0.25) 0 1px, transparent 1px 22px), repeating-linear-gradient(90deg, rgba(255,255,255,0.25) 0 1px, transparent 1px 22px); }
.pop-glass-diamond::before { background: repeating-linear-gradient(45deg, rgba(255,255,255,0.28) 0 1px, transparent 1px 16px), repeating-linear-gradient(-45deg, rgba(255,255,255,0.28) 0 1px, transparent 1px 16px); }
.pop-glass-frosted::before { opacity: 0.5; background-image: url("data:image/svg+xml;utf8,%3Csvg xmlns='http://www.w3.org/2000/svg' width='140' height='140'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.9' numOctaves='2' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)' opacity='0.5'/%3E%3C/svg%3E"); }
/* Loader timing: a cover shows from its start, then fades when its duration is over */
.ld-cover { animation: ld-show 0.01s linear var(--ld-start, 0ms) both, ld-out 0.35s ease calc(var(--ld-start, 0ms) + var(--ld-dur, 800ms)) forwards; }
.ld-page { animation: ld-show 0.01s linear var(--ld-start, 0ms) both, ld-out 0.35s ease calc(var(--ld-start, 0ms) + var(--ld-dur, 800ms)) forwards; }
@keyframes ld-show { from { opacity: 0; visibility: hidden; } to { opacity: 1; visibility: visible; } }

/* The header pill's glass pattern: drawn on the header itself (the pill is already fixed or sticky) */
header.is-pill[class*="hdr-glass-"] { isolation: isolate; }
header.is-pill[class*="hdr-glass-"]::before { content: ""; position: absolute; inset: 0; border-radius: inherit; pointer-events: none; z-index: -1; }
header.hdr-glass-bent.is-pill::before { background: repeating-linear-gradient(100deg, rgba(255,255,255,0.3) 0 6px, transparent 6px 22px); }
header.hdr-glass-frosted.is-pill::before { opacity: 0.5; background-image: url("data:image/svg+xml;utf8,%3Csvg xmlns='http://www.w3.org/2000/svg' width='160' height='160'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.9' numOctaves='2' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)' opacity='0.5'/%3E%3C/svg%3E"); }
header.hdr-glass-mosaic.is-pill::before { background: repeating-linear-gradient(0deg, rgba(255,255,255,0.25) 0 1px, transparent 1px 24px), repeating-linear-gradient(90deg, rgba(255,255,255,0.25) 0 1px, transparent 1px 24px); }
header.hdr-glass-diamond.is-pill::before { background: repeating-linear-gradient(45deg, rgba(255,255,255,0.28) 0 1px, transparent 1px 18px), repeating-linear-gradient(-45deg, rgba(255,255,255,0.28) 0 1px, transparent 1px 18px); }

/* Boot: a blank page in the theme colour before the data arrives (no text) */
.boot-screen { min-height: 100vh; background: #FFFFFF; }
/* The page loader holds the page until it may go: no fade by timer, the script decides */
.ld-holding { animation: ld-show 0.01s linear 0s both; }
.ld-out-now { animation: ld-out 0.35s ease forwards; }
/* Covers placed over a block's real box (video, picture, card) */
.ld-fit { position: absolute; inset: auto; }
/* Mute / unmute on a video block */
.media-block { position: relative; }
.media-mute { position: absolute; right: 12px; bottom: 12px; z-index: 3; padding: 6px 12px; border-radius: 999px; border: 0; background: rgba(15,13,10,0.7); color: #ffffff; font: 600 12px/1 system-ui, sans-serif; cursor: pointer; backdrop-filter: blur(6px); -webkit-backdrop-filter: blur(6px); }
.media-mute:focus-visible { outline: 2px solid #ffffff; outline-offset: 2px; }

/* ==========================================================================
   Audio block. Four player looks (pill, card, bar, voice) and four caption styles
   (line, karaoke, letters, lyrics). The transcript sits above, below or between the
   title and description, and can collapse. Heights follow the content.
   ========================================================================== */
.au { margin: 0 0 1.5rem; display: flex; flex-direction: column; gap: 12px; color: var(--c-text-dark, #111111); }
.au-title { margin: 0; font-size: 1.1rem; font-weight: 700; }
.au-desc { margin: 0; opacity: 0.75; font-size: 0.95rem; line-height: 1.5; }
.au-player { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; }
.au-track { flex: 1 1 180px; min-width: 120px; position: relative; height: 36px; display: flex; align-items: center; }
.au-bars { position: absolute; inset: 0; display: flex; align-items: center; justify-content: space-between; gap: 2px; pointer-events: none; }
.au-bars i { display: block; flex: 1; width: 2px; border-radius: 2px; background: currentColor; opacity: 0.35; }
.au-seek { position: relative; width: 100%; margin: 0; background: transparent; accent-color: currentColor; }
.au-time { font: 500 12px/1 ui-monospace, monospace; opacity: 0.75; white-space: nowrap; }
.au-btn { border: 0; border-radius: 999px; padding: 8px 14px; font: 600 13px/1 system-ui, sans-serif; cursor: pointer; background: rgba(0,0,0,0.07); color: inherit; text-decoration: none; display: inline-flex; align-items: center; }
.au-play { width: 40px; height: 40px; padding: 0; justify-content: center; border-radius: 50%; background: #111111; color: #ffffff; font-size: 14px; }
.au-speed { border: 1px solid rgba(0,0,0,0.15); border-radius: 999px; padding: 6px 10px; font: 600 12px/1 system-ui, sans-serif; background: transparent; color: inherit; }
.au-btn:focus-visible, .au-speed:focus-visible, .au-seek:focus-visible { outline: 2px solid currentColor; outline-offset: 2px; }
.au-caption { min-height: 2.6em; display: flex; flex-direction: column; align-items: center; justify-content: center; text-align: center; font-size: 1.05rem; line-height: 1.4; }
.au-caption[hidden] { display: none; }
.au-transcript { display: flex; flex-direction: column; gap: 8px; border-radius: 16px; background: rgba(0,0,0,0.04); padding: 12px 14px; }
.au-tr-toggle { all: unset; cursor: pointer; font: 700 13px/1.2 system-ui, sans-serif; display: flex; justify-content: space-between; align-items: center; }
.au-tr-toggle span { transition: transform 0.2s ease; }
.au-transcript[data-collapsed] .au-tr-toggle span { transform: rotate(-90deg); }
.au-transcript[data-collapsed] .au-list { display: none; }
.au-tr-label { margin: 0; font: 700 13px/1.2 system-ui, sans-serif; }
.au-list { list-style: none; margin: 0; padding: 0; max-height: 240px; overflow: auto; display: flex; flex-direction: column; gap: 6px; scroll-behavior: smooth; }
.au-row { display: grid; grid-template-columns: 3.2em 1fr; gap: 10px; padding: 6px 8px; border-radius: 10px; font-size: 0.95rem; line-height: 1.45; opacity: 0.6; }
.au-row-t { font: 500 11px/1.8 ui-monospace, monospace; opacity: 0.7; }
.au-row.is-now { opacity: 1; background: rgba(0,0,0,0.06); }
.au-transcript .au-row:hover { background: rgba(0,0,0,0.05); cursor: pointer; }
/* Caption styles */
.au-kara .au-w { opacity: 0.35; transition: opacity 0.12s linear; }
.au-kara .au-w.is-sung { opacity: 1; }
.au-kara .au-w.is-now { opacity: 1; font-weight: 800; }
.au-let .au-ghost { opacity: 0.2; }
.au-caret { display: inline-block; width: 2px; height: 1em; background: currentColor; margin-left: 2px; vertical-align: -0.15em; animation: au-blink 1s steps(1) infinite; }
@keyframes au-blink { 50% { opacity: 0; } }
.au-ly-prev, .au-ly-next { display: block; opacity: 0.35; font-size: 0.92em; }
.au-ly-now { display: block; font-size: 1.35em; font-weight: 800; line-height: 1.25; margin: 4px 0; }
/* Player looks */
.au-pill .au-player { background: #1f1d1a; color: #f5f4f0; border-radius: 999px; padding: 8px 10px 8px 8px; }
.au-pill .au-play { background: #f5f4f0; color: #1f1d1a; }
.au-pill .au-btn { background: rgba(255,255,255,0.12); color: #f5f4f0; }
.au-card { background: #ffffff; color: #111111; border-radius: 22px; padding: 18px; box-shadow: 0 10px 30px rgba(0,0,0,0.08); border: 1px solid rgba(0,0,0,0.06); }
.au-card .au-play { background: #111111; }
.au-bar .au-player { background: #0f0d0a; color: #ffffff; border-radius: 16px; padding: 8px 10px; box-shadow: 0 12px 30px rgba(0,0,0,0.25); }
.au-bar .au-play { background: #ffffff; color: #0f0d0a; width: 32px; height: 32px; }
.au-bar .au-btn { background: transparent; color: #ffffff; border: 1px solid rgba(255,255,255,0.2); }
.au-voice { background: #f2f2f2; border-radius: 20px; padding: 14px; }
.au-voice .au-player { background: #ffffff; border-radius: 16px; padding: 8px; }
.au-voice .au-bars i { background: #e5484d; opacity: 0.8; }
.au-voice .au-play { background: #e5484d; color: #ffffff; }
@media (max-width: 480px) { .au-player { gap: 8px; } .au-time { display: none; } }

/* Audio: one row for the controls; real bars shade as the audio plays; a clear message on failure */
.au-player { flex-wrap: nowrap; min-width: 0; }
.au-track { min-width: 0; flex: 1 1 0; }
.au-mute, .au-cc, .au-dl, .au-speed { white-space: nowrap; }
.au-bars i.is-past { background: currentColor; opacity: 0.85; }
.au-seek { opacity: 0.001; position: absolute; inset: 0; width: 100%; height: 100%; cursor: pointer; }
.au-err { margin: 6px 0 0; font-size: 0.85rem; color: #b42318; }
@media (max-width: 520px) { .au-mute { padding: 8px 10px; } .au-dl { display: none; } }

/* ==========================================================================
   Held content: it is not rendered on screen until its loader has finished
   (no content shows through the loader, on phones or during fast scrolls).
   ========================================================================== */
.ld-hold, .ld-pending .page-shell { visibility: hidden; }
.ld-content { position: relative; }
.ld-fit { inset: auto; }

/* ==========================================================================
   Motion templates. In (content arrives) and out (a loader or panel leaves).
   Duration and easing come from the --mo-dur and --mo-ease variables.
   ========================================================================== */
:root { --mo-dur: 600ms; --mo-ease: cubic-bezier(0.2, 0.7, 0.2, 1); }
@keyframes mo-kf-fade { from { opacity: 0; } }
@keyframes mo-kf-fade-up { from { opacity: 0; transform: translateY(18px); } }
@keyframes mo-kf-fade-down { from { opacity: 0; transform: translateY(-18px); } }
@keyframes mo-kf-slide-left { from { opacity: 0; transform: translateX(40px); } }
@keyframes mo-kf-slide-right { from { opacity: 0; transform: translateX(-40px); } }
@keyframes mo-kf-scale-in { from { opacity: 0; transform: scale(0.92); } }
@keyframes mo-kf-blur-in { from { opacity: 0; filter: blur(12px); } }
@keyframes mo-kf-bounce-in { 0% { opacity: 0; transform: scale(0.6); } 60% { opacity: 1; transform: scale(1.06); } 100% { transform: scale(1); } }
@keyframes mo-kf-clip-reveal { from { clip-path: inset(0 100% 0 0); } to { clip-path: inset(0 0 0 0); } }
@keyframes mo-kf-flip-in { from { opacity: 0; transform: perspective(600px) rotateX(-80deg); } }
.mo-in-fade { animation: mo-kf-fade var(--mo-dur) var(--mo-ease) both; }
.mo-in-fade-up { animation: mo-kf-fade-up var(--mo-dur) var(--mo-ease) both; }
.mo-in-fade-down { animation: mo-kf-fade-down var(--mo-dur) var(--mo-ease) both; }
.mo-in-slide-left { animation: mo-kf-slide-left var(--mo-dur) var(--mo-ease) both; }
.mo-in-slide-right { animation: mo-kf-slide-right var(--mo-dur) var(--mo-ease) both; }
.mo-in-scale-in { animation: mo-kf-scale-in var(--mo-dur) var(--mo-ease) both; }
.mo-in-blur-in { animation: mo-kf-blur-in var(--mo-dur) var(--mo-ease) both; }
.mo-in-bounce-in { animation: mo-kf-bounce-in var(--mo-dur) var(--mo-ease) both; }
.mo-in-clip-reveal { animation: mo-kf-clip-reveal var(--mo-dur) var(--mo-ease) both; }
.mo-in-flip-in { animation: mo-kf-flip-in var(--mo-dur) var(--mo-ease) both; }
@keyframes mo-kf-out-fade { to { opacity: 0; } }
@keyframes mo-kf-out-fade-down { to { opacity: 0; transform: translateY(-18px); } }
@keyframes mo-kf-out-scale-out { to { opacity: 0; transform: scale(0.92); } }
@keyframes mo-kf-out-blur-out { to { opacity: 0; filter: blur(12px); } }
@keyframes mo-kf-out-clip-out { from { clip-path: inset(0); } to { clip-path: inset(0 100% 0 0); } }
.mo-out-fade { animation: mo-kf-out-fade var(--mo-dur) var(--mo-ease) forwards; }
.mo-out-fade-down { animation: mo-kf-out-fade-down var(--mo-dur) var(--mo-ease) forwards; }
.mo-out-scale-out { animation: mo-kf-out-scale-out var(--mo-dur) var(--mo-ease) forwards; }
.mo-out-blur-out { animation: mo-kf-out-blur-out var(--mo-dur) var(--mo-ease) forwards; }
.mo-out-clip-out { animation: mo-kf-out-clip-out var(--mo-dur) var(--mo-ease) forwards; }
@media (prefers-reduced-motion: reduce) { .mo-in-fade, .mo-in-fade-up, .mo-in-fade-down, .mo-in-slide-left, .mo-in-slide-right, .mo-in-scale-in, .mo-in-blur-in, .mo-in-bounce-in, .mo-in-clip-reveal, .mo-in-flip-in { animation-duration: 1ms; } }

/* ==========================================================================
   Audio, round 48: a fixed caption area (rows set in the editor, never resized by the text),
   caption text options, key-line highlight, five waveforms, and a phone layout that keeps the wave
   on its own row.
   ========================================================================== */
.au-caption { height: calc(var(--au-lines, 1) * var(--au-fs, 1.05rem) * 1.5); display: flex; flex-direction: column; justify-content: var(--au-anchor, flex-end); overflow: hidden; font-family: var(--au-font, system-ui, sans-serif); font-size: var(--au-fs, 1.05rem); font-weight: var(--au-w, 600); color: var(--au-color, inherit); text-align: var(--au-align, center); }
.au-r { display: block; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; line-height: 1.5; min-height: 1.5em; transition: opacity 0.2s ease; }
.au-r-prev, .au-r-next { opacity: 0.4; font-weight: 500; }
.au-r-now { opacity: 1; font-weight: var(--au-w, 600); }
.au-r-now .au-line { display: inline-block; max-width: 100%; overflow: hidden; text-overflow: ellipsis; vertical-align: top; }
.au-key { background: rgba(255, 196, 0, 0.28); border-radius: 6px; padding: 0 0.3em; box-decoration-break: clone; -webkit-box-decoration-break: clone; }
.au-row.is-key { font-weight: 700; }
.au-tools { display: flex; align-items: center; gap: 8px; flex-wrap: nowrap; }
/* Five waveforms */
.au-bars { display: grid; grid-template-columns: repeat(80, 1fr); align-items: center; gap: 1px; }
.au-bars i { display: block; min-width: 1px; }
.au-wave-bars .au-bars i { border-radius: 1px; background: currentColor; opacity: 0.4; }
.au-wave-pill .au-bars { gap: 3px; }
.au-wave-pill .au-bars i { border-radius: 999px; background: currentColor; opacity: 0.4; }
.au-wave-mirror .au-bars { align-items: center; }
.au-wave-mirror .au-bars i { height: 50%; border-radius: 1px; background: currentColor; opacity: 0.4; transform-origin: center; }
.au-wave-mirror .au-bars i { max-height: 100%; }
.au-wave-dots .au-bars { align-items: center; }
.au-wave-dots .au-bars i { width: 4px; height: 4px !important; border-radius: 50%; justify-self: center; background: currentColor; opacity: 0.35; transform: scale(var(--s, 1)); }
.au-wave-thin .au-bars { gap: 0; }
.au-wave-thin .au-bars i { width: 1px; justify-self: center; background: currentColor; opacity: 0.45; }
.au-bars i.is-past { opacity: 1 !important; }
.au-track { height: 40px; }
.au-bars { position: absolute; inset: 0; pointer-events: none; }
/* Phone: the wave gets its own full row; the controls sit beneath it */
@media (max-width: 560px) {
  .au-player { display: grid; grid-template-columns: auto 1fr; grid-template-areas: "play track" "speed tools"; gap: 10px 8px; align-items: center; }
  .au-play { grid-area: play; }
  .au-track { grid-area: track; height: 48px; min-width: 0; }
  .au-speed { grid-area: speed; justify-self: start; }
  .au-time { display: none; }
  .au-tools { grid-area: tools; justify-content: flex-end; }
  .au-bars { inset: 0 4px; }
}

/* Baked loaders: the cover fills its block (padding box) and takes the block's corners */
.ld-baked { position: relative; }
.ld-baked > .ld-cover { position: absolute; inset: 0; border-radius: inherit; z-index: 4; }
.ld-hold .ld-cover, .ld-hold .ld-baked > .ld-cover { visibility: visible; }

/* ==========================================================================
   Fit the screen (phones, tablets, split screens): pop-ups, the cookie banner and the
   questionnaire stay inside the screen and scroll within themselves; media never overflows.
   ========================================================================== */
html, body { max-width: 100%; }
img, video, iframe, canvas, svg { max-width: 100%; height: auto; }
.pop-msg { max-width: min(320px, calc(100vw - 32px)); box-sizing: border-box; }
.pop-stack { max-width: calc(100vw - 32px); }
.cookie-banner { max-width: 100vw; box-sizing: border-box; }
.flow-overlay { padding: max(12px, env(safe-area-inset-top)) max(12px, env(safe-area-inset-right)) max(12px, env(safe-area-inset-bottom)) max(12px, env(safe-area-inset-left)); }
.flow-card { max-width: 100%; max-height: calc(100dvh - 24px); overflow: auto; box-sizing: border-box; }
.flow-input, .flow-opt, .flow-btn { max-width: 100%; box-sizing: border-box; }
.au, .au-player, .au-caption { max-width: 100%; box-sizing: border-box; }

/* ==========================================================================
   Round 50: audio stays inside its block (waves, captions), captions wrap and shrink to fit,
   the subtitles button has three looks, and the tap/drag highlight is off unless turned on.
   ========================================================================== */
.au, .au-player, .au-track, .au-bars, .au-caption { min-width: 0; max-width: 100%; box-sizing: border-box; }
.au { overflow: hidden; }
.au-bars { overflow: hidden; }
.au-caption { height: calc(var(--au-lines, 1) * var(--au-base, 1.05rem) * 1.5); font-size: var(--au-fs, var(--au-base, 1.05rem)); overflow: hidden; }
.au-r { white-space: normal; overflow-wrap: anywhere; overflow: visible; text-overflow: clip; }
.au-r-now .au-line { white-space: normal; display: inline; }
.au-subs-btn { display: inline-flex; align-items: center; gap: 6px; align-self: flex-start; }
/* Subtitles button looks: text only | arrow + text (default) | arrow only */
.au-subs-text .au-subs-ic { display: none; }
.au-subs-icon .au-subs-tx { display: none; }
.au-subs-icon { width: 36px; justify-content: center; padding: 8px 0; }
body.sel-off ::selection { background: transparent; }
body.sel-off ::-moz-selection { background: transparent; }
body.sel-off { -webkit-tap-highlight-color: transparent; }
body.sel-off button, body.sel-off a, body.sel-off .au-bars, body.sel-off .au-track, body.sel-off .media-block, body.sel-off [class*="ld-"] { -webkit-user-select: none; user-select: none; -webkit-touch-callout: none; }
body.sel-off input[type="range"] { -webkit-tap-highlight-color: transparent; }

/* ==========================================================================
   Positioning: a block's width and offset come from the page grid.
   Desktop 12 columns, tablet 8, phones 4. Gutters and margins follow the grid guides.
   ========================================================================== */
.pl { --pl-cols: 12; --pl-gut: 20px; --span: var(--span-d, 12); --start: var(--start-d, 1); --px: var(--px-d, 0px); --py: var(--py-d, 0px); box-sizing: border-box; width: 100%; max-width: 100%; }
@media (max-width: 1023px) { .pl { --pl-cols: 8; --pl-gut: 16px; --span: var(--span-t, 8); --start: var(--start-t, 1); --px: var(--px-t, 0px); --py: var(--py-t, 0px); } }
@media (max-width: 640px) { .pl { --pl-cols: 4; --pl-gut: 16px; --span: var(--span-m, 4); --start: var(--start-m, 1); --px: var(--px-m, 0px); --py: var(--py-m, 0px); } }
.pl:not(.pl-full) {
  width: calc(var(--span) * (100% - (var(--pl-cols) - 1) * var(--pl-gut)) / var(--pl-cols) + (var(--span) - 1) * var(--pl-gut));
  margin-left: calc((var(--start) - 1) * ((100% - (var(--pl-cols) - 1) * var(--pl-gut)) / var(--pl-cols) + var(--pl-gut)));
}
.pl-center:not(.pl-full) { margin-left: auto; margin-right: auto; }
.pl-right:not(.pl-full) { margin-left: auto; }
.pl > * { padding: var(--py) var(--px); box-sizing: border-box; }
.pl-full { width: 100%; }

/* Media looks (templates) and ratios. Ratio keeps the media's shape; the rest of the content crops to the box. */
.mp { position: relative; max-width: 100%; }
.mp-full-bleed { width: 100vw; max-width: 100vw; margin-left: calc(50% - 50vw); margin-right: calc(50% - 50vw); }
.mp-inset { padding: 24px; box-sizing: border-box; }
.mp-inset .media-block, .mp-inset img, .mp-inset video { border-radius: 14px; }
.mp-half-left { width: 50%; }
.mp-half-right { width: 50%; margin-left: auto; }
.mp-centered { width: 66%; margin-left: auto; margin-right: auto; }
.mp-r-16-9 .media-block, .mp-r-16-9 img, .mp-r-16-9 video { aspect-ratio: 16 / 9; }
.mp-r-4-5 .media-block, .mp-r-4-5 img, .mp-r-4-5 video { aspect-ratio: 4 / 5; }
.mp-r-1-1 .media-block, .mp-r-1-1 img, .mp-r-1-1 video { aspect-ratio: 1 / 1; }
.mp-r-3-2 .media-block, .mp-r-3-2 img, .mp-r-3-2 video { aspect-ratio: 3 / 2; }
.mp-r-21-9 .media-block, .mp-r-21-9 img, .mp-r-21-9 video { aspect-ratio: 21 / 9; }
.mp[class*="mp-r-"] .media-block, .mp[class*="mp-r-"] img, .mp[class*="mp-r-"] video { width: 100%; height: auto; }
.mp[class*="mp-r-"] img, .mp[class*="mp-r-"] video { object-fit: cover; }
.mp-contain img, .mp-contain video { object-fit: contain; }
@media (max-width: 640px) { .mp-half-left, .mp-half-right, .mp-centered { width: 100%; margin-left: 0; margin-right: 0; } .mp-full-bleed { width: 100%; margin-left: 0; margin-right: 0; } }

/* Nested items (feature steps, questions, cards) and tile looks */
.ni { box-sizing: border-box; max-width: 100%; }
.ni-inset { padding: 16px; border-radius: 16px; }
.ni-inset img, .ni-inset .media-block, .ni-inset video { border-radius: 14px; }
.ni-bleed img, .ni-bleed video { width: 100%; height: 100%; object-fit: cover; }
.lay-look-inset { padding: 16px; box-sizing: border-box; }
.lay-look-inset img, .lay-look-inset .md-body { border-radius: 14px; }
.lay-look-bleed img { width: 100%; height: 100%; object-fit: cover; }

/* Captions: every line stays inside the caption box (explicit spacing; no overlaps) */
.au-caption, .au-caption * { line-height: 1.5 !important; }
.au-caption { overflow: hidden; position: relative; }
.au-kara, .au-let, .au-line { display: inline; white-space: normal; }
.au-r { max-width: 100%; }

/* Caption rows keep their real height: they are never squeezed into each other.
   The text size is reduced until all the rows fit the box, instead. */
.au-caption > * { flex: 0 0 auto; min-height: 0; }
.au-r-prev, .au-r-next { font-size: calc(1em * var(--au-ctx, 1)); }
.au-caption { padding-left: 12px; padding-right: 12px; box-sizing: border-box; }

/* Floating buttons and their messages: a clear gap (larger than the button's own bounce),
   so the message never touches or sits under the button */
.pop-wrap-stack { gap: 16px; }
.pop-stack { gap: 12px; }
.pop-row { gap: 12px; }
.pop-wrap-stack .pop-msg { margin: 0; }

/* Boundaries: a message that has no room above its button moves below it */
.pop-wrap.pop-flip { flex-direction: column-reverse; }

/* Preview of a saved version: a clear label, never mistaken for the live site */
.preview-bar { position: sticky; top: 0; z-index: 900; background: #b45309; color: #fff; text-align: center; font: 600 12px/1.4 system-ui, sans-serif; padding: 6px 10px; letter-spacing: 0.02em; }

/* ==========================================================================
   Maintenance page: centre, split or text-only. The box holds the media (picture or video,
   optionally at a ratio); the DVD icon bounces inside its edges and corners.
   ========================================================================== */
.mt { min-height: 70vh; display: flex; align-items: center; justify-content: center; padding: clamp(20px, 5vw, 56px) clamp(16px, 4vw, 40px); box-sizing: border-box; }
.mt-stack { width: min(960px, 100%); display: flex; flex-direction: column; align-items: center; text-align: center; gap: clamp(16px, 3vw, 28px); }
.mt-title { margin: 0; font-size: clamp(1.6rem, 4vw, 2.6rem); line-height: 1.15; font-weight: 700; overflow-wrap: anywhere; }
.mt-msg { margin: 0; max-width: 60ch; font-size: clamp(1rem, 1.6vw, 1.15rem); line-height: 1.6; opacity: 0.85; overflow-wrap: anywhere; }
.mt-box { position: relative; width: min(100%, 720px); aspect-ratio: 16 / 9; overflow: hidden; border-radius: 18px; background: rgba(0,0,0,0.05); box-sizing: border-box; }
.mt-box img, .mt-box video { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; }
.mt-box.mt-box-empty { background: rgba(0,0,0,0.04); border: 1px dashed rgba(0,0,0,0.18); }
.mt-r-16-9 { aspect-ratio: 16 / 9; } .mt-r-4-5 { aspect-ratio: 4 / 5; } .mt-r-1-1 { aspect-ratio: 1 / 1; } .mt-r-3-2 { aspect-ratio: 3 / 2; } .mt-r-21-9 { aspect-ratio: 21 / 9; }
.mt-icon { position: absolute; left: 0; top: 0; z-index: 2; pointer-events: none; will-change: transform; display: block; }
.mt-icon svg, .mt-icon img { width: 100%; height: 100%; display: block; }
/* split: the copy beside the box, stacked on phones */
.mt-split { width: min(1040px, 100%); display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1.2fr); gap: clamp(20px, 4vw, 48px); align-items: center; }
.mt-split .mt-copy { display: flex; flex-direction: column; gap: 16px; }
.mt-split .mt-title, .mt-split .mt-msg { text-align: left; }
.mt-split .mt-box { width: 100%; }
@media (max-width: 720px) { .mt-split { grid-template-columns: 1fr; } }
.mt-box.mt-corner { animation: mt-corner-flash 0.5s ease-out; }
@keyframes mt-corner-flash { 0% { box-shadow: 0 0 0 0 rgba(28,25,23,0.35); } 100% { box-shadow: 0 0 0 14px rgba(28,25,23,0); } }
.mt-split > .mt-copy { grid-column: 1; min-width: 0; }
.mt-split > .mt-box { grid-column: 2; width: 100%; min-width: 0; max-width: none; }
@media (max-width: 720px) { .mt-split > .mt-copy, .mt-split > .mt-box { grid-column: 1; } }
/* Split: a normal centred block (the page's flex centring does not suit a two-column layout) */
.mt.mt-split { display: block; }
.mt-split { margin: 0 auto; width: min(1040px, calc(100vw - 2 * clamp(16px, 4vw, 40px))); box-sizing: border-box; }
