/* Help centre: category tiles, table of contents, articles and FAQ. Colours come from the active template (--wm-*) with Bootstrap fallbacks. */
:root {
    --hp-head: var(--wm-head, #0f4c81);
    --hp-accent: var(--wm-lime, #8cc63f);
    --hp-leaf: var(--wm-leaf, #4b7f12);
    --hp-ember: var(--wm-ember, #d24000);
    --hp-paper: var(--wm-paper, var(--bs-tertiary-bg, #f3f6f9));
    --hp-surface: var(--wm-surface, var(--bs-body-bg, #fff));
    --hp-surface-2: var(--wm-surface-2, var(--bs-secondary-bg, #e9f0f6));
    --hp-ink: var(--wm-ink, var(--bs-body-color, #10263a));
    --hp-muted: var(--wm-muted, var(--bs-secondary-color, #556779));
    --hp-line: var(--wm-line, var(--bs-border-color, #d5e0ea));
    --hp-link: var(--wm-link, var(--bs-link-color, #0f66b0));
    --hp-title: var(--wm-title, var(--hp-head));
    --hp-on-head-muted: var(--wm-on-head-muted, #b9d3ea);
    --hp-code-bg: var(--wm-code-bg, #0c1d2c);
    --hp-display: var(--wm-f-display, inherit);
    --hp-mono: var(--wm-f-mono, ui-monospace, SFMono-Regular, Consolas, monospace);
    --hp-r: 10px;
}

.hp-view { display: flex; flex-direction: column; gap: 28px; padding-block: 8px 24px; min-width: 0; }
.hp-view h1, .hp-view h2, .hp-view h3 { font-family: var(--hp-display); line-height: 1.15; margin: 0; }
.hp-muted { color: var(--hp-muted); margin: 0; }
.hp-eyebrow { font-family: var(--hp-mono); font-size: .74rem; letter-spacing: .08em; text-transform: uppercase; color: var(--hp-muted); margin: 0; }
.hp-eyebrow::before { content: ""; display: inline-block; width: 8px; height: 8px; border-radius: 2px; background: var(--hp-accent); margin-right: 8px; vertical-align: 1px; }

/* page head (optional, can be replaced by a hero block) */
.hp-head { background: var(--hp-head); color: #fff; padding: 32px 24px 36px; border-radius: var(--hp-r); }
.hp-head h1 { color: #fff; font-size: clamp(1.9rem, 4.4vw, 2.8rem); font-weight: 800; letter-spacing: -.02em; margin-top: 6px; }
.hp-head .hp-eyebrow { color: var(--hp-accent); }
.hp-head__crumbs { font-size: .85rem; color: var(--hp-on-head-muted); margin-bottom: 14px; }
.hp-head__crumbs a { color: var(--hp-on-head-muted); }
.hp-head__crumbs a:hover { color: #fff; }
.hp-head__lead { color: var(--hp-on-head-muted); font-size: 1.08rem; max-width: 62ch; margin: 10px 0 0; }

/* search */
.hp-search { display: flex; gap: 8px; max-width: 620px; }
.hp-input { display: block; width: 100%; font: inherit; font-size: .95rem; padding: 11px 14px; border-radius: 8px; border: 1px solid var(--hp-line); background: var(--hp-surface); color: var(--hp-ink); }
.hp-input:focus { outline: 3px solid color-mix(in srgb, var(--hp-accent) 70%, transparent); outline-offset: 1px; }
.hp-btn { flex: none; font: inherit; font-weight: 600; font-size: .95rem; padding: 10px 18px; border-radius: 8px; border: 1px solid var(--hp-accent); background: var(--hp-accent); color: #11280a; cursor: pointer; }
.hp-btn:hover { filter: brightness(1.06); }

/* category tiles */
.hp-tiles { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 14px; }
.hp-tile { display: flex; flex-direction: column; gap: 6px; text-decoration: none; color: var(--hp-ink); background: var(--hp-surface); border: 1px solid var(--hp-line); border-radius: var(--hp-r); padding: 18px; min-width: 0; }
.hp-tile:hover { border-color: var(--hp-link); color: var(--hp-ink); }
.hp-tile.is-on { border-color: var(--hp-accent); box-shadow: inset 0 3px 0 var(--hp-accent); }
.hp-tile__icon { font-size: 1.35rem; color: var(--hp-link); line-height: 1; }
.hp-tile b { font-family: var(--hp-display); font-size: 1.05rem; }
.hp-tile span { color: var(--hp-muted); font-size: .88rem; }
.hp-tile small { margin-top: auto; padding-top: 4px; font-family: var(--hp-mono); font-size: .72rem; color: var(--hp-muted); }
@media (max-width: 900px) { .hp-tiles { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
@media (max-width: 480px) {
    .hp-tiles { gap: 10px; }
    .hp-tile { padding: 14px; }
    .hp-tile span { display: none; }
}

/* table of contents + document */
.hp-layout { display: grid; grid-template-columns: 250px minmax(0, 1fr); gap: 40px; align-items: start; margin-top: 12px; }
.hp-toc { position: sticky; top: 96px; display: flex; flex-direction: column; gap: 2px; font-size: .92rem; max-height: calc(100vh - 120px); overflow-y: auto; }
.hp-toc a { color: var(--hp-ink); text-decoration: none; padding: 6px 10px; border-radius: 6px; border-left: 2px solid transparent; }
.hp-toc a:hover { background: var(--hp-surface-2); }
.hp-toc a.is-on { border-left-color: var(--hp-accent); background: var(--hp-surface); font-weight: 600; }
.hp-toc a.hp-toc__group { font-family: var(--hp-mono); font-size: .7rem; letter-spacing: .08em; text-transform: uppercase; color: var(--hp-muted); margin-top: 14px; }
.hp-toc a.hp-toc__group:first-child { margin-top: 0; }
@media (max-width: 900px) {
    .hp-layout { grid-template-columns: minmax(0, 1fr); gap: 24px; }
    .hp-toc { position: static; max-height: none; flex-direction: row; flex-wrap: wrap; gap: 6px; }
    .hp-toc a { border: 1px solid var(--hp-line); background: var(--hp-surface); font-size: .85rem; }
    .hp-toc a.hp-toc__group { margin-top: 0; font-size: .68rem; }
}

.hp-doc { display: flex; flex-direction: column; gap: 48px; min-width: 0; }
.hp-group { display: flex; flex-direction: column; gap: 40px; scroll-margin-top: 100px; }
.hp-group > h2, .hp-article h2 { font-size: clamp(1.4rem, 2.4vw, 1.8rem); font-weight: 750; color: var(--hp-title); }
.hp-group > h2 { margin-top: -28px; }
.hp-article { display: flex; flex-direction: column; gap: 14px; scroll-margin-top: 100px; }
.hp-edit { font-size: .84rem; }
.hp-ask { border-top: 1px solid var(--hp-line); padding-top: 18px; color: var(--hp-muted); }

/* article body */
.hp-content { min-width: 0; }
.hp-content > :first-child { margin-top: 0; }
.hp-content > :last-child { margin-bottom: 0; }
.hp-content p, .hp-content li { max-width: 70ch; }
.hp-content h3 { font-size: 1.05rem; margin: 18px 0 6px; }
.hp-content pre { background: var(--hp-code-bg); color: #d6e6f3; font-family: var(--hp-mono); font-size: .82rem; line-height: 1.55; padding: 14px 16px; border-radius: 8px; overflow-x: auto; }
.hp-content code { font-family: var(--hp-mono); font-size: .88em; color: var(--hp-leaf); }
.hp-content pre code { color: inherit; }
.hp-content kbd { font-family: var(--hp-mono); font-size: .84em; background: var(--hp-surface-2); color: var(--hp-ink); border: 1px solid var(--hp-line); border-radius: 4px; padding: 1px 6px; }
.hp-content ol { padding-left: 22px; }
.hp-content ol > li { margin-bottom: 10px; }
.hp-content table { width: 100%; border-collapse: collapse; font-size: .92rem; }
.hp-content th, .hp-content td { text-align: left; padding: 8px 10px; border-bottom: 1px dashed var(--hp-line); }
.hp-content blockquote { border-left: 4px solid var(--hp-ember); background: var(--hp-surface); padding: 12px 16px; border-radius: 0 8px 8px 0; margin: 6px 0; }

/* helper classes available in article content */
.hp-grid { display: grid; gap: 16px; margin-block: 12px; }
.hp-grid--2 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
.hp-grid--3 { grid-template-columns: repeat(3, minmax(0, 1fr)); }
@media (max-width: 900px) { .hp-grid--3 { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
@media (max-width: 620px) { .hp-grid--2, .hp-grid--3 { grid-template-columns: minmax(0, 1fr); } }
.hp-card { background: var(--hp-surface); border: 1px solid var(--hp-line); border-radius: var(--hp-r); padding: 18px; min-width: 0; }
.hp-card > :first-child { margin-top: 0; }
.hp-card > :last-child { margin-bottom: 0; }
.hp-card p { margin-top: 8px; }
.hp-kv { list-style: none; margin: 0; padding: 0; font-size: .9rem; }
.hp-kv li { display: flex; justify-content: space-between; gap: 12px; padding: 7px 0; border-bottom: 1px dashed var(--hp-line); max-width: none; }
.hp-kv li:last-child { border-bottom: 0; }
.hp-kv li > span:first-child { color: var(--hp-muted); }
.hp-kv li > span:last-child { text-align: right; overflow-wrap: anywhere; }
.hp-callout { border: 1px solid var(--hp-line); border-left: 4px solid var(--hp-link); background: var(--hp-surface); padding: 14px 16px; border-radius: 0 8px 8px 0; font-size: .93rem; margin-block: 12px; }

/* FAQ */
.hp-faq { display: flex; flex-direction: column; gap: 10px; }
.hp-faq details { background: var(--hp-surface); border: 1px solid var(--hp-line); border-radius: 8px; scroll-margin-top: 100px; }
.hp-faq summary { cursor: pointer; padding: 14px 18px; font-weight: 600; list-style: none; display: flex; justify-content: space-between; gap: 16px; }
.hp-faq summary::-webkit-details-marker { display: none; }
.hp-faq summary::after { content: "+"; font: 500 1.2rem/1 var(--hp-mono); color: var(--hp-muted); }
.hp-faq details[open] summary::after { content: "\2212"; }
.hp-faq details > div { padding: 0 18px 16px; color: var(--hp-muted); }
