/* === CONTAINER OVERRIDE === */
.bt-container {
  max-width: 1100px;
  margin: 0 auto;
  padding: 0 1.5rem;
}

/* === HERO === */
.simul-hero {
  background: #0E7C6A;
  color: #fff;
  padding: 2.5rem 0 2rem;
}
.simul-hero h1 {
  font-family: 'Lora', Georgia, serif;
  font-size: clamp(1.9rem, 4vw, 2.8rem);
  font-weight: 500;
  color: #fff;
  margin-bottom: 0.5rem;
}
.simul-hero-meta {
  font-size: 0.9rem;
  color: rgba(255,255,255,0.75);
  font-family: 'Source Sans 3', sans-serif;
}
.simul-hero-desc {
  margin-top: 0.75rem;
  font-size: 1rem;
  color: rgba(255,255,255,0.85);
  max-width: 680px;
}

/* === TWO-COLUMN LAYOUT === */
.simul-layout {
  display: grid;
  grid-template-columns: 220px 1fr;
  gap: 0;
  align-items: start;
  max-width: 1100px;
  margin: 0 auto;
  padding: 2.5rem 1.5rem;
}
.simul-sidebar {
  position: sticky;
  top: 1.5rem;
  padding-right: 2rem;
}
.simul-content {
  min-width: 0;
}

/* === SIDEBAR NAV === */
.simul-toc-section {
  margin-bottom: 1.5rem;
}
.simul-toc-label {
  font-family: 'Source Sans 3', sans-serif;
  font-size: 0.65rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: #9080D0;
  margin-bottom: 0.4rem;
  display: block;
}
.simul-toc-link {
  display: block;
  font-family: 'Source Sans 3', sans-serif;
  font-size: 0.82rem;
  color: #444;
  padding: 3px 0 3px 0.5rem;
  border-left: 2px solid transparent;
  text-decoration: none;
  line-height: 1.4;
}
.simul-toc-link:hover {
  color: #0E7C6A;
  border-left-color: #0E7C6A;
  text-decoration: none;
}
.simul-toc-link.active {
  color: #0E7C6A;
  border-left-color: #0E7C6A;
  font-weight: 600;
}
.simul-toc-sublink {
  display: block;
  font-family: 'Source Sans 3', sans-serif;
  font-size: 0.78rem;
  color: #666;
  padding: 2px 0 2px 1.2rem;
  border-left: 2px solid transparent;
  text-decoration: none;
  line-height: 1.4;
}
.simul-toc-sublink:hover {
  color: #0E7C6A;
  text-decoration: none;
}

/* === PAGE CONTENT (chapter pages) === */
.simul-chapter-hero {
  background: #0E7C6A;
  color: #fff;
  padding: 2rem 0 1.75rem;
}
.simul-chapter-hero h1 {
  font-family: 'Lora', Georgia, serif;
  font-size: clamp(1.5rem, 3vw, 2.2rem);
  font-weight: 500;
  color: #fff;
  margin-bottom: 0.25rem;
}
.simul-chapter-hero .simul-chapter-part {
  font-size: 0.8rem;
  color: rgba(255,255,255,0.7);
  font-family: 'Source Sans 3', sans-serif;
  text-transform: uppercase;
  letter-spacing: 0.06em;
}

/* === PROSE CONTENT === */
.simul-prose {
  padding: 2rem 0;
}
.simul-prose h2 {
  font-family: 'Lora', Georgia, serif;
  font-size: 1.4rem;
  font-weight: 500;
  color: #1a1a2e;
  margin: 2rem 0 0.75rem;
  padding-bottom: 0.3rem;
  border-bottom: 1px solid #e0dff5;
}
.simul-prose h3 {
  font-family: 'Lora', Georgia, serif;
  font-size: 1.1rem;
  font-weight: 500;
  color: #1a1a2e;
  margin: 1.5rem 0 0.5rem;
}
.simul-prose p {
  margin-bottom: 1rem;
  line-height: 1.75;
}
.simul-prose ul, .simul-prose ol {
  margin: 0 0 1rem 1.5rem;
  line-height: 1.75;
}
.simul-prose li {
  margin-bottom: 0.4rem;
}

/* === R CODE BLOCKS === */
.simul-code {
  background: #1a1a2e;
  color: #e8e8f0;
  font-family: 'Courier New', Courier, monospace;
  font-size: 0.88rem;
  line-height: 1.6;
  padding: 1.25rem 1.5rem;
  border-radius: 6px;
  border-left: 4px solid #0E7C6A;
  overflow-x: auto;
  margin: 1.25rem 0;
  white-space: pre;
}

/* === DOWNLOAD BUTTON === */
.simul-download-bar {
  display: flex;
  align-items: center;
  gap: 1rem;
  background: #ECEAF8;
  border: 1px solid #B0A6E0;
  border-radius: 8px;
  padding: 0.85rem 1.25rem;
  margin: 1.5rem 0 2rem;
}
.simul-download-bar p {
  margin: 0;
  font-size: 0.9rem;
  color: #444;
  flex: 1;
}
.simul-download-btn {
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  background: #0E7C6A;
  color: #fff;
  font-family: 'Source Sans 3', sans-serif;
  font-size: 0.85rem;
  font-weight: 600;
  padding: 0.5rem 1.1rem;
  border-radius: 20px;
  border: none;
  cursor: pointer;
  text-decoration: none;
  white-space: nowrap;
}
.simul-download-btn:hover {
  background: #0a6357;
  color: #fff;
  text-decoration: none;
}
.simul-copy-btn {
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  background: transparent;
  color: #0E7C6A;
  font-family: 'Source Sans 3', sans-serif;
  font-size: 0.85rem;
  font-weight: 600;
  padding: 0.5rem 1.1rem;
  border-radius: 20px;
  border: 2px solid #0E7C6A;
  cursor: pointer;
  white-space: nowrap;
}
.simul-copy-btn:hover {
  background: #0E7C6A;
  color: #fff;
}

/* === DATA TABLES === */
.simul-table {
  width: 100%;
  border-collapse: collapse;
  margin: 1.25rem 0;
  font-size: 0.9rem;
}
.simul-table th {
  background: #0E7C6A;
  color: #fff;
  padding: 0.6rem 0.9rem;
  text-align: left;
  font-family: 'Source Sans 3', sans-serif;
  font-weight: 600;
}
.simul-table td {
  padding: 0.5rem 0.9rem;
  border-bottom: 1px solid #e0dff5;
}
.simul-table tr:nth-child(even) td {
  background: #f4f3fb;
}

/* === BACK LINK === */
.simul-back-link {
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  font-family: 'Source Sans 3', sans-serif;
  font-size: 0.9rem;
  color: #0E7C6A;
  font-weight: 600;
  text-decoration: none;
  margin: 2rem 0 1rem;
}
.simul-back-link:hover {
  text-decoration: underline;
  color: #0a6357;
}

/* === REFLECTIONS BOX === */
.simul-reflections {
  background: #f0faf8;
  border-left: 4px solid #0E7C6A;
  border-radius: 0 6px 6px 0;
  padding: 1.25rem 1.5rem;
  margin: 2rem 0;
}
.simul-reflections h2, .simul-reflections h3 {
  margin-top: 0;
  color: #0E7C6A;
}

/* === FOOTNOTE === */
.simul-footnote {
  font-size: 0.8rem;
  color: #888;
  border-top: 1px solid #e0dff5;
  padding-top: 1rem;
  margin-top: 3rem;
  font-style: italic;
}

/* === RESPONSIVE === */
@media (max-width: 820px) {
  .simul-layout { grid-template-columns: 1fr; padding: 1.5rem; }
  .simul-sidebar { display: none; }
}
