/*
Theme Name: Arnold Famini — Editorial
Theme URI: https://arnoldfamini.com/
Author: Arnold Famini
Description: A standalone editorial WordPress theme for the Arnold Famini ministry library.
Version: 1.0.0
Requires at least: 6.5
Requires PHP: 8.1
License: MIT
Text Domain: arnold-famini-editorial
*/

@font-face {
    font-family: "Inter Tight";
    src: url("assets/inter-tight.woff2") format("woff2");
    font-weight: 400 700;
    font-display: swap;
}
@font-face {
    font-family: "Instrument Serif";
    src: url("assets/instrument.woff2") format("woff2");
    font-weight: 400;
    font-display: swap;
}
@font-face {
    font-family: "Instrument Serif";
    src: url("assets/instrument-italic.woff2") format("woff2");
    font-style: italic;
    font-weight: 400;
    font-display: swap;
}

:root {
    --afe-paper: #f5f4f1;
    --afe-ink: #141414;
    --afe-muted: #55534e;
    --afe-meta: #69665f;
    --afe-navy: #1f2c50;
    --afe-border: rgb(20 20 20 / 13%);
    --afe-surface: #eceae5;
    --afe-gutter: clamp(20px, 5vw, 48px);
    --afe-sans: "Inter Tight", system-ui, sans-serif;
    --afe-serif: "Instrument Serif", Georgia, serif;
    --afe-section: clamp(72px, 9vw, 120px);
}
*, *::before, *::after { box-sizing: border-box; }
html { scroll-padding-top: 120px; }
body.afe-site {
    margin: 0;
    background: var(--afe-paper);
    color: var(--afe-ink);
    font: 16px/1.6 var(--afe-sans);
    -webkit-font-smoothing: antialiased;
}
.afe-site :where(button, input, textarea, select) { font: inherit; }
.afe-site :where(img, video, svg) { max-width: 100%; }
.afe-site :where(img, video) { height: auto; }
.afe-site :where(a) { color: inherit; text-decoration: none; }
.afe-site :where(a, button, input, textarea, summary):focus-visible {
    outline: 2px solid #526baa;
    outline-offset: 4px;
}
.afe-wrap { width: 100%; max-width: 1240px; margin-inline: auto; padding-inline: var(--afe-gutter); }
.afe-skip, .screen-reader-text {
    position: absolute;
    width: 1px;
    height: 1px;
    overflow: hidden;
    clip-path: inset(50%);
    white-space: nowrap;
}
.afe-skip:focus, .screen-reader-text:focus {
    inset: 12px auto auto 12px;
    z-index: 100000;
    width: auto;
    height: auto;
    padding: 8px 16px;
    clip-path: none;
    background: white;
    color: var(--afe-ink);
}

.afe-site-header { position: sticky; top: 0; z-index: 100; background: var(--afe-paper); border-bottom: 1px solid var(--afe-border); }
.admin-bar .afe-site-header { top: 32px; }
.afe-nav-bar { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 4px 28px; min-height: 92px; padding-block: 24px; }
.afe-brand { font-size: 17px; font-weight: 600; letter-spacing: -.01em; padding-block: 10px; }
.afe-nav { display: flex; align-items: center; flex-wrap: wrap; gap: 4px 24px; font-size: 15px; color: var(--afe-muted); }
.afe-nav a { padding-block: 10px; }
.afe-nav [aria-current] { color: var(--afe-navy); font-weight: 600; }
.afe-nav a:hover, .afe-footer a:hover { text-decoration: underline; text-underline-offset: .22em; }
.afe-menu-button, .afe-nav .afe-mobile-only { display: none; }

.afe-hero { display: grid; grid-template-columns: minmax(0, 1.12fr) minmax(0, .92fr); gap: clamp(32px, 5.8vw, 72px); align-items: center; padding: clamp(40px, 6vw, 72px) 0 clamp(80px, 10vw, 128px); }
.afe-hero--about { grid-template-columns: minmax(0, .82fr) minmax(0, 1.18fr); }
.afe-portrait { display: block; width: 100%; height: clamp(400px, 49vw, 600px); object-fit: cover; object-position: 50% 20%; background: #e6e4e1; border-radius: 8px; }
.afe-hero--home .afe-portrait { max-width: 480px; justify-self: end; }
.afe-hero--about .afe-portrait { height: clamp(400px, 45vw, 540px); }
.afe-kicker { margin: 0 0 24px; color: var(--afe-navy); font-size: 15px; font-weight: 500; }
.afe-hero h1, .afe-intro h1, .afe-entry h1 { margin: 0; font-size: clamp(48px, 6.4vw, 92px); font-weight: 500; letter-spacing: -.04em; line-height: 1; overflow-wrap: break-word; }
.afe-hero--about h1 { font-size: clamp(44px, 5.6vw, 80px); }
.afe-site :where(h1, h2) em { font-family: var(--afe-serif); font-weight: 400; letter-spacing: -.01em; }
.afe-site h1 em { color: var(--afe-navy); }
.afe-deck { color: var(--afe-muted); font-size: clamp(17px, 1.6vw, 20px); line-height: 1.55; margin: 30px 0 0; max-width: 620px; }
.afe-hero .afe-deck { max-width: 500px; }
.afe-actions { display: flex; flex-wrap: wrap; align-items: center; gap: 12px; margin-top: 38px; }
.afe-button {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-height: 52px;
    padding: 10px 27px;
    border: 1px solid transparent;
    border-radius: 999px;
    background: var(--afe-navy);
    color: white;
    font-size: 15px;
    font-weight: 500;
    line-height: 1.25;
    text-align: center;
    text-decoration: none;
    cursor: pointer;
}
.afe-button:hover { background: #304374; color: white; }
.afe-button--outline { border-color: rgb(20 20 20 / 22%); background: transparent; color: var(--afe-ink); }
.afe-button--outline:hover { background: var(--afe-surface); color: var(--afe-ink); }
.afe-button--light { background: white; color: var(--afe-ink); }
.afe-button--light:hover { background: #e9e9e9; color: var(--afe-ink); }
.afe-button:disabled { cursor: default; }

.afe-feature { display: flex; align-items: flex-end; position: relative; isolation: isolate; min-height: 560px; overflow: hidden; background: #2a2418; color: white; border-radius: 8px; }
.afe-feature > .afe-art { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; object-position: 50% 60%; z-index: -2; }
.afe-feature::before { content: ""; position: absolute; inset: 0; background: linear-gradient(to top, rgb(18 14 8 / 88%), rgb(18 14 8 / 50%) 48%, transparent 86%); z-index: -1; }
.afe-feature-copy { padding: clamp(28px, 5vw, 64px); max-width: 730px; }
.afe-feature h2 { margin: 0; font: 400 clamp(64px, 9vw, 128px)/.95 var(--afe-serif); overflow-wrap: anywhere; }
.afe-feature-copy > p:not(.afe-meta) { margin: 20px 0 0; max-width: 550px; font-size: clamp(18px, 1.8vw, 21px); line-height: 1.5; }
.afe-feature-copy .afe-button { margin-top: 28px; }
.afe-feature .afe-meta, .afe-series-feature .afe-meta { color: rgb(255 255 255 / 86%); }

.afe-section { padding-block: var(--afe-section); }
.afe-section-head { display: flex; align-items: baseline; justify-content: space-between; flex-wrap: wrap; gap: 16px 40px; margin-bottom: 38px; }
.afe-section-head h2, .afe-archive-list > h2, .afe-newsletter h2, .afe-about-row h2 {
    margin: 0;
    font-size: clamp(30px, 3.6vw, 48px);
    font-weight: 500;
    line-height: 1.08;
    letter-spacing: -.03em;
}
.afe-section-head > .afe-summary { max-width: 500px; margin: 0; }
.afe-arrow { color: var(--afe-navy); font-size: 15px; font-weight: 600; }
a.afe-arrow:hover, a:hover .afe-arrow { text-decoration: underline; text-underline-offset: .23em; }
.afe-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 44px 24px; }
.afe-card { min-width: 0; }
.afe-card a { display: block; height: 100%; }
.afe-card a:hover h3, .afe-archive-feature a:hover h2 { text-decoration: underline; text-decoration-thickness: 1px; text-underline-offset: .15em; }
.afe-card-image, .afe-archive-image { overflow: hidden; border-radius: 8px; background: var(--afe-surface); }
.afe-card-image .afe-art, .afe-archive-image .afe-art { display: block; width: 100%; aspect-ratio: 16 / 9; object-fit: cover; }
.afe-card-image + .afe-card-text { margin-top: 15px; }
.afe-meta { color: var(--afe-meta); font-size: 14px; line-height: 1.4; margin: 0 0 9px; }
.afe-card h3 { margin: 0; font-size: 22px; font-weight: 500; line-height: 1.24; letter-spacing: -.015em; }
.afe-summary { color: var(--afe-muted); margin: 9px 0 0; line-height: 1.52; }
.afe-card .afe-arrow { display: inline-block; margin-top: 16px; }

.afe-newsletter { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, .95fr); align-items: center; gap: 32px 52px; margin-bottom: 96px; padding: clamp(36px, 5vw, 64px); background: var(--afe-navy); color: white; border-radius: 8px; }
.afe-newsletter h2 { font-size: clamp(30px, 3.4vw, 44px); }
.afe-newsletter p { margin: 12px 0 0; color: rgb(255 255 255 / 86%); }
.afe-newsletter form { display: flex; flex-wrap: wrap; gap: 12px; align-items: center; }
.afe-newsletter input { flex: 1 1 170px; width: 100%; min-width: 0; min-height: 52px; padding-inline: 20px; border: 1px solid rgb(255 255 255 / 45%); border-radius: 999px; background: rgb(255 255 255 / 10%); color: white; opacity: 1; }
.afe-newsletter input::placeholder { color: rgb(255 255 255 / 85%); }
.afe-news-status { flex-basis: 100%; }
.afe-footer { display: flex; flex-wrap: wrap; justify-content: space-between; align-items: center; gap: 8px 24px; border-top: 1px solid var(--afe-border); padding: 28px 0 40px; color: var(--afe-muted); font-size: 14px; }
.afe-footer-links { display: flex; flex-wrap: wrap; align-items: center; gap: 12px 24px; }
.afe-search { display: flex; gap: 6px; }
.afe-search input, .afe-search button { min-width: 0; border: 1px solid var(--afe-border); border-radius: 999px; background: transparent; padding: 6px 12px; color: var(--afe-ink); }
.afe-search input { width: 146px; }
.afe-search button { cursor: pointer; }

.afe-intro { max-width: 860px; padding: clamp(56px, 8vw, 104px) 0 clamp(48px, 7vw, 88px); }
.afe-intro h1 { font-size: clamp(44px, 6vw, 84px); }
.afe-intro .afe-deck { margin-top: 24px; }
.afe-archive-list, .afe-grid--resources, .afe-empty { padding-bottom: var(--afe-section); }
.afe-archive-list--spaced { padding-top: clamp(56px, 7vw, 104px); }
.afe-archive-list > h2 { margin-bottom: 38px; }
.afe-archive-feature a, .afe-card--book a, .afe-card--row a { display: grid; align-items: center; gap: clamp(24px, 5vw, 56px); }
.afe-archive-feature--sermon a, .afe-card--book a { grid-template-columns: minmax(0, 1.15fr) minmax(0, 1fr); }
.afe-archive-feature--article a { gap: 24px; }
.afe-archive-feature--article .afe-art { aspect-ratio: 21 / 9; }
.afe-archive-feature--article .afe-archive-copy { max-width: 780px; }
.afe-archive-copy h2 { margin: 0; font-size: clamp(32px, 4.2vw, 60px); font-weight: 500; line-height: 1.02; letter-spacing: -.035em; }
.afe-archive-copy .afe-arrow { display: inline-block; margin-top: 16px; }
.afe-card--book, .afe-card--row { border-top: 1px solid var(--afe-border); padding-block: 32px; }
.afe-card--book h3 { font-size: clamp(26px, 3vw, 40px); }
.afe-card--row a { grid-template-columns: minmax(0, 280px) minmax(0, 1fr); }
.afe-card--book .afe-card-text, .afe-card--row .afe-card-text { margin: 0; }
.afe-archive-feature a:not(:has(.afe-archive-image)), .afe-card a:not(:has(.afe-card-image)) { grid-template-columns: minmax(0, 1fr); }
.afe-tag { display: inline-block; margin-inline-end: 8px; padding: 3px 10px; background: var(--afe-surface); color: var(--afe-navy); border-radius: 999px; }
.afe-series-feature { display: grid; grid-template-columns: minmax(0, 1.05fr) minmax(0, 1fr); align-items: stretch; background: var(--afe-navy); color: white; border-radius: 12px; overflow: hidden; }
.afe-series-feature > img { display: block; width: 100%; height: 100%; min-height: 320px; object-fit: cover; }
.afe-series-copy { padding: clamp(28px, 5vw, 58px); }
.afe-series-copy h2 { margin: 0; font: 400 clamp(40px, 4.4vw, 60px)/1 var(--afe-serif); }
.afe-series-copy .afe-button { margin-top: 10px; }
.afe-grid--resources { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 24px; }
.afe-resource { display: flex; flex-direction: column; align-items: flex-start; padding: clamp(24px, 4vw, 40px); border: 1px solid var(--afe-border); border-radius: 12px; }
.afe-resource .afe-meta { display: flex; gap: 12px; align-items: center; color: var(--afe-navy); }
.afe-resource h2 { margin: 6px 0 14px; font-size: clamp(24px, 2.5vw, 30px); font-weight: 500; letter-spacing: -.02em; line-height: 1.18; }
.afe-resource h2 a:hover { text-decoration: underline; }
.afe-resource .afe-arrow { margin-top: auto; padding-top: 8px; }
.afe-lesson-group { padding: 48px 0 clamp(60px, 9vw, 100px); border-top: 1px solid var(--afe-border); }
.afe-lesson-group .afe-kicker { margin-bottom: 9px; }
.afe-dot { display: inline-block; width: 7px; height: 7px; margin-right: 7px; border-radius: 50%; background: var(--afe-navy); vertical-align: .15em; }
.afe-group-link { margin: 32px 0 0; }
.afe-pagination { padding-bottom: 55px; }
.afe-pagination .nav-links { display: flex; flex-wrap: wrap; gap: 8px; }
.afe-pagination .page-numbers { padding: 7px 12px; border: 1px solid var(--afe-border); border-radius: 999px; }
.afe-pagination .current { background: var(--afe-navy); color: white; }

.afe-back { display: inline-block; margin-top: 36px; }
.afe-entry { padding-bottom: var(--afe-section); }
.afe-entry-head { max-width: 940px; padding: clamp(48px, 7vw, 88px) 0 42px; }
.afe-back + .afe-entry-head { padding-top: clamp(24px, 4vw, 54px); }
.afe-entry-head .afe-actions { margin-top: 24px; }
.afe-byline { display: flex; align-items: center; gap: 11px; color: var(--afe-muted); font-size: 14px; margin-top: 24px; }
.afe-byline img { display: block; width: 40px; height: 40px; object-fit: cover; object-position: 50% 15%; border-radius: 50%; }
.afe-entry-art { margin-bottom: clamp(42px, 6vw, 74px); }
.afe-entry-art .afe-art { display: block; width: 100%; aspect-ratio: 16 / 7; object-fit: cover; border-radius: 8px; }
.afe-reading { display: grid; justify-items: center; }
.afe-reading--toc { grid-template-columns: minmax(150px, .36fr) minmax(0, 1fr); gap: clamp(36px, 6vw, 74px); align-items: start; justify-items: start; }
.afe-prose { width: 100%; max-width: 720px; min-width: 0; font-size: clamp(17px, 1.5vw, 18px); line-height: 1.75; color: #2a2926; overflow-wrap: anywhere; }
.afe-prose > :first-child { margin-top: 0; }
.afe-prose :where(p, ul, ol, figure, blockquote, pre) { margin: 0 0 1.2em; }
.afe-prose :where(h2, h3, h4) { margin: 1.85em 0 .55em; font-weight: 550; line-height: 1.18; letter-spacing: -.025em; color: var(--afe-ink); scroll-margin-top: 28px; }
.afe-prose h2 { font-size: clamp(27px, 3vw, 34px); }
.afe-prose h3 { font-size: clamp(22px, 2.4vw, 27px); }
.afe-prose ul, .afe-prose ol { padding-left: 1.5em; }
.afe-prose a { color: var(--afe-navy); text-decoration: underline; text-underline-offset: .16em; }
.afe-prose blockquote { padding: 20px 25px; margin-block: 1.65em; border-left: 3px solid var(--afe-navy); background: var(--afe-surface); }
.afe-prose blockquote > :last-child { margin-bottom: 0; }
.afe-prose :where(pre, .wp-block-table) { overflow-x: auto; }
.afe-prose :where(img, iframe) { max-width: 100%; }
.afe-prose img { border-radius: 6px; }
.afe-prose iframe { border: 0; }
.afe-prose table { border-collapse: collapse; }
.afe-prose :where(td, th) { border: 1px solid var(--afe-border); padding: .45em .7em; }
.afe-prose .wp-block-button__link { color: white; background: var(--afe-navy); text-decoration: none; }
.afe-toc { position: sticky; top: 120px; align-self: start; width: 100%; color: var(--afe-muted); font-size: 15px; }
.admin-bar .afe-toc { top: 152px; }
.afe-toc details { border-top: 1px solid var(--afe-border); padding-top: 14px; }
.afe-toc summary { cursor: pointer; font-weight: 600; color: var(--afe-ink); }
.afe-toc ul { padding: 0; list-style: none; margin: 12px 0 0; }
.afe-toc li { padding-block: 3px; }
.afe-toc .afe-toc-h3 { padding-left: 12px; }
.afe-toc a:hover { text-decoration: underline; }
.afe-details { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 14px 24px; border-block: 1px solid var(--afe-border); padding: 18px 0; }
.afe-details dt { color: var(--afe-meta); font-size: 14px; }
.afe-details dd { margin: 0; }
.afe-comments { margin: 48px auto 0; border-top: 1px solid var(--afe-border); padding-top: 24px; }
.afe-comments :where(input:not([type=checkbox]), textarea) { width: 100%; border: 1px solid var(--afe-border); background: transparent; border-radius: 7px; color: var(--afe-ink); padding: 9px 12px; }
.afe-comments input[type=submit] { width: auto; background: var(--afe-navy); color: white; cursor: pointer; }

.afe-about-row { display: grid; grid-template-columns: minmax(180px, .55fr) minmax(0, 1.15fr); gap: 25px clamp(36px, 7vw, 80px); padding: 56px 0 var(--afe-section); border-top: 1px solid var(--afe-border); }
.afe-about-row h2 { font-size: clamp(28px, 3vw, 38px); }
.afe-about-row p { max-width: 680px; margin: 0 0 14px; color: var(--afe-muted); font-size: 19px; line-height: 1.65; }
.afe-about-row p:last-child { margin: 0; }
.afe-manifesto { background: var(--afe-navy); color: white; padding: clamp(32px, 6vw, 74px); border-radius: 8px; }
.afe-manifesto .afe-kicker { color: rgb(255 255 255 / 84%); }
.afe-manifesto p { margin: 0; max-width: 850px; font: 400 clamp(38px, 5.7vw, 78px)/1.04 var(--afe-serif); }
.afe-support { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 24px; padding-bottom: var(--afe-section); }
.afe-support p { margin: 0 0 10px; color: var(--afe-muted); }

@media (max-width: 970px) {
    .afe-nav { column-gap: 15px; }
    .afe-newsletter { grid-template-columns: 1fr; }
}
@media (min-width: 761px) and (max-width: 782px) {
    .admin-bar .afe-site-header { top: 46px; }
    .admin-bar .afe-toc { top: 166px; }
}
@media (max-width: 760px) {
    html { scroll-padding-top: 86px; }
    .admin-bar .afe-site-header { top: 46px; }
    .afe-nav-bar { min-height: 64px; padding-block: 0; position: relative; }
    .afe-site-header { border-bottom: 1px solid var(--afe-border); }
    .afe-js .afe-menu-button { display: inline-grid; place-items: center; width: 44px; height: 44px; padding: 0; color: var(--afe-ink); border: 0; border-radius: 50%; background: transparent; cursor: pointer; }
    .afe-menu-button :is(.afe-open-icon, .afe-close-icon) { transform-origin: center; }
    .afe-menu-button[aria-expanded=false] .afe-close-icon, .afe-menu-button[aria-expanded=true] .afe-open-icon { opacity: 0; transform: rotate(-45deg) scale(.7); }
    .afe-nav { width: 100%; display: flex; flex-direction: column; align-items: stretch; padding: 16px var(--afe-gutter) 28px; gap: 0; }
    .afe-js .afe-nav { position: absolute; z-index: 30; left: 0; top: 100%; border-bottom: 1px solid var(--afe-border); background: var(--afe-paper); box-shadow: 0 16px 32px rgb(20 20 20 / 9%); visibility: hidden; opacity: 0; transform: translateY(-12px); pointer-events: none; }
    .afe-js .afe-menu-button[aria-expanded=true] + .afe-nav { visibility: visible; opacity: 1; transform: translateY(0); pointer-events: auto; }
    .afe-js .afe-nav { max-height: calc(100dvh - 110px); overflow-y: auto; overscroll-behavior: contain; }
    .afe-nav a:not(.afe-button) { display: flex; justify-content: space-between; border-bottom: 1px solid var(--afe-border); padding: 9px 0; font-size: 22px; }
    .afe-nav a:not(.afe-button)::after { content: "→" / ""; color: var(--afe-meta); }
    .afe-nav .afe-mobile-contact { display: inline-flex; margin-top: 22px; }
    .afe-hero, .afe-hero--about { grid-template-columns: minmax(0, 1fr); gap: 32px; padding: 40px 0 0; }
    .afe-hero--about .afe-portrait { grid-row: 2; }
    .afe-hero--about { padding-bottom: 48px; }
    .afe-hero h1, .afe-intro h1, .afe-entry h1 { font-size: clamp(40px, 9vw, 56px); line-height: 1.02; letter-spacing: -.035em; }
    .afe-kicker { margin-bottom: 16px; }
    .afe-deck, .afe-intro .afe-deck { margin-top: 20px; }
    .afe-actions { margin-top: 27px; gap: 8px; }
    .afe-button { min-height: 48px; padding-inline: 19px; }
    .afe-hero .afe-portrait, .afe-hero--home .afe-portrait { width: calc(100% + 2 * var(--afe-gutter)); max-width: none; margin-inline: calc(-1 * var(--afe-gutter)); justify-self: auto; height: clamp(380px, 133vw, 540px); border-radius: 0; }
    .afe-feature { min-height: 490px; margin-inline: calc(-1 * var(--afe-gutter)); border-radius: 0; }
    .afe-feature > .afe-art { object-position: 30% 60%; }
    .afe-feature-copy { padding: 24px var(--afe-gutter) 32px; }
    .afe-feature h2 { font-size: clamp(56px, 14vw, 78px); }
    .afe-section { padding-block: 60px; }
    .afe-section-head { margin-bottom: 24px; }
    .afe-section-head h2, .afe-archive-list > h2 { font-size: 29px; }
    .afe-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 28px 16px; }
    .afe-grid--mobile-rows { display: flex; flex-direction: column; gap: 20px; }
    .afe-grid--mobile-rows .afe-card a { display: grid; grid-template-columns: 112px minmax(0, 1fr); align-items: start; gap: 12px; }
    .afe-grid--mobile-rows .afe-card a:not(:has(.afe-card-image)) { grid-template-columns: minmax(0, 1fr); }
    .afe-grid--mobile-rows .afe-card .afe-card-text { margin-top: 0; }
    .afe-grid--mobile-rows .afe-card h3 { font-size: 18px; }
    .afe-grid--mobile-rows .afe-summary { display: none; }
    .afe-grid--lead { display: flex; flex-direction: column; gap: 20px; }
    .afe-grid--lead .afe-card + .afe-card a { display: grid; grid-template-columns: minmax(0, 112px) minmax(0, 1fr); align-items: start; gap: 12px; }
    .afe-grid--lead .afe-card + .afe-card a:not(:has(.afe-card-image)) { grid-template-columns: minmax(0, 1fr); }
    .afe-grid--lead .afe-card + .afe-card .afe-card-text { margin-top: 0; }
    .afe-grid--lead .afe-card + .afe-card h3 { font-size: 18px; }
    .afe-grid--lead .afe-card + .afe-card .afe-summary { display: none; }
    .afe-card h3 { font-size: 20px; }
    .afe-newsletter { margin-bottom: 48px; padding: 28px 24px; border-radius: 12px; gap: 24px; }
    .afe-newsletter h2 { font-size: 27px; }
    .afe-footer, .afe-footer-links { align-items: flex-start; flex-direction: column; }
    .afe-intro { padding-block: 48px 36px; }
    .afe-archive-feature--sermon a, .afe-card--book a, .afe-series-feature, .afe-grid--resources, .afe-support, .afe-about-row { grid-template-columns: minmax(0, 1fr); }
    .afe-archive-feature--article .afe-art { aspect-ratio: 16 / 9; }
    .afe-card--row a { grid-template-columns: minmax(0, 110px) minmax(0, 1fr); gap: 16px; align-items: start; }
    .afe-card--book, .afe-card--row { padding-block: 23px; }
    .afe-archive-copy h2 { font-size: 35px; }
    .afe-series-feature > img { min-height: 0; aspect-ratio: 16 / 9; }
    .afe-lesson-group { padding-block: 30px 48px; }
    .afe-reading--toc { grid-template-columns: minmax(0, 1fr); gap: 26px; }
    .afe-toc { position: static; }
    .afe-entry-art .afe-art { aspect-ratio: 16 / 9; }
    .afe-about-row { padding-block: 35px 50px; }
    .afe-about-row p { font-size: 17px; }
}
@media (max-width: 600px) {
    .admin-bar .afe-site-header { top: 0; }
}
@media (max-width: 360px) {
    .afe-grid:not(.afe-grid--resources) { grid-template-columns: minmax(0, 1fr); }
    .afe-card--row a { grid-template-columns: minmax(0, 1fr); }
}
@media print {
    .afe-site-header, .afe-footer, .afe-toc, .afe-comments, .afe-actions, .afe-back { display: none; }
    .afe-reading { display: block; }
    body.afe-site { background: white; }
}

@media (prefers-reduced-motion: no-preference) {
    html { scroll-behavior: smooth; }
    @media (max-width: 760px) {
        .afe-js .afe-nav { transition: opacity 280ms ease, transform 380ms cubic-bezier(.22, 1, .36, 1), visibility 0s linear 380ms; }
        .afe-js .afe-menu-button[aria-expanded=true] + .afe-nav { transition-delay: 0s; }
        .afe-menu-button :is(.afe-open-icon, .afe-close-icon) { transition: opacity 200ms ease, transform 300ms cubic-bezier(.22, 1, .36, 1); }
        .afe-js .afe-nav a { opacity: 0; transform: translateY(-8px); transition: opacity 180ms ease, transform 220ms ease; }
        .afe-js .afe-menu-button[aria-expanded=true] + .afe-nav a { opacity: 1; transform: translateY(0); transition: opacity 300ms ease 80ms, transform 380ms cubic-bezier(.22, 1, .36, 1) 80ms; }
    }
    .afe-reveal {
        transition: opacity 700ms ease, transform 700ms cubic-bezier(.22, 1, .36, 1);
    }
    .afe-reveal-pending { opacity: 0; transform: translateY(20px); }
    .afe-reveal-pending:focus-within { opacity: 1; transform: none; }
    .afe-card-image .afe-art, .afe-archive-image .afe-art {
        transition: transform 650ms cubic-bezier(.22, 1, .36, 1);
    }
    .afe-card a:hover .afe-art, .afe-card a:focus-visible .afe-art,
    .afe-archive-feature a:hover .afe-art, .afe-archive-feature a:focus-visible .afe-art {
        transform: scale(1.035);
    }
    .afe-button { transition: background-color 220ms ease, color 220ms ease, border-color 220ms ease; }
}
@media (prefers-reduced-motion: reduce) {
    html { scroll-behavior: auto; }
    .afe-reveal-pending { opacity: 1; transform: none; }
}
@media print {
    .afe-reveal-pending { opacity: 1 !important; transform: none !important; }
}

/* APEST assessment: match the editorial site while preserving its scoring. */
.afe-entry:has(#apest-app) .afe-prose { max-width: 980px; }
.afe-entry:has(#apest-app) .afe-entry-art { display: none; }
body.afe-site #apest-app {
    --accent: var(--afe-navy);
    --af-text: var(--afe-ink);
    --af-muted: var(--afe-muted);
    --af-border: var(--afe-border);
    color: var(--afe-ink);
}
body.afe-site #apest-app .bg { background: transparent; padding: 0; }
body.afe-site #apest-app .wrap { max-width: none; background: transparent; border: 0; border-radius: 0; box-shadow: none; overflow: visible; }
body.afe-site #apest-app .header { padding: 0 0 28px; text-align: left; border-bottom: 1px solid var(--afe-border); }
body.afe-site #apest-app .brand { justify-content: flex-start; margin: 0; }
body.afe-site #apest-app .brand img { display: none; }
body.afe-site #apest-app .brand h2 { margin: 0 0 8px; color: var(--afe-navy); font: 400 clamp(29px, 4vw, 42px)/1.08 var(--afe-serif); letter-spacing: -.01em; }
body.afe-site #apest-app .sub { font-size: 16px; color: var(--afe-muted); }
body.afe-site #apest-app .chiprow { justify-content: flex-start; gap: 7px; margin: 22px 0; }
body.afe-site #apest-app .chip { color: var(--afe-navy); border: 1px solid var(--afe-border); background: transparent; padding: 5px 11px; font-size: 11px; letter-spacing: .04em; }
body.afe-site #apest-app .notice { max-width: none; margin: 0; border-radius: 0 6px 6px 0; border-left: 3px solid var(--afe-navy); background: #eae9e4; color: var(--afe-ink); padding: 15px 18px; text-align: left; }
body.afe-site #apest-app .guide { max-width: none; margin: 12px 0 0; justify-content: flex-start; color: var(--afe-muted); }
body.afe-site #apest-app .grid { padding: 14px 0 0; }
body.afe-site #apest-app .q { background: transparent; border: 1px solid var(--afe-border); border-radius: 8px; margin: 14px 0; padding: clamp(18px, 3vw, 26px); }
body.afe-site #apest-app .q:hover { border-color: #a7a59e; }
body.afe-site #apest-app .q.missing { border-color: #a64343; box-shadow: 0 0 0 2px rgb(166 67 67 / 12%); }
body.afe-site #apest-app .qtitle { gap: 14px; align-items: flex-start; }
body.afe-site #apest-app .qnum { min-width: 34px; height: 34px; background: var(--afe-navy); color: white; font-size: 13px; font-weight: 600; }
body.afe-site #apest-app .qtext { color: var(--afe-ink); font-size: 17px; line-height: 1.5; hyphens: none; }
body.afe-site #apest-app .rate { padding: 18px 0 0 48px; gap: 8px; }
body.afe-site #apest-app .opt { width: 42px; height: 42px; border: 1px solid var(--afe-border); border-radius: 6px; background: transparent; color: var(--afe-ink); font-weight: 500; }
body.afe-site #apest-app .opt:hover { border-color: var(--afe-navy); color: var(--afe-navy); }
body.afe-site #apest-app .rate input:checked + .opt { border-color: var(--afe-navy); background: var(--afe-navy); color: white; }
body.afe-site #apest-app .rate input:checked + .opt::after { content: none; }
body.afe-site #apest-app .actions { padding: 18px 0 30px; }
body.afe-site #apest-app .btn { cursor: pointer; min-height: 48px; padding: 10px 26px; border: 1px solid var(--afe-navy); border-radius: 999px; background: transparent; color: var(--afe-navy); font-weight: 600; }
body.afe-site #apest-app .btn.primary { background: var(--afe-navy); color: white; }
body.afe-site #apest-app .btn:hover { background: #273966; color: white; }
body.afe-site #apest-app .fine { color: var(--afe-muted); font-size: 14px; }
body.afe-site #apest-app .results { padding: 28px 0; }
body.afe-site #apest-app .results h2 { margin-top: 0; }
body.afe-site #apest-app :is(.card, .descCard, .top) { background: transparent; border: 1px solid var(--afe-border); border-radius: 8px; box-shadow: none; padding: 18px; }
body.afe-site #apest-app :is(.card.primary, .descCard.primary) { border-color: var(--afe-navy); box-shadow: none; }
body.afe-site #apest-app .sc { color: var(--afe-navy); background: none; -webkit-text-fill-color: currentColor; font-weight: 600; }
body.afe-site #apest-app .pill { background: var(--afe-navy); color: white; font-size: 12px; font-weight: 600; }
body.afe-site #apest-app .pct { background: transparent; color: var(--afe-navy); }
body.afe-site #apest-article { color: var(--afe-ink); padding-inline: 0; }
body.afe-site #apest-article a { color: var(--afe-navy); }
body.afe-site #apest-article :is(.af-gift, .af-toc) { background: transparent; border-color: var(--afe-border); border-radius: 8px; }
body.afe-site .afe-prose > details:has(#apest-article) { border: 1px solid var(--afe-border) !important; background: transparent !important; border-radius: 8px !important; }
body.afe-site .afe-prose > details:has(#apest-article) > summary { color: var(--afe-ink) !important; }
body.afe-site .afe-prose > details:has(#apest-article) > p { color: var(--afe-muted) !important; }
@media (max-width: 740px) {
    body.afe-site #apest-app .header { padding-bottom: 24px; }
    body.afe-site #apest-app .q { padding: 17px; }
    body.afe-site #apest-app .qtext { font-size: 16px; }
    body.afe-site #apest-app .rate { padding: 16px 0 0; grid-template-columns: repeat(5, minmax(0, 1fr)); }
    body.afe-site #apest-app .opt { width: 100%; height: 46px; }
}
