.template-hub-hero {
  padding-top: clamp(3rem, 5vw, 4.5rem);
  padding-bottom: clamp(2.7rem, 4vw, 3.8rem);
}

.template-hub-hero h1 {
  font-size: clamp(2rem, calc(1.55rem + 2.3vw), 4.2rem);
}

.template-hub-boundary {
  max-width: 44rem !important;
  margin-top: 1rem !important;
  color: #8995a7 !important;
  font-size: .78rem !important;
  line-height: 1.55 !important;
}

.template-hub-boundary b {
  color: #d4dbe6;
}

.template-hub-boundary a {
  color: var(--amber-text);
}

.template-hub-selector {
  display: grid;
  gap: .65rem;
  padding: clamp(1rem, 2vw, 1.35rem);
  border-radius: 18px;
  background: rgba(8, 14, 24, .9);
}

.template-selector-head {
  display: grid;
  gap: .4rem;
  padding: .15rem .2rem .5rem;
}

.template-selector-head span,
.template-hub-selector a > span,
.template-hub-more-grid article > span,
.template-hub-path-grid article > span {
  color: var(--amber-text);
  font: 700 .59rem var(--mono);
  letter-spacing: .1em;
}

.template-selector-head strong {
  color: #f3f6fb;
  font-size: 1.08rem;
}

.template-hub-selector a {
  display: grid;
  min-height: 44px;
  padding: 1rem;
  border: 1px solid #2b374c;
  border-radius: 12px;
  color: inherit;
  background: #111a2a;
  text-decoration: none;
  transition: border-color .16s ease, transform .16s ease;
}

.template-hub-selector a:hover {
  border-color: var(--amber);
  transform: translateY(-2px);
}

.template-hub-selector a > strong {
  margin-top: .35rem;
  color: #f5f7fb;
  font-size: 1rem;
}

.template-hub-selector a > small {
  margin-top: .3rem;
  color: #94a1b4;
  font-size: .74rem;
}

.template-hub-live {
  padding-bottom: clamp(3.5rem, 6vw, 5rem);
}

.template-hub-live .tmpl-grid {
  grid-template-columns: repeat(3, minmax(0, 1fr));
}

.template-hub-live .tmpl-card {
  min-height: 100%;
}

.template-hub-catalog-link,
.template-hub-contact,
.template-hub-path-grid a {
  display: inline-flex;
  min-height: 44px;
  align-items: center;
  color: var(--amber-text);
  font-size: .82rem;
  font-weight: 750;
  text-decoration: none;
}

.template-hub-catalog-link {
  margin-top: 1.2rem;
}

.template-hub-more,
.template-hub-paths,
.template-hub-faq {
  padding: clamp(4rem, 7vw, 5.5rem) 0;
}

.template-hub-more {
  background: #f3eee3;
}

.template-hub-more-grid,
.template-hub-path-grid {
  display: grid;
  gap: 1rem;
  margin-top: 2rem;
}

.template-hub-more-grid {
  grid-template-columns: repeat(3, minmax(0, 1fr));
}

.template-hub-more-grid article,
.template-hub-path-grid article {
  padding: 1.35rem;
  border: 1px solid var(--line);
  border-radius: 16px;
  background: var(--card);
  box-shadow: var(--shadow-card);
}

.template-hub-more-grid h3,
.template-hub-path-grid h3 {
  margin-top: .65rem;
  color: var(--ink);
  font-size: clamp(1.12rem, 2vw, 1.48rem);
  line-height: 1.23;
  letter-spacing: -.028em;
}

.template-hub-more-grid p,
.template-hub-path-grid p {
  margin-top: .58rem;
  color: var(--muted);
  font-size: .82rem;
  line-height: 1.55;
}

.template-hub-howto {
  padding-bottom: clamp(4rem, 7vw, 5.5rem);
}

.template-hub-howto .howto-grid {
  padding: 0;
  list-style: none;
}

.template-hub-paths {
  background: #fff;
}

.template-hub-path-grid {
  grid-template-columns: repeat(2, minmax(0, 1fr));
}

.template-hub-sdk {
  border-color: rgba(184, 120, 10, .42) !important;
  background: linear-gradient(145deg, rgba(244, 183, 64, .11), #fff 62%) !important;
}

.template-hub-contact {
  margin-top: .85rem;
}

.template-hub-faq {
  padding-top: 0;
}

.template-hub-faq > .wrap {
  display: grid;
  grid-template-columns: minmax(260px, .68fr) minmax(0, 1fr);
  gap: clamp(2rem, 6vw, 5rem);
  align-items: start;
}

.template-hub-faq-head h2 {
  margin-top: .85rem;
  color: var(--ink);
  font-size: clamp(2rem, 4vw, 3.35rem);
  line-height: 1.03;
  letter-spacing: -.045em;
}

.template-hub-faq .faq {
  width: 100%;
  max-width: none;
  margin: 0;
}

.template-hub-final {
  padding: clamp(4rem, 7vw, 5rem) 0;
}

.template-hub-final .eyebrow {
  justify-content: center;
  color: var(--amber-text);
}

.template-hub-final-actions {
  display: flex;
  flex-wrap: wrap;
  gap: .75rem;
  justify-content: center;
  margin-top: 1.4rem;
}

.template-hub-final-actions .btn {
  min-height: 48px;
}

@media (max-width: 1000px) {
  .template-hub-live .tmpl-grid {
    grid-template-columns: repeat(3, minmax(270px, 1fr));
    overflow-x: auto;
    padding-bottom: .75rem;
    scroll-snap-type: x mandatory;
  }

  .template-hub-live .tmpl-card {
    scroll-snap-align: start;
  }
}

@media (max-width: 760px) {
  .template-hub-more-grid,
  .template-hub-path-grid,
  .template-hub-faq > .wrap {
    grid-template-columns: 1fr;
  }

  .template-hub-faq .faq {
    margin-top: .25rem;
  }
}

@media (max-width: 520px) {
  .template-hub-selector {
    padding: .75rem;
  }

  .template-hub-live .tmpl-grid {
    grid-template-columns: repeat(3, minmax(84vw, 1fr));
  }

  .template-hub-final-actions {
    display: grid;
  }
}

@media (prefers-reduced-motion: reduce) {
  .template-hub-selector a {
    transition: none;
  }
}
