/* The /guide surface + the cross-page return banner + the guide dashboard
 * card. Token-fallback pattern (renders sanely in both shells/themes). */

.guide-wrap { max-width: 920px; margin: 0 auto; padding: 8px 4px 48px; }
/* Public shell (anonymous readers): no app chrome around it, so it owns its gutter. */
.guide-wrap--public { padding: 32px 16px 64px; }

.guide-hero h1 { margin: 0 0 6px; font-size: 1.6rem; }
.guide-hero p { color: var(--v2-dim, #6b7280); max-width: 640px; }

.guide-category { margin-top: 28px; }
.guide-category h2 { font-size: 1.05rem; margin: 0 0 10px; opacity: .85; }

.guide-topic-grid {
  display: grid; gap: 12px;
  grid-template-columns: repeat(auto-fill, minmax(240px, 1fr));
}
.guide-topic-card {
  display: block; padding: 14px 16px; border-radius: 10px;
  border: 1px solid var(--v2-border, rgba(128,128,128,.25));
  background: var(--v2-card-bg, rgba(128,128,128,.06));
  text-decoration: none; color: inherit;
  transition: border-color .15s ease, transform .15s ease;
}
.guide-topic-card:hover { border-color: #2fbf8f; transform: translateY(-1px); }
.guide-topic-card h3 { margin: 8px 0 4px; font-size: 1rem; }
.guide-topic-card p { margin: 0; font-size: .85rem; color: var(--v2-dim, #6b7280); }

.guide-topic-type {
  display: inline-block; font-size: .7rem; letter-spacing: .04em;
  text-transform: uppercase; padding: 2px 8px; border-radius: 999px;
  border: 1px solid rgba(47,191,143,.5); color: #2fbf8f;
}
.guide-topic-type--concept { border-color: rgba(102,126,234,.5); color: #667eea; }

.guide-topic-head h1 { margin: 8px 0 12px; font-size: 1.5rem; }
.guide-show-me {
  display: inline-flex; align-items: center; gap: 8px;
  padding: 8px 18px; border-radius: 8px; border: none; cursor: pointer;
  background: #2fbf8f; color: #fff; font-weight: 600; font-size: .95rem;
}
.guide-show-me:hover { filter: brightness(1.07); }

.guide-diagram { margin: 18px 0; text-align: center; }
.guide-diagram svg { max-width: 100%; height: auto; }

.guide-body { line-height: 1.65; }
.guide-body h2 { font-size: 1.15rem; margin-top: 24px; }
.guide-body code { font-size: .9em; }

.guide-related { margin-top: 32px; border-top: 1px solid var(--v2-border, rgba(128,128,128,.25)); padding-top: 14px; }
.guide-related h2 { font-size: .95rem; opacity: .8; }

.guide-notice {
  padding: 10px 14px; border-radius: 8px; margin-bottom: 16px; font-size: .92rem;
}
.guide-notice--fallback { background: rgba(240,180,41,.12); border: 1px solid rgba(240,180,41,.45); }
.guide-notice--done { background: rgba(47,191,143,.12); border: 1px solid rgba(47,191,143,.45); }

.guide-empty { padding: 24px; text-align: center; color: var(--v2-dim, #6b7280); }

/* Cross-page return banner */
.guide-return-banner {
  position: fixed; top: 10px; left: 50%; transform: translateX(-50%);
  z-index: 1090; display: flex; align-items: center; gap: 8px;
  padding: 8px 14px; border-radius: 999px; font-size: .88rem;
  background: #103a2e; color: #d9f7ec; border: 1px solid #2fbf8f;
  box-shadow: 0 4px 14px rgba(0,0,0,.25);
}
.guide-return-banner a { color: #7de3c4; font-weight: 600; }
.guide-return-banner button {
  background: none; border: none; color: inherit; cursor: pointer;
  font-size: 1rem; line-height: 1; padding: 0 2px;
}

/* Curated start-here playlist (WT-3 Phase 2) */
.guide-playlist {
  margin: 22px 0 6px; padding: 16px 18px; border-radius: 12px;
  border: 1px solid rgba(47,191,143,.45);
  background: rgba(47,191,143,.07);
}
.guide-playlist--tour {
  box-shadow: 0 0 0 3px rgba(47,191,143,.35);
  animation: guide-tour-pulse 1.6s ease-in-out 2;
}
@keyframes guide-tour-pulse {
  50% { box-shadow: 0 0 0 8px rgba(47,191,143,.18); }
}
.guide-playlist-head h2 { margin: 0 0 4px; font-size: 1.05rem; }
.guide-playlist-head p { margin: 0 0 10px; font-size: .9rem;
  color: var(--v2-dim, #6b7280); }
.guide-playlist-head a { color: #2fbf8f; font-weight: 600; }
.guide-playlist-steps {
  list-style: none; display: flex; flex-wrap: wrap; gap: 8px;
  margin: 0; padding: 0;
}
.guide-playlist-steps a {
  display: inline-flex; align-items: center; gap: 8px;
  padding: 7px 12px 7px 8px; border-radius: 999px; text-decoration: none;
  border: 1px solid var(--v2-border, rgba(128,128,128,.25));
  background: var(--v2-card-bg, rgba(128,128,128,.06)); color: inherit;
  font-size: .88rem; transition: border-color .15s ease;
}
.guide-playlist-steps a:hover { border-color: #2fbf8f; }
.guide-playlist-n {
  display: inline-flex; align-items: center; justify-content: center;
  width: 22px; height: 22px; border-radius: 50%;
  background: #2fbf8f; color: #fff; font-weight: 700; font-size: .78rem;
}
