/* ============================================================
   Brand Performance Review — page-scoped styles.
   Class prefix: .bpr-*
   16:9 slide-box layout optimised for screenshot-to-PowerPoint.
   Tokens only — verified in both dark + light themes.
   ============================================================ */

.bpr-page {
  display: flex;
  flex-direction: column;
  gap: var(--space-6);
  padding: var(--space-6) var(--space-6) var(--space-12);
}

/* ── Header (title block) ─────────────────────────────────── */
.bpr-page__header {
  display: flex;
  flex-direction: column;
  gap: var(--space-2);
}
.bpr-page__title {
  font-size: var(--font-h1);
  font-weight: 700;
  color: var(--text-primary);
  letter-spacing: -0.01em;
  margin: 0;
}
.bpr-page__subtitle {
  font-size: var(--font-small);
  color: var(--text-secondary);
  margin: 0;
}

/* ── Generator controls card ──────────────────────────────── */
.bpr-controls {
  background: var(--bg-surface);
  border: 1px solid var(--border-default);
  border-radius: var(--radius-md);
  padding: var(--space-5);
  display: flex;
  flex-wrap: wrap;
  align-items: flex-end;
  gap: var(--space-4) var(--space-5);
}
.bpr-controls__group {
  display: flex;
  flex-direction: column;
  gap: var(--space-1);
  min-width: 0;
  flex: 0 0 auto;
}
.bpr-controls__group--full {
  flex: 1 1 100%;
  max-width: 480px;
}
.bpr-controls__group--full .bpr-controls__input {
  width: 100%;
}
.bpr-controls__label {
  font-size: var(--font-xs);
  text-transform: uppercase;
  letter-spacing: 0.04em;
  color: var(--text-tertiary);
  font-weight: 600;
}
.bpr-controls__input,
.bpr-controls__select {
  background: var(--bg-elevated);
  border: 1px solid var(--border-default);
  border-radius: var(--radius-sm);
  padding: var(--space-2) var(--space-3);
  color: var(--text-primary);
  font: inherit;
  font-size: var(--font-body);
  outline: none;
  transition: border-color 120ms ease, box-shadow 120ms ease;
}
.bpr-controls__input:focus,
.bpr-controls__select:focus {
  border-color: var(--color-action);
  box-shadow: 0 0 0 2px var(--color-action-muted);
}
.bpr-controls__row {
  display: flex;
  gap: var(--space-2);
  flex-wrap: nowrap;
}
.bpr-controls__row > .bpr-controls__input {
  flex: 1 1 0;
  min-width: 0;
}
.bpr-controls__period-summary {
  margin-top: 6px;
  padding: var(--space-2) var(--space-3);
  border: 1px dashed var(--border-subtle, var(--border-default));
  border-radius: var(--radius-sm);
  color: var(--text-secondary);
  font-size: var(--font-small);
  background: var(--bg-elevated);
  text-align: center;
  font-variant-numeric: tabular-nums;
}
.bpr-controls__period-row {
  display: flex;
  align-items: center;
  gap: var(--space-2);
  flex-wrap: nowrap;
}
.bpr-controls__period-pick {
  flex: 0 0 auto;
  min-width: 140px;
  width: auto;
}
.bpr-controls__period-row > .pnl-compare-toggle { flex: 0 0 auto; }
.bpr-controls__toggle {
  display: inline-flex;
  border: 1px solid var(--border-default);
  border-radius: var(--radius-sm);
  overflow: hidden;
  background: var(--bg-elevated);
}
.bpr-controls__toggle-btn {
  background: transparent;
  border: 0;
  padding: var(--space-2) var(--space-3);
  color: var(--text-secondary);
  font-size: var(--font-small);
  cursor: pointer;
}
.bpr-controls__toggle-btn--active {
  background: var(--color-action);
  color: white;
}
.bpr-controls__actions {
  display: flex;
  gap: var(--space-2);
  justify-content: flex-end;
  flex-wrap: wrap;
  flex: 1 1 100%;
  padding-top: var(--space-3);
  margin-top: var(--space-2);
  border-top: 1px solid var(--border-subtle, var(--border-default));
}
.bpr-controls__btn {
  background: var(--color-action);
  color: white;
  border: 0;
  border-radius: var(--radius-sm);
  padding: var(--space-2) var(--space-4);
  font-weight: 600;
  cursor: pointer;
  font-size: var(--font-body);
  transition: background-color 120ms ease, opacity 120ms ease;
}
.bpr-controls__btn:hover { background: var(--color-action-hover); }
.bpr-controls__btn:disabled { opacity: 0.5; cursor: not-allowed; }
.bpr-controls__btn--ghost {
  background: transparent;
  color: var(--text-primary);
  border: 1px solid var(--border-default);
}
.bpr-controls__btn--ghost:hover { background: var(--bg-hover); }
.bpr-controls__btn--danger {
  background: transparent;
  color: var(--color-danger);
  border: 1px solid var(--border-default);
}

/* ── Saved-versions list (slim) ───────────────────────────── */
.bpr-saved {
  background: var(--bg-surface);
  border: 1px solid var(--border-default);
  border-radius: var(--radius-md);
  padding: var(--space-4);
  display: flex;
  flex-direction: column;
  gap: var(--space-2);
}
.bpr-saved__title {
  font-size: var(--font-small);
  font-weight: 600;
  color: var(--text-secondary);
  text-transform: uppercase;
  letter-spacing: 0.04em;
}
.bpr-saved__row {
  display: flex;
  justify-content: space-between;
  gap: var(--space-3);
  padding: var(--space-2) var(--space-3);
  border: 1px solid var(--border-default);
  border-radius: var(--radius-sm);
  background: var(--bg-elevated);
  cursor: pointer;
}
.bpr-saved__row:hover { background: var(--bg-hover); }
.bpr-saved__row-meta {
  display: flex;
  flex-direction: column;
  gap: 2px;
}
.bpr-saved__row-title {
  color: var(--text-primary);
  font-weight: 600;
  font-size: var(--font-small);
}
.bpr-saved__row-sub {
  color: var(--text-tertiary);
  font-size: var(--font-xs);
}
.bpr-saved__row-actions {
  display: flex;
  gap: var(--space-1);
}
.bpr-saved__more {
  align-self: flex-start;
  background: transparent;
  border: 0;
  color: var(--color-action);
  font-size: var(--font-small);
  font-weight: 600;
  padding: var(--space-1) var(--space-2);
  cursor: pointer;
  text-decoration: underline;
  text-underline-offset: 3px;
}
.bpr-saved__more:hover { color: var(--color-action-hover); }

/* ── Slide box ──────────────────────────────────────────────
   No fixed aspect-ratio — content drives height. The earlier 16:9
   lock cropped rendered cards (KPI band + chart row + footnote +
   commentary all need vertical room) so user couldn't see below
   the hero row. PowerPoint screenshots take what's actually rendered;
   content fidelity wins. */
.bpr-slide-box {
  background: var(--bg-surface);
  border: 1px solid var(--border-default);
  border-radius: var(--radius-md);
  display: flex;
  flex-direction: column;
  overflow: visible;
  min-height: 200px;
  transition: none;
}

/* Coming-soon: header-only collapsed card. Overrides the 16:9 + min-height
   from the base .bpr-slide-box so it takes only the room of one row. */
.bpr-slide-box--coming-soon {
  aspect-ratio: auto;
  min-height: 0;
  border-style: dashed;
  border-color: var(--border-subtle, var(--border-default));
  background: var(--bg-inset, var(--bg-surface));
}

/* Link variant: same compact one-row look but the whole card is a link
   to an existing B&S dashboard. Hover-elevates to invite the click. */
.bpr-slide-box--link {
  aspect-ratio: auto;
  min-height: 0;
  display: block;
  text-decoration: none;
  color: inherit;
  border-color: var(--border-default);
  background: var(--bg-surface);
  transition: background 120ms ease, border-color 120ms ease, transform 120ms ease;
}
.bpr-slide-box--link:hover {
  background: var(--bg-hover);
  border-color: var(--color-action);
  transform: translateY(-1px);
}
.bpr-slide-box__badge--link {
  font-size: var(--font-xs);
  font-weight: 600;
  padding: var(--space-1) var(--space-2);
  border-radius: var(--radius-sm);
  background: var(--color-action-muted);
  color: var(--color-action);
  white-space: nowrap;
}

/* Idle (un-generated) — already covered by the base `.bpr-slide-box`
   min-height: 200px. No override needed. */
.bpr-slide-box--idle { min-height: 160px; }
.bpr-slide-box__head--collapsed {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: var(--space-3);
  padding: var(--space-3) var(--space-4);
  border-bottom: 0;
}
.bpr-slide-box__soon-reason-inline {
  font-size: var(--font-xs);
  color: var(--text-tertiary);
  margin-top: 2px;
}

.bpr-slide-box--loading { opacity: 0.95; }

/* Header */
.bpr-slide-box__head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: var(--space-3);
  padding: var(--space-4) var(--space-5) var(--space-3);
  border-bottom: 1px solid var(--border-default);
}
.bpr-slide-box__head-text {
  display: flex;
  flex-direction: column;
  gap: 2px;
  min-width: 0;
}
.bpr-slide-box__eyebrow {
  font-size: var(--font-xs);
  text-transform: uppercase;
  letter-spacing: 0.06em;
  color: var(--color-brand);
  font-weight: 700;
}
.bpr-slide-box__title {
  font-size: var(--font-h3);
  font-weight: 700;
  color: var(--text-primary);
  margin: 0;
  letter-spacing: -0.01em;
}
.bpr-slide-box__subtitle {
  font-size: var(--font-small);
  color: var(--text-secondary);
}
.bpr-slide-box__badge {
  font-size: var(--font-xs);
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  padding: 4px 8px;
  border-radius: 999px;
  white-space: nowrap;
}
.bpr-slide-box__badge--soon {
  background: var(--color-warning-muted, rgba(245, 158, 11, 0.18));
  color: var(--color-warning, #F59E0B);
}
.bpr-slide-box__badge--loading {
  background: var(--color-action-muted);
  color: var(--color-action);
}

/* Body */
.bpr-slide-box__body {
  flex: 1;
  display: flex;
  flex-direction: column;
  padding: var(--space-4) var(--space-5);
  min-height: 0;
}
.bpr-slide-box__rendered {
  flex: 1;
  display: flex;
  flex-direction: column;
  min-height: 0;
}

/* Idle / loading / coming-soon placeholders */
.bpr-slide-box__placeholder {
  flex: 1;
  display: flex;
  flex-direction: column;
  gap: var(--space-3);
  align-items: center;
  justify-content: center;
  color: var(--text-tertiary);
  text-align: center;
}
.bpr-slide-box__placeholder-hint { font-size: var(--font-small); }
.bpr-slide-box__placeholder--shimmer { gap: var(--space-2); padding: 0 var(--space-6); }
.bpr-slide-box__shimmer {
  width: 100%;
  height: 14px;
  border-radius: var(--radius-sm);
  background: linear-gradient(90deg, var(--bg-elevated) 0%, var(--bg-hover) 50%, var(--bg-elevated) 100%);
  background-size: 200% 100%;
  animation: bpr-shimmer 1.4s ease-in-out infinite;
}
.bpr-slide-box__shimmer--short { width: 60%; }
@keyframes bpr-shimmer {
  0% { background-position: 200% 0; }
  100% { background-position: -200% 0; }
}
@media (prefers-reduced-motion: reduce) {
  .bpr-slide-box__shimmer { animation: none; }
}

.bpr-slide-box__placeholder--soon { gap: var(--space-3); }
.bpr-slide-box__soon-icon { color: var(--color-warning, #F59E0B); }
.bpr-slide-box__soon-title { font-weight: 700; color: var(--text-secondary); font-size: var(--font-body); }
.bpr-slide-box__soon-reason { font-size: var(--font-small); }
.bpr-slide-box__soon-eta {
  display: inline-block;
  font-size: var(--font-xs);
  color: var(--color-warning, #F59E0B);
  background: var(--color-warning-muted, rgba(245, 158, 11, 0.18));
  border-radius: 999px;
  padding: 3px 8px;
  margin-top: var(--space-1);
}

/* Commentary footer (always reserved) */
.bpr-slide-box__commentary {
  border-top: 1px dashed var(--border-default);
  padding: var(--space-3) var(--space-5);
  background: var(--bg-inset);
  display: flex;
  flex-direction: column;
  gap: var(--space-1);
}
.bpr-slide-box__commentary-eyebrow {
  display: flex;
  align-items: center;
  gap: 6px;
  font-size: var(--font-xs);
  text-transform: uppercase;
  letter-spacing: 0.06em;
  color: var(--color-action);
  font-weight: 700;
}
.bpr-slide-box__commentary-body {
  font-size: var(--font-small);
  color: var(--text-secondary);
  line-height: 1.55;
}
.bpr-slide-box__commentary-empty {
  font-style: italic;
  color: var(--text-tertiary);
}
.bpr-slide-box__commentary-meta {
  margin-left: auto;
  font-size: 10px;
  letter-spacing: 0.02em;
  color: var(--text-tertiary);
  text-transform: none;
  font-weight: 500;
  font-variant-numeric: tabular-nums;
}

/* AI commentary trigger button (per box). */
.bpr-slide-box__commentary-trigger-row {
  display: flex;
  align-items: center;
  gap: var(--space-2);
}
.bpr-slide-box__commentary-trigger {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  background: linear-gradient(135deg, color-mix(in srgb, #4285f4 14%, transparent), color-mix(in srgb, #a855f7 14%, transparent));
  border: 1px solid color-mix(in srgb, #7c5cff 30%, transparent);
  border-radius: 999px;
  color: var(--text-primary);
  font-weight: 600;
  font-size: var(--font-small);
  padding: 6px 12px;
  cursor: pointer;
  transition: background-color 120ms ease, transform 120ms ease;
}
.bpr-slide-box__commentary-trigger:hover {
  background: linear-gradient(135deg, color-mix(in srgb, #4285f4 22%, transparent), color-mix(in srgb, #a855f7 22%, transparent));
}
.bpr-slide-box__commentary-trigger-icon {
  font-size: 14px;
  line-height: 1;
}
.bpr-slide-box__commentary-regen {
  margin-left: auto;
  background: transparent;
  border: 0;
  color: var(--text-tertiary);
  cursor: pointer;
  font-size: 14px;
  padding: 0 4px;
  border-radius: var(--radius-sm);
}
.bpr-slide-box__commentary-regen:hover { color: var(--color-action); background: var(--bg-hover); }
.bpr-slide-box__commentary-loading {
  display: flex;
  flex-direction: column;
  gap: 6px;
  padding: 4px 0;
}
.bpr-slide-box__commentary-error {
  display: flex;
  align-items: center;
  gap: var(--space-3);
  flex-wrap: wrap;
  font-size: var(--font-small);
  color: var(--color-brand);
}

/* Page-level "Generate AI insights" button styling — sibling to .bpr-controls__btn. */
.bpr-controls__btn--ai {
  background: linear-gradient(135deg, #4285f4 0%, #a855f7 100%);
  color: #ffffff;
  display: inline-flex;
  align-items: center;
  gap: 6px;
  box-shadow: 0 2px 8px rgba(124, 92, 255, 0.25);
}
.bpr-controls__btn--ai:hover { filter: brightness(1.05); background: linear-gradient(135deg, #4285f4 0%, #a855f7 100%); }
.bpr-controls__btn--ai:disabled { opacity: 0.6; filter: grayscale(0.3); }
.bpr-controls__btn-icon { font-size: 16px; line-height: 1; }
.bpr-controls__btn-cost {
  margin-left: 6px;
  padding: 1px 8px;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.18);
  font-size: 11px;
  font-variant-numeric: tabular-nums;
  font-weight: 500;
}

/* ── Section grouping ─────────────────────────────────────── */
.bpr-section {
  display: flex;
  flex-direction: column;
  gap: var(--space-3);
}
.bpr-section__heading {
  display: flex;
  align-items: center;
  gap: var(--space-2);
}
.bpr-section__num {
  width: 36px; height: 36px;
  display: inline-flex; align-items: center; justify-content: center;
  background: var(--color-brand);
  color: white;
  border-radius: 999px;
  font-weight: 700;
  font-size: 18px;
}
.bpr-section__title {
  font-size: var(--font-h2);
  font-weight: 700;
  color: var(--text-primary);
  margin: 0;
  letter-spacing: -0.01em;
}
.bpr-section__grid {
  display: grid;
  gap: var(--space-4);
  grid-template-columns: 1fr;
}
.bpr-section__grid--two { grid-template-columns: 1fr 1fr; }
@media (max-width: 1100px) {
  .bpr-section__grid--two { grid-template-columns: 1fr; }
}

/* Collapsed group: when every item in a section is coming-soon, render
   with the SAME naked section heading style as normal sections (no card
   box, no dashed border) — just the numbered badge + title + an inline
   "Coming soon" pill, plus a small subtitle line below. Keeps visual
   consistency with rendered sections (e.g. Overall Performance Q2 2025). */
.bpr-section--collapsed { gap: var(--space-1); }
.bpr-section__heading--soon .bpr-slide-box__badge--soon {
  margin-left: auto;
}
.bpr-section__soon-sub {
  font-size: var(--font-xs);
  color: var(--text-tertiary);
  padding-left: calc(36px + var(--space-2));   /* align under title, past the numbered badge */
}

/* ── Inner: KPI chip row (Obagi p14 pattern) ─────────────── */
.bpr-kpi-row {
  display: grid;
  gap: var(--space-2);
  grid-template-columns: repeat(auto-fit, minmax(120px, 1fr));
  margin-bottom: var(--space-3);
}
.bpr-kpi-chip {
  border: 1px dashed var(--color-action);
  border-radius: var(--radius-sm);
  padding: var(--space-2) var(--space-3);
  background: var(--bg-elevated);
  text-align: center;
}
.bpr-kpi-chip__label {
  font-size: var(--font-xs);
  font-weight: 600;
  color: var(--color-action);
  text-transform: uppercase;
  letter-spacing: 0.04em;
  display: inline-flex;
  align-items: center;
  justify-content: center;
}
.bpr-kpi-chip__icon {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 14px;
  height: 14px;
  margin-right: 4px;
  color: var(--color-action, #2563EB);
}
.bpr-kpi-chip__icon svg { width: 12px; height: 12px; }
.bpr-kpi-chip--cost { border-color: var(--color-brand, #CB222A); }
.bpr-kpi-chip--cost .bpr-kpi-chip__label { color: var(--color-brand, #CB222A); }
.bpr-kpi-chip--cost .bpr-kpi-chip__icon { color: var(--color-brand, #CB222A); }
.bpr-kpi-chip__value {
  font-family: 'Geist Mono', ui-monospace, monospace;
  font-variant-numeric: tabular-nums;
  font-weight: 700;
  font-size: var(--font-h3);
  color: var(--text-primary);
}

/* Hero numbers (Actual NMV / Achieved — Obagi p14) */
.bpr-hero-row {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: var(--space-3);
  margin-bottom: var(--space-3);
}
.bpr-hero {
  text-align: center;
  border: 1px solid var(--border-default);
  border-radius: var(--radius-md);
  padding: var(--space-3);
}
.bpr-hero__label {
  font-size: var(--font-body);
  font-weight: 700;
  color: var(--text-primary);
  display: inline-flex;
  align-items: center;
  justify-content: center;
}
.bpr-hero__icon {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 16px;
  height: 16px;
  margin-right: 6px;
  color: var(--color-action, #2563EB);
}
.bpr-hero__icon svg { width: 14px; height: 14px; }
.bpr-hero__value {
  font-family: 'Geist Mono', ui-monospace, monospace;
  font-variant-numeric: tabular-nums;
  font-weight: 800;
  font-size: 2.4rem;
  color: var(--color-action);
}

/* Two-column body for charts in a single slide */
.bpr-slide-box__cols {
  display: grid;
  grid-template-columns: 1.4fr 1fr;
  gap: var(--space-4);
  flex: 1;
  min-height: 0;
}
@media (max-width: 900px) {
  .bpr-slide-box__cols { grid-template-columns: 1fr; }
}

/* ============================================================
   BPR Overall (rich) — reusable-chart layout
   The reused charts inherit bs-ov-* / bs-ov-sord-* styling from the
   globally-linked css/bs-overall-performance.css; only these .bpr-*
   wrapper / grid / insight rules live here.
   ============================================================ */
.bpr-overall-rich {
  display: flex;
  flex-direction: column;
  gap: var(--space-3);
}

/* Brand-insight line — one-glance takeaway above the charts. */
.bpr-insight {
  margin: 0;
  padding: var(--space-2) var(--space-3);
  border-left: 3px solid var(--color-action);
  background: var(--bg-elevated);
  border-radius: var(--radius-sm);
  font-size: var(--font-small);
  line-height: 1.5;
  color: var(--text-secondary);
}
.bpr-insight strong {
  color: var(--text-primary);
  font-variant-numeric: tabular-nums;
}

/* Responsive chart grid — two narrow cards (bullet, trend) on top, the
   wide cards (SoR donuts, cancel) span the full row. Grows to natural
   height instead of clipping inside the slide box. */
.bpr-chart-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: var(--space-4);
}
.bpr-chart-card {
  display: flex;
  flex-direction: column;
  gap: var(--space-1);
  min-width: 0;
}
.bpr-chart-card--wide { grid-column: 1 / -1; }
.bpr-chart-card__title {
  font-size: var(--font-small);
  font-weight: 700;
  color: var(--text-primary);
}
.bpr-chart-card__sub {
  font-size: var(--font-xs);
  color: var(--text-tertiary);
  margin-bottom: var(--space-1);
}
.bpr-chart-empty {
  padding: var(--space-4);
  text-align: center;
  font-style: italic;
  font-size: var(--font-small);
  color: var(--text-tertiary);
}

/* Per-platform Source-of-Revenue donuts side-by-side. */
.bpr-donut-row {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
  gap: var(--space-4);
}
@media (max-width: 900px) {
  .bpr-chart-grid { grid-template-columns: 1fr; }
  .bpr-chart-card--wide { grid-column: auto; }
}

/* ── Deck viewer ──────────────────────────────────────────────────────────
   One full-page 16:9 slide at a time. Left = agenda rail, centre = stage,
   right = curated customization panel (outside the 16:9 canvas so the slide
   stays screenshot-clean). Replaces the old vertical 2-up section grid. */
.bpr-deck {
  display: grid;
  grid-template-columns: 216px minmax(0, 1fr) 264px;
  gap: var(--space-4);
  align-items: start;
  margin-top: var(--space-4);
}
.bpr-deck__rail {
  position: sticky;
  top: var(--space-4);
  display: flex;
  flex-direction: column;
  gap: 2px;
  max-height: calc(100vh - 130px);
  overflow-y: auto;
  padding-right: 4px;
}
.bpr-deck__rail-sec {
  font-size: var(--font-small);
  font-weight: 700;
  color: var(--text-tertiary);
  text-transform: uppercase;
  letter-spacing: 0.04em;
  margin: var(--space-3) 0 2px;
}
.bpr-deck__rail-sec:first-child { margin-top: 0; }
.bpr-deck__rail-item {
  text-align: left;
  padding: 6px 10px;
  border: none;
  border-radius: var(--radius-sm);
  background: transparent;
  color: var(--text-secondary);
  font-size: var(--font-small);
  line-height: 1.3;
  cursor: pointer;
  transition: background 0.12s ease, color 0.12s ease;
}
.bpr-deck__rail-item:hover { background: color-mix(in srgb, var(--text-primary) 6%, transparent); }
.bpr-deck__rail-item.is-active {
  background: var(--color-action);
  color: #fff;
  font-weight: 600;
}
.bpr-deck__stagewrap { display: flex; flex-direction: column; gap: var(--space-3); min-width: 0; }
.bpr-deck__nav { display: flex; align-items: center; justify-content: center; gap: var(--space-4); }
.bpr-deck__navbtn {
  width: 38px; height: 38px;
  border-radius: 50%;
  border: 1px solid var(--border-default);
  background: var(--surface-card);
  color: var(--text-primary);
  font-size: 22px; line-height: 1;
  cursor: pointer;
  transition: background 0.12s ease, opacity 0.12s ease;
}
.bpr-deck__navbtn:hover:not(:disabled) { background: color-mix(in srgb, var(--text-primary) 6%, transparent); }
.bpr-deck__navbtn:disabled { opacity: 0.32; cursor: default; }
.bpr-deck__pos { font-size: var(--font-small); color: var(--text-secondary); font-weight: 600; min-width: 200px; text-align: center; }
.bpr-deck__pos-eyebrow { color: var(--text-tertiary); font-weight: 500; }
.bpr-deck__stage { width: 100%; aspect-ratio: 16 / 9; }
.bpr-deck__stage .bpr-slide-box {
  width: 100%; height: 100%;
  aspect-ratio: auto;
  margin: 0;
  overflow: auto;
}
.bpr-deck__panel {
  position: sticky;
  top: var(--space-4);
  border: 1px solid var(--border-default);
  border-radius: var(--radius-md);
  background: var(--surface-card);
  padding: var(--space-4);
}
.bpr-deck__panel-title { font-weight: 700; margin-bottom: var(--space-2); color: var(--text-primary); }
.bpr-deck__panel-hint { font-size: var(--font-small); color: var(--text-tertiary); line-height: 1.5; }
/* Blocked (coming-soon / no-data) rail items — greyed + inert. */
.bpr-deck__rail-item.is-blocked {
  color: var(--text-tertiary);
  opacity: 0.5;
  cursor: default;
  font-style: italic;
}
.bpr-deck__rail-item.is-blocked:hover { background: transparent; }
/* Nav row: prev/pos/next centred, layout toggle pinned right. */
.bpr-deck__nav { position: relative; }
.bpr-deck__nav-center { display: flex; align-items: center; justify-content: center; gap: var(--space-4); }
.bpr-deck__layout-toggle { position: absolute; right: 0; top: 50%; transform: translateY(-50%); }
/* Expanded layout — all data slides stacked; blocked collapse to a header row. */
.bpr-deck__expanded { display: flex; flex-direction: column; gap: var(--space-5); }
.bpr-deck__exp-slide { width: 100%; aspect-ratio: 16 / 9; }
.bpr-deck__exp-slide .bpr-slide-box { width: 100%; height: 100%; aspect-ratio: auto; margin: 0; overflow: auto; }
.bpr-deck__exp-soon {
  display: flex; align-items: center; gap: var(--space-3);
  padding: var(--space-3) var(--space-4);
  border: 1px dashed var(--border-default);
  border-radius: var(--radius-md);
  background: color-mix(in srgb, var(--text-primary) 2.5%, transparent);
  opacity: 0.7;
}
.bpr-deck__exp-eyebrow { font-size: var(--font-small); font-weight: 700; color: var(--text-tertiary); text-transform: uppercase; letter-spacing: 0.04em; }
.bpr-deck__exp-title { font-weight: 600; color: var(--text-secondary); }
.bpr-deck__exp-soon .bpr-slide-box__badge--soon { margin-left: auto; }
@media (max-width: 1180px) {
  .bpr-deck { grid-template-columns: 1fr; }
  .bpr-deck__rail, .bpr-deck__panel { position: static; max-height: none; }
  .bpr-deck__rail { flex-direction: row; flex-wrap: wrap; gap: 6px; }
  .bpr-deck__layout-toggle { position: static; transform: none; }
  .bpr-deck__nav { flex-direction: column; gap: var(--space-2); }
}

/* ── Curated customization panel — Phase 1.2 ──────────────────────────────
   Controls live outside the 16:9 canvas so the slide stays screenshot-clean.
   Tokens only; verified both themes. ─────────────────────────────────────── */

/* Panel sections stack with a clear rule between them. */
.bpr-panel__section {
  padding: var(--space-3) 0;
  border-bottom: 1px solid var(--border-subtle, var(--border-default));
}
.bpr-panel__section:last-of-type { border-bottom: none; }

.bpr-panel__section-label {
  display: block;
  font-size: var(--font-xs);
  text-transform: uppercase;
  letter-spacing: 0.04em;
  color: var(--text-tertiary);
  font-weight: 600;
  margin-bottom: var(--space-2);
}
.bpr-panel__section-hint {
  font-size: var(--font-xs);
  color: var(--text-tertiary);
  margin: var(--space-1) 0 0;
  line-height: 1.4;
}

/* Data-labels toggle pill. */
.bpr-panel__section-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: var(--space-3);
}

.bpr-panel__toggle {
  position: relative;
  display: inline-flex;
  align-items: center;
  width: 36px;
  height: 20px;
  border-radius: 10px;
  border: none;
  background: var(--border-default);
  cursor: pointer;
  padding: 0;
  transition: background 0.18s ease;
  flex-shrink: 0;
}
.bpr-panel__toggle--on { background: var(--color-action); }
.bpr-panel__toggle:disabled { opacity: 0.4; cursor: not-allowed; }
.bpr-panel__toggle-thumb {
  position: absolute;
  left: 2px;
  width: 16px;
  height: 16px;
  border-radius: 50%;
  background: #fff;
  box-shadow: 0 1px 3px rgba(0,0,0,0.22);
  transition: transform 0.18s ease;
}
.bpr-panel__toggle--on .bpr-panel__toggle-thumb {
  transform: translateX(16px);
}

/* Chart view rows (one per chart with >1 view). */
.bpr-panel__chart-list {
  display: flex;
  flex-direction: column;
  gap: var(--space-2);
}
.bpr-panel__chart-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: var(--space-2);
  flex-wrap: wrap;
}
.bpr-panel__chart-title {
  font-size: var(--font-small);
  color: var(--text-secondary);
  min-width: 0;
  flex: 1;
}
.bpr-panel__view-toggle {
  flex-shrink: 0;
}
.bpr-panel__view-btn {
  font-size: var(--font-xs) !important;
  padding: 3px 8px !important;
  text-transform: capitalize;
}

/* Metric show/hide checkboxes. */
.bpr-panel__metric-list {
  list-style: none;
  margin: 0;
  padding: 0;
  display: flex;
  flex-direction: column;
  gap: var(--space-1);
}
.bpr-panel__metric-item { margin: 0; }
.bpr-panel__metric-label {
  display: flex;
  align-items: center;
  gap: var(--space-2);
  font-size: var(--font-small);
  color: var(--text-secondary);
  cursor: pointer;
  padding: 2px 0;
  user-select: none;
}
.bpr-panel__metric-check {
  width: 14px;
  height: 14px;
  accent-color: var(--color-action);
  cursor: pointer;
  flex-shrink: 0;
}

/* Group-by select — reuses .bpr-controls__select token styling. */
.bpr-panel__dim-select {
  width: 100%;
  font-size: var(--font-small) !important;
  padding: var(--space-1) var(--space-2) !important;
}

/* Empty state — no panel meta for this slide kind. */
.bpr-panel__empty {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: var(--space-2);
  text-align: center;
  color: var(--text-tertiary);
  padding: var(--space-4) 0;
}
.bpr-panel__empty-icon {
  font-size: 1.5em;
  line-height: 1;
  opacity: 0.5;
}

/* Wiring-status note — removed once fence opens. */
.bpr-panel__wiring-note {
  margin-top: var(--space-3);
  padding: var(--space-2) var(--space-3);
  background: color-mix(in srgb, var(--color-warning, #d97706) 8%, transparent);
  border: 1px solid color-mix(in srgb, var(--color-warning, #d97706) 24%, transparent);
  border-radius: var(--radius-sm);
  font-size: var(--font-xs);
  color: var(--text-secondary);
  line-height: 1.5;
}
.bpr-panel__wiring-note code {
  font-family: var(--font-mono, monospace);
  font-size: 0.9em;
  background: color-mix(in srgb, var(--text-primary) 8%, transparent);
  padding: 1px 4px;
  border-radius: 2px;
}
.bpr-panel__wiring-badge {
  display: inline-block;
  background: color-mix(in srgb, var(--color-warning, #d97706) 15%, transparent);
  color: var(--color-warning, #d97706);
  font-weight: 700;
  font-size: var(--font-xs);
  border-radius: 3px;
  padding: 1px 5px;
  margin-right: var(--space-1);
  text-transform: uppercase;
  letter-spacing: 0.04em;
}

/* On narrow/mobile: panel stacks below the stage (already handled by
   the existing bpr-deck @media grid collapse). Ensure panel controls
   remain readable at full width. */
@media (max-width: 1180px) {
  .bpr-panel__chart-row { flex-direction: column; align-items: flex-start; }
  .bpr-panel__view-toggle { align-self: flex-end; }
}
