.learn-root {
  width: 100%;
  height: 100%;
}

.learn {
  position: relative; /* anchor for the floating helper pill */
  display: grid;
  grid-template-rows: auto auto 1fr;
  gap: var(--theme-space-5);
  width: 100%;
  height: 100%;
  color: var(--theme-text-primary);
}

/* Top row — a horizontal bar (like a header) that scrolls sideways when the
   sprints and their activities are wider than the available space. */
.learn-timeline {
  overflow-x: auto;
  overflow-y: hidden;
  padding: var(--theme-space-3) var(--theme-space-4);
  background: var(--theme-surface-raised);
  border: 1px solid var(--theme-border-subtle);
  border-radius: var(--theme-radius-md);
  scrollbar-width: thin;
}

.learn-track {
  display: flex;
  flex-direction: row;
  align-items: flex-start;
  gap: var(--theme-space-6);
  width: max-content;
  min-width: 100%;
}

.learn-sprint {
  display: flex;
  flex-direction: column;
  gap: var(--theme-space-2);
}

.learn-sprint-header {
  font-size: var(--theme-font-xs);
  font-weight: var(--theme-font-weight-semibold);
  color: var(--theme-text-secondary);
  text-transform: uppercase;
  letter-spacing: 0.08em;
  white-space: nowrap;
}

/* Horizontal line running through the activity dots */
.learn-sprint-activities {
  position: relative;
  display: flex;
  flex-direction: row;
  align-items: flex-start;
  gap: var(--theme-space-2);
}

.learn-sprint-activities::before {
  content: '';
  position: absolute;
  top: 18px;
  left: 18px;
  right: 18px;
  height: 2px;
  background: var(--theme-border-subtle);
}

.learn-activity {
  position: relative;
  z-index: 1;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: var(--theme-space-2);
  width: 84px;
  padding: var(--theme-space-1);
  border-radius: var(--theme-radius-md);
  color: var(--theme-text-secondary);
  text-align: center;
  transition: background 120ms ease, color 120ms ease;
}

.learn-activity:hover {
  background: var(--theme-bg-tertiary);
  color: var(--theme-text-primary);
}

.learn-activity.is-active {
  background: var(--theme-bg-tertiary);
  color: var(--theme-text-primary);
}

.learn-dot {
  position: relative;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  width: 36px;
  height: 36px;
  border-radius: 50%;
  background: var(--theme-surface-raised);
  border: 2px solid var(--theme-border-subtle);
  color: var(--theme-text-secondary);
}

.learn-activity.is-active .learn-dot {
  border-color: var(--theme-color-primary);
  color: var(--theme-color-primary);
}

.learn-activity-title {
  font-size: var(--theme-font-xs);
  font-weight: var(--theme-font-weight-medium);
  line-height: 1.2;
  overflow: hidden;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  line-clamp: 2;
  -webkit-box-orient: vertical;
}

/* Per-type accent colors */
.learn-dot--form     { color: #7c3aed; }
.learn-dot--bot      { color: #0891b2; }
.learn-dot--artifact { color: #d97706; }
.learn-dot--static   { color: #2563eb; }
.learn-dot--dynamic  { color: #db2777; }
.learn-dot--html     { color: #475569; }
.learn-dot--interview { color: #dc2626; }

/* Adaptive sprint placeholder: the track is still undecided, so the remaining
   steps show as dotted, dimmed and inert nodes. */
.learn-activity--spirit {
  cursor: default;
  opacity: 0.55;
}

.learn-activity--spirit:hover {
  background: none;
  color: var(--theme-text-secondary);
}

.learn-dot--spirit {
  background: none;
  border-style: dashed;
}

/* Bottom row — wide detail / placeholder */
.learn-detail {
  display: flex;
  align-items: center;
  justify-content: center;
  /* Keep the 1fr grid track from growing past its share: tall content (e.g. a
     long form) scrolls inside the detail instead of compressing the timeline. */
  min-height: 0;
  overflow-y: auto;
  padding: var(--theme-space-6);
  background: var(--theme-bg-secondary, var(--theme-surface-raised));
  border: 1px solid var(--theme-border-subtle);
  border-radius: var(--theme-radius-md);
}

.learn-placeholder {
  text-align: center;
}

/* When a row is selected, the detail view stretches and reads top-down. A flex
   scroll container drops its trailing padding once the content overflows (the
   detail then sits glued to the bottom border), so switch to a plain block
   scroll container, where the bottom padding is honored. */
.learn-detail:has(.learn-placeholder--detail) {
  display: block;
}

.learn-placeholder--detail {
  position: relative;
  width: 100%;
  text-align: left;
}

/* Completion checkbox pinned to the top-right corner of the activity. */
.learn-check {
  position: absolute;
  top: 0;
  right: 0;
  display: inline-flex;
  align-items: center;
  gap: var(--theme-space-2);
  padding: var(--theme-space-1) var(--theme-space-2);
  font-size: var(--theme-font-xs);
  font-weight: var(--theme-font-weight-medium);
  color: var(--theme-text-secondary);
  cursor: pointer;
  user-select: none;
}

.learn-check-input {
  width: 16px;
  height: 16px;
  cursor: pointer;
  accent-color: var(--theme-color-primary);
}

.learn-check.is-locked {
  cursor: not-allowed;
  opacity: 0.5;
}

.learn-check.is-locked .learn-check-input {
  cursor: not-allowed;
}

/* Completed activities keep their per-type color and get a checkmark badge
   pinned to the top-right corner of the dot. */
.learn-activity.is-complete .learn-dot::after {
  content: '✓';
  position: absolute;
  top: -3px;
  right: -3px;
  display: flex;
  align-items: center;
  justify-content: center;
  width: 16px;
  height: 16px;
  border-radius: 50%;
  background: var(--theme-color-success);
  border: 2px solid var(--theme-surface-raised);
  color: #fff;
  font-size: 9px;
  font-weight: var(--theme-font-weight-bold);
  line-height: 1;
}

.learn-detail-header {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  margin-bottom: var(--theme-space-5);
}

.learn-data {
  display: grid;
  gap: var(--theme-space-1);
  margin: 0;
}

.learn-data-row {
  display: grid;
  grid-template-columns: minmax(120px, 200px) 1fr;
  gap: var(--theme-space-3);
  padding: var(--theme-space-2) 0;
  border-bottom: 1px solid var(--theme-border-subtle);
}

.learn-data-key {
  margin: 0;
  font-size: var(--theme-font-xs);
  font-weight: var(--theme-font-weight-semibold);
  color: var(--theme-text-secondary);
  text-transform: uppercase;
  letter-spacing: 0.06em;
}

.learn-data-value {
  margin: 0;
  font-size: var(--theme-font-sm);
  color: var(--theme-text-primary);
  word-break: break-word;
}

.learn-placeholder-icon {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 64px;
  height: 64px;
  margin-bottom: var(--theme-space-3);
  border-radius: 50%;
  border: 2px solid var(--theme-border-subtle);
}

.learn-placeholder-eyebrow {
  margin-bottom: var(--theme-space-2);
  font-size: var(--theme-font-xs);
  font-weight: var(--theme-font-weight-semibold);
  color: var(--theme-text-secondary);
  text-transform: uppercase;
  letter-spacing: 0.08em;
}

.learn-placeholder-title {
  font-size: calc(var(--theme-font-xl) * 1.35);
  font-weight: var(--theme-font-weight-semibold);
}

.learn-placeholder-hint {
  font-size: var(--theme-font-sm);
  color: var(--theme-text-secondary);
}

.learn-empty {
  font-size: var(--theme-font-sm);
  color: var(--theme-text-secondary);
}

.learn-locked-notice {
  margin-top: var(--theme-space-lg);
  padding: var(--theme-space-lg);
  border: 1px dashed var(--theme-border);
  border-radius: var(--theme-radius-md);
  font-size: var(--theme-font-sm);
  color: var(--theme-text-secondary);
  text-align: center;
}

/* Refresh button + completion checkbox, pinned to the top-right corner. */
.learn-html-controls {
  position: absolute;
  top: 0;
  right: 0;
  display: inline-flex;
  align-items: center;
  gap: var(--theme-space-2);
}

.learn-html-controls .learn-check {
  position: static;
}

.learn-html-action {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: var(--theme-space-1);
  border: none;
  border-radius: var(--theme-radius-sm);
  background: transparent;
  color: var(--theme-text-secondary);
  cursor: pointer;
}

.learn-html-action:hover {
  color: var(--theme-color-primary);
  background: var(--theme-bg-secondary, var(--theme-surface-raised));
}

.learn-html-action--danger:hover {
  color: var(--theme-color-danger, #dc2626);
}

/* Rendered markdown returned by the inference endpoint for HTML activities. */
.learn-html-body {
  margin-top: var(--theme-space-4);
  font-size: var(--theme-font-lg);
  line-height: 1.7;
  color: var(--theme-text-primary);
}

.learn-html-body :first-child {
  margin-top: 0;
}

.learn-html-body :last-child {
  margin-bottom: 0;
}

.learn-html-status {
  font-size: var(--theme-font-sm);
  color: var(--theme-text-secondary);
}

/* Form activity: spacing for fields and the save button below the form. */
.learn-form-body input,
.learn-form-body select,
.learn-form-body textarea {
  font: inherit;
  color: var(--theme-text-primary);
}

/* Intro text shown above the form blocks. */
.learn-form-instructions {
  margin-bottom: 18px;
  font-size: var(--theme-font-md);
  line-height: 1.7;
  color: var(--theme-text-secondary);
}

/* Grouped block of fields with its own heading. */
.learn-form-blk {
  border: 1px solid var(--theme-border-subtle);
  border-radius: var(--theme-radius-md);
  padding: 18px 20px;
  margin-bottom: 18px;
  background: var(--theme-surface-raised);
}

.learn-form-blk > h3 {
  margin: 0 0 14px;
  font-size: 14px;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: var(--theme-text-secondary);
}

.learn-form-fld {
  margin-bottom: 12px;
}

.learn-form-fld label {
  display: block;
  font-size: 13px;
  font-weight: 600;
  margin-bottom: 4px;
  color: var(--theme-text-primary);
}

.learn-form-fld input,
.learn-form-fld select,
.learn-form-fld textarea {
  width: 100%;
  box-sizing: border-box;
  padding: 9px 11px;
  border: 1px solid var(--theme-border-default);
  border-radius: var(--theme-radius-sm);
  font: inherit;
  color: var(--theme-text-primary);
  background: var(--theme-bg-primary);
}

.learn-form-fld textarea {
  min-height: 64px;
  resize: vertical;
}

.learn-form-fld input:focus,
.learn-form-fld select:focus,
.learn-form-fld textarea:focus {
  outline: 2px solid var(--theme-color-primary);
  border-color: var(--theme-color-primary);
}

.learn-form-save {
  margin-top: var(--theme-space-4);
  padding: var(--theme-space-2) var(--theme-space-4);
  border: none;
  border-radius: var(--theme-radius-sm);
  background: var(--theme-color-primary);
  color: var(--theme-color-on-primary, #fff);
  font: inherit;
  cursor: pointer;
}

.learn-form-save:hover {
  filter: brightness(1.05);
}

/* Read-only state shown once the form is completed. */
.learn-form-fld input:disabled,
.learn-form-fld select:disabled,
.learn-form-fld textarea:disabled,
.learn-form-body input:disabled,
.learn-form-body select:disabled,
.learn-form-body textarea:disabled {
  background: var(--theme-surface-raised);
  color: var(--theme-text-secondary);
  cursor: not-allowed;
  opacity: 1;
}

.learn-form-completed {
  margin-top: var(--theme-space-4);
  padding: var(--theme-space-3) var(--theme-space-4);
  border: 1px solid var(--theme-border-subtle);
  border-radius: var(--theme-radius-sm);
  background: var(--theme-surface-raised);
  color: var(--theme-text-secondary);
  font-size: 13px;
}

/* Bot activity: an interactive multi-format tutor chat. Fill the detail height
   as a column so the composer stays docked at the bottom and only the message
   list scrolls — otherwise the list plus composer overflow the detail and the
   composer starts below the fold, surfacing only after the outer area scrolls. */
.learn-bot {
  display: flex;
  flex-direction: column;
  height: 100%;
}

.learn-bot-subtitle:empty {
  display: none;
}

.learn-bot-subtitle {
  margin-top: var(--theme-space-1);
  font-size: 150%;
  font-weight: var(--theme-font-weight-medium);
  color: var(--theme-text-secondary);
}

.learn-bot-chapter-link {
  display: inline-flex;
  align-items: center;
  gap: var(--theme-space-1);
  color: var(--theme-color-primary, #2d5cf6);
  text-decoration: none;
}

.learn-bot-chapter-link:hover {
  text-decoration: underline;
}

.learn-bot-chapter-link svg {
  flex-shrink: 0;
}

.learn-bot-messages {
  flex: 1 1 auto;
  min-height: 0;
  display: flex;
  flex-direction: column;
  gap: var(--theme-space-3);
  margin-top: var(--theme-space-4);
  overflow-y: auto;
  padding: var(--theme-space-2);
  scrollbar-width: thin;
}

.learn-bot-msg {
  display: flex;
}

.learn-bot-msg--bot {
  justify-content: flex-start;
}

.learn-bot-msg--user {
  justify-content: flex-end;
}

.learn-bot-msg > * {
  max-width: 85%;
}

.learn-bot-bubble {
  padding: var(--theme-space-3) var(--theme-space-4);
  border: 1px solid var(--theme-border-subtle);
  border-radius: var(--theme-radius-md);
  background: var(--theme-surface-raised);
  color: var(--theme-text-primary);
  font-size: var(--theme-font-md);
  line-height: 1.6;
  overflow-wrap: anywhere;
}

.learn-bot-msg--user .learn-bot-bubble {
  border-color: var(--theme-color-primary);
  background: var(--theme-color-primary);
  color: #fff;
}

.learn-bot-bubble--error {
  border-color: var(--theme-color-danger, #dc2626);
  color: var(--theme-color-danger, #dc2626);
}

.learn-bot-bubble :first-child {
  margin-top: 0;
}

.learn-bot-bubble :last-child {
  margin-bottom: 0;
}

/* A deletable bot reply stacks its content above a trash control footer. */
.learn-bot-msg--bot.learn-bot-turn {
  flex-direction: column;
  align-items: flex-start;
  gap: var(--theme-space-1);
}

.learn-bot-msg-actions {
  display: flex;
}

.learn-bot-msg-delete {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 4px;
  border: none;
  border-radius: var(--theme-radius-sm);
  background: transparent;
  color: var(--theme-text-secondary);
  cursor: pointer;
  opacity: 0;
  transition: opacity 0.15s ease, color 0.15s ease;
}

.learn-bot-msg--bot.learn-bot-turn:hover .learn-bot-msg-delete,
.learn-bot-msg-delete:focus-visible {
  opacity: 1;
}

.learn-bot-msg-delete:hover {
  color: var(--theme-color-danger, #dc2626);
}

/* Typing indicator shown while the tutor is composing a reply. */
.learn-bot-typing {
  display: inline-flex;
  gap: 4px;
  align-items: center;
  padding: var(--theme-space-3) var(--theme-space-4);
  border: 1px solid var(--theme-border-subtle);
  border-radius: var(--theme-radius-md);
  background: var(--theme-surface-raised);
}

.learn-bot-typing span {
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: var(--theme-text-secondary);
  animation: learn-bot-blink 1.4s infinite both;
}

.learn-bot-typing span:nth-child(2) {
  animation-delay: 0.2s;
}

.learn-bot-typing span:nth-child(3) {
  animation-delay: 0.4s;
}

@keyframes learn-bot-blink {
  0%, 80%, 100% { opacity: 0.2; }
  40% { opacity: 1; }
}

/* Socratic question: a reflective prompt set apart with a dashed accent. */
.learn-bot-socratic {
  display: flex;
  gap: var(--theme-space-3);
  padding: var(--theme-space-3) var(--theme-space-4);
  border: 1px dashed var(--theme-color-primary);
  border-radius: var(--theme-radius-md);
  background: var(--theme-surface-raised);
}

.learn-bot-socratic-icon {
  flex-shrink: 0;
  color: var(--theme-color-primary);
}

.learn-bot-socratic-text {
  margin: 0;
  font-style: italic;
  line-height: 1.6;
  color: var(--theme-text-primary);
}

/* Monospace blocks for the map and code formats. */
.learn-bot-pre {
  margin: 0;
  padding: var(--theme-space-3) var(--theme-space-4);
  border: 1px solid var(--theme-border-subtle);
  border-radius: var(--theme-radius-md);
  background: var(--theme-bg-secondary, var(--theme-surface-raised));
  color: var(--theme-text-primary);
  font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
  font-size: 13px;
  line-height: 1.5;
  white-space: pre;
  overflow-x: auto;
}

.learn-bot-code {
  position: relative;
}

/* Prompts are shown as code blocks: force long lines to wrap instead of
   scrolling horizontally, while still preserving the prompt's own line breaks. */
.learn-bot-code .learn-bot-pre {
  white-space: pre-wrap;
  overflow-wrap: anywhere;
  overflow-x: visible;
}

.learn-bot-copy {
  position: absolute;
  top: 8px;
  right: 8px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 4px;
  border: none;
  border-radius: var(--theme-radius-sm);
  background: var(--theme-surface-raised);
  color: var(--theme-text-secondary);
  cursor: pointer;
  opacity: 0.85;
}

.learn-bot-copy:hover {
  color: var(--theme-color-primary);
  opacity: 1;
}

/* Flashcard: a two-faced card that flips on click. */
.learn-bot-flashcard {
  width: 100%;
  max-width: 320px;
  height: 180px;
  perspective: 1000px;
  cursor: pointer;
}

.learn-bot-flashcard-inner {
  position: relative;
  width: 100%;
  height: 100%;
  transition: transform 0.5s;
  transform-style: preserve-3d;
}

.learn-bot-flashcard--flipped .learn-bot-flashcard-inner {
  transform: rotateY(180deg);
}

.learn-bot-flashcard-face {
  position: absolute;
  inset: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: var(--theme-space-4);
  border: 1px solid var(--theme-border-subtle);
  border-radius: var(--theme-radius-md);
  background: var(--theme-surface-raised);
  color: var(--theme-text-primary);
  font-size: var(--theme-font-md);
  line-height: 1.5;
  text-align: center;
  backface-visibility: hidden;
  -webkit-backface-visibility: hidden;
}

.learn-bot-flashcard-back {
  border-color: var(--theme-color-primary);
  background: var(--theme-color-primary);
  color: #fff;
  transform: rotateY(180deg);
}

/* Quiz and options: a question/intro followed by clickable buttons. */
.learn-bot-quiz {
  display: flex;
  flex-direction: column;
  gap: var(--theme-space-3);
  padding: var(--theme-space-3) var(--theme-space-4);
  border: 1px solid var(--theme-border-subtle);
  border-radius: var(--theme-radius-md);
  background: var(--theme-surface-raised);
}

.learn-bot-quiz-question {
  line-height: 1.6;
  color: var(--theme-text-primary);
}

.learn-bot-quiz-question :first-child {
  margin-top: 0;
}

.learn-bot-quiz-question :last-child {
  margin-bottom: 0;
}

.learn-bot-quiz-options {
  display: flex;
  flex-direction: column;
  gap: var(--theme-space-2);
}

.learn-bot-quiz-option {
  padding: var(--theme-space-2) var(--theme-space-3);
  border: 1px solid var(--theme-border-subtle);
  border-radius: var(--theme-radius-sm);
  background: var(--theme-bg-secondary, var(--theme-surface-raised));
  color: var(--theme-text-primary);
  font: inherit;
  text-align: left;
  cursor: pointer;
  transition: border-color 0.15s, color 0.15s;
}

.learn-bot-quiz-option:hover:not(:disabled) {
  border-color: var(--theme-color-primary);
  color: var(--theme-color-primary);
}

.learn-bot-quiz-option:disabled {
  opacity: 0.55;
  cursor: default;
}

/* Slides: a five-card carousel summarizing the topic, navigated with arrows.
   The carousel spans the full bubble width instead of the 85% message cap. */
.learn-bot-msg > .learn-bot-slides {
  width: 100%;
  max-width: 720px;
}

.learn-bot-slides {
  border: 1px solid var(--theme-border-subtle);
  border-radius: var(--theme-radius-lg);
  background: var(--theme-surface-raised);
  overflow: hidden;
}

/* The viewport keeps a fixed 16:9 frame at any width; the track and slides fill
   it, and a slide whose content is taller than the frame scrolls internally. */
.learn-bot-slides-viewport {
  overflow: hidden;
  aspect-ratio: 16 / 9;
}

.learn-bot-slides-track {
  display: flex;
  height: 100%;
  transition: transform 0.4s ease;
}

.learn-bot-slide {
  flex: 0 0 100%;
  min-width: 0;
  height: 100%;
  box-sizing: border-box;
  padding: var(--theme-space-5);
  overflow-y: auto;
  scrollbar-width: thin;
}

.learn-bot-slide-title {
  margin: 0 0 var(--theme-space-3);
  font-size: calc(var(--theme-font-xl) * 1.3);
  font-weight: 700;
  line-height: 1.2;
  color: var(--theme-text-primary);
}

.learn-bot-slide-summary,
.learn-bot-slide-item-summary,
.learn-bot-slide-point {
  font-size: var(--theme-font-lg);
  line-height: 1.6;
  color: var(--theme-text-secondary);
}

.learn-bot-slide-summary :first-child,
.learn-bot-slide-point :first-child { margin-top: 0; }
.learn-bot-slide-summary :last-child,
.learn-bot-slide-point :last-child { margin-bottom: 0; }

/* Detail slides (3-5): the five key points, each marked with an accent dot. */
.learn-bot-slide-points {
  list-style: none;
  margin: 0;
  padding: 0;
  display: flex;
  flex-direction: column;
  gap: var(--theme-space-3);
}

.learn-bot-slide-point {
  position: relative;
  padding-left: var(--theme-space-5);
}

.learn-bot-slide-point::before {
  content: '';
  position: absolute;
  left: 0;
  top: 0.6em;
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: var(--theme-color-primary);
}

/* Shared SVG bullet: a tinted rounded badge holding the concept's icon. */
.learn-bot-slide-bullet {
  flex-shrink: 0;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 44px;
  height: 44px;
  border-radius: var(--theme-radius-md);
  background: color-mix(in srgb, var(--theme-color-primary) 14%, transparent);
  color: var(--theme-color-primary);
}

.learn-bot-slide-bullet svg {
  width: 26px;
  height: 26px;
}

/* Cover slide (1): title and summary beside the central-idea illustration. */
.learn-bot-slide--cover {
  display: flex;
  gap: var(--theme-space-5);
  align-items: center;
  background: linear-gradient(135deg,
    color-mix(in srgb, var(--theme-color-primary) 12%, transparent), transparent 65%);
}

.learn-bot-slide-cover-body {
  flex: 1 1 55%;
}

.learn-bot-slide-art {
  flex: 0 0 38%;
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--theme-color-primary);
}

.learn-bot-slide-art svg {
  width: 100%;
  height: auto;
  max-height: 220px;
}

/* Agenda slide (2): the three key concepts, each with its SVG bullet. */
.learn-bot-slide-list {
  list-style: none;
  margin: 0;
  padding: 0;
  display: flex;
  flex-direction: column;
  gap: var(--theme-space-4);
}

.learn-bot-slide-item {
  display: flex;
  gap: var(--theme-space-3);
  align-items: center;
}

/* Detail slides (3-5): the concept's bullet and title above its full text. */
.learn-bot-slide-detail-header {
  display: flex;
  gap: var(--theme-space-3);
  align-items: center;
  margin-bottom: var(--theme-space-4);
  padding-bottom: var(--theme-space-3);
  border-bottom: 2px solid color-mix(in srgb, var(--theme-color-primary) 30%, transparent);
}

.learn-bot-slide-detail-header .learn-bot-slide-title {
  margin: 0;
}

/* Navigation: arrows flanking the position dots. */
.learn-bot-slides-nav {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: var(--theme-space-3);
  padding: var(--theme-space-3) var(--theme-space-4);
  border-top: 1px solid var(--theme-border-subtle);
}

.learn-bot-slides-arrow {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 40px;
  height: 40px;
  flex-shrink: 0;
  border: 1px solid var(--theme-border-subtle);
  border-radius: 50%;
  background: var(--theme-bg-secondary, var(--theme-surface-raised));
  color: var(--theme-text-primary);
  cursor: pointer;
  transition: border-color 0.15s, color 0.15s, opacity 0.15s;
}

.learn-bot-slides-arrow:hover:not(:disabled) {
  border-color: var(--theme-color-primary);
  color: var(--theme-color-primary);
}

.learn-bot-slides-arrow:disabled {
  opacity: 0.4;
  cursor: default;
}

.learn-bot-slides-dots {
  display: flex;
  gap: var(--theme-space-2);
}

.learn-bot-slides-dot {
  width: 8px;
  height: 8px;
  padding: 0;
  border: none;
  border-radius: 50%;
  background: var(--theme-border-subtle);
  cursor: pointer;
  transition: background 0.15s, transform 0.15s;
}

.learn-bot-slides-dot.is-active {
  background: var(--theme-color-primary);
  transform: scale(1.3);
}

@media (max-width: 640px) {
  .learn-bot-slide--cover {
    flex-direction: column;
    text-align: center;
  }

  .learn-bot-slide-art {
    flex-basis: auto;
  }
}

/* Composer: the message input and send button below the conversation. */
.learn-bot-composer {
  display: flex;
  flex-shrink: 0;
  gap: var(--theme-space-2);
  align-items: flex-end;
  margin-top: var(--theme-space-4);
}

.learn-bot-input {
  flex: 1;
  max-height: 140px;
  padding: var(--theme-space-3) var(--theme-space-4);
  border: 1px solid var(--theme-border-subtle);
  border-radius: var(--theme-radius-md);
  background: var(--theme-surface-raised);
  color: var(--theme-text-primary);
  font: inherit;
  line-height: 1.5;
  resize: none;
}

.learn-bot-input:focus {
  outline: none;
  border-color: var(--theme-color-primary);
}

.learn-bot-send {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 44px;
  height: 44px;
  flex-shrink: 0;
  border: none;
  border-radius: var(--theme-radius-md);
  background: var(--theme-color-primary);
  color: #fff;
  cursor: pointer;
}

.learn-bot-send:hover:not(:disabled) {
  opacity: 0.9;
}

.learn-bot-input:disabled,
.learn-bot-send:disabled {
  opacity: 0.6;
  cursor: default;
}

/* Artifact activity: a card holding the description, the input box, a send
   button below it, and the review result. */
.learn-practice-section {
  margin-top: var(--theme-space-6);
  padding: var(--theme-space-5);
  border: 1px solid var(--theme-border-subtle);
  border-radius: var(--theme-radius-lg);
  background: var(--theme-surface-raised);
}

.learn-practice-input {
  display: block;
  width: 100%;
  max-height: none;
  margin-top: var(--theme-space-4);
}

.learn-practice-actions {
  display: flex;
  justify-content: flex-start;
  margin-top: var(--theme-space-3);
}

.learn-practice-send {
  display: inline-flex;
  align-items: center;
  gap: var(--theme-space-2);
  padding: var(--theme-space-2) var(--theme-space-4);
  border: none;
  border-radius: var(--theme-radius-md);
  background: var(--theme-color-primary);
  color: #fff;
  font: inherit;
  cursor: pointer;
}

.learn-practice-send:hover:not(:disabled) {
  opacity: 0.9;
}

.learn-practice-send:disabled {
  opacity: 0.6;
  cursor: default;
}

.learn-practice-result:empty {
  display: none;
}

.learn-practice-result {
  margin-top: var(--theme-space-4);
}

/* Breathing room below the last section. */
.learn-practice-section:last-child {
  margin-bottom: var(--theme-space-6);
}

@media (max-width: 768px) {
  .learn {
    overflow-y: auto;
  }
}

/* Courses list — the first screen: sections stacked vertically, each with a
   titled heading and a responsive grid of course cards. */
.learn--courses {
  display: block;
  overflow-y: auto;
  padding-right: var(--theme-space-2);
}

.learn-section {
  margin-bottom: var(--theme-space-6);
}

.learn-section-title {
  margin: 0 0 var(--theme-space-4);
  padding-bottom: var(--theme-space-3);
  border-bottom: 2px solid var(--theme-color-primary);
  font-size: var(--theme-font-lg);
  font-weight: 700;
  color: var(--theme-text-primary);
}

.learn-section-description {
  margin: calc(-1 * var(--theme-space-2)) 0 var(--theme-space-4);
  font-size: var(--theme-font-sm);
  line-height: 1.5;
  color: var(--theme-text-secondary);
}

.learn-course-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
  gap: var(--theme-space-4);
}

.learn-course-card {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: var(--theme-space-2);
  padding: var(--theme-space-5);
  border: 1px solid var(--theme-border-subtle);
  border-radius: var(--theme-radius-lg);
  background: var(--theme-surface-raised);
  color: var(--theme-text-primary);
  text-align: left;
  cursor: pointer;
  transition: transform 0.15s ease, box-shadow 0.15s ease, border-color 0.15s ease;
}

.learn-course-card:hover {
  transform: translateY(-2px);
  border-color: var(--theme-color-primary);
  box-shadow: var(--theme-shadow-md, 0 4px 12px rgba(0, 0, 0, 0.12));
}

.learn-course-icon {
  display: inline-flex;
  color: var(--theme-color-primary);
}

.learn-course-title {
  font-size: var(--theme-font-md);
  font-weight: var(--theme-font-weight-semibold);
}

.learn-course-image {
  display: none;
}

.learn-course-badge {
  padding: 2px var(--theme-space-2);
  border-radius: var(--theme-radius-sm);
  background: var(--theme-surface-sunken, var(--theme-border-subtle));
  color: var(--theme-text-secondary);
  font-size: var(--theme-font-xs);
  font-weight: var(--theme-font-weight-semibold);
  text-transform: uppercase;
  letter-spacing: 0.04em;
}

/* Progress bar: a slim track showing how many steps are done out of the total,
   with a "completed/total" label. It stays accent-colored while in progress and
   turns green once every step is complete. */
.learn-course-progress {
  display: flex;
  align-items: center;
  gap: var(--theme-space-2);
  width: 100%;
}

.learn-course-progress-track {
  flex: 1;
  height: 6px;
  border-radius: var(--theme-radius-pill, 999px);
  background: var(--theme-surface-sunken, var(--theme-border-subtle));
  overflow: hidden;
}

.learn-course-progress-fill {
  height: 100%;
  border-radius: inherit;
  background: var(--theme-color-primary);
  transition: width 0.3s ease;
}

.learn-course-progress--complete .learn-course-progress-fill {
  background: var(--theme-color-success, #16a34a);
}

.learn-course-progress-label {
  flex: 0 0 auto;
  color: var(--theme-text-secondary);
  font-size: var(--theme-font-xs);
  font-weight: var(--theme-font-weight-semibold);
  font-variant-numeric: tabular-nums;
}

.learn-course-progress--complete .learn-course-progress-label {
  color: var(--theme-color-success, #16a34a);
}

.learn-course-card.is-complete {
  border-color: color-mix(in srgb, var(--theme-color-success, #16a34a) 45%, var(--theme-border-subtle));
}

/* Feedback row under the progress bar: like, dislike and comment. */
.learn-course-actions {
  display: flex;
  align-items: center;
  gap: var(--theme-space-1);
  margin-top: auto;
  padding-top: var(--theme-space-1);
}

.learn-course-action {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: var(--theme-space-1);
  border: 1px solid transparent;
  border-radius: var(--theme-radius-md);
  background: transparent;
  color: var(--theme-text-secondary);
  cursor: pointer;
  transition: color 0.15s ease, background 0.15s ease, border-color 0.15s ease;
}

.learn-course-action:hover {
  border-color: var(--theme-border-subtle);
  background: var(--theme-surface-sunken, var(--theme-border-subtle));
  color: var(--theme-color-primary);
}

.learn-course-action.is-active {
  color: var(--theme-color-primary);
}

.learn-course-action:focus-visible,
.learn-course-card:focus-visible {
  outline: 2px solid var(--theme-color-primary);
  outline-offset: 2px;
}

/* Short comment overlay for a course card. */
.learn-comment-form {
  display: flex;
  flex-direction: column;
  gap: var(--theme-space-2);
}

.learn-comment-label {
  display: flex;
  flex-direction: column;
  gap: var(--theme-space-2);
  color: var(--theme-text-secondary);
  font-size: var(--theme-font-sm);
}

.learn-comment-input {
  width: 100%;
  padding: var(--theme-space-3);
  border: 1px solid var(--theme-border-subtle);
  border-radius: var(--theme-radius-md);
  background: var(--theme-surface-base, var(--theme-surface-raised));
  color: var(--theme-text-primary);
  font-family: inherit;
  font-size: var(--theme-font-sm);
  resize: vertical;
  box-sizing: border-box;
}

.learn-comment-input:focus {
  outline: none;
  border-color: var(--theme-color-primary);
}

.learn-comment-counter {
  align-self: flex-end;
  color: var(--theme-text-secondary);
  font-size: var(--theme-font-xs);
  font-variant-numeric: tabular-nums;
}

.learn-comment-cancel,
.learn-comment-save {
  padding: var(--theme-space-2) var(--theme-space-4);
  border: 1px solid var(--theme-border-subtle);
  border-radius: var(--theme-radius-md);
  background: var(--theme-surface-raised);
  color: var(--theme-text-primary);
  font-size: var(--theme-font-sm);
  cursor: pointer;
}

.learn-comment-save {
  border-color: var(--theme-color-primary);
  background: var(--theme-color-primary);
  color: var(--theme-color-on-primary, #fff);
}

/* Pushed to the opposite edge of the footer, away from save/cancel. */
.learn-comment-delete {
  margin-right: auto;
  padding: var(--theme-space-2) var(--theme-space-4);
  border: 1px solid transparent;
  border-radius: var(--theme-radius-md);
  background: transparent;
  color: var(--theme-color-danger, #dc2626);
  font-size: var(--theme-font-sm);
  cursor: pointer;
}

.learn-comment-delete:hover {
  border-color: var(--theme-color-danger, #dc2626);
}

/* Course timeline header — a back button and the course title above the
   sprint timeline. */
.learn-course-header {
  display: flex;
  align-items: center;
  gap: var(--theme-space-4);
}

.learn-back {
  display: inline-flex;
  align-items: center;
  gap: var(--theme-space-2);
  padding: var(--theme-space-2) var(--theme-space-3);
  border: 1px solid var(--theme-border-subtle);
  border-radius: var(--theme-radius-md);
  background: var(--theme-surface-raised);
  color: var(--theme-text-primary);
  font-size: var(--theme-font-sm);
  cursor: pointer;
  transition: border-color 0.15s ease, color 0.15s ease;
}

.learn-back:hover {
  border-color: var(--theme-color-primary);
  color: var(--theme-color-primary);
}

.learn-course-heading {
  margin: 0;
  font-size: var(--theme-font-lg);
  font-weight: 700;
  color: var(--theme-text-primary);
}

.learn-reload {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  margin-left: auto;
  padding: var(--theme-space-2);
  border: 1px solid var(--theme-border-subtle);
  border-radius: var(--theme-radius-md);
  background: var(--theme-surface-raised);
  color: var(--theme-text-primary);
  cursor: pointer;
  transition: border-color 0.15s ease, color 0.15s ease;
}

.learn-reload:hover {
  border-color: var(--theme-color-primary);
  color: var(--theme-color-primary);
}

/* Final "Certificate" step of the trail */
.learn-dot--certificate { color: #ca8a04; }

.learn-activity--certificate.is-complete .learn-dot {
  border-color: #ca8a04;
}

/* Certificate popup */
.learn-certificate-popup {
  display: flex;
  flex-direction: column;
  gap: var(--theme-space-4);
}

.learn-certificate-message {
  font-size: var(--theme-font-md);
  font-weight: var(--theme-font-weight-semibold);
  color: var(--theme-text-primary);
  text-align: center;
}

/* The rectangle framing the certificate (and the login overlay for guests) */
.learn-certificate-frame {
  position: relative;
  overflow: hidden;
  padding: var(--theme-space-4);
  background: var(--theme-bg-tertiary);
  border: 1px solid var(--theme-border-subtle);
  border-radius: var(--theme-radius-md);
}

/* The certificate is always a white sheet with dark ink, even in dark theme,
   so the on-screen preview matches the downloaded PDF. */
.learn-certificate {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 4px;
  width: 100%;
  /* aspect-ratio: 297 / 223; */
  overflow: hidden;
  padding: 1.5% 6%;
  background: #ffffff;
  border: 2px solid #ca8a04;
  outline: 6px solid #ffffff;
  outline-offset: -10px;
  color: #1f2937;
  text-align: center;
}

.learn-certificate.is-blurred {
  filter: blur(7px);
  user-select: none;
  pointer-events: none;
}

.learn-certificate-logo {
  height: 72px;
  object-fit: contain;
}

/* Central block: gold seal beside the text, which fills the remaining width. */
.learn-certificate-main {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 28px;
  width: 100%;
}

.learn-certificate-seal {
  flex-shrink: 0;
  width: 200px;
  height: 200px;
  object-fit: contain;
}

.learn-certificate-text {
  display: flex;
  flex: 1;
  flex-direction: column;
  align-items: center;
  gap: 1px;
}

.learn-certificate-title {
  font-size: clamp(23px, 4.2vw, 36px);
  font-weight: var(--theme-font-weight-bold);
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: #111827;
}

.learn-certificate-body {
  font-size: clamp(16px, 2.3vw, 20px);
  line-height: 1.05;
  color: #374151;
}

.learn-certificate-name {
  font-size: clamp(23px, 3.9vw, 34px);
  line-height: 1.1;
  font-weight: var(--theme-font-weight-bold);
  color: #111827;
  border-bottom: 1px solid #d1d5db;
  padding: 0 24px 2px;
  margin: 2px 0;
}

.learn-certificate-course {
  font-size: clamp(18px, 2.9vw, 23px);
  line-height: 1.1;
  font-weight: var(--theme-font-weight-semibold);
  color: #ca8a04;
}

.learn-certificate-date {
  font-size: clamp(14px, 2.1vw, 17px);
  line-height: 1.1;
  color: #6b7280;
}

.learn-certificate-disclaimer {
  margin-top: auto;
  max-width: 90%;
  font-size: 10px;
  line-height: 1.15;
  color: #9ca3af;
}

/* Guest overlay inviting the visitor to sign in */
.learn-certificate-login {
  position: absolute;
  inset: 0;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: var(--theme-space-3);
  padding: var(--theme-space-6);
  text-align: center;
}

.learn-certificate-login-icon {
  color: var(--theme-text-primary);
}

.learn-certificate-login-message {
  font-size: var(--theme-font-md);
  font-weight: var(--theme-font-weight-semibold);
  color: var(--theme-text-primary);
  text-shadow: 0 1px 6px var(--theme-bg-primary, rgba(0, 0, 0, 0.35));
}

.learn-certificate-actions {
  display: flex;
  justify-content: flex-end;
  gap: var(--theme-space-2);
  width: 100%;
}

.learn-certificate-download {
  display: inline-flex;
  align-items: center;
  gap: var(--theme-space-2);
  padding: var(--theme-space-2) var(--theme-space-4);
  border: none;
  border-radius: var(--theme-radius-md);
  background: var(--theme-color-primary);
  color: #ffffff;
  font-size: var(--theme-font-sm);
  font-weight: var(--theme-font-weight-semibold);
  cursor: pointer;
  transition: opacity 0.15s ease;
}

.learn-certificate-download:hover {
  opacity: 0.9;
}

/* Share button in the certificate footer — same shape as the download button,
   drawn as an outline so the PDF download stays the primary action. */
.learn-certificate-share {
  display: inline-flex;
  align-items: center;
  gap: var(--theme-space-2);
  padding: var(--theme-space-2) var(--theme-space-4);
  border: 1px solid var(--theme-color-primary);
  border-radius: var(--theme-radius-md);
  background: transparent;
  color: var(--theme-color-primary);
  font-size: var(--theme-font-sm);
  font-weight: var(--theme-font-weight-semibold);
  cursor: pointer;
  transition: background 0.15s ease, color 0.15s ease;
}

.learn-certificate-share:hover {
  background: var(--theme-color-primary);
  color: var(--theme-text-inverse);
}

/* Share modal — a grid of brand buttons and the LinkedIn certification intent. */
.learn-certificate-share-panel {
  display: flex;
  flex-direction: column;
  gap: var(--theme-space-3);
}

.learn-certificate-share-linkedin {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: var(--theme-space-2);
  width: 100%;
  padding: var(--theme-space-3) var(--theme-space-4);
  border: none;
  border-radius: var(--theme-radius-md);
  background: #0A66C2;
  color: #ffffff;
  font: inherit;
  font-size: var(--theme-font-sm);
  font-weight: var(--theme-font-weight-semibold);
  cursor: pointer;
  transition: opacity 0.15s ease;
}

.learn-certificate-share-linkedin:hover {
  opacity: 0.9;
}

.learn-certificate-share-options {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: var(--theme-space-3);
}

.learn-certificate-share-option {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: var(--theme-space-2);
  padding: var(--theme-space-4) var(--theme-space-2);
  border: 1px solid var(--theme-border-subtle);
  border-radius: var(--theme-radius-md);
  background: var(--theme-surface-raised);
  color: var(--theme-text-primary);
  font: inherit;
  font-size: var(--theme-font-sm);
  font-weight: var(--theme-font-weight-medium);
  cursor: pointer;
  transition: border-color 0.15s ease, transform 0.15s ease, box-shadow 0.15s ease;
}

.learn-certificate-share-option:hover {
  border-color: var(--learn-certificate-share-color);
  box-shadow: var(--theme-shadow-sm);
  transform: translateY(-2px);
}

.learn-certificate-share-option:focus-visible {
  outline: 2px solid var(--learn-certificate-share-color);
  outline-offset: 2px;
}

/* Icon sits in a filled circle of the brand color. */
.learn-certificate-share-icon {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 48px;
  height: 48px;
  border-radius: var(--theme-radius-full);
  background: var(--learn-certificate-share-color);
  color: #ffffff;
}

/* Celebration confetti spawned above the certificate modal */
.learn-confetti {
  position: fixed;
  inset: 0;
  z-index: 10000;
  overflow: hidden;
  pointer-events: none;
}

.learn-confetti-piece {
  position: absolute;
  top: -20px;
  border-radius: 2px;
  opacity: 0.9;
  animation-name: learn-confetti-fall;
  animation-timing-function: ease-in;
  animation-fill-mode: forwards;
}

@keyframes learn-confetti-fall {
  to {
    transform: translate(var(--learn-confetti-drift, 0), 105vh) rotate(var(--learn-confetti-spin, 720deg));
    opacity: 0.7;
  }
}

/* Interview activity: progress line, start button, and the verdict card. The
   chat scaffolding reuses the learn-bot-* classes. */
.learn-interview-progress {
  font-size: var(--theme-font-sm);
  color: var(--theme-text-secondary);
  font-weight: var(--theme-font-weight-semibold);
}

.learn-interview-progress:empty {
  display: none;
}

.learn-interview-start {
  display: inline-flex;
  align-items: center;
  gap: var(--theme-space-2);
  align-self: flex-start;
  margin-top: var(--theme-space-2);
  padding: var(--theme-space-2) var(--theme-space-4);
  border: none;
  border-radius: var(--theme-radius-md);
  background: var(--theme-color-primary);
  color: #fff;
  font: inherit;
  cursor: pointer;
}

.learn-interview-start:hover:not(:disabled) {
  opacity: 0.9;
}

.learn-bot-composer.is-disabled {
  opacity: 0.6;
}

.learn-interview-verdict {
  display: flex;
  flex-direction: column;
  gap: var(--theme-space-3);
  padding: var(--theme-space-4);
  border: 1px solid var(--theme-border-subtle);
  border-inline-start: 4px solid var(--theme-color-primary);
  border-radius: var(--theme-radius-md);
  background: var(--theme-surface-raised);
}

.learn-interview-verdict--approved {
  border-inline-start-color: var(--theme-color-success);
}

.learn-interview-verdict--rejected {
  border-inline-start-color: var(--theme-color-danger);
}

.learn-interview-verdict-title {
  display: flex;
  align-items: center;
  gap: var(--theme-space-2);
  font-weight: var(--theme-font-weight-semibold);
}

.learn-interview-verdict--approved .learn-interview-verdict-title {
  color: var(--theme-color-success);
}

.learn-interview-verdict--rejected .learn-interview-verdict-title {
  color: var(--theme-color-danger);
}

.learn-interview-verdict-heading {
  margin: 0 0 var(--theme-space-1);
  font-size: var(--theme-font-sm);
  font-weight: var(--theme-font-weight-semibold);
  color: var(--theme-text-secondary);
}

.learn-interview-verdict-recap {
  margin: 0;
  padding-inline-start: var(--theme-space-5);
  display: flex;
  flex-direction: column;
  gap: var(--theme-space-1);
}

/* Floating helper pill — a real person the learner can write to at any moment,
   pinned to the bottom of the course track so it survives switching activities
   and scrolling a long one. */
.learn-helper {
  position: absolute;
  inset-block-end: var(--theme-space-4);
  inset-inline-end: var(--theme-space-4);
  z-index: var(--theme-z-sticky);
  display: flex;
  align-items: center;
  gap: var(--theme-space-3);
  max-width: min(320px, calc(100% - var(--theme-space-8)));
  padding: var(--theme-space-2) var(--theme-space-4) var(--theme-space-2) var(--theme-space-2);
  font-family: var(--theme-font-sans);
  text-align: start;
  color: var(--theme-text-primary);
  background: var(--theme-surface-raised);
  border: 1px solid var(--theme-border-default);
  border-radius: var(--theme-radius-full);
  box-shadow: var(--theme-shadow-lg);
  cursor: pointer;
  animation: learn-helper-enter 0.35s ease both;
  transition: transform 0.15s ease, border-color 0.15s ease, box-shadow 0.15s ease;
}

.learn-helper:hover,
.learn-helper:focus-visible {
  outline: none;
  transform: translateY(-2px);
  border-color: var(--theme-color-primary);
  background: color-mix(in srgb, var(--theme-color-primary) 8%, var(--theme-surface-raised));
  box-shadow: var(--theme-shadow-lg);
}

.learn-helper-avatar {
  width: 40px;
  height: 40px;
  flex-shrink: 0;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  overflow: hidden;
  border-radius: var(--theme-radius-full);
  background: var(--theme-bg-tertiary);
  color: var(--theme-text-secondary);
  font-size: var(--theme-font-sm);
  font-weight: var(--theme-font-weight-semibold);
}

.learn-helper-avatar-img {
  width: 100%;
  height: 100%;
  display: block;
  /* The illustrated face includes a waving hand: contain it instead of
     cropping so the whole gesture survives the circular frame. */
  object-fit: contain;
}

.learn-helper-avatar--placeholder {
  background: var(--theme-color-primary);
  color: var(--theme-text-inverse);
}

.learn-helper-body {
  display: flex;
  flex-direction: column;
  gap: 2px;
  min-width: 0;
}

.learn-helper-title {
  font-size: var(--theme-font-sm);
  font-weight: var(--theme-font-weight-semibold);
  line-height: var(--theme-line-height-tight);
}

.learn-helper-reply {
  font-size: var(--theme-font-xs);
  line-height: var(--theme-line-height-tight);
  color: var(--theme-text-secondary);
}

@keyframes learn-helper-enter {
  from { opacity: 0; transform: translateY(var(--theme-space-3)); }
  to   { opacity: 1; transform: translateY(0); }
}

/* Narrow screens: collapse to the face alone so the pill never covers the
   activity content. */
@media (max-width: 640px) {

  .learn-helper {
    padding: var(--theme-space-2);
  }

  .learn-helper-body {
    display: none;
  }

}

@media (prefers-reduced-motion: reduce) {

  .learn-helper {
    animation: none;
    transition: none;
  }

  .learn-helper:hover,
  .learn-helper:focus-visible {
    transform: none;
  }

}
