/**
 * ANC Features — Dropcaps
 *
 * Every value is a custom property with a fallback, so a publication can
 * override any of them in its own stylesheet (or the plugin's settings
 * page can write them onto :root) without touching this file.
 *
 * `.dropcap` is the legacy class editors used to type by hand. It is
 * listed here so old articles pick up the same styling; the plugin also
 * rewrites the class on render when "Legacy dropcaps" is enabled.
 */

.anc-dropcap,
.dropcap {
    float: left;
    font-size: var(--anc-dropcap-size, 3.4em);
    line-height: var(--anc-dropcap-line-height, 0.82);
    font-weight: var(--anc-dropcap-weight, 700);
    font-family: var(--anc-dropcap-font, inherit);
    color: var(--anc-dropcap-color, inherit);
    margin-right: var(--anc-dropcap-gap, 0.08em);
    padding-top: var(--anc-dropcap-offset, 0.06em);

    /* Keep the glyph tight to its own box so the wrap sits flush. */
    font-synthesis: none;
    -webkit-font-smoothing: antialiased;
}

/*
 * On narrow screens a three-line dropcap can eat most of the measure.
 * Step it down rather than letting the first paragraph collapse into a
 * two-word column.
 */
@media (max-width: 480px) {
    .anc-dropcap,
    .dropcap {
        font-size: var(--anc-dropcap-size-mobile, var(--anc-dropcap-size, 2.8em));
    }
}

/* Print: floats survive, but the tight line-height can clip. */
@media print {
    .anc-dropcap,
    .dropcap {
        line-height: var(--anc-dropcap-line-height, 0.86);
    }
}
