/* Help Center (/help) */
.help-body { background: var(--bg); }
.help-top {
  position: sticky; top: 0; z-index: 20; display: flex; align-items: center; gap: 16px;
  height: 64px; padding: 0 24px; background: rgba(255,255,255,.92); backdrop-filter: blur(8px);
  border-bottom: 1px solid var(--border);
}
.help-brand { display: flex; align-items: baseline; gap: 8px; color: var(--text); white-space: nowrap; }
.help-brand .brand { font-size: 1.2rem; font-weight: 800; color: var(--brand); }
.help-brand-sub { font-weight: 600; color: var(--muted); }
.help-search { flex: 1; min-width: 0; max-width: 560px; position: relative; margin-left: auto; }
.help-search svg { position: absolute; left: 12px; top: 50%; width: 17px; height: 17px; transform: translateY(-50%); color: var(--muted); pointer-events: none; }
.help-search input { width: 100%; height: 40px; padding: 0 14px 0 38px; border: 1px solid var(--border); border-radius: 10px; background: #fff; font: inherit; font-size: .92rem; }
.help-search input:focus { outline: 2px solid rgba(0,101,75,.25); border-color: var(--brand); }
.help-back { white-space: nowrap; }
.help-menu-btn { display: none; background: none; border: 0; padding: 6px; color: var(--text); cursor: pointer; }
.help-menu-btn svg { width: 22px; height: 22px; }

.help-layout { display: grid; grid-template-columns: 270px minmax(0, 1fr); max-width: 1240px; margin: 0 auto; }
.help-toc {
  position: sticky; top: 64px; align-self: start; height: calc(100vh - 64px); overflow-y: auto;
  padding: 24px 12px 40px 24px; border-right: 1px solid var(--border);
}
.toc-group { margin: 18px 0 6px; font-size: .72rem; font-weight: 700; letter-spacing: .08em; text-transform: uppercase; color: var(--muted); }
.toc-group:first-child { margin-top: 0; }
.help-toc a { display: block; padding: 6px 10px; border-radius: 8px; color: var(--text); font-weight: 500; font-size: .9rem; }
.help-toc a:hover { background: rgba(0,101,75,.06); }
.help-toc a.active { background: var(--brand-soft); color: var(--brand-ink); font-weight: 600; }
.help-toc a.dim { opacity: .35; }

.help-main { min-width: 0; padding: 32px 48px 120px; max-width: 880px; line-height: 1.65; font-size: .98rem; }
.help-section { padding: 8px 0 28px; border-bottom: 1px solid var(--border); margin-bottom: 28px; scroll-margin-top: 80px; }
.help-section:last-child { border-bottom: 0; }
.help-section h1 { font-size: 2.1rem; margin: 0 0 12px; }
.help-section h2 { font-size: 1.55rem; margin: 0 0 12px; }
.help-section h3 { font-size: 1.1rem; margin: 26px 0 8px; scroll-margin-top: 80px; }
.help-section h4 { font-size: 1rem; margin: 20px 0 6px; }
.help-section p, .help-section ul, .help-section ol { margin: 0 0 14px; }
.help-section li { margin-bottom: 6px; }
.eyebrow { margin: 0 0 6px !important; font-size: .75rem; font-weight: 700; letter-spacing: .1em; text-transform: uppercase; color: var(--brand); }
.lead { font-size: 1.12rem; color: #2c3a33; }

.ui { display: inline-block; padding: 0 6px; border: 1px solid var(--border); border-radius: 6px; background: #fff; font-size: .88em; font-weight: 600; line-height: 1.55; white-space: nowrap; box-shadow: 0 1px 0 rgba(0,0,0,.04); }
.help-section code { padding: 1px 5px; border-radius: 5px; background: var(--surface-2); font-size: .88em; }

ol.steps { list-style: none; counter-reset: step; padding: 0; }
ol.steps > li { counter-increment: step; position: relative; padding-left: 40px; margin-bottom: 10px; }
ol.steps > li::before {
  content: counter(step); position: absolute; left: 0; top: 1px; width: 26px; height: 26px; border-radius: 50%;
  background: var(--brand); color: #fff; font-size: .8rem; font-weight: 700; display: grid; place-items: center;
}

.callout { padding: 12px 16px; border-radius: 10px; border-left: 4px solid; margin: 16px 0; font-size: .94rem; }
.callout.tip { background: #ecfdf5; border-color: #10b981; }
.callout.note { background: #eff6ff; border-color: #3b82f6; }
.callout.warn { background: #fffbeb; border-color: #f59e0b; }

dl.terms, dl.settings { margin: 0 0 16px; }
dl.terms dt, dl.settings dt { font-weight: 700; margin-top: 12px; }
dl.terms dd, dl.settings dd { margin: 2px 0 0; color: #2c3a33; }
dl.settings { border-left: 3px solid var(--brand-soft); padding-left: 16px; }
dl.compact dt { margin-top: 8px; }

.table-wrap { overflow-x: auto; }
.help-table { width: 100%; border-collapse: collapse; font-size: .92rem; margin: 0 0 16px; }
.help-table th, .help-table td { text-align: left; padding: 9px 12px; border-bottom: 1px solid var(--border); vertical-align: top; }
.help-table th { background: var(--surface-2); font-size: .78rem; text-transform: uppercase; letter-spacing: .05em; color: var(--muted); }
.help-table td.yes { color: #047857; font-weight: 600; }
.help-table td.no { color: #9ca3af; }
.help-table .table-group { background: #fafbfd; font-weight: 700; font-size: .78rem; text-transform: uppercase; letter-spacing: .06em; color: var(--muted); }
.help-table.compact td { padding: 7px 12px; }

.faq details { border: 1px solid var(--border); border-radius: 10px; background: #fff; margin-bottom: 8px; }
.faq summary { cursor: pointer; padding: 12px 16px; font-weight: 600; list-style: none; position: relative; padding-right: 40px; }
.faq summary::-webkit-details-marker { display: none; }
.faq summary::after { content: '+'; position: absolute; right: 16px; top: 50%; transform: translateY(-50%); font-size: 1.2rem; color: var(--muted); }
.faq details[open] summary::after { content: '−'; }
.faq details p { padding: 0 16px 14px; margin: 0; }

.help-noresults { padding: 40px 0; }
.help-foot { margin-top: 24px; color: var(--muted); }
mark.help-hit { background: #fde68a; padding: 0 1px; border-radius: 3px; }

@media (max-width: 960px) {
  .help-layout { grid-template-columns: minmax(0, 1fr); }
  .help-menu-btn { display: block; }
  .help-toc {
    position: fixed; top: 64px; left: 0; bottom: 0; width: 290px; height: auto; z-index: 30; background: #fff;
    transform: translateX(-100%); transition: transform .2s ease; box-shadow: 4px 0 24px rgba(0,0,0,.08);
  }
  .help-toc.open { transform: none; }
  .help-main { padding: 24px 16px 80px; }
}
@media (max-width: 640px) {
  .help-top { gap: 10px; padding: 0 12px; }
  .help-brand-sub, .help-back { display: none; }
  .help-section h1 { font-size: 1.7rem; }
  .ui { white-space: normal; }
}
@media print {
  .help-top, .help-toc { display: none; }
  .help-layout { display: block; }
  .help-main { max-width: none; padding: 0; }
  .faq details { break-inside: avoid; }
}

/* Admin portal help view */
.admin-help { max-width: 860px; line-height: 1.65; }
.admin-help h2 { font-size: 1.5rem; margin: 0 0 10px; }
.admin-help h3 { font-size: 1.08rem; margin: 26px 0 8px; }
.admin-help p, .admin-help ul, .admin-help ol { margin: 0 0 12px; }
.admin-help li { margin-bottom: 5px; }
.admin-help code { padding: 1px 5px; border-radius: 5px; background: var(--surface-2); font-size: .88em; }
