/* help.css — /p/help, the member handbook. Single page, sidebar-docs
   layout: sticky TOC on desktop, horizontal pill scroller on mobile. */

*, *::before, *::after { box-sizing: border-box; }

body { background: var(--space-gradient), var(--bg-primary); background-repeat: no-repeat; background-attachment: fixed; color: var(--text-primary); font-family: var(--font-thai); margin: 0; }

.hlp-page {
  position: relative;
  z-index: 1;
  min-height: calc(100vh - var(--navbar-h));
  min-height: calc(100dvh - var(--navbar-h));
  padding: 40px 20px 20px;
  display: flex;
  flex-direction: column;
  align-items: center;
}

.hlp-hero { text-align: center; max-width: 620px; margin-bottom: 24px; }
.hlp-hero h1 { font-size: 26px; font-weight: 700; margin: 0 0 8px; }
.hlp-hero p { font-size: 14px; color: var(--text-secondary); margin: 0 0 18px; }

.hlp-search {
  display: flex; align-items: center; gap: 8px;
  background: var(--bg-elevated);
  border: 1px solid var(--border);
  border-radius: 12px;
  padding: 10px 14px;
  max-width: 480px;
  margin: 0 auto;
}
.hlp-search svg { flex: none; width: 16px; height: 16px; color: var(--text-secondary); }
.hlp-search input {
  flex: 1; background: transparent; border: none; outline: none;
  font: 400 14px var(--font-thai); color: var(--text-primary);
}
.hlp-search input::placeholder { color: var(--text-secondary); }

.hlp-chips { display: flex; flex-wrap: wrap; justify-content: center; gap: 8px; margin-top: 14px; }
.hlp-chip {
  font: 400 12px var(--font-thai); padding: 6px 12px; border-radius: 999px;
  border: 1px solid var(--border); background: transparent; color: var(--text-secondary);
  cursor: pointer;
}
.hlp-chip:hover { border-color: var(--accent-gold); color: var(--text-primary); }

.hlp-layout {
  width: 100%; max-width: 900px;
  display: grid; grid-template-columns: 190px 1fr; gap: 28px;
  align-items: start;
}

.hlp-toc {
  position: sticky; top: calc(var(--navbar-h) + 12px);
  display: flex; flex-direction: column; gap: 2px;
}
.hlp-toc a {
  display: flex; align-items: center; gap: 8px;
  padding: 8px 10px; border-radius: 8px;
  font-size: 13px; color: var(--text-secondary); text-decoration: none;
  line-height: 1.3;
}
.hlp-toc a svg { flex: none; width: 15px; height: 15px; }
.hlp-toc a:hover { background: var(--bg-elevated); color: var(--text-primary); }
.hlp-toc a.is-active { background: rgba(244, 161, 64, 0.14); color: var(--accent-gold); }
.hlp-toc-item[hidden] { display: none; }

.hlp-content { min-width: 0; display: flex; flex-direction: column; gap: 14px; }

.hlp-card {
  background: var(--bg-elevated);
  border: 1px solid var(--border);
  border-radius: 14px;
  padding: 20px 22px;
  scroll-margin-top: calc(var(--navbar-h) + 16px);
}
.hlp-card[hidden] { display: none; }

.hlp-card__head { display: flex; align-items: center; gap: 10px; margin-bottom: 4px; }
.hlp-card__head svg { flex: none; width: 20px; height: 20px; color: var(--accent-gold); }
.hlp-card__head h2 { font-size: 17px; font-weight: 700; margin: 0; }

.hlp-card__path {
  display: inline-flex; align-items: center; gap: 6px;
  margin: 0 0 16px;
  font-size: 12px; color: var(--text-secondary);
  text-decoration: none; font-family: var(--font-mono, monospace);
}
.hlp-card__path svg { flex: none; width: 12px; height: 12px; }
.hlp-card__path:hover { color: var(--accent-gold); }

.hlp-card__what { font-size: 13px; color: var(--text-secondary); line-height: 1.6; margin: 6px 0 10px; }

.hlp-block { margin-bottom: 14px; }
.hlp-block:last-child { margin-bottom: 0; }
.hlp-block__label {
  display: inline-flex; align-items: center; gap: 6px;
  font-size: 11px; font-weight: 700; letter-spacing: 0.02em;
  padding: 3px 9px; border-radius: 7px; margin-bottom: 8px;
}
.hlp-block--access .hlp-block__label { background: rgba(19, 205, 203, 0.15); color: var(--accent-teal); }
.hlp-block--add .hlp-block__label { background: rgba(122, 199, 110, 0.16); color: #7ac76e; }
.hlp-block--remove .hlp-block__label { background: rgba(224, 108, 96, 0.16); color: #e06c60; }
.hlp-block--note .hlp-block__label { background: rgba(244, 161, 64, 0.15); color: var(--accent-gold); }
.hlp-block--overview .hlp-block__label { background: rgba(var(--surface-rgb), 0.1); color: var(--text-secondary); }

.hlp-steps { margin: 0; padding-left: 20px; font-size: 13px; color: var(--text-primary); line-height: 1.7; }
.hlp-steps li { margin-bottom: 4px; }
.hlp-steps li:last-child { margin-bottom: 0; }
.hlp-note-text { font-size: 13px; color: var(--text-secondary); line-height: 1.7; margin: 0; }

.hlp-faq-list { display: flex; flex-direction: column; gap: 4px; }
.hlp-faq-item { padding-bottom: 4px; border-bottom: 1px solid var(--border); }
.hlp-faq-item:last-child { padding-bottom: 0; border-bottom: none; }
.hlp-faq-q {
  width: 100%; display: flex; align-items: center; justify-content: space-between; gap: 10px;
  background: transparent; border: none; padding: 10px 2px; text-align: left;
  font: 500 13px var(--font-thai); color: var(--text-primary); cursor: pointer;
}
.hlp-faq-q:hover { color: var(--accent-gold); }
.hlp-faq-q__chevron { flex: none; color: var(--text-secondary); font-size: 12px; transition: transform 0.15s ease; }
.hlp-faq-q.is-open .hlp-faq-q__chevron { transform: rotate(180deg); }
.hlp-faq-a { font-size: 13px; color: var(--text-secondary); line-height: 1.6; margin: 0 0 10px; }
.hlp-faq-a[hidden] { display: none; }
.hlp-faq-a strong, .hlp-note-text strong, .hlp-card__what strong, .hlp-steps strong { font-weight: 700; color: var(--text-primary); }

.hlp-contact {
  text-align: center; font-size: 13px; color: var(--text-secondary); line-height: 1.8;
}
.hlp-contact a { color: var(--accent-gold); text-decoration: none; }
.hlp-contact a:hover { text-decoration: underline; }

.hlp-empty { text-align: center; color: var(--text-secondary); font-size: 13px; padding: 24px 0; }

.hlp-page .lg-footer-link { margin-top: 32px; padding-top: 20px; }

.hlp-mobile-nav, .hlp-rail { display: none; }

@media (max-width: 760px) {
  .hlp-layout { grid-template-columns: 1fr; }
  .hlp-toc { display: none; }

  .hlp-mobile-nav {
    display: block;
    position: sticky; top: calc(var(--navbar-h) + 10px); z-index: 3;
    margin: 0 0 16px;
  }
  .hlp-mobile-nav__bar {
    width: 100%;
    display: flex; align-items: center; gap: 8px;
    background: var(--bg-secondary);
    border: 1px solid var(--accent-gold);
    border-radius: 10px;
    padding: 12px 14px;
    font: 500 14px var(--font-thai);
    color: var(--text-primary);
    cursor: pointer;
    box-shadow: 0 4px 10px rgba(0, 0, 0, 0.28);
  }
  .hlp-mobile-nav__bar:active { transform: scale(0.98); }
  .hlp-mobile-nav__bar.is-open { background: var(--bg-elevated); }
  .hlp-mobile-nav__icon { flex: none; width: 18px; height: 18px; color: var(--accent-gold); display: inline-flex; }
  .hlp-mobile-nav__icon svg { width: 18px; height: 18px; }
  .hlp-mobile-nav__label { flex: 1; text-align: left; }
  .hlp-mobile-nav__chevron { flex: none; color: var(--text-secondary); font-size: 12px; transition: transform 0.15s ease; }
  .hlp-mobile-nav__bar.is-open .hlp-mobile-nav__chevron { transform: rotate(180deg); }

  .hlp-mobile-nav__panel {
    position: absolute; top: calc(100% + 6px); left: 0; right: 0;
    background: var(--bg-elevated);
    border: 1px solid var(--border);
    border-radius: 10px;
    padding: 6px;
    max-height: 60vh; overflow-y: auto;
  }
  .hlp-mobile-nav__panel[hidden] { display: none; }
  .hlp-mobile-nav__panel a {
    display: flex; align-items: center; gap: 10px;
    padding: 10px 10px; border-radius: 8px;
    font-size: 13px; color: var(--text-secondary); text-decoration: none;
  }
  .hlp-mobile-nav__panel a svg { flex: none; width: 16px; height: 16px; }
  .hlp-mobile-nav__panel a.is-active { background: rgba(244, 161, 64, 0.14); color: var(--accent-gold); }
  .hlp-mobile-nav__panel a[hidden] { display: none; }

  .hlp-rail {
    display: flex; flex-direction: column; gap: 8px;
    position: fixed; right: 9px; bottom: 22px;
    z-index: 3;
  }
  .hlp-rail__dot {
    width: 6px; height: 6px; padding: 0; border-radius: 50%;
    border: none; background: rgba(var(--surface-rgb), 0.2);
    cursor: pointer;
  }
  .hlp-rail__dot.is-active { width: 8px; height: 8px; background: var(--accent-gold); opacity: 0.85; }
  .hlp-rail__dot[hidden] { display: none; }
}

@media (max-width: 600px) {
  .hlp-page { padding: 28px 16px 16px; }
  .hlp-hero h1 { font-size: 22px; }
  .hlp-card { padding: 16px 16px; }
}
