/* Guided tour: a highlight ring around the current element and a small card. */
.tour-ring {
  position: fixed;
  z-index: 60;
  border-radius: 14px;
  box-shadow: 0 0 0 3px var(--accent), 0 0 0 9999px #0b0e1a59;
  pointer-events: none;
  transition: top 0.2s ease, left 0.2s ease, width 0.2s ease, height 0.2s ease;
}
.tour-card {
  position: fixed;
  z-index: 61;
  padding: 18px 18px 14px;
  border: 1px solid var(--line);
  border-radius: 14px;
  background: var(--white, #fff);
  color: var(--ink);
  box-shadow: 0 18px 50px #0b0e1a40;
  outline: none;
}
.tour-card:focus-visible { box-shadow: 0 0 0 3px var(--accent), 0 18px 50px #0b0e1a40; }
.tour-step {
  margin: 0 0 6px;
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 1.2px;
  text-transform: uppercase;
  color: var(--accent);
}
.tour-card h2 { margin: 0 0 8px; font-size: 17px; font-weight: 650; color: var(--ink); }
.tour-card #tour-body { margin: 0; font-size: 14px; line-height: 1.6; color: var(--muted); }
.tour-actions {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  margin-top: 16px;
}
.tour-nav { display: flex; gap: 8px; }
.tour-actions button { padding: 7px 13px; font-size: 13px; }
.tour-skip { padding-left: 0 !important; }
@media (prefers-reduced-motion: reduce) { .tour-ring { transition: none; } }

/* One-time explainer the first time a reader opens Autonomous study. */
.study-explainer {
  margin: 0 0 18px;
  padding: 16px 18px;
  border: 1px solid var(--line);
  border-radius: 12px;
  background: var(--soft);
}
.study-explainer-head { display: flex; align-items: flex-start; justify-content: space-between; gap: 12px; }
.study-explainer h2 { margin: 0 0 4px; font-size: 15px; font-weight: 650; color: var(--ink); }
.study-explainer > .study-explainer-head p { margin: 0; font-size: 13px; color: var(--muted); }
.study-explainer ol {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 10px;
  margin: 14px 0 0;
  padding: 0;
  list-style: none;
  counter-reset: study-step;
}
.study-explainer li {
  counter-increment: study-step;
  padding: 10px 12px;
  border-radius: 10px;
  background: var(--white, #fff);
  font-size: 12px;
  line-height: 1.5;
  color: var(--muted);
}
.study-explainer li strong { display: block; margin-bottom: 2px; font-size: 13px; color: var(--ink); }
.study-explainer li strong::before { content: counter(study-step) ". "; color: var(--accent); }
@media (max-width: 820px) { .study-explainer ol { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
@media (max-width: 480px) { .study-explainer ol { grid-template-columns: minmax(0, 1fr); } }
