/*
 * Page Builder — frontend component design system (Phase 23).
 *
 * Token-driven, `pb-*` namespaced, zero Tailwind / Vue / admin dependency.
 * Loaded on the public frontend only when a page renders Page Builder content
 * (and therefore inside the editor iframe, which is the same real document).
 * The design tokens (`--pb-*`) are emitted separately from TokenCss; every
 * value below falls back gracefully if a token is missing so a theme can drop
 * this file in without the token block.
 *
 * Themes may override any component view or restyle these classes; nothing here
 * couples to the default theme.
 */

/* ------------------------------------------------------------------ *
 * Foundation
 * ------------------------------------------------------------------ */

.pb-section {
  box-sizing: border-box;
  padding-block: var(--pb-space-xl, 4rem);
  padding-inline: var(--pb-space-md, 1rem);
}
.pb-section *,
.pb-section *::before,
.pb-section *::after {
  box-sizing: border-box;
}

/* Centered measure. Width driven by container tokens. */
.pb-section__inner,
.pb-container,
.pb-hero__inner,
.pb-cta__inner,
.pb-testimonial__inner,
.pb-text-section__inner,
.pb-columns__inner,
.pb-faq__items,
.pb-logo-strip__items {
  margin-inline: auto;
  width: 100%;
  max-width: var(--pb-container-normal, 64rem);
}
.pb-container--narrow { max-width: var(--pb-container-narrow, 42rem); }
.pb-container--normal { max-width: var(--pb-container-normal, 64rem); }
.pb-container--wide { max-width: var(--pb-container-wide, 80rem); }
.pb-container--full { max-width: var(--pb-container-full, 100%); }

.pb-stack { display: flex; flex-direction: column; gap: var(--pb-space-md, 1rem); }
.pb-grid { display: grid; gap: var(--pb-space-lg, 2rem); }

.pb-surface {
  background: var(--pb-color-surface, #f8fafc);
  border: 1px solid var(--pb-color-border, #e5e7eb);
  border-radius: var(--pb-radius-lg, 1rem);
}
.pb-card {
  background: var(--pb-color-background, #fff);
  border: 1px solid var(--pb-color-border, #e5e7eb);
  border-radius: var(--pb-radius-lg, 1rem);
  padding: var(--pb-space-lg, 2rem);
  box-shadow: var(--pb-shadow-sm, 0 1px 2px rgba(0, 0, 0, .06));
}

/* Alignment */
.pb-align--left { text-align: left; }
.pb-align--center { text-align: center; }
.pb-align--right { text-align: right; }
.pb-align--center .pb-hero__inner,
.pb-align--center .pb-cta__inner { align-items: center; }

/* ------------------------------------------------------------------ *
 * Typography primitives
 * ------------------------------------------------------------------ */

.pb-heading,
.pb-block--heading {
  margin: 0 0 var(--pb-space-sm, 0.5rem);
  font-weight: 700;
  line-height: 1.15;
  color: var(--pb-color-text, #111827);
  letter-spacing: -0.01em;
}
.pb-text,
.pb-block--text {
  margin: 0;
  color: var(--pb-color-text, #111827);
  line-height: 1.7;
  font-size: var(--pb-font-body, 1rem);
}

/* ------------------------------------------------------------------ *
 * Buttons
 * ------------------------------------------------------------------ */

.pb-button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.5em;
  padding: 0.75em 1.5em;
  border: 1px solid transparent;
  border-radius: var(--pb-radius-md, 0.5rem);
  font: inherit;
  font-weight: 600;
  font-size: var(--pb-font-button, 1rem);
  line-height: 1.2;
  text-decoration: none;
  cursor: pointer;
  transition: transform .12s ease, box-shadow .12s ease, background-color .12s ease, color .12s ease;
}
.pb-button:hover { transform: translateY(-1px); }
.pb-button:focus-visible { outline: 2px solid var(--pb-color-focus, #2563eb); outline-offset: 2px; }

.pb-button--primary {
  background: var(--pb-color-primary, #2563eb);
  color: var(--pb-color-on-accent, #fff);
  box-shadow: var(--pb-shadow-sm, 0 1px 2px rgba(0, 0, 0, .06));
}
.pb-button--primary:hover { box-shadow: var(--pb-shadow-md, 0 4px 12px rgba(0, 0, 0, .10)); }
.pb-button--secondary {
  background: var(--pb-color-secondary, #7c3aed);
  color: var(--pb-color-on-accent, #fff);
}
.pb-button--outline {
  background: transparent;
  color: var(--pb-color-primary, #2563eb);
  border-color: currentColor;
}
.pb-button--outline:hover { background: var(--pb-color-primary, #2563eb); color: var(--pb-color-on-accent, #fff); }
.pb-button--ghost {
  background: transparent;
  color: var(--pb-color-text, #111827);
}
.pb-button--ghost:hover { background: var(--pb-color-surface, #f8fafc); }
.pb-button--link {
  background: transparent;
  color: var(--pb-color-primary, #2563eb);
  padding-inline: 0;
  text-decoration: underline;
  text-underline-offset: 3px;
}
.pb-button--link:hover { transform: none; }

.pb-button--sm { padding: 0.5em 1em; font-size: var(--pb-font-small, 0.875rem); }
.pb-button--lg { padding: 0.9em 2em; font-size: 1.125rem; }
.pb-button--pill { border-radius: var(--pb-radius-pill, 999px); }

/* ------------------------------------------------------------------ *
 * Hero
 * ------------------------------------------------------------------ */

.pb-hero { position: relative; padding-block: var(--pb-space-2xl, 6rem); }
.pb-hero__inner { display: flex; flex-direction: column; gap: var(--pb-space-md, 1rem); }
.pb-hero__title {
  margin: 0;
  font-size: var(--pb-font-display, clamp(2.5rem, 1.5rem + 3vw, 4rem));
  font-weight: 800;
  line-height: 1.05;
  letter-spacing: -0.02em;
  color: var(--pb-color-text, #111827);
}
.pb-hero__subtitle {
  margin: 0;
  max-width: 48ch;
  font-size: 1.25rem;
  line-height: 1.6;
  color: var(--pb-color-muted, #6b7280);
}
.pb-align--center .pb-hero__subtitle { margin-inline: auto; }
.pb-hero__button { margin-top: var(--pb-space-sm, 0.5rem); align-self: start; }
.pb-align--center .pb-hero__button { align-self: center; }
.pb-align--right .pb-hero__button { align-self: end; }
.pb-hero--surface { background: var(--pb-color-surface, #f8fafc); }
.pb-hero--dark {
  background: var(--pb-color-text, #111827);
}
.pb-hero--dark .pb-hero__title { color: var(--pb-color-inverse, #fff); }
.pb-hero--dark .pb-hero__subtitle { color: rgba(255, 255, 255, .72); }

/* ------------------------------------------------------------------ *
 * Text section
 * ------------------------------------------------------------------ */

.pb-text-section__content { font-size: 1.0625rem; line-height: 1.8; color: var(--pb-color-text, #111827); }
.pb-text-section__content > * + * { margin-top: var(--pb-space-md, 1rem); }
.pb-text-section--narrow .pb-text-section__inner { max-width: var(--pb-container-narrow, 42rem); }
.pb-text-section--normal .pb-text-section__inner { max-width: var(--pb-container-normal, 64rem); }
.pb-text-section--wide .pb-text-section__inner { max-width: var(--pb-container-wide, 80rem); }
.pb-text-section--full .pb-text-section__inner { max-width: var(--pb-container-full, 100%); }

/* ------------------------------------------------------------------ *
 * Image section + image block
 * ------------------------------------------------------------------ */

.pb-image-section__figure,
.pb-image { margin: 0; }
.pb-align--center .pb-image-section__figure { margin-inline: auto; }
.pb-image-section__img,
.pb-image__img {
  display: block;
  max-width: 100%;
  height: auto;
  border-radius: var(--pb-radius-md, 0.5rem);
}
.pb-image--rounded .pb-image__img,
.pb-image-section--rounded .pb-image-section__img { border-radius: var(--pb-radius-lg, 1rem); }
.pb-image--shadow .pb-image__img,
.pb-image-section--shadow .pb-image-section__img { box-shadow: var(--pb-shadow-lg, 0 12px 32px rgba(0, 0, 0, .14)); }
.pb-image__caption,
.pb-image-section__caption {
  margin-top: var(--pb-space-sm, 0.5rem);
  font-size: var(--pb-font-small, 0.875rem);
  color: var(--pb-color-muted, #6b7280);
}
.pb-image--cover .pb-image__img { object-fit: cover; width: 100%; }
.pb-image--ratio-16x9 .pb-image__img { aspect-ratio: 16 / 9; object-fit: cover; }
.pb-image--ratio-4x3 .pb-image__img { aspect-ratio: 4 / 3; object-fit: cover; }
.pb-image--ratio-1x1 .pb-image__img { aspect-ratio: 1 / 1; object-fit: cover; }

/* ------------------------------------------------------------------ *
 * Columns
 * ------------------------------------------------------------------ */

.pb-columns__inner {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(min(100%, 16rem), 1fr));
  gap: var(--pb-space-lg, 2rem);
}
.pb-columns--gap-sm .pb-columns__inner { gap: var(--pb-space-sm, 0.5rem); }
.pb-columns--gap-md .pb-columns__inner { gap: var(--pb-space-md, 1rem); }
.pb-columns--gap-lg .pb-columns__inner { gap: var(--pb-space-lg, 2rem); }
.pb-columns--cols-2 .pb-columns__inner { grid-template-columns: repeat(2, 1fr); }
.pb-columns--cols-3 .pb-columns__inner { grid-template-columns: repeat(3, 1fr); }
.pb-columns--cols-4 .pb-columns__inner { grid-template-columns: repeat(4, 1fr); }
.pb-column { display: flex; flex-direction: column; gap: var(--pb-space-md, 1rem); min-width: 0; }
.pb-column--middle { justify-content: center; }
.pb-column--bottom { justify-content: flex-end; }

/* Theme-neutral column surface presets (PB-FREE-LIBRARY-DESIGN-1-D). A bounded
 * `surface` enum on the column maps to these allowlisted, TOKEN-ONLY, column-owned
 * classes so a curated resource (pricing tiers, testimonial cards) can read as a
 * card WITHOUT a hardcoded colour. Interior padding gives the surface breathing
 * room; a theme overriding the Phase-C tokens restyles them through the cascade.
 * They are presentation only — geometry stays owned by `.pb-cw-*` + the 768px
 * stacking contract, so a surfaced column still stacks full-width on mobile. */
.pb-column--surface {
  background: var(--pb-color-surface, #f8fafc);
  border: 1px solid var(--pb-color-border, #e5e7eb);
  border-radius: var(--pb-radius-lg, 1rem);
  padding: var(--pb-space-lg, 2rem);
}
.pb-column--card {
  background: var(--pb-color-background, #fff);
  border: 1px solid var(--pb-color-border, #e5e7eb);
  border-radius: var(--pb-radius-lg, 1rem);
  padding: var(--pb-space-lg, 2rem);
  box-shadow: var(--pb-shadow-md, 0 4px 12px rgba(0, 0, 0, .10));
}

@media (max-width: 640px) {
  .pb-columns--cols-2 .pb-columns__inner,
  .pb-columns--cols-3 .pb-columns__inner,
  .pb-columns--cols-4 .pb-columns__inner { grid-template-columns: 1fr; }
}

/* ------------------------------------------------------------------ *
 * CTA
 * ------------------------------------------------------------------ */

.pb-cta { }
.pb-cta__inner {
  display: flex;
  flex-direction: column;
  gap: var(--pb-space-md, 1rem);
  padding: var(--pb-space-xl, 4rem) var(--pb-space-lg, 2rem);
  background: var(--pb-color-surface, #f8fafc);
  border-radius: var(--pb-radius-lg, 1rem);
}
.pb-align--center .pb-cta__inner { align-items: center; }
.pb-cta__title { margin: 0; font-size: clamp(1.75rem, 1.2rem + 2vw, 2.5rem); font-weight: 700; color: var(--pb-color-text, #111827); }
.pb-cta__text { margin: 0; max-width: 52ch; color: var(--pb-color-muted, #6b7280); font-size: 1.125rem; line-height: 1.6; }
.pb-cta__button { margin-top: var(--pb-space-sm, 0.5rem); }
.pb-cta--banner .pb-cta__inner { flex-direction: row; flex-wrap: wrap; justify-content: space-between; align-items: center; text-align: left; }
.pb-cta--dark .pb-cta__inner { background: var(--pb-color-text, #111827); }
.pb-cta--dark .pb-cta__title { color: var(--pb-color-inverse, #fff); }
.pb-cta--dark .pb-cta__text { color: rgba(255, 255, 255, .72); }

/* ------------------------------------------------------------------ *
 * FAQ
 * ------------------------------------------------------------------ */

.pb-faq__heading { margin: 0 0 var(--pb-space-lg, 2rem); text-align: center; font-size: clamp(1.5rem, 1rem + 1.5vw, 2.25rem); font-weight: 700; color: var(--pb-color-text, #111827); }
.pb-faq__items { display: flex; flex-direction: column; gap: var(--pb-space-sm, 0.5rem); }
.pb-accordion-item {
  border: 1px solid var(--pb-color-border, #e5e7eb);
  border-radius: var(--pb-radius-md, 0.5rem);
  background: var(--pb-color-background, #fff);
  overflow: hidden;
}
.pb-accordion-item__question {
  padding: var(--pb-space-md, 1rem);
  font-weight: 600;
  color: var(--pb-color-text, #111827);
  cursor: pointer;
  list-style: none;
  display: flex;
  justify-content: space-between;
  align-items: center;
}
.pb-accordion-item__question::-webkit-details-marker { display: none; }
.pb-accordion-item__question::after { content: "+"; margin-left: 1rem; color: var(--pb-color-muted, #6b7280); font-weight: 400; }
.pb-accordion-item[open] .pb-accordion-item__question::after { content: "\2212"; }
.pb-accordion-item__question:focus-visible { outline: 2px solid var(--pb-color-focus, #2563eb); outline-offset: -2px; }
.pb-accordion-item__answer { padding: 0 var(--pb-space-md, 1rem) var(--pb-space-md, 1rem); color: var(--pb-color-muted, #6b7280); line-height: 1.7; }

/* ------------------------------------------------------------------ *
 * Testimonial + quote
 * ------------------------------------------------------------------ */

.pb-testimonial__quote,
.pb-quote { margin: 0; border: 0; }
.pb-testimonial__inner { display: flex; flex-direction: column; gap: var(--pb-space-md, 1rem); align-items: center; text-align: center; }
.pb-testimonial__text,
.pb-quote__text {
  margin: 0;
  font-size: 1.5rem;
  line-height: 1.5;
  font-weight: 500;
  color: var(--pb-color-text, #111827);
}
.pb-testimonial__text::before { content: "\201C"; }
.pb-testimonial__text::after { content: "\201D"; }
.pb-testimonial__cite,
.pb-quote__cite { display: flex; flex-direction: column; gap: 0.15rem; font-style: normal; }
.pb-testimonial__author,
.pb-quote__author { font-weight: 600; color: var(--pb-color-text, #111827); }
.pb-testimonial__role,
.pb-quote__role { font-size: var(--pb-font-small, 0.875rem); color: var(--pb-color-muted, #6b7280); }
.pb-quote { padding: var(--pb-space-lg, 2rem); border-left: 3px solid var(--pb-color-primary, #2563eb); background: var(--pb-color-surface, #f8fafc); border-radius: var(--pb-radius-md, 0.5rem); }
.pb-quote__cite { margin-top: var(--pb-space-sm, 0.5rem); }

/* ------------------------------------------------------------------ *
 * Logo strip
 * ------------------------------------------------------------------ */

.pb-logo-strip__heading { margin: 0 0 var(--pb-space-lg, 2rem); text-align: center; font-size: var(--pb-font-small, 0.875rem); text-transform: uppercase; letter-spacing: 0.08em; color: var(--pb-color-muted, #6b7280); }
.pb-logo-strip__items { display: flex; flex-wrap: wrap; gap: var(--pb-space-xl, 4rem); align-items: center; justify-content: center; }
.pb-logo__img { display: block; max-height: 2.5rem; width: auto; }
.pb-logo-strip--grayscale .pb-logo__img { filter: grayscale(1); opacity: .65; transition: filter .2s ease, opacity .2s ease; }
.pb-logo-strip--grayscale .pb-logo__img:hover { filter: grayscale(0); opacity: 1; }

/* ------------------------------------------------------------------ *
 * Icon
 * ------------------------------------------------------------------ */

.pb-icon { display: inline-block; width: 1.5em; height: 1.5em; color: var(--pb-color-primary, #2563eb); vertical-align: middle; }

/* ------------------------------------------------------------------ *
 * Editor-only placeholders (never emitted on the public frontend)
 * ------------------------------------------------------------------ */

.pb-placeholder {
  display: flex;
  align-items: center;
  justify-content: center;
  min-height: 6rem;
  padding: var(--pb-space-lg, 2rem);
  border: 2px dashed var(--pb-color-border, #e5e7eb);
  border-radius: var(--pb-radius-md, 0.5rem);
  color: var(--pb-color-muted, #6b7280);
  font-size: var(--pb-font-small, 0.875rem);
  text-align: center;
  background: var(--pb-color-surface, #f8fafc);
}

/* ------------------------------------------------------------------ *
 * Column width parity hotfix (2026-07)                               *
 *                                                                    *
 * The public content body is passed through the theme's output       *
 * sanitizer (`cms_html()` → HtmlSanitizer), whose global allow-list  *
 * is `['class']` only — it strips EVERY inline `style` attribute. So  *
 * the Page Builder's self-contained inline column geometry never      *
 * reaches the anonymous frontend (exact-% columns collapse to 100%    *
 * and wrap), while the never-sanitised Live Builder iframe stays      *
 * correct. This block reconstructs the flex row, the gutter variable  *
 * and the column geometry entirely from CLASSES (which survive), so   *
 * the public frontend matches the editor. Arbitrary percentages get   *
 * a per-value `.pb-cw-*` rule injected into <head> at render time     *
 * (ColumnWidthRegistry); fixed aliases + the flex/gutter scaffolding  *
 * are static here. Append-only: overrides the legacy rules by cascade.*
 * ------------------------------------------------------------------ */

/* Flex row scaffolding (inline `display:flex…` is sanitised away). */
.pb-columns__inner,
.pb-layout-container--row.pb-container--flex {
    display: flex;
    flex-wrap: wrap;
    flex-direction: row;
    align-items: stretch;
    gap: 0; /* gutter is column padding, never an external flex gap */
}
.pb-layout-container--column.pb-container--flex {
    display: flex;
    flex-wrap: wrap;
    flex-direction: column;
    gap: 0;
}
.pb-container--grid { display: grid; grid-auto-flow: column; grid-auto-columns: 1fr; }
.pb-container--block { display: block; }

/* Gutter as an inherited CSS variable, keyed by the gap class (inline
 * `--pb-col-gap` is sanitised away). Columns pad by half of it (border-box). */
/* The gutter is column padding, never an external flex `gap`. These rules also
 * pin `gap: 0` at the SAME (class,class) specificity as the legacy grid gap
 * (`.pb-columns--gap-* .pb-columns__inner { gap: … }` above) so the flex model
 * wins by order now that the column geometry is class-owned (no inline `gap:0`
 * masking it) — otherwise a stray flex gap pushes exact percentages past 100%. */
.pb-layout-container--gap-none, .pb-columns--gap-none .pb-columns__inner { --pb-col-gap: 0px; gap: 0; }
.pb-layout-container--gap-sm,   .pb-columns--gap-sm .pb-columns__inner   { --pb-col-gap: var(--pb-space-sm, 0.5rem); gap: 0; }
.pb-layout-container--gap-md,   .pb-columns--gap-md .pb-columns__inner   { --pb-col-gap: var(--pb-space-md, 1rem); gap: 0; }
.pb-layout-container--gap-lg,   .pb-columns--gap-lg .pb-columns__inner   { --pb-col-gap: var(--pb-space-lg, 2rem); gap: 0; }

/* Column shell. The exact percentage basis comes from the `.pb-cw-*` <head>
 * rule (arbitrary %) or the alias classes below (fixed) — NOT from the inline
 * `--pb-column-basis` var, which the sanitizer strips. This carries only the
 * sanitiser-proof shell: gutter padding + border-box + min-width:0. */
.pb-layout-column {
    min-width: 0;
    box-sizing: border-box;
    padding-inline: calc(var(--pb-col-gap, 0px) / 2);
}

/* Legacy semantic aliases stay class-only (Phase 25.3 byte-compat contract),
 * so under the flex row they need a guaranteed basis class to size by. */
.pb-column--full { flex: 0 0 100%; max-width: 100%; }
.pb-column--half { flex: 0 0 50%; max-width: 50%; }
.pb-column--third { flex: 0 0 33.3333%; max-width: 33.3333%; }
.pb-column--quarter { flex: 0 0 25%; max-width: 25%; }
.pb-column--full,
.pb-column--half,
.pb-column--third,
.pb-column--quarter {
    min-width: 0;
    box-sizing: border-box;
    padding-inline: calc(var(--pb-col-gap, 0px) / 2);
}

/* ------------------------------------------------------------------ *
 * Responsive layout & overflow contract (PB-FREE-LIBRARY-DESIGN-1-C)  *
 *                                                                     *
 * ONE deterministic breakpoint, reusing the certified PB-PROD-1 tablet*
 * threshold (768px — Breakpoints / TokenRegistry). At or below it a   *
 * multi-column row collapses to a single full-width column IN SOURCE  *
 * ORDER. This block is appended LAST so it wins by cascade over the   *
 * fixed/percentage basis (.pb-cw-*, .pb-column--half/third/quarter,   *
 * .pb-layout-column) and the <head> runtime block by cascade order —  *
 * no forced-override flags, no specificity escalation, no DOM          *
 * reordering, and no user-agent sniffing.                             *
 * Per-node responsive spacing (.pb-ds-* @media, padding/margin only)  *
 * is a different property and is untouched, so authored responsive    *
 * overrides remain authoritative.                                     *
 * ------------------------------------------------------------------ */

/* Long unbroken words/URLs never force horizontal document overflow;
 * `min-width: 0` on the column above already lets intrinsic content shrink. */
.pb-section { overflow-wrap: break-word; }
.pb-heading, .pb-block--heading,
.pb-text, .pb-block--text { overflow-wrap: break-word; }

/* Editor render-marker geometry (class-owned). In editor mode the marker div —
 * not the `.pb-column` inside it — is the flex participant, so it carries the box
 * model here and the flex-basis/max-width through the shared `.pb-cw-*` class (or
 * flexes freely when auto). Owning this in CSS (not inline) lets the tablet
 * stacking rule below govern the editor/preview surfaces too. */
.pb-editor-render-marker--column { box-sizing: border-box; min-width: 0; }
.pb-editor-render-marker--column-auto { flex: 1 1 0; }

/* Single editor column-width authority (PB-EDITOR-COLUMN-PARITY-R1). A theme
 * component view override (resolved via `theme::page-builder.blocks.column`) may
 * render a width-bearing root — a grid class like `col-lg-4`, or an inline/class
 * `width`/`max-width` — as the marker's DIRECT child. The marker already owns the
 * column basis (`.pb-cw-*`), so that inner width would be applied a SECOND time
 * against the already-sized marker and the column collapses (a 33% marker whose
 * child is itself ~33% renders at ~11%). The marker stays the sole editor
 * column-width authority: its direct rendered child fills it, so the inner width
 * never multiplies. Scoped to the direct child only (`> *`) — intentional nested
 * grids BELOW the rendered root keep their own widths. The marker class exists
 * only in editor markup, so this never matches public HTML (byte-identical
 * frontend). The built-in column already fills the marker inline in editor mode;
 * this makes the same guarantee hold for a theme root carrying its own width,
 * without naming any theme, page, template, or grid-class prefix. Two marker
 * classes give (0,2,0) specificity so it wins over a single grid class
 * (e.g. `.col-lg-4`, 0,1,0) by the cascade — no forced-override flag. */
.pb-editor-render-marker.pb-editor-render-marker--column > * {
  width: 100%;
  max-width: 100%;
}

@media (max-width: 768px) {
  .pb-columns__inner,
  .pb-layout-container--row.pb-container--flex {
    flex-direction: column;
  }
  /* Every geometry-bearing flex child — the public column root, the editor column
   * marker, the arbitrary-percentage `.pb-cw-*` widths (via those roots) and the
   * legacy width aliases — becomes a full-width stacked row in source order. */
  .pb-columns__inner > *,
  .pb-layout-container--row.pb-container--flex > *,
  .pb-layout-column,
  .pb-editor-render-marker--column,
  .pb-column--half, .pb-column--third, .pb-column--quarter {
    flex-basis: auto;
    max-width: 100%;
  }
}

/* ------------------------------------------------------------------ *
 * Editorial text variants (PB-DEMO-DESIGN-R1-A)                      *
 *                                                                    *
 * Opt-in `variant` on the text block. Absent = the plain `.pb-text`  *
 * above is unchanged. An eyebrow is a small, letter-spaced kicker    *
 * (accent-coloured inside an accented subtree); a lead is a larger   *
 * intro measure. Class-owned, so they survive the output sanitizer.  *
 * ------------------------------------------------------------------ */
.pb-text--eyebrow {
  text-transform: uppercase;
  letter-spacing: 0.14em;
  font-size: var(--pb-font-small, 0.875rem);
  font-weight: 700;
  line-height: 1.3;
  color: var(--pb-color-muted, #6b7280);
}
.pb-text--lead {
  font-size: 1.25rem;
  line-height: 1.7;
  color: var(--pb-color-muted, #6b7280);
}

/* ------------------------------------------------------------------ *
 * Hero — eyebrow + media/split preset (PB-DEMO-DESIGN-R1-A)          *
 *                                                                    *
 * Additive, opt-in. A hero with no `eyebrow` and `layout != split`   *
 * renders exactly as the stacked hero above (byte-identical markup   *
 * from the Blade). The split preset anchors the hero with its own    *
 * `image_url` media beside the content; it stacks in source order at *
 * the certified 768px breakpoint and carries no template-id/arbitrary*
 * selector.                                                          *
 * ------------------------------------------------------------------ */
.pb-hero__eyebrow {
  margin: 0 0 0.25rem;
  text-transform: uppercase;
  letter-spacing: 0.16em;
  font-size: var(--pb-font-small, 0.875rem);
  font-weight: 700;
  color: var(--pb-color-muted, #6b7280);
}
.pb-hero--dark .pb-hero__eyebrow { color: rgba(255, 255, 255, .72); }

/* Action row: strong primary + visually subordinate secondary. */
.pb-hero__actions {
  display: flex;
  flex-wrap: wrap;
  gap: var(--pb-space-md, 1rem);
  align-items: center;
  margin-top: var(--pb-space-sm, 0.5rem);
}
.pb-hero__actions .pb-hero__button,
.pb-hero__actions .pb-button { margin-top: 0; }
.pb-hero__actions .pb-button--primary { padding: 0.9em 2em; font-size: 1.0625rem; }

/* Split layout: content beside media; intentional, LTR-aware ordering. */
.pb-hero--split .pb-hero__split {
  display: grid;
  grid-template-columns: minmax(0, 1.05fr) minmax(0, 0.95fr);
  gap: var(--pb-space-2xl, 6rem);
  align-items: center;
}
.pb-hero--split .pb-hero__content {
  display: flex;
  flex-direction: column;
  gap: var(--pb-space-md, 1rem);
  align-items: start;
  text-align: left;
  min-width: 0;
}
.pb-hero--split .pb-hero__content .pb-hero__subtitle { margin-inline: 0; }
.pb-hero--split .pb-hero__media { min-width: 0; }
.pb-hero__media-img {
  display: block;
  width: 100%;
  height: auto;
  border-radius: var(--pb-radius-lg, 1rem);
}
.pb-hero__media--shadow .pb-hero__media-img { box-shadow: var(--pb-shadow-lg, 0 12px 32px rgba(0, 0, 0, .14)); }
/* Media-first ordering (media_position=start): media column renders before
 * content in source, so keyboard/DOM order already leads with media. */
@media (max-width: 768px) {
  .pb-hero--split .pb-hero__split {
    grid-template-columns: 1fr;
    gap: var(--pb-space-lg, 2rem);
  }
}

/* ------------------------------------------------------------------ *
 * Semantic accent presets (PB-DEMO-DESIGN-R1-A)                      *
 *                                                                    *
 * A bounded, named palette ({@see \Plugins\PageBuilder\Support\AccentPreset}).
 * `.pb-accent--{name}` only SETS tokens; `.pb-accent` SCOPES the overrides to
 * that section subtree, so interactive controls + eyebrows adopt the accent     *
 * without leaking to Core/theme/other templates. Absent = no class = unchanged. *
 * No raw colour is ever accepted here — only these fixed classes.               *
 * ------------------------------------------------------------------ */
.pb-accent--cobalt { --pb-accent-bg: #1f4fd8; --pb-accent-strong: #163bb0; --pb-accent-fg: #fff; --pb-accent-soft: #eaf0ff; --pb-accent-ink: #15337f; }
.pb-accent--ember  { --pb-accent-bg: #c2491f; --pb-accent-strong: #9e3a18; --pb-accent-fg: #fff; --pb-accent-soft: #fbeadf; --pb-accent-ink: #7a2e13; }
.pb-accent--forest { --pb-accent-bg: #1f7a5a; --pb-accent-strong: #155f45; --pb-accent-fg: #fff; --pb-accent-soft: #e4f1ec; --pb-accent-ink: #14533c; }
.pb-accent--plum   { --pb-accent-bg: #6b3bd1; --pb-accent-strong: #5327b0; --pb-accent-fg: #fff; --pb-accent-soft: #efeafe; --pb-accent-ink: #4a2699; }
.pb-accent--slate  { --pb-accent-bg: #334155; --pb-accent-strong: #1e293b; --pb-accent-fg: #fff; --pb-accent-soft: #eef2f7; --pb-accent-ink: #27313f; }

.pb-accent .pb-button--primary { background: var(--pb-accent-bg); color: var(--pb-accent-fg); }
.pb-accent .pb-button--primary:hover { background: var(--pb-accent-strong); }
.pb-accent .pb-button--outline { color: var(--pb-accent-bg); }
.pb-accent .pb-button--outline:hover { background: var(--pb-accent-bg); color: var(--pb-accent-fg); }
.pb-accent .pb-button--link { color: var(--pb-accent-bg); }
.pb-accent .pb-button:focus-visible { outline-color: var(--pb-accent-bg); }
.pb-accent .pb-text--eyebrow { color: var(--pb-accent-ink); }
.pb-accent .pb-hero__eyebrow { color: var(--pb-accent-ink); }
.pb-accent .pb-quote { border-left-color: var(--pb-accent-bg); }
/* On a dark accented band the eyebrow uses the light accent tint for contrast. */
.pb-hero--dark.pb-accent .pb-hero__eyebrow { color: var(--pb-accent-soft); }

/* ================================================================== *
 * R2 — body hierarchy, iconography, rhythm, process (PB-DEMO-DESIGN-R1-A-R2)
 * All additive + opt-in: a node with none of these presets is unchanged.
 * ================================================================== */

/* ---- Icons: inline SVG from the bounded IconLibrary --------------- */
.pb-icon { display: inline-flex; align-items: center; justify-content: center; width: 1.5em; height: 1.5em; color: var(--pb-color-primary, #2563eb); vertical-align: middle; }
/* The icon glyph is a `::before` CSS mask painted with `currentColor`, delivered by
 * the stylesheet because the public content sanitizer strips inline <svg> and all
 * non-class attributes (PB-DEMO-DESIGN-R1-A-R2-H2). The `.pb-icon` wrapper keeps its
 * size/badge; the glyph adopts the wrapper's `color`, so it stays tone-aware. The
 * silhouettes are generated from IconLibrary::maskUri (kept in sync by a test). */
.pb-icon::before {
  content: "";
  display: block;
  width: 100%;
  height: 100%;
  background-color: currentColor;
  -webkit-mask-repeat: no-repeat;
          mask-repeat: no-repeat;
  -webkit-mask-position: center;
          mask-position: center;
  -webkit-mask-size: contain;
          mask-size: contain;
}
.pb-icon--strategy::before { -webkit-mask-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23fff' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Ccircle cx=%2212%22 cy=%2212%22 r=%228%22/%3E%3Ccircle cx=%2212%22 cy=%2212%22 r=%223.2%22/%3E%3Cpath d=%22M12 2.4v3.2M12 18.4v3.2M2.4 12h3.2M18.4 12h3.2%22/%3E%3C/svg%3E"); mask-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23fff' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Ccircle cx=%2212%22 cy=%2212%22 r=%228%22/%3E%3Ccircle cx=%2212%22 cy=%2212%22 r=%223.2%22/%3E%3Cpath d=%22M12 2.4v3.2M12 18.4v3.2M2.4 12h3.2M18.4 12h3.2%22/%3E%3C/svg%3E"); }
.pb-icon--brand::before { -webkit-mask-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23fff' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d=%22M7 3.5h10l3.5 5.5-8.5 11.5L3.5 9Z%22/%3E%3Cpath d=%22M3.5 9h17M9 3.5 7.6 9l4.4 11.5M15 3.5 16.4 9 12 20.5%22/%3E%3C/svg%3E"); mask-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23fff' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d=%22M7 3.5h10l3.5 5.5-8.5 11.5L3.5 9Z%22/%3E%3Cpath d=%22M3.5 9h17M9 3.5 7.6 9l4.4 11.5M15 3.5 16.4 9 12 20.5%22/%3E%3C/svg%3E"); }
.pb-icon--product::before { -webkit-mask-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23fff' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Crect x=%223.5%22 y=%224.5%22 width=%2217%22 height=%2215%22 rx=%222%22/%3E%3Cpath d=%22M3.5 9h17%22/%3E%3Cpath d=%22M6.6 6.8h.01M9 6.8h.01%22/%3E%3Cpath d=%22M7 12.5h5.5M7 15.5h8%22/%3E%3C/svg%3E"); mask-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23fff' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Crect x=%223.5%22 y=%224.5%22 width=%2217%22 height=%2215%22 rx=%222%22/%3E%3Cpath d=%22M3.5 9h17%22/%3E%3Cpath d=%22M6.6 6.8h.01M9 6.8h.01%22/%3E%3Cpath d=%22M7 12.5h5.5M7 15.5h8%22/%3E%3C/svg%3E"); }
.pb-icon--web::before { -webkit-mask-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23fff' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Ccircle cx=%2212%22 cy=%2212%22 r=%228.5%22/%3E%3Cpath d=%22M3.5 12h17%22/%3E%3Cpath d=%22M12 3.5c2.4 2.3 3.7 5.3 3.7 8.5S14.4 18.2 12 20.5C9.6 18.2 8.3 15.2 8.3 12S9.6 5.8 12 3.5Z%22/%3E%3C/svg%3E"); mask-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23fff' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Ccircle cx=%2212%22 cy=%2212%22 r=%228.5%22/%3E%3Cpath d=%22M3.5 12h17%22/%3E%3Cpath d=%22M12 3.5c2.4 2.3 3.7 5.3 3.7 8.5S14.4 18.2 12 20.5C9.6 18.2 8.3 15.2 8.3 12S9.6 5.8 12 3.5Z%22/%3E%3C/svg%3E"); }
.pb-icon--build::before { -webkit-mask-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23fff' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d=%22M8.5 7 4 12l4.5 5M15.5 7 20 12l-4.5 5M13.6 5l-3.2 14%22/%3E%3C/svg%3E"); mask-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23fff' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d=%22M8.5 7 4 12l4.5 5M15.5 7 20 12l-4.5 5M13.6 5l-3.2 14%22/%3E%3C/svg%3E"); }
.pb-icon--launch::before { -webkit-mask-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23fff' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d=%22M3.5 16.5 9 11l3.5 3.5 8-8.5%22/%3E%3Cpath d=%22M15.5 6h5v5%22/%3E%3C/svg%3E"); mask-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23fff' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d=%22M3.5 16.5 9 11l3.5 3.5 8-8.5%22/%3E%3Cpath d=%22M15.5 6h5v5%22/%3E%3C/svg%3E"); }
.pb-icon--collaboration::before { -webkit-mask-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23fff' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Ccircle cx=%228.6%22 cy=%228.8%22 r=%223%22/%3E%3Ccircle cx=%2216.2%22 cy=%2210%22 r=%222.4%22/%3E%3Cpath d=%22M3.6 19c.5-3 2.6-4.6 5-4.6s4.5 1.6 5 4.6%22/%3E%3Cpath d=%22M14.8 14.3c2-.2 3.8 1.1 4.3 3.4%22/%3E%3C/svg%3E"); mask-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23fff' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Ccircle cx=%228.6%22 cy=%228.8%22 r=%223%22/%3E%3Ccircle cx=%2216.2%22 cy=%2210%22 r=%222.4%22/%3E%3Cpath d=%22M3.6 19c.5-3 2.6-4.6 5-4.6s4.5 1.6 5 4.6%22/%3E%3Cpath d=%22M14.8 14.3c2-.2 3.8 1.1 4.3 3.4%22/%3E%3C/svg%3E"); }
.pb-icon--outcome::before { -webkit-mask-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23fff' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d=%22M4 20h16%22/%3E%3Cpath d=%22M6.4 20v-6.5M12 20V9.5M17.6 20V5.5%22/%3E%3C/svg%3E"); mask-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23fff' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d=%22M4 20h16%22/%3E%3Cpath d=%22M6.4 20v-6.5M12 20V9.5M17.6 20V5.5%22/%3E%3C/svg%3E"); }
/* Visually-hidden label for a labelled icon — class + text survive the sanitizer. */
.pb-sr-only { position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; border: 0; }

/* ---- Bounded heading display sizes -------------------------------- */
.pb-heading--sm { font-size: var(--pb-font-small, 0.875rem); }
.pb-heading--md { font-size: clamp(1.15rem, 1rem + 0.5vw, 1.4rem); }
.pb-heading--lg { font-size: clamp(1.5rem, 1.1rem + 1.2vw, 2.1rem); line-height: 1.15; }
.pb-heading--xl { font-size: clamp(2rem, 1.4rem + 2.2vw, 2.9rem); line-height: 1.08; letter-spacing: -0.02em; }

/* ---- Semantic section tones (body rhythm) ------------------------- *
 * A `.pb-section.pb-tone--{name}` paints a full-bleed band (the section owns its
 * own padding) and inverts text/controls where the surface is dark — WCAG AA,
 * scoped to the section subtree only. Light tones keep the default dark text. */
.pb-tone--neutral { background: #f6f3ec; }
.pb-tone--tint { background: var(--pb-accent-soft, #eef2f7); }
.pb-tone--ink { background: #101729; }
.pb-tone--accent { background: var(--pb-accent-bg, #1f4fd8); }

.pb-tone--ink, .pb-tone--accent { color: #fff; }
.pb-tone--ink .pb-block--heading, .pb-tone--ink .pb-heading, .pb-tone--ink .pb-cta__title, .pb-tone--ink .pb-testimonial__text, .pb-tone--ink .pb-testimonial__author, .pb-tone--ink .pb-logo-strip__heading,
.pb-tone--accent .pb-block--heading, .pb-tone--accent .pb-heading, .pb-tone--accent .pb-cta__title, .pb-tone--accent .pb-testimonial__text, .pb-tone--accent .pb-testimonial__author { color: #fff; }
.pb-tone--ink .pb-block--text, .pb-tone--ink .pb-text, .pb-tone--ink .pb-cta__text, .pb-tone--ink .pb-testimonial__role,
.pb-tone--accent .pb-block--text, .pb-tone--accent .pb-text, .pb-tone--accent .pb-cta__text, .pb-tone--accent .pb-testimonial__role { color: rgba(255, 255, 255, 0.82); }
.pb-tone--ink .pb-text--eyebrow { color: var(--pb-accent-soft, #c7d2fe); }
.pb-tone--accent .pb-text--eyebrow { color: rgba(255, 255, 255, 0.92); }
.pb-tone--ink .pb-button--outline, .pb-tone--accent .pb-button--outline { color: #fff; }
.pb-tone--ink .pb-button--outline:hover { background: #fff; color: #101729; }
.pb-tone--ink .pb-button--link, .pb-tone--accent .pb-button--link { color: #fff; }
/* Icon badges keep the light accent surface on dark tones. */
.pb-tone--ink .pb-icon, .pb-tone--accent .pb-icon { color: var(--pb-accent-soft, #c7d2fe); }
/* Visible focus on a dark band. */
.pb-tone--ink .pb-button:focus-visible, .pb-tone--accent .pb-button:focus-visible { outline-color: #fff; }

/* Deterministic NESTED-tone behaviour (PB-DEMO-DESIGN-R1-A-R2-H1).
 *
 * A dark tone inverts the band's foreground to light. A nested element that carries
 * its OWN surface would otherwise clash with that light text:
 *   - the CTA's inner panel is a FULL-BLEED part of the band, so on a dark tone it
 *     becomes transparent (same-tone) — one coherent dark closing band, never a pale
 *     card floating inside a dark section;
 *   - a discrete LIGHT surface island (card / surface) keeps its light background but
 *     re-asserts a compatible DARK foreground, so its own content stays legible.
 * No raw colour, no template-id selector, no theme/Core edit. A CTA with no tone is
 * unchanged (its inner keeps the legacy surface). */
.pb-tone--ink .pb-cta__inner, .pb-tone--accent .pb-cta__inner { background: transparent; }

.pb-tone--ink .pb-column--card, .pb-tone--accent .pb-column--card,
.pb-tone--ink .pb-surface, .pb-tone--accent .pb-surface,
.pb-tone--ink .pb-card, .pb-tone--accent .pb-card { color: var(--pb-color-text, #111827); }
.pb-tone--ink .pb-column--card .pb-block--heading, .pb-tone--ink .pb-column--card .pb-heading,
.pb-tone--ink .pb-surface .pb-block--heading, .pb-tone--ink .pb-surface .pb-heading,
.pb-tone--accent .pb-column--card .pb-block--heading, .pb-tone--accent .pb-column--card .pb-heading,
.pb-tone--accent .pb-surface .pb-block--heading, .pb-tone--accent .pb-surface .pb-heading { color: var(--pb-color-text, #111827); }
.pb-tone--ink .pb-column--card .pb-block--text, .pb-tone--ink .pb-column--card .pb-text,
.pb-tone--ink .pb-surface .pb-block--text, .pb-tone--ink .pb-surface .pb-text,
.pb-tone--accent .pb-column--card .pb-block--text, .pb-tone--accent .pb-column--card .pb-text,
.pb-tone--accent .pb-surface .pb-block--text, .pb-tone--accent .pb-surface .pb-text { color: var(--pb-color-muted, #4b5563); }
.pb-tone--ink .pb-column--card .pb-text--eyebrow, .pb-tone--accent .pb-column--card .pb-text--eyebrow { color: var(--pb-accent-ink, #15337f); }

/* ---- Columns variants: real grid gaps + composition --------------- *
 * The variants override the sanitiser-proof flex gutter model with a grid (gap is
 * a class rule, not inline, so it survives) — fixing the "cards stick together"
 * zero-gap and enabling the featured + timeline compositions. Column width/flex
 * geometry is reset so the grid template is the single authority. */
.pb-columns--cards .pb-columns__inner,
.pb-columns--featured .pb-columns__inner,
.pb-columns--timeline .pb-columns__inner {
  display: grid;
  gap: var(--pb-space-lg, 2rem);
  align-items: stretch;
}
.pb-columns--cards .pb-columns__inner > *,
.pb-columns--featured .pb-columns__inner > *,
.pb-columns--timeline .pb-columns__inner > * {
  max-width: none;
  flex: initial;
  min-width: 0;
  padding-inline: 0;
}

/* Cards: equal, auto-fitting, with real gaps + a restrained hover lift. */
.pb-columns--cards .pb-columns__inner { grid-template-columns: repeat(auto-fit, minmax(15rem, 1fr)); }
.pb-columns--cards .pb-column--card { transition: transform .18s ease, box-shadow .18s ease; }
.pb-columns--cards .pb-column--card:hover { transform: translateY(-4px); box-shadow: var(--pb-shadow-lg, 0 12px 32px rgba(0, 0, 0, .14)); }
.pb-columns--cards .pb-column--card:focus-within { box-shadow: var(--pb-shadow-lg, 0 12px 32px rgba(0, 0, 0, .14)); }
/* Icon as a strong rounded-square badge at the top of a capability card. */
.pb-columns--cards .pb-column--card > .pb-icon,
.pb-columns--timeline .pb-column > .pb-icon {
  width: 3rem; height: 3rem; padding: 0.7rem;
  border-radius: var(--pb-radius-md, 0.75rem);
  background: var(--pb-accent-soft, #eef2f7);
  color: var(--pb-accent-bg, #2563eb);
}

/* Capability card internal rhythm (PB-DEMO-DESIGN-R1-A-R2-H3).
 * Two cascade accidents degrade the card's internal layout:
 *   1. the columns-variant reset above (`… __inner > * { padding-inline: 0 }`,
 *      meant to drop the layout-column half-gutter) also zeroes the card's own
 *      horizontal inset, so content pins to the left/right edges;
 *   2. the host theme's `.entry-content h2/h3` vertical rhythm (specificity
 *      0,1,1) outranks the plugin's single-class heading reset and leaks a
 *      ~1.8rem top margin onto card headings, opening an oversized icon→heading
 *      gap while the heading→copy gap stays small.
 * Re-assert a bounded, plugin-owned icon→heading→copy stack: one consistent inset
 * on all four sides and token-derived vertical rhythm, with child margins as the
 * single spacing authority (flex gap off). Scoped to the `cards` variant only, so
 * featured/timeline columns and default (no-variant) columns are untouched. The
 * child selectors carry three classes (0,3,0) to win over the host theme leak
 * on specificity alone — no template-id, no forced override, no theme/Core edit. */
.pb-columns--cards .pb-column--card {
  padding: var(--pb-space-lg, 2rem);
  gap: 0;
}
.pb-columns--cards .pb-column--card > .pb-icon {
  margin-bottom: calc(var(--pb-space-md, 1rem) + var(--pb-space-sm, 0.5rem));
}
.pb-columns--cards .pb-column--card > .pb-heading,
.pb-columns--cards .pb-column--card > .pb-block--heading {
  margin-top: 0;
  margin-bottom: var(--pb-space-md, 1rem);
}
.pb-columns--cards .pb-column--card > .pb-text,
.pb-columns--cards .pb-column--card > .pb-block--text {
  margin: 0;
}
@media (max-width: 640px) {
  .pb-columns--cards .pb-column--card {
    padding: calc(var(--pb-space-lg, 2rem) - var(--pb-space-sm, 0.5rem));
  }
}

/* Featured: one flagship spanning the left column over two rows + two secondary.
 * The flagship is a flex column whose media grows to fill the taller card (cover
 * crop of the abstract art), so there is no empty gap under its copy. */
.pb-columns--featured .pb-columns__inner { grid-template-columns: 1.4fr 1fr; align-items: stretch; }
.pb-columns--featured .pb-columns__inner > :first-child { grid-row: 1 / 3; display: flex; flex-direction: column; }
.pb-columns--featured .pb-columns__inner > :first-child > .pb-image:first-child { flex: 1 1 auto; min-height: 15rem; }
.pb-columns--featured .pb-columns__inner > :first-child > .pb-image:first-child .pb-image__img { width: 100%; height: 100%; aspect-ratio: auto; object-fit: cover; }
@media (max-width: 768px) {
  .pb-columns--featured .pb-columns__inner { grid-template-columns: 1fr; }
  .pb-columns--featured .pb-columns__inner > :first-child { grid-row: auto; }
  .pb-columns--featured .pb-columns__inner > :first-child > .pb-image:first-child { flex: 0 0 auto; min-height: 0; }
  .pb-columns--featured .pb-columns__inner > :first-child > .pb-image:first-child .pb-image__img { height: auto; aspect-ratio: 16 / 9; }
}

/* Timeline: a connected four-stage process. CSS counters number the steps in DOM
 * order (reading order preserved); a dashed rail links the badges; no connector
 * past the last; stacks vertically on mobile. No JS. */
.pb-columns--timeline .pb-columns__inner { grid-template-columns: repeat(4, 1fr); counter-reset: pb-step; }
.pb-columns--timeline .pb-column { position: relative; counter-increment: pb-step; display: flex; flex-direction: column; gap: var(--pb-space-sm, 0.5rem); }
.pb-columns--timeline .pb-column::before {
  content: counter(pb-step, decimal-leading-zero);
  display: flex; align-items: center; justify-content: center;
  width: 2.75rem; height: 2.75rem; border-radius: 999px;
  background: var(--pb-accent-bg, #2563eb); color: var(--pb-accent-fg, #fff);
  font-weight: 700; font-size: 1.0625rem; font-variant-numeric: tabular-nums;
  position: relative; z-index: 1; margin-bottom: var(--pb-space-sm, 0.5rem);
}
.pb-columns--timeline .pb-column::after {
  content: ""; position: absolute; top: 1.375rem; left: 2.75rem;
  right: calc(-1 * var(--pb-space-lg, 2rem)); height: 0;
  border-top: 2px dashed var(--pb-accent-bg, #2563eb); opacity: 0.45; z-index: 0;
}
.pb-columns--timeline .pb-column:last-child::after { display: none; }
.pb-columns--timeline .pb-column > .pb-icon { margin-top: 0.25rem; }
@media (max-width: 768px) {
  .pb-columns--timeline .pb-columns__inner { grid-template-columns: 1fr; }
  .pb-columns--timeline .pb-column::after { display: none; }
}

/* ---- Feature testimonial: a bold pull-quote with authority -------- */
.pb-testimonial--feature .pb-testimonial__inner { max-width: 52rem; position: relative; padding: var(--pb-space-xl, 4rem) var(--pb-space-lg, 2rem) var(--pb-space-lg, 2rem); }
.pb-testimonial--feature .pb-testimonial__inner::before {
  content: "\201C"; display: block; font-family: Georgia, "Times New Roman", serif;
  font-size: 5rem; line-height: 0.8; color: var(--pb-accent-bg, #2563eb); margin-bottom: 0.25rem;
}
.pb-tone--ink.pb-testimonial--feature .pb-testimonial__inner::before,
.pb-tone--accent.pb-testimonial--feature .pb-testimonial__inner::before { color: var(--pb-accent-soft, #c7d2fe); }
.pb-testimonial--feature .pb-testimonial__text { font-size: clamp(1.4rem, 1.05rem + 1.3vw, 2rem); line-height: 1.4; font-weight: 500; }
.pb-testimonial--feature .pb-testimonial__text::before,
.pb-testimonial--feature .pb-testimonial__text::after { content: none; }
.pb-testimonial--feature .pb-testimonial__cite { margin-top: var(--pb-space-md, 1rem); }

/* ---- Logo strip framing on a tone (partner proof) ---------------- */
.pb-tone--neutral .pb-logo-strip__heading, .pb-tone--tint .pb-logo-strip__heading { color: var(--pb-color-muted, #6b7280); }
