.htp-hero {
  background:
    radial-gradient(ellipse 70% 60% at 85% 20%, rgba(230, 51, 44, 0.35), transparent 55%),
    linear-gradient(155deg, #1a120f 0%, #3a1814 45%, #8a2a1e 100%);
  color: #fff;
  padding: 48px 0 56px;
}

.htp-hero-grid {
  display: grid;
  grid-template-columns: minmax(160px, 240px) 1fr;
  gap: 36px;
  align-items: center;
}

.htp-cover-wrap {
  border-radius: 12px;
  overflow: hidden;
  box-shadow: 0 24px 60px rgba(0, 0, 0, 0.45);
  border: 1px solid rgba(255, 255, 255, 0.12);
}

.htp-cover {
  width: 100%;
  display: block;
  aspect-ratio: 2 / 3;
  object-fit: cover;
}

.htp-logo {
  width: min(180px, 55%);
  margin-bottom: 18px;
  opacity: 0.95;
}

.htp-hero h1 {
  font-family: var(--serif);
  font-size: clamp(1.9rem, 4vw, 2.8rem);
  font-weight: 600;
  line-height: 1.15;
  margin: 8px 0 14px;
}

.htp-note {
  margin-top: 16px;
  font-size: 0.95rem;
  color: rgba(244, 239, 230, 0.72);
  max-width: 40rem;
}

.htp-intro {
  padding: 48px 0 24px;
}

.htp-intro-grid {
  display: grid;
  grid-template-columns: 1.1fr 0.9fr;
  gap: 32px;
  align-items: center;
}

.htp-pacing {
  margin: 0;
}

.htp-pacing img {
  width: 100%;
  border-radius: 14px;
  border: 1px solid var(--line);
  background: #fff;
  box-shadow: var(--shadow);
}

.htp-pacing figcaption {
  margin-top: 10px;
  font-size: 0.85rem;
  color: var(--muted);
}

.htp-chapters {
  padding: 12px 0 72px;
}

.htp-chapter-nav {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-bottom: 28px;
}

.htp-chip {
  border: 1px solid var(--line);
  background: var(--white, #fff);
  color: var(--ink);
  border-radius: 999px;
  padding: 10px 14px;
  font-size: 13px;
  font-weight: 600;
  cursor: pointer;
  font-family: var(--sans);
  transition: background 0.15s ease, color 0.15s ease, border-color 0.15s ease;
}

.htp-chip:hover {
  border-color: rgba(230, 51, 44, 0.45);
}

.htp-chip.is-active {
  background: var(--red);
  border-color: var(--red);
  color: #fff;
}

.htp-panel[hidden] {
  display: none;
}

.htp-panel-head {
  margin-bottom: 22px;
}

.htp-panel-head h2 {
  font-family: var(--serif);
  font-size: clamp(1.6rem, 3vw, 2.2rem);
  margin-bottom: 6px;
}

.htp-course {
  font-size: 0.92rem;
  color: var(--red-deep, #b4231d);
  font-weight: 600;
}

.htp-ref {
  background: var(--white, #fff);
  border: 1px solid var(--line);
  border-radius: 16px;
  padding: 18px 18px 16px;
  margin-bottom: 14px;
  box-shadow: 0 8px 24px rgba(20, 18, 16, 0.04);
  animation: htp-rise 0.4s ease both;
}

@keyframes htp-rise {
  from { opacity: 0; transform: translateY(8px); }
  to { opacity: 1; transform: none; }
}

.htp-ref-top {
  display: flex;
  flex-wrap: wrap;
  gap: 8px 14px;
  align-items: baseline;
  margin-bottom: 12px;
}

.htp-ref-top strong {
  font-size: 1.08rem;
}

.htp-note-num {
  font-size: 12px;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--muted);
  font-weight: 600;
}

.htp-versions {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 12px;
}

.htp-ver {
  background: var(--cream, #f4efe6);
  border-radius: 12px;
  padding: 12px 14px;
}

.htp-ver span {
  display: block;
  font-size: 11px;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  font-weight: 700;
  color: var(--red);
  margin-bottom: 6px;
}

.htp-ver p {
  font-size: 0.95rem;
  line-height: 1.55;
  color: var(--ink-soft, #3a342c);
}

.htp-attr {
  margin-top: 36px;
  font-size: 0.82rem;
  color: var(--muted);
  line-height: 1.5;
  max-width: 52rem;
}

.htp-tools {
  background: rgba(230, 51, 44, 0.06);
  border: 1px solid rgba(230, 51, 44, 0.18);
  border-radius: 16px;
  padding: 18px;
  margin-bottom: 22px;
}

.htp-tools h3 {
  font-family: var(--serif);
  font-size: 1.25rem;
  margin-bottom: 6px;
}

.htp-tools > p {
  font-size: 0.95rem;
  color: var(--muted);
  margin-bottom: 12px;
}

.htp-tools a {
  color: var(--red-deep);
}

.htp-tool-row {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.htp-tool-btn {
  display: inline-flex;
  text-decoration: none;
  border: 1px solid var(--line);
  background: #fff;
  color: var(--ink) !important;
  border-radius: 999px;
  padding: 8px 12px;
  font-size: 12px;
  font-weight: 600;
}

.htp-tool-btn:hover {
  border-color: rgba(230, 51, 44, 0.45);
  color: var(--red-deep) !important;
}

.htp-empty {
  color: var(--muted);
  padding: 24px 0;
}

@media (max-width: 860px) {
  .htp-hero-grid,
  .htp-intro-grid,
  .htp-versions {
    grid-template-columns: 1fr;
  }
  .htp-cover-wrap {
    max-width: 220px;
  }
}

@media (prefers-reduced-motion: reduce) {
  .htp-ref { animation: none; }
}
