/* ============================================================
   T&Q Lab Guide — Main Stylesheet
   Anaplan RPM Apps Workshop
   ============================================================ */

:root {
  --color-primary: #0066CC;
  --color-primary-dark: #0052a3;
  --color-primary-light: #e6f0fa;
  --color-sidebar-bg: #1a2332;
  --color-sidebar-text: #c8d3e0;
  --color-sidebar-heading: #7a8fa6;
  --color-sidebar-active: #0066CC;
  --color-sidebar-hover-bg: #243044;
  --color-bg: #f5f7fa;
  --color-white: #ffffff;
  --color-text: #1f2937;
  --color-text-muted: #6b7280;
  --color-border: #e2e8f0;

  /* Callout colors */
  --color-tip-border: #22c55e;
  --color-tip-bg: #f0fdf4;
  --color-tip-text: #166534;
  --color-warning-border: #f59e0b;
  --color-warning-bg: #fffbeb;
  --color-warning-text: #92400e;
  --color-note-border: #3b82f6;
  --color-note-bg: #eff6ff;
  --color-note-text: #1e40af;
  --color-important-border: #ef4444;
  --color-important-bg: #fef2f2;
  --color-important-text: #991b1b;

  --sidebar-width: 260px;
  --header-height: 52px;
  --font-sans: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Oxygen, Ubuntu, sans-serif;
  --font-mono: 'SFMono-Regular', Consolas, 'Liberation Mono', Menlo, monospace;
  --radius: 6px;
  --shadow: 0 1px 3px rgba(0,0,0,0.1), 0 1px 2px rgba(0,0,0,0.06);
  --shadow-md: 0 4px 6px -1px rgba(0,0,0,0.1), 0 2px 4px -1px rgba(0,0,0,0.06);
}

/* ============================================================
   Reset & Base
   ============================================================ */

*, *::before, *::after {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

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

body {
  font-family: var(--font-sans);
  background: var(--color-bg);
  color: var(--color-text);
  line-height: 1.6;
}

/* ============================================================
   Mobile Header (hidden on desktop)
   ============================================================ */

.mobile-header {
  display: none;
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  height: var(--header-height);
  background: var(--color-sidebar-bg);
  color: #fff;
  align-items: center;
  padding: 0 1rem;
  gap: 1rem;
  z-index: 200;
  box-shadow: var(--shadow-md);
}

.mobile-header span {
  font-size: 1rem;
  font-weight: 600;
  color: #fff;
}

#hamburger {
  background: none;
  border: none;
  color: #fff;
  font-size: 1.4rem;
  cursor: pointer;
  padding: 4px 8px;
  border-radius: var(--radius);
  transition: background 0.15s;
}

#hamburger:hover {
  background: rgba(255,255,255,0.1);
}

/* ============================================================
   Sidebar
   ============================================================ */

.sidebar {
  position: fixed;
  top: 0;
  left: 0;
  bottom: 0;
  width: var(--sidebar-width);
  background: var(--color-sidebar-bg);
  color: var(--color-sidebar-text);
  overflow-y: auto;
  z-index: 100;
  display: flex;
  flex-direction: column;
  box-shadow: 2px 0 8px rgba(0,0,0,0.15);
}

.sidebar-header {
  padding: 1.5rem 1.25rem 1rem;
  border-bottom: 1px solid rgba(255,255,255,0.08);
  flex-shrink: 0;
}

.sidebar-title {
  font-size: 0.95rem;
  font-weight: 700;
  color: #fff;
  letter-spacing: 0.01em;
  line-height: 1.3;
}

.sidebar-subtitle {
  font-size: 0.75rem;
  color: var(--color-sidebar-heading);
  margin-top: 0.3rem;
  letter-spacing: 0.02em;
}

.nav-list {
  list-style: none;
  padding: 0.75rem 0 2rem;
  flex: 1;
}

.nav-section-title {
  font-size: 0.65rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.1em;
  color: var(--color-sidebar-heading);
  padding: 1rem 1.25rem 0.35rem;
  cursor: default;
}

.nav-link {
  display: block;
  padding: 0.45rem 1.25rem;
  font-size: 0.875rem;
  color: var(--color-sidebar-text);
  text-decoration: none;
  border-left: 3px solid transparent;
  transition: background 0.15s, color 0.15s, border-color 0.15s;
  line-height: 1.4;
}

.nav-link:hover {
  background: var(--color-sidebar-hover-bg);
  color: #fff;
  border-left-color: rgba(0,102,204,0.5);
}

.nav-link.active {
  background: rgba(0,102,204,0.15);
  color: #fff;
  border-left-color: var(--color-primary);
  font-weight: 600;
}

/* ============================================================
   Main Content
   ============================================================ */

.main-content {
  margin-left: var(--sidebar-width);
  min-height: 100vh;
  background: var(--color-bg);
}

.content-header {
  background: var(--color-white);
  border-bottom: 3px solid var(--color-primary);
  padding: 2rem 2.5rem 1.5rem;
  box-shadow: var(--shadow);
}

.content-header h1 {
  font-size: 1.75rem;
  font-weight: 700;
  color: var(--color-text);
  line-height: 1.25;
}

.content-header .subtitle {
  font-size: 1rem;
  color: var(--color-text-muted);
  margin-top: 0.4rem;
}

.content-header .badge-row {
  display: flex;
  gap: 0.5rem;
  flex-wrap: wrap;
  margin-top: 0.75rem;
}

.content-badge {
  display: inline-block;
  padding: 0.2rem 0.65rem;
  font-size: 0.72rem;
  font-weight: 600;
  border-radius: 999px;
  background: var(--color-primary-light);
  color: var(--color-primary-dark);
  letter-spacing: 0.02em;
}

.content-body {
  padding: 2rem 2.5rem 4rem;
  max-width: 920px;
}

/* ============================================================
   Typography
   ============================================================ */

.content-body h2 {
  font-size: 1.35rem;
  font-weight: 700;
  color: var(--color-text);
  margin: 2.5rem 0 0.75rem;
  padding-bottom: 0.4rem;
  border-bottom: 2px solid var(--color-border);
}

.content-body h2:first-child {
  margin-top: 0;
}

.content-body h3 {
  font-size: 1.1rem;
  font-weight: 600;
  color: var(--color-text);
  margin: 1.75rem 0 0.5rem;
}

.content-body h4 {
  font-size: 0.95rem;
  font-weight: 600;
  color: var(--color-text);
  margin: 1.25rem 0 0.35rem;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  color: var(--color-primary-dark);
}

.content-body p {
  margin: 0 0 1rem;
  line-height: 1.7;
}

.content-body ul, .content-body ol {
  margin: 0 0 1rem 1.5rem;
  line-height: 1.7;
}

.content-body li {
  margin-bottom: 0.35rem;
}

.content-body strong {
  font-weight: 600;
}

/* ============================================================
   Step Badges
   ============================================================ */

.step {
  display: flex;
  gap: 1rem;
  align-items: flex-start;
  margin: 1.5rem 0;
}

.step-badge {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 2rem;
  height: 2rem;
  min-width: 2rem;
  background: var(--color-primary);
  color: #fff;
  font-size: 0.85rem;
  font-weight: 700;
  border-radius: 50%;
  box-shadow: var(--shadow);
  flex-shrink: 0;
  margin-top: 0.15rem;
}

.step-content {
  flex: 1;
}

.step-content h3 {
  margin-top: 0;
  margin-bottom: 0.35rem;
}

/* ============================================================
   Callout Boxes
   ============================================================ */

.callout-tip,
.callout-warning,
.callout-note,
.callout-important {
  margin: 1.25rem 0;
  padding: 0.85rem 1rem 0.85rem 1.2rem;
  border-radius: 0 var(--radius) var(--radius) 0;
  border-left: 4px solid;
  position: relative;
}

.callout-tip {
  background: var(--color-tip-bg);
  border-left-color: var(--color-tip-border);
  color: var(--color-tip-text);
}

.callout-warning {
  background: var(--color-warning-bg);
  border-left-color: var(--color-warning-border);
  color: var(--color-warning-text);
}

.callout-note {
  background: var(--color-note-bg);
  border-left-color: var(--color-note-border);
  color: var(--color-note-text);
}

.callout-important {
  background: var(--color-important-bg);
  border-left-color: var(--color-important-border);
  color: var(--color-important-text);
}

.callout-tip .callout-label,
.callout-warning .callout-label,
.callout-note .callout-label,
.callout-important .callout-label {
  font-size: 0.7rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  display: block;
  margin-bottom: 0.3rem;
  opacity: 0.75;
}

.callout-tip p, .callout-warning p, .callout-note p, .callout-important p {
  margin: 0;
  font-size: 0.9rem;
}

.callout-tip ul, .callout-warning ul, .callout-note ul, .callout-important ul {
  margin: 0.35rem 0 0 1.25rem;
  font-size: 0.9rem;
}

/* ============================================================
   Screenshot Placeholders
   ============================================================ */

.screenshot-placeholder {
  min-height: 200px;
  border: 2px dashed var(--color-border);
  background: #f8fafc;
  border-radius: var(--radius);
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  margin: 1.25rem 0;
  padding: 2rem;
  text-align: center;
  color: var(--color-text-muted);
}

.screenshot-placeholder .ss-icon {
  font-size: 2rem;
  margin-bottom: 0.5rem;
  opacity: 0.4;
}

.screenshot-placeholder .ss-label {
  font-style: italic;
  font-size: 0.875rem;
  font-weight: 500;
}

.screenshot-placeholder .ss-desc {
  font-size: 0.78rem;
  margin-top: 0.25rem;
  opacity: 0.7;
}

/* ============================================================
   Tables
   ============================================================ */

.table-wrap {
  overflow-x: auto;
  margin: 1.25rem 0;
  border-radius: var(--radius);
  box-shadow: var(--shadow);
}

table {
  width: 100%;
  border-collapse: collapse;
  background: var(--color-white);
  font-size: 0.875rem;
}

thead {
  background: var(--color-primary);
  color: #fff;
}

thead th {
  padding: 0.65rem 1rem;
  text-align: left;
  font-weight: 600;
  font-size: 0.8rem;
  text-transform: uppercase;
  letter-spacing: 0.05em;
}

tbody tr:nth-child(even) {
  background: #f8fafc;
}

tbody tr:hover {
  background: var(--color-primary-light);
}

tbody td {
  padding: 0.6rem 1rem;
  border-bottom: 1px solid var(--color-border);
  vertical-align: top;
  line-height: 1.5;
}

tbody tr:last-child td {
  border-bottom: none;
}

/* ============================================================
   Code
   ============================================================ */

code {
  font-family: var(--font-mono);
  font-size: 0.85em;
  background: #f1f5f9;
  color: #c7254e;
  padding: 0.15em 0.4em;
  border-radius: 3px;
  border: 1px solid #e2e8f0;
}

pre {
  font-family: var(--font-mono);
  font-size: 0.85rem;
  background: #1e293b;
  color: #e2e8f0;
  padding: 1.25rem 1.5rem;
  border-radius: var(--radius);
  overflow-x: auto;
  margin: 1rem 0;
  line-height: 1.6;
  box-shadow: var(--shadow);
}

pre code {
  background: none;
  color: inherit;
  padding: 0;
  border: none;
  font-size: inherit;
}

/* ============================================================
   SPM Pillar Cards
   ============================================================ */

.pillar-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
  gap: 1rem;
  margin: 1.25rem 0;
}

.pillar-card {
  background: var(--color-white);
  border: 1px solid var(--color-border);
  border-radius: var(--radius);
  padding: 1.1rem 1.25rem;
  box-shadow: var(--shadow);
  transition: box-shadow 0.2s, transform 0.2s;
  position: relative;
}

.pillar-card:hover {
  box-shadow: var(--shadow-md);
  transform: translateY(-2px);
}

.pillar-card.featured {
  border-top: 3px solid var(--color-primary);
}

.pillar-number {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 1.6rem;
  height: 1.6rem;
  background: var(--color-primary);
  color: #fff;
  font-size: 0.75rem;
  font-weight: 700;
  border-radius: 50%;
  margin-bottom: 0.6rem;
}

.pillar-card h3 {
  margin: 0 0 0.35rem;
  font-size: 0.95rem;
  color: var(--color-text);
}

.pillar-card p {
  margin: 0;
  font-size: 0.83rem;
  color: var(--color-text-muted);
  line-height: 1.5;
}

.pillar-card .pillar-tag {
  display: inline-block;
  font-size: 0.65rem;
  font-weight: 700;
  padding: 0.15rem 0.5rem;
  border-radius: 999px;
  background: var(--color-primary-light);
  color: var(--color-primary-dark);
  margin-top: 0.5rem;
  text-transform: uppercase;
  letter-spacing: 0.05em;
}

/* ============================================================
   Configurator Page Sections
   ============================================================ */

.config-section {
  background: var(--color-white);
  border: 1px solid var(--color-border);
  border-radius: var(--radius);
  padding: 1.5rem;
  margin: 1.25rem 0;
  box-shadow: var(--shadow);
}

.config-section-header {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  margin-bottom: 1rem;
  padding-bottom: 0.75rem;
  border-bottom: 1px solid var(--color-border);
}

.config-section-num {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 2.2rem;
  height: 2.2rem;
  min-width: 2.2rem;
  background: var(--color-primary);
  color: #fff;
  font-size: 0.9rem;
  font-weight: 700;
  border-radius: var(--radius);
  box-shadow: var(--shadow);
}

.config-section-title {
  font-size: 1.05rem;
  font-weight: 700;
  color: var(--color-text);
}

.config-section-star {
  color: #f59e0b;
  font-size: 1.1rem;
}

/* ============================================================
   Agenda / Schedule
   ============================================================ */

.agenda-table td:first-child {
  font-weight: 600;
  white-space: nowrap;
  color: var(--color-primary-dark);
}

.agenda-table td:nth-child(2) {
  color: var(--color-text-muted);
  font-size: 0.82rem;
  white-space: nowrap;
}

/* ============================================================
   Checklist
   ============================================================ */

.checklist {
  list-style: none;
  margin: 0 0 1rem;
  padding: 0;
}

.checklist li {
  display: flex;
  align-items: flex-start;
  gap: 0.6rem;
  padding: 0.45rem 0;
  border-bottom: 1px solid var(--color-border);
  font-size: 0.875rem;
}

.checklist li:last-child {
  border-bottom: none;
}

.checklist li::before {
  content: '☐';
  font-size: 1rem;
  color: var(--color-primary);
  flex-shrink: 0;
  margin-top: 0.05rem;
}

/* ============================================================
   Utility
   ============================================================ */

.star {
  color: #f59e0b;
}

.text-muted {
  color: var(--color-text-muted);
  font-size: 0.875rem;
}

.divider {
  border: none;
  border-top: 1px solid var(--color-border);
  margin: 2rem 0;
}

.two-col {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 1.25rem;
  margin: 1rem 0;
}

.card {
  background: var(--color-white);
  border: 1px solid var(--color-border);
  border-radius: var(--radius);
  padding: 1.25rem;
  box-shadow: var(--shadow);
}

.card h3 {
  margin-top: 0;
  font-size: 0.95rem;
  color: var(--color-primary-dark);
  border-bottom: 1px solid var(--color-border);
  padding-bottom: 0.5rem;
  margin-bottom: 0.75rem;
}

/* ============================================================
   Index / Landing page
   ============================================================ */

.index-hero {
  background: linear-gradient(135deg, #0052a3 0%, #0066CC 60%, #1a90e0 100%);
  color: #fff;
  padding: 3rem 2.5rem;
  border-bottom: 4px solid var(--color-primary-dark);
}

.index-hero h1 {
  font-size: 2rem;
  font-weight: 800;
  line-height: 1.2;
  margin-bottom: 0.5rem;
}

.index-hero p {
  font-size: 1.05rem;
  opacity: 0.9;
  margin: 0;
}

.index-nav-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
  gap: 1rem;
  margin: 1.5rem 0;
}

.index-nav-card {
  background: var(--color-white);
  border: 1px solid var(--color-border);
  border-radius: var(--radius);
  padding: 1.1rem;
  text-decoration: none;
  color: var(--color-text);
  box-shadow: var(--shadow);
  transition: box-shadow 0.2s, transform 0.2s, border-color 0.2s;
  display: block;
}

.index-nav-card:hover {
  box-shadow: var(--shadow-md);
  transform: translateY(-2px);
  border-color: var(--color-primary);
  color: var(--color-text);
  text-decoration: none;
}

.index-nav-card .inc-num {
  font-size: 0.68rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: var(--color-primary);
  margin-bottom: 0.3rem;
}

.index-nav-card .inc-title {
  font-size: 0.92rem;
  font-weight: 600;
  line-height: 1.35;
}

.index-nav-card .inc-desc {
  font-size: 0.78rem;
  color: var(--color-text-muted);
  margin-top: 0.3rem;
  line-height: 1.4;
}

/* ============================================================
   Mobile / Responsive
   ============================================================ */

@media (max-width: 768px) {
  .mobile-header {
    display: flex;
  }

  .sidebar {
    transform: translateX(-100%);
    transition: transform 0.25s ease;
    top: var(--header-height);
    z-index: 150;
  }

  .sidebar.open {
    transform: translateX(0);
    box-shadow: 4px 0 20px rgba(0,0,0,0.3);
  }

  .main-content {
    margin-left: 0;
    padding-top: var(--header-height);
  }

  .content-header {
    padding: 1.25rem 1rem 1rem;
  }

  .content-header h1 {
    font-size: 1.35rem;
  }

  .content-body {
    padding: 1.25rem 1rem 3rem;
  }

  .two-col {
    grid-template-columns: 1fr;
  }

  .pillar-grid {
    grid-template-columns: 1fr;
  }

  .index-hero {
    padding: 2rem 1rem;
  }

  .index-hero h1 {
    font-size: 1.5rem;
  }

  .index-nav-grid {
    grid-template-columns: 1fr 1fr;
  }
}

@media (max-width: 480px) {
  .index-nav-grid {
    grid-template-columns: 1fr;
  }
}

/* ============================================================
   Language Switcher
   ============================================================ */

.lang-switcher {
  padding: 0.75rem 1rem;
  border-top: 1px solid rgba(255,255,255,0.08);
  margin-top: auto;
}

.lang-switcher-label {
  font-size: 0.65rem;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: var(--color-sidebar-heading);
  margin-bottom: 0.4rem;
  display: block;
}

.lang-select {
  width: 100%;
  background: rgba(255,255,255,0.07);
  border: 1px solid rgba(255,255,255,0.12);
  color: var(--color-sidebar-text);
  border-radius: var(--radius);
  padding: 0.4rem 0.6rem;
  font-size: 0.82rem;
  cursor: pointer;
  appearance: none;
  -webkit-appearance: none;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='12' viewBox='0 0 24 24' fill='none' stroke='%237a8fa6' stroke-width='2'%3E%3Cpolyline points='6 9 12 15 18 9'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: right 0.6rem center;
  padding-right: 2rem;
  transition: border-color 0.15s, background-color 0.15s;
}

.lang-select:hover,
.lang-select:focus {
  border-color: var(--color-primary);
  background-color: rgba(255,255,255,0.1);
  outline: none;
}

.lang-select option {
  background: #1a2332;
  color: #c8d3e0;
}

.lang-badge {
  display: inline-block;
  font-size: 0.7rem;
  padding: 1px 5px;
  border-radius: 3px;
  background: rgba(0,102,204,0.3);
  color: #7eb8f7;
  margin-left: 4px;
  vertical-align: middle;
}

/* ============================================================
   Tell-Show-Do Framework Styles
   ============================================================ */

.tsd-banner {
  display: flex;
  gap: 0;
  border: 1px solid var(--color-border);
  border-radius: var(--radius);
  overflow: hidden;
  margin: 1.5rem 0;
}

.tsd-step {
  flex: 1;
  padding: 1rem 1.25rem;
  display: flex;
  flex-direction: column;
  gap: 0.25rem;
}

.tsd-step-tell {
  background: #eff6ff;
  border-right: 1px solid var(--color-border);
}

.tsd-step-show {
  background: #fdf4ff;
  border-right: 1px solid var(--color-border);
}

.tsd-step-do {
  background: #f0fdf4;
}

.tsd-step-label {
  font-size: 0.7rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.1em;
}

.tsd-step-tell .tsd-step-label { color: #1e40af; }
.tsd-step-show .tsd-step-label { color: #7e22ce; }
.tsd-step-do .tsd-step-label { color: #166534; }

.tsd-step-heading {
  font-size: 0.95rem;
  font-weight: 600;
  color: var(--color-text);
}

.tsd-step-desc {
  font-size: 0.82rem;
  color: var(--color-text-muted);
  line-height: 1.4;
}

.callout-do {
  background: #f0fdf4;
  border-left: 4px solid #22c55e;
  border-radius: 0 var(--radius) var(--radius) 0;
  padding: 1rem 1.25rem;
  margin: 1.5rem 0;
}

.callout-do .callout-label {
  display: block;
  font-size: 0.72rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: #166534;
  margin-bottom: 0.4rem;
}

.callout-do p, .callout-do ul {
  font-size: 0.9rem;
  color: #14532d;
}

.callout-do ul {
  padding-left: 1.25rem;
  margin-top: 0.5rem;
}

.callout-do ul li {
  margin-bottom: 0.3rem;
}

.callout-show {
  background: #fdf4ff;
  border-left: 4px solid #a855f7;
  border-radius: 0 var(--radius) var(--radius) 0;
  padding: 1rem 1.25rem;
  margin: 1.5rem 0;
}

.callout-show .callout-label {
  display: block;
  font-size: 0.72rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: #7e22ce;
  margin-bottom: 0.4rem;
}

.callout-show p {
  font-size: 0.9rem;
  color: #581c87;
}

@media (max-width: 600px) {
  .tsd-banner {
    flex-direction: column;
  }
  .tsd-step-tell, .tsd-step-show {
    border-right: none;
    border-bottom: 1px solid var(--color-border);
  }
}

/* ============================================================
   Inter-App Data Flow Diagram
   ============================================================ */

.flow-diagram {
  display: flex;
  align-items: center;
  gap: 0;
  margin: 1.5rem 0;
  overflow-x: auto;
}

.flow-node {
  flex: 1;
  min-width: 160px;
  padding: 1.25rem 1rem;
  border-radius: var(--radius);
  text-align: center;
  border: 2px solid transparent;
}

.flow-node-seg {
  background: #fdf4ff;
  border-color: #a855f7;
}

.flow-node-tq {
  background: #eff6ff;
  border-color: #3b82f6;
}

.flow-node-cap {
  background: #f0fdf4;
  border-color: #22c55e;
}

.flow-node-icon {
  font-size: 1.8rem;
  margin-bottom: 0.4rem;
}

.flow-node-label {
  font-size: 0.85rem;
  font-weight: 700;
  color: var(--color-text);
  margin-bottom: 0.4rem;
}

.flow-node-desc {
  font-size: 0.75rem;
  color: var(--color-text-muted);
  line-height: 1.4;
}

.flow-arrow {
  display: flex;
  flex-direction: column;
  align-items: center;
  padding: 0 0.5rem;
  min-width: 80px;
}

.flow-arrow-line {
  width: 100%;
  height: 2px;
  background: var(--color-border);
  position: relative;
}

.flow-arrow-line::after {
  content: '▶';
  position: absolute;
  right: -6px;
  top: -9px;
  font-size: 0.8rem;
  color: var(--color-text-muted);
}

.flow-arrow-label {
  font-size: 0.68rem;
  color: var(--color-text-muted);
  text-align: center;
  margin-top: 0.4rem;
  line-height: 1.3;
}

@media (max-width: 700px) {
  .flow-diagram {
    flex-direction: column;
  }
  .flow-arrow {
    transform: rotate(90deg);
    min-width: 60px;
  }
}

/* ============================================================
   Configure vs. Extend Decision Tree
   ============================================================ */

.decision-tree {
  background: #f8fafc;
  border: 1px solid var(--color-border);
  border-radius: var(--radius);
  padding: 1.5rem;
  margin: 1.5rem 0;
}

.dt-question {
  background: #fff;
  border: 1px solid #94a3b8;
  border-radius: var(--radius);
  padding: 0.6rem 1rem;
  font-size: 0.88rem;
  font-weight: 600;
  color: var(--color-text);
  margin-bottom: 0.75rem;
  display: inline-block;
}

.dt-branches {
  padding-left: 1.5rem;
  border-left: 2px solid var(--color-border);
  margin-left: 0.5rem;
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
}

.dt-branch {
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
}

.dt-branch-label {
  font-size: 0.72rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  padding: 0.2rem 0.6rem;
  border-radius: 20px;
  display: inline-block;
  width: fit-content;
}

.dt-yes {
  background: #dcfce7;
  color: #166534;
}

.dt-no {
  background: #fee2e2;
  color: #991b1b;
}

.dt-answer {
  font-size: 0.85rem;
  padding: 0.5rem 0.75rem;
  border-radius: var(--radius);
  border-left: 3px solid transparent;
}

.dt-configure {
  background: #f0fdf4;
  border-color: #22c55e;
  color: #14532d;
}

.dt-extend {
  background: #fffbeb;
  border-color: #f59e0b;
  color: #78350f;
}

.dt-branch-content {
  padding-left: 0.75rem;
}

/* ============================================================
   Mini-Lab Styles
   ============================================================ */

.mini-lab {
  border: 2px solid #0066cc;
  border-radius: 8px;
  margin: 2rem 0;
  overflow: hidden;
}

.mini-lab-header {
  background: #0066cc;
  color: #fff;
  padding: 0.75rem 1.25rem;
  display: flex;
  align-items: center;
  gap: 0.75rem;
}

.mini-lab-number {
  background: rgba(255,255,255,0.2);
  border-radius: 50%;
  width: 28px;
  height: 28px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 0.8rem;
  font-weight: 700;
  flex-shrink: 0;
}

.mini-lab-title {
  font-size: 0.95rem;
  font-weight: 700;
  flex: 1;
}

.mini-lab-duration {
  font-size: 0.75rem;
  opacity: 0.85;
  white-space: nowrap;
}

.mini-lab-body {
  padding: 1.25rem;
  background: #fff;
}

.mini-lab-objective {
  background: #eff6ff;
  border-left: 3px solid #0066cc;
  padding: 0.6rem 1rem;
  font-size: 0.88rem;
  color: #1e40af;
  border-radius: 0 4px 4px 0;
  margin-bottom: 1rem;
}

.mini-lab-objective strong {
  display: block;
  font-size: 0.7rem;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  margin-bottom: 0.2rem;
  opacity: 0.75;
}

.mini-lab-steps {
  list-style: none;
  padding: 0;
  margin: 0.75rem 0;
}

.mini-lab-steps li {
  display: flex;
  gap: 0.75rem;
  padding: 0.5rem 0;
  border-bottom: 1px solid #f0f4f8;
  font-size: 0.9rem;
  align-items: flex-start;
}

.mini-lab-steps li:last-child {
  border-bottom: none;
}

.mini-lab-step-num {
  background: #e0e7ff;
  color: #3730a3;
  border-radius: 50%;
  width: 22px;
  height: 22px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 0.72rem;
  font-weight: 700;
  flex-shrink: 0;
  margin-top: 1px;
}

.mini-lab-completion {
  background: #f8fafc;
  border-top: 1px solid var(--color-border);
  padding: 1rem 1.25rem;
}

.mini-lab-completion-label {
  font-size: 0.72rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: #166534;
  margin-bottom: 0.6rem;
  display: flex;
  align-items: center;
  gap: 0.4rem;
}

.mini-lab-nav {
  display: flex;
  justify-content: flex-end;
  margin-top: 0.75rem;
}

.mini-lab-next {
  background: #0066cc;
  color: #fff;
  border: none;
  padding: 0.4rem 1rem;
  border-radius: 4px;
  font-size: 0.82rem;
  font-weight: 600;
  cursor: pointer;
  text-decoration: none;
  display: inline-block;
}

.mini-lab-next:hover {
  background: #0052a3;
  color: #fff;
}

/* ============================================================
   IFP Workshop — Additional Styles
   ============================================================ */

/* Module grid on overview pages */
.module-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(220px, 1fr));
  gap: 1rem;
  margin: 1rem 0;
}

.module-card {
  background: var(--color-white);
  border: 1px solid var(--color-border);
  border-radius: var(--radius);
  padding: 1rem;
  box-shadow: var(--shadow);
}

.module-card h3 {
  font-size: 0.95rem;
  margin-bottom: 0.4rem;
  color: var(--color-primary);
}

.module-card p {
  font-size: 0.85rem;
  color: var(--color-text-muted);
  margin: 0;
}

/* TSD Banner */
.tsd-banner {
  display: flex;
  gap: 1rem;
  margin: 0 0 1.5rem;
  padding: 0.75rem 1rem;
  background: var(--color-white);
  border: 1px solid var(--color-border);
  border-radius: var(--radius);
}

.tsd-item {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  flex: 1;
  padding: 0.5rem;
  border-radius: var(--radius);
  font-size: 0.85rem;
}

.tsd-tell { background: #eff6ff; border-left: 3px solid #3b82f6; }
.tsd-show { background: #faf5ff; border-left: 3px solid #7c3aed; }
.tsd-do   { background: #f0fdf4; border-left: 3px solid #16a34a; }

.tsd-icon { font-size: 1.2rem; }

/* Lab banner */
.lab-banner {
  display: flex;
  gap: 1rem;
  margin-bottom: 1.5rem;
  padding: 0.75rem 1rem;
  background: #fdf4ff;
  border: 1px solid #e9d5ff;
  border-radius: var(--radius);
  font-size: 0.9rem;
}

.lab-type { font-weight: 600; color: #7e22ce; }
.lab-duration { color: var(--color-text-muted); }

/* Screenshot placeholder */
.screenshot-placeholder {
  background: #f8fafc;
  border: 2px dashed #cbd5e1;
  border-radius: var(--radius);
  padding: 2rem;
  text-align: center;
  color: var(--color-text-muted);
  margin: 1rem 0;
  font-style: italic;
}

/* Prev/Next navigation */
.prevnext-nav {
  display: flex;
  justify-content: space-between;
  margin-top: 3rem;
  padding-top: 1rem;
  border-top: 1px solid var(--color-border);
}

.prevnext-btn {
  display: inline-flex;
  align-items: center;
  padding: 0.5rem 1rem;
  background: var(--color-primary);
  color: white;
  border-radius: var(--radius);
  text-decoration: none;
  font-size: 0.9rem;
  font-weight: 500;
  transition: background 0.15s;
}

.prevnext-btn:hover { background: var(--color-primary-dark); }

/* Screenshot figures */
.screenshot-figure {
  margin: 1rem 0;
  border: 1px solid var(--color-border);
  border-radius: var(--radius);
  overflow: hidden;
  box-shadow: var(--shadow-md);
}

.screenshot-img {
  width: 100%;
  display: block;
}

.screenshot-figure figcaption {
  padding: 0.4rem 0.75rem;
  font-size: 0.8rem;
  color: var(--color-text-muted);
  background: #f8fafc;
  border-top: 1px solid var(--color-border);
  font-style: italic;
}
