.help { max-width: 1120px; }
.help-layout { min-width: 0; display: grid; grid-template-columns: 250px minmax(0, 1fr); gap: 36px; align-items: start; }
.help-index { position: sticky; top: 24px; display: grid; gap: 14px; min-width: 0; }
.help-index nav { min-width: 0; }
.help-index ol { list-style: none; margin: 0; padding: 0; display: grid; gap: 1px; }
.help-index a {
  display: flex; align-items: center; gap: 10px; padding: 8px 10px; border-radius: var(--r-sm);
  color: var(--text-2); text-decoration: none; font-size: .9rem; font-weight: 500;
}
.help-index a svg { width: 17px; height: 17px; flex: none; color: var(--text-3); }
.help-index a:hover { background: var(--surface-2); color: var(--text); }
.help-index a.on { background: var(--primary-soft); color: var(--primary); font-weight: 600; }
.help-index a.on svg { color: var(--primary); }

.help-search { position: relative; display: flex; align-items: center; }
.help-search svg { position: absolute; left: 12px; width: 17px; height: 17px; color: var(--text-3); pointer-events: none; }
.help-search input { width: 100%; padding: 10px 34px 10px 38px; border-radius: var(--r-pill); }
.help-search button { position: absolute; right: 6px; width: 26px; height: 26px; border: 0; border-radius: 50%; background: none; color: var(--text-3); display: grid; place-items: center; cursor: pointer; }
.help-search button svg { position: static; width: 15px; height: 15px; }

.help-main { min-width: 0; display: grid; gap: 24px; }
.help-hero h1 { margin: 0 0 6px; }
.help-cards { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: repeat(auto-fill, minmax(260px, 1fr)); gap: 10px; }
.help-card {
  display: flex; gap: 14px; align-items: flex-start; padding: 16px; height: 100%; border-radius: var(--r-lg);
  background: var(--surface); border: 1px solid var(--border); text-decoration: none; color: var(--text);
}
.help-card:hover { border-color: var(--border-strong); box-shadow: var(--shadow-md); }
.help-card > span:last-child { display: grid; gap: 4px; }
.help-card small { color: var(--text-2); font-size: .85rem; line-height: 1.4; }
.help-card-icon { width: 40px; height: 40px; border-radius: 12px; flex: none; display: grid; place-items: center; background: var(--primary-soft); color: var(--primary); }
.help-card-icon svg { width: 20px; height: 20px; }
.help-card-icon.is-large { width: 56px; height: 56px; border-radius: 16px; }
.help-card-icon.is-large svg { width: 28px; height: 28px; }

.help-chapter { display: grid; gap: 28px; max-width: 72ch; }
.help-chapter-head { display: flex; gap: 18px; align-items: flex-start; }
.help-chapter-head small { color: var(--primary); font-weight: 600; font-size: .85rem; }
.help-chapter-head h1 { margin: 2px 0 6px; }
.help-chapter-head .lede { margin: 0; }
.help-toc { display: flex; flex-wrap: wrap; gap: 6px; padding-bottom: 4px; }
.help-toc a { font-size: .85rem; padding: 5px 12px; border-radius: var(--r-pill); background: var(--surface-2); color: var(--text-2); text-decoration: none; font-weight: 500; }
.help-toc a:hover { background: var(--primary-soft); color: var(--primary); }

.help-section { display: grid; gap: 10px; scroll-margin-top: 24px; }
.help-section h2 { margin: 0; font-size: 1.25rem; }
.help-anchor { color: inherit; text-decoration: none; }
.help-anchor:hover { color: var(--primary); }
.help-section p { margin: 0; line-height: 1.65; color: var(--text); }
.help-steps { margin: 0; padding: 0; list-style: none; counter-reset: step; display: grid; gap: 8px; }
.help-steps li { counter-increment: step; display: grid; grid-template-columns: 28px 1fr; gap: 10px; align-items: start; line-height: 1.55; }
.help-steps li::before {
  content: counter(step); width: 26px; height: 26px; border-radius: 50%; display: grid; place-items: center;
  background: var(--primary); color: var(--on-primary); font-weight: 700; font-size: .8rem; margin-top: 1px;
}
.help-example { border-radius: var(--r-md); padding: 12px 16px; background: var(--primary-soft); border-left: 3px solid var(--primary); display: grid; gap: 4px; }
.help-example > span { display: inline-flex; align-items: center; gap: 6px; font-size: .78rem; font-weight: 700; color: var(--primary); }
.help-example > span svg { width: 14px; height: 14px; }
.help-example p { font-size: .95rem; }
.help-tip { display: flex; gap: 8px; align-items: flex-start; font-size: .92rem; color: var(--text-2) !important; }
.help-tip svg { width: 17px; height: 17px; flex: none; color: var(--star); margin-top: 3px; }

.help-visual { display: flex; flex-wrap: wrap; gap: 18px; padding: 16px; border-radius: var(--r-lg); background: var(--surface); border: 1px solid var(--border); }
.help-visual.is-wide { display: block; padding: 0; border: 0; background: none; }
.help-visual figure { margin: 0; display: grid; justify-items: center; gap: 6px; }
.help-visual figcaption { font-size: .8rem; color: var(--text-2); font-weight: 500; }
.help-status { list-style: none; margin: 0; padding: 12px 16px; display: grid; gap: 8px; border-radius: var(--r-lg); background: var(--surface); border: 1px solid var(--border); }
.help-status li { display: grid; grid-template-columns: 14px 140px 1fr; gap: 10px; align-items: center; font-size: .9rem; }
.help-status span { color: var(--text-2); }
.help-ranking { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }
.help-ranking div { display: grid; gap: 2px; padding: 12px 14px; border-radius: var(--r-md); background: var(--surface); border: 1px solid var(--border); }
.help-ranking div.is-first { border-color: var(--star); box-shadow: 0 0 0 1px var(--star); }
.help-ranking strong { font-family: var(--font-display); font-size: 1.5rem; }
.help-ranking small { color: var(--text-2); }
.help-ranking em { font-style: normal; font-weight: 600; color: var(--primary); font-size: .88rem; }

.help-results { display: grid; gap: 12px; }
.help-results h1 { font-size: 1.4rem; margin: 0; }
.help-results ul { list-style: none; margin: 0; padding: 0; display: grid; gap: 8px; }
.help-hit { display: grid; gap: 2px; padding: 12px 16px; border-radius: var(--r-md); background: var(--surface); border: 1px solid var(--border); text-decoration: none; color: var(--text); }
.help-hit:hover { border-color: var(--border-strong); }
.help-hit small { color: var(--primary); font-weight: 600; font-size: .78rem; }
.help-hit span { color: var(--text-2); font-size: .9rem; }

.help-pager { display: flex; justify-content: space-between; gap: 12px; padding-top: 10px; border-top: 1px solid var(--border); }
.help-pager a { display: flex; align-items: center; gap: 8px; padding: 10px 12px; border-radius: var(--r-md); text-decoration: none; color: var(--text); font-weight: 600; }
.help-pager a:hover { background: var(--surface-2); }
.help-pager a span { display: grid; }
.help-pager a small { color: var(--text-2); font-weight: 500; font-size: .78rem; }
.help-pager a.is-next { text-align: right; margin-left: auto; }
.help-pager svg { width: 18px; height: 18px; color: var(--text-3); }

@media (max-width: 860px) {
  .help-layout { grid-template-columns: minmax(0, 1fr); gap: 18px; }
  .help-chapter, .help-section { min-width: 0; }
  .help-index { position: static; }
  .help-index ol { display: flex; gap: 6px; overflow-x: auto; padding-bottom: 4px; scrollbar-width: none; }
  .help-index a { white-space: nowrap; background: var(--surface-2); border-radius: var(--r-pill); padding: 6px 12px; font-size: .85rem; }
  .help-status li { grid-template-columns: 14px 1fr; }
  .help-status span { grid-column: 2; }
  .help-chapter-head .help-card-icon { display: none; }
}
