.hc main { overflow-x: clip; }

.hc-sr {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}

@keyframes hcrise {
  from { opacity: 0; transform: translateY(14px); }
  to   { opacity: 1; transform: none; }
}

@keyframes hcpop {
  0%   { transform: scale(0.4); opacity: 0; }
  55%  { transform: scale(1.25); opacity: 1; }
  75%  { transform: scale(0.92); }
  100% { transform: scale(1); }
}

@keyframes hcglow {
  0%, 100% { box-shadow: 0 0 0 0 rgba(255, 59, 92, 0); }
  50%      { box-shadow: 0 0 0 6px rgba(255, 59, 92, 0.14); }
}

.hc-in {
  animation: hcrise 0.55s cubic-bezier(0.2, 0.7, 0.2, 1) both;
  animation-delay: calc(var(--i, 0) * 55ms);
}

.hc-hero { padding-bottom: 10px; }
.hc-hero h1, .hc-article-head h1 { margin-top: 12px; overflow-wrap: anywhere; }
.hc-lead { max-width: 640px; margin-bottom: 22px; }

.hc-search {
  position: relative;
  display: flex;
  align-items: center;
  gap: 10px;
  max-width: 640px;
  padding: 6px 6px 6px 46px;
  border-radius: var(--r-pill);
  background: var(--surface);
  border: 1px solid var(--line-2);
  transition: border-color 0.18s ease, box-shadow 0.18s ease;
}
.hc-search:focus-within {
  border-color: rgba(255, 95, 126, 0.55);
  box-shadow: 0 0 0 4px rgba(255, 59, 92, 0.12);
}
.hc-search-icon {
  position: absolute;
  left: 17px;
  top: 50%;
  transform: translateY(-50%);
  color: var(--text-3);
  pointer-events: none;
}
.hc-search-input {
  flex: 1;
  min-width: 0;
  height: 44px;
  border: 0;
  outline: 0;
  background: transparent;
  color: var(--text);
  font: inherit;
  font-size: 16.5px;
}
.hc-search-input::placeholder { color: var(--text-4); }
.hc-search-input::-webkit-search-cancel-button { display: none; }
.hc-search-btn { min-height: 44px; padding: 0 20px; flex: none; }
.hc-clear {
  flex: none;
  display: grid;
  place-items: center;
  width: 34px;
  height: 34px;
  border: 0;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.07);
  color: var(--text-2);
  cursor: pointer;
}
.hc-clear:hover { background: rgba(255, 255, 255, 0.13); color: var(--text); }
.hc-clear[hidden] { display: none; }

.hc-search--small { max-width: none; padding: 4px 6px 4px 42px; margin-bottom: 16px; }
.hc-search--small .hc-search-icon { left: 15px; }
.hc-search--small .hc-search-input { height: 40px; font-size: 15.5px; }

.hc-section { padding: clamp(28px, 4vw, 44px) 0 clamp(56px, 8vw, 96px); }
.hc-h2 { font-size: clamp(22px, 2.6vw, 28px); margin-bottom: 18px; }

.hc-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(min(100%, 320px), 1fr));
  gap: 16px;
  margin-bottom: 40px;
}

.hc-cat {
  scroll-margin-top: 86px;
  transition: border-color 0.2s ease, transform 0.2s ease;
  min-width: 0;
}
.hc-cat:hover { border-color: var(--line-2); transform: translateY(-2px); }
.hc-cat:target { animation: hcglow 1.6s ease 2; border-color: rgba(255, 59, 92, 0.4); }
.hc-cat-head { display: flex; align-items: center; gap: 14px; margin-bottom: 14px; }
.hc-cat-head h3 { font-size: 19px; margin: 0 0 3px; }
.hc-cat-icon {
  flex: none;
  display: grid;
  place-items: center;
  width: 44px;
  height: 44px;
  border-radius: 14px;
  color: var(--pulse-2);
  background: rgba(255, 59, 92, 0.1);
  border: 1px solid rgba(255, 59, 92, 0.22);
}
.hc-count { font-size: 12.5px; color: var(--text-3); font-weight: 700; }
.hc-cat-list { list-style: none; margin: 0; padding: 0; }
.hc-cat-list li { border-top: 1px solid var(--line); }
.hc-cat-list a {
  display: block;
  padding: 10px 2px;
  color: var(--text-2);
  text-decoration: none;
  font-size: 15.5px;
  line-height: 1.4;
  overflow-wrap: anywhere;
  transition: color 0.15s ease, padding 0.15s ease;
}
.hc-cat-list a:hover { color: var(--text); padding-left: 6px; }

.hc-results { margin-bottom: 40px; max-width: 760px; }
.hc-results[hidden] { display: none; }
.hc-results-head { color: var(--text-3); font-weight: 700; font-size: 14px; margin-bottom: 12px; }
.hc-list { list-style: none; margin: 0; padding: 0; display: grid; gap: 10px; }
.hc-result a {
  display: block;
  padding: 16px 18px;
  border-radius: var(--r-card);
  background: var(--surface);
  border: 1px solid var(--line);
  text-decoration: none;
  transition: border-color 0.15s ease, background 0.15s ease;
  overflow-wrap: anywhere;
}
.hc-result a:hover { border-color: rgba(255, 95, 126, 0.45); background: var(--surface-3); }
.hc-result strong { display: block; color: var(--text); font-size: 17px; margin-bottom: 4px; }
.hc-result span { display: block; color: var(--text-2); font-size: 15px; line-height: 1.5; }
.hc-empty { color: var(--text-2); }
.hc-empty[hidden] { display: none; }
.hc-topics[hidden] { display: none; }

.hc-contact { max-width: 760px; }
.hc-contact-title { font-size: clamp(21px, 2.4vw, 26px); margin: 10px 0 10px; }
.hc-contact-actions { display: flex; flex-wrap: wrap; gap: 10px; margin-top: 16px; }
.hc-contact-actions .btn { min-height: 46px; }

.hc-crumbs ol { list-style: none; margin: 0; padding: 0; display: flex; flex-wrap: wrap; gap: 6px; font-size: 13.5px; font-weight: 700; }
.hc-crumbs li { color: var(--text-3); }
.hc-crumbs li + li::before { content: '›'; margin-right: 6px; color: var(--text-4); }
.hc-crumbs a { color: var(--text-3); text-decoration: none; }
.hc-crumbs a:hover { color: var(--text); }

.hc-article-grid {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 300px;
  gap: 40px;
  align-items: start;
}
.hc-article-main { min-width: 0; }
.hc-prose { max-width: 720px; overflow-wrap: anywhere; }
.hc-prose > :first-child { margin-top: 0; }
.hc-prose h2 { font-size: clamp(21px, 2.4vw, 25px); margin: 34px 0 12px; }
.hc-prose h3 { font-size: 18px; margin: 26px 0 8px; }
.hc-prose code {
  font-family: 'Space Grotesk', ui-monospace, monospace;
  font-size: 0.92em;
  padding: 1px 6px;
  border-radius: 6px;
  background: rgba(255, 255, 255, 0.07);
}
.hc-prose pre { overflow-x: auto; padding: 14px; border-radius: 12px; background: var(--surface); }
.hc-prose table { display: block; overflow-x: auto; }
.hc-prose img { border-radius: 12px; }
.hc-prose blockquote {
  margin: 20px 0;
  padding: 14px 18px;
  border-left: 3px solid var(--pulse);
  background: rgba(255, 59, 92, 0.06);
  border-radius: 0 12px 12px 0;
}
.hc-prose blockquote p { color: var(--text); }

.hc-note {
  padding: 12px 16px;
  border-radius: 12px;
  border: 1px solid rgba(255, 209, 102, 0.3);
  background: rgba(255, 209, 102, 0.06);
  color: var(--gold);
  font-size: 14.5px;
  margin-bottom: 22px;
}

.hc-feedback { margin-top: 40px; max-width: 720px; }
.hc-feedback-q { color: var(--text); font-weight: 800; font-size: 17px; margin-bottom: 12px; }
.hc-feedback-actions { display: flex; flex-wrap: wrap; gap: 10px; }
.hc-vote { min-height: 44px; padding: 0 20px; }
.hc-vote:hover { border-color: rgba(255, 95, 126, 0.45); }
.hc-vote[disabled] { opacity: 0.5; cursor: default; }
.hc-feedback-done { display: flex; align-items: center; gap: 12px; margin: 0; color: var(--text); font-weight: 700; }
.hc-feedback-done[hidden] { display: none; }
.hc-feedback.is-done .hc-feedback-q,
.hc-feedback.is-done .hc-feedback-actions { display: none; }
.hc-heart {
  flex: none;
  width: 26px;
  height: 26px;
  background: var(--grad-pulse);
  -webkit-mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'%3E%3Cpath d='M12 21s-8-5-8-11a4.5 4.5 0 0 1 8-2.8A4.5 4.5 0 0 1 20 10c0 6-8 11-8 11z'/%3E%3C/svg%3E") center / contain no-repeat;
  mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'%3E%3Cpath d='M12 21s-8-5-8-11a4.5 4.5 0 0 1 8-2.8A4.5 4.5 0 0 1 20 10c0 6-8 11-8 11z'/%3E%3C/svg%3E") center / contain no-repeat;
  animation: hcpop 0.6s cubic-bezier(0.2, 0.7, 0.2, 1) both, pgbeat 1.1s 0.6s 3;
}

.hc-aside { position: sticky; top: 86px; min-width: 0; }
.hc-related h2.hc-related-title {
  font-size: 10.5px;
  font-weight: 900;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: var(--text-3);
  margin-bottom: 10px;
  line-height: 1.5;
}
.hc-related ul { list-style: none; margin: 0; padding: 0; }
.hc-related li { border-top: 1px solid var(--line); }
.hc-related a { display: block; padding: 10px 0; color: var(--text-2); text-decoration: none; font-size: 15px; line-height: 1.4; }
.hc-related a:hover { color: var(--text); }
.hc-related { padding: 20px; margin-bottom: 16px; }
.hc-back { display: inline-block; font-weight: 700; font-size: 14.5px; text-decoration: none; }
.hc-back::before { content: '‹ '; }

.hc-article-section .hc-contact { margin-top: 48px; }

.hc-foot-brand { margin-bottom: 12px; }
.hc-tagline { max-width: 46ch; }
.hc-rule { margin-bottom: 22px; }
.hc-company { color: rgba(255, 255, 255, 0.6); }

@media (max-width: 900px) {
  .hc-article-grid { grid-template-columns: minmax(0, 1fr); gap: 28px; }
  .hc-aside { position: static; }
}

@media (max-width: 560px) {
  .hc-search { padding-left: 42px; }
  .hc-search-icon { left: 15px; }
  .hc-search-btn { display: none; }
  .hc .card { padding: 20px; }
}

@media (prefers-reduced-motion: reduce) {
  .hc-in { animation: none; opacity: 1; transform: none; }
  .hc-cat:hover { transform: none; }
  .hc-cat-list a:hover { padding-left: 2px; }
  .hc-heart { animation: none; }
  .hc-cat:target { animation: none; }
}
