/* ==========================================================================
   Scriptease — Blog / editorial layer (rides on styles-v3.css variables)
   ========================================================================== */

.blog-post h1 { font-size: clamp(30px, 4.4vw, 46px); line-height: 1.1; margin: 6px 0 0; }
.post-meta { font-family: var(--mono); font-size: 13px; letter-spacing: 0.02em; margin: 14px 0 22px; }
.post-lede { font-size: clamp(18px, 2.4vw, 21px); line-height: 1.55; color: var(--ink-soft); margin: 0 0 30px; }

/* Long-form article body ---------------------------------------------------- */
.prose { color: var(--ink-soft); font-size: 17px; line-height: 1.72; }
.prose > * + * { margin-top: 1.05em; }
.prose h2 { font-size: clamp(22px, 3vw, 28px); margin-top: 2em; padding-top: 0.4em; }
.prose h3 { font-size: clamp(18px, 2.4vw, 21px); margin-top: 1.6em; color: var(--text); }
.prose p { margin: 0; }
.prose a { color: var(--accent); text-decoration: underline; text-underline-offset: 3px; }
.prose a:hover { color: var(--accent-press); }
.prose strong { color: var(--text); font-weight: 600; }
.prose ul, .prose ol { padding-left: 1.3em; }
.prose li { margin: 0.4em 0; }
.prose li::marker { color: var(--muted); }
.prose blockquote {
  margin: 1.4em 0;
  padding: 6px 0 6px 20px;
  border-left: 3px solid var(--accent);
  color: var(--text);
  font-style: italic;
}
.prose code {
  font-family: var(--mono);
  font-size: 0.9em;
  background: var(--panel);
  border: 1px solid var(--panel-line);
  border-radius: 6px;
  padding: 1px 6px;
}
.prose pre {
  background: var(--panel-2);
  border: 1px solid var(--panel-line);
  border-radius: var(--radius);
  padding: 16px 18px;
  overflow-x: auto;
  line-height: 1.5;
}
.prose pre code { background: none; border: 0; padding: 0; }
.prose hr { border: 0; border-top: 1px solid var(--line); margin: 2.2em 0; }
.prose table { width: 100%; border-collapse: collapse; margin: 1.2em 0; font-size: 15px; }
.prose th, .prose td { text-align: left; padding: 9px 10px; border-bottom: 1px solid var(--panel-line); }
.prose th { font-family: var(--mono); font-weight: 500; color: var(--muted); font-size: 13px; letter-spacing: 0.03em; }

/* Soft CTA at the foot of every article ------------------------------------ */
.post-cta {
  margin-top: 3em;
  padding: 26px;
  background: var(--panel);
  border: 1px solid var(--panel-line);
  border-radius: var(--radius-lg);
}
.post-cta h3 { margin: 6px 0 8px; }
.post-back { margin-top: 2em; font-family: var(--mono); font-size: 14px; }
.post-back a { color: var(--muted); text-decoration: none; }
.post-back a:hover { color: var(--text); }

/* Blog index list ----------------------------------------------------------- */
.post-list { list-style: none; padding: 0; margin: 34px 0 0; display: grid; gap: 16px; }
.post-card {
  border: 1px solid var(--panel-line);
  border-radius: var(--radius-lg);
  background: var(--panel-2);
  transition: border-color 0.15s ease, transform 0.15s ease;
}
.post-card:hover { border-color: var(--line-strong); transform: translateY(-2px); }
.post-card a { display: block; padding: 22px 24px; text-decoration: none; color: inherit; }
.post-card h2 { font-size: clamp(20px, 2.6vw, 24px); margin: 8px 0 8px; color: var(--text); }
.post-card p { margin: 0 0 12px; }
.post-card-meta { font-family: var(--mono); font-size: 12.5px; color: var(--faint); letter-spacing: 0.02em; }

/* ==========================================================================
   Free on-set templates — hub + individual pages
   ========================================================================== */

.tpl-crumbs { font-family: var(--mono); font-size: 12.5px; color: var(--muted); margin: 0 0 18px; }
.tpl-crumbs a { color: var(--muted); text-decoration: none; }
.tpl-crumbs a:hover { color: var(--text); }
.tpl-crumbs span { margin: 0 4px; }

.tpl-page h1 { font-size: clamp(28px, 4vw, 42px); line-height: 1.1; margin: 6px 0 0; }
.tpl-lede { font-size: clamp(17px, 2.2vw, 20px); line-height: 1.55; color: var(--ink-soft); margin: 14px 0 30px; }

/* Preview + download row ----------------------------------------------------- */
.tpl-grid { display: grid; grid-template-columns: 1.35fr 1fr; gap: 28px; align-items: start; margin-bottom: 34px; }
.tpl-preview { margin: 0; }
.tpl-preview img {
  width: 100%; height: auto; display: block;
  background: #fff;
  border: 1px solid var(--panel-line);
  border-radius: var(--radius);
}
.tpl-preview figcaption { font-family: var(--mono); font-size: 12px; color: var(--faint); margin-top: 10px; }

.tpl-actions {
  position: sticky; top: 20px;
  background: var(--panel); border: 1px solid var(--panel-line);
  border-radius: var(--radius-lg); padding: 22px;
}
.tpl-meta { font-family: var(--mono); font-size: 12.5px; color: var(--muted); line-height: 1.7; margin: 14px 0 0; }

.tpl-terms {
  font-size: 14px; color: var(--muted);
  border-left: 3px solid var(--panel-line); padding-left: 16px; margin-top: 2em;
}

/* Sibling links -------------------------------------------------------------- */
.tpl-siblings { margin-top: 2.6em; }
.tpl-siblings h2 { font-size: clamp(18px, 2.2vw, 22px); }
.tpl-sib-list { list-style: none; padding: 0; margin: 14px 0 0; display: flex; flex-wrap: wrap; gap: 10px; }
.tpl-sib-list a {
  display: inline-block; padding: 9px 14px; font-size: 14px; text-decoration: none;
  color: var(--ink-soft); background: var(--panel-2);
  border: 1px solid var(--panel-line); border-radius: 999px;
}
.tpl-sib-list a:hover { border-color: var(--line-strong); color: var(--text); }

/* Hub ------------------------------------------------------------------------ */
.tpl-dept { margin-top: 2.8em; }
.tpl-dept-h {
  font-family: var(--mono); font-size: 13px; letter-spacing: 0.08em; text-transform: uppercase;
  color: var(--muted); font-weight: 500;
  padding-bottom: 10px; border-bottom: 1px solid var(--line); margin-bottom: 18px;
}
.tpl-cards { display: grid; grid-template-columns: repeat(auto-fill, minmax(250px, 1fr)); gap: 14px; }
.tpl-card {
  display: block; padding: 18px 20px; text-decoration: none; color: inherit;
  background: var(--panel-2); border: 1px solid var(--panel-line); border-radius: var(--radius-lg);
  transition: border-color 0.15s ease, transform 0.15s ease;
}
.tpl-card:hover { border-color: var(--line-strong); transform: translateY(-2px); }
.tpl-card h3 { font-size: 17px; margin: 0 0 8px; color: var(--text); }
.tpl-card p { font-size: 13.5px; line-height: 1.5; margin: 0 0 12px; }
.tpl-card-cta { font-family: var(--mono); font-size: 12px; color: var(--accent); }

.tpl-featured { margin-top: 2.4em; }
.tpl-cards--feature { grid-template-columns: repeat(auto-fit, minmax(340px, 1fr)); }
.tpl-card--feature {
  padding: 18px; display: grid; grid-template-columns: 116px 1fr; gap: 18px; align-items: start;
}
/* Show the whole sheet — these are forms, so a cropped thumbnail just reads as
   a white rectangle. Contain keeps the layout of the page recognisable. */
.tpl-card--feature img {
  width: 116px; height: auto; max-height: 150px; object-fit: contain; object-position: top center;
  display: block; background: #fff; border: 1px solid var(--panel-line); border-radius: 6px;
}
.tpl-card--feature .tpl-card-body { padding: 0; }
.tpl-card--feature h3 { margin-top: 0; }

@media (max-width: 520px) {
  .tpl-card--feature { grid-template-columns: 84px 1fr; gap: 14px; }
  .tpl-card--feature img { width: 84px; }
}

@media (max-width: 760px) {
  .tpl-grid { grid-template-columns: 1fr; }
  .tpl-actions { position: static; }
}
