/* ═══════════════════════════════════════════════════════════════
   QTSI — books.css  v2
   THE AI MANDATE — Premium Digital Reading Experience
   Design by NEXORA (nexorayyc.io)
═══════════════════════════════════════════════════════════════ */

/* ── Gold tokens ──────────────────────────────────────────── */
:root {
  --gold:          #C9A84C;
  --gold-light:    #E8C97A;
  --gold-dim:      rgba(201,168,76,.16);
  --gold-border:   rgba(201,168,76,.28);
  --gold-glow:     0 0 56px rgba(201,168,76,.20);
  --bk-reader-bg:  #0B0D18;
  --bk-surface:    #0F1120;
  --bk-pull-bg:    #0A1028;
  --bk-rule:       rgba(201,168,76,.22);
  --bk-page-cream: #F7F3EA;
  --bk-page-warm:  #EDE8DA;
  --bk-ink:        #1A1A2E;
}

/* ══════════════════════════════════════════════════════════════
   READING PROGRESS BAR
══════════════════════════════════════════════════════════════ */
#bk-progress {
  position: fixed;
  top: 0;
  left: 0;
  width: 0%;
  height: 3px;
  background: linear-gradient(90deg, var(--gold), #E8C97A, var(--gold));
  z-index: 9999;
  transition: width 0.1s linear;
  pointer-events: none;
}

/* ══════════════════════════════════════════════════════════════
   1. HERO
══════════════════════════════════════════════════════════════ */
.bk-hero {
  position: relative;
  min-height: 100dvh;
  display: flex;
  align-items: center;
  background:
    linear-gradient(160deg, rgba(7,7,12,1) 0%, rgba(8,9,20,.96) 100%),
    radial-gradient(ellipse 70% 60% at 70% 45%, rgba(4,50,80,.70) 0%, transparent 75%),
    radial-gradient(ellipse 50% 70% at 18% 65%, rgba(10,30,70,.50) 0%, transparent 72%),
    #07070C;
  overflow: hidden;
  padding: 110px 0 80px;
}

.bk-hero::before {
  content: '';
  position: absolute;
  inset: 0;
  background:
    radial-gradient(ellipse 40% 35% at 68% 40%, rgba(201,168,76,.07) 0%, transparent 65%);
  pointer-events: none;
}

.bk-hero-inner {
  position: relative;
  z-index: 2;
  display: grid;
  grid-template-columns: 52% 48%;
  align-items: center;
  gap: clamp(40px, 5vw, 80px);
}

/* Copy column */
.bk-hero-copy { max-width: 600px; }

.book-eyebrow {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  font-size: 0.7rem;
  font-weight: 700;
  letter-spacing: 0.15em;
  text-transform: uppercase;
  color: var(--gold-light);
  padding: 6px 14px;
  border-radius: var(--r-full);
  border: 1px solid var(--gold-border);
  background: var(--gold-dim);
}

.book-eyebrow-rule {
  display: block;
  width: 44px;
  height: 2px;
  background: linear-gradient(90deg, var(--gold), transparent);
  margin: 20px 0 22px;
}

.bk-hero-title {
  font-size: clamp(2.6rem, 5.8vw, 4.6rem);
  font-weight: 900;
  line-height: 1.02;
  letter-spacing: -0.035em;
  color: var(--text-primary);
  margin: 0;
}

.bk-title-gold { color: var(--gold-light); }

.bk-hero-sub {
  font-size: clamp(1rem, 1.6vw, 1.15rem);
  color: var(--text-secondary);
  margin: 20px 0 0;
  line-height: 1.6;
  max-width: 480px;
  font-style: italic;
}

/* Author line */
.bk-author-line {
  display: flex;
  align-items: center;
  gap: 14px;
  margin-top: 28px;
  padding: 16px 20px;
  background: rgba(255,255,255,.04);
  border: 1px solid var(--border);
  border-left: 3px solid var(--gold);
  border-radius: 0 var(--r-sm) var(--r-sm) 0;
}

.bk-author-photo {
  width: 48px;
  height: 48px;
  border-radius: 50%;
  object-fit: cover;
  border: 2px solid var(--gold-border);
  flex-shrink: 0;
}

.bk-author-info { display: flex; flex-direction: column; gap: 2px; }

.bk-author-name {
  font-size: 0.88rem;
  font-weight: 700;
  color: var(--text-primary);
}

.bk-author-role {
  font-size: 0.76rem;
  color: var(--gold-light);
  font-weight: 500;
}

.bk-author-quals {
  font-size: 0.72rem;
  color: var(--text-muted);
  letter-spacing: 0.03em;
}

/* Hero stats */
.bk-hero-stats {
  display: flex;
  gap: 0;
  margin-top: 28px;
  border: 1px solid var(--border);
  border-radius: var(--r-md);
  overflow: hidden;
  background: rgba(255,255,255,.02);
}

.bk-hero-stat {
  flex: 1;
  padding: 16px 18px;
  border-right: 1px solid var(--border);
  position: relative;
}

.bk-hero-stat:last-child { border-right: none; }

.bk-stat-n {
  display: block;
  font-size: clamp(1.4rem, 2.2vw, 1.9rem);
  font-weight: 900;
  color: var(--gold-light);
  line-height: 1;
  letter-spacing: -0.03em;
}

.bk-stat-l {
  display: block;
  font-size: 0.65rem;
  color: var(--text-muted);
  line-height: 1.4;
  margin-top: 4px;
  letter-spacing: 0.02em;
}

/* CTAs */
.bk-hero-ctas {
  display: flex;
  gap: 14px;
  margin-top: 28px;
  flex-wrap: wrap;
  align-items: center;
}

.btn-gold {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 14px 26px;
  border-radius: var(--r-md);
  background: linear-gradient(135deg, #C9A84C 0%, #E8C97A 48%, #C9A84C 100%);
  color: #07070C;
  font-size: 0.88rem;
  font-weight: 700;
  letter-spacing: 0.03em;
  border: none;
  cursor: pointer;
  transition: box-shadow 200ms, transform 150ms;
  min-height: 48px;
  text-decoration: none;
  box-shadow: 0 4px 28px rgba(201,168,76,.32);
}

.btn-gold:hover {
  box-shadow: 0 6px 40px rgba(201,168,76,.50);
  transform: translateY(-1px);
}

.btn-gold:active { transform: translateY(0); }

.bk-hero-scroll-hint {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-top: 28px;
  font-size: 0.7rem;
  color: var(--text-muted);
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.bk-scroll-arrow {
  width: 20px;
  height: 20px;
  border: 1px solid var(--border-md);
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  animation: bkBounce 2s ease-in-out infinite;
}

@keyframes bkBounce {
  0%,100% { transform: translateY(0); }
  50%      { transform: translateY(4px); }
}

/* ══════════════════════════════════════════════════════════════
   2. 3D BOOK
══════════════════════════════════════════════════════════════ */
.bk-visual {
  display: flex;
  align-items: center;
  justify-content: center;
  position: relative;
  padding: 40px 20px;
}

.bk-3d-scene {
  perspective: 1100px;
  perspective-origin: 50% 45%;
  position: relative;
}

.bk-book {
  position: relative;
  width: 280px;
  height: 360px;
  transform-style: preserve-3d;
  transform: rotateY(-28deg) rotateX(5deg);
  transition: transform 0.18s ease-out;
  cursor: pointer;
  filter: drop-shadow(0 50px 70px rgba(0,0,0,.85));
}

.bk-book:hover .bk-cover-hint { opacity: 1; }

/* Front cover face */
.bk-cover-face {
  position: absolute;
  inset: 0;
  border-radius: 3px 8px 8px 3px;
  overflow: hidden;
  backface-visibility: hidden;
}

.bk-cover-face img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}

/* Hover hint overlay */
.bk-cover-hint {
  position: absolute;
  inset: 0;
  background: rgba(0,0,0,.65);
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 12px;
  opacity: 0;
  transition: opacity 250ms;
  border-radius: 3px 8px 8px 3px;
  color: #fff;
  font-size: 0.82rem;
  font-weight: 600;
  letter-spacing: 0.05em;
}

.bk-cover-hint svg {
  width: 36px;
  height: 36px;
  stroke: var(--gold-light);
}

/* Spine */
.bk-spine {
  position: absolute;
  left: 0;
  top: 0;
  width: 32px;
  height: 100%;
  transform-origin: right center;
  transform: rotateY(-90deg);
  background: linear-gradient(180deg, #18192E 0%, #0F1020 50%, #0A0B18 100%);
  border-radius: 4px 0 0 4px;
  display: flex;
  align-items: center;
  justify-content: center;
  overflow: hidden;
}

.bk-spine::after {
  content: '';
  position: absolute;
  inset: 0;
  background: linear-gradient(90deg, rgba(201,168,76,.18) 0%, transparent 40%);
}

.bk-spine-text {
  font-size: 0.52rem;
  font-weight: 700;
  letter-spacing: 0.18em;
  color: var(--gold);
  writing-mode: vertical-rl;
  text-orientation: mixed;
  transform: rotate(180deg);
  white-space: nowrap;
  z-index: 1;
}

/* Pages edge */
.bk-pages-edge {
  position: absolute;
  right: 0;
  top: 0;
  width: 10px;
  height: 100%;
  transform-origin: left center;
  transform: rotateY(90deg);
  background:
    repeating-linear-gradient(
      to bottom,
      #EDE5D0 0px, #EDE5D0 1px,
      #E0D8C5 1px, #E0D8C5 2px,
      #EDE5D0 2px, #EDE5D0 3px,
      #D8D0BC 3px, #D8D0BC 4px
    );
  border-radius: 0 2px 2px 0;
}

/* Top edge */
.bk-top-edge {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 10px;
  transform-origin: bottom center;
  transform: rotateX(90deg);
  background:
    linear-gradient(90deg, #18192E 32px, #E8E0CC 32px);
  border-radius: 3px 8px 0 0;
}

/* Bottom edge */
.bk-bottom-edge {
  position: absolute;
  bottom: 0;
  left: 0;
  width: 100%;
  height: 10px;
  transform-origin: top center;
  transform: rotateX(-90deg);
  background:
    linear-gradient(90deg, #18192E 32px, #E8E0CC 32px);
  border-radius: 0 0 8px 3px;
}

/* Gold ambient glow */
.bk-book-glow {
  position: absolute;
  inset: -30%;
  background: radial-gradient(ellipse 70% 60% at 55% 55%, rgba(201,168,76,.18) 0%, transparent 65%);
  pointer-events: none;
  z-index: -1;
  transition: opacity 200ms;
}

/* Reflection/shadow on ground */
.bk-book-shadow {
  position: absolute;
  bottom: -30px;
  left: 50%;
  transform: translateX(-50%);
  width: 260px;
  height: 50px;
  background: radial-gradient(ellipse 80% 100%, rgba(0,0,0,.60) 0%, transparent 70%);
  filter: blur(12px);
  pointer-events: none;
}

/* ══════════════════════════════════════════════════════════════
   3. CHAPTER OVERVIEW GRID
══════════════════════════════════════════════════════════════ */
.bk-overview {
  background: var(--bg-raised);
  padding: 80px 0;
  border-top: 1px solid var(--border);
  border-bottom: 1px solid var(--border);
}

.bk-section-head {
  text-align: center;
  margin-bottom: 48px;
}

.bk-section-head h2 {
  font-size: clamp(1.6rem, 3vw, 2.4rem);
  font-weight: 800;
  color: var(--text-primary);
  margin: 12px 0 0;
  letter-spacing: -0.025em;
}

.bk-overview-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 2px;
  border: 1px solid var(--border);
  border-radius: var(--r-lg);
  overflow: hidden;
}

.bk-ch-card {
  display: flex;
  align-items: flex-start;
  gap: 16px;
  padding: 24px 22px;
  background: var(--bg-elevated);
  text-decoration: none;
  transition: background 160ms;
  border: none;
}

.bk-ch-card:hover { background: var(--bg-surface-md); }

.bk-ch-card:hover .bk-ch-card-num { color: var(--gold-light); }

.bk-ch-card-num {
  font-size: 1.6rem;
  font-weight: 900;
  color: var(--gold);
  line-height: 1;
  letter-spacing: -0.05em;
  min-width: 42px;
  transition: color 160ms;
  font-variant-numeric: tabular-nums;
}

.bk-ch-card-body { flex: 1; }

.bk-ch-card-title {
  font-size: 0.88rem;
  font-weight: 700;
  color: var(--text-primary);
  line-height: 1.3;
  display: block;
}

.bk-ch-card-desc {
  font-size: 0.75rem;
  color: var(--text-muted);
  line-height: 1.5;
  margin-top: 4px;
  display: block;
}

.bk-ch-card-time {
  font-size: 0.65rem;
  color: var(--gold);
  font-weight: 600;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  margin-top: 8px;
  display: flex;
  align-items: center;
  gap: 5px;
}

/* ══════════════════════════════════════════════════════════════
   4. THE READER
══════════════════════════════════════════════════════════════ */
.bk-reader-wrap {
  background: var(--bk-reader-bg);
  border-top: 1px solid var(--border);
}

.bk-reader-layout {
  display: grid;
  grid-template-columns: 220px 1fr;
  min-height: 80vh;
  position: relative;
}

/* Chapter nav (sticky sidebar) */
.bk-ch-nav {
  position: sticky;
  top: 72px;
  align-self: start;
  height: calc(100vh - 80px);
  overflow-y: auto;
  padding: 40px 0;
  border-right: 1px solid var(--border);
  background: rgba(11,13,24,.95);
  scrollbar-width: thin;
  scrollbar-color: var(--border) transparent;
}

.bk-ch-nav::-webkit-scrollbar { width: 3px; }
.bk-ch-nav::-webkit-scrollbar-thumb { background: var(--border-md); border-radius: 2px; }

.bk-nav-label {
  font-size: 0.62rem;
  font-weight: 700;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: var(--text-muted);
  padding: 0 22px 12px;
  border-bottom: 1px solid var(--border);
  margin-bottom: 8px;
}

.bk-nav-list {
  list-style: none;
  margin: 0;
  padding: 0;
}

.bk-nav-item { margin: 0; }

.bk-nav-link {
  display: flex;
  align-items: flex-start;
  gap: 10px;
  padding: 10px 22px;
  text-decoration: none;
  color: var(--text-muted);
  font-size: 0.76rem;
  font-weight: 500;
  line-height: 1.4;
  transition: color 150ms, background 150ms;
  position: relative;
}

.bk-nav-link::before {
  content: '';
  position: absolute;
  left: 0;
  top: 50%;
  transform: translateY(-50%) scaleY(0);
  width: 2px;
  height: 60%;
  background: var(--gold);
  border-radius: 0 1px 1px 0;
  transition: transform 200ms;
}

.bk-nav-link:hover { color: var(--text-secondary); background: rgba(255,255,255,.03); }

.bk-nav-link.is-active {
  color: var(--gold-light);
  font-weight: 600;
}

.bk-nav-link.is-active::before { transform: translateY(-50%) scaleY(1); }

.bk-nav-link-num {
  font-size: 0.64rem;
  font-weight: 700;
  color: var(--gold);
  letter-spacing: 0.06em;
  opacity: 0.7;
  flex-shrink: 0;
  padding-top: 1px;
}

.bk-nav-link.is-active .bk-nav-link-num { opacity: 1; }

/* Reader content area */
.bk-reader-content {
  padding: 0;
  max-width: 100%;
}

/* Individual chapter */
.bk-chapter {
  padding: 72px clamp(28px, 5vw, 72px) 80px;
  border-bottom: 1px solid var(--border);
  scroll-margin-top: 80px;
}

.bk-chapter:last-child { border-bottom: none; }

/* Chapter header */
.bk-ch-header {
  display: flex;
  align-items: flex-start;
  gap: 20px;
  margin-bottom: 40px;
  padding-bottom: 32px;
  border-bottom: 1px solid var(--bk-rule);
}

.bk-ch-num {
  font-size: 3.5rem;
  font-weight: 900;
  line-height: 1;
  color: var(--gold);
  letter-spacing: -0.05em;
  opacity: 0.6;
  flex-shrink: 0;
  font-variant-numeric: tabular-nums;
}

.bk-ch-title-wrap { flex: 1; }

.bk-ch-title {
  font-size: clamp(1.5rem, 2.5vw, 2.1rem);
  font-weight: 800;
  color: var(--text-primary);
  line-height: 1.15;
  letter-spacing: -0.025em;
  margin: 0;
}

.bk-ch-subtitle {
  font-size: 0.9rem;
  color: var(--gold-light);
  font-style: italic;
  margin-top: 6px;
  display: block;
}

.bk-ch-time {
  font-size: 0.68rem;
  font-weight: 600;
  color: var(--text-muted);
  letter-spacing: 0.10em;
  text-transform: uppercase;
  margin-top: 10px;
  display: flex;
  align-items: center;
  gap: 6px;
}

/* Chapter body — editorial typography */
.bk-ch-body {
  max-width: 680px;
}

.bk-ch-lead {
  font-size: clamp(1rem, 1.6vw, 1.15rem);
  font-weight: 700;
  color: var(--gold-light);
  letter-spacing: 0.02em;
  text-transform: uppercase;
  font-size: 0.75rem;
  letter-spacing: 0.12em;
  margin-bottom: 20px;
}

.bk-ch-body p {
  font-size: clamp(0.95rem, 1.4vw, 1.05rem);
  line-height: 1.85;
  color: var(--text-secondary);
  margin: 0 0 22px;
}

.bk-ch-body p strong {
  color: var(--text-primary);
  font-weight: 600;
}

.bk-ch-body p em {
  color: var(--text-primary);
  font-style: italic;
}

/* Pull quote */
.bk-pullquote {
  border-left: 3px solid var(--gold);
  background: var(--bk-pull-bg);
  padding: 24px 28px;
  margin: 36px 0;
  border-radius: 0 var(--r-sm) var(--r-sm) 0;
  position: relative;
}

.bk-pullquote::before {
  content: '"';
  position: absolute;
  top: -8px;
  left: 20px;
  font-size: 4rem;
  color: var(--gold);
  line-height: 1;
  opacity: 0.4;
  font-family: Georgia, serif;
}

.bk-pullquote p {
  font-size: 1.1rem !important;
  font-style: italic;
  color: var(--text-primary) !important;
  line-height: 1.65 !important;
  margin: 0 0 8px !important;
}

.bk-pullquote cite {
  font-size: 0.75rem;
  color: var(--gold);
  font-style: normal;
  font-weight: 600;
  letter-spacing: 0.05em;
}

/* Stat callout */
.bk-stat-callout {
  background: linear-gradient(135deg, rgba(201,168,76,.08) 0%, rgba(201,168,76,.04) 100%);
  border: 1px solid var(--gold-border);
  border-radius: var(--r-md);
  padding: 24px 28px;
  margin: 32px 0;
  display: flex;
  align-items: flex-start;
  gap: 20px;
}

.bk-callout-num {
  font-size: clamp(2.4rem, 4vw, 3.2rem);
  font-weight: 900;
  color: var(--gold-light);
  line-height: 1;
  letter-spacing: -0.04em;
  flex-shrink: 0;
}

.bk-callout-body { flex: 1; }

.bk-callout-text {
  font-size: 0.95rem;
  color: var(--text-secondary);
  line-height: 1.55;
  margin: 0;
}

.bk-callout-source {
  font-size: 0.68rem;
  color: var(--text-muted);
  margin-top: 6px;
  letter-spacing: 0.05em;
  display: block;
}

/* ═══ FRAMEWORK COMPONENTS ═══ */

/* Maturity model */
.bk-maturity-track {
  margin: 36px 0;
  background: var(--bk-surface);
  border: 1px solid var(--border);
  border-radius: var(--r-lg);
  padding: 32px 28px;
}

.bk-maturity-title {
  font-size: 0.7rem;
  font-weight: 700;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--gold);
  margin: 0 0 24px;
}

.bk-maturity-levels {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 0;
  position: relative;
}

.bk-maturity-levels::before {
  content: '';
  position: absolute;
  top: 24px;
  left: calc(12.5% + 1px);
  right: calc(12.5% + 1px);
  height: 2px;
  background: linear-gradient(90deg, var(--gold) 0%, var(--gold) 25%, var(--border-md) 25%);
}

.bk-ml {
  text-align: center;
  padding: 0 12px;
  position: relative;
}

.bk-ml-dot {
  width: 48px;
  height: 48px;
  border-radius: 50%;
  background: var(--bg-elevated);
  border: 2px solid var(--border);
  display: flex;
  align-items: center;
  justify-content: center;
  margin: 0 auto 12px;
  font-size: 1rem;
  font-weight: 800;
  color: var(--text-muted);
  position: relative;
  z-index: 1;
  transition: border-color 200ms, background 200ms;
}

.bk-ml--active .bk-ml-dot {
  border-color: var(--gold);
  background: linear-gradient(135deg, rgba(201,168,76,.20), rgba(201,168,76,.10));
  color: var(--gold-light);
  box-shadow: 0 0 20px rgba(201,168,76,.20);
}

.bk-ml-name {
  font-size: 0.72rem;
  font-weight: 700;
  color: var(--text-secondary);
  letter-spacing: 0.05em;
  display: block;
  margin-bottom: 6px;
}

.bk-ml--active .bk-ml-name { color: var(--gold-light); }

.bk-ml-desc {
  font-size: 0.68rem;
  color: var(--text-muted);
  line-height: 1.4;
  margin: 0;
}

.bk-ml-badge {
  font-size: 0.58rem;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  padding: 2px 8px;
  border-radius: var(--r-full);
  margin-top: 8px;
  display: inline-block;
}

.bk-ml--majority .bk-ml-badge,
.bk-ml-badge.bk-ml--majority { background: rgba(0,112,243,.15); color: var(--blue-light); }
.bk-ml--rare .bk-ml-badge,
.bk-ml-badge.bk-ml--rare     { background: rgba(93,185,55,.12); color: var(--green-light); }

/* Data leakage table */
.bk-table-wrap {
  margin: 32px 0;
  overflow-x: auto;
  border-radius: var(--r-md);
  border: 1px solid var(--border);
}

.bk-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 0.82rem;
}

.bk-table thead tr {
  background: rgba(201,168,76,.08);
  border-bottom: 1px solid var(--gold-border);
}

.bk-table th {
  padding: 12px 16px;
  text-align: left;
  font-size: 0.66rem;
  font-weight: 700;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--gold);
  white-space: nowrap;
}

.bk-table td {
  padding: 11px 16px;
  color: var(--text-secondary);
  border-bottom: 1px solid var(--border);
  vertical-align: top;
  line-height: 1.45;
}

.bk-table tr:last-child td { border-bottom: none; }

.bk-table tbody tr:hover { background: rgba(255,255,255,.025); }

.bk-risk-restricted {
  display: inline-block;
  padding: 2px 8px;
  border-radius: var(--r-full);
  font-size: 0.62rem;
  font-weight: 700;
  letter-spacing: 0.06em;
  background: rgba(239,68,68,.14);
  color: #F87171;
  text-transform: uppercase;
}

.bk-risk-confidential {
  display: inline-block;
  padding: 2px 8px;
  border-radius: var(--r-full);
  font-size: 0.62rem;
  font-weight: 700;
  letter-spacing: 0.06em;
  background: rgba(251,191,36,.14);
  color: #FCD34D;
  text-transform: uppercase;
}

/* Before / After comparison */
.bk-before-after {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 0;
  margin: 36px 0;
  border: 1px solid var(--border);
  border-radius: var(--r-md);
  overflow: hidden;
}

.bk-ba-panel {
  padding: 24px;
}

.bk-ba-panel--before { background: rgba(239,68,68,.06); border-right: 1px solid var(--border); }
.bk-ba-panel--after  { background: rgba(93,185,55,.05); }

.bk-ba-label {
  font-size: 0.64rem;
  font-weight: 800;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  padding: 3px 10px;
  border-radius: var(--r-full);
  display: inline-block;
  margin-bottom: 14px;
}

.bk-ba-label--before { background: rgba(239,68,68,.18); color: #F87171; }
.bk-ba-label--after  { background: rgba(93,185,55,.18);  color: var(--green-light); }

.bk-ba-text {
  font-family: 'Courier New', Courier, monospace;
  font-size: 0.78rem;
  line-height: 1.7;
  color: var(--text-secondary);
  background: rgba(0,0,0,.25);
  padding: 14px 16px;
  border-radius: var(--r-sm);
  margin-bottom: 12px;
}

.bk-ba-text .redacted { color: var(--gold-light); font-weight: 700; }

.bk-ba-verdict {
  font-size: 0.75rem;
  font-weight: 600;
  display: flex;
  align-items: flex-start;
  gap: 8px;
  line-height: 1.4;
}

.bk-ba-verdict--bad  { color: #F87171; }
.bk-ba-verdict--good { color: var(--green-light); }

/* Three Red Lines */
.bk-red-lines {
  display: flex;
  flex-direction: column;
  gap: 16px;
  margin: 32px 0;
}

.bk-rl-card {
  display: flex;
  gap: 20px;
  align-items: flex-start;
  background: var(--bk-surface);
  border: 1px solid var(--border);
  border-left: 4px solid var(--gold);
  border-radius: 0 var(--r-md) var(--r-md) 0;
  padding: 20px 22px;
}

.bk-rl-num {
  font-size: 1.8rem;
  font-weight: 900;
  color: var(--gold);
  line-height: 1;
  letter-spacing: -0.04em;
  flex-shrink: 0;
  min-width: 32px;
}

.bk-rl-title {
  font-size: 0.82rem;
  font-weight: 700;
  color: var(--text-primary);
  letter-spacing: 0.04em;
  text-transform: uppercase;
  display: block;
  margin-bottom: 6px;
}

.bk-rl-rule {
  font-size: 0.88rem;
  color: var(--text-primary);
  font-weight: 600;
  display: block;
  margin-bottom: 8px;
}

.bk-rl-why {
  font-size: 0.78rem;
  color: var(--text-muted);
  line-height: 1.55;
  margin: 0;
}

/* Governance cascade */
.bk-cascade {
  margin: 32px 0;
  border: 1px solid var(--border);
  border-radius: var(--r-md);
  overflow: hidden;
}

.bk-cascade-row {
  display: grid;
  grid-template-columns: 90px 140px 1fr 180px;
  align-items: center;
  padding: 16px 20px;
  border-bottom: 1px solid var(--border);
  gap: 16px;
  transition: background 150ms;
}

.bk-cascade-row:hover { background: rgba(255,255,255,.025); }

.bk-cascade-row:last-child { border-bottom: none; }

.bk-cascade-row--header {
  background: rgba(201,168,76,.06);
  border-bottom: 1px solid var(--gold-border);
  font-size: 0.62rem;
  font-weight: 700;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--gold);
  padding: 10px 20px;
}

.bk-cascade-row--failure {
  position: relative;
}

.bk-cascade-row--critical {
  background: rgba(239,68,68,.05);
  border-left: 3px solid rgba(239,68,68,.5);
}

.bk-cascade-level { font-size: 0.7rem; font-weight: 700; color: var(--text-muted); }
.bk-cascade-role  { font-size: 0.82rem; font-weight: 600; color: var(--text-primary); }
.bk-cascade-own   { font-size: 0.78rem; color: var(--text-secondary); line-height: 1.4; }
.bk-cascade-fail  { font-size: 0.72rem; color: #F87171; line-height: 1.4; }

.bk-cascade-critical-badge {
  font-size: 0.58rem;
  font-weight: 800;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: #F87171;
  background: rgba(239,68,68,.15);
  padding: 2px 8px;
  border-radius: var(--r-full);
  white-space: nowrap;
}

/* 90-Day Sprint */
.bk-sprint {
  margin: 32px 0;
  position: relative;
}

.bk-sprint-timeline {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 0;
  position: relative;
}

.bk-sprint-timeline::before {
  content: '';
  position: absolute;
  top: 28px;
  left: calc(16.67% + 1px);
  right: calc(16.67% + 1px);
  height: 2px;
  background: linear-gradient(90deg, var(--gold) 0%, var(--gold) 50%, var(--border-md) 50%);
}

.bk-sprint-phase {
  padding: 0 16px;
  position: relative;
}

.bk-sprint-dot {
  width: 56px;
  height: 56px;
  border-radius: 50%;
  border: 2px solid var(--border);
  background: var(--bg-elevated);
  display: flex;
  align-items: center;
  justify-content: center;
  margin: 0 auto 16px;
  position: relative;
  z-index: 1;
  font-size: 0.62rem;
  font-weight: 700;
  color: var(--text-muted);
  letter-spacing: 0.05em;
  text-align: center;
  line-height: 1.2;
}

.bk-sprint-phase:first-child .bk-sprint-dot {
  border-color: var(--gold);
  background: rgba(201,168,76,.12);
  color: var(--gold-light);
}

.bk-sprint-days {
  font-size: 0.62rem;
  font-weight: 700;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--gold);
  text-align: center;
  margin-bottom: 8px;
  display: block;
}

.bk-sprint-name {
  font-size: 0.82rem;
  font-weight: 700;
  color: var(--text-primary);
  text-align: center;
  display: block;
  margin-bottom: 12px;
}

.bk-sprint-actions {
  list-style: none;
  padding: 0;
  margin: 0;
}

.bk-sprint-actions li {
  font-size: 0.72rem;
  color: var(--text-muted);
  line-height: 1.5;
  padding: 4px 0;
  padding-left: 14px;
  position: relative;
}

.bk-sprint-actions li::before {
  content: '—';
  position: absolute;
  left: 0;
  color: var(--gold);
  opacity: 0.5;
}

/* Framework alignment table */
.bk-fw-table-wrap {
  margin: 28px 0;
  overflow-x: auto;
}

.bk-fw-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 0.78rem;
  border: 1px solid var(--border);
  border-radius: var(--r-md);
  overflow: hidden;
}

.bk-fw-table thead tr {
  background: rgba(201,168,76,.07);
}

.bk-fw-table th {
  padding: 10px 14px;
  font-size: 0.62rem;
  font-weight: 700;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--gold);
  text-align: left;
  border-bottom: 1px solid var(--gold-border);
}

.bk-fw-table td {
  padding: 9px 14px;
  color: var(--text-secondary);
  border-bottom: 1px solid var(--border);
  font-size: 0.72rem;
  line-height: 1.4;
  vertical-align: top;
}

.bk-fw-table tr:last-child td { border-bottom: none; }

.bk-fw-table tbody tr:nth-child(even) { background: rgba(255,255,255,.015); }

.bk-fw-concept { color: var(--text-primary); font-weight: 600; }

/* CISO Diagnostic questions */
.bk-diagnostic {
  margin: 32px 0;
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.bk-diag-q {
  display: flex;
  align-items: flex-start;
  gap: 14px;
  padding: 16px 20px;
  background: var(--bk-surface);
  border: 1px solid var(--border);
  border-radius: var(--r-md);
  transition: border-color 160ms;
}

.bk-diag-q:hover { border-color: var(--gold-border); }

.bk-diag-icon {
  width: 28px;
  height: 28px;
  border-radius: 50%;
  background: rgba(201,168,76,.12);
  border: 1px solid var(--gold-border);
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  color: var(--gold);
  margin-top: 1px;
}

.bk-diag-text {
  font-size: 0.88rem;
  color: var(--text-primary);
  line-height: 1.55;
  font-weight: 500;
  margin: 0;
}

/* Important callout box */
.bk-important {
  background: rgba(201,168,76,.07);
  border: 1px solid var(--gold-border);
  border-radius: var(--r-md);
  padding: 20px 24px;
  margin: 28px 0;
}

.bk-important-label {
  font-size: 0.62rem;
  font-weight: 800;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--gold);
  margin-bottom: 10px;
  display: block;
}

.bk-important p {
  font-size: 0.88rem !important;
  color: var(--text-primary) !important;
  line-height: 1.65 !important;
  margin: 0 !important;
}

/* Contract clause */
.bk-clause {
  display: flex;
  align-items: flex-start;
  gap: 12px;
  padding: 14px 18px;
  margin: 10px 0;
  background: var(--bk-surface);
  border: 1px solid var(--border);
  border-radius: var(--r-sm);
}

.bk-clause-warn {
  font-size: 1rem;
  flex-shrink: 0;
  margin-top: 1px;
}

.bk-clause-body {}

.bk-clause-title {
  font-size: 0.8rem;
  font-weight: 700;
  color: var(--text-primary);
  display: block;
  margin-bottom: 4px;
}

.bk-clause-desc {
  font-size: 0.75rem;
  color: var(--text-muted);
  line-height: 1.5;
  margin: 0;
}

/* Vendor assessment table wrapper (reuses bk-table) */

/* Chapter quote (attributed) */
.bk-field-quote {
  border-left: 3px solid var(--gold);
  padding: 16px 20px;
  margin: 28px 0;
  background: var(--bk-surface);
  border-radius: 0 var(--r-sm) var(--r-sm) 0;
}

.bk-field-quote p {
  font-size: 0.92rem !important;
  font-style: italic;
  color: var(--text-primary) !important;
  margin-bottom: 6px !important;
  line-height: 1.65 !important;
}

.bk-field-quote cite {
  font-size: 0.72rem;
  color: var(--gold);
  font-style: normal;
  font-weight: 600;
}

/* ══════════════════════════════════════════════════════════════
   5. EXECUTIVE ACTION CENTER
══════════════════════════════════════════════════════════════ */
.bk-action-center {
  background: var(--bg-base);
  padding: 96px 0;
  border-top: 1px solid var(--border);
  position: relative;
  overflow: hidden;
}

.bk-action-center::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 3px;
  background: linear-gradient(90deg, transparent, var(--gold), transparent);
}

.bk-action-head {
  text-align: center;
  margin-bottom: 56px;
}

.bk-action-head h2 {
  font-size: clamp(1.8rem, 3.2vw, 2.6rem);
  font-weight: 800;
  color: var(--text-primary);
  letter-spacing: -0.025em;
  margin: 12px 0 16px;
}

.bk-action-head p {
  font-size: 1rem;
  color: var(--text-secondary);
  max-width: 520px;
  margin: 0 auto;
  line-height: 1.65;
}

.bk-action-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 24px;
  max-width: 1000px;
  margin: 0 auto;
}

.bk-action-card {
  background: var(--bg-elevated);
  border: 1px solid var(--border);
  border-radius: var(--r-lg);
  padding: 36px 30px;
  display: flex;
  flex-direction: column;
  transition: border-color 200ms, transform 200ms, box-shadow 200ms;
}

.bk-action-card:hover {
  border-color: var(--gold-border);
  transform: translateY(-4px);
  box-shadow: 0 16px 48px rgba(0,0,0,.40), 0 0 0 1px var(--gold-border);
}

.bk-action-icon {
  width: 52px;
  height: 52px;
  border-radius: var(--r-md);
  background: var(--gold-dim);
  border: 1px solid var(--gold-border);
  display: flex;
  align-items: center;
  justify-content: center;
  margin-bottom: 20px;
  color: var(--gold-light);
}

.bk-action-card-title {
  font-size: 1.05rem;
  font-weight: 700;
  color: var(--text-primary);
  margin: 0 0 12px;
  letter-spacing: -0.015em;
}

.bk-action-card-desc {
  font-size: 0.84rem;
  color: var(--text-muted);
  line-height: 1.6;
  flex: 1;
  margin-bottom: 28px;
}

.bk-action-btn {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 11px 22px;
  border-radius: var(--r-sm);
  font-size: 0.84rem;
  font-weight: 600;
  cursor: pointer;
  border: none;
  text-decoration: none;
  transition: all 160ms;
  justify-content: center;
}

.bk-action-btn--primary {
  background: linear-gradient(135deg, var(--gold), var(--gold-light));
  color: #07070C;
}

.bk-action-btn--primary:hover { box-shadow: 0 4px 20px rgba(201,168,76,.40); }

.bk-action-btn--outline {
  background: transparent;
  color: var(--text-secondary);
  border: 1px solid var(--border-md);
}

.bk-action-btn--outline:hover { border-color: var(--gold-border); color: var(--gold-light); }

.bk-action-disclaimer {
  text-align: center;
  margin-top: 36px;
  font-size: 0.72rem;
  color: var(--text-muted);
  line-height: 1.6;
}

/* Lead form inside action cards */
.bk-inline-form {
  display: flex;
  gap: 8px;
  margin-top: 0;
}

.bk-inline-input {
  flex: 1;
  padding: 10px 14px;
  background: var(--bg-base);
  border: 1px solid var(--border-md);
  border-radius: var(--r-sm);
  color: var(--text-primary);
  font-size: 0.82rem;
  font-family: inherit;
  outline: none;
  transition: border-color 160ms;
}

.bk-inline-input:focus { border-color: var(--gold-border); }
.bk-inline-input::placeholder { color: var(--text-muted); }

.bk-inline-submit {
  padding: 10px 16px;
  background: linear-gradient(135deg, var(--gold), var(--gold-light));
  color: #07070C;
  border: none;
  border-radius: var(--r-sm);
  font-size: 0.8rem;
  font-weight: 700;
  cursor: pointer;
  white-space: nowrap;
  transition: box-shadow 160ms;
}

.bk-inline-submit:hover { box-shadow: 0 3px 14px rgba(201,168,76,.38); }

.bk-form-success-msg {
  display: none;
  font-size: 0.8rem;
  color: var(--green-light);
  font-weight: 600;
  align-items: center;
  gap: 8px;
  margin-top: 10px;
}

/* ══════════════════════════════════════════════════════════════
   6. EXECUTIVE AI GOVERNANCE ADVISOR
══════════════════════════════════════════════════════════════ */
.bk-advisor {
  background: var(--bg-void);
  padding: 96px 0;
  border-top: 1px solid var(--border);
}

.bk-advisor-inner {
  display: grid;
  grid-template-columns: 1fr 1.2fr;
  gap: clamp(40px, 6vw, 80px);
  align-items: start;
}

.bk-advisor-copy {}

.bk-advisor-copy h2 {
  font-size: clamp(1.6rem, 2.8vw, 2.3rem);
  font-weight: 800;
  color: var(--text-primary);
  letter-spacing: -0.025em;
  margin: 12px 0 16px;
}

.bk-advisor-copy p {
  font-size: 0.95rem;
  color: var(--text-secondary);
  line-height: 1.7;
  margin: 0 0 16px;
}

.bk-advisor-powered {
  font-size: 0.7rem;
  color: var(--text-muted);
  letter-spacing: 0.05em;
  margin-top: 20px;
  display: block;
}

/* Suggested questions */
.bk-suggestions {
  display: flex;
  flex-direction: column;
  gap: 8px;
  margin-top: 24px;
}

.bk-suggestion {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 12px 16px;
  background: var(--bk-surface);
  border: 1px solid var(--border);
  border-radius: var(--r-sm);
  cursor: pointer;
  transition: border-color 150ms, background 150ms;
  text-align: left;
  font-family: inherit;
  width: 100%;
  color: var(--text-secondary);
  font-size: 0.83rem;
  line-height: 1.4;
}

.bk-suggestion:hover {
  border-color: var(--gold-border);
  background: rgba(201,168,76,.04);
  color: var(--text-primary);
}

.bk-suggestion-arrow {
  color: var(--gold);
  flex-shrink: 0;
  font-size: 0.8rem;
  opacity: 0.7;
}

/* Advisor chat panel */
.bk-advisor-panel {
  background: var(--bk-surface);
  border: 1px solid var(--border);
  border-radius: var(--r-lg);
  overflow: hidden;
  display: flex;
  flex-direction: column;
  height: 440px;
}

.bk-advisor-panel-head {
  padding: 16px 20px;
  border-bottom: 1px solid var(--border);
  display: flex;
  align-items: center;
  gap: 10px;
  background: rgba(201,168,76,.04);
}

.bk-advisor-dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: var(--green);
  box-shadow: 0 0 8px var(--green);
  flex-shrink: 0;
}

.bk-advisor-panel-title {
  font-size: 0.8rem;
  font-weight: 700;
  color: var(--text-primary);
  flex: 1;
}

.bk-advisor-panel-sub {
  font-size: 0.68rem;
  color: var(--text-muted);
}

.bk-advisor-messages {
  flex: 1;
  overflow-y: auto;
  padding: 20px;
  display: flex;
  flex-direction: column;
  gap: 16px;
  scrollbar-width: thin;
  scrollbar-color: var(--border) transparent;
}

.bk-msg {
  max-width: 88%;
  padding: 12px 16px;
  border-radius: var(--r-md);
  font-size: 0.82rem;
  line-height: 1.6;
}

.bk-msg--advisor {
  background: rgba(255,255,255,.05);
  border: 1px solid var(--border);
  color: var(--text-secondary);
  align-self: flex-start;
}

.bk-msg--user {
  background: rgba(201,168,76,.10);
  border: 1px solid var(--gold-border);
  color: var(--text-primary);
  align-self: flex-end;
}

.bk-advisor-input-row {
  padding: 14px 16px;
  border-top: 1px solid var(--border);
  display: flex;
  gap: 10px;
  background: rgba(0,0,0,.2);
}

.bk-advisor-input {
  flex: 1;
  background: var(--bg-elevated);
  border: 1px solid var(--border-md);
  border-radius: var(--r-sm);
  padding: 10px 14px;
  color: var(--text-primary);
  font-size: 0.82rem;
  font-family: inherit;
  outline: none;
  transition: border-color 150ms;
}

.bk-advisor-input:focus { border-color: var(--gold-border); }
.bk-advisor-input::placeholder { color: var(--text-muted); }

.bk-advisor-send {
  width: 40px;
  height: 40px;
  border-radius: var(--r-sm);
  background: linear-gradient(135deg, var(--gold), var(--gold-light));
  color: #07070C;
  border: none;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: box-shadow 150ms;
  flex-shrink: 0;
}

.bk-advisor-send:hover { box-shadow: 0 3px 16px rgba(201,168,76,.40); }

/* ══════════════════════════════════════════════════════════════
   7. ABOUT THE AUTHOR
══════════════════════════════════════════════════════════════ */
.bk-author {
  background: var(--bg-raised);
  padding: 96px 0;
  border-top: 1px solid var(--border);
}

.bk-author-inner {
  display: grid;
  grid-template-columns: 260px 1fr;
  gap: 56px;
  align-items: start;
}

.bk-author-visual { text-align: center; }

.bk-author-img {
  width: 180px;
  height: 180px;
  border-radius: 50%;
  object-fit: cover;
  border: 3px solid var(--gold-border);
  box-shadow: 0 0 40px rgba(201,168,76,.18);
  margin-bottom: 20px;
}

.bk-author-cred-list {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  justify-content: center;
  list-style: none;
  padding: 0;
  margin: 0;
}

.bk-author-cred {
  font-size: 0.64rem;
  font-weight: 700;
  letter-spacing: 0.06em;
  padding: 3px 10px;
  border-radius: var(--r-full);
  background: var(--gold-dim);
  color: var(--gold-light);
  border: 1px solid var(--gold-border);
}

.bk-author-content {}

.bk-author-content .bk-ch-lead { display: block; }

.bk-author-name-large {
  font-size: clamp(1.8rem, 3vw, 2.6rem);
  font-weight: 800;
  color: var(--text-primary);
  letter-spacing: -0.03em;
  margin: 8px 0 4px;
}

.bk-author-title {
  font-size: 1rem;
  color: var(--gold-light);
  font-style: italic;
  margin-bottom: 24px;
  display: block;
}

.bk-author-bio {
  font-size: 0.95rem;
  color: var(--text-secondary);
  line-height: 1.75;
  margin: 0 0 24px;
}

.bk-author-orgs {
  display: flex;
  gap: 16px;
  margin-top: 24px;
}

.bk-author-org {
  padding: 8px 16px;
  background: var(--bg-elevated);
  border: 1px solid var(--border);
  border-radius: var(--r-sm);
  font-size: 0.78rem;
  font-weight: 600;
  color: var(--text-secondary);
}

/* ══════════════════════════════════════════════════════════════
   8. FLIPBOOK MODAL
══════════════════════════════════════════════════════════════ */
.fb-modal {
  position: fixed;
  inset: 0;
  z-index: 10000;
  display: none;
  align-items: center;
  justify-content: center;
  background: rgba(4,5,12,.95);
  backdrop-filter: blur(12px);
  padding: 20px;
}

.fb-modal.is-open { display: flex; }

.fb-modal-inner {
  position: relative;
  width: 100%;
  max-width: min(960px, 96vw);
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 24px;
}

.fb-close-btn {
  position: absolute;
  top: -12px;
  right: -12px;
  width: 40px;
  height: 40px;
  border-radius: 50%;
  background: var(--bg-elevated);
  border: 1px solid var(--border-md);
  color: var(--text-secondary);
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.1rem;
  transition: all 160ms;
  z-index: 10;
  line-height: 1;
}

.fb-close-btn:hover { background: var(--bg-surface-hi); color: var(--text-primary); }

/* The book spread container */
.fb-book-wrap {
  perspective: 2000px;
  perspective-origin: 50% 50%;
}

.fb-spread {
  position: relative;
  width: min(900px, 94vw);
  height: min(560px, 70vh);
  display: flex;
  box-shadow:
    0 40px 100px rgba(0,0,0,.80),
    0 0 0 1px rgba(255,255,255,.05);
  border-radius: 4px 8px 8px 4px;
}

/* Left page */
.fb-page-l {
  width: 50%;
  height: 100%;
  background: var(--bk-page-warm);
  border-radius: 4px 0 0 4px;
  overflow: hidden;
  box-shadow: inset -6px 0 20px rgba(0,0,0,.18);
  position: relative;
}

/* Right page */
.fb-page-r {
  width: 50%;
  height: 100%;
  background: var(--bk-page-cream);
  border-radius: 0 8px 8px 0;
  overflow: hidden;
  box-shadow: inset 6px 0 20px rgba(0,0,0,.10);
  position: relative;
  cursor: pointer;
}

/* Spine shadow */
.fb-spread::after {
  content: '';
  position: absolute;
  left: 50%;
  top: 0;
  transform: translateX(-50%);
  width: 12px;
  height: 100%;
  background: linear-gradient(90deg,
    rgba(0,0,0,.20) 0%,
    rgba(0,0,0,.08) 30%,
    rgba(0,0,0,.08) 70%,
    rgba(0,0,0,.20) 100%
  );
  pointer-events: none;
  z-index: 5;
}

/* Turning page overlay */
.fb-turning {
  position: absolute;
  right: 0;
  top: 0;
  width: 50%;
  height: 100%;
  transform-origin: left center;
  transform-style: preserve-3d;
  z-index: 20;
  display: none;
}

.fb-turning.is-flipping-fwd {
  display: block;
  animation: fbFlipFwd 0.72s cubic-bezier(0.42, 0, 0.58, 1) forwards;
}

.fb-turning.is-flipping-bck {
  display: block;
  animation: fbFlipBck 0.72s cubic-bezier(0.42, 0, 0.58, 1) forwards;
}

@keyframes fbFlipFwd {
  0%   { transform: rotateY(0deg); }
  100% { transform: rotateY(-180deg); }
}

@keyframes fbFlipBck {
  0%   { transform: rotateY(-180deg); }
  100% { transform: rotateY(0deg); }
}

.fb-turning-face {
  position: absolute;
  inset: 0;
  backface-visibility: hidden;
  overflow: hidden;
}

.fb-turning-face--front {
  background: var(--bk-page-cream);
  border-radius: 0 8px 8px 0;
  box-shadow: inset 6px 0 20px rgba(0,0,0,.10);
}

.fb-turning-face--back {
  transform: rotateY(180deg);
  background: var(--bk-page-warm);
  border-radius: 4px 0 0 4px;
  box-shadow: inset -6px 0 20px rgba(0,0,0,.18);
}

/* Flipbook controls */
.fb-controls {
  display: flex;
  align-items: center;
  gap: 16px;
}

.fb-btn {
  padding: 10px 24px;
  border-radius: var(--r-sm);
  background: var(--bg-elevated);
  border: 1px solid var(--border-md);
  color: var(--text-secondary);
  font-size: 0.84rem;
  font-weight: 600;
  cursor: pointer;
  transition: all 160ms;
  font-family: inherit;
}

.fb-btn:hover:not(:disabled) { border-color: var(--gold-border); color: var(--gold-light); }
.fb-btn:disabled { opacity: 0.35; cursor: not-allowed; }

.fb-btn--cta {
  background: linear-gradient(135deg, var(--gold), var(--gold-light));
  color: #07070C;
  border-color: transparent;
}

.fb-btn--cta:hover { box-shadow: 0 4px 20px rgba(201,168,76,.40); color: #07070C; }

.fb-counter {
  font-size: 0.75rem;
  color: var(--text-muted);
  letter-spacing: 0.06em;
  min-width: 64px;
  text-align: center;
}

/* Flipbook page content (inside pages) */
.fb-page-content {
  padding: 28px 28px 20px;
  height: 100%;
  overflow: hidden;
  display: flex;
  flex-direction: column;
  font-family: Georgia, 'Times New Roman', serif;
  color: var(--bk-ink);
}

.fb-page-num {
  font-size: 0.58rem;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: #888;
  font-family: 'Inter', sans-serif;
  margin-bottom: 16px;
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.fb-page-chapter {
  font-size: 0.56rem;
  letter-spacing: 0.2em;
  text-transform: uppercase;
  color: #C9A84C;
  font-family: 'Inter', sans-serif;
  font-weight: 700;
  margin-bottom: 8px;
}

.fb-page-title {
  font-size: clamp(0.9rem, 1.5vw, 1.2rem);
  font-weight: 700;
  font-family: Georgia, serif;
  color: #0f0f1f;
  line-height: 1.25;
  margin: 0 0 12px;
}

.fb-page-body {
  font-size: clamp(0.62rem, 0.9vw, 0.72rem);
  line-height: 1.65;
  color: #2a2a3e;
  flex: 1;
  overflow: hidden;
}

.fb-page-body p { margin: 0 0 8px; }
.fb-page-body strong { color: #0f0f1f; }

.fb-stat-big {
  font-size: clamp(2rem, 3.5vw, 3rem);
  font-weight: 900;
  color: #C9A84C;
  line-height: 1;
  font-family: 'Inter', sans-serif;
  display: block;
  margin: 8px 0 4px;
}

.fb-stat-label {
  font-size: 0.6rem;
  color: #666;
  font-family: 'Inter', sans-serif;
  line-height: 1.4;
}

.fb-rule-block {
  border-left: 3px solid #C9A84C;
  padding: 8px 12px;
  margin: 8px 0;
  background: rgba(201,168,76,.06);
}

.fb-rule-num { font-size: 0.6rem; color: #C9A84C; font-weight: 700; font-family: 'Inter', sans-serif; letter-spacing: 0.1em; }
.fb-rule-name { font-size: 0.75rem; font-weight: 700; color: #0f0f1f; display: block; margin: 2px 0; }
.fb-rule-text { font-size: 0.62rem; color: #444; line-height: 1.5; }

.fb-cover-page {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  height: 100%;
  background: var(--bk-page-cream);
  position: relative;
  overflow: hidden;
}

.fb-cover-img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.fb-toc-item {
  display: flex;
  align-items: flex-start;
  gap: 10px;
  padding: 6px 0;
  border-bottom: 1px solid rgba(0,0,0,.07);
}

.fb-toc-num { font-size: 0.6rem; color: #C9A84C; font-weight: 700; font-family: 'Inter', sans-serif; min-width: 18px; }
.fb-toc-title { font-size: 0.68rem; color: #2a2a3e; flex: 1; line-height: 1.4; }
.fb-toc-time { font-size: 0.56rem; color: #999; font-family: 'Inter', sans-serif; white-space: nowrap; }

.fb-cta-page {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: 40px 32px;
  text-align: center;
  background: var(--bk-page-cream);
  height: 100%;
}

.fb-cta-title { font-size: 1rem; font-weight: 700; color: #0f0f1f; margin-bottom: 12px; }
.fb-cta-sub { font-size: 0.68rem; color: #555; line-height: 1.6; font-family: 'Inter', sans-serif; }
.fb-cta-gold-rule {
  width: 48px;
  height: 2px;
  background: #C9A84C;
  margin: 14px auto;
}

/* ══════════════════════════════════════════════════════════════
   PHASE 3 — ACTION CENTER, AUTHOR, ADVISOR
══════════════════════════════════════════════════════════════ */

/* ── Download strip ─────────────────────────────────────────── */
.bk-download-strip {
  display: flex;
  gap: 12px;
  justify-content: center;
  flex-wrap: wrap;
  margin-bottom: 52px;
  padding: 22px 28px;
  background: rgba(255,255,255,.025);
  border: 1px solid var(--border);
  border-radius: var(--r-lg);
}

.bk-dl-opt {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  padding: 12px 24px;
  border-radius: var(--r-md);
  font-size: 0.86rem;
  font-weight: 600;
  text-decoration: none;
  transition: all 180ms;
  cursor: pointer;
  border: 1px solid transparent;
  font-family: inherit;
  min-height: 48px;
  letter-spacing: 0.01em;
}

.bk-dl-opt--gold {
  background: linear-gradient(135deg, var(--gold), var(--gold-light));
  color: #07070C;
  box-shadow: 0 4px 22px rgba(201,168,76,.28);
}

.bk-dl-opt--gold:hover {
  box-shadow: 0 6px 36px rgba(201,168,76,.46);
  transform: translateY(-2px);
}

.bk-dl-opt--ghost {
  background: transparent;
  border-color: var(--border-md);
  color: var(--text-secondary);
}

.bk-dl-opt--ghost:hover {
  border-color: var(--gold-border);
  color: var(--gold-light);
  background: var(--gold-dim);
}

/* ── 4-column action grid ──────────────────────────────────── */
.bk-action-grid-4 {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 20px;
}

/* ── Calendly inline embed — AI Mandate page ──────────────── */
.bk-calendly-wrap {
  margin: 48px 0 0;
  border: 1px solid rgba(0, 112, 243, .18);
  border-radius: 20px;
  overflow: hidden;
  background: rgba(0, 112, 243, .025);
}
.bk-calendly-header {
  padding: 28px 36px 20px;
  border-bottom: 1px solid rgba(0, 112, 243, .12);
}
.bk-calendly-header h3 {
  font-size: 1.15rem;
  font-weight: 700;
  letter-spacing: -0.02em;
  color: var(--text-primary);
  margin: 0 0 6px;
}
.bk-calendly-header p {
  font-size: 0.8125rem;
  color: var(--text-muted);
  margin: 0;
}

/* ── Advisor typing indicator ──────────────────────────────── */
.bk-typing-dots {
  display: flex;
  gap: 5px;
  align-items: center;
  padding: 14px 18px;
  background: rgba(255,255,255,.05);
  border: 1px solid var(--border);
  border-radius: var(--r-md);
  align-self: flex-start;
  width: fit-content;
}

.bk-typing-dot {
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: var(--text-muted);
  animation: bkDotPulse 1.3s ease-in-out infinite;
}

.bk-typing-dot:nth-child(2) { animation-delay: 0.22s; }
.bk-typing-dot:nth-child(3) { animation-delay: 0.44s; }

@keyframes bkDotPulse {
  0%, 60%, 100% { transform: scale(0.72); opacity: 0.35; }
  30%           { transform: scale(1.12); opacity: 1;    }
}

/* ── Advisor panel message formatting ──────────────────────── */
.bk-msg strong { font-weight: 700; color: var(--text-primary); }

/* ── Advisor section shell ─────────────────────────────────── */
.bk-advisor-section {
  background: var(--bg-void);
  border-top: 1px solid var(--border);
  padding: 96px 0;
}

/* ══════════════════════════════════════════════════════════════
   RESPONSIVE
══════════════════════════════════════════════════════════════ */
@media (max-width: 1024px) {
  .bk-hero-inner { grid-template-columns: 1fr 1fr; }
  .bk-reader-layout { grid-template-columns: 190px 1fr; }
  .bk-cascade-row { grid-template-columns: 70px 120px 1fr; }
  .bk-cascade-fail { display: none; }
  .bk-action-grid-4 { grid-template-columns: repeat(2, 1fr); }
}

@media (max-width: 900px) {
  .bk-overview-grid { grid-template-columns: repeat(2, 1fr); }
  .bk-maturity-levels { grid-template-columns: repeat(2, 1fr); gap: 16px; }
  .bk-maturity-levels::before { display: none; }
  .bk-author-inner { grid-template-columns: 1fr; }
  .bk-author-visual { display: flex; align-items: center; gap: 20px; text-align: left; }
  .bk-advisor-inner { grid-template-columns: 1fr; }
  .bk-action-grid { grid-template-columns: 1fr; max-width: 480px; }
  .bk-sprint-timeline { grid-template-columns: 1fr; gap: 24px; }
  .bk-sprint-timeline::before { display: none; }
}

@media (max-width: 768px) {
  .bk-hero-inner { grid-template-columns: 1fr; }
  .bk-visual { order: -1; padding: 20px; }
  .bk-book { width: 200px; height: 258px; }
  .bk-reader-layout { grid-template-columns: 1fr; }
  .bk-ch-nav {
    position: static;
    height: auto;
    display: block;
    overflow-x: auto;
    border-right: none;
    border-bottom: 1px solid var(--border);
    padding: 12px 16px;
    background: rgba(11,13,24,.98);
    white-space: nowrap;
  }
  .bk-nav-label { display: none; }
  .bk-nav-list { display: flex; gap: 4px; }
  .bk-nav-item { flex-shrink: 0; }
  .bk-nav-link {
    padding: 6px 12px;
    border-radius: var(--r-full);
    background: var(--bg-elevated);
    font-size: 0.68rem;
  }
  .bk-nav-link::before { display: none; }
  .bk-nav-link.is-active { background: var(--gold-dim); color: var(--gold-light); }
  .bk-before-after { grid-template-columns: 1fr; }
  .bk-ba-panel--before { border-right: none; border-bottom: 1px solid var(--border); }
  .bk-cascade-row { grid-template-columns: 1fr; gap: 4px; padding: 14px 16px; }
  .bk-cascade-level { font-size: 0.62rem; }
  .fb-page-l { display: none; }
  .fb-page-r { width: 100%; border-radius: 4px 8px 8px 4px; }
  .fb-turning { display: none !important; }
  .fb-spread::after { display: none; }
  .bk-hero-stats { flex-direction: column; gap: 0; }
  .bk-hero-stat { border-right: none; border-bottom: 1px solid var(--border); }
  .bk-hero-stat:last-child { border-bottom: none; }
}

@media (max-width: 480px) {
  .bk-overview-grid { grid-template-columns: 1fr; }
  .bk-chapter { padding: 48px 20px 60px; }
}

@media (max-width: 560px) {
  .bk-action-grid-4 { grid-template-columns: 1fr; }
  .bk-download-strip { flex-direction: column; align-items: stretch; }
  .bk-dl-opt { justify-content: center; }
  .bk-advisor-panel { height: 380px; }
}
