/* help-articles.css — page-specific styles for help-articles.html
   (base tokens/resets come from css/index.css; nav/footer styles come
   from css/nav-footer.css) */

/* ── PAGE SCOPED STYLES ─────────────────────── */
.ha-page { margin-top: var(--nav-h); }

/* Page hero */
.ha-hero {
  background: linear-gradient(145deg, var(--green-900), #0c3520);
  padding: 56px 32px 56px;
  color: white;
}
.ha-hero-inner { max-width: 1280px; margin: 0 auto; }
.ha-breadcrumb {
  display: flex; align-items: center; gap: 6px;
  font-size: .78rem; color: rgba(255,255,255,.5);
  margin-bottom: 20px; flex-wrap: wrap;
}
.ha-breadcrumb a { color: rgba(255,255,255,.5); transition: color .18s; }
.ha-breadcrumb a:hover { color: var(--green-400); }
.ha-breadcrumb-sep { color: rgba(255,255,255,.25); }
.ha-hero h1 {
  font-size: clamp(1.7rem, 3vw, 2.4rem);
  font-weight: 800; letter-spacing: -.03em; line-height: 1.15;
  margin-bottom: 10px;
}
.ha-hero p { font-size: 1rem; color: rgba(255,255,255,.68); line-height: 1.7; max-width: 600px; margin-bottom: 0; }

/* Filter bar */
.ha-filter-bar {
  background: white; border-bottom: 1px solid var(--border);
  padding: 14px 32px; position: sticky; top: var(--nav-h); z-index: 100;
  box-shadow: var(--shadow);
}
.ha-filter-inner {
  max-width: 1280px; margin: 0 auto;
  display: flex; align-items: center; gap: 10px; flex-wrap: wrap;
}
.ha-filter-label { font-size: .76rem; font-weight: 700; color: var(--text-light); text-transform: uppercase; letter-spacing: .07em; margin-right: 4px; }
.ha-filter-btn {
  padding: 6px 16px; border-radius: 100px;
  border: 1.5px solid var(--border); background: white;
  font-family: var(--font); font-size: .78rem; font-weight: 600;
  color: var(--text-muted); cursor: pointer;
  transition: all .18s;
}
.ha-filter-btn:hover { border-color: var(--green-400); color: var(--green-700); background: var(--green-50); }
.ha-filter-btn.active { border-color: var(--green-500); background: var(--green-500); color: white; }
.ha-filter-count { margin-left: auto; font-size: .78rem; color: var(--text-light); font-weight: 500; }

/* Main layout */
.ha-main { max-width: 1280px; margin: 0 auto; padding: 48px 32px 88px; display: grid; grid-template-columns: 1fr 300px; gap: 48px; align-items: start; }

/* Article list */
.ha-articles-list { display: flex; flex-direction: column; gap: 0; }

/* Article item */
.ha-article {
  background: white; border: 1.5px solid var(--border);
  border-radius: 14px; padding: 28px 28px;
  margin-bottom: 16px;
  transition: border-color .22s, box-shadow .22s;
  scroll-margin-top: calc(var(--nav-h) + 80px);
}
.ha-article:hover { border-color: var(--green-300); box-shadow: var(--shadow); }
.ha-article-header { display: flex; align-items: flex-start; gap: 16px; margin-bottom: 16px; }
.ha-article-icon {
  width: 44px; height: 44px; border-radius: 12px;
  display: flex; align-items: center; justify-content: center; flex-shrink: 0;
}
.ha-article-meta { flex: 1; }
.ha-article-version {
  display: inline-flex; align-items: center; gap: 6px;
  font-size: .68rem; font-weight: 800; text-transform: uppercase;
  letter-spacing: .08em; color: var(--green-700); margin-bottom: 4px;
}
.ha-article-version::before { content: ''; width: 5px; height: 5px; border-radius: 50%; background: var(--green-500); }
.ha-article-date { font-size: .75rem; color: var(--text-light); font-weight: 500; }
.ha-article h2 {
  font-size: 1.15rem; font-weight: 800; color: var(--green-900);
  letter-spacing: -.02em; line-height: 1.25; margin-bottom: 10px;
}
.ha-article-tags { display: flex; flex-wrap: wrap; gap: 6px; margin-bottom: 14px; }
.ha-article-tag {
  font-size: .67rem; font-weight: 800; padding: 3px 9px;
  border-radius: 100px; letter-spacing: .04em; text-transform: uppercase;
}
.tag-new    { background: #dcfce7; color: #15803d; }
.tag-fix    { background: #dbeafe; color: #1d4ed8; }
.tag-improve { background: #f3e8ff; color: #7c3aed; }
.tag-module { background: #fef3c7; color: #d97706; }
.tag-security { background: #fee2e2; color: #dc2626; }

.ha-article-lead {
  font-size: .97rem; color: var(--text-muted); line-height: 1.75;
  margin-bottom: 20px; padding-bottom: 20px;
  border-bottom: 1px solid var(--border);
}
.ha-article-body { font-size: .92rem; color: var(--text-muted); line-height: 1.8; }
.ha-article-body h3 {
  font-size: .95rem; font-weight: 800; color: var(--green-900);
  margin: 20px 0 8px; letter-spacing: -.01em;
}
.ha-article-body p { margin-bottom: 12px; }
.ha-article-body p:last-child { margin-bottom: 0; }
.ha-article-body ul { list-style: none; display: flex; flex-direction: column; gap: 6px; margin: 10px 0 14px; }
.ha-article-body li {
  display: flex; align-items: flex-start; gap: 9px;
  font-size: .88rem; color: var(--text-muted); line-height: 1.6;
}
.ha-article-body li::before {
  content: '';
  width: 18px; height: 18px; flex-shrink: 0; margin-top: 2px;
  background: var(--green-100);
  border-radius: 50%;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='10' height='10' viewBox='0 0 12 12'%3E%3Cpath d='M2 6l3 3 5-5' stroke='%2316a34a' stroke-width='1.8' stroke-linecap='round' stroke-linejoin='round' fill='none'/%3E%3C/svg%3E");
  background-repeat: no-repeat; background-position: center;
}
.ha-article-body strong { color: var(--text); font-weight: 700; }
.ha-article-body a { color: var(--green-600); font-weight: 600; text-decoration: underline; text-decoration-color: transparent; transition: text-decoration-color .18s; }
.ha-article-body a:hover { text-decoration-color: var(--green-500); }

/* Code block */
.ha-code {
  background: var(--green-900); color: #a3e635;
  border-radius: 8px; padding: 14px 16px;
  font-family: var(--mono); font-size: .82rem;
  line-height: 1.6; overflow-x: auto; margin: 10px 0 14px;
}

/* Read more toggle */
.ha-read-more-btn {
  display: inline-flex; align-items: center; gap: 6px;
  margin-top: 16px; padding: 8px 16px;
  background: var(--green-50); border: 1.5px solid var(--green-100);
  color: var(--green-700); font-size: .82rem; font-weight: 700;
  border-radius: var(--radius-sm); cursor: pointer;
  font-family: var(--font);
  transition: background .18s, border-color .18s;
}
.ha-read-more-btn:hover { background: var(--green-100); border-color: var(--green-400); }
.ha-article-extended { display: none; }
.ha-article-extended.expanded { display: block; animation: haFadeIn .3s ease; }
@keyframes haFadeIn { from { opacity: 0; transform: translateY(6px); } to { opacity: 1; transform: translateY(0); } }

/* Sidebar */
.ha-sidebar { position: sticky; top: calc(var(--nav-h) + 72px); display: flex; flex-direction: column; gap: 16px; }
.ha-sidebar-card { background: white; border: 1.5px solid var(--border); border-radius: 12px; padding: 20px; }
.ha-sidebar-title { font-size: .75rem; font-weight: 800; text-transform: uppercase; letter-spacing: .09em; color: var(--text-light); margin-bottom: 14px; }
.ha-toc-link {
  display: flex; align-items: center; justify-content: space-between;
  padding: 7px 10px; border-radius: 7px;
  font-size: .8rem; font-weight: 500; color: var(--text-muted);
  text-decoration: none; transition: background .15s, color .15s;
  border-left: 2px solid transparent;
}
.ha-toc-link:hover, .ha-toc-link.active { background: var(--green-50); color: var(--green-700); border-left-color: var(--green-500); }
.ha-toc-version { font-size: .67rem; color: var(--text-light); font-family: var(--mono); }
.ha-back-link {
  display: inline-flex; align-items: center; gap: 6px;
  font-size: .82rem; font-weight: 700; color: var(--green-600);
  text-decoration: none; padding: 9px 14px;
  background: var(--green-50); border: 1.5px solid var(--green-100);
  border-radius: 8px; transition: background .18s;
}
.ha-back-link:hover { background: var(--green-100); }
.ha-subscribe-form { display: flex; flex-direction: column; gap: 8px; margin-top: 4px; }
.ha-subscribe-input {
  width: 100%; padding: 9px 12px; border: 1.5px solid var(--border);
  border-radius: 8px; font-family: var(--font); font-size: .84rem;
  color: var(--text); background: var(--bg); outline: none;
  transition: border-color .18s;
}
.ha-subscribe-input:focus { border-color: var(--green-500); background: white; }
.ha-subscribe-btn {
  width: 100%; padding: 9px; background: var(--green-600); color: white;
  border: none; border-radius: 8px; font-family: var(--font);
  font-size: .84rem; font-weight: 700; cursor: pointer;
  transition: background .18s;
}
.ha-subscribe-btn:hover { background: var(--green-700); }
.ha-subscribe-btn:disabled {
  opacity: .6; cursor: not-allowed;
}
#ha-subscribe-error { line-height: 1.4; }

/* No results */
.ha-no-results { display: none; padding: 48px 20px; text-align: center; color: var(--text-light); font-size: .9rem; }

/* Responsive */
@media (max-width: 1024px) { .ha-main { grid-template-columns: 1fr; } .ha-sidebar { position: static; } }
@media (max-width: 768px) { .ha-hero { padding: 40px 20px; } .ha-filter-bar { padding: 12px 20px; } .ha-main { padding: 32px 20px 64px; } .ha-article { padding: 20px 18px; } }
