/* Help Centre: /help, /help/{slug} (ArionWeb/Components/Help) and the
   Admin > Help preview, which renders article bodies with .help-article-body. */

.help-page {
    padding-top: 24px;
    padding-bottom: 48px;
}

/* Search */
.help-search {
    display: flex;
    gap: 10px;
    max-width: 640px;
    margin: 0 0 32px;
}

.help-search__input {
    flex: 1 1 auto;
    min-width: 0;
    padding: 10px 14px;
    font: inherit;
    color: var(--text-color);
    background: var(--form-bg-color);
    border: 1px solid var(--border-soft);
    border-radius: var(--radius-md);
}

.help-search__input:focus {
    outline: 2px solid var(--arion-blue);
    outline-offset: 1px;
}

.help-search__button {
    flex: 0 0 auto;
}

/* Index sections */
.help-sections {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(320px, 1fr));
    gap: 24px;
    margin-bottom: 40px;
}

.help-section {
    padding: 20px 22px;
    background: #fff;
    border: 1px solid var(--border-soft);
    border-radius: var(--radius-lg);
    box-shadow: var(--shadow-soft);
}

.help-section__heading {
    margin: 0 0 12px;
    font-family: var(--font-heading);
    font-size: 1.25rem;
    color: var(--text-color);
}

.help-list {
    list-style: none;
    margin: 0;
    padding: 0;
}

.help-list__item {
    padding: 10px 0;
    border-top: 1px solid var(--border-soft);
}

.help-list__item:first-child {
    border-top: 0;
    padding-top: 0;
}

.help-list__link {
    font-weight: 600;
    color: var(--text-color);
    text-decoration: none;
}

.help-list__link:hover,
.help-list__link:focus {
    text-decoration: underline;
}

.help-list__meta {
    margin-left: 8px;
    font-size: 0.8rem;
    color: var(--text-muted-dk);
}

.help-list__summary {
    margin: 4px 0 0;
    font-size: 0.9rem;
    color: var(--text-muted-dk);
}

.help-results {
    max-width: 760px;
    margin-bottom: 40px;
}

.help-badge {
    display: inline-block;
    margin-left: 8px;
    padding: 1px 8px;
    font-size: 0.72rem;
    font-weight: 600;
    color: var(--report-gold-dark);
    background: var(--report-gold-soft);
    border: 1px solid var(--report-gold);
    border-radius: 999px;
    vertical-align: middle;
}

.help-empty {
    margin: 0 0 32px;
    color: var(--text-muted-dk);
}

/* Article */
.help-breadcrumb {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    margin-bottom: 20px;
    font-size: 0.9rem;
    color: var(--text-muted-dk);
}

.help-breadcrumb a {
    color: var(--text-muted-dk);
}

.help-draft {
    margin-bottom: 20px;
    padding: 12px 16px;
    color: var(--report-gold-dark);
    background: var(--report-gold-soft);
    border: 1px solid var(--report-gold);
    border-radius: var(--radius-md);
}

.help-article-layout {
    display: grid;
    grid-template-columns: minmax(0, 1fr) 260px;
    gap: 40px;
    align-items: start;
    margin-bottom: 40px;
}

.help-article {
    max-width: 760px;
    min-width: 0;
}

.help-video {
    position: relative;
    aspect-ratio: 16 / 9;
    margin-bottom: 28px;
    overflow: hidden;
    background: #000;
    border-radius: var(--radius-lg);
}

.help-video iframe {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    border: 0;
}

.help-article__updated {
    margin-top: 32px;
    font-size: 0.85rem;
    color: var(--text-muted-alt);
}

.help-related {
    position: sticky;
    top: 24px;
    padding: 18px 20px;
    background: var(--background-color-secondary);
    border-radius: var(--radius-lg);
}

.help-related__heading {
    margin: 0 0 10px;
    font-size: 1rem;
    font-weight: 600;
}

.help-related__list {
    margin: 0 0 14px;
    padding-left: 18px;
}

.help-related__list li {
    margin-bottom: 6px;
}

.help-related__all {
    font-weight: 600;
}

/* Rendered Markdown */
.help-article-body {
    font-size: 1rem;
    line-height: 1.65;
    color: var(--text-color);
}

.help-article-body h2 {
    margin: 32px 0 12px;
    font-family: var(--font-heading);
    font-size: 1.4rem;
}

.help-article-body h3 {
    margin: 24px 0 8px;
    font-size: 1.1rem;
    font-weight: 600;
}

.help-article-body > :first-child {
    margin-top: 0;
}

.help-article-body p,
.help-article-body ul,
.help-article-body ol {
    margin: 0 0 14px;
}

.help-article-body li {
    margin-bottom: 6px;
}

.help-article-body ol > li::marker {
    font-weight: 600;
}

.help-article-body code {
    padding: 1px 5px;
    font-size: 0.9em;
    background: var(--background-color-secondary);
    border-radius: var(--radius-sm);
}

.help-article-body blockquote {
    margin: 0 0 14px;
    padding: 10px 16px;
    background: var(--background-color-secondary);
    border-left: 4px solid var(--arion-blue);
    border-radius: 0 var(--radius-md) var(--radius-md) 0;
}

.help-article-body blockquote > :last-child {
    margin-bottom: 0;
}

.help-article-body img {
    max-width: 100%;
    height: auto;
    margin: 8px 0;
    border: 1px solid var(--border-soft);
    border-radius: var(--radius-md);
}

.help-article-body table {
    width: 100%;
    margin: 0 0 16px;
    border-collapse: collapse;
    font-size: 0.95rem;
}

.help-article-body th,
.help-article-body td {
    padding: 8px 10px;
    text-align: left;
    border-bottom: 1px solid var(--border-soft);
}

/* Contact card */
.help-contact {
    max-width: 760px;
    padding: 20px 22px;
    background: #fff;
    border: 1px solid var(--border-soft);
    border-radius: var(--radius-lg);
}

.help-contact__heading {
    margin: 0 0 6px;
    font-family: var(--font-heading);
    font-size: 1.2rem;
}

.help-contact__text {
    margin: 0 0 10px;
    color: var(--text-muted-dk);
}

.help-contact__list {
    list-style: none;
    margin: 0;
    padding: 0;
}

.help-contact__list li {
    margin-bottom: 4px;
}

@media (max-width: 991.98px) {
    .help-article-layout {
        grid-template-columns: minmax(0, 1fr);
        gap: 24px;
    }

    .help-related {
        position: static;
    }
}

@media (max-width: 575.98px) {
    .help-page {
        padding-top: 16px;
    }

    .help-search {
        flex-direction: column;
    }

    .help-sections {
        grid-template-columns: minmax(0, 1fr);
    }
}
