/* Template product pages (E53): /business-models/<template>. Loaded after site.css; same tokens (design v2).
   Layout idea: a spec sheet. Section titles sit in a left gutter, the content in a reading column to their right,
   and the live workbook window is the one wide, framed object on a ruled-paper band. */
.tp { --gutter: 260px; padding-bottom: 0; }
.tp .wrap { max-width: 1280px; }
.tp h1, .tp h2 { font-family: var(--head); font-weight: 800; letter-spacing: -0.02em; color: var(--ink); }
.tp h2 { margin: 0; font-size: clamp(26px, 2.8vw, 34px); line-height: 1.15; }
.tp h3 { font-family: var(--head); color: var(--ink); }
.tp-lead { margin: 12px 0 0; max-width: 62ch; color: var(--text-2); }

/* hero */
.tp-hero { padding: 36px 0 52px; border-bottom: 1px solid var(--rule); }
.tp-hero .crumbs ol { margin-bottom: 28px; }
.tp-hero__row { display: grid; grid-template-columns: minmax(0, 1.5fr) minmax(0, 1fr); gap: 64px; align-items: end; }
.tp-hero__copy { display: flex; flex-direction: column; gap: 20px; align-items: flex-start; min-width: 0; }
.tp-hero h1 { margin: 0; font-size: clamp(34px, 4.4vw, 56px); line-height: 1.04; letter-spacing: -0.03em; }
.tp-promise { margin: 0; max-width: 52ch; font-size: 18px; line-height: 1.55; color: var(--text-2); }
.tp-hero__cta { display: flex; flex-wrap: wrap; gap: 12px; }
.tp ul.tp-chips { list-style: none; margin: 0; padding: 0; display: flex; flex-wrap: wrap; gap: 10px; }
.tp ul.tp-chips li { display: inline-flex; align-items: baseline; gap: 8px; padding: 8px 14px; border: 1px solid var(--panel-rule); border-radius: 999px; background: #fff; font-size: 15px; color: var(--text-3); }
.tp-chips strong { color: var(--ink); font-family: var(--head); font-size: 16px; }
.tp-chips b { color: var(--pine-dark); font-size: 17px; font-weight: 700; }
.tp-chips__main { border: 2px solid var(--pine); padding: 7px 13px; }
.tp-facts { margin: 0; padding: 0 0 0 28px; border-left: 3px double var(--ink); }
.tp-facts dl { margin: 0; display: grid; gap: 18px; }
.tp-facts dt { font-size: 14px; color: var(--text-3); }
.tp-facts dd { margin: 2px 0 0; font-size: clamp(26px, 2.8vw, 36px); line-height: 1.15; font-weight: 700; color: var(--pine-dark); }
.tp-facts figcaption { margin-top: 16px; font-size: 13px; line-height: 1.45; color: var(--text-3); }

/* the preview band */
.tp-preview { padding: 56px 0 60px; border-bottom: 1px solid var(--rule); }
.tp-preview h2 { margin-bottom: 10px; }
.tp-preview p { max-width: 68ch; margin: 0 0 24px; color: var(--text-2); }
.tp-preview .xl-note { margin: 14px 0 0; font-size: 14px; color: var(--text-3); }

/* sections */
.tp-sec { padding: 72px 0; border-bottom: 1px solid var(--rule-soft); }
.tp-sec__grid { display: grid; grid-template-columns: minmax(0, var(--gutter)) minmax(0, 1fr); gap: 56px; align-items: start; }
.tp-sec__grid > h2, .tp-sec__head { position: sticky; top: 92px; }
.tp-sec__head p { margin: 12px 0 0; font-size: 15px; line-height: 1.55; color: var(--text-3); }
.tp-sec__body { min-width: 0; }
.tp-prose p, .tp-prose li { max-width: 68ch; color: var(--text-2); }
.tp-prose p { margin: 0 0 16px; }
.tp-prose h3 { margin: 52px 0 10px; font-size: 22px; line-height: 1.25; scroll-margin-top: 92px; }
.tp-prose > h3:first-child { margin-top: 0; }
.tp-prose .tp-note { margin-top: 24px; padding-left: 16px; border-left: 3px solid var(--sheet-rule); }
.tp-prose .tp-note p { margin: 0; font-size: 15px; color: var(--text-3); }
.tp-toc { margin-top: 20px; }
.tp .tp-toc ul { list-style: none; margin: 0; padding: 0; border-top: 1px solid var(--rule); }
.tp .tp-toc li { margin: 0; border-bottom: 1px solid var(--rule); }
.tp-toc a { display: block; padding: 7px 0; font-size: 14px; line-height: 1.35; color: var(--text-2); text-decoration: none; }
.tp-toc a:hover { color: var(--pine); text-decoration: underline; }

/* what every model includes */
.tp ul.tp-features { list-style: none; margin: 32px 0 0; padding: 0; display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 0; border-top: 1px solid var(--rule); border-left: 1px solid var(--rule); }
.tp ul.tp-features li { margin: 0; padding: 26px 24px 28px; border-right: 1px solid var(--rule); border-bottom: 1px solid var(--rule); }
.tp-features svg { display: block; color: var(--pine); margin-bottom: 14px; }
.tp-features h3 { margin: 0 0 6px; font-size: 18px; line-height: 1.25; }
.tp-features p { margin: 0; font-size: 15px; line-height: 1.55; color: var(--text-2); }

/* the sheet list */
.tp-sheets { min-width: 560px; }
.tp-sheets tbody th { white-space: nowrap; font-weight: 600; background: #fff; }
.tp-sheets td { color: var(--text-2); }
.tp-sheets .tp-mark { width: 64px; text-align: center; color: var(--pine); font-weight: 700; }

/* gallery: the dashboard across, the rest side by side; every image keeps its box before it loads */
.tp-gallery { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 24px; margin-top: 28px; }
.tp-gallery figure { margin: 0; min-width: 0; }
.tp-gallery__dashboard { grid-column: 1 / -1; }
.tp img { display: block; width: 100%; height: auto; background: var(--rule-soft); border: 1px solid var(--panel-rule); border-radius: 8px; }
.tp-gallery figcaption { margin-top: 8px; font-size: 14px; color: var(--text-3); }

/* picture beside text, alternating */
.tp-blocks { display: grid; }
.tp-blocks > .wrap { display: flex; flex-direction: column; gap: 72px; }
.tp-feature { display: grid; grid-template-columns: minmax(0, 1.4fr) minmax(0, 1fr); gap: 56px; align-items: center; }
.tp-feature figure { margin: 0; min-width: 0; }
.tp-feature figcaption { margin-top: 8px; font-size: 14px; color: var(--text-3); }
.tp-feature--flip { grid-template-columns: minmax(0, 1fr) minmax(0, 1.4fr); }
.tp-feature--flip figure { order: 2; }
.tp-feature__text h2 { margin-bottom: 16px; }
.tp-feature__text p { margin: 0 0 14px; }

/* support and questions */
.tp-support { display: grid; grid-template-columns: minmax(0, 1.4fr) minmax(0, 1fr); gap: 32px; align-items: stretch; }
.tp-support .support h2 { font-size: 22px; margin-bottom: 12px; }
.tp-support .support li { margin: 6px 0; }
.tp .support ul { padding-left: 20px; }
.tp-questions { padding: 24px 26px; border: 1px solid var(--panel-rule); border-radius: 10px; background: var(--paper); }
.tp-questions h2 { font-size: 22px; margin-bottom: 8px; }
.tp-questions p { margin: 0 0 18px; color: var(--text-2); }

/* FAQ */
.tp-faq details { border-bottom: 1px solid var(--rule); }
.tp-faq details:first-child { border-top: 1px solid var(--rule); }
.tp-faq summary { position: relative; padding: 18px 40px 18px 0; cursor: pointer; list-style: none; font-family: var(--head); font-size: 18px; font-weight: 700; line-height: 1.35; color: var(--ink); }
.tp-faq summary::-webkit-details-marker { display: none; }
.tp-faq summary::after { content: ""; position: absolute; right: 6px; top: 50%; width: 9px; height: 9px; margin-top: -7px; border-right: 2px solid var(--pine); border-bottom: 2px solid var(--pine); transform: rotate(45deg); transition: transform 0.15s; }
.tp-faq details[open] summary::after { transform: rotate(-135deg); margin-top: -2px; }
.tp-faq summary:hover { color: var(--pine-dark); }
.tp-faq summary:focus-visible { outline: 3px solid var(--focus); outline-offset: 2px; border-radius: 4px; }
.tp-faq details p { margin: 0 0 20px; max-width: 68ch; color: var(--text-2); }

/* other templates */
.tp ul.tp-related { list-style: none; margin: 28px 0 0; padding: 0; display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 20px; }
.tp ul.tp-related li { margin: 0; padding: 20px 20px 18px; border: 1px solid var(--panel-rule); border-radius: 10px; background: #fff; display: flex; flex-direction: column; gap: 10px; }
.tp-related h3 { margin: 0; font-size: 18px; line-height: 1.25; }
.tp-related h3 a { color: var(--ink); text-decoration: none; }
.tp-related h3 a::after { content: ""; position: absolute; inset: 0; }
.tp ul.tp-related li { position: relative; }
.tp ul.tp-related li:hover { border-color: var(--pine); }
.tp-related h3 a:focus-visible { outline: none; }
.tp ul.tp-related li:has(a:focus-visible) { outline: 3px solid var(--focus); outline-offset: 2px; }
.tp-related p { margin: 0; font-size: 14px; line-height: 1.5; color: var(--text-3); }
.tp-related dl { margin: auto 0 0; display: grid; gap: 8px; padding-top: 12px; border-top: 1px solid var(--rule-soft); }
.tp-related dt { font-size: 12.5px; color: var(--text-3); }
.tp-related dd { margin: 0; font-size: 18px; font-weight: 700; color: var(--ink); }
.tp-after { margin: 20px 0 0; }
.tp-more { display: flex; flex-wrap: wrap; gap: 24px 64px; margin-top: 40px; padding-top: 28px; border-top: 1px solid var(--rule); }
.tp-more h3 { margin: 0 0 8px; font-size: 16px; }
.tp .tp-more ul { list-style: none; margin: 0; padding: 0; }
.tp .tp-more li { margin: 4px 0; font-size: 15px; }

/* closing band */
.tp-close { padding: 64px 0 72px; border-top: 1px solid var(--rule); }
.tp-close .wrap { display: flex; flex-direction: column; align-items: flex-start; gap: 18px; }
.tp-close h2 { max-width: 30ch; }
.tp-close__row { display: flex; flex-wrap: wrap; align-items: center; gap: 16px 24px; }
.tp-close p { margin: 0; max-width: 56ch; color: var(--text-2); font-size: 17px; }

@media (max-width: 960px) {
  .tp-hero__row { grid-template-columns: minmax(0, 1fr); gap: 32px; align-items: start; }
  .tp-facts { padding: 18px 0 0; border-left: 0; border-top: 3px double var(--ink); }
  .tp-facts dl { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .tp-sec__grid { grid-template-columns: minmax(0, 1fr); gap: 24px; }
  .tp-sec__grid > h2, .tp-sec__head { position: static; }
  .tp-toc { display: none; }
  .tp ul.tp-features { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .tp-feature, .tp-feature--flip { grid-template-columns: minmax(0, 1fr); gap: 24px; }
  .tp-feature--flip figure { order: 0; }
  .tp-support { grid-template-columns: minmax(0, 1fr); }
  .tp ul.tp-related { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}
@media (max-width: 600px) {
  .tp-hero { padding: 24px 0 40px; }
  .tp-hero .crumbs ol { margin-bottom: 20px; }
  .tp-preview { padding: 40px 0 44px; }
  .tp-sec { padding: 48px 0; }
  .tp ul.tp-features { grid-template-columns: minmax(0, 1fr); }
  .tp ul.tp-features li { padding: 22px 18px; }
  .tp-gallery { grid-template-columns: minmax(0, 1fr); gap: 20px; }
  .tp-blocks > .wrap { gap: 48px; }
  .tp ul.tp-related { grid-template-columns: minmax(0, 1fr); }
  .tp-hero__cta .btn, .tp-close .btn { width: 100%; }
  .tp-facts dl { grid-template-columns: minmax(0, 1fr); gap: 14px; }
  .tp-faq summary { font-size: 17px; }
  .tp-sheets tbody th { position: sticky; left: 0; box-shadow: 1px 0 0 var(--rule-soft); }
}

/* screen-reader text inside a scrolling table must stay in the table, or it widens the page */
.tp .table-wrap { position: relative; }
