/* Loop Templates (/templates). Loads after news.css and reuses its paper, ink and buttons. */
.tpl-hero h1 { font-family: var(--serif); font-weight: 400; font-size: 52px; line-height: 1.06; letter-spacing: -.02em; color: var(--ink); margin-top: 18px; text-wrap: balance; }
.tpl-filters { display: flex; flex-wrap: wrap; justify-content: center; gap: 8px; width: min(1120px, calc(100% - 40px)); margin: 56px auto 0; }
.tpl-filters a { padding: 7px 14px; border-radius: 999px; font-size: 14px; color: var(--muted); box-shadow: inset 0 0 0 1px var(--hair); }
.tpl-filters a[aria-current] { background: var(--brand); color: var(--on-brand); box-shadow: none; }
.tpl-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(280px, 1fr)); gap: 24px; width: min(1120px, calc(100% - 40px)); margin: 40px auto 0; }
.tpl-card { display: flex; flex-direction: column; gap: 10px; padding: 24px; border-radius: 20px; background: var(--surface); box-shadow: inset 0 0 0 1px var(--hair); }
.tpl-card h3 { font-family: var(--serif); font-weight: 400; font-size: 26px; line-height: 1.15; color: var(--ink); }
.tpl-card h3 a:hover { text-decoration: underline; text-underline-offset: 4px; }
.tpl-kind { font-family: var(--mono); font-size: 12px; letter-spacing: .14em; text-transform: uppercase; color: var(--accent); }
.article-head .tpl-kind { margin-top: 26px; }
.tpl-meta { margin-top: auto; padding-top: 6px; font-size: 13px; color: var(--faint); }
.tpl-empty { width: min(680px, calc(100% - 40px)); margin: 48px auto 0; text-align: center; color: var(--muted); }
.tpl-head { width: min(1040px, calc(100% - 40px)); }
.tpl-actions { width: min(1040px, calc(100% - 40px)); margin: 28px auto 0; }
.tpl-actions .file-actions { margin-top: 0; }
.tpl-actions .capture-error { margin-top: 16px; }
.tpl-note { margin-top: 14px; font-size: 14px; color: var(--muted); }
.tpl-copy-src { position: absolute; left: -9999px; width: 1px; height: 1px; opacity: 0; }
.tpl-layout { display: grid; grid-template-columns: minmax(0, 1fr) 260px; gap: 48px; align-items: start; width: min(1040px, calc(100% - 40px)); margin: 56px auto 0; }
.tpl-layout .prose { width: auto; margin: 0; font-size: 19px; }
.tpl-side { position: sticky; top: 24px; padding: 20px 22px; border-radius: 18px; background: var(--paper); box-shadow: inset 0 0 0 1px var(--hair); }
.tpl-facts { margin: 14px 0 16px; padding: 0 0 14px; border-bottom: 1px solid var(--hair); display: grid; gap: 8px; }
.tpl-facts dt { font-family: var(--mono); font-size: 11px; letter-spacing: .12em; text-transform: uppercase; color: var(--faint); }
.tpl-facts dd { margin: 2px 0 0; font-size: 14px; line-height: 1.45; color: var(--ink); overflow-wrap: anywhere; }
.tpl-tree { list-style: none; margin: 14px 0 0; padding: 0; font: 13px/1.8 var(--mono); color: var(--muted); overflow-x: auto; }
.tpl-tree .d { color: var(--ink); }
.tpl-tree .dp1 { padding-left: 14px; } .tpl-tree .dp2 { padding-left: 28px; } .tpl-tree .dp3 { padding-left: 42px; }
.tpl-tree .dp4 { padding-left: 56px; } .tpl-tree .dp5 { padding-left: 70px; } .tpl-tree .dp6 { padding-left: 84px; }
.tpl-files { width: min(1040px, calc(100% - 40px)); margin: 72px auto 0; }
.tpl-files h2 { font-family: var(--serif); font-weight: 400; font-size: 30px; color: var(--ink); }
.tpl-files .file-view { padding-top: 14px; border-top: 1px solid var(--hair); }
@media (max-width: 820px) {
  .tpl-layout { grid-template-columns: 1fr; }
  .tpl-side { position: static; }
  .tpl-hero h1 { font-size: 40px; }
}
