/* Metroflow playbooks — premium visual system */
:root {
  --pb-bg: #000000;
  --pb-surface: rgba(255, 255, 255, 0.04);
  --pb-surface-2: rgba(255, 255, 255, 0.07);
  --pb-text: #ffffff;
  --pb-muted: rgba(255, 255, 255, 0.92);
  --pb-faint: rgba(255, 255, 255, 0.74);
  --pb-accent: #22E59A;
  --pb-accent-soft: #a7f3d0;
  --pb-accent-dim: #10B981;
  --pb-accent-glow: rgba(34, 229, 154, 0.35);
  --pb-amber: #F59E0B;
  --pb-amber-soft: #fcd34d;
  --pb-red: #f87171;
  --pb-violet: #8b5cf6;
  --pb-border: rgba(255, 255, 255, 0.1);
  --pb-border-strong: rgba(255, 255, 255, 0.18);
  --pb-radius: 20px;
  --pb-radius-sm: 12px;
  --pb-font: Inter, system-ui, sans-serif;
  --pb-display: Sora, system-ui, sans-serif;
  --pb-mono: 'JetBrains Mono', ui-monospace, monospace;
  --pb-shadow: 0 24px 80px rgba(0, 0, 0, 0.45);
  --pb-glow: 0 0 60px rgba(34, 229, 154, 0.12);
}

[data-theme="light"] {
  --pb-bg: #fafbfc;
  --pb-surface: rgba(0, 0, 0, 0.03);
  --pb-surface-2: rgba(0, 0, 0, 0.05);
  --pb-text: #111111;
  --pb-muted: #222222;
  --pb-faint: #3D3D3D;
  --pb-accent: #059669;
  --pb-accent-soft: #065f46;
  --pb-accent-dim: #047857;
  --pb-accent-glow: rgba(5, 150, 105, 0.28);
  --pb-border: rgba(0, 0, 0, 0.08);
  --pb-border-strong: rgba(0, 0, 0, 0.14);
  --pb-shadow: 0 24px 80px rgba(0, 0, 0, 0.08);
  --pb-glow: 0 0 60px rgba(5, 150, 105, 0.1);
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; }

body.pb {
  margin: 0;
  font-family: var(--pb-font);
  background: var(--pb-bg);
  color: var(--pb-text);
  line-height: 1.65;
  font-size: 15px;
  -webkit-font-smoothing: antialiased;
}

body.pb::before {
  content: '';
  position: fixed;
  inset: 0;
  background-image:
    linear-gradient(rgba(255,255,255,0.03) 1px, transparent 1px),
    linear-gradient(90deg, rgba(255,255,255,0.03) 1px, transparent 1px);
  background-size: 64px 64px;
  mask-image: radial-gradient(ellipse 80% 60% at 50% 0%, black, transparent);
  pointer-events: none;
  z-index: 0;
}

[data-theme="light"] body.pb::before {
  background-image:
    linear-gradient(rgba(0,0,0,0.04) 1px, transparent 1px),
    linear-gradient(90deg, rgba(0,0,0,0.04) 1px, transparent 1px);
}

.pb-progress {
  position: fixed;
  top: 0;
  left: 0;
  height: 3px;
  width: 0%;
  background: linear-gradient(90deg, var(--pb-amber), var(--pb-accent));
  z-index: 100;
  transition: width 0.1s linear;
}

.pb-shell {
  display: grid;
  grid-template-columns: 260px minmax(0, 1fr);
  min-height: 100vh;
  position: relative;
  z-index: 1;
}

/* Sidebar */
.pb-sidebar {
  position: sticky;
  top: 0;
  height: 100vh;
  overflow-y: auto;
  padding: 32px 22px 48px;
  border-right: 1px solid var(--pb-border);
  background: rgba(0, 0, 0, 0.65);
  backdrop-filter: blur(20px);
}

[data-theme="light"] .pb-sidebar {
  background: rgba(250, 251, 252, 0.95);
}

.pb-brand-row {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-bottom: 6px;
}

.pb-theme-toggle {
  width: 36px;
  height: 36px;
  border-radius: 10px;
  border: 1px solid var(--pb-border);
  background: var(--pb-surface);
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  color: var(--pb-muted);
  flex-shrink: 0;
  padding: 0;
  transition: color 0.2s, border-color 0.2s, background 0.2s, opacity 0.35s, transform 0.35s;
}
.pb-theme-toggle:hover {
  color: var(--pb-accent);
  border-color: rgba(34, 229, 154, 0.35);
  background: rgba(34, 229, 154, 0.06);
}
.pb-theme-toggle svg { width: 17px; height: 17px; }
.pb-theme-toggle .icon-sun { display: none; }
[data-theme="light"] .pb-theme-toggle .icon-moon { display: none; }
[data-theme="light"] .pb-theme-toggle .icon-sun { display: block; }

.pb-theme-toggle-fixed {
  position: fixed;
  top: 16px;
  right: 16px;
  z-index: 100;
  box-shadow: var(--pb-shadow);
}
#themeToggle.is-scroll-hidden {
  opacity: 0;
  transform: translateY(-14px) scale(0.92);
  pointer-events: none;
}
.pb-brand-logo {
  width: 32px;
  height: auto;
  filter: drop-shadow(0 0 12px var(--pb-accent-glow));
}
.pb-brand {
  font-family: var(--pb-display);
  font-size: 15px;
  font-weight: 700;
  letter-spacing: -0.02em;
}
.pb-brand-sub {
  font-family: var(--pb-mono);
  font-size: 10px;
  text-transform: uppercase;
  letter-spacing: 0.12em;
  color: var(--pb-amber);
  margin-bottom: 28px;
  padding-left: 42px;
}

.pb-nav-label {
  font-family: var(--pb-mono);
  font-size: 9px;
  text-transform: uppercase;
  letter-spacing: 0.14em;
  color: var(--pb-faint);
  margin: 0 0 10px 10px;
}
.pb-nav { list-style: none; margin: 0 0 20px; padding: 0; }
.pb-nav li { margin: 1px 0; }
.pb-nav a {
  display: block;
  padding: 8px 12px;
  border-radius: 10px;
  color: var(--pb-faint);
  text-decoration: none;
  font-size: 13px;
  line-height: 1.35;
  border: 1px solid transparent;
  transition: color 0.2s, background 0.2s, border-color 0.2s;
}
.pb-nav a:hover { color: var(--pb-text); background: var(--pb-surface); }
.pb-nav a.active {
  color: var(--pb-accent);
  background: rgba(34, 229, 154, 0.08);
  border-color: rgba(34, 229, 154, 0.2);
}

.pb-sidebar-cta {
  margin-top: auto;
  padding-top: 20px;
  border-top: 1px solid var(--pb-border);
}
.pb-sidebar-cta button {
  width: 100%;
  padding: 10px 14px;
  border-radius: 10px;
  border: 1px solid var(--pb-border-strong);
  background: var(--pb-surface);
  color: var(--pb-text);
  font-family: var(--pb-display);
  font-size: 13px;
  font-weight: 600;
  cursor: pointer;
  transition: border-color 0.2s, background 0.2s;
}
.pb-sidebar-cta button:hover { border-color: var(--pb-accent); background: rgba(34,229,154,0.06); }

.pb-main { min-width: 0; }
.pb-wrap { max-width: 1040px; margin: 0 auto; padding: 48px 40px 120px; }

/* Hero cover */
.pb-cover {
  position: relative;
  border-radius: 28px;
  margin-bottom: 56px;
  overflow: hidden;
  border: 1px solid var(--pb-border-strong);
  box-shadow: var(--pb-shadow), var(--pb-glow);
}
.pb-cover-grid {
  display: grid;
  grid-template-columns: 1.1fr 0.9fr;
  min-height: 380px;
}
.pb-cover-copy {
  padding: 48px 44px;
  display: flex;
  flex-direction: column;
  justify-content: center;
  background:
    radial-gradient(ellipse 100% 80% at 0% 100%, rgba(34,229,154,0.12), transparent 55%),
    radial-gradient(ellipse 60% 50% at 100% 0%, rgba(245,158,11,0.08), transparent 50%),
    rgba(255,255,255,0.02);
}
.pb-cover-visual {
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 24px;
  background: radial-gradient(ellipse 70% 70% at 50% 50%, rgba(34,229,154,0.06), transparent);
  border-left: 1px solid var(--pb-border);
}
.pb-eyebrow {
  font-family: var(--pb-mono);
  font-size: 11px;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--pb-amber);
  margin-bottom: 16px;
}
.pb-cover h1 {
  font-family: var(--pb-display);
  font-size: clamp(2rem, 4.5vw, 2.75rem);
  line-height: 1.08;
  letter-spacing: -0.04em;
  margin: 0 0 16px;
}
.pb-cover .pb-lead {
  font-size: 17px;
  color: var(--pb-muted);
  max-width: 520px;
  margin: 0;
  line-height: 1.6;
}
.pb-meta { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 28px; }
.pb-meta span {
  font-size: 11px;
  font-family: var(--pb-mono);
  border: 1px solid var(--pb-border);
  border-radius: 20px;
  padding: 6px 14px;
  color: var(--pb-faint);
  background: rgba(0,0,0,0.25);
}
[data-theme="light"] .pb-meta span {
  background: rgba(5, 150, 105, 0.08);
  color: var(--pb-muted);
  border-color: rgba(5, 150, 105, 0.2);
}

.pb-illus {
  width: 100%;
  max-width: 420px;
  height: auto;
  display: block;
  --pb-i-canvas: rgba(255, 255, 255, 0.02);
  --pb-i-surface: rgba(255, 255, 255, 0.06);
  --pb-i-surface-2: rgba(255, 255, 255, 0.03);
  --pb-i-text: #f1f5f9;
  --pb-i-muted: #cbd5e1;
  --pb-i-border: rgba(255, 255, 255, 0.14);
  --pb-i-accent: #22E59A;
  --pb-i-accent-soft: rgba(34, 229, 154, 0.1);
  --pb-i-accent-dim: #10B981;
  --pb-i-amber: #F59E0B;
  --pb-i-red: #f87171;
  --pb-i-red-soft: rgba(248, 113, 113, 0.08);
}
[data-theme="light"] .pb-illus {
  --pb-i-canvas: #f8fafc;
  --pb-i-surface: #ffffff;
  --pb-i-surface-2: #f1f5f9;
  --pb-i-text: #0f172a;
  --pb-i-muted: #334155;
  --pb-i-border: rgba(15, 23, 42, 0.12);
  --pb-i-accent: #059669;
  --pb-i-accent-soft: rgba(5, 150, 105, 0.1);
  --pb-i-accent-dim: #047857;
  --pb-i-red-soft: rgba(248, 113, 113, 0.06);
}
.pb-illus-arch {
  max-width: 100%;
  width: 100%;
  height: auto;
  display: block;
}
.pb-illus-outcomes { max-width: 100%; }
/* Architecture diagram: prefer full content width on desktop */
.pb-arch-wrap {
  max-width: min(100%, 960px);
  margin: 0 auto;
}
.pb-arch-wrap .pb-illus-arch {
  width: 100%;
}

/* Sections */
.pb-section {
  margin-bottom: 72px;
  scroll-margin-top: 32px;
}
.pb-section-head {
  display: flex;
  align-items: flex-end;
  gap: 20px;
  margin-bottom: 28px;
  padding-bottom: 20px;
  border-bottom: 1px solid var(--pb-border);
}
.pb-section-num {
  font-family: var(--pb-display);
  font-size: 3.5rem;
  font-weight: 700;
  line-height: 1;
  letter-spacing: -0.05em;
  background: linear-gradient(135deg, var(--pb-amber), var(--pb-accent));
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
  opacity: 0.85;
  flex-shrink: 0;
}
.pb-section-titles { flex: 1; min-width: 0; }
.pb-h {
  font-family: var(--pb-display);
  font-size: 1.65rem;
  letter-spacing: -0.035em;
  margin: 0 0 6px;
  line-height: 1.15;
}
.pb-h-sub {
  font-size: 15px;
  color: var(--pb-muted);
  margin: 0;
  max-width: 640px;
  line-height: 1.55;
}

/* Executive band */
.pb-exec {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 0;
  border-radius: var(--pb-radius);
  overflow: hidden;
  border: 1px solid rgba(34, 229, 154, 0.25);
  background: linear-gradient(135deg, rgba(34,229,154,0.06), rgba(255,255,255,0.02));
  box-shadow: var(--pb-glow);
  margin-bottom: 0;
}
[data-theme="light"] .pb-exec {
  border-color: rgba(5, 150, 105, 0.28);
  background: linear-gradient(135deg, rgba(5, 150, 105, 0.08), rgba(255, 255, 255, 0.9));
}
.pb-exec-main { padding: 32px 36px; }
.pb-exec-verdict {
  font-family: var(--pb-display);
  font-size: 1.2rem;
  font-weight: 600;
  letter-spacing: -0.025em;
  color: var(--pb-accent);
  margin: 0 0 14px;
  line-height: 1.45;
}
.pb-exec-stats {
  padding: 28px 32px;
  background: rgba(0,0,0,0.35);
  border-left: 1px solid var(--pb-border);
  display: flex;
  flex-direction: column;
  justify-content: center;
  gap: 16px;
}
/* Light mode: mint panel, not dark grey glass */
[data-theme="light"] .pb-exec-stats {
  background: linear-gradient(160deg, rgba(5, 150, 105, 0.1), rgba(5, 150, 105, 0.04));
  border-left-color: rgba(5, 150, 105, 0.18);
}
.pb-stat {
  display: flex;
  align-items: baseline;
  gap: 14px;
}
.pb-stat strong {
  font-family: var(--pb-display);
  font-size: 2rem;
  font-weight: 700;
  color: var(--pb-accent);
  letter-spacing: -0.04em;
  min-width: 64px;
}
.pb-stat span { font-size: 13px; color: var(--pb-muted); line-height: 1.45; flex: 1; }

/* Pain bento */
.pb-pain-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 16px;
  margin-bottom: 20px;
}
.pb-pain-card {
  padding: 22px 24px;
  border-radius: var(--pb-radius-sm);
  border: 1px solid var(--pb-border);
  background: var(--pb-surface);
  transition: border-color 0.25s, transform 0.25s;
}
.pb-pain-card:hover {
  border-color: rgba(248, 113, 113, 0.35);
  transform: translateY(-2px);
}
.pb-pain-card h4 {
  font-family: var(--pb-display);
  font-size: 15px;
  margin: 0 0 10px;
  color: var(--pb-text);
}
.pb-pain-cost {
  font-size: 13px;
  color: var(--pb-red);
  margin-bottom: 8px;
  font-weight: 500;
}
.pb-pain-fix {
  font-size: 13px;
  color: var(--pb-muted);
  margin: 0;
  padding-top: 10px;
  border-top: 1px solid var(--pb-border);
}
.pb-pain-fix em { color: var(--pb-accent); font-style: normal; font-weight: 500; }

/* Cards & grids */
.pb-grid-2 { display: grid; grid-template-columns: 1fr 1fr; gap: 18px; }
.pb-grid-3 { display: grid; grid-template-columns: repeat(3, 1fr); gap: 16px; }
.pb-card {
  background: var(--pb-surface);
  border: 1px solid var(--pb-border);
  border-radius: var(--pb-radius);
  padding: 24px 26px;
  transition: border-color 0.25s, box-shadow 0.25s;
}
.pb-card:hover { border-color: var(--pb-border-strong); box-shadow: 0 12px 40px rgba(0,0,0,0.25); }
.pb-card-accent {
  border-color: rgba(34, 229, 154, 0.28);
  background: linear-gradient(145deg, rgba(34,229,154,0.07), var(--pb-surface));
}
.pb-card-warn {
  border-color: rgba(245, 158, 11, 0.28);
  background: linear-gradient(145deg, rgba(245,158,11,0.06), var(--pb-surface));
}
.pb-card-danger {
  border-color: rgba(248, 113, 113, 0.28);
  background: linear-gradient(145deg, rgba(248,113,113,0.05), var(--pb-surface));
}
.pb-callout {
  display: flex;
  gap: 14px;
  align-items: flex-start;
  padding: 18px 22px;
  border-radius: var(--pb-radius-sm);
  border: 1px solid rgba(34, 229, 154, 0.22);
  background: rgba(34, 229, 154, 0.05);
  margin-top: 20px;
}
.pb-callout-icon {
  width: 28px;
  height: 28px;
  border-radius: 8px;
  background: rgba(34,229,154,0.15);
  color: var(--pb-accent);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 14px;
  flex-shrink: 0;
}
.pb-callout p { margin: 0; font-size: 14px; color: var(--pb-muted); }
.pb-callout strong { color: var(--pb-text); }

/* Diagram frame */
.pb-diagram {
  border-radius: var(--pb-radius);
  border: 1px solid var(--pb-border-strong);
  background: rgba(255,255,255,0.02);
  padding: 8px;
  margin: 24px 0;
  overflow: hidden;
  box-shadow: inset 0 1px 0 rgba(255,255,255,0.04);
}

/* Split layouts */
.pb-split {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 32px;
  align-items: start;
}
.pb-split-wide { grid-template-columns: 1.2fr 0.8fr; }

/* Maturity ladder */
.pb-maturity {
  display: flex;
  flex-direction: column;
  gap: 0;
  margin: 20px 0;
  border-radius: var(--pb-radius);
  overflow: hidden;
  border: 1px solid var(--pb-border);
}
.pb-mat-level {
  display: grid;
  grid-template-columns: 56px 140px 1fr;
  gap: 16px;
  align-items: center;
  padding: 16px 20px;
  border-bottom: 1px solid var(--pb-border);
  background: var(--pb-surface);
  font-size: 14px;
}
.pb-mat-level:last-child { border-bottom: none; }
.pb-mat-level.current {
  background: linear-gradient(90deg, rgba(34,229,154,0.1), transparent);
  border-left: 3px solid var(--pb-accent);
}
.pb-mat-num {
  font-family: var(--pb-mono);
  font-size: 12px;
  font-weight: 600;
  color: var(--pb-accent);
}
.pb-mat-level strong { color: var(--pb-text); }
.pb-mat-desc { color: var(--pb-muted); font-size: 13px; }

/* Path cards */
.pb-path {
  border-top: 3px solid var(--pb-amber);
  position: relative;
  overflow: hidden;
}
.pb-path::before {
  content: '';
  position: absolute;
  top: 0; right: 0;
  width: 80px; height: 80px;
  background: radial-gradient(circle, rgba(245,158,11,0.12), transparent 70%);
}
.pb-path h4 {
  font-family: var(--pb-display);
  margin: 0 0 10px;
  font-size: 1.05rem;
}
.pb-path-gaming { border-top-color: var(--pb-amber); }
.pb-path-stream { border-top-color: var(--pb-accent); }
.pb-path-live { border-top-color: var(--pb-violet); }

/* Rollout timeline */
.pb-rollout {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 0;
  border-radius: var(--pb-radius);
  overflow: hidden;
  border: 1px solid var(--pb-border);
}
.pb-rollout-phase {
  padding: 28px 26px;
  border-right: 1px solid var(--pb-border);
  background: var(--pb-surface);
  position: relative;
}
.pb-rollout-phase:last-child { border-right: none; }
.pb-rollout-phase::after {
  content: '';
  position: absolute;
  bottom: 0; left: 26px; right: 26px;
  height: 3px;
  background: linear-gradient(90deg, var(--pb-amber), var(--pb-accent));
  border-radius: 3px 3px 0 0;
  opacity: 0.5;
}
.pb-phase-label {
  font-family: var(--pb-mono);
  font-size: 11px;
  color: var(--pb-amber);
  letter-spacing: 0.08em;
  margin-bottom: 10px;
}
.pb-gate {
  margin-top: 16px;
  padding: 10px 12px;
  border-radius: 8px;
  background: rgba(34,229,154,0.08);
  border: 1px solid rgba(34,229,154,0.2);
  font-size: 12px;
  color: var(--pb-accent-soft);
}
.pb-gate strong { color: var(--pb-accent); }

/* Timeline */
.pb-timeline { margin: 20px 0; }
.pb-tl-item {
  position: relative;
  padding: 0 0 28px 32px;
  border-left: 2px solid var(--pb-border);
  margin-left: 8px;
}
.pb-tl-item:last-child { padding-bottom: 0; border-left-color: transparent; }
.pb-tl-item::before {
  content: '';
  position: absolute;
  left: -9px;
  top: 4px;
  width: 16px;
  height: 16px;
  border-radius: 50%;
  background: var(--pb-accent);
  border: 3px solid var(--pb-bg);
  box-shadow: 0 0 12px var(--pb-accent-glow);
}
.pb-tl-time {
  font-family: var(--pb-mono);
  font-size: 11px;
  color: var(--pb-amber);
  margin-bottom: 4px;
}
.pb-tl-item strong { color: var(--pb-text); display: block; margin-bottom: 4px; }
.pb-tl-item p { margin: 0; font-size: 14px; color: var(--pb-muted); }

/* Metric cards */
.pb-metric-card {
  border: 1px solid var(--pb-border);
  border-radius: var(--pb-radius);
  overflow: hidden;
  margin: 18px 0;
  background: var(--pb-surface);
  transition: border-color 0.25s;
}
.pb-metric-card:hover { border-color: rgba(34,229,154,0.3); }
.pb-metric-head {
  padding: 18px 24px;
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 12px;
  background: linear-gradient(90deg, rgba(34,229,154,0.08), transparent);
  border-bottom: 1px solid var(--pb-border);
}
.pb-metric-head h4 {
  margin: 0;
  font-family: var(--pb-display);
  font-size: 1.1rem;
}
.pb-badge {
  font-family: var(--pb-mono);
  font-size: 10px;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  padding: 5px 12px;
  border-radius: 20px;
  background: rgba(34,229,154,0.12);
  color: var(--pb-accent);
  border: 1px solid rgba(34,229,154,0.25);
}
.pb-metric-body { padding: 20px 24px; }
.pb-metric-row {
  display: grid;
  grid-template-columns: 130px 1fr;
  gap: 8px 20px;
  font-size: 14px;
  margin-bottom: 10px;
  padding-bottom: 10px;
  border-bottom: 1px solid rgba(255,255,255,0.04);
}
.pb-metric-row:last-child { border-bottom: none; margin-bottom: 0; padding-bottom: 0; }
.pb-metric-row dt { color: var(--pb-faint); font-weight: 500; margin: 0; font-family: var(--pb-mono); font-size: 11px; text-transform: uppercase; letter-spacing: 0.04em; }
.pb-metric-row dd { color: var(--pb-muted); margin: 0; }
.pb-metric-row code {
  font-family: var(--pb-mono);
  font-size: 12px;
  color: var(--pb-accent-soft);
  background: rgba(34,229,154,0.08);
  padding: 2px 6px;
  border-radius: 4px;
}

/* Queries */
.pb-query-list { display: flex; flex-direction: column; gap: 12px; }
.pb-query-block {
  border-radius: var(--pb-radius-sm);
  border: 1px solid var(--pb-border);
  background: var(--pb-surface);
  overflow: hidden;
  transition: border-color 0.2s;
}
.pb-query-block:hover { border-color: rgba(34,229,154,0.3); }
.pb-query-top {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  padding: 12px 14px 0 18px;
}
.pb-query-label {
  font-size: 10px;
  text-transform: uppercase;
  letter-spacing: 0.1em;
  color: var(--pb-faint);
  padding: 0;
  font-family: var(--pb-mono);
  flex: 1;
  min-width: 0;
}
.pb-query-copy {
  flex-shrink: 0;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 28px;
  height: 28px;
  padding: 0;
  border: 1px solid var(--pb-border);
  border-radius: 8px;
  background: rgba(255,255,255,0.03);
  color: var(--pb-faint);
  cursor: pointer;
  transition: color 0.2s, border-color 0.2s, background 0.2s;
}
.pb-query-copy:hover {
  color: var(--pb-accent);
  border-color: rgba(34,229,154,0.35);
  background: rgba(34,229,154,0.08);
}
.pb-query-copy.copied {
  color: var(--pb-accent);
  border-color: rgba(34,229,154,0.4);
  background: rgba(34,229,154,0.12);
}
.pb-query-copy svg { display: block; }
.pb-query {
  font-family: var(--pb-mono);
  font-size: 13px;
  padding: 10px 18px 14px;
  color: var(--pb-accent-soft);
  margin: 0;
  line-height: 1.55;
}

/* Glossary */
.pb-gloss-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 14px;
}
.pb-gloss-item {
  padding: 18px 20px;
  background: var(--pb-surface);
  border: 1px solid var(--pb-border);
  border-radius: var(--pb-radius-sm);
  transition: border-color 0.2s;
}
.pb-gloss-item:hover { border-color: var(--pb-border-strong); }
.pb-gloss-item dt {
  font-weight: 600;
  color: var(--pb-text);
  margin: 0 0 6px;
  font-family: var(--pb-display);
  font-size: 15px;
}
.pb-gloss-item dd { margin: 0; font-size: 14px; color: var(--pb-muted); line-height: 1.5; }
.pb-gloss-why {
  display: block;
  margin-top: 10px;
  font-size: 12px;
  color: var(--pb-amber-soft);
  padding-top: 10px;
  border-top: 1px solid var(--pb-border);
}

/* Table */
.pb-table-wrap {
  overflow-x: auto;
  border-radius: var(--pb-radius-sm);
  border: 1px solid var(--pb-border);
  background: var(--pb-surface);
}
table.pb-table { width: 100%; border-collapse: collapse; font-size: 14px; }
.pb-table th, .pb-table td {
  padding: 14px 18px;
  text-align: left;
  border-bottom: 1px solid var(--pb-border);
  vertical-align: top;
}
.pb-table th {
  background: rgba(255,255,255,0.03);
  color: var(--pb-text);
  font-family: var(--pb-mono);
  font-size: 10px;
  text-transform: uppercase;
  letter-spacing: 0.08em;
}
.pb-table td { color: var(--pb-muted); }
.pb-table tr:last-child td { border-bottom: none; }
.pb-table td strong { color: var(--pb-text); }

/* Steps & checks */
.pb-steps { counter-reset: pbstep; list-style: none; padding: 0; margin: 0; }
.pb-steps li {
  counter-increment: pbstep;
  position: relative;
  padding: 0 0 20px 44px;
}
.pb-steps li::before {
  content: counter(pbstep);
  position: absolute;
  left: 0; top: 0;
  width: 28px; height: 28px;
  border-radius: 50%;
  background: linear-gradient(135deg, var(--pb-accent), var(--pb-accent-dim));
  color: #000;
  font-size: 12px;
  font-weight: 700;
  display: flex;
  align-items: center;
  justify-content: center;
  font-family: var(--pb-display);
  box-shadow: 0 0 16px var(--pb-accent-glow);
}
.pb-steps li strong { color: var(--pb-text); }
.pb-steps li p { margin: 4px 0 0; font-size: 14px; color: var(--pb-muted); }

.pb-check { list-style: none; padding: 0; margin: 0; }
.pb-check li {
  padding: 8px 0 8px 28px;
  position: relative;
  color: var(--pb-muted);
  font-size: 14px;
}
.pb-check li::before {
  content: '✓';
  position: absolute;
  left: 0;
  color: var(--pb-accent);
  font-weight: 700;
  font-size: 15px;
}

.pb-comms {
  font-family: var(--pb-mono);
  font-size: 12px;
  line-height: 1.75;
  background: rgba(0,0,0,0.5);
  border: 1px solid var(--pb-border);
  border-radius: var(--pb-radius-sm);
  padding: 20px 22px;
  color: rgba(255,255,255,0.7);
  white-space: pre-wrap;
}

.pb-h3 {
  font-family: var(--pb-display);
  font-size: 1.1rem;
  margin: 0 0 12px;
  letter-spacing: -0.02em;
}

/* Workflow cards */
.pb-workflow-card {
  padding: 24px;
  border-radius: var(--pb-radius);
  border: 1px solid var(--pb-border);
  background: var(--pb-surface);
  height: 100%;
}
.pb-workflow-card .pb-wf-icon {
  width: 40px; height: 40px;
  border-radius: 12px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 18px;
  margin-bottom: 14px;
  background: rgba(34,229,154,0.1);
  border: 1px solid rgba(34,229,154,0.2);
}

/* CTA */
.pb-cta-band {
  border-radius: var(--pb-radius);
  padding: 40px 44px;
  text-align: center;
  background:
    radial-gradient(ellipse 80% 100% at 50% 100%, rgba(34,229,154,0.15), transparent),
    var(--pb-surface);
  border: 1px solid rgba(34,229,154,0.25);
  box-shadow: var(--pb-glow);
}
.pb-cta-band h2 { font-family: var(--pb-display); font-size: 1.5rem; margin: 0 0 12px; letter-spacing: -0.03em; }
.pb-cta-band p { color: var(--pb-muted); margin: 0 0 24px; }
.pb-cta-row { display: flex; flex-wrap: wrap; gap: 12px; justify-content: center; }
.pb-cta-primary, .pb-cta-ghost {
  display: inline-flex;
  align-items: center;
  padding: 12px 22px;
  border-radius: 12px;
  font-size: 14px;
  font-weight: 600;
  text-decoration: none;
  font-family: var(--pb-display);
  transition: transform 0.2s, box-shadow 0.2s;
}
.pb-cta-primary {
  background: var(--pb-accent);
  color: #000;
  box-shadow: 0 0 24px var(--pb-accent-glow);
}
.pb-cta-primary:hover { transform: translateY(-2px); box-shadow: 0 0 32px var(--pb-accent-glow); }
.pb-cta-ghost {
  border: 1px solid var(--pb-border-strong);
  color: var(--pb-text);
  background: rgba(255,255,255,0.03);
}
.pb-cta-ghost:hover { border-color: var(--pb-accent); }

.pb-footer {
  margin-top: 64px;
  padding-top: 28px;
  border-top: 1px solid var(--pb-border);
  font-size: 13px;
  color: var(--pb-faint);
  text-align: center;
}
.pb-footer a { color: var(--pb-accent); text-decoration: none; }
.pb-footer a:hover { text-decoration: underline; }

code {
  font-family: var(--pb-mono);
  font-size: 0.88em;
  color: var(--pb-accent-soft);
  background: rgba(34,229,154,0.08);
  padding: 2px 7px;
  border-radius: 5px;
}

[data-theme="light"] code {
  color: var(--pb-accent-soft);
  background: rgba(5, 150, 105, 0.1);
}

[data-theme="light"] .pb-comms,
[data-theme="light"] .pb-query {
  background: #1e293b;
  color: #e2e8f0;
}

[data-theme="light"] .pb-cover-visual {
  background:
    radial-gradient(ellipse 70% 70% at 50% 50%, rgba(5, 150, 105, 0.1), transparent),
    #f0fdf6;
}
[data-theme="light"] .pb-cover-copy {
  background:
    radial-gradient(ellipse 100% 80% at 0% 100%, rgba(5,150,105,0.08), transparent 55%),
    radial-gradient(ellipse 60% 50% at 100% 0%, rgba(245,158,11,0.05), transparent 50%),
    #ffffff;
}
/* Diagram / illustration cards stay light in light mode */
[data-theme="light"] .pb-illus {
  filter: none;
}
[data-theme="light"] .pb-card,
[data-theme="light"] .pb-pain-card,
[data-theme="light"] .pb-workflow-card,
[data-theme="light"] .pb-metric-card {
  background: #ffffff;
  border-color: rgba(15, 23, 42, 0.1);
  box-shadow: 0 8px 28px rgba(15, 23, 42, 0.04);
}

@media (max-width: 1024px) {
  .pb-shell { grid-template-columns: 1fr; }
  .pb-sidebar { display: none; }
  .pb-cover-grid { grid-template-columns: 1fr; }
  .pb-cover-visual { border-left: none; border-top: 1px solid var(--pb-border); min-height: 260px; }
  .pb-exec { grid-template-columns: 1fr; }
  .pb-exec-stats { border-left: none; border-top: 1px solid var(--pb-border); }
  .pb-split, .pb-split-wide { grid-template-columns: 1fr; }
  .pb-pain-grid, .pb-grid-2, .pb-grid-3, .pb-gloss-grid { grid-template-columns: 1fr; }
  .pb-rollout { grid-template-columns: 1fr; }
  .pb-rollout-phase { border-right: none; border-bottom: 1px solid var(--pb-border); }
  .pb-mat-level { grid-template-columns: 48px 1fr; }
  .pb-mat-desc { grid-column: 1 / -1; padding-left: 48px; }
  .pb-wrap { padding: 32px 20px 80px; }
}

@media print {
  body.pb::before, .pb-sidebar, .pb-progress, .pb-theme-toggle-fixed { display: none !important; }
  .pb-shell { display: block; }
  body.pb { background: #fff; color: #111; }
  .pb-cover, .pb-card, .pb-exec, .pb-metric-card { break-inside: avoid; box-shadow: none; }
  .pb-cover { background: #f6f8f7; }
  p, li, td, dd { color: #1a1a1a !important; }
}