/* How-to detail / ask page styles - shared between curated and AI pages */

.ht-back { display: inline-block; margin-bottom: 18px; color: var(--text-3); font-size: 14px; text-decoration: none; }
.ht-back:hover { color: var(--text); }

.ht-detail-hero { padding: 32px 0 56px; }

.ht-loading { text-align: center; padding: 80px 0; }
.ht-loading-spin {
  width: 48px; height: 48px;
  border: 3px solid var(--line);
  border-top-color: var(--accent);
  border-radius: 50%;
  margin: 0 auto 24px;
  animation: ht-spin 0.9s linear infinite;
}
@keyframes ht-spin { to { transform: rotate(360deg); } }
.ht-loading-title { font-family: var(--display); font-size: clamp(24px, 3vw, 36px); margin: 0 0 8px; }
.ht-loading-sub { color: var(--text-3); font-size: 14px; margin: 0; }

.ht-error { text-align: center; padding: 80px 0; max-width: 480px; margin: 0 auto; }
.ht-error h1 { font-family: var(--display); font-size: clamp(24px, 3vw, 36px); margin: 0 0 12px; }
.ht-error p { color: var(--text-2); margin: 0 0 24px; }

.ht-detail-eyebrow { font-size: 12px; letter-spacing: 0.12em; text-transform: uppercase; color: var(--text-3); margin-bottom: 12px; display: flex; gap: 16px; flex-wrap: wrap; }
.ht-detail-eyebrow span { display: inline-flex; align-items: center; gap: 6px; }
.ht-detail-eyebrow .ai-badge {
  background: linear-gradient(135deg, #6366F1, #A855F7);
  color: white; padding: 3px 10px; border-radius: 999px; letter-spacing: 0.08em;
}

.ht-detail-h1 {
  font-family: var(--display); font-size: clamp(36px, 5vw, 60px);
  line-height: 1.05; letter-spacing: -0.02em;
  margin: 0 0 16px; max-width: 860px;
}
.ht-detail-intro {
  font-size: clamp(16px, 1.4vw, 19px); color: var(--text-2);
  line-height: 1.55; max-width: 720px; margin: 0 0 32px;
}

.ht-detail-meta {
  display: flex; flex-wrap: wrap; gap: 24px;
  background: var(--bg-2); border: 1px solid var(--line);
  border-radius: 14px; padding: 16px 22px;
  margin-bottom: 48px;
}
.ht-detail-meta > div { font-size: 13px; color: var(--text-3); }
.ht-detail-meta strong { display: block; color: var(--text); font-size: 16px; font-weight: 600; margin-top: 2px; }

.ht-stack-preview { display: flex; flex-wrap: wrap; gap: 8px; margin-bottom: 48px; }
.ht-stack-chip {
  background: var(--bg); border: 1px solid var(--line);
  border-radius: 999px; padding: 5px 12px 5px 5px;
  font-size: 13px; color: var(--text-2);
  display: inline-flex; align-items: center; gap: 8px;
  text-decoration: none;
}
.ht-stack-chip:hover { border-color: var(--accent); color: var(--text); }

.ht-section-h2 {
  font-family: var(--display);
  font-size: clamp(24px, 2.6vw, 32px);
  letter-spacing: -0.01em;
  margin: 56px 0 20px;
}

.ht-steps { display: flex; flex-direction: column; gap: 16px; }
.ht-step {
  background: var(--bg-2); border: 1px solid var(--line);
  border-radius: 16px; padding: 24px;
  display: grid; grid-template-columns: 56px 1fr; gap: 20px;
}
.ht-step-n {
  width: 44px; height: 44px;
  border-radius: 12px;
  background: var(--text); color: var(--bg);
  font-family: var(--display); font-size: 20px; font-weight: 600;
  display: flex; align-items: center; justify-content: center;
}
.ht-step-body h3 {
  font-family: var(--display); font-size: 22px;
  margin: 0 0 6px; line-height: 1.2;
}
.ht-step-tool {
  display: inline-flex; align-items: center; gap: 8px;
  background: var(--bg); border: 1px solid var(--line);
  padding: 6px 10px 6px 6px; border-radius: 8px;
  font-size: 14px; color: var(--text); font-weight: 500;
  text-decoration: none; margin-bottom: 14px;
}
.ht-step-tool:hover { border-color: var(--accent); }

/* Small logo sizes for how-to context */
.tl.tl-22 { width: 22px; height: 22px; border-radius: 5px; }
.tl.tl-18 { width: 18px; height: 18px; border-radius: 4px; }
.tl.tl-22, .tl.tl-18 {
  display: inline-flex; align-items: center; justify-content: center;
  flex-shrink: 0; overflow: hidden;
  background: var(--tl-bg, #999);
}
.tl.tl-22 img, .tl.tl-18 img {
  width: 100%; height: 100%; object-fit: contain;
  opacity: 0; transition: opacity 0.2s;
}
.tl.tl-22 img.loaded, .tl.tl-18 img.loaded { opacity: 1; }
.tl.tl-fallback {
  color: white; font-size: 11px; font-weight: 600; font-family: var(--display);
}
.ht-step-what { color: var(--text); margin: 0 0 10px; line-height: 1.55; }
.ht-step-why { color: var(--text-2); font-size: 14px; line-height: 1.55; margin: 0 0 14px; }
.ht-step-alts { font-size: 13px; color: var(--text-3); }
.ht-step-alts strong { color: var(--text-2); font-weight: 500; }
.ht-step-alts a { color: var(--text-2); text-decoration: none; border-bottom: 1px dotted var(--line); }
.ht-step-alts a:hover { color: var(--accent); border-color: var(--accent); }

.ht-skip {
  background: var(--bg-2); border: 1px solid var(--line);
  border-radius: 16px; padding: 24px; margin-top: 12px;
}
.ht-skip-row {
  display: grid; grid-template-columns: 200px 1fr; gap: 16px;
  padding: 14px 0; border-bottom: 1px solid var(--line);
}
.ht-skip-row:last-child { border-bottom: none; }
.ht-skip-tool { font-weight: 600; color: var(--text); }
.ht-skip-reason { color: var(--text-2); line-height: 1.5; font-size: 14px; }

.ht-tiers {
  display: grid; gap: 16px;
  grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
}
.ht-tier {
  background: var(--bg-2); border: 1px solid var(--line);
  border-radius: 16px; padding: 24px;
  display: flex; flex-direction: column; gap: 12px;
}
.ht-tier.featured { border-color: var(--accent); position: relative; }
.ht-tier.featured::before {
  content: 'Recommended';
  position: absolute; top: -10px; right: 16px;
  background: var(--accent); color: var(--bg);
  font-size: 11px; padding: 3px 10px; border-radius: 999px;
  letter-spacing: 0.06em; text-transform: uppercase;
}
.ht-tier-name { font-size: 13px; letter-spacing: 0.1em; text-transform: uppercase; color: var(--text-3); margin: 0; }
.ht-tier-price { font-family: var(--display); font-size: 32px; font-weight: 600; line-height: 1; margin: 4px 0 0; }
.ht-tier-price small { font-size: 14px; color: var(--text-3); font-weight: 400; }
.ht-tier-tradeoff { color: var(--text-2); font-size: 14px; line-height: 1.5; margin: 0; padding-bottom: 12px; border-bottom: 1px solid var(--line); }
.ht-tier-tools { list-style: none; padding: 0; margin: 0; font-size: 14px; color: var(--text-2); }
.ht-tier-tools li { padding: 6px 0; }

.ht-cta-card {
  background: var(--bg-2); border: 1px solid var(--line);
  border-radius: 16px; padding: 32px;
  text-align: center; margin-top: 56px;
}
.ht-cta-card h3 { font-family: var(--display); font-size: 24px; margin: 0 0 8px; }
.ht-cta-card p { color: var(--text-2); margin: 0 0 18px; }

.ht-feedback {
  display: flex; gap: 8px; justify-content: center;
  padding: 20px; margin-top: 24px;
  border-top: 1px solid var(--line);
}
.ht-feedback-btn {
  background: var(--bg-2); border: 1px solid var(--line);
  font-size: 13px; padding: 8px 18px; border-radius: 999px;
  color: var(--text-2); cursor: pointer;
}
.ht-feedback-btn.active { background: var(--text); color: var(--bg); border-color: var(--text); }

@media (max-width: 600px) {
  .ht-step { grid-template-columns: 40px 1fr; gap: 14px; padding: 18px; }
  .ht-step-n { width: 32px; height: 32px; font-size: 16px; }
  .ht-skip-row { grid-template-columns: 1fr; gap: 4px; }
  .ht-skip-tool { font-size: 14px; }
}
