/* Shared styling for in-app guides. Embed-friendly: all selectors are
   namespaced under `.guide` so they don't bleed into the surrounding
   admin shell when a guide is rendered inside a modal. */

.guide {
  --g-bg: #fafafa;
  --g-surface: #ffffff;
  --g-ink: #1a1a1a;
  --g-muted: #6b7280;
  --g-line: #e5e7eb;
  --g-accent: #2563eb;
  --g-hl: #fef3c7;
  --g-tier-simple: #6b7280;
  --g-tier-routed: #2563eb;
  --g-tier-advanced: #9333ea;
  --g-good: #16a34a;
  --g-bad: #dc2626;
  font: 15px/1.6 -apple-system, BlinkMacSystemFont, "Segoe UI", system-ui, sans-serif;
  color: var(--g-ink);
  background: var(--g-bg);
  max-width: 880px;
  margin: 0 auto;
  padding: 24px 28px 80px;
  box-sizing: border-box;
}

.guide * { box-sizing: border-box; }

.guide-header {
  background: var(--g-surface);
  border: 1px solid var(--g-line);
  border-radius: 8px;
  padding: 20px 24px;
  margin-bottom: 24px;
}
.guide-header h1 {
  margin: 0 0 4px;
  font-size: 1.4rem;
  font-weight: 600;
}
.guide-header .sub {
  color: var(--g-muted);
  font-size: 13px;
  margin: 0;
}

.guide-meta {
  display: flex;
  gap: 12px;
  font-size: 12px;
  color: var(--g-muted);
  margin-top: 10px;
  flex-wrap: wrap;
  align-items: center;
}
.guide-meta .audience {
  display: inline-block;
  font-size: 11px;
  font-weight: 600;
  padding: 2px 8px;
  border-radius: 10px;
  color: #fff;
  text-transform: uppercase;
}
.guide-meta .audience.user { background: var(--g-tier-routed); }
.guide-meta .audience.admin { background: var(--g-tier-advanced); }
.guide-meta .audience.recipient { background: var(--g-tier-simple); }
.guide-meta .stale {
  background: var(--g-hl);
  color: #92400e;
  padding: 2px 8px;
  border-radius: 4px;
  font-weight: 600;
}

.guide h2 {
  font-size: 1.15rem;
  margin: 28px 0 6px;
  padding-bottom: 6px;
  border-bottom: 1px solid var(--g-line);
}
.guide h3 {
  font-size: 1rem;
  margin: 18px 0 6px;
}
.guide p { margin: 0 0 12px; }
.guide ul, .guide ol { margin: 0 0 12px 22px; padding: 0; }
.guide li { margin-bottom: 4px; }

.guide code {
  background: #f3f4f6;
  padding: 1px 6px;
  border-radius: 3px;
  font-size: 12.5px;
  font-family: ui-monospace, Menlo, Consolas, monospace;
}

.guide .tier {
  display: inline-block;
  font-size: 11px;
  font-weight: 600;
  padding: 2px 8px;
  border-radius: 10px;
  color: #fff;
  text-transform: uppercase;
}
.guide .tier.simple { background: var(--g-tier-simple); }
.guide .tier.routed { background: var(--g-tier-routed); }
.guide .tier.advanced { background: var(--g-tier-advanced); }

.guide .callout {
  background: #ecfdf5;
  border-left: 3px solid var(--g-good);
  padding: 10px 14px;
  border-radius: 4px;
  font-size: 13.5px;
  margin: 12px 0;
}
.guide .callout.tip { background: #eff6ff; border-color: var(--g-accent); }
.guide .callout.warn { background: var(--g-hl); border-color: #f59e0b; }
.guide .callout.danger { background: #fef2f2; border-color: var(--g-bad); }

.guide .mockup {
  background: #f3f4f6;
  border: 1px solid var(--g-line);
  border-radius: 6px;
  padding: 12px 14px;
  margin: 8px 0 14px;
  font: 12.5px/1.5 ui-monospace, Menlo, Consolas, monospace;
  white-space: pre;
  overflow-x: auto;
}

.guide .where-to-find {
  background: var(--g-surface);
  border: 1px solid var(--g-line);
  border-radius: 8px;
  padding: 14px 18px;
  margin: 16px 0;
}
.guide .where-to-find h3 { margin: 0 0 6px; }
.guide .where-to-find code { background: #eff6ff; }

.guide .related {
  margin-top: 32px;
  padding-top: 16px;
  border-top: 1px dashed var(--g-line);
  font-size: 13px;
  color: var(--g-muted);
}
.guide .related a {
  color: var(--g-accent);
  text-decoration: none;
  margin-right: 12px;
}
.guide .related a:hover { text-decoration: underline; }

.guide-footer {
  margin-top: 40px;
  padding-top: 16px;
  border-top: 1px solid var(--g-line);
  color: var(--g-muted);
  font-size: 11.5px;
  display: flex;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 8px;
}

/* Index page (the /guides landing). */
.guide-index { padding-top: 8px; }
.guide-index .group {
  background: var(--g-surface);
  border: 1px solid var(--g-line);
  border-radius: 8px;
  padding: 14px 20px;
  margin-bottom: 16px;
}
.guide-index .group h2 {
  margin: 0 0 8px;
  border-bottom: none;
  padding-bottom: 0;
}
.guide-index .card {
  display: block;
  padding: 10px 12px;
  border-radius: 6px;
  text-decoration: none;
  color: var(--g-ink);
  border: 1px solid transparent;
  margin-bottom: 4px;
}
.guide-index .card:hover {
  background: var(--g-bg);
  border-color: var(--g-line);
}
.guide-index .card strong { color: var(--g-accent); }
.guide-index .card .blurb {
  font-size: 12.5px;
  color: var(--g-muted);
  margin-top: 2px;
}
