/* Forge-published course learner UI */

.course-screen {
  display: none;
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 2rem 3rem;
}

.course-screen.active {
  display: block;
}

.course-screen .screen-header {
  margin-bottom: 1.5rem;
}

.course-layout {
  display: grid;
  grid-template-columns: 280px 1fr;
  gap: 1.5rem;
  align-items: start;
}

.course-layout-with-tutor {
  grid-template-columns: 260px 1fr 300px;
}

@media (max-width: 1100px) {
  .course-layout-with-tutor {
    grid-template-columns: 1fr;
  }
  .ai-tutor-panel {
    margin-top: 1rem;
  }
}

.ai-tutor-panel {
  background: rgba(15, 17, 26, 0.65);
  backdrop-filter: blur(12px);
  border: 1px solid var(--glass-border, rgba(255, 255, 255, 0.08));
  border-radius: var(--border-radius-lg, 20px);
  padding: 1rem;
  display: flex;
  flex-direction: column;
  max-height: 520px;
}

.ai-tutor-messages {
  flex: 1;
  overflow-y: auto;
  margin: 0.75rem 0;
  font-size: 0.9rem;
}

.tutor-msg {
  padding: 0.5rem 0.75rem;
  margin-bottom: 0.5rem;
  border-radius: 8px;
}

.tutor-msg-user {
  background: rgba(139, 92, 246, 0.2);
  margin-left: 1rem;
}

.tutor-msg-assistant {
  background: var(--dark-bg);
}

.lantern-guide-panel {
  margin-top: 1rem;
  background: rgba(20, 16, 8, 0.55);
  border: 1px solid rgba(251, 191, 36, 0.25);
  border-radius: var(--border-radius-lg, 20px);
  padding: 1rem;
  max-height: 360px;
  display: flex;
  flex-direction: column;
}

.lantern-guide-panel-header h3 {
  margin: 0 0 0.35rem;
  color: #fbbf24;
}

.lantern-guide-messages {
  flex: 1;
  overflow-y: auto;
  font-size: 0.88rem;
  margin: 0.5rem 0;
}

.lantern-guide-msg-user {
  color: #38bdf8;
  margin-bottom: 0.5rem;
}

.lantern-guide-msg-assistant {
  color: #fde68a;
  margin-bottom: 0.75rem;
}

.lantern-guide-form {
  display: flex;
  gap: 0.5rem;
}

.lantern-guide-form input {
  flex: 1;
  padding: 0.5rem 0.75rem;
  border-radius: 8px;
  border: 1px solid rgba(251, 191, 36, 0.3);
  background: rgba(0, 0, 0, 0.35);
  color: inherit;
}

.ai-tutor-form {
  display: flex;
  gap: 0.5rem;
}

.ai-tutor-form input {
  flex: 1;
  padding: 0.5rem;
  border-radius: 8px;
  border: 1px solid var(--dark-border);
  background: var(--dark-bg);
  color: var(--text-primary);
}

.lesson-video {
  width: 100%;
  aspect-ratio: 16/9;
  border: none;
  border-radius: var(--border-radius);
  margin: 1rem 0;
}

.project-box,
.pretest-box {
  background: var(--dark-surface);
  border: 1px solid var(--dark-border);
  border-radius: var(--border-radius);
  padding: 1rem;
  margin: 1rem 0;
}

.skill-tree {
  margin-bottom: 1.5rem;
}

.skill-nodes {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
}

.skill-node {
  padding: 0.35rem 0.75rem;
  border-radius: 999px;
  border: 1px solid var(--dark-border);
  font-size: 0.85rem;
}

.skill-node.completed {
  border-color: var(--success-color);
  color: var(--success-color);
}

.certificate-card {
  text-align: center;
  padding: 2rem;
  border: 2px solid var(--primary-color);
  border-radius: var(--border-radius);
  margin-top: 1.5rem;
}

.lesson-link.locked {
  opacity: 0.5;
  cursor: not-allowed;
}

.cohort-badge,
.adaptive-badge {
  font-size: 0.8rem;
  color: var(--primary-color);
}

.course-search-bar {
  display: flex;
  gap: 0.75rem;
  margin-bottom: 1rem;
}

.course-search-bar input,
.course-search-bar select {
  padding: 0.5rem 0.75rem;
  border-radius: 8px;
  border: 1px solid var(--dark-border);
  background: var(--dark-surface);
  color: var(--text-primary);
}

.progress-analytics-live {
  margin-bottom: 1.5rem;
}

.analytics-course-row {
  display: block;
  padding: 0.75rem;
  border: 1px solid var(--dark-border);
  border-radius: 8px;
  margin-bottom: 0.5rem;
  text-decoration: none;
  color: inherit;
}

.auth-signin-btn {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  background: transparent;
  border: none;
  color: var(--text-primary);
  cursor: pointer;
}

@media (max-width: 900px) {
  .course-layout {
    grid-template-columns: 1fr;
  }
}

.course-sidebar {
  background: rgba(15, 17, 26, 0.65);
  backdrop-filter: blur(12px);
  border: 1px solid var(--glass-border, rgba(255, 255, 255, 0.08));
  border-radius: var(--border-radius-lg, 20px);
  padding: 1rem;
  position: sticky;
  top: calc(var(--nav-height, 72px) + 1rem);
  max-height: calc(100vh - 6rem);
  overflow-y: auto;
}

.course-sidebar h3 {
  font-size: 0.85rem;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  color: var(--text-muted);
  margin-bottom: 0.75rem;
}

.module-block {
  margin-bottom: 1rem;
}

.module-block h4 {
  font-size: 0.95rem;
  color: var(--primary-color);
  margin-bottom: 0.5rem;
}

.lesson-link {
  display: block;
  width: 100%;
  text-align: left;
  background: transparent;
  border: none;
  color: var(--text-secondary);
  padding: 0.4rem 0.5rem;
  border-radius: 8px;
  cursor: pointer;
  font-size: 0.875rem;
}

.lesson-link:hover {
  background: rgba(167, 139, 250, 0.15);
  color: var(--text-primary);
}

.lesson-link.active {
  background: rgba(167, 139, 250, 0.25);
  color: var(--text-primary);
}

.lesson-link.completed {
  color: var(--success-color);
}

.lesson-main {
  background: rgba(15, 17, 26, 0.65);
  backdrop-filter: blur(12px);
  border: 1px solid var(--glass-border, rgba(255, 255, 255, 0.08));
  border-radius: var(--border-radius-lg, 20px);
  padding: 1.5rem 2rem;
  min-height: 400px;
}

.lesson-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
  margin-bottom: 1rem;
}

.lesson-badge {
  font-size: 0.75rem;
  padding: 0.25rem 0.6rem;
  border-radius: 999px;
  background: rgba(139, 92, 246, 0.2);
  color: var(--primary-color);
  text-transform: capitalize;
}

.lesson-body {
  line-height: 1.7;
  color: var(--text-secondary);
  white-space: pre-wrap;
}

.presentation-guide {
  margin: 1.25rem 0;
}

.presentation-meta {
  font-size: 0.9rem;
  color: var(--text-secondary);
  margin-bottom: 0.75rem;
}

.presentation-meta .pdf-filename {
  opacity: 0.85;
}

.slide-outline-details {
  margin: 1rem 0;
  padding: 0.75rem 1rem;
  border: 1px solid var(--dark-border);
  border-radius: var(--border-radius);
  background: rgba(0, 0, 0, 0.15);
}

.slide-outline-details summary {
  cursor: pointer;
  font-weight: 600;
  color: var(--text-primary);
  margin-bottom: 0.5rem;
}

.slide-outline {
  margin: 0.5rem 0 0 1.25rem;
  padding: 0;
  line-height: 1.6;
  color: var(--text-secondary);
}

.slide-outline .slide-num {
  opacity: 0.65;
  margin-right: 0.25rem;
}

.key-points-box {
  margin: 1rem 0;
  padding: 1rem;
  border-left: 3px solid var(--primary-color);
  background: rgba(139, 92, 246, 0.06);
  border-radius: 0 var(--border-radius) var(--border-radius) 0;
}

.key-points-box strong {
  display: block;
  margin-bottom: 0.5rem;
  color: var(--text-primary);
}

.key-points-list {
  margin: 0;
  padding-left: 1.25rem;
  color: var(--text-secondary);
  line-height: 1.6;
}

.presentation-reflection {
  margin-top: 1rem;
}

.external-resources-box {
  margin-top: 1.5rem;
  padding: 1rem;
  border: 1px solid var(--dark-border);
  border-radius: var(--border-radius);
  background: rgba(59, 130, 246, 0.06);
}

.external-resources-list {
  list-style: none;
  margin: 0.75rem 0 0;
  padding: 0;
}

.external-resource-item {
  margin-bottom: 0.65rem;
}

.external-resource-item a {
  color: var(--primary-color);
  text-decoration: none;
}

.external-resource-item a:hover {
  text-decoration: underline;
}

.external-resource-notes {
  margin: 0.25rem 0 0;
  font-size: 0.875rem;
  color: var(--text-secondary);
}

.engagement-panel {
  margin-top: 1.5rem;
  padding: 1rem;
  border: 1px solid rgba(139, 92, 246, 0.35);
  border-radius: var(--border-radius);
  background: rgba(139, 92, 246, 0.06);
}

.engagement-panel textarea {
  width: 100%;
  margin-top: 0.5rem;
  padding: 0.75rem;
  border-radius: 8px;
  border: 1px solid var(--dark-border);
  background: var(--dark-bg);
  color: var(--text-primary);
  font-family: inherit;
}

.engagement-word-count {
  display: block;
  margin-top: 0.35rem;
  font-size: 0.8rem;
  color: var(--text-secondary);
}

.engagement-word-count.engagement-word-ok {
  color: #34d399;
}

.engagement-submitted {
  margin-top: 0.75rem;
  color: #34d399;
  font-size: 0.9rem;
}

.live-discussion-actions {
  margin: 1rem 0;
  padding: 0.85rem;
  border-radius: var(--border-radius);
  border: 1px solid rgba(59, 130, 246, 0.25);
  background: rgba(59, 130, 246, 0.06);
}

.live-discussion-heading {
  font-weight: 600;
  margin-bottom: 0.35rem;
}

.live-discussion-buttons {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
  margin: 0.75rem 0;
}

.live-discussion-buttons .btn-primary,
.live-discussion-buttons .btn-secondary {
  font-size: 0.875rem;
}

.live-discussion-card .card-header i {
  color: #60a5fa;
}

.live-room-discovery-list {
  list-style: none;
  margin: 0.5rem 0 0;
  padding: 0;
}

.live-room-discovery-item {
  margin-bottom: 0.5rem;
}

.live-room-discovery-item a {
  display: block;
  padding: 0.65rem 0.75rem;
  border-radius: 8px;
  border: 1px solid var(--dark-border);
  text-decoration: none;
  color: var(--text-primary);
}

.live-room-discovery-item a:hover {
  border-color: var(--primary-color);
  background: rgba(139, 92, 246, 0.08);
}

.live-room-discovery-item span {
  display: block;
  font-size: 0.8rem;
  color: var(--text-secondary);
  margin-top: 0.15rem;
}

.course-live-rooms-banner {
  margin: 1rem 0;
  padding: 0.85rem 1rem;
  border-radius: var(--border-radius);
  border: 1px solid rgba(34, 197, 94, 0.35);
  background: rgba(34, 197, 94, 0.08);
}

.course-live-rooms-mount:empty {
  display: none;
}

.engagement-live-code {
  width: 100%;
  margin-top: 0.5rem;
  padding: 0.5rem 0.75rem;
  border-radius: 8px;
  border: 1px solid var(--dark-border);
  background: var(--dark-bg);
  color: var(--text-primary);
  font-family: inherit;
  font-size: 0.875rem;
}

.interactive-box {
  margin-top: 1.5rem;
  padding: 1rem;
  border: 1px dashed var(--primary-color);
  border-radius: var(--border-radius);
  background: rgba(139, 92, 246, 0.08);
}

.interactive-box textarea {
  width: 100%;
  min-height: 100px;
  margin-top: 0.75rem;
  padding: 0.75rem;
  border-radius: 8px;
  border: 1px solid var(--dark-border);
  background: var(--dark-bg);
  color: var(--text-primary);
  font-family: inherit;
}

.quiz-block {
  margin-top: 1rem;
}

.quiz-question {
  margin-bottom: 1.25rem;
}

.quiz-choices {
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
}

.quiz-choice {
  text-align: left;
  padding: 0.75rem 1rem;
  border-radius: 8px;
  border: 1px solid var(--dark-border);
  background: var(--dark-bg);
  color: var(--text-primary);
  cursor: pointer;
}

.quiz-choice.selected {
  border-color: var(--primary-color);
}

.quiz-choice.correct {
  border-color: var(--success-color);
  background: rgba(16, 185, 129, 0.15);
}

.quiz-choice.incorrect {
  border-color: var(--danger-color);
  background: rgba(239, 68, 68, 0.1);
}

.course-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 0.75rem;
  margin-top: 1.5rem;
  padding-top: 1rem;
  border-top: 1px solid var(--dark-border);
}

.course-actions .btn-primary,
.course-actions .btn-secondary {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.65rem 1.25rem;
  border-radius: 8px;
  font-weight: 600;
  text-decoration: none;
  border: none;
  cursor: pointer;
  font-size: 0.9rem;
}

.course-actions .btn-primary {
  background: linear-gradient(135deg, var(--secondary-color), var(--secondary-deep, #0891B2));
  color: var(--dark-bg, #07080F);
}

.course-actions .btn-secondary {
  background: transparent;
  border: 1px solid var(--dark-border);
  color: var(--text-primary);
}

.course-progress-bar {
  height: 6px;
  background: var(--dark-border);
  border-radius: 3px;
  margin: 1rem 0;
  overflow: hidden;
}

.course-progress-fill {
  height: 100%;
  background: linear-gradient(90deg, var(--secondary-color), var(--primary-color));
  transition: width 0.3s ease;
  box-shadow: 0 0 12px rgba(167, 139, 250, 0.4);
}

.course-error {
  text-align: center;
  padding: 3rem;
  color: var(--text-muted);
}

.course-error a {
  color: var(--primary-color);
}

.mentorship-cta {
  margin-top: 1.5rem;
  padding: 1rem 1.25rem;
  border-radius: var(--border-radius-lg, 20px);
  background: linear-gradient(135deg, rgba(34, 211, 238, 0.1), rgba(167, 139, 250, 0.15));
  border: 1px solid rgba(167, 139, 250, 0.2);
}

.mentorship-cta h4 {
  margin-bottom: 0.35rem;
}

.mentorship-cta p {
  font-size: 0.9rem;
  color: var(--text-secondary);
  margin-bottom: 0.75rem;
}

/* Threshold Psychedelic Training — journey map */
.threshold-journey-map {
  margin: 1.25rem 0 1.5rem;
  padding: 1.25rem 1.5rem;
  border-radius: var(--border-radius-lg, 20px);
  background: linear-gradient(145deg, rgba(27, 42, 74, 0.35), rgba(15, 17, 26, 0.6));
  border: 1px solid rgba(201, 162, 39, 0.25);
}

.threshold-journey-map__header h3 {
  margin: 0 0 0.35rem;
  font-size: 1.1rem;
  color: #e8e4dc;
}

.threshold-journey-map__summary {
  margin: 0;
  font-size: 0.88rem;
  color: var(--text-secondary);
}

.threshold-journey-map__track {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.5rem 0.25rem;
  margin: 1rem 0 0.75rem;
}

.threshold-journey-node {
  display: flex;
  align-items: center;
  gap: 0.65rem;
  padding: 0.5rem 0.75rem;
  border-radius: 12px;
  text-decoration: none;
  color: inherit;
  background: rgba(255, 255, 255, 0.04);
  border: 1px solid rgba(255, 255, 255, 0.08);
  transition: border-color 0.2s, transform 0.2s;
  max-width: 220px;
}

.threshold-journey-node:hover {
  border-color: rgba(201, 162, 39, 0.45);
  transform: translateY(-1px);
}

.threshold-journey-node--crossed {
  border-color: rgba(201, 162, 39, 0.55);
  background: rgba(201, 162, 39, 0.08);
}

.threshold-journey-node__marker {
  font-size: 1.1rem;
  color: var(--node-color, #c9a227);
  flex-shrink: 0;
}

.threshold-journey-node__body {
  display: flex;
  flex-direction: column;
  gap: 0.15rem;
  min-width: 0;
}

.threshold-journey-node__title {
  font-size: 0.82rem;
  font-weight: 600;
  line-height: 1.3;
}

.threshold-journey-node__frame {
  font-size: 0.72rem;
  color: var(--text-muted);
}

.threshold-journey-node__meta {
  font-size: 0.72rem;
  color: #c9a227;
}

.threshold-journey-path {
  width: 24px;
  height: 2px;
  background: linear-gradient(90deg, rgba(201, 162, 39, 0.5), rgba(27, 42, 74, 0.5));
  flex-shrink: 0;
}

.threshold-journey-map__note {
  font-size: 0.78rem;
  color: var(--text-muted);
  margin: 0;
}

.threshold-journey-loading,
.threshold-journey-empty {
  font-size: 0.9rem;
  color: var(--text-muted);
  margin: 1rem 0;
}

.threshold-alive-picker {
  margin: 1rem 0 0.5rem;
  padding-top: 0.75rem;
  border-top: 1px solid rgba(255, 255, 255, 0.06);
}

.threshold-alive-picker__prompt {
  margin: 0 0 0.65rem;
  font-size: 0.9rem;
  color: #e8e4dc;
}

.threshold-alive-picker__grid {
  display: flex;
  flex-wrap: wrap;
  gap: 0.4rem;
}

.threshold-alive-btn {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 0.1rem;
  padding: 0.4rem 0.55rem;
  border-radius: 8px;
  border: 1px solid rgba(255, 255, 255, 0.1);
  background: rgba(255, 255, 255, 0.03);
  color: inherit;
  cursor: pointer;
  font: inherit;
  transition: border-color 0.2s, background 0.2s;
}

.threshold-alive-btn:hover {
  border-color: rgba(201, 162, 39, 0.4);
}

.threshold-alive-btn--active {
  border-color: rgba(201, 162, 39, 0.65);
  background: rgba(201, 162, 39, 0.12);
}

.threshold-alive-btn__roman {
  font-size: 0.65rem;
  color: #c9a227;
  letter-spacing: 0.04em;
}

.threshold-alive-btn__title {
  font-size: 0.75rem;
  font-weight: 600;
}

.threshold-alive-picker__hint {
  margin: 0.5rem 0 0;
  font-size: 0.72rem;
  color: var(--text-muted);
}

.threshold-journey-node--alive {
  border-color: rgba(201, 162, 39, 0.75);
  box-shadow: 0 0 0 1px rgba(201, 162, 39, 0.2);
}

.threshold-journey-node__initiation {
  font-size: 0.68rem;
  color: #c9a227;
  letter-spacing: 0.03em;
  text-transform: uppercase;
}

.threshold-journey-map__ops {
  margin-top: 1rem;
  padding-top: 0.75rem;
  border-top: 1px solid rgba(255, 255, 255, 0.06);
}

.threshold-journey-map__ops-title {
  margin: 0 0 0.25rem;
  font-size: 0.72rem;
  letter-spacing: 0.05em;
  text-transform: uppercase;
  color: var(--text-muted);
}

.threshold-journey-map__ops-meta {
  margin: 0;
  font-size: 0.78rem;
  color: var(--text-secondary);
}

.threshold-journey-map__asked {
  display: block;
  margin-top: 0.35rem;
  font-size: 0.85rem;
  color: #e8e4dc;
  font-style: italic;
}

.threshold-asked-field {
  display: block;
  margin: 0.75rem 0 0.25rem;
}

.threshold-asked-field__prompt {
  display: block;
  margin: 0 0 0.35rem;
  font-size: 0.88rem;
  color: #e8e4dc;
}

.threshold-asked-field__input {
  width: 100%;
  box-sizing: border-box;
  padding: 0.5rem 0.65rem;
  border-radius: 8px;
  border: 1px solid rgba(255, 255, 255, 0.12);
  background: rgba(0, 0, 0, 0.2);
  color: inherit;
  font: inherit;
  font-size: 0.85rem;
  resize: vertical;
  min-height: 2.5rem;
}

.threshold-asked-field__input:focus {
  outline: none;
  border-color: rgba(201, 162, 39, 0.5);
}
