/* Missionary Lane admin: help (js/help.js) — articles and the index, the small "Help" links on admin screens,
   and the Getting started card on the Missionaries page. Builds on brand.css and admin.css tokens. */

/* Contextual "Help" link */
.help-link { position: relative; display: inline-flex; align-items: center; gap: 4px; min-height: 32px; padding: 2px 10px 2px 7px; border-radius: 999px; background: var(--brand-primary-tint); color: var(--brand-primary-deep); font: 600 .82rem/1 var(--font-body); text-decoration: none; vertical-align: middle; white-space: nowrap; }
.help-link::after { content: ''; position: absolute; inset: -8px -2px; }   /* 48px tap target */
.help-link svg { width: 16px; height: 16px; flex: none; }
.help-link:hover { background: var(--brand-primary); color: var(--brand-on-primary, #fff); }
.help-link:focus-visible { outline: 3px solid var(--brand-primary-bright); outline-offset: 2px; }
.help-link.corner { float: right; margin: 2px 0 8px 12px; }
.step-title .st-body { flex: 1; min-width: 0; }
.step-title .help-link.corner { margin-top: 6px; }
.lede .help-link, .hint .help-link, .muted .help-link { margin-left: 4px; }

/* Index */
.help .page-head { margin-bottom: 14px; }
.help-search { margin-bottom: 6px; }
.help-count { min-height: 1.4em; margin: 0 0 12px; }
.help-group { margin-bottom: 24px; }
.help-group h2 { font-size: 1.1rem; color: var(--brand-muted); margin: 0 0 8px; }
.help-topics { list-style: none; margin: 0; padding: 0; display: grid; gap: 8px; }
@media (min-width: 700px) { .help-topics { grid-template-columns: 1fr 1fr; } }
.help-topic { box-sizing: border-box; height: 100%; display: grid; align-content: start; gap: 3px; padding: 14px 16px; min-height: 64px; background: #fff; border: 1px solid var(--brand-line); border-radius: var(--radius-lg); box-shadow: var(--shadow-1); color: var(--brand-text); text-decoration: none; }
.help-topic strong { color: var(--brand-ink); font-size: 1.02rem; }
.help-topic span { font-size: .9rem; color: var(--brand-muted); line-height: 1.4; }
.help-topic:hover { border-color: var(--brand-primary); color: var(--brand-text); }
.help-topic:focus-visible { outline: 3px solid var(--brand-primary-bright); outline-offset: 2px; }

/* Article */
.help-tools { display: flex; flex-wrap: wrap; gap: 4px 16px; align-items: center; justify-content: space-between; margin-bottom: 8px; }
.help-tools .backlink { margin-bottom: 0; }
.help-article { font-size: 1.02rem; line-height: 1.6; overflow-wrap: break-word; }
.help-article h1 { font-size: clamp(1.7rem, 4vw, 2.2rem); margin: 0 0 6px; }
.help-article > .lede { margin: 0 0 18px; }
.help-article h2 { font-size: 1.3rem; margin: 1.6em 0 .5em; scroll-margin-top: 84px; }
.help-article h2:focus { outline: none; }
.help-article p { margin: 0 0 .9em; }
.help-steps, .help-list { margin: 0 0 1em; padding-left: 1.4em; }
.help-steps li, .help-list li { margin-bottom: .5em; padding-left: 2px; }
.help-steps li::marker { font-weight: 700; color: var(--brand-primary-deep); }
.help-note { margin: 14px 0 18px; }
.help-note p { margin: 0; }
.help-go { display: flex; flex-wrap: wrap; gap: 8px; margin: 4px 0 1.1em; }
.help-table { overflow-x: auto; margin: 0 0 1.1em; border: 1px solid var(--brand-line); border-radius: var(--radius-lg); }
.help-table table { width: 100%; border-collapse: collapse; font-size: .95rem; line-height: 1.45; }
.help-table th, .help-table td { text-align: left; vertical-align: top; padding: 10px 12px; border-bottom: 1px solid var(--brand-line); }
.help-table thead th { background: var(--brand-surface-2); font-size: .85rem; color: var(--brand-muted); }
.help-table tbody th { font-weight: 600; color: var(--brand-ink); min-width: 7.5em; }
.help-table tbody tr:last-child > * { border-bottom: 0; }
@media (max-width: 560px) {   /* stack each row so nothing scrolls sideways */
  .help-table thead { display: none; }
  .help-table tr { display: grid; gap: 4px; padding: 10px 12px; border-bottom: 1px solid var(--brand-line); }
  .help-table tbody tr:last-child { border-bottom: 0; }
  .help-table th, .help-table td { padding: 0; border: 0; min-width: 0; }
  .help-table td[data-label]::before { content: attr(data-label) ": "; font-weight: 600; color: var(--brand-muted); }
  .help-table table.two td[data-label]::before { content: none; }
}
.help-toc { margin: 0 0 8px; padding: 12px 16px; background: var(--brand-surface-2); border-radius: var(--radius-lg); }
.help-article .help-toc-h { font-size: .95rem; margin: 0 0 6px; color: var(--brand-muted); }
.help-toc ul { margin: 0; padding-left: 1.2em; columns: 2 220px; column-gap: 24px; }
.help-toc li { margin-bottom: 4px; break-inside: avoid; }
.help-plugin { padding: 14px 16px; border: 1px solid var(--brand-line); border-radius: var(--radius-lg); margin: 0 0 1em; }
.help-plugin .hint { margin: 8px 0 0; font-size: .88rem; color: var(--brand-muted); }
.help-plugin-out:not(:empty) { margin-top: 8px; font-weight: 600; color: var(--brand-ink); }
.help-related { margin-top: 28px; padding-top: 16px; border-top: 1px solid var(--brand-line); }
.help-article .help-related h2 { margin: 0 0 6px; font-size: 1.1rem; }
.help-related ul { margin: 0; padding-left: 1.2em; }
.help-foot { color: var(--brand-muted); }
.sh-guides { margin: 0; padding-left: 1.2em; }
.sh-guides li { margin-bottom: 8px; }

/* Getting started card (Missionaries page) */
.gs-head { display: flex; flex-wrap: wrap; gap: 8px 12px; align-items: center; justify-content: space-between; margin-bottom: 12px; }
.gs-head h2 { margin: 0; font-size: 1.25rem; }
.gs-head h2 .muted { font-weight: 400; font-size: 1rem; margin-left: 4px; }
.gs-list { list-style: none; margin: 0; padding: 0; display: grid; gap: 8px; }
@media (min-width: 760px) { .gs-list { grid-template-columns: 1fr 1fr; } }
.gs-list li { display: flex; align-items: center; gap: 10px; padding: 8px 10px 8px 12px; min-height: 56px; border: 1px solid var(--brand-line); border-radius: var(--radius-lg); }
.gs-mark { box-sizing: border-box; width: 26px; height: 26px; flex: none; display: grid; place-items: center; border: 2px solid #B7C2C6; border-radius: 50%; color: #fff; }
.gs-mark svg { width: 16px; height: 16px; stroke-width: 3; }
.gs-list li.done .gs-mark { background: var(--ok); border-color: var(--ok); }
.gs-t { flex: 1; min-width: 0; font-weight: 600; color: var(--brand-ink); }
.gs-list li.done .gs-t { font-weight: 500; color: var(--brand-muted); }
.gs-more { margin: 12px 0 0; font-size: .95rem; }

/* Printing an article: the article only, on white, with web addresses written out */
@media print {
  body.admin { background: #fff; }
  .site-header, .adm-foot, .toasts, #modal-root, .skip, .mlfb-float, .help-tools, .help-foot, .help-go, .help-toc, .help-plugin button, .help-plugin .hint { display: none !important; }
  .help.page, .help .page.narrow { max-width: none; padding: 0; }
  .help-article.card { border: 0; box-shadow: none; padding: 0; }
  .help-article { font-size: 11pt; color: #000; }
  .help-article a { color: #000; }
  .help-article a[href^="http"]::after { content: " (" attr(href) ")"; font-size: .85em; color: #444; overflow-wrap: anywhere; }
  .help-article h2 { break-after: avoid; }
  .help-table, .help-note, .help-article li { break-inside: avoid; }
}
