/* Prospect portal — spec layout (dark default, light via data-theme) */
* { box-sizing: border-box; margin: 0; padding: 0; }

:root,
[data-theme="dark"] {
  --bg: #0f1419;
  --surface: #141a21;
  --surface-2: #1a2129;
  --surface-3: #222a33;
  --border: #232b35;
  --border-2: #2d3540;
  --text: #ffffff;
  --text-muted: #98a2b0;
  --text-dim: #5b6472;
  --accent: #6366f1;
  --accent-hover: #7c7ff5;
  --accent-soft: rgba(99, 102, 241, 0.1);
  --success: #10b981;
  --danger: #ef4444;
  --hero-bottom-fade: rgba(15, 20, 25, 0.4);
  --hero-text-sub: rgba(255, 255, 255, 0.88);
  --hero-eyebrow: rgba(255, 255, 255, 0.6);
  --floorplan-bg: #fafafa;
  --topbar-bg: rgba(15, 20, 25, 0.85);
  --map-bg: #0f1419;
  --apt-pill-bg: rgba(16, 185, 129, 0.1);
  /* Stronger than apt chips — readable on busy hero photography */
  --welcome-pill-bg: color-mix(in srgb, var(--success) 34%, rgba(12, 18, 24, 0.88));
  --welcome-pill-border: color-mix(in srgb, var(--success) 48%, transparent);
  /* Mobile agent dock (frosted glass) */
  --dock-glass: color-mix(in srgb, var(--surface) 60%, transparent);
  --dock-glass-strong: color-mix(in srgb, var(--surface-2) 84%, transparent);
  --dock-glass-solid: var(--surface-2);
  --dock-line: rgba(255, 255, 255, 0.12);
  --dock-hi: rgba(255, 255, 255, 0.18);
}

[data-theme="light"] {
  /* Aligns with prospect-portal light reference: warm paper UI, indigo accent */
  --bg: #f7f6f3;
  --surface: #ffffff;
  --surface-2: #faf9f6;
  --surface-3: #f0eee9;
  --border: #e8e4dc;
  --border-2: #d8d2c6;
  --text: #1a1d24;
  --text-muted: #5b6472;
  --text-dim: #8a94a3;
  --accent: #6366f1;
  --accent-hover: #5558e0;
  --accent-soft: rgba(99, 102, 241, 0.08);
  --success: #059669;
  --warning: #d97706;
  --danger: #dc2626;
  /* Hero: bottom scrim is light in light mode — use dark type for contrast */
  --hero-bottom-fade: rgba(247, 246, 243, 0.88);
  --hero-text-sub: rgba(26, 29, 36, 0.78);
  --hero-eyebrow: rgba(26, 29, 36, 0.55);
  --floorplan-bg: #f4f1ec;
  --topbar-bg: rgba(247, 246, 243, 0.85);
  --map-bg: #efece4;
  --apt-pill-bg: rgba(5, 150, 105, 0.1);
  --welcome-pill-bg: color-mix(in srgb, var(--success) 28%, rgba(255, 255, 255, 0.94));
  --welcome-pill-border: color-mix(in srgb, var(--success) 42%, rgba(26, 29, 36, 0.14));
  /* Mobile agent dock (frosted glass) */
  --dock-glass: color-mix(in srgb, var(--surface) 68%, transparent);
  --dock-glass-strong: color-mix(in srgb, var(--surface) 90%, transparent);
  --dock-glass-solid: var(--surface);
  --dock-line: rgba(26, 29, 36, 0.1);
  --dock-hi: rgba(255, 255, 255, 0.7);
}

/* Align chrome (top bar, hero copy, footer) with main column on ultra-wide / 4K viewports */
:root {
  --bp-content-max: 1440px;
  --bp-inline-gutter: max(
    clamp(16px, 4vw, 48px),
    env(safe-area-inset-left),
    env(safe-area-inset-right),
    calc((100vw - var(--bp-content-max)) / 2)
  );
}

html {
  -webkit-text-size-adjust: 100%;
}

html, body {
  min-height: 100%;
  background: var(--bg);
  color: var(--text);
  font-family: 'Inter', system-ui, -apple-system, sans-serif;
  font-size: 14px;
  line-height: 1.5;
  -webkit-font-smoothing: antialiased;
  transition: background-color 0.6s ease, color 0.6s ease;
}
@media (prefers-reduced-motion: reduce) {
  html, body { transition: background-color 0.2s ease, color 0.2s ease; }
}

/* ---------- Mid-size laptops (common 16" devices) ---------- */
@media (min-width: 1200px) and (max-width: 1919px) {
  html, body {
    font-size: 15px;
    line-height: 1.55;
  }

  .bp-main-layout {
    gap: 36px;
    padding-top: 36px;
    padding-bottom: 96px;
  }

  /* Documents dock: avoid tiny cards + awkward header wrapping */
  .bp-dock-header {
    align-items: flex-start;
    gap: 18px;
  }

  .bp-dock-title {
    font-size: 14px;
    line-height: 1.25;
  }

  .bp-doc-grid {
    gap: 14px;
  }

  .bp-doc-card {
    padding: 18px;
    border-radius: 12px;
    min-height: 74px;
  }

  .bp-doc-icon {
    width: 44px;
    height: 44px;
    border-radius: 10px;
    font-size: 11px;
  }

  .bp-doc-name {
    font-size: 14px;
  }

  .bp-doc-meta {
    font-size: 12px;
  }

  .bp-doc-dock.bp-doc-dock--standalone {
    padding: 28px;
  }
}

body {
  overflow-x: hidden;
}

button { font-family: inherit; cursor: pointer; }

.prospect-portal-hidden { display: none !important; }

/* ---------- Theme toggle ---------- */
.bp-theme-toggle {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 52px;
  height: 32px;
  padding: 2px;
  border-radius: 999px;
  border: 1px solid var(--border-2);
  background: color-mix(in srgb, var(--surface) 94%, transparent);
  color: var(--text);
  box-shadow:
    0 1px 0 rgba(255, 255, 255, 0.04),
    0 10px 26px rgba(0, 0, 0, 0.18);
  transition: background 0.24s ease, border-color 0.24s ease, box-shadow 0.24s ease, transform 0.18s ease;
}
html[data-theme="dark"] .bp-theme-toggle,
:root:not([data-theme="light"]) .bp-theme-toggle {
  border-color: rgba(255, 255, 255, 0.16);
  background: rgba(255, 255, 255, 0.06);
  box-shadow:
    0 1px 0 rgba(255, 255, 255, 0.05),
    0 12px 28px rgba(0, 0, 0, 0.32);
}
html[data-theme="light"] .bp-theme-toggle {
  border-color: rgba(26, 29, 36, 0.18);
  background: rgba(255, 255, 255, 0.82);
  box-shadow:
    0 1px 0 rgba(255, 255, 255, 0.75),
    0 10px 22px rgba(26, 29, 36, 0.08);
}
.bp-theme-toggle:hover {
  border-color: var(--border-2);
  background: color-mix(in srgb, var(--surface-2) 85%, transparent);
  box-shadow:
    0 1px 0 rgba(255, 255, 255, 0.06),
    0 12px 30px rgba(0, 0, 0, 0.22);
}
.bp-theme-toggle:active {
  transform: scale(0.98);
}
.bp-theme-toggle:focus-visible {
  outline: none;
  box-shadow: 0 0 0 2px color-mix(in srgb, var(--accent) 24%, transparent);
}
.bp-theme-toggle-track {
  position: relative;
  width: 46px;
  height: 26px;
  border-radius: 999px;
  background: color-mix(in srgb, var(--bg-elev) 82%, #000 18%);
  border: 1px solid color-mix(in srgb, var(--border) 82%, #000 18%);
  display: inline-flex;
  align-items: center;
  justify-content: space-between;
  padding: 0 5px;
  transition: background 0.25s ease, border-color 0.25s ease;
}
.bp-theme-toggle-glyph {
  width: 12px;
  height: 12px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  opacity: 0.72;
  color: var(--text-muted);
  transform: scale(0.92) rotate(-8deg);
  transition: opacity 0.25s ease, color 0.25s ease, transform 0.3s ease;
}
.bp-theme-toggle-glyph svg {
  width: 12px;
  height: 12px;
  display: block;
}
.bp-theme-toggle-thumb {
  position: absolute;
  top: 2px;
  left: 2px;
  width: 20px;
  height: 20px;
  border-radius: 50%;
  background: #11161f;
  border: 1px solid color-mix(in srgb, #7b8699 50%, transparent);
  box-shadow:
    inset 0 0 0 1px rgba(255, 255, 255, 0.06),
    0 2px 6px rgba(0, 0, 0, 0.34);
  transform: translateX(var(--bp-theme-thumb-x, 0px));
  transition: transform 0.28s cubic-bezier(0.22, 1, 0.36, 1), background 0.22s ease, border-color 0.22s ease, box-shadow 0.22s ease;
  will-change: transform;
}
.bp-theme-toggle-thumb.is-click-anim {
  animation: bp-theme-thumb-pop 260ms cubic-bezier(0.22, 1, 0.36, 1);
}
@keyframes bp-theme-thumb-pop {
  0% { transform: translateX(var(--bp-theme-thumb-x, 0px)) scale(1); }
  35% { transform: translateX(var(--bp-theme-thumb-x, 0px)) scale(0.9); }
  70% { transform: translateX(var(--bp-theme-thumb-x, 0px)) scale(1.12); }
  100% { transform: translateX(var(--bp-theme-thumb-x, 0px)) scale(1); }
}
.bp-theme-toggle[aria-pressed="true"] .bp-theme-toggle-track {
  background: color-mix(in srgb, var(--accent) 25%, var(--surface));
  border-color: color-mix(in srgb, var(--accent) 42%, var(--border-2));
}
.bp-theme-toggle[aria-pressed="true"] .bp-theme-toggle-thumb {
  --bp-theme-thumb-x: 20px;
  background: #f6f8ff;
  border-color: color-mix(in srgb, var(--accent) 30%, #c7d1ff);
  box-shadow:
    inset 0 0 0 1px rgba(255, 255, 255, 0.75),
    0 2px 8px color-mix(in srgb, var(--accent) 26%, transparent);
}
.bp-theme-toggle[aria-pressed="true"] .bp-theme-toggle-glyph--moon {
  opacity: 0.95;
  color: var(--text);
  transform: scale(1) rotate(0deg);
}
.bp-theme-toggle[aria-pressed="false"] .bp-theme-toggle-glyph--sun {
  opacity: 0.95;
  color: #f8c73d;
  transform: scale(1) rotate(0deg);
}

/* ---------- Top bar ---------- */
.bp-top-bar {
  height: 64px;
  background: var(--topbar-bg);
  border-bottom: 1px solid var(--border);
  display: grid;
  grid-template-columns: 1fr auto 1fr;
  align-items: center;
  padding: 0 var(--bp-inline-gutter);
  position: sticky;
  top: 0;
  z-index: 100;
  backdrop-filter: blur(20px);
}
.bp-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;
}
.bp-miira-logo-link {
  position: relative;
  display: inline-flex;
  align-items: center;
  line-height: 0;
  flex-shrink: 0;
}
.bp-miira-logo-link:hover {
  opacity: 0.88;
}
.bp-miira-logo-link:focus-visible {
  outline: 2px solid var(--accent, #6366f1);
  outline-offset: 2px;
  border-radius: 4px;
}
.bp-miira-logo-stack {
  display: inline-block;
  line-height: 0;
}
/* Default (incl. no `data-theme` yet): dark UI → light-on-dark wordmark */
.bp-miira-logo-img--light {
  display: none;
}
.bp-miira-logo-img--dark {
  display: block;
}
html[data-theme="light"] .bp-miira-logo-img--light {
  display: block;
}
html[data-theme="light"] .bp-miira-logo-img--dark {
  display: none;
}
html[data-theme="dark"] .bp-miira-logo-img--light {
  display: none;
}
html[data-theme="dark"] .bp-miira-logo-img--dark {
  display: block;
}
.bp-miira-logo-img {
  max-width: 100%;
  width: auto;
  height: auto;
  vertical-align: middle;
}
.bp-miira-logo-link--top .bp-miira-logo-img {
  max-height: 18px;
}
.bp-miira-logo-link--footer .bp-miira-logo-img {
  max-height: 30px;
}
.bp-top-bar-right {
  display: flex;
  align-items: center;
  gap: 12px;
  flex-shrink: 0;
  justify-self: end;
}
.bp-top-bar-logo {
  justify-self: start;
  display: inline-flex;
  align-items: center;
  text-decoration: none;
  color: inherit;
  -webkit-tap-highlight-color: transparent;
}
.bp-top-bar-logo:focus-visible {
  outline: 2px solid var(--accent, #6366f1);
  outline-offset: 3px;
  border-radius: 6px;
}
.bp-top-bar-logo-img {
  display: block;
  height: clamp(20px, 4.6vw, 28px);
  width: auto;
  max-width: min(140px, 42vw);
  object-fit: contain;
  object-position: left center;
}
.bp-powered-by {
  font-size: 11px;
  /* Default (dark UI): ensure "POWERED BY MIIRA" is clearly visible */
  color: #ffffff;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  display: none;
  align-items: center;
  gap: 8px;
  text-decoration: none;
  justify-self: center;
  line-height: 1;
}
html[data-theme="dark"] .bp-powered-by {
  color: #ffffff;
}
html[data-theme="light"] .bp-powered-by {
  /* Light UI: increase contrast vs paper background */
  color: rgba(26, 29, 36, 0.9);
}
@media (min-width: 720px) {
  .bp-powered-by { display: flex; }
}
.bp-powered-by:hover { opacity: 0.88; }
.bp-powered-by:focus-visible {
  outline: 2px solid var(--accent, #6366f1);
  outline-offset: 2px;
  border-radius: 6px;
}

.bp-miira-logo-mark {
  position: relative;
  display: inline-flex;
  align-items: center;
  line-height: 0;
  flex-shrink: 0;
}
.bp-miira-logo-mark--top .bp-miira-logo-img {
  max-height: 18px;
}

/* ---------- Hero ---------- */
.bp-hero {
  position: relative;
  min-height: 360px;
  max-height: 70vh;
  overflow: hidden;
  background: var(--bg);
}
@media (min-width: 900px) {
  .bp-hero { min-height: 520px; max-height: min(600px, 62vh); }
}
.bp-hero-bg {
  position: absolute;
  inset: 0;
  background:
    radial-gradient(circle at 20% 30%, color-mix(in srgb, var(--accent) 15%, transparent), transparent 60%),
    linear-gradient(135deg, #1a1f28 0%, #0a0d11 100%);
  z-index: 0;
  transition: opacity 0.65s ease;
}
.bp-hero--intro .bp-hero-bg {
  opacity: 0;
}
.bp-hero-slide {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  opacity: 0;
  transition: opacity 0.65s ease;
  z-index: 0;
}
.bp-hero-slide.is-active { opacity: 1; z-index: 1; }
.bp-hero--intro .bp-hero-slide {
  opacity: 0 !important;
}
.bp-hero-fallback {
  position: absolute;
  inset: 0;
  z-index: 0;
  background: linear-gradient(120deg, #1a1f28 0%, #0a0d11 100%);
}
.bp-hero::after {
  content: '';
  position: absolute;
  inset: 0;
  z-index: 1;
  background: linear-gradient(180deg, color-mix(in srgb, var(--bg) 1%, transparent) 0%, color-mix(in srgb, var(--bg) 60%, transparent) 100%);
  pointer-events: none;
}

.bp-hero-content {
  position: relative;
  z-index: 2;
  height: 100%;
  min-height: 360px;
  padding: clamp(32px, 5vw, 80px) var(--bp-inline-gutter) clamp(24px, 3vw, 48px);
  display: flex;
  flex-direction: column;
  justify-content: space-between;
}
@media (min-width: 900px) {
  .bp-hero-content { min-height: 520px; }
}

.bp-hero-top {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  gap: 16px;
  flex-wrap: wrap;
}
@media (max-width: 899px) {
  .bp-hero-top {
    margin-bottom: 20px;
  }
}
.bp-welcome-tag {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 8px 14px;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 100px;
  font-size: 12px;
  font-weight: 500;
  color: var(--text-muted);
}
.bp-welcome-dot {
  width: 6px;
  height: 6px;
  background: var(--success);
  border-radius: 50%;
  box-shadow: 0 0 0 4px color-mix(in srgb, var(--success) 22%, transparent);
}
.bp-hero-counter {
  display: flex;
  gap: 6px;
  align-items: center;
}
.bp-counter-dot {
  width: 24px;
  height: 3px;
  background: rgba(255, 255, 255, 0.2);
  border-radius: 2px;
  transition: all 0.3s;
  cursor: pointer;
  border: none;
  padding: 0;
  touch-action: manipulation;
}
.bp-counter-dot.is-active { background: #fff; width: 36px; }

.bp-hero-bottom {
  display: flex;
  justify-content: space-between;
  align-items: flex-end;
  gap: 20px;
  flex-wrap: wrap;
}
.bp-hero-title-block { max-width: 820px; }

.bp-hero-brand {
  display: flex;
  align-items: center;
  gap: clamp(14px, min(3vw, 24px), 28px);
  flex-wrap: wrap;
  margin-bottom: 24px;
}
.bp-hero-brand--both {
  align-items: stretch;
}
.bp-hero-brand--both .bp-hero-title {
  margin-bottom: 0;
  flex: 1 1 200px;
  min-width: 0;
}
.bp-hero-logo {
  display: block;
  height: clamp(40px, min(8vw, 3.5rem), 64px);
  width: auto;
  max-width: min(220px, 42vw);
  object-fit: contain;
  object-position: left center;
  flex-shrink: 0;
}
.bp-hero-brand-sep {
  flex-shrink: 0;
  width: 1px;
  align-self: stretch;
  min-height: 48px;
  background: rgba(255, 255, 255, 0.35);
}
.bp-hero-brand--logo-only .bp-hero-logo {
  max-width: min(280px, 85vw);
}

.bp-hero-eyebrow {
  font-size: 11px;
  letter-spacing: 0.2em;
  text-transform: uppercase;
  color: var(--hero-eyebrow);
  margin-bottom: 20px;
  font-weight: 500;
}
.bp-hero-eyebrow span { color: var(--accent); }

.bp-hero-title {
  font-size: clamp(36px, min(8vw, 4.2rem), 64px);
  line-height: 0.95;
  font-weight: 600;
  letter-spacing: -0.04em;
  /* line-height < 1 + overflow:hidden clips glyph descenders (e.g. the "y" in "Playbook").
     Pad the bottom so descenders sit inside the clip box, and trim margin to keep spacing. */
  padding-bottom: 0.12em;
  margin-bottom: 16px;
  color: #fff;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.bp-hero-title {
  word-break: break-word;
}

/* Prevent mid-desktop truncation on laptop widths */
@media (max-width: 1400px) {
  .bp-hero-title {
    white-space: normal;
    overflow: visible;
    text-overflow: unset;
  }
}
.bp-hero-title em {
  font-style: normal;
  font-weight: 300;
  color: rgba(255, 255, 255, 0.85);
}

.bp-hero-meta {
  display: flex;
  flex-wrap: wrap;
  gap: clamp(16px, min(3vw, 1.75rem), 32px);
  font-size: 13px;
  color: var(--hero-text-sub);
}
.bp-hero-meta-item {
  display: flex;
  align-items: center;
  gap: 8px;
}
.bp-hero-meta-item svg { width: 14px; height: 14px; opacity: 0.85; flex-shrink: 0; }

.bp-hero-controls {
  display: none;
}
.bp-hero-btn {
  width: 44px;
  height: 44px;
  background: rgba(255, 255, 255, 0.08);
  backdrop-filter: blur(20px);
  border: 1px solid rgba(255, 255, 255, 0.12);
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  color: #fff;
  transition: background 0.2s;
}
.bp-hero-btn:hover { background: rgba(255, 255, 255, 0.15); }
.bp-hero-btn svg { width: 16px; height: 16px; }

.bp-hero-thumbs {
  position: absolute;
  bottom: clamp(16px, 3vw, 48px);
  right: var(--bp-inline-gutter);
  display: flex;
  gap: 8px;
  z-index: 3;
  flex-wrap: wrap;
  justify-content: flex-end;
  max-width: calc(100% - 2 * var(--bp-inline-gutter));
}
.bp-hero-thumb {
  width: 56px;
  height: 40px;
  border-radius: 6px;
  background: rgba(255, 255, 255, 0.1);
  border: 2px solid transparent;
  cursor: pointer;
  overflow: hidden;
  padding: 0;
  flex-shrink: 0;
}
.bp-hero-thumb img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}
.bp-hero-thumb.is-active { border-color: #fff; }

/* Hero is theme-locked to dark; only the welcome pip follows the page theme.
   Pin the dark palette onto #bp-section-hero so descendants resolve dark vars
   even when the page is in light mode. */
#bp-section-hero {
  --bg: #0f1419;
  --surface: #141a21;
  --surface-2: #1a2129;
  --surface-3: #222a33;
  --border: #232b35;
  --border-2: #2d3540;
  --text: #ffffff;
  --text-muted: #98a2b0;
  --text-dim: #5b6472;
  --success: #10b981;
  --hero-bottom-fade: rgba(15, 20, 25, 0.4);
  --hero-text-sub: rgba(255, 255, 255, 0.88);
  --hero-eyebrow: rgba(255, 255, 255, 0.6);
  --welcome-pill-bg: color-mix(in srgb, var(--success) 34%, rgba(12, 18, 24, 0.88));
  --welcome-pill-border: color-mix(in srgb, var(--success) 48%, transparent);
}
/* Welcome pip: re-expose page-theme values inside the dark-locked hero so
   --surface / --border / --text-muted / --success follow the active theme. */
[data-theme="light"] #bp-section-hero .bp-welcome-tag {
  --surface: #ffffff;
  --border: #e8e4dc;
  --text-muted: #5b6472;
}
[data-theme="light"] #bp-section-hero .bp-welcome-dot {
  --success: #059669;
}

/* Mobile in light mode: lift the dark-locked palette on #bp-section-hero so
   the hero (or condensed mobile head) follows the light page theme. Desktop
   and dark-mode mobile keep the dark scheme. */
@media (max-width: 639px) {
  html[data-theme="light"] #bp-section-hero {
    --bg: #f7f6f3;
    --surface: #ffffff;
    --surface-2: #faf9f6;
    --surface-3: #f0eee9;
    --border: #e8e4dc;
    --border-2: #d8d2c6;
    --text: #1a1d24;
    --text-muted: #5b6472;
    --text-dim: #8a94a3;
    --success: #059669;
    --hero-bottom-fade: rgba(247, 246, 243, 0.88);
    --hero-text-sub: rgba(26, 29, 36, 0.78);
    --hero-eyebrow: rgba(26, 29, 36, 0.55);
    --welcome-pill-bg: color-mix(in srgb, var(--success) 28%, rgba(255, 255, 255, 0.94));
    --welcome-pill-border: color-mix(in srgb, var(--success) 42%, rgba(26, 29, 36, 0.14));
  }
  html[data-theme="light"] #bp-section-hero .bp-hero-bg {
    background:
      radial-gradient(circle at 20% 30%, color-mix(in srgb, var(--accent) 15%, transparent), transparent 60%),
      linear-gradient(135deg, #faf9f6 0%, #ffffff 100%);
  }
  html[data-theme="light"] #bp-section-hero .bp-hero-fallback {
    background: linear-gradient(120deg, #faf9f6 0%, #ffffff 100%);
  }
  html[data-theme="light"] #bp-section-hero .bp-hero-title {
    color: var(--text);
    text-shadow: 0 1px 24px rgba(247, 246, 243, 0.55);
  }
  html[data-theme="light"] #bp-section-hero .bp-hero-title em {
    color: rgba(26, 29, 36, 0.75);
    text-shadow: 0 1px 24px rgba(247, 246, 243, 0.55);
  }
  html[data-theme="light"] #bp-section-hero .bp-hero-brand-sep {
    background: rgba(26, 29, 36, 0.22);
  }
  html[data-theme="light"] #bp-section-hero .bp-counter-dot {
    background: rgba(26, 29, 36, 0.2);
  }
  html[data-theme="light"] #bp-section-hero .bp-counter-dot.is-active {
    background: var(--text);
  }
  html[data-theme="light"] #bp-section-hero .bp-hero-btn {
    background: rgba(255, 255, 255, 0.92);
    border: 1px solid var(--border);
    color: var(--text);
  }
  html[data-theme="light"] #bp-section-hero .bp-hero-btn:hover {
    background: var(--surface);
    border-color: var(--border-2);
  }
  html[data-theme="light"] #bp-section-hero .bp-hero-thumb.is-active {
    border-color: var(--text);
  }
}

/* ---------- Main grid ---------- */
/* Full-width with gutter padding so the page-nav's left edge aligns with
   the hero title block (which sits at var(--bp-inline-gutter) inside .bp-hero-content). */
.bp-main-layout {
  display: grid;
  grid-template-columns: 1fr;
  --bp-main-col-gap: 32px;
  gap: 32px;
  padding: var(--bp-main-col-gap) var(--bp-inline-gutter) 80px;
}
@media (min-width: 1100px) {
  .bp-main-layout {
    grid-template-columns: 1fr 380px;
    align-items: start;
  }
  .bp-main-layout--has-page-nav {
    grid-template-columns: minmax(132px, 184px) minmax(0, 1fr) 380px;
    --bp-main-col-gap: clamp(24px, 2.4vw, 36px);
    column-gap: var(--bp-main-col-gap);
  }
}
.bp-content-col { min-width: 0; }

/* Sticky in-page summary (desktop); hidden <1100px so single-column layouts stay clean */
.bp-page-nav {
  display: none;
}
@media (min-width: 1100px) {
  .bp-page-nav {
    display: block;
    position: sticky;
    top: 88px;
    align-self: start;
    max-height: calc(100vh - 96px);
    overflow-y: auto;
    overscroll-behavior: contain;
    padding-right: 6px;
    margin-right: -6px;
  }
}
.bp-page-nav-list {
  list-style: none;
  margin: 0;
  padding: 0;
  display: flex;
  flex-direction: column;
  gap: 4px;
}
.bp-page-nav-link {
  display: block;
  font-size: 13px;
  font-weight: 500;
  line-height: 1.35;
  color: var(--text-muted);
  text-decoration: none;
  padding: 6px 0 6px 12px;
  border-left: 2px solid transparent;
  margin-left: 0;
  transition: color 0.15s ease, border-color 0.15s ease;
}
.bp-page-nav-link:hover {
  color: var(--text);
}
.bp-page-nav-link.is-active {
  color: var(--text);
  border-left-color: var(--accent);
}
.bp-page-nav-link:focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: 2px;
}

#bp-section-hero,
.bp-section[id],
#bp-section-partners,
#bp-section-sales {
  scroll-margin-top: calc(72px + max(16px, env(safe-area-inset-top)));
}
.bp-sidebar-col {
  display: flex;
  flex-direction: column;
  gap: 16px;
  /* On small screens the layout is single-column; show sidebar content (agents/partners)
     near the top instead of after all sections. */
  order: -1;
}
.bp-sidebar-col--mobile {
  /* When sidebar cards are rendered inline between sections on mobile. */
  margin-bottom: 40px;
}
@media (min-width: 1100px) {
  .bp-sidebar-col {
    position: sticky;
    top: 88px;
    align-self: start;
  }
  aside.bp-sidebar-col {
    /* Partners always stay in the sticky sidebar on desktop. The sidebar takes its
       natural height — when it is taller than a short content column the page simply
       scrolls to reveal it, so nothing (notably the CTA buttons) is ever clipped. */
    overscroll-behavior: contain;
  }
}
@media (min-width: 1100px) {
  .bp-sidebar-col { order: 0; }
}
@media (min-width: 1100px) {
  /* Desktop: align sidebar cards with the apartment card top. */
  .bp-sidebar-col { margin-top: 0; }
}

/* ---------- Sections ---------- */
.bp-section { 
	margin-bottom: var(--bp-main-col-gap, 64px); 
	background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 16px;
  overflow: hidden;
  border-top: none;
  padding: 28px;
}
.bp-section:last-child { margin-bottom: 0; }
/* The .bp-partners-inline-wrap div is rendered as the last child of
   .bp-content-col but display:none unless the sticky sidebar overflows, so
   :last-child above doesn't catch the visually-last section. Use :last-of-type
   on the section element instead so the trailing 64px gap disappears when the
   inline wrap is hidden. */
.bp-content-col > section.bp-section:last-of-type { margin-bottom: 0; }
html.bp-sidebar-overflow-partners .bp-content-col > section.bp-section:last-of-type {
  margin-bottom: var(--bp-main-col-gap, 64px);
}

/* Preview hover-highlight: the manage settings UI posts a section key on hover and this panel
   glows with an accent ring. Transition lives on the base targets so the glow eases in AND out.
   --accent is theme-scoped, so the glow adapts across all four themes automatically. */
.bp-section,
.bp-hero,
.bp-mobile-head,
.bp-sidebar-col,
.bp-partners-inline-wrap {
  transition: box-shadow 0.24s ease;
}
.bp-preview-highlight {
  animation: bp-preview-glow-pulse 1.5s ease-in-out infinite;
}
@keyframes bp-preview-glow-pulse {
  0%, 100% {
    box-shadow:
      0 0 0 3px color-mix(in srgb, var(--accent) 55%, transparent),
      0 0 22px 2px color-mix(in srgb, var(--accent) 40%, transparent),
      0 12px 40px color-mix(in srgb, var(--accent) 30%, transparent);
  }
  50% {
    box-shadow:
      0 0 0 5px color-mix(in srgb, var(--accent) 80%, transparent),
      0 0 40px 8px color-mix(in srgb, var(--accent) 60%, transparent),
      0 16px 54px color-mix(in srgb, var(--accent) 45%, transparent);
  }
}
@media (prefers-reduced-motion: reduce) {
  .bp-preview-highlight {
    animation: none;
    box-shadow:
      0 0 0 4px color-mix(in srgb, var(--accent) 70%, transparent),
      0 0 30px 4px color-mix(in srgb, var(--accent) 50%, transparent),
      0 14px 46px color-mix(in srgb, var(--accent) 38%, transparent);
  }
}

.bp-section-head {
  display: flex;
  justify-content: space-between;
  align-items: flex-end;
  margin-bottom: 28px;
  padding-bottom: 0;
}
.bp-section-title {
  font-size: clamp(22px, min(3vw, 2rem), 28px);
  font-weight: 600;
  letter-spacing: -0.02em;
  line-height: 1.1;
}
.bp-section-title em {
  font-style: normal;
  color: var(--accent);
  font-weight: 500;
}

.bp-section-title-meta {
  color: var(--text-muted);
  font-weight: 500;
}
.bp-section-title-sep {
  display: inline-block;
  color: var(--accent);
  font-weight: 500;
  padding: 0 0.32em;
}
:root:not([data-theme="light"]) .bp-section-title-sep,
[data-theme="dark"] .bp-section-title-sep {
  color: color-mix(in srgb, var(--accent) 55%, #f1f4fd);
  color: oklch(from var(--accent) max(0.72, l) c h);
}

/* Same emphasis pattern when h2 omits .bp-section-title (e.g. some blocks built separately) */
.bp-section-head h2 em {
  font-style: normal;
  color: var(--accent);
  font-weight: 500;
}

/* Doc/video dock headers sometimes emphasise part of the title (e.g. My Videos, Building Amenities) */
.bp-dock-title em {
  font-style: normal;
  font-weight: 500;
  color: var(--accent);
}

/* Dark UI: project accent may be very dark — keep emphasised title words readable */
:root:not([data-theme="light"]) .bp-section-title em,
[data-theme="dark"] .bp-section-title em,
:root:not([data-theme="light"]) .bp-section-head h2 em,
[data-theme="dark"] .bp-section-head h2 em,
:root:not([data-theme="light"]) .bp-dock-title em,
[data-theme="dark"] .bp-dock-title em {
  color: color-mix(in srgb, var(--accent) 55%, #f1f4fd);
  color: oklch(from var(--accent) max(0.72, l) c h);
}
/* Hero is dark-locked, so the dark-UI accent brightness fix always applies here */
.bp-hero-eyebrow span {
  color: color-mix(in srgb, var(--accent) 55%, #f1f4fd);
  color: oklch(from var(--accent) max(0.72, l) c h);
}

/* ---------- Apartment ---------- */
/* Added hooks for styling the Apartments section + heading */
.bp-section-apartments {
  padding: 0;
}
.bp-section-title-apartments {
  margin: 28px;
  margin-bottom: 0;
}

.bp-apartment-card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 0px;
  overflow: hidden;
}
/* New: dock-style eyebrow heading inside the apartment card (icon + "Floorplans · N units").
   Mirrors the documents dock header — bp-apartment-card has no intrinsic padding, so we
   add it here rather than on the card so the carousel/grid below remain flush. */
.bp-apartment-card > .bp-dock-header {
  padding: 28px 28px 0;
  margin-bottom: 18px;
}
.bp-apt-carousel {
  border-bottom: 1px solid var(--border);
  background: var(--surface-2);
}
.bp-apt-carousel-track {
  display: flex;
  gap: 10px;
  padding: 12px 14px;
  overflow-x: auto;
  overflow-y: hidden;
  -webkit-overflow-scrolling: touch;
  scroll-snap-type: x mandatory;
  scrollbar-width: none;
  mask-image: linear-gradient(90deg, transparent 0, #000 32px, #000 calc(100% - 32px), transparent 100%);
  -webkit-mask-image: linear-gradient(90deg, transparent 0, #000 32px, #000 calc(100% - 32px), transparent 100%);
}
.bp-apt-carousel-track::-webkit-scrollbar { display: none; }
.bp-apt-chip {
  scroll-snap-align: center;
  flex: 0 0 auto;
  border: 1px solid rgba(255, 255, 255, 0.28);
  background: rgba(15, 23, 42, 0.38);
  color: rgba(255, 255, 255, 0.92);
  border-radius: 999px;
  padding: 9px 14px;
  font-size: 12px;
  font-weight: 600;
  letter-spacing: 0.02em;
  cursor: pointer;
  transition: transform 0.18s, background 0.18s, border-color 0.18s, opacity 0.18s;
  opacity: 0.9;
}
.bp-apt-chip:hover { opacity: 1; transform: translateY(-1px); }
.bp-apt-chip.is-active {
  opacity: 1;
  background: rgba(255, 255, 255, 0.16);
  border-color: color-mix(in srgb, var(--accent) 55%, rgba(255,255,255,0.25));
}
[data-theme="light"] .bp-apt-chip {
  border: 1px solid rgba(15, 23, 42, 0.14);
  background: rgba(255, 255, 255, 0.78);
  color: rgba(15, 23, 42, 0.92);
}
[data-theme="light"] .bp-apt-chip.is-active {
  background: rgba(99, 102, 241, 0.12);
  border-color: rgba(99, 102, 241, 0.28);
}
.bp-apt-chip:focus-visible {
  outline: 2px solid color-mix(in srgb, var(--accent) 55%, transparent);
  outline-offset: 2px;
}
.bp-apartment-grid {
  display: grid;
  grid-template-columns: 1fr;
  align-items: stretch;
}
@media (min-width: 800px) {
  .bp-apartment-grid { grid-template-columns: 1fr 1fr; }
}
.bp-apartment-floorplan {
  position: relative;
  background: var(--floorplan-bg);
  transition: background-color 260ms ease;
  min-height: 320px;
  display: flex;
  align-items: center;
  justify-content: center;
  overflow: hidden;
  border-bottom: 1px solid var(--border);
}
@media (min-width: 800px) {
  .bp-apartment-floorplan { border-bottom: none; border-right: 1px solid var(--border); min-height: 480px; }
}
.bp-floorplan-tag {
  position: absolute;
  top: 20px;
  left: 20px;
  padding: 6px 10px;
  background: rgba(0, 0, 0, 0.85);
  color: #fff;
  font-size: 11px;
  font-weight: 500;
  border-radius: 6px;
  letter-spacing: 0.04em;
  z-index: 2;
}
.bp-floorplan-controls {
  position: absolute;
  top: 20px;
  right: 20px;
  display: flex;
  gap: 6px;
  z-index: 2;
}
.bp-fp-btn {
  width: 32px;
  height: 32px;
  background: rgba(255, 255, 255, 0.95);
  border: 1px solid rgba(0, 0, 0, 0.06);
  border-radius: 8px;
  display: flex;
  align-items: center;
  justify-content: center;
  color: #333;
  cursor: pointer;
  padding: 0;
  margin: 0;
  font: inherit;
  box-sizing: border-box;
}
.bp-fp-btn:focus-visible {
  outline: 2px solid color-mix(in srgb, var(--accent) 45%, transparent);
  outline-offset: 2px;
}

/* ---------- Floor plan fullscreen modal ---------- */
.bp-floorplan-modal {
  position: fixed;
  inset: 0;
  z-index: 1100;
}
.bp-floorplan-modal.is-hidden {
  display: none !important;
}
.bp-floorplan-modal-backdrop {
  position: absolute;
  inset: 0;
  background: rgba(15, 23, 42, 0.88);
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 10px;
  box-sizing: border-box;
  -webkit-backdrop-filter: blur(6px);
  backdrop-filter: blur(6px);
}
.bp-floorplan-modal-shell {
  width: 100%;
  height: 100%;
  max-width: 100%;
  max-height: 100%;
  background: var(--surface);
  border-radius: 12px;
  border: 1px solid var(--border);
  display: flex;
  flex-direction: column;
  overflow: hidden;
  box-shadow: 0 25px 50px -12px rgba(0, 0, 0, 0.35);
}
.bp-floorplan-modal-bar {
  flex-shrink: 0;
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 10px 12px;
  border-bottom: 1px solid var(--border);
  background: var(--surface);
}
.bp-floorplan-modal-title {
  margin: 0;
  font-size: 15px;
  font-weight: 600;
  color: var(--text);
  flex: 1;
  min-width: 0;
  letter-spacing: -0.02em;
}
.bp-floorplan-zoom-controls {
  display: flex;
  align-items: center;
  gap: 4px;
  flex-shrink: 0;
}
.bp-fp-zoom-btn {
  width: 36px;
  height: 36px;
  border-radius: 8px;
  border: 1px solid var(--border);
  background: var(--surface-3);
  color: var(--text);
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  font-family: inherit;
  padding: 0;
  box-sizing: border-box;
}
.bp-fp-zoom-btn:hover {
  background: var(--surface-2);
}
.bp-fp-zoom-btn--text {
  width: auto;
  min-width: 36px;
  padding: 0 10px;
  font-size: 12px;
  font-weight: 600;
}
.bp-floorplan-modal-close {
  width: 36px;
  height: 36px;
  border: none;
  border-radius: 8px;
  background: var(--surface-3);
  color: var(--text-muted);
  font-size: 22px;
  line-height: 1;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  font-family: inherit;
  flex-shrink: 0;
  margin: 0;
  padding: 0;
}
.bp-floorplan-modal-close:hover {
  background: var(--surface-2);
  color: var(--text);
}
.bp-floorplan-viewport {
  flex: 1;
  min-height: 0;
  overflow: auto;
  -webkit-overflow-scrolling: touch;
  background: var(--bg);
  overscroll-behavior: contain;
}
.bp-floorplan-zoom-img {
  display: block;
  max-width: none;
  height: auto;
  margin: 0 auto;
  user-select: none;
  -webkit-user-drag: none;
}
/* Two stacked plans crossfade in place: both sit at opacity 0 by default; the front carries
   .is-visible. The other pre-loads the next plan behind it, so the old plan fades out cleanly. */
.bp-floorplan-img {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: contain;
  padding: 24px;
  opacity: 0;
  pointer-events: none;
  /* Fade OUT (front image losing .is-visible) — matches the details panel's 350ms fade-out. */
  transition: opacity 0.35s ease;
}
.bp-floorplan-img.is-visible {
  opacity: 1;
  /* Fade IN (back image gaining .is-visible) — matches the details panel's 450ms fade-in. */
  transition: opacity 0.45s ease;
}
@media (prefers-reduced-motion: reduce) {
  .bp-floorplan-img {
    transition: none;
  }
}
.bp-floorplan-placeholder {
  padding: 48px;
  color: var(--text-dim);
  font-size: 13px;
  text-align: center;
}

/* ---------- Prospect portal video modal ---------- */
.bp-video-modal {
  position: fixed;
  inset: 0;
  z-index: 1200;
}
.bp-video-modal.is-hidden {
  display: none !important;
}
.bp-video-modal-backdrop {
  position: absolute;
  inset: 0;
  /* Neutral dimmer (avoids slate-blue cast used in older overlays) */
  background: rgba(0, 0, 0, 0.62);
  display: flex;
  align-items: center;
  justify-content: center;
  padding: max(16px, env(safe-area-inset-top)) max(16px, env(safe-area-inset-right))
    max(16px, env(safe-area-inset-bottom)) max(16px, env(safe-area-inset-left));
  box-sizing: border-box;
  -webkit-backdrop-filter: blur(4px);
  backdrop-filter: blur(4px);
}
.bp-video-modal-shell {
  width: 100%;
  max-width: min(960px, 100%);
  max-height: min(85vh, 100%);
  background: var(--surface);
  border-radius: 12px;
  border: 1px solid var(--border);
  display: flex;
  flex-direction: column;
  overflow: hidden;
  box-shadow: 0 25px 50px -12px rgba(0, 0, 0, 0.25);
}
.bp-video-modal-bar {
  flex-shrink: 0;
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 12px;
  padding: 10px 12px;
  border-bottom: 1px solid var(--border);
  background: var(--surface);
}
.bp-video-modal-download {
  width: 40px;
  height: 40px;
  border-radius: 8px;
  border: 1px solid var(--border);
  background: var(--surface-3);
  color: var(--text-dim);
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  font-family: inherit;
  padding: 0;
  flex-shrink: 0;
  box-sizing: border-box;
  transition: background 0.2s, color 0.2s;
}
.bp-video-modal-download:hover {
  background: var(--surface-2);
  color: var(--text);
}
.bp-video-modal-download:focus-visible {
  outline: 2px solid color-mix(in srgb, var(--accent) 45%, transparent);
  outline-offset: 2px;
}
.bp-video-modal-close {
  width: 40px;
  height: 40px;
  border: none;
  border-radius: 8px;
  background: var(--surface-3);
  color: var(--text-muted);
  font-size: 22px;
  line-height: 1;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  font-family: inherit;
  flex-shrink: 0;
  margin: 0;
  padding: 0;
}
.bp-video-modal-close:hover {
  background: var(--surface-2);
  color: var(--text);
}
.bp-video-modal-body {
  position: relative;
  flex: 1;
  min-height: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  /* Match floor plan modal viewport + page chrome */
  background: var(--bg);
  padding: clamp(14px, 2vw, 22px);
}
.bp-video-modal-player {
  width: 100%;
  height: auto;
  max-height: min(70vh, calc(100dvh - 160px));
  object-fit: contain;
  vertical-align: bottom;
  border-radius: 6px;
}
.bp-video-modal-status {
  position: absolute;
  inset: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 24px;
  text-align: center;
  color: var(--text);
  font-size: 1rem;
  line-height: 1.45;
  pointer-events: none;
}
.bp-video-modal-status.is-hidden {
  display: none;
}

.bp-apartment-details { padding: clamp(24px, 4vw, 40px); display: flex; flex-direction: column; }
/* Asymmetric, unhurried fade for a luxury feel: out 350ms, hold 150ms (JS), in 450ms. The duration
   lives on the state being transitioned INTO — fade-out on the dimmed state, fade-in on the visible. */
.bp-apartment-details.bp-apt-details-fade {
  opacity: 0;
  transition: opacity 0.35s ease;
}
.bp-apartment-details:not(.bp-apt-details-fade) {
  transition: opacity 0.45s ease;
}
@media (prefers-reduced-motion: reduce) {
  .bp-apartment-details.bp-apt-details-fade,
  .bp-apartment-details:not(.bp-apt-details-fade) {
    transition: none;
  }
}

.bp-apt-status {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 4px 10px;
  background: var(--apt-pill-bg);
  color: var(--success);
  border-radius: 100px;
  font-size: 11px;
  font-weight: 600;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  margin-bottom: 20px;
  width: fit-content;
}
.bp-apt-status::before {
  content: '';
  width: 5px;
  height: 5px;
  background: var(--success);
  border-radius: 50%;
}

/* Sold, reserved or withheld stock. Same pill, restated in the one colour that reads as a stop
   in every theme — the tint is mixed from --danger rather than hard-coded so light and dark
   each get their own red. */
.bp-apt-status--unavailable {
  background: color-mix(in srgb, var(--danger) 12%, transparent);
  color: var(--danger);
}
.bp-apt-status--unavailable::before {
  background: var(--danger);
}

.bp-apt-number-block {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 6px;
  margin-bottom: 28px;
}
.bp-apt-number {
  font-size: clamp(36px, min(6vw, 3rem), 48px);
  font-weight: 600;
  letter-spacing: -0.04em;
  line-height: 1;
}
.bp-apt-level { font-size: 13px; color: var(--text-muted); }

.bp-apt-icons {
  display: flex;
  flex-wrap: wrap;
  gap: 20px 28px;
  margin-bottom: 32px;
}
.bp-apt-icon-item {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 14px;
  color: var(--text-muted);
}
.bp-apt-icon-item svg { width: 18px; height: 18px; }
.bp-apt-icon-item strong { color: var(--text); font-weight: 500; }

/* Buyer-visible custom fields, rendered from the `custom`-flagged stats. A label/value
   list rather than icon items: these are project-specific and have no iconography. */
.bp-apt-specs {
  display: flex;
  flex-direction: column;
  gap: 6px;
  margin-top: 14px;
}
.bp-apt-spec {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 12px;
  font-size: 13px;
}
.bp-apt-spec-label {
  color: var(--text-dim);
  min-width: 0;
}
.bp-apt-spec-value {
  color: var(--text);
  font-weight: 500;
  text-align: right;
}

.bp-apt-price { margin-top: auto; padding-top: 8px; }
.bp-apt-price-label {
  font-size: 11px;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: var(--text-dim);
  margin-bottom: 8px;
}
.bp-apt-price-value {
  font-size: clamp(24px, min(4vw, 2rem), 32px);
  font-weight: 600;
  letter-spacing: -0.02em;
}

.bp-apt-description {
  padding-top: 16px;
  margin-bottom: 18px;
  border-top: 1px solid var(--border);
}
.bp-apt-description-label {
  font-size: 11px;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: var(--text-dim);
  margin-bottom: 8px;
  font-weight: 600;
}
.bp-apt-description-body {
  font-size: 13px;
  line-height: 1.6;
  color: var(--text-muted);
  white-space: pre-wrap;
}

/* ---------- Doc dock ---------- */
.bp-doc-dock {
  background: var(--surface-2);
  border-top: 1px solid var(--border);
  padding: 32px var(--bp-inline-gutter);
  padding:0px !important;
  border: none !important;
  border-radius: 0px !important;
  min-width: 0;
}
.bp-doc-dock.bp-doc-dock--standalone {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 16px;
  overflow: hidden;
  border-top: none;
  /* Standalone dock is already inside the main column.
     Don't re-apply the global inline gutter here, or the grid gets squeezed inward. */
  padding: 28px;
}
.bp-doc-dock-details {
  min-width: 0;
  container-type: inline-size;
  container-name: bp-doc-dock;
}
.bp-dock-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 16px;
  margin-bottom: 24px;
  flex-wrap: wrap;
}
.bp-dock-title {
  display: flex;
  align-items: center;
  gap: 10px;
  font-size: 13px;
  font-weight: 500;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: var(--text-muted);
}
.bp-dock-title svg { width: 16px; height: 16px; flex-shrink: 0; color: var(--text); }

.bp-dock-title-line {
  min-width: 0;
  display: inline;
}

.bp-doc-title-main {
  color: var(--text);
}

.bp-doc-title-meta {
  color: var(--text-muted);
  font-weight: 500;
}

.bp-doc-title-sep {
  display: inline-block;
  color: var(--accent);
  font-weight: 500;
  padding: 0 0.32em;
}

:root:not([data-theme="light"]) .bp-doc-title-sep,
[data-theme="dark"] .bp-doc-title-sep {
  color: color-mix(in srgb, var(--accent) 55%, #f1f4fd);
  color: oklch(from var(--accent) max(0.72, l) c h);
}

.bp-doc-dock-footer {
  display: flex;
  justify-content: flex-end;
  margin-top: 24px;
  padding-top: 20px;
  border-top: 1px solid var(--border);
}

@media (min-width: 640px) {
  .bp-doc-dock-footer.bp-doc-dock-footer--mobile-only {
    display: none;
  }
}

.bp-download-all-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 40px;
  height: 40px;
  padding: 0;
  font: inherit;
  background: var(--surface-3);
  color: var(--text);
  border: 1px solid var(--border-2);
  border-radius: 8px;
  cursor: pointer;
  transition: background 0.2s, border-color 0.2s, color 0.2s;
}
.bp-download-all-btn:hover {
  background: var(--surface-2);
  border-color: color-mix(in srgb, var(--text) 30%, var(--border-2));
  color: var(--text);
}
.bp-download-all-btn:focus-visible {
  outline: 2px solid color-mix(in srgb, var(--accent) 45%, transparent);
  outline-offset: 2px;
}
.bp-download-all-btn svg { width: 18px; height: 18px; flex-shrink: 0; }

.bp-download-all-btn--header {
  flex-shrink: 0;
  margin-left: auto;
}

.bp-download-all-btn.is-loading {
  cursor: wait;
  opacity: 0.75;
}
.bp-download-all-btn.is-loading svg { display: none; }
.bp-download-all-btn.is-loading::before {
  content: "";
  width: 16px;
  height: 16px;
  flex-shrink: 0;
  border-radius: 50%;
  border: 2px solid color-mix(in srgb, currentColor 25%, transparent);
  border-top-color: currentColor;
  animation: bp-download-all-spin 0.8s linear infinite;
}
@keyframes bp-download-all-spin {
  to { transform: rotate(360deg); }
}
@media (prefers-reduced-motion: reduce) {
  .bp-download-all-btn.is-loading::before { animation-duration: 2s; }
}

.bp-doc-grid {
  display: grid;
  grid-template-columns: minmax(0, 1fr);
  gap: 12px;
  min-width: 0;
  /* Each card keeps its natural height instead of stretching to the tallest item in its row,
     so a tall floor-plan image no longer drags the PDF/file card beside it to match. */
  align-items: start;
}
/* Image previews and file cards render as separate grids; space them apart when both are present. */
.bp-doc-grid + .bp-doc-grid { margin-top: 12px; }
@container bp-doc-dock (min-width: 500px) {
  .bp-doc-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}
@container bp-doc-dock (min-width: 780px) {
  .bp-doc-grid { grid-template-columns: repeat(3, minmax(0, 1fr)); }
}

.bp-doc-card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 10px;
  padding: 16px;
  display: flex;
  align-items: center;
  gap: 14px;
  cursor: pointer;
  transition: border-color 0.2s, background 0.2s;
  min-width: 0;
  max-width: 100%;
}
.bp-doc-card:hover {
  border-color: var(--border-2);
  background: var(--surface-3);
}
.bp-doc-icon {
  width: 40px;
  height: 40px;
  border-radius: 8px;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  font-size: 10px;
  font-weight: 700;
  letter-spacing: 0.04em;
}
.bp-doc-icon.pdf { background: rgba(239, 68, 68, 0.12); color: #ef4444; }
.bp-doc-icon.xls { background: rgba(16, 185, 129, 0.12); color: #10b981; }
.bp-doc-icon.csv { background: rgba(34, 197, 94, 0.12); color: #22c55e; }
.bp-doc-icon.doc { background: rgba(59, 130, 246, 0.12); color: #3b82f6; }
.bp-doc-icon.zip { background: rgba(245, 158, 11, 0.12); color: #f59e0b; }

.bp-doc-info { flex: 1; min-width: 0; }
.bp-doc-name {
  font-size: 13px;
  font-weight: 500;
  margin-bottom: 2px;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.bp-doc-meta { font-size: 11px; color: var(--text-dim); }
.bp-doc-download { color: var(--text-dim); flex-shrink: 0; }
.bp-doc-card:hover .bp-doc-download { color: var(--accent); }

/* ---------- Video ---------- */
.bp-video-dock {
  /* Keep video grid visually consistent with document dock container. */
  padding: 10px;
}
.bp-doc-dock.bp-video-dock {
  padding: 10px;
}
.bp-video-dock > .bp-dock-header {
  margin-bottom: 24px;
}

.bp-video-grid {
  display: flex;
  flex-direction: column;
  gap: 2px;
  padding: 2px;
  background: var(--border);
  border-radius: 0;
}
@media (min-width: 640px) {
  .bp-video-grid { gap: 2px; padding: 2px; }
}

.bp-video-row {
  display: grid;
  grid-template-columns: 1.5fr 1fr;
  grid-template-rows: 1fr 1fr;
  /* Cards have only absolutely-positioned children, so a card placed in an
     implicit (auto) row collapses to 0 height. Force any implicit row to 1fr. */
  grid-auto-rows: 1fr;
  gap: 2px;
  min-width: 0;
  height: clamp(220px, 32vw, 380px);
}
.bp-video-row--flip {
  grid-template-columns: 1fr 1.5fr;
}
.bp-video-row--two {
  grid-template-rows: 1fr;
}
.bp-video-row--single {
  grid-template-columns: 1fr;
  grid-template-rows: 1fr;
}

.bp-video-card {
  position: relative;
  border-radius: 0;
  overflow: hidden;
  cursor: pointer;
  background: var(--surface);
  aspect-ratio: 16/9;
  min-width: 0;
}
.bp-video-row .bp-video-card {
  height: 100%;
  aspect-ratio: auto;
}
.bp-video-card--featured {
  grid-row: 1 / span 2;
  grid-column: 1;
}
/* Explicit placement for the two stacked small cards in a 3-up row. Relying on
   grid auto-flow let a small card occasionally spill into a 0-height row. */
.bp-video-card--small-a {
  grid-row: 1;
  grid-column: 2;
}
.bp-video-card--small-b {
  grid-row: 2;
  grid-column: 2;
}
.bp-video-row--flip .bp-video-card--featured {
  grid-column: 2;
}
.bp-video-row--flip .bp-video-card--small {
  grid-column: 1;
}
/* Two-up row is a single track. Pin both cards to row 1 — without an explicit
   row, grid's sparse auto-placement pushes the column-1 card to a new row when
   it follows the column-2 (featured) card in flipped rows. */
.bp-video-row--two .bp-video-card--featured,
.bp-video-row--two .bp-video-card--small {
  grid-row: 1;
}
.bp-video-row--single .bp-video-card--single {
  grid-row: auto;
  grid-column: auto;
}

@media (max-width: 639px) {
  .bp-video-row {
    height: auto;
    grid-template-columns: 1fr;
    grid-template-rows: auto;
  }
  .bp-video-row .bp-video-card {
    aspect-ratio: 16/9;
    height: auto;
  }
  /* Single-column stack: clear every explicit row/column placement. The
     .bp-video-row prefix matches the specificity of the --two/--flip rules
     above so they don't leak into the mobile layout. */
  .bp-video-row .bp-video-card--featured,
  .bp-video-row .bp-video-card--small,
  .bp-video-row .bp-video-card--small-a,
  .bp-video-row .bp-video-card--small-b {
    grid-row: auto;
    grid-column: auto;
  }
}
.bp-video-thumb {
  position: absolute;
  inset: 0;
  background-size: cover !important;
  background-position: center;
  background-repeat: no-repeat;
}
.bp-video-thumb::after {
  content: '';
  position: absolute;
  inset: 0;
  background: linear-gradient(180deg, transparent 40%, rgba(0, 0, 0, 0.85) 100%);
}
.bp-video-play {
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  width: 52px;
  height: 52px;
  /* Circle + triangle now live inside the SVG; this is just a positioned, animated wrapper. */
  filter: drop-shadow(0 4px 14px rgba(0, 0, 0, 0.22));
  transition: transform 0.2s, opacity 0.45s ease;
  z-index: 2;
  pointer-events: none;
}
.bp-video-card:hover .bp-video-play { transform: translate(-50%, -50%) scale(1.08); }
/* Fade the play button out while the hover preview is showing. */
.bp-video-card.is-previewing .bp-video-play { opacity: 0; }
.bp-video-play svg { display: block; width: 100%; height: 100%; }

/* Hover preview: a muted autoplaying clip that crossfades over the thumbnail for
   the first few seconds of the video, then fades back. Sits above the thumb but
   below the play button + meta (both z-index:2). */
.bp-video-preview {
  position: absolute;
  inset: 0;
  z-index: 1;
  opacity: 0;
  background: #000;
  pointer-events: none;
  transition: opacity 0.45s ease;
}
.bp-video-preview.is-visible { opacity: 1; }
.bp-video-preview video {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}
/* Match the thumb's bottom scrim so the title/duration stay legible over the clip. */
.bp-video-preview::after {
  content: '';
  position: absolute;
  inset: 0;
  background: linear-gradient(180deg, transparent 40%, rgba(0, 0, 0, 0.85) 100%);
}

.bp-video-meta {
  position: absolute;
  bottom: 16px;
  left: 16px;
  right: 16px;
  z-index: 2;
}
.bp-video-tag {
  display: inline-block;
  padding: 4px 10px;
  background: rgba(255, 255, 255, 0.15);
  backdrop-filter: blur(10px);
  border-radius: 100px;
  font-size: 10px;
  font-weight: 500;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  margin-bottom: 8px;
  color: #fff;
}
.bp-video-title {
  font-size: 16px;
  font-weight: 600;
  letter-spacing: -0.01em;
  line-height: 1.2;
  margin-bottom: 4px;
  color: #fff;
}
.bp-video-duration { font-size: 12px; color: rgba(255, 255, 255, 0.75); }

/* ---------- Amenities ---------- */
.bp-amenities-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 12px;
}
@media (min-width: 600px) {
  .bp-amenities-grid { grid-template-columns: repeat(2, 1fr); }
}
@media (min-width: 900px) {
  .bp-amenities-grid { grid-template-columns: repeat(3, 1fr); }
}

.bp-amenity-card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 10px;
  padding: 16px;
  display: flex;
  align-items: center;
  gap: 14px;
  transition: border-color 0.2s;
}
.bp-amenity-card:hover {
  border-color: var(--border-2);
  background: var(--surface-3);
}
.bp-amenity-check {
  width: 40px;
  height: 40px;
  background: var(--accent);
  border-radius: 8px;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  color: #fff;
}
.bp-amenity-check svg { width: 18px; height: 18px; }
.bp-amenity-info { flex: 1; min-width: 0; }
.bp-amenity-name { font-size: 13px; font-weight: 500; margin-bottom: 2px; }
.bp-amenity-meta { font-size: 11px; color: var(--text-dim); }

/* ---------- Location map (decorative) ---------- */
.bp-location-card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 16px;
  overflow: hidden;
}
.bp-location-map {
  position: relative;
  height: min(480px, 70vw);
  min-height: 280px;
  background: var(--map-bg);
  overflow: hidden;
}
[data-theme="light"] .bp-location-map {
  background: radial-gradient(circle at 50% 50%, #fafaf7 0%, #efece4 100%);
}
.bp-map-grid {
  position: absolute;
  inset: 0;
  background-image:
    linear-gradient(color-mix(in srgb, var(--accent) 6%, transparent) 1px, transparent 1px),
    linear-gradient(90deg, color-mix(in srgb, var(--accent) 6%, transparent) 1px, transparent 1px);
  background-size: 40px 40px;
  opacity: 0.6;
}
.bp-map-radius {
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  border-radius: 50%;
  border: 1px dashed color-mix(in srgb, var(--accent) 35%, transparent);
  pointer-events: none;
}
.bp-map-radius.r500 { width: min(140px, 28%); height: min(140px, 28%); border-color: color-mix(in srgb, var(--accent) 55%, transparent); }
.bp-map-radius.r1k { width: min(280px, 52%); height: min(280px, 52%); }
.bp-map-radius.r5k { width: min(560px, 95%); height: min(560px, 95%); opacity: 0.7; }

.bp-radius-label {
  position: absolute;
  background: var(--surface-3);
  border: 1px solid var(--border-2);
  color: var(--text-muted);
  font-size: 10px;
  font-weight: 500;
  letter-spacing: 0.06em;
  padding: 3px 8px;
  border-radius: 100px;
}

.bp-map-pin {
  position: absolute;
  width: 28px;
  height: 28px;
  background: var(--surface);
  border: 2px solid var(--accent);
  border-radius: 50% 50% 50% 0;
  transform: rotate(-45deg);
  display: flex;
  align-items: center;
  justify-content: center;
  transition: transform 0.2s;
}
.bp-map-pin:hover { transform: rotate(-45deg) scale(1.08); }
.bp-map-pin svg { width: 12px; height: 12px; transform: rotate(45deg); color: var(--accent); }
.bp-map-pin.cafe { border-color: #f59e0b; }
.bp-map-pin.cafe svg { color: #f59e0b; }
.bp-map-pin.gym { border-color: #ef4444; }
.bp-map-pin.gym svg { color: #ef4444; }
.bp-map-pin.school { border-color: #10b981; }
.bp-map-pin.school svg { color: #10b981; }
.bp-map-pin.transit { border-color: #6366f1; }
.bp-map-pin.transit svg { color: #6366f1; }

.bp-map-center {
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  width: 14px;
  height: 14px;
  background: var(--accent);
  border: 3px solid #fff;
  border-radius: 50%;
  box-shadow: 0 0 0 4px color-mix(in srgb, var(--accent) 35%, transparent);
  z-index: 5;
}

.bp-map-toolbar {
  padding: 16px 20px;
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 12px;
  flex-wrap: wrap;
  border-top: 1px solid var(--border);
  background: var(--surface-2);
}
.bp-filter-chips { display: flex; gap: 8px; flex-wrap: wrap; align-items: center; }
.bp-filter-chip {
  padding: 7px 12px;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 100px;
  font-size: 11px;
  color: var(--text-muted);
  cursor: pointer;
  transition: all 0.2s;
  display: flex;
  align-items: center;
  gap: 6px;
}
.bp-filter-chip:hover { border-color: var(--border-2); color: var(--text); }
.bp-filter-chip.is-active {
  background: var(--accent-soft);
  border-color: var(--accent);
  color: var(--accent);
}
.bp-filter-chip-dot {
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: currentColor;
}

.bp-radius-toggle {
  display: flex;
  gap: 4px;
  padding: 3px;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 8px;
}
.bp-radius-btn {
  padding: 5px 10px;
  background: transparent;
  border: none;
  color: var(--text-muted);
  font-size: 11px;
  font-weight: 500;
  cursor: pointer;
  border-radius: 6px;
}
.bp-radius-btn.is-active {
  background: var(--accent-soft);
  color: var(--accent);
}

.bp-map-note {
  font-size: 11px;
  color: var(--text-dim);
  padding: 8px 20px 0;
  background: var(--surface-2);
}

/* ---------- Milestones timeline ---------- */
/* Vertical rail read as a printed schedule rather than a progress bar: a hairline spine, small
   dots, and the date pulled out to a right-aligned letterspaced eyebrow so the section has two
   hard vertical edges. The accent is spent exactly ONCE per section — on the current event —
   so the eye lands on where the project is now; completed events earn full-strength ink
   instead of colour. Vertical at every width, so there is no mobile fork. */
.bp-timeline {
  list-style: none;
  margin: 0;
  padding: 4px 0 0;
}
/* The section title. Styled by the .bp-agent-eyebrow rule below, which it is grouped onto so it
   cannot drift from the Team & partners headings. It owns the 16px gap beneath it, so the rail
   drops its own top nudge whenever one is present. */
.bp-milestones-eyebrow + .bp-timeline { padding-top: 0; }
.bp-milestone {
  position: relative;
  display: grid;
  grid-template-columns: 9px minmax(0, 1fr);
  gap: 0 20px;
  padding-bottom: 30px;
}
.bp-milestone:last-child { padding-bottom: 0; }

/* Connector below each dot, starting just past it so it never shows through a hollow node. The
   last item has none, so the spine stops at the final dot rather than running on to the card edge.
   Uniform hairline: progress is carried by the ink ramp on the labels, not by colouring the rail. */
.bp-milestone::before {
  content: '';
  position: absolute;
  left: 4px;
  top: 17px;
  bottom: -7px;
  width: 1px;
  /* --border-2 rather than --border: at 1px on the card surface, --border is so low-contrast in
     the dark theme that the spine disappears and the dots read as unconnected. Crisp, not thick. */
  background: var(--border-2);
}
.bp-milestone:last-child::before { display: none; }

.bp-milestone-dot {
  width: 9px;
  height: 9px;
  margin-top: 7px;
  border-radius: 50%;
  background: var(--text-dim);
  position: relative;
  z-index: 2;
}
.bp-milestone.is-done .bp-milestone-dot { background: var(--text-muted); }
/* Three-step ink ramp on the nodes: hollow ring (upcoming) → solid mid-grey (done) → accent
   (current). Ringed on --text-dim rather than a border token so it stays legible in dark. */
.bp-milestone.is-upcoming .bp-milestone-dot {
  background: transparent;
  border: 1px solid var(--text-dim);
}
.bp-milestone.is-current .bp-milestone-dot {
  background: var(--accent);
  box-shadow: 0 0 0 3px color-mix(in srgb, var(--accent) 22%, transparent);
}

/* Name left, date right on a shared baseline — the second edge is what makes it read as print. */
.bp-milestone-body {
  min-width: 0;
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  align-items: baseline;
  gap: 0 24px;
}
.bp-milestone-name {
  font-size: 17px;
  font-weight: 400;
  letter-spacing: -0.015em;
  color: var(--text-muted);
  overflow-wrap: anywhere;
}
.bp-milestone-date {
  font-size: 11px;
  font-weight: 500;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--text-dim);
  white-space: nowrap;
}
.bp-milestone.is-done .bp-milestone-name { color: var(--text); }
.bp-milestone.is-current .bp-milestone-name { color: var(--text); font-weight: 500; }
.bp-milestone.is-current .bp-milestone-date { color: var(--accent); }

@media (max-width: 480px) {
  /* Tighter gutter between label and date; the name wraps rather than the date shrinking. */
  .bp-milestone-name { font-size: 16px; }
  .bp-milestone-body { gap: 0 14px; }
  .bp-milestone { padding-bottom: 26px; }
}

/* ---------- Sidebar: agent, partners, nudge ---------- */
.bp-appt-card {
  background: linear-gradient(135deg, color-mix(in srgb, var(--accent) 12%, transparent), color-mix(in srgb, var(--accent) 3%, transparent));
  border: 1px solid color-mix(in srgb, var(--accent) 25%, transparent);
  border-radius: 16px;
  padding: 22px 24px;
}
.bp-appt-eyebrow {
  font-size: 11px;
  text-transform: uppercase;
  letter-spacing: 0.12em;
  color: var(--accent);
  font-weight: 600;
  margin-bottom: 8px;
}
.bp-appt-title { font-size: 15px; font-weight: 600; line-height: 1.35; margin-bottom: 12px; letter-spacing: -0.01em; }
.bp-appt-meta { font-size: 12px; color: var(--text-muted); line-height: 1.6; }
.bp-appt-meta strong { color: var(--text); font-weight: 500; }

.bp-agent-card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 16px;
  overflow: hidden;
}
.bp-agent-header { padding: 24px 24px 20px; }
.bp-agent-eyebrow,
.bp-milestones-eyebrow {
  font-size: 11px;
  text-transform: uppercase;
  letter-spacing: 0.12em;
  color: var(--text-dim);
  font-weight: 600;
  margin-bottom: 16px;
}
.bp-agent-team {
  display: flex;
  flex-direction: column;
  gap: 12px;
  margin-bottom: 10px;
}
.bp-agent-person {
  display: flex;
  gap: 14px;
  align-items: center;
}
.bp-agent-person.is-primary .bp-agent-name {
  color: var(--text);
}
.bp-agent-person-copy {
  min-width: 0;
  flex: 1;
}
.bp-agent-avatar {
  width: 56px;
  height: 56px;
  border-radius: 50%;
  background: linear-gradient(135deg, var(--accent), #8b5cf6);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 18px;
  font-weight: 600;
  flex-shrink: 0;
  color: #fff;
  overflow: hidden;
}

.bp-agent-avatar-img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}
.bp-agent-person--agency-compact {
  gap: 10px;
  margin-top: 4px;
}
.bp-agent-person--agency-compact .bp-agent-avatar {
  width: 36px;
  height: 36px;
  font-size: 13px;
  background: color-mix(in srgb, var(--text) 8%, transparent);
  color: var(--text-muted);
}
.bp-agent-person--agency-compact .bp-agent-avatar--agency {
  background: transparent;
  border: 1px solid var(--border-2);
  padding: 3px;
}
.bp-agent-person--agency-compact .bp-agent-avatar--agency .bp-agent-avatar-img {
  object-fit: contain;
}
.bp-agent-person--agency-compact .bp-agent-name {
  font-size: 13px;
  font-weight: 500;
  color: var(--text-muted);
}
.bp-agent-person--agency-compact .bp-agent-contact {
  font-size: 10px;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  opacity: 0.85;
}
.bp-agent-name { font-size: 16px; font-weight: 600; margin-bottom: 2px; }
.bp-agent-contact {
  font-size: 10px;
  color: var(--text-muted);
  line-height: 1.4;
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 6px;
  margin-top: 4px;
}
.bp-agent-contact-btn {
  position: relative;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 28px;
  height: 28px;
  padding: 0;
  border: 1px solid color-mix(in srgb, var(--text-muted) 25%, transparent);
  border-radius: 8px;
  background: transparent;
  color: var(--text-muted);
  cursor: pointer;
  -webkit-appearance: none;
  appearance: none;
  transition: color 0.15s ease, background 0.15s ease, border-color 0.15s ease;
}
.bp-agent-contact-btn:hover {
  color: var(--text);
  background: color-mix(in srgb, var(--text) 8%, transparent);
  border-color: color-mix(in srgb, var(--text-muted) 45%, transparent);
}
.bp-agent-contact-btn:focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: 2px;
}
.bp-agent-contact-btn.is-copied {
  color: var(--accent);
  border-color: color-mix(in srgb, var(--accent) 55%, transparent);
}
.bp-agent-contact-icon {
  width: 14px;
  height: 14px;
  flex-shrink: 0;
}
.bp-agent-contact-btn::after {
  content: attr(data-tip);
  position: absolute;
  bottom: calc(100% + 6px);
  left: 50%;
  transform: translateX(-50%) translateY(2px);
  padding: 4px 8px;
  border-radius: 6px;
  background: var(--surface-strong, #1b2130);
  color: var(--text, #fff);
  font-size: 11px;
  font-weight: 500;
  line-height: 1.2;
  white-space: nowrap;
  pointer-events: none;
  opacity: 0;
  transition: opacity 0.12s ease, transform 0.12s ease;
  z-index: 20;
  box-shadow: 0 4px 14px rgba(0, 0, 0, 0.3);
}
.bp-agent-contact-btn.is-copied::after {
  opacity: 1;
  transform: translateX(-50%) translateY(0);
}
@media (hover: hover) {
  .bp-agent-contact-btn:hover::after {
    opacity: 1;
    transform: translateX(-50%) translateY(0);
  }
}

/* ---------- Mobile always-present agent dock ---------- */
/* Only emitted in the DOM on mobile (≤639px), but gate the styles defensively too. */
.bp-dock,
.bp-dock-scrim {
  display: none;
}
@media (max-width: 639px) {
  .bp-dock-scrim {
    display: block;
    position: fixed;
    inset: 0;
    z-index: 90;
    background: rgba(4, 7, 10, 0.5);
    opacity: 0;
    pointer-events: none;
    transition: opacity 0.32s ease;
  }
  .bp-dock.is-open ~ .bp-dock-scrim,
  .bp-dock-scrim.is-visible {
    opacity: 1;
    pointer-events: auto;
  }
  /* Scrim sits before the dock in source order, so target it directly when open. */
  .bp-dock.is-open + .bp-dock-scrim {
    opacity: 1;
    pointer-events: auto;
  }

  .bp-dock {
    display: block;
    position: fixed;
    left: 12px;
    right: 12px;
    bottom: calc(12px + env(safe-area-inset-bottom, 0px));
    z-index: 95;
    border: 1px solid var(--dock-line);
    border-radius: 20px;
    background: var(--dock-glass);
    -webkit-backdrop-filter: blur(28px) saturate(150%);
    backdrop-filter: blur(28px) saturate(150%);
    box-shadow:
      0 -2px 40px -8px rgba(0, 0, 0, 0.45),
      0 20px 50px -12px rgba(0, 0, 0, 0.55),
      inset 0 1px 0 var(--dock-hi);
    padding: 6px 14px 14px;
    transition: background 0.32s ease;
  }
  .bp-dock.is-open {
    background: var(--dock-glass-strong);
  }
  @supports not ((backdrop-filter: blur(1px)) or (-webkit-backdrop-filter: blur(1px))) {
    .bp-dock,
    .bp-dock.is-open {
      background: var(--dock-glass-solid);
    }
  }

  .bp-dock-grabber {
    width: 38px;
    height: 4px;
    border-radius: 4px;
    background: color-mix(in srgb, var(--text) 22%, transparent);
    margin: 2px auto 10px;
  }

  .bp-dock-head {
    display: flex;
    align-items: center;
    gap: 12px;
    cursor: pointer;
    -webkit-tap-highlight-color: transparent;
  }
  .bp-dock-head:focus-visible {
    outline: 2px solid var(--accent);
    outline-offset: 3px;
    border-radius: 12px;
  }
  .bp-dock-avatar {
    position: relative;
    width: 44px;
    height: 44px;
    border-radius: 12px;
    flex: none;
    background: linear-gradient(135deg, var(--accent), #8b5cf6);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 15px;
    font-weight: 600;
    color: #fff;
    /* No overflow:hidden here — it would clip the status dot. The photo is rounded on its own. */
    box-shadow: 0 0 0 2px color-mix(in srgb, var(--accent) 55%, transparent);
  }
  .bp-dock-avatar .bp-agent-avatar-img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    border-radius: inherit;
  }
  .bp-dock-status {
    position: absolute;
    right: -2px;
    bottom: -2px;
    width: 12px;
    height: 12px;
    border-radius: 50%;
    background: var(--success);
    border: 2.5px solid var(--dock-glass-solid);
  }
  .bp-dock-who {
    flex: 1;
    min-width: 0;
  }
  .bp-dock-name {
    font-size: 15.5px;
    font-weight: 600;
    letter-spacing: -0.01em;
    line-height: 1.1;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    color: var(--text);
  }
  .bp-dock-role {
    font-size: 12px;
    color: var(--text-muted);
    margin-top: 3px;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
  }
  .bp-dock-qa {
    display: flex;
    align-items: center;
    gap: 8px;
  }
  .bp-dock-iconbtn {
    width: 40px;
    height: 40px;
    flex: none;
    border-radius: 12px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: color-mix(in srgb, var(--text) 6%, transparent);
    border: 1px solid var(--dock-line);
    color: var(--text);
    transition: background 0.15s ease, transform 0.1s ease;
  }
  .bp-dock-iconbtn:active {
    transform: scale(0.94);
  }
  .bp-dock-iconbtn svg {
    width: 17px;
    height: 17px;
  }
  .bp-dock-chev {
    width: 28px;
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--text-muted);
    flex: none;
  }
  .bp-dock-chev svg {
    width: 18px;
    height: 18px;
    transition: transform 0.32s ease;
  }
  .bp-dock.is-open .bp-dock-chev svg {
    transform: rotate(180deg);
  }

  /* Expando */
  .bp-dock-expando {
    max-height: 0;
    overflow: hidden;
    opacity: 0;
    transition: max-height 0.36s cubic-bezier(0.4, 0, 0.2, 1), opacity 0.28s ease,
      margin-top 0.36s ease;
  }
  .bp-dock.is-open .bp-dock-expando {
    max-height: 460px;
    opacity: 1;
    margin-top: 14px;
    overflow-y: auto;
  }
  .bp-dock-note {
    font-size: 12.5px;
    line-height: 1.5;
    color: var(--text-muted);
    background: color-mix(in srgb, var(--text) 4%, transparent);
    border: 1px solid var(--border);
    border-radius: 12px;
    padding: 11px 13px;
    margin-bottom: 14px;
  }
  .bp-dock-note b {
    color: var(--text);
    font-weight: 600;
  }
  .bp-dock-actions {
    display: flex;
    flex-direction: column;
    gap: 10px;
  }
  /* The CTA reuses renderCtaButton's .bp-btn base; give it a full-width dock treatment.
     renderCtaButton passes dock variant classes (not bp-btn-primary), so set the fills here. */
  .bp-dock-cta.bp-btn {
    width: 100%;
    justify-content: center;
    padding: 14px;
    font-size: 14.5px;
    border-radius: 14px;
    text-decoration: none;
  }
  .bp-dock-cta--primary.bp-btn {
    background: var(--accent);
    color: #fff;
  }
  .bp-dock-cta--secondary.bp-btn {
    background: color-mix(in srgb, var(--text) 6%, transparent);
    color: var(--text);
    border: 1px solid var(--dock-line);
  }
  .bp-dock-divider {
    height: 1px;
    background: var(--border);
    margin: 16px 0 12px;
  }
  .bp-dock-team-lbl {
    font-size: 9.5px;
    letter-spacing: 0.14em;
    color: var(--text-dim);
    font-weight: 600;
    text-transform: uppercase;
    margin-bottom: 10px;
  }
  .bp-dock-teammate {
    display: flex;
    align-items: center;
    gap: 11px;
    margin-top: 10px;
  }
  .bp-dock-teammate:first-of-type {
    margin-top: 0;
  }
  .bp-dock-avatar-sm {
    width: 36px;
    height: 36px;
    border-radius: 10px;
    flex: none;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 12px;
    font-weight: 600;
    color: var(--text-muted);
    background: color-mix(in srgb, var(--text) 8%, transparent);
    box-shadow: 0 0 0 1px var(--border);
    overflow: hidden;
  }
  .bp-dock-avatar-sm .bp-agent-avatar-img {
    width: 100%;
    height: 100%;
    object-fit: cover;
  }
  .bp-dock-teammate-copy {
    flex: 1;
    min-width: 0;
  }
  .bp-dock-teammate-name {
    font-size: 13.5px;
    font-weight: 500;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    color: var(--text);
  }
  .bp-dock-teammate-role {
    font-size: 11px;
    color: var(--text-dim);
    margin-top: 1px;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
  }
  .bp-dock-mini-actions {
    display: flex;
    gap: 7px;
    flex: none;
  }
  .bp-dock-mini-btn {
    width: 34px;
    height: 34px;
    border-radius: 10px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: color-mix(in srgb, var(--text) 5%, transparent);
    border: 1px solid var(--border);
    color: var(--text-muted);
    transition: background 0.15s ease;
  }
  .bp-dock-mini-btn:active {
    background: color-mix(in srgb, var(--text) 12%, transparent);
  }
  .bp-dock-mini-btn svg {
    width: 14px;
    height: 14px;
  }
}
.bp-agent-agency {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-size: 11px;
  color: var(--text-dim);
  font-weight: 500;
}
.bp-agency-mark {
  width: 14px;
  height: 14px;
  background: var(--text);
  border-radius: 3px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 9px;
  font-weight: 700;
  color: var(--bg);
}

.bp-agent-actions {
  padding: 20px 24px;
  display: flex;
  flex-direction: column;
  gap: 10px;
}
.bp-btn {
  width: 100%;
  padding: 14px 20px;
  border-radius: 10px;
  font-size: 14px;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.2s;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  border: none;
  font-family: inherit;
}
.bp-btn-primary {
  background: var(--accent);
  color: #fff;
}
.bp-btn-primary:hover {
  background: color-mix(in srgb, var(--accent) 82%, white);
}
[data-theme="light"] .bp-btn-primary:hover {
  background: color-mix(in srgb, var(--accent) 88%, white);
}
.bp-btn-secondary {
  background: var(--surface-3);
  color: var(--text);
  border: 1px solid var(--border-2);
}
.bp-btn-secondary:hover { background: var(--surface-2); }
/* Subdued secondary CTA slot — mirrors the calm surface/border palette of .bp-doc-card. */
.bp-btn-cta-secondary {
  background: var(--surface);
  color: var(--text);
  border: 1px solid var(--border);
}
.bp-btn-cta-secondary:hover {
  background: var(--surface-3);
  border-color: var(--border-2);
}
.bp-btn svg { width: 16px; height: 16px; }

.bp-partners-card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 16px;
  overflow: hidden;
  padding-bottom: 10px;
}
.bp-partners-card-header {
  padding: 22px 24px 18px;
}
.bp-partners-card-title {
  font-size: 11px;
  text-transform: uppercase;
  letter-spacing: 0.12em;
  color: var(--text-dim);
  font-weight: 600;
  margin-bottom: 16px;
}
.bp-partners-card-sub {
  font-size: 11px;
  text-transform: uppercase;
  letter-spacing: 0.12em;
  color: var(--text-dim);
  font-weight: 600;
}

.bp-partner-row {
  display: flex;
  align-items: flex-start;
  gap: 14px;
  padding: 14px 24px;
  cursor: pointer;
  transition: background 0.15s;
  border-bottom: 1px solid var(--border);
  text-decoration: none;
  color: inherit;
}
.bp-partner-row:last-child { border-bottom: none; }
.bp-partner-row:hover { background: var(--surface-2); }

.bp-partner-row--static {
  cursor: default;
}
.bp-partner-row--static:hover {
  background: transparent;
}

.bp-partner-row-logo {
  width: 44px;
  height: 44px;
  border-radius: 8px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 12px;
  font-weight: 700;
  letter-spacing: -0.01em;
  flex-shrink: 0;
}
.bp-partner-row-logo.light { background: #fff; color: #1a1d24; }
.bp-partner-row-logo.dark {
  background: var(--surface-3);
  color: var(--text);
  border: 1px solid var(--border-2);
}
.bp-partner-row-logo img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  border-radius: 8px;
  display: block;
}
/* The listing-agency variant of a partner pill: the org logo is treated as a brand mark
   and may include transparency, so contain (don't crop) and use a transparent surface. */
.bp-partner-row-logo--agency,
.bp-partner-row-logo--agency.light,
.bp-partner-row-logo--agency.dark {
  background: transparent;
  border: 1px solid var(--border-2);
  padding: 4px;
}
.bp-partner-row-logo--agency img {
  object-fit: contain;
  border-radius: 4px;
}
.bp-partner-row-info { flex: 1; min-width: 0; }
.bp-partner-row-role {
  font-size: 10px;
  text-transform: uppercase;
  letter-spacing: 0.12em;
  color: var(--text-dim);
  font-weight: 600;
  margin-bottom: 2px;
}
.bp-partner-row-name { font-size: 14px; font-weight: 600; letter-spacing: -0.01em; }
.bp-partner-row-link {
  color: var(--text-dim);
  flex-shrink: 0;
  align-self: flex-start;
  margin-left: auto;
  line-height: 0;
}
.bp-partner-row:hover .bp-partner-row-link { color: var(--accent); }

.bp-partners-inline-wrap {
  display: none;
}
.bp-partners-inline-shell {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 16px;
  padding: 28px;
}
.bp-partners-inline-head {
  margin-bottom: 16px;
}
.bp-partners-inline-title {
  font-size: 11px;
  text-transform: uppercase;
  letter-spacing: 0.12em;
  color: var(--text-dim);
  font-weight: 600;
  margin-bottom: 10px;
}
.bp-partners-inline-sub {
  font-size: 11px;
  text-transform: uppercase;
  letter-spacing: 0.12em;
  color: var(--text-dim);
  font-weight: 600;
}
.bp-partners-inline-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 12px;
}
.bp-partner-tile {
  position: relative;
  display: grid;
  grid-template-columns: auto 1fr;
  grid-template-areas:
    "head role"
    "head name";
  column-gap: 12px;
  row-gap: 2px;
  align-items: center;
  background: var(--surface-2);
  border: 1px solid var(--border);
  border-radius: 12px;
  padding: 14px;
  text-decoration: none;
  color: inherit;
  transition: background 0.15s, border-color 0.15s;
}
.bp-partner-tile:hover {
  background: var(--surface-3);
  border-color: var(--border-2);
}
.bp-partner-tile--static {
  cursor: default;
}
.bp-partner-tile--static:hover {
  background: var(--surface-2);
  border-color: var(--border);
}
.bp-partner-tile--has-link .bp-partner-row-role,
.bp-partner-tile--has-link .bp-partner-row-name {
  padding-right: 26px;
}
.bp-partner-tile-head {
  grid-area: head;
  display: flex;
  align-items: center;
  justify-content: flex-start;
  gap: 10px;
  margin-bottom: 0;
}
.bp-partner-tile .bp-partner-row-link {
  position: absolute;
  top: 14px;
  right: 14px;
  line-height: 0;
}
.bp-partner-tile .bp-partner-row-logo {
  width: 38px;
  height: 38px;
}
.bp-partner-tile .bp-partner-row-role {
  grid-area: role;
  margin-bottom: 0;
}
.bp-partner-tile .bp-partner-row-name {
  grid-area: name;
}

@media (max-width: 1299px) {
  .bp-partners-inline-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

@media (min-width: 1100px) {
  html.bp-sidebar-overflow-partners .bp-sidebar-col .bp-partners-card {
    display: none;
  }
  html.bp-sidebar-overflow-partners .bp-partners-inline-wrap {
    display: block;
    margin-bottom: 32px;
  }
}

.bp-nudge-card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 16px;
  padding: 22px 24px;
}
.bp-nudge-title {
  font-size: 13px;
  font-weight: 600;
  margin-bottom: 14px;
  display: flex;
  align-items: center;
  gap: 8px;
}
.bp-nudge-list { list-style: none; display: flex; flex-direction: column; gap: 10px; }
.bp-nudge-item {
  display: flex;
  align-items: center;
  gap: 10px;
  font-size: 12px;
  color: var(--text-muted);
}
.bp-nudge-check {
  width: 18px;
  height: 18px;
  border-radius: 50%;
  border: 1.5px solid var(--border-2);
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  font-size: 10px;
}
.bp-nudge-item.is-done .bp-nudge-check {
  background: var(--success);
  border-color: var(--success);
  color: #fff;
}
.bp-nudge-item.is-done {
  color: var(--text);
  text-decoration: line-through;
  text-decoration-color: var(--text-dim);
}

/* ---------- Footer ---------- */
.bp-footer {
  padding: 32px var(--bp-inline-gutter);
  border-top: 1px solid var(--border);
  display: grid;
  grid-template-columns: 1fr auto 1fr;
  align-items: center;
  gap: 16px;
  font-size: 11px;
  color: var(--text-dim);
}
.bp-footer-left {
  grid-column: 2;
  justify-self: center;
  display: flex;
  align-items: center;
  gap: 10px;
  flex-wrap: wrap;
}
.bp-footer-product {
  color: inherit;
  letter-spacing: 0.02em;
}
.bp-footer-meta {
  grid-column: 3;
  grid-row: 1;
  justify-self: end;
  display: flex;
  flex-direction: column;
  align-items: flex-end;
  gap: 6px;
  text-align: right;
  max-width: min(100%, 420px);
}
.bp-footer-note {
  display: block;
}
.bp-footer-privacy {
  color: inherit;
  font-size: inherit;
  text-underline-offset: 2px;
}
.bp-footer-privacy:hover {
  color: var(--text-muted);
}

/* ---------- Email agent modal ---------- */
.is-hidden { display: none !important; }

.bp-modal-backdrop {
  position: fixed;
  inset: 0;
  z-index: 1000;
  background: rgba(15, 23, 42, 0.55);
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 24px 16px;
  -webkit-backdrop-filter: blur(4px);
  backdrop-filter: blur(4px);
}
.bp-modal-backdrop.is-hidden {
  display: none;
}
.bp-modal-panel {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 16px;
  max-width: 440px;
  width: 100%;
  max-height: min(90vh, 640px);
  overflow: auto;
  box-shadow: 0 25px 50px -12px rgba(0, 0, 0, 0.25);
  box-sizing: border-box;
  padding: 24px;
}
.bp-modal-panel--split:has(#bp-email-form-view:not(.is-hidden)),
.bp-modal-panel--split:has(#bp-call-form-view:not(.is-hidden)) {
  max-width: min(720px, 100%);
}
.bp-modal-form-grid {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 1.14fr);
  gap: 20px 28px;
  align-items: start;
  margin-bottom: 0;
}
.bp-modal-form-col--main {
  min-width: 0;
}
.bp-modal-form-col--main .bp-email-reasons {
  margin-bottom: 0;
}
.bp-modal-form-col--message {
  display: flex;
  flex-direction: column;
  min-width: 0;
  align-self: stretch;
}
.bp-modal-form-col--message .bp-modal-label {
  margin-top: 0;
}
.bp-modal-form-col--message .bp-email-textarea {
  flex: 1 1 auto;
  min-height: 200px;
  margin-bottom: 0;
}
.bp-modal-lead--flush {
  margin-top: 0;
}
.bp-call-phone--split {
  margin-bottom: 0;
}
.bp-modal-header {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 20px;
}
.bp-modal-title {
  font-size: 18px;
  font-weight: 600;
  margin: 0;
  letter-spacing: -0.02em;
  line-height: 1.3;
  color: var(--text);
}
.bp-modal-close {
  flex-shrink: 0;
  width: 36px;
  height: 36px;
  border: none;
  border-radius: 8px;
  background: var(--surface-3);
  color: var(--text-muted);
  font-size: 22px;
  line-height: 1;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  font-family: inherit;
  margin: 0;
}
.bp-modal-close:hover {
  background: var(--surface-2);
  color: var(--text);
}
.bp-modal-lead {
  font-size: 14px;
  color: var(--text-muted);
  margin: 0 0 14px;
  line-height: 1.45;
}
.bp-modal-lead--tight {
  margin-bottom: 10px;
  margin-top: 4px;
}
.bp-call-phone {
  width: 100%;
  box-sizing: border-box;
  padding: 12px 14px;
  border-radius: 10px;
  border: 1px solid var(--border-2);
  background: var(--bg);
  color: var(--text);
  font-size: 14px;
  line-height: 1.4;
  font-family: inherit;
  margin-bottom: 14px;
}
.bp-call-phone:focus {
  outline: 2px solid color-mix(in srgb, var(--accent) 40%, transparent);
  outline-offset: 0;
  border-color: var(--accent);
}
.bp-email-reasons {
  display: flex;
  flex-direction: column;
  gap: 8px;
  margin-bottom: 16px;
}
.bp-radio-row {
  display: flex;
  align-items: center;
  gap: 10px;
  font-size: 14px;
  color: var(--text);
  cursor: pointer;
  line-height: 1.3;
}
.bp-radio-row input {
  width: 16px;
  height: 16px;
  accent-color: var(--accent);
  flex-shrink: 0;
}
.bp-modal-label {
  display: block;
  font-size: 12px;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  color: var(--text-dim);
  margin-bottom: 8px;
}
.bp-email-textarea {
  width: 100%;
  box-sizing: border-box;
  padding: 12px 14px;
  border-radius: 10px;
  border: 1px solid var(--border-2);
  background: var(--bg);
  color: var(--text);
  font-size: 14px;
  line-height: 1.5;
  font-family: inherit;
  resize: vertical;
  min-height: 120px;
  margin-bottom: 8px;
}
.bp-email-textarea:focus {
  outline: 2px solid color-mix(in srgb, var(--accent) 40%, transparent);
  outline-offset: 0;
  border-color: var(--accent);
}
.bp-email-error {
  font-size: 13px;
  color: #ef4444;
  margin: 12px 0 0;
}
.bp-modal-actions {
  display: flex;
  gap: 10px;
  margin-top: 20px;
}
.bp-modal-actions .bp-btn {
  flex: 1;
}

/* ---------- One-tap request sent tick ---------- */
.bp-request-sent {
  position: fixed;
  inset: 0;
  z-index: 9999;
  display: grid;
  place-items: center;
  pointer-events: none;
  background: rgba(2, 6, 23, 0.35);
  -webkit-backdrop-filter: blur(6px);
  backdrop-filter: blur(6px);
  animation: bpRequestSentBackdropIn 220ms ease-out both;
}

.bp-request-sent.is-out {
  animation: bpRequestSentBackdropOut 320ms ease-in both;
}

.bp-request-sent-card {
  display: grid;
  place-items: center;
  gap: 10px;
  padding: 22px 22px 18px;
  min-width: 240px;
  border-radius: 18px;
  border: 1px solid rgba(255, 255, 255, 0.14);
  background: rgba(15, 23, 42, 0.88);
  box-shadow: 0 24px 70px rgba(0, 0, 0, 0.45);
  color: #fff;
  transform-origin: center;
  animation: bpRequestSentPop 620ms cubic-bezier(0.2, 0.9, 0.2, 1) both;
}

[data-theme='light'] .bp-request-sent-card {
  background: rgba(255, 255, 255, 0.92);
  color: #0f172a;
  border-color: rgba(15, 23, 42, 0.14);
}

.bp-request-sent-icon {
  width: 82px;
  height: 82px;
  border-radius: 999px;
  display: grid;
  place-items: center;
  background: radial-gradient(closest-side, rgba(16, 185, 129, 0.25), rgba(16, 185, 129, 0.05));
  border: 1px solid rgba(16, 185, 129, 0.35);
  box-shadow: 0 16px 40px rgba(16, 185, 129, 0.18);
}

.bp-request-sent-icon svg {
  width: 44px;
  height: 44px;
  color: var(--success);
  stroke-dasharray: 40;
  stroke-dashoffset: 40;
  animation: bpRequestSentDraw 520ms ease-out 70ms both;
}

.bp-request-sent-text {
  font-weight: 800;
  letter-spacing: -0.02em;
  font-size: 18px;
}

@keyframes bpRequestSentBackdropIn {
  from { opacity: 0; }
  to { opacity: 1; }
}

@keyframes bpRequestSentBackdropOut {
  from { opacity: 1; }
  to { opacity: 0; }
}

@keyframes bpRequestSentPop {
  0% { transform: translateY(10px) scale(0.92); opacity: 0; }
  55% { transform: translateY(0) scale(1.02); opacity: 1; }
  100% { transform: translateY(0) scale(1); opacity: 1; }
}

@keyframes bpRequestSentDraw {
  from { stroke-dashoffset: 40; }
  to { stroke-dashoffset: 0; }
}

/* ---------- Initial loading ---------- */
.bp-loading-screen {
  min-height: 100vh;
  min-height: 100dvh;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 24px;
  background:
    radial-gradient(ellipse 85% 55% at 50% 42%, color-mix(in srgb, var(--accent) 16%, transparent), transparent 72%),
    linear-gradient(180deg, var(--surface) 0%, var(--bg) 45%, var(--bg) 100%);
}

.bp-loading-dots {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
}

.bp-loading-dot {
  width: 10px;
  height: 10px;
  border-radius: 50%;
  background: var(--accent);
  box-shadow: 0 0 12px color-mix(in srgb, var(--accent) 45%, transparent);
  animation: bp-loading-dot-pulse 1.05s ease-in-out infinite;
}

.bp-loading-dot:nth-child(1) {
  animation-delay: 0ms;
}

.bp-loading-dot:nth-child(2) {
  animation-delay: 150ms;
}

.bp-loading-dot:nth-child(3) {
  animation-delay: 300ms;
}

@keyframes bp-loading-dot-pulse {
  0%,
  100% {
    transform: scale(0.55);
    opacity: 0.35;
  }
  50% {
    transform: scale(1);
    opacity: 1;
  }
}

@media (prefers-reduced-motion: reduce) {
  .bp-loading-dot {
    animation: none;
    opacity: 0.85;
  }
}

.bp-root-inner {
  display: contents;
}

/* ---------- Login ---------- */
.bp-login {
  position: relative;
  min-height: 100vh;
  min-height: 100dvh;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 32px 20px;
  background: var(--bg);
  transition: background-color 0.6s ease, color 0.6s ease;
}

/* The accent radial + surface→bg linear gradient lives on a pseudo-element so it can fade in
   independently once colour preferences (and the matching accent) have resolved. */
.bp-login::before {
  content: '';
  position: absolute;
  inset: 0;
  pointer-events: none;
  z-index: 0;
  opacity: 0;
  transition: opacity 0.6s ease;
  background:
    radial-gradient(ellipse 85% 55% at 50% 38%, color-mix(in srgb, var(--accent) 18%, transparent), transparent 72%),
    linear-gradient(180deg, var(--surface) 0%, var(--bg) 45%, var(--bg) 100%);
}
.bp-login.is-branded::before {
  opacity: 1;
}

.bp-login-card {
  position: relative;
  z-index: 1;
  width: 100%;
  max-width: 420px;
  background: color-mix(in srgb, var(--surface) 88%, transparent);
  border: 1px solid var(--border);
  border-radius: 22px;
  padding: 44px 40px 36px;
  box-shadow:
    0 1px 0 rgba(255, 255, 255, 0.04) inset,
    0 24px 60px rgba(0, 0, 0, 0.32),
    0 4px 14px rgba(0, 0, 0, 0.18);
  backdrop-filter: blur(14px);
  opacity: 0;
  transform: translateY(8px);
  transition:
    opacity 0.5s ease,
    transform 0.5s ease,
    background-color 0.6s ease,
    border-color 0.6s ease,
    box-shadow 0.6s ease,
    color 0.6s ease;
}
.bp-login-card.is-ready {
  opacity: 1;
  transform: none;
}
@media (prefers-reduced-motion: reduce) {
  .bp-login-card {
    transition: opacity 0.2s ease, background-color 0.2s ease, color 0.2s ease;
    transform: none;
  }
  .bp-login::before { transition: opacity 0.2s ease; }
  .bp-login { transition: background-color 0.2s ease, color 0.2s ease; }
}

html[data-theme="light"] .bp-login-card {
  background: rgba(255, 255, 255, 0.92);
  box-shadow:
    0 1px 0 rgba(255, 255, 255, 0.75) inset,
    0 18px 44px rgba(26, 29, 36, 0.10),
    0 4px 10px rgba(26, 29, 36, 0.06);
}

.bp-login-brand {
  display: flex;
  align-items: center;
  justify-content: flex-start;
  gap: 10px;
  margin: 0 0 32px;
  min-height: 44px;
  text-align: left;
}
.bp-login-brand:empty { display: none; }

.bp-login-brand--has-logo {
  justify-content: center;
  margin-bottom: 36px;
}

.bp-login-brand-logo {
  display: block;
  max-height: 60px;
  max-width: min(240px, 100%);
  width: auto;
  height: auto;
  object-fit: contain;
  margin: 0 auto;
}

.bp-login-brand-mark {
  width: 36px;
  height: 36px;
  border-radius: 10px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-weight: 700;
  font-size: 16px;
  letter-spacing: -0.02em;
  color: #fff;
  background:
    radial-gradient(circle at 30% 25%, color-mix(in srgb, var(--accent) 90%, white) 0%, var(--accent) 70%),
    var(--accent);
  box-shadow:
    0 1px 0 rgba(255, 255, 255, 0.18) inset,
    0 8px 22px color-mix(in srgb, var(--accent) 38%, transparent);
}

.bp-login-brand-name {
  font-size: 15px;
  font-weight: 600;
  letter-spacing: -0.01em;
  color: var(--text);
}

.bp-login-step { display: none; }
.bp-login-step.is-active { display: block; }

.bp-login-footer {
  margin-top: 28px;
  padding-top: 20px;
  border-top: 1px solid var(--border);
  text-align: center;
}
.bp-login-footer-link {
  font-size: 12px;
  color: var(--text-muted);
  text-decoration: none;
  transition: color 0.15s ease;
}
.bp-login-footer-link:hover {
  color: var(--text);
  text-decoration: underline;
  text-underline-offset: 2px;
}

.bp-login-title {
  font-size: clamp(24px, 4vw, 30px);
  line-height: 1.15;
  font-weight: 600;
  letter-spacing: -0.02em;
  color: var(--text);
  margin-bottom: 10px;
  text-align: left;
}
.bp-login-title em {
  font-style: normal;
  font-weight: 300;
  color: var(--text-muted);
}

.bp-login-sub {
  font-size: 14.5px;
  line-height: 1.55;
  color: var(--text-muted);
  margin: 0 0 28px;
  max-width: 38ch;
  text-align: left;
}

.bp-login-methods {
  display: flex;
  flex-direction: column;
  gap: 12px;
  margin-bottom: 4px;
}

.bp-login-method {
  display: flex;
  align-items: center;
  gap: 14px;
  width: 100%;
  padding: 16px 18px;
  border-radius: 14px;
  border: 1px solid var(--border);
  background: var(--surface-2);
  color: var(--text);
  text-align: left;
  font-family: inherit;
  font-size: 14px;
  cursor: pointer;
  transition: border-color 0.3s ease, background-color 0.5s ease, transform 0.12s ease, color 0.5s ease;
}
.bp-login-method:hover {
  border-color: color-mix(in srgb, var(--accent) 40%, var(--border-2));
  background: var(--surface-3);
}
.bp-login-method:active { transform: translateY(1px); }
.bp-login-method:focus-visible {
  outline: none;
  border-color: var(--accent);
  box-shadow: 0 0 0 3px color-mix(in srgb, var(--accent) 22%, transparent);
}

.bp-login-method-icon {
  width: 40px;
  height: 40px;
  border-radius: 10px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  background: var(--accent-soft);
  color: var(--accent);
  flex-shrink: 0;
}
.bp-login-method-icon svg { width: 20px; height: 20px; }

.bp-login-method-body { flex: 1; min-width: 0; }
.bp-login-method-label {
  font-size: 14px;
  font-weight: 600;
  color: var(--text);
  margin-bottom: 2px;
}
.bp-login-method-hint {
  font-size: 12.5px;
  color: var(--text-muted);
  line-height: 1.4;
}

.bp-login-method-chevron {
  color: var(--text-dim);
  flex-shrink: 0;
}
.bp-login-method-chevron svg { width: 16px; height: 16px; }

.bp-login-method-badge {
  font-size: 10.5px;
  font-weight: 600;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  color: var(--text-muted);
  background: var(--surface-3);
  border: 1px solid var(--border);
  padding: 3px 8px;
  border-radius: 999px;
  flex-shrink: 0;
}

.bp-login-back {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  background: none;
  border: 0;
  padding: 0;
  margin-bottom: 22px;
  font: inherit;
  font-size: 13px;
  font-weight: 500;
  color: var(--text-muted);
  cursor: pointer;
  transition: color 0.15s ease;
}
.bp-login-back:hover { color: var(--text); }
.bp-login-back:focus-visible {
  outline: none;
  color: var(--text);
  text-decoration: underline;
}
.bp-login-back svg { width: 14px; height: 14px; }

.bp-login-field { display: block; }
.bp-login-label {
  display: block;
  font-size: 12.5px;
  font-weight: 600;
  letter-spacing: 0.02em;
  color: var(--text-muted);
  margin-bottom: 16px;
  text-transform: uppercase;
}

.bp-login-input {
  width: 100%;
  box-sizing: border-box;
  padding: 13px 14px;
  border-radius: 12px;
  border: 1px solid var(--border-2);
  background: var(--surface);
  color: var(--text);
  font-family: inherit;
  font-size: 15px;
  line-height: 1.3;
  transition: border-color 0.2s ease, box-shadow 0.2s ease, background-color 0.5s ease, color 0.5s ease;
  -webkit-appearance: none;
  appearance: none;
}
.bp-login-input::placeholder { color: var(--text-dim); }
.bp-login-input:hover { border-color: color-mix(in srgb, var(--accent) 25%, var(--border-2)); }
.bp-login-input:focus {
  outline: none;
  border-color: var(--accent);
  box-shadow: 0 0 0 3px color-mix(in srgb, var(--accent) 18%, transparent);
}
.bp-login-input--code {
  letter-spacing: 0.4em;
  font-variant-numeric: tabular-nums;
  text-align: center;
  font-size: 20px;
  font-weight: 600;
}

.bp-login-msg {
  margin: 0;
  font-size: 13px;
  line-height: 1.4;
  color: var(--text-muted);
}
/* The message inserts vertical spacing between the input and the submit button only
   when it actually has content (typically an error). When empty it collapses entirely. */
.bp-login-msg:not(:empty) {
  margin: 14px 0 0;
}
.bp-login-msg.is-error { color: var(--danger, #ef4444); }
.bp-login-msg.is-success { color: var(--success); }

.bp-login-actions {
  margin-top: 16px;
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.bp-login-secondary {
  width: 100%;
  padding: 11px 18px;
  border-radius: 12px;
  border: 1px solid var(--border, rgba(255, 255, 255, 0.14));
  background: transparent;
  color: var(--text-muted, #9aa7b4);
  font-family: inherit;
  font-size: 13px;
  font-weight: 500;
  cursor: pointer;
  transition: color 0.2s ease, border-color 0.2s ease, background-color 0.2s ease;
  min-height: 42px;
}
.bp-login-secondary:hover {
  color: var(--text, #fff);
  border-color: color-mix(in srgb, var(--accent) 50%, transparent);
}
.bp-login-secondary:disabled {
  opacity: 0.6;
  cursor: not-allowed;
}

.bp-login-submit {
  width: 100%;
  padding: 13px 18px;
  border-radius: 12px;
  border: 0;
  background: var(--accent);
  color: #fff;
  font-family: inherit;
  font-size: 14px;
  font-weight: 600;
  letter-spacing: 0.01em;
  cursor: pointer;
  transition: background-color 0.5s ease, transform 0.12s ease, box-shadow 0.5s ease;
  box-shadow: 0 6px 18px color-mix(in srgb, var(--accent) 28%, transparent);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  min-height: 46px;
}
.bp-login-submit:hover {
  background: color-mix(in srgb, var(--accent) 82%, white);
  box-shadow: 0 8px 22px color-mix(in srgb, var(--accent) 36%, transparent);
}
[data-theme="light"] .bp-login-submit:hover {
  background: color-mix(in srgb, var(--accent) 88%, white);
}
.bp-login-submit:active { transform: translateY(1px); }
.bp-login-submit:focus-visible {
  outline: none;
  box-shadow:
    0 0 0 3px color-mix(in srgb, var(--accent) 28%, transparent),
    0 6px 18px color-mix(in srgb, var(--accent) 28%, transparent);
}
.bp-login-submit:disabled:not(.is-loading) {
  opacity: 0.65;
  cursor: not-allowed;
  box-shadow: none;
}
.bp-login-submit.is-loading {
  cursor: wait;
  /* Keep the loading-state background steady — don't fall back to the disabled-tint. */
  opacity: 1;
}
.bp-login-submit.is-loading:hover {
  /* Disable hover lift while loading so the spinner stays still. */
  background: var(--accent);
  box-shadow: 0 6px 18px color-mix(in srgb, var(--accent) 28%, transparent);
}

.bp-login-submit-spinner {
  display: none;
  width: 16px;
  height: 16px;
  flex-shrink: 0;
  border-radius: 50%;
  border: 2px solid rgba(255, 255, 255, 0.35);
  border-top-color: #fff;
  animation: bp-login-spinner-rotate 0.7s linear infinite;
}
.bp-login-submit.is-loading .bp-login-submit-spinner {
  display: inline-block;
}

@keyframes bp-login-spinner-rotate {
  to { transform: rotate(360deg); }
}

@media (prefers-reduced-motion: reduce) {
  .bp-login-submit-spinner {
    animation-duration: 1.6s;
  }
}

@media (max-width: 480px) {
  .bp-login {
    padding: 24px 16px;
  }
  .bp-login-card {
    padding: 32px 24px 28px;
    border-radius: 18px;
  }
  .bp-login-method { padding: 14px; }
  .bp-login-method-icon { width: 36px; height: 36px; }
  .bp-login-title { font-size: 22px; }
}

.bp-loading-screen--overlay {
  position: fixed;
  inset: 0;
  z-index: 10000;
  min-height: 100dvh;
  transition: opacity 0.42s ease;
}

.bp-loading-screen--overlay.bp-loading-screen--fade-out {
  opacity: 0;
  pointer-events: none;
}

@media (prefers-reduced-motion: reduce) {
  .bp-loading-screen--overlay {
    transition-duration: 0.06s;
  }
}

/* ---------- Error ---------- */
.portal-error-screen {
  min-height: 60vh;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 48px var(--bp-inline-gutter);
  text-align: center;
  color: var(--text-muted);
  box-sizing: border-box;
  max-width: min(36rem, 100%);
  margin-inline: auto;
}
.portal-error-screen h1 { color: var(--text); font-size: 20px; margin-bottom: 8px; }

/* ---------- Large / ultra-wide (QHD, 4K) ---------- */
@media (min-width: 1920px) {
  :root {
    --bp-content-max: 1520px;
  }
}

@media (min-width: 2560px) {
  :root {
    --bp-content-max: 1600px;
  }
}

/* ---------- Mobile & narrow viewports ---------- */
@media (max-width: 639px) {
  .bp-top-bar {
    height: auto;
    min-height: 52px;
    padding: max(10px, env(safe-area-inset-top)) max(16px, env(safe-area-inset-right)) 10px max(16px, env(safe-area-inset-left));
    grid-template-columns: auto 1fr auto;
  }

  .bp-theme-toggle {
    width: 52px;
    height: 32px;
    min-height: 32px;
    padding: 2px;
    touch-action: manipulation;
  }

  /* Mobile condensed header replaces the hero */
  html:not([data-bp-mobile-hero="full"]) .bp-hero {
    display: none;
  }

  .bp-mobile-head {
    border-bottom: 1px solid var(--border);
    background: color-mix(in srgb, var(--surface) 74%, transparent);
  }

  html[data-bp-mobile-hero="full"] .bp-mobile-head {
    display: none;
  }

  /* Full hero on mobile: the thumbnail strip wraps and crowds the frame, so drop it —
     the slides auto-cycle (bindHero) and the dot counter still shows position. */
  html[data-bp-mobile-hero="full"] .bp-hero-thumbs {
    display: none;
  }

  .bp-mobile-welcome-row {
    padding: 12px max(16px, env(safe-area-inset-right)) 0 max(16px, env(safe-area-inset-left));
  }

  .bp-mobile-head-inner {
    padding: 12px max(16px, env(safe-area-inset-right)) 12px max(16px, env(safe-area-inset-left));
    display: flex;
    flex-direction: column;
    gap: 10px;
  }

  .bp-mobile-head .bp-welcome-tag {
    align-self: flex-start;
  }

  .bp-mobile-head .bp-hero-eyebrow {
    margin-bottom: 8px;
  }

  .bp-mobile-head .bp-hero-title {
    font-size: clamp(22px, 6.5vw, 30px);
    line-height: 1.05;
    margin-bottom: 6px;
    white-space: normal;
    overflow: visible;
    text-overflow: unset;
  }

  .bp-mobile-head .bp-hero-brand {
    flex-direction: column;
    align-items: flex-start;
    gap: 10px;
    margin-bottom: 10px;
  }

  /* In "logo + title" mode the desktop rule uses flex-basis:200px which becomes height in column layout */
  .bp-mobile-head .bp-hero-brand--both .bp-hero-title {
    flex: 0 0 auto;
    min-width: 0;
  }

  .bp-mobile-head .bp-hero-brand-sep {
    width: 100%;
    height: 1px;
    min-height: 0;
    align-self: stretch;
    opacity: 0.28;
  }

  .bp-mobile-head .bp-hero-logo {
    max-width: min(240px, 70vw);
    height: 36px;
  }

  .bp-mobile-head .bp-hero-meta {
    font-size: 12px;
    gap: 8px 12px;
    flex-wrap: wrap;
  }

  .bp-mobile-head .bp-hero-meta-item {
    flex: 1 1 calc(50% - 12px);
    min-width: min(180px, 100%);
  }

  .bp-mobile-head .bp-hero-meta-item:first-child {
    flex-basis: 100%;
  }

  .bp-mobile-head .bp-hero-meta-item svg {
    width: 14px;
    height: 14px;
  }

  /* Apartment header: unit number left, status+level right */
  .bp-apt-head {
    display: grid;
    grid-template-columns: auto 1fr;
    align-items: start;
    gap: 12px;
    margin-bottom: 18px;
  }

  .bp-apt-head .bp-apt-number {
    font-size: clamp(28px, 8vw, 40px);
    line-height: 1;
  }

  .bp-apt-head .bp-apt-status {
    margin-bottom: 0;
    justify-self: end;
  }

  .bp-apt-head-left {
    display: flex;
    flex-direction: column;
    align-items: flex-start;
    gap: 6px;
    min-width: 0;
  }

  .bp-main-layout {
    --bp-main-col-gap: 24px;
    gap: 24px;
    padding: var(--bp-main-col-gap) calc(max(16px, env(safe-area-inset-right)) * 0.7) max(48px, env(safe-area-inset-bottom)) calc(max(16px, env(safe-area-inset-left)) * 0.7);
  }

  /* Mobile: apartments section before sales/partners sidebar blocks */
  .bp-sidebar-col {
    order: 0;
  }

  .bp-section {
    margin-bottom: var(--bp-main-col-gap, 40px);
  }

  .bp-section-head {
    flex-direction: column;
    align-items: flex-start;
    gap: 12px;
    margin-bottom: 20px;
    padding-bottom: 16px;
  }

  .bp-apartment-floorplan {
    min-height: 240px;
  }

  .bp-fp-btn {
    width: 40px;
    height: 40px;
    touch-action: manipulation;
  }

  .bp-doc-dock {
    padding: 24px max(16px, env(safe-area-inset-right)) 28px max(16px, env(safe-area-inset-left));
  }

  .bp-doc-title-mobile-hide {
    display: none;
  }

  .bp-doc-dock-footer {
    margin-top: 20px;
    padding-top: 16px;
  }

  .bp-download-all-btn--header {
    display: none;
  }

  .bp-doc-dock-footer {
    justify-content: stretch;
  }

  .bp-download-all-btn {
    width: 100%;
    height: 44px;
    touch-action: manipulation;
  }

  .bp-doc-name {
    white-space: normal;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
  }

  .bp-doc-card {
    min-height: 44px;
    touch-action: manipulation;
  }

  .bp-video-play {
    width: 46px;
    height: 46px;
    touch-action: manipulation;
  }

  .bp-location-map {
    height: min(52vh, 380px);
    min-height: 220px;
  }

  .bp-map-toolbar {
    flex-direction: column;
    align-items: stretch;
    gap: 14px;
    padding: 14px 16px;
  }

  .bp-filter-chips {
    gap: 6px;
  }

  .bp-filter-chip {
    min-height: 36px;
    padding: 8px 12px;
    touch-action: manipulation;
  }

  .bp-radius-toggle {
    align-self: center;
  }

  .bp-footer {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 12px;
    flex-shrink: 0;
    padding: 24px max(16px, env(safe-area-inset-right)) max(24px, env(safe-area-inset-bottom))
      max(16px, env(safe-area-inset-left));
  }
  /* Extra bottom clearance only when the always-present floating dock is present (collapsed ≈ 92px). */
  .bp-root-inner:has(.bp-dock) .bp-footer {
    padding-bottom: calc(112px + env(safe-area-inset-bottom, 0px));
  }

  .bp-footer-left {
    grid-column: auto;
    justify-self: auto;
  }

  .bp-footer-meta {
    grid-column: auto;
    grid-row: auto;
    justify-self: auto;
    align-items: center;
    text-align: center;
    max-width: 100%;
  }

  .bp-modal-backdrop {
    align-items: flex-end;
    padding: 0;
    padding-bottom: env(safe-area-inset-bottom);
  }

  .bp-modal-panel {
    max-height: min(92dvh, 100%);
    border-radius: 16px 16px 0 0;
    padding-top: max(20px, env(safe-area-inset-top));
    padding-right: max(20px, env(safe-area-inset-right));
    padding-bottom: max(20px, env(safe-area-inset-bottom));
    padding-left: max(20px, env(safe-area-inset-left));
  }

  .bp-modal-form-grid {
    grid-template-columns: 1fr;
    gap: 16px;
  }
  .bp-modal-form-col--message .bp-email-textarea {
    min-height: 140px;
  }

  .bp-modal-actions {
    flex-direction: column;
  }

  .bp-modal-actions .bp-btn {
    width: 100%;
    min-height: 48px;
    touch-action: manipulation;
  }

  .bp-floorplan-modal-backdrop {
    padding: 0;
    padding-bottom: env(safe-area-inset-bottom);
    align-items: stretch;
  }

  .bp-floorplan-modal-shell {
    border-radius: 12px 12px 0 0;
    max-height: 100dvh;
  }

  .bp-floorplan-modal-bar {
    padding: max(10px, env(safe-area-inset-top)) 12px 10px max(12px, env(safe-area-inset-left));
    flex-wrap: wrap;
  }

  .bp-fp-zoom-btn {
    width: 40px;
    height: 40px;
    touch-action: manipulation;
  }

  .bp-floorplan-modal-close {
    width: 40px;
    height: 40px;
  }

  .bp-floorplan-img {
    padding: 16px;
    min-height: 220px;
  }

  .bp-video-modal-backdrop {
    padding: max(12px, env(safe-area-inset-top)) max(12px, env(safe-area-inset-right))
      max(12px, env(safe-area-inset-bottom)) max(12px, env(safe-area-inset-left));
    align-items: center;
    justify-content: center;
  }

  .bp-video-modal-shell {
    border-radius: 12px;
    max-height: min(90dvh, 100%);
    max-width: 100%;
  }

  .bp-video-modal-bar {
    padding: max(10px, env(safe-area-inset-top)) 12px 10px max(12px, env(safe-area-inset-left));
  }

  .bp-video-modal-download,
  .bp-video-modal-close {
    width: 44px;
    height: 44px;
    touch-action: manipulation;
  }

  .bp-video-modal-body {
    padding: 12px;
  }

  .bp-video-modal-player {
    max-height: min(65dvh, calc(100dvh - 160px));
  }

  /* Edge-to-edge immersive player on phones (native FS when supported, else this layout). */
  .bp-video-modal--immersive .bp-video-modal-backdrop {
    padding: 0;
    background: #000;
    -webkit-backdrop-filter: none;
    backdrop-filter: none;
    align-items: stretch;
    justify-content: stretch;
  }

  .bp-video-modal--immersive .bp-video-modal-shell {
    width: 100%;
    max-width: 100%;
    height: 100%;
    max-height: 100%;
    min-height: 100dvh;
    border-radius: 0;
    border: none;
    background: #000;
    box-shadow: none;
  }

  .bp-video-modal--immersive .bp-video-modal-bar {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    z-index: 2;
    padding: max(10px, env(safe-area-inset-top)) max(12px, env(safe-area-inset-right)) 10px
      max(12px, env(safe-area-inset-left));
    border-bottom: none;
    background: linear-gradient(180deg, rgba(0, 0, 0, 0.55) 0%, transparent 100%);
  }

  .bp-video-modal--immersive .bp-video-modal-download,
  .bp-video-modal--immersive .bp-video-modal-close {
    background: rgba(0, 0, 0, 0.45);
    border-color: rgba(255, 255, 255, 0.2);
    color: #fff;
  }

  .bp-video-modal--immersive .bp-video-modal-body {
    flex: 1;
    padding: 0;
    background: #000;
    min-height: 0;
  }

  .bp-video-modal--immersive .bp-video-modal-player {
    width: 100%;
    height: 100%;
    max-height: 100dvh;
    border-radius: 0;
    object-fit: contain;
    background: #000;
  }
}

/* Icon-only theme control on very narrow screens */
@media (max-width: 380px) {
  .bp-theme-toggle {
    width: 48px;
    height: 30px;
    justify-content: center;
    border-radius: 999px;
  }

  .bp-theme-toggle-track {
    border: 0;
    width: 44px;
  }
}
