/* ============================================================
   guide.css — Hub Guide page (guide.html)
   Builds on glossary.css (header, toolbar, search). Light by
   default; dark via [data-theme="dark"], matching glossary.css.
   ============================================================ */

.guide-toc { display: flex; flex-wrap: wrap; gap: 6px; margin: 4px 0 8px; }
.guide-toc a {
  font-size: 12.5px; text-decoration: none; padding: 5px 11px; border-radius: 999px;
  border: 1px solid var(--color-border, #E0E0E0); color: var(--color-text, #2E2E2E);
  background: var(--color-surface, #FFFFFF);
}
.guide-toc a:hover { border-color: var(--color-primary, #C52127); color: var(--color-primary, #C52127); }

.guide-section {
  margin: 22px 0 0; padding: 18px 20px; border-radius: 12px;
  border: 1px solid var(--color-border, #E8E8E8); background: var(--color-surface, #FFFFFF);
  scroll-margin-top: 80px;
}
.guide-section h2 { margin: 0 0 10px; font-size: 18px; font-weight: 700; color: var(--color-text-heading, #111111); display: flex; align-items: center; gap: 10px; }
.guide-section h3 { margin: 16px 0 6px; font-size: 14px; font-weight: 700; color: var(--color-text-heading, #111111); }
.guide-section p, .guide-section li { font-size: 14px; line-height: 1.6; color: var(--color-text, #2E2E2E); }
.guide-section p { margin: 0 0 10px; }
.guide-section ul, .guide-section ol { margin: 0 0 10px; padding-left: 20px; }
.guide-section li { margin: 4px 0; }
.guide-section a { color: var(--color-primary, #C52127); }
.guide-muted { color: var(--color-text-muted, #6B6B6B) !important; font-size: 13px !important; }
.guide-tip { background: rgba(197,33,39,0.06); border-left: 3px solid var(--color-primary, #C52127); padding: 10px 12px; border-radius: 6px; }

/* Tier cards */
.guide-tiers { display: grid; grid-template-columns: repeat(auto-fit, minmax(220px, 1fr)); gap: 12px; margin: 6px 0 14px; }
.guide-tier { border: 1px solid var(--color-border, #E8E8E8); border-radius: 10px; padding: 14px; background: var(--color-surface-alt, #FAFAFA); }
.guide-tier p { font-size: 13.5px; }
.guide-tier-badge { display: inline-block; font-size: 11px; font-weight: 700; letter-spacing: .04em; text-transform: uppercase; padding: 3px 9px; border-radius: 999px; margin-bottom: 10px; }
.guide-tier--certified .guide-tier-badge { background: rgba(34,197,94,.14); color: #15803D; }
.guide-tier--community .guide-tier-badge { background: rgba(127,127,127,.16); color: #4B5563; }
.guide-tier--sandbox   .guide-tier-badge { background: rgba(224,164,59,.18); color: #B45309; }
.guide-tier--certified { border-top: 3px solid #22C55E; }
.guide-tier--community { border-top: 3px solid #9CA3AF; }
.guide-tier--sandbox   { border-top: 3px solid #E0A43B; }
.guide-inline-badge { font-size: 11px; font-weight: 700; padding: 1px 7px; border-radius: 999px; background: rgba(34,197,94,.14); color: #15803D; white-space: nowrap; }

/* Numbered steps */
.guide-steps { counter-reset: step; list-style: none; padding-left: 0 !important; }
.guide-steps li { counter-increment: step; position: relative; padding-left: 34px; margin: 10px 0; }
.guide-steps li::before {
  content: counter(step); position: absolute; left: 0; top: 1px; width: 22px; height: 22px; border-radius: 50%;
  background: var(--color-primary, #C52127); color: #FFFFFF; font-size: 12px; font-weight: 700;
  display: flex; align-items: center; justify-content: center;
}

/* Admin playbook */
.guide-section--admin { border-left: 3px solid var(--color-primary, #C52127); }
.guide-pill { font-size: 10.5px; font-weight: 700; letter-spacing: .04em; text-transform: uppercase; padding: 2px 8px; border-radius: 999px; background: rgba(197,33,39,.10); color: var(--color-primary, #C52127); }
.guide-checklist { list-style: none; padding-left: 0 !important; }
.guide-checklist li { position: relative; padding-left: 26px; }
.guide-checklist li::before { content: "✓"; position: absolute; left: 4px; color: #22C55E; font-weight: 700; }

.guide-footer { margin: 26px 0 10px; font-size: 13px; color: var(--color-text-muted, #6B6B6B); }
.guide-footer a { color: var(--color-primary, #C52127); }

/* Highlight the section a help (ⓘ) link pointed at */
@keyframes guideFlash { 0% { box-shadow: 0 0 0 3px rgba(197,33,39,.55); } 100% { box-shadow: 0 0 0 0 rgba(197,33,39,0); } }
.guide-section--flash { animation: guideFlash 1.6s ease-out 1; }

/* Dark */
[data-theme="dark"] .guide-section { background: var(--color-surface, #1A1916); border-color: #2A2826; }
[data-theme="dark"] .guide-section h2, [data-theme="dark"] .guide-section h3 { color: #F5F3EF; }
[data-theme="dark"] .guide-section p, [data-theme="dark"] .guide-section li { color: #D4D1CC; }
[data-theme="dark"] .guide-tier { background: #141210; border-color: #2A2826; }
[data-theme="dark"] .guide-toc a { background: #1A1916; border-color: #2A2826; color: #D4D1CC; }
[data-theme="dark"] .guide-tier--certified .guide-tier-badge, [data-theme="dark"] .guide-inline-badge { color: #4ADE80; }
[data-theme="dark"] .guide-tier--community .guide-tier-badge { color: #C7C3BD; }
[data-theme="dark"] .guide-tier--sandbox .guide-tier-badge { color: #F2B65A; }
[data-theme="dark"] .guide-muted { color: #9A968F !important; }

/* "Take the tour" call-to-action (Unit) */
.guide-tour-cta {
  display: flex; align-items: center; gap: 12px; flex-wrap: wrap; margin-top: 14px; padding: 12px 14px;
  border-radius: 12px; border: 1px solid rgba(197,33,39,.35); background: rgba(197,33,39,.07);
}
.guide-tour-cta img { border-radius: 50%; flex: 0 0 auto; }
.guide-tour-cta > div { flex: 1 1 240px; font-size: 14px; line-height: 1.5; }
.guide-tour-btn {
  padding: 8px 16px; border-radius: 8px; border: 1px solid var(--color-primary, #C52127);
  background: var(--color-primary, #C52127); color: #FFFFFF; font: inherit; font-weight: 700; font-size: 13px; cursor: pointer;
}
.guide-tour-btn--ghost { background: transparent; color: var(--color-primary, #C52127); }
.guide-tour-btn[hidden] { display: none; }

/* Guide search box — same treatment as the Glossary's (#glossary-search):
   left padding leaves room for the magnifier so it never overlaps the text. */
#guide-search {
  width: 100%; box-sizing: border-box;
  padding: 10px 12px 10px 38px;
  border: 1.5px solid var(--color-border, #E5E5E5);
  border-radius: 8px;
  background: var(--color-bg-card, #FFFFFF);
  color: var(--color-text, #111);
  font-family: var(--font-family);
  font-size: 14px;
}
#guide-search:focus { outline: none; border-color: var(--color-primary, #C52127); box-shadow: 0 0 0 3px rgba(197,33,39,0.12); }
[data-theme="dark"] #guide-search,
body:not(.theme-light) #guide-search { background: #1A1916; border-color: #2A2826; color: #E8E5E0; }
