/* ===== BOOK SUMMARY (shared) ===== */
/* Layered on style.css. One framework, themed per book via body modifier classes. */

body.book-summary {
  background: #0a0a0f;
  color: var(--text);
  font-family: 'Inter', sans-serif;
  overflow-x: hidden;
  /* default theme = sky blue / navy-gold cover (The Intelligent Investor) */
  --accent: #5eaaff;
  --accent-2: #8ec9ff;
  --accent-grad: linear-gradient(135deg, #5eaaff 0%, #8ec9ff 100%);
  --gold: #d9b25a;
  --gold-2: #f0d699;
  --cover-bg: linear-gradient(165deg, #15294f 0%, #0b1730 55%, #070e1c 100%);
  --cover-frame: rgba(217,178,90,0.45);
  --cover-rule: #d9b25a;
  --cover-author: #f0d699;
  --cover-the: #cdd6e6;
  --cover-sub: #9fb0cc;
  --cover-note: #7e8ba6;
  --cover-blurb: #f0d699;
  --glow: 94,170,255;
}

/* ---- THEME: amber (Thinking, Fast and Slow) ---- */
body.book-summary.theme-amber {
  --accent: #f5933a; --accent-2: #ffbe7a;
  --accent-grad: linear-gradient(135deg, #f5933a 0%, #ffbe7a 100%);
  --gold: #f5933a; --gold-2: #ffbe7a;
  --cover-bg: linear-gradient(165deg, #3a2812 0%, #231507 55%, #160d05 100%);
  --cover-frame: rgba(245,147,58,0.5);
  --cover-rule: #f5933a; --cover-author: #ffbe7a; --cover-the: #e6d2bd;
  --cover-sub: #c9a98a; --cover-note: #a89072; --cover-blurb: #ffbe7a;
  --glow: 245,147,58;
}
/* ---- THEME: royal (Margin of Safety) ---- */
body.book-summary.theme-royal {
  --accent: #5b8def; --accent-2: #9cb8ff;
  --accent-grad: linear-gradient(135deg, #5b8def 0%, #9cb8ff 100%);
  --gold: #d14b4b; --gold-2: #9cb8ff;
  --cover-bg: linear-gradient(165deg, #16224a 0%, #0c1430 55%, #070b1a 100%);
  --cover-frame: rgba(91,141,239,0.45);
  --cover-rule: #d14b4b; --cover-author: #cdd9f7; --cover-the: #bcc9ea;
  --cover-sub: #93a4cc; --cover-note: #7986a6; --cover-blurb: #9cb8ff;
  --glow: 91,141,239;
}
/* ---- THEME: emerald (The Psychology of Money) ---- */
body.book-summary.theme-emerald {
  --accent: #5fae84; --accent-2: #93d3ad;
  --accent-grad: linear-gradient(135deg, #5fae84 0%, #93d3ad 100%);
  --gold: #c9b079; --gold-2: #e3d2a6;
  --cover-bg: linear-gradient(165deg, #13301f 0%, #0a1c12 55%, #06120b 100%);
  --cover-frame: rgba(95,174,132,0.45);
  --cover-rule: #5fae84; --cover-author: #bfe4cd; --cover-the: #bcd6c6;
  --cover-sub: #8fb5a0; --cover-note: #88a596; --cover-blurb: #93d3ad;
  --glow: 95,174,132;
}
/* ---- THEME: gold (Stop Acting Rich) ---- */
body.book-summary.theme-gold {
  --accent: #e0b34a; --accent-2: #f3d488;
  --accent-grad: linear-gradient(135deg, #e0b34a 0%, #f3d488 100%);
  --gold: #e0b34a; --gold-2: #f3d488;
  --cover-bg: linear-gradient(165deg, #23221d 0%, #141310 55%, #0a0a08 100%);
  --cover-frame: rgba(224,179,74,0.5);
  --cover-rule: #e0b34a; --cover-author: #f3d488; --cover-the: #d8cdb4;
  --cover-sub: #b3a487; --cover-note: #8d8068; --cover-blurb: #f3d488;
  --glow: 224,179,74;
}
/* ---- THEME: grass (The Let Them Theory) ---- */
body.book-summary.theme-grass {
  --accent: #57c96a; --accent-2: #9ae6a8;
  --accent-grad: linear-gradient(135deg, #57c96a 0%, #9ae6a8 100%);
  --gold: #57c96a; --gold-2: #9ae6a8;
  --cover-bg: linear-gradient(165deg, #16361f 0%, #0c2014 55%, #07130b 100%);
  --cover-frame: rgba(87,201,106,0.5);
  --cover-rule: #57c96a; --cover-author: #b8f0c2; --cover-the: #bfe0c6;
  --cover-sub: #8fbf9c; --cover-note: #789c82; --cover-blurb: #9ae6a8;
  --glow: 87,201,106;
}
/* ---- THEME: crimson (The Compound Effect) ---- */
body.book-summary.theme-crimson {
  --accent: #ef4d4d; --accent-2: #f88b8b;
  --accent-grad: linear-gradient(135deg, #ef4d4d 0%, #f88b8b 100%);
  --gold: #ef4d4d; --gold-2: #f88b8b;
  --cover-bg: linear-gradient(165deg, #341416 0%, #1f0c0d 55%, #130808 100%);
  --cover-frame: rgba(239,77,77,0.5);
  --cover-rule: #ef4d4d; --cover-author: #f8b4b4; --cover-the: #e6c4c4;
  --cover-sub: #c69a9a; --cover-note: #9c7777; --cover-blurb: #f88b8b;
  --glow: 239,77,77;
}

body.book-summary .btn-primary { box-shadow: 0 8px 24px -8px rgba(var(--glow),0.5); }
body.book-summary .btn-primary:hover { box-shadow: 0 12px 32px -8px rgba(var(--glow),0.7); }

body.book-summary::before {
  content: '';
  position: fixed;
  inset: 0;
  background:
    radial-gradient(ellipse at top, rgba(var(--glow),0.07) 0%, transparent 55%),
    radial-gradient(ellipse at bottom right, rgba(var(--glow),0.05) 0%, transparent 55%);
  pointer-events: none;
  z-index: 0;
}
body.book-summary main { position: relative; z-index: 1; }

/* ===== NAV ===== */
.bs-nav {
  position: sticky; top: 0; z-index: 50;
  display: flex; align-items: center; justify-content: space-between;
  padding: 20px 32px; max-width: 1240px; margin: 0 auto;
  backdrop-filter: blur(20px); background: rgba(10,10,15,0.7);
  border-bottom: 1px solid var(--border);
}
.bs-nav-right { display: flex; align-items: center; gap: 16px; }
.bs-back { font-size: 13px; color: var(--text-dim); transition: color 0.2s; font-family: 'JetBrains Mono', monospace; }
.bs-back:hover { color: var(--text); }
@media (max-width: 560px) { .bs-back span { display: none; } }

/* ===== HERO ===== */
.bs-hero {
  max-width: 1080px; margin: 0 auto;
  padding: 70px 32px 56px;
  display: grid; grid-template-columns: 0.92fr 1.08fr; gap: 52px; align-items: center;
}
.bs-intro .bs-kicker { font-family: 'JetBrains Mono', monospace; font-size: 12px; letter-spacing: 0.2em; text-transform: uppercase; color: var(--text-mute); margin-bottom: 22px; }
.bs-intro .bs-kicker b { color: var(--accent); font-weight: 700; }
.bs-title {
  font-family: 'Cormorant Garamond', Georgia, serif; font-weight: 600; font-style: italic;
  font-size: clamp(34px, 4.6vw, 58px); line-height: 1.05; letter-spacing: -0.01em;
  margin: 0 0 22px; color: var(--text);
}
.bs-title .grad { background: var(--accent-grad); -webkit-background-clip: text; -webkit-text-fill-color: transparent; background-clip: text; }
.bs-deck { font-size: clamp(16px, 1.6vw, 18px); line-height: 1.7; color: var(--text-dim); margin: 0 0 24px; max-width: 520px; }
.bs-blurb {
  font-family: 'Cormorant Garamond', Georgia, serif; font-style: italic;
  font-size: clamp(18px, 2vw, 22px); line-height: 1.4; color: var(--text);
  border-left: 2px solid var(--gold); padding-left: 16px; margin: 0 0 26px; max-width: 480px;
}
.bs-blurb cite { display: block; font-style: normal; font-family: 'JetBrains Mono', monospace; font-size: 11px; letter-spacing: 0.1em; text-transform: uppercase; color: var(--gold); margin-top: 10px; }
.bs-meta { display: flex; gap: 14px; flex-wrap: wrap; font-family: 'JetBrains Mono', monospace; font-size: 11px; letter-spacing: 0.08em; text-transform: uppercase; color: var(--text-mute); }
.bs-meta .sep { color: var(--border-strong); }

/* ===== BOOK COVER (themed) ===== */
.bs-cover {
  position: relative; border-radius: 14px; overflow: hidden;
  padding: 48px 38px 40px; text-align: center;
  background: var(--cover-bg);
  border: 1px solid var(--cover-frame);
  box-shadow: 0 40px 90px -36px rgba(0,0,0,0.85), inset 0 0 0 1px rgba(255,255,255,0.04);
}
.bs-cover::before { content: ''; position: absolute; inset: 14px; border: 1px solid var(--cover-frame); border-radius: 6px; pointer-events: none; }
.bs-cover-blurb { font-family: 'JetBrains Mono', monospace; font-size: 10.5px; letter-spacing: 0.12em; text-transform: uppercase; color: var(--cover-blurb); line-height: 1.7; margin: 0 0 22px; }
.bs-cover-kicker { font-family: 'JetBrains Mono', monospace; font-size: 11px; letter-spacing: 0.3em; color: var(--cover-rule); margin-bottom: 14px; }
.bs-cover-the { font-family: 'Cormorant Garamond', Georgia, serif; font-style: italic; font-weight: 500; font-size: clamp(22px, 3vw, 30px); color: var(--cover-the); line-height: 1; margin-bottom: 2px; }
.bs-cover-word { font-family: 'Cormorant Garamond', Georgia, serif; font-weight: 700; font-size: clamp(38px, 5.6vw, 60px); line-height: 0.98; letter-spacing: 0.01em; color: #fff; margin-bottom: 18px; }
.bs-cover-sub { font-family: 'JetBrains Mono', monospace; font-size: 10px; letter-spacing: 0.18em; text-transform: uppercase; color: var(--cover-sub); margin-bottom: 22px; }
.bs-cover-rule { width: 46px; height: 1px; background: var(--cover-rule); margin: 0 auto 22px; opacity: 0.85; }
.bs-cover-author { font-family: 'Inter', sans-serif; font-weight: 700; letter-spacing: 0.16em; font-size: 15px; color: var(--cover-author); text-transform: uppercase; margin-bottom: 10px; }
.bs-cover-note { font-family: 'JetBrains Mono', monospace; font-size: 9.5px; letter-spacing: 0.08em; color: var(--cover-note); line-height: 1.7; text-transform: uppercase; }

/* ===== ONE BIG IDEA ===== */
.bs-bigidea { max-width: 900px; margin: 10px auto 0; padding: 70px 32px; text-align: center; border-top: 1px solid var(--border); border-bottom: 1px solid var(--border); }
.bs-bigidea p { font-family: 'Cormorant Garamond', Georgia, serif; font-style: italic; font-size: clamp(26px, 4vw, 44px); line-height: 1.25; color: var(--text); margin: 0; letter-spacing: -0.01em; }
.bs-bigidea em { font-style: italic; background: var(--accent-grad); -webkit-background-clip: text; -webkit-text-fill-color: transparent; background-clip: text; }

/* ===== SECTION ===== */
.bs-section { max-width: 880px; margin: 0 auto; padding: 64px 32px; opacity: 0; transform: translateY(34px); transition: opacity 0.7s ease, transform 0.7s ease; }
.bs-section.in-view { opacity: 1; transform: none; }
.bs-eyebrow { display: flex; align-items: center; gap: 14px; margin-bottom: 22px; }
.bs-eyebrow .num { font-family: 'JetBrains Mono', monospace; font-size: 13px; font-weight: 700; color: var(--accent); }
.bs-eyebrow .lbl { font-family: 'JetBrains Mono', monospace; font-size: 12px; letter-spacing: 0.14em; text-transform: uppercase; color: var(--text-dim); }
.bs-h2 { font-size: clamp(28px, 4vw, 44px); font-weight: 800; letter-spacing: -0.025em; line-height: 1.12; margin: 0 0 20px; color: var(--text); }
.bs-h2 em { font-family: 'Cormorant Garamond', Georgia, serif; font-style: italic; font-weight: 500; background: var(--accent-grad); -webkit-background-clip: text; -webkit-text-fill-color: transparent; background-clip: text; }
.bs-lead { font-size: clamp(16px, 1.7vw, 19px); line-height: 1.75; color: var(--text-dim); margin: 0 0 26px; }
.bs-lead b { color: var(--text); font-weight: 600; }
.bs-aside { display: inline; color: var(--text-mute); font-size: 0.92em; }

/* principle cards */
.bs-points { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; margin: 26px 0 0; }
.bs-point { padding: 24px 24px 26px; background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius); }
.bs-point .pt { font-family: 'JetBrains Mono', monospace; font-size: 11px; letter-spacing: 0.1em; text-transform: uppercase; color: var(--accent); margin-bottom: 12px; }
.bs-point h3 { font-size: 19px; font-weight: 700; letter-spacing: -0.01em; margin: 0 0 8px; color: var(--text); }
.bs-point p { font-size: 14.5px; line-height: 1.62; color: var(--text-dim); margin: 0; }
.bs-point.span2 { grid-column: 1 / -1; }

/* two-column compare */
.bs-two { display: grid; grid-template-columns: 1fr 1fr; gap: 18px; margin: 26px 0 0; }
.bs-col { padding: 28px 26px; background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius); }
.bs-col.alt { background: linear-gradient(160deg, rgba(var(--glow),0.07) 0%, var(--surface) 60%); border-color: rgba(var(--glow),0.25); }
.bs-col .tag { font-family: 'JetBrains Mono', monospace; font-size: 11px; letter-spacing: 0.12em; text-transform: uppercase; color: var(--accent); margin-bottom: 10px; }
.bs-col h3 { font-size: 22px; font-weight: 800; letter-spacing: -0.02em; margin: 0 0 12px; color: var(--text); }
.bs-col ul { list-style: none; padding: 0; margin: 0; display: flex; flex-direction: column; gap: 9px; }
.bs-col li { font-size: 14.5px; line-height: 1.55; color: var(--text-dim); padding-left: 16px; position: relative; }
.bs-col li::before { content: ''; position: absolute; left: 0; top: 8px; width: 5px; height: 5px; border-radius: 50%; background: var(--accent); }

/* figure / diagram */
.bs-figure { margin: 30px 0 0; padding: 26px 24px 20px; background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius); }
.bs-figure svg { display: block; width: 100%; height: auto; }
.bs-figure figcaption { font-family: 'JetBrains Mono', monospace; font-size: 11px; letter-spacing: 0.04em; color: var(--text-dim); margin-top: 16px; text-align: center; line-height: 1.5; }
.dg-axis { stroke: var(--border-strong); stroke-width: 1; }
.dg-grid { stroke: rgba(255,255,255,0.06); stroke-width: 1; }
.dg-main { fill: none; stroke: var(--accent); stroke-width: 2.4; stroke-linecap: round; stroke-linejoin: round; }
.dg-muted { fill: none; stroke: #6b7280; stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; }
.dg-dot { fill: var(--accent-2); }
.dg-dot-muted { fill: #6b7280; }
.dg-dash { fill: none; stroke: var(--gold); stroke-width: 2; stroke-dasharray: 5 5; stroke-linecap: round; }
.dg-band { fill: rgba(var(--glow),0.14); }
.dg-label { font-family: 'JetBrains Mono', monospace; font-size: 12px; fill: var(--text-dim); }
.dg-label.gold { fill: var(--gold-2); }
.dg-label.accent { fill: var(--accent-2); }
.dg-title { font-family: 'Inter', sans-serif; font-weight: 700; font-size: 16px; fill: var(--text); }
.dg-node { fill: #14141e; stroke: var(--accent); stroke-width: 1.6; }
.dg-panel { fill: rgba(255,255,255,0.03); stroke: var(--border-strong); stroke-width: 1.2; }
.dg-tick { font-family: 'JetBrains Mono', monospace; font-size: 11px; fill: var(--text-dim); }
.dg-bar { fill: var(--accent); opacity: 0.85; }
.dg-bar-muted { fill: none; stroke: var(--accent); stroke-width: 1.6; stroke-dasharray: 4 3; }
.dg-arrow { stroke: var(--accent); stroke-width: 2; fill: none; stroke-linecap: round; }

/* circle of competence */
.dg-ring { fill: none; stroke-width: 1.4; }
.dg-ring.r1 { stroke: rgba(255,255,255,0.18); }
.dg-ring.r2 { stroke: rgba(var(--glow),0.45); }
.dg-ring.r3 { fill: rgba(var(--glow),0.16); stroke: var(--accent); }

/* pull quote */
.bs-pull { max-width: 820px; margin: 10px auto; padding: 60px 32px; text-align: center; }
.bs-pull p { font-family: 'Cormorant Garamond', Georgia, serif; font-style: italic; font-size: clamp(24px, 3.4vw, 38px); line-height: 1.3; color: var(--text); margin: 0 0 14px; }
.bs-pull cite { font-style: normal; font-family: 'JetBrains Mono', monospace; font-size: 11px; letter-spacing: 0.12em; text-transform: uppercase; color: var(--gold); }

/* closing */
.bs-closing { max-width: 820px; margin: 0 auto; padding: 70px 32px 40px; text-align: center; border-top: 1px solid var(--border); }
.bs-closing .bs-kicker { font-family: 'JetBrains Mono', monospace; font-size: 12px; letter-spacing: 0.2em; text-transform: uppercase; color: var(--accent); margin-bottom: 18px; }
.bs-closing .bs-h2 { margin-bottom: 16px; }
.bs-closing .bs-lead { max-width: 580px; margin: 0 auto 30px; }
.bs-actions { display: flex; gap: 12px; justify-content: center; flex-wrap: wrap; margin: 6px 0 36px; }
.bs-note { font-size: 12.5px; line-height: 1.6; color: var(--text-mute); max-width: 640px; margin: 0 auto; padding: 20px 22px; background: rgba(255,255,255,0.02); border: 1px solid var(--border); border-radius: var(--radius); }
.bs-note b { color: var(--text-dim); }

/* footer */
.bs-footer { padding: 40px 32px; text-align: center; border-top: 1px solid var(--border); position: relative; z-index: 1; }
.bs-footer p { font-family: 'JetBrains Mono', monospace; font-size: 12px; color: var(--text-mute); margin: 0; letter-spacing: 0.05em; }
.bs-footer a { color: var(--text-dim); transition: color 0.2s; }
.bs-footer a:hover { color: var(--text); }

/* progress */
.bs-progress { position: fixed; left: 0; right: 0; top: 0; height: 3px; background: rgba(255,255,255,0.05); z-index: 9500; }
.bs-progress i { display: block; height: 100%; width: 0; background: var(--accent-grad); box-shadow: 0 0 14px rgba(var(--glow),0.6); }

/* ===== RESPONSIVE ===== */
@media (max-width: 820px) {
  .bs-hero { grid-template-columns: 1fr; gap: 36px; padding: 54px 24px 44px; }
  .bs-cover { order: -1; max-width: 380px; margin: 0 auto; }
  .bs-points, .bs-two { grid-template-columns: 1fr; }
  .bs-section { padding: 48px 24px; }
}
@media (max-width: 560px) {
  .bs-cover { padding-left: 24px; padding-right: 24px; }
  .bs-cover-kicker { letter-spacing: 0.18em; }
  .bs-cover-sub { letter-spacing: 0.1em; }
  .bs-bigidea { padding: 54px 24px; }
  .bs-pull { padding: 48px 24px; }
}
