/* ==========================================================================
   The Science Inside Your Cup — Gourmet Edition Stylesheet
   Direct, professional, modern sans-serif typography
   ========================================================================== */

/* ----- CSS Custom Properties ----- */
:root {
  --forest: #2D6A4F;
  --forest-light: #40916C;
  --forest-dark: #1B4332;
  --cream: #F7F9F7;
  --white: #FFFFFF;
  --text: #1a2e1a;
  --text-light: #4a6a4a;
  --border-light: rgba(45, 106, 79, 0.15);
  --shadow-sm: 0 2px 8px rgba(27, 67, 50, 0.08);
  --shadow-md: 0 4px 16px rgba(27, 67, 50, 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: 17px;
}

body {
  font-family: system-ui, -apple-system, 'Inter', 'Segoe UI', Roboto, sans-serif;
  font-size: 1rem;
  line-height: 1.6;
  color: var(--text);
  background-color: var(--cream);
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

/* ----- Reading Container ----- */
.book-container {
  max-width: 680px;
  margin: 0 auto;
  padding: 1.5rem 2rem 3rem;
  background-color: var(--white);
  min-height: 100vh;
  box-shadow: 0 0 40px rgba(27, 67, 50, 0.06);
}

/* ----- Top Navigation ----- */
.book-nav {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 0.75rem 0;
  border-bottom: 1px solid var(--border-light);
  margin-bottom: 2rem;
  font-size: 0.8rem;
}

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

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

.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: left;
  margin-bottom: 2rem;
  padding-bottom: 1.5rem;
  border-bottom: 2px solid var(--forest);
}

.chapter-number {
  display: block;
  font-size: 0.75rem;
  font-weight: 700;
  letter-spacing: 0.15em;
  text-transform: uppercase;
  color: var(--forest);
  margin-bottom: 0.5rem;
}

.chapter-title {
  font-size: 1.8rem;
  font-weight: 800;
  line-height: 1.2;
  color: var(--forest-dark);
  margin-bottom: 0.25rem;
}

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

/* ----- Key Points Summary (Gourmet-specific) ----- */
.key-points {
  background: linear-gradient(135deg, rgba(45,106,79,0.08), rgba(64,145,108,0.04));
  border: 1px solid rgba(45,106,79,0.25);
  border-left: 4px solid var(--forest);
  border-radius: 0 var(--radius) var(--radius) 0;
  padding: 1.25rem 1.5rem;
  margin: 0 0 2rem;
}

.key-points h4 {
  color: var(--forest);
  font-size: 0.85rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  margin: 0 0 0.75rem;
}

.key-points ul {
  list-style: none;
  padding: 0;
  margin: 0;
}

.key-points li {
  position: relative;
  padding-left: 1.25rem;
  margin-bottom: 0.4rem;
  font-size: 0.9rem;
  line-height: 1.5;
  color: var(--text);
}

.key-points li::before {
  content: '\2713';
  position: absolute;
  left: 0;
  color: var(--forest);
  font-weight: 700;
}

/* ----- Typography ----- */
h1 {
  font-size: 1.8rem;
  font-weight: 800;
  line-height: 1.2;
  color: var(--forest-dark);
  margin: 2.5rem 0 1rem;
}

h2 {
  font-size: 1.3rem;
  font-weight: 700;
  line-height: 1.3;
  color: var(--forest-dark);
  margin: 2rem 0 0.75rem;
  padding-top: 0.75rem;
}

h3 {
  font-size: 1.05rem;
  font-weight: 700;
  line-height: 1.35;
  color: var(--forest-dark);
  margin: 1.5rem 0 0.5rem;
}

h4 {
  font-size: 0.95rem;
  font-weight: 700;
  color: var(--forest);
  margin: 1.25rem 0 0.4rem;
}

p {
  margin-bottom: 1rem;
  text-align: left;
}

.chapter-body p + p {
  text-indent: 0;
}

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

a {
  color: var(--forest);
  text-decoration: underline;
  text-decoration-color: rgba(45,106,79,0.3);
  text-underline-offset: 2px;
  transition: color var(--transition);
}

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

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

li {
  margin-bottom: 0.35rem;
  line-height: 1.55;
}

/* ----- Quick Facts (replaces Coffee Break) ----- */
.quick-facts {
  border-left: 4px solid var(--forest);
  padding: 1.25rem 1.5rem;
  margin: 2rem 0;
  background: linear-gradient(135deg, #f0f7f4, #f7f9f7);
  border-radius: 0 var(--radius) var(--radius) 0;
  box-shadow: var(--shadow-sm);
}

.quick-facts-title {
  font-size: 0.85rem;
  font-weight: 700;
  color: var(--forest);
  margin-bottom: 0.5rem;
  text-transform: uppercase;
  letter-spacing: 0.05em;
}

.quick-facts p, .quick-facts li {
  font-size: 0.9rem;
  text-indent: 0 !important;
  text-align: left;
}

/* ----- Practical Takeaway (replaces "What This Means for Your Cup") ----- */
.practical-takeaway {
  padding: 1.5rem;
  margin: 2rem 0;
  background-color: var(--forest-dark);
  color: var(--cream);
  border-radius: var(--radius);
  box-shadow: var(--shadow-md);
}

.practical-takeaway-title {
  font-size: 0.9rem;
  font-weight: 700;
  color: var(--forest-light);
  margin-bottom: 0.75rem;
  text-transform: uppercase;
  letter-spacing: 0.05em;
}

.practical-takeaway p {
  color: rgba(247,249,247,0.9);
  text-indent: 0 !important;
  font-size: 0.9rem;
  margin-bottom: 0.5rem;
}

.practical-takeaway strong {
  color: var(--forest-light);
}

/* ----- Applied Science (renamed from Quick Science) ----- */
.applied-science {
  background: linear-gradient(135deg, var(--forest-dark), var(--forest));
  color: var(--cream);
  padding: 1.5rem 1.75rem;
  border-radius: var(--radius);
  margin: 2rem 0;
  border-left: 4px solid var(--forest-light);
}

.applied-science-title {
  font-weight: 700;
  font-size: 0.95rem;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  color: #b7e4c7;
  margin-bottom: 0.75rem;
}

.applied-science p, .applied-science li {
  color: rgba(247,249,247,0.9);
  font-size: 0.9rem;
  margin-bottom: 0.5rem;
}

/* ----- In Your Roastery / Café Professional Sidebar ----- */
.pro-sidebar {
  background: var(--white);
  border: 2px solid var(--forest);
  border-radius: var(--radius);
  padding: 1.5rem 1.75rem;
  margin: 2rem 0;
  position: relative;
}

.pro-sidebar::before {
  content: 'PRO';
  position: absolute;
  top: -10px;
  left: 1rem;
  background: var(--forest);
  color: var(--white);
  font-size: 0.7rem;
  font-weight: 700;
  letter-spacing: 0.1em;
  padding: 2px 8px;
  border-radius: 3px;
}

.pro-sidebar-title {
  font-weight: 700;
  font-size: 1rem;
  color: var(--forest-dark);
  margin-bottom: 0.75rem;
}

.pro-sidebar p, .pro-sidebar li {
  font-size: 0.9rem;
  line-height: 1.5;
  margin-bottom: 0.5rem;
}

.pro-sidebar ul {
  padding-left: 1.2rem;
}

/* ----- Barista Science Experiment Box ----- */
.barista-science {
  background: #f0f7f4;
  border: 1px solid var(--border-light);
  border-radius: var(--radius);
  padding: 1.5rem 1.75rem;
  margin: 2rem 0;
}

.barista-science-title {
  font-weight: 700;
  font-size: 0.9rem;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  color: var(--forest);
  margin-bottom: 0.75rem;
}

.barista-science p, .barista-science li {
  font-size: 0.9rem;
  margin-bottom: 0.5rem;
}

/* ----- Tables ----- */
.table-wrapper {
  overflow-x: auto;
  margin: 1.5rem 0;
}

table {
  width: 100%;
  border-collapse: collapse;
  font-size: 0.85rem;
  line-height: 1.5;
}

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

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

tbody tr:hover {
  background-color: rgba(45,106,79,0.04);
}

/* ----- Blockquotes ----- */
blockquote {
  border-left: 3px solid var(--forest);
  padding: 1rem 1.25rem;
  margin: 1.5rem 0;
  background-color: var(--cream);
  border-radius: 0 var(--radius) var(--radius) 0;
  font-style: italic;
  font-size: 0.95rem;
}

blockquote p { text-indent: 0 !important; text-align: left; }

/* ----- Visual Elements (same structure as original, green palette) ----- */
.fig-container {
  margin: 2rem 0;
  background: var(--white);
  border-radius: 12px;
  overflow: hidden;
  box-shadow: var(--shadow-md);
  border: 1px solid var(--border-light);
}

.fig-container img { width: 100%; height: auto; display: block; }

.fig-caption {
  padding: 0.6rem 1rem;
  background: var(--cream);
  font-size: 0.82rem;
  color: var(--text-light);
  font-style: italic;
  border-top: 1px solid var(--border-light);
  line-height: 1.5;
}

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

.svg-chart-container {
  background: var(--white);
  border-radius: 12px;
  padding: 1.25rem;
  margin: 2rem 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-size: 0.8rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.1em;
  color: var(--forest-dark);
  margin-bottom: 0.75rem;
  text-align: center;
}

.chart-source {
  font-size: 0.72rem;
  color: var(--text-light);
  margin-top: 0.5rem;
  font-style: italic;
  text-align: center;
}

.stat-strip {
  display: flex;
  gap: 0;
  flex-wrap: wrap;
  background: var(--forest-dark);
  border-radius: 12px;
  overflow: hidden;
  margin: 2rem 0;
  box-shadow: var(--shadow-md);
}

.stat-item {
  flex: 1;
  min-width: 120px;
  padding: 1rem 0.75rem;
  text-align: center;
  border-right: 1px solid rgba(247,249,247,0.1);
}

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

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

.stat-item .slabel {
  font-size: 0.7rem;
  color: rgba(247,249,247,0.6);
  margin-top: 0.2rem;
  display: block;
}

.science-callout {
  display: flex;
  gap: 0.75rem;
  background: var(--white);
  border-radius: 12px;
  padding: 1rem;
  margin: 1.5rem 0;
  box-shadow: var(--shadow-sm);
  border-left: 4px solid var(--forest);
  align-items: flex-start;
}

.science-callout .sci-icon {
  font-size: 1.5rem;
  flex-shrink: 0;
}

.science-callout h4 {
  margin: 0 0 0.2rem;
  color: var(--forest-dark);
  font-size: 0.9rem;
}

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

.highlight-box {
  background: linear-gradient(135deg, rgba(45,106,79,0.08), rgba(27,67,50,0.03));
  border: 1px solid rgba(45,106,79,0.3);
  border-radius: 12px;
  padding: 1rem 1.25rem;
  margin: 1.25rem 0;
}

.highlight-box h4 {
  color: var(--forest);
  margin: 0 0 0.4rem;
  font-size: 0.9rem;
}

.highlight-box p {
  text-indent: 0 !important;
  font-size: 0.9rem;
}

.pull-quote {
  border: none;
  background: none;
  color: var(--forest-dark);
  font-size: 1.2rem;
  line-height: 1.4;
  text-align: center;
  max-width: 560px;
  margin: 2rem auto;
  padding: 1.5rem 0;
  border-top: 2px solid var(--forest);
  border-bottom: 2px solid var(--forest);
  font-style: italic;
}

.pull-quote cite {
  display: block;
  font-size: 0.8rem;
  font-style: normal;
  color: var(--forest);
  margin-top: 0.5rem;
}

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

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

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

/* ----- Bottom Navigation ----- */
.book-nav-bottom {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 1.5rem 0 0.75rem;
  border-top: 1px solid var(--border-light);
  margin-top: 3rem;
  font-size: 0.85rem;
}

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

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

/* ----- Footer ----- */
.book-footer {
  text-align: center;
  padding: 1rem 0;
  font-size: 0.72rem;
  color: var(--text-light);
  border-top: 1px solid var(--border-light);
  margin-top: 1.5rem;
}

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

/* ----- TOC Page ----- */
.toc-page .book-container { max-width: 720px; }
.toc-cover {
  text-align: center;
  padding: 3rem 0 2rem;
  border-bottom: 2px solid var(--forest);
  margin-bottom: 2rem;
}

.toc-cover-label {
  font-size: 0.75rem;
  font-weight: 700;
  letter-spacing: 0.15em;
  text-transform: uppercase;
  color: var(--forest);
  margin-bottom: 1rem;
}

.toc-cover h1 {
  font-size: 2rem;
  color: var(--forest-dark);
  margin-bottom: 0.25rem;
}

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

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

.toc-cover .edition-badge {
  display: inline-block;
  background: var(--forest);
  color: white;
  padding: 0.3rem 1rem;
  border-radius: 1rem;
  font-size: 0.75rem;
  font-weight: 600;
  letter-spacing: 0.05em;
  margin-top: 1rem;
}

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

.toc-section h2 {
  font-size: 1rem;
  color: var(--forest);
  margin-bottom: 0.75rem;
  padding-bottom: 0.4rem;
  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(45,106,79,0.06); }

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

.toc-entries a:hover {
  color: var(--forest);
  background-color: rgba(45,106,79,0.04);
  padding-left: 1rem;
}

.toc-chapter-num {
  font-size: 0.75rem;
  font-weight: 700;
  color: var(--forest);
  margin-right: 0.75rem;
  min-width: 2.25rem;
}

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

.toc-back-link {
  display: inline-block;
  margin-top: 1.5rem;
  padding: 0.6rem 1.5rem;
  background-color: var(--forest);
  color: var(--white) !important;
  text-decoration: none !important;
  font-weight: 600;
  font-size: 0.85rem;
  border-radius: var(--radius);
  transition: all var(--transition);
}

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

/* ----- Italic ----- */
em {
  font-style: italic;
}

/* ----- List type defaults ----- */
ul { list-style-type: disc; }
ol { list-style-type: decimal; }

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

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

/* Reset indent after special elements */
.chapter-body blockquote + p,
.chapter-body .quick-facts + p,
.chapter-body .practical-takeaway + 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;
}

/* ----- Pre / Code Blocks ----- */
pre {
  background-color: var(--forest-dark);
  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;
}

/* ----- 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;
}

/* ----- Binding Energy Inline Badge ----- */
.binding-energy {
  display: inline-block;
  background: var(--forest-dark);
  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;
}

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

.anim-header {
  background: var(--forest-dark);
  color: var(--cream);
  padding: 0.75rem 1.25rem;
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.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);
  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;
  padding: 0.4rem;
  background: var(--cream);
  border-radius: 0 0 var(--radius) var(--radius);
  margin-top: -0.5rem;
}

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

@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; }
}

/* ----- HR ----- */
hr {
  border: none;
  height: 1px;
  background: var(--border-light);
  margin: 2rem auto;
  max-width: 150px;
}

hr::after {
  content: '\2022 \2022 \2022';
  display: block;
  text-align: center;
  color: var(--forest);
  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;
}

/* ==========================================================================
   Responsive
   ========================================================================== */
@media (max-width: 768px) {
  html { font-size: 15px; }
  .book-container { padding: 1.25rem 1rem 2rem; }
  .chapter-title { font-size: 1.5rem; }
  h2 { font-size: 1.15rem; }
  .stat-strip { flex-direction: column; }
  .stat-item { border-right: none; border-bottom: 1px solid rgba(247,249,247,0.1); }
  .stat-item:last-child { border-bottom: none; }
  .science-callout { flex-direction: column; }
  .pull-quote { font-size: 1.05rem; }
  .svg-chart-container { padding: 1rem; margin: 1.5rem -0.5rem; }
  .mol3d-viewer { height: 260px; }
}

@media (max-width: 480px) {
  html { font-size: 14px; }
  .book-container { padding: 1rem 0.75rem 2rem; }
  .book-nav { flex-wrap: wrap; gap: 0.5rem; justify-content: center; }
  .chapter-title { font-size: 1.3rem; }
  .book-nav-bottom { flex-direction: column; gap: 0.75rem; }
  .book-nav-bottom a { width: 100%; display: block; text-align: center; }
  .stat-item .snum { font-size: 1.4rem; }
  .anim-body { min-height: 180px; }
}

@media print {
  body { background: white; font-size: 10pt; }
  .book-container { max-width: none; box-shadow: none; padding: 0; }
  .book-nav, .book-nav-bottom, .book-footer, .progress-bar, .mol3d-viewer, .mol3d-rotate-hint { display: none; }
  .anim-container, .svg-chart-container, .stat-strip, .fig-container { break-inside: avoid; }
  .practical-takeaway { background-color: #e8e8e8 !important; color: #000 !important; }
  .practical-takeaway p { color: #333 !important; }
  a { color: #000; text-decoration: none; }
  h2, h3 { break-after: avoid; }
  table, .fig-container { break-inside: avoid; }
}

/* ===== Your Cup, Your Lab — Home Experiment Boxes ===== */
.cup-lab {
  background: linear-gradient(135deg, #f0f7f4 0%, #e8f0ec 100%);
  border: 2px solid var(--forest);
  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(--forest);
  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-weight: 700;
  font-size: 1.1rem;
  color: var(--forest-dark);
  margin-bottom: 0.25rem;
}

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

.cup-lab h4 {
  font-size: 0.82rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  color: var(--forest-dark);
  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.9rem;
  line-height: 1.5;
  margin-bottom: 0.25rem;
}

.cup-lab-science {
  background: rgba(45, 106, 79, 0.06);
  border-radius: 6px;
  padding: 0.75rem 1rem;
  margin-top: 0.75rem;
  font-size: 0.88rem;
  line-height: 1.55;
}

.cup-lab-time {
  display: inline-block;
  margin-top: 0.75rem;
  font-size: 0.78rem;
  font-weight: 600;
  color: var(--forest);
  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(--forest);
  border-right: 3px solid var(--forest);
  font-style: italic;
  font-size: 0.98rem;
  line-height: 1.65;
  color: var(--text-light);
  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(--forest);
  margin-bottom: 0.75rem;
}
