/* ══════════════════════════════════════════════════════════
   Crumb docs — /docs (home) and every /docs/* page. Loads after site.css.
   Copy buttons on .code-wrap and the MCP quick-add are wired in site.js.
   ══════════════════════════════════════════════════════════ */
.docs-header { max-width: 1140px; margin: 0 auto; padding: 44px 28px 8px; }
.docs-header h1 { font-family: var(--font-display); font-weight: 600; font-size: clamp(1.875rem, 4vw, 2.625rem); letter-spacing: -0.025em; line-height: 1.05; margin: 12px 0 0; text-wrap: balance; }
.docs-header .lede { font-size: var(--fs-xl); color: var(--mute); margin: 14px 0 0; max-width: 60ch; line-height: 1.5; }

.docs { display: grid; grid-template-columns: 224px 1fr; gap: 48px; align-items: start; max-width: 1140px; margin: 0 auto; padding: 24px 28px 80px; }
.docs-toc { position: sticky; top: 88px; align-self: start; max-height: calc(100vh - 108px); overflow-y: auto; font-size: var(--fs-sm); }
.docs-toc .grp { margin-bottom: 16px; }
.docs-toc .grp-h { font-size: var(--fs-2xs); text-transform: uppercase; letter-spacing: var(--ls-cap); color: var(--mute-2); font-weight: 600; margin: 0 0 6px; padding-left: 10px; }
.docs-toc a { display: block; padding: 5px 10px; border-radius: var(--r-sm); color: var(--mute); line-height: 1.35; }
.docs-toc a:hover { color: var(--text); background: var(--hover); }
.docs-toc a[aria-current="page"] { color: var(--accent-deep); background: var(--ember-soft); font-weight: 600; }

.docs-main { min-width: 0; max-width: 760px; }
.docs-main section { margin-bottom: 6px; }
.docs-main h2 { font-family: var(--font-display); font-size: var(--fs-2xl); font-weight: 600; letter-spacing: -0.02em; color: var(--text); margin: 44px 0 10px; }
.docs-main > section:first-child > h2:first-child { margin-top: 0; }
.docs-main h3 { font-family: var(--font-display); font-size: var(--fs-lg); font-weight: 600; color: var(--text); margin: 26px 0 6px; }
.docs-main p { font-size: var(--fs-lg); line-height: 1.7; color: var(--text-2); margin: 0 0 14px; max-width: 70ch; }
.docs-main ul, .docs-main ol { font-size: var(--fs-md); line-height: 1.65; color: var(--text-2); margin: 0 0 14px; padding-left: 20px; }
.docs-main li { margin: 5px 0; }
.docs-main a.inline { color: var(--accent-deep); text-decoration: underline; text-underline-offset: 2px; }
.docs-main strong { color: var(--text); font-weight: 600; }
.docs-main table { width: 100%; border-collapse: collapse; font-size: var(--fs-sm); margin: 4px 0 16px; }
.docs-main th, .docs-main td { text-align: left; padding: 9px 10px; border-bottom: var(--border); vertical-align: top; }
.docs-main thead th { color: var(--mute); font-size: var(--fs-xs); text-transform: uppercase; letter-spacing: var(--ls-cap); }
.docs-main td code, .docs-main p code, .docs-main li code { font-family: var(--font-mono); font-size: var(--fs-xs); background: var(--cream-2); padding: 1px 5px; border-radius: var(--r-sm); }

.docs-shot { margin: 16px 0 20px; }
.docs-shot img { width: 100%; height: auto; display: block; border: 1px solid var(--hair-strong); border-radius: var(--r-lg); box-shadow: var(--sh-soft); background: var(--cream-2); }
.docs-shot figcaption { font-size: var(--fs-sm); color: var(--mute-2); margin-top: 8px; text-align: center; }

.code-wrap { position: relative; margin: 0 0 16px; }
.code-wrap pre { background: var(--oat-deep); color: rgba(251,247,240,0.9); padding: 16px 18px; border-radius: var(--r-lg); overflow: auto; font-family: var(--font-mono); font-size: var(--fs-sm); line-height: 1.7; margin: 0; }
.code-wrap .copy { position: absolute; top: 8px; right: 8px; appearance: none; cursor: pointer; border: 1px solid rgba(251,247,240,0.22); background: rgba(251,247,240,0.08); color: rgba(251,247,240,0.85); font-size: var(--fs-2xs); font-weight: 600; padding: 4px 9px; border-radius: var(--r-sm); }
.code-wrap .copy:hover { background: rgba(251,247,240,0.18); }

.docs-note { display: flex; gap: 10px; background: var(--ember-soft); border: 1px solid color-mix(in srgb, var(--accent) 28%, transparent); border-radius: var(--r-md); padding: 12px 14px; font-size: var(--fs-sm); color: var(--text-2); line-height: 1.55; margin: 0 0 16px; }
.docs-note .ic { color: var(--accent-deep); flex: 0 0 auto; display: inline-flex; padding-top: 1px; }
.plan-chip { display: inline-flex; align-items: center; font-size: var(--fs-2xs); text-transform: uppercase; letter-spacing: var(--ls-cap); font-weight: 600; color: var(--accent-deep); background: var(--ember-soft); padding: 2px 8px; border-radius: var(--r-pill); vertical-align: middle; margin-left: 8px; }

/* MCP quick-add — an ink button (distinct from the ember CTAs) that copies the install command */
.mcp-add-row { display: flex; align-items: center; gap: 12px; flex-wrap: wrap; margin: 2px 0 14px; }
.mcp-add { appearance: none; cursor: pointer; display: inline-flex; align-items: center; gap: 8px; background: var(--ink); color: var(--cream); border: 1px solid var(--ink); font: inherit; font-size: var(--fs-md); font-weight: 600; padding: 9px 16px; border-radius: var(--r-sm); transition: background var(--t-base) var(--ease), transform var(--t-base) var(--ease); }
.mcp-add:hover { background: var(--brown-2); border-color: var(--brown-2); transform: translateY(-1px); }
.mcp-add:active { transform: translateY(0) scale(0.98); }
.mcp-add .ic { display: inline-flex; }
.mcp-add-hint { font-size: var(--fs-sm); color: var(--green-deep); font-weight: 500; }

/* small CSS mockups for screens without a capture */
.mock { background: var(--surface); border: var(--border); border-radius: var(--r-lg); padding: 14px; margin: 4px 0 18px; }
.mock .mrow { display: flex; align-items: center; gap: 10px; padding: 9px 4px; border-bottom: 1px solid var(--hair); font-size: var(--fs-sm); }
.mock .mrow:last-child { border-bottom: none; }
.mock .grow { flex: 1; min-width: 0; }
.mock .muted { color: var(--mute-2); font-size: var(--fs-xs); }
.mock .arr { font-family: var(--font-mono); color: var(--accent-deep); font-size: var(--fs-xs); }

@media (max-width: 900px) {
  .docs { grid-template-columns: 1fr; gap: 0; padding-top: 8px; }
  .docs-toc { position: static; max-height: none; overflow: visible; margin-bottom: 28px; padding-bottom: 16px; border-bottom: var(--border); }
  .docs-toc .grp { columns: 2; margin-bottom: 8px; }
}

/* breadcrumb eyebrow on docs pages: Docs · Group */
.docs-header .eyebrow a:hover { text-decoration: underline; text-underline-offset: 2px; }

/* docs home: one linked entry per page */
.docs-entry { display: block; margin: 0 -12px; padding: 12px; border-radius: var(--r-md); transition: background var(--t-fast) var(--ease); }
.docs-entry:hover { background: var(--hover); }
.docs-main .docs-entry h3 { margin: 0 0 4px; }
.docs-main .docs-entry p { font-size: var(--fs-md); line-height: 1.55; margin: 0; }

/* previous / next at the foot of each page */
.docs-pager { display: flex; gap: 12px; margin-top: 48px; padding-top: 24px; border-top: var(--border); }
.docs-pager a { flex: 0 1 50%; padding: 12px 14px; border: var(--border); border-radius: var(--r-md); font-family: var(--font-display); font-weight: 600; color: var(--text); transition: border-color var(--t-fast) var(--ease), background var(--t-fast) var(--ease); }
.docs-pager a:hover { border-color: var(--hair-strong); background: var(--hover); }
.docs-pager a span { display: block; font-family: var(--font-body); font-size: var(--fs-xs); font-weight: 500; color: var(--mute-2); margin-bottom: 2px; }
.docs-pager .next { margin-left: auto; text-align: right; }
