/* ==========================================================================
   The Science Inside Your Cup — Book HTML Stylesheet
   Professional book typography for web reading
   ========================================================================== */

/* ----- CSS Custom Properties ----- */
:root {
  --espresso: #2C1810;
  --cream: #F5F0EB;
  --roast: #8B5E3C;
  --gold: #C4956A;
  --white: #FFFFFF;
  --text: #3a2a1a;
  --text-light: #6b5040;
  --border-light: rgba(139, 94, 60, 0.15);
  --shadow-sm: 0 2px 8px rgba(44, 24, 16, 0.08);
  --shadow-md: 0 4px 16px rgba(44, 24, 16, 0.12);
  --radius: 8px;
  --transition: 0.3s ease;
}

/* ----- Reset & Base ----- */
*,
*::before,
*::after {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
  font-size: 18px;
}

body {
  font-family: Georgia, 'Times New Roman', 'Libre Baskerville', serif;
  font-size: 1rem;
  line-height: 1.85;
  color: var(--text);
  background-color: var(--cream);
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

/* ----- Reading Container ----- */
.book-container {
  max-width: 720px;
  margin: 0 auto;
  padding: 2rem 2rem 4rem;
  background-color: var(--white);
  min-height: 100vh;
  box-shadow: 0 0 40px rgba(44, 24, 16, 0.08);
}

/* ----- Top Navigation ----- */
.book-nav {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 1rem 0;
  border-bottom: 1px solid var(--border-light);
  margin-bottom: 3rem;
  font-family: system-ui, -apple-system, sans-serif;
  font-size: 0.8rem;
}

.book-nav a {
  color: var(--gold);
  text-decoration: none;
  font-weight: 600;
  transition: color var(--transition);
}

.book-nav a:hover {
  color: var(--roast);
}

.nav-prev::before { content: '\2190\00a0'; }
.nav-next::after { content: '\00a0\2192'; }

.nav-toc {
  text-transform: uppercase;
  letter-spacing: 0.1em;
  font-size: 0.75rem;
}

/* ----- Chapter Header ----- */
.chapter-header {
  text-align: center;
  margin-bottom: 3rem;
  padding-bottom: 2rem;
  border-bottom: 1px solid var(--border-light);
}

.chapter-number {
  display: block;
  font-family: system-ui, -apple-system, sans-serif;
  font-size: 0.8rem;
  font-weight: 600;
  letter-spacing: 0.15em;
  text-transform: uppercase;
  color: var(--gold);
  margin-bottom: 1rem;
}

.chapter-title {
  font-size: 2.2rem;
  font-weight: 700;
  line-height: 1.2;
  color: var(--espresso);
  margin-bottom: 0.5rem;
}

.chapter-subtitle {
  font-size: 1.1rem;
  color: var(--text-light);
  font-style: italic;
}

/* ----- Typography ----- */
h1 {
  font-size: 2.2rem;
  font-weight: 700;
  line-height: 1.2;
  color: var(--espresso);
  margin: 3rem 0 1.5rem;
}

h2 {
  font-size: 1.5rem;
  font-weight: 700;
  line-height: 1.3;
  color: var(--espresso);
  margin: 2.5rem 0 1rem;
  padding-top: 1rem;
}

h3 {
  font-size: 1.2rem;
  font-weight: 700;
  line-height: 1.35;
  color: var(--espresso);
  margin: 2rem 0 0.75rem;
}

h4 {
  font-size: 1.05rem;
  font-weight: 700;
  color: var(--roast);
  margin: 1.5rem 0 0.5rem;
}

p {
  margin-bottom: 1.25rem;
  text-align: justify;
  hyphens: auto;
  -webkit-hyphens: auto;
}

/* First paragraph after heading — no indent, drop cap optional */
h2 + p,
h3 + p,
.chapter-header + .chapter-body > p:first-child {
  text-indent: 0;
}

/* Subsequent paragraphs — subtle indent for book feel */
.chapter-body p + p {
  text-indent: 1.5em;
  margin-top: -0.25rem;
}

/* Reset indent after special elements */
.chapter-body blockquote + p,
.chapter-body .coffee-break + p,
.chapter-body .cup-meaning + p,
.chapter-body h2 + p,
.chapter-body h3 + p,
.chapter-body h4 + p,
.chapter-body ul + p,
.chapter-body ol + p,
.chapter-body table + p {
  text-indent: 0;
  margin-top: 0;
}

strong {
  font-weight: 700;
  color: var(--espresso);
}

em {
  font-style: italic;
}

a {
  color: var(--gold);
  text-decoration: underline;
  text-decoration-color: rgba(196, 149, 106, 0.4);
  text-underline-offset: 2px;
  transition: color var(--transition), text-decoration-color var(--transition);
}

a:hover {
  color: var(--roast);
  text-decoration-color: var(--roast);
}

/* ----- Lists ----- */
ul, ol {
  margin: 1.25rem 0;
  padding-left: 1.5em;
}

ul { list-style-type: disc; }
ol { list-style-type: decimal; }

li {
  margin-bottom: 0.5rem;
  line-height: 1.7;
}

li p {
  margin-bottom: 0.5rem;
  text-indent: 0 !important;
}

/* ----- Blockquotes ----- */
blockquote {
  border-left: 4px solid var(--gold);
  padding: 1.25rem 1.5rem;
  margin: 2rem 0;
  background-color: var(--cream);
  border-radius: 0 var(--radius) var(--radius) 0;
  font-style: italic;
}

blockquote p {
  margin-bottom: 0.75rem;
  text-indent: 0 !important;
  text-align: left;
}

blockquote p:last-child {
  margin-bottom: 0;
}

/* ----- Coffee Break Callout ----- */
.coffee-break {
  border-left: 4px solid var(--gold);
  padding: 1.5rem 2rem;
  margin: 2.5rem 0;
  background: linear-gradient(135deg, #fdf8f3, #f5f0eb);
  border-radius: 0 var(--radius) var(--radius) 0;
  box-shadow: var(--shadow-sm);
  position: relative;
}

.coffee-break::before {
  content: '\2615';
  position: absolute;
  top: -12px;
  left: 12px;
  font-size: 1.5rem;
  background-color: var(--white);
  padding: 0 0.5rem;
  border-radius: 50%;
  box-shadow: var(--shadow-sm);
}

.coffee-break-title {
  font-family: Georgia, serif;
  font-size: 1.1rem;
  font-weight: 700;
  color: var(--gold);
  margin-bottom: 0.75rem;
  font-style: normal;
}

.coffee-break p {
  font-style: normal;
  text-indent: 0 !important;
  text-align: left;
  margin-bottom: 0.75rem;
}

.coffee-break p:last-child {
  margin-bottom: 0;
}

/* ----- What This Means for Your Cup ----- */
.cup-meaning {
  padding: 2rem;
  margin: 2.5rem 0;
  background-color: var(--espresso);
  color: var(--cream);
  border-radius: var(--radius);
  box-shadow: var(--shadow-md);
}

.cup-meaning-title {
  font-size: 1.2rem;
  font-weight: 700;
  color: var(--gold);
  margin-bottom: 1rem;
  display: flex;
  align-items: center;
  gap: 0.5rem;
}

.cup-meaning-title::before {
  content: '\2615';
  font-size: 1.3rem;
}

.cup-meaning p {
  color: rgba(245, 240, 235, 0.9);
  text-indent: 0 !important;
  text-align: left;
  margin-bottom: 0.75rem;
}

.cup-meaning p:last-child {
  margin-bottom: 0;
}

.cup-meaning strong {
  color: var(--gold);
}

.cup-meaning a {
  color: var(--gold);
}

/* ----- Tables ----- */
.table-wrapper {
  overflow-x: auto;
  margin: 2rem 0;
  -webkit-overflow-scrolling: touch;
}

table {
  width: 100%;
  border-collapse: collapse;
  font-family: system-ui, -apple-system, sans-serif;
  font-size: 0.85rem;
  line-height: 1.5;
}

th, td {
  padding: 0.75rem 1rem;
  text-align: left;
  border-bottom: 1px solid var(--border-light);
}

th {
  background-color: var(--espresso);
  color: var(--cream);
  font-weight: 600;
  font-size: 0.8rem;
  letter-spacing: 0.03em;
}

tbody tr:hover {
  background-color: rgba(196, 149, 106, 0.05);
}

/* ----- Code / Chemical Formulas ----- */
code {
  font-family: 'SF Mono', 'Fira Code', 'Consolas', monospace;
  font-size: 0.85em;
  background-color: var(--cream);
  padding: 0.15em 0.4em;
  border-radius: 3px;
  color: var(--roast);
}

pre {
  background-color: var(--espresso);
  color: var(--cream);
  padding: 1.5rem;
  border-radius: var(--radius);
  overflow-x: auto;
  margin: 2rem 0;
  line-height: 1.5;
  font-size: 0.85rem;
}

pre code {
  background: none;
  padding: 0;
  color: inherit;
}

/* ----- Horizontal Rules (Section Breaks) ----- */
hr {
  border: none;
  height: 1px;
  background: var(--border-light);
  margin: 3rem auto;
  max-width: 200px;
}

hr::after {
  content: '\2022 \2022 \2022';
  display: block;
  text-align: center;
  color: var(--gold);
  font-size: 1.2rem;
  letter-spacing: 0.5rem;
  margin-top: -0.75rem;
  background-color: var(--white);
  max-width: 80px;
  margin-left: auto;
  margin-right: auto;
}

/* ----- Images ----- */
img {
  max-width: 100%;
  height: auto;
  display: block;
  margin: 2rem auto;
  border-radius: var(--radius);
  box-shadow: var(--shadow-sm);
}

figcaption {
  text-align: center;
  font-size: 0.85rem;
  color: var(--text-light);
  margin-top: 0.5rem;
  font-style: italic;
}

/* ----- Bottom Navigation ----- */
.book-nav-bottom {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 2rem 0 1rem;
  border-top: 1px solid var(--border-light);
  margin-top: 4rem;
  font-family: system-ui, -apple-system, sans-serif;
  font-size: 0.85rem;
}

.book-nav-bottom a {
  color: var(--gold);
  text-decoration: none;
  font-weight: 600;
  padding: 0.5rem 1rem;
  border: 2px solid var(--gold);
  border-radius: var(--radius);
  transition: all var(--transition);
}

.book-nav-bottom a:hover {
  background-color: var(--gold);
  color: var(--white);
}

/* ----- Footer ----- */
.book-footer {
  text-align: center;
  padding: 1.5rem 0;
  font-family: system-ui, -apple-system, sans-serif;
  font-size: 0.75rem;
  color: var(--text-light);
  border-top: 1px solid var(--border-light);
  margin-top: 2rem;
}

/* ----- TOC Page (index.html) ----- */
.toc-page .book-container {
  max-width: 800px;
}

.toc-cover {
  text-align: center;
  padding: 4rem 0 3rem;
  border-bottom: 2px solid var(--gold);
  margin-bottom: 3rem;
}

.toc-cover-label {
  font-family: system-ui, sans-serif;
  font-size: 0.8rem;
  font-weight: 600;
  letter-spacing: 0.15em;
  text-transform: uppercase;
  color: var(--gold);
  margin-bottom: 1.5rem;
}

.toc-cover h1 {
  font-size: 2.5rem;
  color: var(--espresso);
  margin-bottom: 0.5rem;
}

.toc-cover .subtitle {
  font-size: 1.15rem;
  color: var(--text-light);
  font-style: italic;
  margin-bottom: 1rem;
}

.toc-cover .author {
  font-size: 1rem;
  color: var(--roast);
  font-weight: 600;
}

.toc-section {
  margin-bottom: 2.5rem;
}

.toc-section h2 {
  font-size: 1.2rem;
  color: var(--gold);
  margin-bottom: 1rem;
  padding-bottom: 0.5rem;
  border-bottom: 1px solid var(--border-light);
}

.toc-entries {
  list-style: none;
  padding: 0;
}

.toc-entries li {
  margin-bottom: 0;
  border-bottom: 1px solid rgba(139, 94, 60, 0.08);
}

.toc-entries a {
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  padding: 0.85rem 0.5rem;
  color: var(--text);
  text-decoration: none;
  transition: all var(--transition);
}

.toc-entries a:hover {
  color: var(--gold);
  background-color: rgba(196, 149, 106, 0.05);
  padding-left: 1rem;
}

.toc-chapter-num {
  font-family: system-ui, sans-serif;
  font-size: 0.8rem;
  font-weight: 600;
  color: var(--gold);
  margin-right: 1rem;
  min-width: 2.5rem;
}

.toc-chapter-title {
  flex: 1;
  font-weight: 600;
}

.toc-back-link {
  display: inline-block;
  margin-top: 2rem;
  padding: 0.75rem 2rem;
  background-color: var(--gold);
  color: var(--white) !important;
  text-decoration: none !important;
  font-family: system-ui, sans-serif;
  font-weight: 600;
  font-size: 0.9rem;
  border-radius: var(--radius);
  transition: all var(--transition);
  text-align: center;
}

.toc-back-link:hover {
  background-color: var(--roast);
  transform: translateY(-2px);
  box-shadow: var(--shadow-md);
}

/* ==========================================================================
   Responsive
   ========================================================================== */
@media (max-width: 768px) {
  html { font-size: 16px; }

  .book-container {
    padding: 1.5rem 1.25rem 3rem;
  }

  .chapter-title { font-size: 1.8rem; }
  h1 { font-size: 1.8rem; }
  h2 { font-size: 1.3rem; }

  .coffee-break {
    padding: 1.25rem 1.5rem;
    margin: 2rem -0.5rem;
  }

  .cup-meaning {
    padding: 1.5rem;
    margin: 2rem -0.5rem;
  }

  .toc-cover h1 { font-size: 2rem; }
}

@media (max-width: 480px) {
  html { font-size: 15px; }

  .book-container {
    padding: 1rem 1rem 2.5rem;
  }

  .book-nav {
    flex-wrap: wrap;
    gap: 0.5rem;
    justify-content: center;
  }

  .chapter-title { font-size: 1.5rem; }

  p { text-align: left; }

  .book-nav-bottom {
    flex-direction: column;
    gap: 1rem;
    text-align: center;
  }

  .book-nav-bottom a {
    width: 100%;
    display: block;
  }

  table { font-size: 0.8rem; }
  th, td { padding: 0.5rem; }
}

/* ==========================================================================
   Inline SVG Charts & Figures
   ========================================================================== */
.svg-chart-container {
  background: var(--white);
  border-radius: 12px;
  padding: 1.5rem;
  margin: 2.5rem 0;
  box-shadow: var(--shadow-md);
  border: 1px solid var(--border-light);
  overflow: hidden;
}

.svg-chart-container svg {
  width: 100%;
  height: auto;
  display: block;
}

.chart-title {
  font-family: system-ui, -apple-system, sans-serif;
  font-size: 0.8rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.1em;
  color: var(--espresso);
  margin-bottom: 1rem;
  text-align: center;
}

.chart-source {
  font-family: system-ui, -apple-system, sans-serif;
  font-size: 0.72rem;
  color: var(--text-light);
  margin-top: 0.75rem;
  font-style: italic;
  text-align: center;
}

/* ----- Figure Containers ----- */
.fig-container {
  margin: 2.5rem 0;
  background: var(--white);
  border-radius: 12px;
  overflow: hidden;
  box-shadow: var(--shadow-md);
  border: 1px solid var(--border-light);
}

.fig-caption {
  padding: 0.75rem 1.25rem;
  background: var(--cream);
  font-size: 0.85rem;
  color: var(--text-light);
  font-style: italic;
  border-top: 1px solid var(--border-light);
  line-height: 1.6;
  text-align: left;
  text-indent: 0 !important;
}

.fig-caption strong {
  color: var(--espresso);
  font-style: normal;
}

/* ----- Stat Strips ----- */
.stat-strip {
  display: flex;
  gap: 0;
  flex-wrap: wrap;
  background: var(--espresso);
  border-radius: 12px;
  overflow: hidden;
  margin: 2.5rem 0;
  box-shadow: var(--shadow-md);
}

.stat-item {
  flex: 1;
  min-width: 130px;
  padding: 1.25rem 1rem;
  text-align: center;
  border-right: 1px solid rgba(245, 240, 235, 0.1);
}

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

.stat-item .snum {
  font-size: 2rem;
  font-weight: bold;
  color: var(--gold);
  display: block;
  line-height: 1.2;
}

.stat-item .slabel {
  font-size: 0.72rem;
  color: rgba(245, 240, 235, 0.65);
  font-family: system-ui, -apple-system, sans-serif;
  margin-top: 0.25rem;
  display: block;
}

/* ----- Science Callouts ----- */
.science-callout {
  display: flex;
  gap: 1rem;
  background: var(--white);
  border-radius: 12px;
  padding: 1.25rem;
  margin: 2rem 0;
  box-shadow: var(--shadow-sm);
  border-left: 4px solid #2D6A4F;
  align-items: flex-start;
}

.science-callout .sci-icon {
  font-size: 2rem;
  flex-shrink: 0;
  line-height: 1;
}

.science-callout h4 {
  margin: 0 0 0.3rem;
  color: var(--espresso);
  font-size: 1rem;
}

.science-callout p {
  margin: 0;
  font-size: 0.9rem;
  color: var(--text-light);
  text-indent: 0 !important;
  text-align: left;
}

.binding-energy {
  display: inline-block;
  background: var(--espresso);
  color: var(--cream);
  padding: 0.15rem 0.7rem;
  border-radius: 1rem;
  font-family: 'SF Mono', 'Fira Code', monospace;
  font-size: 0.82rem;
  margin-top: 0.5rem;
}

/* ----- Pull Quotes ----- */
.pull-quote {
  border: none;
  background: none;
  color: var(--espresso);
  font-size: 1.4rem;
  line-height: 1.5;
  text-align: center;
  max-width: 600px;
  margin: 3rem auto;
  padding: 2rem 0;
  border-top: 2px solid var(--gold);
  border-bottom: 2px solid var(--gold);
  font-style: italic;
}

.pull-quote cite {
  display: block;
  font-size: 0.8rem;
  font-style: normal;
  color: var(--gold);
  margin-top: 0.8rem;
  font-family: system-ui, sans-serif;
}

/* ----- Animated CSS Containers ----- */
.anim-container {
  background: var(--white);
  border: 2px solid var(--gold);
  border-radius: 12px;
  overflow: hidden;
  margin: 2.5rem 0;
  box-shadow: var(--shadow-md);
}

.anim-header {
  background: var(--espresso);
  color: var(--cream);
  padding: 0.75rem 1.25rem;
  display: flex;
  justify-content: space-between;
  align-items: center;
  font-family: system-ui, -apple-system, sans-serif;
}

.anim-header h4 {
  margin: 0;
  font-size: 0.85rem;
  color: var(--cream);
}

.anim-body {
  padding: 1.5rem;
  min-height: 250px;
  position: relative;
  overflow: hidden;
}

.anim-caption {
  padding: 0.75rem 1.25rem;
  font-size: 0.8rem;
  color: var(--text-light);
  border-top: 1px solid var(--border-light);
  font-family: system-ui, -apple-system, sans-serif;
  line-height: 1.6;
  text-indent: 0 !important;
  text-align: left;
}

/* ----- 3D Molecular Viewer ----- */
.mol3d-viewer {
  width: 100%;
  height: 350px;
  background: #0f172a;
  border-radius: var(--radius);
  margin: 2rem 0;
  position: relative;
  overflow: hidden;
}

.mol3d-rotate-hint {
  text-align: center;
  color: var(--text-light);
  font-size: 0.72rem;
  font-family: system-ui, sans-serif;
  padding: 0.4rem;
  background: var(--cream);
  border-radius: 0 0 var(--radius) var(--radius);
  margin-top: -0.5rem;
}

/* ==========================================================================
   Animations
   ========================================================================== */

/* Progress Bar */
.progress-bar {
  position: fixed;
  top: 0;
  left: 0;
  width: 0%;
  height: 3px;
  background: linear-gradient(90deg, var(--gold), #2D6A4F);
  z-index: 200;
  transition: width 0.15s ease-out;
}

/* Scroll Fade-In */
.fade-in {
  opacity: 0;
  transform: translateY(20px);
  transition: opacity 0.6s ease, transform 0.6s ease;
}

.fade-in.visible {
  opacity: 1;
  transform: translateY(0);
}

/* Maillard Reaction CSS Animation */
@keyframes maillardHeat {
  0% { background-color: #e8dcc4; }
  25% { background-color: #d4c49a; }
  50% { background-color: #b8956a; }
  75% { background-color: #8B5E3C; }
  100% { background-color: #4A2C2A; }
}

@keyframes moleculePulse {
  0%, 100% { transform: scale(1); opacity: 0.8; }
  50% { transform: scale(1.15); opacity: 1; }
}

@keyframes bindingDock {
  0% { transform: translateX(80px) rotate(15deg); opacity: 0.4; }
  60% { transform: translateX(5px) rotate(-2deg); opacity: 0.9; }
  100% { transform: translateX(0) rotate(0deg); opacity: 1; }
}

@keyframes networkPulse {
  0%, 100% { r: 6; opacity: 0.7; }
  50% { r: 9; opacity: 1; }
}

@keyframes flowArrow {
  0% { stroke-dashoffset: 20; }
  100% { stroke-dashoffset: 0; }
}

/* ----- Highlight Box ----- */
.highlight-box {
  background: linear-gradient(135deg, rgba(196, 149, 106, 0.12), rgba(44, 24, 16, 0.04));
  border: 1px solid rgba(196, 149, 106, 0.4);
  border-radius: 12px;
  padding: 1.25rem 1.5rem;
  margin: 1.5rem 0;
}

.highlight-box h4 {
  color: var(--gold);
  margin: 0 0 0.5rem;
}

.highlight-box p {
  text-indent: 0 !important;
  text-align: left;
}

/* ----- Responsive additions ----- */
@media (max-width: 768px) {
  .stat-strip { flex-direction: column; }
  .stat-item { border-right: none; border-bottom: 1px solid rgba(245,240,235,0.1); }
  .stat-item:last-child { border-bottom: none; }
  .science-callout { flex-direction: column; }
  .pull-quote { font-size: 1.2rem; }
  .svg-chart-container { padding: 1rem; margin: 1.5rem -0.5rem; }
  .mol3d-viewer { height: 260px; }
}

@media (max-width: 480px) {
  .stat-item .snum { font-size: 1.5rem; }
  .anim-body { min-height: 180px; }
}

@media print {
  .progress-bar, .mol3d-viewer, .mol3d-rotate-hint { display: none !important; }
  .anim-container, .svg-chart-container, .stat-strip, .fig-container { break-inside: avoid; }
}

/* ==========================================================================
   Print Styles
   ========================================================================== */
@media print {
  body {
    background: white;
    font-size: 11pt;
    line-height: 1.6;
  }

  .book-container {
    max-width: none;
    box-shadow: none;
    padding: 0;
  }

  .book-nav,
  .book-nav-bottom,
  .book-footer {
    display: none;
  }

  .coffee-break,
  .cup-meaning {
    break-inside: avoid;
    box-shadow: none;
  }

  .cup-meaning {
    background-color: #f0f0f0 !important;
    color: #000 !important;
  }

  .cup-meaning p { color: #333 !important; }
  .cup-meaning-title { color: #000 !important; }

  a { color: #000; text-decoration: none; }
  a[href]::after { content: ' (' attr(href) ')'; font-size: 0.8em; color: #666; }
  a[href^="#"]::after { content: ''; }

  h2, h3 { break-after: avoid; }
  table { break-inside: avoid; }
}

/* ===== Your Cup, Your Lab — Home Experiment Boxes ===== */
.cup-lab {
  background: linear-gradient(135deg, #fdf8f3 0%, #f5f0eb 100%);
  border: 2px solid var(--gold);
  border-radius: 8px;
  padding: 1.75rem 2rem;
  margin: 2.5rem 0;
  position: relative;
}

.cup-lab::before {
  content: '🧪 YOUR CUP, YOUR LAB';
  position: absolute;
  top: -12px;
  left: 1.25rem;
  background: var(--gold);
  color: var(--white, #fff);
  font-size: 0.7rem;
  font-weight: 700;
  letter-spacing: 0.1em;
  padding: 3px 10px;
  border-radius: 4px;
}

.cup-lab-title {
  font-family: Georgia, 'Times New Roman', serif;
  font-size: 1.15rem;
  font-weight: 700;
  color: var(--espresso);
  margin-bottom: 0.25rem;
}

.cup-lab-discover {
  font-style: italic;
  color: var(--roast);
  font-size: 0.95rem;
  margin-bottom: 1rem;
}

.cup-lab h4 {
  font-size: 0.85rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  color: var(--espresso);
  margin: 1rem 0 0.4rem;
}

.cup-lab ul {
  list-style: disc;
  padding-left: 1.2rem;
  margin: 0.3rem 0;
}

.cup-lab ol {
  padding-left: 1.2rem;
  margin: 0.3rem 0;
}

.cup-lab li {
  font-size: 0.92rem;
  line-height: 1.55;
  margin-bottom: 0.25rem;
}

.cup-lab-science {
  background: rgba(44, 24, 16, 0.06);
  border-radius: 6px;
  padding: 0.75rem 1rem;
  margin-top: 0.75rem;
  font-size: 0.9rem;
  line-height: 1.6;
}

.cup-lab-time {
  display: inline-block;
  margin-top: 0.75rem;
  font-size: 0.8rem;
  font-weight: 600;
  color: var(--gold);
  letter-spacing: 0.03em;
}

/* ===== Chapter-End Cliffhanger / Revelation Bridge ===== */
.chapter-bridge {
  margin: 2.5rem 0 1.5rem;
  padding: 1.25rem 1.5rem;
  border-left: 3px solid var(--gold);
  border-right: 3px solid var(--gold);
  font-style: italic;
  font-size: 1.02rem;
  line-height: 1.75;
  color: var(--roast);
  text-align: center;
  position: relative;
}

.chapter-bridge::before {
  content: '· · ·';
  display: block;
  text-align: center;
  font-style: normal;
  font-size: 1.2rem;
  letter-spacing: 0.5em;
  color: var(--gold);
  margin-bottom: 0.75rem;
}
