/* ============================================================
   Plans — plan badge + the personalized guidebook overlay
   ============================================================ */

/* tiered entry points hidden when the current plan doesn't include them */
.plan-locked { display: none !important; }

/* the sidebar "Plan & guide" badge sits at the end of the row */
#btn-plan { display: flex; align-items: center; }
.sb-plan-badge { margin-left: auto; }
.sb-plan-badge:empty { display: none; }

/* small plan badge (sidebar footer, admin rows) */
.plan-badge {
  display: inline-flex; align-items: center;
  font-size: 10.5px; font-weight: 700; letter-spacing: 0.02em;
  color: #fff; background: var(--pb, var(--accent));
  border-radius: 999px; padding: 1px 8px; line-height: 1.5;
  text-transform: uppercase;
}

/* sidebar plan chip button */
.sb-plan {
  display: flex; align-items: center; gap: 8px; width: 100%;
  background: none; border: none; cursor: pointer; text-align: left;
  padding: 6px 10px; border-radius: var(--radius-ctl); color: var(--text-light);
  font: inherit; font-size: 12.5px;
}
.sb-plan:hover { background: var(--bg-hover); color: var(--text); }
.sb-plan-label { color: var(--text-faint); }

/* ---------------------------- guide overlay ---------------------------- */
.guide-overlay {
  position: fixed; inset: 0; z-index: 1190;
  display: flex; align-items: center; justify-content: center;
  opacity: 0; transition: opacity 0.15s ease;
}
.guide-overlay.guide-in { opacity: 1; }
.guide-overlay.guide-closing { opacity: 0; }
.guide-scrim { position: absolute; inset: 0; background: rgba(15, 15, 25, 0.46); backdrop-filter: blur(2px); }

.guide-panel {
  position: relative;
  width: 820px; max-width: calc(100vw - 28px);
  height: 84vh; max-height: 900px;
  display: flex; flex-direction: column;
  background: var(--bg-modal); border: 1px solid var(--border);
  border-radius: var(--radius-pane); box-shadow: var(--shadow-pane);
  overflow: hidden;
  transform: translateY(8px) scale(0.994); transition: transform 0.15s ease;
}
.guide-overlay.guide-in .guide-panel { transform: none; }

.guide-head {
  display: flex; align-items: flex-start; justify-content: space-between;
  padding: 22px 24px 20px; border-bottom: 1px solid var(--border);
  background:
    linear-gradient(180deg, color-mix(in srgb, var(--pa) 12%, transparent), transparent);
}
.guide-eyebrow { font-size: 11px; font-weight: 700; text-transform: uppercase; letter-spacing: 0.06em; color: var(--pa); }
.guide-plan-name { font-family: var(--font-display); font-size: 26px; font-weight: 600; margin: 4px 0 0; letter-spacing: -0.01em; }
.guide-plan-tag { font-size: 13.5px; color: var(--text-light); margin: 6px 0 0; }
.guide-close {
  border: none; background: none; color: var(--text-faint); cursor: pointer;
  font-size: 17px; line-height: 1; padding: 6px 8px; border-radius: 8px;
}
.guide-close:hover { background: var(--bg-hover); color: var(--text); }

.guide-body { flex: 1; overflow-y: auto; padding: 18px 24px 26px; }

.guide-sect { margin-bottom: 22px; }
.guide-sect.locked { opacity: 0.92; }
.guide-sect-head {
  display: flex; align-items: center; gap: 10px; flex-wrap: wrap;
  padding-bottom: 10px; margin-bottom: 12px; border-bottom: 1px solid var(--border);
}
.guide-sect-name { font-family: var(--font-display); font-size: 16px; font-weight: 600; color: var(--pa); }
.guide-sect-tag { font-size: 12.5px; color: var(--text-faint); }
.guide-sect-state { margin-left: auto; display: inline-flex; align-items: center; gap: 8px; }
.guide-state-on { display: inline-flex; align-items: center; gap: 4px; font-size: 11.5px; font-weight: 600; color: #0f9d58; }
.guide-state-off { display: inline-flex; align-items: center; gap: 4px; font-size: 11.5px; font-weight: 600; color: var(--text-faint); }
.guide-current {
  font-size: 10.5px; font-weight: 700; text-transform: uppercase; letter-spacing: 0.03em;
  color: #fff; background: var(--pa); border-radius: 999px; padding: 1px 8px;
}

.guide-grid { display: grid; grid-template-columns: repeat(2, 1fr); gap: 10px; }
.guide-card {
  border: 1px solid var(--border); border-radius: var(--radius-ctl);
  padding: 13px 14px; background: var(--bg-modal);
  display: flex; flex-direction: column;
}
.guide-card-locked { background: var(--bg-callout); }
.guide-card-locked .guide-card-name { color: var(--text-light); }
.guide-card-top { display: flex; align-items: center; justify-content: space-between; gap: 8px; }
.guide-card-name { font-size: 14px; font-weight: 600; }
.guide-card-badge { color: var(--text-faint); display: inline-flex; }
.guide-card-badge.on { color: #0f9d58; }
.guide-card-desc { font-size: 12.5px; line-height: 1.5; color: var(--text-light); margin: 7px 0 10px; flex: 1; }
.guide-card-foot { display: flex; align-items: center; justify-content: space-between; gap: 10px; }
.guide-card-how { font-size: 11.5px; color: var(--text-faint); }
.guide-open {
  flex: none; font: inherit; font-size: 12px; font-weight: 600; color: #fff;
  background: var(--accent); border: none; border-radius: 7px; padding: 4px 12px; cursor: pointer;
}
.guide-open:hover { background: var(--accent-hover); }

@media (max-width: 680px) {
  .guide-grid { grid-template-columns: 1fr; }
  .guide-panel { height: 90vh; }
}
