/* ==========================================================
   EBB Documentation Center — Reader Layout
========================================================== */

.doc-center {
  width: 100%;
}

/* ── Page header (compact, not marketing hero) ───────── */

.doc-page-header {
  padding: 5.5rem 0 2.5rem;
  border-bottom: 1px solid rgba(255, 255, 255, 0.06);
}

.doc-page-header .container {
  max-width: 1200px;
}

.doc-page-header h1 {
  margin-bottom: 0.75rem;
  font-size: 2rem;
  font-weight: 700;
  line-height: 1.25;
  letter-spacing: -0.02em;
}

.doc-lead {
  max-width: 42rem;
  color: #94a3b8;
  font-size: 1.0625rem;
  line-height: 1.7;
}

/* ── Two-column documentation layout ─────────────────── */

.doc-layout {
  padding: 0 0 5rem;
}

.doc-layout-inner {
  display: grid;
  grid-template-columns: 250px minmax(0, 800px);
  gap: 4rem;
  align-items: start;
  max-width: 1200px;
  padding-top: 3rem;
}

/* ── Left sidebar ─────────────────────────────────────── */

.doc-sidebar {
  position: sticky;
  top: 5.5rem;
  width: 250px;
  max-height: calc(100vh - 6.5rem);
  overflow-y: auto;
  padding-right: 0.5rem;
}

.doc-sidebar-group {
  margin-bottom: 2rem;
}

.doc-sidebar-group:last-child {
  margin-bottom: 0;
}

.doc-sidebar-label {
  margin-bottom: 0.65rem;
  color: #64748b;
  font-size: 0.6875rem;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.doc-sidebar-nav {
  display: flex;
  flex-direction: column;
  gap: 0.15rem;
  list-style: none;
  margin: 0;
  padding: 0;
}

.doc-sidebar-nav a {
  display: block;
  padding: 0.4rem 0;
  color: #94a3b8;
  font-size: 0.9375rem;
  line-height: 1.45;
  transition: color 0.15s ease;
}

.doc-sidebar-nav a:hover,
.doc-sidebar-nav a[aria-current="page"] {
  color: #fff;
}

.doc-sidebar-nav a[aria-current="page"] {
  font-weight: 600;
}

.doc-sidebar-muted {
  display: block;
  padding: 0.4rem 0;
  color: #475569;
  font-size: 0.9375rem;
  line-height: 1.45;
}

.doc-sidebar-nav-nested {
  margin: 0.25rem 0 0.75rem 0.75rem;
  padding-left: 0.65rem;
  border-left: 1px solid rgba(255, 255, 255, 0.06);
}

.doc-sidebar-nav-nested a {
  font-size: 0.8125rem;
  line-height: 1.4;
  padding: 0.3rem 0;
}

.doc-sidebar-divider {
  height: 1px;
  margin: 1.5rem 0;
  background: rgba(255, 255, 255, 0.06);
  border: none;
}

/* ── Right content column ─────────────────────────────── */

.doc-content {
  max-width: 800px;
  width: 100%;
}

.doc-content-section {
  padding-bottom: 4.5rem;
  margin-bottom: 4.5rem;
  border-bottom: 1px solid rgba(255, 255, 255, 0.06);
}

.doc-content-section:last-child {
  padding-bottom: 0;
  margin-bottom: 0;
  border-bottom: none;
}

.doc-content-section h2 {
  margin-bottom: 1rem;
  font-size: 1.5rem;
  font-weight: 700;
  line-height: 1.3;
  letter-spacing: -0.01em;
}

.doc-content-section h3 {
  margin: 1.75rem 0 0.5rem;
  font-size: 1.0625rem;
  font-weight: 600;
  line-height: 1.4;
  color: #e2e8f0;
}

.doc-prose {
  color: #cbd5e1;
  font-size: 1.0625rem;
  line-height: 1.75;
}

.doc-prose p {
  margin-bottom: 1.25rem;
}

.doc-prose p:last-child {
  margin-bottom: 0;
}

.doc-meta-inline {
  margin-top: 0.5rem;
  color: #64748b;
  font-size: 0.875rem;
}

.doc-meta-inline strong {
  color: #94a3b8;
  font-weight: 600;
}

/* ── Reading lists (no cards) ─────────────────────────── */

.doc-link-list {
  margin: 1.5rem 0 0;
  padding: 0;
  list-style: none;
}

.doc-link-list li {
  margin-bottom: 0.65rem;
  padding-left: 1.35rem;
  position: relative;
}

.doc-link-list li::before {
  content: "";
  position: absolute;
  left: 0;
  top: 0.55em;
  width: 0.45rem;
  height: 0.45rem;
  border: 1px solid rgba(148, 163, 184, 0.6);
  border-radius: 2px;
}

.doc-link-list a {
  color: #e2e8f0;
  font-size: 1rem;
  line-height: 1.55;
  text-decoration: underline;
  text-decoration-color: rgba(148, 163, 184, 0.35);
  text-underline-offset: 0.15em;
  transition: color 0.15s ease, text-decoration-color 0.15s ease;
}

.doc-link-list a:hover {
  color: #fff;
  text-decoration-color: rgba(196, 181, 253, 0.65);
}

.doc-link-list span {
  display: block;
  margin-top: 0.2rem;
  color: #64748b;
  font-size: 0.875rem;
  line-height: 1.5;
}

/* Numbered quick-start list */

.doc-step-list {
  margin: 1.25rem 0 0;
  padding: 0;
  list-style: none;
  counter-reset: doc-step;
}

.doc-step-list li {
  counter-increment: doc-step;
  margin-bottom: 0.85rem;
  padding-left: 2rem;
  position: relative;
}

.doc-step-list li::before {
  content: counter(doc-step) ".";
  position: absolute;
  left: 0;
  color: #64748b;
  font-size: 0.9375rem;
  font-weight: 600;
  font-variant-numeric: tabular-nums;
}

.doc-step-list a {
  color: #e2e8f0;
  font-size: 1rem;
  font-weight: 500;
  line-height: 1.5;
  text-decoration: underline;
  text-decoration-color: rgba(148, 163, 184, 0.35);
  text-underline-offset: 0.15em;
}

.doc-step-list a:hover {
  color: #fff;
}

.doc-step-list span {
  display: block;
  margin-top: 0.15rem;
  color: #64748b;
  font-size: 0.875rem;
  font-weight: 400;
  line-height: 1.45;
}

/* Phase index (compact, scannable) */

.doc-phase-index {
  margin: 1.25rem 0 0;
  padding: 0;
  list-style: none;
}

.doc-phase-index li {
  padding: 0.85rem 0;
  border-bottom: 1px solid rgba(255, 255, 255, 0.05);
}

.doc-phase-index li:first-child {
  padding-top: 0;
}

.doc-phase-index li:last-child {
  border-bottom: none;
  padding-bottom: 0;
}

.doc-phase-index a {
  display: block;
  color: inherit;
}

.doc-phase-index a:hover .doc-phase-index-title {
  color: #fff;
}

.doc-phase-index-label {
  display: block;
  margin-bottom: 0.2rem;
  color: #64748b;
  font-size: 0.75rem;
  font-weight: 600;
  letter-spacing: 0.04em;
  text-transform: uppercase;
}

.doc-phase-index-title {
  display: block;
  margin-bottom: 0.2rem;
  color: #e2e8f0;
  font-size: 1rem;
  font-weight: 600;
  line-height: 1.4;
  transition: color 0.15s ease;
}

.doc-phase-index-desc {
  display: block;
  color: #64748b;
  font-size: 0.875rem;
  line-height: 1.55;
}

/* Guide action — understated */

.doc-guide-action {
  margin-top: 1.5rem;
}

.doc-guide-action .btn-primary {
  display: inline-block;
  padding: 0.75rem 1.35rem;
  font-size: 0.9375rem;
}

/* Contact — text-first */

.doc-contact-text {
  margin-top: 0.5rem;
}

.doc-contact-text a {
  color: #38bdf8;
  text-decoration: underline;
  text-underline-offset: 0.15em;
}

.doc-contact-text a:hover {
  color: #7dd3fc;
}

/* ── Documentation figure (screenshots) ───────────────── */

.doc-figure {
  display: block;
  width: 100%;
  max-width: 640px;
  margin: 2rem auto;
  clear: both;
}

.doc-figure img {
  display: block;
  width: 640px;
  max-width: 100%;
  height: auto;
  margin: 0 auto;
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: 8px;
}

.doc-figure figcaption {
  margin-top: 0.75rem;
  color: #64748b;
  font-size: 0.875rem;
  line-height: 1.5;
  text-align: center;
}

/* ── Shared patterns for future doc pages ─────────────── */

.doc-breadcrumb {
  display: flex;
  flex-wrap: wrap;
  gap: 0.35rem 0.5rem;
  margin-bottom: 1.5rem;
  color: #64748b;
  font-size: 0.875rem;
}

.doc-breadcrumb a {
  color: #94a3b8;
  transition: color 0.15s ease;
}

.doc-breadcrumb a:hover {
  color: #fff;
}

.doc-breadcrumb-sep {
  color: #475569;
}

.doc-callout {
  margin: 1.5rem 0;
  padding: 1rem 1.15rem;
  border-radius: 8px;
  font-size: 0.9375rem;
  line-height: 1.65;
}

.doc-callout--tip {
  background: rgba(56, 189, 248, 0.06);
  border-left: 3px solid rgba(56, 189, 248, 0.45);
  color: #cbd5e1;
}

.doc-callout--warning {
  background: rgba(251, 191, 36, 0.06);
  border-left: 3px solid rgba(251, 191, 36, 0.45);
  color: #cbd5e1;
}

.doc-callout strong {
  display: block;
  margin-bottom: 0.35rem;
  color: #fff;
  font-size: 0.875rem;
}

.doc-page-nav {
  display: flex;
  justify-content: space-between;
  gap: 1rem;
  margin-top: 3rem;
  padding-top: 2rem;
  border-top: 1px solid rgba(255, 255, 255, 0.06);
}

.doc-page-nav a {
  display: flex;
  flex-direction: column;
  gap: 0.25rem;
  max-width: 48%;
  color: #fff;
}

.doc-page-nav-label {
  color: #64748b;
  font-size: 0.75rem;
  font-weight: 600;
  letter-spacing: 0.04em;
  text-transform: uppercase;
}

.doc-page-nav-title {
  color: #c4b5fd;
  font-size: 0.9375rem;
  font-weight: 600;
  text-decoration: underline;
  text-underline-offset: 0.12em;
}

.doc-page-nav a.doc-page-nav-next {
  text-align: right;
  margin-left: auto;
}

/* ── Responsive ───────────────────────────────────────── */

@media (max-width: 1024px) {
  .doc-layout-inner {
    grid-template-columns: 1fr;
    gap: 2.5rem;
    padding-top: 2rem;
  }

  .doc-sidebar {
    position: static;
    width: 100%;
    max-height: none;
    padding-bottom: 1.5rem;
    border-bottom: 1px solid rgba(255, 255, 255, 0.06);
  }

  .doc-sidebar-group {
    margin-bottom: 1.25rem;
  }

  .doc-sidebar-nav {
    flex-direction: row;
    flex-wrap: wrap;
    gap: 0.35rem 1.25rem;
  }

  .doc-content {
    max-width: none;
  }
}

@media (max-width: 640px) {
  .doc-page-header {
    padding: 4.5rem 0 2rem;
  }

  .doc-page-header h1 {
    font-size: 1.65rem;
  }

  .doc-lead {
    font-size: 1rem;
  }

  .doc-content-section {
    padding-bottom: 3rem;
    margin-bottom: 3rem;
  }

  .doc-prose {
    font-size: 1rem;
  }
}

/* ── EBB University lesson pages ─────────────────────────── */

.doc-lesson-page {
  padding-bottom: 2rem;
}

.doc-lesson-header {
  margin-bottom: 2.5rem;
  padding-bottom: 2rem;
  border-bottom: 1px solid rgba(255, 255, 255, 0.06);
}

.doc-lesson-eyebrow {
  margin-bottom: 0.75rem;
  color: #64748b;
  font-size: 0.8125rem;
  font-weight: 600;
  letter-spacing: 0.04em;
  text-transform: uppercase;
}

.doc-lesson-header h1 {
  margin-bottom: 0.75rem;
  font-size: 2.25rem;
  font-weight: 700;
  line-height: 1.2;
  letter-spacing: -0.02em;
}

.doc-lesson-subtitle {
  max-width: 42rem;
  margin-bottom: 1rem;
  color: #cbd5e1;
  font-size: 1.125rem;
  line-height: 1.65;
}

.doc-sidebar-module-name {
  margin-bottom: 0.75rem;
  color: #e2e8f0;
  font-size: 0.9375rem;
  font-weight: 600;
  line-height: 1.45;
}

.doc-lesson-progress-text {
  margin-bottom: 0.65rem;
  color: #94a3b8;
  font-size: 0.8125rem;
  line-height: 1.5;
}

.doc-lesson-progress-bar {
  height: 0.35rem;
  background: rgba(255, 255, 255, 0.06);
  border-radius: 999px;
  overflow: hidden;
}

.doc-lesson-progress-bar span {
  display: block;
  height: 100%;
  background: linear-gradient(90deg, #7c3aed, #38bdf8);
  border-radius: 999px;
}

.doc-lesson-outcome,
.doc-lesson-checkpoint,
.doc-lesson-exercise,
.doc-lesson-takeaways,
.doc-lesson-next-preview {
  margin-bottom: 3rem;
  padding: 1.5rem 1.65rem;
  border: 1px solid rgba(255, 255, 255, 0.06);
  border-radius: 12px;
  background: rgba(255, 255, 255, 0.02);
}

.doc-lesson-outcome h2,
.doc-lesson-checkpoint h2,
.doc-lesson-exercise h2,
.doc-lesson-takeaways h2,
.doc-lesson-next-preview h2 {
  margin-bottom: 0.85rem;
  font-size: 1.125rem;
  font-weight: 700;
}

.doc-lesson-business-result {
  margin-bottom: 3rem;
  padding: 1.75rem 1.85rem;
  border-radius: 14px;
  border: 1px solid rgba(124, 58, 237, 0.28);
  background: linear-gradient(
    135deg,
    rgba(124, 58, 237, 0.12),
    rgba(56, 189, 248, 0.08)
  );
}

.doc-lesson-business-result h2 {
  margin-bottom: 0.65rem;
  font-size: 1.125rem;
  font-weight: 700;
  color: #f8fafc;
}

.doc-lesson-business-result-lead {
  margin-bottom: 0.5rem;
  color: #cbd5e1;
  font-size: 0.9375rem;
}

.doc-lesson-business-result-value {
  color: #fff;
  font-size: 1.35rem;
  font-weight: 700;
  line-height: 1.35;
}

.doc-callout--example {
  background: rgba(167, 139, 250, 0.06);
  border-left: 3px solid rgba(167, 139, 250, 0.45);
  color: #cbd5e1;
}

.doc-callout--checklist {
  background: rgba(74, 222, 128, 0.06);
  border-left: 3px solid rgba(74, 222, 128, 0.45);
  color: #cbd5e1;
}

.doc-callout--definition {
  background: rgba(148, 163, 184, 0.08);
  border-left: 3px solid rgba(148, 163, 184, 0.45);
  color: #cbd5e1;
}

.doc-callout--exercise {
  background: rgba(251, 146, 60, 0.06);
  border-left: 3px solid rgba(251, 146, 60, 0.45);
  color: #cbd5e1;
}

.doc-callout--insight {
  background: rgba(56, 189, 248, 0.08);
  border-left: 3px solid rgba(56, 189, 248, 0.55);
  color: #cbd5e1;
}

.doc-callout--key-takeaway {
  background: rgba(196, 181, 253, 0.08);
  border-left: 3px solid rgba(196, 181, 253, 0.55);
  color: #cbd5e1;
}

.doc-certificate-placeholder,
.doc-future-feature {
  padding: 1rem 1.15rem;
  border: 1px dashed rgba(255, 255, 255, 0.12);
  border-radius: 10px;
  color: #64748b;
  font-size: 0.875rem;
}

.doc-certificate-placeholder h3 {
  margin-bottom: 0.35rem;
  color: #94a3b8;
  font-size: 0.9375rem;
}

.doc-future-feature-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 0.75rem;
  margin-top: 0.75rem;
}

.doc-future-hooks {
  margin-top: 3rem;
  padding-top: 2rem;
  border-top: 1px solid rgba(255, 255, 255, 0.06);
}

@media (max-width: 640px) {
  .doc-lesson-header h1 {
    font-size: 1.75rem;
  }

  .doc-lesson-business-result-value {
    font-size: 1.15rem;
  }

  .doc-future-feature-grid {
    grid-template-columns: 1fr;
  }
}
