.templates-page {
  max-width: 1120px;
  margin: 0 auto;
  min-height: 100vh;
  padding: 48px 20px 72px;
  display: grid;
  gap: 20px;
}

.templates-hero {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 28px;
  padding: 32px;
  box-shadow: var(--shadow);
  display: grid;
  gap: 14px;
  position: relative;
  overflow: hidden;
}

.templates-hero::after {
  content: '';
  position: absolute;
  right: -120px;
  top: -120px;
  width: 280px;
  height: 280px;
  background: radial-gradient(circle, rgba(242, 184, 75, 0.28), transparent 70%);
  pointer-events: none;
}

.templates-brand img {
  width: 164px;
  height: auto;
}

.templates-nav {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
}

.templates-nav a {
  text-decoration: none;
  color: var(--accent);
  border: 1px solid rgba(15, 76, 92, 0.2);
  border-radius: 999px;
  padding: 7px 12px;
  font-size: 0.9rem;
  font-weight: 700;
  background: rgba(255, 255, 255, 0.65);
}

.templates-kicker {
  margin: 0;
  color: #6a4a0a;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  font-size: 0.76rem;
}

.templates-hero h1 {
  margin: 0;
  font-family: var(--font-display);
  font-size: clamp(2rem, 4.2vw, 3rem);
  line-height: 1.08;
  max-width: 22ch;
}

.templates-subhead {
  margin: 0;
  color: var(--muted);
  font-size: 1.04rem;
  line-height: 1.45;
  max-width: 70ch;
}

.templates-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
}

.templates-btn {
  border: 1px solid var(--accent);
  border-radius: 999px;
  padding: 11px 16px;
  background: var(--accent);
  color: #fff;
  font-weight: 700;
  line-height: 1.2;
  text-decoration: none;
  cursor: pointer;
}

.templates-btn.secondary {
  background: rgba(15, 76, 92, 0.08);
  color: var(--accent);
  border-color: rgba(15, 76, 92, 0.2);
}

.templates-btn.tertiary {
  background: rgba(242, 184, 75, 0.18);
  color: #6a4a0a;
  border-color: rgba(242, 184, 75, 0.5);
}

.templates-btn:hover {
  transform: translateY(-1px);
  box-shadow: 0 12px 24px rgba(15, 76, 92, 0.22);
}

.templates-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 16px;
}

.watch-card {
  background: #fff;
  border: 1px solid rgba(15, 76, 92, 0.16);
  border-radius: 18px;
  padding: 16px;
  display: grid;
  gap: 10px;
}

.watch-card-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
}

.watch-card h2 {
  margin: 0;
  font-size: 1.1rem;
}

.watch-tag {
  text-transform: uppercase;
  letter-spacing: 0.08em;
  font-size: 0.7rem;
  font-weight: 700;
  color: #6a4a0a;
  background: rgba(242, 184, 75, 0.2);
  border-radius: 999px;
  padding: 4px 8px;
}

.watch-desc {
  margin: 0;
  color: var(--muted);
}

.watch-text {
  width: 100%;
  border: 1px solid rgba(15, 76, 92, 0.16);
  border-radius: 12px;
  padding: 10px 12px;
  background: #fff;
  color: var(--ink);
  font: inherit;
  min-height: 64px;
  resize: none;
}

.watch-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.watch-note {
  margin: 0;
  font-size: 0.86rem;
  color: var(--muted);
}

.templates-panel {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 22px;
  padding: 22px;
  box-shadow: var(--shadow);
  display: grid;
  gap: 12px;
}

.templates-panel h2 {
  margin: 0;
  font-family: var(--font-display);
  font-size: 1.5rem;
}

.templates-links {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
}

.templates-footer {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 16px;
  padding: 0 16px 36px;
}

.templates-footer a {
  color: var(--accent);
  text-decoration: none;
  font-weight: 700;
}

@media (max-width: 960px) {
  .templates-grid {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 720px) {
  .templates-page {
    padding: 32px 14px 56px;
  }

  .templates-hero {
    border-radius: 18px;
    padding: 18px;
  }

  .templates-actions,
  .watch-actions,
  .templates-links {
    flex-direction: column;
    align-items: stretch;
  }

  .templates-btn {
    width: 100%;
    text-align: center;
  }
}
