/* ==========================================================================
   Quicklead Help Center
   Global because article bodies are rendered with [innerHTML] on the public
   pages and inside a contenteditable in the admin editor. Keeping the body
   rules here is what makes the editor a true preview of the published page.
   ========================================================================== */

@import url('https://fonts.googleapis.com/css2?family=Caveat:wght@500&display=swap');

:root {
    --help-purple: #696cff;
    --help-purple-dark: #5f61e6;
    --help-purple-light: #8e90ff;
    --help-ink: #1f2b47;
    --help-body: #4a5573;
    --help-muted: #8b90a6;
    --help-border: #e4e6f0;
    --help-surface: #ffffff;
    --help-canvas: #f7f8fc;
}

/* ------------------------------------------------------------- article body */

.help-article-body {
    color: var(--help-body);
    font-size: 0.9375rem;
    line-height: 1.65;
    word-break: break-word;
}

.help-article-body > *:first-child {
    margin-top: 0;
}

.help-article-body h1,
.help-article-body h2,
.help-article-body h3,
.help-article-body h4 {
    color: var(--help-ink);
    font-weight: 700;
    line-height: 1.35;
    margin: 2rem 0 0.75rem;
}

.help-article-body h1 { font-size: 1.75rem; }
.help-article-body h2 { font-size: 1.4rem; }
.help-article-body h3 { font-size: 1.175rem; }
.help-article-body h4 { font-size: 1.0625rem; }

.help-article-body p {
    margin: 0 0 1.1rem;
}

.help-article-body a {
    color: var(--help-purple);
    text-decoration: underline;
    text-underline-offset: 2px;
}

.help-article-body a:hover {
    color: var(--help-purple-dark);
}

.help-article-body ul,
.help-article-body ol {
    margin: 0 0 1.1rem;
    padding-left: 1.5rem;
}

.help-article-body li {
    margin-bottom: 0.4rem;
}

.help-article-body blockquote {
    margin: 1.5rem 0;
    padding: 0.85rem 1.25rem;
    border-left: 4px solid var(--help-purple-light);
    background: #f7f6fc;
    border-radius: 0 6px 6px 0;
    color: var(--help-ink);
}

.help-article-body pre,
.help-article-body pre.help-code {
    margin: 1.25rem 0;
    padding: 1rem 1.15rem;
    background: #1f2b47;
    color: #e7ebf5;
    border-radius: 8px;
    overflow-x: auto;
    font-size: 0.875rem;
    line-height: 1.6;
}

.help-article-body pre code {
    background: none;
    color: inherit;
    padding: 0;
    font-size: inherit;
}

.help-article-body code {
    background: #eef0f6;
    color: #c7254e;
    padding: 0.15rem 0.4rem;
    border-radius: 4px;
    font-size: 0.9em;
}

.help-article-body hr {
    margin: 2rem 0;
    border: 0;
    border-top: 1px solid var(--help-border);
}

.help-article-body table {
    width: 100%;
    margin: 1.25rem 0;
    border-collapse: collapse;
    font-size: 0.9375rem;
}

.help-article-body th,
.help-article-body td {
    border: 1px solid var(--help-border);
    padding: 0.6rem 0.75rem;
    text-align: left;
}

.help-article-body th {
    background: #f7f8fc;
    color: var(--help-ink);
    font-weight: 600;
}

/* Tables should scroll rather than push the page sideways on small screens. */
.help-article-body .table-scroll,
.help-article-body > table {
    display: block;
    overflow-x: auto;
    max-width: 100%;
}

/* ------------------------------------------------------------------ images */

.help-article-body img,
.help-article-body .help-article-image {
    display: block;
    max-width: 100%;
    height: auto;
    margin: 1.5rem 0;
    border: 1px solid var(--help-border);
    border-radius: 8px;
    box-shadow: 0 2px 10px rgba(31, 43, 71, 0.06);
}

.help-article-body img.align-left { margin-left: 0; margin-right: auto; }
.help-article-body img.align-center { margin-left: auto; margin-right: auto; }
.help-article-body img.align-right { margin-left: auto; margin-right: 0; }

.help-article-body img.size-small { max-width: 320px; }
.help-article-body img.size-medium { max-width: 560px; }
.help-article-body img.size-full { max-width: 100%; }

.help-article-body figure {
    margin: 1.5rem 0;
}

.help-article-body figcaption {
    margin-top: 0.5rem;
    font-size: 0.875rem;
    color: var(--help-muted);
    text-align: center;
}

.help-article-body img.is-uploading {
    opacity: 0.6;
    filter: grayscale(1);
}

.help-article-body img.is-selected {
    outline: 3px solid var(--help-purple-light);
    outline-offset: 2px;
}

/* Public pages open images in a lightbox, so hint that they are clickable. */
.help-article-view .help-article-body img {
    cursor: zoom-in;
    transition: box-shadow 0.15s ease;
}

.help-article-view .help-article-body img:hover {
    box-shadow: 0 6px 20px rgba(31, 43, 71, 0.14);
}

/* ==========================================================================
   Public help center page shell
   Shared by the home, category, article and search screens so they stay in
   visual lockstep. Component stylesheets only hold page-specific bits.
   ========================================================================== */

.help-page {
    display: flex;
    flex-direction: column;
    min-height: 100vh;
    background: var(--help-canvas);
    font-family: 'Public Sans', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
}

.help-main {
    flex: 1 1 auto;
    padding: 44px 0 64px;
}

.help-container {
    max-width: 1020px;
    margin: 0 auto;
    padding: 0 48px;
}

.help-section {
    margin-bottom: 52px;
}

.help-section:last-child {
    margin-bottom: 0;
}

.help-section-title {
    display: flex;
    align-items: center;
    gap: 10px;
    margin: 0 0 22px;
    color: var(--help-ink);
    font-size: 1.5rem;
    font-weight: 700;
    letter-spacing: -0.01em;
}

.help-section-icon {
    color: #b9bed2;
    font-size: 26px;
}

/* --------------------------------------------------------------- card grid */

.help-grid {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 18px;
}

.help-card {
    display: flex;
    align-items: center;
    background: var(--help-surface);
    border: 1px solid transparent;
    border-radius: 8px;
    text-decoration: none;
    transition: box-shadow 0.15s ease, border-color 0.15s ease, transform 0.15s ease;
}

a.help-card:hover {
    border-color: #d8d3ee;
    box-shadow: 0 6px 18px rgba(31, 43, 71, 0.09);
    transform: translateY(-1px);
}

.help-article-card {
    justify-content: space-between;
    gap: 14px;
    padding: 22px 20px 22px 26px;
    min-height: 84px;
}

.help-article-card-title {
    color: var(--help-ink);
    font-size: 1rem;
    font-weight: 700;
    line-height: 1.45;
}

.help-card-chevron {
    flex: 0 0 auto;
    color: #a7abbf;
    font-size: 22px;
}

.help-category-card {
    align-items: stretch;
    gap: 18px;
    padding: 24px 24px 24px 22px;
}

.help-category-icon {
    flex: 0 0 96px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.help-category-icon img {
    max-width: 96px;
    max-height: 88px;
    object-fit: contain;
}

.help-category-initial {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 68px;
    height: 68px;
    border-radius: 12px;
    color: #fff;
    font-size: 1.75rem;
    font-weight: 700;
}

.help-category-body {
    flex: 1 1 auto;
    min-width: 0;
}

.help-category-badge {
    display: inline-block;
    padding: 7px 14px;
    border-radius: 6px;
    color: #fff;
    font-size: 0.9375rem;
    font-weight: 700;
}

.help-category-desc {
    margin: 14px 0 0;
    color: var(--help-body);
    font-size: 0.9375rem;
    line-height: 1.5;
}

.help-category-count {
    margin: 6px 0 0;
    color: var(--help-muted);
    font-size: 0.8125rem;
}

/* ------------------------------------------------------------ empty states */

.help-empty {
    padding: 64px 24px;
    text-align: center;
    color: var(--help-muted);
}

.help-empty i {
    font-size: 44px;
    color: #c3c7d8;
}

.help-empty h3 {
    margin: 14px 0 6px;
    color: var(--help-ink);
    font-size: 1.125rem;
    font-weight: 700;
}

.help-empty p {
    margin: 0;
    font-size: 0.9375rem;
}

.help-retry-btn {
    margin-top: 18px;
    padding: 10px 22px;
    border: 0;
    border-radius: 8px;
    background: var(--help-purple);
    color: #fff;
    font-weight: 600;
    cursor: pointer;
}

.help-retry-btn:hover {
    background: var(--help-purple-dark);
}

/* -------------------------------------------------------------- skeletons */

.help-card.skeleton {
    min-height: 84px;
    background: linear-gradient(90deg, #fff 0%, #f2f3f8 50%, #fff 100%);
    background-size: 200% 100%;
    animation: helpShimmer 1.3s ease-in-out infinite;
    pointer-events: none;
}

@keyframes helpShimmer {
    0% { background-position: 200% 0; }
    100% { background-position: -200% 0; }
}

@media (max-width: 900px) {
    .help-grid {
        grid-template-columns: minmax(0, 1fr);
    }
}

@media (max-width: 767px) {
    .help-main {
        padding: 28px 0 40px;
    }

    .help-container {
        padding: 0 16px;
    }

    .help-section {
        margin-bottom: 36px;
    }

    .help-section-title {
        font-size: 1.25rem;
    }

    .help-category-icon {
        flex-basis: 64px;
    }

    .help-category-icon img {
        max-width: 64px;
    }
}
