/*
 * The free template pages on the document template (plan 2026-11-19-1304 U5; U11 reuses it): lib/site/parts/template-doc.ts.
 * document.css holds the reading column and the chapter index; this sheet adds what a template page owns: the how-to
 * list, the template set on a card like a sheet of paper, its wide tables scrolling sideways on a phone instead of
 * crushing each column, and the copy and download buttons (lib/site/parts/copy-download.ts). Tokens from site.css.
 */
.doc-body .chapter ol.tdoc-steps { padding-left: 1.3em; list-style: decimal; }
.doc-body .chapter ol.tdoc-steps li + li { margin-top: 10px; }

/* the template itself, a sheet on the page */
.tdoc-sheet { margin: 16px 0 0; padding: clamp(18px, 3.5vw, 40px); background: var(--card); border-radius: 16px; }
.tdoc-md { overflow-wrap: anywhere; }
.tdoc-md > :first-child { margin-top: 0; }
.doc-body .tdoc-md :is(h3, h4, h5, h6) { margin: 1.9rem 0 .7rem; font-size: 1.2rem; line-height: 1.3; }
.doc-body .tdoc-md > h3:first-child { font-size: 1.4rem; }
.tdoc-md ul { padding-left: 1.2em; list-style: disc; }
.tdoc-md table { display: block; width: 100%; overflow-x: auto; border-collapse: collapse; margin: 14px 0 18px; font-size: .94rem; line-height: 1.5; }
.tdoc-md th, .tdoc-md td { min-width: 8rem; padding: 10px 14px 10px 0; text-align: left; vertical-align: top; border-top: 1px solid var(--rule); overflow-wrap: normal; }
.tdoc-md th { border-top: 0; font-family: var(--ui); font-size: .85rem; font-weight: 600; color: var(--muted); }
.tdoc-md td:empty::after { content: "\00a0"; }

/* copy and download */
.copy-dl { margin-top: 14px; }
.copy-dl[hidden] { display: none; }
.copy-dl__buttons { display: flex; flex-wrap: wrap; gap: 12px; }
.copy-dl__error { margin: 12px 0 0; font-family: var(--ui); font-size: .95rem; color: var(--rust); }

/* the old close's line and link, at the end of the questions */
.tdoc-more { max-width: 66ch; margin-top: clamp(24px, 3vw, 36px); }
.tdoc-more p + p { margin-top: 8px; }

@media (max-width: 540px) {
  .copy-dl__buttons { flex-direction: column; align-items: stretch; }
  .tdoc-sheet { margin-inline: -8px; }
}

/* Luna (/templates/competitive-analysis, restyle U11): her wings run to the edges of her square, and the page's long
   headline reaches into the host column, so from 1024px her figure is 250px wide, not 330px. That keeps 32px or more
   between the headline and the figure at 1024, 1280 and 1440, and she reads the same size as the other [crew] hosts.
   Scoped to her slug, so the other template pages are untouched. */
@media (min-width: 1024px) {
  .about-head--host .head-host:has(> .uwee[data-slug="clipping"]) { width: min(calc(50% - var(--gutter) - 200px), 250px); }
}
