/* Template cards with the real pictures (src/templates.ts): the Trending row, /templates, /trending, related templates,
   and the template page hero. Loaded after site.css; only adds and overrides card rules. */
.tc{position:relative;list-style:none;container-type:inline-size}
.tc .tcard{height:100%;padding-bottom:14px;gap:6px}
.tc .tcard:focus-visible{outline:3px solid var(--accent);outline-offset:2px}
.tc .tcard>b{font-size:15.5px;line-height:1.28;letter-spacing:-.01em;color:var(--ink);display:-webkit-box;-webkit-line-clamp:2;-webkit-box-orient:vertical;overflow:hidden}
.tc-trend.row>span{color:var(--accent-ink);font-weight:600}
.tc .tcard>.tc-facts{padding:0 14px 12px;font-size:13px;color:var(--ink2)}
.tc .tcard>.tc-src{padding:0 14px;font-size:12px;color:var(--mu);margin-top:auto;white-space:nowrap;overflow:hidden;text-overflow:ellipsis}
.tc .tcard>.tc-trend{display:flex;gap:7px;align-items:center;padding:0 14px;font-size:12.5px;color:var(--ink2);line-height:1.3;min-width:0}
.tc-trend>span{min-width:0;white-space:nowrap;overflow:hidden;text-overflow:ellipsis}
.tc-trend b{flex:none;padding:2px 7px;border-radius:999px;background:#FFF1E8;color:var(--accent-ink);font:700 11px/1.4 Geist,Inter,sans-serif !important;letter-spacing:.02em;text-transform:uppercase}

/* the preview: S, A and B rows with photo and logo tiles */
.tprev{display:flex;flex-direction:column;justify-content:center;gap:4px;padding:12px;background:#1C1917;margin-bottom:10px;aspect-ratio:10/7}
.tprev.big{aspect-ratio:auto}
.tc .tpic{aspect-ratio:10/7;margin-bottom:10px;border-bottom:1px solid var(--bd)}
.tc .tpic img{object-position:top}
.tprev .tr{display:flex;gap:4px;min-height:0}
.tprev.names .tr{flex:1}
.tprev .tr>i{flex:none;width:26px;display:flex;align-items:center;justify-content:center;border-radius:5px;font:800 13px/1 Inter,sans-serif;font-style:normal;color:#1C1917}
.tprev.unranked .tr>i{display:none}
.tprev .ts{flex:1;display:grid;grid-template-columns:repeat(var(--n,4),minmax(0,1fr));gap:4px;min-width:0}
.tt{position:relative;display:block;aspect-ratio:1/1;border-radius:6px;overflow:hidden;background:#fff}
.tt img{display:block;width:100%;height:100%}
.tt.ph img{object-fit:cover;object-position:50% 20%}
.tt.lg{background:#fff}
.tt.lg img{object-fit:contain;padding:12%}
.tt.dt{background:var(--dt);color:#fff;display:flex;flex-direction:column;justify-content:flex-end;padding:5px}
.tt.dt svg{position:absolute;top:5px;left:5px;width:11px;height:11px;fill:none;stroke:rgba(255,255,255,.7);stroke-width:2;stroke-linecap:round;stroke-linejoin:round}
.tt.dt em{font:700 9px/1.12 Inter,sans-serif;font-style:normal;display:-webkit-box;-webkit-line-clamp:3;-webkit-box-orient:vertical;overflow:hidden;hyphens:auto;-webkit-hyphens:auto;overflow-wrap:normal}
.tt.dt.long em{font-size:7.5px;letter-spacing:-.01em}
.tt.dt small{font:600 9px/1 Inter,sans-serif;opacity:.75;margin-top:3px}
.tt.dt.mono{justify-content:center;align-items:center;padding:3px}
.tt.dt.mono svg{width:9px;height:9px;top:4px;left:4px;stroke:rgba(255,255,255,.55)}
.tcard .tt.dt.mono b,.tt.dt.mono b{padding:0;font:800 clamp(10px,28cqw,15px)/1 Inter,sans-serif;letter-spacing:-.02em;color:#fff;max-width:100%;overflow:hidden;white-space:nowrap;text-overflow:clip}
.tt{container-type:inline-size}

/* name chips, for templates with few pictures */
.tprev.names .ts{grid-template-columns:repeat(2,minmax(0,1fr))}
.tn{display:flex;align-items:center;gap:6px;min-width:0;padding:4px 8px;border-radius:6px;background:#fff}
.tn img{flex:none;width:20px;height:20px;border-radius:4px;object-fit:cover}.tn img.lg{object-fit:contain}
.tn em{font:600 11px/1.15 Inter,sans-serif;font-style:normal;color:#1C1917;display:-webkit-box;-webkit-line-clamp:2;-webkit-box-orient:vertical;overflow:hidden;hyphens:auto;-webkit-hyphens:auto}

/* hover: a lift and a quick Make yours */
.tc-go{position:absolute;right:10px;bottom:10px;z-index:2;display:inline-flex;align-items:center;height:30px;padding:0 12px;border-radius:8px;background:var(--ink);color:#fff;font:600 13px/1 Geist,Inter,sans-serif;text-decoration:none;transition:background .2s,box-shadow .2s var(--ease),transform .2s var(--ease)}
.tc:hover .tc-go,.tc:focus-within .tc-go{background:var(--accent);box-shadow:0 4px 14px rgba(232,89,12,.35)}
.tc .tcard>.tc-src{padding-right:116px}
.tc:focus-within .tcard{transform:translateY(-3px);box-shadow:0 14px 34px rgba(28,25,23,.12)}
.tc .tcard:hover .tt,.tc:hover .tt{transition:transform .25s var(--ease)}.tc:hover .tr:first-child .tt{transform:translateY(-2px)}

.tc-go:hover{background:var(--accent-ink)}
.tc:hover .tcard{transform:translateY(-3px);box-shadow:0 14px 34px rgba(28,25,23,.12)}


/* rows of a few cards fill the width */
.tgrid.fill{grid-template-columns:repeat(auto-fit,minmax(220px,1fr))}
.tgrid.fill>li:only-child{max-width:340px}

/* the Trending row: a horizontal scroll with snap on phones */
@media (max-width:640px){
  .trend-scroll{display:flex !important;overflow-x:auto;scroll-snap-type:x mandatory;scroll-padding:0 16px;gap:12px !important;margin-left:-16px !important;margin-right:-16px !important;padding:0 16px 6px !important;scrollbar-width:none}
  .trend-scroll::-webkit-scrollbar{display:none}
  .trend-scroll>li{flex:0 0 76%;scroll-snap-align:start}
}
@media (max-width:480px){.tgrid:not(.trend-scroll) .tprev{padding:8px;gap:3px}.tgrid:not(.trend-scroll) .tprev .tr>i{width:18px;font-size:11px}.tgrid:not(.trend-scroll) .tprev .ts{gap:3px}}

/* template page hero */
.t-hero.has-prev{max-width:none;display:grid;grid-template-columns:minmax(0,1.15fr) minmax(0,1fr);gap:40px;align-items:start}
.t-hero .th-copy{max-width:640px;min-width:0}
.t-hero.has-prev{align-items:start}
.t-hero .th-prev{margin-top:8px}
.t-hero .lede{font-size:16.5px;line-height:1.6}
.t-hero.has-prev h1{font-size:clamp(34px,3.7vw,52px);letter-spacing:-.035em}
.t-hero .t-cta{margin:4px 0 0}
.t-hero .lede{margin-top:18px;max-width:62ch;color:var(--ink2)}
.th-why{margin:0 0 12px;font-size:14px;color:var(--ink2);display:flex;flex-wrap:wrap;gap:8px;align-items:baseline}
.th-why b{padding:3px 9px;border-radius:999px;background:#FFF1E8;color:var(--accent-ink);font:700 11.5px/1.4 Geist,Inter,sans-serif;letter-spacing:.02em;text-transform:uppercase}
.th-why span{color:var(--mu)}
.th-facts{margin:14px 0 0;font-size:14px;color:var(--mu)}
.t-hero .th-prev{margin:0;min-width:0;width:100%;max-width:540px;justify-self:end;border-radius:18px;overflow:hidden;box-shadow:0 18px 48px rgba(28,25,23,.16)}
.th-prev .tprev{margin:0;padding:16px;gap:6px}
.th-prev .tprev .tr>i{width:38px;font-size:18px;border-radius:7px}
.th-prev .ts{gap:6px}
.th-prev .tt{border-radius:8px}
.th-prev .tt.dt{padding:7px}
.th-prev .tt.dt em{font-size:11px}.th-prev .tt.dt.long em{font-size:9.5px}
.th-prev figcaption{padding:10px 16px;background:#292524;color:#D6D3CE;font-size:12.5px}
.th-prev figcaption a{color:#FDBA74}
@media (max-width:900px){.t-hero.has-prev{display:flex;flex-direction:column;align-items:stretch;gap:0}.t-hero.has-prev .th-copy{display:contents}.t-hero .th-prev{order:5;margin-top:22px;justify-self:start}.t-hero.has-prev .lede{order:6}.t-hero.has-prev .th-why{margin-bottom:8px}}

/* what is in this template: every item with its picture or designed tile */
.t-art{list-style:none;margin:20px 0 0;padding:0;display:grid;grid-template-columns:repeat(auto-fill,minmax(112px,1fr));gap:16px 14px}
.t-art li{display:flex;flex-direction:column;gap:6px;font-size:13.5px;line-height:1.25;color:var(--ink)}
.t-art .tt{border:1px solid var(--bd);border-radius:10px}
.t-art .tt.dt{border:0;padding:8px}
.t-art .tt.dt em{font-size:12px;-webkit-line-clamp:4}.t-art .tt.dt.long em{font-size:11px}
.t-art .tt.dt svg{width:14px;height:14px;top:8px;left:8px}
.t-art li small{display:block;color:var(--mu);font-size:12px;margin-top:2px}
.t-credits{font-size:13.5px;line-height:1.5;columns:2 320px;column-gap:28px;padding-left:18px}
.t-credits li{break-inside:avoid;margin-bottom:4px}
@media (prefers-reduced-motion:reduce){.tc-go{transition:none}.tc:hover .tcard{transform:none}}
@media (max-width:480px){.tc-credit{display:none}.th-since{display:none}}
.trend-row{background:none;border:0;border-top:1px solid var(--bd);border-radius:0;padding:24px 0 8px}
@media (max-width:480px){.tc .tcard>.tc-src{padding-right:14px}.tc .tcard{padding-bottom:50px}}
