/* ==========================================================================
   CAPPAGH THEME v5 (ported from the Drumragh redesign: structure and type only)
   Loaded LAST, after site.css and any page stylesheet. Styling only: no content changes.

   Scope: html.theme-v5, which _Layout adds on PUBLIC pages only. Staff portal
   pages (forced dark) do not get the class, so the portal is untouched.

   Type: Plus Jakarta Sans (display + UI), Newsreader (literary serif).
   Palette: Cappagh's own colours. Dark (default): charcoal #171717 page, #1f1f1f cards,
   gold #d4af37. Light: cream #f5f0e6 page, ivory #fffaf0 cards, dark gold #8a6415 / #7d5a0e.
   ========================================================================== */

/* ---------- Tokens ---------- */
html.theme-v5 {
    --v5-sans: "Plus Jakarta Sans", system-ui, -apple-system, "Segoe UI", sans-serif;
    --v5-serif: "Newsreader", Georgia, "Times New Roman", serif;
    --head: var(--v5-serif);
    --body: var(--v5-sans);
    --serif: var(--v5-serif);
    --v5-radius: 8px;
    --v5-radius-lg: 10px;
}
html.theme-v5[data-theme="dark"] {
    /* Cappagh dark: charcoal page, slightly raised cards, gold accents (site.css --bg/--panel/--gold) */
    --v5-bg: #171717;
    --v5-bg-raised: #1f1f1f;
    --v5-card: #1f1f1f;
    --v5-card-lift: 0 10px 28px rgba(0, 0, 0, 0.3);
    --v5-line: rgba(246, 246, 246, 0.14);
    --v5-line-strong: rgba(246, 246, 246, 0.45);
    --v5-text: #f6f6f6;            /* 16:1 on page */
    --v5-muted: #c9c0ae;           /* 9.9:1 on page */
    --v5-accent: #d4af37;          /* Cappagh gold; 8.5:1 on page */
    --v5-accent-strong: #e7c66a;
    --v5-fill: #d4af37;            /* solid gold buttons */
    --v5-on-fill: #1a140e;
    --v5-chip: rgba(212, 175, 55, 0.16);
    --v5-chip-text: #e7c66a;
    --v5-red: #b8902f;             /* Cappagh has no red: rules that used the Drumragh red use a deep gold */
    --v5-red-bright: #d4af37;
    --v5-deep: #0c0a08;            /* full-bleed feature band (Cappagh --navy) */
    --v5-deep-text: #f7f2e8;
    --v5-deep-muted: #c9c0ae;
    --v5-header: rgba(23, 23, 23, 0.97);
    --v5-nav: #fff;
    --v5-footer: #101010;
    --v5-footer-line: rgba(255, 255, 255, 0.10);
    --v5-shadow: 0 20px 50px rgba(0, 0, 0, 0.4);
    --v5-page-panel: #1f1f1f;
    --v5-page-band: #222222;
    --v5-hero-fade: rgba(23, 23, 23, 0.4);
}
html.theme-v5[data-theme="light"] {
    /* Cappagh light: cream page, ivory cards, dark gold (site.css html[data-theme="light"]) */
    --v5-bg: #f5f0e6;
    --v5-bg-raised: #f8efdf;
    --v5-card: #fffaf0;
    --v5-card-lift: none;
    --v5-line: rgba(139, 101, 24, 0.28);
    --v5-line-strong: rgba(139, 101, 24, 0.48);
    --v5-text: #1f1b16;            /* 15:1 on page */
    --v5-muted: #685d4e;           /* 5.7:1 on page */
    --v5-accent: #8a6415;          /* 4.7:1 on page */
    --v5-accent-strong: #7d5a0e;
    --v5-fill: #7d5a0e;            /* dark gold buttons; ivory text 6:1 */
    --v5-on-fill: #fffaf0;
    --v5-chip: rgba(139, 101, 24, 0.12);
    --v5-chip-text: #7d5a0e;
    --v5-red: #9f7617;
    --v5-red-bright: #b8902f;
    --v5-deep: #1f1b16;
    --v5-deep-text: #f7f2e8;
    --v5-deep-muted: #d8cfbd;
    --v5-header: rgba(250, 246, 238, 0.98);
    --v5-nav: #1f1b16;
    --v5-footer: #1f1b16;
    --v5-footer-line: rgba(255, 255, 255, 0.12);
    --v5-shadow: 0 18px 40px rgba(60, 45, 20, 0.12);
    --v5-page-panel: #fffaf0;
    --v5-page-band: #ebe2d2;
    --v5-hero-fade: rgba(245, 240, 230, 0.18);
}
/* Point the older palettes (site.css, theme-sacred-heart-*.css, about.css, sacraments.css)
   at the v5 page colours so every public page shares one background. Public pages only. */
html.theme-v5 {
    --sh-base: var(--v5-bg);
    --shl-bg: var(--v5-bg);
    --bg: var(--v5-bg);
    --home-bg: var(--v5-bg);
    background-color: var(--v5-bg) !important;
}
html.theme-v5[data-theme="light"] {
    --shl-bg-deep: var(--v5-page-band);
    --shl-panel: var(--v5-card);
    --shl-text: var(--v5-text);
    --shl-muted: var(--v5-muted);
    --bg-deep: var(--v5-page-band);
    --panel: var(--v5-card);
    --panel-2: var(--v5-bg-raised);
    --panel-3: var(--v5-page-band);
    --text: var(--v5-text);
    --muted: var(--v5-muted);
    --home-bg-2: var(--v5-bg-raised);
    --home-surface: var(--v5-card);
    --home-surface-raised: var(--v5-bg-raised);
    --home-panel: var(--v5-card);
    --home-text: var(--v5-text);
    --home-text-muted: var(--v5-muted);
    --home-muted: var(--v5-muted);
}
html.theme-v5 body.about-page {
    --about-primary-bg: var(--v5-bg);
    --about-secondary-bg: var(--v5-page-panel);
    background: var(--v5-bg);
}
html.theme-v5 body.sacrament-page {
    --sacrament-primary-bg: var(--v5-bg);
    --sacrament-secondary-bg: var(--v5-page-panel);
    background-color: var(--v5-bg);
}
html.theme-v5[data-theme="light"] body.about-page {
    --about-tertiary-bg: var(--v5-page-band);
    --about-text-main: var(--v5-text);
    --about-text-muted: var(--v5-muted);
    --about-accent-gold: var(--v5-accent);
}
html.theme-v5[data-theme="light"] body.sacrament-page {
    --sacrament-tertiary-bg: var(--v5-page-band);
    --sacrament-text-main: var(--v5-text);
    --sacrament-text-muted: var(--v5-muted);
    --sacrament-accent-gold: var(--v5-accent);
}

/* Page fonts used by about.css / sacraments.css (Montserrat/Lora were never loaded). */
html.theme-v5 body.about-page,
html.theme-v5 body.sacrament-page {
    --about-font-display: var(--v5-sans);
    --about-font-body: var(--v5-sans);
    --sacrament-font-display: var(--v5-sans);
    --sacrament-font-body: var(--v5-sans);
}

/* ---------- Base ---------- */
html.theme-v5 body {
    font-family: var(--v5-sans) !important;
    background-color: var(--v5-bg) !important;
    color: var(--v5-text);
    -webkit-font-smoothing: antialiased;
}
html.theme-v5 body .site-main,
html.theme-v5 body .parish-home { background-color: var(--v5-bg) !important; }
html.theme-v5 :focus-visible { outline: 3px solid var(--v5-accent) !important; outline-offset: 3px !important; }

/* ---------- Header / navigation ---------- */
html.theme-v5 body .site-header .brand-logo { height: 60px !important; width: auto !important; }
html.theme-v5 body .main-nav { gap: 2px !important; }
html.theme-v5 body .site-header .main-nav > a,
html.theme-v5 body .site-header .main-nav .nav-dropdown-button {
    font: 400 18px/1 var(--v5-serif) !important;
    letter-spacing: 0 !important;
    text-transform: none !important;
    color: var(--v5-nav) !important;
    background: none !important;
    border: 0 !important;
    box-shadow: none !important;
    padding: 10px 12px !important;
}
html.theme-v5 body .site-header .main-nav > a.active,
html.theme-v5 body .main-nav .nav-dropdown.active > .nav-dropdown-button {
    text-decoration: underline !important;
    text-decoration-color: var(--v5-accent) !important;
    text-decoration-thickness: 2px !important;
    text-underline-offset: 8px !important;
}
html.theme-v5 body .site-header .main-nav > a:hover,
html.theme-v5 body .site-header .main-nav .nav-dropdown-button:hover { color: var(--v5-accent) !important; }
html.theme-v5 body .main-nav .nav-dropdown-button i { font-size: 9px !important; margin-left: 5px; opacity: .8; }
html.theme-v5 body .main-nav .nav-dropdown-menu {
    background: var(--v5-bg-raised) !important;
    border: 1px solid var(--v5-line) !important;
    border-radius: var(--v5-radius) !important;
    box-shadow: var(--v5-shadow) !important;
}
html.theme-v5 body .main-nav .nav-dropdown-menu a {
    font: 500 14.5px/1.3 var(--v5-sans) !important;
    letter-spacing: 0 !important;
    text-transform: none !important;
    color: var(--v5-text) !important;
}
html.theme-v5 body .main-nav .nav-dropdown-menu a:hover,
html.theme-v5 body .main-nav .nav-dropdown-menu a.active { color: var(--v5-accent) !important; background: var(--v5-chip) !important; }
html.theme-v5 body .theme-toggle {
    font: 700 11px/1 var(--v5-sans) !important;
    letter-spacing: .1em !important;
    text-transform: uppercase !important;
    background: transparent !important;
    color: var(--v5-nav) !important;
    border: 1px solid currentColor !important;
    border-radius: 3px !important;
    padding: 9px 13px !important;
    margin-left: 12px !important;
    box-shadow: none !important;
    min-height: 36px;
}
/* Inner pages: solid header (content no longer shows through when scrolling). */
html.theme-v5 body:not(.home-page) .site-header {
    background: var(--v5-header) !important;
    border-bottom: 1px solid var(--v5-line) !important;
    box-shadow: none !important;
}
html.theme-v5[data-theme="light"] body .site-header,
html.theme-v5[data-theme="light"] body .site-header--home {
    background: var(--v5-header) !important;
    border-bottom: 1px solid var(--v5-line) !important;
    box-shadow: none !important;
}

/* ---------- Homepage dashboard ---------- */
html.theme-v5 body.home-page .home-stage { gap: 150px !important; padding-top: 30px; }
html.theme-v5 body.home-page .home-dashboard { gap: 36px !important; grid-template-columns: minmax(0, 1fr) 330px !important; align-items: start !important; }
html.theme-v5 body.home-page .home-schedule-panel::before, html.theme-v5 body.home-page .home-schedule-panel::after,
html.theme-v5 body.home-page .home-stream-panel::before, html.theme-v5 body.home-page .home-stream-panel::after,
html.theme-v5 body.home-page .home-alerts-signup::before,
html.theme-v5 body.home-page .home-alerts-signup__inner::before, html.theme-v5 body.home-page .home-alerts-signup__inner::after { content: none !important; }
html.theme-v5 body.home-page .home-schedule-panel {
    background: none !important; border: 0 !important; border-radius: 0 !important; padding: 0 !important; box-shadow: none !important;
    scroll-margin-top: 110px;
}
html.theme-v5 body.home-page .home-panel-head { display: flex !important; justify-content: space-between; align-items: flex-end; border: 0 !important; padding: 0 !important; margin: 0 0 20px !important; background: none !important; }
html.theme-v5 body.home-page .home-panel-head > div { display: flex; flex-direction: column-reverse; }
html.theme-v5 body.home-page .home-panel-kicker {
    font: italic 400 16px/1.3 var(--v5-serif) !important; letter-spacing: 0 !important; text-transform: none !important;
    color: var(--v5-muted) !important; margin: 6px 0 0 !important;
}
html.theme-v5 body.home-page .home-panel-head h2 {
    font: 800 40px/1.05 var(--v5-sans) !important; letter-spacing: -.02em !important; text-transform: none !important;
    color: var(--v5-text) !important; margin: 0 !important;
}
html.theme-v5 body.home-page .home-panel-mark { display: none !important; }

html.theme-v5 body.home-page .home-schedule-panel .tabs.home-tabs { display: flex !important; flex-wrap: wrap; background: none !important; border: 0 !important; border-radius: 0 !important; padding: 0 !important; gap: 10px !important; margin: 0 0 26px !important; justify-content: flex-start !important; }
html.theme-v5 body.home-page .home-schedule-panel .home-tabs .tab-button {
    font: 700 11px/1 var(--v5-sans) !important; letter-spacing: .1em !important; text-transform: uppercase !important;
    color: var(--v5-muted) !important; background: transparent !important; border: 1px solid var(--v5-line) !important;
    border-radius: 999px !important; box-shadow: none !important; padding: 0 18px !important; min-height: 38px !important; height: auto !important;
    flex: 0 0 auto !important; width: auto !important;
}
html.theme-v5 body.home-page .home-schedule-panel .home-tabs .tab-button:hover { color: var(--v5-text) !important; border-color: var(--v5-line-strong) !important; background: transparent !important; }
html.theme-v5 body.home-page .home-schedule-panel .home-tabs .tab-button.active { color: var(--v5-text) !important; border-color: var(--v5-line-strong) !important; background: var(--v5-chip) !important; }
html.theme-v5 body.home-page .home-schedule-panel .home-tabs .tab-button.active::before { content: "\f00c"; font: 900 10px/1 "Font Awesome 6 Free"; margin-right: 7px; color: var(--v5-accent); }

html.theme-v5 body.home-page .home-tab-content.active { display: grid !important; grid-template-columns: repeat(2, minmax(0, 1fr)) !important; gap: 16px !important; }
html.theme-v5 body.home-page .home-schedule-panel .home-tab-content .mass-card {
    display: grid !important; grid-template-columns: minmax(0, 1fr) !important; align-content: start;
    background: var(--v5-card) !important; border: 1px solid var(--v5-line) !important; border-radius: var(--v5-radius) !important;
    box-shadow: var(--v5-card-lift) !important; padding: 20px 20px 18px !important; min-height: 0 !important; position: relative;
}
html.theme-v5 body.home-page .mass-card .mass-info { display: contents; padding: 0 !important; }
html.theme-v5 body.home-page .home-schedule-panel .home-tab-content .mass-card .time-block {
    border-right: 0 !important; justify-self: start;
    grid-row: 1; display: flex !important; align-items: center; gap: 4px; background: none !important; border: 0 !important;
    padding: 0 !important; width: auto !important; min-width: 0 !important; min-height: 0 !important; box-shadow: none !important; margin: 0 0 12px !important;
}
html.theme-v5 body.home-page .mass-card .time-block::before { content: "\f017"; font: 400 13px/1 "Font Awesome 6 Free"; color: var(--v5-accent); margin-right: 5px; }
html.theme-v5 body.home-page .mass-card .mass-time,
html.theme-v5 body.home-page .mass-card .ampm { font: 700 13.5px/1 var(--v5-sans) !important; color: var(--v5-accent) !important; letter-spacing: 0 !important; margin: 0 !important; }
html.theme-v5 body.home-page .mass-card .day-row { position: absolute; top: 18px; right: 18px; margin: 0 !important; gap: 4px !important; }
html.theme-v5 body.home-page .mass-card .day-badge {
    font: 800 10px/1 var(--v5-sans) !important; letter-spacing: .08em !important; text-transform: uppercase !important;
    background: var(--v5-chip) !important; color: var(--v5-chip-text) !important; border: 0 !important; border-radius: 999px !important; padding: 5px 8px !important;
}
html.theme-v5 body.home-page .mass-card h3 { font: 800 20px/1.2 var(--v5-sans) !important; letter-spacing: -.01em !important; color: var(--v5-text) !important; margin: 0 0 8px !important; text-transform: none !important; padding-right: 0; }
html.theme-v5 body.home-page .mass-card p { font: 500 13.5px/1.4 var(--v5-sans) !important; color: var(--v5-muted) !important; margin: 0 !important; }
html.theme-v5 body.home-page .mass-card p::before { content: "\f3c5"; font: 900 11px/1 "Font Awesome 6 Free"; margin-right: 8px; color: var(--v5-muted); }
html.theme-v5 body.home-page .mass-card small { display: block; font: italic 400 14px/1.4 var(--v5-serif) !important; color: var(--v5-muted) !important; margin-top: 6px; }
html.theme-v5 body.home-page .mass-card .home-card-plus { display: none !important; }
/* Daily card with six day badges: let the badges sit under the time instead of over the title. */
html.theme-v5 body.home-page .mass-card .day-row:has(.day-badge:nth-child(3)) { position: static; grid-row: 2; display: flex; flex-wrap: wrap; margin: 0 0 12px !important; }
html.theme-v5 body.home-page .home-schedule-panel .empty-card {
    grid-column: 1 / -1; background: var(--v5-card) !important; border: 1px solid var(--v5-line) !important; border-radius: var(--v5-radius) !important;
    color: var(--v5-muted) !important; font: italic 400 17px/1.5 var(--v5-serif) !important; padding: 20px !important;
}

/* Live stream panel: v5 card surface and headings. Cappagh's two streams keep their own
   poster photos, church labels and mobile selector from site.css. */
html.theme-v5 body.home-page .home-stream-panel {
    margin-top: 0 !important; background: var(--v5-card) !important; border: 1px solid var(--v5-line) !important; border-radius: var(--v5-radius-lg) !important;
    padding: 22px !important; box-shadow: var(--v5-card-lift) !important;
}
html.theme-v5 body.home-page .home-stream-panel .home-panel-head h2 { font-size: 30px !important; }
html.theme-v5 body.home-page .home-stream-panel .home-panel-kicker { font-size: 15px !important; }
html.theme-v5 body.home-page .home-stream-panel .stream-card > p { font: 700 14px/1.35 var(--v5-sans) !important; color: var(--v5-text) !important; letter-spacing: 0 !important; text-transform: none !important; }
html.theme-v5 body.home-page .home-stream-panel .churchservices-embed { border-radius: var(--v5-radius) !important; }

/* Alerts: full-bleed deep band, photo left */
html.theme-v5 body.home-page .home-alerts-signup {
    position: relative; border: 0 !important; border-radius: 0 !important; background: var(--v5-deep) !important; padding: 0 !important;
    box-shadow: 0 0 0 100vmax var(--v5-deep) !important; clip-path: inset(-80px -100vmax);
    display: grid !important; grid-template-columns: 1fr 1fr; gap: 56px; align-items: center;
}
html.theme-v5 body.home-page .home-alerts-signup::after {
    content: "" !important; display: block !important; position: static !important; order: -1; height: 340px; border-radius: var(--v5-radius);
    background: url('/img/KillyClogher.webp') center 45% / cover no-repeat !important;
}
html.theme-v5 body.home-page .home-alerts-signup__inner { display: block !important; padding: 0 !important; background: none !important; border: 0 !important; box-shadow: none !important; }
html.theme-v5 body.home-page .home-alerts-signup__kicker {
    font: 700 11px/1 var(--v5-sans) !important; letter-spacing: .12em !important; text-transform: uppercase !important; color: var(--v5-deep-muted) !important;
    margin: 0 0 14px !important; padding-bottom: 14px; border-bottom: 1px solid rgba(212, 175, 55, .6); display: inline-block; width: 160px;
}
html.theme-v5 body.home-page .home-alerts-signup h2 { font: 400 40px/1.15 var(--v5-serif) !important; color: var(--v5-deep-text) !important; text-transform: none !important; letter-spacing: 0 !important; margin: 0 0 14px !important; }
html.theme-v5 body.home-page .home-alerts-signup p:not(.home-alerts-signup__kicker) { font: 400 18px/1.6 var(--v5-serif) !important; color: var(--v5-deep-muted) !important; margin: 0 !important; }
html.theme-v5 body.home-page .home-alerts-signup__actions { display: flex !important; gap: 12px !important; margin-top: 26px !important; justify-content: flex-start !important; }

/* ---------- Buttons (site-wide) ---------- */
html.theme-v5 body .btn-gold,
html.theme-v5 body .btn-outline {
    font: 700 11.5px/1 var(--v5-sans) !important; letter-spacing: .08em !important; text-transform: uppercase !important;
    border-radius: 3px !important; padding: 0 18px !important; min-height: 42px !important; display: inline-flex !important; align-items: center; justify-content: center;
    box-shadow: none !important;
}
html.theme-v5 body .btn-gold { background: var(--v5-fill) !important; color: var(--v5-on-fill) !important; border: 1px solid var(--v5-fill) !important; }
html.theme-v5 body .btn-outline { background: transparent !important; color: var(--v5-text) !important; border: 1px solid var(--v5-line-strong) !important; }
html.theme-v5 body.home-page .home-alerts-signup .btn-gold { background: #d4af37 !important; border-color: #d4af37 !important; color: #1a140e !important; }
html.theme-v5 body.home-page .home-alerts-signup .btn-outline { color: var(--v5-deep-text) !important; border-color: rgba(255, 247, 236, .55) !important; }

/* ---------- Homepage sections ---------- */
html.theme-v5 body.home-page .parish-home { padding-bottom: 80px !important; }
html.theme-v5 body.home-page .home-bulletins,
html.theme-v5 body.home-page .articles-section { padding-top: 90px !important; }
html.theme-v5 body .section-header { display: block !important; text-align: left !important; border: 0 !important; margin: 0 0 36px !important; padding: 0 !important; }
html.theme-v5 body .section-header::before,
html.theme-v5 body .section-header::after { content: none !important; display: none !important; }
html.theme-v5 body .section-header h2 { font: 400 40px/1.1 var(--v5-serif) !important; text-transform: none !important; letter-spacing: 0 !important; color: var(--v5-text) !important; margin: 0 !important; }

html.theme-v5 body.home-page .home-bulletin-carousel { gap: 18px !important; }
html.theme-v5 body.home-page .home-bulletin-card {
    display: grid !important; align-content: start; gap: 6px; padding: 20px !important; min-height: 0 !important; height: auto !important;
    background: var(--v5-card) !important; border: 1px solid var(--v5-line) !important; border-radius: var(--v5-radius) !important; box-shadow: var(--v5-card-lift) !important;
    transition: border-color .2s ease, transform .2s ease;
}
html.theme-v5 body.home-page .home-bulletin-card:hover { border-color: var(--v5-line-strong) !important; transform: translateY(-2px); }
html.theme-v5 body.home-page .home-bulletin-icon {
    display: inline-grid !important; place-items: center; width: 40px !important; height: 40px !important; margin: 0 0 10px !important;
    border-radius: 50% !important; background: var(--v5-chip) !important; border: 0 !important; color: var(--v5-accent) !important; font-size: 17px !important;
}
html.theme-v5 body.home-page .home-bulletin-title { font: 800 19px/1.25 var(--v5-sans) !important; letter-spacing: -.01em !important; text-transform: none !important; color: var(--v5-text) !important; margin: 0 !important; }
html.theme-v5 body.home-page .home-bulletin-date { font: 500 13px/1.4 var(--v5-sans) !important; color: var(--v5-muted) !important; margin: 0 !important; text-transform: none !important; letter-spacing: 0 !important; }
html.theme-v5 body .empty-card,
html.theme-v5 body.home-page .articles-section .empty-card {
    background: var(--v5-card) !important; border: 1px solid var(--v5-line) !important; border-radius: var(--v5-radius) !important; box-shadow: none !important;
    text-align: center !important; padding: 26px !important; font: italic 400 18px/1.5 var(--v5-serif) !important; color: var(--v5-muted) !important;
}
html.theme-v5 body .article-card { border-radius: var(--v5-radius) !important; border: 1px solid var(--v5-line) !important; background: var(--v5-card) !important; }
html.theme-v5 body .article-card h3 { font-family: var(--v5-sans) !important; font-weight: 800 !important; color: var(--v5-text) !important; }

/* ---------- Footer ---------- */
html.theme-v5 body .site-footer,
html.theme-v5 body .parish-footer { background: var(--v5-footer) !important; border: 0 !important; border-top: 4px solid var(--v5-red) !important; }
html.theme-v5 body.home-page .site-footer { margin-top: 100px !important; }
html.theme-v5 body .parish-footer__inner { grid-template-columns: 1.2fr 1fr 1fr !important; padding: 64px 24px 48px !important; }
html.theme-v5 body .parish-footer__brand .brand-logo { height: 58px !important; width: auto !important; }
html.theme-v5 body .parish-footer__brand p { font: 400 18px/1.5 var(--v5-serif) !important; color: #c9c0ae !important; margin-top: 16px !important; }
html.theme-v5 body .parish-footer h2 { font: 800 12px/1 var(--v5-sans) !important; letter-spacing: .1em !important; text-transform: uppercase !important; color: #f7f2e8 !important; margin: 4px 0 20px !important; }
html.theme-v5 body .parish-footer__links { display: grid !important; grid-template-columns: 1fr 1fr; column-gap: 20px; align-content: start; }
html.theme-v5 body .parish-footer__links h2 { grid-column: 1 / -1; }
html.theme-v5 body .parish-footer__links a { font: 500 14px/2.05 var(--v5-sans) !important; color: #c9c0ae !important; text-decoration: none !important; }
html.theme-v5 body .parish-footer__links a:hover { color: #e7c66a !important; }
html.theme-v5 body .parish-footer__contact p,
html.theme-v5 body .parish-footer__contact a { font: 500 14px/1.75 var(--v5-sans) !important; color: #c9c0ae !important; }
html.theme-v5 body .parish-footer__contact strong { color: #f7f2e8 !important; font-weight: 800; }
html.theme-v5 body .parish-footer__contact a[href^="tel"] { color: #e7c66a !important; font-weight: 800 !important; font-size: 18px !important; }
html.theme-v5 body .parish-footer__bottom { font: 500 12px/1 var(--v5-sans) !important; color: #c9c0ae !important; border-top: 1px solid var(--v5-footer-line) !important; background: none !important; padding: 22px 0 !important; }
html.theme-v5[data-theme="light"] body .parish-footer .brand-logo--light { display: none !important; }
html.theme-v5[data-theme="light"] body .parish-footer .brand-logo--dark { display: block !important; }

/* ==========================================================================
   Inner pages
   ========================================================================== */
/* Page titles (About, Sacraments, Prayer, Live Streams, Bulletins, Articles) */
html.theme-v5 body .about-hero h1, html.theme-v5 body .sacrament-hero h1, html.theme-v5 body .prayer-hero h1, html.theme-v5 body .livestream-hero h1,
html.theme-v5 body .bulletin-header h1, html.theme-v5 body .articles-hero h1, html.theme-v5 body .page-hero h1, html.theme-v5 body .readings-wrap h1, html.theme-v5 body main h1.page-title {
    font-family: var(--v5-sans) !important; font-weight: 800 !important; text-transform: none !important; letter-spacing: -.025em !important; line-height: 1.04 !important;
}
html.theme-v5[data-theme="dark"] body .about-hero h1, html.theme-v5[data-theme="dark"] body .sacrament-hero h1, html.theme-v5[data-theme="dark"] body .prayer-hero h1, html.theme-v5[data-theme="dark"] body .livestream-hero h1 { color: #fff !important; text-shadow: 0 2px 28px rgba(0, 0, 0, .45) !important; }
html.theme-v5 body .about-hero h1, html.theme-v5 body .sacrament-hero h1 { font-size: clamp(40px, 5.4vw, 64px) !important; }
html.theme-v5 body .bulletin-header h1 { color: var(--v5-text) !important; font-size: clamp(36px, 4.6vw, 56px) !important; }
html.theme-v5 body .about-subtitle { font: 400 19px/1.45 var(--v5-serif) !important; text-transform: none !important; letter-spacing: 0 !important; }
html.theme-v5[data-theme="dark"] body .about-subtitle { color: #fff !important; text-shadow: 0 1px 12px rgba(0, 0, 0, .6) !important; }
html.theme-v5 body .about-tag, html.theme-v5 body .section-kicker, html.theme-v5 body .prayer-hero__eyebrow, html.theme-v5 body .bulletin-kicker, html.theme-v5 body .live-stream-label {
    font: 800 10.5px/1 var(--v5-sans) !important; letter-spacing: .1em !important; text-transform: uppercase !important;
    background: #d4af37 !important; color: #1a140e !important; border: 0 !important; border-radius: 999px !important; padding: 7px 11px !important; display: inline-block; box-shadow: none !important;
}

/* Section headings and body copy in content pages */
html.theme-v5 body.about-page h2, html.theme-v5 body.sacrament-page h2, html.theme-v5 body .prayer-page h2, html.theme-v5 body .live-stream-page h2 {
    font-family: var(--v5-sans) !important; font-weight: 800 !important; text-transform: none !important; letter-spacing: -.015em !important; color: var(--v5-text) !important;
}
html.theme-v5 body.about-page h3, html.theme-v5 body.sacrament-page h3 { font-family: var(--v5-sans) !important; text-transform: none !important; letter-spacing: -.005em !important; }
html.theme-v5 body.about-page p, html.theme-v5 body.about-page li, html.theme-v5 body.sacrament-page p, html.theme-v5 body.sacrament-page li, html.theme-v5 body .sacrament-text {
    font-family: var(--v5-sans) !important; color: var(--v5-muted);
}
html.theme-v5 body.about-page strong, html.theme-v5 body.sacrament-page strong { color: var(--v5-text); }
html.theme-v5 body.about-page .site-main a:not([class]), html.theme-v5 body.sacrament-page .site-main a:not([class]) { color: var(--v5-accent) !important; text-underline-offset: 3px; }

/* Quotes: literary serif italic, sentence case (no all-caps) */
html.theme-v5 body .sacrament-quote, html.theme-v5 body .about-quote-section blockquote, html.theme-v5 body .about-highlight {
    border-radius: var(--v5-radius) !important;
}
html.theme-v5 body .sacrament-quote p, html.theme-v5 body .about-quote-section p, html.theme-v5 body .about-highlight p {
    font: italic 400 24px/1.45 var(--v5-serif) !important; text-transform: none !important; letter-spacing: 0 !important; color: var(--v5-text) !important;
}
html.theme-v5 body .sacrament-quote cite { font: 700 11px/1 var(--v5-sans) !important; letter-spacing: .1em !important; text-transform: uppercase !important; font-style: normal !important; color: var(--v5-accent) !important; }

/* Cards on content pages */
html.theme-v5 body .sacrament-card, html.theme-v5 body .contact-card, html.theme-v5 body .about-church-card, html.theme-v5 body .prayer-card, html.theme-v5 body .live-stream-main-card, html.theme-v5 body .live-stream-switcher, html.theme-v5 body .recording-player-panel, html.theme-v5 body .bulletin-card {
    border-radius: var(--v5-radius-lg) !important;
}
html.theme-v5 body .sacrament-card__title { font-family: var(--v5-sans) !important; font-weight: 800 !important; text-transform: none !important; letter-spacing: -.01em !important; }
html.theme-v5 body .sacrament-card__button {
    font: 700 11px/1 var(--v5-sans) !important; letter-spacing: .08em !important; text-transform: uppercase !important;
    background: #d4af37 !important; color: #1a140e !important; border: 0 !important; border-radius: 3px !important; padding: 12px 16px !important; box-shadow: none !important;
}
html.theme-v5 body .sacrament-practical h2, html.theme-v5 body .contact-card h2 { font-size: 20px !important; }
html.theme-v5 body .contact-label { font: 800 11px/1 var(--v5-sans) !important; letter-spacing: .1em !important; text-transform: uppercase !important; color: var(--v5-accent) !important; }


/* Readable body copy on content pages (sans at 1.25rem with tracking read too large) */
html.theme-v5 body.sacrament-page .sacrament-text, html.theme-v5 body.sacrament-page .sacrament-text p, html.theme-v5 body.sacrament-page .sacrament-content-section p,
html.theme-v5 body.about-page .about-content-section p, html.theme-v5 body.about-page .about-split-content p, html.theme-v5 body.about-page .about-intro p {
    font-size: 1.075rem !important; line-height: 1.75 !important; letter-spacing: 0 !important;
}
html.theme-v5 body .sacrament-booklet-cta__button {
    font: 700 11px/1 var(--v5-sans) !important; letter-spacing: .08em !important; text-transform: uppercase !important;
    background: #d4af37 !important; color: #1a140e !important; border: 0 !important; border-radius: 3px !important; padding: 12px 16px !important;
}
html.theme-v5 body .sacrament-booklet-cta__title { font-family: var(--v5-sans) !important; font-weight: 800 !important; text-transform: none !important; letter-spacing: -.01em !important; }

/* Bulletins page */
html.theme-v5 body .bulletin-card {
    background: var(--v5-card) !important; border: 1px solid var(--v5-line) !important; box-shadow: none !important;
}
html.theme-v5 body .bulletin-card:hover { border-color: var(--v5-line-strong) !important; }
html.theme-v5 body .bulletin-mark {
    font: 800 10px/1 var(--v5-sans) !important; letter-spacing: .08em !important; background: var(--v5-chip) !important; color: var(--v5-chip-text) !important;
    border: 0 !important; border-radius: 999px !important;
}
html.theme-v5 body .bulletin-card-copy strong { font: 800 17px/1.25 var(--v5-sans) !important; color: var(--v5-text) !important; text-transform: none !important; }
html.theme-v5 body .bulletin-card-copy span { font: 500 13px/1.4 var(--v5-sans) !important; color: var(--v5-muted) !important; }
html.theme-v5 body .bulletin-page-link, html.theme-v5 body .bulletin-page-current, html.theme-v5 body .bulletin-page-disabled { border-radius: 999px !important; font-family: var(--v5-sans) !important; }
html.theme-v5 body .bulletin-page-current { background: var(--v5-fill) !important; color: var(--v5-on-fill) !important; border-color: var(--v5-fill) !important; }
html.theme-v5 body .bulletin-page-disabled { color: var(--v5-muted) !important; opacity: 1 !important; }
html.theme-v5 body .bulletin-result-count { color: var(--v5-muted) !important; }

/* Live streams page tabs: see "Live stream controls" at the end of this file. */

/* Readings */
html.theme-v5 body .readings-wrap .fr-day-title, html.theme-v5 body .readings-wrap h2 { font-family: var(--v5-sans) !important; font-weight: 800 !important; text-transform: none !important; letter-spacing: -.015em !important; }

/* Inner-page surfaces: hero fades into the page colour; content cards and quote band follow the palette. */
html.theme-v5 body.about-page .about-hero::after { background: linear-gradient(to bottom, var(--v5-hero-fade), var(--v5-bg)) !important; }
html.theme-v5 body.sacrament-page .sacrament-hero::after { background: linear-gradient(to bottom, rgba(20, 10, 10, .3), var(--v5-bg)) !important; }
html.theme-v5[data-theme="light"] body .sacrament-card,
html.theme-v5[data-theme="light"] body .about-church-card,
html.theme-v5[data-theme="light"] body .contact-card,
html.theme-v5[data-theme="light"] body .safeguarding-notice-card,
html.theme-v5[data-theme="light"] body .safeguarding-region-card,
html.theme-v5[data-theme="light"] body .sacrament-quote,
html.theme-v5[data-theme="light"] body .sacrament-booklet-cta {
    background: var(--v5-page-panel) !important; border-color: var(--v5-line) !important; box-shadow: var(--v5-shadow) !important;
}
html.theme-v5[data-theme="light"] body .about-quote-section,
html.theme-v5[data-theme="light"] body .safeguarding-primary-contact { background: var(--v5-page-band) !important; border-color: var(--v5-line-strong) !important; }
/* site.css paints the light homepage body and the readings pages #f5f0e6 (!important); follow the light page instead. */
html.theme-v5[data-theme="light"] body.home-page,
html.theme-v5[data-theme="light"] body.home-page .site-main,
html.theme-v5[data-theme="light"] body.home-page .site-main--home,
html.theme-v5[data-theme="light"] body.home-page .parish-home { background: var(--v5-bg) !important; }
html.theme-v5[data-theme="light"] body .readings-page { background: var(--v5-bg) !important; color: var(--v5-text) !important; }
html.theme-v5[data-theme="light"] body .readings-sidebar { background: var(--v5-card) !important; color: var(--v5-text) !important; }
/* Light-mode ivory (#fffaf0) panels from site.css: use the light card colour. */
html.theme-v5[data-theme="light"] body.home-page .home-schedule-panel .home-tab-content .empty-card,
html.theme-v5[data-theme="light"] body .readings-container,
html.theme-v5[data-theme="light"] body .readings-meta-header,
html.theme-v5[data-theme="light"] body .readings-page-nav,
html.theme-v5[data-theme="light"] body .live-stream-player-shell,
html.theme-v5[data-theme="light"] body .live-embed { background: var(--v5-card) !important; }
/* Live Streams page (inline light styles in LiveStreams/Index.cshtml use ivory gradients). */
html.theme-v5[data-theme="light"] body .live-stream-main-card,
html.theme-v5[data-theme="light"] body .live-stream-switcher {
    --live-stream-frame-bg: var(--v5-card);
    background: var(--v5-card) !important; border-color: var(--v5-line) !important; box-shadow: var(--v5-shadow) !important;
}
html.theme-v5[data-theme="dark"] body .live-stream-main-card,
html.theme-v5[data-theme="dark"] body .live-stream-switcher {
    --live-stream-frame-bg: var(--v5-card);
    background: var(--v5-card) !important; border-color: var(--v5-line) !important; box-shadow: var(--v5-card-lift) !important;
}
html.theme-v5[data-theme="light"] body .livestream-hero::before {
    background: linear-gradient(90deg, rgba(20, 15, 10, .76), rgba(20, 15, 10, .36) 48%, rgba(20, 15, 10, .54)),
                linear-gradient(0deg, var(--v5-bg), rgba(245, 240, 230, .04) 56%, rgba(20, 15, 10, .46)) !important;
}
html.theme-v5[data-theme="light"] body.about-page .about-hero--parish .about-hero__content { background: rgba(245, 240, 230, .38) !important; }

/* Prayer page (inline styles in Prayer/Index.cshtml paint their own near-black / ivory page). */
html.theme-v5 body .prayer-page { background: radial-gradient(circle at top left, rgba(217, 184, 79, .10), transparent 34rem), var(--v5-bg) !important; }
html.theme-v5 body .prayer-hero::after { background: linear-gradient(180deg, transparent, var(--v5-bg)) !important; }
html.theme-v5 body .prayer-card:not(.prayer-card--featured),
html.theme-v5 body .prayer-closing__panel { background: var(--v5-card) !important; }
html.theme-v5[data-theme="dark"] body .prayer-card:not(.prayer-card--featured),
html.theme-v5[data-theme="dark"] body .prayer-closing__panel { box-shadow: var(--v5-card-lift) !important; }

/* ---------- Mobile ---------- */
@media (max-width: 1000px) {
    html.theme-v5 body .site-header { background: var(--v5-header) !important; }
    html.theme-v5 body .site-header .brand-logo { height: 46px !important; }
    html.theme-v5 body .mobile-nav-toggle { width: 44px !important; height: 44px !important; border: 1px solid currentColor !important; border-radius: 3px !important; background: none !important; color: var(--v5-nav) !important; }
    html.theme-v5 body.home-page .site-header .mobile-nav-toggle { color: var(--v5-text) !important; }
    html.theme-v5 body .main-nav[data-main-nav].is-open > a,
    html.theme-v5 body .main-nav[data-main-nav].is-open .nav-dropdown-button { font-size: 18px !important; color: var(--v5-text) !important; min-height: 48px !important; }
    html.theme-v5 body .main-nav[data-main-nav].is-open { background: var(--v5-bg) !important; }
    html.theme-v5 body .main-nav[data-main-nav].is-open .theme-toggle { min-height: 44px !important; height: 44px !important; color: var(--v5-text) !important; }


    html.theme-v5 body.home-page .home-stage { gap: 100px !important; padding-top: 10px; }
    html.theme-v5 body.home-page .home-dashboard { grid-template-columns: minmax(0, 1fr) !important; gap: 48px !important; }
    html.theme-v5 body.home-page .home-panel-head h2 { font-size: 32px !important; }
    html.theme-v5 body.home-page .home-schedule-panel .home-tabs .tab-button { padding: 0 13px !important; font-size: 10px !important; min-height: 44px !important; }
    html.theme-v5 body.home-page .home-tab-content.active { grid-template-columns: minmax(0, 1fr) !important; }
    html.theme-v5 body.home-page .home-alerts-signup { grid-template-columns: minmax(0, 1fr); gap: 28px; clip-path: inset(-56px -100vmax); }
    html.theme-v5 body.home-page .home-alerts-signup::after { height: 220px; }
    html.theme-v5 body.home-page .home-alerts-signup h2 { font-size: 32px !important; }
    html.theme-v5 body.home-page .home-alerts-signup__actions { flex-direction: row !important; flex-wrap: wrap; }
    html.theme-v5 body.home-page .home-alerts-signup__actions a { flex: 0 0 auto !important; width: auto !important; }
    html.theme-v5 body .section-header h2 { font-size: 32px !important; }
    html.theme-v5 body.home-page .home-bulletin-carousel { display: grid !important; grid-template-columns: repeat(2, minmax(0, 1fr)) !important; gap: 12px !important; overflow: visible !important; }
    html.theme-v5 body.home-page .home-bulletin-card { padding: 16px !important; }
    html.theme-v5 body.home-page .home-bulletin-title { font-size: 16px !important; }
    html.theme-v5 body.home-page .home-bulletin-date { font-size: 12px !important; }
    html.theme-v5 body .parish-footer__inner { grid-template-columns: minmax(0, 1fr) !important; padding: 52px 24px 36px !important; row-gap: 36px; }
    html.theme-v5 body.home-page .site-footer { margin-top: 80px !important; }
}

/* Light mode: page heroes keep the light theme's own title colours; add a soft shadow where those titles sit on photographs. */
html.theme-v5[data-theme="light"] body .sacrament-hero:not(.sacrament-hero--sunday-readings):not(.sacrament-hero--todays-readings) h1,
html.theme-v5[data-theme="light"] body .prayer-hero h1,
html.theme-v5[data-theme="light"] body .livestream-hero h1 { text-shadow: 0 2px 22px rgba(20, 8, 10, .55) !important; }
html.theme-v5[data-theme="light"] body .prayer-hero p { text-shadow: 0 1px 10px rgba(20, 8, 10, .7) !important; }


/* ==========================================================================
   Page-header titles: no text-shadow on plain (non-photo) headers
   The base about.css / sacraments.css drop shadows and the dark-mode hero glow above were meant for
   photo headers. On solid headers they only blur the title, so they are removed in both themes.
   Photo headers (Parish, New to the Parish, Heritage, sacraments, Prayer, Live Stream, homepage) keep theirs.
   ========================================================================== */
html.theme-v5[data-theme] body .about-hero--info h1,
html.theme-v5[data-theme] body .about-hero--info .about-subtitle,
html.theme-v5[data-theme] body .about-hero--info .about-tag,
html.theme-v5[data-theme] body .about-hero--safeguarding h1,
html.theme-v5[data-theme] body .about-hero--safeguarding .about-subtitle,
html.theme-v5[data-theme] body .about-hero--contact h1,
html.theme-v5[data-theme] body .about-hero--contact .about-subtitle,
html.theme-v5[data-theme] body .sacrament-hero--sunday-readings h1,
html.theme-v5[data-theme] body .sacrament-hero--sunday-readings p,
html.theme-v5[data-theme] body .sacrament-hero--todays-readings h1,
html.theme-v5[data-theme] body .sacrament-hero--todays-readings p { text-shadow: none !important; }

/* Readings headers (plain): readings.css gives the light-mode "Scripture" pill #8f6414 on the gold pill (2.8:1); use the v5 pill text colour. */
html.theme-v5[data-theme="light"] body .sacrament-hero--sunday-readings .section-kicker,
html.theme-v5[data-theme="light"] body .sacrament-hero--todays-readings .section-kicker { color: #1a140e !important; }

/* ==========================================================================
   Compact inner-page headers
   Inner pages are pages, not landing heroes: photo headers become a banner (~250px desktop, ~190px mobile)
   and plain headers only take the room their title needs. Content is centred vertically; photos stay
   cover-fitted with the fade into the page kept to the lower part of the banner. Homepage hero unchanged.
   ========================================================================== */
html.theme-v5 body .about-hero,
html.theme-v5 body .sacrament-hero {
    height: clamp(220px, 18vw, 260px) !important; min-height: 0 !important;
    align-items: center !important;
}
html.theme-v5 body .about-hero--info,
html.theme-v5 body .about-hero--safeguarding,
html.theme-v5 body .about-hero--contact,
html.theme-v5 body .sacrament-hero--sunday-readings,
html.theme-v5 body .sacrament-hero--todays-readings { height: 210px !important; }

/* Photo positions so the building reads in a short banner */
html.theme-v5 body .about-hero--parish { background-position: center 28% !important; }

/* Sacrament cards overlap the header by 80px; with a short banner that crowds the title, so overlap less. */
html.theme-v5 body .sacrament-cards { margin-top: 40px !important; }

/* Tighter title stack inside the banners */
html.theme-v5 body .about-hero h1,
html.theme-v5 body .sacrament-hero h1 { font-size: clamp(32px, 3.9vw, 52px) !important; margin: 0 !important; }
html.theme-v5 body .about-hero .about-tag,
html.theme-v5 body .sacrament-hero .sacrament-tag,
html.theme-v5 body .sacrament-hero .section-kicker { margin: 0 0 .8rem !important; }
html.theme-v5 body .about-hero .about-subtitle { margin: .55rem 0 0 !important; font-size: 17px !important; }
html.theme-v5 body .sacrament-hero--sunday-readings .sacrament-hero__content,
html.theme-v5 body .sacrament-hero--todays-readings .sacrament-hero__content { padding: 0 20px !important; }
html.theme-v5[data-theme="light"] body .about-hero--parish .about-hero__content { padding: 14px 32px 16px !important; }

/* Fade into the page: only the bottom of the banner, so the photo still shows behind the title */
html.theme-v5 body.about-page .about-hero:not(.about-hero--info):not(.about-hero--safeguarding):not(.about-hero--contact)::after {
    background: linear-gradient(to bottom, var(--v5-hero-fade) 0%, var(--v5-hero-fade) 55%, var(--v5-bg) 100%) !important;
}
html.theme-v5 body.sacrament-page .sacrament-hero:not(.sacrament-hero--sunday-readings):not(.sacrament-hero--todays-readings)::after {
    background: linear-gradient(to bottom, rgba(20, 10, 10, .5) 0%, rgba(20, 10, 10, .5) 55%, var(--v5-bg) 100%) !important;
}

/* Prayer (inline styles: large padding) */
html.theme-v5 body .prayer-hero {
    min-height: clamp(220px, 18vw, 260px); padding: 28px 20px 34px !important;
    display: flex; align-items: center; justify-content: center;
}
html.theme-v5 body .prayer-hero::after { height: 3.5rem !important; }
html.theme-v5 body .prayer-hero h1 { font-size: clamp(32px, 3.9vw, 52px) !important; }
html.theme-v5 body .prayer-hero__eyebrow { margin-bottom: .8rem !important; }
html.theme-v5 body .prayer-hero p:last-child { margin-top: .55rem !important; font-size: 17px !important; line-height: 1.5 !important; }

/* Live Stream (inline styles: tall, content pinned to the bottom) */
html.theme-v5 body .livestream-hero { min-height: clamp(220px, 18vw, 260px) !important; align-items: center !important; }
html.theme-v5 body .livestream-hero__content { padding-top: 24px !important; padding-bottom: 28px !important; }
html.theme-v5 body .livestream-hero__content h1 { font-size: clamp(32px, 3.9vw, 52px) !important; }
html.theme-v5 body .livestream-hero__content .section-kicker { margin-bottom: .8rem !important; }
html.theme-v5 body .livestream-hero__content p:not(.section-kicker) { margin-top: .55rem !important; font-size: 17px !important; }
html.theme-v5 body .livestream-hero__art { background-size: cover !important; background-position: center 30% !important; }

@media (max-width: 640px) {
    html.theme-v5 body .about-hero,
    html.theme-v5 body .sacrament-hero { height: 190px !important; }
    html.theme-v5 body .about-hero--info,
    html.theme-v5 body .about-hero--safeguarding,
    html.theme-v5 body .about-hero--contact,
    html.theme-v5 body .sacrament-hero--sunday-readings,
    html.theme-v5 body .sacrament-hero--todays-readings { height: auto !important; min-height: 170px !important; padding: 22px 0 !important; }
    html.theme-v5 body .prayer-hero,
    html.theme-v5 body .livestream-hero { min-height: 190px !important; }
    html.theme-v5 body .prayer-hero { padding: 20px 18px 24px !important; }
    html.theme-v5 body .about-hero h1,
    html.theme-v5 body .sacrament-hero h1,
    html.theme-v5 body .prayer-hero h1,
    html.theme-v5 body .livestream-hero__content h1 { font-size: 30px !important; }
    html.theme-v5 body .about-hero .about-subtitle,
    html.theme-v5 body .prayer-hero p:last-child,
    html.theme-v5 body .livestream-hero__content p:not(.section-kicker) { font-size: 15px !important; }
    html.theme-v5 body .about-hero .about-tag,
    html.theme-v5 body .sacrament-hero .sacrament-tag,
    html.theme-v5 body .sacrament-hero .section-kicker,
    html.theme-v5 body .prayer-hero__eyebrow,
    html.theme-v5 body .livestream-hero__content .section-kicker { margin-bottom: .6rem !important; }
    html.theme-v5[data-theme="light"] body .about-hero--parish .about-hero__content { padding: 10px 18px 12px !important; }
}
html.theme-v5[data-theme="light"] body .livestream-hero::before {
    background: linear-gradient(90deg, rgba(20, 15, 10, .84), rgba(20, 15, 10, .5) 48%, rgba(20, 15, 10, .58)),
                linear-gradient(0deg, var(--v5-bg), rgba(245, 240, 230, .04) 56%, rgba(20, 15, 10, .46)) !important;
}



/* ==========================================================================
   Inner page headers: eyebrow + title in the /about/history style (Views/Shared/_PageEyebrow.cshtml, h1.ph-title)
   Eyebrow = the history kicker (.hh-banner__kicker): church emblem, then PARENT · CONTEXT in small gold
   letter-spaced capitals, parent underlined when it is a link. Title = the history h1: light Newsreader serif.
   Each header keeps its own layout: the eyebrow is inline-flex so centred headers stay centred.
   Dark photo banners (sacraments, Live Stream, Prayer; light titles in both themes) use the bright gold,
   with only a faint shadow for legibility over the photo.
   ========================================================================== */
html.theme-v5[data-theme] body p.page-eyebrow.page-eyebrow {
    display: inline-flex; flex-wrap: wrap; align-items: center; justify-content: center; gap: 10px 12px; margin: 0 0 14px !important; padding: 0 !important;
    font: 700 12px/1.35 var(--v5-sans) !important; letter-spacing: .14em !important; text-transform: uppercase !important; color: var(--v5-accent) !important;
    background: none !important; border: 0 !important; box-shadow: none !important; text-shadow: none !important; max-width: 100%;
}
html.theme-v5[data-theme] body p.page-eyebrow.page-eyebrow a { color: inherit !important; text-decoration: underline !important; text-underline-offset: 3px; text-decoration-thickness: 1px; }
html.theme-v5[data-theme] body p.page-eyebrow.page-eyebrow a:hover { text-decoration-thickness: 2px; }
html.theme-v5[data-theme] body .page-emblem {
    flex: none; display: block; width: 40px; height: 20px; /* Cappagh emblem (cross over the tilled fields) is about 2:1 */ background: var(--v5-accent);
    -webkit-mask: url('/img/brand/cappagh-emblem.svg?v=1') center / contain no-repeat; mask: url('/img/brand/cappagh-emblem.svg?v=1') center / contain no-repeat;
}
html.theme-v5[data-theme="light"] body .page-emblem { background: #9f7617; }
/* Block-level hosts with left-aligned text: line the eyebrow up on the left */
html.theme-v5[data-theme] body .livestream-hero p.page-eyebrow.page-eyebrow,
html.theme-v5[data-theme] body .articles-index__header p.page-eyebrow.page-eyebrow,
html.theme-v5[data-theme] body .bulletin-header p.page-eyebrow.page-eyebrow,
html.theme-v5[data-theme] body .booking-request-hero p.page-eyebrow.page-eyebrow,
html.theme-v5[data-theme] body .section-header p.page-eyebrow.page-eyebrow,
html.theme-v5[data-theme] body .parish-content__inner p.page-eyebrow.page-eyebrow,
html.theme-v5[data-theme] body .event-registration-hero p.page-eyebrow.page-eyebrow,
html.theme-v5[data-theme] body .article-page-heading p.page-eyebrow.page-eyebrow { justify-content: flex-start; }

/* Dark photo banners: bright gold in both themes, faint shadow only */
html.theme-v5[data-theme] body .sacrament-hero:not(.sacrament-hero--sunday-readings):not(.sacrament-hero--todays-readings) p.page-eyebrow.page-eyebrow,
html.theme-v5[data-theme] body .livestream-hero p.page-eyebrow.page-eyebrow,
html.theme-v5[data-theme] body .prayer-hero p.page-eyebrow.page-eyebrow { color: #e7c66a !important; text-shadow: 0 1px 6px rgba(0, 0, 0, .55) !important; }
html.theme-v5[data-theme] body .sacrament-hero:not(.sacrament-hero--sunday-readings):not(.sacrament-hero--todays-readings) .page-emblem,
html.theme-v5[data-theme] body .livestream-hero .page-emblem,
html.theme-v5[data-theme] body .prayer-hero .page-emblem { background: #e7c66a; filter: drop-shadow(0 1px 4px rgba(0, 0, 0, .5)); }
/* Light-mode pale photo banners (Parish, New to the Parish): dark gold reads on the pale stone; keep the pale halo faint */
html.theme-v5[data-theme="light"] body .about-hero--parish p.page-eyebrow.page-eyebrow { text-shadow: 0 0 8px rgba(255, 250, 240, .9) !important; }

html.theme-v5[data-theme] body h1.ph-title.ph-title {
    font: 400 clamp(34px, 3.6vw, 52px)/1.05 var(--v5-serif) !important; letter-spacing: -.015em !important;
    text-transform: none !important; margin: 0 !important;
}
/* Plain headers: page text colour, no shadow */
html.theme-v5[data-theme] body .about-hero--info h1.ph-title.ph-title,
html.theme-v5[data-theme] body .about-hero--safeguarding h1.ph-title.ph-title,
html.theme-v5[data-theme] body .about-hero--contact h1.ph-title.ph-title,
html.theme-v5[data-theme] body .sacrament-hero--sunday-readings h1.ph-title.ph-title,
html.theme-v5[data-theme] body .sacrament-hero--todays-readings h1.ph-title.ph-title,
html.theme-v5[data-theme] body .articles-index__header h1.ph-title.ph-title,
html.theme-v5[data-theme] body .bulletin-header h1.ph-title.ph-title,
html.theme-v5[data-theme] body .section-header h1.ph-title.ph-title,
html.theme-v5[data-theme] body .parish-content__inner h1.ph-title.ph-title { color: var(--v5-text) !important; text-shadow: none !important; }
html.theme-v5[data-theme] body .parish-content__inner h1.ph-title.ph-title,
html.theme-v5[data-theme] body .section-header h1.ph-title.ph-title { margin-bottom: 18px !important; }
/* Photo headers: keep each banner's title colour; replace the heavy glow with a faint shadow */
html.theme-v5[data-theme] body .sacrament-hero:not(.sacrament-hero--sunday-readings):not(.sacrament-hero--todays-readings) h1.ph-title.ph-title,
html.theme-v5[data-theme] body .livestream-hero h1.ph-title.ph-title,
html.theme-v5[data-theme] body .prayer-hero h1.ph-title.ph-title,
html.theme-v5[data-theme="dark"] body .about-hero--parish h1.ph-title.ph-title { color: #fff !important; text-shadow: 0 1px 10px rgba(0, 0, 0, .45) !important; }
html.theme-v5[data-theme="light"] body .about-hero--parish h1.ph-title.ph-title { text-shadow: 0 0 14px rgba(255, 250, 240, .85) !important; }

@media (max-width: 640px) {
    html.theme-v5[data-theme] body p.page-eyebrow.page-eyebrow { margin-bottom: 8px !important; font-size: 11px !important; gap: 6px 10px; }
    /* Keep the eyebrow on one line beside the emblem on phones (article dates may still wrap). */
    html.theme-v5[data-theme] body :not(.article-page-heading) > p.page-eyebrow.page-eyebrow { flex-wrap: nowrap; white-space: nowrap; letter-spacing: .1em !important; gap: 6px 8px; }
    html.theme-v5[data-theme] body .page-emblem { width: 32px; height: 16px; }
    html.theme-v5[data-theme] body h1.ph-title.ph-title { font-size: 32px !important; }
}

/* Schedule card locations open in Google Maps */
html.theme-v5 body.home-page .mass-card .mass-location-link { color: inherit; text-decoration: none; border-bottom: 1px dotted currentColor; position: relative; z-index: 2; }
html.theme-v5 body.home-page .mass-card .mass-location-link:hover,
html.theme-v5 body.home-page .mass-card .mass-location-link:focus-visible { color: var(--v5-accent); border-bottom-style: solid; }

/* Booklet cards: the light-theme panel rule above wiped their background image */
html.theme-v5[data-theme] body .sacrament-booklet-cta.sacrament-booklet-cta--funeral {
    background-image: url('/img/Sacraments/coffin1-scaled.webp') !important;
    background-size: cover !important; background-position: center !important; background-repeat: no-repeat !important;
}

/* Quote cards set side by side beneath the content */
html.theme-v5 body .sacrament-quote-row {
    display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 24px;
    max-width: 1200px; margin: 3rem auto 0; padding: 0 2rem;
}
html.theme-v5 body .sacrament-quote-row .sacrament-quote { margin: 0 !important; height: 100%; }
@media (max-width: 760px) { html.theme-v5 body .sacrament-quote-row { grid-template-columns: 1fr; } }
html.theme-v5[data-theme] body .sacrament-booklet-cta .sacrament-booklet-cta__title { background: none !important; color: #f7eed8 !important; box-shadow: none !important; border: 0 !important; }
html.theme-v5[data-theme] body .sacrament-booklet-cta .sacrament-booklet-cta__content { position: relative; z-index: 1; display: flex; flex-direction: column; align-items: center; gap: 14px; }

/* Light-mode Prayer banner: short banner puts the title over the brightest part of the photo; slightly deeper scrim (Cappagh's own image). */
html.theme-v5[data-theme="light"] body .prayer-hero {
    background: linear-gradient(rgba(18, 14, 10, .6), rgba(18, 14, 10, .7)), url('/img/home-image.webp') center center / cover no-repeat !important;
}

/* Footer: small links in the bottom line */
html.theme-v5 body .parish-footer__bottom a { color: inherit !important; text-decoration: underline; text-underline-offset: 2px; }

/* Very narrow phones (under 360px): a touch smaller so the longest eyebrow still fits on one line. */
@media (max-width: 359px) {
    html.theme-v5[data-theme] body :not(.article-page-heading) > p.page-eyebrow.page-eyebrow { font-size: 10px !important; letter-spacing: .06em !important; }
    html.theme-v5[data-theme] body .page-emblem { width: 28px; height: 14px; }
}

/* Sacrament cards: the 300px grid minimum plus side padding overflowed phones narrower than ~365px. */
html.theme-v5 body .sacrament-cards { grid-template-columns: repeat(auto-fit, minmax(min(300px, 100%), 1fr)) !important; }
/* Homepage Advent reflection. Append to wwwroot/css/theme-v5.css
   (public pages already load it last). Fallbacks keep it tidy if
   theme tokens are missing. No autoplay; native controls stay visible. */

body.home-page .home-advent-reflection {
    padding-top: 64px;
    padding-bottom: 8px;
}

body.home-page .home-advent-reflection .section-header {
    margin-bottom: 28px;
}

body.home-page .home-advent-kicker {
    margin: 0 0 8px;
    font: italic 400 16px/1.3 var(--v5-serif, Georgia, "Times New Roman", serif);
    color: var(--v5-muted, #c9c0ae);
}

body.home-page .home-advent-reflection .section-header h2 {
    margin: 0;
}

body.home-page .home-advent-meta {
    margin: 10px 0 0;
    font: 500 15px/1.45 var(--v5-sans, "Source Sans 3", system-ui, sans-serif);
    color: var(--v5-muted, #c9c0ae);
}

body.home-page .home-advent-player {
    position: relative;
    width: 100%;
    aspect-ratio: 16 / 9;
    overflow: hidden;
    background: var(--v5-deep, #0c0a08);
    border: 1px solid var(--v5-line, rgba(246, 246, 246, 0.14));
    border-radius: var(--v5-radius, 8px);
    box-shadow: var(--v5-card-lift, 0 10px 28px rgba(0, 0, 0, 0.3));
}

body.home-page .home-advent-player video {
    display: block;
    width: 100%;
    height: 100%;
    vertical-align: top;
    background: #0c0a08;
}

@media (max-width: 640px) {
    body.home-page .home-advent-reflection {
        padding-top: 16px;
        padding-bottom: 28px;
    }

    body.home-page .home-advent-reflection .section-header h2 {
        font-size: 30px;
    }
}
/* Article images: never crop. Featured images come in several shapes (16:9, 3:2, 4:3),
   so every card shows the whole picture ("contain") inside a tidy 16:9 frame, and any
   spare space is filled with a soft, blurred, darkened copy of the same picture
   (the same framed-painting approach as the sacrament banners). Tablets get two
   columns, and card text is left-aligned with "Read More" on a shared baseline. */
html.theme-v5 body.home-page .articles-section .home-article-card {
    grid-template-rows: auto 1fr !important;
}
html.theme-v5 body.home-page .articles-section .home-article-card__media,
html.theme-v5 body .articles-index .article-list-card__media {
    position: relative;
    isolation: isolate;
    overflow: hidden;
    aspect-ratio: 16 / 9;
    min-height: 0 !important;
    background-color: #0b0907;
}
html.theme-v5 body.home-page .articles-section .home-article-card__media::before {
    content: "";
    position: absolute;
    inset: -24px;
    z-index: 0;
    background: var(--card-img) center / cover no-repeat;
    filter: blur(18px) brightness(0.55) saturate(1.05);
}
html.theme-v5 body.home-page .articles-section .home-article-card__media img {
    position: absolute;
    inset: 0;
    z-index: 1;
    width: 100%;
    height: 100%;
    object-fit: contain !important;
    object-position: center !important;
}
html.theme-v5 body .articles-index .article-card {
    grid-template-rows: auto 1fr !important;
}
html.theme-v5 body .articles-index .article-list-card__media::before,
html.theme-v5 body .articles-index .article-list-card__media::after {
    content: "";
    position: absolute;
    background-image: inherit;
    background-repeat: no-repeat;
    background-position: center;
}
html.theme-v5 body .articles-index .article-list-card__media::before {
    inset: -24px;
    z-index: 0;
    background-size: cover;
    filter: blur(18px) brightness(0.55) saturate(1.05);
}
html.theme-v5 body .articles-index .article-list-card__media::after {
    inset: 0;
    z-index: 1;
    background-size: contain;
}
/* Article page: show the featured picture at its own shape, whole. */
html.theme-v5 body .article-page-image {
    aspect-ratio: auto !important;
}
html.theme-v5 body .article-page-image img {
    height: auto !important;
    object-fit: contain !important;
}
html.theme-v5 body.home-page .articles-section .home-article-card .article-content,
html.theme-v5 body.home-page .articles-section .home-article-card:nth-child(2n) .article-content {
    display: flex !important;
    flex-direction: column !important;
    align-items: flex-start !important;
    justify-content: flex-start !important;
    text-align: left !important;
}
html.theme-v5 body.home-page .articles-section .home-article-card .article-content h3,
html.theme-v5 body.home-page .articles-section .home-article-card .article-content p {
    align-self: stretch;
}
html.theme-v5 body.home-page .articles-section .home-article-card .article-read-more {
    margin-top: auto !important;
    padding-top: 18px;
}
@media (min-width: 641px) and (max-width: 1100px) {
    html.theme-v5 body.home-page .articles-section .article-grid {
        grid-template-columns: repeat(2, minmax(0, 1fr)) !important;
    }
}

/* ==========================================================================
   Shared inner-page banner (Views/Shared/_PageBanner.cshtml)
   The sacrament-banner style for every inner page: the section's background is a
   small pre-blurred copy of the picture (img/banner-fill/); ::before is the sharp
   picture, shown whole (--art-zoom 1) at one end of the page column and fading into
   the fill; ::after is a soft shade behind the title. Phones: the whole picture
   across the top with the title in a band underneath. Per page (inline style from
   PageBanner.Style): --art, --art-fill, --art-ratio, --art-zoom, --art-x, --art-y, --title-w.
   ========================================================================== */
html.theme-v5 body .page-banner {
    --art-fade: .3;
    --art-max: 62%;
    --art-shade: rgba(18, 12, 9, .62);
    --banner-ink: #fff7e8;
    --banner-ink-muted: rgba(255, 247, 232, .82);
    --banner-band: rgba(18, 12, 9, .5);
    --banner-fill-veil: rgba(18, 12, 9, 0);
    position: relative;
    display: block;
    overflow: hidden;
    isolation: isolate;
    margin: 0;
    background: #1d1712 var(--art-fill) center / cover no-repeat;
}
html.theme-v5 body .page-banner::before {
    content: "";
    position: absolute;
    z-index: 0;
    inset: 0 0 auto 0;
    height: calc(100vw / var(--art-ratio));
    background: var(--art) center top / 100% auto no-repeat;
    -webkit-mask-image: linear-gradient(to bottom, #000 82%, transparent 100%);
    mask-image: linear-gradient(to bottom, #000 82%, transparent 100%);
    pointer-events: none;
}
html.theme-v5 body .page-banner::after {
    content: "";
    position: absolute;
    z-index: 0;
    inset: 0;
    background:
        linear-gradient(to bottom, var(--banner-fill-veil) 0, var(--banner-fill-veil) calc(100vw / var(--art-ratio) - 40px), var(--banner-band) calc(100vw / var(--art-ratio) + 10px), var(--banner-band) calc(100% - 10px), var(--v5-bg) 100%);
    pointer-events: none;
}
html.theme-v5 body .page-banner__content {
    position: relative;
    z-index: 1;
    max-width: 1120px;
    margin: 0 auto;
    padding: calc(100vw / var(--art-ratio) - 18px) 18px 26px;
    text-align: left;
}
html.theme-v5[data-theme] body .page-banner p.page-eyebrow.page-eyebrow {
    justify-content: flex-start;
    flex-wrap: nowrap;
    white-space: nowrap;
    margin: 0 0 4px !important;
    text-shadow: 0 1px 6px rgba(0, 0, 0, .55);
}
html.theme-v5[data-theme] body .page-banner .page-emblem { background: #e7c66a; filter: drop-shadow(0 1px 4px rgba(0, 0, 0, .5)); }
html.theme-v5[data-theme] body .page-banner p.page-eyebrow a,
html.theme-v5[data-theme] body .page-banner p.page-eyebrow span { color: #e7c66a !important; }
html.theme-v5[data-theme] body .page-banner h1.ph-title.ph-title {
    margin: 0 !important;
    color: var(--banner-ink) !important;
    text-shadow: 0 2px 14px rgba(0, 0, 0, .5);
    text-align: left !important;
}
html.theme-v5 body .page-banner__subtitle {
    margin: 8px 0 0;
    max-width: 34rem;
    color: var(--banner-ink-muted);
    font: 400 clamp(15px, 1.4vw, 17px)/1.45 var(--v5-sans);
    text-shadow: 0 1px 8px rgba(0, 0, 0, .55);
}

@media (min-width: 600px) {
    html.theme-v5 body .page-banner {
        --hero-h: 210px;
        --art-w: min(calc(var(--hero-h) * var(--art-zoom) * var(--art-ratio)), var(--art-max),
                     calc((100% - 40px - var(--title-w)) / (1 - var(--art-fade))));
        display: flex;
        align-items: center;
        min-height: var(--hero-h);
    }
    html.theme-v5 body .page-banner::before {
        inset: 0 max(0px, calc((100% - 1120px) / 2)) 0 auto;
        height: auto;
        width: var(--art-w);
        background-size: auto calc(var(--art-zoom) * 100%);
        background-position: var(--art-x) var(--art-y);
        -webkit-mask-image: linear-gradient(to right, transparent 0, #000 calc(var(--art-fade) * 100%));
        mask-image: linear-gradient(to right, transparent 0, #000 calc(var(--art-fade) * 100%));
    }
    html.theme-v5 body .page-banner::after {
        background:
            linear-gradient(to right, var(--art-shade) 0%, rgba(18, 12, 9, .3) 32%, rgba(18, 12, 9, 0) 52%),
            linear-gradient(to bottom, rgba(18, 12, 9, .08) 0%, rgba(18, 12, 9, .08) 86%, var(--v5-bg) 100%);
    }
    html.theme-v5 body .page-banner__content {
        flex: 1;
        width: 100%;
        padding: 24px calc(var(--art-w) * (1 - var(--art-fade)) + 16px) 24px 24px;
    }
}
@media (min-width: 800px) {
    html.theme-v5 body .page-banner { --hero-h: clamp(250px, 19vw, 290px); }
}
@media (min-width: 1121px) {
    html.theme-v5 body .page-banner::before {
        -webkit-mask-image: linear-gradient(to right, transparent 0, #000 calc(var(--art-fade) * 100%), #000 93%, transparent 100%);
        mask-image: linear-gradient(to right, transparent 0, #000 calc(var(--art-fade) * 100%), #000 93%, transparent 100%);
    }
}
@media (max-width: 599px) {
    html.theme-v5[data-theme] body .page-banner p.page-eyebrow.page-eyebrow { letter-spacing: .08em !important; font-size: 11px !important; }
}
/* Page counts that used to sit beside the old headers now sit just under the banner. */
html.theme-v5 body .page-banner-meta {
    display: flex;
    justify-content: flex-end;
    margin: 14px 0 0;
    color: var(--v5-accent);
    font: 800 12px/1 var(--v5-sans);
    letter-spacing: .12em;
    text-transform: uppercase;
}


/* ==========================================================================
   Homepage section headings: one serif style for every section
   (Advent, Parish Schedule, Live Streams, Alerts and Events, Bulletins, Articles).
   ========================================================================== */
html.theme-v5 body.home-page #homeAdventTitle,
html.theme-v5 body.home-page #homeMassTimesTitle,
html.theme-v5 body.home-page #homeLiveStreamsTitle,
html.theme-v5 body.home-page #homeAlertsSignupTitle,
html.theme-v5 body.home-page .home-bulletins .section-header h2,
html.theme-v5 body.home-page .articles-section .section-header h2 {
    font-family: var(--v5-serif) !important;
    font-weight: 400 !important;
    font-size: clamp(31px, 2.95vw, 42.4px) !important;
    line-height: 1.05 !important;
    letter-spacing: .005em !important;
    text-transform: none !important;
}

/* ==========================================================================
   Shorter homepage on phones: 3 articles and 2 bulletins, then "See all" links
   (the links show at every size).
   ========================================================================== */
html.theme-v5 body .home-see-all {
    display: flex;
    justify-content: flex-end;
    margin: 18px 0 0;
}
html.theme-v5 body .home-see-all a {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    min-height: 44px;
    padding: 0 4px;
    color: var(--v5-accent);
    font: 800 13px/1 var(--v5-sans);
    letter-spacing: .1em;
    text-transform: uppercase;
    text-decoration: none;
}
html.theme-v5 body .home-see-all a span { transition: transform .2s ease; }
html.theme-v5 body .home-see-all a:hover,
html.theme-v5 body .home-see-all a:focus-visible { color: var(--v5-accent-strong); text-decoration: underline; text-underline-offset: 4px; }
html.theme-v5 body .home-see-all a:hover span { transform: translateX(3px); }
@media (max-width: 640px) {
    html.theme-v5 body.home-page .articles-section .article-grid > .home-article-card:nth-child(n+4),
    html.theme-v5 body.home-page .home-bulletins .home-bulletin-carousel > .home-bulletin-card:nth-child(n+3) {
        display: none !important;
    }
    html.theme-v5 body .home-see-all { justify-content: center; }
}


/* ==========================================================================
   Light mode, completed: every band that stayed dark in light mode gets a
   light version. Dark mode is untouched (all rules are [data-theme="light"]).
   ========================================================================== */
html.theme-v5[data-theme="light"] {
    --v5-deep: #ebe2d2;            /* feature band: warm stone instead of near-black */
    --v5-deep-text: #1f1b16;       /* 13:1 on the band */
    --v5-deep-muted: #5a4f41;      /* 6.6:1 on the band */
    --v5-footer: #ebe2d2;
    --v5-footer-line: rgba(139, 101, 24, 0.24);
    --lt-ink: #1f1b16;
    --lt-ink-2: #4f4538;           /* 7.6:1 on the band */
    --lt-gold: #7d5a0e;            /* 5.3:1 on the band */
    --lt-veil: 245, 240, 230;
}

/* --- Banners (shared page banner and the sacrament banners) --- */
html.theme-v5[data-theme="light"] body .page-banner {
    --art-shade: rgba(var(--lt-veil), .55);
    --banner-ink: var(--lt-ink);
    --banner-ink-muted: var(--lt-ink-2);
    --banner-band: rgba(var(--lt-veil), .9);
    background: #efe6d6 linear-gradient(rgba(var(--lt-veil), .8), rgba(var(--lt-veil), .8)) !important;
    background-image: linear-gradient(rgba(var(--lt-veil), .8), rgba(var(--lt-veil), .8)), var(--art-fill) !important;
    background-size: cover !important;
    background-position: center !important;
}
html.theme-v5[data-theme="light"] body section.sacrament-hero:is(.sacrament-hero--baptism, .sacrament-hero--confirmation, .sacrament-hero--holy-communion, .sacrament-hero--confession, .sacrament-hero--marriage, .sacrament-hero--funerals) {
    background: #efe6d6 center / cover no-repeat !important;
    background-image: linear-gradient(rgba(var(--lt-veil), .8), rgba(var(--lt-veil), .8)), var(--art-fill) !important;
}
html.theme-v5[data-theme="light"] body.sacrament-page section.sacrament-hero:is(.sacrament-hero--baptism, .sacrament-hero--confirmation, .sacrament-hero--holy-communion, .sacrament-hero--confession, .sacrament-hero--marriage, .sacrament-hero--funerals)::after {
    background:
        linear-gradient(to bottom, rgba(var(--lt-veil), 0) 0, rgba(var(--lt-veil), 0) calc(100% - 92px), rgba(var(--lt-veil), .9) calc(100% - 50px), rgba(var(--lt-veil), .9) calc(100% - 12px), var(--v5-bg) 100%) !important;
}
@media (min-width: 600px) {
    html.theme-v5[data-theme="light"] body .page-banner::after,
    html.theme-v5[data-theme="light"] body.sacrament-page section.sacrament-hero:is(.sacrament-hero--baptism, .sacrament-hero--confirmation, .sacrament-hero--holy-communion, .sacrament-hero--confession, .sacrament-hero--marriage, .sacrament-hero--funerals)::after {
        background:
            linear-gradient(to right, rgba(var(--lt-veil), .6) 0%, rgba(var(--lt-veil), .25) 32%, rgba(var(--lt-veil), 0) 52%),
            linear-gradient(to bottom, rgba(var(--lt-veil), 0) 0%, rgba(var(--lt-veil), 0) 86%, var(--v5-bg) 100%) !important;
    }
    html.theme-v5[data-theme="light"] body.sacrament-page section.sacrament-hero.sacrament-hero--funerals::after {
        background:
            linear-gradient(to left, rgba(var(--lt-veil), .6) 0%, rgba(var(--lt-veil), .25) 32%, rgba(var(--lt-veil), 0) 52%),
            linear-gradient(to bottom, rgba(var(--lt-veil), 0) 0%, rgba(var(--lt-veil), 0) 86%, var(--v5-bg) 100%) !important;
    }
}
html.theme-v5[data-theme="light"] body .page-banner h1.ph-title.ph-title,
html.theme-v5[data-theme="light"] body.sacrament-page section.sacrament-hero:is(.sacrament-hero--baptism, .sacrament-hero--confirmation, .sacrament-hero--holy-communion, .sacrament-hero--confession, .sacrament-hero--marriage, .sacrament-hero--funerals) h1.ph-title.ph-title {
    color: var(--lt-ink) !important;
    text-shadow: 0 1px 0 rgba(255, 250, 240, .6) !important;
}
html.theme-v5[data-theme="light"] body .page-banner__subtitle { text-shadow: none; }
html.theme-v5[data-theme="light"] body .page-banner p.page-eyebrow.page-eyebrow,
html.theme-v5[data-theme="light"] body .page-banner p.page-eyebrow a,
html.theme-v5[data-theme="light"] body .page-banner p.page-eyebrow span,
html.theme-v5[data-theme="light"] body.sacrament-page section.sacrament-hero:is(.sacrament-hero--baptism, .sacrament-hero--confirmation, .sacrament-hero--holy-communion, .sacrament-hero--confession, .sacrament-hero--marriage, .sacrament-hero--funerals) p.page-eyebrow.page-eyebrow,
html.theme-v5[data-theme="light"] body.sacrament-page section.sacrament-hero:is(.sacrament-hero--baptism, .sacrament-hero--confirmation, .sacrament-hero--holy-communion, .sacrament-hero--confession, .sacrament-hero--marriage, .sacrament-hero--funerals) p.page-eyebrow.page-eyebrow a,
html.theme-v5[data-theme="light"] body.sacrament-page section.sacrament-hero:is(.sacrament-hero--baptism, .sacrament-hero--confirmation, .sacrament-hero--holy-communion, .sacrament-hero--confession, .sacrament-hero--marriage, .sacrament-hero--funerals) p.page-eyebrow.page-eyebrow span {
    color: var(--lt-gold) !important;
    text-shadow: none !important;
}
html.theme-v5[data-theme="light"] body .page-banner .page-emblem,
html.theme-v5[data-theme="light"] body.sacrament-page section.sacrament-hero:is(.sacrament-hero--baptism, .sacrament-hero--confirmation, .sacrament-hero--holy-communion, .sacrament-hero--confession, .sacrament-hero--marriage, .sacrament-hero--funerals) .page-emblem { background: #8a6415; filter: none; }

/* --- Homepage alerts band --- */
html.theme-v5[data-theme="light"] body.home-page .home-alerts-signup__kicker { color: var(--lt-gold) !important; border-bottom-color: rgba(139, 101, 24, .45) !important; }
html.theme-v5[data-theme="light"] body.home-page .home-alerts-signup .btn-gold { background: var(--v5-fill) !important; border-color: var(--v5-fill) !important; color: var(--v5-on-fill) !important; }
html.theme-v5[data-theme="light"] body.home-page .home-alerts-signup .btn-outline { color: var(--lt-ink) !important; border-color: rgba(31, 27, 22, .45) !important; }
html.theme-v5[data-theme="light"] body.home-page .home-alerts-signup .btn-outline:hover { background: rgba(31, 27, 22, .06) !important; }

/* --- Advent video frame: the pale band colour would show round the poster --- */
html.theme-v5[data-theme="light"] body.home-page .home-advent-player { background: #1f1b16; }

/* --- Footer --- */
html.theme-v5[data-theme="light"] body .site-footer,
html.theme-v5[data-theme="light"] body .parish-footer { background: var(--v5-footer) !important; border-top-color: #9f7617 !important; }
html.theme-v5[data-theme="light"] body .parish-footer__brand p { color: var(--lt-ink-2) !important; }
html.theme-v5[data-theme="light"] body .parish-footer h2 { color: var(--lt-ink) !important; }
html.theme-v5[data-theme="light"] body .parish-footer__links a,
html.theme-v5[data-theme="light"] body .parish-footer__contact p,
html.theme-v5[data-theme="light"] body .parish-footer__contact a { color: var(--lt-ink-2) !important; }
html.theme-v5[data-theme="light"] body .parish-footer__links a:hover,
html.theme-v5[data-theme="light"] body .parish-footer__contact a:hover { color: var(--lt-gold) !important; }
html.theme-v5[data-theme="light"] body .parish-footer__contact strong { color: var(--lt-ink) !important; }
html.theme-v5[data-theme="light"] body .parish-footer__contact a[href^="tel"] { color: var(--lt-gold) !important; }
html.theme-v5[data-theme="light"] body .parish-footer__bottom { color: var(--lt-ink-2) !important; }
/* the pale-background (gold) logo now that the footer is pale */
html.theme-v5[data-theme="light"] body .parish-footer .parish-footer__brand img.brand-logo--dark { display: none !important; }
html.theme-v5[data-theme="light"] body .parish-footer .parish-footer__brand img.brand-logo--light { display: block !important; }

/* --- Small contrast fixes (all to 4.5:1 or better) --- */
html.theme-v5[data-theme="light"] body.home-page .home-bulletin-icon { color: var(--lt-gold) !important; }
html.theme-v5[data-theme="light"] body .article-category-filter a:not(.active),
html.theme-v5[data-theme="light"] body .articles-pagination a:not(.active),
html.theme-v5[data-theme="light"] body .articles-pagination span.disabled { color: var(--lt-ink-2) !important; }
html.theme-v5[data-theme="light"] body .safeguarding-action-button { color: var(--lt-gold) !important; }
html.theme-v5[data-theme="light"] body .stack-form label,
html.theme-v5[data-theme="light"] body .manager-wrap label,
html.theme-v5[data-theme="light"] body .auth-card label { color: var(--lt-ink) !important; }


/* ==========================================================================
   Live stream controls (Live Streams page and the homepage Live Streams card)
   One slim segmented control: equal-width tabs inside a rounded track, the
   active tab a filled pill that stays inside its half. Plain gold kickers
   instead of stacked pills; a one-line "Open on ChurchServices.tv" link.
   ========================================================================== */
html.theme-v5 body {
    --seg-track: rgba(246, 246, 246, .06);
    --seg-line: rgba(212, 175, 55, .34);
    --seg-text: var(--v5-text);
    --seg-icon: var(--v5-accent);
}
html.theme-v5[data-theme="light"] body {
    --seg-track: rgba(139, 101, 24, .08);
    --seg-line: rgba(139, 101, 24, .3);
    --seg-icon: var(--v5-accent);
}
html.theme-v5 body .live-stream-tabs,
html.theme-v5 body.home-page .home-stream-mobile-selector {
    grid-template-columns: repeat(2, minmax(0, 1fr)) !important;
    gap: 4px !important;
    padding: 4px !important;
    margin: 0 0 12px !important;
    overflow: visible !important;
    border: 1px solid var(--seg-line) !important;
    border-radius: 999px !important;
    background: var(--seg-track) !important;
}
html.theme-v5 body .live-stream-tab,
html.theme-v5 body.home-page .home-stream-mobile-selector button {
    min-width: 0 !important;
    min-height: 38px !important;
    height: auto !important;
    display: inline-flex !important;
    align-items: center !important;
    justify-content: center !important;
    gap: 7px !important;
    margin: 0 !important;
    padding: 0 10px !important;
    border: 0 !important;
    border-radius: 999px !important;
    background: transparent !important;
    color: var(--seg-text) !important;
    font: 700 12px/1 var(--v5-sans) !important;
    letter-spacing: .06em !important;
    text-transform: uppercase !important;
    white-space: nowrap !important;
    overflow: hidden;
    text-overflow: ellipsis;
    box-shadow: none !important;
    cursor: pointer;
    transition: background .2s ease, color .2s ease;
}
html.theme-v5 body.home-page .home-stream-mobile-selector button { letter-spacing: .02em !important; text-transform: none !important; font-size: 13px !important; }
html.theme-v5 body .live-stream-tab i,
html.theme-v5 body.home-page .home-stream-mobile-selector button i { color: var(--seg-icon) !important; font-size: 12px !important; }
html.theme-v5 body .live-stream-tab:hover:not(.active),
html.theme-v5 body.home-page .home-stream-mobile-selector button:hover:not(.active) { background: var(--v5-chip) !important; }
html.theme-v5 body .live-stream-tab:focus-visible,
html.theme-v5 body.home-page .home-stream-mobile-selector button:focus-visible { outline: 2px solid var(--v5-accent) !important; outline-offset: 2px; }
html.theme-v5 body .live-stream-tab.active,
html.theme-v5 body.home-page .home-stream-mobile-selector button.active {
    background: var(--v5-fill) !important;
    color: var(--v5-on-fill) !important;
}
html.theme-v5 body .live-stream-tab.active i,
html.theme-v5 body.home-page .home-stream-mobile-selector button.active i { color: var(--v5-on-fill) !important; }
/* the player no longer hangs off the tabs: give it its own rounded frame */
html.theme-v5 body .live-stream-player-shell {
    border-radius: var(--v5-radius) !important;
    border: 1px solid var(--v5-line) !important;
}
@media (min-width: 641px) {
    html.theme-v5 body .live-stream-tabs { max-width: 360px; }
}

/* Heading block: small gold kicker, title, one-line external link */
html.theme-v5 body .live-stream-kicker {
    margin: 0 0 6px;
    color: var(--v5-accent);
    font: 800 11px/1.2 var(--v5-sans);
    letter-spacing: .12em;
    text-transform: uppercase;
}
html.theme-v5 body .live-stream-player-heading { display: block !important; margin-bottom: 14px !important; }
html.theme-v5 body .live-stream-player-heading h2 { font-size: clamp(22px, 2.4vw, 30px) !important; line-height: 1.15 !important; }
html.theme-v5 body .live-stream-external,
html.theme-v5 body .live-stream-external--active {
    display: inline-flex !important;
    align-items: center;
    gap: 6px !important;
    margin: 8px 0 0 !important;
    min-height: 32px;
    color: var(--v5-accent) !important;
    font: 700 14px/1.2 var(--v5-sans) !important;
    letter-spacing: 0 !important;
    text-transform: none !important;
    text-decoration: underline !important;
    text-decoration-thickness: 1px !important;
    text-underline-offset: 4px !important;
    white-space: nowrap;
}
html.theme-v5 body .live-stream-external i { font-size: 11px; }
html.theme-v5 body .live-stream-external:hover,
html.theme-v5 body .live-stream-external:focus-visible { color: var(--v5-accent-strong) !important; text-decoration-thickness: 2px !important; }
html.theme-v5 body .live-stream-note { font: 400 13px/1.45 var(--v5-sans) !important; color: var(--v5-muted) !important; margin-top: 10px !important; }
html.theme-v5 body .live-stream-switcher__header { display: flex !important; align-items: baseline; justify-content: space-between; gap: 12px; }
html.theme-v5 body .live-stream-switcher__header .live-stream-kicker { margin: 0; order: 2; }
html.theme-v5 body .live-stream-switcher__header h2 { font-size: clamp(20px, 2vw, 26px) !important; }
