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

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

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

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

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

.template-child-proof {
  overflow: hidden;
}

.template-child-proof img {
  display: block;
  width: 100%;
  height: 100%;
  min-height: 360px;
  object-fit: cover;
}

.template-child-proof figcaption {
  right: .8rem;
  bottom: .8rem;
  left: .8rem;
}

.template-child-proof figcaption b {
  color: var(--amber-text);
}

.template-child-overview,
.template-child-layouts,
.template-child-howto,
.template-child-paths,
.template-child-routes,
.template-child-faq {
  padding: clamp(4rem, 7vw, 5.5rem) 0;
}

.template-child-overview-grid {
  display: grid;
  grid-template-columns: minmax(0, .8fr) minmax(300px, .72fr);
  gap: clamp(2rem, 6vw, 5rem);
  align-items: start;
}

.template-child-overview h2,
.template-child-layouts h2,
.template-child-howto h2,
.template-child-paths h2,
.template-child-routes h2,
.template-child-faq h2 {
  margin-top: .85rem;
  color: var(--ink);
  font-size: clamp(2rem, 4vw, 3.35rem);
  line-height: 1.03;
  letter-spacing: -.045em;
  text-wrap: balance;
}

.template-child-overview-copy p,
.template-child-overview-copy li {
  color: var(--muted);
  font-size: .94rem;
  line-height: 1.65;
}

.template-child-overview-copy ul {
  display: grid;
  gap: .6rem;
  margin: 1rem 0 0;
  padding-left: 1.1rem;
}

.template-child-overview-copy b {
  color: var(--ink);
}

.template-child-quiet-route {
  margin-top: 1rem;
  padding: .75rem .85rem;
  border-left: 2px solid var(--amber);
  background: var(--paper-warm);
  font-size: .8rem !important;
}

.template-child-quiet-route a {
  color: var(--amber-text);
  font-weight: 750;
}

.template-child-layouts {
  background: #f3eee3;
}

.template-layout-table {
  overflow-x: auto;
  margin-top: 2rem;
  border: 1px solid var(--line);
  border-radius: 16px;
  background: #fff;
  box-shadow: var(--shadow-card);
}

.template-layout-table:focus-visible {
  outline: 3px solid var(--amber);
  outline-offset: 4px;
}

.template-layout-table table {
  width: 100%;
  min-width: 860px;
  border-collapse: collapse;
  font-size: .8rem;
}

.template-layout-table th,
.template-layout-table td {
  padding: .8rem .9rem;
  border-bottom: 1px solid var(--line);
  text-align: left;
  vertical-align: middle;
  line-height: 1.45;
}

.template-layout-table thead th {
  color: var(--faint);
  background: var(--paper-warm);
  font: .61rem var(--mono);
  letter-spacing: .08em;
  text-transform: uppercase;
}

.template-layout-table tbody th {
  width: 24%;
  color: var(--ink);
}

.template-layout-table tbody td {
  color: var(--muted);
}

.template-layout-table tbody td:nth-child(2) {
  width: 35%;
}

.template-layout-table tbody td:nth-child(3) {
  width: 14%;
  color: var(--ink);
  font-family: var(--mono);
}

.template-layout-table tbody td:last-child {
  display: flex;
  min-width: 210px;
  gap: .35rem .75rem;
  flex-wrap: wrap;
}

.template-layout-table a {
  display: inline-flex;
  min-height: 44px;
  align-items: center;
  color: var(--amber-text);
  font-weight: 750;
  text-decoration: none;
}

.template-layout-table tr:last-child > * {
  border-bottom: 0;
}

.template-layout-featured {
  background: rgba(244, 183, 64, .08);
}

.template-child-howto {
  background: #fff;
}

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

.template-child-paths {
  background: #f7f9fc;
}

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

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

.template-child-path-grid article,
.template-child-route-grid a {
  padding: 1.35rem;
  border: 1px solid var(--line);
  border-radius: 16px;
  color: inherit;
  background: var(--card);
  box-shadow: var(--shadow-card);
  text-decoration: none;
}

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

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

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

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

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

.template-child-path-grid article > a {
  margin-top: .75rem;
}

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

.template-child-route-grid {
  grid-template-columns: repeat(4, minmax(0, 1fr));
}

.template-child-route-grid a {
  min-height: 180px;
  transition: border-color .16s ease, transform .16s ease;
}

.template-child-route-grid a:hover {
  border-color: var(--amber);
  transform: translateY(-2px);
}

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

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

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

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

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

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

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

@media (max-width: 1000px) {
  .template-child-route-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

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

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

@media (max-width: 520px) {
  .template-child-route-grid,
  .template-child-final-actions {
    display: grid;
    grid-template-columns: 1fr;
  }

  .template-child-route-grid a {
    min-height: 0;
  }
}

@media (prefers-reduced-motion: reduce) {
  .template-child-route-grid a {
    transition: none;
  }
}
