/* DataVisCourseSite — Lesson Page Styles (magazine editorial) */

.lesson-page { background: #FDFCFB; }

/* ── Section Label Row ── */
.section-label-row {
  display: flex; align-items: center; gap: 1rem;
  margin-bottom: 1.5rem;
}
.section-label {
  font-family: 'JetBrains Mono', monospace;
  font-size: 0.72rem; letter-spacing: 0.15em; text-transform: uppercase;
  color: #DC6B19; white-space: nowrap;
}
.section-line {
  flex: 1; height: 1px; background: #E8E4E0; min-width: 0;
}
.section-hint {
  font-family: 'JetBrains Mono', monospace;
  font-size: 0.68rem; color: #AFAFAF; white-space: nowrap;
  letter-spacing: 0.04em;
}
.section-label-row.dark .section-label { color: rgba(255,255,255,0.5); }
.section-label-row.dark .section-line { flex: 1; background: #30363d; min-width: 0; }
.section-label-row.dark .section-hint { color: rgba(255,255,255,0.3); }

/* ── Header ── */
.lesson-header {
  padding: 5rem 0 3.5rem;
  border-bottom: 1px solid #E8E4E0;
  background: #FDFCFB;
}
.lesson-header-inner { max-width: 1100px; margin: 0 auto; padding: 0 2.5rem; }
.lesson-chapter {
  font-family: 'JetBrains Mono', monospace;
  font-size: 0.72rem; letter-spacing: 0.15em; text-transform: uppercase;
  color: #DC6B19; margin-bottom: 1rem;
  display: flex; align-items: center; gap: 0.5rem;
}
.lesson-chapter::before {
  content: ''; display: inline-block;
  width: 2rem; height: 2px; background: #DC6B19;
}
.lesson-title {
  font-family: 'Playfair Display', Georgia, serif;
  font-size: clamp(2.2rem, 5vw, 3.5rem);
  color: #1A1A1A; margin-bottom: 0.75rem;
  line-height: 1.1; letter-spacing: -0.01em;
}
.lesson-sub {
  font-size: 1rem; color: #7A7A7A;
  max-width: 560px; line-height: 1.8; margin-bottom: 1.5rem;
}
.lesson-meta { display: flex; gap: 1.5rem; flex-wrap: wrap; }
.lesson-meta-item {
  display: flex; align-items: center; gap: 0.4rem;
  font-family: 'JetBrains Mono', monospace;
  font-size: 0.72rem; color: #AFAFAF;
  letter-spacing: 0.05em;
}

/* ── Objectives ── */
.objectives-section { padding: 3.5rem 0; background: #FDFCFB; }
.objectives-inner { max-width: 1100px; margin: 0 auto; padding: 0 2.5rem; }
.objectives-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
  gap: 1.5rem;
  margin-top: 0;
}
.objective-item {
  display: flex; gap: 1rem; align-items: flex-start;
  padding: 1.2rem 1.5rem;
  background: #fff;
  border: 1px solid #E8E4E0;
  border-radius: 2px;
}
.objective-num {
  font-family: 'JetBrains Mono', monospace;
  font-size: 0.68rem; color: #DC6B19;
  letter-spacing: 0.05em; padding-top: 0.1rem;
  flex-shrink: 0;
}
.objective-item p {
  font-size: 0.9rem; color: #7A7A7A; line-height: 1.6;
  margin: 0;
}

/* ── Concepts Strip ── */
.concepts-strip {
  background: #F7F5F3;
  border-top: 1px solid #E8E4E0;
  border-bottom: 1px solid #E8E4E0;
  padding: 1.2rem 0;
}
.concepts-strip-inner {
  max-width: 1100px; margin: 0 auto; padding: 0 2.5rem;
  display: flex; align-items: center; gap: 1.5rem; flex-wrap: wrap;
}
.concepts-label {
  font-family: 'JetBrains Mono', monospace;
  font-size: 0.68rem; letter-spacing: 0.12em; text-transform: uppercase;
  color: #DC6B19; white-space: nowrap;
}
.concepts-tags { display: flex; gap: 0.5rem; flex-wrap: wrap; }
.concept-tag {
  font-family: 'JetBrains Mono', monospace;
  font-size: 0.72rem; padding: 0.25em 0.7em;
  background: #fff; border: 1px solid #E8E4E0;
  color: #7A7A7A; border-radius: 2px; letter-spacing: 0.04em;
  transition: border-color 0.2s, color 0.2s;
}
.concept-tag:hover { border-color: #DC6B19; color: #DC6B19; }

/* ── Slides Section ── */
.slides-section { padding: 3.5rem 0; background: #FDFCFB; }
.slides-section-inner { max-width: 1100px; margin: 0 auto; padding: 0 2.5rem; }
.slide-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(240px, 1fr));
  gap: 1.5rem;
}
.slide-item {
  border: 1px solid #E8E4E0; background: #fff;
  overflow: hidden; border-radius: 2px;
  cursor: pointer;
  transition: border-color 0.2s, box-shadow 0.2s, transform 0.15s;
}
.slide-item:hover {
  border-color: #DC6B19;
  box-shadow: 0 6px 24px rgba(220,107,25,0.12);
  transform: translateY(-2px);
}
.slide-item img {
  width: 100%; display: block;
  aspect-ratio: 16/9; object-fit: cover;
}
.slide-caption {
  padding: 0.7rem 1rem;
  font-family: 'JetBrains Mono', monospace;
  font-size: 0.68rem; color: #AFAFAF;
  border-top: 1px solid #E8E4E0;
  display: flex; justify-content: space-between; align-items: center;
}
.slide-caption strong { color: #DC6B19; }

/* ── Demo Section ── */
.demo-section { background: #0d1117; padding: 3.5rem 0; }
.demo-section-inner { max-width: 1100px; margin: 0 auto; padding: 0 2.5rem; }
.demo-canvas-wrap {
  background: #161b22;
  border: 1px solid #30363d; border-radius: 4px;
  padding: 1.5rem; min-height: 420px;
  display: flex; align-items: center; justify-content: center;
  overflow: hidden;
}
.demo-canvas-wrap iframe { width: 100%; height: 100%; border: none; background: #161b22; }
.demo-canvas-wrap svg, .demo-canvas-wrap canvas { max-width: 100%; width: 100%; height: 100%; }

/* ── Footer ── */
.lesson-footer {
  background: #FDFCFB; border-top: 1px solid #E8E4E0; padding: 1.8rem 0;
}
.lesson-footer-inner {
  max-width: 1100px; margin: 0 auto; padding: 0 2.5rem;
  display: flex; justify-content: center; align-items: center; gap: 2rem;
  font-family: 'JetBrains Mono', monospace; font-size: 0.72rem;
}
.lesson-footer a { color: #DC6B19; text-decoration: none; letter-spacing: 0.05em; }
.lesson-footer a:hover { text-decoration: underline; }

/* ── Lightbox ── */
.lightbox {
  display: none; position: fixed; inset: 0; z-index: 1000;
  background: rgba(0,0,0,0.88);
  align-items: center; justify-content: center; padding: 2rem;
}
.lightbox.active { display: flex; }
.lightbox-img {
  max-width: 90vw; max-height: 85vh;
  border: 1px solid #30363d; border-radius: 2px;
}
.lightbox-close {
  position: absolute; top: 1.5rem; right: 2rem;
  color: rgba(255,255,255,0.7); font-size: 2rem; cursor: pointer;
  background: none; border: none; font-family: sans-serif; line-height: 1;
  transition: color 0.2s;
}
.lightbox-close:hover { color: #fff; }
.lightbox-nav {
  position: absolute; top: 50%; transform: translateY(-50%);
  color: rgba(255,255,255,0.6); font-size: 2.5rem; cursor: pointer;
  padding: 1rem; font-family: sans-serif; background: none; border: none;
  transition: color 0.2s; user-select: none;
}
.lightbox-nav:hover { color: #fff; }
.lightbox-prev { left: 0.5rem; }
.lightbox-next { right: 0.5rem; }
.lightbox-counter {
  position: absolute; bottom: 1.5rem; left: 50%; transform: translateX(-50%);
  font-family: 'JetBrains Mono', monospace; font-size: 0.72rem;
  color: rgba(255,255,255,0.4); letter-spacing: 0.1em;
}

/* ── Slide note ── */
.slide-note {
  background: #FFF8F0;
  border: 1px solid #DC6B19;
  border-radius: 2px;
  padding: 1rem 1.25rem;
  font-family: 'JetBrains Mono', monospace;
  font-size: 0.72rem;
  color: #DC6B19;
  line-height: 1.6;
  margin-top: 1.5rem;
}

/* ── Responsive ── */
@media (max-width: 768px) {
  .lesson-header-inner,.slides-section-inner,.demo-section-inner,
  .concepts-strip-inner,.lesson-footer-inner,.objectives-inner { padding: 0 1.25rem; }
  .slide-grid { grid-template-columns: repeat(2,1fr); gap: 1rem; }
  .lesson-title { font-size: 2rem; }
}
@media (max-width: 480px) {
  .slide-grid { grid-template-columns: 1fr; }
}

/* ── Experiment Guide Section ── */
.guide-section {
  padding: 3.5rem 0;
  background: #FDFCFB;
}
.guide-inner {
  max-width: 1100px;
  margin: 0 auto;
  padding: 0 2.5rem;
}
.guide-overview {
  background: #fff;
  border: 1px solid #E8E4E0;
  border-left: 4px solid #DC6B19;
  border-radius: 2px;
  padding: 1.5rem 2rem;
  margin: 2rem 0 2.5rem;
  font-size: 0.92rem;
  color: #444;
  line-height: 1.7;
}
.guide-overview p { margin: 0; }

.guide-steps {
  display: flex;
  flex-direction: column;
  gap: 1.5rem;
  margin-bottom: 2rem;
}
.guide-step {
  background: #fff;
  border: 1px solid #E8E4E0;
  border-radius: 2px;
  overflow: hidden;
}
.guide-step-header {
  display: flex;
  align-items: center;
  gap: 1rem;
  padding: 0.9rem 1.5rem;
  background: #FAFAF8;
  border-bottom: 1px solid #E8E4E0;
}
.guide-step-num {
  font-family: 'JetBrains Mono', monospace;
  font-size: 0.68rem;
  font-weight: 700;
  color: #fff;
  background: #DC6B19;
  padding: 0.2em 0.6em;
  border-radius: 2px;
  flex-shrink: 0;
}
.guide-step-label {
  font-size: 0.88rem;
  font-weight: 600;
  color: #333;
  letter-spacing: 0.02em;
}
.guide-step-body {
  padding: 1.5rem;
  font-size: 0.88rem;
  color: #555;
  line-height: 1.75;
}
.guide-step-body p {
  margin: 0 0 0.8em;
}
.guide-step-body p:last-child { margin-bottom: 0; }

.code-block {
  background: #1E1E1E;
  border-radius: 4px;
  padding: 1.2rem 1.5rem;
  margin: 1rem 0;
  overflow-x: auto;
  font-family: 'JetBrains Mono', 'Fira Code', 'Courier New', monospace;
  font-size: 0.78rem;
  line-height: 1.6;
  color: #D4D4D4;
}
.code-block code { color: inherit; background: none; padding: 0; }

.guide-tips {
  background: #FFF8F0;
  border: 1px solid #F0D5BE;
  border-left: 4px solid #DC6B19;
  border-radius: 2px;
  padding: 1.2rem 1.5rem;
  margin: 0 0 1.5rem;
  display: flex;
  gap: 1rem;
  align-items: flex-start;
}
.guide-tips-label {
  font-size: 1.1rem;
  flex-shrink: 0;
}
.guide-tips p {
  margin: 0;
  font-size: 0.88rem;
  color: #7A4821;
  line-height: 1.65;
}

.guide-deliverable {
  background: #F0F7F4;
  border: 1px solid #B7D8C9;
  border-left: 4px solid #2E8B57;
  border-radius: 2px;
  padding: 1.2rem 1.5rem;
  display: flex;
  gap: 1rem;
  align-items: flex-start;
}
.guide-deliverable-label {
  font-size: 1.1rem;
  flex-shrink: 0;
}
.guide-deliverable p {
  margin: 0;
  font-size: 0.88rem;
  color: #1D5C38;
  line-height: 1.65;
}

@media (max-width: 600px) {
  .guide-step-header { flex-wrap: wrap; }
  .guide-tips, .guide-deliverable { flex-direction: column; }
  .guide-inner { padding: 0 1.25rem; }
}

/* cms-mobile-390-v1 */
@media (max-width: 420px) {
  .nav-inner {
    height: auto;
    min-height: 60px;
    padding: .8rem 1rem;
    flex-wrap: wrap;
    gap: .65rem 1rem;
  }
  .nav-links {
    width: 100%;
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: .45rem .8rem;
  }
  .nav-links a { white-space: normal; overflow-wrap: anywhere; line-height: 1.4; }
  .lesson-footer-inner { flex-wrap: wrap; gap: .8rem; }
  .lesson-footer-inner > * { min-width: 0; overflow-wrap: anywhere; }
  .pattern-grid, .slide-grid, .objectives-grid, .outcomes-grid {
    grid-template-columns: minmax(0, 1fr);
  }
}

/* cms-outcome-title-row-v1 */
.outcome > .outcome-icon {
  display: inline-block;
  margin: 0 .55rem 0 0;
  vertical-align: middle;
}
.outcome > .outcome-icon + h3 {
  display: inline;
  margin-bottom: 0;
  vertical-align: middle;
}
.outcome > .outcome-icon + h3 + p { margin-top: .6rem; }

/* cms-bilingual-case-title-v1 */
@media (max-width: 700px) {
  .case-title-translation {
    display: block;
    white-space: nowrap;
  }
}
