/* ============================
   Printable template pages
   Shared by /templates/* — loaded after compare.css, which owns the
   tokens, .wrap, .hero, .final and .btn-primary.
   ============================ */

.breadcrumb {
  font-family: var(--font-mono); font-size: 12px;
  letter-spacing: .04em; text-transform: uppercase;
  opacity: .6; margin-bottom: 18px;
}
.breadcrumb a { color: inherit; }

/* ---- Download cards ---- */
.tpl-section { padding: 0 0 24px; }

.tpl-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
  gap: 32px;
  align-items: stretch;
}

/* Column layout so the meta line and button sit on a common baseline across
   the row, however long each description runs. */
.tpl-card {
  display: flex;
  flex-direction: column;
  border: 1px solid var(--line);
  border-radius: 14px;
  background: var(--bg-elevated);
  padding: 20px 20px 24px;
}
.tpl-card p:not(.tpl-meta) { flex-grow: 1; }
.tpl-card .btn-primary { align-self: flex-start; }
.tpl-card h2 {
  font-family: var(--font-display); font-weight: 400;
  font-size: 26px; line-height: 1.1; letter-spacing: -0.02em;
  margin: 18px 0 10px;
}
.tpl-card p { color: var(--fg-2); margin: 0 0 14px; font-size: 15px; line-height: 1.6; }

/* The preview is the pitch — a template you can see beats one you must imagine. */
.tpl-thumb {
  display: block;
  border: 1px solid var(--line-2);
  border-radius: 8px;
  overflow: hidden;
  background: #fff;
  line-height: 0;
  transition: transform 120ms ease, box-shadow 120ms ease;
}
.tpl-thumb:hover { transform: translate(-1px, -1px); box-shadow: 4px 4px 0 var(--line); }
.tpl-thumb img { width: 100%; height: auto; display: block; }

.tpl-meta {
  font-family: var(--font-mono); font-size: 11px;
  letter-spacing: .12em; text-transform: uppercase;
  color: var(--fg-3) !important; margin: 0 0 18px !important;
}

/* Cards carry several CTAs on one screen, so the button steps down from the
   page-level .btn-primary rather than competing with it. */
.tpl-card .btn-primary {
  padding: 11px 20px; font-size: 12px;
  box-shadow: 3px 3px 0 var(--sumi-900);
}
.tpl-card .btn-primary:hover { box-shadow: 4px 4px 0 var(--sumi-900); }

/* ---- Prose ---- */
.tpl-prose { padding: 56px 0 24px; border-top: 1px solid var(--line); margin-top: 48px; }
.tpl-prose p, .tpl-prose li { color: var(--fg-2); max-width: 64ch; line-height: 1.75; }
.tpl-prose p { margin: 0 0 18px; }
.tpl-prose ol, .tpl-prose ul { max-width: 64ch; margin: 0 0 22px; padding-left: 22px; }
.tpl-prose li { margin-bottom: 12px; }
.tpl-prose strong { color: var(--fg); font-weight: 600; }
.tpl-prose a { color: var(--brand); text-underline-offset: 3px; }
.tpl-prose h2.section-title { margin-top: 44px; }
.tpl-prose h3 {
  font-size: 17px; font-weight: 600; margin: 28px 0 8px;
  color: var(--fg); max-width: 64ch;
}
.tpl-related {
  font-size: 14px; border-top: 1px solid var(--line-2);
  padding-top: 20px; margin-top: 36px !important;
}

/* ---- Hub index ---- */
.tpl-hub-group { padding: 8px 0 40px; }
.tpl-hub-group > h2 {
  font-family: var(--font-display); font-weight: 400;
  font-size: clamp(24px, 3vw, 34px); line-height: 1.1;
  letter-spacing: -0.02em; margin: 0 0 6px;
}
.tpl-hub-group > p {
  color: var(--fg-2); max-width: 60ch; margin: 0 0 26px;
}
.tpl-hub-group > p a { color: var(--brand); text-underline-offset: 3px; }

@media (max-width: 640px) {
  .tpl-grid { gap: 24px; }
  .tpl-prose { padding-top: 40px; margin-top: 36px; }
}
