/*
 * Shared frontend + editor styling for the LIFE block theme.
 * Loaded on the frontend via wp_enqueue_style and in the editor via add_editor_style.
 * theme.json owns presets and per-block defaults; this file owns layout, section
 * block styles, and the typography classes referenced by patterns.
 */

html {
  overflow-x: hidden;
}

body {
  margin: 0;
  background: var(--theme-bg);
  color: var(--theme-text);
  font-family: var(--font-sans);
  font-size: var(--type-body-size);
  line-height: calc(var(--type-body-line) / var(--type-body-size));
  min-height: 100vh;
  display: flex;
  flex-direction: column;
}

a {
  color: var(--theme-text);
  text-underline-offset: 0.15em;
}

a:hover {
  color: var(--theme-muted);
}

/* ── Site chrome: header + footer mirror the Astro frontend layout. */

.life-header {
  /*
   * Pinned to the viewport on every page so the chrome never scrolls off.
   * On the home page (`body.home`) we override to `position: absolute` so the
   * header initially scrolls away with the hero, then JS re-pins it past the
   * scroll threshold (see header-pin.js + `.is-pinned` rules below).
   * Sits above .life-main so the fixed horizon canvas inside main can't
   * paint over the site chrome. See stacking notes near .life-horizon.
   */
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  z-index: 2;
  background: var(--theme-bg);
  font-family: var(--font-display);
}

/* Home page: header rides with the page until the pin threshold. */
body.home .life-header {
  position: absolute;
  background: transparent;
}

body.home .life-header.is-pinned {
  position: fixed;
  background: var(--theme-bg);
  animation: life-header-slide-in 220ms ease-out;
}

body.admin-bar .life-header {
  top: var(--life-admin-bar-offset, 32px);
}

@keyframes life-header-slide-in {
  from { transform: translateY(-100%); }
  to { transform: translateY(0); }
}

.life-header__inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0.75rem var(--page-gutter);
  gap: 1.5rem;
}

.life-header__logo {
  display: inline-flex;
  align-items: center;
  text-decoration: none;
  color: var(--theme-text);
  flex-shrink: 0;
}

.life-header__logo-image {
  display: block;
  width: clamp(7.5rem, 15vw, 10.5rem);
  height: auto;
  filter: var(--theme-logo-filter);
}

.life-header__logo-mark {
  font-family: var(--font-display);
  font-size: 1.75rem;
  line-height: 1;
  letter-spacing: 0.02em;
}

.life-header__logo-tag,
.life-footer__logo-tag {
  font-family: var(--font-mono);
  font-size: 0.5rem;
  line-height: 1.1;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--theme-text);
}

.life-header__menu {
  list-style: none;
  margin: 0;
  padding: 0;
  display: flex;
  gap: 1.5rem;
  align-items: stretch;
  justify-content: flex-end;
}

.life-header__nav {
  flex: 1;
}

.life-header__menu > li {
  display: flex;
  align-items: center;
  position: relative;
}

.life-header__menu > li.menu-item-has-children {
  padding-bottom: 0.55rem;
  margin-bottom: -0.55rem;
}

.life-header__menu > li > a,
.life-header__menu-label {
  font-family: var(--font-mono);
  font-size: 0.75rem;
  line-height: 1;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--theme-text);
  text-decoration: none;
  border-bottom: 1px solid transparent;
  padding-bottom: 0.125rem;
}

.life-header__menu a:hover {
  color: var(--theme-muted);
}

.life-header__menu > li.current-menu-item > a,
.life-header__menu > li.current-menu-ancestor > a,
.life-header__menu > li:hover > a,
.life-header__menu > li:focus-within > a,
.life-header__menu > li.current-menu-item > .life-header__menu-label,
.life-header__menu > li.current-menu-ancestor > .life-header__menu-label {
  border-bottom: 1px solid var(--theme-text);
}

.life-header__menu > li.menu-item-has-children > a {
  pointer-events: none;
  cursor: default;
}

.life-header__menu .sub-menu {
  list-style: none;
  margin: 0;
  padding: 0;
  position: absolute;
  top: 100%;
  left: 0;
  min-width: 13rem;
  background: var(--theme-bg);
  border-top: 1px solid var(--theme-text);
  border-bottom: 1px solid var(--theme-text);
  display: none;
  z-index: 10;
}

.life-header__menu .sub-menu li + li {
  border-top: 1px solid var(--theme-text);
}

.life-header__menu .sub-menu a {
  display: block;
  padding: 0.7rem 0.85rem;
  font-family: var(--font-mono);
  font-size: 0.75rem;
  line-height: 1;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--theme-text);
  text-decoration: none;
  border-bottom: 0;
}

.life-header__menu > li:hover > .sub-menu,
.life-header__menu > li:focus-within > .sub-menu {
  display: block;
}

.life-header__actions {
  display: inline-flex;
  align-items: center;
  gap: 1rem;
  flex-shrink: 0;
}

.life-header__social {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
}

.life-header__social-link {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: auto;
  height: auto;
  color: var(--theme-text);
  text-decoration: none;
}

.life-header__social-link:hover,
.life-header__social-link:focus-visible {
  text-decoration: none;
}

.life-header__social-icon {
  display: block;
  font-size: calc(0.95rem + 2px);
  line-height: 1;
  color: currentColor;
}

.life-header__theme {
  display: inline-flex;
  align-items: center;
  gap: 0;
}

.life-header__theme-toggle {
  border: 0;
  background: transparent;
  border-radius: 0;
  width: auto;
  height: auto;
  padding: 0;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
}

.life-header__theme-toggle-image {
  display: block;
  width: 1.9rem;
  height: auto;
  filter: var(--theme-logo-filter);
}

:root[data-life-theme="light"] .life-header__theme-toggle-image {
  transform: scaleX(-1);
}

.life-header__rule,
.life-footer__rule {
  border: none;
  border-top: 1px solid var(--theme-text);
  margin: 0 var(--page-gutter);
  opacity: 1;
}

.life-header__menu-toggle {
  display: none;
  flex-shrink: 0;
  align-items: center;
  justify-content: center;
  margin: 0;
  padding: 0.5rem;
  margin-right: -0.5rem;
  border: 0;
  background: transparent;
  color: var(--theme-text);
  cursor: pointer;
  border-radius: 0;
}

.life-header__menu-toggle-icon {
  display: block;
}

.life-header__drawer {
  position: fixed;
  inset: 0;
  z-index: 100;
  box-sizing: border-box;
  background: var(--theme-bg);
  color: var(--theme-text);
  overflow: auto;
  overscroll-behavior: contain;
}

body.admin-bar {
  --life-admin-bar-offset: 32px;
}

body.admin-bar .life-header__drawer {
  top: var(--life-admin-bar-offset);
}

.life-header__drawer-panel {
  display: flex;
  min-height: 100dvh;
  flex-direction: column;
  padding-bottom: env(safe-area-inset-bottom, 0);
}

body.admin-bar .life-header__drawer-panel {
  min-height: calc(100dvh - var(--life-admin-bar-offset));
}

.life-header__drawer-top {
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-shrink: 0;
  min-height: 70px;
  padding: 0 20px;
}

.life-header__drawer-logo {
  text-decoration: none;
  color: var(--theme-text);
}

.life-header__drawer-close {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  margin: 0;
  padding: 0.5rem;
  margin-right: -0.5rem;
  border: 0;
  background: transparent;
  color: var(--theme-text);
  cursor: pointer;
  border-radius: 0;
}

.life-header__drawer-close-icon {
  display: block;
}

.life-header__drawer-nav {
  --life-drawer-rule-inset: 8px;

  flex: 1 0 auto;
  width: 100%;
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

.life-header__drawer-list {
  list-style: none;
  margin: 0 var(--life-drawer-rule-inset);
  padding: 0;
  width: calc(100% - 16px);
  box-sizing: border-box;
  border-top: 1px solid var(--theme-text);
}

.life-header__drawer-item {
  border-bottom: 1px solid var(--theme-text);
}

.life-header__drawer-link {
  display: flex;
  min-height: 40px;
  align-items: center;
  justify-content: center;
  padding: 0.5rem 0.5rem;
  box-sizing: border-box;
  font-family: var(--font-mono);
  font-size: 12px;
  line-height: 14.4px;
  letter-spacing: 0;
  text-transform: uppercase;
  text-decoration: none;
  text-align: center;
  color: var(--theme-text);
  border-bottom: 0;
}

.life-header__drawer-link:hover {
  color: var(--theme-muted);
}

.life-header__drawer-link.is-current {
  text-decoration: underline;
  text-underline-offset: 0.2em;
}

.life-header__drawer-item--social .life-header__drawer-social-inner {
  display: flex;
  min-height: 40px;
  align-items: center;
  justify-content: center;
  gap: 0.625rem;
  padding: 0.5rem 0.5rem;
  box-sizing: border-box;
}

.life-header__drawer-theme {
  display: flex;
  flex-shrink: 0;
  align-items: center;
  justify-content: center;
  gap: 0.625rem;
  width: calc(100% - 16px);
  margin-top: auto;
  margin-right: 8px;
  margin-bottom: 0;
  margin-left: 8px;
  padding: 1.5rem 0 25px;
  box-sizing: border-box;
}

.life-header__drawer-theme-label {
  font-family: var(--font-mono);
  font-size: 12px;
  line-height: 14.4px;
  text-transform: uppercase;
  color: var(--theme-text);
  white-space: nowrap;
}

.life-header__drawer-theme-toggle {
  flex-shrink: 0;
}

body.life-mobile-nav-open {
  overflow: hidden;
}

/* Drawer is inside `.life-header`; lift the header above footer (also z-index: 2). */
body.life-mobile-nav-open .life-header {
  z-index: 10;
}

@media (max-width: 767px) {
  .life-header__inner {
    min-height: 70px;
    padding-block: 0;
    padding-left: 20px;
    padding-right: 20px;
  }

  .life-header__logo-image {
    width: clamp(9.5rem, 15vw, 10.5rem);
  }

  .life-header__rule {
    margin-left: 20px;
    margin-right: 20px;
  }

  .life-header__nav--desktop,
  .life-header__actions--desktop {
    display: none !important;
  }

  .life-header__menu-toggle {
    display: inline-flex;
  }
}

@media screen and (max-width: 782px) {
  body.admin-bar {
    --life-admin-bar-offset: 46px;
  }
}

.life-footer {
  position: relative;
  z-index: 2;
  margin-top: clamp(3rem, 8vw, 6rem);
}

.life-footer__marquee {
  --life-footer-marquee-shift: calc(2880px * 80 / 187);
  width: 100%;
  height: 80px;
  margin-bottom: 16px;
  background-image: url("../../assets/images/footer-marquee-dark.png");
  background-repeat: repeat-x;
  background-position: 0 50%;
  background-size: auto 80px;
  animation: life-footer-marquee 25s linear infinite;
}

:root[data-life-theme="light"] .life-footer__marquee {
  --life-footer-marquee-shift: calc(1440px * 80 / 94);
  background-image: url("../../assets/images/footer-marquee-light.png");
}

@media (max-width: 768px) {
  .life-footer__marquee {
    --life-footer-marquee-shift: calc(2880px * 48 / 187);
    height: 48px;
    background-size: auto 48px;
  }

  :root[data-life-theme="light"] .life-footer__marquee {
    --life-footer-marquee-shift: calc(1440px * 48 / 94);
  }
}

@keyframes life-footer-marquee {
  from {
    background-position-x: 0;
  }

  to {
    background-position-x: calc(-1 * var(--life-footer-marquee-shift));
  }
}

@media (prefers-reduced-motion: reduce) {
  .life-footer__marquee {
    animation: none;
  }
}

.life-footer__inner {
  display: flex;
  gap: clamp(1.5rem, 4vw, 3rem);
  align-items: flex-start;
  justify-content: space-between;
  padding: 2rem var(--page-gutter) 3rem;
}

.life-footer__aside {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: clamp(1.25rem, 3vw, 2rem);
  min-width: 0;
  flex: 0 1 auto;
}

.life-footer__address {
  font-family: var(--font-mono);
  font-style: normal;
  font-size: 0.65rem;
  letter-spacing: 0.08em;
  line-height: 1.7;
  text-transform: uppercase;
  color: var(--theme-text);
  margin: 0;
}

.life-footer__address-break {
  display: none;
}

.life-footer__brand {
  display: inline-flex;
  color: var(--theme-text);
  text-decoration: none;
}

.life-footer__brand-image {
  display: block;
  height: auto;
  flex-shrink: 0;
}

.life-footer__brand-image--desktop {
  width: clamp(7.5rem, 18vw, 11rem);
}

.life-footer__brand-image--light,
.life-footer__brand-image--mobile {
  display: none;
}

:root[data-life-theme="light"] .life-footer__brand-image--dark {
  display: none;
}

:root[data-life-theme="light"] .life-footer__brand-image--light {
  display: block;
}

.life-footer__nav {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 0.15rem;
  flex: 0 0 auto;
  padding-right: 60px;
}

.life-footer__menu {
  list-style: none;
  margin: 0;
  padding: 0;
  display: flex;
  flex-direction: column;
  gap: 0.15rem;
}

.life-footer__menu a {
  font-family: var(--font-mono);
  font-size: 0.75rem;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--theme-text);
  text-decoration: none;
}

.life-footer__menu a:hover {
  color: var(--theme-muted);
}

.life-footer__social-link {
  display: inline-flex;
  align-items: center;
  margin-top: 5px;
  color: var(--theme-text);
  text-decoration: none;
}

.life-footer__social-link:hover,
.life-footer__social-link:focus-visible {
  opacity: 0.65;
  text-decoration: none;
}

.life-footer__social-icon {
  display: block;
  font-size: calc(0.95rem + 2px);
  line-height: 1;
  color: currentColor;
}

@media (max-width: 580px) {
  .life-footer__inner {
    gap: 1rem;
    padding-block: 1.25rem 3.125rem;
  }

  .life-footer__aside {
    gap: 1.5rem;
  }

  .life-footer__address-break {
    display: inline;
  }

  .life-footer__brand-image--desktop,
  :root[data-life-theme="light"] .life-footer__brand-image--desktop {
    display: none;
  }

  .life-footer__brand-image--mobile {
    display: block;
    width: 5.8125rem;
    filter: var(--theme-logo-filter);
  }

  .life-footer__address {
    font-size: 0.875rem;
    letter-spacing: 0;
    line-height: 1.2;
  }

  .life-footer__nav {
    padding-right: 20px;
  }

  .life-footer__menu a {
    font-size: 0.875rem;
    letter-spacing: 0;
    line-height: 1.2;
  }

  .life-footer__social-icon {
    font-size: calc(1rem + 2px);
  }
}

/* ── Layout: 12-col grid wraps the main article. */

.life-main {
  flex: 1;
  position: relative;
  z-index: 1;
  padding-inline: var(--page-gutter);
  /* Top padding reserves space for the fixed header (height set by header-pin.js). */
  padding-top: calc(2rem + var(--life-header-height, 70px));
  padding-bottom: 4rem;
}

.life-grid,
.life-main > article > .entry-content,
.life-main > article {
  display: grid;
  grid-template-columns: repeat(var(--grid-columns), minmax(0, 1fr));
  column-gap: var(--grid-gap);
  row-gap: 1rem;
  width: 100%;
  min-width: 0;
}

.life-main > article {
  grid-column: 1 / -1;
}

.life-main > article > * {
  grid-column: 1 / -1;
  min-width: 0;
}

/*
 * Typography. Heading hierarchy:
 *   h1 — single page heading (page hero, narrow intro). Centered by default.
 *   h2 — major section heading. Fluid size via --type-h2-size; shrunk on mobile (≤768px).
 *   h3 — sub-section heading.
 * Sizes/line-heights live in tokens.css. Pick the right level in content;
 * sizes are tied to the element, not the surrounding section.
 * h2/h3 inherit text-align from their parent so centered contexts (page
 * hero, narrow section) just work without per-section overrides.
 */
h1,
.has-h-1-font-size,
.life-main h1.wp-block-heading {
  font-family: var(--font-display);
  font-weight: 400;
  font-size: var(--type-h1-size);
  line-height: var(--type-h1-line);
  letter-spacing: 0;
  margin: 0;
  text-align: center;
}

h2,
.has-h-2-font-size,
.life-main h2.wp-block-heading {
  font-family: var(--font-display);
  font-weight: 400;
  font-size: var(--type-h2-size);
  line-height: var(--type-h2-line);
  letter-spacing: 0;
  margin: 0;
}

h3,
.has-h-3-font-size,
.life-main h3.wp-block-heading {
  font-family: var(--font-display);
  font-weight: 400;
  font-size: var(--type-h3-size);
  line-height: var(--type-h3-line);
  letter-spacing: 0;
  margin: 0;
}

h4,
h5,
h6 {
  font-family: var(--font-display);
  font-weight: 400;
  letter-spacing: 0;
  margin: 0;
}

.life-main :is(h1, h2, h3, h4, h5, h6, .wp-block-heading):not(.has-text-color) {
  color: var(--theme-text);
}

p {
  margin: 0;
  text-wrap: pretty;
}

/*
 * "Subtitle / eyebrow" paragraph block style. Same idea as Figma's "OUR MISSION"
 * label that sits above the H1 in mission-style headers.
 */
.is-style-life-subtitle {
  font-family: var(--font-mono);
  font-weight: 400;
  font-size: var(--type-sub-size);
  line-height: calc(var(--type-sub-line) / var(--type-sub-size));
  letter-spacing: 0.04em;
  text-transform: uppercase;
  text-align: center;
}

/* ── Block styles: section layouts, anchored to the 12-col main grid. */

.life-main .is-style-life-section-full,
.life-main .is-style-life-section-narrow,
.life-main .is-style-life-page-hero,
.life-main .is-style-life-section-two,
.life-main .is-style-life-section-two-divided,
.life-main .is-style-life-section-three {
  box-sizing: border-box;
  min-width: 0;
}

.life-main .is-style-life-section-full {
  grid-column: 1 / -1;
}

.life-main .is-style-life-section-narrow {
  grid-column: 4 / span 6;
  display: flex;
  flex-direction: column;
  gap: 0;
  text-align: center;
}

.life-main .is-style-life-page-hero {
  grid-column: 1 / -1;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0;
  width: 100%;
  max-width: 720px;
  margin-inline: auto;
  padding-top: 3.5rem;
  padding-bottom: 2.5rem;
  text-align: center;
}

.life-main .is-style-life-page-hero > .wp-block-heading,
.life-main .is-style-life-page-hero > p {
  width: 100%;
}

.life-main .is-style-life-section-two,
.life-main .is-style-life-section-two-divided {
  grid-column: 1 / -1;
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: var(--grid-gap);
  align-items: start;
}

.life-main .is-style-life-section-two-divided {
  gap: calc(var(--grid-gap) * 3);
}

.life-main .is-style-life-section-three {
  grid-column: 1 / -1;
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: var(--grid-gap);
  align-items: start;
}

/*
 * Multi-column section reset: WP's `is-layout-flow` injects a `margin-top`
 * block-gap on consecutive children. Inside a CSS grid that just shifts the
 * 2nd/3rd column down. Gap is already handled by the grid `gap` property.
 */
.life-main .is-style-life-section-two > *,
.life-main .is-style-life-section-two-divided > *,
.life-main .is-style-life-section-three > * {
  margin-top: 0;
}

@media (min-width: 769px) {
  .life-main .is-style-life-section-two-divided {
    position: relative;
  }

  .life-main .is-style-life-section-two-divided::before {
    content: '';
    position: absolute;
    left: 50%;
    top: 0;
    bottom: 0;
    width: 1px;
    margin-left: -0.5px;
    background-color: var(--theme-text);
    pointer-events: none;
    z-index: 0;
  }

  .life-main .is-style-life-section-two-divided > * {
    position: relative;
    z-index: 1;
  }
}

@media (max-width: 768px) {
  .life-main .is-style-life-section-narrow {
    grid-column: 1 / -1;
  }

  .life-main .is-style-life-page-hero {
    align-items: flex-start;
    gap: 0;
    max-width: none;
    padding-top: 8px;
    padding-bottom: 2.5rem;
    text-align: left;
  }

  .life-main .is-style-life-page-hero > .is-style-life-subtitle {
    font-size: 12px;
    line-height: 1.2;
    letter-spacing: 0;
    text-align: left;
    margin-bottom: 6px;
  }

  .life-main .life-home-tagline {
    font-size: 14px;
  }

  .life-main .is-style-life-page-hero > .wp-block-heading {
    font-size: 30px;
    line-height: 1.2;
    text-align: left;
  }

  /* Narrow intro (subtitle + H1 under hero): same mobile scale as page hero. */
  .life-main .is-style-life-section-narrow > h1.wp-block-heading {
    font-size: 29px;
    margin-top: 12px;
    line-height: 1.2;
  }

  /* Section h2: shrunk below the desktop size on small screens (below page h1).
   * Match base selector `.life-main h2.wp-block-heading` specificity so this wins. */
  .life-main h2.wp-block-heading,
  .editor-styles-wrapper h2.wp-block-heading {
    font-size: 26px;
  }

  .life-main .is-style-life-page-hero > .wp-block-heading + p {
    margin-top: 10px;
    font-size: 14px;
    line-height: 1.4;
    text-align: left;
  }

  .life-main .is-style-life-section-two,
  .life-main .is-style-life-section-two-divided,
  .life-main .is-style-life-section-three {
    grid-template-columns: 1fr;
  }

}

/* Technology page — "ongoing technology development" 2×2 grid.
   DOM order is tuned for the mobile stack: detectors.png, NICE copy,
   nice-render.png, Piezo-electric copy. On desktop we re-place the four
   children so the visual pairing is NICE + nice-render (top row), and
   detectors + Piezo-electric (bottom row). */
@media (min-width: 769px) {
  .life-main .life-technology-dev-grid > *:nth-child(1) {
    grid-column: 1;
    grid-row: 2;
  }
  .life-main .life-technology-dev-grid > *:nth-child(2) {
    grid-column: 1;
    grid-row: 1;
  }
  .life-main .life-technology-dev-grid > *:nth-child(3) {
    grid-column: 2;
    grid-row: 1;
  }
  .life-main .life-technology-dev-grid > *:nth-child(4) {
    grid-column: 2;
    grid-row: 2;
  }
}

/* Home hero (one-off): full-width section host with a 50% / min 600px inner
   column so the H1 sits inside a wider band than `is-style-life-section-narrow`
   would allow. Scoped to `.life-home-hero-inner`, only used on the home page. */
.life-main .life-home-hero-inner {
  box-sizing: border-box;
  width: 50%;
  min-width: 600px;
  max-width: 100%;
  margin-inline: auto;
  display: flex;
  flex-direction: column;
  text-align: center;
}

.life-main .life-home-hero-inner > .life-home-tagline {
  margin-top: 20px;
}

@media (max-width: 1050px) {
  .life-main .life-home-hero-inner > h1.wp-block-heading {
    font-size: 42px;
  }
}

@media (max-width: 768px) {
  .life-main .life-home-hero-inner {
    width: 100%;
    min-width: 0;
  }

  .life-main .life-home-hero-inner > h1.wp-block-heading {
    font-size: 29px;
    margin-top: 12px;
    line-height: 1.2;
  }

  /* Home badge (`life-home-badge` on the theme-image block in home-page.wp.html). */
  .life-main .wp-block-life-theme-image.life-home-badge .life-theme-image__img {
    width: calc(260px * 0.75) !important;
  }
}

/* Home technology columns (`life-home-technology` on home-page.wp.html). */
.life-main .life-home-technology > .wp-block-group > h2.wp-block-heading {
  margin-top: 12px;
}

/* Home mission line + Collector/Combiner: fluid desktop scale up to 3.25rem; mobile stays 26px (global h2 rule). */
@media (min-width: 769px) {
  .life-main .life-home-mission-split .wp-block-heading,
  .life-main .life-home-technology > .wp-block-group > h2.wp-block-heading {
    font-size: clamp(2rem, 1.5rem + 2.75vw, 3.6rem);
    line-height: var(--type-h2-line);
  }
}

/* ── Media frame: rounded white border (Figma media tile).
   Opt-in via the `is-style-life-framed` block style on image/video blocks, or
   via `is-style-life-hero-media` for the full-width cover variant. Media
   renders bare by default. */

.wp-block-image.is-style-life-framed,
.wp-block-image.is-style-life-framed > figure,
.wp-block-image.is-style-life-framed img,
.wp-block-video.is-style-life-framed,
.wp-block-video.is-style-life-framed > figure,
.wp-block-video.is-style-life-framed video {
  border-radius: var(--framed-radius);
}

.wp-block-image.is-style-life-framed img,
.wp-block-video.is-style-life-framed video {
  border: var(--framed-border);
  box-sizing: border-box;
  display: block;
  width: 100%;
  height: auto;
}

/* Frontend layout reset for media. */
.life-main .wp-block-image img,
.life-main .wp-block-video video {
  box-sizing: border-box;
  display: block;
  max-width: 100%;
  height: auto;
}

.life-main .wp-block-image.is-style-life-hero-media {
  width: 100%;
  aspect-ratio: 16 / 9;
}

.life-main .wp-block-image.is-style-life-hero-media img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  border: var(--framed-border);
  border-radius: var(--framed-radius);
}

@media (max-width: 768px) {
  .life-main .wp-block-image.is-style-life-hero-media {
    aspect-ratio: 3 / 4;
  }
}

.life-main .wp-block-gallery.is-style-life-image-strip {
  display: grid;
  grid-template-columns: repeat(10, minmax(0, 1fr));
  gap: 0.625rem;
  align-items: start;
  padding-top: 3.125rem;
}

.life-main .wp-block-gallery.is-style-life-image-strip.has-nested-images figure.wp-block-image {
  width: 100% !important;
  margin: 0;
  aspect-ratio: 110.8 / 128;
}

.life-main .wp-block-gallery.is-style-life-image-strip.has-nested-images figure.wp-block-image img {
  display: block;
  width: 100%;
  height: 100% !important;
  object-fit: contain;
}

@media (max-width: 768px) {
  .life-main .wp-block-gallery.is-style-life-image-strip {
    grid-template-columns: repeat(5, minmax(0, 1fr));
  }
}

/* Centered media: WP renders aligncenter as a figure that needs auto margins
   plus an inline-table reset so the figure shrinks to its image. */
.life-main .wp-block-image.aligncenter {
  display: block;
  margin-inline: auto;
  text-align: center;
}

.life-main .wp-block-image.aligncenter img {
  margin-inline: auto;
}

/*
 * Theme-aware image (life/theme-image block).
 *
 * Renders both the default and light-mode <img>; CSS hides whichever
 * doesn't match :root[data-life-theme]. The inline theme-detect script in
 * header.php runs before paint, so no flash on first load. The same swap
 * pattern can be reused on any element by adding the --dark / --light
 * variant classes — see .life-theme-swap below.
 */
.wp-block-life-theme-image {
  margin: 0;
}

.wp-block-life-theme-image.aligncenter {
  display: block;
  margin-inline: auto;
  text-align: center;
}

.life-theme-image__img {
  display: block;
  max-width: 100%;
  height: auto;
}

.wp-block-life-theme-image.aligncenter .life-theme-image__img {
  margin-inline: auto;
}

/*
 * Theme swap rules — declared AFTER the base .life-theme-image__img block
 * so the same-specificity "display: none" wins over "display: block". Adding
 * any new variant base rules below this point will silently break the swap;
 * keep generic styles above, hide/show below.
 */
.life-theme-swap--light,
.life-theme-image__img--light {
  display: none;
}

:root[data-life-theme="light"] .life-theme-swap--dark,
:root[data-life-theme="light"] .life-theme-image__img--dark {
  display: none;
}

:root[data-life-theme="light"] .life-theme-swap--light,
:root[data-life-theme="light"] .life-theme-image__img--light {
  display: block;
}

.life-theme-image__placeholder {
  display: block;
  margin: 0 auto;
  padding: 2rem 3rem;
  background: transparent;
  border: 1px dashed currentColor;
  color: inherit;
  font-family: var(--font-mono);
  font-size: 0.8rem;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  cursor: pointer;
}

.life-theme-image__hint {
  display: block;
  margin-top: 0.5rem;
  font-family: var(--font-mono);
  font-size: 0.7rem;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--theme-muted);
  text-align: center;
}

.life-main .wp-block-video {
  margin: 0;
}

.life-main .wp-block-video > figure {
  margin: 0;
  border-radius: var(--framed-radius);
  overflow: hidden;
}

/* Muted segment preview + play-with-sound (see video-preview-play.js). */
.life-main .wp-block-video.life-video-preview-play {
  position: relative;
}

.life-main .wp-block-video.life-video-preview-play video {
  vertical-align: middle;
}

.life-main .life-video-preview-play__btn {
  position: absolute;
  top: 50%;
  left: 50%;
  z-index: 2;
  display: flex;
  align-items: center;
  justify-content: center;
  width: 5.5rem;
  height: 5.5rem;
  margin: 0;
  padding: 0;
  border: 1px solid var(--color-white);
  border-radius: 50%;
  background: rgb(15 1 1 / 0.45);
  box-shadow: 0 4px 24px rgba(15, 1, 1, 0.35);
  transform: translate(-50%, -50%);
  cursor: pointer;
  transition: transform 0.15s ease, box-shadow 0.15s ease, background 0.15s ease;
}

.life-main .life-video-preview-play__btn:hover {
  transform: translate(-50%, -50%) scale(1.04);
  background: rgb(15 1 1 / 0.58);
  box-shadow: 0 6px 28px rgba(15, 1, 1, 0.4);
}

.life-main .life-video-preview-play__btn:focus-visible {
  outline: 2px solid var(--color-white);
  outline-offset: 3px;
}

.life-main .life-video-preview-play__icon {
  display: flex;
  margin-left: 0.2em;
  color: var(--color-white);
}

@media (max-width: 768px) {
  .life-main .wp-block-video.life-video-preview-play {
    width: 100%;
    aspect-ratio: 1 / 1;
  }

  .life-main .wp-block-video.life-video-preview-play video {
    width: 100%;
    height: 100%;
    object-fit: cover;
  }
}

/* In fullscreen (Fullscreen API path, e.g. Android Chrome), drop the square
 * crop and show the full frame like a normal video player. iOS Safari's
 * webkitEnterFullscreen() hands off to a native OS player that ignores
 * page CSS, so this is only needed for the standards-fullscreen path. */
.life-main .wp-block-video.life-video-preview-play video:fullscreen {
  aspect-ratio: auto;
  object-fit: contain;
}

.life-main .wp-block-video.life-video-preview-play video:-webkit-full-screen {
  aspect-ratio: auto;
  object-fit: contain;
}

/* ── Cover blocks: keep original Astro behavior of centered narrow hero. */

.wp-block-cover {
  max-width: 680px;
  width: 100%;
  margin-inline: auto;
  box-sizing: border-box;
  text-align: center;
}

.wp-block-cover .wp-block-cover__inner-container,
.wp-block-cover .wp-block-group {
  text-align: center;
}

.wp-block-cover :is(h1, h2, h3, h4, h5, h6, p, .wp-block-heading) {
  text-align: center;
}

/* ── Buttons. */

.wp-block-button__link {
  font-family: var(--font-mono);
  font-size: var(--type-body-sm-size);
  line-height: calc(var(--type-body-sm-line) / var(--type-body-sm-size));
  text-transform: uppercase;
  letter-spacing: 0.08em;
  border: 1px solid var(--theme-text);
  border-radius: 16px;
  background: var(--theme-button-bg);
  color: var(--theme-button-text);
  padding: 1.25rem 1.5rem;
  text-align: center;
  text-decoration: none;
}

.wp-block-button__link:hover {
  background: transparent;
  color: var(--theme-text);
}

/* Full-width CTA: a buttons row with `is-content-justification-stretch` or a
   single button with width 100 stretches the link to fill the row. */
.wp-block-buttons.is-content-justification-stretch,
.wp-block-buttons {
  justify-content: center;
}

.wp-block-buttons .wp-block-button.has-custom-width.wp-block-button__width-100 {
  width: 100%;
}

.wp-block-buttons .wp-block-button.has-custom-width.wp-block-button__width-100 .wp-block-button__link {
  width: 100%;
}

/* Constrained CTA row: caps the buttons block at 550px and keeps it centered.
   Combine with `width:100` on the inner button to fill the row exactly. */
.wp-block-buttons.life-cta-narrow {
  width: 100%;
  max-width: 550px;
  margin-inline: auto;
}

/* Pill actions: exoplanet carousel CTA + mailing-list submit (shared metrics). */
a.life-exoplanet-showcase__button,
.life-mailing div.wpforms-container-full .wpforms-form button[type="submit"].wpforms-submit {
  box-sizing: border-box;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 100%;
  max-width: none;
  min-height: 0;
  height: auto;
  margin: 0;
  padding: var(--life-action-btn-padding-block) var(--life-action-btn-padding-inline);
  font-family: var(--font-mono);
  font-size: var(--life-action-btn-font-size);
  line-height: var(--life-action-btn-line-height);
  letter-spacing: var(--life-action-btn-letter-spacing);
  text-transform: uppercase;
  text-align: center;
  text-decoration: none;
  color: var(--theme-button-text);
  background: var(--theme-button-bg);
  border: 1px solid var(--theme-button-bg);
  border-radius: var(--life-action-btn-radius);
  cursor: pointer;
  appearance: none;
}

a.life-exoplanet-showcase__button:hover,
.life-mailing div.wpforms-container-full .wpforms-form button[type="submit"].wpforms-submit:hover,
.wp-block-buttons.life-cta-narrow .wp-block-button__link:hover {
  background: var(--theme-button-hover-bg);
  border-color: var(--theme-button-hover-bg);
  color: var(--theme-button-text);
  filter: none;
}

.wp-block-buttons.life-cta-narrow .wp-block-button__link {
  box-sizing: border-box;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: var(--life-action-btn-padding-block) var(--life-action-btn-padding-inline);
  font-family: var(--font-mono);
  font-size: var(--life-action-btn-font-size);
  line-height: var(--life-action-btn-line-height);
  letter-spacing: var(--life-action-btn-letter-spacing);
  text-transform: uppercase;
  text-align: center;
  color: var(--theme-button-text);
  background: var(--theme-button-bg);
  border: 1px solid var(--theme-button-bg);
  border-radius: var(--life-action-btn-radius);
}

/* ── Native WordPress password-protected page gate. */

.life-password-gate {
  grid-column: 1 / -1;
  display: flex;
  flex-direction: column;
  align-items: center;
  min-height: clamp(28rem, 62vh, 44rem);
  padding-block: clamp(4rem, 7vw, 6.25rem) 2rem;
  color: var(--theme-text);
  text-align: center;
}

.life-password-gate__intro {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 20px;
  width: min(100%, 530px);
}

.life-password-gate__eyebrow,
.life-password-gate__title,
.life-password-gate__description,
.life-password-gate__form {
  margin: 0;
}

.life-password-gate__eyebrow,
.life-password-gate__label,
.life-password-gate__input,
.life-password-gate__submit {
  font-family: var(--font-mono);
  font-size: var(--type-sub-size);
  font-weight: 400;
  line-height: calc(var(--type-sub-line) / var(--type-sub-size));
  text-transform: uppercase;
}

.life-password-gate__title {
  max-width: 530px;
  font-family: var(--font-display);
  font-size: var(--type-h1-size);
  font-weight: 400;
  line-height: var(--type-h1-line);
}

.life-password-gate__description {
  width: min(100%, 530px);
  font-size: var(--type-body-size);
  line-height: calc(var(--type-body-line) / var(--type-body-size));
}

.life-password-gate__form {
  display: flex;
  flex-direction: column;
  width: min(100%, 525px);
  padding-top: 50px;
}

.life-password-gate__label {
  text-align: left;
}

.life-password-gate__input {
  box-sizing: border-box;
  width: 100%;
  height: 45px;
  margin-top: -10px;
  padding: 0 20px;
  color: var(--theme-text);
  background: var(--theme-bg);
  border: 1px solid var(--theme-text);
  border-radius: 54px;
}

.life-password-gate__input::placeholder {
  color: currentColor;
  opacity: 0.5;
}

.life-password-gate__submit {
  box-sizing: border-box;
  width: 100%;
  min-height: 45px;
  padding: 0 20px;
  color: var(--theme-button-text);
  background: var(--theme-button-bg);
  border: 1px solid var(--theme-button-bg);
  border-radius: 10px;
  cursor: pointer;
}

.life-password-gate__submit:hover,
.life-password-gate__submit:focus-visible {
  color: var(--theme-text);
  background: transparent;
}

.life-member-resources {
  grid-column: 2 / span 10;
  padding-block: 1rem clamp(2rem, 5vw, 4rem);
  text-align: left;
}

.life-member-resources > .wp-block-heading,
.life-member-resources > p {
  max-width: 760px;
}

.life-member-resources > p {
  margin-top: 0.75rem;
  color: var(--theme-muted);
}

.life-member-resource-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: var(--grid-gap);
  margin-top: clamp(1.5rem, 4vw, 3rem);
}

/* Reset WP `is-layout-flow` block-gap on grid children — without this, the
   2nd column of each row gets a margin-top and sits below its row partner. */
.life-main .life-member-resource-grid > * {
  margin-top: 0;
}

.life-member-resource-card {
  display: flex;
  flex-direction: column;
  gap: 1rem;
  min-height: 100%;
  padding: clamp(1rem, 2vw, 1.5rem);
  border: 1px solid var(--theme-border);
  border-radius: var(--framed-radius);
}

.life-member-resource-card > * {
  margin: 0;
}

.life-member-resource-card > .wp-block-heading {
  font-family: var(--font-mono);
  font-size: var(--type-body-sm-size);
  line-height: calc(var(--type-body-sm-line) / var(--type-body-sm-size));
  letter-spacing: 0.06em;
  text-transform: uppercase;
}

.life-member-resource-card > p {
  color: var(--theme-muted);
}

.life-member-link-list {
  display: flex;
  flex-direction: column;
  gap: 0.45rem;
  padding-left: 0 !important;
  list-style: none;
}

.life-main .life-member-link-list li + li {
  margin-top: 0;
}

.life-member-link-list a {
  display: inline-flex;
  align-items: center;
  width: fit-content;
}

.life-member-link-list a::after {
  content: "->";
  margin-left: 0.35em;
  font-size: 0.85em;
  line-height: 1;
}

@media (max-width: 768px) {
  .life-password-gate {
    align-items: flex-start;
    min-height: auto;
    padding-block: 3.75rem 1rem;
    text-align: left;
  }

  .life-password-gate__intro {
    align-items: flex-start;
    gap: 16px;
  }

  .life-password-gate__eyebrow,
  .life-password-gate__label,
  .life-password-gate__input,
  .life-password-gate__submit {
    font-size: 12px;
    line-height: 1.2;
  }

  .life-password-gate__title {
    font-size: 30px;
    line-height: 1.2;
  }

  .life-password-gate__description {
    font-size: 14px;
    line-height: 1.4;
  }

  .life-password-gate__form {
    gap: 20px;
    padding-top: 40px;
  }

  .life-password-gate__input {
    margin-top: -4px;
  }

  .life-member-resources {
    grid-column: 1 / -1;
  }

  .life-member-resource-grid {
    grid-template-columns: 1fr;
  }
}

/* ── Horizon canvas (life/horizon block): fixed background behind everything. */

.life-horizon {
  position: fixed;
  inset: 0;
  /*
   * Lock the container to the LARGE viewport on mobile (URL-bar collapsed
   * state) so it never resizes mid-scroll while the browser chrome animates
   * in/out. Without this the canvas would briefly shrink to the dynamic
   * viewport and leave a black void at the bottom until the next frame
   * caught up. `100vh` is the pre-`lvh` fallback for older browsers.
   */
  height: 100vh;
  height: 100lvh;
  z-index: 0;
  pointer-events: none;
}

.life-horizon__canvas {
  display: block;
  width: 100%;
  height: 100%;
}

/*
 * Stacking: the horizon is `position: fixed; z-index: 0` inside main. Within
 * main's stacking context (z-index 1), the horizon paints at level 6 (positioned
 * w/ z-index 0). Unpositioned siblings paint at level 3 — so they would hide
 * behind the horizon. Lifting them to the same positioned level (z-index ≥ 1)
 * lets DOM order do the rest: horizon is first in post content, so it sits
 * underneath everything below it. The header/footer use z-index 2 so the
 * fixed canvas inside main never paints over them.
 */
.life-main > article > *:not(.life-horizon) {
  position: relative;
  z-index: 1;
}

/* ── Hero wordmark (life/hero-video block).
 *
 * Single animated WebP <img> with native alpha. The container locks the
 * aspect ratio of the source export so the page never reflows while the
 * image streams in.
 *
 * Aspect ratio is taken from the dark wordmark (1800×645). The light variant
 * is 1802×649, basically identical; object-fit:contain absorbs the rounding.
 */

.life-hero-video {
  position: relative;
  width: 100%;
  aspect-ratio: 1800 / 645;
  z-index: 1;
}

.life-hero-video__media {
  position: absolute;
  inset: 0;
  display: block;
  width: 100%;
  height: 100%;
  object-fit: contain;
}

/* ── Divider with eyebrow ("ABOUT OUR MISSION" rule + label).
   Use core/group with class .is-style-life-divider on a paragraph block. */

.is-style-life-divider {
  font-family: var(--font-mono);
  font-size: var(--type-sub-size);
  line-height: calc(var(--type-sub-line) / var(--type-sub-size));
  letter-spacing: 0.04em;
  text-transform: uppercase;
  text-align: left;
  margin: 0;
  padding-bottom: 0.5rem;
  border-bottom: 1px solid currentColor;
}

.life-main .is-style-life-section-full > .is-style-life-divider,
.life-main .is-style-life-section-inset > .is-style-life-divider {
  margin-bottom: 30px;
}


/* ── Mission split: 2-col group where left is text and right is a framed image. */

.is-style-life-mission-split {
  grid-column: 1 / -1;
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: clamp(2rem, 4vw, 4rem);
  align-items: center;
}

.is-style-life-mission-split > :first-child {
  text-align: left;
}

.life-main .is-style-life-mission-split .wp-block-heading {
  margin: 0 0 1.25rem;
}

@media (max-width: 768px) {
  .is-style-life-mission-split {
    grid-template-columns: 1fr;
  }
}

/* ── Inset modifier: extra horizontal gutter for nested sub-sections (token: `--life-section-inset-inline`). */

.life-main .is-style-life-section-inset,
.life-main .wp-block-group.is-style-life-mission-split {
  padding-inline: var(--life-section-inset-inline);
}

/* Mission-split nested inside an inset section already inherits the section's
   inset gutter — strip its own padding-inline so the inner content lines up
   with the eyebrow above it (avoids the double-inset bug). */
.life-main .is-style-life-section-inset > .wp-block-group.is-style-life-mission-split {
  padding-inline: 0;
}

/* Inset section > two-column grid (same nesting pattern as technology page). */
.life-main .is-style-life-section-inset > .is-style-life-section-two,
.life-main .is-style-life-section-inset > .is-style-life-section-two-divided {
  align-items: center;
}

/* ── Exoplanet showcase (home science / spectra carousel). */

.life-main .life-exoplanet-showcase {
  width: 100%;
  max-width: 85rem;
  margin-inline: auto;
}

.life-exoplanet-showcase__eyebrow {
  font-family: var(--font-mono);
  font-size: var(--type-sub-size);
  line-height: calc(var(--type-sub-line) / var(--type-sub-size));
  letter-spacing: 0.04em;
  text-transform: uppercase;
  text-align: left;
  color: var(--theme-text);
  border-bottom: 1px solid currentColor;
  padding-bottom: 0.5rem;
  margin: 0 0 1.25rem;
}

.life-exoplanet-showcase__layout {
  display: flex;
  flex-wrap: wrap;
  align-items: flex-start;
  justify-content: space-between;
  gap: 2rem 4.375rem;
  padding-top: 1.875rem;
}

.life-exoplanet-showcase__copy {
  flex: 1 1 18rem;
  max-width: 33.125rem;
  display: flex;
  flex-direction: column;
  gap: 3.125rem;
}

.life-exoplanet-showcase__intro {
  display: flex;
  flex-direction: column;
  gap: 1.875rem;
}

.life-main .life-exoplanet-showcase__title {
  margin: 0;
}

.life-exoplanet-showcase__lede {
  margin: 0;
  font-size: var(--type-body-size);
  line-height: calc(var(--type-body-line) / var(--type-body-size));
  color: var(--theme-text);
}

.life-exoplanet-showcase__nav-strip {
  display: flex;
  align-items: center;
  justify-content: space-between;
  width: 8.6875rem;
  max-width: 100%;
  color: var(--theme-text);
}

.life-exoplanet-showcase__nav-hit {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 0;
  margin: 0;
  border: 0;
  background: transparent;
  color: inherit;
  cursor: pointer;
  line-height: 0;
}

.life-main .life-exoplanet-showcase__nav-hit .life-pagination__icon svg {
  height: 27px;
  /* shared chevron has stroke-width:2 which falls outside its 0 0 10 21
     viewBox; allow the bleed so the right-pointing tip isn't clipped here. */
  overflow: visible;
}

.life-exoplanet-showcase__graphs {
  position: relative;
  flex: 0 0 auto;
  width: 18.9375rem;
  max-width: min(100%, 312px);
  min-height: 10.8125rem;
  color: var(--theme-text);
}

.life-exoplanet-showcase__graph-panel {
  position: absolute;
  inset: 0;
  opacity: 0;
  transition: opacity 0.35s ease;
  pointer-events: none;
}

.life-exoplanet-showcase__graph-panel.is-active {
  opacity: 1;
}

.life-exoplanet-showcase__graph-reveal {
  display: block;
  width: 100%;
  clip-path: inset(0 100% 0 0);
  will-change: clip-path;
}

.life-exoplanet-showcase__graph-img {
  display: block;
  width: 100%;
  height: auto;
}

.life-exoplanet-showcase__planets {
  display: flex;
  flex-wrap: wrap;
  gap: 1.5625rem;
  justify-content: center;
  align-items: flex-end;
  padding-top: 2.5rem;
  width: 100%;
}

.life-exoplanet-showcase__planet {
  flex: 1 1 12rem;
  min-width: 0;
  max-width: 27.5rem;
  margin: 0;
  padding: 0;
  border: 0;
  background: transparent;
  cursor: pointer;
  border-radius: 50%;
  opacity: 0.3;
  transition: opacity 0.45s ease;
}

.life-exoplanet-showcase__planet.is-active {
  opacity: 1;
}

.life-exoplanet-showcase__planet:focus-visible {
  outline: 2px solid var(--theme-text);
  outline-offset: 4px;
}

.life-exoplanet-showcase__planet-disc {
  display: block;
  aspect-ratio: 1;
  border-radius: 50%;
  overflow: hidden;
}

.life-exoplanet-showcase__planet img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}

@media (max-width: 782px) {
  /* Mobile: switch __layout to a 2-col grid and promote __copy's children so
     the nav-strip can sit beside the graph instead of stacking above it.
     Layout becomes: intro (row 1, full width) → CTA (row 2, full width) →
     nav-strip + graphs (row 3, side by side). */
  .life-exoplanet-showcase__layout {
    display: grid;
    grid-template-columns: auto 1fr;
    align-items: start;
    column-gap: 1.5rem;
    row-gap: 1.875rem;
  }

  .life-exoplanet-showcase__copy {
    display: contents;
  }

  .life-exoplanet-showcase__intro,
  .life-exoplanet-showcase__button {
    grid-column: 1 / -1;
  }

  .life-exoplanet-showcase__nav-strip {
    grid-column: 1;
    align-self: start;
    width: 4.5rem;
  }

  .life-exoplanet-showcase__graphs {
    grid-column: 2;
    width: auto;
    margin-inline: 0;
  }

  .life-exoplanet-showcase__planets {
    flex-wrap: nowrap;
    gap: clamp(0.75rem, 3vw, 1rem);
  }

  .life-exoplanet-showcase__planet {
    flex: 1 1 0;
    max-width: none;
  }
}

/* ── Mailing list signup (life/mailing-signup pattern).
   Wraps wpForms id 555 (single email field). The `.life-mailing` class sits
   on a `is-style-life-section-narrow` section so the centered 6-col band is
   preserved; the wpForms-specific overrides mirror the technique used for
   `[wpforms id="425"]` on /contact. */

.life-main h2.wp-block-heading.life-mailing__heading {
  font-family: var(--font-display);
  font-weight: 400;
  font-size: clamp(1.35rem, 0.95rem + 1.35vw, 1.85rem);
  line-height: 1.1;
  margin: 0 0 10px;
}

.life-mailing__lede {
  margin: 0;
  font-family: var(--font-sans);
  font-size: var(--type-body-size);
  line-height: calc(var(--type-body-line) / var(--type-body-size));
}

.life-mailing div.wpforms-container-full,
.life-mailing .wpforms-container {
  width: 500px;
  max-width: 100%;
  margin: 0.5rem 0 0;
  align-self: center;
}

.life-mailing .wpforms-form {
  margin: 0;
  text-align: left;
}

.life-mailing .wpforms-field-container {
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
}

.life-mailing .wpforms-field {
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
  padding: 0;
  margin: 0;
}

.life-mailing div.wpforms-container-full .wpforms-form .wpforms-field-label {
  margin: 8px 0 4px;
  font-family: var(--font-mono);
  font-size: calc(0.75rem + 2px);
  font-weight: 400;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--theme-text);
}

.life-mailing .wpforms-required-label {
  display: none;
}

.life-mailing div.wpforms-container-full .wpforms-form input[type="email"],
.life-mailing div.wpforms-container-full .wpforms-form input[type="text"] {
  box-sizing: border-box;
  width: 100%;
  max-width: none;
  margin: 0;
  padding: 0.65rem 1.25rem;
  background: transparent;
  border: 1px solid var(--theme-text);
  border-radius: 9999px;
  color: var(--theme-text);
  font-family: var(--font-mono);
  font-size: var(--type-body-sm-size);
  letter-spacing: 0.08em;
  text-transform: uppercase;
  text-align: left;
}

.life-mailing div.wpforms-container-full .wpforms-form input::placeholder {
  font-family: var(--font-mono);
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--theme-text);
  opacity: 0.55;
}

.life-mailing div.wpforms-container-full .wpforms-form input:focus {
  outline: none;
  border-color: var(--theme-muted);
}

.life-mailing div.wpforms-container-full .wpforms-form .wpforms-submit-container {
  display: flex;
  margin: 0.5rem 0 0;
  padding: 0;
}

.life-mailing div.wpforms-container-full .wpforms-confirmation-container-full {
  margin: 0;
  padding: 0;
  background: transparent;
  border: 0;
  color: var(--theme-text);
  font-weight: 700;
}

.life-mailing div.wpforms-container-full .wpforms-confirmation-container-full p {
  margin: 0;
  color: inherit;
  font-weight: inherit;
}

/* ── Lists, blockquotes, separators.
   Scoped to article content so it doesn't bleed into nav menus. */

.life-main ul,
.life-main ol {
  padding-left: 1.25rem;
}

.life-main li + li {
  margin-top: 0.35rem;
}

.life-main .life-spec-accordion {
  margin: 0;
  border-top: 1px solid var(--theme-text);
}

.life-main .life-spec-accordion:last-child {
  border-bottom: 1px solid var(--theme-text);
}

.life-main .life-spec-accordion__summary {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  padding: 10px 0;
  list-style: none;
  cursor: pointer;
}

.life-main .life-spec-accordion__summary::-webkit-details-marker {
  display: none;
}

.life-main .life-spec-accordion__label,
.life-main .life-spec-accordion__value {
  font-family: var(--font-mono);
  font-size: var(--type-sub-size);
  line-height: calc(var(--type-sub-line) / var(--type-sub-size));
  text-transform: uppercase;
}

.life-main .life-spec-accordion__value {
  text-align: right;
}

.life-main .life-spec-accordion__content {
  padding: 0 0 14px;
}

.life-main .life-spec-accordion__content p {
  margin: 0;
}

.life-main blockquote {
  margin: 1.5rem 0;
  padding: 0.75rem 1rem;
  border-left: 1px solid var(--theme-text);
  color: var(--theme-text);
}

hr.wp-block-separator {
  border: none;
  border-top: 1px solid var(--theme-text);
  opacity: 1;
  margin: 0;
}

/* ── Publications archive (CPT `publication`, /publications/). */

.life-main .life-publications-archive {
  --pub-text-cream: var(--theme-archive-text);
  --pub-card-bg: var(--theme-card-bg);
  --pub-card-text: var(--theme-card-text);
}

/*
 * Archive-style heroes: `is-style-life-page-hero` + `life-page-hero--archive` on CPT archive
 * templates and on synced pages (e.g. team, contact). Scoped to `article.entry` so one rule
 * covers both; same type scale as other page heroes, archive text color, desktop-only gap below.
 */
.life-main article.entry > header.is-style-life-page-hero.life-page-hero--archive {
  color: var(--theme-archive-text);
}

@media (min-width: 769px) {
  .life-main article.entry > header.is-style-life-page-hero.life-page-hero--archive {
    margin-bottom: clamp(2.5rem, 6vw, 4rem);
  }
}

.life-main article.entry > header.is-style-life-page-hero.life-page-hero--archive > .wp-block-heading {
  text-wrap: balance;
}

.life-main .publication-filters {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 16px;
  margin-bottom: clamp(3rem, 7vw, 5rem);
  scroll-margin-top: 6rem;
}

/* Mobile (Figma Filters+Search): topic + year side by side, search full width below; 20px gaps. */
@media (max-width: 768px) {
  .life-main .publication-filters {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 20px;
  }

  .life-main .publication-filter--search {
    grid-column: 1 / -1;
  }

  .life-main .publication-filter--search .publication-filter__input {
    border-radius: 10px;
  }
}

.life-main .publication-filter__label {
  display: block;
  font-family: var(--font-mono);
  font-size: 16px;
  line-height: 1.2;
  letter-spacing: 0;
  text-transform: uppercase;
  margin-bottom: 10px;
  color: var(--theme-text);
}

.life-main .publication-filter select,
.life-main .publication-filter input.publication-filter__input {
  width: 100%;
  height: 45px;
  border: 1px solid var(--theme-border);
  border-radius: 10px;
  background-color: var(--theme-bg);
  color: var(--theme-text);
  padding: 0 20px;
  font-family: var(--font-mono);
  font-size: 16px;
  line-height: 1.2;
  text-transform: uppercase;
  letter-spacing: 0;
  box-sizing: border-box;
  cursor: pointer;
  overflow: hidden;
}

.life-main .publication-filter input.publication-filter__input {
  cursor: text;
}

.life-main .publication-filter__search-wrap {
  position: relative;
}

.life-main .publication-filter__search-wrap::after {
  content: "";
  position: absolute;
  right: 18px;
  top: 50%;
  width: 18px;
  height: 18px;
  transform: translateY(-50%);
  pointer-events: none;
  opacity: 0.45;
  background: no-repeat center / contain
    url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23f4f1e9' stroke-width='2'%3E%3Ccircle cx='10' cy='10' r='6'/%3E%3Cpath d='M15 15l5 5'/%3E%3C/svg%3E");
}

.life-main .publication-filter__input {
  padding-right: 2.5rem;
}

.life-main .publication-filter__input::placeholder {
  color: var(--theme-text);
  opacity: 0.5;
}

.life-main .publication-filter select {
  appearance: none;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 12 7' fill='none' stroke='%23f4f1e9' stroke-width='1.25' stroke-linecap='square'%3E%3Cpath d='M1 1l5 5 5-5'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: right 20px center;
  background-size: 12px 7px;
  padding-right: 2.75rem;
  border-radius: 10px;
  overflow: hidden;
}

.life-main .publication-filter select:focus-visible,
.life-main .publication-filter input.publication-filter__input:focus-visible {
  outline: 2px solid var(--theme-border);
  outline-offset: 2px;
}

:root[data-life-theme="light"] .life-main .publication-filter__search-wrap::after {
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%230f0101' stroke-width='2'%3E%3Ccircle cx='10' cy='10' r='6'/%3E%3Cpath d='M15 15l5 5'/%3E%3C/svg%3E");
}

:root[data-life-theme="light"] .life-main .publication-filter select {
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 12 7' fill='none' stroke='%230f0101' stroke-width='1.25' stroke-linecap='square'%3E%3Cpath d='M1 1l5 5 5-5'/%3E%3C/svg%3E");
}

/* Archive multiselect filters (publications + events): lift form while any menu is open. */
.life-main .life-publications-archive .publication-filters.publication-filters--ms-open {
  position: relative;
  z-index: 50;
}

.life-main .event-filters.event-filters--ms-open {
  position: relative;
  z-index: 50;
}

.life-main .life-filter-ms {
  position: relative;
  width: 100%;
}

/* Lift the open multiselect above its sibling filters (notably the search
   input, whose `.publication-filter__search-wrap` is also `position: relative`
   and would otherwise paint on top of the absolutely-positioned dropdown). */
.life-main .life-filter-ms.is-open {
  z-index: 2;
}

.life-main .life-filter-ms__trigger {
  display: flex;
  align-items: center;
  justify-content: space-between;
  width: 100%;
  height: 45px;
  margin: 0;
  padding: 0 20px;
  border: 1px solid var(--theme-border);
  border-radius: 10px;
  background-color: var(--theme-bg);
  color: var(--theme-text);
  font-family: var(--font-mono);
  font-size: 16px;
  line-height: 1.2;
  letter-spacing: 0;
  text-transform: uppercase;
  box-sizing: border-box;
  text-align: left;
  cursor: pointer;
  overflow: hidden;
}

.life-main .life-filter-ms__trigger:focus-visible {
  outline: 2px solid var(--theme-border);
  outline-offset: 2px;
}

.life-main .life-filter-ms__value {
  flex: 1 1 auto;
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.life-main .life-filter-ms__chevron {
  flex-shrink: 0;
  width: 12px;
  height: 7px;
  margin-left: 10px;
  background: no-repeat center / contain
    url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 12 7' fill='none' stroke='%23f4f1e9' stroke-width='1.25' stroke-linecap='square'%3E%3Cpath d='M1 1l5 5 5-5'/%3E%3C/svg%3E");
  transition: transform 0.15s ease;
}

.life-main .life-filter-ms.is-open .life-filter-ms__chevron {
  transform: rotate(180deg);
}

.life-main .life-filter-ms.is-open .life-filter-ms__trigger {
  border-radius: 10px 10px 0 0;
}

.life-main .life-filter-ms__list {
  position: absolute;
  left: 0;
  right: 0;
  top: 100%;
  max-height: min(50vh, 20rem);
  margin: 0;
  padding: 0;
  overflow-x: hidden;
  overflow-y: auto;
  list-style: none;
  border: 1px solid var(--theme-border);
  border-top: none;
  border-radius: 0 0 10px 10px;
  background-color: var(--theme-bg);
  box-sizing: border-box;
}

.life-main .life-filter-ms__option {
  display: flex;
  align-items: center;
  gap: 10px;
  margin: 0;
  padding: 15px 20px;
  border-bottom: 1px solid var(--theme-border);
  cursor: pointer;
  font-family: var(--font-mono);
  font-size: 16px;
  line-height: 1.2;
  letter-spacing: 0;
  text-transform: uppercase;
  color: var(--theme-text);
}

.life-main .life-filter-ms__option:last-child {
  border-bottom: none;
}

.life-main .life-filter-ms__option:hover {
  background-color: rgba(244, 241, 233, 0.08);
}

.life-main .life-filter-ms__input {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
  clip-path: inset(50%);
}

.life-main .life-filter-ms__box {
  position: relative;
  flex-shrink: 0;
  width: 15px;
  height: 15px;
  border: 1px solid var(--theme-border);
  box-sizing: border-box;
}

.life-main .life-filter-ms__input:checked + .life-filter-ms__box::after {
  content: "";
  position: absolute;
  left: 4px;
  top: 1px;
  width: 4px;
  height: 8px;
  border: solid var(--theme-text);
  border-width: 0 1.5px 1.5px 0;
  transform: rotate(45deg);
}

.life-main .life-filter-ms__input:focus-visible + .life-filter-ms__box {
  outline: 2px solid var(--theme-border);
  outline-offset: 2px;
}

.life-main .life-filter-ms__text {
  flex: 1 1 auto;
  min-width: 0;
}

:root[data-life-theme="light"] .life-main .life-filter-ms__chevron {
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 12 7' fill='none' stroke='%230f0101' stroke-width='1.25' stroke-linecap='square'%3E%3Cpath d='M1 1l5 5 5-5'/%3E%3C/svg%3E");
}

:root[data-life-theme="light"] .life-main .life-filter-ms__option:hover {
  background-color: rgba(15, 1, 1, 0.06);
}

/* Archive filter dropdowns: closed trigger + open menu match section eyebrows (12px). */
@media (max-width: 768px) {
  .life-main .life-filter-ms__trigger,
  .life-main .life-filter-ms__option,
  .life-main .publication-filter select,
  .life-main .publication-filter input.publication-filter__input {
    font-size: 12px;
    line-height: 1;
    letter-spacing: 0.06em;
  }
}

.life-main .publications-results-header {
  display: flex;
  align-items: center;
  border-bottom: 1px solid var(--pub-text-cream, var(--theme-text));
  margin-bottom: 0;
}

.life-main .publications-results-label {
  font-family: var(--font-mono);
  font-size: 12px;
  line-height: 1;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  padding-bottom: 6px;
  color: var(--pub-text-cream, var(--theme-text));
}

.life-main .publications-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 20px;
  margin-bottom: 2.5rem;
}

@media (max-width: 900px) {
  .life-main .publications-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

@media (max-width: 640px) {
  .life-main .publications-grid {
    grid-template-columns: 1fr;
  }
}

.life-main .publication-card {
  background: var(--pub-card-bg, var(--theme-muted));
  color: var(--pub-card-text, var(--theme-card-text));
  border-radius: 6px;
  padding: 16px 18px;
  min-height: 180px;
  display: flex;
  flex-direction: column;
  box-sizing: border-box;
}

.life-main .publication-card a {
  color: inherit;
}

.life-main .publication-card__citation {
  font-size: 22px;
  line-height: 1.1;
  font-weight: 400;
  margin: 0 0 10px;
  font-family: var(--font-display);
  color: var(--pub-card-text, var(--theme-card-text));
}

.life-main .publication-card__year {
  font-size: 13px;
  line-height: 1;
  margin: 0 0 12px;
  font-family: var(--font-sans);
}

.life-main .publication-card__paper-title {
  font-size: 14px;
  line-height: 1.35;
  margin: 0 0 18px;
  display: -webkit-box;
  line-clamp: 3;
  -webkit-line-clamp: 3;
  -webkit-box-orient: vertical;
  overflow: hidden;
  font-family: var(--font-sans);
}

.life-main .publication-card__journal {
  font-size: 13px;
  margin-top: auto;
  margin-bottom: 16px;
  font-family: var(--font-sans);
}

.life-main .publication-card__links {
  display: flex;
  gap: 18px;
  font-size: 12px;
  line-height: 1.2;
  text-transform: uppercase;
  font-family: var(--font-mono);
  letter-spacing: 0.04em;
}

.life-main .publication-card__links a {
  text-decoration: underline;
  text-underline-offset: 2px;
}

/* Archive pagination icons (events, publications, news/media). */
.life-main .life-pagination__icon {
  display: inline-flex;
  line-height: 0;
}

.life-main .life-pagination__icon svg {
  display: block;
  height: 21px;
  width: auto;
}

.life-main .life-pagination__icon--flip {
  transform: scaleX(-1);
}

.screen-reader-text {
  border: 0;
  clip-path: inset(50%);
  height: 1px;
  margin: -1px;
  overflow: hidden;
  padding: 0;
  position: absolute;
  white-space: nowrap;
  width: 1px;
}

.life-main .publications-pagination {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: center;
  gap: 0.75rem 1.25rem;
  font-family: var(--font-mono);
  font-size: 0.8rem;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  --text-color: var(--pub-text-cream, var(--theme-text));
  color: var(--text-color);
}

.life-main .publications-pagination__link {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  color: var(--text-color);
  text-decoration: none;
}

.life-main .publications-pagination__link:hover {
  --text-color: var(--theme-muted);
  color: var(--theme-muted);
}

.life-main .publications-pagination__link--disabled {
  opacity: 0.35;
  pointer-events: none;
}

.life-main .publications-pagination__status {
  padding: 0 0.5rem;
  font-size: 0.8rem;
}

.life-main .publications-empty {
  grid-column: 1 / -1;
  text-align: left;
  min-height: 0;
}

.life-main .publications-empty__title {
  font-family: var(--font-display);
  font-size: 1.1rem;
  margin: 0 0 0.5rem;
}

.life-main .publications-empty__hint {
  font-size: 14px;
  line-height: 1.4;
  margin: 0;
  opacity: 0.85;
}

/* ── News + media archive (CPTs `news` + `media_item`, /news/). */

.life-main .life-news-media-archive {
  --news-media-text: var(--theme-text);
  --news-media-card-bg: var(--theme-card-bg);
  --news-media-card-text: var(--theme-card-text);
}

.life-main .life-news-media-section {
  margin-bottom: clamp(4.5rem, 9vw, 6.25rem);
}

.life-main .life-news-media-section-header {
  border-bottom: 1px solid var(--news-media-text);
  margin-bottom: 1.875rem;
}

.life-main .life-news-media-section-label {
  font-family: var(--font-mono);
  font-size: 1rem;
  line-height: 1.2;
  text-transform: uppercase;
  margin: 0;
  padding-bottom: 0.625rem;
  color: var(--news-media-text);
}

.life-main .news-card-grid,
.life-main .media-card-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 20px;
}

@media (max-width: 900px) {
  .life-main .news-card-grid,
  .life-main .media-card-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

@media (max-width: 640px) {
  .life-main .news-card-grid,
  .life-main .media-card-grid {
    grid-template-columns: 1fr;
  }
}

.life-main .news-card,
.life-main .media-card {
  background: var(--news-media-card-bg);
  border-radius: 10px;
  color: var(--news-media-card-text);
  display: flex;
  flex-direction: column;
  gap: 20px;
  padding: 20px;
  box-sizing: border-box;
}

.life-main .news-card {
  min-height: 36.75rem;
}

.life-main .media-card {
  min-height: 25rem;
}

.life-main .news-card a,
.life-main .media-card a {
  color: inherit;
}

.life-main .news-card__image-link {
  display: block;
  aspect-ratio: 400 / 240;
  border: 1px solid var(--color-black);
  border-radius: 10px;
  overflow: hidden;
  background: var(--theme-text);
}

.life-main .news-card__image {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.life-main .news-card__image--placeholder {
  background: rgba(15, 1, 1, 0.18);
}

.life-main .news-card__title,
.life-main .media-card__title {
  font-family: var(--font-display);
  font-size: 1.625rem;
  line-height: 1.2;
  font-weight: 400;
  margin: 0;
  color: var(--news-media-card-text);
}

.life-main .news-card__title a {
  text-decoration: none;
}

.life-main .news-card__date {
  font-family: var(--font-mono);
  font-size: 1rem;
  line-height: 1.2;
  text-transform: uppercase;
  margin: 0;
}

.life-main .news-card__excerpt,
.life-main .media-card__excerpt {
  font-family: var(--font-sans);
  font-size: 1rem;
  line-height: 1.4;
  margin: 0;
  overflow: hidden;
  display: -webkit-box;
  -webkit-box-orient: vertical;
}

.life-main .news-card__excerpt {
  line-clamp: 8;
  -webkit-line-clamp: 8;
}

.life-main .media-card__excerpt {
  line-clamp: 10;
  -webkit-line-clamp: 10;
}

.life-main .news-card__cta,
.life-main .media-card__cta {
  font-family: var(--font-mono);
  font-size: 1rem;
  line-height: 1.2;
  text-transform: uppercase;
  margin: auto 0 0;
  padding-top: 0.625rem;
}

.life-main .news-card__cta a,
.life-main .media-card__cta a {
  text-decoration: underline;
  text-underline-offset: 2px;
}

.life-main .news-media-pagination {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1.25rem;
  max-width: 20.9375rem;
  margin: 0 auto;
  padding-top: 3.125rem;
  font-family: var(--font-mono);
  font-size: 1rem;
  line-height: 1.2;
  text-transform: uppercase;
  --text-color: var(--news-media-text);
  color: var(--text-color);
}

.life-main .news-media-pagination__link {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  color: var(--text-color);
  text-decoration: none;
}

.life-main .news-media-pagination__link:hover {
  --text-color: var(--theme-muted);
  color: var(--theme-muted);
}

.life-main .news-media-pagination__link--disabled {
  opacity: 0.35;
  pointer-events: none;
}

.life-main .news-media-pagination__status {
  padding: 0 0.5rem;
  white-space: nowrap;
}

.life-main .news-media-empty {
  min-height: 0;
}

.life-main .news-media-empty__title {
  font-family: var(--font-display);
  font-size: 1.3rem;
  margin: 0;
}

.life-main .life-news-single__header {
  max-width: min(48rem, 100%);
  margin-inline: auto;
  text-align: center;
  color: var(--theme-text);
}

.life-main .life-news-single__eyebrow {
  font-family: var(--font-mono);
  font-size: 0.875rem;
  line-height: 1.2;
  text-transform: uppercase;
  margin: 0 0 1rem;
}

.life-main .life-news-single__title {
  font-family: var(--font-display);
  font-weight: 400;
  font-size: clamp(2.4rem, 5vw, var(--type-h1-size));
  line-height: 1.15;
  margin: 0;
}

.life-main .life-news-single__media {
  margin: 0;
  border: 1px solid var(--theme-text);
  border-radius: var(--framed-radius);
  overflow: hidden;
}

.life-main .life-news-single__image {
  display: block;
  width: 100%;
  height: auto;
}

.life-main .life-news-single__content {
  max-width: min(48rem, 100%);
  margin-inline: auto;
}

/* ── Events archive (CPT `event`, /events/). */

.life-main .life-events-archive {
  --events-text-cream: var(--theme-archive-text);
  --events-card-bg: var(--theme-card-bg);
  --events-card-text: var(--theme-card-text);
}

.life-main .life-events-upcoming,
.life-main .life-events-past {
  margin-bottom: clamp(2.5rem, 6vw, 4rem);
}

.life-main .life-events-section-header {
  border-bottom: 1px solid var(--events-text-cream, var(--theme-text));
  margin-bottom: 1.25rem;
}

.life-main .life-events-section-label {
  font-family: var(--font-mono);
  font-size: 12px;
  line-height: 1;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  margin: 0;
  padding-bottom: 6px;
  color: var(--events-text-cream, var(--theme-text));
}

.life-main .event-upcoming-card {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 1.25rem;
  align-items: center;
}

@media (max-width: 960px) {
  .life-main .event-upcoming-card {
    grid-template-columns: 1fr;
  }
}

.life-main .event-upcoming-card__content {
  color: var(--events-text-cream, var(--theme-text));
}

.life-main .event-upcoming-card__title {
  margin: 0 0 0.75rem;
  font-family: var(--font-display);
  font-size: clamp(1.6rem, 4.5vw, 2.25rem);
  line-height: 1.1;
}

.life-main .event-upcoming-card__title a {
  color: inherit;
  text-decoration: none;
}

.life-main .event-upcoming-card__excerpt {
  margin: 0;
  max-width: 34rem;
}

.life-main .event-upcoming-card__cta {
  margin: 1.1rem 0 0;
  font-family: var(--font-mono);
  font-size: 12px;
  text-transform: uppercase;
  letter-spacing: 0.06em;
}

.life-main .event-upcoming-card__cta a {
  color: inherit;
  text-decoration: underline;
  text-underline-offset: 2px;
}

.life-main .event-upcoming-card__media {
  border: var(--framed-border);
  border-radius: var(--framed-radius);
  overflow: hidden;
  min-height: 280px;
  max-height: 440px;
  margin-top: 10px;
}

.life-main .event-upcoming-card__media a {
  display: block;
  height: 100%;
}

.life-main .event-upcoming-card__image {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}

.life-main .event-upcoming-card__image--placeholder {
  background: rgba(232, 226, 214, 0.12);
  min-height: 280px;
}

.life-main .event-filters {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 16px;
  margin-bottom: 1.25rem;
  scroll-margin-top: 6rem;
}

@media (max-width: 768px) {
  .life-main .event-filters {
    gap: 20px;
  }
}

.life-main .event-filter__label {
  display: block;
  font-family: var(--font-mono);
  font-size: 16px;
  line-height: 1.2;
  letter-spacing: 0;
  text-transform: uppercase;
  margin-bottom: 10px;
  color: var(--theme-text);
}

.life-main .events-list-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 20px;
  margin-bottom: 2.5rem;
}

@media (max-width: 900px) {
  .life-main .events-list-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

@media (max-width: 640px) {
  .life-main .events-list-grid {
    grid-template-columns: 1fr;
  }
}

.life-main .event-list-card {
  background: var(--events-card-bg, var(--theme-muted));
  color: var(--events-card-text, var(--theme-card-text));
  border-radius: 6px;
  padding: 16px 18px;
  min-height: 180px;
  display: flex;
  flex-direction: column;
  box-sizing: border-box;
}

.life-main .event-list-card__title {
  font-size: 1.7rem;
  line-height: 1.1;
  font-weight: 400;
  margin: 0 0 8px;
  font-family: var(--font-display);
  color: var(--events-card-text, var(--theme-card-text));
}

.life-main .event-list-card__date {
  font-family: var(--font-mono);
  font-size: 12px;
  line-height: 1.2;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  margin: 0 0 0.6rem;
}

.life-main .event-list-card__excerpt {
  margin: 0;
}

.life-main .event-list-card__cta {
  margin-top: auto;
  padding-top: 1rem;
  font-family: var(--font-mono);
  font-size: 12px;
  letter-spacing: 0.06em;
  text-transform: uppercase;
}

.life-main .event-list-card__cta a {
  color: inherit;
  text-decoration: underline;
  text-underline-offset: 2px;
}

.life-main .events-pagination {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: center;
  gap: 0.75rem 1.25rem;
  font-family: var(--font-mono);
  font-size: 0.8rem;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  --text-color: var(--events-text-cream, var(--theme-text));
  color: var(--text-color);
}

.life-main .events-pagination__link {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  color: var(--text-color);
  text-decoration: none;
}

.life-main .events-pagination__link:hover {
  --text-color: var(--theme-muted);
  color: var(--theme-muted);
}

.life-main .events-pagination__link--disabled {
  opacity: 0.35;
  pointer-events: none;
}

.life-main .events-pagination__status {
  padding: 0 0.5rem;
  font-size: 0.8rem;
}

.life-main .events-empty {
  min-height: 0;
}

.life-main .events-empty__title {
  font-family: var(--font-display);
  font-size: 1.1rem;
  margin: 0 0 0.5rem;
}

.life-main .events-empty__hint {
  font-size: 14px;
  line-height: 1.4;
  margin: 0;
  opacity: 0.85;
}

/* ── Single event (CPT `event`). */

.life-main .life-event-single {
  row-gap: clamp(1.25rem, 3vw, 2rem);
}

.life-main .life-event-single__header {
  padding-top: 0.9rem;
}

.life-main .life-event-single__eyebrow {
  margin-top: 40px;
}

.life-main .life-event-single__title {
  text-align: left;
  margin: 0;
}

.life-main .life-event-single__content {
  font-size: 1rem;
  line-height: 1.55;
  max-width: 100%;
}

.life-main .life-event-single__media {
  margin: 0;
  border: var(--framed-border);
  border-radius: var(--framed-radius);
  overflow: hidden;
}

.life-main .life-event-single__image {
  display: block;
  width: 100%;
  height: auto;
}

/* ── Team member (life/team-member), Figma TeamMember/Desktop. */

.life-main .life-team-member {
  display: flex;
  flex-direction: column;
  align-items: stretch;
  gap: 1.25rem;
  padding-bottom: 1.25rem;
  min-width: 0;
  max-width: 100%;
}

.life-main .life-team-member__figure {
  position: relative;
  aspect-ratio: 1 / 1;
  width: 100%;
  margin: 0;
  border: 1px solid var(--theme-text);
  border-radius: 10px;
  background: var(--color-stone);
  overflow: hidden;
}

.life-main .life-team-member__img {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.life-main .life-team-member__placeholder {
  box-sizing: border-box;
  display: flex;
  align-items: center;
  justify-content: center;
  width: 100%;
  height: 100%;
  min-height: 0;
  margin: 0;
  padding: 1rem;
  border: none;
  background: transparent;
  font-family: var(--font-mono);
  font-size: 12px;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--theme-text);
  cursor: pointer;
}

.life-main .life-team-member__placeholder:hover,
.life-main .life-team-member__placeholder:focus-visible {
  color: var(--theme-muted);
  outline: 1px dashed var(--theme-text);
  outline-offset: -6px;
}

.life-main .life-team-member__name {
  margin: 0;
  padding: 0;
  font-family: var(--font-display);
  font-size: var(--type-h3-size);
  line-height: 1.2;
  font-weight: 400;
  color: var(--theme-text);
}

.life-main .life-team-member__position {
  margin: 0;
  padding: 0;
  font-family: var(--font-mono);
  font-size: var(--type-sub-size);
  line-height: 1.2;
  letter-spacing: 0;
  text-transform: uppercase;
  color: var(--theme-text);
}

.life-main .life-team-member__location {
  margin: 0;
  padding: 0;
  font-family: var(--font-sans);
  font-size: var(--type-body-size);
  font-weight: 400;
  line-height: calc(22.4 / 16);
  color: var(--theme-text);
  min-width: 0;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

/* ── Contact page (Figma node 120:33758, “D Contact”). */

.page-contact .life-contact-hero {
  gap: 0;
}

.page-contact .life-contact-addresses,
.page-contact .life-contact-form-wrap {
  margin-top: clamp(2.5rem, 8vw, 6.25rem);
}

.page-contact .life-contact-address-columns {
  gap: 30px;
}

.page-contact .life-contact-address-columns .wp-block-heading {
  margin-bottom: 1.875rem;
}

.page-contact .life-contact-address-columns .wp-block-group > .wp-block-heading + .wp-block-paragraph {
  margin-top: 0;
}

.page-contact .life-contact-address-stack {
  display: flex;
  flex-direction: column;
  gap: 3.125rem;
}

.page-contact .life-contact-address-stack > * {
  margin-top: 0;
}

.page-contact .life-contact-address-stack .wp-block-heading {
  margin-bottom: 1.875rem;
}

.life-contact-form {
  width: 100%;
}

.life-contact-form__notice {
  font-family: var(--font-sans);
  font-size: var(--type-body-size);
  margin: 0 0 1.5rem;
  padding: 0.75rem 1rem;
  border: 1px solid var(--theme-text);
  border-radius: 10px;
}

.life-contact-form__notice--success {
  border-color: var(--theme-muted);
  color: var(--theme-muted);
}

.life-contact-form__notice--error {
  border-color: var(--theme-text);
}

.life-contact-form__form {
  margin: 0;
}

.life-contact-form__hp {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}

.life-contact-form__columns {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 30px;
  align-items: stretch;
}

.life-contact-form__fields {
  display: flex;
  flex-direction: column;
  gap: 1.875rem;
}

.life-contact-form__field {
  display: flex;
  flex-direction: column;
  gap: 0.625rem;
  margin: 0;
}

.life-contact-form__label {
  font-family: var(--font-mono);
  font-size: var(--type-sub-size);
  line-height: calc(var(--type-sub-line) / var(--type-sub-size));
  letter-spacing: 0;
  text-transform: uppercase;
  color: var(--theme-text);
}

.life-contact-form__input,
.life-contact-form__textarea {
  box-sizing: border-box;
  width: 100%;
  margin: 0;
  padding: 0 1.25rem;
  font-family: var(--font-sans);
  font-size: var(--type-body-size);
  line-height: calc(var(--type-body-line) / var(--type-body-size));
  color: var(--theme-text);
  background: var(--theme-bg);
  border: 1px solid var(--theme-border);
  border-radius: 10px;
}

.life-contact-form__input {
  min-height: 2.8125rem;
}

.life-contact-form__textarea {
  min-height: 12.5rem;
  padding: 1.25rem;
  border-radius: 10px;
  resize: vertical;
}

.life-contact-form__input::placeholder,
.life-contact-form__textarea::placeholder {
  font-family: var(--font-mono);
  text-transform: uppercase;
  letter-spacing: 0;
  opacity: 0.5;
  color: var(--theme-text);
}

.life-contact-form__message-wrap {
  display: flex;
  flex-direction: column;
  gap: 0.9375rem;
  min-height: 0;
}

.life-contact-form__submit-wrap {
  display: flex;
  justify-content: center;
  margin: 3.125rem 0 0;
}

.life-contact-form__submit {
  box-sizing: border-box;
  width: 100%;
  max-width: 32.8125rem;
  min-height: 2.8125rem;
  margin: 0;
  padding: 0 1.25rem;
  font-family: var(--font-mono);
  font-size: var(--type-sub-size);
  line-height: calc(var(--type-sub-line) / var(--type-sub-size));
  letter-spacing: 0.04em;
  text-transform: uppercase;
  color: var(--theme-button-text);
  background: var(--theme-button-bg);
  border: 1px solid var(--theme-button-bg);
  border-radius: 10px;
  cursor: pointer;
}

.life-contact-form__submit:hover {
  color: var(--theme-button-text);
  background: var(--theme-muted);
  border-color: var(--theme-muted);
}

.page-contact .life-contact-form-wrap div.wpforms-container-full,
.page-contact .life-contact-form-wrap .wpforms-container {
  width: 100%;
  margin: 0;
}

.page-contact .life-contact-form-wrap .wpforms-form {
  margin: 0;
}

.page-contact .life-contact-form-wrap .wpforms-field-container {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 1.875rem 30px;
  align-items: stretch;
}

.page-contact .life-contact-form-wrap #wpforms-425-field_5-container {
  display: none !important;
}

.page-contact .life-contact-form-wrap .wpforms-field {
  display: flex;
  flex-direction: column;
  gap: 0.625rem;
  padding: 0;
  margin: 0;
}

.page-contact .life-contact-form-wrap #wpforms-425-field_1-container,
.page-contact .life-contact-form-wrap #wpforms-425-field_2-container,
.page-contact .life-contact-form-wrap #wpforms-425-field_4-container {
  grid-column: 1;
}

.page-contact .life-contact-form-wrap #wpforms-425-field_3-container {
  grid-column: 2;
  grid-row: 1 / span 3;
  gap: 0.9375rem;
}

.page-contact .life-contact-form-wrap .wpforms-field-label {
  font-family: var(--font-mono);
  font-size: var(--type-sub-size);
  line-height: calc(var(--type-sub-line) / var(--type-sub-size));
  font-weight: 400;
  letter-spacing: 0;
  text-transform: uppercase;
  color: var(--theme-text);
}

.page-contact .life-contact-form-wrap .wpforms-required-label {
  color: var(--theme-text);
  font-weight: 400;
}

.page-contact .life-contact-form-wrap div.wpforms-container-full .wpforms-form input[type="text"],
.page-contact .life-contact-form-wrap div.wpforms-container-full .wpforms-form input[type="email"],
.page-contact .life-contact-form-wrap div.wpforms-container-full .wpforms-form textarea {
  box-sizing: border-box;
  width: 100%;
  max-width: none;
  margin: 0;
  padding: 0 1.25rem;
  font-family: var(--font-sans);
  font-size: var(--type-body-size);
  line-height: calc(var(--type-body-line) / var(--type-body-size));
  color: var(--theme-text);
  background: var(--theme-bg);
  border: 1px solid var(--theme-border);
}

.page-contact .life-contact-form-wrap div.wpforms-container-full .wpforms-form input[type="text"],
.page-contact .life-contact-form-wrap div.wpforms-container-full .wpforms-form input[type="email"] {
  min-height: 2.8125rem;
  border-radius: 999px;
}

.page-contact .life-contact-form-wrap div.wpforms-container-full .wpforms-form textarea {
  flex: 1;
  min-height: 12.5rem;
  padding: 1.25rem;
  border-radius: 10px;
  resize: vertical;
}

.page-contact .life-contact-form-wrap div.wpforms-container-full .wpforms-form input::placeholder,
.page-contact .life-contact-form-wrap div.wpforms-container-full .wpforms-form textarea::placeholder {
  font-family: var(--font-mono);
  text-transform: uppercase;
  letter-spacing: 0;
  opacity: 0.5;
  color: var(--theme-text);
}

.page-contact .life-contact-form-wrap div.wpforms-container-full .wpforms-form .wpforms-submit-container {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  margin: 5rem 0 0;
  padding: 0;
}

.page-contact .life-contact-form-wrap div.wpforms-container-full .wpforms-form button[type="submit"].wpforms-submit {
  box-sizing: border-box;
  width: 100%;
  max-width: none;
  min-height: 2.8125rem;
  margin: 0;
  padding: 0 1.25rem;
  font-family: var(--font-mono);
  font-size: var(--type-sub-size);
  line-height: calc(var(--type-sub-line) / var(--type-sub-size));
  font-weight: 400;
  letter-spacing: 0;
  text-transform: uppercase;
  color: var(--theme-button-text);
  background: var(--theme-button-bg);
  border: 1px solid var(--theme-button-bg);
  border-radius: 10px;
  cursor: pointer;
}

.page-contact .life-contact-form-wrap div.wpforms-container-full .wpforms-form button[type="submit"].wpforms-submit:hover {
  color: var(--theme-button-text);
  background: var(--theme-muted);
  border-color: var(--theme-muted);
}

@media (max-width: 768px) {
  .life-contact-form__columns,
  .page-contact .life-contact-form-wrap .wpforms-field-container {
    grid-template-columns: 1fr;
  }

  .page-contact .life-contact-form-wrap #wpforms-425-field_1-container,
  .page-contact .life-contact-form-wrap #wpforms-425-field_2-container,
  .page-contact .life-contact-form-wrap #wpforms-425-field_3-container,
  .page-contact .life-contact-form-wrap #wpforms-425-field_4-container {
    grid-column: 1;
    grid-row: auto;
  }
}

