/* Shared reader styles for the GeneratePress child theme and the site's own editorial pages. */
body.wp-child-theme-generatepress-child {
    --reader-ink: #183937;
    --reader-accent: #075b52;
    --reader-muted: #4a625e;
    --reader-rule: #d6e3df;
    --reader-canvas: #f6f8f6;
}

#masthead.site-header {
    background: #fff;
    border-bottom: 1px solid var(--reader-rule);
}
#masthead .main-title a {
    color: var(--reader-ink);
    letter-spacing: -.035em;
}
#masthead #site-navigation,
#masthead #mobile-menu-control-wrapper {
    background: transparent;
}
#masthead #site-navigation .main-nav > ul > li > a {
    color: var(--reader-ink);
    font-weight: 650;
    text-underline-offset: .32em;
}
#masthead #site-navigation .main-nav > ul > li > a:hover,
#masthead #site-navigation .main-nav > ul > li > a:focus-visible,
#masthead #site-navigation .main-nav a[aria-current="page"] {
    color: var(--reader-accent);
    background-color: #edf5f1;
    text-decoration: underline;
}
#masthead :is(a,button):focus-visible,
.site-main :is(a,button,summary,input):focus-visible,
footer.s12-footer a:focus-visible {
    outline: 3px solid #127469;
    outline-offset: 3px;
}

/* Keep the reading measure independent of the full-width home illustration carousel. */
.single-post #main > article > .inside-article {
    box-sizing: border-box;
    max-width: 56rem;
    margin-inline: auto;
    padding: clamp(1rem, 3.8vw, 3.2rem);
    color: var(--reader-ink);
    background: #fff;
    border: 1px solid var(--reader-rule);
    border-radius: .85rem;
}
.single-post #main .entry-title,
.page #main :is(.tp,.dp,.policy,.sgt-policy-page) h1 {
    font-size: clamp(1.75rem, 3.8vw, 2.65rem);
    line-height: 1.33;
    letter-spacing: -.045em;
    color: var(--reader-ink);
    word-break: keep-all;
    overflow-wrap: anywhere;
}
.single-post #main .entry-content,
.page #main .entry-content :is(.tp,.dp,.policy,.sgt-policy-page) {
    font-size: clamp(1rem, .98rem + .2vw, 1.1rem);
    line-height: 1.78;
    min-width: 0;
}
.single-post #main .entry-content h2,
.page #main .entry-content :is(.tp,.dp,.policy,.sgt-policy-page) h2 {
    color: var(--reader-ink);
    letter-spacing: -.035em;
    font-size: clamp(1.32rem, 2.2vw, 1.72rem);
    line-height: 1.43;
    word-break: keep-all;
    overflow-wrap: anywhere;
    scroll-margin-top: 5rem;
}
.single-post #main .entry-content :is(a,figcaption),
.page #main .entry-content :is(.tp,.dp,.policy,.sgt-policy-page) a {
    overflow-wrap: anywhere;
    text-underline-offset: .18em;
}
.single-post #main .entry-content figcaption,
.single-post #main .entry-header .entry-meta {
    color: var(--reader-muted);
    font-size: .92rem;
    line-height: 1.55;
}
.single-post #main .entry-content :is(figure, .wp-block-image, .wp-block-table) {
    max-width: 100%;
    margin-inline: 0;
}
.single-post #main .entry-content .wp-block-table {
    overflow-x: auto;
}
.single-post #main .entry-content img {
    max-width: 100%;
    height: auto;
}
.page #main .entry-content :is(.tp,.dp,.policy,.sgt-policy-page) {
    box-sizing: border-box;
    max-width: 52rem;
    margin-inline: auto;
}
.page #main .entry-content .sgt-policy-page h2 {
    margin-block: 1.65em .5em;
    padding-top: .6em;
    border-top: 1px solid var(--reader-rule);
}
.page #main .entry-content .sgt-policy-page p { margin-bottom: .95em; }

/* Search and archive cards are GeneratePress articles, with their own article metadata footer. */
body:is(.search,.archive) #main > :is(.page-header,article,.paging-navigation) {
    max-width: 56rem;
    box-sizing: border-box;
    margin-inline: auto;
}
body:is(.search,.archive) #main > .page-header {
    padding: clamp(1.15rem, 4vw, 2.3rem);
    margin-bottom: 1rem;
    background: #eaf3ee;
    border-radius: .8rem;
    color: var(--reader-ink);
}
body:is(.search,.archive) #main > article { margin-bottom: .75rem; }
body:is(.search,.archive) #main > article > .inside-article {
    padding: clamp(1rem, 3vw, 1.8rem);
    background: #fff;
    border: 1px solid var(--reader-rule);
    border-radius: .7rem;
}
body:is(.search,.archive) #main .entry-title {
    font-size: clamp(1.18rem, 2vw, 1.5rem);
    line-height: 1.48;
    letter-spacing: -.025em;
    overflow-wrap: anywhere;
}
body:is(.search,.archive) #main .entry-title a { color: var(--reader-accent); }
body:is(.search,.archive) #main .entry-summary { margin-top: .65rem; }
body:is(.search,.archive) #main .entry-summary p { margin: 0 0 .65rem; }
body:is(.search,.archive) #main footer.entry-meta { margin-top: .65rem; }
body:is(.search,.archive) #main .nav-links {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: .25rem;
}
body:is(.search,.archive) #main .page-numbers {
    box-sizing: border-box;
    display: inline-grid;
    place-items: center;
    min-width: 2.75rem;
    min-height: 2.75rem;
    padding-inline: .45rem;
}

footer.s12-footer {
    background: #163c38;
    color: #f3f8f4;
    border-top: 3px solid #8eb8a7;
}
footer.s12-footer .s12-footer-inner {
    box-sizing: border-box;
    max-width: 74rem;
    margin-inline: auto;
    gap: clamp(1rem, 3.5vw, 3rem);
}
footer.s12-footer :is(p,nav,.s12-footer-brand,.s12-footer-bottom) { min-width: 0; }
footer.s12-footer a {
    color: #f1f6f1;
    overflow-wrap: anywhere;
    text-underline-offset: .2em;
}
footer.s12-footer a:hover { text-decoration: underline; }
footer.s12-footer a:focus-visible { outline-color: #bce6ca; }

@media (max-width: 768px) {
    #masthead .inside-header { padding-block: .7rem; }
    #masthead .menu-toggle { min-height: 44px; }
    .single-post #main > article > .inside-article { border-radius: .55rem; }
    footer.s12-footer .s12-footer-inner {
        display: grid;
        grid-template-columns: minmax(0, 1fr);
        gap: 1.15rem;
    }
    footer.s12-footer a {
        display: inline-block;
        padding-block: .37rem;
    }
}
@media print {
    .single-post #main > article > .inside-article { padding: 0; border: 0; max-width: none; }
}
