:root {
    --theme-color: #4f839f;
    --sidebar-width: 274px;
    --mailfino-plum: #331a30;
    --mailfino-link: #4f839f;
    --mailfino-ink: #222;
    --mailfino-canvas: #f7f8f9;
    --mailfino-sidebar: #efefef;
    --mailfino-header-height: 107px;
    --mailfino-page-width: 1200px;
    --mailfino-page-gutter: 30px;
}

* {
    box-sizing: border-box;
}

html,
body {
    background: var(--mailfino-canvas);
}

body {
    color: var(--mailfino-ink);
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Helvetica, Arial, sans-serif;
    font-size: 17px;
    line-height: 1.5;
    margin: 0;
}

a {
    text-underline-offset: 0.15em;
}

.skip-link {
    background: #fff;
    color: var(--mailfino-plum);
    left: 16px;
    padding: 9px 13px;
    position: fixed;
    top: -60px;
    z-index: 100;
}

.skip-link:focus {
    top: 8px;
}

.help-header {
    align-items: center;
    background: var(--mailfino-plum);
    display: flex;
    height: var(--mailfino-header-height);
    justify-content: space-between;
    left: 0;
    padding: 0 max(var(--mailfino-page-gutter), calc((100vw - var(--mailfino-page-width)) / 2 + var(--mailfino-page-gutter)));
    position: fixed;
    right: 0;
    top: 0;
    z-index: 30;
}

.help-brand {
    align-items: center;
    display: inline-flex;
    text-decoration: none;
}

.help-brand-logo {
    aspect-ratio: 600 / 112;
    display: block;
    overflow: hidden;
    width: 250px;
}

.help-brand-logo img {
    display: block;
    filter: grayscale(1) brightness(0) invert(1);
    height: auto;
    width: 100%;
}

.help-product {
    display: none;
}

.help-actions {
    align-items: center;
    display: flex;
    gap: 38px;
}

.help-header .help-nav-link {
    color: #f7f2f6;
    font-size: 15px;
    font-weight: 400;
    text-decoration: none;
}

.help-header .help-nav-link:hover {
    color: #fff;
    text-decoration: underline;
}

.help-language-menu {
    position: relative;
}

.help-language-trigger {
    align-items: center;
    background: transparent;
    border: 1px solid transparent;
    border-radius: 6px;
    color: #f7f2f6;
    cursor: pointer;
    display: inline-flex;
    font: inherit;
    font-size: 15px;
    gap: 9px;
    min-height: 42px;
    padding: 8px 10px;
}

.help-language-trigger:hover,
.help-language-trigger:focus-visible,
.help-language-menu.is-open .help-language-trigger {
    background: rgba(255, 255, 255, 0.1);
    border-color: rgba(255, 255, 255, 0.24);
    color: #fff;
    outline: none;
}

.help-language-trigger img,
.help-language-option img {
    border: 1px solid rgba(0, 0, 0, 0.12);
    display: block;
    height: 14px;
    object-fit: cover;
    width: 21px;
}

.help-language-chevron {
    border-bottom: 1.5px solid currentColor;
    border-right: 1.5px solid currentColor;
    height: 7px;
    margin: -4px 2px 0 4px;
    transform: rotate(45deg);
    transition: transform 0.16s ease, margin 0.16s ease;
    width: 7px;
}

.help-language-menu.is-open .help-language-chevron {
    margin-bottom: -4px;
    margin-top: 0;
    transform: rotate(225deg);
}

.help-language-options {
    background: #fff;
    border: 1px solid #ddd4dc;
    border-radius: 7px;
    box-shadow: 0 12px 30px rgba(22, 8, 20, 0.22);
    min-width: 178px;
    overflow: hidden;
    padding: 6px;
    position: absolute;
    right: 0;
    top: calc(100% + 7px);
    z-index: 50;
}

.help-language-options[hidden] {
    display: none;
}

.help-language-option {
    align-items: center;
    border-radius: 5px;
    color: #332431;
    display: flex;
    font-size: 15px;
    gap: 11px;
    padding: 9px 11px;
    position: relative;
    text-decoration: none;
}

.help-language-option:hover,
.help-language-option:focus-visible {
    background: #f3eef2;
    color: var(--mailfino-plum);
    outline: none;
}

.help-language-option[aria-current="page"] {
    background: #eee5ec;
    font-weight: 600;
}

.help-language-option[aria-current="page"]::after {
    color: var(--mailfino-plum);
    content: "✓";
    margin-left: auto;
}

.help-loading {
    align-items: center;
    color: #666;
    display: flex;
    gap: 12px;
    justify-content: center;
    min-height: 100vh;
    padding-top: var(--mailfino-header-height);
}

.help-loading-mark {
    animation: help-loading 0.8s linear infinite;
    border: 3px solid #ddd;
    border-radius: 50%;
    border-top-color: var(--mailfino-link);
    height: 24px;
    width: 24px;
}

@keyframes help-loading {
    to { transform: rotate(360deg); }
}

.sidebar {
    background: var(--mailfino-sidebar);
    border: 0;
    bottom: 0;
    height: auto;
    left: max(0px, calc((100vw - var(--mailfino-page-width)) / 2 + var(--mailfino-page-gutter)));
    overflow-y: auto;
    overscroll-behavior: contain;
    padding: 10px;
    top: var(--mailfino-header-height);
    width: var(--sidebar-width);
}

/* Visible drag edge for desktop readers who need more room for long chapter names. */
.help-sidebar-resizer {
    background: transparent;
    bottom: 0;
    cursor: col-resize;
    left: max(var(--sidebar-width), calc((100vw - var(--mailfino-page-width)) / 2 + var(--mailfino-page-gutter) + var(--sidebar-width)));
    position: fixed;
    top: var(--mailfino-header-height);
    transform: translateX(-5px);
    width: 10px;
    z-index: 41;
}

.help-sidebar-resizer::after {
    background: #c7c7c7;
    content: "";
    height: 100%;
    left: 4px;
    opacity: 0;
    position: absolute;
    top: 0;
    transition: opacity 0.15s ease;
    width: 2px;
}

.help-sidebar-resizer:hover::after,
.help-sidebar-resizer:focus-visible::after,
.help-sidebar-resizer.is-resizing::after {
    opacity: 1;
}

.sidebar::before,
.sidebar .app-name {
    display: none;
}

.sidebar .search {
    display: none;
}

.sidebar-nav > ul > li {
    margin: 0 0 14px;
}

.sidebar-nav > ul > li > strong,
.sidebar-nav > ul > li > a {
    background: #fff;
    color: #111;
    display: block;
    font-family: Roboto, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
    font-size: 14px;
    font-weight: 700;
    line-height: 1.25;
    margin: 0;
    padding: 10px 8px;
}

.sidebar-nav ul li a {
    border-radius: 0;
    color: var(--mailfino-link);
    font-size: 14px;
    line-height: 1.32;
    margin: 0;
    padding: 7px 10px;
    text-decoration: none;
}

.sidebar-nav ul li a:hover {
    background: rgba(255, 255, 255, 0.72);
    color: #356f8f;
}

.sidebar-nav li.active > a {
    background: #ddd;
    border: 0;
    color: #111;
    font-weight: 700;
}

.sidebar-nav ul ul {
    margin: 0;
    padding: 0;
}

.content {
    bottom: auto;
    left: max(var(--sidebar-width), calc((100vw - var(--mailfino-page-width)) / 2 + var(--mailfino-page-gutter) + var(--sidebar-width)));
    padding: 0;
    right: max(0px, calc((100vw - var(--mailfino-page-width)) / 2 + var(--mailfino-page-gutter)));
    top: var(--mailfino-header-height);
}

.markdown-section {
    background: #fff;
    border: 0;
    border-radius: 0;
    box-shadow: none;
    margin: 0;
    max-width: none;
    min-height: calc(100vh - var(--mailfino-header-height));
    padding: 108px 60px 80px;
    width: 100%;
}

.markdown-section > :first-child {
    margin-top: 0;
}

.markdown-section h1,
.markdown-section h2,
.markdown-section h3,
.markdown-section h4 {
    color: #222;
    font-family: Roboto, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
    letter-spacing: 0;
}

.markdown-section h1 {
    border: 0;
    font-size: 42px;
    font-weight: 600;
    line-height: 1.2;
    margin: 0 0 10px;
}

.markdown-section h2 {
    border: 0;
    font-size: 26px;
    font-weight: 400;
    line-height: 1.25;
    margin: 44px 0 18px;
    padding: 0;
    scroll-margin-top: calc(var(--mailfino-header-height) + 24px);
}

.markdown-section h3 {
    font-size: 21px;
    font-weight: 500;
    margin: 32px 0 12px;
    scroll-margin-top: calc(var(--mailfino-header-height) + 24px);
}

.markdown-section p,
.markdown-section li {
    color: #222;
}

.markdown-section p {
    margin: 0 0 25px;
}

.markdown-section a {
    color: var(--mailfino-link);
    font-weight: 400;
}

.markdown-section a:hover {
    color: #356f8f;
}

.markdown-section h1 a,
.markdown-section h2 a,
.markdown-section h3 a,
.markdown-section h4 a {
    color: inherit;
    font-weight: inherit;
    text-decoration: none;
}

.markdown-section ul,
.markdown-section ol {
    padding-left: 2rem;
}

.markdown-section li {
    margin: 0.2rem 0;
}

.markdown-section blockquote {
    background: #f5f7f8;
    border: 0;
    border-left: 4px solid var(--mailfino-link);
    color: #333;
    margin: 28px 0;
    padding: 16px 20px;
}

.markdown-section blockquote p {
    color: inherit;
    margin: 0;
}

.markdown-section img {
    background: transparent;
    border: 1px solid #b7b7b7;
    border-radius: 0;
    box-shadow: none;
    display: block;
    height: auto;
    margin: 28px auto 34px;
    max-width: 100%;
    padding: 0;
}

.markdown-section .help-figure {
    margin: 28px auto 34px;
    max-width: 100%;
    width: fit-content;
}

.markdown-section .help-figure img {
    margin: 0 auto;
}

.markdown-section .help-figure figcaption {
    color: #555;
    font-size: 10px;
    font-weight: 700;
    line-height: 1.4;
    margin-top: 6px;
    text-align: center;
}

.markdown-section .help-element-icons {
    align-items: center;
    display: flex;
    flex-wrap: wrap;
    gap: 12px;
    justify-content: center;
    margin: 16px auto 24px;
}

.markdown-section .help-element-icons img.help-element-icon {
    border: 0;
    margin: 0;
    width: 90px;
}

.markdown-section .help-element-icons.help-element-icons-compact {
    display: inline-flex;
    flex-wrap: wrap;
    gap: 4px;
    justify-content: flex-start;
    margin: 0;
    max-width: 152px;
    vertical-align: middle;
}

.markdown-section .help-element-icons.help-element-icons-compact img.help-element-icon {
    width: 48px;
}

.markdown-section hr.help-element-section-separator {
    border: 0;
    border-top: 1px solid #d8d8d8;
    margin: 42px 0 34px;
}

.markdown-section table {
    border: 1px solid #ddd;
    border-collapse: collapse;
    display: table;
    margin: 26px 0;
    width: 100%;
}

.markdown-section td,
.markdown-section th {
    border: 1px solid #ddd;
    padding: 10px 12px;
    text-align: left;
}

.markdown-section th {
    background: #f1f1f1;
    color: #222;
}

.markdown-section code {
    background: #f1f1f1;
    border-radius: 2px;
    color: #63305d;
    font-size: 0.9em;
    padding: 0.12em 0.32em;
}

.markdown-section pre {
    background: #29242b;
    border-radius: 0;
    padding: 20px;
}

.markdown-section pre code {
    background: transparent;
    color: #fff;
    padding: 0;
}

.help-article-pager {
    border-top: 1px solid #ddd;
    display: flex;
    gap: 18px;
    justify-content: space-between;
    margin: 64px 0 0;
    padding: 24px 0 0;
}

.help-article-pager-link {
    align-items: center;
    background: #f3f5f6;
    color: #356f8f !important;
    display: flex;
    font-size: 15px;
    line-height: 1.35;
    min-height: 52px;
    padding: 12px 16px;
    text-decoration: none;
    width: calc(50% - 9px);
}

.help-article-pager-link:hover {
    background: #e6edef;
    color: #204f68 !important;
}

.help-article-pager-next {
    margin-left: auto;
    text-align: right;
}

.help-review-selection,
.help-review-summary,
.help-review-primary,
.help-review-secondary,
.help-review-delete,
.help-review-icon-button {
    font: inherit;
}

.help-review-selection {
    position: fixed;
    z-index: 1200;
    min-width: 140px;
    padding: 9px 14px;
    border: 0;
    border-radius: 8px;
    color: #fff;
    background: #331a30;
    box-shadow: 0 7px 22px rgba(24, 15, 23, .24);
    cursor: pointer;
}

.help-review-summary {
    position: fixed;
    right: 24px;
    bottom: 24px;
    z-index: 1100;
    padding: 12px 18px;
    border: 1px solid #331a30;
    border-radius: 999px;
    color: #fff;
    background: #331a30;
    box-shadow: 0 7px 22px rgba(24, 15, 23, .2);
    cursor: pointer;
}

.help-review-panel {
    position: fixed;
    top: 88px;
    right: 20px;
    bottom: 20px;
    z-index: 1150;
    display: flex;
    width: min(420px, calc(100vw - 40px));
    flex-direction: column;
    overflow: hidden;
    border: 1px solid #d8d3d7;
    border-radius: 12px;
    background: #fff;
    box-shadow: 0 16px 45px rgba(24, 15, 23, .22);
}

.help-review-panel[hidden],
.help-review-modal[hidden],
.help-review-selection[hidden] {
    display: none;
}

.help-review-panel-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 18px 20px;
    border-bottom: 1px solid #e7e3e6;
}

.help-review-panel-header h2,
.help-review-dialog h2 {
    margin: 0;
    color: #261923;
    font-size: 20px;
}

.help-review-icon-button {
    width: 36px;
    height: 36px;
    border: 0;
    color: #544d52;
    background: transparent;
    font-size: 28px;
    line-height: 1;
    cursor: pointer;
}

.help-review-list {
    flex: 1;
    overflow-y: auto;
    padding: 16px 20px;
}

.help-review-empty {
    color: #6d666b;
}

.help-review-note {
    margin-bottom: 14px;
    padding: 14px;
    border: 1px solid #e3dfe2;
    border-radius: 8px;
    background: #fbfafb;
}

.help-review-note h3,
.help-review-note p {
    margin: 0 0 10px;
}

.help-review-note blockquote,
.help-review-quote {
    margin: 0 0 12px;
    padding: 10px 12px;
    border-left: 3px solid #ba9d34;
    color: #5f585d;
    background: #f7f4e9;
}

.help-review-delete {
    padding: 0;
    border: 0;
    color: #9c2d20;
    background: transparent;
    cursor: pointer;
}

.help-review-panel-actions,
.help-review-dialog-actions {
    display: flex;
    gap: 10px;
    justify-content: flex-end;
    padding: 16px 20px;
    border-top: 1px solid #e7e3e6;
}

.help-review-modal {
    position: fixed;
    inset: 0;
    z-index: 1300;
    display: grid;
    place-items: center;
    padding: 20px;
    background: rgba(25, 20, 24, .5);
}

.help-review-dialog {
    width: min(560px, 100%);
    padding: 24px;
    border-radius: 12px;
    background: #fff;
    box-shadow: 0 18px 54px rgba(24, 15, 23, .28);
}

.help-review-label {
    display: block;
    margin-bottom: 7px;
    color: #352f33;
    font-weight: 600;
}

.help-review-dialog textarea {
    box-sizing: border-box;
    width: 100%;
    resize: vertical;
    padding: 12px;
    border: 1px solid #aaa2a7;
    border-radius: 6px;
    font: inherit;
}

.help-review-primary,
.help-review-secondary {
    padding: 10px 16px;
    border-radius: 6px;
    cursor: pointer;
}

.help-review-primary {
    border: 1px solid #331a30;
    color: #fff;
    background: #331a30;
}

.help-review-secondary {
    border: 1px solid #aaa2a7;
    color: #352f33;
    background: #fff;
}

.help-review-selection:focus-visible,
.help-review-summary:focus-visible,
.help-review-primary:focus-visible,
.help-review-secondary:focus-visible,
.help-review-delete:focus-visible,
.help-review-icon-button:focus-visible,
.help-review-dialog textarea:focus-visible {
    outline: 3px solid #3b82f6;
    outline-offset: 2px;
}

.anchor span {
    color: inherit;
}

.help-home .sidebar {
    display: none;
}

.help-home .content {
    left: max(0px, calc((100vw - var(--mailfino-page-width)) / 2 + var(--mailfino-page-gutter)));
}

.help-home .markdown-section {
    background: transparent;
    min-height: 0;
    padding: 24px 0 80px;
}

.help-hero {
    padding: 0 76px 36px;
    text-align: center;
}

.help-eyebrow {
    color: var(--mailfino-plum);
    display: block;
    font-size: 13px;
    font-weight: 700;
    letter-spacing: 0.08em;
    margin: 0 0 6px;
    text-transform: uppercase;
}

.help-hero h1 {
    color: var(--mailfino-plum);
    font-size: 32px;
    margin: 0 0 4px;
}

.help-hero > p {
    color: #666;
    margin: 0 0 26px;
}

.help-hero .help-home-search {
    background: linear-gradient(90deg, #ea7b67, #bd3425);
    border: 0;
    border-radius: 36px;
    display: block;
    margin: 0 auto;
    max-width: 866px;
    padding: 6px 94px 6px 6px;
    position: relative;
    width: 100%;
}

.help-hero .help-home-search::after {
    color: #fff;
    content: "⌕";
    font-size: 35px;
    line-height: 1;
    pointer-events: none;
    position: absolute;
    right: 30px;
    top: 12px;
}

.help-hero .help-home-search input {
    background: #fff;
    border: 0;
    border-radius: 28px 0 0 28px;
    color: #333;
    font-size: 16px;
    height: 48px;
    padding: 0 24px;
    width: 100%;
}

.help-hero .help-home-search input:focus {
    box-shadow: 0 0 0 3px rgba(255, 255, 255, 0.45);
    outline: 0;
}

.help-hero .help-home-search .clear-button {
    right: 100px;
}

.help-hero .help-home-search .results-panel {
    background: #fff;
    border: 1px solid #eee;
    border-radius: 5px;
    box-shadow: 0 12px 30px rgba(0, 0, 0, 0.12);
    left: 0;
    margin-top: 10px;
    max-height: 480px;
    overflow: auto;
    padding: 14px 18px;
    position: absolute;
    right: 0;
    text-align: left;
    top: 100%;
    z-index: 5;
}

.help-topic-grid {
    background: #fff;
    display: grid;
    gap: 20px;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    padding: 20px;
}

.help-topic-card {
    background: #fcfcfc;
    border: 1px solid #f2f2f2;
    border-radius: 5px;
    min-width: 0;
    padding: 21px 28px 24px;
}

.help-topic-card h2 {
    color: var(--mailfino-plum);
    font-size: 21px;
    font-weight: 400;
    line-height: 1;
    margin: 0 0 22px;
}

.help-topic-card h2::before {
    background: #111;
    border-radius: 1px;
    content: "";
    display: inline-block;
    height: 13px;
    margin-right: 8px;
    vertical-align: -1px;
    width: 20px;
}

.help-topic-card ul {
    list-style: none;
    margin: 0;
    padding: 0 0 0 22px;
}

.help-topic-card li {
    margin: 0;
}

.help-topic-card li > a {
    color: #333;
    display: block;
    font-size: 14px;
    line-height: 1.35;
    padding: 6px 0 6px 20px;
    position: relative;
    text-decoration: none;
}

.help-topic-card li > a::before {
    color: #777;
    content: "▤";
    left: 0;
    position: absolute;
}

.help-topic-card li > a:hover {
    color: var(--mailfino-link);
    text-decoration: underline;
}

.sidebar-toggle {
    background: transparent;
    display: none !important;
    top: calc(var(--mailfino-header-height) + 10px);
}

.sidebar-toggle span {
    background-color: var(--mailfino-plum);
}

.help-home .sidebar-toggle,
.progress {
    display: none !important;
}

@media (max-width: 980px) {
    .help-sidebar-resizer {
        display: none;
    }

    :root {
        --mailfino-page-gutter: 20px;
    }

    .help-header {
        padding-left: 24px;
        padding-right: 24px;
    }

    .help-brand-logo {
        width: 210px;
    }

    .help-actions {
        gap: 20px;
    }

    .content {
        right: 0;
    }

    .markdown-section {
        padding-left: 42px;
        padding-right: 42px;
    }
}

@media (max-width: 768px) {
    main {
        z-index: auto;
    }

    .sidebar-toggle {
        display: block !important;
    }

    :root {
        --mailfino-header-height: 72px;
    }

    .help-header {
        padding: 0 14px 0 54px;
    }

    .help-brand-logo {
        width: 150px;
    }

    .help-nav-link {
        display: none;
    }

    .help-actions {
        gap: 12px;
    }

    .sidebar {
        left: 0;
        top: var(--mailfino-header-height);
    }

    .sidebar-toggle {
        height: 40px;
        left: 12px;
        padding: 10px;
        top: 18px;
        width: 40px;
        z-index: 40;
    }

    /* Docsify's theme moves closed navigation to the right; keep the article
       fixed and slide the mailfino sidebar out to the left on narrow screens. */
    body.close .sidebar {
        transform: translateX(-100%) !important;
    }

    body.close .content,
    body.close .sidebar-toggle {
        transform: none !important;
    }

    body.close .sidebar-toggle {
        width: 40px;
    }

    .content,
    .help-home .content {
        left: 0;
        padding-top: var(--mailfino-header-height);
        right: 0;
        top: var(--mailfino-header-height);
    }

    .markdown-section {
        padding: 48px 20px 58px;
    }

    .markdown-section h1 {
        font-size: 32px;
    }

    .markdown-section h2 {
        font-size: 23px;
    }

    .markdown-section table {
        display: block;
        overflow-x: auto;
    }

    .help-article-pager {
        align-items: stretch;
        flex-direction: column;
        gap: 10px;
        margin-top: 46px;
    }

    .help-article-pager-link {
        width: 100%;
    }

    .help-home .markdown-section {
        padding: 20px 12px 48px;
    }

    .help-hero {
        padding: 0 0 28px;
    }

    .help-hero h1 {
        font-size: 28px;
    }

    .help-hero .help-home-search {
        padding-right: 64px;
    }

    .help-hero .help-home-search::after {
        right: 20px;
    }

    .help-topic-grid {
        grid-template-columns: 1fr;
        padding: 12px;
    }
}

@media (prefers-reduced-motion: reduce) {
    *,
    *::before,
    *::after {
        scroll-behavior: auto !important;
        transition-duration: 0.01ms !important;
    }

    .help-loading-mark {
        animation: none;
    }
}

@media print {
    .help-header,
    .sidebar,
    .sidebar-toggle {
        display: none !important;
    }

    .content {
        left: 0 !important;
        padding-top: 0;
        right: 0 !important;
        top: 0;
    }

    .markdown-section {
        min-height: 0;
        padding: 0;
    }
}
