.ht-page-help-action,
.ht-nav-help-btn {
    appearance: none;
    border: 0;
    background: transparent;
    color: inherit;
    cursor: pointer;
    font: inherit;
}

.ht-page-help-action {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 38px;
    height: 38px;
    border-radius: 10px;
    color: var(--ht-header-text, #334155);
    transition: background-color .18s ease, color .18s ease, transform .18s ease;
}

.ht-page-help-action:hover,
.ht-page-help-action:focus-visible {
    background: rgba(15, 118, 110, .10);
    color: #0f766e;
    outline: none;
}

.ht-page-help-action:active {
    transform: translateY(1px);
}

.ht-page-help-action svg,
.ht-nav-help-btn svg,
.ht-page-help-close svg,
.ht-page-help-link svg {
    width: 20px;
    height: 20px;
    fill: none;
    stroke: currentColor;
    stroke-width: 2;
    stroke-linecap: round;
    stroke-linejoin: round;
}

.ht-nav-footer {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 8px;
}

.ht-nav-help-btn {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    min-width: 0;
    max-width: 100%;
    padding: 8px 10px;
    border-radius: 10px;
    color: var(--ht-nav-text, #64748b);
    background: rgba(15, 118, 110, .08);
    transition: background-color .18s ease, color .18s ease;
}

.ht-nav-help-btn:hover,
.ht-nav-help-btn:focus-visible {
    color: #0f766e;
    background: rgba(15, 118, 110, .14);
    outline: 2px solid rgba(15, 118, 110, .25);
    outline-offset: 2px;
}

.ht-nav-help-btn span {
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.ht-nav[data-collapsed="true"] .ht-nav-help-btn span {
    display: none;
}

.ht-nav[data-collapsed="true"] .ht-nav-footer {
    flex-direction: column;
}

.ht-page-help-overlay {
    position: fixed;
    inset: 0;
    z-index: 1090;
    pointer-events: none;
    visibility: hidden;
}

.ht-page-help-overlay.is-open {
    pointer-events: auto;
    visibility: visible;
}

.ht-page-help-backdrop {
    position: absolute;
    inset: 0;
    background: rgba(15, 23, 42, .46);
    opacity: 0;
    transition: opacity .2s ease;
}

.ht-page-help-overlay.is-open .ht-page-help-backdrop {
    opacity: 1;
}

.ht-page-help-panel {
    position: absolute;
    inset-block: 16px;
    inset-inline-end: 16px;
    display: flex;
    flex-direction: column;
    width: min(520px, calc(100vw - 32px));
    max-height: calc(100dvh - 32px);
    border: 1px solid rgba(148, 163, 184, .28);
    border-radius: 18px;
    background: #ffffff;
    color: #0f172a;
    box-shadow: 0 24px 80px rgba(15, 23, 42, .26);
    transform: translateX(24px);
    opacity: 0;
    transition: transform .22s ease, opacity .22s ease;
    overflow: hidden;
}

[dir="rtl"] .ht-page-help-panel {
    inset-inline-start: 16px;
    inset-inline-end: auto;
    transform: translateX(-24px);
}

.ht-page-help-overlay.is-open .ht-page-help-panel {
    transform: translateX(0);
    opacity: 1;
}

.ht-page-help-panel:focus {
    outline: none;
}

.ht-page-help-panel__header {
    position: relative;
    padding: 22px 64px 18px 24px;
    border-bottom: 1px solid rgba(148, 163, 184, .24);
    background: linear-gradient(135deg, rgba(15, 118, 110, .09), rgba(234, 179, 8, .08));
}

[dir="rtl"] .ht-page-help-panel__header {
    padding: 22px 24px 18px 64px;
}

.ht-page-help-kicker {
    margin-bottom: 8px;
    color: #0f766e;
    font-size: 12px;
    font-weight: 800;
    letter-spacing: 0;
    text-transform: uppercase;
}

[dir="rtl"] .ht-page-help-kicker {
    text-transform: none;
}

.ht-page-help-title {
    margin: 0;
    max-width: 100%;
    color: #0f172a;
    font-size: 24px;
    line-height: 1.2;
    font-weight: 800;
    letter-spacing: 0;
    overflow-wrap: anywhere;
}

.ht-page-help-close {
    position: absolute;
    inset-block-start: 18px;
    inset-inline-end: 18px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 38px;
    height: 38px;
    border: 1px solid rgba(148, 163, 184, .32);
    border-radius: 12px;
    background: rgba(255, 255, 255, .86);
    color: #334155;
    cursor: pointer;
    transition: background-color .18s ease, border-color .18s ease, color .18s ease;
}

.ht-page-help-close:hover,
.ht-page-help-close:focus-visible {
    background: #ffffff;
    border-color: rgba(15, 118, 110, .45);
    color: #0f766e;
    outline: none;
}

.ht-page-help-panel__body {
    flex: 1 1 auto;
    padding: 20px 24px 24px;
    overflow-y: auto;
    overscroll-behavior: contain;
}

.ht-page-help-section {
    padding: 0 0 18px;
}

.ht-page-help-section + .ht-page-help-section {
    padding-top: 18px;
    border-top: 1px solid rgba(148, 163, 184, .18);
}

.ht-page-help-section h3 {
    margin: 0 0 10px;
    color: #0f172a;
    font-size: 14px;
    line-height: 1.35;
    font-weight: 800;
    letter-spacing: 0;
}

.ht-page-help-section p,
.ht-page-help-section li {
    color: #475569;
    font-size: 14px;
    line-height: 1.6;
    overflow-wrap: anywhere;
}

.ht-page-help-section p {
    margin: 0;
}

.ht-page-help-section ul {
    display: grid;
    gap: 8px;
    margin: 0;
    padding-inline-start: 18px;
}

[dir="rtl"] .ht-page-help-section ul {
    padding-inline-start: 0;
    padding-inline-end: 18px;
}

.ht-page-help-section--summary {
    padding-bottom: 20px;
}

.ht-page-help-links {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
    gap: 10px;
}

.ht-page-help-link {
    display: flex;
    align-items: center;
    justify-content: space-between;
    min-width: 0;
    gap: 12px;
    padding: 11px 12px;
    border: 1px solid rgba(148, 163, 184, .25);
    border-radius: 12px;
    color: #0f766e;
    background: rgba(15, 118, 110, .06);
    font-size: 13px;
    font-weight: 700;
    text-decoration: none;
    transition: background-color .18s ease, border-color .18s ease, transform .18s ease;
}

.ht-page-help-link:hover,
.ht-page-help-link:focus-visible {
    border-color: rgba(15, 118, 110, .4);
    background: rgba(15, 118, 110, .11);
    color: #0f766e;
    transform: translateY(-1px);
    outline: none;
}

.ht-page-help-link span {
    min-width: 0;
    overflow-wrap: anywhere;
}

[dir="rtl"] .ht-page-help-link svg {
    transform: rotate(180deg);
}

body.ht-page-help-lock {
    overflow: hidden;
}

body.dark-only .ht-page-help-action {
    color: rgba(226, 232, 240, .9);
}

body.dark-only .ht-page-help-action:hover,
body.dark-only .ht-page-help-action:focus-visible,
body.dark-only .ht-nav-help-btn:hover,
body.dark-only .ht-nav-help-btn:focus-visible {
    color: #5eead4;
    background: rgba(94, 234, 212, .12);
}

body.dark-only .ht-nav-help-btn {
    color: rgba(226, 232, 240, .82);
    background: rgba(94, 234, 212, .08);
}

body.dark-only .ht-page-help-panel {
    border-color: rgba(148, 163, 184, .24);
    background: #111827;
    color: #f8fafc;
    box-shadow: 0 24px 80px rgba(0, 0, 0, .42);
}

body.dark-only .ht-page-help-panel__header {
    border-color: rgba(148, 163, 184, .18);
    background: linear-gradient(135deg, rgba(45, 212, 191, .12), rgba(250, 204, 21, .08));
}

body.dark-only .ht-page-help-kicker {
    color: #5eead4;
}

body.dark-only .ht-page-help-title,
body.dark-only .ht-page-help-section h3 {
    color: #f8fafc;
}

body.dark-only .ht-page-help-section p,
body.dark-only .ht-page-help-section li {
    color: #cbd5e1;
}

body.dark-only .ht-page-help-section + .ht-page-help-section {
    border-color: rgba(148, 163, 184, .16);
}

body.dark-only .ht-page-help-close {
    border-color: rgba(148, 163, 184, .28);
    background: rgba(15, 23, 42, .75);
    color: #e2e8f0;
}

body.dark-only .ht-page-help-link {
    border-color: rgba(45, 212, 191, .22);
    color: #5eead4;
    background: rgba(45, 212, 191, .09);
}

body.dark-only .ht-page-help-link:hover,
body.dark-only .ht-page-help-link:focus-visible {
    color: #99f6e4;
    background: rgba(45, 212, 191, .14);
}

@media (max-width: 640px) {
    .ht-page-help-action {
        width: 36px;
        height: 36px;
    }

    .ht-page-help-panel {
        inset: auto 0 0 0;
        width: 100%;
        max-height: min(82dvh, 720px);
        border-radius: 18px 18px 0 0;
        transform: translateY(28px);
    }

    [dir="rtl"] .ht-page-help-panel {
        inset: auto 0 0 0;
        transform: translateY(28px);
    }

    .ht-page-help-overlay.is-open .ht-page-help-panel {
        transform: translateY(0);
    }

    .ht-page-help-panel__header {
        padding: 18px 58px 16px 18px;
    }

    [dir="rtl"] .ht-page-help-panel__header {
        padding: 18px 18px 16px 58px;
    }

    .ht-page-help-title {
        font-size: 20px;
    }

    .ht-page-help-panel__body {
        padding: 18px;
    }

    .ht-page-help-links {
        grid-template-columns: 1fr;
    }
}

@media (prefers-reduced-motion: reduce) {
    .ht-page-help-action,
    .ht-nav-help-btn,
    .ht-page-help-backdrop,
    .ht-page-help-panel,
    .ht-page-help-link {
        transition: none;
    }
}
