/* ==========================================================================
   How-to guide page — uses homepage tokens from home.css (.hp-page).
   ========================================================================== */

.ht-hero {
  padding-block: clamp(36px, 5vw, 72px) clamp(28px, 4vw, 48px);
}

.ht-breadcrumb {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  margin-bottom: 22px;
  color: var(--dim);
  font-size: 13px;
}

.ht-breadcrumb a {
  color: var(--fg-2);
}

.ht-breadcrumb a:hover {
  color: #ffb199;
}

.ht-breadcrumb .icon {
  width: 14px;
  height: 14px;
  opacity: .7;
}

.ht-hero h1 {
  max-width: 16ch;
  margin: 0 0 18px;
  font-size: clamp(34px, 5vw, 56px);
  font-weight: 800;
  letter-spacing: -.045em;
  line-height: 1.08;
}

.ht-lead {
  max-width: 62ch;
  color: var(--fg-2);
  font-size: clamp(15px, 1.2vw, 17px);
  line-height: 1.72;
}

.ht-hero-actions {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 16px 22px;
  margin-top: 28px;
}

.ht-hero-actions .button {
  min-height: 48px;
  border-radius: var(--r-md);
  padding-inline: 22px;
  font-weight: 700;
}

.ht-hero-actions .button-primary {
  background: var(--grad);
  color: #fff;
  box-shadow: 0 16px 38px -16px rgba(255, 70, 50, .85);
}

.ht-text-link {
  color: var(--fg);
  font-size: 14px;
  font-weight: 600;
  border-bottom: 1px solid rgba(255, 122, 24, .5);
}

.ht-text-link:hover {
  color: #ffb199;
}

.ht-toc-sec {
  padding-block: 0 clamp(28px, 4vw, 40px);
}

.ht-toc {
  padding: 22px 24px;
  border-radius: var(--r-lg);
  background: linear-gradient(180deg, var(--card-2), var(--card));
  border: 1px solid var(--line);
}

.ht-toc-label {
  margin-bottom: 14px;
  color: var(--dim);
  font-size: 10.5px;
  font-weight: 700;
  letter-spacing: .16em;
  text-transform: uppercase;
}

.ht-toc ol {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 10px 24px;
  margin: 0;
  padding: 0;
  list-style: none;
  counter-reset: toc;
}

.ht-toc li {
  position: relative;
  padding-left: 28px;
  counter-increment: toc;
}

.ht-toc li::before {
  content: counter(toc, decimal-leading-zero);
  position: absolute;
  left: 0;
  top: 1px;
  color: #ff9b7a;
  font-size: 11px;
  font-weight: 800;
  letter-spacing: .04em;
}

.ht-toc a {
  color: #d6dae4;
  font-size: 13.5px;
  font-weight: 600;
  line-height: 1.45;
}

.ht-toc a:hover {
  color: #ffb199;
}

.ht-step-stack {
  display: grid;
  gap: 18px;
}

.ht-step-card {
  padding: clamp(22px, 3vw, 30px);
  border-radius: var(--r-lg);
  background: linear-gradient(180deg, var(--card-2), var(--card));
  border: 1px solid var(--line);
}

.ht-step-head {
  display: flex;
  align-items: flex-start;
  gap: 14px;
  margin-bottom: 14px;
}

.ht-step-num {
  flex-shrink: 0;
  display: inline-grid;
  place-items: center;
  min-width: 42px;
  height: 32px;
  padding-inline: 10px;
  border-radius: 10px;
  background: var(--grad);
  color: #fff;
  font-size: 12px;
  font-weight: 800;
  letter-spacing: .04em;
}

.ht-step-card h3 {
  margin: 2px 0 0;
  font-size: clamp(20px, 2.4vw, 26px);
  font-weight: 750;
}

.ht-step-card > p {
  color: var(--dim);
  font-size: 14.5px;
  line-height: 1.75;
}

.ht-step-card > p + p {
  margin-top: 12px;
}

.ht-split {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 14px;
  margin: 18px 0;
}

.ht-panel {
  padding: 18px;
  border-radius: var(--r-md);
  background: rgba(255, 255, 255, .03);
  border: 1px solid var(--line);
}

.ht-panel h4 {
  margin: 0 0 12px;
  color: var(--fg);
  font-size: 14px;
  font-weight: 700;
}

.ht-panel ol {
  margin: 0;
  padding-left: 18px;
}

.ht-panel li {
  color: var(--dim);
  margin-bottom: 8px;
  font-size: 13.5px;
  line-height: 1.7;
}

.ht-panel li:last-child {
  margin-bottom: 0;
}

.ht-panel code {
  color: #ffb199;
  font-family: ui-monospace, SFMono-Regular, Menlo, monospace;
  font-size: 12px;
}

.ht-note {
  margin-top: 16px;
  padding: 14px 16px;
  border-radius: var(--r-sm);
  background: rgba(255, 46, 77, .07);
  border: 1px solid rgba(255, 90, 43, .26);
  border-left-width: 2px;
  color: #e8d0c8;
  font-size: 13.5px;
  line-height: 1.7;
}

.ht-quality-table {
  display: grid;
  gap: 8px;
  margin: 20px 0;
}

.ht-quality-row {
  display: grid;
  grid-template-columns: minmax(140px, 180px) minmax(0, 1fr);
  gap: 14px;
  align-items: center;
  padding: 12px 14px;
  border-radius: var(--r-sm);
  background: rgba(255, 255, 255, .03);
  border: 1px solid var(--line);
}

.ht-badge {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 6px 11px;
  border-radius: 999px;
  background: rgba(255, 255, 255, .05);
  border: 1px solid var(--line-2);
  color: #ccd2de;
  font-size: 12px;
  font-weight: 700;
  white-space: nowrap;
}

.ht-badge.is-accent {
  background: rgba(255, 46, 77, .12);
  border-color: rgba(255, 90, 43, .4);
  color: #ffac92;
}

.ht-badge.is-premium {
  background: rgba(139, 92, 255, .14);
  border-color: rgba(139, 92, 255, .35);
  color: #c4b0ff;
}

.ht-quality-row > span:last-child {
  color: var(--dim);
  font-size: 13.5px;
  line-height: 1.55;
}

.ht-topic-sec {
  background: rgba(255, 255, 255, .012);
  border-block: 1px solid var(--line);
}

.ht-topic-grid {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
  gap: clamp(24px, 4vw, 56px);
  align-items: start;
}

.ht-topic-grid .hp-sec-head {
  margin-bottom: 0;
}

.ht-topic-body p {
  color: var(--dim);
  font-size: 14.5px;
  line-height: 1.75;
}

.ht-topic-body p + p {
  margin-top: 14px;
}

.ht-card-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 14px;
}

.ht-info-card {
  padding: 22px;
  border-radius: var(--r-lg);
  background: linear-gradient(180deg, var(--card-2), var(--card));
  border: 1px solid var(--line);
}

.ht-info-card h3 {
  margin: 0 0 10px;
  font-size: 17px;
  font-weight: 700;
}

.ht-info-card p {
  margin: 0;
  color: var(--dim);
  font-size: 13.5px;
  line-height: 1.7;
}

.ht-page .hp-link {
  color: var(--fg);
  font-weight: 600;
  border-bottom: 1px solid rgba(255, 122, 24, .5);
}

.ht-page .hp-link:hover {
  color: #ffb199;
}

@media (max-width: 1023px) {
  .ht-toc ol,
  .ht-topic-grid,
  .ht-card-grid {
    grid-template-columns: minmax(0, 1fr);
  }

  .ht-split {
    grid-template-columns: minmax(0, 1fr);
  }

  .ht-hero h1 {
    max-width: none;
  }
}

@media (max-width: 767px) {
  .ht-quality-row {
    grid-template-columns: minmax(0, 1fr);
    gap: 8px;
  }

  .ht-toc {
    padding: 18px 16px;
  }

  .ht-hero-actions .button {
    width: 100%;
    justify-content: center;
  }
}
