body.guided-tour-open {
    overflow: hidden;
    overscroll-behavior: none;
}

.guided-tour-overlay {
    --guided-tour-surface: var(--surface, #ffffff);
    --guided-tour-surface-muted: var(--surface-muted, #f5f7f5);
    --guided-tour-line: var(--line, #d3dbd5);
    --guided-tour-line-strong: var(--line-strong, #aeb9b1);
    --guided-tour-text: var(--text, #182019);
    --guided-tour-muted: var(--muted, #647068);
    --guided-tour-accent: var(--accent, #2f7d32);
    --guided-tour-accent-dark: var(--accent-dark, #256628);
    --guided-tour-highlight: #f6c344;
    --guided-tour-focus: #1d6fc0;

    position: fixed;
    inset: 0;
    z-index: 2147483000;
    overflow: hidden;
    background: transparent;
    color: var(--guided-tour-text);
    font-family: Arial, Helvetica, sans-serif;
    font-size: 14px;
    font-weight: 400;
    letter-spacing: 0;
    line-height: 1.45;
    isolation: isolate;
    overscroll-behavior: contain;
}

.guided-tour-overlay,
.guided-tour-overlay * {
    box-sizing: border-box;
}

.guided-tour-overlay .guided-tour-highlight {
    position: fixed;
    z-index: 1;
    max-width: calc(100vw - 8px);
    max-height: calc(100vh - 8px);
    max-height: calc(100dvh - 8px);
    border: 2px solid var(--guided-tour-highlight);
    border-radius: 6px;
    background: transparent;
    box-shadow:
        0 0 0 3px rgba(246, 195, 68, 0.24),
        0 0 0 100vmax rgba(19, 25, 21, 0.64);
    pointer-events: none;
    transition:
        top 140ms ease,
        left 140ms ease,
        width 140ms ease,
        height 140ms ease;
    will-change: top, left, width, height;
}

.guided-tour-overlay .guided-tour-dialog {
    position: fixed;
    z-index: 2;
    display: grid;
    width: min(400px, calc(100vw - 28px));
    min-width: 0;
    max-width: calc(100vw - 28px);
    max-height: calc(100vh - 28px);
    max-height: calc(100dvh - 28px);
    margin: 0;
    overflow-x: hidden;
    overflow-y: auto;
    padding: 20px;
    border: 1px solid var(--guided-tour-line);
    border-radius: 6px;
    outline: 0;
    background: var(--guided-tour-surface);
    color: var(--guided-tour-text);
    box-shadow: 0 18px 48px rgba(15, 23, 17, 0.3);
    scrollbar-color: var(--guided-tour-line-strong) var(--guided-tour-surface-muted);
    scrollbar-width: thin;
    touch-action: pan-y;
    overscroll-behavior: contain;
}

.guided-tour-overlay .guided-tour-dialog::-webkit-scrollbar {
    width: 9px;
}

.guided-tour-overlay .guided-tour-dialog::-webkit-scrollbar-track {
    background: var(--guided-tour-surface-muted);
}

.guided-tour-overlay .guided-tour-dialog::-webkit-scrollbar-thumb {
    border: 2px solid var(--guided-tour-surface-muted);
    border-radius: 6px;
    background: var(--guided-tour-line-strong);
}

.guided-tour-overlay .guided-tour-close {
    position: absolute;
    top: 8px;
    right: 8px;
    display: grid;
    width: 36px;
    height: 36px;
    min-width: 36px;
    min-height: 36px;
    margin: 0;
    padding: 0;
    border: 0;
    border-radius: 4px;
    appearance: none;
    background: transparent;
    color: var(--guided-tour-muted);
    cursor: pointer;
    font: inherit;
    line-height: 1;
    place-items: center;
    -webkit-tap-highlight-color: transparent;
}

.guided-tour-overlay .guided-tour-close i {
    pointer-events: none;
}

.guided-tour-close-symbol {
    display: block;
    font-size: 25px;
    font-weight: 400;
    line-height: 1;
    pointer-events: none;
}

.guided-tour-overlay .guided-tour-title {
    min-width: 0;
    margin: 0;
    padding: 0 38px 0 0;
    color: var(--guided-tour-text);
    font-size: 18px;
    font-weight: 700;
    letter-spacing: 0;
    line-height: 1.3;
    overflow-wrap: anywhere;
    text-wrap: balance;
}

.guided-tour-overlay .guided-tour-body {
    min-width: 0;
    margin: 10px 0 18px;
    padding: 0;
    color: var(--guided-tour-muted);
    font-size: 14px;
    font-weight: 400;
    line-height: 1.55;
    overflow-wrap: anywhere;
    white-space: pre-line;
}

.guided-tour-overlay .guided-tour-actions {
    display: flex;
    min-width: 0;
    align-items: center;
    justify-content: space-between;
    gap: 14px;
    padding-top: 14px;
    border-top: 1px solid var(--guided-tour-line);
}

.guided-tour-overlay .guided-tour-progress {
    flex: 0 1 auto;
    min-width: 0;
    margin: 0;
    color: var(--guided-tour-muted);
    font-size: 12px;
    font-variant-numeric: tabular-nums;
    line-height: 1.35;
    overflow-wrap: anywhere;
}

.guided-tour-overlay .guided-tour-navigation {
    display: flex;
    min-width: 0;
    flex: 0 1 auto;
    flex-wrap: wrap;
    align-items: center;
    justify-content: flex-end;
    gap: 8px;
}

.guided-tour-overlay .guided-tour-dialog .quiet-button,
.guided-tour-overlay .guided-tour-dialog .primary-button {
    display: inline-flex;
    min-width: 86px;
    max-width: 100%;
    min-height: 38px;
    align-items: center;
    justify-content: center;
    gap: 7px;
    margin: 0;
    padding: 8px 13px;
    border: 1px solid var(--guided-tour-line-strong);
    border-radius: 4px;
    appearance: none;
    background: var(--guided-tour-surface);
    color: var(--guided-tour-text);
    cursor: pointer;
    font: inherit;
    font-size: 14px;
    font-weight: 600;
    letter-spacing: 0;
    line-height: 1.25;
    text-align: center;
    text-decoration: none;
    white-space: normal;
    overflow-wrap: anywhere;
    user-select: none;
    -webkit-tap-highlight-color: transparent;
}

.guided-tour-overlay .guided-tour-dialog .primary-button {
    border-color: var(--guided-tour-accent);
    background: var(--guided-tour-accent);
    color: #ffffff;
}

.guided-tour-overlay .guided-tour-dialog button:disabled {
    cursor: default;
    opacity: 0.48;
}

.guided-tour-overlay .guided-tour-dialog button:focus-visible {
    outline: 3px solid var(--guided-tour-focus);
    outline-offset: 2px;
}

@media (hover: hover) {
    .guided-tour-overlay .guided-tour-close:hover {
        background: var(--guided-tour-surface-muted);
        color: var(--guided-tour-accent-dark);
    }

    .guided-tour-overlay .guided-tour-dialog .quiet-button:hover:not(:disabled) {
        border-color: var(--guided-tour-accent);
        background: var(--guided-tour-surface-muted);
        color: var(--guided-tour-accent-dark);
    }

    .guided-tour-overlay .guided-tour-dialog .primary-button:hover:not(:disabled) {
        border-color: var(--guided-tour-accent-dark);
        background: var(--guided-tour-accent-dark);
    }
}

.guided-tour-overlay .guided-tour-dialog button:active:not(:disabled) {
    transform: translateY(1px);
}

@media (max-width: 600px) {
    .guided-tour-overlay .guided-tour-dialog {
        right: max(12px, env(safe-area-inset-right));
        left: max(12px, env(safe-area-inset-left)) !important;
        width: auto;
        max-width: none;
        max-height: calc(100vh - 24px);
        max-height: calc(100dvh - 24px);
        padding: 16px;
    }

    .guided-tour-overlay .guided-tour-close {
        top: 6px;
        right: 6px;
        width: 38px;
        height: 38px;
    }

    .guided-tour-overlay .guided-tour-title {
        padding-right: 36px;
        font-size: 17px;
    }

    .guided-tour-overlay .guided-tour-body {
        margin: 8px 0 14px;
        font-size: 13px;
    }

    .guided-tour-overlay .guided-tour-actions {
        align-items: stretch;
        flex-direction: column;
        gap: 10px;
        padding-top: 12px;
    }

    .guided-tour-overlay .guided-tour-progress {
        width: 100%;
    }

    .guided-tour-overlay .guided-tour-navigation {
        display: grid;
        width: 100%;
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }

    .guided-tour-overlay .guided-tour-dialog .quiet-button,
    .guided-tour-overlay .guided-tour-dialog .primary-button {
        width: 100%;
        min-width: 0;
        min-height: 42px;
        padding-inline: 10px;
    }
}

@media (max-width: 350px) {
    .guided-tour-overlay .guided-tour-navigation {
        grid-template-columns: minmax(0, 1fr);
    }
}

@media (max-height: 480px) and (min-width: 601px) {
    .guided-tour-overlay .guided-tour-dialog {
        padding: 14px 16px;
    }

    .guided-tour-overlay .guided-tour-body {
        margin-block: 6px 10px;
    }

    .guided-tour-overlay .guided-tour-actions {
        padding-top: 10px;
    }
}

@media (prefers-reduced-motion: reduce) {
    .guided-tour-overlay .guided-tour-highlight {
        transition: none;
    }

    .guided-tour-overlay .guided-tour-dialog,
    .guided-tour-overlay .guided-tour-dialog * {
        scroll-behavior: auto !important;
    }

    .guided-tour-overlay .guided-tour-dialog button:active:not(:disabled) {
        transform: none;
    }
}

@media (forced-colors: active) {
    .guided-tour-overlay .guided-tour-highlight {
        border-color: Highlight;
        box-shadow: 0 0 0 3px Highlight, 0 0 0 100vmax Canvas;
    }

    .guided-tour-overlay .guided-tour-dialog {
        border-color: CanvasText;
        box-shadow: none;
    }

    .guided-tour-overlay .guided-tour-dialog button:focus-visible {
        outline-color: Highlight;
    }
}

body.context-help-open {
    overflow: hidden;
    overscroll-behavior: none;
}

.context-help-overlay {
    --context-help-surface: var(--surface, #ffffff);
    --context-help-surface-muted: var(--surface-muted, #f5f7f5);
    --context-help-line: var(--line, #d3dbd5);
    --context-help-line-strong: var(--line-strong, #aeb9b1);
    --context-help-text: var(--text, #182019);
    --context-help-muted: var(--muted, #647068);
    --context-help-accent: var(--accent, #2f7d32);
    --context-help-accent-dark: var(--accent-dark, #256628);
    --context-help-focus: #1d6fc0;

    position: fixed;
    inset: 0;
    z-index: 2147483100;
    display: grid;
    overflow: hidden;
    padding: 24px;
    background: rgba(19, 25, 21, 0.66);
    color: var(--context-help-text);
    font-family: Arial, Helvetica, sans-serif;
    font-size: 14px;
    font-weight: 400;
    letter-spacing: 0;
    line-height: 1.45;
    grid-template-rows: minmax(0, 1fr);
    place-items: center;
    isolation: isolate;
    overscroll-behavior: contain;
}

.context-help-overlay,
.context-help-overlay * {
    box-sizing: border-box;
}

.context-help-dialog {
    display: flex;
    width: min(760px, 100%);
    min-width: 0;
    max-height: min(760px, calc(100vh - 48px));
    max-height: min(760px, calc(100dvh - 48px));
    flex-direction: column;
    overflow: hidden;
    border: 1px solid var(--context-help-line);
    border-radius: 6px;
    outline: 0;
    background: var(--context-help-surface);
    box-shadow: 0 22px 64px rgba(10, 16, 12, 0.38);
}

.context-help-header {
    position: relative;
    flex: 0 0 auto;
    min-width: 0;
    padding: 22px 64px 18px 22px;
    border-bottom: 1px solid var(--context-help-line);
    background: var(--context-help-surface);
}

.context-help-eyebrow {
    display: block;
    margin-bottom: 4px;
    color: var(--context-help-accent-dark);
    font-size: 12px;
    font-weight: 700;
    line-height: 1.3;
    text-transform: uppercase;
}

.context-help-header h2,
.context-help-guide h3,
.context-help-tour-section h3 {
    margin: 0;
    color: var(--context-help-text);
    font-weight: 700;
    letter-spacing: 0;
    overflow-wrap: anywhere;
}

.context-help-header h2 {
    font-size: 22px;
    line-height: 1.25;
}

.context-help-header p {
    margin: 7px 0 0;
    color: var(--context-help-muted);
    line-height: 1.5;
    overflow-wrap: anywhere;
}

.context-help-close {
    position: absolute;
    top: 14px;
    right: 14px;
    display: grid;
    width: 40px;
    height: 40px;
    padding: 0;
    border: 0;
    border-radius: 4px;
    appearance: none;
    background: transparent;
    color: var(--context-help-muted);
    cursor: pointer;
    font: inherit;
    place-items: center;
}

.context-help-close-symbol {
    display: block;
    font-size: 25px;
    font-weight: 400;
    line-height: 1;
    pointer-events: none;
}

.context-help-content {
    flex: 0 1 auto;
    min-width: 0;
    min-height: 0;
    overflow-x: hidden;
    overflow-y: auto;
    padding: 20px 22px;
    scrollbar-color: var(--context-help-line-strong) var(--context-help-surface-muted);
    scrollbar-width: thin;
    overscroll-behavior: contain;
}

.context-help-content::-webkit-scrollbar {
    width: 9px;
}

.context-help-content::-webkit-scrollbar-track {
    background: var(--context-help-surface-muted);
}

.context-help-content::-webkit-scrollbar-thumb {
    border: 2px solid var(--context-help-surface-muted);
    border-radius: 6px;
    background: var(--context-help-line-strong);
}

.context-help-guides {
    display: grid;
    gap: 20px;
}

.context-help-guide + .context-help-guide {
    padding-top: 20px;
    border-top: 1px solid var(--context-help-line);
}

.context-help-guide-heading {
    display: grid;
    min-width: 0;
    grid-template-columns: 34px minmax(0, 1fr);
    gap: 10px;
    align-items: start;
}

.context-help-guide-heading > i {
    display: grid;
    width: 34px;
    height: 34px;
    border: 1px solid var(--context-help-line);
    border-radius: 4px;
    background: var(--context-help-surface-muted);
    color: var(--context-help-accent-dark);
    place-items: center;
}

.context-help-guide h3,
.context-help-tour-section h3 {
    font-size: 16px;
    line-height: 1.35;
}

.context-help-guide-heading p {
    margin: 3px 0 0;
    color: var(--context-help-muted);
    line-height: 1.5;
    overflow-wrap: anywhere;
}

.context-help-guide ol {
    display: grid;
    margin: 14px 0 0 44px;
    padding-left: 20px;
    gap: 8px;
    color: var(--context-help-text);
}

.context-help-guide li {
    padding-left: 4px;
    line-height: 1.5;
    overflow-wrap: anywhere;
}

.context-help-guide li::marker {
    color: var(--context-help-accent-dark);
    font-weight: 700;
}

.context-help-tour-section {
    margin-top: 22px;
    padding-top: 18px;
    border-top: 1px solid var(--context-help-line);
}

.context-help-tours {
    display: grid;
    margin-top: 12px;
    grid-template-columns: repeat(auto-fit, minmax(min(280px, 100%), 1fr));
    gap: 10px;
}

.context-help-overlay .context-help-tour-button,
.context-help-overlay .context-help-all {
    display: inline-flex;
    min-width: 0;
    min-height: 40px;
    align-items: center;
    justify-content: center;
    gap: 8px;
    margin: 0;
    padding: 9px 14px;
    border: 1px solid var(--context-help-line-strong);
    border-radius: 4px;
    appearance: none;
    cursor: pointer;
    font: inherit;
    font-weight: 600;
    letter-spacing: 0;
    line-height: 1.3;
    text-align: center;
    white-space: normal;
    overflow-wrap: anywhere;
}

.context-help-overlay .context-help-tour-button {
    border-color: var(--context-help-accent);
    background: var(--context-help-accent);
    color: #ffffff;
}

.context-help-overlay .context-help-all {
    background: var(--context-help-surface);
    color: var(--context-help-text);
}

.context-help-status {
    min-height: 20px;
    margin: 12px 0 0;
    color: #a53a24;
    line-height: 1.4;
}

.context-help-status:empty {
    display: none;
}

.context-help-footer {
    display: flex;
    flex: 0 0 auto;
    min-width: 0;
    align-items: center;
    justify-content: space-between;
    gap: 16px;
    padding: 14px 22px;
    border-top: 1px solid var(--context-help-line);
    background: var(--context-help-surface-muted);
}

.context-help-shortcut {
    min-width: 0;
    color: var(--context-help-muted);
    font-size: 12px;
    line-height: 1.4;
    overflow-wrap: anywhere;
}

.context-help-overlay button:focus-visible {
    outline: 3px solid var(--context-help-focus);
    outline-offset: 2px;
}

@media (hover: hover) {
    .context-help-close:hover,
    .context-help-overlay .context-help-all:hover {
        background: var(--context-help-surface-muted);
        color: var(--context-help-accent-dark);
    }

    .context-help-overlay .context-help-tour-button:hover {
        border-color: var(--context-help-accent-dark);
        background: var(--context-help-accent-dark);
    }
}

@media (max-width: 640px) {
    .context-help-overlay {
        padding: max(10px, env(safe-area-inset-top))
            max(10px, env(safe-area-inset-right))
            max(10px, env(safe-area-inset-bottom))
            max(10px, env(safe-area-inset-left));
    }

    .context-help-dialog {
        max-height: 100%;
    }

    .context-help-header {
        padding: 17px 56px 14px 16px;
    }

    .context-help-header h2 {
        font-size: 19px;
    }

    .context-help-close {
        top: 8px;
        right: 8px;
    }

    .context-help-content {
        padding: 16px;
    }

    .context-help-guide ol {
        margin-left: 0;
    }

    .context-help-tours {
        grid-template-columns: minmax(0, 1fr);
    }

    .context-help-footer {
        align-items: stretch;
        flex-direction: column;
        gap: 10px;
        padding: 12px 16px;
    }

    .context-help-overlay .context-help-all {
        width: 100%;
    }
}

@media (max-height: 520px) {
    .context-help-overlay {
        padding: max(8px, env(safe-area-inset-top))
            max(8px, env(safe-area-inset-right))
            max(8px, env(safe-area-inset-bottom))
            max(8px, env(safe-area-inset-left));
    }

    .context-help-dialog {
        max-height: 100%;
    }

    .context-help-header {
        padding: 12px 52px 10px 14px;
    }

    .context-help-header h2 {
        font-size: 18px;
    }

    .context-help-content {
        padding: 12px 14px;
    }

    .context-help-footer {
        padding: 10px 14px;
    }
}

@media (prefers-reduced-motion: reduce) {
    .context-help-dialog,
    .context-help-dialog * {
        scroll-behavior: auto !important;
    }
}

@media (forced-colors: active) {
    .context-help-overlay {
        background: Canvas;
    }

    .context-help-dialog,
    .context-help-guide-heading > i {
        border-color: CanvasText;
    }
}
