/*
 * Design tokens — all semantic UI colors, shadows, and accents live here.
 * `<html data-theme="light" | "dark">` is set by ThemeProvider (resolved value).
 * See docs/DESIGN_SYSTEM.md for how to extend the system without one-off colors.
 */

[data-theme='light'] {
  color-scheme: light;

  --text: #5b5366;
  --text-muted: #7a7285;
  --text-h: #0c0a12;
  /* Opaque warm off-white canvas (was #fffff5f7 — alpha washed to pure white over the browser default) */
  --bg: #f6f5ef;
  --surface: #ffffff;
  --border: #e4e2e8;
  --code-bg: #edeaf2;
  --element-bg: #e5e3dd;
  --toggle-selected-bg: #c7c5bf;
  --toggle-selected-fg: var(--text);
  --toggle-selected-shadow: inset 0 1px 2px rgba(0, 0, 0, 0.22);
  --accent: #3a55ed;
  --accent-hover: #6d28d9;
  /* Text-style links / wordmark — hover uses grey, not accent */
  --text-interactive-hover: #33313a;
  /* Home “Trial Viva” pill */
  --cta-pill-bg: #1a1a1a;
  --cta-pill-bg-hover: #333333;
  --cta-pill-fg: #ffffff;
  --cta-pill-fg-hover: #ffffff;
  --site-index-bg: #f6f5ef;
  /* Home draggable overlays on hero / post-lede photos — layered depth */
  --elevated-photo-shadow:
    0 0 0 1px rgba(0, 0, 0, 0.07),
    0 10px 36px -10px rgba(0, 0, 0, 0.22),
    0 36px 100px -40px rgba(0, 0, 0, 0.2);

  /* Reserved for accent-filled UI (e.g. future chip); primary CTAs use --cta-pill-fg */
  --on-accent: #ffffff;
  --shadow-button: 0 1px 2px rgba(0, 0, 0, 0.08);
  /* Wash over hero / post-lede photography */
  --media-photo-wash: rgba(255, 255, 255, 0.3);
  --shadow-card-soft:
    0 1px 2px color-mix(in srgb, var(--text-h) 4%, transparent),
    0 8px 24px -8px color-mix(in srgb, var(--text-h) 8%, transparent);
  /* Ghost controls: heading-colored label, slightly softer on hover */
  --text-choice-hover: #3a3a42;

  /* Selection / picked-state accent (not used for keyboard focus outlines) */
  --focus-ring-color: #0a0a0a;

  /* Verdict / readiness status (progress dashboard) */
  --status-pass-fg: #15803d;
  --status-pass: #2a9d5c;
  --status-borderline-fg: #b45309;
  --status-borderline: #c9921a;
  --status-fail-fg: #c0392b;
  --status-fail: #c0392b;

  /* Trial mic — active (listening) state */
  --trial-mic-accent: #2a6bc9;
  --trial-mic-accent-rgb: 42 107 201;

  /* QR code quiet zone — always white for scan reliability */
  --qr-surface: #ffffff;

  /* Product-tour / coachmark scrim — always black-based (not --text-h). */
  --coachmark-scrim: rgb(0 0 0 / 0.48);

  /* Progress dashboard panels — matches directory-card depth */
  --progress-panel-shadow:
    0 0 0 1px color-mix(in srgb, var(--text-h) 10%, transparent),
    0 2px 4px rgba(0, 0, 0, 0.14),
    0 10px 28px -6px rgba(0, 0, 0, 0.32),
    0 22px 48px -14px rgba(0, 0, 0, 0.22);
  --progress-panel-shadow-hover:
    0 0 0 1px color-mix(in srgb, var(--text-h) 12%, transparent),
    0 4px 8px rgba(0, 0, 0, 0.18),
    0 14px 36px -8px rgba(0, 0, 0, 0.38),
    0 28px 56px -16px rgba(0, 0, 0, 0.28);
}

[data-theme='dark'] {
  color-scheme: dark;

  --text: #a1a1aa;
  --text-muted: #71717a;
  --text-h: #fafafa;
  --bg: #11110c;
  --surface: #161612;
  --border: #2c2b24;
  --code-bg: #1e1e19;
  --element-bg: #262520;
  --toggle-selected-bg: #1a1916;
  --toggle-selected-fg: var(--text);
  --toggle-selected-shadow: inset 0 1px 3px rgba(0, 0, 0, 0.55);
  --accent: #a78bfa;
  --accent-hover: #c4b5fd;
  --text-interactive-hover: #d4d4d8;
  --cta-pill-bg: #fafafa;
  --cta-pill-bg-hover: #e8e8e8;
  --cta-pill-fg: #0a0a0a;
  --cta-pill-fg-hover: #0a0a0a;
  --site-index-bg: #1c1b16;
  --elevated-photo-shadow:
    0 0 0 1px rgba(255, 255, 255, 0.07),
    0 12px 48px -12px rgba(0, 0, 0, 0.65),
    0 48px 120px -48px rgba(0, 0, 0, 0.55);

  /* Reserved for accent-filled UI; primary CTAs use --cta-pill-fg */
  --on-accent: #ffffff;
  --shadow-button: 0 1px 2px rgba(0, 0, 0, 0.24);
  --media-photo-wash: rgba(255, 255, 255, 0.3);
  --shadow-card-soft:
    0 1px 0 color-mix(in srgb, var(--text-h) 5%, transparent),
    0 12px 32px -12px rgba(0, 0, 0, 0.45);
  --text-choice-hover: #b6b6be;
  /* Raised cards / panels in dark mode (pricing, FAQ, etc.) */
  --shadow-panel-raised:
    0 1px 0 color-mix(in srgb, var(--text-h) 6%, transparent),
    0 18px 48px -20px rgba(0, 0, 0, 0.65);

  --focus-ring-color: #f4f4f5;

  --status-pass-fg: #4ade80;
  --status-pass: #22c55e;
  --status-borderline-fg: #fbbf24;
  --status-borderline: #d97706;
  --status-fail-fg: #f87171;
  --status-fail: #ef4444;

  --trial-mic-accent: #7eb8ff;
  --trial-mic-accent-rgb: 126 184 255;

  --qr-surface: #ffffff;

  /* Stronger black scrim so the cutout still reads on an already-dark canvas. */
  --coachmark-scrim: rgb(0 0 0 / 0.62);

  --progress-panel-shadow:
    0 0 0 1px color-mix(in srgb, var(--text-h) 12%, transparent),
    0 2px 6px rgba(0, 0, 0, 0.45),
    0 12px 32px -8px rgba(0, 0, 0, 0.55),
    0 24px 52px -14px rgba(0, 0, 0, 0.5);
  --progress-panel-shadow-hover:
    0 0 0 1px color-mix(in srgb, var(--text-h) 16%, transparent),
    0 4px 10px rgba(0, 0, 0, 0.5),
    0 16px 40px -10px rgba(0, 0, 0, 0.65),
    0 30px 60px -16px rgba(0, 0, 0, 0.55);
}

/* Shell: header, main, global page column, footer bar, theme toggle */

.layout {
  display: flex;
  flex-direction: column;
  min-height: 100%;
  /* Equal horizontal inset (header, main, footers); ~10% wider than prior */
  --page-inline-base: calc((1.5rem + 6rem / 2 + 1vw) * 1.1);
  --page-inline-factor: 1;
  --page-inline: calc(var(--page-inline-base) * var(--page-inline-factor));
  /* Header row height budget (picker / sign-in); ~20% shorter than 1.62rem slot era */
  --site-header-slot-h: 1.3rem;
  /* Full fixed header block: vertical padding + tallest control (+3px) + vertical padding */
  --site-header-chrome-h: calc(0.8rem + var(--site-header-slot-h) + 3px + 0.8rem);
  /* Clearance under fixed header for main content (was 3.35rem) */
  --site-header-clearance: 2.68rem;
}

/* Below Tailwind `sm` (640px): side margins 80% smaller (20% of default formula). */
@media (max-width: 639px) {
  .layout {
    --page-inline-base: calc((1.5rem + 5.25rem / 2 + 1vw) * 1.1);
    --page-inline-factor: 0.2;
  }
}

.site-header {
  position: fixed;
  top: env(safe-area-inset-top, 0px);
  left: 0;
  right: 0;
  z-index: 1000;
  flex-shrink: 0;
  display: grid;
  grid-template-columns: 1fr auto 1fr;
  align-items: center;
  column-gap: 1.1rem;
  row-gap: 0.6rem;
  padding: 0.8rem calc(var(--page-inline) + env(safe-area-inset-right, 0px)) 0.8rem
    calc(var(--page-inline) + env(safe-area-inset-left, 0px));
  box-sizing: border-box;
  /* `--bg` can include alpha (e.g. light theme); keep the chrome fully opaque */
  background: rgb(from var(--bg) r g b / 1);
  overflow: visible;
}

/* Marketing shell: hamburger + drawer below this width; inline nav only when there is room */
/* Keep in sync: `max-width` here = one less than `min-width` for desktop marketing rules + mobile-nav hide */
.site-header__menu-toggle {
  display: none;
  flex-shrink: 0;
  align-items: center;
  justify-content: center;
  margin: 0;
  padding: 0.35rem;
  border: none;
  border-radius: 8px;
  background: transparent;
  color: var(--text-h);
  cursor: pointer;
  line-height: 0;
}

.site-header__menu-toggle:hover {
  color: var(--text-interactive-hover);
}

.site-header__menu-toggle:focus-visible {
  outline: var(--focus-ring-width) var(--focus-ring-style) var(--focus-ring-color);
  outline-offset: var(--focus-ring-offset);
}

@media (max-width: 959px) {
  .site-header--marketing {
    display: flex;
    flex-wrap: nowrap;
    align-items: center;
    column-gap: 0.5rem;
    row-gap: 0;
  }

  .site-header--marketing .site-header__start {
    flex: 0 1 auto;
    min-width: 0;
    /* Avoid line-box / baseline strut so the compact mic mark lines up with Sign in + menu */
    display: flex;
    align-items: center;
  }

  .site-header--marketing .site-header__center {
    display: none !important;
  }

  /* Trailing region grows; college + Sign in + menu bunched at the right edge */
  .site-header--marketing .site-header__end {
    flex: 1 1 auto;
    min-width: 0;
    justify-content: flex-end;
  }

  .site-header--marketing .site-header__marketing-actions {
    display: flex;
    flex-direction: row;
    flex-wrap: nowrap;
    align-items: center;
    justify-content: flex-end;
    gap: 0.35rem;
    width: auto;
    max-width: 100%;
    min-width: 0;
  }

  .site-header--marketing .site-header__marketing-actions > * {
    flex: 0 0 auto;
    min-width: 0;
  }

  .site-header--marketing .site-header__menu-toggle {
    display: inline-flex;
  }
}

/* Desktop marketing: full center nav; college + sign-in stay on one row (no wrap before nav collapses) */
@media (min-width: 960px) {
  .site-header--marketing .site-header__center {
    flex-wrap: nowrap;
  }

  .site-header--marketing .site-header__end {
    flex-wrap: nowrap;
  }

  .site-header--marketing .site-header__marketing-actions {
    display: flex;
    flex-wrap: nowrap;
    align-items: center;
    justify-content: flex-end;
    gap: 0.42rem;
  }
}

.site-header-mobile-nav[hidden] {
  display: none !important;
}

.site-header-mobile-nav:not([hidden]) {
  position: fixed;
  inset: 0;
  z-index: 1500;
  pointer-events: auto;
}

.site-header-mobile-nav__backdrop {
  position: absolute;
  inset: 0;
  margin: 0;
  padding: 0;
  border: none;
  border-radius: 0;
  background: color-mix(in srgb, var(--text-h) 28%, transparent);
  cursor: pointer;
  -webkit-tap-highlight-color: transparent;
}

.site-header-mobile-nav__sheet {
  position: absolute;
  top: 0;
  right: 0;
  bottom: 0;
  box-sizing: border-box;
  width: min(20.5rem, calc(100% - 1.25rem));
  max-width: calc(100vw - env(safe-area-inset-left, 0px) - env(safe-area-inset-right, 0px));
  padding: calc(0.85rem + env(safe-area-inset-top, 0px)) calc(1rem + env(safe-area-inset-right, 0px))
    calc(1rem + env(safe-area-inset-bottom, 0px)) calc(1rem + env(safe-area-inset-left, 0px));
  background: var(--surface);
  border-left: 1px solid var(--border);
  box-shadow: var(--elevated-photo-shadow);
  overflow: auto;
  overscroll-behavior: contain;
}

.site-header-mobile-nav__head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.75rem;
  margin-bottom: 1rem;
}

.site-header-mobile-nav__title {
  margin: 0;
  font-family: var(--heading);
  font-size: 1.05rem;
  font-weight: 600;
  color: var(--text-h);
}

.site-header-mobile-nav__close {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  margin: 0;
  padding: 0.35rem;
  border: none;
  border-radius: 8px;
  background: transparent;
  color: var(--text-h);
  cursor: pointer;
  line-height: 0;
}

.site-header-mobile-nav__close:hover {
  color: var(--text-interactive-hover);
}

.site-header-mobile-nav__nav {
  display: flex;
  flex-direction: column;
  gap: 0.35rem;
}

.site-header-mobile-nav__group-label {
  margin: 1rem 0 0.2rem;
  font-size: 0.68rem;
  font-weight: 600;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--text-muted);
}

.site-header-mobile-nav__list {
  list-style: none;
  margin: 0;
  padding: 0;
  display: flex;
  flex-direction: column;
  gap: 0.1rem;
}

.site-header-mobile-nav__link {
  display: block;
  padding: 0.75rem 0.85rem; /* larger tap target for mobile (~48px effective) */
  font-size: 0.95rem;
  font-weight: 400;
  line-height: 1.45;
  color: var(--text-h);
  text-decoration: none;
  border-radius: 8px;
  min-height: 44px; /* ensure good touch target */
  display: flex;
  align-items: center;
}

.site-header-mobile-nav__link:hover {
  color: var(--text-interactive-hover);
}

.site-header-mobile-nav__link--active {
  font-weight: 600;
}

@media (min-width: 960px) {
  .site-header-mobile-nav {
    display: none !important;
  }
}

.site-header__start {
  justify-self: start;
}

.site-header__center {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: center;
  gap: 0.45rem 1.9rem;
  transition:
    opacity 0.24s ease,
    transform 0.5s cubic-bezier(0.22, 1, 0.36, 1),
    visibility 0.24s ease;
}

.site-header__dropdown {
  position: relative;
  display: flex;
  align-items: center;
}

.site-header__dropdown-trigger {
  margin: 0;
  padding: 0.2rem 0;
  border: none;
  background: none;
  font-family: inherit;
  font-size: 0.85625rem;
  font-weight: 400;
  letter-spacing: inherit;
  color: var(--text);
  cursor: pointer;
  white-space: nowrap;
  border-radius: 4px;
}

a.site-header__dropdown-trigger {
  text-decoration: none;
  cursor: pointer;
}

.site-header__dropdown-trigger:hover {
  color: var(--text-interactive-hover);
  text-decoration: underline;
  text-underline-offset: 2px;
}

.site-header__dropdown-trigger:focus-visible {
  outline: var(--focus-ring-width) var(--focus-ring-style) var(--focus-ring-color);
  outline-offset: var(--focus-ring-offset);
}

.site-header__dropdown-trigger--active {
  color: var(--text-h);
}

/* Hit area between trigger and panel so hover isn’t dropped */
.site-header__dropdown::after {
  content: '';
  position: absolute;
  left: 0;
  right: 0;
  top: 100%;
  height: 0.45rem;
  z-index: 1;
}

.site-header__dropdown-panel {
  position: absolute;
  top: calc(100% + 0.35rem);
  left: 50%;
  transform: translateX(-50%);
  z-index: 1100;
  min-width: 11.5rem;
  max-width: min(18rem, calc(100vw - 2rem));
  padding: 0.35rem 0;
  margin: 0;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 8px;
  box-shadow: var(--elevated-photo-shadow);
  opacity: 0;
  visibility: hidden;
  pointer-events: none;
  transition:
    opacity 0.12s ease,
    visibility 0.12s ease;
}

.site-header__dropdown--open .site-header__dropdown-panel {
  opacity: 1;
  visibility: visible;
  pointer-events: auto;
}

.site-header__dropdown-list {
  list-style: none;
  margin: 0;
  padding: 0;
}

.site-header__dropdown-list li {
  margin: 0;
}

.site-header__dropdown-link {
  display: block;
  padding: 0.4rem 1rem;
  font-size: 0.85625rem;
  font-weight: 400;
  line-height: 1.45;
  color: var(--text-h);
  text-decoration: none;
}

.site-header__dropdown-link:hover {
  color: var(--text-interactive-hover);
  background: color-mix(in srgb, var(--text-h) 5%, transparent);
}

.site-header__end {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: flex-end;
  gap: 0.45rem 1.375rem;
  justify-self: end;
}

@media (max-width: 720px) {
  .site-header:not(.site-header--marketing) {
    grid-template-columns: 1fr auto;
    grid-template-rows: auto auto;
  }

  .site-header:not(.site-header--marketing) .site-header__start {
    grid-column: 1;
    grid-row: 1;
  }

  .site-header:not(.site-header--marketing) .site-header__end {
    grid-column: 2;
    grid-row: 1;
  }

  .site-header:not(.site-header--marketing) .site-header__center {
    grid-column: 1 / -1;
    grid-row: 2;
  }
}

/* Logged-in workspace shell — primary row (logo | modes or title | theme + user) */
.site-header--workspace {
  --site-header-workspace-control-gap: 0.42rem;
  display: flex;
  flex-direction: column;
  align-items: stretch;
  gap: 0.45rem;
}

.site-header__workspace-primary {
  display: grid;
  grid-template-columns: 1fr auto 1fr;
  align-items: center;
  column-gap: 1.1rem;
  width: 100%;
}

/* Station / Viva / Progress workspace routes: logo + controls only */
.site-header__workspace-primary--no-center {
  grid-template-columns: 1fr auto;
}

.site-header--workspace .site-header__start {
  justify-self: start;
}

.site-header--workspace .site-header__workspace-modes {
  justify-self: center;
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 0.85rem 1rem;
  min-width: 0;
}

.site-header--workspace .site-header__page-title-slot,
.site-header--workspace .site-header__workspace-modes {
  transition:
    opacity 0.24s ease,
    transform 0.5s cubic-bezier(0.22, 1, 0.36, 1),
    visibility 0.24s ease;
}

/* Mic-only mark (≤720px): reveal wordmark on hover/focus and tuck center nav / title aside */
.site-header:has(.site-logo--compact-mark:hover) .site-header__center,
.site-header:has(.site-logo--compact-mark:focus-visible) .site-header__center,
.site-header:has(.site-logo--compact-mark:focus-within) .site-header__center,
.site-header:has(.site-logo--compact-mark:hover) .site-header__page-title-slot,
.site-header:has(.site-logo--compact-mark:focus-visible) .site-header__page-title-slot,
.site-header:has(.site-logo--compact-mark:focus-within) .site-header__page-title-slot,
.site-header:has(.site-logo--compact-mark:hover) .site-header__workspace-modes,
.site-header:has(.site-logo--compact-mark:focus-visible) .site-header__workspace-modes,
.site-header:has(.site-logo--compact-mark:focus-within) .site-header__workspace-modes {
  opacity: 0;
  visibility: hidden;
  transform: translateY(-0.18rem) scale(0.98);
  pointer-events: none;
}

/* Equal spacing: theme ↔ session / a11y / builder settings ↔ account (matches in-slot gap) */
.site-header--workspace .site-header__end {
  justify-self: end;
  gap: var(--site-header-workspace-control-gap);
}

.site-header--workspace .site-header__theme-slot {
  display: flex;
  align-items: center;
  gap: var(--site-header-workspace-control-gap);
  flex: 0 0 auto;
  position: relative;
}

/* Application route: optional session countdown (accessibility “Timer”), left of session info */
.site-header__application-viva-timer {
  display: inline-flex;
  align-items: center;
  justify-content: flex-end;
  gap: 0.35rem;
  flex: 0 0 auto;
  max-width: 0;
  min-width: 0;
  opacity: 0;
  overflow: hidden;
  transform: translateX(6px);
  transition:
    max-width 0.28s ease,
    opacity 0.22s ease,
    transform 0.28s ease;
  pointer-events: none;
}

.site-header__application-viva-timer--visible {
  max-width: 5.75rem;
  opacity: 1;
  transform: translateX(0);
}

.site-header__application-viva-timer-face {
  font-size: 0.85625rem;
  font-weight: 500;
  font-variant-numeric: tabular-nums;
  color: var(--text);
  white-space: nowrap;
}

@media (prefers-reduced-motion: reduce) {
  .site-header__application-viva-timer {
    transition: opacity 0.15s ease;
    transform: none;
  }

  .site-header__application-viva-timer--visible {
    transform: none;
  }

  .site-header--workspace .site-header__page-title-slot,
  .site-header--workspace .site-header__workspace-modes {
    transition: opacity 0.15s ease;
    transform: none;
  }

  .site-header:has(.site-logo--compact-mark:hover) .site-header__center,
  .site-header:has(.site-logo--compact-mark:focus-visible) .site-header__center,
  .site-header:has(.site-logo--compact-mark:focus-within) .site-header__center,
  .site-header:has(.site-logo--compact-mark:hover) .site-header__page-title-slot,
  .site-header:has(.site-logo--compact-mark:focus-visible) .site-header__page-title-slot,
  .site-header:has(.site-logo--compact-mark:focus-within) .site-header__page-title-slot,
  .site-header:has(.site-logo--compact-mark:hover) .site-header__workspace-modes,
  .site-header:has(.site-logo--compact-mark:focus-visible) .site-header__workspace-modes,
  .site-header:has(.site-logo--compact-mark:focus-within) .site-header__workspace-modes {
    transform: none;
  }
}

.site-header__session-info {
  position: relative;
  display: inline-flex;
  align-items: center;
}

.site-header__session-info-trigger {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  box-sizing: border-box;
  width: 2.12rem;
  height: calc(var(--site-header-slot-h) + 3px);
  margin: 0;
  padding: 1.5px;
  border: 1px solid var(--border);
  border-radius: 9999px;
  color: var(--text-muted);
  background: var(--element-bg);
  cursor: pointer;
  transition: color 0.15s ease;
}

.site-header__session-info-trigger:hover {
  color: var(--text-h);
}

.site-header__session-info--open .site-header__session-info-trigger {
  color: var(--text);
}

.site-header__session-info-icon {
  display: flex;
  width: 1.05rem;
  height: 1.05rem;
}

.site-header__session-info-icon svg {
  width: 100%;
  height: 100%;
}

.site-header__session-info-trigger:focus-visible {
  outline: var(--focus-ring-width) var(--focus-ring-style) var(--focus-ring-color);
  outline-offset: var(--focus-ring-offset);
}

.site-header__session-info-panel {
  position: absolute;
  top: calc(100% + 0.45rem);
  right: 0;
  z-index: 1200;
  width: min(22.5rem, calc(100vw - 2rem));
  padding: 0.65rem 0.72rem;
  border: 1px solid var(--border);
  border-radius: 8px;
  background: var(--surface);
  box-shadow: var(--elevated-photo-shadow);
  opacity: 0;
  visibility: hidden;
  pointer-events: none;
  transform: translateY(4px);
  transition:
    opacity 0.12s ease,
    visibility 0.12s ease,
    transform 0.12s ease;
}

.site-header__session-info-panel p {
  margin: 0;
  font-size: 0.8rem;
  line-height: 1.4;
  color: var(--text);
}

.site-header__session-info-panel p + p {
  margin-top: 0.55rem;
}

.site-header__session-info--open .site-header__session-info-panel {
  opacity: 1;
  visibility: visible;
  pointer-events: auto;
  transform: translateY(0);
}

/* Hover/focus hint under header icon buttons (same box as theme picker tooltip) */
.site-header__control-hint {
  position: absolute;
  top: calc(100% + 6px);
  right: 0;
  z-index: 1200;
  padding: 0.35rem 0.55rem;
  font-size: 0.75rem;
  font-weight: 500;
  line-height: 1.2;
  color: var(--text);
  background: var(--element-bg);
  border: 1px solid var(--border);
  border-radius: 6px;
  box-shadow: var(--elevated-photo-shadow);
  white-space: nowrap;
  opacity: 0;
  visibility: hidden;
  pointer-events: none;
  transform: translateY(4px);
  transition:
    opacity 0.15s ease,
    visibility 0.15s ease,
    transform 0.15s ease;
}

/* Hover only: focus stays on the trigger after click; :focus-within would keep the hint visible without hover */
.site-header__session-info:hover .site-header__control-hint {
  opacity: 1;
  visibility: visible;
  transform: translateY(0);
}

.site-header__session-info--open .site-header__control-hint,
.site-header__session-info--open:hover .site-header__control-hint,
.site-header__session-info--open:focus-within .site-header__control-hint {
  opacity: 0;
  visibility: hidden;
  transform: translateY(4px);
}

/* After trigger click: hide hint until pointer leaves anchor (new hover), like theme picker */
.site-header__session-info--suppress-hint .site-header__control-hint,
.site-header__session-info--suppress-hint:hover .site-header__control-hint,
.site-header__session-info--suppress-hint:focus-within .site-header__control-hint {
  opacity: 0;
  visibility: hidden;
  transform: translateY(4px);
}

/* Application route: accessibility options (subtitles, timer) between session info and theme.
   Builder session menu (/viva-builder, /station-builder) reuses the same chrome. */
.site-header__app-accessibility,
.site-header__builder-session {
  position: relative;
  display: inline-flex;
  align-items: center;
  flex: 0 0 auto;
}

/* Station Voice / Written segmented control — "Mode" + icons; expands to Voice/Written */
.site-header__station-mode {
  position: relative;
  display: inline-flex;
  align-items: stretch;
  flex: 0 0 auto;
  height: calc(var(--site-header-slot-h) + 6px);
  padding: 2px;
  border: 1px solid var(--border);
  border-radius: 9999px;
  background: color-mix(in srgb, var(--element-bg) 88%, var(--text-h) 4%);
  box-sizing: border-box;
}

.site-header__station-mode-caption {
  display: inline-flex;
  align-items: center;
  flex: 0 0 auto;
  max-width: 3.25rem;
  margin: 0;
  padding: 0 0.2rem 0 0.55rem;
  overflow: hidden;
  font-size: 0.72rem;
  font-weight: 600;
  letter-spacing: 0.01em;
  line-height: 1;
  white-space: nowrap;
  color: var(--text-muted);
  opacity: 1;
  transition:
    max-width 0.28s cubic-bezier(0.22, 1, 0.36, 1),
    padding 0.28s cubic-bezier(0.22, 1, 0.36, 1),
    opacity 0.18s ease;
}

.site-header__station-mode:hover .site-header__station-mode-caption,
.site-header__station-mode:focus-within .site-header__station-mode-caption {
  max-width: 0;
  padding-left: 0;
  padding-right: 0;
  opacity: 0;
}

.site-header__station-mode-switch {
  position: relative;
  display: inline-grid;
  grid-template-columns: 1fr 1fr;
  align-items: stretch;
  flex: 0 0 auto;
  width: 4.5rem;
  min-width: 4.5rem;
  transition:
    width 0.28s cubic-bezier(0.22, 1, 0.36, 1),
    min-width 0.28s cubic-bezier(0.22, 1, 0.36, 1);
}

.site-header__station-mode:hover .site-header__station-mode-switch,
.site-header__station-mode:focus-within .site-header__station-mode-switch {
  width: 11rem;
  min-width: 11rem;
}

.site-header__station-mode-thumb {
  position: absolute;
  inset: 0 auto 0 0;
  width: 50%;
  border-radius: 9999px;
  background: var(--surface);
  box-shadow:
    0 1px 2px color-mix(in srgb, var(--text-h) 12%, transparent),
    0 0 0 1px color-mix(in srgb, var(--border) 70%, transparent);
  transition: transform 0.22s cubic-bezier(0.22, 1, 0.36, 1);
  pointer-events: none;
  z-index: 0;
}

.site-header__station-mode-thumb--written {
  transform: translateX(100%);
}

.site-header__station-mode-option {
  position: relative;
  z-index: 1;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  align-self: stretch;
  width: 100%;
  height: 100%;
  min-height: 0;
  gap: 0;
  margin: 0;
  padding: 0;
  border: 0;
  border-radius: 9999px;
  background: transparent;
  color: var(--text-muted);
  cursor: pointer;
  line-height: 1;
  transition:
    color 0.15s ease,
    gap 0.28s cubic-bezier(0.22, 1, 0.36, 1),
    padding 0.28s cubic-bezier(0.22, 1, 0.36, 1);
}

.site-header__station-mode:hover .site-header__station-mode-option,
.site-header__station-mode:focus-within .site-header__station-mode-option {
  gap: 0.32rem;
  padding: 0 0.5rem;
}

.site-header__station-mode-option:hover {
  color: var(--text-h);
}

.site-header__station-mode-option--on {
  color: var(--text-h);
}

.site-header__station-mode-option:focus-visible {
  outline: var(--focus-ring-width) var(--focus-ring-style) var(--focus-ring-color);
  outline-offset: 2px;
}

.site-header__station-mode-option-art {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 1.15rem;
  height: 1.15rem;
  flex: 0 0 auto;
  line-height: 0;
}

.site-header__station-mode-art {
  display: block;
  width: 100%;
  height: 100%;
}

.site-header__station-mode-option-label {
  display: inline-flex;
  align-items: center;
  max-width: 0;
  margin: 0;
  overflow: hidden;
  font-size: 0.72rem;
  font-weight: 600;
  letter-spacing: 0.01em;
  line-height: 1;
  white-space: nowrap;
  opacity: 0;
  transition:
    max-width 0.28s cubic-bezier(0.22, 1, 0.36, 1),
    opacity 0.2s ease;
}

.site-header__station-mode:hover .site-header__station-mode-option-label,
.site-header__station-mode:focus-within .site-header__station-mode-option-label {
  max-width: 4.25rem;
  opacity: 1;
}

@media (max-width: 639px) {
  .site-header__station-mode:hover .site-header__station-mode-caption,
  .site-header__station-mode:focus-within .site-header__station-mode-caption {
    max-width: 3.25rem;
    padding: 0 0.2rem 0 0.55rem;
    opacity: 1;
  }

  .site-header__station-mode:hover .site-header__station-mode-switch,
  .site-header__station-mode:focus-within .site-header__station-mode-switch {
    width: 4.5rem;
    min-width: 4.5rem;
  }

  .site-header__station-mode:hover .site-header__station-mode-option,
  .site-header__station-mode:focus-within .site-header__station-mode-option {
    gap: 0;
    padding: 0;
  }

  .site-header__station-mode-option-label {
    display: none;
  }
}

@media (prefers-reduced-motion: reduce) {
  .site-header__station-mode-caption,
  .site-header__station-mode-switch,
  .site-header__station-mode-option,
  .site-header__station-mode-option-label,
  .site-header__station-mode-thumb {
    transition: none;
  }
}

.site-header__app-accessibility-trigger,
.site-header__builder-session-trigger {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  box-sizing: border-box;
  width: 2.12rem;
  height: calc(var(--site-header-slot-h) + 3px);
  margin: 0;
  padding: 1.5px;
  border: 1px solid var(--border);
  border-radius: 9999px;
  color: var(--text-muted);
  background: var(--element-bg);
  cursor: pointer;
  transition: color 0.15s ease;
}

.site-header__app-accessibility-trigger:hover,
.site-header__builder-session-trigger:hover {
  color: var(--text-h);
}

.site-header__app-accessibility--open .site-header__app-accessibility-trigger,
.site-header__builder-session--open .site-header__builder-session-trigger {
  color: var(--text);
}

.site-header__app-accessibility-trigger-icon,
.site-header__builder-session-trigger-icon {
  display: flex;
  width: 1.05rem;
  height: 1.05rem;
}

.site-header__app-accessibility-trigger-svg,
.site-header__builder-session-trigger-svg {
  width: 100%;
  height: 100%;
}

.site-header__app-accessibility-trigger:focus-visible,
.site-header__builder-session-trigger:focus-visible {
  outline: var(--focus-ring-width) var(--focus-ring-style) var(--focus-ring-color);
  outline-offset: var(--focus-ring-offset);
}

.site-header__app-accessibility-panel {
  position: absolute;
  top: calc(100% + 0.45rem);
  right: 0;
  z-index: 1200;
  min-width: 12.5rem;
  padding: 0.5rem 0.55rem;
  border: 1px solid var(--border);
  border-radius: 8px;
  background: var(--surface);
  box-shadow: var(--elevated-photo-shadow);
  opacity: 0;
  visibility: hidden;
  pointer-events: none;
  transform: translateY(4px);
  transition:
    opacity 0.12s ease,
    visibility 0.12s ease,
    transform 0.12s ease;
}

.site-header__app-accessibility--open .site-header__app-accessibility-panel,
.site-header__builder-session--open .site-header__app-accessibility-panel {
  opacity: 1;
  visibility: visible;
  pointer-events: auto;
  transform: translateY(0);
}

.site-header__app-accessibility:hover .site-header__control-hint,
.site-header__builder-session:hover .site-header__control-hint {
  opacity: 1;
  visibility: visible;
  transform: translateY(0);
}

.site-header__app-accessibility--open .site-header__control-hint,
.site-header__app-accessibility--open:hover .site-header__control-hint,
.site-header__app-accessibility--open:focus-within .site-header__control-hint,
.site-header__builder-session--open .site-header__control-hint,
.site-header__builder-session--open:hover .site-header__control-hint,
.site-header__builder-session--open:focus-within .site-header__control-hint {
  opacity: 0;
  visibility: hidden;
  transform: translateY(4px);
}

.site-header__app-accessibility--suppress-hint .site-header__control-hint,
.site-header__app-accessibility--suppress-hint:hover .site-header__control-hint,
.site-header__app-accessibility--suppress-hint:focus-within .site-header__control-hint,
.site-header__builder-session--suppress-hint .site-header__control-hint,
.site-header__builder-session--suppress-hint:hover .site-header__control-hint,
.site-header__builder-session--suppress-hint:focus-within .site-header__control-hint {
  opacity: 0;
  visibility: hidden;
  transform: translateY(4px);
}

.site-header__app-accessibility-row {
  display: grid;
  grid-template-columns: 1.2rem minmax(0, 1fr) 2.35rem;
  align-items: center;
  gap: 0.45rem 0.55rem;
  padding: 0.38rem 0.2rem;
}

.site-header__app-accessibility-row + .site-header__app-accessibility-row {
  border-top: 1px solid color-mix(in srgb, var(--border) 85%, transparent);
  margin-top: 0.12rem;
  padding-top: 0.5rem;
}

.site-header__app-accessibility-row-lead {
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  width: 1.2rem;
  height: 1.2rem;
  color: var(--text-h);
}

.site-header__app-accessibility-option-t {
  font-size: 0.95rem;
  font-weight: 700;
  line-height: 1;
  letter-spacing: -0.02em;
  font-family: system-ui, sans-serif;
}

.site-header__app-accessibility-option-svg {
  width: 1.05rem;
  height: 1.05rem;
}

.site-header__app-accessibility-row-label {
  font-size: 0.8rem;
  line-height: 1.25;
  color: var(--text);
}

.site-header__app-accessibility-row--only-new {
  grid-template-columns: 1.2rem minmax(0, 1fr) 4.15rem;
}

.site-header__app-accessibility-switch {
  position: relative;
  flex-shrink: 0;
  justify-self: end;
  width: 2.35rem;
  height: 1.28rem;
  margin: 0;
  padding: 0;
  border: 1px solid color-mix(in srgb, var(--border) 90%, var(--text-h));
  border-radius: 9999px;
  background: color-mix(in srgb, var(--text-h) 8%, var(--element-bg));
  box-shadow: inset 0 1px 1px color-mix(in srgb, var(--text-h) 6%, transparent);
  cursor: pointer;
  transition:
    background-color 0.24s cubic-bezier(0.22, 1, 0.36, 1),
    border-color 0.24s cubic-bezier(0.22, 1, 0.36, 1),
    box-shadow 0.24s cubic-bezier(0.22, 1, 0.36, 1);
}

.site-header__app-accessibility-switch:hover {
  border-color: color-mix(in srgb, var(--text-h) 35%, var(--border));
}

.site-header__app-accessibility-switch:focus-visible {
  outline: var(--focus-ring-width) var(--focus-ring-style) var(--focus-ring-color);
  outline-offset: 2px;
}

.site-header__app-accessibility-switch-thumb {
  position: absolute;
  top: 50%;
  left: 2px;
  width: 0.92rem;
  height: 0.92rem;
  border-radius: 50%;
  background: var(--surface);
  box-shadow: 0 1px 2px color-mix(in srgb, var(--text-h) 18%, transparent);
  transform: translateY(-50%);
  transition:
    transform 0.28s cubic-bezier(0.34, 1.35, 0.64, 1),
    box-shadow 0.24s ease;
  pointer-events: none;
}

.site-header__app-accessibility-switch--on {
  /* Same blue as directory / workspace choice card trim */
  background: var(--workspace-choice-card-accent, var(--trial-mic-accent, #2a6bc9));
  border-color: color-mix(
    in srgb,
    var(--workspace-choice-card-accent, var(--trial-mic-accent, #2a6bc9)) 72%,
    transparent
  );
  box-shadow:
    inset 0 1px 0 color-mix(in srgb, #fff 22%, transparent),
    0 0 0 1px color-mix(
      in srgb,
      var(--workspace-choice-card-accent, var(--trial-mic-accent, #2a6bc9)) 16%,
      transparent
    );
}

.site-header__app-accessibility-switch--on:hover {
  border-color: color-mix(
    in srgb,
    var(--workspace-choice-card-accent, var(--trial-mic-accent, #2a6bc9)) 88%,
    transparent
  );
  background: color-mix(
    in srgb,
    var(--workspace-choice-card-accent, var(--trial-mic-accent, #2a6bc9)) 90%,
    var(--text-h) 10%
  );
}

.site-header__app-accessibility-switch--on .site-header__app-accessibility-switch-thumb {
  transform: translate(1.05rem, -50%);
  box-shadow:
    0 1px 3px color-mix(in srgb, var(--text-h) 24%, transparent),
    0 0 0 1px color-mix(in srgb, var(--text-h) 6%, transparent);
}

@media (prefers-reduced-motion: reduce) {
  .site-header__app-accessibility-switch,
  .site-header__app-accessibility-switch-thumb {
    transition-duration: 0.01ms;
  }
}

.site-header__app-accessibility-switch--locked,
.site-header__app-accessibility-switch--locked:hover {
  opacity: 0.55;
  cursor: not-allowed;
  pointer-events: none;
  border-color: color-mix(in srgb, var(--border) 90%, var(--text-h));
  box-shadow: none;
}

.site-header__app-accessibility-row--locked .site-header__app-accessibility-row-label {
  opacity: 0.72;
}

.site-header__app-accessibility-row--locked {
  position: relative;
}

.site-header__builder-session-row-hint {
  position: absolute;
  top: calc(100% + 4px);
  right: 0;
  z-index: 1300;
  padding: 0.3rem 0.5rem;
  font-size: 0.72rem;
  font-weight: 500;
  line-height: 1.2;
  color: var(--text);
  background: var(--element-bg);
  border: 1px solid var(--border);
  border-radius: 6px;
  box-shadow: var(--elevated-photo-shadow);
  white-space: nowrap;
  opacity: 0;
  visibility: hidden;
  pointer-events: none;
  transform: translateY(2px);
  transition:
    opacity 0.15s ease,
    visibility 0.15s ease,
    transform 0.15s ease;
}

.site-header__app-accessibility-row--locked:hover .site-header__builder-session-row-hint,
.site-header__app-accessibility-row--locked:focus-within .site-header__builder-session-row-hint,
.site-header__builder-voice-row--min-selected:hover .site-header__builder-session-row-hint,
.site-header__builder-voice-row--min-selected:focus-within .site-header__builder-session-row-hint {
  opacity: 1;
  visibility: visible;
  transform: translateY(0);
}

.site-header__builder-session-panel {
  max-height: min(70vh, 28rem);
  overflow-x: hidden;
  overflow-y: auto;
  scrollbar-gutter: stable;
}

/* Raise the gear above the coachmark dimmer so the arrow can point at it. */
.site-header:has(.site-header__builder-session--coachmark) {
  z-index: 1020;
}

.site-header__builder-session--coachmark .site-header__builder-session-trigger {
  position: relative;
  z-index: 1;
  border-radius: 9999px;
  background: var(--surface);
  box-shadow:
    0 0 0 3px var(--surface),
    0 0 0 5px color-mix(in srgb, var(--text-h) 28%, transparent);
}

[data-theme='dark'] .site-header__builder-session--coachmark .site-header__builder-session-trigger {
  box-shadow:
    0 0 0 3px var(--surface),
    0 0 0 5px color-mix(in srgb, var(--text-h) 42%, transparent);
}

.site-header__builder-session--coachmark .site-header__control-hint,
.site-header__builder-session--coachmark .site-header__app-accessibility-panel {
  /* Keep the closed panel / hover hint out of the spotlight. */
  visibility: hidden !important;
  pointer-events: none !important;
}

/*
 * First-visit settings coachmark: dim page; callout points at the gear.
 * Backdrop stays below the elevated header (1020) so the gear stays visible;
 * callout is above the header so it is not clipped by opaque header chrome.
 */
.builder-settings-coachmark {
  pointer-events: none;
}

.builder-settings-coachmark__backdrop {
  position: fixed;
  inset: 0;
  z-index: 1015;
  margin: 0;
  padding: 0;
  border: none;
  border-radius: 0;
  background: var(--coachmark-scrim);
  /* Blocks clicks; does not dismiss — tip clears via Got it or opening the gear. */
  pointer-events: auto;
}

.builder-settings-coachmark__callout {
  /* Inline style sets position/top/left/width; keep above elevated header (1020). */
  z-index: 1030;
  box-sizing: border-box;
  padding: 1rem 1.05rem 1.05rem;
  border: 1px solid var(--border);
  border-radius: 12px;
  background: var(--surface);
  box-shadow: var(--elevated-photo-shadow);
  pointer-events: auto;
}

.builder-settings-coachmark__arrow {
  position: absolute;
  top: -8px;
  width: 14px;
  height: 14px;
  margin-left: -7px;
  border-top: 1px solid var(--border);
  border-left: 1px solid var(--border);
  background: var(--surface);
  transform: rotate(45deg);
}

.builder-settings-coachmark__body {
  margin: 0 0 0.85rem;
  font-size: 0.98rem;
  line-height: 1.45;
  color: var(--text-muted);
}

.builder-settings-coachmark__actions {
  display: flex;
  justify-content: flex-end;
}

.builder-settings-coachmark__btn {
  min-width: 5rem;
}

/* Second-visit tip: hover cards for statistics (signed-in). */
.builder-stats-hover-coachmark {
  position: fixed;
  inset: 0;
  z-index: 1015;
  pointer-events: none;
}

/* Transparent cutout: huge box-shadow dims the rest; events pass through to the card. */
.builder-stats-hover-coachmark__hole {
  position: fixed;
  z-index: 1015;
  border-radius: 14px;
  box-shadow: 0 0 0 9999px var(--coachmark-scrim);
  pointer-events: none;
}

.builder-stats-hover-coachmark__blocker {
  position: fixed;
  z-index: 1016;
  margin: 0;
  padding: 0;
  border: none;
  border-radius: 0;
  background: transparent;
  /* Blocks clicks outside the card; tip clears via Got it or hovering the card. */
  pointer-events: auto;
}

.builder-stats-hover-coachmark__blocker--top {
  top: 0;
  left: 0;
  right: 0;
}

.builder-stats-hover-coachmark__blocker--bottom {
  left: 0;
  right: 0;
  bottom: 0;
}

.builder-stats-hover-coachmark__blocker--left {
  left: 0;
}

.builder-stats-hover-coachmark__blocker--right {
  right: 0;
}

.builder-stats-hover-coachmark__callout {
  position: relative;
  z-index: 1017;
  box-sizing: border-box;
  padding: 1rem 1.05rem 1.05rem;
  border: 1px solid var(--border);
  border-radius: 12px;
  background: var(--surface);
  box-shadow: var(--elevated-photo-shadow);
  pointer-events: auto;
}

.builder-stats-hover-coachmark__arrow {
  position: absolute;
  top: -8px;
  width: 14px;
  height: 14px;
  margin-left: -7px;
  border-top: 1px solid var(--border);
  border-left: 1px solid var(--border);
  background: var(--surface);
  transform: rotate(45deg);
}

.builder-stats-hover-coachmark__arrow--below {
  top: auto;
  bottom: -8px;
  transform: rotate(225deg);
}

.builder-stats-hover-coachmark__body {
  margin: 0 0 0.85rem;
  font-size: 0.98rem;
  line-height: 1.45;
  color: var(--text-muted);
}

.builder-stats-hover-coachmark__actions {
  display: flex;
  justify-content: flex-end;
}

.builder-stats-hover-coachmark__btn {
  min-width: 5rem;
}

.site-header__builder-voice-row {
  grid-template-columns: minmax(0, 1fr) 2.35rem;
}

.site-header__builder-session-voices-loading {
  margin: 0;
  padding: 0.2rem 0.2rem;
  font-size: 0.75rem;
  color: var(--text);
  opacity: 0.75;
}

.site-header__fellowship-voices-panel {
  min-width: 11.5rem;
}

.site-header__workspace-mode-link {
  font-size: 0.85625rem;
  font-weight: 400;
  color: var(--text);
  text-decoration: none;
  white-space: nowrap;
  border-radius: 4px;
}

.site-header__workspace-mode-link--outlined {
  padding: 0.3rem 0.75rem;
  border: 1px solid color-mix(in srgb, var(--text-h) 28%, var(--border));
  border-radius: 9999px;
  font-weight: 600;
  color: var(--text-h);
}

.site-header__workspace-mode-link:hover {
  color: var(--text-interactive-hover);
  text-decoration: underline;
  text-underline-offset: 2px;
}

.site-header__workspace-mode-link--outlined:hover {
  color: var(--text-h);
  border-color: color-mix(in srgb, var(--text-h) 42%, var(--border));
  text-decoration: none;
}

.site-header__workspace-mode-link:focus-visible {
  outline: var(--focus-ring-width) var(--focus-ring-style) var(--focus-ring-color);
  outline-offset: var(--focus-ring-offset);
}

.site-header__workspace-mode-link--active {
  color: var(--text-h);
  font-weight: 600;
}

/* Workspace pages with a route title in the shared header */
.site-header--workspace-viva-builder .site-header__workspace-primary {
  grid-template-columns: 1fr auto 1fr;
  /* Centre logo (wordmark or mic), page title / feedback toggle, and theme + account on one axis */
  align-items: center;
}

.site-header--workspace-viva-builder .site-header__start {
  grid-column: 1;
  justify-self: start;
}

.site-header--workspace-viva-builder .site-header__page-title-slot {
  grid-column: 2;
  justify-self: center;
  min-width: 0;
}

.site-header__page-title-slot--with-nav {
  display: flex;
  align-items: center;
  gap: 0.75rem 1rem;
}

.site-header--workspace-viva-builder .site-header__end {
  grid-column: 3;
  justify-self: end;
  align-self: center;
}

.site-header__page-heading {
  margin: 0;
  font-family: var(--heading);
  font-weight: 600;
  font-size: 1.35rem;
  letter-spacing: -0.029em;
  line-height: 1.35;
  color: var(--text-h);
  text-align: center;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  max-width: min(55vw, 18rem);
}

/* /feedback — same affordance as former in-page title toggle */
.site-header__feedback-scope-toggle {
  margin: 0;
  padding: 0;
  max-width: 100%;
  appearance: none;
  background: none;
  border: none;
  border-radius: 6px;
  font: inherit;
  font-weight: inherit;
  font-size: inherit;
  letter-spacing: inherit;
  line-height: inherit;
  color: inherit;
  text-align: center;
  cursor: pointer;
  transition: color 0.2s ease;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.site-header__feedback-scope-toggle:hover {
  color: var(--text-interactive-hover);
}

.site-header__feedback-scope-toggle:focus-visible {
  outline: var(--focus-ring-width) var(--focus-ring-style) var(--focus-ring-color);
  outline-offset: var(--focus-ring-offset);
}

/* Workspace header account: icon + shared `.site-header__control-hint` label (see `WorkspaceUserAccount`) */
.site-header__user-account {
  position: relative;
  display: inline-flex;
  align-items: center;
  flex: 0 0 auto;
}

.site-header__user-account-trigger {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  box-sizing: border-box;
  width: 2.12rem;
  height: calc(var(--site-header-slot-h) + 3px);
  margin: 0;
  padding: 1.5px;
  border: 1px solid var(--border);
  border-radius: 9999px;
  color: var(--text-muted);
  background: var(--element-bg);
  cursor: pointer;
  transition: color 0.15s ease;
}

.site-header__user-account-trigger:hover {
  color: var(--text-h);
}

.site-header__user-account-trigger:focus-visible {
  outline: var(--focus-ring-width) var(--focus-ring-style) var(--focus-ring-color);
  outline-offset: var(--focus-ring-offset);
}

.site-header__user-account--open .site-header__user-account-trigger {
  color: var(--text);
}

.site-header__user-account-icon {
  display: flex;
  width: 1.05rem;
  height: 1.05rem;
}

.site-header__user-account-icon svg {
  width: 100%;
  height: 100%;
}

.site-header__user-account:hover .site-header__control-hint {
  opacity: 1;
  visibility: visible;
  transform: translateY(0);
}

.site-header__user-account--suppress-hint .site-header__control-hint,
.site-header__user-account--suppress-hint:hover .site-header__control-hint,
.site-header__user-account--suppress-hint:focus-within .site-header__control-hint {
  opacity: 0;
  visibility: hidden;
  transform: translateY(4px);
}

.site-header__user-account--open .site-header__control-hint,
.site-header__user-account--open:hover .site-header__control-hint,
.site-header__user-account--open:focus-within .site-header__control-hint {
  opacity: 0;
  visibility: hidden;
  transform: translateY(4px);
}

/* Workspace account: full-screen dimmed backdrop + large tile (see `WorkspaceUserAccount`) */
.account-modal {
  position: fixed;
  inset: 0;
  z-index: 1600;
  box-sizing: border-box;
}

.account-modal__backdrop {
  position: absolute;
  inset: 0;
  margin: 0;
  padding: 0;
  border: none;
  border-radius: 0;
  background: color-mix(in srgb, var(--text-h) 52%, transparent);
  cursor: pointer;
  -webkit-tap-highlight-color: transparent;
}

.account-modal__frame {
  position: absolute;
  inset: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  box-sizing: border-box;
  padding: max(1rem, env(safe-area-inset-top, 0px)) max(1rem, env(safe-area-inset-right, 0px))
    max(1rem, env(safe-area-inset-bottom, 0px)) max(1rem, env(safe-area-inset-left, 0px));
  pointer-events: none;
}

.account-modal__tile {
  pointer-events: auto;
  box-sizing: border-box;
  width: min(100%, min(92vw, 26rem));
  max-height: min(88vh, 40rem);
  overflow-x: hidden;
  overflow-y: auto;
  overscroll-behavior: contain;
  padding: 0.85rem 0.95rem 0.95rem;
  border: 1px solid color-mix(in srgb, var(--border) 85%, transparent);
  border-radius: 16px;
  background: color-mix(in srgb, var(--surface) 92%, white);
  box-shadow:
    0 18px 48px color-mix(in srgb, var(--text-h) 18%, transparent),
    0 1px 0 color-mix(in srgb, #fff 55%, transparent) inset;
  backdrop-filter: blur(10px);
}

.account-modal__toolbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.75rem;
  margin-bottom: 0.75rem;
}

.account-modal__title {
  margin: 0;
  font-family: var(--heading);
  font-size: 0.95rem;
  font-weight: 600;
  letter-spacing: 0.01em;
  color: var(--text-h);
}

.account-modal__close {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 1.85rem;
  height: 1.85rem;
  margin: 0;
  padding: 0;
  border: 1px solid transparent;
  border-radius: 999px;
  font: inherit;
  font-size: 1.25rem;
  line-height: 1;
  color: var(--text-muted);
  background: color-mix(in srgb, var(--text-h) 4%, transparent);
  cursor: pointer;
  transition: color 0.15s ease, border-color 0.15s ease, background 0.15s ease;
}

.account-modal__close:hover {
  color: var(--text-h);
  background: color-mix(in srgb, var(--text-h) 8%, transparent);
}

.account-modal__close:focus,
.account-modal__close:focus-visible {
  outline: none;
}

.account-modal__body {
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
  align-items: stretch;
  min-width: 0;
  width: 100%;
  box-sizing: border-box;
}

.account-modal__body--editing .account-modal__identity {
  justify-content: flex-start;
}

.account-modal__identity {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  min-width: 0;
}

.account-modal__identity-text {
  min-width: 0;
  flex: 1;
  display: flex;
  flex-direction: column;
  gap: 0.15rem;
}

.account-modal__name {
  margin: 0;
  font-size: 1.05rem;
  font-weight: 650;
  line-height: 1.2;
  color: var(--text-h);
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.account-modal__email {
  margin: 0;
  font-size: 0.8rem;
  line-height: 1.3;
  color: var(--text-muted);
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.account-modal__pass-row {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.3rem 0.45rem;
  margin-top: 0.3rem;
}

.account-modal__pass-label {
  font-size: 0.72rem;
  font-weight: 650;
  letter-spacing: 0.01em;
  color: var(--text-h);
  padding: 0.18rem 0.45rem;
  border-radius: 999px;
  background: color-mix(in srgb, var(--accent, #2563eb) 12%, transparent);
  border: 1px solid color-mix(in srgb, var(--accent, #2563eb) 22%, var(--border));
}

.account-modal__pass-ends {
  font-size: 0.72rem;
  color: var(--text-muted);
}

@media (max-width: 520px) {
  .account-modal__identity {
    align-items: flex-start;
  }

  .account-modal__meta-grid,
  .account-modal__edit-grid {
    grid-template-columns: minmax(0, 1fr);
  }

  .account-modal__edit-grid .account-modal__field--half {
    grid-column: 1 / -1;
  }
}

.account-modal__photo-wrap {
  flex-shrink: 0;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0.2rem;
}

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

.account-modal__photo-button {
  position: relative;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0.2rem;
  padding: 0;
  border: none;
  background: none;
  cursor: pointer;
  color: inherit;
}

.account-modal__photo-button:focus {
  outline: none;
}

.account-modal__photo-button:focus-visible .account-modal__photo,
.account-modal__photo-button:focus-visible .account-modal__photo--placeholder {
  box-shadow: 0 0 0 3px color-mix(in srgb, var(--accent) 26%, transparent);
}

.account-modal__photo-button:disabled {
  cursor: not-allowed;
  opacity: 0.72;
}

.account-modal__photo-hint {
  font-size: 0.65rem;
  font-weight: 600;
  letter-spacing: 0.02em;
  text-transform: uppercase;
  color: var(--text-muted);
}

.account-modal__photo-button:hover:not(:disabled) .account-modal__photo-hint,
.account-modal__photo-button:focus-visible .account-modal__photo-hint {
  color: var(--text-interactive-hover);
}

.account-modal__photo-error {
  margin: 0;
  max-width: 12rem;
  font-size: 0.75rem;
  line-height: 1.35;
  text-align: center;
  color: #7f1d1d;
}

.account-modal__photo {
  display: block;
  width: 3.6rem;
  height: 3.6rem;
  border-radius: 9999px;
  object-fit: cover;
  border: 1px solid var(--border);
  background: var(--element-bg);
}

.account-modal__photo--placeholder {
  display: flex;
  align-items: center;
  justify-content: center;
}

.account-modal__photo-initials {
  font-size: 0.95rem;
  font-weight: 600;
  color: var(--text-h);
  letter-spacing: 0.03em;
}

.account-modal__fields {
  margin: 0;
  display: flex;
  flex-direction: column;
  gap: 0.65rem;
  min-width: 0;
  width: 100%;
  box-sizing: border-box;
}

.account-modal__edit-grid,
.account-modal__meta-grid {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
  gap: 0.5rem 0.55rem;
  width: 100%;
  min-width: 0;
  box-sizing: border-box;
  padding: 0.55rem 0.65rem;
  border-radius: 12px;
  background: color-mix(in srgb, var(--text-h) 3.5%, transparent);
  border: 1px solid color-mix(in srgb, var(--border) 80%, transparent);
}

.account-modal__edit-grid .account-modal__field--full {
  grid-column: 1 / -1;
  min-width: 0;
}

.account-modal__edit-grid .account-modal__field--half {
  min-width: 0;
}

.account-modal__field {
  margin: 0;
  min-width: 0;
  max-width: 100%;
}

.account-modal__dt {
  margin: 0 0 0.12rem;
  font-size: 0.65rem;
  font-weight: 650;
  letter-spacing: 0.05em;
  text-transform: uppercase;
  color: var(--text-muted);
}

.account-modal__dd {
  margin: 0;
  font-size: 0.875rem;
  line-height: 1.3;
  color: var(--text);
  word-break: break-word;
}

.account-modal__input {
  display: block;
  box-sizing: border-box;
  width: 100%;
  max-width: 100%;
  min-width: 0;
  margin: 0;
  padding: 0.45rem 0.6rem;
  border: 1px solid var(--border);
  border-radius: 8px;
  font: inherit;
  font-size: 0.875rem;
  color: var(--text);
  background: var(--element-bg);
}

.account-modal__input:focus {
  outline: none;
  border-color: color-mix(in srgb, var(--accent) 45%, var(--border));
  box-shadow: 0 0 0 3px color-mix(in srgb, var(--accent) 18%, transparent);
}

.account-modal__profile-error {
  margin-top: 0.5rem;
  max-width: none;
  text-align: left;
}

.account-modal__profile-success {
  margin: 0.5rem 0 0;
  font-size: 0.8125rem;
  line-height: 1.4;
  color: #166534;
}

.account-modal__empty {
  color: var(--text-muted);
  font-style: italic;
}

.account-modal__hint {
  margin: 0.25rem 0 0;
  font-size: 0.75rem;
  line-height: 1.35;
  color: var(--text-muted);
}

.account-modal__referral {
  display: flex;
  flex-direction: column;
  gap: 0.4rem;
  padding: 0.6rem 0.7rem;
  border-radius: 12px;
  border: 1px solid color-mix(in srgb, var(--border) 80%, transparent);
  background: color-mix(in srgb, var(--text-h) 3%, transparent);
}

.account-modal__referral-top {
  display: flex;
  flex-direction: column;
  gap: 0.3rem;
}

.account-modal__referral-code-row {
  display: flex;
  align-items: center;
  gap: 0.4rem;
  min-width: 0;
}

.account-modal__referral-code {
  flex: 1;
  min-width: 0;
  font-family: ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, monospace;
  font-size: 0.85rem;
  font-weight: 650;
  letter-spacing: 0.05em;
  padding: 0.28rem 0.5rem;
  border-radius: 8px;
  background: var(--element-bg, #fff);
  border: 1px solid var(--border);
  overflow: hidden;
  text-overflow: ellipsis;
}

.account-modal__referral-copy {
  flex: 0 0 auto;
  font: inherit;
  font-size: 0.7rem;
  font-weight: 650;
  letter-spacing: 0.03em;
  text-transform: uppercase;
  color: var(--text-h);
  cursor: pointer;
  padding: 0.32rem 0.55rem;
  border-radius: 8px;
  border: 1px solid var(--border);
  background: color-mix(in srgb, var(--text-h) 4%, transparent);
}

.account-modal__referral-copy:hover {
  color: var(--text-interactive-hover);
  border-color: color-mix(in srgb, var(--text-h) 28%, var(--border));
}

.account-modal__cash-slots {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.65rem;
  padding: 0.25rem 0.15rem;
}

.account-modal__cash {
  flex: 1;
  display: inline-block;
  text-align: center;
  font-size: 1.35rem;
  line-height: 1;
  transition: filter 0.2s ease, opacity 0.2s ease, transform 0.2s ease;
}

.account-modal__cash--empty {
  filter: grayscale(1) saturate(0);
  opacity: 0.42;
  -webkit-filter: grayscale(1) saturate(0);
}

.account-modal__cash--filled {
  filter: none;
  opacity: 1;
  transform: translateY(-1px);
}

.account-modal__referral-hint {
  margin: 0;
  font-size: 0.7rem;
  line-height: 1.35;
  color: var(--text-muted);
}

.account-modal__upgrade {
  flex: 0 0 auto;
  font-size: 0.68rem;
  font-weight: 650;
  letter-spacing: 0.03em;
  text-transform: uppercase;
  color: var(--text-h);
  text-decoration: none;
  white-space: nowrap;
  padding: 0.2rem 0.45rem;
  border-radius: 999px;
  border: 1px solid var(--border);
  background: color-mix(in srgb, var(--text-h) 5%, transparent);
}

.account-modal__upgrade:hover {
  color: var(--text-interactive-hover);
  border-color: color-mix(in srgb, var(--text-h) 28%, var(--border));
  text-decoration: none;
}

.account-modal__upgrade:focus,
.account-modal__upgrade:focus-visible {
  outline: none;
}

.account-modal__actions {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: flex-end;
  gap: 0.4rem 0.5rem;
  margin-top: 0.85rem;
  padding-top: 0.75rem;
  border-top: 1px solid color-mix(in srgb, var(--border) 75%, transparent);
}

.account-modal__field--toggle {
  margin-top: 0.1rem;
}

.account-modal__toggle {
  display: flex;
  align-items: flex-start;
  gap: 0.55rem;
  cursor: pointer;
  padding: 0.45rem 0.55rem;
  border-radius: 10px;
  border: 1px solid color-mix(in srgb, var(--border) 80%, transparent);
  background: color-mix(in srgb, var(--text-h) 2.5%, transparent);
}

.account-modal__toggle-input {
  margin: 0.2rem 0 0;
  width: 1rem;
  height: 1rem;
  flex-shrink: 0;
  accent-color: var(--text-h, #111);
  color-scheme: dark;
}

.account-modal__toggle-copy {
  display: flex;
  flex-direction: column;
  gap: 0.2rem;
  min-width: 0;
}

.account-modal__toggle-title {
  font-size: 0.82rem;
  font-weight: 650;
  color: var(--text-h);
}

.account-modal__toggle-hint {
  font-size: 0.7rem;
  line-height: 1.35;
  color: var(--text-muted);
}

.account-modal__frame--confirm {
  /* Keep full-viewport flex centering; constrain the dialog tile, not the frame. */
  width: 100%;
  max-width: none;
}

.account-modal__tile--confirm {
  width: min(100%, min(92vw, 28rem));
  max-height: none;
  padding: 1.35rem 1.4rem 1.15rem;
  text-align: center;
}

.account-modal__tile--confirm .account-modal__actions {
  justify-content: center;
}

.account-modal__confirm-copy {
  margin: 0.75rem 0 0;
  font-size: 0.95rem;
  line-height: 1.5;
  color: var(--text);
  text-wrap: pretty;
}

.account-modal--confirm {
  z-index: 1700;
}

.account-modal__btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 2.05rem;
  padding: 0.35rem 0.85rem;
  border-radius: 9px;
  font: inherit;
  font-size: 0.82rem;
  font-weight: 550;
  cursor: pointer;
  transition:
    color 0.15s ease,
    background 0.15s ease,
    border-color 0.15s ease;
}

.account-modal__btn--secondary {
  border: 1px solid var(--border);
  color: var(--text);
  background: var(--element-bg);
}

.account-modal__btn--secondary:hover {
  border-color: color-mix(in srgb, var(--text-h) 22%, var(--border));
  color: var(--text-h);
}

.account-modal__btn--secondary:focus,
.account-modal__btn--secondary:focus-visible {
  outline: none;
}

.account-modal__btn--primary {
  border: 1px solid color-mix(in srgb, var(--accent) 55%, var(--border));
  color: var(--text-h);
  background: color-mix(in srgb, var(--accent) 14%, var(--element-bg));
}

.account-modal__btn--primary:hover:not(:disabled) {
  border-color: color-mix(in srgb, var(--accent) 70%, var(--border));
  background: color-mix(in srgb, var(--accent) 22%, var(--element-bg));
}

.account-modal__btn--primary:disabled {
  cursor: not-allowed;
  opacity: 0.72;
}

.account-modal__btn--primary:focus,
.account-modal__btn--primary:focus-visible {
  outline: none;
}

.account-modal__btn--danger {
  border: 1px solid color-mix(in srgb, #c53030 45%, var(--border));
  color: #c53030;
  background: color-mix(in srgb, #c53030 6%, transparent);
}

.account-modal__btn--danger:hover {
  background: color-mix(in srgb, #c53030 12%, transparent);
}

.account-modal__btn--danger:focus,
.account-modal__btn--danger:focus-visible {
  outline: none;
}

/* Avatar crop modal (opens above account modal) */
.avatar-crop-modal {
  position: fixed;
  inset: 0;
  z-index: 1700;
  box-sizing: border-box;
}

.avatar-crop-modal__backdrop {
  position: absolute;
  inset: 0;
  margin: 0;
  padding: 0;
  border: none;
  border-radius: 0;
  background: color-mix(in srgb, var(--text-h) 58%, transparent);
  cursor: pointer;
  -webkit-tap-highlight-color: transparent;
}

.avatar-crop-modal__backdrop:disabled {
  cursor: not-allowed;
}

.avatar-crop-modal__frame {
  position: absolute;
  inset: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  box-sizing: border-box;
  padding: max(1rem, env(safe-area-inset-top, 0px)) max(1rem, env(safe-area-inset-right, 0px))
    max(1rem, env(safe-area-inset-bottom, 0px)) max(1rem, env(safe-area-inset-left, 0px));
  pointer-events: none;
}

.avatar-crop-modal__tile {
  pointer-events: auto;
  box-sizing: border-box;
  width: min(100%, min(92vw, 28rem));
  max-height: min(92vh, 40rem);
  overflow: auto;
  overscroll-behavior: contain;
  padding: 1.15rem 1.2rem 1.25rem;
  border: 1px solid var(--border);
  border-radius: 12px;
  background: var(--surface);
  box-shadow: var(--elevated-photo-shadow);
}

.avatar-crop-modal__toolbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.75rem;
  margin-bottom: 0.65rem;
}

.avatar-crop-modal__title {
  margin: 0;
  font-family: var(--heading);
  font-size: 1.15rem;
  font-weight: 600;
  color: var(--text-h);
}

.avatar-crop-modal__close {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 2.25rem;
  height: 2.25rem;
  margin: 0;
  padding: 0;
  border: 1px solid transparent;
  border-radius: 8px;
  font: inherit;
  font-size: 1.5rem;
  line-height: 1;
  color: var(--text-muted);
  background: transparent;
  cursor: pointer;
  transition: color 0.15s ease, border-color 0.15s ease, background 0.15s ease;
}

.avatar-crop-modal__close:hover:not(:disabled) {
  color: var(--text-h);
  background: color-mix(in srgb, var(--text-h) 6%, transparent);
}

.avatar-crop-modal__close:disabled {
  cursor: not-allowed;
  opacity: 0.72;
}

.avatar-crop-modal__close:focus-visible {
  outline: var(--focus-ring-width) var(--focus-ring-style) var(--focus-ring-color);
  outline-offset: var(--focus-ring-offset);
}

.avatar-crop-modal__hint {
  margin: 0 0 0.85rem;
  font-size: 0.8125rem;
  line-height: 1.4;
  color: var(--text-muted);
}

.avatar-crop-modal__crop-area {
  position: relative;
  width: 100%;
  height: min(52vw, 18rem);
  margin-bottom: 0.85rem;
  border-radius: 10px;
  overflow: hidden;
  background: var(--element-bg);
  border: 1px solid var(--border);
}

.avatar-crop-modal__zoom-label {
  display: block;
  margin-bottom: 0.35rem;
  font-size: 0.72rem;
  font-weight: 600;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  color: var(--text-muted);
}

.avatar-crop-modal__zoom {
  display: block;
  width: 100%;
  margin: 0 0 0.85rem;
  accent-color: var(--accent);
}

.avatar-crop-modal__error {
  margin: 0 0 0.85rem;
  font-size: 0.8125rem;
  line-height: 1.35;
  color: #7f1d1d;
}

.avatar-crop-modal__actions {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: flex-end;
  gap: 0.5rem 0.65rem;
  padding-top: 0.15rem;
}

.avatar-crop-modal__btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 2.35rem;
  padding: 0.4rem 1rem;
  border-radius: 8px;
  font: inherit;
  font-size: 0.9rem;
  font-weight: 500;
  cursor: pointer;
  transition:
    color 0.15s ease,
    background 0.15s ease,
    border-color 0.15s ease;
}

.avatar-crop-modal__btn:disabled {
  cursor: not-allowed;
  opacity: 0.72;
}

.avatar-crop-modal__btn--secondary {
  border: 1px solid var(--border);
  color: var(--text);
  background: var(--element-bg);
}

.avatar-crop-modal__btn--secondary:hover:not(:disabled) {
  border-color: color-mix(in srgb, var(--text-h) 22%, var(--border));
  color: var(--text-h);
}

.avatar-crop-modal__btn--primary {
  border: 1px solid color-mix(in srgb, var(--accent) 55%, var(--border));
  color: var(--surface);
  background: var(--accent);
}

.avatar-crop-modal__btn--primary:hover:not(:disabled) {
  background: color-mix(in srgb, var(--accent) 88%, var(--text-h));
}

.avatar-crop-modal__btn:focus-visible {
  outline: var(--focus-ring-width) var(--focus-ring-style) var(--focus-ring-color);
  outline-offset: var(--focus-ring-offset);
}

@media (max-width: 720px) {
  .site-header__workspace-primary {
    grid-template-columns: 1fr auto;
    grid-template-rows: auto auto;
    row-gap: 0.35rem;
  }

  /* Let the logo link shrink so wordmark can ellipsis beside the mic */
  .site-header--workspace .site-header__start {
    min-width: 0;
  }

  .site-header--workspace:not(.site-header--workspace-viva-builder) .site-header__start {
    grid-column: 1;
    grid-row: 1;
  }

  .site-header--workspace:not(.site-header--workspace-viva-builder) .site-header__end {
    grid-column: 2;
    grid-row: 1;
  }

  .site-header--workspace:not(.site-header--workspace-viva-builder) .site-header__workspace-modes {
    grid-column: 1 / -1;
    grid-row: 2;
    justify-self: center;
  }

  .site-header__workspace-primary--no-center {
    grid-template-rows: auto;
    row-gap: 0;
  }

  .site-header__workspace-primary--no-center .site-header__start {
    grid-column: 1;
    grid-row: 1;
  }

  .site-header__workspace-primary--no-center .site-header__end {
    grid-column: 2;
    grid-row: 1;
  }

  .site-header--workspace-viva-builder .site-header__workspace-primary {
    grid-template-columns: 1fr auto;
    grid-template-rows: auto auto;
    row-gap: 0.35rem;
    align-items: center;
  }

  .site-header--workspace-viva-builder .site-header__start {
    grid-column: 1;
    grid-row: 1;
  }

  .site-header--workspace-viva-builder .site-header__end {
    grid-column: 2;
    grid-row: 1;
    align-self: center;
  }

  .site-header--workspace-viva-builder:not(.site-header--workspace-feedback)
    .site-header__page-title-slot {
    grid-column: 1 / -1;
    grid-row: 2;
    justify-self: center;
  }

  /* /feedback — one row with mic | Feedback (ellipsis) | theme + account */
  .site-header--workspace-viva-builder.site-header--workspace-feedback
    .site-header__workspace-primary {
    grid-template-columns: auto minmax(0, 1fr) auto;
    grid-template-rows: auto;
    row-gap: 0;
    align-items: center;
  }

  .site-header--workspace-viva-builder.site-header--workspace-feedback
    .site-header__start {
    grid-column: 1;
    grid-row: 1;
  }

  .site-header--workspace-viva-builder.site-header--workspace-feedback
    .site-header__page-title-slot {
    grid-column: 2;
    grid-row: 1;
    justify-self: stretch;
    min-width: 0;
    width: 100%;
    max-width: 100%;
  }

  .site-header--workspace-viva-builder.site-header--workspace-feedback
    .site-header__end {
    grid-column: 3;
    grid-row: 1;
    flex-shrink: 0;
  }

  .site-header--workspace-viva-builder.site-header--workspace-feedback
    .site-header__page-heading--feedback {
    max-width: 100%;
    width: 100%;
    min-width: 0;
    text-align: center;
  }

  .site-header--workspace-viva-builder.site-header--workspace-feedback
    .site-header__feedback-scope-toggle {
    display: block;
    width: 100%;
    min-width: 0;
    box-sizing: border-box;
  }

  .site-header__page-title-slot--with-nav {
    flex-wrap: wrap;
    justify-content: center;
  }

  .site-header__page-heading {
    max-width: min(92vw, 20rem);
    font-size: clamp(1.1rem, 4.5vw, 1.35rem);
  }
}

.site-logo {
  font-size: 0.9375rem;
  font-weight: 600;
  color: var(--text-h);
  text-decoration: none;
  display: inline-flex;
  align-items: center;
  justify-content: flex-start;
  gap: 0.35rem;
  min-width: 0;
}

.site-logo:hover {
  color: var(--text-interactive-hover);
}

.site-logo__mark-icon {
  display: inline-flex;
  flex-shrink: 0;
  align-items: center;
  justify-content: center;
  line-height: 0;
}

.site-logo__mark-svg {
  width: 1.2rem;
  height: 1.35rem;
  display: block;
}

.site-logo__wordmark {
  display: inline-block;
  overflow: hidden;
  white-space: nowrap;
  transition:
    max-width 0.5s cubic-bezier(0.22, 1, 0.36, 1),
    opacity 0.24s ease,
    transform 0.5s cubic-bezier(0.22, 1, 0.36, 1);
}

@media (max-width: 720px) {
  .site-logo--compact-mark .site-logo__wordmark {
    max-width: 0;
    opacity: 0;
    transform: translateX(-0.25rem);
  }

  .site-logo--compact-mark:hover .site-logo__wordmark,
  .site-logo--compact-mark:focus-visible .site-logo__wordmark,
  .site-logo--compact-mark:focus-within .site-logo__wordmark {
    max-width: 9rem;
    opacity: 1;
    transform: translateX(0);
  }

  /* Same outer height as `.site-header__signin` so the mic lines up with the pill row */
  .site-header--marketing .site-logo--compact-mark {
    min-height: calc(var(--site-header-slot-h) + 3px);
    box-sizing: border-box;
  }
}

@media (prefers-reduced-motion: reduce) {
  .site-header__center,
  .site-logo__wordmark {
    transition: opacity 0.15s ease;
    transform: none;
  }

  .site-logo--compact-mark .site-logo__wordmark,
  .site-logo--compact-mark:hover .site-logo__wordmark,
  .site-logo--compact-mark:focus-visible .site-logo__wordmark,
  .site-logo--compact-mark:focus-within .site-logo__wordmark {
    transform: none;
  }
}

/* Feedback header title: shorter label, smaller type; toggle unchanged */
.site-header__page-heading--feedback {
  font-size: clamp(0.92rem, 3vw, 1.2rem);
  line-height: 1.25;
  max-width: min(40vw, 9rem);
}

.site-header__page-heading--feedback .site-header__feedback-scope-toggle {
  font-size: inherit;
}

/*
 * Sign in: same outer height as college picker (slot 1.62rem + 2×2px padding),
 * same colours and type as primary pill CTAs (.btn--primary).
 */
.site-header__signin {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  margin: 0;
  box-sizing: border-box;
  height: calc(var(--site-header-slot-h) + 3px);
  min-height: calc(var(--site-header-slot-h) + 3px);
  padding: 0 0.68rem;
  border: none;
  border-radius: 9999px;
  font: inherit;
  font-size: 0.925rem;
  font-weight: 600;
  line-height: 1.2;
  text-decoration: none;
  color: var(--cta-pill-fg);
  background: var(--cta-pill-bg);
  box-shadow: none;
  cursor: pointer;
  transition:
    background 0.28s ease,
    color 0.2s ease;
}

.site-header__signin:hover {
  color: var(--cta-pill-fg-hover);
  background: var(--cta-pill-bg-hover);
}

.site-header__signin:focus-visible {
  outline: var(--focus-ring-width) var(--focus-ring-style) var(--focus-ring-color);
  outline-offset: var(--focus-ring-offset);
}

/* Reserves one row in the header; pill grows downward from this corner (does not change header height) */
.site-college-picker-anchor {
  --site-college-slot-h: var(--site-header-slot-h);

  position: relative;
  flex: 0 0 auto;
  width: 2.12rem;
  height: calc(var(--site-college-slot-h) + 3px);
  margin-right: 0.35rem;
  box-sizing: border-box;
  overflow: visible;
}

/* Segmented vertical pill — same top/left when collapsed or open so it expands & retracts in place */
.site-college-picker {
  display: inline-flex;
  flex-direction: column;
  align-items: stretch;
  width: 100%;
  padding: 1.5px;
  border-radius: 9999px;
  border: 1px solid var(--border);
  background: var(--element-bg);
  box-sizing: border-box;
}

.site-college-picker--collapsed,
.site-college-picker--open {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  transform: none;
}

.site-college-picker--collapsed {
  justify-content: flex-start;
  gap: 0;
}

.site-college-picker--open {
  z-index: 1100;
  justify-content: flex-start;
  gap: 1px;
  box-shadow: var(--elevated-photo-shadow);
}

.site-college-picker__slot {
  flex-shrink: 0;
  display: flex;
  justify-content: center;
  overflow: hidden;
  max-height: var(--site-college-slot-h);
  opacity: 1;
  transition:
    max-height 0.34s cubic-bezier(0.33, 1, 0.68, 1),
    opacity 0.26s ease;
}

.site-college-picker--collapsed .site-college-picker__slot:not(.site-college-picker__slot--active) {
  max-height: 0;
  min-height: 0;
  opacity: 0;
  pointer-events: none;
}

.site-college-picker--collapsed .site-college-picker__slot--active {
  max-height: var(--site-college-slot-h);
}

.site-college-picker__btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  margin: 0;
  padding: 0.2rem 0.28rem;
  border: none;
  border-radius: 9999px;
  background: transparent;
  color: var(--text-muted);
  cursor: pointer;
  transition: color 0.15s ease;
}

.site-college-picker__btn:hover:not(.site-college-picker__btn--active) {
  color: var(--text-h);
}

.site-college-picker__btn:focus-visible {
  outline: var(--focus-ring-width) var(--focus-ring-style) var(--focus-ring-color);
  outline-offset: var(--focus-ring-offset);
}

.site-college-picker__btn--active {
  color: var(--text);
  background: transparent;
  box-shadow: none;
}

.site-college-picker__icon {
  display: flex;
  width: 1.05rem;
  height: 1.05rem;
}

.site-college-picker__icon svg {
  width: 100%;
  height: 100%;
}

.site-college-picker__tooltip {
  position: absolute;
  top: calc(100% + 6px);
  right: 0;
  z-index: 1200;
  padding: 0.35rem 0.55rem;
  font-size: 0.75rem;
  font-weight: 500;
  line-height: 1.2;
  color: var(--text);
  background: var(--element-bg);
  border: 1px solid var(--border);
  border-radius: 6px;
  box-shadow: var(--elevated-photo-shadow);
  white-space: nowrap;
  opacity: 0;
  visibility: hidden;
  pointer-events: none;
  transform: translateY(4px);
  transition:
    opacity 0.15s ease,
    visibility 0.15s ease,
    transform 0.15s ease;
}

.site-college-picker-anchor:hover .site-college-picker__tooltip,
.site-college-picker-anchor:focus-within .site-college-picker__tooltip {
  opacity: 1;
  visibility: visible;
  transform: translateY(0);
}

/* After click opens the menu, hide the hint even if pointer is still over the anchor */
.site-college-picker-anchor:has(.site-college-picker--open) .site-college-picker__tooltip {
  opacity: 0;
  visibility: hidden;
  transform: translateY(4px);
}

/* After choosing an option, hide hint until pointer leaves or focus leaves the anchor */
.site-college-picker-anchor--suppress-hint .site-college-picker__tooltip,
.site-college-picker-anchor--suppress-hint:hover .site-college-picker__tooltip,
.site-college-picker-anchor--suppress-hint:focus-within .site-college-picker__tooltip {
  opacity: 0;
  visibility: hidden;
  transform: translateY(4px);
}

/* Footer (and shared pattern with header college picker): segmented control in a pill */
.theme-toggle {
  display: inline-flex;
  align-items: center;
  padding: 2px;
  border-radius: 9999px;
  border: 1px solid var(--border);
  background: var(--element-bg);
  gap: 1px;
}

.theme-toggle__btn {
  margin: 0;
  padding: 0.2rem 0.28rem;
  border: none;
  border-radius: 9999px;
  font: inherit;
  color: var(--text-muted);
  background: transparent;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  transition:
    color 0.15s ease,
    background 0.15s ease,
    box-shadow 0.15s ease;
}

.theme-toggle__btn:hover:not(.theme-toggle__btn--active) {
  color: var(--text-h);
  background: color-mix(in srgb, var(--text-h) 9%, transparent);
}

.theme-toggle__btn:focus-visible {
  outline: var(--focus-ring-width) var(--focus-ring-style) var(--focus-ring-color);
  outline-offset: var(--focus-ring-offset);
}

.theme-toggle__btn--active {
  color: var(--toggle-selected-fg);
  background: var(--toggle-selected-bg);
  box-shadow: var(--toggle-selected-shadow);
  transition: none;
}

.theme-toggle__icon {
  display: flex;
  width: 1.15rem;
  height: 1.15rem;
}

.theme-toggle__svg {
  width: 100%;
  height: 100%;
}

.site-footer-bar {
  flex-shrink: 0;
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 1rem 1.5rem;
  margin-left: calc(-1 * (var(--page-inline) + env(safe-area-inset-left, 0px)));
  margin-right: calc(-1 * (var(--page-inline) + env(safe-area-inset-right, 0px)));
  padding: 1.25rem calc(var(--page-inline) + env(safe-area-inset-right, 0px)) 1.5rem
    calc(var(--page-inline) + env(safe-area-inset-left, 0px));
  background: var(--bg);
}

.site-footer-bar--in-index {
  margin-inline: 0;
  margin-top: 2rem;
  padding: 1.25rem 0 0;
  background: transparent;
}

.site-footer-bar__legal {
  display: flex;
  flex-direction: column;
  gap: 0.2rem;
}

.site-footer-bar__copyright,
.site-footer-bar__abn {
  margin: 0;
  font-size: 0.83125rem;
  color: var(--text-muted);
}

.site-main {
  flex: 1;
  display: flex;
  flex-direction: column;
  min-height: 0;
  /* Fixed header + prior top gap; content scrolls under header */
  padding-top: calc(2rem + var(--site-header-clearance) + env(safe-area-inset-top, 0px));
  padding-right: calc(var(--page-inline) + env(safe-area-inset-right, 0px));
  padding-bottom: 0;
  padding-left: calc(var(--page-inline) + env(safe-area-inset-left, 0px));
}

/* viva-builder ?embed=1 — no workspace header; drop main top padding that assumed fixed header */
.layout--workspace-no-header .site-main {
  padding-top: max(1rem, env(safe-area-inset-top, 0px));
}

/* Marketing preview iframes: header is decorative; only the theme toggle stays interactive. */
.layout:has(.site-header--marketing-iframe-embed) {
  --page-inline-factor: 1;
}

/* Narrow marketing iframe (`embedMobile=1`): minimal horizontal inset inside scaled chrome. */
.layout:has(.site-header--marketing-iframe-embed).layout--marketing-embed-mobile {
  --page-inline: 4px;
}

.layout:has(.site-header--marketing-iframe-embed).layout--marketing-embed-mobile .site-main {
  padding-top: calc(var(--site-header-chrome-h) + env(safe-area-inset-top, 0px));
  padding-inline: 4px;
}

.site-header--marketing-iframe-embed .site-header__start,
.site-header--marketing-iframe-embed .site-header__page-title-slot,
.site-header--marketing-iframe-embed .site-header__end > :not(.site-header__theme-slot),
.site-header--marketing-iframe-embed
  .site-header__theme-slot
  > :not(.site-college-picker-anchor) {
  pointer-events: none;
  cursor: default;
}

.site-header--marketing-iframe-embed .site-header__theme-slot .site-college-picker-anchor,
.site-header--marketing-iframe-embed .site-header__theme-slot .site-college-picker-anchor * {
  cursor: pointer;
}

/* Homepage marketing embed (`embedHomeUi=1`): header omitted — keep content flush. */
.layout--home-ui-embed.layout--workspace-no-header .site-main {
  padding-top: max(0.5rem, env(safe-area-inset-top, 0px));
}

/* Fellowship catalogue preview iframe: theme toggle only, no branding or account chrome */
.site-header--catalogue-preview {
  justify-content: flex-end;
  padding-inline: max(0.75rem, var(--home-rail-pad-x, 1rem));
}

.site-header--catalogue-preview .site-header__end--catalogue-preview {
  margin-left: auto;
}

.site-header--catalogue-preview .site-header__theme-slot {
  display: flex;
  align-items: center;
  justify-content: flex-end;
}

/* Grow route content so the footer bar stays at the bottom of the viewport on short pages */
.site-main > :first-child {
  flex: 1 1 auto;
  min-height: 0;
}

/* Standalone pages — keep space below content */
.site-main > .page {
  padding-bottom: 3rem;
}

.page {
  max-width: 42rem;
}

/* Better mobile: tighter column on phones, reduced padding for readability */
@media (max-width: 480px) {
  .page {
    max-width: 100%;
    padding-inline: 1rem;
  }

  .page p {
    line-height: 1.6;
    font-size: 0.95rem;
  }
}

.page h1 {
  margin-top: 0;
}

.page p {
  margin: 0 0 1rem;
  line-height: 1.55;
}

.page code {
  font-size: 0.89em;
}

/* Terms / Privacy — compact left nav so body sits ~50% further left vs former 1:2 grid */
.page.legal-page {
  max-width: none;
  width: 100%;
  margin-inline: 0;
  box-sizing: border-box;
}

.legal-page__layout {
  --legal-nav-w: 12rem;
  --legal-col-gap: clamp(1rem, 2.5vw, 2rem);

  display: grid;
  grid-template-columns: minmax(0, var(--legal-nav-w)) minmax(0, 1fr);
  gap: var(--legal-col-gap);
  align-items: start;
}

@media (max-width: 640px) {
  .legal-page__layout {
    grid-template-columns: 1fr;
  }
}

.legal-page__nav {
  display: flex;
  flex-direction: column;
  gap: 0.6rem;
  padding-top: 0.15rem;
}

@media (min-width: 641px) {
  .legal-page__nav {
    position: sticky;
    top: calc(2rem + var(--site-header-clearance) + env(safe-area-inset-top, 0px));
  }
}

.legal-page__nav-link {
  font-size: 0.9125rem;
  font-weight: 400;
  line-height: 1.35;
  color: var(--text);
  text-decoration: none;
}

.legal-page__nav-link:hover {
  color: var(--text-interactive-hover);
  text-decoration: underline;
  text-underline-offset: 2px;
}

.legal-page__nav-link[aria-current='page'] {
  color: var(--text-h);
  font-weight: 600;
}

.legal-page__body {
  min-width: 0;
}

/* Match right inset to nav column + gap so prose isn’t flush to the main column edge */
@media (min-width: 641px) {
  .legal-page__body {
    padding-right: calc(var(--legal-nav-w) + var(--legal-col-gap));
  }
}

.page.legal-page h2 {
  font-size: 1.0625rem;
  font-weight: 600;
  margin: 1.75rem 0 0.5rem;
  color: var(--text-h);
}

.page.legal-page h3 {
  font-size: 0.9875rem;
  font-weight: 600;
  margin: 1.25rem 0 0.4rem;
  color: var(--text-h);
}

.page.legal-page section:first-of-type h2 {
  margin-top: 1.25rem;
}

.page.legal-page ul {
  margin: 0 0 1rem;
  padding-left: 1.35rem;
  line-height: 1.55;
}

.page.legal-page li {
  margin-bottom: 0.35rem;
}

.legal-page__body a {
  color: var(--accent);
}

.legal-page__body a:hover {
  color: var(--accent-hover);
}

/* Shared button primitives */

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 0.55rem 1.15rem;
  border-radius: 8px;
  font: inherit;
  font-size: 0.9125rem;
  font-weight: 600;
  text-decoration: none;
  border: none;
  cursor: pointer;
  transition:
    background 0.15s ease,
    color 0.15s ease,
    box-shadow 0.15s ease;
}

.btn:focus-visible {
  outline: var(--focus-ring-width) var(--focus-ring-style) var(--focus-ring-color);
  outline-offset: var(--focus-ring-offset);
}

/* Primary = marketing pill (--cta-pill-*); use on <button> or <a> */
.btn--primary {
  border-radius: 9999px;
  padding: 0.55rem 1.595rem;
  font-size: 1.00375rem;
  background: var(--cta-pill-bg);
  color: var(--cta-pill-fg);
  box-shadow: none;
  transition:
    background 0.28s ease,
    color 0.2s ease;
}

.btn--primary:hover {
  background: var(--cta-pill-bg-hover);
  color: var(--cta-pill-fg-hover);
}

/* Secondary = bordered ghost; use on <button> or <a> */
.btn--secondary {
  color: var(--text-h);
  background: transparent;
  border: 1px solid var(--border);
}

.btn--secondary:hover {
  background: var(--element-bg);
  border-color: color-mix(in srgb, var(--text-h) 22%, var(--border));
  color: var(--text-h);
}

a.btn--secondary:visited {
  color: var(--text-h);
}

/* Home route only — hero, feedback strips, draggable overlays */

/*
 * Marketing band heights: fixed rem so narrowing the viewport only changes width;
 * photos use object-fit: cover and crop horizontally. Tune once here and in
 * /admin/components (same custom properties).
 */
:root {
  /*
   * Homepage marketing heights: post-lede strips + stacked photo row use the band baseline only.
   * The hero iframe band is intentionally +10% taller — do not reuse --home-marketing-hero-h
   * for strips or the stacked photo height.
   */
  --home-marketing-band-base-h: 45rem;
  --home-marketing-hero-h: calc(var(--home-marketing-band-base-h) * 1.1);
  /* Post-lede side-by-side frame: same as band baseline (not +10%). */
  --home-marketing-post-lede-frame-h: var(--home-marketing-band-base-h);
  /* Stacked layout photo row — independent of hero bump */
  --home-marketing-stacked-photo-h: 40rem;
  /*
   * Notional full-width strip for side-by-side layout. Text column ~∝ strip width.
   * Stack when strip ≤ 60% of ref ⇒ text/background width has dropped by ≥40% vs ref.
   */
  --home-post-lede-sidebyside-ref-w: 80rem;
  --home-post-lede-stack-until: calc(0.6 * var(--home-post-lede-sidebyside-ref-w));
  /* Mirrored strips stack earlier so copy is not stuck on the opposite side before stack. */
  --home-post-lede-mirror-stack-until: calc(0.72 * var(--home-post-lede-sidebyside-ref-w));
  /*
   * Stacked layout only: scale with viewport; a higher min was forcing extra line wraps
   * instead of shrinking type. Same crop anchor as side-by-side: object-position left top.
   */
  --home-post-lede-stacked-lead-fs: clamp(0.78rem, 0.52rem + 2.85vw, 1.22rem);
  --home-post-lede-stacked-detail-fs: clamp(0.68rem, 0.48rem + 1.35vw, 0.92rem);
}

/* Home: fill viewport under header so the site index can sit at the bottom */
.layout:has(.home) .site-main {
  padding-top: calc(var(--site-header-clearance) + env(safe-area-inset-top, 0px));
}

.home {
  flex: 1;
  display: flex;
  flex-direction: column;
  position: relative;
}

/* Main home content — painted under first-visit college scrim; landing mask reveals peek on hover */
.home-body {
  flex: 1;
  display: flex;
  flex-direction: column;
  min-height: 0;
  transition: opacity 0.5s ease;
  opacity: 1;
}

.home-body--behind-landing {
  opacity: 1;
  pointer-events: none;
}

.home-body--behind-landing.home-body--revealing {
  pointer-events: auto;
}

.home-hero-headline {
  margin: 0;
  /* Fluid size lives on `.home-intro.page` so the Trial Viva pill scales to the same curve */
  font-size: 1em;
  font-weight: 400;
  line-height: 1.35;
  letter-spacing: -0.02em;
  color: var(--text-h);
  max-width: 38rem;
}

/* Only this span updates during first-visit landing peek — avoids repainting the whole line. */
.home-hero-headline__college {
  white-space: nowrap;
}

@keyframes home-hero-headline-out {
  from {
    opacity: 1;
    transform: translate3d(0, 0, 0);
  }
  to {
    opacity: 0;
    transform: translate3d(0, -0.28em, 0);
  }
}

@keyframes home-hero-headline-in {
  from {
    opacity: 0;
    transform: translate3d(0, 0.32em, 0);
  }
  to {
    opacity: 1;
    transform: translate3d(0, 0, 0);
  }
}

.home-hero-headline--motion-out {
  animation: home-hero-headline-out 0.28s ease-in forwards;
}

.home-hero-headline--motion-in {
  animation: home-hero-headline-in 0.36s ease-out forwards;
}

@media (prefers-reduced-motion: reduce) {
  .home-hero-headline--motion-out,
  .home-hero-headline--motion-in {
    animation: none;
  }
}

/*
 * Headline + Trial Viva share one fluid `font-size` on the intro column; pill uses the same
 * proportion as the former fixed pair (1.00375rem at 1.9rem headline).
 */
.home-intro .btn--primary {
  margin: 0;
  font-size: calc(100% * 1.00375 / 1.9);
  padding: 0.54795em 1.58904em;
}

.home-article {
  flex-shrink: 0;
  display: flex;
  flex-direction: column;
  width: 100%;
  padding-top: 0;
  /* Equal vertical gap: text hero → stats line → following sections. */
  --home-stats-v-gap: clamp(0.4rem, 0.25rem + 0.85vw, 0.8rem);
  /* Top landing rail + lower art sections share this content width */
  --home-rail-max: min(100%, 76rem);
  --home-rail-line: color-mix(in srgb, var(--text-h) 6%, transparent);
  --home-rail-pad-x: clamp(1.15rem, 3vw, 2rem);
  --home-rail-to-viva-gap: 2.85rem;
}

[data-theme='dark'] .home-article {
  --home-rail-line: color-mix(in srgb, var(--text-h) 8%, transparent);
}

/*
 * Architectural page grid: full-width top rule; vertical pillars on content column;
 * horizontal dividers span pillar-to-pillar (not inset by section padding).
 */
.home-top-rail {
  position: relative;
  width: 100%;
  box-sizing: border-box;
  --home-secondary-body: color-mix(in srgb, var(--text) 90%, var(--text-muted) 10%);
}

[data-theme='dark'] .home-top-rail {
  --home-secondary-body: #cdd6e8;
}

.home-top-rail::before {
  content: '';
  display: block;
  width: 100vw;
  width: 100dvw;
  margin-left: calc(50% - 50vw);
  margin-left: calc(50% - 50dvw);
  margin-right: calc(50% - 50vw);
  margin-right: calc(50% - 50dvw);
  border-top: 1px solid var(--home-rail-line);
  pointer-events: none;
}

.home-top-rail__frame {
  width: 100%;
  max-width: var(--home-rail-max);
  margin-inline: auto;
  box-sizing: border-box;
  border-left: 1px solid var(--home-rail-line);
  border-right: 1px solid var(--home-rail-line);
  border-bottom: none;
  background: linear-gradient(
    180deg,
    color-mix(in srgb, var(--site-index-bg) 35%, var(--bg)) 0%,
    var(--bg) 100%
  );
}

/* Compact 2026.2 Challenge campaign strip — above HomeTextHero, not a second hero. */
.home-challenge-banner {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: center;
  gap: 0.55rem 1.15rem;
  box-sizing: border-box;
  width: calc(100% - (2 * var(--home-rail-pad-x)));
  max-width: 42rem;
  margin: clamp(0.75rem, 1.6vw, 1.05rem) auto 0;
  padding: 0.7rem 1rem;
  text-align: center;
  border: 1px solid color-mix(in srgb, var(--text-h) 14%, transparent);
  border-radius: 0.65rem;
  background: color-mix(in srgb, var(--text-h) 4%, var(--bg));
}

[data-theme='dark'] .home-challenge-banner {
  border-color: color-mix(in srgb, var(--text-h) 20%, transparent);
  background: color-mix(in srgb, var(--text-h) 7%, var(--bg));
}

.home-challenge-banner__copy {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0.2rem;
  min-width: 0;
  flex: 1 1 14rem;
}

.home-challenge-banner__title {
  margin: 0;
  font-size: clamp(0.92rem, 0.25vw + 0.86rem, 1.02rem);
  font-weight: 650;
  line-height: 1.3;
  letter-spacing: -0.015em;
  color: var(--text-h);
  text-wrap: pretty;
}

.home-challenge-banner__support {
  margin: 0;
  font-size: clamp(0.8rem, 0.2vw + 0.74rem, 0.88rem);
  font-weight: 400;
  line-height: 1.4;
  color: var(--text-muted);
  text-wrap: pretty;
}

.home-challenge-banner__cta {
  flex: 0 0 auto;
  position: relative;
  z-index: 1;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 0.42rem 0.95rem;
  border-radius: 0.55rem;
  border: 1px solid color-mix(in srgb, var(--text-h) 28%, transparent);
  background: color-mix(in srgb, var(--text-h) 6%, transparent);
  color: var(--text-h);
  font-size: 0.9rem;
  font-weight: 600;
  line-height: 1.2;
  text-decoration: none;
  white-space: nowrap;
  cursor: pointer;
  pointer-events: auto;
  transition:
    background 0.15s ease,
    border-color 0.15s ease,
    color 0.15s ease;
}

.home-challenge-banner__cta:hover {
  border-color: color-mix(in srgb, var(--text-h) 52%, transparent);
  background: color-mix(in srgb, var(--text-h) 14%, transparent);
  color: var(--text-h);
}

.home-challenge-banner__cta:focus {
  outline: none;
}

.home-challenge-banner__cta:focus-visible {
  border-color: color-mix(in srgb, var(--text-h) 58%, transparent);
  background: color-mix(in srgb, var(--text-h) 14%, transparent);
  outline: 2px solid color-mix(in srgb, var(--text-h) 55%, transparent);
  outline-offset: 2px;
}

[data-theme='dark'] .home-challenge-banner__cta:hover,
[data-theme='dark'] .home-challenge-banner__cta:focus-visible {
  border-color: color-mix(in srgb, var(--text-h) 62%, transparent);
  background: color-mix(in srgb, var(--text-h) 18%, transparent);
}

@media (max-width: 36rem) {
  .home-challenge-banner {
    width: calc(100% - (2 * var(--home-rail-pad-x)));
    flex-direction: column;
    flex-wrap: nowrap;
    align-items: center;
    justify-content: flex-start;
    gap: 0.65rem;
    height: auto;
    min-height: 0;
    padding: 0.75rem 0.85rem;
  }

  /*
   * Desktop uses flex: 1 1 14rem for horizontal share. In a column that same
   * basis becomes ~14rem of height and leaves a large empty gap above the CTA.
   */
  .home-challenge-banner__copy {
    flex: 0 1 auto;
    width: 100%;
  }

  .home-challenge-banner__cta {
    flex: 0 0 auto;
    width: 100%;
    max-width: 16rem;
  }
}

.home-top-rail__section {
  box-sizing: border-box;
}

.home-top-rail__pathways {
  border-top: 1px solid var(--home-rail-line);
  border-bottom: 1px solid var(--home-rail-line);
  padding: clamp(0.95rem, 2vw, 1.25rem) var(--home-rail-pad-x)
    clamp(1rem, 2.2vh, 1.35rem);
  box-sizing: border-box;
}

.home-top-rail__pathways-row {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 0;
  width: 100%;
  margin: 0;
}

.home-top-rail__pathways-item {
  margin: 0;
  min-width: 0;
  padding: clamp(0.55rem, 1.2vw, 0.8rem) clamp(0.5rem, 2vw, 1.25rem);
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: clamp(0.15rem, 0.35vw, 0.28rem);
  text-align: center;
  box-sizing: border-box;
  border-right: 1px solid var(--home-rail-line);
  text-decoration: none;
  color: inherit;
  cursor: pointer;
}

a.home-top-rail__pathways-item:hover .home-top-rail__pathways-college,
a.home-top-rail__pathways-item:focus-visible .home-top-rail__pathways-college {
  color: color-mix(in srgb, var(--text-h) 92%, black);
  transform: translateY(-2px);
  text-shadow: 0 2px 5px color-mix(in srgb, var(--text-h) 14%, transparent);
}

a.home-top-rail__pathways-item:hover .home-top-rail__pathways-exam,
a.home-top-rail__pathways-item:focus-visible .home-top-rail__pathways-exam {
  color: color-mix(in srgb, var(--text-h) 90%, var(--home-secondary-body));
  transform: translateY(-2px);
  text-shadow: 0 2px 5px color-mix(in srgb, var(--text-h) 14%, transparent);
}

.home-top-rail__pathways-item:last-child {
  border-right: none;
}

.home-top-rail__pathways-college {
  display: block;
  font-size: clamp(0.8rem, 0.22vw + 0.72rem, 0.9rem);
  font-weight: 600;
  line-height: 1.1;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--text-h);
  transform: translateY(0);
  text-shadow: none;
  transition:
    color 200ms ease,
    transform 200ms ease,
    text-shadow 200ms ease;
}

.home-top-rail__pathways-exam {
  display: block;
  font-size: clamp(0.88rem, 0.32vw + 0.78rem, 0.98rem);
  font-weight: 400;
  line-height: 1.32;
  letter-spacing: -0.014em;
  color: color-mix(in srgb, var(--text-h) 68%, var(--home-secondary-body));
  transform: translateY(0);
  text-shadow: none;
  transition:
    color 200ms ease,
    transform 200ms ease,
    text-shadow 200ms ease;
}

.home-top-rail__pathways-item--coming-soon .home-top-rail__pathways-college {
  color: color-mix(in srgb, var(--text-h) 58%, var(--text-muted));
}

.home-top-rail__pathways-item--coming-soon .home-top-rail__pathways-exam {
  color: color-mix(in srgb, var(--text-h) 48%, var(--text-muted));
}

.home-top-rail__pathways-soon {
  font-weight: 400;
  color: color-mix(in srgb, var(--text-h) 42%, var(--text-muted));
}

@media (max-width: 39.99rem) {
  .home-top-rail__pathways-row {
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 0;
  }

  .home-top-rail__pathways-item {
    padding: 0.55rem clamp(0.35rem, 2vw, 0.5rem);
  }

  .home-top-rail__pathways-college {
    font-size: clamp(0.68rem, 2.4vw + 0.42rem, 0.78rem);
    letter-spacing: 0.08em;
  }

  .home-top-rail__pathways-exam {
    font-size: clamp(0.72rem, 2.1vw + 0.44rem, 0.86rem);
    line-height: 1.28;
  }
}

.home-intro.page {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  margin-bottom: 0;
  font-size: clamp(1.35rem, 4.2vw, 1.9rem);
  row-gap: calc(1.2rem / 1.35 * 1em);
}

/* Text-led homepage hero (ACEM / ANZCA): copy + mic / rotating questions */
.home-text-hero {
  --home-hero-headline-size: clamp(1.42rem, 2.35vw + 0.65rem, 2.05rem);
  --home-hero-support-size: clamp(0.92rem, 0.35vw + 0.82rem, 1.04rem);
  --home-hero-guarantee-size: var(--home-hero-support-size);
  --home-hero-copy-pad-top: clamp(1.25rem, 2.8vw, 2.35rem);
  --home-hero-copy-gap: clamp(0.7rem, 1.45vw, 0.95rem);
  --home-hero-visual-nudge: clamp(-1.5rem, -2.75vw, -1.35rem);
  --home-hero-proof-green: #15803d;
  --home-hero-proof-green-soft: #16a34a;
  --home-hero-supporting: color-mix(in srgb, var(--text) 88%, var(--text-muted) 12%);
  --home-hero-proof-line: color-mix(in srgb, var(--text) 74%, var(--text-muted) 26%);
  --home-hero-question: color-mix(in srgb, var(--text-h) 68%, var(--text-muted) 32%);
  width: 100%;
  margin: 0;
}

[data-theme='dark'] .home-text-hero {
  --home-hero-proof-green: #4ade80;
  --home-hero-proof-green-soft: #86efac;
  --home-hero-supporting: #d0d9eb;
  --home-hero-proof-line: #bcc8de;
  --home-hero-question: #b3bfd6;
}

.home-text-hero__main {
  padding: clamp(0.65rem, 1.35vw, 0.95rem) var(--home-rail-pad-x)
    clamp(0.75rem, 1.5vw, 1rem);
}

.home-text-hero > .home-top-rail__pathways {
  padding-top: clamp(1.15rem, 2.3vw, 1.45rem);
}

.home-text-hero__grid {
  display: flex;
  flex-direction: column;
  align-items: stretch;
  gap: clamp(1.25rem, 3.2vw, 2rem);
}

@media (min-width: 64rem) {
  .home-text-hero__grid {
    display: grid;
    grid-template-columns: minmax(0, 0.44fr) minmax(0, 0.56fr);
    align-items: stretch;
    column-gap: clamp(2.25rem, 4vw, 3.75rem);
    row-gap: 1.25rem;
  }

  .home-text-hero__headline,
  .home-text-hero__guarantee,
  .home-text-hero__support {
    max-width: none;
  }

  .home-text-hero__copy {
    padding-top: var(--home-hero-copy-pad-top);
  }

  .home-text-hero__visual {
    justify-content: flex-start;
    margin-top: var(--home-hero-visual-nudge);
  }

  .home-text-hero__visual-inner {
    position: relative;
    flex: 1;
    width: 100%;
    min-height: 100%;
    display: flex;
    justify-content: center;
  }

  .home-text-hero__visual-stack {
    position: relative;
    width: min(100%, 28rem);
    min-height: 100%;
  }
}

.home-text-hero__copy {
  min-width: 0;
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: var(--home-hero-copy-gap);
}

.home-text-hero__proof {
  margin: 0;
  font-size: clamp(0.84rem, 0.32vw + 0.74rem, 0.94rem);
  font-weight: 400;
  line-height: 1.45;
  letter-spacing: -0.012em;
  color: var(--home-hero-proof-line);
  text-wrap: pretty;
}

.home-text-hero__proof-count {
  font-variant-numeric: tabular-nums;
  font-weight: 600;
  color: var(--home-hero-proof-green-soft);
}

.home-text-hero__proof--online {
  margin: 0;
  font-size: clamp(0.8rem, 0.28vw + 0.7rem, 0.88rem);
  color: var(--home-hero-proof-line);
  opacity: 0.88;
}

.home-text-hero__online {
  display: flex;
  align-items: center;
  gap: 0.45rem;
  min-width: 0;
}

.home-text-hero__guarantee {
  margin: 0;
  max-width: 36rem;
  font-size: var(--home-hero-guarantee-size);
  font-weight: 500;
  line-height: 1.45;
  letter-spacing: -0.012em;
  color: var(--home-hero-supporting);
  text-wrap: pretty;
}

.home-text-hero__guarantee-mark {
  color: var(--home-hero-proof-green);
  font-weight: 600;
}

.home-text-hero__online-faces {
  display: flex;
  flex-direction: row;
  align-items: center;
  flex-shrink: 0;
}

.home-text-hero__online-face {
  display: block;
  width: 1.05em;
  height: 1.05em;
  font-size: clamp(0.8rem, 0.28vw + 0.7rem, 0.88rem);
  border-radius: 9999px;
  overflow: hidden;
  border: 0;
  background: color-mix(in srgb, var(--text-h) 8%, var(--bg, #fff));
  box-sizing: border-box;
  margin-left: -0.35em;
}

.home-text-hero__online-face:first-child {
  margin-left: 0;
}

.home-text-hero__online-face-img,
.home-text-hero__online-face-default {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.home-text-hero__online-face-img--blurred {
  transform: scale(1.12);
  filter: blur(2px);
}

.home-text-hero__online-face-default {
  color: var(--text-h);
}

/* First-reveal fan: coins start stacked on the leftmost face, then open left → right. */
@keyframes home-text-hero-online-face-fan {
  from {
    opacity: 0;
    transform: translate3d(calc(var(--online-face-i, 0) * -0.7em), 0, 0) scale(0.85);
  }

  to {
    opacity: 1;
    transform: translate3d(0, 0, 0) scale(1);
  }
}

@keyframes home-text-hero-online-face-origin {
  from {
    opacity: 1;
    transform: scale(0.88);
  }

  to {
    opacity: 1;
    transform: scale(1);
  }
}

@keyframes home-text-hero-online-phrase-in {
  from {
    opacity: 0;
    transform: translate3d(-0.22em, 0, 0);
  }

  to {
    opacity: 0.88;
    transform: translate3d(0, 0, 0);
  }
}

.home-text-hero__online--enter .home-text-hero__online-face {
  transform-origin: 50% 50%;
  animation: home-text-hero-online-face-fan 0.32s cubic-bezier(0.22, 1, 0.32, 1) both;
  animation-delay: calc(var(--online-face-i, 0) * 48ms);
}

.home-text-hero__online--enter .home-text-hero__online-face:first-child {
  animation-name: home-text-hero-online-face-origin;
}

.home-text-hero__online--enter .home-text-hero__proof--online {
  animation: home-text-hero-online-phrase-in 0.28s ease-out both;
  animation-delay: calc(max(var(--online-face-n, 1), 1) * 48ms + 90ms);
}

@media (prefers-reduced-motion: reduce) {
  .home-text-hero__online--enter .home-text-hero__online-face,
  .home-text-hero__online--enter .home-text-hero__online-face:first-child,
  .home-text-hero__online--enter .home-text-hero__proof--online {
    animation: none;
  }
}

.home-text-hero__headline {
  margin: 0;
  max-width: 36rem;
  font-size: clamp(1.42rem, 2.35vw + 0.65rem, 2.05rem);
  font-weight: 400;
  line-height: 1.28;
  letter-spacing: -0.025em;
  color: var(--text-h);
  text-wrap: pretty;
}

.home-text-hero__support {
  margin: 0;
  max-width: 36rem;
  font-size: clamp(0.92rem, 0.35vw + 0.82rem, 1.04rem);
  font-weight: 400;
  line-height: 1.5;
  color: var(--home-hero-supporting);
  text-wrap: pretty;
}

.home-text-hero__cta-row {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.65rem 0.85rem;
  margin-top: 0;
}

.home-text-hero__btn-secondary {
  border-radius: 9999px;
  padding: 0.55rem 1.595rem;
  font-size: 1.00375rem;
  font-weight: 600;
  text-decoration: none;
  border: 1px solid color-mix(in srgb, var(--text-h) 32%, transparent);
  color: var(--text-h);
  background: transparent;
  transition:
    background 0.2s ease,
    border-color 0.2s ease,
    color 0.2s ease,
    transform 0.22s ease;
}

.home-text-hero__btn-secondary:hover {
  background: color-mix(in srgb, var(--text-h) 6%, transparent);
  border-color: color-mix(in srgb, var(--text-h) 48%, transparent);
  transform: translateY(-1px);
}

[data-theme='dark'] .home-text-hero__btn-secondary {
  border-color: color-mix(in srgb, var(--text-h) 38%, transparent);
}

[data-theme='dark'] .home-text-hero__btn-secondary:hover {
  border-color: color-mix(in srgb, var(--text-h) 52%, transparent);
  background: color-mix(in srgb, var(--text-h) 8%, transparent);
}

.home-text-hero__visual {
  min-width: 0;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  text-align: center;
}

.home-text-hero__visual-inner {
  width: 100%;
  max-width: min(36rem, 100%);
  display: flex;
  flex-direction: column;
  align-items: center;
}

.home-text-hero__visual-stack {
  width: 100%;
  max-width: min(28rem, 100%);
  display: flex;
  flex-direction: column;
  align-items: center;
}

/* Stacked hero: copy + pathways only; must follow base `.home-text-hero__visual` rules. */
@media (max-width: 63.99875rem) {
  .home-text-hero__visual {
    display: none;
  }

  .home-top-rail .home-how-works {
    padding-top: clamp(1.75rem, 4.5vw, 2.5rem);
  }
}

@media (min-width: 64rem) {
  .home-text-hero__visual {
    align-items: center;
    padding-left: 0;
  }

  .home-text-hero__visual-inner {
    margin-left: 0;
    margin-right: 0;
  }
}

.home-text-hero__mic-stage {
  position: relative;
  display: flex;
  align-items: center;
  justify-content: center;
  width: min(100%, 22rem);
  aspect-ratio: 1;
  max-width: 100%;
  overflow: visible;
}

@media (min-width: 64rem) {
  .home-text-hero__mic-stage {
    width: min(100%, 28rem);
  }

  .home-text-hero__visual-stack .home-text-hero__mic-stage {
    position: absolute;
    left: 50%;
    width: 100%;
    margin: 0;
    transform: translateX(-50%);
    top: calc(
      var(--home-hero-copy-pad-top) + 2.5 * 1.28 * var(--home-hero-headline-size) -
        min(100%, 28rem) / 2 - var(--home-hero-visual-nudge)
    );
  }

  .home-text-hero__visual-stack .home-text-hero__question-wrap {
    position: absolute;
    left: 50%;
    width: 100%;
    margin: 0;
    min-height: 0;
    max-width: none;
    top: calc(
      var(--home-hero-copy-pad-top) + 3 * 1.28 * var(--home-hero-headline-size) +
        var(--home-hero-copy-gap) + 2 * 1.5 * var(--home-hero-support-size) +
        var(--home-hero-copy-gap) + 1.35 * var(--home-hero-guarantee-size) +
        var(--home-hero-copy-gap) + 1.35rem - var(--home-hero-visual-nudge)
    );
    transform: translate(-50%, -50%);
  }
}

.home-text-hero__mic-inner {
  position: relative;
  z-index: 1;
  overflow: visible;
  transform: scale(1.08) translateY(-0.65rem);
  transform-origin: center center;
}

@media (min-width: 64rem) {
  .home-text-hero__mic-inner {
    transform: scale(1.14) translateY(-0.65rem);
  }
}

.home-text-hero__question-wrap {
  margin: 0.35rem 0 0;
  width: min(100%, 28rem);
  max-width: 100%;
  min-height: 2.75lh;
  display: flex;
  align-items: center;
  justify-content: center;
  box-sizing: border-box;
}

.home-text-hero__question-text {
  margin: 0;
  text-align: center;
  font-family: var(--sans);
  font-size: clamp(0.86rem, 1.35vw + 0.55rem, 0.98rem);
  line-height: 1.48;
  font-weight: 400;
  color: var(--home-hero-question);
}

@keyframes home-text-hero-q-in {
  from {
    opacity: 0;
    transform: translateY(4px);
  }

  to {
    opacity: 1;
    transform: translateY(0);
  }
}

.home-text-hero__question-text--initial {
  animation: home-text-hero-q-in 0.55s ease-out both;
}

.home-text-hero__question-text--cycle {
  animation: home-text-hero-q-in 0.42s ease-out both;
}

@media (prefers-reduced-motion: reduce) {
  .home-text-hero__question-text--initial,
  .home-text-hero__question-text--cycle {
    animation: none;
  }
}

/* “How PracticeViva works” — spacious three-card zone inside top rail */
.home-how-works {
  --home-how-card-bg: color-mix(in srgb, var(--surface) 88%, var(--element-bg));
  --home-how-card-border: color-mix(in srgb, var(--border) 72%, transparent);
  --home-how-card-title: var(--text-h);
  --home-how-card-body: var(--home-secondary-body);
  --home-how-card-step: color-mix(in srgb, var(--text-muted) 78%, var(--text-h));
  width: 100%;
  margin: 0;
  padding: clamp(2.25rem, 5vw, 3.25rem) var(--home-rail-pad-x)
    clamp(2.75rem, 6vw, 3.75rem);
  box-sizing: border-box;
}

[data-theme='dark'] .home-how-works {
  --home-how-card-bg: color-mix(in srgb, var(--surface) 82%, var(--element-bg));
  --home-how-card-border: color-mix(in srgb, var(--border) 62%, transparent);
  --home-how-card-body: #c5cfe3;
  --home-how-card-step: color-mix(in srgb, var(--text-muted) 55%, var(--text-h));
}

@media (min-width: 64rem) {
  .home-top-rail__pathways {
    padding-bottom: clamp(1.15rem, 3.2vh, 2rem);
  }

  .home-top-rail .home-how-works {
    padding-top: clamp(2.75rem, 6vh, 4rem);
    padding-bottom: clamp(2rem, 3.5vh, 2.75rem);
  }
}

.home-top-rail .home-how-works {
  max-width: none;
}

.home-how-works__heading {
  margin: 0 0 clamp(1.65rem, 3.5vw, 2.35rem);
  max-width: 44rem;
  display: flex;
  flex-direction: column;
  gap: clamp(0.5rem, 1.1vw, 0.7rem);
}

.home-how-works__heading-primary {
  display: block;
  font-size: clamp(1.35rem, 2.1vw + 0.7rem, 1.9rem);
  font-weight: 500;
  line-height: 1.22;
  letter-spacing: -0.03em;
  color: var(--text-h);
  text-wrap: pretty;
}

.home-how-works__heading-support {
  display: block;
  font-size: clamp(1rem, 0.55vw + 0.88rem, 1.2rem);
  font-weight: 400;
  line-height: 1.4;
  letter-spacing: -0.018em;
  color: var(--home-secondary-body);
  text-wrap: pretty;
}

.home-how-works__cards {
  list-style: none;
  margin: 0;
  padding: 0;
  display: grid;
  grid-template-columns: 1fr;
  gap: clamp(1rem, 2.2vw, 1.35rem);
  align-items: stretch;
}

@media (min-width: 40rem) and (max-width: 63.99rem) {
  .home-how-works__cards {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .home-how-works__card:last-child {
    grid-column: 1 / -1;
  }
}

@media (min-width: 64rem) {
  .home-how-works__cards {
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: clamp(1.2rem, 2vw, 1.65rem);
  }

  .home-how-works__card:last-child {
    grid-column: auto;
  }
}

.home-how-works__card {
  margin: 0;
  min-width: 0;
  display: flex;
  flex-direction: column;
  align-items: stretch;
  justify-content: flex-start;
  min-height: auto;
  height: 100%;
  padding: 0;
  border: none;
  border-radius: 0;
  background: transparent;
  box-shadow: none;
  box-sizing: border-box;
  perspective: 1200px;
  overflow: visible;
  cursor: default;
  transition:
    transform 0.22s ease,
    box-shadow 0.22s ease;
}

.home-how-works__card:not(.home-how-works__card--flipped):hover {
  transform: translateY(-4px) scale(1.02);
}

@media (min-width: 48rem) {
  .home-how-works__card {
    min-height: clamp(11.5rem, 18vh, 14.5rem);
  }

  .home-how-works__mic-wrap {
    transform: translateZ(2px) translateY(0.55rem);
  }

  .home-how-works__feedback-doc-wrap {
    transform: translateY(0.55rem);
  }
}

.home-how-works__card-step {
  display: block;
  margin: 0 0 0.85rem;
  font-size: clamp(0.72rem, 0.18vw + 0.66rem, 0.8rem);
  font-weight: 600;
  line-height: 1;
  letter-spacing: 0.12em;
  color: var(--home-how-card-step);
}

.home-how-works__card-title {
  margin: 0 0 0.45rem;
  font-size: clamp(1.08rem, 0.55vw + 0.94rem, 1.24rem);
  font-weight: 600;
  line-height: 1.32;
  letter-spacing: -0.022em;
  color: var(--home-how-card-title);
}

.home-how-works__card-body {
  margin: 0;
  max-width: 22rem;
  font-size: clamp(0.9rem, 0.28vw + 0.84rem, 1rem);
  font-weight: 400;
  line-height: 1.56;
  color: var(--home-how-card-body);
  text-wrap: pretty;
}

/* Interactive demo — flip cards, mic stages, step arrow */
.home-how-works__live-region {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}

.home-how-works__cards-wrap {
  position: relative;
  touch-action: pan-y;
}

.home-how-works__card:not(.home-how-works__card--flipped) .home-how-works__card-face--front {
  cursor: pointer;
}

.home-how-works__card:not(.home-how-works__card--flipped):hover .home-how-works__card-face--front {
  border-color: color-mix(in srgb, var(--accent, #3b6fd9) 28%, var(--home-how-card-border));
  box-shadow:
    var(--shadow-card-soft),
    0 12px 32px -12px color-mix(in srgb, var(--text-h) 16%, transparent);
}

.home-how-works__card-inner {
  position: relative;
  width: 100%;
  height: 100%;
  min-height: inherit;
  transform-style: preserve-3d;
  transition: transform 0.55s cubic-bezier(0.4, 0.15, 0.2, 1);
  overflow: visible;
}

.home-how-works__card--flipped .home-how-works__card-inner {
  transform: rotateY(180deg);
}

.home-how-works__card-face {
  box-sizing: border-box;
  width: 100%;
  min-height: inherit;
  padding: clamp(1.35rem, 2.8vw, 1.65rem) clamp(1.25rem, 2.4vw, 1.55rem);
  border: 1px solid var(--home-how-card-border);
  border-radius: 0.85rem;
  background: var(--home-how-card-bg);
  box-shadow: var(--shadow-card-soft);
  backface-visibility: hidden;
  -webkit-backface-visibility: hidden;
}

.home-how-works__card-face--front {
  position: relative;
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  justify-content: flex-start;
  height: 100%;
}

.home-how-works__card-face--back {
  position: absolute;
  inset: 0;
  transform: rotateY(180deg) translateZ(1px);
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  text-align: center;
  overflow: hidden;
  container-type: inline-size;
}

.home-how-works__card-hint {
  margin-top: auto;
  padding-top: 0.85rem;
  font-size: 0.78rem;
  font-weight: 500;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  color: color-mix(in srgb, var(--accent, #3b6fd9) 72%, var(--text-muted));
}

.home-how-works__card--active .home-how-works__card-face--back {
  border-color: color-mix(in srgb, var(--accent, #3b6fd9) 42%, var(--home-how-card-border));
  box-shadow:
    var(--shadow-card-soft),
    0 0 0 1px color-mix(in srgb, var(--accent, #3b6fd9) 18%, transparent);
}

.home-how-works__card--record.home-how-works__card--active:not(.home-how-works__card--recording)
  .home-how-works__card-face--back {
  border-color: color-mix(in srgb, var(--text-h) 22%, var(--home-how-card-border));
  box-shadow: var(--shadow-card-soft);
}

.home-how-works__card--record.home-how-works__card--recording .home-how-works__card-face--back {
  border-color: color-mix(in srgb, #e05252 42%, var(--home-how-card-border));
  box-shadow:
    var(--shadow-card-soft),
    0 0 0 1px color-mix(in srgb, #e05252 18%, transparent);
}

.home-how-works__card--dimmed .home-how-works__card-face--back {
  opacity: 0.55;
}

.home-how-works__card-back-stage {
  display: grid;
  grid-template-rows: auto auto;
  align-content: center;
  justify-items: center;
  gap: 0.55rem;
  width: 100%;
  min-height: clamp(8rem, 14vh, 10rem);
  overflow: visible;
}

/*
 * Match application-page mic anchor: shrink-wrap the 4rem disc, paint equalizer on a
 * larger absolute stage so bars are not clipped inside the flip card.
 */
.home-how-works__mic-wrap {
  grid-row: 1;
  position: relative;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: calc(4rem * 2.2);
  height: calc(4rem * 2.2);
  flex-shrink: 0;
  overflow: hidden;
  transform: translateZ(2px) translateY(0.4rem);
}

.home-how-works__mic-wrap .trial-mic-hero {
  position: relative;
  display: flex;
  align-items: center;
  justify-content: center;
  width: 4rem;
  height: 4rem;
  overflow: visible;
  flex-shrink: 0;
}

.home-how-works__mic-wrap .trial-reactive-mic__stage {
  position: absolute;
  left: 50%;
  top: 50%;
  width: calc(4rem * 2.2);
  height: calc(4rem * 2.2);
  transform: translate(-50%, calc(-50% - 0.65rem));
}

.home-how-works__mic-wrap .trial-reactive-mic__animation .mic-design__canvas {
  max-width: none;
  max-height: none;
}

/* Keep equalizer visible; skip hover lift inside the demo cards. */
.home-how-works__mic-wrap .trial-mic:hover .trial-mic__frame,
.home-how-works__mic-wrap .trial-mic:active .trial-mic__frame {
  transform: none;
}

.home-how-works__mic-wrap .trial-mic:hover .trial-mic__disc {
  box-shadow: none;
}

.home-how-works__mic-wrap .trial-mic:hover .trial-mic__icon-svg {
  transform: none;
}

.home-how-works__back-label {
  grid-row: 2;
  margin: 0;
  width: 100%;
  max-width: 100%;
  padding: 0 0.35rem;
  box-sizing: border-box;
  min-height: 1.3rem;
  font-size: clamp(0.78rem, 0.22vw + 0.72rem, 0.88rem);
  font-weight: 500;
  line-height: 1.3;
  letter-spacing: -0.012em;
  text-align: center;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  color: var(--home-how-card-body);
}

/* Full question text during playback — scale to one line so the mic does not shift. */
.home-how-works__back-label--question {
  font-size: clamp(0.48rem, 4.2cqi, 0.76rem);
  letter-spacing: -0.02em;
}

.home-how-works__feedback-doc-wrap {
  grid-row: 1;
  display: flex;
  align-items: center;
  justify-content: center;
  min-height: 5.5rem;
  transform: translateY(0.4rem);
}

.home-how-works__feedback-doc {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 5.5rem;
  height: 5.5rem;
  padding: 0;
  border: none;
  background: none;
  color: color-mix(in srgb, var(--text-muted) 72%, var(--text-h));
  transition:
    color 0.35s ease,
    transform 0.25s ease;
}

.home-how-works__feedback-doc--waiting {
  opacity: 0.55;
}

.home-how-works__feedback-doc--loading {
  opacity: 0.72;
}

.home-how-works__feedback-doc--loading .home-how-works__feedback-doc-spinner {
  animation: home-how-works-doc-pulse 1.1s ease-in-out infinite;
}

.home-how-works__feedback-doc--ready,
.home-how-works__feedback-doc--done {
  color: color-mix(in srgb, #2d9f6f 88%, var(--text-h));
  animation: home-how-works-feedback-pop 0.45s ease;
}

.home-how-works__feedback-doc--clickable {
  cursor: pointer;
}

.home-how-works__feedback-doc--clickable:hover {
  transform: scale(1.04);
}

.home-how-works__feedback-doc--clickable:focus-visible {
  outline: 2px solid color-mix(in srgb, #2d9f6f 60%, transparent);
  outline-offset: 4px;
  border-radius: 0.5rem;
}

.home-how-works__feedback-doc-svg {
  display: block;
}

@keyframes home-how-works-doc-pulse {
  0%,
  100% {
    opacity: 0.35;
  }
  50% {
    opacity: 1;
  }
}

.home-how-works__feedback-popup-root {
  position: fixed;
  inset: 0;
  z-index: 120;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 1.25rem;
}

.home-how-works__feedback-popup-backdrop {
  position: absolute;
  inset: 0;
  border: none;
  background: color-mix(in srgb, var(--text-h) 28%, transparent);
  backdrop-filter: blur(4px);
  cursor: pointer;
}

.home-how-works__feedback-popup {
  position: relative;
  z-index: 1;
  width: min(100%, 26rem);
  max-height: min(85vh, 32rem);
  overflow: auto;
  padding: 1.15rem 1.2rem 1.25rem;
  border-radius: 1rem;
  border: 1px solid var(--home-how-card-border);
  background: var(--home-how-card-bg, var(--surface-elevated, #fff));
  box-shadow:
    0 18px 48px color-mix(in srgb, var(--text-h) 16%, transparent),
    0 2px 8px color-mix(in srgb, var(--text-h) 8%, transparent);
  animation: home-how-works-feedback-pop 0.35s ease;
}

.home-how-works__feedback-popup-header {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 0.75rem;
  margin-bottom: 0.85rem;
}

.home-how-works__feedback-popup-title {
  margin: 0;
  font-size: 1rem;
  font-weight: 600;
  color: var(--home-how-card-title);
}

.home-how-works__feedback-popup-close {
  flex-shrink: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  width: 2rem;
  height: 2rem;
  padding: 0;
  border: none;
  border-radius: 0.45rem;
  background: color-mix(in srgb, var(--text-muted) 10%, transparent);
  color: var(--text-muted);
  cursor: pointer;
}

.home-how-works__feedback-popup-close:hover {
  color: var(--text-h);
  background: color-mix(in srgb, var(--text-muted) 18%, transparent);
}

.home-how-works__feedback-popup-transcript {
  margin: 0 0 0.85rem;
  font-size: clamp(0.78rem, 0.2vw + 0.74rem, 0.86rem);
  line-height: 1.4;
  color: var(--text-muted);
  text-wrap: pretty;
}

.home-how-works__feedback-popup-text {
  margin: 0;
  font-size: clamp(0.86rem, 0.24vw + 0.8rem, 0.96rem);
  font-weight: 400;
  line-height: 1.5;
  color: var(--home-how-card-title);
  text-wrap: pretty;
}

.home-how-works__feedback-done {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 4.5rem;
  height: 4.5rem;
  color: color-mix(in srgb, #2d9f6f 82%, var(--text-h));
  animation: home-how-works-feedback-pop 0.45s ease;
}

.home-how-works__feedback-done-icon {
  display: block;
}

@keyframes home-how-works-feedback-pop {
  0% {
    transform: scale(0.6);
    opacity: 0;
  }
  70% {
    transform: scale(1.08);
  }
  100% {
    transform: scale(1);
    opacity: 1;
  }
}

.home-how-works__feedback-panel {
  grid-row: 1 / -1;
  align-self: center;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0.85rem;
  width: 100%;
  padding: 0.15rem 0.25rem;
}

.home-how-works__audio {
  position: absolute;
  width: 0;
  height: 0;
  opacity: 0;
  pointer-events: none;
}

.home-how-works__feedback-transcript {
  margin: 0;
  font-size: clamp(0.78rem, 0.2vw + 0.74rem, 0.86rem);
  line-height: 1.4;
  color: var(--text-muted);
  text-wrap: pretty;
}

.home-how-works__feedback-transcript-label {
  font-weight: 600;
  color: var(--home-how-card-title);
}

.home-how-works__feedback-text {
  margin: 0;
  font-size: clamp(0.86rem, 0.24vw + 0.8rem, 0.96rem);
  font-weight: 400;
  line-height: 1.5;
  color: var(--home-how-card-title);
  text-wrap: pretty;
}

.home-how-works__feedback-ctas {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
  justify-content: center;
}

.home-how-works__feedback-cta {
  padding: 0.42rem 0.85rem;
  font-size: 0.82rem;
}

.home-how-works__feedback-cta-secondary {
  background: transparent;
  border: 1px solid var(--home-how-card-border);
  color: var(--home-how-card-title);
}

.home-how-works__feedback-cta-secondary:hover {
  border-color: color-mix(in srgb, var(--text-h) 20%, var(--home-how-card-border));
}

.home-how-works__arrow {
  position: absolute;
  z-index: 2;
  pointer-events: none;
  opacity: 0;
  color: color-mix(in srgb, var(--accent, #3b6fd9) 70%, var(--text-muted));
  transition:
    opacity 0.35s ease,
    transform 0.45s ease;
}

.home-how-works__cards--show-arrow .home-how-works__arrow {
  opacity: 1;
}

.home-how-works__arrow-svg {
  display: block;
  width: 2.5rem;
  height: 1.25rem;
}

@media (min-width: 64rem) {
  .home-how-works__arrow {
    top: 50%;
    left: calc(33.333% - 0.35rem);
    width: calc(33.333% - 0.7rem);
    transform: translateY(-50%) translateX(-8px);
    display: flex;
    align-items: center;
    justify-content: center;
  }

  .home-how-works__cards--show-arrow .home-how-works__arrow {
    transform: translateY(-50%) translateX(0);
  }

  .home-how-works__arrow-svg {
    width: 100%;
    max-width: 4.5rem;
    height: auto;
  }
}

@media (min-width: 40rem) and (max-width: 63.99rem) {
  .home-how-works__arrow {
    top: calc(50% - 0.5rem);
    left: 50%;
    transform: translate(-50%, -50%) translateY(-8px);
  }

  .home-how-works__cards--show-arrow .home-how-works__arrow {
    transform: translate(-50%, -50%) translateY(0);
  }

  .home-how-works__arrow-svg {
    transform: rotate(90deg);
  }
}

@media (max-width: 39.99rem) {
  .home-how-works__arrow {
    top: calc(33.333% - 0.25rem);
    left: 50%;
    transform: translate(-50%, -50%) translateY(-8px);
  }

  .home-how-works__cards--show-arrow .home-how-works__arrow {
    transform: translate(-50%, -50%) translateY(0);
  }

  .home-how-works__arrow-svg {
    transform: rotate(90deg);
  }
}

.home-how-works__reset-row {
  display: flex;
  justify-content: center;
  margin-top: 1rem;
}

.home-how-works__reset-btn {
  padding: 0.35rem 0.65rem;
  border: none;
  background: none;
  font: inherit;
  font-size: 0.86rem;
  color: var(--text-muted);
  text-decoration: underline;
  text-underline-offset: 0.18em;
  cursor: pointer;
}

.home-how-works__reset-btn:hover {
  color: var(--text-h);
}

@media (prefers-reduced-motion: reduce) {
  .home-how-works__card-inner {
    transition: none;
  }

  .home-how-works__card--flipped .home-how-works__card-inner {
    transform: none;
  }

  .home-how-works__card-face--front {
    transition: opacity 0.2s ease;
  }

  .home-how-works__card--flipped .home-how-works__card-face--front {
    opacity: 0;
    pointer-events: none;
    position: absolute;
    inset: 0;
  }

  .home-how-works__card-face--back {
    position: relative;
    transform: none;
    opacity: 0;
    pointer-events: none;
    transition: opacity 0.2s ease;
  }

  .home-how-works__card--flipped .home-how-works__card-face--back {
    opacity: 1;
    pointer-events: auto;
  }

  .home-how-works__feedback-doc--ready,
  .home-how-works__feedback-doc--done,
  .home-how-works__feedback-popup {
    animation: none;
  }

  .home-how-works__feedback-doc--loading .home-how-works__feedback-doc-spinner {
    animation: none;
  }

  .home-how-works__feedback-done {
    animation: none;
  }

  .home-how-works__arrow {
    transition: opacity 0.2s ease;
  }
}

.home-hero-figure {
  margin: 0 auto 2.85rem;
  width: 100%;
  max-width: var(--home-rail-max);
  box-sizing: border-box;
  border-left: 1px solid var(--home-rail-line);
  border-right: 1px solid var(--home-rail-line);
}

.home-hero-figure__frame {
  isolation: isolate;
  position: relative;
  overflow: hidden;
  width: 100%;
  border-radius: 10px;
  aspect-ratio: 16 / 9;
  user-select: none;
  -webkit-user-select: none;
  box-shadow:
    0 0 0 1px color-mix(in srgb, var(--text-h) 6%, transparent),
    0 18px 48px -28px color-mix(in srgb, var(--text-h) 18%, transparent);
}

/*
 * Desktop hero band: fixed height (see :root --home-marketing-hero-h), not 16∶9 or vh,
 * so vertical size stays constant as the column narrows.
 */
.home-hero-figure--desktop .home-hero-figure__frame {
  aspect-ratio: unset;
  height: var(--home-marketing-hero-h);
  min-height: var(--home-marketing-hero-h);
  max-height: var(--home-marketing-hero-h);
}

.home-hero-figure img {
  position: relative;
  z-index: 0;
  display: block;
  margin: 0;
  height: 100%;
  width: max(100%, var(--artwork-base-w, 100%));
  object-fit: cover;
  object-position: 54% center;
  user-select: none;
  -webkit-user-select: none;
  -webkit-user-drag: none;
}

.home-hero-figure__wash {
  position: absolute;
  inset: 0;
  z-index: 1;
  pointer-events: none;
  user-select: none;
  -webkit-user-select: none;
  border-radius: inherit;
  background: var(--media-photo-wash);
}

/* Above wash (z-index 1); draggable browser mockup — drag from title bar only (JS) */
.draggable-browser-overlay {
  position: absolute;
  z-index: 2;
  box-sizing: border-box;
  display: flex;
  flex-direction: column;
  border-radius: 6px;
  cursor: default;
  touch-action: auto;
  box-shadow: var(--elevated-photo-shadow);
  overflow: hidden;
}

.draggable-browser-overlay.draggable-browser-overlay--maximized {
  top: 4px !important;
  right: 4px !important;
  bottom: 4px !important;
  left: 4px !important;
  width: auto !important;
  max-width: none !important;
  height: auto !important;
  transform: none !important;
}

.home-post-lede__photo-slot--equal-overlay-gutters
  > .draggable-browser-overlay.draggable-browser-overlay--maximized {
  top: 4px !important;
  right: 4px !important;
  bottom: 4px !important;
  left: 4px !important;
  width: auto !important;
  max-width: none !important;
  transform: none !important;
}

/*
 * Homepage marketing pathway iframe host (builder + feedback strips).
 * Fill the browser-chrome viewport so absolute-scaled iframes get a real height.
 * Builder keeps `--builder` for the exam chooser; fill-height must stay on the base
 * class so feedback (`kind="feedback"`) does not collapse to 0px.
 */
.home-marketing-pathway-preview {
  position: relative;
  display: flex;
  flex-direction: column;
  min-height: 0;
  height: 100%;
}

.home-marketing-pathway-preview .home-hero-browser-iframe-shell {
  flex: 1 1 auto;
  min-height: 0;
}

/*
 * Homepage exam chooser: two-line segmented control, inset from the
 * browser-chrome edges (not a full-bleed bar).
 */

.home-marketing-pathway-preview__exam-chooser {
  position: relative;
  z-index: 2;
  flex: 0 0 auto;
  display: flex;
  flex-direction: row;
  align-items: center;
  gap: 0.45rem;
  width: calc(100% - 1.2rem);
  max-width: 28.5rem;
  margin: 0.38rem auto 0.32rem;
  padding: 0.28rem 0.38rem;
  border: 1px solid var(--border);
  border-radius: 0.85rem;
  background: color-mix(in srgb, var(--bg) 82%, var(--element-bg));
  pointer-events: auto;
}

.home-marketing-pathway-preview__exam-label {
  margin: 0;
  flex: 0 0 auto;
  font-size: 0.58rem;
  font-weight: 650;
  letter-spacing: 0.03em;
  text-transform: uppercase;
  color: var(--text-muted);
  white-space: nowrap;
}

.home-marketing-pathway-preview__selector {
  display: flex;
  flex-wrap: nowrap;
  align-items: stretch;
  justify-content: stretch;
  flex: 1 1 auto;
  min-width: 0;
  width: auto;
  gap: 0.14rem;
  padding: 0.12rem;
  border-radius: 9999px;
  border: 1px solid var(--border);
  background: var(--element-bg);
}

.home-marketing-pathway-preview__selector-btn {
  appearance: none;
  border: 0;
  margin: 0;
  cursor: pointer;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 0.02rem;
  flex: 1 1 0;
  min-width: 0;
  padding: 0.2rem 0.32rem;
  border-radius: 9999px;
  font: inherit;
  font-size: 0;
  font-weight: 650;
  line-height: 1.15;
  color: var(--text-muted);
  background: transparent;
  transition:
    color 0.15s ease,
    background 0.15s ease,
    box-shadow 0.15s ease;
}

.home-marketing-pathway-preview__selector-college {
  font-size: 0.58rem;
  font-weight: 550;
  letter-spacing: 0.01em;
  color: var(--text-muted);
}

.home-marketing-pathway-preview__selector-exam {
  font-size: 0.72rem;
  font-weight: 650;
  color: inherit;
}

.home-marketing-pathway-preview__selector-btn:hover:not(
  .home-marketing-pathway-preview__selector-btn--active
) {
  color: var(--text-h);
  background: color-mix(in srgb, var(--text-h) 7%, transparent);
}

.home-marketing-pathway-preview__selector-btn:hover:not(
  .home-marketing-pathway-preview__selector-btn--active
)
  .home-marketing-pathway-preview__selector-college {
  color: var(--text-h);
}

.home-marketing-pathway-preview__selector-btn:focus-visible {
  outline: var(--focus-ring-width) var(--focus-ring-style) var(--focus-ring-color);
  outline-offset: var(--focus-ring-offset);
}

.home-marketing-pathway-preview__selector-btn--active {
  color: var(--text-h);
  background: var(--toggle-selected-bg);
  box-shadow: var(--toggle-selected-shadow);
}

.home-marketing-pathway-preview__selector-btn--active
  .home-marketing-pathway-preview__selector-college,
.home-marketing-pathway-preview__selector-btn--active
  .home-marketing-pathway-preview__selector-exam {
  color: var(--text-h);
}

.home-marketing-pathway-preview__fellowship-placeholder {
  flex: 1 1 auto;
  min-height: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 5rem 1.25rem 1.5rem;
  background: var(--bg);
}

.home-marketing-pathway-preview__fellowship-placeholder-text {
  margin: 0;
  max-width: 22rem;
  text-align: center;
  font-size: 1rem;
  font-weight: 600;
  line-height: 1.45;
  color: var(--text-h);
}

@media (max-width: 40rem) {
  .home-marketing-pathway-preview__exam-chooser {
    flex-direction: column;
    align-items: stretch;
    width: calc(100% - 0.9rem);
    max-width: none;
    gap: 0.2rem;
    margin: 0.3rem auto 0.26rem;
    padding: 0.24rem 0.3rem 0.26rem;
  }

  .home-marketing-pathway-preview__selector {
    width: 100%;
    border-radius: 0.75rem;
  }

  .home-marketing-pathway-preview__selector-btn {
    flex: 1 1 0;
    padding: 0.26rem 0.2rem;
    border-radius: 0.55rem;
  }

  .home-marketing-pathway-preview__selector-college {
    font-size: 0.54rem;
  }

  .home-marketing-pathway-preview__selector-exam {
    font-size: 0.66rem;
  }
}

.home-marketing-embed-reset {
  position: absolute;
  right: 0.55rem;
  bottom: 0.55rem;
  z-index: 24;
  display: flex;
  align-items: center;
  justify-content: center;
  width: 2.25rem;
  height: 2.25rem;
  padding: 0;
  border: 1px solid var(--border);
  border-radius: 50%;
  background: color-mix(in srgb, var(--bg) 88%, transparent);
  color: var(--text-h);
  box-shadow: var(--elevated-photo-shadow);
  cursor: pointer;
  touch-action: manipulation;
}

.home-marketing-embed-reset:hover {
  background: color-mix(in srgb, var(--element-bg) 92%, var(--bg));
}

.home-marketing-embed-reset:focus-visible {
  outline: 2px solid var(--text-h);
  outline-offset: 2px;
}

.home-marketing-embed-reset svg {
  width: 1.05rem;
  height: 1.05rem;
}

/*
 * Titlebar uses `touch-action: none` so drags aren’t interpreted as scroll;
 * some UAs still show a link/hand cursor for that combo — force the arrow.
 */
.draggable-browser-overlay .browser-chrome__titlebar,
.draggable-browser-overlay .browser-chrome__titlebar * {
  cursor: default !important;
  touch-action: none;
}

.draggable-browser-overlay .browser-chrome__dot-btn {
  cursor: pointer !important;
  touch-action: manipulation;
}

.browser-chrome {
  flex: 1;
  display: flex;
  flex-direction: column;
  min-height: 0;
  min-width: 0;
  background: var(--bg);
}

.browser-chrome__titlebar {
  flex-shrink: 0;
  display: flex;
  align-items: center;
  gap: 0.35rem;
  padding: 0.22rem 0.38rem 0.26rem;
  background: var(--element-bg);
  border-bottom: 1px solid var(--border);
}

.browser-chrome__titlebar--with-controls {
  gap: 0;
  padding: 0.18rem 0.32rem 0.22rem;
}

.browser-chrome__titlebar-drag {
  flex: 1;
  min-width: 0;
  min-height: 1.1rem;
  align-self: stretch;
  margin: -0.18rem -0.32rem -0.22rem 0;
  padding: 0.18rem 0.38rem 0.22rem 0.28rem;
  border-radius: 0 4px 0 0;
}

.browser-chrome__traffic--controls {
  flex-shrink: 0;
  gap: 0.22rem;
}

.browser-chrome__dot-btn {
  box-sizing: border-box;
  width: 1.125rem;
  height: 1.125rem;
  padding: 0;
  border: none;
  border-radius: 50%;
  flex-shrink: 0;
  display: flex;
  align-items: center;
  justify-content: center;
}

.browser-chrome__dot-btn:focus-visible {
  outline: 2px solid var(--text-h);
  outline-offset: 1px;
}

.browser-chrome__traffic {
  display: flex;
  align-items: center;
  gap: 0.22rem;
}

.browser-chrome__dot {
  width: 7px;
  height: 7px;
  border-radius: 50%;
  flex-shrink: 0;
  box-shadow: inset 0 -0.5px 1px rgba(0, 0, 0, 0.12);
}

/* Grey steps vs titlebar — not coloured traffic lights */
.browser-chrome__dot--close {
  background: color-mix(in srgb, var(--text-h) 22%, var(--element-bg));
}

.browser-chrome__dot--min {
  background: color-mix(in srgb, var(--text-h) 14%, var(--element-bg));
}

.browser-chrome__dot--max {
  background: color-mix(in srgb, var(--text-h) 8%, var(--element-bg));
}

.browser-chrome__viewport {
  flex: 1;
  min-height: 0;
  min-width: 0;
  background: var(--bg);
}

.draggable-browser-overlay .browser-chrome__viewport {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: 0.35rem 0.45rem;
}

/*
 * Chrome/Safari can render the measured JS centre for post-lede shrink-panel embeds a few
 * pixels off at narrow widths. These homepage embeds should visually match the hero:
 * fixed 5% painting gutters on both sides, no transform/width math involved.
 */
.home-post-lede__photo-slot--equal-overlay-gutters > .draggable-browser-overlay {
  left: 5% !important;
  right: 5% !important;
  width: auto !important;
  max-width: none !important;
  transform: none !important;
}

.home-hero-browser-placeholder {
  display: grid;
  place-items: center;
  width: 100%;
  height: 100%;
  border-radius: 4px;
  background: color-mix(in srgb, var(--bg) 75%, transparent);
  border: 1px dashed color-mix(in srgb, var(--border) 70%, var(--text-muted));
  color: var(--text-muted);
  font-size: 0.95rem;
}

.draggable-browser-overlay
  .browser-chrome__viewport:has(.home-hero-browser-iframe-shell) {
  padding: 0;
  align-items: stretch;
  justify-content: flex-start;
}

.draggable-browser-overlay
  .browser-chrome__viewport:has(.home-founders-mock-cq) {
  padding: 0.35rem 0.45rem;
  align-items: center;
  justify-content: center;
  overflow-x: hidden;
  overflow-y: auto;
  -webkit-overflow-scrolling: touch;
}

.draggable-browser-overlay
  .browser-chrome__viewport:has(.home-application-strip-preview) {
  padding: 0;
  align-items: stretch;
  justify-content: flex-start;
}

/*
 * Founders browser mock — photo + caption; card chrome echoes `/directory` mode tiles
 * (flat border; hover/picked border only — no drop shadows).
 * Outer `.home-founders-mock-cq` is an inline-size container so `cqi` applies to typography.
 */
.home-founders-mock-cq {
  container-type: inline-size;
  container-name: founders-mock;
  position: relative;
  flex: 1;
  min-height: 0;
  min-width: 0;
  width: 100%;
  display: flex;
  flex-direction: column;
  overflow: hidden;
}

.home-founders-mock {
  position: relative;
  flex: 1;
  min-height: 0;
  min-width: 0;
  width: 100%;
  display: flex;
  flex-direction: column;
  overflow: hidden;
  font-family: var(--heading);
  color: var(--text-h);
  font-size: clamp(0.58rem, 5.4cqi, 1rem);
}

.home-founders-mock__body {
  flex: 1;
  min-height: 0;
  display: flex;
  flex-direction: column;
  justify-content: center;
  gap: 0;
  /* Flatter vertical padding — avoids gaps growing oddly as the mock narrows (cqi-linked type). */
  /* Slightly wider horizontal inset so picked-card ring + chrome aren’t flush to clip edges. */
  padding: clamp(0.38em, 3.2cqi, 0.62em) clamp(0.34em, 2.8cqi, 0.5em) clamp(0.38em, 3.2cqi, 0.62em);
  box-sizing: border-box;
  overflow-y: auto;
  -webkit-overflow-scrolling: touch;
}

.home-founders-mock__vote-stack {
  --fm-cta-fs: 0.66em;
  --fm-cta-pad-y: 0.62em;
  --fm-cta-pad-x: 0.95em;
  --fm-cta-minw: clamp(4.75rem, 38cqi, 8rem);

  flex-shrink: 0;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0;
  width: 100%;
  /* Softer than 19cqi — spacing stayed large when the iframe got tighter */
  margin-top: clamp(1em, 7cqi, 1.65em);
}

.home-founders-mock__people {
  flex: 0 0 auto;
  list-style: none;
  margin: 0;
  padding: 0;
  display: grid;
  /* Prefer two columns only when container is comfortably wide enough; collapse to one. */
  grid-template-columns: repeat(auto-fit, minmax(min(100%, 10.75rem), 1fr));
  gap: clamp(0.32em, 2.5cqi, 0.52em) clamp(0.28em, 2.5cqi, 0.48em);
  align-content: start;
}

.home-founders-mock__person {
  margin: 0;
  padding: 0;
  min-width: 0;
}

.home-founders-mock__choice {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0;
  width: 100%;
  margin: 0;
  padding: 0;
  border: none;
  background: none;
  font: inherit;
  color: inherit;
  cursor: pointer;
  text-align: center;
  box-sizing: border-box;
  -webkit-tap-highlight-color: transparent;
}

.home-founders-mock__choice:disabled {
  cursor: progress;
  opacity: 0.75;
}

.home-founders-mock__choice:focus-visible {
  outline: var(--focus-ring-width) var(--focus-ring-style) var(--focus-ring-color);
  outline-offset: 3px;
  border-radius: 6px;
}

.home-founders-mock__card {
  --fm-card-radius: 10px;

  /* Stacking anchor for the picked-state ring overlay (::after). */
  position: relative;
  display: flex;
  flex-direction: column;
  align-items: stretch;
  /*
   * Keep portrait size coherent when crossing 2-up → stacked: plain 78% width would
   * jump from ~39% container to ~78% container. Clamp with cqi + vw so width tracks
   * the mock inset and viewport without a discontinuity when the grid collapses.
   */
  box-sizing: border-box;
  width: min(78%, 37cqi, 44vw);
  max-width: 100%;
  margin-inline: auto;
  border-radius: var(--fm-card-radius);
  overflow: hidden;
  background: var(--site-index-bg);
  border: 1px solid color-mix(in srgb, var(--text-h) 10%, transparent);
  box-shadow: none;
  transition:
    transform 0.18s ease,
    border-color 0.18s ease,
    box-shadow 0.18s ease;
}

[data-theme='dark'] .home-founders-mock__card {
  border-color: color-mix(in srgb, var(--text-h) 12%, transparent);
}

.home-founders-mock__choice:hover:not(:disabled) .home-founders-mock__card {
  transform: translateY(-2px);
  border-color: color-mix(in srgb, var(--text-h) 18%, transparent);
}

[data-theme='dark'] .home-founders-mock__choice:hover:not(:disabled) .home-founders-mock__card {
  border-color: color-mix(in srgb, var(--text-h) 24%, transparent);
}

/* Picked tile: no hover lift (override `.choice:hover` which otherwise still matches). */
.home-founders-mock__choice.home-founders-mock__choice--picked .home-founders-mock__card,
.home-founders-mock__choice.home-founders-mock__choice--picked:hover:not(:disabled) .home-founders-mock__card {
  transform: none;
}

/*
 * Picked state: plain inset box-shadow sits *under* flex children, so it was nearly invisible.
 * A ::after overlay paints the ring above photo + caption; ring stays inside border-radius.
 */
.home-founders-mock__choice--picked .home-founders-mock__card::after {
  content: '';
  position: absolute;
  inset: 0;
  border-radius: inherit;
  pointer-events: none;
  z-index: 4;
  box-shadow: inset 0 0 0 3px var(--focus-ring-color);
}

.home-founders-mock__photo-wrap {
  position: relative;
  width: 100%;
  aspect-ratio: 1;
  flex-shrink: 0;
  overflow: hidden;
  border-radius: var(--fm-card-radius) var(--fm-card-radius) 0 0;
  background: var(--element-bg);
}

/*
 * Crop source photo: drop top 10% + bottom 40% (keep middle 50% vertically), then
 * `object-fit: cover` fills the square with that band. `object-view-box` inset
 * percentages are relative to intrinsic image size (Chrome 111+, Safari 17.4+).
 * Fallback: bias framing toward the midpoint of that band (35% from top).
 */
.home-founders-mock__photo {
  display: block;
  width: 100%;
  height: 100%;
  border-radius: inherit;
  object-fit: cover;
  object-position: 50% 35%;
  filter: saturate(70%);
  vertical-align: middle;
}

@supports (object-view-box: inset(0%)) {
  .home-founders-mock__photo {
    object-view-box: inset(10% 0% 40% 0%);
    object-position: 50% 50%;
  }
}

/* Caption body: same panel fill as `.directory-page__mode-card` (light); dark keeps ink panel + white type */
.home-founders-mock__caption-tile {
  display: flex;
  flex-direction: column;
  align-items: stretch;
  gap: 0.3em;
  width: 100%;
  padding: 0.58em 0.5em 0.62em;
  box-sizing: border-box;
  text-align: center;
  font-family: var(--heading);
  background: var(--site-index-bg);
  border-top: 1px solid color-mix(in srgb, var(--text-h) 10%, transparent);
}

[data-theme='dark'] .home-founders-mock__caption-tile {
  background: #000;
  border-top-color: color-mix(in srgb, #fff 18%, transparent);
}

.home-founders-mock__caption-tile .home-founders-mock__name {
  margin: 0;
}

.home-founders-mock__caption-tile .home-founders-mock__titles {
  margin: 0;
}

.home-founders-mock__celebrate {
  position: absolute;
  inset: 0;
  z-index: 1;
  display: grid;
  place-items: center;
  pointer-events: none;
  animation: home-founders-celebrate-fade-in 0.28s ease-out both;
}

.home-founders-mock__celebrate-icon {
  width: min(3.35em, 56%);
  height: auto;
  color: var(--text-h);
  filter:
    drop-shadow(0 0 2px rgba(255, 255, 255, 0.92))
    drop-shadow(0 2px 10px rgba(0, 0, 0, 0.28));
  animation: home-founders-celebrate-thumb 1.1s cubic-bezier(0.22, 1, 0.36, 1) both;
}

[data-theme='dark'] .home-founders-mock__celebrate-icon {
  color: #fff;
  filter:
    drop-shadow(0 0 2px rgba(0, 0, 0, 0.75))
    drop-shadow(0 2px 14px rgba(0, 0, 0, 0.55));
}

@keyframes home-founders-celebrate-fade-in {
  from {
    opacity: 0;
  }

  to {
    opacity: 1;
  }
}

@keyframes home-founders-celebrate-thumb {
  0% {
    opacity: 0;
    transform: scale(0.82) rotate(-5deg);
  }

  52% {
    opacity: 1;
    transform: scale(1.05) rotate(1deg);
  }

  78% {
    transform: scale(0.985) rotate(0deg);
  }

  100% {
    opacity: 1;
    transform: scale(1) rotate(0deg);
  }
}

/*
 * Caption type: `/directory` mode heading + feature lines (`.directory-page__mode-heading`,
 * `.directory-page__feature-item`).
 */
.home-founders-mock__name {
  display: block;
  margin: 0;
  /*
   * Single rule for both founders — identical size. Fluid down from the mock width (cqi)
   * so “Christopher Leeson” stays one line before wrapping; nowrap enforces one line.
   */
  font-size: clamp(0.48rem, calc(0.32rem + 2.35cqi), 0.92rem);
  font-weight: 600;
  letter-spacing: -0.025em;
  line-height: 1.28;
  color: var(--text-h);
  white-space: nowrap;
}

.home-founders-mock__titles {
  display: flex;
  flex-direction: column;
  gap: 0.12em;
  font-size: 0.81em;
  line-height: 1.45;
  font-weight: 400;
  color: color-mix(in srgb, var(--text) 92%, var(--text-h));
}

.home-founders-mock__title-line {
  display: block;
}

.home-founders-mock__title-line--muted {
  font-size: 0.94em;
  color: var(--text-muted);
}

[data-theme='dark'] .home-founders-mock__caption-tile .home-founders-mock__name {
  color: #fff;
}

[data-theme='dark'] .home-founders-mock__caption-tile .home-founders-mock__titles {
  color: #fff;
}

[data-theme='dark'] .home-founders-mock__caption-tile .home-founders-mock__title-line--muted {
  color: color-mix(in srgb, #fff 76%, transparent);
}

/*
 * Narrow mocks (viewport or container ≤450px): founder list stacks to one column;
 * each tile is photo | name/titles in one row (second row mirrored).
 * This block intentionally comes *after* base `.home-founders-mock__card`, `.photo-wrap`,
 * and `.caption-tile` so `flex-direction: row`, radii, and borders override the defaults.
 */
/* Stacked photo|text rows + compact vote chrome only when the mock is quite narrow. */
@media (max-width: 450px) {
  .home-founders-mock__body {
    justify-content: flex-start;
    padding: clamp(0.32em, 3.5cqi, 0.52em) clamp(0.34rem, 1.85cqi, 0.62rem)
      clamp(0.55em, 6cqi, 0.85em);
  }

  /*
   * Founders + survey: intrinsic row heights — avoids minmax(1fr) stretching founder rows
   * apart when the chrome gets shorter/narrower (was ballooning gaps between tiles + survey).
   */
  .home-founders-mock:not(.home-founders-mock--story) .home-founders-mock__body {
    overflow: hidden;
    display: grid;
    grid-template-rows: auto auto;
    gap: clamp(0.28em, 2.25cqi, 0.42em);
  }

  .home-founders-mock__people {
    grid-column: 1 / -1;
    grid-row: 1 / 2;
    display: flex;
    flex-direction: column;
    gap: clamp(0.2em, 1.75cqi, 0.38em);
    width: 100%;
    min-height: 0;
    align-self: stretch;
    overflow: hidden;
    /* Room for the 3px picked ring so it isn’t lost against `overflow: hidden` ancestors. */
    padding-inline: clamp(5px, 1.15cqi, 10px);
    box-sizing: border-box;
  }

  .home-founders-mock__people > .home-founders-mock__person {
    flex: 0 0 auto;
    min-height: 0;
    display: flex;
    flex-direction: column;
  }

  .home-founders-mock__people > .home-founders-mock__choice {
    flex: 0 0 auto;
    min-height: 0;
    align-items: stretch;
  }

  .home-founders-mock__card {
    flex: 0 0 auto;
    min-height: 0;
    flex-direction: row;
    align-items: stretch;
    width: 100%;
    max-width: none;
    margin-inline: 0;
  }

  /*
   * Square thumb capped by row height so two rows always fit above the voting strip —
   * no scrolling to reveal the bottom of the lower portrait.
   */
  .home-founders-mock__photo-wrap {
    flex: 0 0 auto;
    align-self: center;
    box-sizing: border-box;
    max-height: 100%;
    width: auto;
    max-width: min(44%, max(3.05rem, min(44cqi, 36vw, 34vmin)));
    aspect-ratio: 1;
    border-radius: var(--fm-card-radius) 0 0 var(--fm-card-radius);
  }

  .home-founders-mock__caption-tile {
    flex: 1;
    min-width: 0;
    min-height: 0;
    overflow: hidden;
    width: auto;
    align-self: stretch;
    justify-content: center;
    text-align: start;
    border-top: none;
    border-left: 1px solid color-mix(in srgb, var(--text-h) 10%, transparent);
    border-radius: 0 var(--fm-card-radius) var(--fm-card-radius) 0;
    padding: 0.45em 0.48em 0.48em;
  }

  [data-theme='dark'] .home-founders-mock__caption-tile {
    border-top: none;
    border-left-color: color-mix(in srgb, #fff 18%, transparent);
  }

  /* Second founder in stack: text left, photo right (only in these thin layouts; wide 2-up is unchanged). */
  .home-founders-mock__people > .home-founders-mock__person:nth-child(2) .home-founders-mock__card {
    flex-direction: row-reverse;
  }

  .home-founders-mock__people > .home-founders-mock__person:nth-child(2) .home-founders-mock__photo-wrap {
    border-radius: 0 var(--fm-card-radius) var(--fm-card-radius) 0;
  }

  .home-founders-mock__people > .home-founders-mock__person:nth-child(2) .home-founders-mock__caption-tile {
    border-left: none;
    border-right: 1px solid color-mix(in srgb, var(--text-h) 10%, transparent);
    border-radius: var(--fm-card-radius) 0 0 var(--fm-card-radius);
  }

  [data-theme='dark']
    .home-founders-mock__people
    > .home-founders-mock__person:nth-child(2)
    .home-founders-mock__caption-tile {
    border-left: none;
    border-right-color: color-mix(in srgb, #fff 18%, transparent);
  }

  .home-founders-mock__vote-stack {
    grid-column: 1 / -1;
    grid-row: 2 / 3;
    margin-top: 0;
    position: relative;
    z-index: 1;
    flex-shrink: 0;
    padding-top: 0.28em;
    /*
     * Fixed pill metrics (narrow ~450px-wide mock / slot): same as clamp(4.75rem, 38cqi, 8rem) ceiling on growth.
     * Prevents CTAs narrowing further when the UA gets tighter.
     */
    --fm-cta-fs: 0.66em;
    --fm-cta-pad-y: 0.62em;
    --fm-cta-pad-x: 0.95em;
    --fm-cta-minw: 7.35rem;
    background: var(--bg);
  }

  [data-theme='dark'] .home-founders-mock__vote-stack {
    box-shadow: none;
  }

  .home-founders-mock__vote.btn {
    margin-bottom: 0.58em;
  }

  .home-founders-mock__prompt {
    margin-bottom: clamp(0.36em, 2.8cqi, 0.58em);
    font-size: clamp(0.68em, calc(7cqi + 1.1vw), 0.82em);
  }

  .draggable-browser-overlay .browser-chrome__viewport:has(.home-founders-mock-cq) {
    padding: 0.3rem clamp(0.24rem, 1.45vw, 0.42rem) 0.55rem;
  }
}

@container founders-mock (max-width: 450px) {
  .home-founders-mock__body {
    justify-content: flex-start;
    padding: clamp(0.32em, 3.5cqi, 0.52em) clamp(0.34rem, 1.85cqi, 0.62rem)
      clamp(0.55em, 6cqi, 0.85em);
  }

  .home-founders-mock:not(.home-founders-mock--story) .home-founders-mock__body {
    overflow: hidden;
    display: grid;
    grid-template-rows: auto auto;
    gap: clamp(0.28em, 2.25cqi, 0.42em);
  }

  .home-founders-mock__people {
    grid-column: 1 / -1;
    grid-row: 1 / 2;
    display: flex;
    flex-direction: column;
    gap: clamp(0.2em, 1.75cqi, 0.38em);
    width: 100%;
    min-height: 0;
    align-self: stretch;
    overflow: hidden;
    padding-inline: clamp(5px, 1.15cqi, 10px);
    box-sizing: border-box;
  }

  .home-founders-mock__people > .home-founders-mock__person {
    flex: 0 0 auto;
    min-height: 0;
    display: flex;
    flex-direction: column;
  }

  .home-founders-mock__people > .home-founders-mock__choice {
    flex: 0 0 auto;
    min-height: 0;
    align-items: stretch;
  }

  .home-founders-mock__card {
    flex: 0 0 auto;
    min-height: 0;
    flex-direction: row;
    align-items: stretch;
    width: 100%;
    max-width: none;
    margin-inline: 0;
  }

  .home-founders-mock__photo-wrap {
    flex: 0 0 auto;
    align-self: center;
    box-sizing: border-box;
    max-height: 100%;
    width: auto;
    max-width: min(44%, max(3.05rem, min(44cqi, 36vw, 34vmin)));
    aspect-ratio: 1;
    border-radius: var(--fm-card-radius) 0 0 var(--fm-card-radius);
  }

  .home-founders-mock__caption-tile {
    flex: 1;
    min-width: 0;
    min-height: 0;
    overflow: hidden;
    width: auto;
    align-self: stretch;
    justify-content: center;
    text-align: start;
    border-top: none;
    border-left: 1px solid color-mix(in srgb, var(--text-h) 10%, transparent);
    border-radius: 0 var(--fm-card-radius) var(--fm-card-radius) 0;
    padding: 0.45em 0.48em 0.48em;
  }

  [data-theme='dark'] .home-founders-mock__caption-tile {
    border-top: none;
    border-left-color: color-mix(in srgb, #fff 18%, transparent);
  }

  /* Second founder in stack: text left, photo right (only in these thin layouts; wide 2-up is unchanged). */
  .home-founders-mock__people > .home-founders-mock__person:nth-child(2) .home-founders-mock__card {
    flex-direction: row-reverse;
  }

  .home-founders-mock__people > .home-founders-mock__person:nth-child(2) .home-founders-mock__photo-wrap {
    border-radius: 0 var(--fm-card-radius) var(--fm-card-radius) 0;
  }

  .home-founders-mock__people > .home-founders-mock__person:nth-child(2) .home-founders-mock__caption-tile {
    border-left: none;
    border-right: 1px solid color-mix(in srgb, var(--text-h) 10%, transparent);
    border-radius: var(--fm-card-radius) 0 0 var(--fm-card-radius);
  }

  [data-theme='dark']
    .home-founders-mock__people
    > .home-founders-mock__person:nth-child(2)
    .home-founders-mock__caption-tile {
    border-left: none;
    border-right-color: color-mix(in srgb, #fff 18%, transparent);
  }

  .home-founders-mock__vote-stack {
    grid-column: 1 / -1;
    grid-row: 2 / 3;
    margin-top: 0;
    position: relative;
    z-index: 1;
    flex-shrink: 0;
    padding-top: 0.28em;
    /*
     * Fixed pill metrics (narrow ~450px-wide mock / slot): same as clamp(4.75rem, 38cqi, 8rem) ceiling on growth.
     * Prevents CTAs narrowing further when the UA gets tighter.
     */
    --fm-cta-fs: 0.66em;
    --fm-cta-pad-y: 0.62em;
    --fm-cta-pad-x: 0.95em;
    --fm-cta-minw: 7.35rem;
    background: var(--bg);
  }

  [data-theme='dark'] .home-founders-mock__vote-stack {
    box-shadow: none;
  }

  .home-founders-mock__vote.btn {
    margin-bottom: 0.58em;
  }

  .home-founders-mock__prompt {
    margin-bottom: clamp(0.36em, 2.8cqi, 0.58em);
    font-size: clamp(0.68em, calc(7cqi + 1.1vw), 0.82em);
  }
}

.home-founders-mock__prompt {
  flex-shrink: 0;
  width: 100%;
  margin: 0 0 clamp(0.55em, 4.5cqi, 0.85em);
  text-align: center;
  font-family: var(--heading);
  font-size: 0.82em;
  font-weight: 400;
  line-height: 1.45;
  color: color-mix(in srgb, var(--text) 92%, var(--text-h));
  text-wrap: balance;
  opacity: 1;
  transform: translateY(0);
  transition:
    opacity 0.32s ease,
    transform 0.32s ease;
}

.home-founders-mock__prompt--hide {
  opacity: 0;
  transform: translateY(0.2em);
}

/* Cast vote + Our story: identical footprint (pill size); primary vs outline only */
.home-founders-mock__vote.btn {
  flex-shrink: 0;
  align-self: center;
  box-sizing: border-box;
  min-width: var(--fm-cta-minw, clamp(4.75rem, 38cqi, 8rem));
  padding: var(--fm-cta-pad-y, 0.62em) var(--fm-cta-pad-x, 0.95em);
  font-size: var(--fm-cta-fs, 0.66em);
  font-weight: 600;
  line-height: 1.25;
  border-radius: 9999px;
  border: 1px solid transparent;
  margin-bottom: clamp(0.32em, 3cqi, 0.52em);
}

.home-founders-mock__story.btn {
  flex-shrink: 0;
  margin: 0;
  box-sizing: border-box;
  min-width: var(--fm-cta-minw);
  padding: var(--fm-cta-pad-y) var(--fm-cta-pad-x);
  font-size: var(--fm-cta-fs);
  font-weight: 600;
  letter-spacing: -0.02em;
  line-height: 1.25;
  border-radius: 9999px;
  color: var(--text-h);
  text-align: center;
  text-decoration: none;
  background: transparent;
  border: 1px solid color-mix(in srgb, var(--text-h) 32%, transparent);
  box-shadow: none;
  transition:
    background 0.2s ease,
    border-color 0.2s ease,
    color 0.2s ease;
}

.home-founders-mock__story.btn:hover {
  background: color-mix(in srgb, var(--text-h) 7%, transparent);
  border-color: color-mix(in srgb, var(--text-h) 48%, transparent);
  color: var(--text-h);
}

[data-theme='dark'] .home-founders-mock__story.btn {
  border-color: color-mix(in srgb, var(--text-h) 42%, transparent);
}

[data-theme='dark'] .home-founders-mock__story.btn:hover {
  background: color-mix(in srgb, var(--text-h) 10%, transparent);
  border-color: color-mix(in srgb, var(--text-h) 55%, transparent);
}

/*
 * In-mock “Our story”: match `.home-post-lede__aside-detail` / mirrored aside
 * (same strip as “Doctors for doctors”) — one size, one alignment, no panels.
 */
.home-founders-mock.home-founders-mock--story {
  font-size: var(--home-post-lede-stacked-detail-fs);
  line-height: 1.45;
  color: var(--text);
}

.home-founders-mock--story .home-founders-mock__body {
  padding-inline: clamp(0.42em, 4.2cqi, 0.72em);
}

.home-founders-story {
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
  width: 100%;
  max-width: min(100%, 38em);
  margin-inline: auto;
  padding-bottom: 0.35rem;
}

.home-founders-story__back {
  flex-shrink: 0;
  align-self: flex-start;
  display: inline-flex;
  align-items: center;
  gap: 0.28em;
  margin: 0;
  padding: 0.35rem 0.55rem 0.35rem 0.48rem;
  border: 1px solid color-mix(in srgb, var(--text-h) 28%, transparent);
  border-radius: 9999px;
  background: transparent;
  font-family: inherit;
  font-size: 1em;
  font-weight: 600;
  letter-spacing: -0.02em;
  line-height: 1.2;
  color: var(--text-h);
  cursor: pointer;
  transition: border-color 0.18s ease;
  -webkit-tap-highlight-color: transparent;
}

.home-founders-story__back:hover {
  border-color: color-mix(in srgb, var(--text-h) 44%, transparent);
}

.home-founders-story__back:focus-visible {
  outline: var(--focus-ring-width) var(--focus-ring-style) var(--focus-ring-color);
  outline-offset: 3px;
}

.home-founders-story__back-icon {
  flex-shrink: 0;
  margin-top: 0.04em;
  opacity: 0.88;
}

[data-theme='dark'] .home-founders-story__back {
  border-color: color-mix(in srgb, var(--text-h) 38%, transparent);
}

[data-theme='dark'] .home-founders-story__back:hover {
  border-color: color-mix(in srgb, var(--text-h) 52%, transparent);
}

.home-founders-story__article {
  display: flex;
  flex-direction: column;
  gap: 0.45rem;
  margin: 0;
  padding: 0;
  text-align: left;
  text-wrap: pretty;
}

.home-founders-story__p {
  margin: 0;
  font-family: inherit;
  font-size: 1em;
  font-weight: 400;
  line-height: 1.45;
  color: var(--text);
}

.home-founders-story__p strong {
  font-weight: 600;
  color: var(--text-h);
}

.home-founders-story__p em {
  font-style: italic;
  color: inherit;
}

.home-founders-mock__vote.btn--primary:disabled,
.home-founders-mock__vote.btn--primary:disabled:hover {
  cursor: not-allowed;
  opacity: 0.42;
  transform: none;
}

@media (prefers-reduced-motion: reduce) {
  .home-founders-mock__celebrate-icon {
    animation: none;
    opacity: 1;
    transform: scale(1) rotate(0deg);
  }

  .home-founders-mock__celebrate {
    animation: none;
    opacity: 1;
  }

  .home-founders-mock__card {
    transition: none;
  }

  .home-founders-mock__photo-wrap,
  .home-founders-mock__caption-tile {
    transition: none;
  }

  .home-founders-mock__choice:hover:not(:disabled) .home-founders-mock__card,
  .home-founders-mock__choice--picked:hover:not(:disabled) .home-founders-mock__card {
    transform: none;
  }

  .home-founders-mock__vote-stack {
    transition: none;
  }

  .home-founders-mock__vote.btn,
  .home-founders-mock__story.btn {
    transition: none;
  }

  .home-founders-mock__prompt {
    transition: none;
  }

  .home-founders-mock__prompt--hide {
    transform: none;
  }
}

.home-hero-browser-iframe-shell {
  position: relative;
  flex: 1;
  min-height: 0;
  min-width: 0;
  width: 100%;
  display: flex;
  flex-direction: column;
  align-items: stretch;
  box-sizing: border-box;
  overflow: hidden;
  isolation: isolate;
}

/* Fills chrome viewport; iframe content drawn ~20% smaller (125% layout × scale(0.8)) */
.home-hero-browser-iframe-viewport {
  flex: 1;
  min-height: 0;
  min-width: 0;
  width: 100%;
  display: flex;
  align-items: stretch;
  justify-content: flex-start;
  box-sizing: border-box;
  overflow: hidden;
}

.home-hero-browser-iframe-scaled {
  position: relative;
  overflow: hidden;
  flex: 1;
  min-width: 0;
  min-height: 0;
  width: 100%;
  height: 100%;
}

.home-hero-browser-iframe {
  position: absolute;
  top: 0;
  left: 0;
  /* 125% × 0.8 = 100% — fills shell while viva-builder lays out in a larger logical size */
  width: 125%;
  height: 125%;
  border: 0;
  display: block;
  cursor: default;
  transform: scale(0.8);
  transform-origin: 0 0;
}

/* Homepage post-lede: `/application` iframe + readable overlay (rotating questions, active mic) */
.home-application-strip-preview {
  position: relative;
  flex: 1;
  align-self: stretch;
  width: 100%;
  min-height: 0;
  min-width: 0;
  overflow: hidden;
}

.home-application-strip-preview__iframe {
  position: absolute;
  inset: 0;
  z-index: 0;
}

.home-application-strip-preview__iframe .home-hero-browser-iframe-shell {
  height: 100%;
}

.home-application-strip-preview .home-hero-browser-iframe {
  pointer-events: none;
}

.home-application-strip-preview__overlay {
  position: absolute;
  inset: 0;
  z-index: 1;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  width: 100%;
  min-height: 0;
  pointer-events: none;
}

/*
 * Match `/application` mic + subtitle rhythm: mic centred, copy below with the same
 * max line length as `.application-page__audio-caption-host` — but width must be tied to
 * this strip (full slot), not the shrink-wrapped mic anchor, or the text collapses to a narrow column.
 */
.home-application-strip-preview__mic-caption-slot {
  display: flex;
  align-items: center;
  justify-content: center;
  flex: 1 1 auto;
  width: 100%;
  min-height: 0;
  min-width: 0;
  box-sizing: border-box;
  padding: clamp(1rem, 3vh, 2rem) clamp(0.75rem, 2vw, 1rem);
}

.home-application-strip-preview__mic-caption-stack {
  display: flex;
  flex-direction: column;
  align-items: center;
  width: 100%;
  min-width: 0;
  box-sizing: border-box;
}

.home-application-strip-preview__mic-hero-wrap {
  flex-shrink: 0;
}

.home-application-strip-preview__question-as-caption {
  width: min(38rem, 100%);
  max-width: 100%;
  margin-top: 1lh;
  padding: 0 0.75rem;
  box-sizing: border-box;
  pointer-events: none;
  font-size: clamp(0.84rem, 2.2vw, 0.98rem);
  line-height: 1.48;
}

.home-application-strip-preview__question-zone {
  flex: 1.12 1 0;
  min-height: 0;
  box-sizing: border-box;
  padding: clamp(0.65rem, 2.5vw, 1.1rem) clamp(0.75rem, 3vw, 1.35rem)
    clamp(0.45rem, 1.5vw, 0.75rem);
  background: rgb(from var(--bg) r g b / 1);
  display: flex;
  flex-direction: column;
  justify-content: center;
  gap: 0.45rem;
}

.home-application-strip-preview__question-kicker {
  margin: 0;
  font-size: 0.62rem;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: color-mix(in srgb, var(--text-h) 48%, transparent);
}

.home-application-strip-preview__question-text {
  margin: 0;
  text-align: center;
  font-family: var(--sans);
  font-size: inherit;
  line-height: inherit;
  font-weight: 400;
  color: color-mix(in srgb, var(--text-h) 90%, transparent);
}

@keyframes home-application-strip-preview-q-in {
  from {
    opacity: 0;
    transform: translateY(5px);
  }

  to {
    opacity: 1;
    transform: translateY(0);
  }
}

.home-application-strip-preview__question-text--initial {
  animation: home-application-strip-preview-q-in 0.55s ease-out both;
}

.home-application-strip-preview__question-text--cycle {
  animation: home-application-strip-preview-q-in 0.42s ease-out both;
}

.home-application-strip-preview__mic-zone {
  flex: 1 1 0;
  min-height: 0;
  display: flex;
  flex-direction: column;
  align-items: stretch;
  justify-content: flex-end;
  background: rgb(from var(--bg) r g b / 1);
}

.home-application-strip-preview__mic-slot {
  flex: 1 1 auto;
  min-height: 0;
}

.home-application-strip-preview__dock {
  flex-shrink: 0;
  padding-top: 0.35rem;
  padding-bottom: max(0.25rem, env(safe-area-inset-bottom, 0px));
}

@media (prefers-reduced-motion: reduce) {
  .home-application-strip-preview__question-text--initial,
  .home-application-strip-preview__question-text--cycle {
    animation: none;
  }
}

/* Reset preview — inset from full browser content area (shell), not the letterboxed iframe tile */
.home-hero-iframe-reset {
  position: absolute;
  right: 5%;
  bottom: 5%;
  z-index: 3;
  display: flex;
  align-items: center;
  justify-content: center;
  width: 1.75rem;
  height: 1.75rem;
  margin: 0;
  padding: 0;
  border: none;
  border-radius: 0;
  background: transparent;
  color: var(--text-h);
  cursor: pointer;
  box-shadow: none;
}

.home-hero-iframe-reset:hover {
  color: var(--text-h);
  opacity: 0.82;
}

.home-hero-iframe-reset:focus-visible {
  outline: var(--focus-ring-width) var(--focus-ring-style) var(--focus-ring-color);
  outline-offset: var(--focus-ring-offset);
}

.home-hero-iframe-reset svg {
  width: 1.125rem;
  height: 1.125rem;
  flex-shrink: 0;
  filter: drop-shadow(0 1px 1px rgb(0 0 0 / 0.22));
}

[data-theme='dark'] .home-hero-iframe-reset svg {
  filter: drop-shadow(0 1px 2px rgb(0 0 0 / 0.45));
}

/* Top rail pillars run straight into the Viva Builder hero — no gap */
.home-article > .home-top-rail + .home-hero-figure {
  margin-top: 0;
}

/* Gap under hero figure → first feedback strip (lede moved above figure) */
.home-hero-figure + .home-post-lede-strip-cq {
  margin-top: 2.85rem;
}

/* Between consecutive feedback strips — double the usual strip gap */
.home-post-lede-strip-cq + .home-post-lede-strip-cq {
  margin-top: 5.7rem;
}

.home-post-lede {
  margin-bottom: 0;
  padding-bottom: 0;
  width: 100%;
  max-width: none;
}

.home-article > .home-post-lede-strip-cq:last-of-type {
  margin-bottom: 0;
  padding-bottom: clamp(2.5rem, 10vh, 6rem);
}

/* CTA fills slack above the site index; flex-shrink 0 avoids collapse when the article is tall */
.home-pre-footer-cta {
  flex: 1 0 auto;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  box-sizing: border-box;
  width: 100%;
  padding-top: clamp(2rem, 5vh, 3.75rem);
  padding-bottom: clamp(3.75rem, 14vh, 9rem);
}

.home-pre-footer-cta__inner {
  flex-shrink: 0;
  margin-inline: auto;
  text-align: center;
}

.home-pre-footer-cta__title {
  margin: 0;
  max-width: 14ch;
  font-size: clamp(2rem, 5.5vw + 0.45rem, 3.35rem);
  font-weight: 500;
  line-height: 1.1;
  letter-spacing: -0.035em;
  color: var(--text-h);
  text-wrap: balance;
}

.home-pre-footer-cta__title + .btn--primary {
  margin-top: clamp(1.25rem, 2.5vw, 1.6rem);
}

.home-text-hero__cta-row .btn--primary,
.home-pre-footer-cta .btn--primary {
  transition:
    background 0.2s ease,
    color 0.2s ease,
    box-shadow 0.2s ease,
    transform 0.22s ease;
}

.home-text-hero__cta-row .btn--primary:hover,
.home-pre-footer-cta .btn--primary:hover {
  background: color-mix(in srgb, var(--cta-pill-fg) 12%, var(--cta-pill-bg));
  color: var(--cta-pill-fg);
  box-shadow: 0 0 0 1px color-mix(in srgb, var(--text-h) 48%, transparent);
  transform: translateY(-1px);
}

[data-theme='dark'] .home-text-hero__cta-row .btn--primary:hover,
[data-theme='dark'] .home-pre-footer-cta .btn--primary:hover {
  background: color-mix(in srgb, var(--text-muted) 32%, var(--cta-pill-bg));
  color: var(--cta-pill-fg);
  box-shadow: 0 0 0 1px color-mix(in srgb, var(--text-h) 52%, transparent);
}

@media (prefers-reduced-motion: reduce) {
  .home-text-hero__cta-row .btn--primary:hover,
  .home-pre-footer-cta .btn--primary:hover,
  .home-text-hero__btn-secondary:hover {
    transform: none;
  }

  .home-how-works__card:not(.home-how-works__card--flipped):hover {
    transform: none;
  }
}

/* Inline-size of strip — stack breakpoint via @container home-pl-strip. */
.home-post-lede-strip-cq {
  container-type: inline-size;
  container-name: home-pl-strip;
  min-width: 0;
  width: 100%;
}

/* Homepage: match top rail / Viva Builder content width (--home-rail-max on .home-article) */
.home-article > .home-post-lede-strip-cq {
  max-width: var(--home-rail-max);
  margin-inline: auto;
}

.home-post-lede__frame {
  container-type: size;
  container-name: post-lede;
  position: relative;
  overflow: hidden;
  box-sizing: border-box;
  width: 100%;
  margin: 0;
  aspect-ratio: unset;
  height: var(--home-marketing-post-lede-frame-h);
  min-height: var(--home-marketing-post-lede-frame-h);
  max-height: var(--home-marketing-post-lede-frame-h);
  border-radius: 10px;
  background: var(--site-index-bg);
  box-shadow:
    0 0 0 1px color-mix(in srgb, var(--text-h) 5%, transparent),
    0 16px 40px -26px color-mix(in srgb, var(--text-h) 14%, transparent);
}

/* Text column: remainder of frame minus photo (66%) and right cqh inset */
.home-post-lede__aside {
  position: absolute;
  left: 0;
  top: 0;
  bottom: 0;
  z-index: 0;
  display: flex;
  align-items: center;
  justify-content: flex-start;
  box-sizing: border-box;
  width: calc(34% - 3cqh);
  padding: 0.75rem 0.65rem 0.75rem 1.1rem;
}

.home-post-lede__aside-copy {
  max-width: 100%;
  text-align: left;
}

.home-post-lede--with-eyebrow .home-post-lede__aside {
  flex-direction: column;
  align-items: flex-start;
  justify-content: flex-start;
}

.home-post-lede--with-eyebrow .home-post-lede__aside-copy {
  flex: 1;
  display: flex;
  flex-direction: column;
  justify-content: center;
  width: 100%;
}

.home-post-lede__aside-eyebrow {
  margin: 0;
  flex-shrink: 0;
  font-size: clamp(1.35rem, 4.2vw, 1.9rem);
  font-weight: 400;
  line-height: 1.35;
  letter-spacing: -0.02em;
  color: var(--text-h);
}

.home-post-lede__aside-lead {
  margin: 0;
  font-size: clamp(1.35rem, 4.2vw, 1.9rem);
  font-weight: 400;
  line-height: 1.35;
  letter-spacing: -0.02em;
  color: var(--text-h);
}

.home-post-lede__aside-detail {
  margin: 0.45rem 0 0;
  font-size: clamp(0.78rem, 1.85cqw, 0.9rem);
  font-weight: 400;
  line-height: 1.45;
  color: var(--text);
}

.home-post-lede__aside-copy .home-post-lede__aside-detail + .home-post-lede__aside-detail {
  margin-top: 0.55rem;
}

/* Homepage “about” strip: clearer lead vs body; pair the two supporting paragraphs */
.home-post-lede--about-copy .home-post-lede__aside-lead + .home-post-lede__aside-detail {
  margin-top: 0.65rem;
}

.home-post-lede--about-copy .home-post-lede__aside-detail + .home-post-lede__aside-detail {
  margin-top: 0.4rem;
}

/*
 * Same physical inset on top, right, and bottom: 3% of frame height (matches
 * former top: 3%), using cqh so horizontal % isn’t tied to width.
 */
.home-post-lede__photo-slot {
  isolation: isolate;
  position: absolute;
  top: 3cqh;
  right: 3cqh;
  bottom: 3cqh;
  width: 66%;
  overflow: hidden;
  border-radius: 4px;
  user-select: none;
  -webkit-user-select: none;
  /* Stable clipping stack in Safari for scaled iframe descendants inside the overlay */
  transform: translateZ(0);
}

.home-post-lede__photo-slot::after {
  content: '';
  position: absolute;
  inset: 0;
  z-index: 1;
  pointer-events: none;
  user-select: none;
  -webkit-user-select: none;
  border-radius: inherit;
  /* Match hero wash so post-lede photos read consistently */
  background: var(--media-photo-wash);
}

/* Double-opacity white wash (default token is rgba(255,255,255,0.3)) — e.g. high-chroma sunset art */
.home-post-lede--photo-wash-2x .home-post-lede__photo-slot::after {
  background: rgba(255, 255, 255, 0.6);
}

.home-post-lede__photo-slot--no-wash::after {
  content: none;
}

/*
 * Safari: `<picture>` must fill the slot height so img `height: 100%` matches the overlay’s
 * measured rect (avoids iframe chrome visually extending below the artwork).
 */
.home-post-lede__photo-slot picture {
  display: block;
  margin: 0;
  height: 100%;
  width: 100%;
}

.home-post-lede__img {
  position: relative;
  z-index: 0;
  display: block;
  margin: 0;
  /* Same fill model as `.home-hero-figure img`: slot defines box; cover crops wide artwork */
  height: 100%;
  width: max(100%, var(--artwork-base-w, 100%));
  max-width: none;
  object-fit: cover;
  object-position: left top;
  user-select: none;
  -webkit-user-select: none;
  -webkit-user-drag: none;
}

/*
 * First homepage feedback strip: wide landscape art (1672×941); scale by height and let the
 * slot clip the sides so subjects stay in the gutters around the browser overlay.
 */
.home-post-lede--feedback-hero-photo .home-post-lede__img {
  width: auto;
  height: 100%;
  max-width: none;
  min-width: 0;
  object-position: 48% center;
}

/*
 * Progress strip: nearly square ward art — default `cover` fill, centered framing.
 */
.home-post-lede--progress-tracking .home-post-lede__img,
.home-post-lede-strip-cq
  .home-post-lede--progress-tracking.home-post-lede--mirrored
  .home-post-lede__img,
.home
  .home-article
  .home-post-lede-strip-cq
  .home-post-lede--progress-tracking.home-post-lede--mirrored
  .home-post-lede__img {
  object-fit: cover;
  object-position: center center;
}

/* Mirrored strip: photo left, copy right (same proportions as default). */
.home-post-lede--mirrored .home-post-lede__photo-slot {
  left: 3cqh;
  right: auto;
}

.home-post-lede--mirrored .home-post-lede__aside {
  left: auto;
  right: 0;
  justify-content: flex-end;
  padding: 0.75rem 1.1rem 0.75rem 0.65rem;
}

.home-post-lede--mirrored .home-post-lede__aside-copy {
  text-align: right;
}

/* Mirrored + eyebrow: pin label to the top-right (copy column is already right-aligned). */
.home-post-lede--mirrored.home-post-lede--with-eyebrow .home-post-lede__aside {
  align-items: flex-end;
}

.home-post-lede--mirrored .home-post-lede__aside-eyebrow {
  text-align: right;
  width: 100%;
}

.home-post-lede--mirrored .home-post-lede__img {
  object-position: left top;
}

/*
 * Mirrored strips: stack sooner so copy is not trapped on the opposite side of the image.
 */
@container home-pl-strip (max-width: var(--home-post-lede-mirror-stack-until)) {
  .home-post-lede-strip-cq .home-post-lede--mirrored .home-post-lede__frame {
    container-type: inline-size;
    container-name: post-lede;
    position: relative;
    display: flex;
    flex-direction: column;
    align-items: stretch;
    gap: 0.8rem;
    width: 100%;
    margin: 0;
    aspect-ratio: auto;
    height: auto;
    min-height: 0;
    max-height: none;
    padding: 0.95rem 0.85rem 1.05rem;
    border-radius: 8px;
    background: var(--site-index-bg);
    overflow: hidden;
  }

  .home-post-lede-strip-cq .home-post-lede--mirrored .home-post-lede__aside {
    order: 1;
    position: static;
    inset: auto;
    z-index: 1;
    display: block;
    width: 100%;
    padding: 0;
  }

  .home-post-lede-strip-cq .home-post-lede--mirrored .home-post-lede__aside-copy {
    text-align: left;
  }

  .home-post-lede-strip-cq .home-post-lede--mirrored .home-post-lede__aside-eyebrow {
    text-align: left;
  }

  .home-post-lede-strip-cq .home-post-lede--mirrored .home-post-lede__photo-slot {
    order: 2;
    position: relative;
    inset: auto;
    top: auto;
    right: auto;
    bottom: auto;
    left: auto;
    width: 100%;
    flex: 0 0 auto;
    aspect-ratio: unset;
    height: var(--home-marketing-stacked-photo-h);
    min-height: var(--home-marketing-stacked-photo-h);
    max-height: var(--home-marketing-stacked-photo-h);
    border-radius: 6px;
    overflow: hidden;
    isolation: isolate;
  }

  .home-post-lede-strip-cq .home-post-lede--mirrored .home-post-lede__aside-lead {
    font-size: var(--home-post-lede-stacked-lead-fs);
  }

  .home-post-lede-strip-cq .home-post-lede--mirrored .home-post-lede__aside-detail {
    font-size: var(--home-post-lede-stacked-detail-fs);
  }

  .home-post-lede-strip-cq .home-post-lede--mirrored .home-post-lede__img {
    position: relative;
    top: auto;
    left: auto;
    width: 100%;
    height: 100%;
    min-width: 0;
    max-width: 100%;
    object-fit: cover;
    object-position: left top;
  }
}

/*
 * All strips: copy (order 1) above image + chrome (order 2) when text column has lost ≥40% vs ref.
 */
@container home-pl-strip (max-width: var(--home-post-lede-stack-until)) {
  .home-post-lede-strip-cq .home-post-lede__frame {
    container-type: inline-size;
    container-name: post-lede;
    position: relative;
    display: flex;
    flex-direction: column;
    align-items: stretch;
    gap: 0.8rem;
    width: 100%;
    margin: 0;
    aspect-ratio: auto;
    height: auto;
    min-height: 0;
    max-height: none;
    padding: 0.95rem 0.85rem 1.05rem;
    border-radius: 8px;
    background: var(--site-index-bg);
    /* Clip anything that escapes the card; overlay is clipped inside the photo slot. */
    overflow: hidden;
  }

  .home-post-lede-strip-cq .home-post-lede--mirrored .home-post-lede__frame {
    background: var(--site-index-bg);
  }

  .home-post-lede-strip-cq .home-post-lede__aside {
    order: 1;
    position: static;
    inset: auto;
    z-index: 1;
    display: block;
    width: 100%;
    padding: 0;
  }

  .home-post-lede-strip-cq .home-post-lede__aside-copy {
    text-align: left;
  }

  .home-post-lede-strip-cq .home-post-lede--mirrored .home-post-lede__aside-copy {
    text-align: left;
  }

  .home-post-lede-strip-cq .home-post-lede--mirrored .home-post-lede__aside-eyebrow {
    text-align: left;
  }

  /*
   * position: relative so .draggable-browser-overlay (absolute) is positioned against the
   * slot only — not the whole figure — and cannot extend into the copy block above.
   */
  .home-post-lede-strip-cq .home-post-lede__photo-slot {
    order: 2;
    position: relative;
    inset: auto;
    top: auto;
    right: auto;
    bottom: auto;
    left: auto;
    width: 100%;
    flex: 0 0 auto;
    aspect-ratio: unset;
    height: var(--home-marketing-stacked-photo-h);
    min-height: var(--home-marketing-stacked-photo-h);
    max-height: var(--home-marketing-stacked-photo-h);
    border-radius: 6px;
    overflow: hidden;
    isolation: isolate;
  }

  .home-post-lede-strip-cq .home-post-lede__aside-lead {
    font-size: var(--home-post-lede-stacked-lead-fs);
  }

  .home-post-lede-strip-cq .home-post-lede__aside-eyebrow {
    font-size: var(--home-post-lede-stacked-lead-fs);
  }

  .home-post-lede-strip-cq .home-post-lede--with-eyebrow .home-post-lede__aside-copy {
    flex: none;
    display: block;
  }

  .home-post-lede-strip-cq .home-post-lede--with-eyebrow .home-post-lede__aside-eyebrow {
    margin-bottom: 0.45rem;
  }

  .home-post-lede-strip-cq .home-post-lede__aside-detail {
    font-size: var(--home-post-lede-stacked-detail-fs);
  }

  .home-post-lede-strip-cq .home-post-lede__img {
    position: relative;
    top: auto;
    left: auto;
    width: 100%;
    height: 100%;
    min-width: 0;
    max-width: 100%;
    object-fit: cover;
    object-position: left top;
  }

  .home-post-lede-strip-cq .home-post-lede--feedback-hero-photo .home-post-lede__img {
    width: auto;
    height: 100%;
    max-width: none;
    object-position: 48% center;
  }

  .home-post-lede-strip-cq .home-post-lede--mirrored .home-post-lede__img {
    object-position: left top;
  }
}

/*
 * Homepage fallback: same stack layout when viewport is narrow (container queries can miss).
 * Matches --home-post-lede-stack-until at default 16px root (48rem ≈ 0.6×80rem).
 */
@media (max-width: 48rem) {
  .home .home-article .home-post-lede-strip-cq .home-post-lede__frame {
    container-type: inline-size;
    container-name: post-lede;
    position: relative;
    display: flex;
    flex-direction: column;
    align-items: stretch;
    gap: 0.8rem;
    width: 100%;
    margin: 0;
    aspect-ratio: auto;
    height: auto;
    min-height: 0;
    max-height: none;
    padding: 0.95rem 0.85rem 1.05rem;
    border-radius: 8px;
    background: var(--site-index-bg);
    overflow: hidden;
  }

  .home .home-article .home-post-lede-strip-cq .home-post-lede--mirrored .home-post-lede__frame {
    background: var(--site-index-bg);
  }

  .home .home-article .home-post-lede-strip-cq .home-post-lede__aside {
    order: 1;
    position: static;
    inset: auto;
    z-index: 1;
    display: block;
    width: 100%;
    padding: 0;
  }

  .home .home-article .home-post-lede-strip-cq .home-post-lede__aside-copy {
    text-align: left;
  }

  .home .home-article .home-post-lede-strip-cq .home-post-lede--mirrored .home-post-lede__aside-copy {
    text-align: left;
  }

  .home .home-article .home-post-lede-strip-cq .home-post-lede--mirrored .home-post-lede__aside-eyebrow {
    text-align: left;
  }

  .home .home-article .home-post-lede-strip-cq .home-post-lede__photo-slot {
    order: 2;
    position: relative;
    inset: auto;
    top: auto;
    right: auto;
    bottom: auto;
    left: auto;
    width: 100%;
    flex: 0 0 auto;
    aspect-ratio: unset;
    height: var(--home-marketing-stacked-photo-h);
    min-height: var(--home-marketing-stacked-photo-h);
    max-height: var(--home-marketing-stacked-photo-h);
    border-radius: 6px;
    overflow: hidden;
    isolation: isolate;
  }

  .home .home-article .home-post-lede-strip-cq .home-post-lede__aside-lead {
    font-size: var(--home-post-lede-stacked-lead-fs);
  }

  .home .home-article .home-post-lede-strip-cq .home-post-lede__aside-eyebrow {
    font-size: var(--home-post-lede-stacked-lead-fs);
  }

  .home .home-article .home-post-lede-strip-cq .home-post-lede--with-eyebrow .home-post-lede__aside-copy {
    flex: none;
    display: block;
  }

  .home .home-article .home-post-lede-strip-cq .home-post-lede--with-eyebrow .home-post-lede__aside-eyebrow {
    margin-bottom: 0.45rem;
  }

  .home .home-article .home-post-lede-strip-cq .home-post-lede__aside-detail {
    font-size: var(--home-post-lede-stacked-detail-fs);
  }

  .home .home-article .home-post-lede-strip-cq .home-post-lede__img {
    position: relative;
    top: auto;
    left: auto;
    width: 100%;
    height: 100%;
    min-width: 0;
    max-width: 100%;
    object-fit: cover;
    object-position: left top;
  }

  .home .home-article .home-post-lede-strip-cq .home-post-lede--feedback-hero-photo .home-post-lede__img {
    width: auto;
    height: 100%;
    max-width: none;
    object-position: 48% center;
  }

  .home .home-article .home-post-lede-strip-cq .home-post-lede--mirrored .home-post-lede__img {
    object-position: left top;
  }
}

@media (max-width: 58rem) {
  .home .home-article .home-post-lede-strip-cq .home-post-lede--mirrored .home-post-lede__frame {
    container-type: inline-size;
    container-name: post-lede;
    position: relative;
    display: flex;
    flex-direction: column;
    align-items: stretch;
    gap: 0.8rem;
    width: 100%;
    margin: 0;
    aspect-ratio: auto;
    height: auto;
    min-height: 0;
    max-height: none;
    padding: 0.95rem 0.85rem 1.05rem;
    border-radius: 8px;
    background: var(--site-index-bg);
    overflow: hidden;
  }

  .home .home-article .home-post-lede-strip-cq .home-post-lede--mirrored .home-post-lede__aside {
    order: 1;
    position: static;
    inset: auto;
    z-index: 1;
    display: block;
    width: 100%;
    padding: 0;
  }

  .home .home-article .home-post-lede-strip-cq .home-post-lede--mirrored .home-post-lede__aside-copy {
    text-align: left;
  }

  .home .home-article .home-post-lede-strip-cq .home-post-lede--mirrored .home-post-lede__aside-eyebrow {
    text-align: left;
  }

  .home .home-article .home-post-lede-strip-cq .home-post-lede--mirrored .home-post-lede__photo-slot {
    order: 2;
    position: relative;
    inset: auto;
    top: auto;
    right: auto;
    bottom: auto;
    left: auto;
    width: 100%;
    flex: 0 0 auto;
    aspect-ratio: unset;
    height: var(--home-marketing-stacked-photo-h);
    min-height: var(--home-marketing-stacked-photo-h);
    max-height: var(--home-marketing-stacked-photo-h);
    border-radius: 6px;
    overflow: hidden;
    isolation: isolate;
  }

  .home .home-article .home-post-lede-strip-cq .home-post-lede--mirrored .home-post-lede__aside-lead {
    font-size: var(--home-post-lede-stacked-lead-fs);
  }

  .home .home-article .home-post-lede-strip-cq .home-post-lede--mirrored .home-post-lede__aside-detail {
    font-size: var(--home-post-lede-stacked-detail-fs);
  }

  .home .home-article .home-post-lede-strip-cq .home-post-lede--mirrored .home-post-lede__img {
    position: relative;
    top: auto;
    left: auto;
    width: 100%;
    height: 100%;
    min-width: 0;
    max-width: 100%;
    object-fit: cover;
    object-position: left top;
  }
}

@container home-pl-strip (min-width: calc(var(--home-post-lede-stack-until) + 1px)) and (max-width: var(--home-post-lede-mirror-stack-until)) {
  .home-post-lede-strip-cq
    .home-post-lede--progress-tracking.home-post-lede--mirrored
    .home-post-lede__frame {
    display: block;
    gap: normal;
    height: var(--home-marketing-post-lede-frame-h);
    min-height: var(--home-marketing-post-lede-frame-h);
    max-height: var(--home-marketing-post-lede-frame-h);
    padding: 0;
    border-radius: 10px;
  }

  .home-post-lede-strip-cq
    .home-post-lede--progress-tracking.home-post-lede--mirrored
    .home-post-lede__aside {
    position: absolute;
    left: auto;
    right: 0;
    top: 0;
    bottom: 0;
    display: flex;
    align-items: center;
    justify-content: flex-end;
    width: calc(34% - 3cqh);
    padding: 0.75rem 1.1rem 0.75rem 0.65rem;
  }

  .home-post-lede-strip-cq
    .home-post-lede--progress-tracking.home-post-lede--mirrored.home-post-lede--with-eyebrow
    .home-post-lede__aside {
    flex-direction: column;
    align-items: flex-end;
    justify-content: flex-start;
  }

  .home-post-lede-strip-cq
    .home-post-lede--progress-tracking.home-post-lede--mirrored
    .home-post-lede__aside-copy {
    text-align: right;
  }

  .home-post-lede-strip-cq
    .home-post-lede--progress-tracking.home-post-lede--mirrored
    .home-post-lede__photo-slot {
    position: absolute;
    top: 3cqh;
    right: auto;
    bottom: 3cqh;
    left: 3cqh;
    width: 66%;
    height: auto;
    min-height: 0;
    max-height: none;
    border-radius: 4px;
  }
}

@media (min-width: 48.001rem) and (max-width: 58rem) {
  .home
    .home-article
    .home-post-lede-strip-cq
    .home-post-lede--progress-tracking.home-post-lede--mirrored
    .home-post-lede__frame {
    display: block;
    gap: normal;
    height: var(--home-marketing-post-lede-frame-h);
    min-height: var(--home-marketing-post-lede-frame-h);
    max-height: var(--home-marketing-post-lede-frame-h);
    padding: 0;
    border-radius: 10px;
  }

  .home
    .home-article
    .home-post-lede-strip-cq
    .home-post-lede--progress-tracking.home-post-lede--mirrored
    .home-post-lede__aside {
    position: absolute;
    left: auto;
    right: 0;
    top: 0;
    bottom: 0;
    display: flex;
    align-items: center;
    justify-content: flex-end;
    width: calc(34% - 3cqh);
    padding: 0.75rem 1.1rem 0.75rem 0.65rem;
  }

  .home
    .home-article
    .home-post-lede-strip-cq
    .home-post-lede--progress-tracking.home-post-lede--mirrored.home-post-lede--with-eyebrow
    .home-post-lede__aside {
    flex-direction: column;
    align-items: flex-end;
    justify-content: flex-start;
  }

  .home
    .home-article
    .home-post-lede-strip-cq
    .home-post-lede--progress-tracking.home-post-lede--mirrored
    .home-post-lede__aside-copy {
    text-align: right;
  }

  .home
    .home-article
    .home-post-lede-strip-cq
    .home-post-lede--progress-tracking.home-post-lede--mirrored
    .home-post-lede__photo-slot {
    position: absolute;
    top: 3cqh;
    right: auto;
    bottom: 3cqh;
    left: 3cqh;
    width: 66%;
    height: auto;
    min-height: 0;
    max-height: none;
    border-radius: 4px;
  }
}

/* Match hero headline rhythm (Inter, normal weight, tight tracking) — secondary scale */
.home-lede-text {
  margin: 0;
  font-weight: 400;
  line-height: 1.35;
  letter-spacing: -0.02em;
  font-size: clamp(0.94rem, 0.38vw + 0.8rem, 1.05rem);
  color: var(--text-muted);
}

.home-lede-count {
  font-variant-numeric: tabular-nums;
  color: var(--text-h);
  font-weight: 400;
}

.home-lede--proof {
  max-width: 100%;
}

.home-lede-proof {
  --home-proof-green: #15803d;
  --home-proof-green-soft: #16a34a;
  display: flex;
  align-items: center;
  gap: 0.85rem;
  padding: 0.7rem 1.05rem;
  border-radius: 12px;
  background: color-mix(in srgb, var(--home-proof-green) 7%, transparent);
  border: 1px solid color-mix(in srgb, var(--home-proof-green) 18%, transparent);
}

[data-theme='dark'] .home-lede-proof {
  --home-proof-green: #4ade80;
  --home-proof-green-soft: #86efac;
  background: color-mix(in srgb, var(--home-proof-green) 9%, transparent);
  border-color: color-mix(in srgb, var(--home-proof-green) 22%, transparent);
}

.home-lede-proof__icon {
  flex-shrink: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--home-proof-green);
}

.home-lede-proof__icon-svg {
  display: block;
}

.home-lede-proof__icon-ring {
  stroke: color-mix(in srgb, var(--home-proof-green) 72%, transparent);
  fill: color-mix(in srgb, var(--home-proof-green) 14%, transparent);
}

.home-lede-proof__icon-check {
  stroke: var(--home-proof-green-soft);
}

.home-lede-text--proof {
  margin: 0;
  flex: 1;
  min-width: 0;
  font-size: clamp(0.96rem, 0.42vw + 0.82rem, 1.08rem);
  line-height: 1.4;
  color: color-mix(in srgb, var(--text) 88%, var(--text-muted) 12%);
}

.home-lede-proof__label {
  font-weight: 600;
  letter-spacing: -0.018em;
  color: var(--text-h);
}

.home-lede-text--proof .home-lede-count {
  color: var(--home-proof-green);
  font-weight: 600;
}

/*
 * Mobile-first home layout: default / max-width 639px targets ~375–393px notched phones.
 * Tailwind-aligned tiers: base & <640px, sm:640px+, md:768px+, lg:1024px+, xl:1280px+.
 * From 640px up, rules here do not apply — desktop/tablet layout stays as authored above.
 */
@media (max-width: 639px) {
  .home {
    max-width: 100%;
    min-width: 0;
  }

  .home-how-works__card:not(.home-how-works__card--flipped):hover {
    transform: none;
  }

  /*
   * Horizontal bleed: clip on each in-flow child, not on `.home-body`.
   * `overflow-x: clip` on the flex column forces `overflow-y: auto` (CSS pairing), which made
   * `.home-body` a nested scrollport under `min-height: 0` — iOS then glitches `position: fixed`
   * chrome (header / sign-in clipped). Document scroll keeps the header stable.
   */
  .home-body {
    min-width: 0;
  }

  .home-body > * {
    overflow-x: clip;
    min-width: 0;
  }

  /* Let the article use document scroll — pairing overflow-x: clip with visible y on the
     whole article creates a nested scrollport on iOS and makes the page hard to scroll. */
  .home-body > .home-article {
    overflow-x: visible;
  }

  .home-hero-figure,
  .home-post-lede-strip-cq {
    overflow-x: clip;
  }

  .home-article {
    min-width: 0;
    padding-top: 0;
    --home-stats-v-gap: clamp(0.35rem, 0.2rem + 0.75vw, 0.65rem);
  }

  .home-intro.page {
    font-size: clamp(1.08rem, 5.2vw + 0.15rem, 1.32rem);
    row-gap: calc(1rem / 1.08 * 1em);
  }

  .home-text-hero__main {
    padding: clamp(0.75rem, 2vw, 1rem) var(--home-rail-pad-x)
      clamp(0.85rem, 2.2vw, 1.05rem);
  }

  .home-text-hero > .home-top-rail__pathways {
    padding-top: clamp(0.95rem, 2.8vw, 1.1rem);
  }

  .home-top-rail__pathways {
    padding: 0.65rem 0;
  }

  .home-how-works {
    padding: clamp(2.25rem, 5.5vw, 2.85rem) var(--home-rail-pad-x)
      clamp(2.65rem, 6.5vw, 3.35rem);
  }

  .home-how-works__heading {
    margin-bottom: clamp(1.5rem, 4vw, 1.85rem);
    gap: 0.45rem;
  }

  .home-how-works__heading-primary {
    font-size: clamp(1.2rem, 4.5vw + 0.5rem, 1.45rem);
    line-height: 1.26;
  }

  .home-how-works__heading-support {
    font-size: clamp(0.92rem, 2.8vw + 0.5rem, 1.05rem);
  }

  .home-how-works__card {
    padding: 0;
    min-height: clamp(10.5rem, 32vw, 12.25rem);
    height: auto;
  }

  .home-how-works__card-inner {
    min-height: clamp(10.5rem, 32vw, 12.25rem);
  }

  .home-how-works__card-face {
    padding: clamp(1.1rem, 3vw, 1.35rem) clamp(1rem, 2.8vw, 1.25rem);
  }

  .home-how-works__card-back-stage {
    min-height: clamp(7.5rem, 22vw, 8.5rem);
    gap: 0.45rem;
  }

  .home-how-works__mic-wrap {
    width: calc(3.5rem * 2.2);
    height: calc(3.5rem * 2.2);
    transform: translateZ(2px) translateY(0.3rem);
  }

  .home-how-works__mic-wrap .trial-mic-hero {
    width: 3.5rem;
    height: 3.5rem;
  }

  .home-how-works__mic-wrap .trial-reactive-mic__stage {
    width: calc(3.5rem * 2.2);
    height: calc(3.5rem * 2.2);
    transform: translate(-50%, calc(-50% - 0.5rem));
  }

  /* Playing / recording: centre mic and hide caption so equalizer is not clipped. */
  .home-how-works__card--mic-live {
    overflow: visible;
  }

  .home-how-works__card--mic-live .home-how-works__card-face--back {
    overflow: visible;
    justify-content: center;
    padding-block: clamp(0.85rem, 2.5vw, 1.1rem);
  }

  .home-how-works__card--mic-live .home-how-works__card-back-stage {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    flex: 1;
    width: 100%;
    min-height: 100%;
    gap: 0;
  }

  .home-how-works__card--mic-live .home-how-works__back-label {
    display: none;
  }

  .home-how-works__card--mic-live .home-how-works__mic-wrap {
    overflow: visible;
    transform: translateZ(2px);
  }

  .home-how-works__card--mic-live .home-how-works__mic-wrap .trial-reactive-mic__stage {
    transform: translate(-50%, -50%);
  }

  .home-how-works__back-label {
    white-space: normal;
    overflow: visible;
    text-overflow: unset;
    line-height: 1.35;
    min-height: auto;
    padding-inline: 0.15rem;
  }

  .home-how-works__back-label--question {
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
  }

  .home-how-works__arrow {
    display: none;
  }

  .home-how-works__feedback-popup-root {
    padding: max(1rem, env(safe-area-inset-top, 0px)) 1rem
      max(1rem, env(safe-area-inset-bottom, 0px));
  }

  .home-how-works__card-step {
    margin-bottom: 0.7rem;
  }

  .home-text-hero__headline {
    font-size: clamp(1.18rem, 4.8vw + 0.35rem, 1.42rem);
    line-height: 1.3;
  }

  .home-text-hero__mic-stage {
    width: min(100%, 19rem);
  }

  .home-hero-headline {
    max-width: none;
    line-height: 1.33;
  }

  .home-hero-figure {
    margin: 0 0 1.55rem;
  }

  /*
   * Mobile marketing hero: 16∶9 makes the chrome viewport very short when the strip is
   * narrow; the viva-builder embed stacks vertically and ends up with an internal
   * scrollport. A taller frame plus a slightly denser downscale (see iframe rules below)
   * widens the iframe’s layout box so the full embed fits without scrolling inside it.
   */
  .home-hero-figure:not(.home-hero-figure--desktop) .home-hero-figure__frame {
    /* Between 16∶9 and 9∶14: enough chrome height for the stacked builder without extreme letterboxing on ~600px-wide viewports that still match this query */
    aspect-ratio: 9 / 13;
    /* Very small phones: guarantee a minimum iframe chrome height */
    min-height: 27.5rem;
  }

  .home-hero-figure:not(.home-hero-figure--desktop) .home-hero-browser-iframe {
    /* 1/0.72 ≈ 138.89%; keeps the scaled tile filling the shell while ~+11% taller logical viewport vs 125%/0.8 */
    width: 138.889%;
    height: 138.889%;
    transform: scale(0.72);
  }

  .home-article > .home-top-rail + .home-hero-figure {
    margin-top: 0;
  }

  .home-hero-figure + .home-post-lede-strip-cq {
    margin-top: 2rem;
  }

  .home-post-lede-strip-cq + .home-post-lede-strip-cq {
    margin-top: 2.65rem;
  }

  .home-lede-text {
    font-size: clamp(0.88rem, 2.4vw + 0.42rem, 0.98rem);
    line-height: 1.35;
    letter-spacing: -0.02em;
  }

  .home-lede-proof {
    padding: 0.55rem 0.8rem;
    gap: 0.65rem;
    border-radius: 10px;
  }

  .home-lede-proof__icon-svg {
    width: 20px;
    height: 20px;
  }

  .home-pre-footer-cta {
    padding-top: clamp(1.25rem, 3.5vh, 2.5rem);
    padding-bottom: clamp(2.25rem, 10vh, 6rem);
  }

  .home-pre-footer-cta__title {
    max-width: 12ch;
    font-size: clamp(1.75rem, 7vw + 0.25rem, 2.35rem);
    line-height: 1.12;
  }

  .home-article > .home-post-lede-strip-cq:last-of-type {
    padding-bottom: clamp(1.75rem, 8vh, 4rem);
  }
}

/*
 * Narrow homepage marketing strips (`HOME_MARKETING_MOBILE_MQ`, 48rem): denser iframe
 * downscale (138.889% layout × scale(0.72)) so embeds lay out at readable sizes.
 */
@media (max-width: 48rem) {
  /*
   * Maximized mobile embeds: 3px inset on all sides so background art peeks through
   * (replaces edge-to-edge `inset: 0`).
   */
  .draggable-browser-overlay.draggable-browser-overlay--maximized {
    top: 3px !important;
    right: 3px !important;
    bottom: 3px !important;
    left: 3px !important;
  }

  .home-post-lede__photo-slot--equal-overlay-gutters
    > .draggable-browser-overlay.draggable-browser-overlay--maximized {
    top: 3px !important;
    right: 3px !important;
    bottom: 3px !important;
    left: 3px !important;
  }

  /* Expanded iframe content: 5px horizontal margins inside browser chrome. */
  .draggable-browser-overlay.draggable-browser-overlay--maximized
    .browser-chrome__viewport:has(.home-hero-browser-iframe-shell) {
    padding-left: 5px;
    padding-right: 5px;
  }

  .home-post-lede__photo-slot--equal-overlay-gutters > .draggable-browser-overlay {
    left: 5px !important;
    right: 5px !important;
  }

  .home-post-lede-strip-cq
    .home-post-lede__photo-slot
    > .draggable-browser-overlay:not(.draggable-browser-overlay--maximized) {
    left: 5px !important;
    right: 5px !important;
    width: auto !important;
    transform: none !important;
  }

  .home-hero-figure__frame
    > .draggable-browser-overlay:not(.draggable-browser-overlay--maximized) {
    left: 5px !important;
    right: 5px !important;
    width: auto !important;
    transform: none !important;
  }

  .home-hero-figure--desktop .home-hero-browser-iframe {
    width: 138.889%;
    height: 138.889%;
    transform: scale(0.72);
    transform-origin: 0 0;
  }

  .home-post-lede--feedback-mobile-embed .home-hero-browser-iframe,
  .home-post-lede--marketing-mobile-embed .home-hero-browser-iframe {
    width: 138.889%;
    height: 138.889%;
    transform: scale(0.72);
    transform-origin: 0 0;
  }

  .home-marketing-browser-static {
    position: absolute;
    z-index: 2;
    inset: 5%;
    display: flex;
    flex-direction: column;
    min-width: 0;
    min-height: 0;
    pointer-events: none;
    user-select: none;
    touch-action: none;
  }

  .home-marketing-browser-static__chrome {
    flex: 1;
    min-width: 0;
    min-height: 0;
    display: flex;
    flex-direction: column;
    box-shadow:
      0 0.35rem 1.1rem color-mix(in srgb, #000 22%, transparent),
      0 0 0 1px color-mix(in srgb, #000 12%, transparent);
  }

  .home-marketing-browser-static__viewport {
    flex: 1;
    min-height: 0;
    padding: 0;
    overflow: hidden;
    align-items: stretch;
    justify-content: flex-start;
  }

  .home-marketing-browser-static__img {
    display: block;
    width: 100%;
    height: 100%;
    object-fit: cover;
    object-position: top left;
    pointer-events: none;
    user-select: none;
    -webkit-user-drag: none;
  }

  /*
   * Progress strip: static preview bleeds past the trailing edge (like desktop clip-trailing
   * iframe chrome) instead of the default 5% inset on all sides.
   */
  .home-post-lede--progress-tracking .home-marketing-browser-static {
    inset: 0 auto 0 0;
    top: 0;
    bottom: 0;
    left: 0;
    right: auto;
    width: 112%;
    max-width: none;
    height: 100%;
  }
}
/* Home footer sitemap band */

.home .site-index {
  flex-shrink: 0;
}

.site-index {
  display: flex;
  flex-direction: column;
  margin-left: calc(-1 * (var(--page-inline) + env(safe-area-inset-left, 0px)));
  margin-right: calc(-1 * (var(--page-inline) + env(safe-area-inset-right, 0px)));
  padding: 2.25rem calc(var(--page-inline) + env(safe-area-inset-right, 0px)) 2.25rem
    calc(var(--page-inline) + env(safe-area-inset-left, 0px));
  background: var(--site-index-bg);
  color: var(--text);
}

.site-index__inner {
  display: flex;
  flex-wrap: wrap;
  align-items: flex-start;
  justify-content: flex-start;
  column-gap: 5.25rem;
  row-gap: 3rem;
}

@media (min-width: 641px) {
  .site-index__inner {
    column-gap: 6rem;
  }
}

@media (max-width: 640px) {
  .site-index__inner {
    flex-direction: column;
    row-gap: 3.75rem;
  }
}

.site-index__heading {
  margin: 0;
  font-size: 0.76rem;
  font-weight: 600;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: inherit;
}

.site-index__list {
  list-style: none;
  margin: 0.75rem 0 0;
  padding: 0;
  display: flex;
  flex-direction: column;
  gap: 0.35rem;
}

.site-index__list--emphasis li {
  color: var(--text-h);
  font-size: 0.85625rem;
  font-weight: 400;
  line-height: 1.45;
}

.site-index__link {
  color: inherit;
  text-decoration: none;
}

.site-index__link:hover {
  color: var(--text-interactive-hover);
  text-decoration: underline;
}

/* /exam-choice — exam-first entry before sample or workspace mode selection */

.page.exam-choice-page {
  display: flex;
  flex-direction: column;
  align-items: stretch;
  box-sizing: border-box;
  width: 100vw;
  width: 100dvw;
  max-width: none;
  margin-left: calc(50% - 50vw);
  margin-left: calc(50% - 50dvw);
  margin-right: calc(50% - 50vw);
  margin-right: calc(50% - 50dvw);
  padding-inline: var(--page-inline, 1.25rem);
  text-align: left;
  position: relative;
  flex: 1 1 auto;
  min-height: calc(
    100dvh - 2rem - var(--site-header-clearance) - env(safe-area-inset-top, 0px)
  );
}

.exam-choice-page__shell {
  width: 100%;
  max-width: var(--workspace-choice-shell-max, min(76rem, 100%));
  margin-inline: auto;
  display: flex;
  flex-direction: column;
  gap: var(--workspace-choice-shell-gap);
}

/* Hero: left copy + optional Challenge campaign strip in the open upper-right. */
.exam-choice-page__hero {
  display: flex;
  flex-direction: column;
  align-items: stretch;
  gap: clamp(0.95rem, 2.2vw, 1.25rem);
}

.exam-choice-page__header {
  max-width: 42rem;
  min-width: 0;
}

/*
 * Slim campaign strip placement of the shared homepage Challenge banner.
 * Keeps the homepage border/background language; only proportions/alignment here.
 */
.exam-choice-page__hero .home-challenge-banner--exam-choice {
  display: flex;
  flex-direction: row;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 0.5rem 1rem;
  width: 100%;
  max-width: none;
  margin: 0;
  padding: 0.6rem 0.95rem;
  box-sizing: border-box;
  text-align: left;
  border-radius: 0.5rem;
}

.exam-choice-page__hero .home-challenge-banner--exam-choice .home-challenge-banner__copy {
  flex: 1 1 12rem;
  align-items: flex-start;
  justify-content: center;
  gap: 0.22rem;
  min-width: 0;
}

.exam-choice-page__hero .home-challenge-banner--exam-choice .home-challenge-banner__title {
  font-size: clamp(0.88rem, 0.2vw + 0.84rem, 0.98rem);
  line-height: 1.3;
}

.exam-choice-page__hero .home-challenge-banner--exam-choice .home-challenge-banner__support {
  font-size: clamp(0.76rem, 0.15vw + 0.72rem, 0.84rem);
  line-height: 1.35;
}

.exam-choice-page__hero .home-challenge-banner--exam-choice .home-challenge-banner__cta {
  flex: 0 0 auto;
  align-self: center;
  width: auto;
  max-width: none;
  padding: 0.38rem 0.85rem;
  font-size: 0.84rem;
}

@media (min-width: 780px) {
  .exam-choice-page__hero {
    flex-direction: row;
    align-items: center;
    justify-content: space-between;
    gap: clamp(1.25rem, 3vw, 2.25rem);
  }

  .exam-choice-page__header {
    flex: 1 1 auto;
  }

  .exam-choice-page__hero .home-challenge-banner--exam-choice {
    flex: 0 1 32rem;
    align-self: center;
    width: min(32rem, 100%);
    max-width: 32rem;
    margin-top: 0;
    flex-wrap: nowrap;
    padding: 0.62rem 1rem;
  }

  .exam-choice-page__hero .home-challenge-banner--exam-choice .home-challenge-banner__copy {
    flex: 1 1 auto;
  }
}

/* Override homepage narrow stacking so this stays a slim left-aligned strip. */
@media (max-width: 36rem) {
  .exam-choice-page__hero .home-challenge-banner--exam-choice {
    flex-direction: column;
    flex-wrap: nowrap;
    align-items: stretch;
    justify-content: center;
    gap: 0.5rem;
    padding: 0.7rem 0.9rem;
  }

  .exam-choice-page__hero .home-challenge-banner--exam-choice .home-challenge-banner__copy {
    flex: 0 1 auto;
    width: 100%;
  }

  .exam-choice-page__hero .home-challenge-banner--exam-choice .home-challenge-banner__cta {
    align-self: flex-start;
    width: auto;
    max-width: none;
  }
}

.exam-choice-page__eyebrow,
.exam-choice-page__coming-soon-kicker {
  margin: 0;
  font-size: 0.76rem;
  font-weight: 700;
  letter-spacing: 0.1em;
  line-height: 1.2;
  text-transform: uppercase;
  color: color-mix(in srgb, var(--text-muted) 78%, var(--text-h));
}

.exam-choice-page__title {
  margin: 0.45rem 0 0;
  font-family: var(--heading);
  font-size: clamp(2.1rem, 5vw, 4rem);
  font-weight: 500;
  line-height: 1.02;
  letter-spacing: -0.055em;
  color: var(--text-h);
}

.exam-choice-page__intro {
  margin: clamp(0.9rem, 2vw, 1.15rem) 0 0;
  max-width: 38rem;
  font-size: clamp(1rem, 1.4vw, 1.12rem);
  line-height: 1.6;
  color: color-mix(in srgb, var(--text) 88%, var(--text-muted));
}

.exam-choice-page__grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: var(--workspace-choice-grid-gap);
  align-items: stretch;
}

@media (min-width: 780px) {
  .exam-choice-page__grid {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }
}

.exam-choice-page__grid > .exam-choice-page__card {
  height: 100%;
}

.exam-choice-page__card {
  appearance: none;
  display: flex;
  flex: 1 1 auto;
  flex-direction: column;
  align-items: stretch;
  min-height: 0;
  padding: 0;
  border: none;
  border-radius: var(--workspace-choice-card-radius);
  background: var(--site-index-bg);
  color: inherit;
  text-align: left;
  text-decoration: none;
  cursor: pointer;
  box-shadow:
    0 0 0 1px color-mix(in srgb, var(--text-h) 10%, transparent),
    0 2px 4px rgba(0, 0, 0, 0.14),
    0 10px 28px -6px rgba(0, 0, 0, 0.32),
    0 22px 48px -14px rgba(0, 0, 0, 0.22);
  transition:
    transform 0.18s ease,
    box-shadow 0.18s ease;
  overflow: hidden;
}

.exam-choice-page--sample .exam-choice-page__card {
  border-radius: var(--workspace-choice-card-radius);
}

.exam-choice-page__card--available:hover {
  transform: translateY(-2px);
  box-shadow:
    0 0 0 1px color-mix(in srgb, var(--text-h) 12%, transparent),
    0 4px 8px rgba(0, 0, 0, 0.18),
    0 14px 36px -8px rgba(0, 0, 0, 0.38),
    0 28px 56px -16px rgba(0, 0, 0, 0.28);
}

.exam-choice-page__card--disabled,
.exam-choice-page__card--disabled:hover {
  cursor: not-allowed;
  transform: none;
  opacity: 0.48;
  filter: grayscale(1) saturate(0.35) brightness(0.96);
  box-shadow:
    0 0 0 1px color-mix(in srgb, var(--text-muted) 16%, transparent),
    0 2px 4px rgba(0, 0, 0, 0.1);
  background: color-mix(in srgb, var(--text-muted) 8%, var(--site-index-bg));
  pointer-events: auto;
}

.exam-choice-page__card:focus-visible,
.exam-choice-page__secondary-btn:focus-visible {
  outline: var(--focus-ring-width) var(--focus-ring-style) var(--focus-ring-color);
  outline-offset: 3px;
}

[data-theme='dark'] .exam-choice-page__card {
  box-shadow:
    0 0 0 1px color-mix(in srgb, var(--text-h) 12%, transparent),
    0 2px 6px rgba(0, 0, 0, 0.45),
    0 12px 32px -8px rgba(0, 0, 0, 0.55),
    0 24px 52px -14px rgba(0, 0, 0, 0.5);
}

[data-theme='dark'] .exam-choice-page__card--available:hover {
  box-shadow:
    0 0 0 1px color-mix(in srgb, var(--text-h) 16%, transparent),
    0 4px 10px rgba(0, 0, 0, 0.5),
    0 16px 40px -10px rgba(0, 0, 0, 0.65),
    0 30px 60px -16px rgba(0, 0, 0, 0.55);
}

[data-theme='dark'] .exam-choice-page__card--disabled,
[data-theme='dark'] .exam-choice-page__card--disabled:hover {
  opacity: 0.42;
  filter: grayscale(1) saturate(0.3) brightness(0.88);
  box-shadow:
    0 0 0 1px color-mix(in srgb, var(--text-muted) 18%, transparent),
    0 2px 6px rgba(0, 0, 0, 0.35);
  background: color-mix(in srgb, var(--text-muted) 10%, var(--site-index-bg));
}

.exam-choice-page__card--available {
  background:
    linear-gradient(
      145deg,
      color-mix(in srgb, var(--text-h) 4%, transparent),
      transparent 48%
    ),
    var(--site-index-bg);
}

.exam-choice-page__card-body {
  display: flex;
  flex: 1 1 auto;
  flex-direction: column;
  align-items: stretch;
  gap: var(--workspace-choice-card-body-gap);
  min-height: 0;
  padding: var(--workspace-choice-card-body-padding);
  padding-top: 0.85rem;
}

.exam-choice-page__feature-list {
  margin: 0;
  padding: 0;
  list-style: none;
  display: flex;
  flex-direction: column;
  gap: 0.48rem;
}

.exam-choice-page__feature-item {
  display: flex;
  align-items: flex-start;
  gap: 0.5rem;
  font-size: 0.875rem;
  line-height: 1.4;
  color: color-mix(in srgb, var(--text) 92%, var(--text-h));
}

.exam-choice-page__feature-tick {
  flex-shrink: 0;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 1.05rem;
  height: 1.05rem;
  margin-top: 0.12em;
  border-radius: 3px;
  font-size: 0.68rem;
  font-weight: 700;
  line-height: 1;
  color: var(--text-h);
  background: color-mix(in srgb, var(--text-h) 9%, transparent);
  border: 1px solid color-mix(in srgb, var(--text-h) 14%, transparent);
}

.exam-choice-page__card--disabled .exam-choice-page__feature-tick {
  color: color-mix(in srgb, var(--text) 88%, var(--text-h));
  background: color-mix(in srgb, var(--text-muted) 9%, transparent);
  border-color: color-mix(in srgb, var(--text-muted) 16%, transparent);
}

.exam-choice-page__card-copy {
  margin-top: auto;
  max-width: 22rem;
  font-size: 0.875rem;
  line-height: 1.45;
  color: color-mix(in srgb, var(--text) 88%, var(--text-muted));
}

@media (max-width: 520px) {
  .exam-choice-page__card {
    min-height: 0;
  }

  .exam-choice-page__card-body {
    gap: 0.58rem;
  }
}

/* /auth — sign in, sign up, forgot password */

.page.auth-page {
  display: flex;
  flex-direction: column;
  justify-content: flex-start;
  flex: 1 1 auto;
  min-height: 0;
  max-width: 22rem;
  margin-inline: auto;
}

.page.auth-page.auth-page--signup {
  max-width: 28rem;
}

.page.auth-page.auth-page--contact {
  width: min(70vw, 100%);
  max-width: min(70vw, 100%);
}

/* Tighter band below the site header; centre in `.site-main` flex column */
.site-main > .page.auth-page.auth-page--contact {
  padding-top: 1rem;
  align-self: center;
}

.page.auth-page.auth-page--contact .auth-page__core {
  padding-top: clamp(1.25rem, 7vh, 3.5rem);
}

.page.auth-page.auth-page--contact .auth-page__foot {
  margin-top: 1rem;
  gap: 0.75rem;
}

/* Centre the form block in the viewport band below the header (see .site-main > :first-child) */
.site-main > .page.auth-page {
  padding-top: 1.5rem;
  padding-bottom: 1.5rem;
}

.auth-page__card {
  display: flex;
  flex-direction: column;
  gap: 0;
  width: 100%;
}

.auth-page__card--status-only {
  flex: 1 1 auto;
  min-height: 0;
}

.auth-page__card--status-only .auth-page__core {
  flex: 1 1 auto;
  display: flex;
  flex-direction: column;
  min-height: 0;
}

.auth-page__card--status-only .auth-page__foot {
  margin-top: 0;
}

.auth-page__status-band {
  flex: 1 1 auto;
  display: flex;
  align-items: center;
  justify-content: center;
  min-height: 0;
}

/* Title + fields + CTA: stable block so /auth ↔ /auth/sign-up does not re-center inputs */
.auth-page__core {
  flex-shrink: 0;
  padding-top: clamp(2rem, 12vh, 6rem);
}

.auth-page__foot {
  flex-shrink: 0;
  display: flex;
  flex-direction: column;
  gap: 1.5rem;
  margin-top: 2.5rem;
}

.auth-page__title {
  margin: 0;
  min-height: 2.75rem;
  display: flex;
  align-items: center;
  justify-content: center;
  font-family: var(--heading);
  font-weight: 600;
  font-size: 1.5rem;
  letter-spacing: -0.024em;
  line-height: 1.25;
  color: var(--text-h);
  text-align: center;
}

.auth-page__form {
  display: flex;
  flex-direction: column;
  gap: 1.1rem;
}

.auth-page__form--signup-grid {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
  gap: 0.85rem 0.8rem;
}

.auth-page__field--span-2 {
  grid-column: 1 / -1;
}

.auth-page__field {
  display: flex;
  flex-direction: column;
  gap: 0.35rem;
}

.auth-page__field--hidden {
  position: absolute;
  left: -10000px;
  width: 1px;
  height: 1px;
  overflow: hidden;
}

.auth-page__field--with-sr-username {
  position: relative;
}

.auth-page__label {
  font-size: 0.83125rem;
  font-weight: 500;
  color: var(--text);
}

.auth-page__optional {
  font-weight: 400;
  color: var(--text-muted);
}

.auth-page__input {
  box-sizing: border-box;
  width: 100%;
  margin: 0;
  padding: 0.55rem 0.65rem;
  border: 1px solid var(--border);
  border-radius: 8px;
  font: inherit;
  font-size: 0.9125rem;
  color: var(--text-h);
  background: var(--surface);
  transition:
    border-color 0.15s ease,
    box-shadow 0.15s ease;
}

.auth-page__input::placeholder {
  color: var(--text-muted);
  opacity: 1;
}

.auth-page__input:hover {
  border-color: color-mix(in srgb, var(--border) 65%, var(--text-muted));
}

.auth-page__input:disabled {
  cursor: not-allowed;
  opacity: 0.72;
}

/* Same treatment for :focus and :focus-visible: text fields always match
   :focus-visible on click, which was swapping the accent glow for the global
   dashed ring. Keep the softer ring here; keyboard users still get a clear cue. */
.auth-page__input:focus,
.auth-page__input:focus-visible {
  outline: none;
  border-color: var(--accent);
  box-shadow: 0 0 0 3px color-mix(in srgb, var(--accent) 22%, transparent);
}

textarea.auth-page__input.auth-page__input--multiline {
  min-height: 6.5rem;
  resize: vertical;
  line-height: 1.45;
}

.auth-page__link {
  font-size: 0.83125rem;
  font-weight: 500;
  color: var(--text);
  text-decoration: none;
}

.auth-page__link:hover {
  color: var(--text-interactive-hover);
  text-decoration: underline;
  text-underline-offset: 2px;
}

.auth-page__link:focus {
  outline: none;
}

.auth-page__link:focus-visible {
  outline: none;
  color: var(--text-interactive-hover);
  text-decoration: underline;
  text-underline-offset: 2px;
}

/* Primary submit — match form fields (no global dashed :focus-visible on pills). */
.page.auth-page .btn.btn--primary:focus {
  outline: none;
}

.page.auth-page .btn.btn--primary:focus-visible {
  outline: none;
  box-shadow: 0 0 0 3px color-mix(in srgb, var(--accent) 26%, transparent);
}

/* Primary submit in auth/contact forms — full width + spacing after fields */
.page.auth-page .auth-page__form button.btn--primary {
  width: 100%;
  margin-top: 0.25rem;
}

.page.auth-page .auth-page__form--signup-grid button.btn--primary {
  margin-top: 0;
}

.auth-page__status {
  margin: 0;
  padding: 0.7rem 0.75rem;
  border-radius: 10px;
  font-size: 0.875rem;
  line-height: 1.45;
}

.auth-page__status--success {
  border: 1px solid color-mix(in srgb, var(--accent) 35%, var(--border));
  color: var(--text-h);
  background: color-mix(in srgb, var(--accent) 9%, transparent);
}

.auth-page__status--error {
  border: 1px solid color-mix(in srgb, #b91c1c 36%, var(--border));
  color: #7f1d1d;
  background: color-mix(in srgb, #b91c1c 8%, transparent);
}

.auth-page__footer {
  margin: 0;
  font-size: 0.9125rem;
  line-height: 1.5;
  color: var(--text);
  text-align: center;
}

.auth-page__footer .auth-page__link {
  font-size: inherit;
  font-weight: 600;
  color: var(--text-h);
}

.auth-page__footer .auth-page__link:hover,
.auth-page__footer .auth-page__link:focus-visible {
  color: var(--text-h);
}

.auth-page__home {
  font-size: 0.83125rem;
  text-align: center;
}

.auth-page__home .auth-page__link {
  font-weight: 500;
}

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

.auth-page__identifier-summary {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
  flex-wrap: wrap;
  margin-bottom: -0.15rem;
  font-size: 0.9125rem;
  line-height: 1.45;
  color: var(--text);
  text-align: center;
}

.auth-page__identifier-email {
  font-weight: 600;
  color: var(--text-h);
  max-width: min(100%, 16rem);
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

button.auth-page__change-account {
  margin: 0;
  padding: 0;
  border: none;
  font: inherit;
  font-weight: 600;
  background: none;
  cursor: pointer;
}

button.auth-page__change-account:focus {
  outline: none;
}

button.auth-page__change-account:focus-visible {
  outline: none;
  color: var(--text-interactive-hover);
  text-decoration: underline;
  text-underline-offset: 2px;
}

.auth-page__oauth-divider {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  margin: 0.65rem 0 0.15rem;
}

.auth-page__oauth-divider-line {
  flex: 1 1 auto;
  height: 1px;
  background: var(--border);
}

.auth-page__oauth-divider-text {
  flex: 0 0 auto;
  font-size: 0.775rem;
  color: var(--text-muted);
  text-transform: lowercase;
}

.page.auth-page .auth-page__oauth-btn {
  width: 100%;
  margin-top: 0.15rem;
  gap: 0.5rem;
  border: 1px solid var(--border);
  background: var(--surface);
  color: var(--text-h);
  font-weight: 600;
}

.auth-page__oauth-btn-icon {
  flex: 0 0 auto;
  width: 1.125rem;
  height: 1.125rem;
  object-fit: contain;
}

.page.auth-page .auth-page__oauth-btn:hover:not(:disabled) {
  border-color: color-mix(in srgb, var(--border) 65%, var(--text-muted));
}

.page.auth-page .auth-page__oauth-btn:focus-visible {
  outline: none;
  box-shadow: 0 0 0 3px color-mix(in srgb, var(--accent) 26%, transparent);
}

@media (max-width: 420px) {
  .auth-page__form--signup-grid {
    grid-template-columns: minmax(0, 1fr);
  }

  .auth-page__field--span-2 {
    grid-column: auto;
  }
}

.auth-page--challenge-prep .auth-page__challenge-preparation {
  display: flex;
  flex-direction: column;
  gap: 0.85rem;
}

.auth-page__prep-heading {
  margin: 0;
  font-size: 1.125rem;
  font-weight: 650;
  color: var(--text-h);
}

.auth-page__prep-intro,
.auth-page__prep-supplies {
  margin: 0;
  font-size: 0.9375rem;
  line-height: 1.5;
  color: var(--text);
}

.auth-page__prep-method-heading {
  margin: 0.35rem 0 0;
  font-size: 0.9375rem;
  font-weight: 600;
  color: var(--text-h);
}

.auth-page__prep-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 0.65rem;
  margin-top: 0.35rem;
}

.auth-page__prep-back,
.auth-page__prep-start {
  min-height: 2.75rem;
}

.auth-page__prep-back {
  flex: 0 0 auto;
}

.auth-page__prep-start {
  flex: 1 1 12rem;
}

@media (max-width: 767px) {
  .auth-page__prep-actions {
    flex-direction: column;
  }

  .auth-page__prep-back,
  .auth-page__prep-start {
    width: 100%;
  }
}

/* ANZCA Primary prep, inside shared Challenge landing — do not restyle ED / global prep */
.auth-page--challenge-landing .auth-page__challenge-preparation {
  gap: 0.65rem;
}

.auth-page--challenge-landing .auth-page__prep-heading {
  font-size: 1.125rem;
  line-height: 1.3;
  text-align: center;
}

.auth-page--challenge-landing .auth-page__prep-supplies {
  color: var(--text);
  text-align: center;
}

.auth-page--challenge-landing .auth-page__prep-method-heading {
  margin: 0.15rem 0 0;
}

.auth-page--challenge-landing .auth-page__prep-cta-note {
  margin: 0.35rem 0 0;
  font-size: 0.83125rem;
  line-height: 1.45;
  color: var(--text-muted);
  text-align: center;
}

.auth-page--challenge-landing .auth-page__prep-actions {
  justify-content: center;
  align-items: stretch;
  flex-wrap: nowrap;
  gap: 0.75rem;
  margin-top: 0.15rem;
  margin-bottom: 4.5rem;
}

.auth-page--challenge-landing .auth-page__prep-back,
.auth-page--challenge-landing .auth-page__prep-start {
  flex: 0 0 12.5rem;
  width: 12.5rem;
  min-width: 12.5rem;
  box-sizing: border-box;
}

@media (max-width: 767px) {
  .auth-page--challenge-landing .auth-page__prep-actions {
    flex-direction: column;
    align-items: stretch;
    margin-bottom: 3rem;
  }

  .auth-page--challenge-landing .auth-page__prep-back,
  .auth-page--challenge-landing .auth-page__prep-start {
    flex: 1 1 auto;
    width: 100%;
    min-width: 0;
  }
}

/* Shared Challenge landing (Fellowship, ANZCA Primary details, ACEM Primary). Not Contact. */
.page.auth-page.auth-page--contact.auth-page--challenge-landing {
  width: min(38rem, 100%);
  max-width: min(38rem, 100%);
  box-sizing: border-box;
  padding-inline: 1.25rem;
  padding-bottom: 3rem;
}

/*
 * Public Challenge hub entries: page shell spans the site-main content width so the
 * hub back control can sit top-left under the global header, while the challenge
 * copy/form column stays narrow and centred.
 */
.page.auth-page.auth-page--contact.auth-page--challenge-landing.auth-page--challenge-hub-entry {
  width: 100%;
  max-width: none;
  align-self: stretch;
  align-items: stretch;
}

.auth-page--challenge-hub-entry > .auth-page__challenge-hub-back {
  align-self: flex-start;
  flex: 0 0 auto;
  width: fit-content;
  max-width: 100%;
  box-sizing: border-box;
  margin: 0 0 clamp(0.85rem, 2.2vw, 1.25rem);
  min-height: 2.15rem;
  padding: 0.4rem 0.9rem;
  border-radius: 9999px;
  border-color: color-mix(in srgb, var(--text-h) 28%, var(--border));
  background: color-mix(in srgb, var(--surface) 72%, var(--element-bg));
  font-size: 0.8125rem;
  font-weight: 600;
  letter-spacing: 0.01em;
  line-height: 1.25;
  color: var(--text-h);
  white-space: nowrap;
  text-decoration: none;
}

.auth-page--challenge-hub-entry > .auth-page__challenge-hub-back:hover {
  border-color: color-mix(in srgb, var(--text-h) 48%, var(--border));
  background: color-mix(in srgb, var(--text-h) 10%, var(--element-bg));
  color: var(--text-h);
  text-decoration: none;
}

.auth-page--challenge-hub-entry > .auth-page__challenge-hub-back:focus-visible {
  outline: var(--focus-ring-width) var(--focus-ring-style) var(--focus-ring-color);
  outline-offset: 3px;
}

.auth-page--challenge-hub-entry > .auth-page__card {
  width: 100%;
  max-width: min(38rem, 100%);
  margin-inline: auto;
}

.auth-page--challenge-landing .auth-page__title {
  min-height: 0;
  margin-bottom: 0.85rem;
}

.auth-page--challenge-landing .auth-page__challenge-availability {
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
  width: 100%;
  max-width: 32rem;
  margin-inline: auto;
  gap: 0.85rem;
}

.auth-page--challenge-landing .auth-page__challenge-availability .auth-page__title {
  margin-bottom: 0.15rem;
}

.auth-page--challenge-landing .auth-page__challenge-availability-timing {
  display: flex;
  flex-direction: column;
  gap: 0.45rem;
  width: 100%;
}

.auth-page--challenge-landing .auth-page__challenge-availability-countdown {
  margin: 0;
  font-size: clamp(1.15rem, 2.4vw, 1.4rem);
  font-weight: 650;
  letter-spacing: -0.02em;
  line-height: 1.3;
  font-variant-numeric: tabular-nums;
  color: var(--text-h);
}

.auth-page--challenge-landing .auth-page__challenge-availability-status {
  margin: 0;
  font-size: 1.05rem;
  font-weight: 650;
  letter-spacing: -0.01em;
  color: var(--text-h);
}

.auth-page--challenge-landing .auth-page__challenge-availability-meta {
  display: flex;
  flex-direction: column;
  gap: 0.12rem;
}

.auth-page--challenge-landing .auth-page__challenge-availability-detail,
.auth-page--challenge-landing .auth-page__challenge-availability-message,
.auth-page--challenge-landing .auth-page__challenge-availability-prize,
.auth-page--challenge-landing .auth-page__challenge-availability-how,
.auth-page--challenge-landing .auth-page__challenge-availability-note {
  margin: 0;
  font-size: 0.95rem;
  line-height: 1.5;
  color: color-mix(in srgb, var(--text) 90%, var(--text-muted));
}

.auth-page--challenge-landing .auth-page__challenge-availability-timezone {
  margin: 0;
  font-size: 0.82rem;
  line-height: 1.4;
  color: var(--text-muted);
}

.auth-page--challenge-landing .auth-page__challenge-availability-prize {
  margin-top: 0.35rem;
  color: color-mix(in srgb, var(--text) 88%, var(--text-muted));
}

.auth-page--challenge-landing .auth-page__challenge-availability-how {
  font-size: 0.9rem;
  color: var(--text-muted);
}

.auth-page--challenge-landing .auth-page__challenge-availability-how .challenge-how-it-works__label {
  font-weight: 600;
  color: color-mix(in srgb, var(--text) 82%, var(--text-muted));
}

.auth-page--challenge-landing .auth-page__challenge-availability-note {
  font-size: 0.9rem;
  color: var(--text-muted);
}

.auth-page--challenge-landing .auth-page__challenge-availability-message {
  color: var(--text-muted);
}

.auth-page--challenge-landing .auth-page__challenge-copy {
  display: flex;
  flex-direction: column;
  gap: 1.15rem;
  margin-bottom: 1.65rem;
  text-align: left;
}

.auth-page--challenge-landing .auth-page__challenge-lead {
  margin: 0;
  font-size: 1rem;
  line-height: 1.55;
  color: var(--text);
}

.auth-page--challenge-landing .auth-page__challenge-section h2 {
  margin: 0 0 0.4rem;
  font-family: var(--heading);
  font-size: 0.9375rem;
  font-weight: 650;
  letter-spacing: -0.016em;
  line-height: 1.3;
  color: var(--text-h);
}

.auth-page--challenge-landing .auth-page__challenge-section p,
.auth-page--challenge-landing .auth-page__challenge-section li {
  margin: 0 0 0.5rem;
  font-size: 0.9375rem;
  line-height: 1.55;
  color: var(--text);
}

.auth-page--challenge-landing .auth-page__challenge-section p:last-child,
.auth-page--challenge-landing .auth-page__challenge-section li:last-child {
  margin-bottom: 0;
}

.auth-page--challenge-landing .auth-page__challenge-section ul {
  margin: 0 0 0.65rem;
  padding-left: 1.15rem;
}

.auth-page--challenge-landing .auth-page__challenge-section--panel {
  padding: 0.9rem 1rem;
  border: 1px solid var(--border);
  border-radius: 10px;
  background: color-mix(in srgb, var(--surface) 88%, var(--border));
}

.auth-page--challenge-landing .auth-page__form {
  width: 100%;
  max-width: 24rem;
  margin-inline: auto;
}

.page.auth-page.auth-page--challenge-landing .auth-page__form button.btn--primary {
  width: auto;
  min-width: 12.5rem;
  min-height: 2.75rem;
  align-self: center;
  padding: 0.65rem 1.75rem;
}

.auth-page--challenge-landing .auth-page__challenge-cta {
  display: flex;
  flex-direction: column;
  align-items: center;
  margin-top: 0.15rem;
  margin-bottom: 4.5rem;
}

.auth-page--challenge-landing .auth-page__tamworth-options {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 0.9rem;
  margin: 0 0 1.8rem;
  justify-items: center;
}

.auth-page--challenge-landing .auth-page__tamworth-options .btn {
  width: fit-content;
  max-width: 100%;
  text-align: center;
}

.auth-page--challenge-landing .auth-page__tamworth-note {
  margin: 0 0 0.9rem;
  font-size: 0.9rem;
  line-height: 1.45;
  color: var(--text-muted);
}

.auth-page--challenge-landing .auth-page__tamworth-warning {
  margin: 0 0 1rem;
  padding: 0.75rem 0.85rem;
  border: 1px solid var(--border);
  border-radius: 8px;
  background: color-mix(in srgb, var(--surface) 88%, var(--border));
}

.auth-page--challenge-landing .auth-page__tamworth-warning h2 {
  margin: 0 0 0.35rem;
  font-family: var(--heading);
  font-size: 0.94rem;
  line-height: 1.3;
  color: var(--text-h);
}

.auth-page--challenge-landing .auth-page__tamworth-warning p {
  margin: 0;
  font-size: 0.92rem;
  line-height: 1.5;
  color: var(--text);
}

@media (min-width: 481px) {
  .page.auth-page.auth-page--contact.auth-page--challenge-landing .auth-page__core {
    padding-top: 1.25rem;
  }
}

@media (max-width: 480px) {
  .page.auth-page.auth-page--contact.auth-page--challenge-landing {
    padding-inline: 1rem;
  }

  .auth-page--challenge-landing .auth-page__form {
    max-width: none;
  }

  .auth-page--challenge-landing .auth-page__challenge-cta {
    margin-bottom: 3rem;
  }

  .page.auth-page.auth-page--challenge-landing .auth-page__form button.btn--primary {
    min-width: min(12.5rem, 100%);
  }

  .auth-page--challenge-landing .auth-page__tamworth-options {
    grid-template-columns: 1fr;
  }
}

/* Stub marketing / legal / status pages */

.page.stub-page {
  max-width: 42rem;
  margin-inline: auto;
  padding-block: 2rem 3rem;
}

.stub-page__title {
  margin: 0 0 0.75rem;
  font-size: clamp(1.5rem, 2.5vw, 2rem);
  color: var(--text-h);
  letter-spacing: -0.02em;
}

.stub-page__lead {
  margin: 0 0 1.25rem;
  color: var(--text-muted);
  line-height: 1.55;
}

.stub-page__actions {
  display: flex;
  flex-wrap: wrap;
  gap: 0.75rem;
  margin-top: 1.5rem;
}

.status-page {
  min-height: calc(100dvh - var(--site-header-clearance));
  display: grid;
  place-items: center;
  padding: 1.5rem;
}

.status-page__card {
  width: min(640px, 100%);
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 16px;
  padding: 28px;
  box-shadow: var(--shadow-card-soft);
}

.status-page__title {
  margin: 0 0 8px;
  font-size: 1.5rem;
  color: var(--text-h);
}

.status-page__intro {
  margin: 0 0 20px;
  color: var(--text-muted);
  line-height: 1.45;
}

.status-page__row {
  display: flex;
  justify-content: space-between;
  gap: 16px;
  padding: 14px 0;
  border-top: 1px solid var(--border);
}

.status-page__name {
  font-weight: 650;
  color: var(--text-h);
}

.status-page__detail {
  color: var(--text-muted);
  font-size: 0.92rem;
  margin-top: 4px;
  word-break: break-word;
}

.status-page__badge {
  flex: 0 0 auto;
  align-self: center;
  padding: 4px 10px;
  border-radius: 999px;
  font-size: 0.82rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.03em;
}

.status-page__badge--ok {
  background: #d9f5df;
  color: #146c2e;
}

.status-page__badge--fail {
  background: #fde2e1;
  color: #9b1c1c;
}

.status-page__badge--wait {
  background: #efe8d6;
  color: #6b5b2a;
}

.exam-choice-card--coming-soon {
  opacity: 0.92;
}

.home-how-works__card-group {
  display: contents;
}

.home-text-hero__clinical-station-card {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 0.35rem;
  width: min(14rem, 100%);
  min-height: 7rem;
  padding: 1.25rem 1rem;
  border-radius: 1rem;
  background: var(--surface);
  border: 1px solid var(--border);
  box-shadow: var(--shadow-card-soft);
  color: var(--text-h);
}

.home-text-hero__clinical-station-label {
  font-size: 0.78rem;
  font-weight: 700;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--text-muted);
}

.home-text-hero__clinical-station-type {
  font-size: 1rem;
  font-weight: 650;
}

.exam-choice-card__badge {
  display: inline-block;
  margin-top: 0.5rem;
  padding: 0.2rem 0.55rem;
  border-radius: 999px;
  font-size: 0.78rem;
  font-weight: 650;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  background: var(--element-bg);
  color: var(--text-muted);
}

:focus,
:focus-visible {
  outline: none !important;
  outline-offset: 0 !important;
}

:root {
  /* cursor.com uses proprietary CursorGothic; Inter matches that neutral UI sans role */
  --sans: 'Inter', ui-sans-serif, system-ui, sans-serif;
  --heading: 'Inter', ui-sans-serif, system-ui, sans-serif;
  --mono: ui-monospace, 'SF Mono', Menlo, Monaco, Consolas, monospace;

  font: 16px/148% var(--sans);
  letter-spacing: -0.0105em;
  font-optical-sizing: auto;
  font-synthesis: none;
  text-rendering: optimizeLegibility;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

/* Keyboard focus rings disabled sitewide (see app.css cascade override). */
:focus-visible {
  outline: none;
}

html {
  color: var(--text);
  /* Force opaque so any legacy alpha on `--bg` cannot wash the site to browser-white */
  background-color: rgb(from var(--bg) r g b / 1);
  /* Prevent iOS from inflating type (feels like the page loaded zoomed in). */
  -webkit-text-size-adjust: none;
  text-size-adjust: none;
  /* Clip sub-pixel horizontal bleed from full-bleed `100vw` sections on mobile. */
  overflow-x: clip;
  /* Avoid double-tap zoom; keeps the layout viewport at device width on load. */
  touch-action: manipulation;
}

html,
body,
#root {
  height: 100%;
}

body {
  margin: 0;
  width: 100%;
  overflow-x: clip;
  -webkit-text-size-adjust: none;
  text-size-adjust: none;
}

/* iOS Safari zooms focused fields below 16px and can keep that zoom on later loads. */
@media (max-width: 639px) {
  input:not(
      [type='checkbox'],
      [type='radio'],
      [type='range'],
      [type='hidden'],
      [type='button'],
      [type='submit'],
      [type='reset'],
      [type='file'],
      [type='image']
    ),
  textarea,
  select {
    font-size: 1rem;
  }
}

#root {
  display: flex;
  flex-direction: column;
  min-height: 100%;
}

h1 {
  font-family: var(--heading);
  font-weight: 600;
  color: var(--text-h);
  font-size: 1.825rem;
  letter-spacing: -0.029em;
  margin: 0 0 0.925rem;
}

code {
  font-family: var(--mono);
  padding: 0.15em 0.4em;
  border-radius: 4px;
  background: var(--code-bg);
  color: var(--text-h);
}
