/* ABOUTME: Plumbline custom block styles. */
/* ABOUTME: Section, Hero, Card Grid, and Card block rendering. */

@layer blocks {
  /* ========================================
     Section Block
     ======================================== */
  .wp-block-plumbline-section {
    --section-bg: var(--pl-color-surface-page);
    --section-text: var(--pl-color-text-primary);
    --section-padding: var(--pl-space-8);
    --section-width: var(--pl-width-content);

    width: 100%;
    background-color: var(--section-bg);
    color: var(--section-text);
    padding-block: var(--section-padding);
  }

  .pl-section__inner {
    max-width: var(--section-width);
    margin-inline: auto;
    padding-inline: var(--pl-gutter);
  }

  .pl-section--gap-compact {
    --section-gap: var(--pl-section-gap-compact);
  }

  .pl-section--gap-standard {
    --section-gap: var(--pl-section-gap-standard);
  }

  .pl-section--gap-spacious {
    --section-gap: var(--pl-section-gap-spacious);
  }

  .pl-section--gap-compact .pl-section__inner,
  .pl-section--gap-standard .pl-section__inner,
  .pl-section--gap-spacious .pl-section__inner {
    display: flex;
    flex-direction: column;
    gap: var(--section-gap);
  }

  .pl-section--gap-compact .pl-section__inner > *,
  .pl-section--gap-standard .pl-section__inner > *,
  .pl-section--gap-spacious .pl-section__inner > * {
    margin-block: 0;
  }

  .pl-section--height-medium {
    min-height: var(--pl-section-height-medium);
    display: flex;
    flex-direction: column;
  }

  .pl-section--height-tall {
    min-height: var(--pl-section-height-tall);
    display: flex;
    flex-direction: column;
  }

  .pl-section--height-screen {
    min-height: 100dvh;
    min-height: var(--pl-section-height-screen);
    display: flex;
    flex-direction: column;
  }

  .pl-section--height-medium .pl-section__inner,
  .pl-section--height-tall .pl-section__inner,
  .pl-section--height-screen .pl-section__inner {
    flex: 1;
    display: flex;
    flex-direction: column;
    min-height: inherit;
  }

  .pl-section--valign-start .pl-section__inner {
    justify-content: flex-start;
  }

  .pl-section--valign-center .pl-section__inner {
    justify-content: center;
  }

  .pl-section--valign-end .pl-section__inner {
    justify-content: flex-end;
  }

  .pl-section--border-subtle .pl-section__inner {
    background-color: var(--pl-color-surface-page);
    border: var(--pl-border-thin) solid var(--pl-color-border);
    border-radius: var(--pl-radius-md);
    box-shadow: var(--pl-shadow-sm);
    padding: var(--pl-space-6);
    --section-text: var(--pl-style-text-on-white, var(--pl-color-text-primary));
    --section-link: var(--pl-style-link-on-white, var(--pl-color-text-link));
    color: var(--section-text);
  }

  .pl-section--border-rounded .pl-section__inner {
    background-color: var(--pl-color-surface-page);
    border: var(--pl-border-thin) solid var(--pl-color-border);
    border-radius: var(--pl-radius-lg);
    box-shadow: var(--pl-shadow-sm);
    padding: var(--pl-space-8);
    --section-text: var(--pl-style-text-on-white, var(--pl-color-text-primary));
    --section-link: var(--pl-style-link-on-white, var(--pl-color-text-link));
    color: var(--section-text);
  }

  .pl-section--border-subtle .pl-section__inner :is(.wp-block-heading, h1, h2, h3, h4, h5, h6, p, li, blockquote, cite, .wp-block-list),
  .pl-section--border-rounded .pl-section__inner :is(.wp-block-heading, h1, h2, h3, h4, h5, h6, p, li, blockquote, cite, .wp-block-list) {
    color: var(--section-text);
  }

  .pl-section--width-full.pl-section--border-subtle .pl-section__inner,
  .pl-section--width-full.pl-section--border-rounded .pl-section__inner {
    border-radius: 0;
  }

  /* Saved save.js wrapper inside render.php inner — passthrough only. */
  .pl-section__inner > .wp-block-plumbline-section {
    --section-width: unset;
    background-color: transparent;
    padding-block: 0;
    max-width: none;
  }

  /* Background image layer */
  .pl-has-bg-image {
    position: relative;
    overflow: hidden;
  }

  .pl-section__bg {
    position: absolute;
    inset: 0;
    z-index: 0;
    background-size: cover;
    background-repeat: no-repeat;
    pointer-events: none;
  }

  .pl-section__bg--blur {
    filter: blur(4px);
    scale: 1.05;
  }

  .pl-section__bg--blur-backdrop {
    backdrop-filter: blur(4px);
    -webkit-backdrop-filter: blur(4px);
  }

  .pl-section__bg--fixed {
    background-attachment: fixed;
  }

  .pl-section__bg--overlay-light::after,
  .pl-section__bg--overlay-medium::after,
  .pl-section__bg--overlay-dark::after,
  .pl-section__bg--overlay-gradient::after,
  .pl-section__bg--overlay-accent::after {
    content: '';
    position: absolute;
    inset: 0;
  }

  .pl-section__bg--overlay-light::after {
    background: color-mix(in srgb, var(--pl-color-surface-page) 60%, transparent);
  }

  .pl-section__bg--overlay-medium::after {
    background: rgba(0, 0, 0, 0.35);
  }

  .pl-section__bg--overlay-dark::after {
    background: var(--pl-color-surface-overlay);
  }

  .pl-section__bg--overlay-gradient::after {
    background: linear-gradient(
      to right,
      var(--pl-color-surface-overlay) 0%,
      transparent 70%
    );
  }

  .pl-section__bg--overlay-accent::after {
    background: color-mix(in srgb, var(--pl-color-primary) 45%, transparent);
  }

  .pl-has-bg-video {
    position: relative;
    overflow: hidden;
  }

  .pl-section__video {
    position: absolute;
    inset: 0;
    z-index: 0;
    overflow: hidden;
    pointer-events: none;
  }

  .pl-section__video video {
    width: 100%;
    height: 100%;
    object-fit: cover;
    border: 0;
    display: block;
  }

  /* YouTube/Vimeo iframes ignore object-fit — scale to cover like background-size: cover. */
  .pl-section__video iframe {
    position: absolute;
    top: 50%;
    left: 50%;
    width: max(100%, calc(100vh * 16 / 9));
    height: max(100%, calc(100vw * 9 / 16));
    min-width: 100%;
    min-height: 100%;
    transform: translate(-50%, -50%);
    border: 0;
    display: block;
    pointer-events: none;
  }

  @media (prefers-reduced-motion: reduce) {
    .pl-section__video {
      display: none;
    }
  }

  .pl-has-bg-image > :not(.pl-section__bg):not(.pl-section__video),
  .pl-has-bg-video > :not(.pl-section__bg):not(.pl-section__video) {
    position: relative;
    z-index: 1;
  }

  /* Photo/video backgrounds: light text with shadow for legibility (light overlay uses dark text). */
  .pl-has-bg-image.pl-text-contrast--force-light .pl-section__inner,
  .pl-has-bg-video.pl-text-contrast--force-light .pl-section__inner {
    color: var(--pl-color-text-inverse);
  }

  .pl-has-bg-image.pl-text-contrast--force-light .pl-section__inner :where(
    h1, h2, h3, h4, h5, h6, p, li, blockquote, cite, .wp-block-list, a:not(.wp-element-button)
  ),
  .pl-has-bg-video.pl-text-contrast--force-light .pl-section__inner :where(
    h1, h2, h3, h4, h5, h6, p, li, blockquote, cite, .wp-block-list, a:not(.wp-element-button)
  ) {
    color: var(--pl-color-text-inverse);
    text-shadow:
      0 1px 2px rgb(0 0 0 / 0.65),
      0 2px 16px rgb(0 0 0 / 0.45);
  }

  .pl-has-bg-image.pl-text-contrast--force-dark .pl-section__inner,
  .pl-has-bg-video.pl-text-contrast--force-dark .pl-section__inner {
    color: var(--pl-color-text-primary);
  }

  .pl-has-bg-image.pl-text-contrast--force-dark .pl-section__inner :where(
    h1, h2, h3, h4, h5, h6, p, li, blockquote, cite, .wp-block-list, a:not(.wp-element-button)
  ),
  .pl-has-bg-video.pl-text-contrast--force-dark .pl-section__inner :where(
    h1, h2, h3, h4, h5, h6, p, li, blockquote, cite, .wp-block-list, a:not(.wp-element-button)
  ) {
    color: var(--pl-color-text-primary);
    text-shadow: none;
  }

  /* Section style variants */
  .pl-section--style-default {
    --section-bg: transparent;
    --section-text: var(--pl-style-text-on-default, var(--pl-color-text-primary));
    --section-link: var(--pl-style-link-on-default, var(--pl-color-text-link));
  }

  .pl-section--style-muted {
    --section-bg: var(--pl-color-surface-alt);
    --section-text: var(--pl-style-text-on-muted, var(--pl-color-text-primary));
    --section-link: var(--pl-style-link-on-muted, var(--pl-color-text-link));
  }

  .pl-section--style-accent {
    --section-bg: var(--pl-color-primary);
    --section-text: var(--pl-style-text-on-accent, var(--pl-color-text-inverse));
    --section-link: var(--pl-style-link-on-accent, var(--pl-color-primary-light));
  }

  .pl-section--style-accent-light {
    --section-bg: var(--pl-color-primary-lighter);
    --section-text: var(--pl-style-text-on-accent-light, var(--pl-color-text-primary));
    --section-link: var(--pl-style-link-on-accent-light, var(--pl-color-text-link));
  }

  .pl-section--style-secondary-accent {
    --section-bg: var(--pl-color-secondary);
    --section-text: var(--pl-style-text-on-secondary-accent, var(--pl-color-on-secondary));
    --section-link: var(--pl-style-link-on-secondary-accent, var(--pl-color-text-link));
  }

  .pl-section--style-secondary-light {
    --section-bg: var(--pl-color-secondary-light);
    --section-text: var(--pl-style-text-on-secondary-light, var(--pl-color-text-primary));
    --section-link: var(--pl-style-link-on-secondary-light, var(--pl-color-text-link));
  }

  .pl-section--style-dark {
    --section-bg: var(--pl-color-neutral-900);
    --section-text: var(--pl-style-text-on-dark, var(--pl-color-text-inverse));
    --section-link: var(--pl-style-link-on-dark, var(--pl-color-primary-light));
  }

  .pl-section--style-accent a,
  .pl-section--style-secondary-accent a {
    color: var(--section-link, currentColor);
  }

  .pl-section--style-dark a {
    color: var(--section-link, var(--pl-color-primary-light));
  }

  .pl-section--style-white {
    --section-bg: var(--pl-color-surface-page);
    --section-text: var(--pl-style-text-on-white, var(--pl-color-text-primary));
    --section-link: var(--pl-style-link-on-white, var(--pl-color-text-link));
  }

  /* Section spacing presets */
  .pl-section--spacing-compact {
    --section-padding: var(--pl-section-padding-compact);
  }

  .pl-section--spacing-standard {
    --section-padding: var(--pl-section-padding-standard);
  }

  .pl-section--spacing-spacious {
    --section-padding: var(--pl-section-padding-spacious);
  }

  .pl-section--spacing-none {
    --section-padding: 0;
  }

  /* Section width presets */
  .pl-section--width-narrow {
    --section-width: var(--pl-width-prose);
  }

  .pl-section--width-wide {
    --section-width: var(--pl-width-wide);
  }

  .pl-section--width-full {
    --section-width: 100%;
  }

  /* ========================================
     Hero Block
     ======================================== */
  .wp-block-plumbline-hero {
    --hero-bg: var(--pl-color-surface-page);
    --hero-text: var(--pl-color-text-primary);
    --hero-min-height: auto;
    --hero-width: var(--pl-width-wide);

    position: relative;
    width: 100%;
    background-color: var(--hero-bg);
    color: var(--hero-text);
    overflow: hidden;
    min-height: var(--hero-min-height);
  }

  .pl-hero__inner {
    max-width: var(--hero-width);
    margin-inline: auto;
    padding-inline: var(--pl-gutter);
    padding-block: var(--pl-space-9);
    min-height: var(--hero-min-height);
    display: flex;
    align-items: center;
  }

  .pl-hero--width-content {
    --hero-width: var(--pl-width-content);
  }

  .pl-hero--width-wide {
    --hero-width: var(--pl-width-wide);
  }

  .pl-hero--width-full {
    --hero-width: 100%;
  }

  .pl-hero__content {
    max-width: var(--pl-width-content);
  }

  .pl-hero__content--center {
    text-align: center;
    margin-inline: auto;
  }

  /* Hero layout variants */
  .pl-hero--centered .pl-hero__inner {
    justify-content: center;
  }

  .pl-hero--centered .pl-hero__content--center {
    text-align: center;
    margin-inline: auto;
  }

  /* Hero style variants */
  .pl-hero--style-default {
    --hero-bg: var(--pl-color-surface-page);
    --hero-text: var(--pl-style-text-on-default, var(--pl-color-text-primary));
    --hero-link: var(--pl-style-link-on-default, var(--pl-color-text-link));
  }

  .pl-hero--style-muted {
    --hero-bg: var(--pl-color-surface-alt);
    --hero-text: var(--pl-style-text-on-muted, var(--pl-color-text-primary));
    --hero-link: var(--pl-style-link-on-muted, var(--pl-color-text-link));
  }

  .pl-hero--style-accent {
    --hero-bg: var(--pl-color-primary);
    --hero-text: var(--pl-style-text-on-accent, var(--pl-color-text-inverse));
    --hero-link: var(--pl-style-link-on-accent, var(--pl-color-primary-light));
  }

  .pl-hero--style-accent-light {
    --hero-bg: var(--pl-color-primary-lighter);
    --hero-text: var(--pl-style-text-on-accent-light, var(--pl-color-text-primary));
    --hero-link: var(--pl-style-link-on-accent-light, var(--pl-color-text-link));
  }

  .pl-hero--style-secondary-accent {
    --hero-bg: var(--pl-color-secondary);
    --hero-text: var(--pl-style-text-on-secondary-accent, var(--pl-color-on-secondary));
    --hero-link: var(--pl-style-link-on-secondary-accent, var(--pl-color-text-link));
  }

  .pl-hero--style-secondary-light {
    --hero-bg: var(--pl-color-secondary-light);
    --hero-text: var(--pl-style-text-on-secondary-light, var(--pl-color-text-primary));
    --hero-link: var(--pl-style-link-on-secondary-light, var(--pl-color-text-link));
  }

  .pl-hero--style-accent a {
    color: var(--hero-link, var(--pl-color-text-inverse));
  }

  .pl-hero--style-secondary-accent a {
    color: var(--hero-link, var(--pl-color-on-secondary));
  }

  .pl-hero--style-dark {
    --hero-bg: var(--pl-color-neutral-900);
    --hero-text: var(--pl-style-text-on-dark, var(--pl-color-text-inverse));
    --hero-link: var(--pl-style-link-on-dark, var(--pl-color-primary-light));
  }

  .pl-hero--style-dark a {
    color: var(--hero-link, var(--pl-color-primary-light));
  }

  /* Hero height presets */
  .pl-hero--height-compact {
    --hero-min-height: auto;
  }

  .pl-hero--height-compact .pl-hero__inner {
    padding-block: var(--pl-space-4);
  }

  .pl-hero--height-standard .pl-hero__inner {
    min-height: 24rem;
  }

  .pl-hero--height-tall .pl-hero__inner {
    min-height: 60vh;
  }

  .pl-hero--height-full-viewport {
    --hero-min-height: 100vh;
  }

  .pl-hero--height-full-viewport .pl-hero__inner {
    min-height: 100vh;
  }

  /* Hero: Split variant */
  .pl-hero--split .pl-hero__inner {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: var(--pl-space-7);
    align-items: center;
  }

  .pl-hero--split .pl-hero__content {
    max-width: none;
  }

  .pl-hero--split .pl-hero__media {
    border-radius: var(--pl-radius-lg);
    overflow: hidden;
  }

  .pl-hero--split .pl-hero__media img {
    width: 100%;
    height: 100%;
    object-fit: cover;
  }

  .pl-hero--media-left .pl-hero__media {
    order: -1;
  }

  .pl-hero--media-right .pl-hero__media {
    order: 1;
  }

  /* Hero: Media background variant */
  .pl-hero--media-background {
    position: relative;
    --hero-bg: transparent;
  }

  .pl-hero__background {
    position: absolute;
    inset: 0;
    z-index: 0;
    overflow: hidden;
  }

  .pl-hero__background .pl-hero__media-placeholder {
    width: 100%;
    height: 100%;
    border-radius: 0;
    min-height: 100%;
  }

  .pl-hero__background img,
  .pl-hero__background .pl-hero__img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
  }

  .pl-hero--media-background .pl-hero__inner {
    position: relative;
    z-index: 2;
  }

  /* Photo background: light text with shadow for legibility (light overlay uses dark text). */
  .pl-hero--media-background.pl-hero--has-media:not(.pl-hero--overlay-light) .pl-hero__content {
    --hero-text: var(--pl-color-text-inverse);
    --hero-link: var(--pl-color-text-inverse);
    color: var(--pl-color-text-inverse);
  }

  .pl-hero--media-background.pl-hero--has-media:not(.pl-hero--overlay-light) .pl-hero__content :where(
    h1, h2, h3, h4, h5, h6, p, li, blockquote, .wp-block-list, a:not(.wp-element-button)
  ) {
    color: var(--hero-text);
    text-shadow:
      0 1px 2px rgb(0 0 0 / 0.65),
      0 2px 16px rgb(0 0 0 / 0.45);
  }

  .pl-hero--media-background.pl-hero--has-media.pl-hero--overlay-light .pl-hero__content {
    --hero-text: var(--pl-color-text-primary);
    --hero-link: var(--pl-color-text-link);
    color: var(--pl-color-text-primary);
  }

  .pl-hero--media-background.pl-hero--has-media.pl-hero--overlay-light .pl-hero__content :where(
    h1, h2, h3, h4, h5, h6, p, li, blockquote, .wp-block-list, a:not(.wp-element-button)
  ) {
    color: var(--hero-text);
    text-shadow: none;
  }

  /* Hero overlays */
  .pl-hero--overlay-light::after {
    content: '';
    position: absolute;
    inset: 0;
    background: color-mix(in srgb, var(--pl-color-surface-page) 50%, transparent);
    z-index: 1;
    pointer-events: none;
  }

  .pl-hero--overlay-medium::after {
    content: '';
    position: absolute;
    inset: 0;
    background: rgba(0, 0, 0, 0.35);
    z-index: 1;
    pointer-events: none;
  }

  .pl-hero--overlay-dark::after {
    content: '';
    position: absolute;
    inset: 0;
    background: var(--pl-color-surface-overlay);
    z-index: 1;
    pointer-events: none;
  }

  .pl-hero--overlay-gradient::after {
    content: '';
    position: absolute;
    inset: 0;
    background: linear-gradient(
      to right,
      var(--pl-color-surface-overlay) 0%,
      transparent 70%
    );
    z-index: 1;
    pointer-events: none;
  }

  .pl-hero--overlay-accent::after {
    content: '';
    position: absolute;
    inset: 0;
    background: color-mix(in srgb, var(--pl-color-primary) 45%, transparent);
    z-index: 1;
    pointer-events: none;
  }

  /* Hero: Compact variant */
  .pl-hero--compact .pl-hero__inner {
    padding-block: var(--pl-space-7);
  }

  /* Hero responsive */
  @media (max-width: 48rem) {
    .pl-hero--split .pl-hero__inner {
      grid-template-columns: 1fr;
    }

    .pl-hero--media-left .pl-hero__media {
      order: 0;
    }
  }

  /* ========================================
     Card Grid Block
     ======================================== */
  .wp-block-plumbline-card-grid {
    --grid-gap: var(--pl-space-6);
    --section-bg: var(--pl-color-surface-page);
    --section-text: var(--pl-color-text-primary);
    --card-grid-width: var(--pl-width-wide);

    width: 100%;
    background-color: var(--section-bg);
    color: var(--section-text);
    padding-block: var(--pl-space-8);
  }

  .pl-card-grid__inner {
    max-width: var(--card-grid-width);
    margin-inline: auto;
    padding-inline: var(--pl-gutter);
  }

  .pl-card-grid--width-content {
    --card-grid-width: var(--pl-width-content);
  }

  .pl-card-grid--width-wide {
    --card-grid-width: var(--pl-width-wide);
  }

  .pl-card-grid--width-full {
    --card-grid-width: 100%;
  }

  .pl-card-grid__cards {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
    gap: var(--grid-gap);
  }

  .pl-card-grid--cols-1 .pl-card-grid__cards {
    grid-template-columns: 1fr;
  }

  .pl-card-grid--cols-2 .pl-card-grid__cards {
    grid-template-columns: repeat(2, 1fr);
  }

  .pl-card-grid--cols-3 .pl-card-grid__cards {
    grid-template-columns: repeat(3, 1fr);
  }

  .pl-card-grid--cols-4 .pl-card-grid__cards {
    grid-template-columns: repeat(4, 1fr);
  }

  .pl-card-grid--cols-5 .pl-card-grid__cards {
    grid-template-columns: repeat(5, 1fr);
  }

  .pl-card-grid--cols-6 .pl-card-grid__cards {
    grid-template-columns: repeat(6, 1fr);
  }

  .pl-card-grid--equal-height .pl-card-grid__cards {
    align-items: stretch;
  }

  /* List layout: single column, each item is a horizontal row */
  .pl-card-grid--layout-list .pl-card-grid__cards {
    grid-template-columns: 1fr;
    gap: var(--pl-space-5);
  }

  .pl-card-grid--layout-list .wp-block-plumbline-card {
    flex-direction: row;
    align-items: stretch;
    gap: var(--pl-space-4);
  }

  .pl-card-grid--layout-list .pl-card__image {
    flex-shrink: 0;
    width: clamp(140px, 20vw, 240px);
    aspect-ratio: auto;
  }

  .pl-card-grid--layout-list .pl-card__body {
    flex: 1;
  }

  .pl-card-grid--layout-list .wp-block-plumbline-staff-card,
  .pl-card-grid--layout-list .pl-staff-card {
    flex-direction: row-reverse;
    align-items: flex-start;
    gap: var(--pl-space-5);
  }

  .pl-card-grid--layout-list .pl-staff-card__photo {
    flex-shrink: 0;
    width: clamp(120px, 15vw, 200px);
  }

  .pl-card-grid--layout-list .pl-staff-card__body {
    flex: 1;
  }

  /* Image shape modifiers */
  .pl-card-grid--img-wide .pl-card__image,
  .pl-card-grid--img-wide .pl-staff-card__photo {
    aspect-ratio: 16 / 10;
  }

  .pl-card-grid--img-portrait .pl-card__image,
  .pl-card-grid--img-portrait .pl-staff-card__photo {
    aspect-ratio: 3 / 4;
  }

  .pl-card-grid--img-square .pl-card__image,
  .pl-card-grid--img-square .pl-staff-card__photo {
    aspect-ratio: 1;
  }

  /* Circle and square get inset margin in grid so shape is visible inside card */
  .pl-card-grid--layout-grid.pl-card-grid--img-square .pl-card__image,
  .pl-card-grid--layout-grid.pl-card-grid--img-circle .pl-card__image,
  .pl-card-grid--layout-grid.pl-card-grid--img-square .pl-staff-card__photo,
  .pl-card-grid--layout-grid.pl-card-grid--img-circle .pl-staff-card__photo {
    margin: var(--pl-space-4) var(--pl-space-4) 0;
    width: calc(100% - var(--pl-space-4) * 2);
  }

  .pl-card-grid--img-square .pl-card__image,
  .pl-card-grid--img-square .pl-staff-card__photo {
    border-radius: var(--pl-radius-md);
  }

  .pl-card-grid--img-circle .pl-card__image,
  .pl-card-grid--img-circle .pl-staff-card__photo {
    aspect-ratio: 1;
    border-radius: var(--pl-radius-full);
  }

  /* Card Grid section styles */
  .pl-card-grid--style-muted {
    --section-bg: var(--pl-color-surface-alt);
    --section-text: var(--pl-style-text-on-muted, var(--pl-color-text-primary));
  }

  .pl-card-grid--style-dark {
    --section-bg: var(--pl-color-neutral-900);
    --section-text: var(--pl-style-text-on-dark, var(--pl-color-text-inverse));
  }

  .pl-card-grid--style-accent {
    --section-bg: var(--pl-color-primary);
    --section-text: var(--pl-style-text-on-accent, var(--pl-color-text-inverse));
  }

  .pl-card-grid--style-accent-light {
    --section-bg: var(--pl-color-primary-lighter);
    --section-text: var(--pl-style-text-on-accent-light, var(--pl-color-text-primary));
  }

  .pl-card-grid--style-secondary-accent {
    --section-bg: var(--pl-color-secondary);
    --section-text: var(--pl-style-text-on-secondary-accent, var(--pl-color-on-secondary));
  }

  .pl-card-grid--style-secondary-light {
    --section-bg: var(--pl-color-secondary-light);
    --section-text: var(--pl-style-text-on-secondary-light, var(--pl-color-text-primary));
  }

  /* Card Grid spacing presets */
  .pl-card-grid--spacing-compact { padding-block: var(--pl-section-padding-compact); }
  .pl-card-grid--spacing-standard { padding-block: var(--pl-section-padding-standard); }
  .pl-card-grid--spacing-spacious { padding-block: var(--pl-section-padding-spacious); }
  .pl-card-grid--spacing-none { padding-block: 0; }

  /* Card Grid responsive */
  @media (max-width: 37.5rem) {
    .pl-card-grid--layout-grid .pl-card-grid__cards {
      grid-template-columns: 1fr;
    }

    .pl-card-grid--layout-list .pl-staff-card {
      flex-direction: column;
    }

    .pl-card-grid--layout-list .pl-staff-card__photo {
      width: 100%;
      max-width: 200px;
    }
  }

  @media (min-width: 37.5625rem) and (max-width: 56.25rem) {
    .pl-card-grid--cols-3 .pl-card-grid__cards,
    .pl-card-grid--cols-4 .pl-card-grid__cards,
    .pl-card-grid--cols-5 .pl-card-grid__cards,
    .pl-card-grid--cols-6 .pl-card-grid__cards {
      grid-template-columns: repeat(2, 1fr);
    }
  }

  /* ========================================
     Card Block
     ======================================== */
  .wp-block-plumbline-card {
    position: relative;
    display: flex;
    flex-direction: column;
    height: 100%;
    border: var(--pl-border-thin) solid var(--pl-color-neutral-200);
    border-radius: var(--pl-radius-md);
    overflow: hidden;
    background: var(--pl-color-surface-raised);
    backface-visibility: hidden;
    transform: translate3d(0, 0, 0);
    transition: transform 0.25s cubic-bezier(0.25, 0.46, 0.45, 0.94), box-shadow 0.25s cubic-bezier(0.25, 0.46, 0.45, 0.94);
  }

  .wp-block-plumbline-card:hover {
    transform: translate3d(0, -2px, 0);
    box-shadow: var(--pl-shadow-lg);
  }

  .pl-card__image {
    position: relative;
    z-index: 0;
    aspect-ratio: 16 / 10;
    overflow: hidden;
  }

  .pl-card__img {
    width: 100%;
    height: 100%;
    object-fit: cover;
  }

  .pl-card__icon {
    display: flex;
    align-items: center;
    justify-content: center;
    padding: var(--pl-space-5) var(--pl-space-4) var(--pl-space-3);
    color: currentColor;
    line-height: 0;
  }

  .pl-card__icon-svg {
    display: block;
    flex-shrink: 0;
  }

  .pl-card__content {
    display: flex;
    flex-direction: column;
    flex: 1;
    min-width: 0;
  }

  /* Icon cards — editorial hierarchy, room to breathe */
  .pl-card-grid--media-icon .pl-card__icon {
    aspect-ratio: auto;
    justify-content: flex-start;
    align-items: center;
    padding: var(--pl-space-5) var(--pl-space-5) 0;
  }

  .pl-card-grid--media-icon .pl-card__icon-svg {
    width: var(--pl-card-icon-size, 58px);
    height: var(--pl-card-icon-size, 58px);
  }

  .pl-card-grid--media-icon .pl-card__body {
    padding: var(--pl-space-4) var(--pl-space-5) var(--pl-space-5);
    gap: 0;
  }

  .pl-card-grid--media-icon .pl-card__meta {
    margin-bottom: var(--pl-space-2);
    font-size: 0.6875rem;
    font-weight: var(--pl-weight-semibold);
    letter-spacing: 0.08em;
    color: var(--pl-color-neutral-500);
  }

  .pl-card-grid--media-icon .pl-card__title {
    margin-bottom: var(--pl-space-3);
    font-family: var(--pl-font-heading);
    font-size: var(--pl-text-xl);
    font-weight: var(--pl-weight-bold);
    line-height: 1.2;
    letter-spacing: -0.02em;
    color: var(--pl-color-neutral-900);
  }

  .pl-card-grid--media-icon .pl-card__description {
    margin-bottom: 0;
    font-size: var(--pl-text-base);
    line-height: 1.4;
    color: var(--pl-color-text-secondary);
  }

  .pl-card-grid--media-icon .pl-card__cta {
    display: inline-flex;
    align-items: center;
    gap: 0.35em;
    margin-top: auto;
    padding-top: var(--pl-space-3);
    font-size: var(--pl-text-base);
    font-weight: var(--pl-weight-semibold);
    line-height: var(--pl-leading-normal);
    color: var(--pl-color-primary);
    text-decoration: none;
  }

  .pl-card-grid--media-icon .pl-card__cta-icon {
    flex-shrink: 0;
    width: 1.05em;
    height: 1.05em;
    transition: transform 0.2s var(--pl-easing-default);
  }

  .pl-card-grid--media-icon .pl-card__cta-icon svg {
    display: block;
    width: 100%;
    height: 100%;
  }

  .pl-card-grid--media-icon .wp-block-plumbline-card:hover .pl-card__cta {
    text-decoration: none;
  }

  .pl-card-grid--media-icon .wp-block-plumbline-card:hover .pl-card__cta-icon {
    transform: translateX(0.15em);
  }

  .pl-card-grid--media-none .pl-card__image,
  .pl-card-grid--media-none .pl-card__icon {
    display: none;
  }

  .pl-card__body {
    position: relative;
    z-index: 0;
    flex: 1;
    display: flex;
    flex-direction: column;
    padding: var(--pl-space-4);
  }

  .pl-card__meta {
    font-size: var(--pl-text-xs);
    color: var(--pl-color-text-muted);
    text-transform: uppercase;
    letter-spacing: var(--pl-tracking-wide);
    font-weight: var(--pl-weight-medium);
    margin-bottom: var(--pl-space-2);
  }

  .pl-card__title {
    font-size: var(--pl-text-lg);
    font-weight: var(--pl-weight-semibold);
    line-height: var(--pl-leading-tight);
    margin-top: 0;
    margin-bottom: var(--pl-space-2);
  }

  .pl-card__description {
    flex: 1;
    color: var(--pl-color-text-secondary);
    font-size: var(--pl-text-sm);
    margin-top: 0;
    margin-bottom: var(--pl-space-3);
  }

  /* Stretched control: single tab stop, concise name via aria-label; CTA is visual-only. */
  .pl-card__link {
    position: absolute;
    inset: 0;
    z-index: 1;
  }

  .pl-card__link:focus {
    outline: none;
  }

  .wp-block-plumbline-card:has(.pl-card__link:focus-visible) {
    box-shadow: inset 0 0 0 2px var(--pl-color-primary);
  }

  .pl-card__cta {
    font-weight: var(--pl-weight-semibold);
    font-size: var(--pl-text-sm);
    color: var(--pl-color-primary);
    text-decoration: none;
    margin-top: auto;
  }

  .wp-block-plumbline-card:hover .pl-card__cta {
    text-decoration: underline;
  }

  /* Card styles (applied via parent Card Grid classes) */
  .pl-card-grid--cards-default .wp-block-plumbline-card {
    border: var(--pl-border-thin) solid var(--pl-color-neutral-200);
    border-radius: var(--pl-radius-md);
    overflow: hidden;
    background: var(--pl-color-surface-raised);
  }

  .pl-card-grid--cards-bordered .wp-block-plumbline-card {
    border: var(--pl-border-thin) solid var(--pl-color-neutral-200);
    border-radius: var(--pl-radius-md);
    overflow: hidden;
  }

  .pl-card-grid--cards-elevated .wp-block-plumbline-card {
    border: none;
    box-shadow: var(--pl-shadow-md);
  }


  .pl-card-grid--cards-minimal .wp-block-plumbline-card {
    border: none;
    box-shadow: none;
  }

  .pl-card-grid--cards-minimal .pl-card__body {
    padding: var(--pl-space-3);
  }

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

  .wp-block-plumbline-cta {
    --cta-bg: var(--pl-color-surface);
    --cta-width: var(--pl-width-content);

    width: 100%;
    background: var(--cta-bg);
  }

  .pl-cta__inner {
    max-width: var(--cta-width);
    margin-inline: auto;
    padding-inline: var(--pl-gutter);
  }

  .pl-cta--width-wide {
    --cta-width: var(--pl-width-wide);
  }

  .pl-cta--width-full {
    --cta-width: 100%;
  }

  .pl-cta--style-default {
    --cta-bg: var(--pl-color-surface);
    --cta-text: var(--pl-style-text-on-default, var(--pl-color-text-primary));
    --cta-link: var(--pl-style-link-on-default, var(--pl-color-text-link));
    color: var(--cta-text);
  }

  .pl-cta--style-muted {
    --cta-bg: var(--pl-color-surface-alt);
    --cta-text: var(--pl-style-text-on-muted, var(--pl-color-text-primary));
    --cta-link: var(--pl-style-link-on-muted, var(--pl-color-text-link));
    color: var(--cta-text);
  }

  .pl-cta--style-accent {
    --cta-bg: var(--pl-color-accent);
    --cta-text: var(--pl-style-text-on-accent, var(--pl-color-on-accent));
    --cta-link: var(--pl-style-link-on-accent, var(--pl-color-primary-light));
    color: var(--cta-text);
  }

  .pl-cta--style-accent-light {
    --cta-bg: var(--pl-color-primary-lighter);
    --cta-text: var(--pl-style-text-on-accent-light, var(--pl-color-text-primary));
    --cta-link: var(--pl-style-link-on-accent-light, var(--pl-color-text-link));
    color: var(--cta-text);
  }

  .pl-cta--style-secondary-accent {
    --cta-bg: var(--pl-color-secondary);
    --cta-text: var(--pl-style-text-on-secondary-accent, var(--pl-color-on-secondary));
    --cta-link: var(--pl-style-link-on-secondary-accent, var(--pl-color-text-link));
    color: var(--cta-text);
  }

  .pl-cta--style-secondary-light {
    --cta-bg: var(--pl-color-secondary-light);
    --cta-text: var(--pl-style-text-on-secondary-light, var(--pl-color-text-primary));
    --cta-link: var(--pl-style-link-on-secondary-light, var(--pl-color-text-link));
    color: var(--cta-text);
  }

  .pl-cta--style-dark {
    --cta-bg: var(--pl-color-neutral-900);
    --cta-text: var(--pl-style-text-on-dark, var(--pl-color-neutral-50));
    --cta-link: var(--pl-style-link-on-dark, var(--pl-color-primary-light));
    color: var(--cta-text);
  }

  .pl-cta--style-white {
    --cta-bg: var(--pl-color-surface-page);
    --cta-text: var(--pl-style-text-on-white, var(--pl-color-text-primary));
    --cta-link: var(--pl-style-link-on-white, var(--pl-color-text-link));
    color: var(--cta-text);
  }

  .pl-cta--spacing-compact { padding-block: var(--pl-section-padding-compact); }
  .pl-cta--spacing-standard { padding-block: var(--pl-section-padding-standard); }
  .pl-cta--spacing-spacious { padding-block: var(--pl-section-padding-spacious); }
  .pl-cta--spacing-none { padding-block: 0; }

  .pl-cta--variant-centered .pl-cta__inner {
    text-align: center;
  }

  .pl-cta--variant-centered .wp-block-buttons {
    justify-content: center;
  }

  .pl-cta--variant-split-text-button .pl-cta__inner {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    justify-content: space-between;
    gap: var(--pl-space-6);
  }

  .pl-cta--variant-split-text-button .pl-cta__inner > :not(.wp-block-buttons) {
    flex: 1 1 20rem;
  }

  .pl-cta--variant-split-text-button .wp-block-buttons {
    flex: 0 0 auto;
  }

  /* -------------------------------------------------------------------------
     Split Block
     ------------------------------------------------------------------------- */

  .wp-block-plumbline-split {
    --split-bg: var(--pl-color-surface);
    --split-width: var(--pl-width-wide);

    width: 100%;
    background: var(--split-bg);
  }

  .pl-split__inner {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: var(--pl-space-8);
    align-items: center;
    max-width: var(--split-width);
    margin-inline: auto;
    padding-inline: var(--pl-gutter);
  }

  .pl-split--width-content {
    --split-width: var(--pl-width-content);
  }

  .pl-split--width-wide {
    --split-width: var(--pl-width-wide);
  }

  .pl-split--width-full {
    --split-width: 100%;
  }

  .pl-split--style-default {
    --split-bg: var(--pl-color-surface);
    --split-text: var(--pl-style-text-on-default, var(--pl-color-text-primary));
    --split-link: var(--pl-style-link-on-default, var(--pl-color-text-link));
    color: var(--split-text);
  }

  .pl-split--style-muted {
    --split-bg: var(--pl-color-surface-alt);
    --split-text: var(--pl-style-text-on-muted, var(--pl-color-text-primary));
    --split-link: var(--pl-style-link-on-muted, var(--pl-color-text-link));
    color: var(--split-text);
  }

  .pl-split--style-accent {
    --split-bg: var(--pl-color-accent);
    --split-text: var(--pl-style-text-on-accent, var(--pl-color-on-accent));
    --split-link: var(--pl-style-link-on-accent, var(--pl-color-primary-light));
    color: var(--split-text);
  }

  .pl-split--style-secondary-accent {
    --split-bg: var(--pl-color-secondary);
    --split-text: var(--pl-style-text-on-secondary-accent, var(--pl-color-on-secondary));
    --split-link: var(--pl-style-link-on-secondary-accent, var(--pl-color-text-link));
    color: var(--split-text);
  }

  .pl-split--style-accent-light {
    --split-bg: var(--pl-color-primary-lighter);
    --split-text: var(--pl-style-text-on-accent-light, var(--pl-color-text-primary));
    --split-link: var(--pl-style-link-on-accent-light, var(--pl-color-text-link));
    color: var(--split-text);
  }

  .pl-split--style-secondary-light {
    --split-bg: var(--pl-color-secondary-light);
    --split-text: var(--pl-style-text-on-secondary-light, var(--pl-color-text-primary));
    --split-link: var(--pl-style-link-on-secondary-light, var(--pl-color-text-link));
    color: var(--split-text);
  }

  .pl-split--style-dark {
    --split-bg: var(--pl-color-neutral-900);
    --split-text: var(--pl-style-text-on-dark, var(--pl-color-neutral-50));
    --split-link: var(--pl-style-link-on-dark, var(--pl-color-primary-light));
    color: var(--split-text);
  }

  .pl-split--style-white {
    --split-bg: var(--pl-color-surface-page);
    --split-text: var(--pl-style-text-on-white, var(--pl-color-text-primary));
    --split-link: var(--pl-style-link-on-white, var(--pl-color-text-link));
    color: var(--split-text);
  }

  .pl-split--spacing-compact { padding-block: var(--pl-section-padding-compact); }
  .pl-split--spacing-standard { padding-block: var(--pl-section-padding-standard); }
  .pl-split--spacing-spacious { padding-block: var(--pl-section-padding-spacious); }
  .pl-split--spacing-none { padding-block: 0; }

  .pl-split__media {
    overflow: hidden;
    border-radius: var(--pl-radius-md);
  }

  .pl-split__img {
    display: block;
    width: 100%;
    height: auto;
    object-fit: cover;
  }

  .pl-split--media-fit-cover .pl-split__inner {
    align-items: stretch;
  }

  /*
   * Crop media to the content column height.
   * height: 0 + min-height: 100% keeps the media cell from expanding the grid row;
   * the row height comes from the text column only.
   */
  .pl-split--media-fit-cover .pl-split__media {
    position: relative;
    height: 0;
    min-height: 100%;
    overflow: hidden;
  }

  .pl-split--media-fit-cover .pl-split__img {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    max-width: none;
    object-fit: cover;
    object-position: center;
  }

  .pl-split__content {
    display: flex;
    flex-direction: column;
    gap: var(--pl-space-4);
  }

  /* Media bleed: image breaks out of its column */
  .pl-split--media-bleed {
    overflow: visible;
  }

  .pl-split--media-bleed .pl-split__media {
    margin-block: calc(var(--pl-space-6) * -1);
  }

  .pl-split--media-bleed.pl-split--media-right .pl-split__media {
    margin-right: calc(var(--pl-space-6) * -1);
  }

  .pl-split--media-bleed.pl-split--media-left .pl-split__media {
    margin-left: calc(var(--pl-space-6) * -1);
  }

  @media (max-width: 768px) {
    .pl-split__inner {
      grid-template-columns: 1fr;
    }

    .pl-split--media-left .pl-split__media {
      order: -1;
    }

    .pl-split--media-fit-cover .pl-split__media {
      height: auto;
      min-height: 0;
      aspect-ratio: 4 / 3;
    }

    .pl-split--media-bleed .pl-split__media {
      margin: 0;
    }
  }

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

  .wp-block-plumbline-faq {
    --faq-bg: transparent;
    --faq-width: var(--pl-width-content);

    width: 100%;
    background: var(--faq-bg);
  }

  .pl-faq__inner {
    max-width: var(--faq-width);
    margin-inline: auto;
    padding-inline: var(--pl-gutter);
  }

  .pl-faq--width-wide {
    --faq-width: var(--pl-width-wide);
  }

  .pl-faq--width-full {
    --faq-width: 100%;
  }

  .pl-faq--style-muted {
    --faq-bg: var(--pl-color-surface-alt);
    --faq-text: var(--pl-style-text-on-muted, var(--pl-color-text-primary));
    --faq-link: var(--pl-style-link-on-muted, var(--pl-color-text-link));
    color: var(--faq-text);
  }

  .pl-faq--style-accent {
    --faq-bg: var(--pl-color-accent);
    --faq-text: var(--pl-style-text-on-accent, var(--pl-color-on-accent));
    --faq-link: var(--pl-style-link-on-accent, var(--pl-color-primary-light));
    color: var(--faq-text);
  }

  .pl-faq--style-secondary-accent {
    --faq-bg: var(--pl-color-secondary);
    --faq-text: var(--pl-style-text-on-secondary-accent, var(--pl-color-on-secondary));
    --faq-link: var(--pl-style-link-on-secondary-accent, var(--pl-color-text-link));
    color: var(--faq-text);
  }

  .pl-faq--style-accent-light {
    --faq-bg: var(--pl-color-primary-lighter);
    --faq-text: var(--pl-style-text-on-accent-light, var(--pl-color-text-primary));
    --faq-link: var(--pl-style-link-on-accent-light, var(--pl-color-text-link));
    color: var(--faq-text);
  }

  .pl-faq--style-secondary-light {
    --faq-bg: var(--pl-color-secondary-light);
    --faq-text: var(--pl-style-text-on-secondary-light, var(--pl-color-text-primary));
    --faq-link: var(--pl-style-link-on-secondary-light, var(--pl-color-text-link));
    color: var(--faq-text);
  }

  .pl-faq--style-dark {
    --faq-bg: var(--pl-color-neutral-900);
    --faq-text: var(--pl-style-text-on-dark, var(--pl-color-neutral-50));
    --faq-link: var(--pl-style-link-on-dark, var(--pl-color-primary-light));
    color: var(--faq-text);
  }

  .pl-faq--style-white {
    --faq-bg: var(--pl-color-surface-page);
    --faq-text: var(--pl-style-text-on-white, var(--pl-color-text-primary));
    --faq-link: var(--pl-style-link-on-white, var(--pl-color-text-link));
    color: var(--faq-text);
  }

  .pl-faq--spacing-compact { padding-block: var(--pl-section-padding-compact); }
  .pl-faq--spacing-standard { padding-block: var(--pl-section-padding-standard); }
  .pl-faq--spacing-spacious { padding-block: var(--pl-section-padding-spacious); }
  .pl-faq--spacing-none { padding-block: 0; }

  .pl-faq__items {
    display: flex;
    flex-direction: column;
    gap: var(--pl-space-2);
  }

  .pl-faq-item {
    border: 1px solid var(--pl-color-border);
    border-radius: var(--pl-radius-sm);
    background: var(--pl-color-surface);
  }

  .pl-faq-item__question {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: var(--pl-space-3);
    padding: var(--pl-space-4);
    font-weight: var(--pl-font-weight-semibold);
    color: var(--pl-color-text-primary);
    cursor: pointer;
    list-style: none;
  }

  .pl-faq-item__question-text {
    flex: 1;
    min-width: 0;
  }

  .pl-faq-item__question::-webkit-details-marker {
    display: none;
  }

  .pl-faq-item__question::marker {
    content: '';
  }

  .pl-faq-item__icon {
    flex-shrink: 0;
    color: var(--pl-color-text-secondary);
    transition: transform 0.3s var(--pl-easing-out), color 0.2s ease;
  }

  .pl-faq-item[open] .pl-faq-item__icon {
    transform: rotate(180deg);
    color: var(--pl-color-text-primary);
  }

  .pl-faq-item__answer {
    display: grid;
    grid-template-rows: 0fr;
    overflow: hidden;
    padding-inline: var(--pl-space-4);
    color: var(--pl-color-text-secondary);
    line-height: var(--pl-leading-relaxed);
    transition: grid-template-rows 0.35s var(--pl-spring), padding 0.35s var(--pl-spring);
  }

  .pl-faq-item__answer-inner {
    overflow: hidden;
  }

  .pl-faq-item[open] .pl-faq-item__answer {
    grid-template-rows: 1fr;
    padding-block-end: var(--pl-space-4);
  }

  @media (prefers-reduced-motion: reduce) {
    .pl-faq-item__icon {
      transition: none;
    }

    .pl-faq-item__answer {
      transition: none;
    }
  }

  .pl-faq-item[open] .pl-faq-item__question {
    border-bottom: 1px solid var(--pl-color-border);
    margin-bottom: var(--pl-space-3);
  }

  .pl-faq-item__question:focus {
    outline: none;
  }

  .pl-faq-item__question:focus-visible {
    outline: 2px solid var(--pl-color-primary);
    outline-offset: -2px;
    border-radius: var(--pl-radius-sm);
  }

  .pl-faq__controls {
    display: flex;
    justify-content: flex-end;
    margin-top: var(--pl-space-3);
  }

  .pl-faq__toggle-all {
    appearance: none;
    padding: 0;
    border: 0;
    background: none;
    font: inherit;
    font-size: var(--pl-text-sm);
    color: var(--pl-color-text-link);
    text-decoration: underline;
    text-underline-offset: 0.15em;
    cursor: pointer;
  }

  .pl-faq__toggle-all:hover {
    color: var(--pl-color-text-link-hover);
  }

  .pl-faq__toggle-all:focus-visible {
    outline: 2px solid var(--pl-color-primary);
    outline-offset: 2px;
  }

  /* -------------------------------------------------------------------------
     Icon List Block
     ------------------------------------------------------------------------- */

  .wp-block-plumbline-icon-list {
    --icon-list-width: var(--pl-width-content);

    width: 100%;
  }

  .pl-icon-list__inner {
    max-width: var(--icon-list-width);
    margin-inline: auto;
    padding-inline: var(--pl-gutter);
  }

  .pl-icon-list--width-wide {
    --icon-list-width: var(--pl-width-wide);
  }

  .pl-icon-list--width-full {
    --icon-list-width: 100%;
  }

  .pl-icon-list--spacing-compact { padding-block: var(--pl-section-padding-compact); }
  .pl-icon-list--spacing-standard { padding-block: var(--pl-section-padding-standard); }
  .pl-icon-list--spacing-spacious { padding-block: var(--pl-section-padding-spacious); }
  .pl-icon-list--spacing-none { padding-block: 0; }

  .pl-icon-list__items {
    display: flex;
    flex-direction: column;
    gap: var(--pl-space-5);
  }

  .pl-icon-list-item {
    display: grid;
    grid-template-columns: auto 1fr;
    gap: var(--pl-space-4);
    align-items: start;
  }

  .pl-icon-list-item__icon {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    color: var(--pl-color-text-primary);
  }

  .pl-icon-list-item__icon-svg {
    display: block;
    width: var(--pl-card-icon-size, 58px);
    height: var(--pl-card-icon-size, 58px);
  }

  .pl-icon-list--icon-sm .pl-icon-list-item__icon-svg { width: 38px; height: 38px; }
  .pl-icon-list--icon-md .pl-icon-list-item__icon-svg { width: 58px; height: 58px; }
  .pl-icon-list--icon-lg .pl-icon-list-item__icon-svg { width: 77px; height: 77px; }
  .pl-icon-list--icon-xl .pl-icon-list-item__icon-svg { width: 96px; height: 96px; }

  .pl-icon-list-item__content {
    font-size: var(--pl-text-lg);
    line-height: var(--pl-leading-relaxed);
    color: var(--pl-color-text-secondary);
  }

  .pl-icon-list-item__content p {
    margin: 0;
  }

  /* -------------------------------------------------------------------------
     Staff Card Block
     ------------------------------------------------------------------------- */

  .pl-staff-card {
    display: flex;
    flex-direction: column;
    height: 100%;
    transition: transform 0.2s var(--pl-spring), box-shadow 0.2s ease;
    border-radius: var(--pl-radius-md);
    overflow: hidden;
    background: var(--pl-color-surface);
  }

  .pl-staff-card__photo {
    aspect-ratio: 1;
    overflow: hidden;
    background: var(--pl-color-surface-alt);
  }

  .pl-staff-card__img {
    display: block;
    width: 100%;
    height: 100%;
    object-fit: cover;
  }

  .pl-staff-card__body {
    display: flex;
    flex-direction: column;
    gap: var(--pl-space-2);
    padding: var(--pl-space-4);
    flex: 1;
  }

  .pl-staff-card__name {
    margin: 0;
    font-size: var(--pl-text-lg);
    font-weight: var(--pl-font-weight-semibold);
    line-height: var(--pl-line-height-tight);
  }

  .pl-staff-card__title {
    margin: 0;
    font-size: var(--pl-text-sm);
    color: var(--pl-color-text-muted);
  }

  .pl-staff-card__pronouns {
    display: block;
    font-size: var(--pl-text-xs);
    color: var(--pl-color-text-muted);
    font-style: italic;
    margin-top: var(--pl-space-1);
  }

  .pl-staff-card__bio {
    margin: 0;
    font-size: var(--pl-text-sm);
    line-height: var(--pl-line-height-relaxed);
    flex: 1;
  }

  .pl-staff-card__bio > p {
    margin: 0;
  }

  .pl-staff-card__bio > p + p {
    margin-top: 0.75em;
  }

  .pl-staff-card__contact {
    display: flex;
    flex-direction: column;
    gap: var(--pl-space-1);
    margin-top: var(--pl-space-2);
    font-size: var(--pl-text-sm);
  }

  .pl-staff-card__email,
  .pl-staff-card__phone,
  .pl-staff-card__profile {
    color: var(--pl-color-accent);
    text-decoration: none;
  }

  .pl-staff-card__email:hover,
  .pl-staff-card__phone:hover,
  .pl-staff-card__profile:hover {
    text-decoration: underline;
  }

  .pl-card-grid--cards-elevated .pl-staff-card:hover,
  .pl-card-grid--cards-bordered .pl-staff-card:hover,
  .pl-card-grid--cards-default .pl-staff-card:hover {
    transform: translateY(-3px);
    box-shadow: var(--pl-shadow-lg);
  }

  .pl-card-grid--cards-default .wp-block-plumbline-staff-card,
  .pl-card-grid--cards-bordered .wp-block-plumbline-staff-card,
  .pl-card-grid--cards-elevated .wp-block-plumbline-staff-card,
  .pl-card-grid--cards-minimal .wp-block-plumbline-staff-card {
    border: 1px solid var(--pl-color-border);
  }

  .pl-card-grid--cards-elevated .wp-block-plumbline-staff-card {
    box-shadow: var(--pl-shadow-md);
  }

  .pl-card-grid--cards-minimal .wp-block-plumbline-staff-card {
    border: none;
    box-shadow: none;
  }

  .pl-card-grid--cards-accent-rail .wp-block-plumbline-card,
  .pl-card-grid--cards-accent-rail .wp-block-plumbline-staff-card {
    border-left: 4px solid var(--pl-card-accent, var(--pl-color-accent));
    background: color-mix(in srgb, var(--pl-card-accent, var(--pl-color-accent)) 5%, var(--pl-color-surface-raised));
    border-radius: var(--pl-radius-sm);
  }

  .pl-card-grid--accent-secondary { --pl-card-accent: var(--pl-color-secondary); }
  .pl-card-grid--accent-dark { --pl-card-accent: var(--pl-color-neutral-900); }
  .pl-card-grid--accent-muted { --pl-card-accent: var(--pl-color-neutral-400); }

  /* Content alignment */
  .pl-card-grid--align-center .pl-card__icon { justify-content: center; }
  .pl-card-grid--align-center .pl-card__body { text-align: center; }
  .pl-card-grid--align-center .pl-card__cta { align-self: center; }

  /* ========================================
     Eyebrow / Kicker
     ======================================== */
  .pl-eyebrow {
    display: block;
    font-size: var(--pl-text-xs);
    font-weight: var(--pl-weight-semibold);
    letter-spacing: var(--pl-tracking-caps, 0.08em);
    text-transform: uppercase;
    color: var(--pl-color-accent);
    margin-bottom: var(--pl-space-2);
  }

  .pl-text-contrast--force-light .pl-eyebrow {
    color: color-mix(in srgb, var(--pl-color-text-inverse) 80%, transparent);
  }

  /* Shared inner content rhythm */
  .pl-hero__content :is(h1, h2, h3),
  .pl-cta__inner :is(h1, h2, h3),
  .pl-split__content :is(h1, h2, h3),
  .pl-section__inner :is(h1, h2, h3) {
    margin-bottom: var(--pl-space-3);
  }

  .pl-hero__content h1 {
    font-size: var(--pl-text-fluid-h1);
  }

  .pl-hero__content p,
  .pl-cta__inner p,
  .pl-split__content p {
    color: inherit;
  }

  .pl-hero__content .wp-block-buttons,
  .pl-cta__inner .wp-block-buttons,
  .pl-split__content .wp-block-buttons,
  .pl-section__inner .wp-block-buttons {
    margin-top: var(--pl-space-4);
  }

  .pl-hero__content :where(h1, h2, h3, h4, h5, h6, p),
  .pl-cta__inner :where(h1, h2, h3, h4, h5, h6, p),
  .pl-split__content :where(h1, h2, h3, h4, h5, h6, p) {
    color: inherit;
  }

  .pl-cta--style-accent .wp-block-button:not(.is-style-outline):not(.is-style-text-link) .wp-block-button__link,
  .pl-cta--style-secondary-accent .wp-block-button:not(.is-style-outline):not(.is-style-text-link) .wp-block-button__link,
  .pl-cta--style-dark .wp-block-button:not(.is-style-outline):not(.is-style-text-link) .wp-block-button__link {
    background-color: var(--pl-color-surface-page);
    color: var(--pl-color-primary-dark);
    border-color: var(--pl-color-surface-page);
  }

  .pl-cta--style-secondary-accent .wp-block-button:not(.is-style-outline):not(.is-style-text-link) .wp-block-button__link {
    color: var(--pl-color-secondary-dark);
  }

  .pl-faq-item {
    background: var(--pl-color-surface-page);
  }

  .pl-faq--items-transparent .pl-faq-item {
    background: transparent;
    border-color: var(--pl-color-border);
  }

  .pl-faq--items-accent-light .pl-faq-item {
    background: color-mix(in srgb, var(--pl-color-accent) 8%, var(--pl-color-surface-page));
    border-color: color-mix(in srgb, var(--pl-color-accent) 20%, transparent);
  }

  .pl-faq--style-accent .pl-faq-item,
  .pl-faq--style-secondary-accent .pl-faq-item,
  .pl-faq--style-dark .pl-faq-item {
    color: var(--pl-color-text-primary);
  }

  .pl-faq--style-accent .pl-faq-item__answer,
  .pl-faq--style-secondary-accent .pl-faq-item__answer,
  .pl-faq--style-dark .pl-faq-item__answer {
    color: var(--pl-color-text-secondary);
  }

  .pl-faq--style-accent .pl-faq__toggle-all,
  .pl-faq--style-secondary-accent .pl-faq__toggle-all,
  .pl-faq--style-dark .pl-faq__toggle-all {
    color: var(--pl-color-neutral-100);
  }

  .pl-faq--style-accent .pl-faq__toggle-all:hover,
  .pl-faq--style-secondary-accent .pl-faq__toggle-all:hover,
  .pl-faq--style-dark .pl-faq__toggle-all:hover {
    color: #fff;
  }

  @media (max-width: 48rem) {
    .pl-card-grid--layout-grid:is(.pl-card-grid--cols-2, .pl-card-grid--cols-3, .pl-card-grid--cols-4, .pl-card-grid--cols-5, .pl-card-grid--cols-6) .pl-card-grid__cards {
      grid-template-columns: 1fr;
    }

    .pl-cta--variant-split-text-button .pl-cta__inner {
      flex-direction: column;
      align-items: flex-start;
    }

    .pl-cta--variant-split-text-button .wp-block-buttons {
      width: 100%;
      justify-content: flex-start;
    }
  }

  /* -------------------------------------------------------------------------
     Section-tier surface typography
     Headings inherit computed contrast foreground (see unlayered override below @layer).
     ------------------------------------------------------------------------- */

  .wp-block-plumbline-section :is(.wp-block-heading, h1, h2, h3, h4, h5, h6, p, li, blockquote, cite, .wp-block-list) {
    color: var(--section-text);
  }

  .wp-block-plumbline-hero :is(.wp-block-heading, h1, h2, h3, h4, h5, h6, p, li, blockquote, cite, .wp-block-list) {
    color: var(--hero-text);
  }

  .wp-block-plumbline-cta :is(.wp-block-heading, h1, h2, h3, h4, h5, h6, p, li, blockquote, cite, .wp-block-list) {
    color: var(--cta-text);
  }

  .wp-block-plumbline-split :is(.wp-block-heading, h1, h2, h3, h4, h5, h6, p, li, blockquote, cite, .wp-block-list) {
    color: var(--split-text);
  }

  .wp-block-plumbline-faq :is(.wp-block-heading, h1, h2, h3, h4, h5, h6, p, li, blockquote, cite, .wp-block-list) {
    color: var(--faq-text);
  }

  .wp-block-plumbline-section :where(a:not(.wp-element-button)) {
    color: var(--section-link, currentColor);
  }

  .wp-block-plumbline-hero :where(a:not(.wp-element-button)) {
    color: var(--hero-link, currentColor);
  }

  .wp-block-plumbline-cta :where(a:not(.wp-element-button)) {
    color: var(--cta-link, currentColor);
  }

  .wp-block-plumbline-split :where(a:not(.wp-element-button)) {
    color: var(--split-link, currentColor);
  }

  .wp-block-plumbline-faq :where(a:not(.wp-element-button)) {
    color: var(--faq-link, currentColor);
  }

  .pl-card-grid--style-accent .wp-block-plumbline-card,
  .pl-card-grid--style-secondary-accent .wp-block-plumbline-card,
  .pl-card-grid--style-dark .wp-block-plumbline-card {
    color: var(--pl-color-text-primary);
  }

  /*
   * Raised cards inside section-tier bands keep dark-on-light copy even when the
   * outer section uses inverse text (e.g. dark gallery band with white card tiles).
   */
  .wp-block-plumbline-section :where(.wp-block-plumbline-card) .pl-card__title {
    color: var(--pl-color-neutral-900);
  }

  .wp-block-plumbline-section :where(.wp-block-plumbline-card) .pl-card__meta {
    color: var(--pl-color-text-muted);
  }

  .wp-block-plumbline-section :where(.wp-block-plumbline-card) .pl-card__description {
    color: var(--pl-color-text-secondary);
  }

  .wp-block-plumbline-section :where(.wp-block-plumbline-card) .pl-card__cta {
    color: var(--pl-color-primary);
  }

  /* -------------------------------------------------------------------------
     Section style contrast — surface hooks and manual overrides
     ------------------------------------------------------------------------- */

  .pl-block__surface {
    color: inherit;
  }

  /*
   * Override hooks:
   * - Set --section-text / --hero-text / --cta-text / --split-text / --faq-text on the block
   * - Target [data-pl-section-style="accent"][data-pl-text-contrast="dark"]
   * - Add .pl-text-contrast--force-light or .pl-text-contrast--force-dark on the block wrapper
   */
  .pl-text-contrast--force-light {
    --section-text: var(--pl-color-text-inverse);
    --section-link: var(--pl-color-primary-light, var(--pl-color-text-inverse));
    --hero-text: var(--pl-color-text-inverse);
    --cta-text: var(--pl-color-text-inverse);
    --split-text: var(--pl-color-text-inverse);
    --faq-text: var(--pl-color-text-inverse);
    color: var(--pl-color-text-inverse);
  }

  .pl-text-contrast--force-dark {
    --section-text: var(--pl-color-text-primary);
    --section-link: var(--pl-color-text-link);
    --hero-text: var(--pl-color-text-primary);
    --cta-text: var(--pl-color-text-primary);
    --split-text: var(--pl-color-text-primary);
    --faq-text: var(--pl-color-text-primary);
    color: var(--pl-color-text-primary);
  }

  /* -------------------------------------------------------------------------
     Micro-animations: buttons, links
     ------------------------------------------------------------------------- */

  .wp-block-button__link {
    transition: transform 0.15s var(--pl-spring), box-shadow 0.15s ease;
  }

  .wp-block-button__link:hover {
    transform: translateY(-1px);
    box-shadow: 0 2px 8px rgba(28, 25, 23, 0.12);
  }

  .wp-block-button__link:active {
    transform: translateY(0) scale(0.98);
    box-shadow: none;
  }

  /* Property-specific transitions only — do not use shorthand `transition` (it wipes pill/bg animations in archive.css). */
  .pl-entry a:not(.wp-block-button__link):not(.pl-staff-card__email):not(.pl-staff-card__phone):not(.pl-staff-card__profile):not(.pl-taxonomy-pill) {
    transition-property: text-decoration-thickness, text-underline-offset;
    transition-duration: 0.15s;
    transition-timing-function: ease;
  }

  .pl-entry a:not(.wp-block-button__link):not(.pl-staff-card__email):not(.pl-staff-card__phone):not(.pl-staff-card__profile):hover {
    text-decoration-thickness: var(--pl-link-underline-thickness-hover);
    text-underline-offset: 0.22em;
  }

  @media (prefers-reduced-motion: reduce) {
    .wp-block-plumbline-card,
    .pl-staff-card,
    .wp-block-button__link {
      transition: none;
    }

    .wp-block-plumbline-card:hover,
    .pl-staff-card:hover,
    .wp-block-button__link:hover {
      transform: none;
      box-shadow: none;
    }
  }
}

/*
 * Unlayered: WordPress global styles and editor base typography are unlayered and beat @layer blocks.
 * Use surface tokens directly — inherit alone loses to .wp-block-heading / .editor-styles-wrapper h1 rules.
 */
.wp-block-plumbline-section :is(.wp-block-heading, h1, h2, h3, h4, h5, h6, p, li, blockquote, cite, .wp-block-list) {
  color: var(--section-text);
}

.wp-block-plumbline-hero :is(.wp-block-heading, h1, h2, h3, h4, h5, h6, p, li, blockquote, cite, .wp-block-list) {
  color: var(--hero-text);
}

.wp-block-plumbline-cta :is(.wp-block-heading, h1, h2, h3, h4, h5, h6, p, li, blockquote, cite, .wp-block-list) {
  color: var(--cta-text);
}

.wp-block-plumbline-split :is(.wp-block-heading, h1, h2, h3, h4, h5, h6, p, li, blockquote, cite, .wp-block-list) {
  color: var(--split-text);
}

.wp-block-plumbline-faq :is(.wp-block-heading, h1, h2, h3, h4, h5, h6, p, li, blockquote, cite, .wp-block-list) {
  color: var(--faq-text);
}

.wp-block-plumbline-section :where(.wp-block-plumbline-card) .pl-card__title {
  color: var(--pl-color-neutral-900);
}

.wp-block-plumbline-section :where(.wp-block-plumbline-card) .pl-card__meta {
  color: var(--pl-color-text-muted);
}

.wp-block-plumbline-section :where(.wp-block-plumbline-card) .pl-card__description {
  color: var(--pl-color-text-secondary);
}

.wp-block-plumbline-section :where(.wp-block-plumbline-card) .pl-card__cta {
  color: var(--pl-color-primary);
}

/* Editor iframe: beat .editor-styles-wrapper h1 { color: neutral-900 } */
.editor-styles-wrapper .wp-block-plumbline-section :is(.wp-block-heading, h1, h2, h3, h4, h5, h6, p, li, blockquote, cite, .wp-block-list) {
  color: var(--section-text);
}

.editor-styles-wrapper .wp-block-plumbline-hero :is(.wp-block-heading, h1, h2, h3, h4, h5, h6, p, li, blockquote, cite, .wp-block-list) {
  color: var(--hero-text);
}

.editor-styles-wrapper .wp-block-plumbline-cta :is(.wp-block-heading, h1, h2, h3, h4, h5, h6, p, li, blockquote, cite, .wp-block-list) {
  color: var(--cta-text);
}

.editor-styles-wrapper .wp-block-plumbline-split :is(.wp-block-heading, h1, h2, h3, h4, h5, h6, p, li, blockquote, cite, .wp-block-list) {
  color: var(--split-text);
}

.editor-styles-wrapper .wp-block-plumbline-faq :is(.wp-block-heading, h1, h2, h3, h4, h5, h6, p, li, blockquote, cite, .wp-block-list) {
  color: var(--faq-text);
}

.editor-styles-wrapper .wp-block-plumbline-section :where(.wp-block-plumbline-card) .pl-card__title {
  color: var(--pl-color-neutral-900);
}

.editor-styles-wrapper .wp-block-plumbline-section :where(.wp-block-plumbline-card) .pl-card__meta {
  color: var(--pl-color-text-muted);
}

.editor-styles-wrapper .wp-block-plumbline-section :where(.wp-block-plumbline-card) .pl-card__description {
  color: var(--pl-color-text-secondary);
}

.editor-styles-wrapper .wp-block-plumbline-section :where(.wp-block-plumbline-card) .pl-card__cta {
  color: var(--pl-color-primary);
}

/*
 * Unlayered: beats :root :where(p) from theme.json global styles (inline, line-height 1.65).
 */
.wp-block-plumbline-card-grid.pl-card-grid--media-icon .wp-block-plumbline-card p.pl-card__description {
  margin-bottom: 0;
  font-size: var(--pl-text-base);
  line-height: 1.4;
  color: var(--pl-color-text-secondary);
}

.editor-styles-wrapper .wp-block-plumbline-card-grid.pl-card-grid--media-icon .wp-block-plumbline-card p.pl-card__description {
  margin-bottom: 0;
  font-size: var(--pl-text-base);
  line-height: 1.4;
  color: var(--pl-color-text-secondary);
}
