/* Victory Ministries: the new shell is opt-in through .vm-site.
   Legacy styles and plugin dependencies remain with the legacy includes. */
:root {
    --vm-cream: #f5f1e8;
    --vm-paper: #fbf8f2;
    --vm-ink: #1f2930;
    --vm-olive: #46513b;
    --vm-olive-dark: #34402f;
    --vm-gold: #a7833e;
    --vm-taupe: #d8d0c3;
    --vm-line: #ded7cc;
    --vm-muted: #606557;
    --vm-serif: "Iowan Old Style", Baskerville, "Palatino Linotype", Georgia, serif;
    --vm-sans: -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
    --vm-width: 76rem;
    --vm-gutter: clamp(1.25rem, 5.5vw, 5rem);
}

.vm-site,
.vm-site *,
.vm-site *::before,
.vm-site *::after {
    box-sizing: border-box;
}

.vm-site {
    margin: 0;
    background: var(--vm-paper);
    color: var(--vm-ink);
    font-family: var(--vm-serif);
    font-size: 1.125rem;
    line-height: 1.55;
    -webkit-text-size-adjust: 100%;
}

.vm-site [hidden] { display: none !important; }
.vm-site img { display: block; max-width: 100%; height: auto; }
.vm-site a { color: inherit; text-underline-offset: 0.22em; }
.vm-site a:hover { text-decoration-thickness: 2px; }
.vm-site h1,
.vm-site h2,
.vm-site h3,
.vm-site p,
.vm-site figure { margin: 0; }
.vm-site h1,
.vm-site h2,
.vm-site h3 { font-weight: 400; line-height: 1.12; }
.vm-site p + p { margin-top: 1rem; }
.vm-site :where(h1, h2, h3, section, article, main)[id] { scroll-margin-top: 1.5rem; }
.vm-site :focus-visible { outline: 3px solid var(--vm-olive); outline-offset: 5px; }
.vm-footer :focus-visible { outline-color: var(--vm-cream); }

.vm-container {
    width: min(var(--vm-width), calc(100% - var(--vm-gutter) * 2));
    margin-inline: auto;
}

.vm-visually-hidden {
    position: absolute;
    width: 1px;
    height: 1px;
    padding: 0;
    overflow: hidden;
    clip-path: inset(50%);
    white-space: nowrap;
}

.vm-skip-link {
    position: absolute;
    top: 0.75rem;
    left: 1rem;
    z-index: 10;
    padding: 0.75rem 1rem;
    transform: translateY(-180%);
    background: var(--vm-paper);
}
.vm-skip-link:focus { transform: translateY(0); }

.vm-header { background: var(--vm-cream); }
.vm-header-inner {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    justify-content: space-between;
    gap: 0.75rem 0.5rem;
    padding-block: 1.125rem;
}
.vm-brand { display: inline-flex; flex-direction: column; text-decoration: none; }
.vm-brand-name {
    font-size: clamp(1.0625rem, 2.1vw, 1.875rem);
    line-height: 1.15;
    letter-spacing: -0.025em;
    text-transform: uppercase;
}
.vm-brand-verse { color: var(--vm-olive); font-size: 1rem; font-style: italic; }
.vm-menu-toggle {
    display: inline-flex;
    min-height: 44px;
    align-items: center;
    gap: 0.5rem;
    padding: 0.5rem;
    border: 1px solid var(--vm-line);
    border-radius: 2px;
    background: transparent;
    color: var(--vm-ink);
    font: 0.875rem var(--vm-sans);
    cursor: pointer;
}
.vm-menu-icon,
.vm-menu-icon::before,
.vm-menu-icon::after {
    display: block;
    width: 18px;
    height: 1px;
    background: currentColor;
}
.vm-menu-icon { position: relative; }
.vm-menu-icon::before,
.vm-menu-icon::after { position: absolute; content: ""; left: 0; }
.vm-menu-icon::before { top: -5px; }
.vm-menu-icon::after { top: 5px; }
.vm-menu-toggle[aria-expanded="true"] .vm-menu-icon { background: transparent; }
.vm-menu-toggle[aria-expanded="true"] .vm-menu-icon::before { top: 0; transform: rotate(45deg); }
.vm-menu-toggle[aria-expanded="true"] .vm-menu-icon::after { top: 0; transform: rotate(-45deg); }
.vm-nav { flex-basis: 100%; }
.vm-nav ul,
.vm-footer ul { margin: 0; padding: 0; list-style: none; }
.vm-nav ul { display: grid; gap: 0; padding-top: 0.5rem; }
.vm-nav a {
    display: block;
    min-height: 44px;
    padding: 0.65rem 0;
    border-bottom: 1px solid var(--vm-line);
    font-size: 1rem;
    text-decoration: none;
}
.vm-nav a[aria-current="page"] { text-decoration: underline; text-decoration-color: var(--vm-gold); text-decoration-thickness: 2px; }
.vm-nav a:hover { color: var(--vm-olive); text-decoration: underline; }

.vm-hero { position: relative; isolation: isolate; background: var(--vm-cream); }
.vm-hero-photo { width: 100%; aspect-ratio: 4 / 3; object-fit: cover; object-position: center bottom; }
.vm-hero-content { padding-block: 2.5rem 3rem; }
.vm-hero h1 { font-size: clamp(2.65rem, 7vw, 4rem); letter-spacing: -0.035em; }
.vm-hero h1 span { display: block; }
.vm-hero-statement { max-width: 30rem; margin-top: 1.5rem !important; font-size: 1.125rem; }
.vm-hero-statement::before { content: ""; display: block; width: 2.75rem; height: 2px; margin-bottom: 1rem; background: var(--vm-gold); }

.vm-psalm { padding-block: clamp(2.5rem, 4.5vw, 4rem); text-align: center; }
.vm-psalm blockquote { margin: 0 auto 0.875rem; max-width: 36rem; font-size: clamp(1.5rem, 2.7vw, 2.4rem); font-style: italic; line-height: 1.3; }
.vm-psalm figcaption { font: 0.6875rem var(--vm-sans); letter-spacing: 0.2em; text-transform: uppercase; }
.vm-psalm figcaption::after { content: ""; display: block; width: 2.25rem; height: 2px; margin: 1rem auto 0; background: var(--vm-gold); }

.vm-book { background: var(--vm-cream); }
.vm-book-inner { display: grid; }
.vm-book-art { display: grid; place-items: center; padding-block: 2.5rem 1rem; }
.vm-book-cover {
    width: min(70%, 17rem);
    aspect-ratio: 0.67;
    /* Show the front panel of the supplied jacket, without altering the source artwork. */
    object-fit: cover;
    object-position: right center;
    box-shadow: 0.5rem 0.75rem 1.5rem rgb(31 41 48 / 16%);
}
.vm-site .vm-book-cover { height: auto; }
.vm-book-copy { padding-block: 2rem 3rem; max-width: 34rem; }
.vm-eyebrow { margin-bottom: 0.75rem !important; color: var(--vm-olive); font: 0.6875rem var(--vm-sans); letter-spacing: 0.22em; text-transform: uppercase; }
.vm-book h2 { font-size: clamp(2rem, 3.7vw, 3.25rem); letter-spacing: -0.035em; }
.vm-book-subtitle { margin-top: 0.5rem !important; font-size: 1.3rem; font-style: italic; line-height: 1.35; }
.vm-book-author { margin-top: 0.75rem !important; color: var(--vm-muted); font-size: 1rem; }
.vm-book-description { margin-top: 1.25rem !important; }
.vm-book-details { margin-top: 1.5rem; }
.vm-book-details summary { width: fit-content; }
.vm-book-details p { margin-top: 1rem; }

.vm-button,
.vm-site button.vm-button {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-height: 44px;
    gap: 0.75rem;
    padding: 0.65rem 1.35rem;
    border: 1px solid var(--vm-olive);
    border-radius: 2px;
    background: var(--vm-olive);
    color: var(--vm-paper);
    font: inherit;
    text-decoration: none;
    cursor: pointer;
}
.vm-button:hover { background: var(--vm-olive-dark); }
.vm-book-details summary { list-style: none; }
.vm-book-details summary::-webkit-details-marker { display: none; }
.vm-book-details summary::after { content: "+"; }
.vm-book-details[open] summary::after { content: "\2212"; }
.vm-text-link { display: inline-flex; align-items: center; min-height: 44px; gap: 0.65rem; text-decoration: none; }
.vm-text-link:hover { text-decoration: underline; }

.vm-resources { padding-block: 2.5rem; }
.vm-resource-grid { display: grid; gap: 2rem; }
.vm-resource { min-width: 0; border-bottom: 1px solid var(--vm-line); padding-bottom: 1.75rem; }
.vm-resource:last-child { border-bottom: 0; padding-bottom: 0; }
.vm-resource::before { content: ""; display: block; width: 2rem; height: 2px; background: var(--vm-gold); margin-bottom: 1.25rem; }
.vm-resource h3 { font-size: 1.75rem; letter-spacing: -0.03em; }
.vm-resource p { margin-top: 0.75rem; }
.vm-resource .vm-text-link { margin-top: 1rem; }
.vm-resource-status { color: var(--vm-muted); font-size: 0.9375rem; font-style: italic; }

.vm-footer { padding-block: 2.5rem 1.25rem; background: var(--vm-olive); color: var(--vm-paper); }
.vm-footer-main { display: grid; gap: 1.75rem; padding-bottom: 1.75rem; }
.vm-footer .vm-brand-name { font-size: 1.3rem; }
.vm-footer .vm-brand-verse { color: inherit; }
.vm-footer-nav ul { display: flex; flex-wrap: wrap; gap: 0 1.25rem; }
.vm-footer a { text-decoration: none; }
.vm-footer a:hover { text-decoration: underline; }
.vm-footer-nav a,
.vm-footer-bottom a { display: inline-flex; align-items: center; min-height: 44px; font-size: 0.9375rem; }
.vm-footer-phrase { font-size: 1.125rem; font-style: italic; }
.vm-footer-bottom { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 0.5rem 2rem; border-top: 1px solid rgb(251 248 242 / 25%); padding-top: 1rem; }
.vm-footer-bottom p,
.vm-footer-bottom a { font-size: 0.8125rem; }
.vm-footer-bottom ul { display: flex; flex-wrap: wrap; gap: 1.25rem; }

/* Shared controls for later integration; no new forms or handlers in this milestone. */
.vm-form { max-width: 40rem; }
.vm-form label { display: block; margin-bottom: 0.375rem; }
.vm-form input,
.vm-form select,
.vm-form textarea { width: 100%; min-height: 44px; margin-bottom: 1.25rem; padding: 0.75rem; border: 1px solid var(--vm-muted); border-radius: 2px; background: var(--vm-paper); color: var(--vm-ink); font: inherit; }
.vm-form textarea { min-height: 10rem; resize: vertical; }

@media (min-width: 40rem) {
    .vm-resource-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 2.5rem; }
    .vm-resource { border-bottom: 0; padding-bottom: 0; }
    .vm-footer-main { grid-template-columns: 1fr 1fr; }
    .vm-footer-phrase { grid-column: 1 / -1; }
    .vm-footer-phrase br { display: none; }
}

@media (min-width: 52rem) {
    .vm-hero { display: grid; }
    .vm-hero::after { content: ""; position: absolute; inset: 0; z-index: 1; background: rgb(14 21 13 / 30%); pointer-events: none; }
    .vm-site .vm-hero-photo { grid-area: 1 / 1; z-index: 0; height: clamp(34rem, 57vw, 48rem); aspect-ratio: auto; }
    .vm-hero-content { grid-area: 1 / 1; z-index: 2; align-self: center; padding-block: 3rem; color: var(--vm-paper); text-shadow: 0 2px 12px rgb(0 0 0 / 30%); }
    .vm-hero h1 { font-size: clamp(3.5rem, 5.5vw, 4.875rem); line-height: 1.02; }
    .vm-hero-statement { max-width: 29rem; font-size: 1.3rem; line-height: 1.5; }
    .vm-book-inner { grid-template-columns: 0.9fr 1.1fr; align-items: center; gap: clamp(3rem, 7vw, 7rem); }
    .vm-book-art { padding-block: 2.75rem; }
    .vm-book-cover { width: min(85%, 20rem); }
    .vm-book-copy { padding-block: 3rem; }
}

@media (min-width: 70rem) {
    .vm-header-inner { flex-wrap: nowrap; gap: 2rem; padding-block: 1.125rem; }
    .vm-nav { flex-basis: auto; }
    .vm-nav ul { display: flex; gap: clamp(1rem, 1.6vw, 1.75rem); padding: 0; }
    .vm-nav a { position: relative; padding-block: 0.875rem; border: 0; white-space: nowrap; font-size: 0.9375rem; }
    .vm-nav a[aria-current="page"] { text-decoration: none; }
    .vm-nav a[aria-current="page"]::after { content: ""; position: absolute; inset: auto 0 0; height: 2px; background: var(--vm-gold); }
    .vm-resources { padding-block: 3rem; }
    .vm-resource-grid { grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 0; }
    .vm-resource { padding-inline: 2rem; border-left: 1px solid var(--vm-line); }
    .vm-resource:first-child { border-left: 0; padding-left: 0; }
    .vm-resource:last-child { padding-right: 0; }
    .vm-resource h3 { font-size: 1.75rem; }
    .vm-resource p { font-size: 1.0625rem; }
    .vm-resource .vm-resource-status { font-size: 0.9375rem; }
    .vm-footer-main { grid-template-columns: auto 1fr auto; align-items: center; gap: 2.5rem; }
    .vm-footer-nav ul { justify-content: center; column-gap: 1.125rem; }
    .vm-footer-nav a { font-size: 0.875rem; }
    .vm-footer-phrase { grid-column: auto; border-left: 1px solid var(--vm-gold); padding-left: 1.75rem; }
    .vm-footer-phrase br { display: block; }
}

@media (prefers-reduced-motion: reduce) {
    .vm-site *, .vm-site *::before, .vm-site *::after { scroll-behavior: auto !important; animation: none !important; transition: none !important; }
}

/* Existing CFML tools, integrated without Bootstrap or changes to their queries. */
.vm-page-intro { padding-block: clamp(2.5rem, 6vw, 5rem); background: var(--vm-cream); border-bottom: 1px solid var(--vm-line); }
.vm-page-intro h1 { font-size: clamp(2.5rem, 5vw, 4rem); letter-spacing: -0.035em; }
.vm-page-intro h1 + p { margin-top: 1rem; max-width: 40rem; }
.vm-page-content { padding-block: clamp(2.5rem, 5vw, 4.5rem); min-height: 45vh; }
.vm-page-content h2 { font-size: clamp(1.75rem, 3vw, 2.25rem); margin-bottom: 1.25rem; }
.vm-intro-copy { max-width: 40rem; margin-bottom: 1.75rem !important; }
.vm-study-layout, .vm-library-layout { display: grid; gap: 3rem; }
.vm-study-layout > *, .vm-library-layout > * { min-width: 0; }
.vm-study-note, .vm-library-topics { border-top: 1px solid var(--vm-line); padding-top: 2rem; }
.vm-study-note p { font-size: 1.0625rem; }
.vm-field-help { margin: 0 0 0.75rem !important; color: var(--vm-muted); font-size: 1rem; }
.vm-search-form { margin-top: 2rem; }
.vm-search-results { overflow-wrap: anywhere; line-height: 1.85; }
.vm-search-results > .vm-text-link { margin-bottom: 1.75rem; }
.vm-search-results font { color: var(--vm-olive); font-size: 1em; }
.vm-search-results h2 { margin-block: 0.5rem 1.5rem; }
.vm-book-list { margin-top: 2rem; }
.vm-book-row { display: grid; grid-template-columns: 4.5rem minmax(0, 1fr); gap: 1.25rem; padding-block: 1.5rem; border-top: 1px solid var(--vm-line); overflow-wrap: anywhere; }
.vm-book-row h3 { font-size: clamp(1.3rem, 2.3vw, 1.75rem); line-height: 1.25; }
.vm-book-row h3 a { text-decoration-thickness: 1px; }
.vm-book-row-subtitle { font-style: italic; margin-top: 0.5rem !important; }
.vm-book-row-author { color: var(--vm-muted); margin-top: 0.5rem !important; }
.vm-book-row-image { display: block; align-self: start; }
.vm-site .vm-book-row-image img { width: 100%; height: 7rem; object-fit: contain; object-position: top center; }
.vm-topic-list { display: flex; flex-wrap: wrap; align-items: start; gap: 0.25rem 1rem; padding: 0; margin: 1.25rem 0 0; list-style: none; }
.vm-topic-list li { max-width: 100%; }
.vm-topic-list a { display: inline-flex; align-items: center; min-height: 44px; overflow-wrap: anywhere; }
.vm-empty-state { padding-block: 1.5rem; border-top: 1px solid var(--vm-line); }
@media (min-width: 52rem) {
    .vm-study-layout, .vm-library-layout { grid-template-columns: minmax(0, 1.65fr) minmax(0, 1fr); gap: clamp(2.5rem, 5vw, 5rem); }
    .vm-study-note, .vm-library-topics { border-top: 0; border-left: 1px solid var(--vm-line); padding-top: 0; padding-left: 2rem; }
    .vm-book-row { grid-template-columns: 6rem minmax(0, 1fr); gap: 1.75rem; }
    .vm-site .vm-book-row-image img { height: 9rem; }
}

/* Supporting pages share the same editorial shell as the homepage. */
.vm-prose { max-width: 52rem; overflow-wrap: anywhere; }
.vm-prose p + p { margin-top: 1.25rem; }
.vm-belief { border-top: 1px solid var(--vm-line); }
.vm-belief:last-child { border-bottom: 1px solid var(--vm-line); }
.vm-belief > summary { cursor: pointer; padding-block: 1.5rem; }
.vm-belief > summary h2 { display: inline; font-size: clamp(1.45rem, 3vw, 2rem); }
.vm-belief-content { padding-bottom: 1.5rem; }
.vm-belief-content ul { padding-left: 1.5rem; }
.vm-belief-content li + li { margin-top: 1rem; }
.vm-contact-info { padding-left: 1.25rem; margin-top: 1.5rem; }
.vm-contact-info li + li { margin-top: 0.5rem; }
.vm-form textarea { min-height: 12rem; resize: vertical; }
.vm-login-panel { max-width: 36rem; }
.vm-login-result { margin: 0 0 2.5rem; border-top: 1px solid var(--vm-line); padding-top: 1.5rem; }
