/*******************************************************************************
HOMEPAGE SINGLE-COLUMN LAYOUT
Applies only where explicitly included via template.with(css: ...).
*******************************************************************************/

:root {
    --home-column-width: min(72%, 920px);
    --home-column-width-mobile: min(92%, 920px);
}

/* Use one shared centered container for header, content and footer */
body > header.site-header,
body > article > section,
body > footer {
    width: var(--home-column-width) !important;
    max-width: var(--home-column-width) !important;
    margin-left: auto !important;
    margin-right: auto !important;
}

/* Align the first nav item text ("Home") with the content left edge */
body > header.site-header nav a:first-child {
    padding-left: 0 !important;
}

/* Remove asymmetric section padding from Tufte defaults */
body > article > section {
    padding-left: 0 !important;
    padding-right: 0 !important;
}

/* Single-column content block */
body > article > section > * {
    width: 100% !important;
    max-width: 100% !important;
    margin-left: 0 !important;
    margin-right: 0 !important;
    left: 0 !important;
    transform: none !important;
}

/* Keep full-width blocks consistent with the same centered container */
body > article > section > .fullwidth,
body > article > section > .fullwidth > * {
    width: 100% !important;
    max-width: 100% !important;
    margin-left: 0 !important;
    margin-right: 0 !important;
    left: 0 !important;
    transform: none !important;
}

/* Bibliography block: keep same width as body text */
body > article > section [role="doc-bibliography"],
body > article > section [role="doc-bibliography"] > ul,
body > article > section [role="doc-bibliography"] > ol {
    width: 100% !important;
    max-width: 100% !important;
    margin-left: 0 !important;
    margin-right: 0 !important;
    padding-left: 1.4em !important;
    left: 0 !important;
    transform: none !important;
}

/* Render bibliography as a normal unordered list */
body > article > section [role="doc-bibliography"] > ul {
    list-style-type: disc !important;
    padding-left: 1.4em !important;
}

body > article > section [role="doc-bibliography"] > ul > li {
    padding-left: 0 !important;
    text-indent: 0 !important;
    margin: 0 !important;
}

/* Disable italics in bibliography (e.g., journal titles) */
body > article > section [role="doc-bibliography"] em,
body > article > section [role="doc-bibliography"] i {
    font-style: normal !important;
}

@media (max-width: 760px) {
    body > header.site-header,
    body > article > section,
    body > footer {
        width: var(--home-column-width-mobile) !important;
        max-width: var(--home-column-width-mobile) !important;
    }
}

/* Keep bolded author names in bibliography at normal text color */
body > article > section [role="doc-bibliography"] strong {
    color: inherit !important;
    font-weight: 900 !important;
}
