/* Article template: shared by every Docs and Guides content page (not hub pages).
   Loaded after /styles/output.css on article pages only. Markup contract:
     .breadcrumb > a, span (separator), current page text
     .page-wrap > aside.toc (.toc-label + ul > li > a, optional a.toc-sub)
                > main.content[data-pagefind-body] (.page-badge, h1, .page-intro, optional .meta-row, sections)
     after .page-wrap: #footer-placeholder, then the #back-to-top button + its script, then loader.js
   Element rules are scoped with :where(.page-wrap), which adds zero specificity, so
   Tailwind utility classes used inside articles keep winning as they did when these
   rules lived in per-page <style> blocks. The shared header/footer are outside the
   scope and look exactly as on every other page. Fonts come from the global theme
   (Figtree body, Bricolage headings). */

.page-wrap,
.breadcrumb {
  --brand: #1a1a2e;
  --accent: #8b83ff;
  --accent-light: #ede9ff;
  --text: #1c1c1e;
  --text-secondary: #6b6b6b;
  --border: #e5e5e7;
  --bg-soft: #f8f8fa;
  --warn: #ff6b35;
  --warn-bg: #fff4f0;
  --success: #34c759;
  --success-bg: #f0fdf4;
  --radius: 10px;
  --radius-lg: 16px;
}

html { scroll-behavior: smooth; }

.page-wrap {
  font-size: 16px;
  line-height: 1.7;
  color: var(--text);
}

/* Breadcrumb */
.breadcrumb {
  max-width: 1100px;
  margin: 0 auto;
  padding: 20px 24px 0;
  font-size: 0.82rem;
  line-height: 1.7;
  color: var(--text-secondary);
}
/* Underlined so the links are not told apart by color alone (Lighthouse link-in-text-block) */
.breadcrumb a { color: var(--accent); text-decoration: underline; text-underline-offset: 3px; }
.breadcrumb a:hover { text-decoration-thickness: 2px; }
.breadcrumb span { margin: 0 6px; }

/* Layout */
.page-wrap {
  max-width: 1100px;
  margin: 0 auto;
  padding: 40px 24px 80px;
  display: grid;
  grid-template-columns: 220px 1fr;
  gap: 48px;
  align-items: start;
}

/* Sidebar table of contents */
.toc {
  position: sticky;
  top: 80px;
  font-size: 0.85rem;
}
.toc-label {
  font-weight: 600;
  font-size: 0.75rem;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  color: var(--text-secondary);
  margin-bottom: 12px;
}
.toc ul { list-style: none; }
.toc li { margin-bottom: 4px; }
.toc a {
  color: var(--text-secondary);
  text-decoration: none;
  padding: 4px 8px;
  border-radius: 6px;
  display: block;
  transition: all 0.15s;
  line-height: 1.4;
}
.toc a:hover { color: var(--accent); background: var(--accent-light); }
.toc .toc-sub { padding-left: 16px; font-size: 0.82rem; }

/* Content */
.content { min-width: 0; }

.page-badge {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-size: 0.78rem;
  font-weight: 600;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  color: var(--accent);
  background: var(--accent-light);
  padding: 4px 12px;
  border-radius: 20px;
  margin-bottom: 16px;
}

:where(.page-wrap) h1 {
  font-size: 2.2rem;
  font-weight: 700;
  line-height: 1.2;
  letter-spacing: -0.03em;
  color: var(--brand);
  margin-bottom: 16px;
}

.page-intro {
  font-size: 1.1rem;
  color: var(--text-secondary);
  line-height: 1.6;
  margin-bottom: 40px;
  max-width: 680px;
}

.meta-row {
  display: flex;
  flex-wrap: wrap;
  gap: 20px;
  font-size: 0.82rem;
  color: var(--text-secondary);
  margin-bottom: 48px;
  padding-bottom: 24px;
  border-bottom: 1px solid var(--border);
}

:where(.page-wrap) h2 {
  font-size: 1.5rem;
  font-weight: 700;
  letter-spacing: -0.025em;
  color: var(--brand);
  margin-top: 56px;
  margin-bottom: 16px;
  padding-top: 8px;
}
:where(.page-wrap) h3 {
  font-size: 1.1rem;
  font-weight: 600;
  color: var(--text);
  margin-top: 28px;
  margin-bottom: 10px;
}

:where(.page-wrap) h4 {
  font-size: 1rem;
  font-weight: 700;
  color: var(--text);
  margin-top: 20px;
  margin-bottom: 8px;
}

:where(.page-wrap) p { margin-bottom: 16px; color: var(--text); }
:where(.page-wrap) code {
  font-family: ui-monospace, SFMono-Regular, "SF Mono", Menlo, Consolas, "Liberation Mono", monospace;
  font-size: 0.85em;
  background: #f3f0ff;
  padding: 1px 5px;
  border-radius: 4px;
}
:where(.page-wrap) a { color: var(--accent); }

/* Lists: Tailwind preflight removes markers, so article lists restore them */
:where(.page-wrap) ol,
ul.plain-list { margin: 0 0 16px 22px; }
:where(.page-wrap) ol li,
ul.plain-list li { margin-bottom: 8px; }
ul.plain-list { list-style: disc; }
:where(.page-wrap .content) ol { list-style: decimal; }

/* Callouts */
.callout {
  border-radius: var(--radius);
  padding: 16px 20px;
  margin: 24px 0;
  display: flex;
  gap: 14px;
  align-items: flex-start;
}
.callout-icon { font-size: 1.2rem; flex-shrink: 0; margin-top: 2px; }
.callout-body { flex: 1; }
.callout-body strong { display: block; margin-bottom: 4px; font-size: 0.9rem; }
.callout-body p { margin: 0; font-size: 0.9rem; }
/* Multi-paragraph callouts and inline bold lead-ins ("<p><strong>Note:</strong> ...") */
.callout-body p strong { display: inline; margin: 0; font-size: inherit; }
.callout-body p + p,
.callout-body p + ul,
.callout-body ul + p { margin-top: 8px; }
.callout-body ul.plain-list { font-size: 0.9rem; margin-top: 8px; }
.callout-body > :last-child { margin-bottom: 0; }
.callout.tip { background: var(--accent-light); border-left: 3px solid var(--accent); }
.callout.warn { background: var(--warn-bg); border-left: 3px solid var(--warn); }
.callout.good { background: var(--success-bg); border-left: 3px solid var(--success); }

/* Data table */
.data-table-wrap {
  overflow-x: auto;
  margin: 24px 0;
  border-radius: var(--radius);
  border: 1px solid var(--border);
}
:where(.page-wrap) table { width: 100%; border-collapse: collapse; font-size: 0.9rem; }
:where(.page-wrap) thead { background: var(--bg-soft); }
:where(.page-wrap) th {
  padding: 12px 16px;
  text-align: left;
  font-size: 0.78rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  color: var(--text-secondary);
  border-bottom: 1px solid var(--border);
}
:where(.page-wrap) td {
  padding: 12px 16px;
  border-bottom: 1px solid var(--border);
  vertical-align: middle;
}
:where(.page-wrap) tr:last-child td { border-bottom: none; }
:where(.page-wrap) tr:hover td { background: var(--bg-soft); }
.mono {
  font-family: ui-monospace, SFMono-Regular, "SF Mono", Menlo, Consolas, "Liberation Mono", monospace;
  font-size: 0.85rem;
}

/* Spec cards (key facts at a glance) */
.spec-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  gap: 16px;
  margin: 24px 0;
}
.spec-card {
  background: var(--bg-soft);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 20px;
}
.spec-card-label {
  font-size: 0.75rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  color: var(--text-secondary);
  margin-bottom: 6px;
}
.spec-card-value {
  font-family: ui-monospace, SFMono-Regular, "SF Mono", Menlo, Consolas, "Liberation Mono", monospace;
  font-size: 1.05rem;
  font-weight: 500;
  color: var(--brand);
  margin-bottom: 4px;
}
.spec-card-note { font-size: 0.8rem; color: var(--text-secondary); }

/* Tags */
.tag {
  display: inline-block;
  font-size: 0.72rem;
  font-weight: 600;
  padding: 2px 8px;
  border-radius: 4px;
  background: var(--accent-light);
  color: var(--accent);
}
.tag.warn { background: var(--warn-bg); color: var(--warn); }
.tag.good { background: var(--success-bg); color: #16a34a; }

/* Placement cards */
.placement-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
  gap: 12px;
  margin: 24px 0;
}
.placement-card {
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 16px;
  text-align: center;
}
.placement-icon { font-size: 2rem; margin-bottom: 8px; }
.placement-name { font-weight: 600; font-size: 0.88rem; margin-bottom: 4px; }
.placement-dim {
  font-family: ui-monospace, SFMono-Regular, "SF Mono", Menlo, Consolas, "Liberation Mono", monospace;
  font-size: 0.78rem;
  color: var(--accent);
  margin-bottom: 4px;
}
.placement-desc { font-size: 0.78rem; color: var(--text-secondary); }

/* Panels (grouped Q&A or feature blocks inside a section) */
.panel {
  background: var(--bg-soft);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 20px 24px;
  margin: 16px 0;
}
:where(.panel) > h3:first-child { margin-top: 0; }
:where(.panel) > :last-child { margin-bottom: 0; }

.panel-price {
  font-family: "Bricolage Grotesque", ui-sans-serif, system-ui, sans-serif;
  font-size: 2rem;
  font-weight: 700;
  color: var(--brand);
}

/* Previous / next links at the end of a docs article */
.doc-pager {
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  gap: 16px;
  margin-top: 56px;
  padding-top: 24px;
  border-top: 1px solid var(--border);
  font-weight: 500;
}
:where(.doc-pager) a { text-decoration: none; }
:where(.doc-pager) a:hover { text-decoration: underline; }

/* Numbered steps */
.steps { list-style: none; margin: 24px 0; counter-reset: step; }
.steps > li {
  position: relative;
  padding-left: 48px;
  margin-bottom: 24px;
  counter-increment: step;
}
.steps > li::before {
  content: counter(step);
  position: absolute;
  left: 0;
  top: 0;
  width: 32px;
  height: 32px;
  border-radius: 50%;
  background: var(--accent-light);
  color: var(--accent);
  font-weight: 700;
  font-size: 0.9rem;
  display: flex;
  align-items: center;
  justify-content: center;
}
:where(.steps > li) > h3:first-child { margin-top: 2px; }

/* Checklist */
.checklist { list-style: none; margin: 16px 0; }
.checklist li {
  padding: 8px 0 8px 32px;
  position: relative;
  border-bottom: 1px solid var(--border);
  font-size: 0.93rem;
}
.checklist li:last-child { border-bottom: none; }
.checklist li::before {
  content: '✓';
  position: absolute;
  left: 0;
  top: 8px;
  color: var(--success);
  font-weight: 700;
}

/* Video walkthroughs on docs articles (.video-facade itself is in tailwind.css) */
.video-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
  gap: 24px;
  margin: 24px 0;
}
.video-grid h3 { margin-top: 12px; margin-bottom: 4px; }
.video-grid p { font-size: 0.9rem; color: var(--text-secondary); margin-bottom: 0; }
.video-block { margin: 24px 0; }

/* Link cards ("where to go next") */
.link-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
  gap: 16px;
  margin: 24px 0;
}
.link-card {
  display: block;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 20px;
  text-decoration: none;
  transition: border-color 0.15s, background 0.15s;
}
.link-card:hover { border-color: var(--accent); background: var(--bg-soft); }
:where(.link-card) h3 { margin: 0 0 6px; color: var(--accent); }
:where(.link-card) p { margin: 0; font-size: 0.9rem; color: var(--text-secondary); }

/* PrntFlow CTA */
.prntflow-cta {
  background: linear-gradient(135deg, var(--brand) 0%, #2d2b8a 100%);
  border-radius: var(--radius-lg);
  padding: 40px;
  margin-top: 56px;
  color: #fff;
  text-align: center;
}
:where(.page-wrap) .prntflow-cta h2 { color: #fff; margin-top: 0; font-size: 1.6rem; }
:where(.page-wrap) .prntflow-cta p { color: rgba(255,255,255,0.8); max-width: 480px; margin: 0 auto 24px; }
.cta-btn {
  display: inline-block;
  background: linear-gradient(var(--accent), var(--accent));
  color: #fff;
  padding: 14px 32px;
  border-radius: 10px;
  font-weight: 600;
  text-decoration: none;
  font-size: 1rem;
  transition: background 0.15s, transform 0.1s;
}
:where(.page-wrap) a.cta-btn { color: #fff; }
.cta-btn:hover { background: linear-gradient(#6f66e6, #6f66e6); transform: translateY(-1px); }

@media (max-width: 768px) {
  .page-wrap { grid-template-columns: 1fr; gap: 24px; }
  .toc { display: none; }
  :where(.page-wrap) h1 { font-size: 1.7rem; }
  .spec-grid { grid-template-columns: 1fr 1fr; }
  .prntflow-cta { padding: 28px 20px; }
}
