:root {
    --site-help-green: #287a4b;
    --site-help-green-dark: #185c36;
    --site-help-green-soft: #eaf5ee;
    --site-help-ink: #17211b;
    --site-help-muted: #637069;
    --site-help-line: #dfe7e1;
}

.site-help-launcher {
    position: fixed;
    right: max(18px, env(safe-area-inset-right));
    bottom: max(18px, env(safe-area-inset-bottom));
    z-index: 1035;
    display: flex;
    min-height: 44px;
    align-items: center;
    gap: 7px;
    padding: 9px 15px;
    border: 1px solid rgba(255,255,255,.4);
    border-radius: 999px;
    color: #fff;
    background: var(--site-help-green-dark);
    box-shadow: 0 8px 24px rgba(16, 63, 36, .28);
    font: inherit;
    font-size: .86rem;
    font-weight: 750;
}

.site-help-launcher:hover,
.site-help-launcher:focus-visible {
    color: #fff;
    background: var(--site-help-green);
    outline: 3px solid rgba(40,122,75,.2);
}

.site-help-launcher[hidden],
.site-help-overlay[hidden],
.site-help-drawer[hidden],
.site-help-popover[hidden] { display: none !important; }

.site-help-overlay,
.site-help-drawer { position: fixed; }

.site-help-overlay {
    inset: 0;
    z-index: 2050;
    opacity: 0;
    background: rgba(10,23,15,.42);
    backdrop-filter: blur(2px);
    transition: opacity 180ms ease;
}

.site-help-overlay.is-open { opacity: 1; }

.site-help-drawer {
    top: 0;
    right: 0;
    bottom: 0;
    z-index: 2051;
    display: grid;
    width: min(460px, 96vw);
    grid-template-rows: auto auto minmax(0, 1fr) auto;
    color: var(--site-help-ink);
    background: #fff;
    border-left: 1px solid var(--site-help-line);
    box-shadow: -24px 0 70px rgba(9,29,17,.24);
    transform: translateX(102%);
    transition: transform 180ms ease;
}

.site-help-drawer.is-open { transform: translateX(0); }
body.site-help-open { overflow: hidden; }

.site-help-header {
    display: grid;
    min-height: 68px;
    grid-template-columns: auto minmax(0,1fr) auto;
    align-items: center;
    gap: 10px;
    padding: 12px 14px;
    border-bottom: 1px solid var(--site-help-line);
}

.site-help-heading { min-width: 0; }
.site-help-heading small,
.site-help-heading strong { display: block; }
.site-help-heading small { color: var(--site-help-green); font-size: .68rem; font-weight: 800; letter-spacing: .09em; text-transform: uppercase; }
.site-help-heading strong { overflow: hidden; font-size: 1rem; text-overflow: ellipsis; white-space: nowrap; }

.site-help-icon-button {
    display: grid;
    width: 42px;
    height: 42px;
    padding: 0;
    place-items: center;
    border: 1px solid var(--site-help-line);
    border-radius: 11px;
    color: var(--site-help-ink);
    background: #fff;
}

.site-help-icon-button:hover,
.site-help-icon-button:focus-visible { color: var(--site-help-green-dark); border-color: var(--site-help-green); outline: 3px solid rgba(40,122,75,.14); }

.site-help-tools { display: grid; gap: 10px; padding: 12px 14px; border-bottom: 1px solid var(--site-help-line); background: #f8faf8; }
.site-help-search { position: relative; }
.site-help-search > i { position: absolute; top: 50%; left: 13px; color: var(--site-help-muted); transform: translateY(-50%); pointer-events: none; }
.site-help-search input { width: 100%; min-height: 44px; padding: 9px 42px 9px 39px; border: 1px solid var(--site-help-line); border-radius: 11px; color: var(--site-help-ink); background: #fff; font: inherit; font-size: .9rem; }
.site-help-search input:focus { border-color: var(--site-help-green); outline: 3px solid rgba(40,122,75,.14); }
.site-help-search button { position: absolute; top: 5px; right: 5px; width: 34px; height: 34px; padding: 0; border: 0; border-radius: 8px; color: #fff; background: var(--site-help-green); }

.site-help-context { display: flex; width: 100%; min-height: 40px; align-items: center; justify-content: space-between; gap: 12px; padding: 8px 11px; border: 1px solid #cfe3d5; border-radius: 10px; color: var(--site-help-green-dark); background: var(--site-help-green-soft); font: inherit; font-size: .8rem; font-weight: 750; text-align: left; }
.site-help-context:hover,
.site-help-context:focus-visible { border-color: var(--site-help-green); outline: 3px solid rgba(40,122,75,.12); }

.site-help-body { min-height: 0; overflow-x: hidden; overflow-y: auto; overscroll-behavior: contain; scroll-padding-top: 18px; }
.site-help-status { margin: 16px; padding: 13px 14px; border: 1px solid var(--site-help-line); border-radius: 11px; color: var(--site-help-muted); background: #f8faf8; font-size: .84rem; }
.site-help-status[data-state="loading"]::before { display: inline-block; width: 14px; height: 14px; margin-right: 8px; vertical-align: -2px; content: ''; border: 2px solid #bed8c5; border-top-color: var(--site-help-green); border-radius: 50%; animation: site-help-spin 750ms linear infinite; }
.site-help-status[data-state="error"] { color: #842b28; border-color: #efd0ce; background: #fff3f2; }
@keyframes site-help-spin { to { transform: rotate(360deg); } }

.site-help-toc { margin: 16px 16px 0; border: 1px solid var(--site-help-line); border-radius: 11px; background: #f8faf8; }
.site-help-toc summary { padding: 11px 13px; color: var(--site-help-green-dark); font-size: .78rem; font-weight: 800; cursor: pointer; }
.site-help-toc-content { max-height: 250px; overflow: auto; padding: 0 13px 12px; font-size: .78rem; }
.site-help-toc-content ul { margin: 0; padding-left: 18px; }
.site-help-toc-content a { color: var(--site-help-green-dark); text-decoration: none; }

.site-help-article { padding: 18px 18px 30px; color: var(--site-help-ink); font-size: .9rem; line-height: 1.62; }
.site-help-article h2,
.site-help-article h3,
.site-help-article h4 { scroll-margin-top: 18px; color: var(--site-help-ink); line-height: 1.25; }
.site-help-article h2 { margin: 1.75rem 0 .7rem; font-size: 1.25rem; }
.site-help-article h2:first-child { margin-top: .3rem; }
.site-help-article h3 { margin: 1.4rem 0 .55rem; font-size: 1.03rem; }
.site-help-article p,
.site-help-article ul,
.site-help-article ol { margin: 0 0 1rem; }
.site-help-article ul,
.site-help-article ol { padding-left: 1.35rem; }
.site-help-article a { color: var(--site-help-green-dark); font-weight: 650; }
.site-help-article img,
.site-help-article video { max-width: 100%; height: auto; border-radius: 10px; }
.site-help-article table { display: block; max-width: 100%; margin: 1rem 0; overflow-x: auto; border-collapse: collapse; font-size: .8rem; }
.site-help-article th,
.site-help-article td { padding: 8px 9px; border: 1px solid var(--site-help-line); text-align: left; vertical-align: top; }
.site-help-article th { background: var(--site-help-green-soft); }
.site-help-article code { padding: 1px 4px; border-radius: 4px; background: #eff3f0; }
.site-help-article pre { max-width: 100%; padding: 12px; overflow: auto; border-radius: 10px; color: #f2f7f3; background: #132019; font-size: .76rem; }
.site-help-article blockquote { margin: 1rem 0; padding: 10px 12px; border-left: 4px solid var(--site-help-green); background: var(--site-help-green-soft); }

.site-help-results { display: grid; gap: 10px; padding: 16px; }
.site-help-results h2 { margin: 0; font-size: 1rem; }
.site-help-result { display: grid; width: 100%; gap: 5px; padding: 13px; border: 1px solid var(--site-help-line); border-radius: 11px; color: var(--site-help-ink); background: #fff; font: inherit; text-align: left; }
.site-help-result:hover,
.site-help-result:focus-visible { border-color: var(--site-help-green); outline: 3px solid rgba(40,122,75,.12); }
.site-help-result-meta { color: var(--site-help-green); font-size: .68rem; font-weight: 800; letter-spacing: .04em; text-transform: uppercase; }
.site-help-result-snippet,
.site-help-empty { color: var(--site-help-muted); font-size: .8rem; line-height: 1.45; }

.site-help-footer { display: grid; gap: 9px; padding: 12px 14px calc(12px + env(safe-area-inset-bottom)); border-top: 1px solid var(--site-help-line); }
.site-help-pager { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; }
.site-help-pager button { display: grid; min-width: 0; gap: 2px; padding: 8px 10px; border: 1px solid var(--site-help-line); border-radius: 9px; color: var(--site-help-ink); background: #fff; font: inherit; font-size: .7rem; text-align: left; }
.site-help-pager button:last-child { text-align: right; }
.site-help-pager strong { overflow: hidden; font-size: .75rem; text-overflow: ellipsis; white-space: nowrap; }
.site-help-full-link { display: flex; min-height: 40px; align-items: center; justify-content: center; gap: 7px; padding: 8px 10px; border: 1px solid var(--site-help-line); border-radius: 9px; color: var(--site-help-green-dark); font-size: .78rem; font-weight: 750; text-decoration: none; }

.site-help-inline-button { display: inline-grid; width: 30px; height: 30px; flex: 0 0 auto; margin-left: 7px; padding: 0; place-items: center; vertical-align: middle; border: 1px solid #cfe3d5; border-radius: 50%; color: var(--site-help-green-dark); background: var(--site-help-green-soft); font-size: .78rem; }
.site-help-inline-button:hover,
.site-help-inline-button:focus-visible,
.site-help-inline-button[aria-expanded="true"] { border-color: var(--site-help-green); color: #fff; background: var(--site-help-green); outline: 3px solid rgba(40,122,75,.14); }

.site-help-popover { position: fixed; z-index: 2060; width: min(330px, calc(100vw - 24px)); padding: 14px; border: 1px solid var(--site-help-line); border-radius: 13px; color: var(--site-help-ink); background: #fff; box-shadow: 0 16px 42px rgba(9,29,17,.22); }
.site-help-popover-heading { display: flex; align-items: start; justify-content: space-between; gap: 10px; }
.site-help-popover-heading strong { font-size: .92rem; }
.site-help-popover-heading button { display: grid; width: 30px; height: 30px; padding: 0; place-items: center; border: 0; border-radius: 7px; color: var(--site-help-muted); background: transparent; }
.site-help-popover p { margin: 7px 0 12px; color: var(--site-help-muted); font-size: .82rem; line-height: 1.5; }
.site-help-popover-more { padding: 7px 10px; border: 1px solid #cfe3d5; border-radius: 8px; color: var(--site-help-green-dark); background: var(--site-help-green-soft); font: inherit; font-size: .76rem; font-weight: 750; }

[data-bs-theme="dark"] .site-help-drawer,
[data-bs-theme="dark"] .site-help-header,
[data-bs-theme="dark"] .site-help-footer,
[data-bs-theme="dark"] .site-help-popover,
[data-bs-theme="dark"] .site-help-result,
[data-bs-theme="dark"] .site-help-icon-button,
[data-bs-theme="dark"] .site-help-search input { color: #edf4ef; background: #17211b; }
[data-bs-theme="dark"] .site-help-tools,
[data-bs-theme="dark"] .site-help-toc,
[data-bs-theme="dark"] .site-help-status { background: #1d2a22; }

@media (max-width: 767.98px), (hover: none) and (pointer: coarse) and (max-height: 520px) {
    .site-help-launcher { right: 12px; bottom: 12px; width: 46px; height: 46px; justify-content: center; padding: 0; }
    .site-help-launcher span { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0,0,0,0); }
    .site-help-drawer { inset: 0; width: 100vw; max-width: none; padding-top: env(safe-area-inset-top); border-left: 0; transform: translateY(102%); }
    .site-help-drawer.is-open { transform: translateY(0); }
    .site-help-search input { font-size: 16px; }
    .site-help-article { padding: 16px 15px 28px; font-size: .92rem; }
}

@media (prefers-reduced-motion: reduce) {
    .site-help-overlay,
    .site-help-drawer { transition: none; }
}
