/*
 * template-pages.css — /template gallery, category and detail pages in the
 * approved template design (dark hero, preview card over the hero).
 * Loaded after ai-agents.css + ag-mobile.css. Markup: scripts/lib/template-render.js.
 * Behaviour: assets/js/template-pages.js.
 * Every class is tp-* so nothing here touches other dark pages.
 */
.tp-page {
  --tp-ink: #0F0F14;
  --tp-ink-2: #4B5060;
  --tp-ink-3: #5B5F6B;
  --tp-line: #E4E5EA;
  --tp-line-2: #D5D7DE;
  --tp-soft: #F7F7F9;
  --tp-frame: #F1F2F5;
  --tp-tint: #F4F4F7;
  --tp-desk: #EEEFF3;
  --tp-dark: #0D0B1E;
  --tp-dark-ink: #C9C6DD;
  --tp-dark-ink-2: #9B98B3;
  --tp-lav: #B9AEFF;
  --tp-lav-2: #A99DFB;
  --tp-brand: #4F46E5;
  --tp-brand-dk: #3730A3;
  --tp-gut: 24px;
  color: var(--tp-ink);
  background: #fff;
}
@media (max-width: 640px) { .tp-page { --tp-gut: 16px; } }

.tp-page a { color: var(--tp-brand); text-decoration: none; }
.tp-page a:hover { color: var(--tp-brand-dk); }
.tp-page :focus-visible { outline: 2px solid var(--tp-brand); outline-offset: 2px; }
.tp-wrap { max-width: 1240px; margin: 0 auto; }
.tp-band { padding: 0 var(--tp-gut); }

/* ---------- hero (inside .ag-hero, under the ag-nav header) ---------- */
.tp-page .tp-hero { background: var(--tp-dark); }
.tp-hero__in { max-width: 1240px; margin: 0 auto; padding: 28px var(--tp-gut) 150px; display: flex; flex-direction: column; gap: 24px; position: relative; z-index: 2; }
.tp-crumbs { display: flex; gap: 8px; align-items: center; flex-wrap: wrap; font-size: 14px; color: var(--tp-dark-ink-2); }
.tp-page .tp-crumbs a { color: var(--tp-dark-ink); }
.tp-page .tp-crumbs a:hover { color: #fff; text-decoration: underline; }
.tp-crumbs [aria-current] { color: #fff; overflow-wrap: anywhere; }
.tp-hero__row { display: flex; flex-wrap: wrap; gap: 40px; justify-content: space-between; align-items: flex-end; }
.tp-hero__copy { flex: 1 1 560px; min-width: 0; display: flex; flex-direction: column; gap: 18px; }
.tp-pills { display: flex; gap: 8px; flex-wrap: wrap; }
.tp-pill { display: inline-block; font-size: 12px; font-weight: 600; line-height: 1.4; padding: 4px 10px; border-radius: 7px; }
.tp-pill--free { background: rgba(255,255,255,.08); color: #E4E2F5; border: 1px solid rgba(255,255,255,.16); }
.tp-page .tp-h1 { margin: 0; color: #fff; font-size: clamp(34px, 4.6vw, 56px); line-height: 1.05; font-weight: 700; letter-spacing: -0.03em; overflow-wrap: break-word; }
.tp-h1 span { color: var(--tp-lav); }
.tp-lead { margin: 0; max-width: 660px; font-size: 18px; line-height: 1.55; color: var(--tp-dark-ink); }
.tp-chips { list-style: none; margin: 0; padding: 0; display: flex; gap: 8px; flex-wrap: wrap; }
.tp-chip { font-size: 13px; color: #E4E2F5; background: rgba(255,255,255,.07); border: 1px solid rgba(255,255,255,.14); padding: 7px 11px; border-radius: 999px; }
.tp-hero__ctas { display: flex; flex-direction: column; gap: 12px; flex: 0 1 300px; min-width: 0; }
.tp-hero__note { font-size: 13px; color: var(--tp-dark-ink-2); text-align: center; }
.tp-page .tp-hero__note a { color: var(--tp-dark-ink); text-decoration: underline; }
@media (max-width: 640px) {
  .tp-hero__in { padding-top: 16px; padding-bottom: 120px; gap: 18px; }
  .tp-hero__row { gap: 24px; }
  .tp-hero__ctas { flex: 1 1 100%; }
  .tp-lead { font-size: 16px; }
}

/* ---------- buttons ---------- */
.tp-btn { display: flex; justify-content: center; align-items: center; gap: 8px; min-height: 48px; padding: 13px 22px; border-radius: 12px; font: inherit; font-size: 16px; font-weight: 600; line-height: 1.2; text-align: center; cursor: pointer; box-sizing: border-box; }
.tp-page .tp-btn--white { background: #fff; color: var(--tp-dark); border: 1px solid #fff; }
.tp-page .tp-btn--white:hover { background: #ECEAFF; color: var(--tp-dark); }
.tp-page .tp-btn--ghost { color: #fff; border: 1px solid rgba(255,255,255,.3); background: transparent; }
.tp-page .tp-btn--ghost:hover { color: #fff; background: rgba(255,255,255,.08); }
.tp-page .tp-btn--brand { background: var(--tp-brand); color: #fff; border: 1px solid var(--tp-brand); font-size: 15px; border-radius: 11px; }
.tp-page .tp-btn--brand:hover { background: var(--tp-brand-dk); color: #fff; }
.tp-btn--line { background: #fff; color: var(--tp-ink); border: 1px solid var(--tp-line-2); font-size: 14px; border-radius: 11px; min-height: 44px; }
.tp-btn--line:hover { border-color: #9C95F5; }

/* ---------- preview card (overlaps the hero) ---------- */
.tp-pv-wrap { padding: 0 var(--tp-gut) 64px; margin-top: -110px; position: relative; z-index: 3; }
.tp-pv { max-width: 1240px; margin: 0 auto; background: var(--tp-frame); border: 1px solid var(--tp-line); border-radius: 18px; padding: 14px; box-shadow: 0 30px 80px rgba(13,11,30,.25); display: flex; flex-direction: column; gap: 14px; box-sizing: border-box; min-width: 0; }
.tp-pv__head { display: flex; align-items: baseline; gap: 4px 10px; flex-wrap: wrap; padding: 2px 4px; }
.tp-pv__title { font-size: 14px; font-weight: 600; }
.tp-pv__sub { font-size: 13px; color: var(--tp-ink-3); }
.tp-pv__body { display: flex; flex-direction: column; gap: 14px; min-width: 0; }
.tp-pv__stage { position: relative; min-width: 0; background: #fff; border: 1px solid var(--tp-line); border-radius: 12px; overflow: hidden; display: flex; flex-direction: column; }

/* app / browser frame */
.tp-pv__frame { display: flex; align-items: center; gap: 10px; padding: 9px 14px; border-bottom: 1px solid var(--tp-line); background: #FAFAFB; min-width: 0; }
.tp-pv__dots { display: flex; gap: 6px; flex: none; }
.tp-pv__dots i { width: 10px; height: 10px; border-radius: 50%; background: var(--tp-line); }
.tp-pv__url { font-size: 12px; color: var(--tp-ink-3); background: var(--tp-frame); padding: 4px 10px; border-radius: 6px; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }

/* the image box: shapes per the approved preview rules */
.tp-pv__box { position: relative; width: 100%; box-sizing: border-box; background: #fff; }
.tp-pv__box img { display: block; }
/* one slide / one part: fixed shape, fitted, never cropped */
.tp-pv__box--fit169, .tp-pv__box--fit1610 { aspect-ratio: 16 / 10; max-height: min(68vh, 760px); display: flex; align-items: center; justify-content: center; background: var(--tp-soft); padding: 10px; }
.tp-pv__box--fit169 { aspect-ratio: 16 / 9; padding: 0; }
.tp-pv__box--fit169 img, .tp-pv__box--fit1610 img { max-width: 100%; max-height: 100%; width: auto; height: auto; object-fit: contain; }
/* whole web page / app screen: full width, scrolls inside */
.tp-pv__box--scroll { max-height: min(68vh, 760px); overflow-y: auto; overscroll-behavior: contain; }
.tp-pv__box--scroll img, .tp-pv__box--scroll-tall img { width: 100%; height: auto; }
/* single-image templates: no list, full width, scrolls if taller than the box */
.tp-pv__box--scroll-tall { max-height: min(80vh, 900px); overflow-y: auto; overscroll-behavior: contain; }
/* paper (doc, form, poster): the whole page on a grey desk */
.tp-pv__box--desk, .tp-pv__box--email { max-height: min(68vh, 760px); overflow-y: auto; overscroll-behavior: contain; background: var(--tp-desk); padding: clamp(10px, 2.5vw, 24px); display: flex; justify-content: center; align-items: flex-start; }
.tp-pv__box--desk img, .tp-pv__box--email img { width: 100%; max-width: 600px; height: auto; border-radius: 6px; box-shadow: 0 8px 30px rgba(15,15,20,.10); background: #fff; }
.tp-pv__box--email { max-height: min(80vh, 900px); }
.tp-pv__box--email img { max-width: 680px; }
/* short screens (landscape phones, 600px laptops): the stage (frame + box + bar)
   must fit the viewport. Bar ~61px, frame ~39px. */
.tp-pv__box--scroll-tall, .tp-pv__box--email { max-height: min(80vh, 900px, calc(100vh - 120px)); }
.tp-pv__frame ~ .tp-pv__box--scroll-tall, .tp-pv__frame ~ .tp-pv__box--email { max-height: min(80vh, 900px, calc(100vh - 160px)); }
/* JS-only controls ship [hidden]; never let a display rule show them */
/* ONE preview height for every template type on tablet/desktop (owner, 2026-12-01): the stage
   (frame + image box + bar) is always --tp-pv-h tall. Slides and boards fit inside it; pages,
   docs, dashboards and emails scroll inside it. Phones keep the natural, shorter boxes. */
@media (min-width: 820px) {
  .tp-pv { --tp-pv-h: clamp(440px, 72vh, 680px); }
  .tp-pv__stage { height: var(--tp-pv-h); }
  .tp-pv__stage > .tp-pv__box { flex: 1 1 auto; min-height: 0; max-height: none; aspect-ratio: auto; }
}
.tp-pv [hidden], .tp-lb [hidden] { display: none !important; }
.tp-pv:not([data-tp-ready]) .tp-pv__item { cursor: default; }

/* the bar under the stage: never on top of the image */
.tp-pv__bar { display: flex; align-items: center; justify-content: space-between; gap: 8px; padding: 8px 10px; border-top: 1px solid var(--tp-line); background: #fff; min-width: 0; }
.tp-pv__bar-l { display: flex; align-items: center; gap: 6px; min-width: 0; }
/* Single-image previews: no caption under the image (owner, 2026-12-01); the bar keeps Expand only. */
.tp-pv__bar-l > .tp-pv__label:only-child { display: none; }
.tp-pv__label { font-size: 13px; font-weight: 600; color: var(--tp-ink); min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; padding-left: 4px; }
.tp-pv__btn { flex: none; min-width: 44px; height: 44px; border-radius: 9px; border: 1px solid var(--tp-line-2); background: #fff; color: var(--tp-ink); display: inline-flex; align-items: center; justify-content: center; gap: 6px; cursor: pointer; font: inherit; font-size: 13px; font-weight: 600; padding: 0; }
.tp-pv__btn--text { padding: 0 12px; }
.tp-pv__btn:hover { border-color: #9C95F5; }

/* the parts list: LEFT of the stage on wide screens (PowerPoint style) */
.tp-pv__list { min-width: 0; position: relative; }
.tp-pv__list-in { list-style: none; margin: 0; padding: 6px; box-sizing: border-box; display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); grid-auto-rows: max-content; gap: 4px; align-content: start; background: #E9EAEE; border-radius: 12px; }
.tp-pv__list-in li { min-width: 0; }
.tp-pv__item { display: flex; align-items: flex-start; gap: 6px; width: 100%; min-height: 44px; padding: 7px; font: inherit; text-align: left; cursor: pointer; border-radius: 10px; background: transparent; border: 2px solid transparent; color: var(--tp-ink); box-sizing: border-box; }
.tp-pv__item:hover { background: rgba(255,255,255,.6); }
.tp-pv__item[aria-current="true"] { background: #fff; border-color: var(--tp-brand); }
.tp-pv__num { font-size: 11px; color: var(--tp-ink-3); width: 16px; flex: none; text-align: right; padding-top: 4px; font-family: "Roboto Mono", ui-monospace, Menlo, monospace !important; }
.tp-pv__thumbwrap { display: flex; flex-direction: column; gap: 6px; flex: 1; min-width: 0; }
.tp-pv__thumb { display: block; width: 100%; height: auto; aspect-ratio: 16 / 10; object-fit: cover; object-position: top; border-radius: 6px; background: #fff; border: 1px solid var(--tp-line); box-sizing: border-box; }
.tp-pv__list-in--169 .tp-pv__thumb { aspect-ratio: 16 / 9; }
.tp-pv__name { font-size: 12px; font-weight: 600; line-height: 1.3; overflow-wrap: anywhere; }
@media (max-width: 420px) { .tp-pv__list-in { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
@media (min-width: 600px) and (max-width: 819px) { .tp-pv__list-in { grid-template-columns: repeat(4, minmax(0, 1fr)); } }
@media (min-width: 820px) {
  .tp-pv__body--multi { flex-direction: row-reverse; align-items: stretch; }
  .tp-pv__body--multi .tp-pv__stage { flex: 1 1 auto; }
  .tp-pv__body--multi .tp-pv__list { flex: 0 0 216px; }
  /* the list takes the stage's height and scrolls inside it */
  .tp-pv__body--multi .tp-pv__list-in { position: absolute; inset: 0; overflow-y: auto; overscroll-behavior: contain; grid-template-columns: minmax(0, 1fr); }
}
@media (max-width: 640px) {
  .tp-pv-wrap { padding-bottom: 48px; margin-top: -90px; }
  .tp-pv { padding: 8px; border-radius: 14px; gap: 10px; }
  .tp-pv__head { padding: 2px; }
  .tp-pv__sub { display: none; }
}

/* lightbox (built by template-pages.js) */
.tp-lb { position: fixed; inset: 0; z-index: 2147483000; background: #0D0B1E; display: flex; flex-direction: column; padding: 16px; gap: 12px; box-sizing: border-box; color: #fff; }
.tp-lb[hidden] { display: none; }
.tp-lb__top, .tp-lb__nav { display: flex; align-items: center; gap: 12px; }
.tp-lb__top { justify-content: space-between; }
.tp-lb__nav { justify-content: center; gap: 16px; }
.tp-lb__title { font-size: 14px; font-weight: 600; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.tp-lb__count { font-size: 13px; font-family: "Roboto Mono", ui-monospace, Menlo, monospace !important; }
.tp-lb__btn { flex: none; width: 44px; height: 44px; border-radius: 50%; border: 1px solid rgba(255,255,255,.3); background: transparent; color: #fff; display: inline-flex; align-items: center; justify-content: center; cursor: pointer; padding: 0; }
.tp-lb__btn:hover { background: rgba(255,255,255,.1); }
/* the lightbox sits on <body>, outside .tp-page: literal colours, not --tp-* tokens */
.tp-lb__btn:focus-visible, .tp-lb__box:focus-visible { outline: 2px solid #B9AEFF; outline-offset: 2px; }
.tp-lb__box { flex: 1; min-height: 0; display: flex; align-items: center; justify-content: center; }
.tp-lb__box img { display: block; max-width: 100%; max-height: 100%; width: auto; height: auto; object-fit: contain; }
.tp-lb__box--scroll { overflow-y: auto; align-items: flex-start; overscroll-behavior: contain; }
.tp-lb__box--scroll img { width: 100%; max-width: 1100px; max-height: none; height: auto; }
/* Full-screen zoom: Fit / zoom out / zoom in, bottom-right. Zoomed, the box scrolls both ways and drags to pan. */
.tp-lb__zoom { position: absolute; right: 24px; bottom: 24px; display: flex; align-items: center; gap: 6px; height: 48px; box-sizing: border-box; padding: 0 7px 0 8px; border-radius: 10px; background: #fff; border: 1px solid #EEEEEE; box-shadow: 0 2px 8px rgba(3,11,22,.05); color: #5B5F6B; }
.tp-lb--nav .tp-lb__zoom { bottom: 84px; }
@media (min-width: 700px) { .tp-lb--nav .tp-lb__zoom { bottom: 24px; } }
.tp-lb__zfitwrap { display: flex; padding-right: 6px; border-right: 1px solid #EEEEEE; }
.tp-lb__zbtn { width: 36px; height: 36px; padding: 0; border-radius: 4px; border: 0; background: transparent; color: inherit; display: inline-flex; align-items: center; justify-content: center; cursor: pointer; }
.tp-lb__zbtn:hover { background: #F7F7F7; }
.tp-lb__zbtn:disabled { opacity: .4; cursor: default; background: transparent; }
.tp-lb__zbtn:focus-visible { outline: 2px solid #4F46E5; outline-offset: 1px; }
.tp-lb__zpct { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
.tp-lb__box--zoom { display: block; overflow: auto; overscroll-behavior: contain; cursor: grab; }
.tp-lb__box--zoom.is-drag { cursor: grabbing; user-select: none; }
.tp-lb__box--zoom img { max-width: none; max-height: none; margin: 0 auto; -webkit-user-drag: none; }
html.tp-lb-open, html.tp-lb-open body { overflow: hidden; }

/* ---------- body: what's inside, steps, FAQ, sidebar ---------- */
.tp-main { padding-top: 8px; padding-bottom: 72px; }
.tp-cols { display: flex; flex-wrap: wrap; gap: 56px; align-items: flex-start; }
.tp-cols__main { flex: 999 1 560px; min-width: 0; display: flex; flex-direction: column; gap: 56px; }
.tp-sec { display: flex; flex-direction: column; gap: 18px; }
.tp-sec--steps { gap: 8px; }
.tp-eyebrow { margin: 0; font-size: 12px; letter-spacing: .18em; color: var(--tp-brand); font-weight: 500; }
.tp-eyebrow--dark { color: var(--tp-lav-2); }
.tp-page .tp-h2 { margin: 0; font-size: clamp(26px, 3vw, 36px); letter-spacing: -0.025em; line-height: 1.15; font-weight: 700; color: var(--tp-ink); }
.tp-sec--steps .tp-h2 { margin-bottom: 10px; }
.tp-inside { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: repeat(auto-fill, minmax(min(260px, 100%), 1fr)); gap: 12px; }
.tp-inside li { display: flex; gap: 12px; align-items: flex-start; background: var(--tp-soft); border: 1px solid var(--tp-line); border-radius: 14px; padding: 16px; font-size: 15px; line-height: 1.5; min-width: 0; }
.tp-inside__tick { flex: none; display: flex; width: 26px; height: 26px; border-radius: 50%; background: var(--tp-ink); color: #fff; align-items: center; justify-content: center; }
.tp-steps { list-style: none; margin: 0; padding: 0; }
.tp-steps li { display: flex; gap: 20px; padding: 20px 0; border-top: 1px solid var(--tp-line); }
.tp-steps__n { font-size: 13px; color: var(--tp-ink-3); padding-top: 6px; flex: none; }
.tp-page .tp-steps h3 { margin: 0 0 6px; font-size: 22px; letter-spacing: -0.01em; font-weight: 700; color: var(--tp-ink); }
.tp-steps p { margin: 0; font-size: 15px; line-height: 1.6; color: var(--tp-ink-2); max-width: 620px; }
.tp-faq { display: flex; flex-direction: column; gap: 10px; }
.tp-faq details { background: #fff; border: 1px solid var(--tp-line); border-radius: 14px; padding: 18px 20px; }
.tp-faq summary { cursor: pointer; font-size: 16px; font-weight: 600; min-height: 24px; }
.tp-faq p { margin: 12px 0 0; font-size: 15px; line-height: 1.6; color: var(--tp-ink-2); }
.tp-aside { flex: 1 1 300px; min-width: 0; display: flex; flex-direction: column; gap: 16px; }
.tp-card { border: 1px solid var(--tp-line); border-radius: 16px; padding: 22px; display: flex; flex-direction: column; gap: 16px; background: #fff; }
.tp-page .tp-card__h { margin: 0; font-size: 16px; font-weight: 700; color: var(--tp-ink); }
.tp-dl { margin: 0; display: grid; grid-template-columns: auto 1fr; gap: 12px 16px; font-size: 14px; }
.tp-dl dt { color: var(--tp-ink-3); }
.tp-dl dd { margin: 0; font-weight: 500; min-width: 0; overflow-wrap: anywhere; }
.tp-card--dark { background: var(--tp-dark); color: #fff; border-color: var(--tp-dark); gap: 10px; }
.tp-ai { margin: 0; font-size: 15px; line-height: 1.5; color: #fff; }
.tp-page .tp-ai__link { color: var(--tp-lav); font-size: 14px; font-weight: 600; min-height: 24px; display: inline-flex; align-items: center; }
.tp-page .tp-ai__link:hover { color: #fff; }
@media (max-width: 640px) { .tp-cols, .tp-cols__main { gap: 40px; } .tp-main { padding-bottom: 48px; } }

/* ---------- template cards (similar templates, gallery grid) ---------- */
.tp-similar { padding-top: 16px; padding-bottom: 72px; }
.tp-head-row { display: flex; justify-content: space-between; align-items: flex-end; gap: 12px 24px; flex-wrap: wrap; margin-bottom: 28px; }
.tp-head-row > div { display: flex; flex-direction: column; gap: 10px; min-width: 0; }
.tp-page .tp-link-arrow { font-size: 15px; font-weight: 600; display: inline-flex; align-items: center; gap: 6px; min-height: 44px; }
.tp-grid { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: repeat(auto-fill, minmax(min(230px, 100%), 1fr)); gap: 20px; }
.tp-grid li { min-width: 0; }
.tp-page .tp-tcard { height: 100%; background: #fff; border: 1px solid var(--tp-line); border-radius: 16px; overflow: hidden; display: flex; flex-direction: column; color: var(--tp-ink); }
.tp-page .tp-tcard:hover { border-color: #C7C9D1; color: var(--tp-ink); }
.tp-tcard__img { display: block; background: var(--tp-frame); padding: 10px 10px 0; }
.tp-tcard__img img { display: block; width: 100%; height: auto; aspect-ratio: 16 / 10; object-fit: cover; object-position: top; border-radius: 8px 8px 0 0; background: #fff; }
.tp-tcard__body { padding: 14px 16px 16px; display: flex; flex-direction: column; align-items: flex-start; gap: 6px; }
.tp-tcard__title { font-size: 16px; font-weight: 600; line-height: 1.3; }

/* ---------- dark CTA band ---------- */
.tp-cta-wrap { padding-bottom: 80px; }
.tp-cta { max-width: 1240px; margin: 0 auto; background: var(--tp-dark); border-radius: 24px; padding: clamp(28px, 5vw, 64px); display: flex; justify-content: space-between; align-items: center; gap: 32px; flex-wrap: wrap; color: #fff; box-sizing: border-box; }
.tp-cta__copy { display: flex; flex-direction: column; gap: 14px; max-width: 620px; min-width: 0; }
.tp-page .tp-cta__h { margin: 0; color: #fff; font-size: clamp(28px, 3.6vw, 44px); letter-spacing: -0.025em; line-height: 1.1; font-weight: 700; }
.tp-cta__h span { color: var(--tp-lav); }
.tp-cta__p { margin: 0; color: var(--tp-dark-ink); font-size: 16px; line-height: 1.55; }
.tp-cta__btns { display: flex; gap: 12px; flex-wrap: wrap; }
.tp-cta__btns .tp-btn { font-size: 15px; }
@media (max-width: 640px) { .tp-cta__btns, .tp-cta__btns .tp-btn { width: 100%; } .tp-cta-wrap { padding-bottom: 56px; } }

/* ---------- gallery (/template) pieces from the approved Main design ---------- */
.tp-gal-hero { text-align: center; display: flex; flex-direction: column; align-items: center; gap: 22px; padding: 56px 0 72px; }
.tp-gal-hero .tp-lead { max-width: 640px; }
.tp-page .tp-gal-h1 { margin: 0; color: #fff; font-size: clamp(40px, 6vw, 72px); line-height: 1.04; font-weight: 700; letter-spacing: -0.03em; }
.tp-gal-h1 span { color: var(--tp-lav); }
.tp-search { width: 100%; max-width: 720px; margin-top: 8px; }
.tp-search__box { display: flex; align-items: center; gap: 10px; background: #fff; border-radius: 16px; padding: 8px 8px 8px 18px; box-shadow: 0 0 0 1px rgba(185,174,255,.35), 0 20px 60px rgba(79,70,229,.25); color: #6B7080; }
.tp-search__box input { flex: 1; min-width: 0; border: 0; outline: none; font: inherit; font-size: 16px; color: var(--tp-ink); padding: 10px 0; background: transparent; }
.tp-search__btn { flex: none; display: inline-flex; align-items: center; gap: 8px; border: 0; background: var(--tp-brand); color: #fff; font: inherit; font-weight: 600; font-size: 14px; padding: 12px 16px; border-radius: 11px; cursor: pointer; min-height: 44px; }
.tp-popular { display: flex; gap: 8px; flex-wrap: wrap; justify-content: center; max-width: 820px; }
.tp-popular__lbl { font-size: 13px; color: var(--tp-dark-ink-2); padding: 8px 4px; }
.tp-page .tp-chip-link { font-size: 13px; color: #E4E2F5; background: rgba(255,255,255,.07); border: 1px solid rgba(255,255,255,.14); padding: 8px 12px; border-radius: 999px; min-height: 24px; }
.tp-page .tp-chip-link:hover { background: rgba(255,255,255,.14); color: #fff; }
.tp-tint { background: var(--tp-tint); padding: 64px var(--tp-gut) 72px; }
.tp-types { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: repeat(auto-fill, minmax(min(150px, 100%), 1fr)); gap: 12px; }
.tp-type { width: 100%; height: 100%; display: flex; flex-direction: column; align-items: flex-start; gap: 6px; padding: 16px; background: #fff; border: 1px solid var(--tp-line); border-radius: 14px; font: inherit; text-align: left; cursor: pointer; color: var(--tp-ink); box-sizing: border-box; min-height: 44px; }
.tp-type:hover { border-color: #C7C9D1; }
.tp-type[aria-pressed="true"] { border: 2px solid var(--tp-brand); padding: 15px; }
.tp-type__name { font-size: 15px; font-weight: 600; }
.tp-type__count { font-size: 13px; color: var(--tp-ink-3); }
.tp-teams { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: repeat(auto-fill, minmax(min(270px, 100%), 1fr)); gap: 0 32px; border-top: 1px solid var(--tp-line); }
.tp-page .tp-team { display: flex; justify-content: space-between; align-items: center; gap: 12px; padding: 18px 2px; border-bottom: 1px solid var(--tp-line); color: var(--tp-ink); font-size: 16px; font-weight: 500; }
.tp-team__count { display: inline-flex; align-items: center; gap: 10px; font-size: 14px; color: var(--tp-ink-3); }
.tp-card-actions { position: absolute; inset: 10px 10px 0; display: flex; align-items: center; justify-content: center; gap: 10px; background: rgba(13,11,30,.55); border-radius: 8px 8px 0 0; opacity: 0; transition: opacity .15s; }
.tp-tcard:hover .tp-card-actions, .tp-tcard:focus-within .tp-card-actions { opacity: 1; }
@media (hover: none) { .tp-card-actions { display: none; } }
@media (prefers-reduced-motion: reduce) { .tp-card-actions { transition: none; } }
