/* Round 3 (15 Oct 2026): "black with light". Spec: docs/website-review/full-review-2026-10-14/round3/DESIGN-R3.md
   Loaded on /book/, /course/ (round 4, R4-2) and /self-diagnosis/, after the page CSS (epi-noir.php).
   Selectors start with "html body.epi-shell-<slug>" so they beat the shell's footer rules (.epi-shell-main ...)
   and Astra's span/p colour reset; colour and font properties carry !important (epi-page-shell.php notes why). */

/* =================== R3-1 palette: tokens (scoped to the noir pages) =================== */
body.epi-shell-book, body.epi-shell-course, body.epi-shell-self-diagnosis {
  --bg-primary:   #070708;
  --bg-secondary: #070708;   /* was #0f1729: the alternating bands are removed on purpose */
  --bg-void:      #030304;   /* framework stage only */
  --bg-card:      #111114;
  --bg-card-hover:#17171b;
  --bg-elevated:  #1b1b20;
  --border-subtle: rgba(255,240,210,.07);
  --border-medium: rgba(255,240,210,.12);
  --border-accent: rgba(212,175,95,.38);
  --text-bright:   #f7f2e8;
  --text-primary:  #e9e5dc;
  --text-secondary:#a39d92;
  --text-muted:    #6f6a62;
  --accent-gold:   #c8a24e;
  --gold-hi: #f2d472; --gold-lo: #8a6a24; --light: #fff1cf;
  background: #070708;
}
html:has(body.epi-shell-book), html:has(body.epi-shell-course), html:has(body.epi-shell-self-diagnosis) { background: #070708 !important; }
/* the shell's critical CSS paints body + .site navy before the wave script clears them */
html body.epi-shell-book, html body.epi-shell-book .site,
html body.epi-shell-course, html body.epi-shell-course .site,
html body.epi-shell-self-diagnosis, html body.epi-shell-self-diagnosis .site { background: #070708 !important; }
html body.epi-shell-book .epi-shell-main .book-hero__bg-gradient { background: transparent !important; }   /* was flat #0b1121 (B1) */
/* the shared footer sits on the same ground on these two pages */
html body.epi-shell-book footer.footer, html body.epi-shell-course footer.footer, html body.epi-shell-self-diagnosis footer.footer { background-color: #070708 !important; }

/* film grain: overlay does nothing on black, screen lifts it a touch (same fixed layer, same cost) */
html body.epi-shell-book::after, html body.epi-shell-course::after, html body.epi-shell-self-diagnosis::after { mix-blend-mode: screen !important; opacity: .035 !important; }

/* L1 key light at the top of every major section (book). ::after, because ::before carries the gold hairline divider */
html body.epi-shell-book .epi-shell-main .book-science,
html body.epi-shell-book .epi-shell-main .book-hook,
html body.epi-shell-book .epi-shell-main .book-chapters,
html body.epi-shell-book .epi-shell-main .book-buy { position: relative; background: transparent !important; }
html body.epi-shell-book .epi-shell-main .book-science::after,
html body.epi-shell-book .epi-shell-main .book-hook::after,
html body.epi-shell-book .epi-shell-main .book-chapters::after,
html body.epi-shell-book .epi-shell-main .book-buy::after {
  content: ""; position: absolute; inset: 0; z-index: 0; pointer-events: none;
  background: radial-gradient(60% 45% at 50% 0%, rgba(255,226,160,.07), rgba(255,226,160,0) 70%);
}
html body.epi-shell-book .epi-shell-main .book-science > .container,
html body.epi-shell-book .epi-shell-main .book-hook > .container,
html body.epi-shell-book .epi-shell-main .book-chapters > .container,
html body.epi-shell-book .epi-shell-main .book-buy > .container { position: relative; z-index: 1; }
/* section dividers: keep the gold shimmer hairlines, lighter middle */
html body.epi-shell-book .epi-shell-main .book-hook::before,
html body.epi-shell-book .epi-shell-main .book-chapters::before,
html body.epi-shell-book .epi-shell-main .book-buy::before {
  background: linear-gradient(90deg, transparent, rgba(200,162,78,0.55) 35%, rgba(255,241,207,.85) 50%, rgba(200,162,78,0.55) 65%, transparent);
}
/* L3 rim light on every card */
html body.epi-shell-book .epi-shell-main .book-chapter-card {
  background: var(--bg-card) !important;
  box-shadow: inset 0 1px 0 rgba(255,241,207,.10), inset 0 0 0 1px rgba(255,240,210,.06), 0 24px 48px -24px rgba(0,0,0,.8);
}
html body.epi-shell-book .epi-shell-main .book-chapter-card:hover { background: var(--bg-card-hover) !important; }
/* the hero is a black stage: the navy book is the only blue thing on screen */
html body.epi-shell-book .epi-shell-main .book-hero { background: transparent !important; }

/* =================== R3-3 the loop: visible numbers, lifted cards =================== */
html body.epi-shell-book .epi-shell-main .book-science::after { background: radial-gradient(60% 45% at 50% 0%, rgba(255,226,160,.07), rgba(255,226,160,0) 70%); }
html body.epi-shell-book .epi-shell-main .book-science__chain { gap: 28px; }
html body.epi-shell-book .epi-shell-main .book-science__chain li {
  padding: 26px 22px 24px; border-radius: 14px; border: 1px solid var(--border-subtle);
  background: linear-gradient(180deg, #121215, #0b0b0d) !important;
  box-shadow: inset 0 1px 0 rgba(255,241,207,.10), 0 24px 48px -24px rgba(0,0,0,.8);
  color: var(--text-primary) !important; font: 400 15px/1.55 Inter, system-ui, sans-serif !important;
  transition: border-color .5s ease, box-shadow .5s ease;
}
html body.epi-shell-book .epi-shell-main .book-science__chain li > span:last-child { color: var(--text-primary) !important; font: inherit !important; }
html body.epi-shell-book .epi-shell-main .book-science__n {
  display: block !important; width: auto !important; height: auto !important; background: none !important; border-radius: 0 !important;
  margin: 0 0 14px !important; padding-bottom: 12px; border-bottom: 1px solid rgba(212,168,76,.35);
  font: 400 40px/1 'DM Serif Display', Georgia, serif !important; letter-spacing: -.01em;
  background-image: linear-gradient(180deg, #fff1cf, #f2d472 40%, #c8a24e) !important;
  -webkit-background-clip: text !important; background-clip: text !important; color: transparent !important;
  -webkit-text-fill-color: transparent !important;
}
html body.epi-shell-book .epi-shell-main .book-science__chain li:not(:last-child)::after { border-color: rgba(242,212,114,.8); right: -20px; }
html body.epi-shell-book .epi-shell-main .book-science__chain::after { border: 1px solid rgba(212,168,76,.45); border-top: none; }   /* solid, not dashed */
/* the loop lights up once, 1 to 5, when the chain is 40% on screen (epi-noir.php sets --i and .is-lit) */
html body.epi-shell-book .epi-shell-main .book-science__chain.is-lit li { border-color: rgba(212,168,76,.42); box-shadow: inset 0 1px 0 rgba(255,241,207,.14), 0 0 0 1px rgba(212,168,76,.10), 0 24px 48px -24px rgba(0,0,0,.8); }
html body.epi-shell-book .epi-shell-main .book-science__chain.is-lit li:nth-child(n) { transition-delay: calc((var(--i, 1) - 1) * 160ms); }
@media (max-width: 900px) {
  html body.epi-shell-book .epi-shell-main .book-science__chain li { display: block; }
  html body.epi-shell-book .epi-shell-main .book-science__n { font-size: 34px !important; }
}
@media (prefers-reduced-motion: reduce) { html body.epi-shell-book .epi-shell-main .book-science__chain li { transition: none; } }

/* =================== R3-4 Selected Passages: type on the ground, no boxes =================== */
html body.epi-shell-book .epi-shell-main .book-hook { padding: 140px 0; }
html body.epi-shell-book .epi-shell-main .book-hook__inner {
  background: none !important; border: 0 !important; padding: 0 !important; width: min(1120px, 100%); max-width: none; box-shadow: none !important; position: relative;
}
/* L2 glow centred behind the featured quote */
html body.epi-shell-book .epi-shell-main .book-hook__inner::before {
  content: ""; position: absolute; left: 50%; top: 120px; width: min(1000px, 120%); height: 420px; transform: translateX(-50%); z-index: -1; pointer-events: none;
  background: radial-gradient(closest-side, rgba(212,168,76,.16), rgba(212,168,76,.05) 55%, rgba(212,168,76,0));
}
html body.epi-shell-book .epi-shell-main .book-hook__title {
  color: var(--text-bright) !important; font: 400 clamp(36px, 3.4vw, 48px)/1.1 'DM Serif Display', Georgia, serif !important; margin-bottom: 72px !important;
}
html body.epi-shell-book .epi-shell-main .book-hook__passages { display: grid; grid-template-columns: 1fr 1fr; gap: 0; margin-top: 0; }
html body.epi-shell-book .epi-shell-main .book-hook__passage,
html body.epi-shell-book .epi-shell-main .book-hook__passage:last-child {
  background: none !important; border: 0 !important; border-radius: 0 !important; box-shadow: none !important;
  padding: 0 !important; margin: 96px 0 0 !important; display: flex; flex-direction: column; align-items: flex-start; text-align: left;
}
html body.epi-shell-book .epi-shell-main .book-hook__passage::before { content: none !important; display: none !important; }
html body.epi-shell-book .epi-shell-main .book-hook__passage:first-child { grid-column: 1 / -1; margin: 0 !important; align-items: center; text-align: center; }
html body.epi-shell-book .epi-shell-main .book-hook__passage:nth-child(2) { padding-right: 56px !important; }
html body.epi-shell-book .epi-shell-main .book-hook__passage:nth-child(3) { border-left: 1px solid var(--border-subtle) !important; padding-left: 56px !important; }
html body.epi-shell-book .epi-shell-main .book-hook__text {
  font: 400 26px/1.3 'DM Serif Display', Georgia, serif !important; font-style: normal !important; letter-spacing: 0;
  color: var(--text-primary) !important; max-width: 22ch; margin: 0 !important; text-wrap: balance;
}
html body.epi-shell-book .epi-shell-main .book-hook__passage:first-child .book-hook__text {
  font: 400 clamp(30px, 3.6vw, 48px)/1.16 'DM Serif Display', Georgia, serif !important; font-style: normal !important; letter-spacing: -.01em;
  color: var(--text-bright) !important; max-width: 24ch; margin: 0 auto !important;
}
/* hanging marks in the same family, gold */
html body.epi-shell-book .epi-shell-main .book-hook__text::before { content: "\201C"; color: var(--accent-gold); margin-left: -.42em; padding-right: .04em; }
html body.epi-shell-book .epi-shell-main .book-hook__text::after { content: "\201D"; color: var(--accent-gold); }
/* cite: a ruled caption, no pill */
html body.epi-shell-book .epi-shell-main .book-hook__cite {
  display: flex !important; align-items: center; gap: 12px; margin-top: 28px !important; padding: 0 !important; border: 0 !important; border-radius: 0 !important; background: none !important;
  font: 600 11px/1 Inter, system-ui, sans-serif !important; letter-spacing: .24em !important; text-transform: uppercase; color: rgba(200,162,78,.8) !important; opacity: 1;
}
html body.epi-shell-book .epi-shell-main .book-hook__cite::before { content: ""; width: 28px; height: 1px; background: currentColor; flex: none; }
html body.epi-shell-book .epi-shell-main .book-hook__passage:first-child .book-hook__cite { justify-content: center; }
/* the featured quote rises out of the dark as it scrolls in (progressive; static where unsupported) */
@supports (animation-timeline: view()) {
  @media (prefers-reduced-motion: no-preference) {
    html body.epi-shell-book .epi-shell-main .book-hook__passage:first-child .book-hook__text {
      animation: epiHookRise linear both; animation-timeline: view(); animation-range: entry 10% cover 40%;
    }
    @keyframes epiHookRise { from { opacity: .2; transform: translateY(12px); } to { opacity: 1; transform: none; } }
  }
}
@media (max-width: 768px) {
  html body.epi-shell-book .epi-shell-main .book-hook { padding: 96px 0; }
  html body.epi-shell-book .epi-shell-main .book-hook__title { margin-bottom: 48px !important; }
  html body.epi-shell-book .epi-shell-main .book-hook__passages { grid-template-columns: 1fr; }
  html body.epi-shell-book .epi-shell-main .book-hook__passage:first-child .book-hook__text { font-size: 30px !important; }
  html body.epi-shell-book .epi-shell-main .book-hook__text { font-size: 22px !important; padding-left: .42em; }
  html body.epi-shell-book .epi-shell-main .book-hook__passage:first-child .book-hook__text { padding-left: 0; }
  html body.epi-shell-book .epi-shell-main .book-hook__passage,
  html body.epi-shell-book .epi-shell-main .book-hook__passage:last-child { margin-top: 56px !important; }
  html body.epi-shell-book .epi-shell-main .book-hook__passage:nth-child(2) { padding-right: 0 !important; }
  html body.epi-shell-book .epi-shell-main .book-hook__passage:nth-child(3) { border-left: 0 !important; padding-left: 0 !important; border-top: 1px solid var(--border-subtle) !important; padding-top: 56px !important; }
}

/* R3-2 framework: moved to anim/levers-field.css in round 4 (R4-2), the shared component for /book/ and /course/ */

/* =================== R3-7 Roadmap shrunk into a list at the end of the chapters =================== */
html body.epi-shell-book .epi-shell-main .book-roadmap { margin: 72px auto 0; max-width: 1000px; }
html body.epi-shell-book .epi-shell-main .book-roadmap .section-label { display: flex; justify-content: center; margin-bottom: 22px; }
html body.epi-shell-book .epi-shell-main .book-roadmap__list { list-style: none; margin: 0 !important; padding: 0 !important; display: grid; grid-template-columns: 1fr 1fr; column-gap: 56px; row-gap: 0; }
html body.epi-shell-book .epi-shell-main .book-roadmap__row { display: flex; align-items: baseline; gap: 10px; padding: 12px 0; margin: 0 !important; }
html body.epi-shell-book .epi-shell-main .book-roadmap__t { font: 400 15px/1.4 Inter, system-ui, sans-serif !important; color: var(--text-primary) !important; flex: none; max-width: 52%; }
html body.epi-shell-book .epi-shell-main .book-roadmap__lead { flex: 1 1 auto; min-width: 16px; border-bottom: 1px dotted rgba(255,240,210,.18); transform: translateY(-4px); }
html body.epi-shell-book .epi-shell-main .book-roadmap__s { font: 400 16px/1.35 'DM Serif Display', Georgia, serif !important; color: var(--accent-gold) !important; text-decoration: none !important; text-align: right; max-width: 48%; }
html body.epi-shell-book .epi-shell-main .book-roadmap__s:hover, html body.epi-shell-book .epi-shell-main .book-roadmap__s:focus-visible { color: #f2d472 !important; text-decoration: underline !important; text-underline-offset: 4px; }
html body.epi-shell-book .epi-shell-main .book-roadmap__note { text-align: center; margin: 22px 0 0 !important; font-size: 14px !important; font-style: italic; color: var(--text-secondary) !important; }
html body.epi-shell-book .epi-shell-main .book-roadmap__ask {
  display: block; margin: 14px auto 0; background: none !important; border: 0 !important; padding: 6px 4px !important; cursor: pointer;
  font: 600 13px/1.2 Inter, system-ui, sans-serif !important; letter-spacing: .04em; color: var(--accent-gold) !important; text-decoration: underline !important; text-underline-offset: 4px;
}
html body.epi-shell-book .epi-shell-main .book-roadmap__ask[hidden] { display: none !important; }
html body.epi-shell-book .epi-shell-main .book-chapter-card { scroll-margin-top: 120px; }
@media (max-width: 760px) {
  html body.epi-shell-book .epi-shell-main .book-roadmap__list { grid-template-columns: 1fr; }
  html body.epi-shell-book .epi-shell-main .book-roadmap__row { flex-wrap: wrap; gap: 4px; padding: 10px 0; border-bottom: 1px dotted rgba(255,240,210,.12); }
  html body.epi-shell-book .epi-shell-main .book-roadmap__t, html body.epi-shell-book .epi-shell-main .book-roadmap__s { max-width: none; text-align: left; }
  html body.epi-shell-book .epi-shell-main .book-roadmap__lead { display: none; }
}
/* the book-page assistant holds six pains: a taller, scrolling panel */
body.epi-shell-book .epi-guide__panel { max-height: min(560px, 80vh); overflow: auto; background: linear-gradient(165deg, #17171b, #0b0b0d) !important; }
body.epi-shell-book .epi-guide .epi-guide__role { padding: 10px 12px !important; }
@media (max-height: 400px) { body.epi-shell-book .epi-guide__role-s { display: none; } }
@media (min-width: 641px) { body.epi-shell-book .epi-guide.is-auto.is-dock-left .epi-guide__panel { position: absolute; left: 0; right: auto; bottom: 74px; } }

/* =================== R3-5 self-diagnosis: black with light =================== */
html body.epi-shell-self-diagnosis::before {
  content: ""; position: fixed; inset: 0; z-index: -1; pointer-events: none;
  background: radial-gradient(50% 40% at 50% 0%, rgba(255,226,160,.08), transparent 70%);
}
html body.epi-shell-self-diagnosis .epi-ap {
  --ap-navy: #070708; --ap-card: rgba(12,12,15,.88); --ap-line: rgba(255,240,210,.08); --ap-dim: #a39d92; --ap-text: #e9e5dc; --ap-bright: #f7f2e8;
}
html body.epi-shell-self-diagnosis .epi-ap .epi-ap__quiz.ap-card {
  position: relative; overflow: hidden; border-radius: 20px; padding: 40px 44px; background: var(--ap-card) !important;
  box-shadow: inset 0 1px 0 rgba(255,241,207,.10), inset 0 0 0 1px rgba(255,240,210,.06), 0 24px 48px -24px rgba(0,0,0,.8);
}
html body.epi-shell-self-diagnosis .epi-ap .epi-ap__quiz.ap-card::before {
  content: ""; position: absolute; inset: 0 0 auto 0; height: 220px; pointer-events: none;
  background: radial-gradient(60% 100% at 50% 0%, rgba(255,226,160,.07), rgba(255,226,160,0) 70%);
}
html body.epi-shell-self-diagnosis .epi-ap .epi-ap__quiz.ap-card > * { position: relative; }
html body.epi-shell-self-diagnosis .epi-ap .ap-card { background: var(--ap-card) !important; }
html body.epi-shell-self-diagnosis .epi-ap .epi-ap__bcard { background: #0e0e11 !important; }
html body.epi-shell-self-diagnosis .epi-ap .epi-ap__bcard.is-rec { background: linear-gradient(180deg, rgba(200,162,78,.09), #0e0e11) !important; }
@media (max-width: 560px) {
  html body.epi-shell-self-diagnosis .epi-ap .epi-ap__quiz.ap-card { padding: 28px 20px; }
}

/* =================== R4-2 /course/: the same black with light as /book/ (Marcel 15 Oct 2026) ===================
   Tokens above do most of it (the course CSS paints with var(--bg-*)); here: key lights, rim-lit cards, the inline navy box. */
html body.epi-shell-course .epi-shell-main .course-hero,
html body.epi-shell-course .epi-shell-main .course-outcomes,
html body.epi-shell-course .epi-shell-main .course-why,
html body.epi-shell-course .epi-shell-main .course-modules,
html body.epi-shell-course .epi-shell-main .course-sample,
html body.epi-shell-course .epi-shell-main .course-faq,
html body.epi-shell-course .epi-shell-main .course-enroll { position: relative; background: transparent !important; }
/* L1 key light at the top of each section (::after; ::before carries the gold hairline divider) */
html body.epi-shell-course .epi-shell-main .course-why::after,
html body.epi-shell-course .epi-shell-main .course-modules::after,
html body.epi-shell-course .epi-shell-main .course-faq::after,
html body.epi-shell-course .epi-shell-main .course-enroll::after {
  content: ""; position: absolute; inset: 0; z-index: 0; pointer-events: none;
  background: radial-gradient(60% 45% at 50% 0%, rgba(255,226,160,.07), rgba(255,226,160,0) 70%);
}
/* the hero: one overhead light behind the video, like the book's stage */
html body.epi-shell-course .epi-shell-main .course-hero::before {
  top: -10%; right: auto; left: 50%; width: min(1200px, 120%); height: 70%; transform: translateX(-50%);
  background: radial-gradient(50% 50% at 50% 0%, rgba(255,226,160,.10), rgba(255,226,160,0) 70%) !important;
}
html body.epi-shell-course .epi-shell-main .course-why > .container,
html body.epi-shell-course .epi-shell-main .course-modules > .container,
html body.epi-shell-course .epi-shell-main .course-faq > .container,
html body.epi-shell-course .epi-shell-main .course-enroll > .container { position: relative; z-index: 1; }
html body.epi-shell-course .epi-shell-main .course-why::before,
html body.epi-shell-course .epi-shell-main .course-modules::before,
html body.epi-shell-course .epi-shell-main .course-enroll::before {
  background: linear-gradient(90deg, transparent, rgba(200,162,78,0.55) 35%, rgba(255,241,207,.85) 50%, rgba(200,162,78,0.55) 65%, transparent);
}
/* L3 rim light on every card (same recipe as the book's chapter cards) */
html body.epi-shell-course .epi-shell-main .course-why__card,
html body.epi-shell-course .epi-shell-main .course-section,
html body.epi-shell-course .epi-shell-main .course-faq__item {
  background: var(--bg-card) !important;
  box-shadow: inset 0 1px 0 rgba(255,241,207,.10), inset 0 0 0 1px rgba(255,240,210,.06), 0 24px 48px -24px rgba(0,0,0,.8);
}
html body.epi-shell-course .epi-shell-main .course-why__card:hover,
html body.epi-shell-course .epi-shell-main .course-section:hover { background: var(--bg-card-hover) !important; }
/* "By the end of this course you will": the box is painted navy inline in course-content.html */
html body.epi-shell-course .epi-shell-main .course-outcomes .container > div {
  background: linear-gradient(180deg, #121215, #0b0b0d) !important; border-color: rgba(212,168,76,.28) !important;
  box-shadow: inset 0 1px 0 rgba(255,241,207,.10), 0 24px 48px -24px rgba(0,0,0,.8);
}
/* the video frames sit on black, not on the old navy */
html body.epi-shell-course .epi-shell-main .course-intro-video { background: #000 !important; }
/* the course video player sat on navy (anim/course-cover-player.css #0a0e1a): black here */
html body.epi-shell-course .epi-shell-main .epi-cv, html body.epi-shell-course .epi-shell-main .epi-cv__loop { background: #000 !important; }
html body.epi-shell-course .epi-shell-main .epi-cv__play { background: rgba(7,7,8,.72) !important; }
