/*
 * template-embed.css: the template page preview (template-pages.css .tp-pv, behaviour in
 * template-pages.js) placed inside article text on blog and guide pages, at the text width.
 * Owner rule 2026-12-02. Markup: tools/template-embed.py.
 */
.tp-embed, .tp-lb {
  --tp-ink: #0F0F14; --tp-ink-2: #4B5060; --tp-ink-3: #5B5F6B; --tp-line: #E4E5EA; --tp-line-2: #D5D7DE;
  --tp-frame: #F1F2F5; --tp-desk: #EEEFF3; --tp-brand: #4F46E5; --tp-brand-dk: #3730A3;
  --tp-stage: #E5E7EB; --tp-stage-pad: 24px; --tp-card-shadow: 0 2px 6px rgba(0,0,0,.08), 0 12px 32px -12px rgba(0,0,0,.25);
}
@media (max-width: 640px) { .tp-embed { --tp-stage-pad: 12px; } }
.bc .bc-prose .tp-embed { display: block; width: 100%; max-width: 100%; margin: 12px 0 36px; padding: 0; background: var(--tp-frame); border: 1px solid var(--tp-line); border-radius: 18px; box-sizing: border-box; overflow: hidden; font-size: 16px; line-height: 1.5; color: var(--tp-ink); }
.bc .bc-prose .tp-embed .tp-pv { max-width: none; margin: 0; border: 0; border-radius: 0; box-shadow: none; padding: 12px 12px 0; }
.bc .bc-prose .tp-embed img { margin: 0; border: 0; border-radius: 0; float: none; max-width: none; }
.bc .bc-prose .tp-embed .tp-pv__box img { max-width: 100%; }
.bc .bc-prose .tp-embed .tp-pv__thumb { width: 100%; border-radius: 6px; }
.bc .bc-prose .tp-embed ol, .bc .bc-prose .tp-embed ul { margin: 0; padding: 8px; list-style: none; }
.bc .bc-prose .tp-embed li { margin: 0; }
/* one fixed preview height in articles (owner 2026-12-02: "fit to screen and fix the height"):
   a board or app image fits whole inside the box, centred, no scrolling; website/doc pages scroll inside the same box */
.bc .bc-prose .tp-embed { --tp-embed-h: 440px; }
@media (max-width: 819px) { .bc .bc-prose .tp-embed { --tp-embed-h: 380px; } }
@media (max-width: 640px) { .bc .bc-prose .tp-embed { --tp-embed-h: 300px; } }
.bc .bc-prose .tp-embed .tp-pv__body:not(.tp-pv__body--multi) .tp-pv__stage { height: auto; }
.bc .bc-prose .tp-embed .tp-pv__body:not(.tp-pv__body--multi) .tp-pv__box { height: var(--tp-embed-h); max-height: none; flex: none; aspect-ratio: auto; }
.bc .bc-prose .tp-embed [data-mode="single"] .tp-pv__box { overflow: hidden; display: flex; align-items: center; justify-content: center; padding: 16px; box-sizing: border-box; }
.bc .bc-prose .tp-embed [data-mode="single"] .tp-pv__box img { width: auto; height: auto; max-width: 100%; max-height: 100%; object-fit: contain; }
@media (max-width: 640px) { .bc .bc-prose .tp-embed [data-mode="single"] .tp-pv__box { padding: 10px; } }
.bc .bc-prose .tp-embed [data-mode="page"] .tp-pv__box { overflow-y: auto; }
/* multi-slide decks and screens: the rail needs room, keep the fixed stage but fit the text column */
@media (min-width: 820px) { .bc .bc-prose .tp-embed .tp-pv__body--multi .tp-pv__list { flex-basis: 150px; } .bc .bc-prose .tp-embed .tp-pv { --tp-pv-h: clamp(380px, 60vh, 520px); } }
.tp-embed__foot { display: flex; align-items: flex-end; justify-content: space-between; gap: 16px 24px; flex-wrap: wrap; padding: 16px 20px 20px; background: #fff; border-top: 1px solid var(--tp-line); margin-top: 12px; }
.tp-embed__text { flex: 1 1 320px; min-width: 0; }
.bc .bc-prose .tp-embed__meta .tp-pill { display: inline-block; padding: 4px 10px; border-radius: 7px; font-size: 12px; font-weight: 600; line-height: 1.4; }
.bc .bc-prose .tp-embed__title { margin: 8px 0 4px; padding: 0; font-size: 19px; font-weight: 600; line-height: 1.3; scroll-margin-top: 0; }
.bc .bc-prose .tp-embed__title a, .bc .bc-prose .tp-embed__title a:hover { color: var(--tp-ink); text-decoration: none; display: inline-flex; min-height: 40px; align-items: center; padding-block: 8px; margin-block: -8px; }
.bc .bc-prose .tp-embed__title a:hover { color: var(--tp-brand); }
.bc .bc-prose .tp-embed__desc { margin: 0; font-size: 15px; line-height: 1.55; color: var(--tp-ink-2); }
.tp-embed__cta { display: flex; gap: 10px; flex-wrap: wrap; flex: none; }
.bc .bc-prose a.tp-embed__btn, .bc .bc-prose a.tp-embed__btn:hover { display: inline-flex; align-items: center; justify-content: center; min-height: 44px; padding: 0 16px; border-radius: 10px; border: 1px solid var(--tp-line-2); background: #fff; color: var(--tp-ink); font-size: 14px; font-weight: 600; text-decoration: none; white-space: nowrap; }
.bc .bc-prose a.tp-embed__btn--brand { background: var(--tp-brand); border-color: var(--tp-brand); color: #fff; text-decoration: none; }
.bc .bc-prose a.tp-embed__btn--brand:hover { background: var(--tp-brand-dk); border-color: var(--tp-brand-dk); color: #fff; text-decoration: none; }
@media (max-width: 640px) {
  .bc .bc-prose .tp-embed { border-radius: 14px; }
  .bc .bc-prose .tp-embed .tp-pv { padding: 8px 8px 0; }
  .tp-embed__foot { padding: 14px 16px 16px; }
  .tp-embed__cta { width: 100%; }
  .bc .bc-prose a.tp-embed__btn, .bc .bc-prose a.tp-embed__btn:hover { flex: 1 1 0; }
  .bc .bc-prose .tp-embed__title { font-size: 17px; }
}
