/* Templates group: /resources and /resources/<slug>.
   Loaded after every shared layer (tokens, components, site, pages, product,
   growth), so it only adds and refines. Every colour is a token. Classes are
   prefixed tp- so they cannot collide with the shared patterns. The printable
   PDF has its own stylesheet (static/pdf.css). */

/* ============================================================ drawn paper */
/* A template page in miniature: the brand rule, a title, then boxes, lines or
   a grid. Decorative; it carries the kind, the card text carries the facts. */
.tp-paper { position: relative; display: flex; flex-direction: column; gap: 0.4rem; width: 100%; aspect-ratio: 210 / 297;
  padding: 0.6rem 0.55rem; background: var(--surface); border: var(--border-w) solid var(--border-strong); border-radius: 0.3rem;
  box-shadow: var(--shadow-sm); overflow: hidden; }
.tp-paper i, .tp-paper b, .tp-paper u { display: block; flex: none; }
.tp-paper__brand { width: 100%; height: 0; padding-top: 0.3rem; border-bottom: 1.5px solid var(--text-strong); position: relative; }
.tp-paper__brand::before { content: ""; position: absolute; left: 0; top: 0; width: 0.3rem; height: 0.3rem; border-radius: 1px; background: var(--text-strong); margin-top: -0.12rem; }
.tp-paper__title { width: 72%; height: 0.32rem; margin-top: 0.15rem; border-radius: 1px; background: var(--text-strong); }
.tp-paper__row { display: flex; align-items: center; gap: 0.25rem; padding-bottom: 0.18rem; border-bottom: 1px solid var(--border-subtle); }
.tp-paper__row b { width: 0.34rem; height: 0.34rem; border: 1.2px solid var(--text-subtle); border-radius: 1px; }
.tp-paper__row i, .tp-paper__field i { width: var(--w); height: 0.16rem; border-radius: 1px; background: var(--border-strong); }
.tp-paper__field { display: flex; flex-direction: column; gap: 0.32rem; }
.tp-paper__field u { width: 100%; height: 0; border-bottom: 1px solid var(--text-subtle); opacity: 0.6; }
.tp-paper__grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); margin-top: 0.1rem; border-top: 1.5px solid var(--text-strong); }
.tp-paper__grid i { height: 0.62rem; border-right: 1px solid var(--border); border-bottom: 1px solid var(--border-strong); }
.tp-paper__grid i:nth-child(3n) { border-right: 0; }
.tp-paper__grid i.h { height: 0.42rem; background: var(--accent-subtle); }

/* ============================================================ cards */
/* Hyphenated words in a title never split at the hyphen ("Podcast-to-" / "shorts"). */
.tp-nb { white-space: nowrap; }
.tp-grid { list-style: none; padding: 0; display: grid; gap: var(--space-4); grid-template-columns: minmax(0, 1fr); }
@media (min-width: 640px) {
  .tp-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  /* An odd last card takes the whole row, so no shelf ends with a gap. */
  .tp-grid > li:last-child:nth-child(odd) { grid-column: 1 / -1; }
}
.tp-grid > li { display: flex; min-width: 0; }
.tp-card { flex: 1; display: grid; grid-template-columns: 5.5rem minmax(0, 1fr); gap: var(--space-5); align-items: start; min-width: 0;
  padding: var(--space-5); background: var(--surface); border: var(--border-w) solid var(--border); border-radius: var(--radius-xl); color: var(--text);
  transition: border-color var(--duration-fast) var(--ease-default), transform var(--duration-base) var(--ease-default), box-shadow var(--duration-base) var(--ease-default); }
.tp-card:hover { border-color: var(--border-strong); transform: translateY(-2px); box-shadow: var(--shadow-md); color: var(--text); }
.tp-card:focus-visible { outline: var(--border-w-thick) solid var(--accent); outline-offset: 3px; }
.tp-card__art { display: flex; padding: 0.55rem; border-radius: var(--radius-md); background: var(--bg-subtle); }
.tp-card:hover .tp-paper { transform: rotate(-1.5deg); }
.tp-paper { transition: transform var(--duration-base) var(--ease-default); }
.tp-card__body { display: flex; flex-direction: column; gap: var(--space-2); min-width: 0; height: 100%; }
.tp-card__count { font-family: var(--font-mono); font-size: var(--text-2xs); font-weight: var(--font-medium); letter-spacing: 0.06em;
  text-transform: uppercase; color: var(--cut-text); }
.tp-card__title { font-family: var(--font-display); font-size: var(--text-lg); font-weight: var(--font-bold); line-height: 1.25; letter-spacing: -0.012em; color: var(--text-strong); }
.tp-card__sum { font-size: var(--text-sm); line-height: 1.55; color: var(--text-muted); }
.tp-card__meta { margin-top: auto; padding-top: var(--space-2); display: flex; align-items: center; gap: var(--space-2);
  font-size: var(--text-sm); font-weight: var(--font-semibold); color: var(--accent-text); }
.tp-card__meta svg { flex: none; transition: transform var(--duration-fast) var(--ease-default); }
.tp-card:hover .tp-card__meta svg { transform: translateX(3px); }
@media (max-width: 479px) {
  .tp-card { grid-template-columns: 4.25rem minmax(0, 1fr); gap: var(--space-4); padding: var(--space-4); }
  .tp-card__art { padding: 0.4rem; }
}
@media (prefers-reduced-motion: reduce) { .tp-card:hover, .tp-card:hover .tp-paper { transform: none; } }

/* ============================================================ index hero */
.tp-hero { padding-bottom: clamp(2rem, 1rem + 3vw, 3.5rem); }
.tp-hero__grid { display: grid; gap: var(--space-10); align-items: center; }
@media (min-width: 1024px) { .tp-hero__grid { grid-template-columns: minmax(0, 1.12fr) minmax(0, 0.88fr); gap: var(--space-12); } }
.tp-hero .phero__inner { max-width: 42rem; }
.tp-hero h1 { font-size: clamp(2.5rem, 1.6rem + 3.2vw, 4.25rem); }

/* The four stages as clips on a timeline. */
.tp-stages ol { list-style: none; padding: 0; display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: var(--space-2); }
@media (min-width: 640px) { .tp-stages ol { grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 4px; } }
.tp-stages li { display: flex; min-width: 0; }
.tp-stages a { flex: 1; position: relative; display: flex; flex-direction: column; gap: 2px; min-height: 4.5rem; padding: var(--space-3) var(--space-4);
  background: var(--surface); border: var(--border-w) solid var(--border); border-radius: var(--radius-md); color: var(--text);
  transition: border-color var(--duration-fast) var(--ease-default), background var(--duration-fast) var(--ease-default); }
.tp-stages a::before { content: ""; position: absolute; left: var(--space-4); right: var(--space-4); top: -1px; height: 3px; border-radius: 0 0 3px 3px; background: var(--accent); opacity: 0.85; }
.tp-stages a:hover { border-color: var(--accent); background: var(--accent-subtle); }
.tp-stages b { font-size: var(--text-base); color: var(--text-strong); line-height: 1.25; }
.tp-stages__n { font-family: var(--font-mono); font-size: var(--text-2xs); letter-spacing: 0.06em; color: var(--cut-text); }
.tp-stages__c { font-family: var(--font-mono); font-size: var(--text-2xs); letter-spacing: 0.02em; color: var(--text-subtle); }
@media (min-width: 640px) {
  .tp-stages li:first-child a { border-radius: var(--radius-lg) var(--radius-sm) var(--radius-sm) var(--radius-lg); }
  .tp-stages li:last-child a { border-radius: var(--radius-sm) var(--radius-lg) var(--radius-lg) var(--radius-sm); }
  .tp-stages li:not(:first-child):not(:last-child) a { border-radius: var(--radius-sm); }
}

/* Three real first pages, fanned like paper on a desk. */
.tp-fan { display: flex; flex-direction: column; align-items: center; gap: var(--space-4); min-width: 0; }
.tp-fan__sheets { display: flex; justify-content: center; align-items: flex-end; padding: var(--space-4) var(--space-2) var(--space-2); }
.tp-fan__sheet { flex: none; width: clamp(7.5rem, 5rem + 9vw, 13rem); height: auto; aspect-ratio: 600 / 849; object-fit: cover; object-position: top;
  background: #FFFFFF; border: var(--border-w) solid var(--border); border-radius: var(--radius-sm); box-shadow: var(--shadow-lg); }
.tp-fan__sheet + .tp-fan__sheet { margin-left: clamp(-4.5rem, -1rem - 5vw, -2.25rem); }
.tp-fan__sheet:nth-child(1) { transform: rotate(-6deg) translateY(0.9rem); }
.tp-fan__sheet:nth-child(2) { position: relative; z-index: 1; width: clamp(8.5rem, 5.5rem + 10.5vw, 15rem); }
.tp-fan__sheet:nth-child(3) { transform: rotate(6deg) translateY(0.9rem); }
.tp-fan figcaption { font-size: var(--text-xs); color: var(--text-subtle); text-align: center; }
@media (max-width: 1023px) { .tp-fan { order: 2; } }

/* ============================================================ shelves */
.tp-shelves { padding-top: clamp(1.5rem, 1rem + 2vw, 3rem); }
.tp-shelf { display: grid; gap: var(--space-6); scroll-margin-top: calc(var(--header-h) + var(--space-6)); }
.tp-shelf + .tp-shelf { margin-top: var(--space-16); }
@media (min-width: 1024px) {
  .tp-shelf { grid-template-columns: 17rem minmax(0, 1fr); gap: var(--space-12); align-items: start; }
  .tp-shelf__head { position: sticky; top: calc(var(--header-h) + var(--space-8)); }
}
.tp-shelf__head { display: flex; flex-direction: column; align-items: flex-start; gap: var(--space-3); }
.tp-shelf__icon { display: grid; place-items: center; width: 2.75rem; height: 2.75rem; border-radius: var(--radius-md); background: var(--accent-subtle); color: var(--accent-text); }
.tp-shelf__name { display: flex; align-items: baseline; flex-wrap: wrap; gap: var(--space-1) var(--space-3); }
.tp-shelf__name h2 { font-size: clamp(1.75rem, 1.4rem + 1.2vw, 2.25rem); letter-spacing: -0.03em; line-height: 1.05; }
.tp-shelf__count { font-family: var(--font-mono); font-size: var(--text-xs); color: var(--text-subtle); }
.tp-shelf__head > p { color: var(--text-muted); line-height: 1.55; max-width: 36rem; }
.tp-shelf__skip { display: flex; gap: var(--space-3); align-items: flex-start; margin-top: var(--space-1); padding: var(--space-3) var(--space-4);
  border-radius: var(--radius-md); background: var(--cut-subtle); font-size: var(--text-sm); line-height: 1.5; color: var(--text); }
.tp-shelf__skip svg { flex: none; margin-top: 0.15rem; color: var(--cut-text); }
.tp-shelf__skip .s-link { font-weight: var(--font-semibold); white-space: nowrap; }
@media (max-width: 1023px) {
  .tp-shelf__head { display: grid; grid-template-columns: 2.75rem minmax(0, 1fr); gap: var(--space-1) var(--space-4); align-items: center; }
  .tp-shelf__icon { grid-row: span 2; }
  .tp-shelf__head > p { grid-column: 1 / -1; margin-top: var(--space-2); }
}

/* The podcast kit: one secondary download. */
.tp-kit { display: grid; gap: var(--space-6); align-items: center; margin-top: var(--space-16); padding: clamp(1.25rem, 1rem + 1.5vw, 2rem);
  background: var(--bg-subtle); border: var(--border-w) solid var(--border); border-radius: var(--radius-2xl); }
@media (min-width: 900px) { .tp-kit { grid-template-columns: 11rem minmax(0, 1fr) auto; gap: var(--space-8); } }
.tp-kit__art { display: flex; justify-content: center; padding-block: var(--space-2); }
.tp-kit__art .tp-paper { width: 3.6rem; flex: none; }
.tp-kit__art .tp-paper + .tp-paper { margin-left: -2.1rem; }
.tp-kit__art .tp-paper:nth-child(1) { transform: rotate(-10deg) translateY(0.4rem); }
.tp-kit__art .tp-paper:nth-child(2) { transform: rotate(-5deg) translateY(0.1rem); }
.tp-kit__art .tp-paper:nth-child(4) { transform: rotate(5deg) translateY(0.1rem); }
.tp-kit__art .tp-paper:nth-child(5) { transform: rotate(10deg) translateY(0.4rem); }
.tp-kit__text { display: flex; flex-direction: column; gap: var(--space-2); min-width: 0; }
.tp-kit__text h2 { font-size: clamp(1.375rem, 1.15rem + 0.9vw, 1.875rem); letter-spacing: -0.025em; line-height: 1.15; }
.tp-kit__list { list-style: none; padding: 0; display: flex; flex-wrap: wrap; gap: var(--space-1) var(--space-4); font-size: var(--text-sm); color: var(--text-muted); }
.tp-kit__list li { display: inline-flex; align-items: center; gap: var(--space-2); }
.tp-kit__list li::before { content: ""; width: 0.375rem; height: 0.375rem; border-radius: 1px; background: var(--accent); }
@media (max-width: 479px) { .tp-kit .s-btn { width: 100%; } .tp-kit__list { flex-direction: column; } }

/* ============================================================ template page */
/* Hero: the template and its first page, as it prints. */
.tp-rhero__grid { display: grid; gap: var(--space-10); align-items: center; }
@media (min-width: 1024px) { .tp-rhero__grid { grid-template-columns: minmax(0, 1.15fr) minmax(0, 0.85fr); gap: var(--space-16); } }
.tp-rhero .phero__inner { max-width: 42rem; }
.tp-rhero h1 { font-size: clamp(2.25rem, 1.5rem + 3vw, 4rem); }
.tp-rhero .crumbs { margin-bottom: calc(-1 * var(--space-2)); }
.tp-facts { list-style: none; padding: 0; display: grid; grid-template-columns: repeat(auto-fit, minmax(min(100%, 11rem), 1fr)); gap: var(--space-3);
  padding-block: var(--space-4); border-block: var(--border-w) solid var(--border); }
.tp-facts li { display: flex; gap: var(--space-3); align-items: flex-start; min-width: 0; font-size: var(--text-sm); line-height: 1.4; color: var(--text); }
.tp-facts svg { flex: none; margin-top: 0.1rem; color: var(--accent-text); }
.tp-facts small { display: block; font-family: var(--font-mono); font-size: var(--text-2xs); letter-spacing: 0.06em; text-transform: uppercase; color: var(--text-subtle); }
.tp-rhero .s-fine { margin-top: calc(-1 * var(--space-2)); }
.tp-sheets { display: flex; flex-direction: column; align-items: center; gap: var(--space-4); min-width: 0; }
.tp-sheets__stack { position: relative; width: min(100%, 22rem); margin-inline: auto; }
.tp-sheets__stack::before, .tp-sheets__stack::after { content: ""; position: absolute; inset: 0; background: var(--surface); border: var(--border-w) solid var(--border);
  border-radius: var(--radius-sm); box-shadow: var(--shadow-sm); }
.tp-sheets__stack::before { transform: rotate(4deg) translate(0.6rem, 0.3rem); }
.tp-sheets__stack::after { transform: rotate(2deg) translate(0.3rem, 0.15rem); }
.tp-sheets__stack--1::before, .tp-sheets__stack--1::after { display: none; }
.tp-sheets__stack--2::before { display: none; }
.tp-sheets__stack img { position: relative; z-index: 1; display: block; width: 100%; height: auto; aspect-ratio: 600 / 849; object-fit: cover; object-position: top;
  background: #FFFFFF; border: var(--border-w) solid var(--border); border-radius: var(--radius-sm); box-shadow: var(--shadow-lg); }
.tp-sheets figcaption { font-family: var(--font-mono); font-size: var(--text-2xs); letter-spacing: 0.04em; color: var(--text-subtle); text-align: center; }
@media (max-width: 1023px) { .tp-sheets__stack { width: min(70%, 17rem); } }
@media (min-width: 720px) and (max-width: 1023px) {
  .tp-rhero__grid { grid-template-columns: minmax(0, 1.4fr) minmax(0, 0.6fr); gap: var(--space-8); align-items: start; }
  .tp-rhero .tp-sheets { padding-top: var(--space-12); }
  .tp-rhero .tp-sheets__stack { width: 100%; }
}

/* What's inside: a sticky side panel with progress, and the checklist. */
.tp-doc { display: grid; gap: var(--space-6); align-items: start; }
@media (min-width: 1024px) {
  .tp-doc { grid-template-columns: 17rem minmax(0, 1fr); gap: var(--space-12); }
  .tp-side { position: sticky; top: calc(var(--header-h) + var(--space-6)); }
}
.tp-side { display: flex; flex-direction: column; gap: var(--space-4); padding: var(--space-5); background: var(--surface);
  border: var(--border-w) solid var(--border); border-radius: var(--radius-xl); }
.tp-progress { display: flex; flex-direction: column; gap: var(--space-2); }
.tp-progress__n { font-size: var(--text-sm); color: var(--text-muted); }
.tp-progress__n b { font-family: var(--font-display); font-size: var(--text-3xl); font-weight: var(--font-extrabold); letter-spacing: -0.03em; line-height: 1; color: var(--text-strong); margin-right: 0.15em; }
.tp-progress__bar { display: block; height: 0.5rem; border-radius: var(--radius-full); background: var(--border); overflow: hidden; }
.tp-progress__bar i { display: block; height: 100%; width: 100%; border-radius: inherit; background: var(--accent); transform-origin: 0 50%; transform: scaleX(var(--p, 0));
  transition: transform var(--duration-base) var(--ease-default); }
.tp-toc { list-style: none; padding: var(--space-3) 0 0; border-top: var(--border-w) solid var(--border); display: flex; flex-direction: column; }
.tp-toc a { display: grid; grid-template-columns: 1.75rem minmax(0, 1fr) auto; gap: var(--space-2); align-items: center; min-height: 2.75rem;
  padding: var(--space-1) var(--space-2); margin-inline: calc(-1 * var(--space-2)); border-radius: var(--radius-sm); font-size: var(--text-sm); line-height: 1.3; color: var(--text); }
.tp-toc a:hover { background: var(--surface-hover); color: var(--text-strong); }
.tp-toc__n { font-family: var(--font-mono); font-size: var(--text-2xs); color: var(--cut-text); }
.tp-toc__c { font-family: var(--font-mono); font-size: var(--text-2xs); color: var(--text-subtle); white-space: nowrap; }
.tp-toc__c.is-done { color: var(--success); }
.tp-side__act { display: flex; flex-wrap: wrap; gap: var(--space-2); padding-top: var(--space-4); border-top: var(--border-w) solid var(--border); }
.tp-side__act .s-btn { flex: 1 1 auto; height: 2.75rem; }
@media (max-width: 1023px) {
  .tp-toc { display: none; }
  .tp-side { position: sticky; top: calc(var(--header-h) + var(--space-2)); z-index: 2; flex-direction: row; flex-wrap: wrap; align-items: center;
    gap: var(--space-3) var(--space-4); padding: var(--space-3) var(--space-4); box-shadow: var(--shadow-md); }
  .tp-progress { flex: 1 1 10rem; }
  .tp-progress__n b { font-size: var(--text-xl); }
  .tp-side__act { padding-top: 0; border-top: 0; flex: none; }
  .tp-side__act .s-btn { flex: none; }
}
@media (max-width: 479px) { .tp-side__act [data-tp-print] { display: none; } }

.tp-list { display: flex; flex-direction: column; gap: var(--space-4); min-width: 0; }
.tp-list .res-check { padding: var(--space-5) var(--space-6); scroll-margin-top: calc(var(--header-h) + var(--space-6)); }
@media (max-width: 1023px) { .tp-list .res-check { scroll-margin-top: calc(var(--header-h) + 6rem); } }
@media (max-width: 479px) { .tp-list .res-check { padding: var(--space-4); } }
.tp-list .res-check h3 { display: flex; align-items: baseline; gap: var(--space-3); margin-bottom: var(--space-1); font-size: var(--text-xl); letter-spacing: -0.015em; }
.tp-sec__n { flex: none; font-family: var(--font-mono); font-size: var(--text-xs); font-weight: var(--font-medium); color: var(--cut-text); }
.tp-sec__c { margin-left: auto; flex: none; font-family: var(--font-mono); font-size: var(--text-2xs); font-weight: var(--font-medium); color: var(--text-subtle); }
.tp-sec__c.is-done { color: var(--success); }

/* Fill-in fields, drawn as the lines you write on. */
.tp-fields { padding: var(--space-5) var(--space-6); background: var(--surface); border: var(--border-w) solid var(--border); border-radius: var(--radius-xl); }
@media (max-width: 479px) { .tp-fields { padding: var(--space-4); } }
.tp-fields h3 { display: flex; align-items: baseline; gap: var(--space-3); font-size: var(--text-xl); letter-spacing: -0.015em; }
.tp-fields > p { margin-top: var(--space-1); font-size: var(--text-sm); color: var(--text-muted); }
.tp-form { list-style: none; padding: 0; margin-top: var(--space-3); display: grid; gap: 0 var(--space-8); grid-template-columns: minmax(0, 1fr); counter-reset: f; }
@media (min-width: 640px) { .tp-form { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
.tp-form li { counter-increment: f; display: grid; grid-template-columns: 1.75rem minmax(0, 1fr); align-items: end; gap: var(--space-2); min-height: 3.25rem;
  padding: var(--space-3) 0 var(--space-2); border-bottom: 1.5px solid var(--border-strong); font-size: var(--text-sm); line-height: 1.4; color: var(--text); }
.tp-form li::before { content: counter(f, decimal-leading-zero); font-family: var(--font-mono); font-size: var(--text-2xs); color: var(--text-subtle); padding-bottom: 0.1rem; }
.tp-form--big { margin-top: 0; }
.tp-form--big li { min-height: 4rem; font-size: var(--text-base); }

/* A sheet: the real columns, the example rows, then blank rows. */
.tp-sheetwrap { border: var(--border-w) solid var(--border); border-radius: var(--radius-xl); background: var(--surface); }
.tp-sheet { min-width: 46rem; font-size: var(--text-sm); }
.tp-sheet th { padding: var(--space-3) var(--space-4); border-bottom: 1.5px solid var(--text-strong); text-transform: none; letter-spacing: 0;
  font-family: var(--font-sans); font-size: var(--text-xs); font-weight: var(--font-semibold); color: var(--text-strong); vertical-align: bottom; white-space: normal; min-width: 7.5rem; }
.tp-sheet td { padding: var(--space-3) var(--space-4); vertical-align: top; color: var(--text-muted); border-right: var(--border-w) solid var(--border-subtle); }
.tp-sheet td:last-child, .tp-sheet th:last-child { border-right: 0; }
.tp-sheet tbody tr:hover { background: transparent; }
.tp-sheet .is-blank td { height: 2.75rem; }
.tp-sheet__ex { display: inline-block; margin-right: var(--space-2); padding: 0.05rem 0.4rem; border-radius: var(--radius-xs); background: var(--cut-subtle);
  font-family: var(--font-mono); font-size: var(--text-2xs); letter-spacing: 0.04em; text-transform: uppercase; color: var(--cut-text); vertical-align: 0.05em; }
.tp-steps { margin-top: var(--space-10); }
.tp-steps h3 { font-size: var(--text-xl); letter-spacing: -0.015em; margin-bottom: var(--space-5); }
.tp-steps .numlist { display: grid; gap: var(--space-5) var(--space-8); grid-template-columns: minmax(0, 1fr); }
/* Three steps: one row from tablet up, so the third never sits alone. */
@media (min-width: 720px) { .tp-steps .numlist { grid-template-columns: repeat(3, minmax(0, 1fr)); gap: var(--space-5) var(--space-6); } }
.tp-steps .numlist span { display: block; margin-top: var(--space-1); font-size: var(--text-sm); line-height: 1.55; }

/* More templates: three cards, one row. */
.tp-more .tp-grid { grid-template-columns: minmax(0, 1fr); }
@media (min-width: 900px) { .tp-more .tp-grid { grid-template-columns: repeat(3, minmax(0, 1fr)); } .tp-more .tp-grid > li:last-child:nth-child(odd) { grid-column: auto; } }
@media (min-width: 900px) and (max-width: 1199px) { .tp-more .tp-card { grid-template-columns: minmax(0, 1fr); } .tp-more .tp-card__art { width: 5.5rem; } }
.tp-more .sx__head .s-link { display: inline-flex; align-items: center; min-height: 2.75rem; }
.tp-more .tp-card__sum { display: -webkit-box; -webkit-line-clamp: 3; -webkit-box-orient: vertical; overflow: hidden; }

/* The closing band. growth.css gives every primary button on a growth page
   white text; inside the always-dark .final band the button is light blue, so
   it takes the band's own dark label colour (4.5:1 and up). */
.growth-page .final .s-btn--primary { color: var(--btn-fg); }

/* The bridge to Studio, specific to this template. */
.tp-final p { color: var(--ink-300); line-height: 1.6; max-width: 32rem; }
.tp-final .s-link { color: var(--brand-300); }
.tp-final__tool .s-link { display: inline-flex; align-items: center; min-height: 2.75rem; }

/* ============================================================ print */
@media print {
  /* Paper is always light: the dark theme's pale text would print grey on white. */
  :root[data-theme] { color-scheme: light; --bg: #FFFFFF; --bg-subtle: #FFFFFF; --surface: #FFFFFF; --surface-hover: #FFFFFF;
    --text: var(--ink-875); --text-strong: var(--ink-950); --text-muted: #3B4750; --text-subtle: var(--ink-500);
    --border: var(--paper-200); --border-strong: var(--paper-300); --border-subtle: #ECE9E2;
    --accent: var(--brand-500); --accent-text: var(--brand-550); --accent-subtle: var(--brand-100); --text-on-accent: var(--white);
    --cut-text: var(--tape-600); --cut-subtle: var(--tape-100); --success: var(--success-600); }
  /* Keep ticked boxes visible on paper. */
  .tp-list .res-check input[type=checkbox] { -webkit-print-color-adjust: exact; print-color-adjust: exact; }
  :root[data-theme] .tp-list .res-check input[type=checkbox]:checked { background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='white' stroke-width='3.2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M5 12.5l4.5 4.5L19 7.5'/%3E%3C/svg%3E"); }
  .tp-side, .tp-sheets, .tp-more, .tp-rhero .s-btn-row, .tp-rhero .s-fine, .crumbs, .tp-hero .tp-fan { display: none !important; }
  .tp-doc { display: block; }
  .tp-inside .sx__head { display: none !important; }
  .tp-rhero, .tp-inside { padding-block: 0 0.5rem !important; }
  .sx--alt { background: none; border: 0; }
  .tp-list .res-check, .tp-fields { break-inside: auto; padding: 0; border: 0; }
  .tp-list .res-check li { break-inside: avoid; }
}
