/* ============================================================
   Vivarcus Help Center — docs layout
   Loads after style.css (brand tokens, base typography).
   ============================================================ */

/* ---------- shared page chrome ---------- */

.help-page {
  background: var(--surface-1, #f7f9fc);
  color: var(--color-text, #334155);
}

.help-header {
  position: sticky;
  top: 0;
  z-index: 50;
  background: rgba(255, 255, 255, 0.92);
  backdrop-filter: blur(8px);
  border-bottom: 1px solid var(--line, #e6eaf0);
}

.help-header__inner {
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 24px;
  height: 56px;
  display: flex;
  align-items: center;
  gap: 12px;
}

.help-header__brand {
  text-decoration: none;
  font-weight: 700;
  font-size: 1.05rem;
  letter-spacing: -0.01em;
}

.help-header__logo-dark { color: var(--ink, #101828); }
.help-header__logo-accent { color: var(--brand, #f58220); }

.help-header__divider { color: var(--slate-400, #94a3b8); }

.help-header__help-label {
  color: var(--slate-500, #64748b);
  font-weight: 600;
  text-decoration: none;
}
.help-header__help-label:hover { color: var(--brand, #f58220); }

.help-header__actions {
  margin-left: auto;
  display: flex;
  align-items: center;
  gap: 16px;
}

.help-header__trial {
  color: var(--slate-600, #475569);
  font-weight: 500;
  text-decoration: none;
  font-size: 0.9rem;
}
.help-header__trial:hover { color: var(--brand, #f58220); }

.help-header__lang {
  border: 1px solid var(--line, #e6eaf0);
  border-radius: 6px;
  padding: 4px 12px;
  font-size: 0.85rem;
  font-weight: 600;
  color: var(--ink, #101828);
  text-decoration: none;
  background: var(--surface, #fff);
}
.help-header__lang:hover { border-color: var(--brand, #f58220); color: var(--brand, #f58220); }

/* ---------- footer ---------- */

.help-footer {
  border-top: 1px solid var(--line, #e6eaf0);
  background: var(--surface, #fff);
  margin-top: 64px;
}

.help-footer__inner {
  max-width: 1200px;
  margin: 0 auto;
  padding: 20px 24px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  flex-wrap: wrap;
  font-size: 0.85rem;
  color: var(--slate-500, #64748b);
}

.help-footer__nav { display: flex; gap: 20px; }
.help-footer__nav a { color: var(--slate-500, #64748b); text-decoration: none; }
.help-footer__nav a:hover { color: var(--brand, #f58220); }

/* ---------- help home ---------- */

.help-main--home {
  max-width: 960px;
  margin: 0 auto;
  padding: 48px 24px 0;
}

.help-home-hero { text-align: center; padding: 24px 0 32px; }
.help-home-hero h1 {
  font-size: 2.2rem;
  color: var(--ink, #101828);
  margin: 0 0 12px;
}
.help-home-hero > p { color: var(--slate-500, #64748b); max-width: 560px; margin: 0 auto 24px; }

.help-search-wrap { position: relative; max-width: 560px; margin: 0 auto; }

.help-search {
  width: 100%;
  padding: 12px 16px;
  font-size: 0.95rem;
  border: 1px solid var(--line, #e6eaf0);
  border-radius: 10px;
  background: var(--surface, #fff);
  color: var(--ink, #101828);
  outline: none;
  box-shadow: 0 1px 2px rgba(16, 24, 40, 0.04);
}
.help-search:focus { border-color: var(--brand, #f58220); box-shadow: 0 0 0 3px var(--brand-tint, #fff5ec); }

.help-search-results {
  position: absolute;
  top: calc(100% + 6px);
  left: 0;
  right: 0;
  background: var(--surface, #fff);
  border: 1px solid var(--line, #e6eaf0);
  border-radius: 10px;
  box-shadow: 0 12px 32px rgba(16, 24, 40, 0.12);
  max-height: 420px;
  overflow-y: auto;
  text-align: left;
  z-index: 40;
  padding: 8px;
}

.help-search-result {
  display: block;
  padding: 10px 12px;
  border-radius: 8px;
  text-decoration: none;
}
.help-search-result:hover { background: var(--surface-2, #eff3f9); }

.help-search-result__title { color: var(--ink, #101828); font-weight: 600; font-size: 0.92rem; }
.help-search-result__meta {
  color: var(--slate-500, #64748b);
  font-size: 0.78rem;
  margin-top: 2px;
}
.help-search-result__app {
  display: inline-block;
  background: var(--brand-tint, #fff5ec);
  color: var(--brand-ink, #b8480a);
  border-radius: 4px;
  padding: 1px 6px;
  font-size: 0.72rem;
  font-weight: 600;
  margin-right: 6px;
}

.help-app-cards {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  gap: 20px;
  margin: 32px 0 48px;
}

.help-app-card {
  display: flex;
  gap: 16px;
  padding: 24px;
  background: var(--surface, #fff);
  border: 1px solid var(--line, #e6eaf0);
  border-radius: 14px;
  text-decoration: none;
  transition: border-color 0.15s ease, box-shadow 0.15s ease;
}
.help-app-card:hover { border-color: var(--brand, #f58220); box-shadow: 0 8px 24px rgba(16, 24, 40, 0.08); }

.help-app-card__icon {
  flex: none;
  width: 44px;
  height: 44px;
  border-radius: 10px;
  background: var(--brand-tint, #fff5ec);
  color: var(--brand, #f58220);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.2rem;
}
.help-app-card__name { display: block; color: var(--ink, #101828); font-weight: 700; font-size: 1.05rem; }
.help-app-card__tagline { display: block; color: var(--slate-500, #64748b); font-size: 0.88rem; margin-top: 6px; }

.help-faq { padding-bottom: 24px; }
.help-faq h2 { font-size: 1.4rem; color: var(--ink, #101828); margin-bottom: 16px; }

.help-faq__item {
  background: var(--surface, #fff);
  border: 1px solid var(--line, #e6eaf0);
  border-radius: 10px;
  margin-bottom: 10px;
  overflow: hidden;
}
.help-faq__item summary {
  padding: 14px 18px;
  cursor: pointer;
  font-weight: 600;
  color: var(--ink, #101828);
  list-style: none;
  display: flex;
  align-items: center;
  gap: 8px;
}
.help-faq__item summary::before { content: "▸"; color: var(--brand, #f58220); transition: transform 0.15s ease; }
.help-faq__item[open] summary::before { transform: rotate(90deg); }
.help-faq__body { padding: 0 18px 16px; color: var(--color-text, #334155); font-size: 0.92rem; }
.help-faq__body p { margin: 0 0 10px; }
.help-faq__body p:last-child { margin-bottom: 0; }

/* ---------- app index ---------- */

.help-main--app {
  max-width: 960px;
  margin: 0 auto;
  padding: 32px 24px 0;
}

.help-breadcrumbs { font-size: 0.82rem; color: var(--slate-500, #64748b); margin: 0 0 8px; }
.help-breadcrumbs a { color: var(--slate-500, #64748b); text-decoration: none; }
.help-breadcrumbs a:hover { color: var(--brand, #f58220); }
.help-breadcrumbs__sep { margin: 0 6px; color: var(--slate-400, #94a3b8); }

.help-app-hero { padding: 8px 0 24px; }
.help-app-hero h1 { font-size: 2rem; color: var(--ink, #101828); margin: 0 0 8px; }
.help-app-hero__tagline { color: var(--slate-500, #64748b); margin: 0 0 20px; }
.help-app-hero .help-search-wrap { margin: 0; }

.help-cross-hint {
  background: var(--surface-2, #eff3f9);
  border-radius: 10px;
  padding: 12px 16px;
  font-size: 0.88rem;
  color: var(--slate-600, #475569);
  margin: 0 0 28px;
}
.help-cross-hint a { color: var(--azure, #0b63ce); font-weight: 600; }

.help-groups {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
  gap: 24px 28px;
  padding-bottom: 24px;
}

.help-group h2 {
  font-size: 0.85rem;
  letter-spacing: 0.04em;
  color: var(--slate-500, #64748b);
  border-bottom: 1px solid var(--line, #e6eaf0);
  padding-bottom: 8px;
  margin: 0 0 10px;
}
.help-group ul { list-style: none; margin: 0; padding: 0; }
.help-group li { margin-bottom: 6px; font-size: 0.92rem; }
.help-group a { color: var(--azure, #0b63ce); text-decoration: none; }
.help-group a:hover { color: var(--brand, #f58220); text-decoration: underline; }

.help-group__todo { color: var(--slate-400, #94a3b8); }

/* ---------- article layout ---------- */

.help-page--article { }

.help-layout {
  max-width: 1200px;
  margin: 0 auto;
  padding: 24px 24px 0;
  display: grid;
  grid-template-columns: 250px minmax(0, 1fr) 200px;
  gap: 40px;
  align-items: start;
}

.help-sidebar {
  position: sticky;
  top: 72px;
  max-height: calc(100vh - 88px);
  overflow-y: auto;
  font-size: 0.88rem;
}

.help-sidebar__title {
  font-weight: 700;
  color: var(--ink, #101828);
  margin: 0 0 10px;
  font-size: 0.95rem;
}
.help-sidebar__title a { color: inherit; text-decoration: none; }

.help-sidebar__group { border-left: 1px solid var(--line, #e6eaf0); }
.help-sidebar__group summary {
  cursor: pointer;
  list-style: none;
  padding: 6px 10px;
  font-weight: 600;
  color: var(--slate-600, #475569);
  display: flex;
  align-items: center;
  gap: 6px;
}
.help-sidebar__group summary::before { content: "▾"; color: var(--slate-400, #94a3b8); font-size: 0.75rem; }
.help-sidebar__group:not([open]) summary::before { content: "▸"; }
.help-sidebar__group summary:hover { color: var(--brand, #f58220); }

.help-sidebar__group ul { list-style: none; margin: 0; padding: 0 0 6px 16px; }
.help-sidebar__group li { padding: 3px 0; }
.help-sidebar__group a {
  color: var(--slate-600, #475569);
  text-decoration: none;
  display: block;
  padding: 2px 8px;
  border-radius: 6px;
}
.help-sidebar__group a:hover { color: var(--brand, #f58220); }
.help-sidebar__group a.active {
  color: var(--brand-ink, #b8480a);
  background: var(--brand-tint, #fff5ec);
  font-weight: 600;
}

.help-sidebar__todo {
  color: var(--slate-400, #94a3b8);
  padding: 2px 8px;
}

.help-tag-todo {
  display: inline-block;
  font-size: 0.66rem;
  font-weight: 600;
  color: var(--slate-400, #94a3b8);
  border: 1px solid var(--line, #e6eaf0);
  border-radius: 4px;
  padding: 0 4px;
  margin-left: 6px;
  vertical-align: 1px;
}

/* article body */

.help-main--article {
  min-width: 0;
  padding: 0 0 24px;
}

.help-article h1 {
  font-size: 1.8rem;
  color: var(--ink, #101828);
  margin: 8px 0 6px;
  line-height: 1.3;
}

.help-article__meta { color: var(--slate-400, #94a3b8); font-size: 0.8rem; margin: 0 0 24px; }

.help-article__body { font-size: 0.95rem; line-height: 1.75; color: var(--color-text, #334155); }

.help-article__body h2 {
  font-size: 1.25rem;
  color: var(--ink, #101828);
  margin: 32px 0 12px;
  padding-top: 8px;
  border-bottom: 1px solid var(--line-soft, #eef1f6);
  padding-bottom: 8px;
  scroll-margin-top: 72px;
}
.help-article__body h3 {
  font-size: 1.05rem;
  color: var(--ink, #101828);
  margin: 24px 0 8px;
  scroll-margin-top: 72px;
}
.help-article__body p { margin: 0 0 14px; }
.help-article__body ul, .help-article__body ol { margin: 0 0 14px; padding-left: 24px; }
.help-article__body li { margin-bottom: 4px; }
.help-article__body code {
  font-family: var(--font-mono, monospace);
  font-size: 0.85em;
  background: var(--surface-2, #eff3f9);
  border-radius: 4px;
  padding: 1px 6px;
  color: var(--ink-700, #1b2a45);
}
.help-article__body a { color: var(--azure, #0b63ce); text-decoration: none; }
.help-article__body a:hover { color: var(--brand, #f58220); text-decoration: underline; }
.help-article__body img { max-width: 100%; border-radius: 8px; border: 1px solid var(--line, #e6eaf0); }

.help-table-wrap {
  overflow-x: auto;
  margin: 0 0 16px;
  border: 1px solid var(--line, #e6eaf0);
  border-radius: 10px;
}
.help-table-wrap table {
  border-collapse: collapse;
  width: 100%;
  font-size: 0.88rem;
  min-width: 480px;
}
.help-table-wrap th {
  text-align: left;
  background: var(--surface-2, #eff3f9);
  color: var(--ink-700, #1b2a45);
  font-weight: 600;
  padding: 10px 14px;
  border-bottom: 1px solid var(--line, #e6eaf0);
  white-space: nowrap;
}
.help-table-wrap td {
  padding: 10px 14px;
  border-bottom: 1px solid var(--line-soft, #eef1f6);
  vertical-align: top;
}
.help-table-wrap tr:last-child td { border-bottom: none; }
.help-table-wrap code { font-size: 0.82em; }

.help-note {
  background: var(--brand-tint, #fff5ec);
  border-left: 4px solid var(--brand, #f58220);
  border-radius: 8px;
  padding: 12px 16px;
  margin: 0 0 16px;
}
.help-note__label {
  font-weight: 700;
  font-size: 0.78rem;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  color: var(--brand-ink, #b8480a);
  margin: 0 0 6px;
}
.help-note p { margin: 0 0 8px; font-size: 0.9rem; }
.help-note p:last-child { margin-bottom: 0; }

/* related articles */

.help-related {
  border-top: 1px solid var(--line, #e6eaf0);
  margin-top: 40px;
  padding-top: 20px;
}
.help-related h2 { font-size: 1rem; color: var(--ink, #101828); margin: 0 0 10px; }
.help-related ul { list-style: none; margin: 0; padding: 0; }
.help-related li { margin-bottom: 6px; font-size: 0.9rem; }
.help-related a { color: var(--azure, #0b63ce); text-decoration: none; }
.help-related a:hover { color: var(--brand, #f58220); }

/* right mini-TOC */

.help-toc {
  position: sticky;
  top: 72px;
  max-height: calc(100vh - 88px);
  overflow-y: auto;
  font-size: 0.8rem;
  padding-left: 8px;
  border-left: 1px solid var(--line, #e6eaf0);
}
.help-toc__title {
  font-weight: 700;
  color: var(--slate-500, #64748b);
  text-transform: uppercase;
  letter-spacing: 0.05em;
  font-size: 0.7rem;
  margin: 0 0 8px;
}
.help-toc__nav { display: flex; flex-direction: column; gap: 4px; }
.help-toc__nav a { color: var(--slate-500, #64748b); text-decoration: none; }
.help-toc__nav a:hover, .help-toc__nav a.active { color: var(--brand, #f58220); }

/* sidebar toggle (mobile only) */

.help-sidebar-toggle {
  display: none;
  position: fixed;
  top: 68px;
  left: 12px;
  z-index: 60;
  background: var(--surface, #fff);
  border: 1px solid var(--line, #e6eaf0);
  border-radius: 8px;
  padding: 6px 10px;
  font-size: 1rem;
  color: var(--ink, #101828);
  cursor: pointer;
}

/* ---------- responsive ---------- */

@media (max-width: 1024px) {
  .help-layout { grid-template-columns: 220px minmax(0, 1fr); }
  .help-toc { display: none; }
}

@media (max-width: 820px) {
  .help-sidebar-toggle { display: block; }

  .help-layout { display: block; padding-top: 56px; }

  .help-sidebar {
    position: fixed;
    top: 0;
    left: 0;
    bottom: 0;
    width: 280px;
    max-height: none;
    background: var(--surface, #fff);
    border-right: 1px solid var(--line, #e6eaf0);
    box-shadow: 8px 0 32px rgba(16, 24, 40, 0.12);
    padding: 72px 16px 24px;
    transform: translateX(-100%);
    transition: transform 0.2s ease;
    z-index: 55;
    overflow-y: auto;
  }
  .help-page--article.sidebar-open .help-sidebar { transform: translateX(0); }

  .help-main--home, .help-main--app { padding-top: 24px; }
  .help-home-hero h1 { font-size: 1.6rem; }
  .help-app-hero h1 { font-size: 1.6rem; }
  .help-groups { grid-template-columns: 1fr; }
  .help-article h1 { font-size: 1.5rem; }
  .help-header__trial { display: none; }
}
