:root {
  --help-ink: #102033;
  --help-muted: #64748b;
  --help-line: rgba(37, 99, 235, 0.14);
  --help-brand: #2563eb;
  --help-brand-dark: #1d4ed8;
  --help-soft: #f5f8ff;
  --help-panel: #ffffff;
  --help-shadow: 0 18px 45px rgba(15, 23, 42, 0.1);
  --site-header-shell-height: 4.15rem;
}

* {
  box-sizing: border-box;
}

body {
  margin: 0;
  color: var(--help-ink);
  background: #ffffff;
  font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
}

a {
  color: inherit;
}

.help-main {
  background:
    radial-gradient(circle at 12% 4%, rgba(37, 99, 235, 0.08), transparent 34rem),
    linear-gradient(180deg, #f8fbff 0%, #ffffff 46%);
}

.help-shell {
  width: min(1180px, calc(100% - 32px));
  margin: 0 auto;
}

.help-hero {
  padding: 72px 0 34px;
  text-align: center;
}

.help-eyebrow {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  margin-bottom: 16px;
  color: var(--help-brand-dark);
  font-size: 0.78rem;
  font-weight: 900;
  letter-spacing: 0.12em;
  text-transform: uppercase;
}

.help-hero h1 {
  margin: 0;
  color: #0f172a;
  font-size: clamp(2.4rem, 5vw, 4.6rem);
  line-height: 1;
  letter-spacing: 0;
}

.help-hero p {
  width: min(760px, 100%);
  margin: 18px auto 0;
  color: var(--help-muted);
  font-size: clamp(1rem, 2vw, 1.18rem);
  line-height: 1.7;
}

.help-search {
  position: relative;
  width: min(860px, 100%);
  margin: 30px auto 0;
}

.help-search input {
  width: 100%;
  min-height: 66px;
  border: 1px solid rgba(37, 99, 235, 0.18);
  border-radius: 8px;
  padding: 0 58px 0 24px;
  color: #0f172a;
  background: rgba(255, 255, 255, 0.94);
  box-shadow: var(--help-shadow);
  font: inherit;
  font-size: 1.02rem;
  outline: none;
}

.help-search input:focus {
  border-color: var(--help-brand);
  box-shadow: 0 0 0 4px rgba(37, 99, 235, 0.12), var(--help-shadow);
}

.help-search__icon {
  position: absolute;
  top: 50%;
  right: 22px;
  width: 22px;
  height: 22px;
  transform: translateY(-50%);
  border: 2px solid var(--help-brand);
  border-radius: 50%;
}

.help-search__icon::after {
  content: "";
  position: absolute;
  right: -7px;
  bottom: -5px;
  width: 9px;
  height: 2px;
  background: var(--help-brand);
  transform: rotate(45deg);
  border-radius: 999px;
}

.help-search-results {
  display: none;
  position: absolute;
  z-index: 20;
  top: calc(100% + 10px);
  left: 0;
  right: 0;
  overflow: hidden;
  border: 1px solid var(--help-line);
  border-radius: 8px;
  background: #fff;
  box-shadow: var(--help-shadow);
  text-align: left;
}

.help-search-results.is-open {
  display: block;
}

.search-result {
  display: block;
  padding: 16px 18px;
  text-decoration: none;
  border-bottom: 1px solid #eef4ff;
}

.search-result:last-child {
  border-bottom: 0;
}

.search-result:hover {
  background: #f8fbff;
}

.search-result strong {
  display: block;
  margin-bottom: 5px;
}

.search-result span,
.search-result small {
  display: block;
  color: var(--help-muted);
  line-height: 1.5;
}

.help-section {
  padding: 34px 0 78px;
}

.help-section__head {
  display: flex;
  justify-content: space-between;
  align-items: end;
  gap: 20px;
  margin-bottom: 22px;
}

.help-section__head h2 {
  margin: 0;
  color: #0f172a;
  font-size: clamp(1.7rem, 3vw, 2.2rem);
}

.help-section__head p {
  margin: 8px 0 0;
  color: var(--help-muted);
}

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

.collection-card,
.group-card,
.related-card,
.article-list-item {
  border: 1px solid var(--help-line);
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.94);
  box-shadow: 0 10px 28px rgba(15, 23, 42, 0.06);
}

.collection-card {
  display: grid;
  grid-template-columns: auto 1fr auto;
  gap: 15px;
  min-height: 168px;
  padding: 22px;
  text-decoration: none;
  transition: transform 180ms ease, box-shadow 180ms ease, border-color 180ms ease;
}

.collection-card:hover,
.article-list-item:hover,
.related-card:hover {
  transform: translateY(-3px);
  border-color: rgba(37, 99, 235, 0.32);
  box-shadow: var(--help-shadow);
}

.collection-icon {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 46px;
  height: 46px;
  border-radius: 8px;
  color: var(--help-brand-dark);
  background: linear-gradient(135deg, #eaf2ff, #ffffff);
  border: 1px solid rgba(37, 99, 235, 0.14);
  font-weight: 900;
  text-transform: uppercase;
}

.collection-card h3,
.group-card h2,
.article-list-item h3,
.related-card h3 {
  margin: 0;
  color: #0f172a;
  letter-spacing: 0;
}

.collection-card p,
.group-card p,
.article-list-item p,
.related-card p {
  color: var(--help-muted);
  line-height: 1.55;
}

.collection-card p {
  margin: 8px 0 12px;
}

.collection-card small,
.help-meta {
  color: var(--help-muted);
  font-size: 0.88rem;
}

.chevron {
  color: var(--help-brand);
  font-weight: 900;
}

.state {
  padding: 28px;
  border: 1px solid var(--help-line);
  border-radius: 8px;
  background: #fff;
  color: var(--help-muted);
  text-align: center;
}

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

.skeleton-card {
  min-height: 160px;
  border-radius: 8px;
  background: linear-gradient(90deg, #eef4ff 0%, #ffffff 50%, #eef4ff 100%);
  background-size: 220% 100%;
  animation: helpShimmer 1.2s infinite;
  border: 1px solid var(--help-line);
}

@keyframes helpShimmer {
  to {
    background-position: -220% 0;
  }
}

.breadcrumb {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  align-items: center;
  color: var(--help-muted);
  font-size: 0.92rem;
}

.breadcrumb a {
  color: var(--help-brand-dark);
  text-decoration: none;
  font-weight: 800;
}

.collection-header,
.article-header {
  padding: 54px 0 30px;
}

.collection-title-row {
  display: flex;
  align-items: center;
  gap: 18px;
  margin-top: 22px;
}

.collection-header h1,
.article-header h1 {
  margin: 0;
  color: #0f172a;
  font-size: clamp(2.2rem, 4vw, 3.8rem);
  line-height: 1.06;
}

.collection-header p,
.article-header p {
  width: min(760px, 100%);
  color: var(--help-muted);
  line-height: 1.7;
  font-size: 1.06rem;
}

.group-stack {
  display: grid;
  gap: 18px;
  padding-bottom: 80px;
}

.group-card {
  padding: 22px;
}

.article-list {
  display: grid;
  gap: 10px;
  margin-top: 16px;
}

.article-list-item {
  display: grid;
  grid-template-columns: 1fr auto;
  gap: 14px;
  padding: 16px 18px;
  text-decoration: none;
}

.article-list-item p {
  margin: 6px 0 0;
}

.article-layout {
  display: grid;
  grid-template-columns: minmax(0, 760px) 280px;
  align-items: start;
  gap: 54px;
  padding-bottom: 82px;
}

.article-content {
  border: 1px solid var(--help-line);
  border-radius: 8px;
  background: #fff;
  box-shadow: 0 12px 34px rgba(15, 23, 42, 0.06);
  padding: clamp(24px, 4vw, 46px);
}

.article-content h2,
.article-content h3,
.article-content h4 {
  margin: 1.8em 0 0.55em;
  color: #0f172a;
  letter-spacing: 0;
}

.article-content h2:first-child {
  margin-top: 0;
}

.article-content p,
.article-content li {
  color: #334155;
  line-height: 1.8;
}

.article-content a {
  color: var(--help-brand-dark);
  font-weight: 800;
}

.article-content img {
  max-width: 100%;
  height: auto;
  border-radius: 8px;
  border: 1px solid var(--help-line);
}

.article-content pre {
  overflow: auto;
  padding: 16px;
  border-radius: 8px;
  color: #dbeafe;
  background: #0f172a;
}

.article-content code {
  border-radius: 6px;
  padding: 2px 6px;
  color: #1d4ed8;
  background: #eef4ff;
}

.article-content pre code {
  padding: 0;
  color: inherit;
  background: transparent;
}

.article-content blockquote {
  margin: 24px 0;
  padding: 16px 18px;
  border-left: 4px solid var(--help-brand);
  background: #f8fbff;
  color: #334155;
}

.article-content table {
  width: 100%;
  border-collapse: collapse;
  margin: 22px 0;
}

.article-content th,
.article-content td {
  padding: 12px;
  border: 1px solid #dbeafe;
  text-align: left;
}

.toc-panel {
  position: sticky;
  top: calc(var(--site-header-shell-height) + 24px);
  border: 1px solid var(--help-line);
  border-radius: 8px;
  background: #fff;
  padding: 18px;
}

.toc-panel h2 {
  margin: 0 0 12px;
  font-size: 0.82rem;
  color: #475569;
  letter-spacing: 0.1em;
  text-transform: uppercase;
}

.toc-panel a {
  display: block;
  padding: 8px 0;
  color: var(--help-muted);
  text-decoration: none;
  line-height: 1.4;
}

.toc-panel a[data-level="3"] {
  padding-left: 14px;
}

.toc-panel a:hover,
.toc-panel a.is-active {
  color: var(--help-brand-dark);
}

.related-section,
.feedback-box {
  margin-top: 28px;
}

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

.related-card {
  padding: 18px;
  text-decoration: none;
}

.feedback-box {
  border: 1px solid var(--help-line);
  border-radius: 8px;
  padding: 22px;
  background: #f8fbff;
}

.feedback-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
}

.help-button {
  min-height: 42px;
  border: 0;
  border-radius: 8px;
  padding: 10px 16px;
  color: #fff;
  background: var(--help-brand);
  font-weight: 900;
  cursor: pointer;
}

.help-button:hover {
  background: var(--help-brand-dark);
}

.help-button--ghost {
  color: var(--help-brand-dark);
  background: #eaf2ff;
}

@media (max-width: 960px) {
  .collection-grid,
  .skeleton-grid,
  .related-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .article-layout {
    grid-template-columns: 1fr;
  }

  .toc-panel {
    display: none;
  }
}

@media (max-width: 640px) {
  .help-shell {
    width: min(100% - 24px, 1180px);
  }

  .help-hero {
    padding-top: 46px;
  }

  .collection-grid,
  .skeleton-grid,
  .related-grid {
    grid-template-columns: 1fr;
  }

  .collection-card {
    grid-template-columns: auto 1fr;
  }

  .collection-card .chevron {
    display: none;
  }
}
