/* Authored file / collection article headings. Stage identity is resolved by
   the existing trusted file context; general content keeps a neutral palette.
   The trusted in-article ad wrapper (.no-print) is outside this styling scope. */
#file-content-body {
    --fa228-action: var(--b16-action, #3131c1);
    --fa228-accent: var(--b16-accent-action, #0f766e);
    --fa228-soft: var(--b16-soft, #f3f3fe);
    --fa228-line: var(--b16-line, #dcddec);
    --fa228-panel: var(--b16-panel, #fff);
}

:is(.dark, .dark-mode) #file-content-body {
    --fa228-action: var(--b16-action, #b7bbff);
    --fa228-accent: var(--b16-accent-action, #7dd3c7);
    --fa228-soft: var(--b16-soft, #242844);
    --fa228-line: var(--b16-line, #48536a);
    --fa228-panel: var(--b16-panel, #1e293b);
}

#file-content-body :is(h2, h3):not(:where(#file-content-body .no-print *)) {
    box-sizing: border-box;
    max-inline-size: 100%;
    min-inline-size: 0;
    color: var(--fa228-action);
    font-family: inherit;
    font-weight: 800;
    line-height: 1.7;
    letter-spacing: normal;
    overflow-wrap: anywhere;
    word-break: normal;
    text-align: start;
    text-wrap: pretty;
    scroll-margin-block-start: 6rem;
}

#file-content-body h2:not(:where(#file-content-body .no-print *)) {
    margin-block: 2rem 1.1rem;
    padding-block: .8rem;
    padding-inline: 1.1rem;
    border: 1px solid var(--fa228-line);
    border-inline-start: .4rem solid var(--fa228-action);
    border-radius: .9rem;
    background: linear-gradient(120deg, var(--fa228-soft), var(--fa228-panel));
    box-shadow: 0 5px 18px rgb(15 23 42 / 4%);
    font-size: clamp(1.3rem, 1.05rem + 1vw, 1.7rem);
    font-weight: 900;
}

#file-content-body h3:not(:where(#file-content-body .no-print *)) {
    margin-block: 1.7rem .9rem;
    padding-block: .2rem;
    padding-inline-start: .8rem;
    border-inline-start: 3px solid var(--fa228-accent);
    font-size: clamp(1.12rem, .98rem + .65vw, 1.35rem);
}

#file-content-body h3:not(:where(#file-content-body .no-print *))::after {
    content: "";
    display: block;
    inline-size: 3rem;
    max-inline-size: 100%;
    block-size: 3px;
    margin-block-start: .5rem;
    border-radius: 999px;
    background: linear-gradient(90deg, var(--fa228-action), var(--fa228-accent));
}

#file-content-body :is(h2, h3):not(:where(#file-content-body .no-print *)) :where(a) {
    color: inherit;
    text-decoration: underline;
    text-decoration-thickness: 1px;
    text-underline-offset: .2em;
}

@media (max-width: 639px) {
    #file-content-body h2:not(:where(#file-content-body .no-print *)) {
        margin-block-start: 1.6rem;
        padding-block: .65rem;
        padding-inline: .8rem;
        border-inline-start-width: .3rem;
        border-radius: .75rem;
    }

    #file-content-body h3:not(:where(#file-content-body .no-print *)) {
        margin-block-start: 1.4rem;
        padding-inline-start: .65rem;
    }
}
