/* SermonWave Help Center (/help) — loaded only on help pages, builds on style.css tokens */

.visually-hidden {
    position: absolute !important; width: 1px; height: 1px; padding: 0; margin: -1px;
    overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; border: 0;
}

/* ---------- Hero + search ---------- */
.help-hero { padding-bottom: var(--space-2xl); overflow: visible; z-index: 5; }
.help-hero__inner { max-width: 760px; margin: 0 auto; position: relative; z-index: 2; }
.help-hero__title { color: var(--text-white); font-size: clamp(1.9rem, 4.5vw, 2.9rem); margin-bottom: var(--space-sm); }
.help-hero__subtitle { color: var(--text-white-80) !important; font-size: 1.0625rem; margin-bottom: var(--space-xl); }

.help-search { position: relative; max-width: 640px; margin: 0 auto; text-align: left; }
.help-search__icon { position: absolute; left: 18px; top: 50%; transform: translateY(-50%); color: var(--text-muted); pointer-events: none; }
.help-search__input {
    width: 100%; font: inherit; font-family: var(--font-heading); font-size: 1rem;
    padding: 1rem 1.1rem 1rem 3.1rem; border-radius: 100px; border: 2px solid transparent;
    background: var(--bg-white); color: var(--text-dark); box-shadow: var(--shadow-lg);
    -webkit-appearance: none; appearance: none;
}
.help-search__input:focus { outline: none; border-color: var(--aqua); }
.help-search--compact .help-search__input { padding: 0.7rem 1rem 0.7rem 2.8rem; font-size: 0.9375rem; box-shadow: var(--shadow-sm); border: 1px solid var(--border-light); }
.help-search--compact .help-search__input:focus { border-color: var(--blue); }
.help-search--compact .help-search__icon { left: 14px; }
.help-search__results {
    position: absolute; z-index: 50; left: 0; right: 0; top: calc(100% + 8px);
    background: var(--bg-white); border-radius: var(--radius-md); box-shadow: var(--shadow-lg);
    border: 1px solid var(--border-light); max-height: 70vh; overflow-y: auto; text-align: left;
}
.help-search__results ul { list-style: none; margin: 0; padding: 0 0 var(--space-sm); }
.help-search__results a { display: block; padding: 0.7rem 1rem; color: var(--text-body); border-top: 1px solid var(--border-light); text-decoration: none; }
.help-search__results a:hover, .help-search__results a:focus { background: var(--bg-cool); outline: none; }
.help-search__head, .help-search__empty { font-family: var(--font-heading); font-size: 0.8125rem; color: var(--text-muted); padding: 0.75rem 1rem; margin: 0; }
.help-search__cat { display: block; font-family: var(--font-heading); font-size: 0.6875rem; letter-spacing: 0.06em; text-transform: uppercase; color: var(--blue); }
.help-search__title { display: block; font-family: var(--font-heading); font-weight: 600; color: var(--text-dark); margin: 2px 0; }
.help-search__snip { display: block; font-size: 0.875rem; color: var(--text-muted); line-height: 1.5; }
.help-search__snip mark { background: var(--aqua-soft); color: inherit; padding: 0 1px; border-radius: 2px; }

/* ---------- Badges ---------- */
.help-badge {
    display: inline-block; vertical-align: middle; font-family: var(--font-heading); font-size: 0.6875rem;
    font-weight: 700; letter-spacing: 0.05em; text-transform: uppercase; line-height: 1;
    padding: 0.3em 0.6em; border-radius: 100px; white-space: nowrap;
}
.help-badge--beta { background: #FFF3D6; color: #8A5A00; border: 1px solid #F5C341; }
.help-badge--soon { background: var(--bg-cool); color: #3D4F73; border: 1px solid #C9D3E3; }
h1 .help-badge { font-size: 0.75rem; position: relative; top: -0.3em; }

/* ---------- Index ---------- */
.help-section { padding-top: var(--space-2xl); }
.help-section__title { font-size: 1.375rem; margin: 0 0 var(--space-lg); }
.help-section__title + .help-start, .help-section__title + .help-cats { margin-bottom: var(--space-2xl); }
.help-start { display: grid; grid-template-columns: repeat(4, 1fr); gap: var(--space-md); }
.help-start__card {
    display: flex; flex-direction: column; gap: 6px; padding: var(--space-lg); border-radius: var(--radius-lg);
    background: var(--bg-cream); border: 1px solid #F1E4D3; color: var(--text-body); text-decoration: none;
    transition: transform 0.15s ease, box-shadow 0.15s ease;
}
.help-start__card:hover { transform: translateY(-2px); box-shadow: var(--shadow-md); }
.help-start__num {
    width: 30px; height: 30px; border-radius: 50%; background: var(--gradient-warm); color: #fff;
    font-family: var(--font-heading); font-weight: 700; display: inline-flex; align-items: center; justify-content: center; font-size: 0.875rem;
}
.help-start__title { font-family: var(--font-heading); font-weight: 700; color: var(--text-dark); }
.help-start__desc { font-size: 0.875rem; line-height: 1.55; color: var(--text-muted); }

.help-cats { display: grid; grid-template-columns: repeat(3, 1fr); gap: var(--space-lg); }
.help-cat { background: var(--bg-white); border: 1px solid var(--border-light); border-radius: var(--radius-lg); padding: var(--space-lg); box-shadow: var(--shadow-sm); display: flex; flex-direction: column; }
.help-cat__head { display: flex; align-items: center; gap: var(--space-md); margin-bottom: var(--space-sm); }
.help-cat__icon { width: 44px; height: 44px; border-radius: 12px; background: var(--aqua-soft); color: var(--blue); display: inline-flex; align-items: center; justify-content: center; flex-shrink: 0; }
.help-cat__name { font-size: 1.0625rem; margin: 0; }
.help-cat__name a { color: var(--text-dark); text-decoration: none; }
.help-cat__name a:hover { color: var(--blue); }
.help-cat__count { font-family: var(--font-heading); font-size: 0.75rem; color: var(--text-muted); margin: 0; }
.help-cat__desc { font-size: 0.875rem; color: var(--text-muted); line-height: 1.55; margin-bottom: var(--space-md); }
.help-cat__list { list-style: none; margin: 0 0 var(--space-sm); padding: 0; flex: 1; }
.help-cat__list li { padding: 0.35rem 0; border-top: 1px solid var(--border-light); font-size: 0.9375rem; line-height: 1.4; }
.help-cat__list a { color: var(--text-body); }
.help-cat__list a:hover { color: var(--blue); }
.help-cat__more { font-family: var(--font-heading); font-size: 0.8125rem; font-weight: 600; color: var(--blue); }

.help-narrow { max-width: var(--max-narrow); }
.help-article-list { list-style: none; padding: 0; margin: 0; }
.help-article-list__item { display: block; padding: var(--space-lg); border: 1px solid var(--border-light); border-radius: var(--radius-md); margin-bottom: var(--space-md); color: var(--text-body); text-decoration: none; background: var(--bg-white); }
.help-article-list__item:hover { border-color: var(--blue); box-shadow: var(--shadow-sm); }
.help-article-list__title { display: block; font-family: var(--font-heading); font-weight: 700; color: var(--text-dark); margin-bottom: 4px; }
.help-article-list__desc { display: block; font-size: 0.9375rem; color: var(--text-muted); line-height: 1.55; }
.help-back { margin-top: var(--space-xl); font-family: var(--font-heading); font-size: 0.875rem; }

.help-cta__title { margin-bottom: var(--space-sm); }
.help-cta__body { color: var(--text-muted); margin-bottom: var(--space-lg); }

/* ---------- Breadcrumbs ---------- */
.help-crumbs { font-family: var(--font-heading); font-size: 0.8125rem; color: var(--text-muted); display: flex; flex-wrap: wrap; gap: 0.4rem; align-items: center; margin-bottom: var(--space-md); }
.help-crumbs a { color: var(--blue); }
.help-crumbs--light { justify-content: center; color: var(--text-white-60); }
.help-crumbs--light a { color: var(--aqua); }

/* ---------- Article ---------- */
.help-article-head { background: var(--bg-cream); padding: calc(var(--header-height) + var(--space-2xl)) 0 var(--space-xl); border-bottom: 1px solid #F1E4D3; }
.help-article-head__row { display: flex; gap: var(--space-xl); align-items: flex-end; justify-content: space-between; }
.help-article-head__title { font-size: clamp(1.7rem, 3.6vw, 2.4rem); margin: 0 0 var(--space-sm); color: var(--text-dark); }
.help-article-head__meta { font-family: var(--font-heading); font-size: 0.8125rem; color: var(--text-muted); margin: 0; }
.help-dot { margin: 0 0.35rem; }
.help-article-head__search { width: 320px; flex-shrink: 0; }

.help-article-wrap { padding: var(--space-2xl) 0 var(--space-3xl); }
.help-layout { display: grid; grid-template-columns: minmax(0, 1fr) 260px; gap: var(--space-2xl); align-items: start; }
.help-article { min-width: 0; max-width: var(--max-narrow); }

.help-fallback { background: var(--bg-cool); border-radius: var(--radius-md); padding: 0.75rem 1rem; font-family: var(--font-heading); font-size: 0.875rem; color: #3D4F73; margin-bottom: var(--space-lg); }

.help-body { font-size: 1.0625rem; line-height: 1.75; color: var(--text-body); }
.help-body > :first-child { margin-top: 0; }
.help-body h2 { font-size: 1.5rem; margin: var(--space-2xl) 0 var(--space-md); padding-top: var(--space-sm); color: var(--text-dark); }
.help-body h3 { font-size: 1.1875rem; margin: var(--space-xl) 0 var(--space-sm); color: var(--text-dark); }
.help-body h4 { font-size: 1rem; margin: var(--space-lg) 0 var(--space-sm); }
.help-body h2, .help-body h3, .help-body h4 { position: relative; scroll-margin-top: calc(var(--header-height) + 24px); }
.help-anchor { margin-left: 0.4rem; color: var(--border-light); text-decoration: none; font-weight: 400; opacity: 0; transition: opacity 0.15s; }
.help-body h2:hover .help-anchor, .help-body h3:hover .help-anchor, .help-anchor:focus { opacity: 1; color: var(--text-muted); }
.help-body p { margin: 0 0 var(--space-md); }
.help-body a { color: var(--blue); text-decoration: underline; text-underline-offset: 2px; }
.help-body strong { color: var(--text-dark); }
.help-body ul, .help-body ol { margin: 0 0 var(--space-lg); padding-left: 1.4rem; }
.help-body ul { list-style: disc; }
.help-body ol { list-style: decimal; }
.help-body li ul { list-style: circle; }
.help-body li { margin-bottom: 0.4rem; }
.help-body li > ul, .help-body li > ol { margin: 0.4rem 0 0.2rem; }
.help-body li > p { margin-bottom: 0.4rem; }

/* Numbered steps get round counters */
.help-body > ol { list-style: none; padding-left: 0; counter-reset: help-step; }
.help-body > ol[start] { counter-reset: none; }
.help-body > ol > li { counter-increment: help-step; position: relative; padding-left: 2.6rem; margin-bottom: var(--space-md); }
.help-body > ol > li::before {
    content: counter(help-step); position: absolute; left: 0; top: 0.1rem; width: 1.8rem; height: 1.8rem; border-radius: 50%;
    background: var(--navy); color: #fff; font-family: var(--font-heading); font-weight: 700; font-size: 0.8125rem;
    display: flex; align-items: center; justify-content: center;
}

.help-body code { font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace; font-size: 0.875em; background: var(--bg-cool); padding: 0.1em 0.35em; border-radius: 4px; color: var(--navy); word-break: break-word; }
.help-code { background: var(--navy); color: #E6ECF7; border-radius: var(--radius-md); padding: var(--space-md) var(--space-lg); overflow-x: auto; margin: 0 0 var(--space-lg); font-size: 0.875rem; line-height: 1.6; }
.help-code code { background: none; color: inherit; padding: 0; font-size: inherit; word-break: normal; }
.help-body hr { border: 0; border-top: 1px solid var(--border-light); margin: var(--space-xl) 0; }
.help-body blockquote { border-left: 3px solid var(--blue); padding-left: var(--space-lg); margin: var(--space-lg) 0; color: var(--text-muted); }
.help-body img { max-width: 100%; height: auto; }

.help-table-wrap { overflow-x: auto; margin: 0 0 var(--space-lg); border: 1px solid var(--border-light); border-radius: var(--radius-md); }
.help-table { width: 100%; border-collapse: collapse; font-size: 0.9375rem; line-height: 1.5; }
.help-table th { background: var(--bg-cool); font-family: var(--font-heading); font-size: 0.8125rem; text-align: left; color: var(--text-dark); }
.help-table th, .help-table td { padding: 0.6rem 0.8rem; border-bottom: 1px solid var(--border-light); vertical-align: top; }
.help-table tr:last-child td { border-bottom: 0; }

.help-callout { border-radius: var(--radius-md); padding: var(--space-md) var(--space-lg); margin: 0 0 var(--space-lg); border-left: 4px solid var(--blue); background: #EEF3FD; font-size: 1rem; }
.help-callout > :last-child { margin-bottom: 0; }
.help-callout__title { font-family: var(--font-heading); font-weight: 700; font-size: 0.75rem; letter-spacing: 0.06em; text-transform: uppercase; margin: 0 0 0.25rem !important; color: var(--blue); }
.help-callout--tip { border-color: #1E9E6A; background: #EAF7F1; }
.help-callout--tip .help-callout__title { color: #13774F; }
.help-callout--warning { border-color: var(--rose); background: #FDEEF0; }
.help-callout--warning .help-callout__title { color: var(--rose-dark); }
.help-callout--beta { border-color: var(--gold); background: #FFF7E6; }
.help-callout--beta .help-callout__title { color: #8A5A00; }
.help-callout--soon { border-color: #7C8DB0; background: var(--bg-cool); }
.help-callout--soon .help-callout__title { color: #3D4F73; }

.help-shot { margin: 0 0 var(--space-lg); }
.help-shot img { border-radius: var(--radius-md); border: 1px solid var(--border-light); box-shadow: var(--shadow-sm); display: block; }
.help-shot figcaption { font-family: var(--font-heading); font-size: 0.8125rem; color: var(--text-muted); margin-top: 0.5rem; }
.help-shot__box {
    display: flex; align-items: center; justify-content: center; gap: 0.6rem; min-height: 120px;
    border: 2px dashed #C9D3E3; border-radius: var(--radius-md); background: repeating-linear-gradient(135deg, #F7F9FC, #F7F9FC 10px, #F1F4F9 10px, #F1F4F9 20px);
    color: #7C8DB0; font-family: var(--font-heading); font-size: 0.8125rem; font-weight: 600;
}

.help-prevnext { display: grid; grid-template-columns: 1fr 1fr; gap: var(--space-md); margin-top: var(--space-2xl); }
.help-prevnext__link { display: block; border: 1px solid var(--border-light); border-radius: var(--radius-md); padding: var(--space-md) var(--space-lg); text-decoration: none; color: var(--text-body); }
.help-prevnext__link:hover { border-color: var(--blue); }
.help-prevnext__link--next { text-align: right; }
.help-prevnext__label { display: block; font-family: var(--font-heading); font-size: 0.75rem; color: var(--text-muted); }
.help-prevnext__title { display: block; font-family: var(--font-heading); font-weight: 600; color: var(--blue); }

.help-helpful { margin-top: var(--space-xl); padding: var(--space-lg); border-radius: var(--radius-md); background: var(--bg-cream); display: flex; flex-direction: column; gap: 4px; }
.help-helpful strong { font-family: var(--font-heading); color: var(--text-dark); }
.help-helpful span { color: var(--text-muted); font-size: 0.9375rem; }
.help-helpful a { font-family: var(--font-heading); font-weight: 600; font-size: 0.875rem; color: var(--blue); margin-top: 4px; }

/* Sidebar */
.help-sidebar { position: sticky; top: calc(var(--header-height) + 32px); max-height: calc(100vh - var(--header-height) - 48px); overflow-y: auto; font-family: var(--font-heading); font-size: 0.8125rem; }
.help-sidebar__title { font-weight: 700; color: var(--text-dark); text-transform: uppercase; letter-spacing: 0.06em; font-size: 0.6875rem; margin: 0 0 var(--space-sm); }
.help-sidebar ul { list-style: none; margin: 0 0 var(--space-xl); padding: 0; border-left: 2px solid var(--border-light); }
.help-sidebar li a { display: block; padding: 0.3rem 0 0.3rem 0.9rem; color: var(--text-muted); line-height: 1.4; margin-left: -2px; border-left: 2px solid transparent; }
.help-sidebar li a:hover { color: var(--blue); }
.help-sidebar li a[aria-current="page"] { color: var(--blue); border-left-color: var(--blue); font-weight: 600; }

.help-toc--mobile { display: none; }

/* ---------- Responsive ---------- */
@media (max-width: 1024px) {
    .help-start { grid-template-columns: repeat(2, 1fr); }
    .help-cats { grid-template-columns: repeat(2, 1fr); }
    .help-layout { grid-template-columns: minmax(0, 1fr); }
    .help-sidebar { position: static; max-height: none; overflow: visible; border-top: 1px solid var(--border-light); padding-top: var(--space-lg); }
    .help-sidebar .help-toc { display: none; }
    .help-toc--mobile { display: block; background: var(--bg-cool); border-radius: var(--radius-md); padding: 0.75rem 1rem; margin-bottom: var(--space-lg); font-family: var(--font-heading); font-size: 0.875rem; }
    .help-toc--mobile summary { cursor: pointer; font-weight: 600; color: var(--text-dark); }
    .help-toc--mobile ul { margin: 0.5rem 0 0; padding-left: 1.1rem; }
    .help-toc--mobile li { padding: 0.2rem 0; }
}
@media (max-width: 768px) {
    .help-article-head__row { flex-direction: column; align-items: stretch; gap: var(--space-md); }
    .help-article-head__search { width: 100%; }
    .help-article-head { padding-top: calc(var(--header-height) + var(--space-xl)); }
}
@media (max-width: 600px) {
    .help-start, .help-cats { grid-template-columns: minmax(0, 1fr); }
    .help-prevnext { grid-template-columns: minmax(0, 1fr); }
    .help-prevnext__link--next { text-align: left; }
    .help-body { font-size: 1rem; }
    .help-body > ol > li { padding-left: 2.3rem; }
    .help-hero__subtitle { font-size: 1rem; }
    .help-search__input { font-size: 16px; } /* no iOS zoom */
}
/* the hero's "p" colour rule must not reach into the results panel */
.help-hero .help-search__results p { color: var(--text-muted); }
