#help-menu-dialog {
    width: min(1240px, calc(100% - 32px));
    height: min(720px, calc(100% - 32px));
    padding: 0;
    border: 0;
    border-radius: 12px;
    color: #1c2833;
    background: #f8f9f9;
    box-shadow: 0 12px 40px rgb(0 0 0 / 35%);
    overflow: hidden;
}

#help-menu-dialog[open] {
    display: flex;
    flex-direction: column;
}

#help-menu-dialog::backdrop {
    background: rgba(16, 24, 40, 0.68);
    backdrop-filter: blur(2px);
    -webkit-backdrop-filter: blur(2px);
}

#help-menu-dialog button {
    cursor: pointer;
}

/* Keep navigation from shifting when the app's global button hover runs. */
#help-menu-dialog button:hover {
    transform: none;
}

.help-menu-header {
    display: flex;
    flex: 0 0 auto;
    align-items: stretch;
    justify-content: space-between;
    color: #fff;
    background: #4d8ad5;
}

.help-menu-header h1 {
    margin: 0;
    padding: 14px 20px;
    font-size: 24px;
    font-weight: 500;
}

.help-menu-header button {
    display: flex;
    align-items: center;
    justify-content: center;
    min-width: 58px;
    padding: 0 20px;
    border: 0;
    border-radius: 0 12px 0 0;
    color: #fff;
    background: transparent;
    font-size: 20px;
}

.help-menu-header button:hover,
.help-menu-header button:focus-visible {
    background: #005f89;
}

.help-menu-layout {
    display: grid;
    flex: 1 1 auto;
    grid-template-columns: 270px minmax(0, 1fr);
    min-height: 0;
}

.help-topic-sidebar {
    padding: 18px 12px;
    border-right: 1px solid #d0d5dd;
    background: #eef4fb;
    overflow-y: auto;
}

.help-topic-sidebar h2 {
    margin: 0 10px 12px;
    color: #475467;
    font-size: 13px;
    letter-spacing: 0.06em;
    text-transform: uppercase;
}

.help-search {
    margin: 0 4px 12px;
}

.help-search-field {
    position: relative;
}

.help-search-field > i {
    position: absolute;
    top: 50%;
    left: 11px;
    color: #667085;
    font-size: 13px;
    pointer-events: none;
    transform: translateY(-50%);
}

#help-search-input {
    width: 100%;
    min-height: 40px;
    padding: 8px 10px 8px 33px;
    border: 1px solid #b8c6d5;
    border-radius: 8px;
    outline: none;
    color: #1d2939;
    background: #fff;
    font: inherit;
}

#help-search-input::placeholder {
    color: #667085;
}

#help-search-input:focus {
    border-color: #3366cc;
    box-shadow: 0 0 0 3px rgb(51 102 204 / 18%);
}

.help-search-status {
    margin: 6px 6px 0;
    color: #667085;
    font-size: 12px;
}

.help-search-status:empty {
    display: none;
}

#help-topic-navigation {
    display: flex;
    flex-direction: column;
    gap: 6px;
}

.help-search-result {
    display: grid;
    grid-template-columns: 24px minmax(0, 1fr);
    gap: 10px;
    align-items: center;
    width: 100%;
    padding: 10px 12px;
    border: 0;
    border-radius: 8px;
    color: #344054;
    background: transparent;
    text-align: left;
}

.help-search-result:hover,
.help-search-result:focus-visible {
    color: #174f83;
    background: #dce9f7;
}

.help-search-result > i {
    text-align: center;
}

.help-search-result-text {
    display: flex;
    min-width: 0;
    flex-direction: column;
    gap: 2px;
}

.help-search-result-title {
    font-weight: 600;
    line-height: 1.25;
}

.help-search-result-topic {
    color: #667085;
    font-size: 12px;
    line-height: 1.25;
}

.help-search-empty {
    margin: 8px;
    color: #667085;
    font-size: 13px;
}

.help-topic-entry {
    display: flex;
    flex-direction: column;
    gap: 4px;
}

.help-topic-button {
    display: grid;
    grid-template-columns: 24px minmax(0, 1fr) 12px;
    gap: 10px;
    align-items: center;
    width: 100%;
    padding: 11px 12px;
    border: 0;
    border-radius: 8px;
    color: #344054;
    background: transparent;
    text-align: left;
}

.help-topic-button:hover {
    background: #dce9f7;
}

.help-topic-button[aria-current="page"] {
    color: #174f83;
    background: #cfe1f5;
    font-weight: 600;
}

.help-topic-button i {
    text-align: center;
}

.help-topic-chevron {
    color: #667085;
    font-size: 10px;
    transition: transform 140ms ease;
}

.help-topic-button[aria-expanded="true"] .help-topic-chevron {
    transform: rotate(90deg);
}

.help-subtopic-list {
    display: flex;
    flex-direction: column;
    gap: 2px;
    margin: 0;
    padding: 0 0 4px 34px;
    list-style: none;
}

.help-subtopic-nav-button {
    width: 100%;
    padding: 8px 10px;
    border: 0;
    border-left: 2px solid #c6d2df;
    border-radius: 0 6px 6px 0;
    color: #475467;
    background: transparent;
    font-size: 13px;
    line-height: 1.3;
    text-align: left;
}

.help-subtopic-nav-button:hover {
    color: #174f83;
    background: #dce9f7;
}

.help-subtopic-nav-button[aria-current="page"] {
    border-left-color: #3366cc;
    color: #174f83;
    background: #fff;
    font-weight: 600;
}

.help-menu-main {
    display: flex;
    min-width: 0;
    min-height: 0;
    flex-direction: column;
    background: #fff;
}

.help-content-heading {
    flex: 0 0 auto;
    padding: 24px 28px 14px;
    border-bottom: 1px solid #e4e7ec;
}

.help-content-heading > span {
    color: #667085;
    font-size: 13px;
    letter-spacing: 0.05em;
    text-transform: uppercase;
}

.help-content-heading h2 {
    display: flex;
    align-items: center;
    gap: 10px;
    margin: 4px 0 0;
    font-size: 27px;
}

#help-topic-icon {
    flex: 0 0 auto;
    color: #174f83;
    font-size: 0.85em;
}

#help-content {
    flex: 1 1 auto;
    padding: 24px 28px;
    outline: none;
    overflow-y: auto;
}

#help-content h3 {
    margin: 0 0 16px;
    font-size: 23px;
}

#help-content p,
#help-content li {
    font-size: 16px;
    line-height: 1.55;
}

#help-content p {
    margin: 0 0 16px;
}

.help-control-label {
    white-space: nowrap;
}

.help-control-label > i,
.help-control-symbol {
    display: inline-block;
    min-width: 1.1em;
    margin-right: 0.3em;
    text-align: center;
}

.help-control-label > i {
    color: #174f83;
}

#help-content ul,
#help-content ol {
    margin: 0 0 20px;
    padding-left: 26px;
}

#help-content li + li {
    margin-top: 8px;
}

#help-content .help-substeps {
    margin: 9px 0 2px;
    padding-left: 22px;
}

#help-content .help-substeps li {
    color: #475467;
    font-size: 15px;
}

.help-article-image {
    max-width: 720px;
    margin: 18px 0 22px;
    padding: 10px;
    border: 1px solid #d0d5dd;
    border-radius: 10px;
    background: #f8fafc;
}

.help-article-image-small {
    max-width: 360px;
}

.help-article-image img {
    display: block;
    width: 100%;
    height: auto;
    border-radius: 6px;
}

.help-article-image figcaption {
    padding: 10px 4px 2px;
    color: #475467;
    font-size: 14px;
    line-height: 1.45;
    text-align: center;
}

.help-block-list {
    display: grid;
    gap: 12px;
    max-width: 820px;
}

.help-block-group-title {
    margin: 16px 0 0;
    padding-bottom: 7px;
    border-bottom: 1px solid #d0d5dd;
    color: #344054;
    font-size: 18px;
}

.help-block-group-title:first-child {
    margin-top: 0;
}

.help-block-card {
    display: grid;
    grid-template-columns: minmax(190px, 0.75fr) minmax(0, 1.25fr);
    gap: 18px;
    align-items: center;
    padding: 14px;
    border: 1px solid #d0d5dd;
    border-radius: 9px;
    background: #fff;
    box-shadow: 0 2px 6px rgb(16 24 40 / 7%);
}

.help-block-preview {
    display: flex;
    align-items: center;
    min-height: 62px;
    padding: 12px;
    border-radius: 7px;
    background: #f2f4f7;
    overflow-x: auto;
}

.help-block-shape {
    position: relative;
    min-width: max-content;
    padding: 11px 15px;
    border: 1px solid rgb(0 0 0 / 24%);
    border-radius: 6px;
    color: #fff;
    background: var(--help-block-color);
    box-shadow: inset 0 -2px 0 rgb(0 0 0 / 18%);
    font-size: 14px;
    font-weight: 600;
}

.help-block-shape-value {
    border-radius: 999px;
}

.help-block-details p {
    margin: 0;
}

#help-content .help-block-inputs {
    margin: 10px 0 0;
    padding-left: 20px;
}

#help-content .help-block-inputs li {
    color: #475467;
    font-size: 14px;
}

#help-content .help-visual-steps {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 14px;
    padding: 0;
    list-style: none;
    counter-reset: help-visual-step;
}

#help-content .help-visual-steps > li {
    display: flex;
    position: relative;
    flex-direction: column;
    min-width: 0;
    margin: 0;
    padding: 46px 12px 12px;
    border: 1px solid #d0d5dd;
    border-radius: 8px;
    background: #fff;
    counter-increment: help-visual-step;
}

#help-content .help-visual-steps > li::before {
    content: counter(help-visual-step);
    display: flex;
    position: absolute;
    top: 12px;
    left: 12px;
    align-items: center;
    justify-content: center;
    width: 26px;
    height: 26px;
    border-radius: 50%;
    color: #fff;
    background: #4d8ad5;
    font-weight: 700;
}

.help-visual-step-text {
    line-height: 1.45;
}

.help-visual-step-media {
    margin-top: 12px;
    border-radius: 6px;
    background: #f2f4f7;
    overflow: hidden;
}

.help-visual-step-media img {
    display: block;
    width: 100%;
    height: auto;
}

.help-sonar-demo {
    max-width: 720px;
    margin: 20px 0;
    padding: 18px;
    border: 1px solid #b9d9ee;
    border-radius: 12px;
    background: linear-gradient(180deg, #edf8ff 0%, #f8fcff 100%);
}

.help-sonar-stage {
    display: grid;
    grid-template-columns: 96px minmax(130px, 1fr) 54px;
    gap: 10px;
    align-items: center;
    min-height: 130px;
}

.help-sonar-sensor,
.help-sonar-wall {
    display: flex;
    flex-direction: column;
    gap: 8px;
    align-items: center;
    color: #344054;
    font-size: 13px;
    font-weight: 600;
    text-align: center;
}

.help-sonar-sensor-face {
    display: flex;
    gap: 8px;
    padding: 11px 9px;
    border: 3px solid #245a85;
    border-radius: 8px;
    background: #4d8ad5;
    box-shadow: 0 4px 0 #174f83;
}

.help-sonar-sensor-face span {
    width: 24px;
    height: 24px;
    border: 4px solid #d8e4ec;
    border-radius: 50%;
    background: #344054;
    box-shadow: inset 0 0 0 3px #17212b;
}

.help-sonar-path {
    position: relative;
    height: 104px;
    border-top: 2px dashed #9ec6df;
    border-bottom: 2px dashed #b9ddc6;
}

.help-sonar-path > span:not(.help-sonar-pulse) {
    position: absolute;
    left: 50%;
    transform: translateX(-50%);
    font-size: 13px;
    font-weight: 600;
    white-space: nowrap;
}

.help-sonar-outbound-label {
    top: 8px;
    color: #246a9b;
}

.help-sonar-echo-label {
    bottom: 8px;
    color: #2f7a49;
}

.help-sonar-pulse {
    position: absolute;
    top: 50%;
    left: 8px;
    width: 34px;
    height: 62px;
    border-right: 4px solid currentColor;
    border-radius: 50%;
    color: #2f86bd;
    filter: drop-shadow(0 0 3px currentColor);
    transform: translateY(-50%) scaleX(1);
    opacity: 0;
}

.help-sonar-pulse::before,
.help-sonar-pulse::after {
    content: "";
    position: absolute;
    top: 50%;
    left: 0;
    border-right: 4px solid currentColor;
    border-radius: 50%;
    transform: translateY(-50%);
}

.help-sonar-pulse::before {
    width: 12px;
    height: 24px;
}

.help-sonar-pulse::after {
    width: 23px;
    height: 44px;
}

.help-sonar-pulse-outbound {
    color: #2f86bd;
    transform: translateY(-50%) scaleX(1);
    animation: help-sonar-pulse-outbound 3.2s ease-in-out infinite;
}

.help-sonar-pulse-echo {
    color: #2f7a49;
    transform: translateY(-50%) scaleX(-1);
    animation: help-sonar-pulse-echo 3.2s ease-in-out infinite;
}

.help-sonar-wall > span:first-child {
    width: 28px;
    height: 94px;
    border: 2px solid #667085;
    border-radius: 3px;
    background: repeating-linear-gradient(
        -45deg,
        #98a2b3 0,
        #98a2b3 7px,
        #d0d5dd 7px,
        #d0d5dd 14px
    );
    box-shadow: 4px 0 0 #475467;
}

.help-sonar-demo figcaption {
    margin-top: 12px;
    color: #475467;
    font-size: 14px;
    line-height: 1.45;
    text-align: center;
}

@keyframes help-sonar-pulse-outbound {
    0% {
        left: 8px;
        opacity: 0;
    }

    5% {
        left: 8px;
        opacity: 1;
    }

    43% {
        left: calc(100% - 38px);
        opacity: 1;
    }

    48%, 100% {
        left: calc(100% - 38px);
        opacity: 0;
    }
}

@keyframes help-sonar-pulse-echo {
    0%, 48% {
        left: calc(100% - 38px);
        opacity: 0;
    }

    53% {
        left: calc(100% - 38px);
        opacity: 1;
    }

    92% {
        left: 8px;
        opacity: 1;
    }

    97%, 100% {
        left: 8px;
        opacity: 0;
    }
}

@media (prefers-reduced-motion: reduce) {
    .help-sonar-pulse-outbound {
        left: 50%;
        opacity: 1;
        color: #2f86bd;
        transform: translateY(-50%) scaleX(1);
        animation: none;
    }

    .help-sonar-pulse-echo {
        display: none;
    }
}

.help-troubleshooting {
    max-width: 760px;
    border: 1px solid #e4e7ec;
    border-radius: 10px;
    background: #fff;
    box-shadow: 0 3px 10px rgb(16 24 40 / 8%);
    overflow: hidden;
}

.help-troubleshooting-problem {
    display: grid;
    grid-template-columns: 38px minmax(0, 1fr);
    gap: 12px;
    align-items: start;
    padding: 17px 18px;
    border-bottom: 1px solid #f0c8c8;
    background: #fff1f1;
}

.help-troubleshooting-problem > i {
    padding-top: 3px;
    color: #c93636;
    font-size: 25px;
    text-align: center;
}

.help-troubleshooting h4 {
    margin: 0 0 5px;
    font-size: 16px;
}

.help-troubleshooting-problem h4 {
    color: #9c2525;
    text-transform: uppercase;
    letter-spacing: 0.04em;
}

#help-content .help-troubleshooting-problem p {
    margin: 0;
    color: #572323;
    font-weight: 600;
}

.help-troubleshooting-solutions {
    padding: 20px 18px;
}

.help-troubleshooting-solutions > h4 {
    margin-bottom: 14px;
    color: #174f83;
    font-size: 18px;
}

#help-content .help-troubleshooting-solutions ol {
    display: grid;
    gap: 10px;
    margin: 0;
    padding: 0;
    list-style: none;
    counter-reset: troubleshooting-solution;
}

#help-content .help-troubleshooting-solutions li {
    display: grid;
    grid-template-columns: 30px minmax(0, 1fr);
    gap: 10px;
    align-items: center;
    margin: 0;
    padding: 11px 12px;
    border-radius: 7px;
    background: #f4f8fc;
    counter-increment: troubleshooting-solution;
}

#help-content .help-troubleshooting-solutions li::before {
    content: counter(troubleshooting-solution);
    display: flex;
    align-items: center;
    justify-content: center;
    width: 28px;
    height: 28px;
    border-radius: 50%;
    color: #fff;
    background: #4d8ad5;
    font-size: 14px;
    font-weight: 700;
}

.help-troubleshooting-solution-text {
    min-width: 0;
}

.help-callout {
    padding: 14px 16px;
    border-left: 4px solid #4d8ad5;
    border-radius: 6px;
    background: #eef5fc;
}

.help-callout h4 {
    margin: 0 0 5px;
    color: #174f83;
    font-size: 16px;
}

.help-callout p {
    margin-bottom: 0 !important;
}

.help-callout-warning {
    border-left-color: #ea580c;
    background: #fff7ed;
}

.help-callout-warning h4 {
    display: flex;
    align-items: center;
    gap: 8px;
    color: #9a3412;
}

.help-callout-warning p {
    color: #7c2d12;
}

.help-menu-footer {
    display: flex;
    flex: 0 0 auto;
    justify-content: flex-end;
    padding: 12px 18px;
    border-top: 1px solid #d0d5dd;
    background: #f8f9f9;
}

.help-menu-footer button {
    width: fit-content;
    padding: 9px 18px;
    border: 0;
    border-radius: 5px;
    color: #fff;
    background: #3366cc;
}

.help-menu-footer button:hover {
    background: #2857b8;
}

@media (max-width: 720px) {
    #help-menu-dialog {
        width: calc(100% - 16px);
        height: calc(100% - 16px);
    }

    .help-menu-layout {
        grid-template-columns: 1fr;
        grid-template-rows: auto minmax(0, 1fr);
    }

    .help-topic-sidebar {
        padding: 10px;
        border-right: 0;
        border-bottom: 1px solid #d0d5dd;
        overflow-x: auto;
        overflow-y: hidden;
    }

    .help-topic-sidebar h2 {
        display: none;
    }

    .help-search {
        position: sticky;
        left: 0;
        z-index: 1;
        width: min(260px, calc(100vw - 36px));
        background: #eef4fb;
    }

    #help-topic-navigation {
        align-items: flex-start;
        flex-direction: row;
    }

    .help-topic-entry {
        flex: 0 0 220px;
    }

    .help-search-result {
        flex: 0 0 220px;
    }

    .help-subtopic-list {
        padding-left: 12px;
    }

    .help-content-heading {
        padding: 16px 18px 10px;
    }

    .help-content-heading h2 {
        font-size: 22px;
    }

    #help-content {
        padding: 18px;
    }

    .help-block-card {
        grid-template-columns: minmax(0, 1fr);
        gap: 10px;
    }

    .help-sonar-demo {
        padding: 12px;
    }

    .help-sonar-stage {
        grid-template-columns: 72px minmax(90px, 1fr) 38px;
        gap: 4px;
    }

    .help-sonar-sensor,
    .help-sonar-wall,
    .help-sonar-path > span:not(.help-sonar-pulse) {
        font-size: 11px;
    }

    .help-sonar-sensor-face {
        gap: 4px;
        padding: 8px 6px;
    }

    .help-sonar-sensor-face span {
        width: 17px;
        height: 17px;
        border-width: 3px;
    }

    .help-sonar-wall > span:first-child {
        width: 22px;
    }
}
