.ht-page-help-fab {
    appearance: none;
    cursor: pointer;
    font: inherit;
}

.ht-page-help-fab 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-page-help-fab {
    position: fixed;
    right: calc(20px + env(safe-area-inset-right));
    bottom: calc(20px + env(safe-area-inset-bottom));
    z-index: 1080;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    min-height: 44px;
    padding: 10px 16px;
    border: 1px solid rgba(15, 118, 110, .24);
    border-radius: 999px;
    background: #ffffff;
    color: #0f766e;
    box-shadow: 0 4px 12px rgba(15, 23, 42, .14);
    font-size: 14px;
    font-weight: 600;
}

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

.ht-page-help-fab svg {
    flex: 0 0 auto;
}

@media (min-width: 641px) {
    body.ltr.ht-page-help-available .tap-top {
        right: calc(20px + env(safe-area-inset-right));
        bottom: calc(76px + env(safe-area-inset-bottom));
        transition: opacity .18s ease;
    }
}

.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-fab {
    border-color: rgba(45, 212, 191, .28);
    color: #5eead4;
    background: #111827;
    box-shadow: 0 4px 12px rgba(0, 0, 0, .3);
}

body.dark-only .ht-page-help-fab:hover,
body.dark-only .ht-page-help-fab:focus-visible {
    color: #99f6e4;
    background: #1f2937;
}

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-fab {
        right: calc(14px + env(safe-area-inset-right));
        bottom: calc(72px + env(safe-area-inset-bottom));
        width: 48px;
        height: 48px;
        min-height: 48px;
        padding: 0;
    }

    .ht-page-help-fab span {
        position: absolute;
        width: 1px;
        height: 1px;
        padding: 0;
        margin: -1px;
        overflow: hidden;
        clip: rect(0, 0, 0, 0);
        white-space: nowrap;
        border: 0;
    }

    .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-backdrop,
    .ht-page-help-panel,
    .ht-page-help-link {
        transition: none;
    }
}
