/* Parish identity stays in the theme palette. These five layouts share module markup. */
body.pfv {
    --mdi-ink: var(--pf-brand, #472d2d);
    --mdi-rule: color-mix(in srgb, var(--mdi-ink) 24%, transparent);
    --mdi-wash: color-mix(in srgb, var(--mdi-ink) 6%, var(--pf-paper, white));
    --mdi-face: var(--module-display, Georgia, serif);
}
body.pfv-anielska { --mdi-portrait: 52% 52% 12px 12px; --mdi-rite: 50%; --mdi-profile: 92px; }
body.pfv-jan { --mdi-portrait: 2px; --mdi-rite: 1px; --mdi-profile: 76px; }
body.pfv-sniezna { --mdi-portrait: 50%; --mdi-rite: 50% 50% 3px 3px; --mdi-profile: 80px; }
body.pfv-wawrzyniec { --mdi-portrait: 50% 50% 2px 2px; --mdi-rite: 50% 50% 1px 1px; --mdi-profile: 88px; }
body.pfv-quovadis { --mdi-portrait: 50%; --mdi-rite: 50%; --mdi-profile: 68px; }

body.pfv .pfx-home .pfx-heading,
body.pfv .pfv-home .pfv-section-title { align-items: center; }
body.pfv .pfx-heading .pfe-more, body.pfv .pfv-section-title > a {
    display: inline-flex; align-items: center; gap: .45em; line-height: 1.35; min-height: 40px;
}
body.pfv .pfx-home .pfx-intention {
    grid-template-columns: minmax(4.4rem, max-content) minmax(0,1fr);
    align-items: baseline; column-gap: clamp(.65rem,2vw,1.4rem); padding-block: .72rem;
}
body.pfv .pfx-home .pfx-intention time { font-variant-numeric: tabular-nums; opacity: 1; color: var(--mdi-ink); }
body.pfv .pfx-week-obituaries .pfx-row h3 { margin: 0 0 .23rem; align-items: baseline; }
body.pfv .pfx-week-obituaries .pfx-row h3 svg { align-self: center; width: 1em; height: 1em; }
body.pfv .pfx-week-obituaries .pfx-row p { padding-inline-start: calc(1em + 10px); }
body.pfv .pfx-home .pfx-section .pfx-sacraments {
    display:grid; grid-template-columns: repeat(auto-fit,minmax(min(100%,235px),1fr));
    gap: 0 clamp(1rem,2.5vw,2.4rem); align-items: stretch;
}
body.pfv .pfx-home .pfx-sacraments .pfx-tile,
body.pfv .pfx-home .pfx-sacraments .pfx-tile:has(>img) {
    display:grid; grid-template-columns:minmax(0,1fr) auto; align-content: center; align-items:center;
    min-height: 62px; padding:.55rem 0; border:0; border-bottom:1px solid var(--mdi-rule);
    border-radius:0; column-gap:.8rem; background:transparent; box-shadow:none; color:var(--mdi-ink);
}
body.pfv .pfx-home .pfx-sacraments .pfx-tile:has(>img) { grid-template-columns: 54px minmax(0,1fr) auto; }
body.pfv .pfx-home .pfx-sacraments .pfx-tile > img,
body.pfv .pfx-home .pfx-sacraments .pfx-tile:has(>img) > img {
    width:54px; height:54px; min-height:0; max-height:none; aspect-ratio:1; border-radius:var(--mdi-rite); object-fit:cover;
}
body.pfv .pfx-home .pfx-sacraments .pfx-tile > span { padding:0; grid-column:auto; min-width:0; }
body.pfv .pfx-home .pfx-sacraments .pfx-tile > svg { width:1.05em; height:1.05em; margin:0; position:static; align-self:center; justify-self:end; }
body.pfv .pfx-sacraments small { display:block; margin-top:.16em; font-size:.88rem; line-height:1.32; text-wrap:pretty; }

body.pfv .pfx-home .pfx-groups .pfx-grid { align-items:start; gap:0 clamp(1rem,2.5vw,2.6rem); }
body.pfv .pfx-home .pfx-groups .pfx-grid > article.pfx-tile {
    display:block; min-height:0; border:0; border-top:1px solid var(--mdi-rule); border-radius:0; box-shadow:none;
    padding:.95rem 0; background:transparent; color:inherit; grid-row:auto; overflow:visible;
}
body.pfv .pfx-home .pfx-groups .pfx-grid > article.pfx-tile:has(>img) {
    display:grid; grid-template-columns:var(--mdi-profile) minmax(0,1fr);
    align-items:start; gap:.85rem; padding-top:.95rem;
}
body.pfv .pfx-home .pfx-groups .pfx-grid > .pfx-tile > div,
body.pfv .pfx-home .pfx-groups .pfx-grid > .pfx-tile:has(>img) > div {
    grid-area:auto; align-self:start; color:inherit; background:none; padding:0;
}
body.pfv .pfx-home .pfx-groups .pfx-grid > .pfx-tile > img {
    grid-area:auto; width:100%; height:auto; min-height:0; max-height:none;
    object-fit:cover; aspect-ratio:1; border-radius:var(--mdi-portrait);
}
body.pfv .pfx-home .pfx-groups .pfx-grid > .pfx-tile :is(h3,a) { color:var(--mdi-ink); }
body.pfv .pfx-home .pfx-groups .pfx-grid > .pfx-tile p { color:inherit; line-height:1.48; }
body.pfv .pfx-home .pfx-groups .pfx-grid > .pfx-tile h3 { font-size:clamp(1.13rem,1.55vw,1.5rem); margin:0 0 .35em; line-height:1.22; }
body.pfv .pfx-group-archive .parafeo-people,
body.pfv [data-parafeo-module="duszpasterze"] > .parafeo-people {
    display:grid; grid-template-columns:repeat(2,minmax(0,1fr)); gap:0 clamp(1.4rem,4vw,4rem);
}
body.pfv .pfx-group-archive .parafeo-people > article,
body.pfv [data-parafeo-module="duszpasterze"] .parafeo-people > article {
    align-content:start; display:flow-root; min-width:0; margin:0;
    border:0; border-top:1px solid var(--mdi-rule); border-radius:0;
    background:transparent; padding:1.15rem 0; box-shadow:none;
}
body.pfv .pfx-group-archive .parafeo-people > article > h2,
body.pfv [data-parafeo-module="duszpasterze"] .parafeo-people > article > h2 {
    margin:0 0 .45em; font:400 clamp(1.32rem,2.1vw,1.9rem)/1.2 var(--mdi-face); color:var(--mdi-ink); overflow-wrap:anywhere;
}
body.pfv .pfx-group-archive .parafeo-people > article > p,
body.pfv [data-parafeo-module="duszpasterze"] .parafeo-people > article > p {
    line-height:1.54; margin:.36em 0 .7em; max-width:62ch;
}
body.pfv .pfx-group-archive .parafeo-people > article:has(>img),
body.pfv [data-parafeo-module="duszpasterze"] .parafeo-people > article:has(>img) {
    position:relative; padding-inline-start:calc(var(--mdi-profile) + 1rem);
}
body.pfv .pfx-group-archive .parafeo-people > article > img,
body.pfv [data-parafeo-module="duszpasterze"] .parafeo-people > article > img {
    position:absolute; inset:1.15rem auto auto 0; width:var(--mdi-profile); height:var(--mdi-profile);
    min-height:0; object-fit:cover; border-radius:var(--mdi-portrait); margin:0;
}
body.pfv .pfx-home .pfx-albums .pfx-grid > article.pfx-tile {
    display:block; border:0; border-radius:0; margin:0; padding:0; background:none; align-self:start; box-shadow:none;
}
body.pfv .pfx-home .pfx-albums .pfx-grid > .pfx-tile > img {
    display:block; height:auto; min-height:0; max-height:none; aspect-ratio:1.65; object-fit:cover;
}
body.pfv .pfx-home .pfx-albums .pfx-grid > .pfx-tile > div { padding:.65rem 0 .15rem; }
body.pfv .pfx-home .pfx-albums .pfx-grid > .pfx-tile h3 { line-height:1.18; margin:0; font-size:clamp(1.13rem,1.6vw,1.65rem); }
body.pfv .pfx-home .pfx-albums .pfx-grid:has(>article:only-child) { grid-template-columns:minmax(0,1fr); }
body.pfv .pmd-rites > .pmd-rite img { border-radius:var(--mdi-rite); }
body.pfv main .pfw-today { border-inline-start:3px solid var(--mdi-ink); border-radius:0; background:var(--mdi-wash); padding:1rem clamp(1rem,2vw,1.5rem); }
body.pfv main .pfw-today .pfw-lines { color:var(--mdi-ink); }
body.pfv main .pfw-schedule dt { font-weight:650; }
body.pfv main .pfw-schedule dd { font-variant-numeric:tabular-nums; overflow-wrap:anywhere; }
body.pfv main .pfw-latest-notice { border:0; border-inline-start:4px solid var(--mdi-ink); background:var(--mdi-wash); padding:clamp(1rem,2.25vw,2rem); }
body.pfv main .pfw-latest-notice > :first-child { margin-top:0; }
body.pfv main .pfw-older-notices li { padding-block:.6rem; }
body.pfv.post-type-archive-mass_intention main .post-grid { grid-template-columns:1fr; }
body.pfv.post-type-archive-mass_intention main .post-card {
    width:100%; max-width:70rem; display:block; padding:.9rem 0 1rem; border:0;
    border-bottom:1px solid var(--mdi-rule); border-radius:0; background:none; box-shadow:none;
}
body.pfv.post-type-archive-mass_intention main .post-card > h2 { font-size:clamp(1.2rem,2vw,1.65rem); margin:0 0 .35rem; }
body.pfv.post-type-archive-mass_intention main .post-card > .entry-content { max-width:70ch; }
body.pfv.post-type-archive-mass_intention main .post-card > .text-link { display:inline-flex; align-items:center; min-height:38px; }
body.pfv .pfx-archive-nav { display:flex; flex-flow:row wrap; gap:.5rem 1rem; }
body.pfv .pfx-archive .pfx-search > div { display:flex; flex-wrap:wrap; gap:.5rem; }
body.pfv .pfx-archive .pfx-search input { flex:1 1 12rem; min-width:0; }
body.pfv .pfx-archive .pfx-search button { min-height:44px; }

@media(min-width:800px) {
    /* Anielska uses a quiet album with broad photographs and small portraits of the groups. */
    body.pfv-anielska .pfx-home .pfx-groups .pfx-grid { grid-template-columns:repeat(2,minmax(0,1fr)); }
    body.pfv-anielska .pfx-home .pfx-albums .pfx-grid { grid-template-columns:1.32fr repeat(2,minmax(0,1fr)); align-items:end; }
    body.pfv-anielska .pfx-home .pfx-albums .pfx-grid > .pfx-tile img { border-radius:80px 80px 7px 7px; aspect-ratio:1.55; }
    body.pfv-anielska .pfx-home .pfx-albums .pfx-grid > .pfx-tile:first-child img { aspect-ratio:1.68; }
    body.pfv-anielska.blog main.page-main .post-grid > .post-card:first-child:has(>a img) {
        display:grid; grid-column:1/-1; grid-template-columns:minmax(0,1.12fr) minmax(0,1fr);
        gap:.35rem clamp(1.4rem,4vw,3.5rem); align-content:center; align-items:start;
    }
    body.pfv-anielska.blog main.page-main .post-grid > .post-card:first-child > a:first-child { grid-column:1; grid-row:1/span 4; }
    body.pfv-anielska.blog main.page-main .post-grid > .post-card:first-child > :not(a:first-child) { grid-column:2; align-self:center; }

    /* Jan: groups form a directory; photographs read as a separate newspaper photo section. */
    body.pfv-jan .pfx-home .pfx-groups .pfx-grid { grid-template-columns:repeat(3,minmax(0,1fr)); }
    body.pfv-jan .pfx-home .pfx-groups .pfx-grid > article.pfx-tile:has(>img) { grid-template-columns:64px minmax(0,1fr); }
    body.pfv-jan .pfx-home .pfx-albums .pfx-grid { grid-template-columns:repeat(3,minmax(0,1fr)); }
    body.pfv-jan .pfx-home .pfx-albums .pfx-grid > article.pfx-tile { grid-row:auto; border-bottom:3px double var(--mdi-rule); padding-bottom:.8rem; }
    body.pfv-jan .pfx-home .pfx-albums .pfx-grid > article.pfx-tile > img { aspect-ratio:1.75; }
    body.pfv-jan.blog main.page-main .post-grid { display:grid; grid-template-columns:repeat(2,minmax(0,1fr)); gap:1.6rem 2.65rem; }
    body.pfv-jan.blog main.page-main .post-grid > .post-card { display:block; margin:0; padding:1rem 0 0; border-top:2px solid var(--mdi-ink); }
    body.pfv-jan.blog main.page-main .post-grid > .post-card > a:first-child { float:left; width:38%; margin:0 1rem .35rem 0; }
    body.pfv-jan.blog main.page-main .post-grid > .post-card img { width:100%; height:auto; aspect-ratio:1.25; object-fit:cover; }
    body.pfv-jan.blog main.page-main .post-grid > .post-card h2 { margin-top:0; }

    /* Śnieżna pairs a photo-led gallery with a plain directory of parish groups. */
    body.pfv-sniezna .pfx-home .pfx-groups .pfx-grid { grid-template-columns:repeat(2,minmax(0,1fr)); }
    body.pfv-sniezna .pfx-home .pfx-albums .pfx-grid { grid-template-columns:1.3fr minmax(0,1fr); gap:1rem 1.5rem; }
    body.pfv-sniezna .pfx-home .pfx-albums .pfx-grid > article.pfx-tile:first-child { grid-row:span 2; }
    body.pfv-sniezna .pfx-home .pfx-albums .pfx-grid > article.pfx-tile:not(:first-child):has(>img) { display:grid; grid-template-columns:40% minmax(0,1fr); align-items:center; gap:1rem; }
    body.pfv-sniezna .pfx-home .pfx-albums .pfx-grid > article.pfx-tile:not(:first-child) img { aspect-ratio:1.5; }
    body.pfv-sniezna.blog main.page-main .post-grid > .post-card { border-top:2px solid var(--mdi-ink); padding-top:.6rem; }

    /* Wawrzyniec keeps the panoramas of the original design and the shape of a Roman arch. */
    body.pfv-wawrzyniec .pfx-home .pfx-groups .pfx-grid { grid-template-columns:repeat(2,minmax(0,1fr)); }
    body.pfv-wawrzyniec .pfx-home .pfx-albums .pfx-grid { grid-template-columns:1.6fr minmax(0,1fr) minmax(0,1fr); }
    body.pfv-wawrzyniec .pfx-home .pfx-albums .pfx-grid > article.pfx-tile { grid-row:auto; }
    body.pfv-wawrzyniec .pfx-home .pfx-albums .pfx-grid > .pfx-tile:first-child img { aspect-ratio:2.2; }
    body.pfv-wawrzyniec .pfx-home .pfx-albums .pfx-grid > .pfx-tile:not(:first-child) img { aspect-ratio:1.65; }
    body.pfv-wawrzyniec.blog main.page-main .post-grid > article:first-child:has(>a img) {
        display:grid; grid-template-columns:minmax(0,1fr) minmax(0,1fr); align-items:center; background:var(--mdi-wash);
        border-top:0; gap:.35rem 1.4rem; padding:0 1.4rem 0 0; margin-bottom:1rem;
    }
    body.pfv-wawrzyniec.blog main.page-main .post-grid > article:first-child > a:first-child {
        grid-column:1; grid-row:1/span 4; float:none; width:100%; margin:0; justify-self:stretch;
    }
    body.pfv-wawrzyniec.blog main.page-main .post-grid > article:first-child > :not(a:first-child) { grid-column:2; }
    body.pfv-wawrzyniec.blog main.page-main .post-grid > article:first-child img { width:100%; height:auto; aspect-ratio:1.7; object-fit:cover; }

    /* Quo Vadis retains the left rail and uses a second, narrow track for group portraits. */
    body.pfv-quovadis .pfx-home .pfx-groups .pfx-grid { grid-template-columns:1fr; }
    body.pfv-quovadis .pfx-home .pfx-albums .pfx-grid { grid-template-columns:repeat(2,minmax(0,1fr)); gap:1.6rem; }
    body.pfv-quovadis .pfx-home .pfx-albums .pfx-grid > article.pfx-tile:first-child { grid-column:1/-1; }
    body.pfv-quovadis .pfx-home .pfx-albums .pfx-grid > article.pfx-tile:first-child img { aspect-ratio:2.65; }
    body.pfv-quovadis.blog main.page-main .post-grid { display:block; }
    body.pfv-quovadis.blog main.page-main .post-card:has(>a img) { grid-template-columns:minmax(105px,23%) minmax(0,1fr); gap:.25rem 1.3rem; }
}
body.pfv-anielska .pfx-week-obituaries { background:linear-gradient(120deg,var(--mdi-wash),transparent); }
body.pfv-jan .pfx-week .pfx-heading { border-block-end:3px double var(--mdi-ink); }
body.pfv-sniezna .pfx-home .pfx-week-intentions { border-inline-start:3px solid var(--mdi-ink); }
body.pfv-wawrzyniec .pfx-home .pfx-albums .pfx-grid > article.pfx-tile { padding-bottom:.75rem; border-block-end:2px solid var(--mdi-rule); }
body.pfv-quovadis .pfx-home .pfx-groups .pfx-grid > article.pfx-tile:has(>img) { position:relative; }
body.pfv-quovadis .pfx-home .pfx-groups article:has(>img):not(:last-child)::before { content:""; position:absolute; inset-inline-start:calc(var(--mdi-profile) / 2); top:calc(var(--mdi-profile) + 1.1rem); bottom:0; border-inline-start:1px solid var(--mdi-rule); }

@media(max-width:799px) {
    body.pfv { --mdi-profile:72px; }
    body.pfv .pfx-home .pfx-groups .pfx-grid, body.pfv .pfx-group-archive .parafeo-people,
    body.pfv [data-parafeo-module="duszpasterze"] > .parafeo-people { grid-template-columns:minmax(0,1fr); }
    body.pfv .pfx-home .pfx-groups .pfx-grid > article.pfx-tile:has(>img) { gap:.8rem; }
    body.pfv .pfx-home .pfx-albums .pfx-grid { grid-template-columns:repeat(2,minmax(0,1fr)); gap:1rem; }
    body.pfv .pfx-home .pfx-albums .pfx-grid > article.pfx-tile:only-child { grid-column:1/-1; }
    body.pfv .pfx-home .pfx-albums .pfx-grid:has(>article:nth-child(3):last-child) > article:first-child { grid-column:1/-1; }
    body.pfv .pfx-home .pfx-albums .pfx-grid > .pfx-tile > img { aspect-ratio:1.75; }
    body.pfv .pfx-home .pfx-albums .pfx-tile h3 { font-size:1.12rem; }
    body.pfv :is(.pfx-section,.pfx-week) .pfx-heading .pfe-more { min-height:36px; }
    body.pfv-jan .pfx-home .pfx-albums .pfx-grid > article:first-child { border-bottom:3px double var(--mdi-rule); padding-bottom:.6rem; }
    body.pfv-anielska .pfx-home .pfx-albums img { border-radius:28px 28px 4px 4px; }
}
@media(max-width:350px) {
    body.pfv { --mdi-profile:56px; }
    body.pfv .pfx-home .pfx-albums .pfx-grid { grid-template-columns:minmax(0,1fr); }
}

/* A weekday, a time and a purpose form a single appointment even as text wraps. */
body.pfv main .pfw-calendar-month .pfw-event {
    display:grid; grid-template-columns:minmax(3rem,max-content) minmax(0,1fr);
    align-items:start; gap:clamp(.75rem,2.4vw,1.6rem); padding-block:1.05rem;
}
body.pfv main .pfw-agenda-date { font-variant-numeric:tabular-nums; color:var(--mdi-ink); }
body.pfv main .pfw-calendar-month .pfw-event-copy { min-width:0; }
body.pfv main .pfw-calendar-download { display:inline-flex; align-items:center; min-height:40px; }
body.pfv main .pfw-schedule { margin-block:1rem 1.5rem; }
body.pfv-anielska main :is(.pfw-latest-notice,.pfw-today) {
    border-inline-start:0; border-block:1px solid var(--mdi-rule); border-radius:0 28px 0 0;
    background:linear-gradient(115deg,var(--mdi-wash),var(--pf-paper) 87%);
}
body.pfv-jan main :is(.pfw-latest-notice,.pfw-today) {
    border:0; border-top:3px double var(--mdi-ink); border-bottom:1px solid var(--mdi-rule); padding-inline:0; background:none;
}
body.pfv-jan main .pfw-calendar-month > h2 { padding-bottom:.36em; border-bottom:3px double var(--mdi-ink); }
body.pfv-jan main .pfw-older-notices li { border-bottom:1px dotted var(--mdi-rule); }
body.pfv-sniezna main .pfw-calendar-month .pfw-agenda-date {
    color:var(--pf-paper,white); background:var(--mdi-ink); border:0; border-radius:3px; padding:.4em .7em;
}
body.pfv-wawrzyniec main .pfw-calendar-month .pfw-agenda-date {
    color:var(--mdi-ink); background:var(--mdi-wash); border:1px solid var(--mdi-rule);
    border-radius:55% 55% 3px 3px; padding:.65em .75em .45em;
}
body.pfv-quovadis main .pfw-calendar-month .pfw-event { border-inline-start:1px solid var(--mdi-rule); padding-inline-start:.85em; }
body.pfv-quovadis main .pfw-latest-notice { border:0; border-block:1px solid var(--mdi-rule); padding-inline:0; background:none; }
body.pfv .pfx-group-archive .parafeo-people > article:has(>img),
body.pfv [data-parafeo-module="duszpasterze"] .parafeo-people > article:has(>img) { min-block-size:calc(var(--mdi-profile) + 2.3rem); }

@media(min-width:800px) {
    body.pfv-anielska .pfx-home .pfx-groups .pfx-grid { grid-template-columns:minmax(0,1.18fr) minmax(0,1fr); }
    body.pfv-anielska .pfx-home .pfx-groups .pfx-grid > article.pfx-tile:first-child:has(>img) {
        grid-row:span 2; grid-template-columns:minmax(90px,35%) minmax(0,1fr);
        align-items:center; padding-bottom:1.25rem;
    }
    body.pfv-anielska .pfx-home .pfx-groups .pfx-grid > article.pfx-tile:first-child > img { aspect-ratio:.87; }
    body.pfv-sniezna .pfx-home .pfx-groups .pfx-grid { grid-template-columns:repeat(3,minmax(0,1fr)); }
    body.pfv-sniezna .pfx-home .pfx-groups .pfx-grid > article.pfx-tile:has(>img) {
        display:block; border:0; border-inline-start:3px solid var(--mdi-rule); padding:.35rem 0 .35rem 1rem;
    }
    body.pfv-sniezna .pfx-home .pfx-groups .pfx-grid > article.pfx-tile > img { float:right; width:62px; margin:0 0 .5rem .75rem; }
    body.pfv-sniezna .pfx-home .pfx-groups .pfx-grid > article.pfx-tile > div { display:block; }
    body.pfv-wawrzyniec .pfx-home .pfx-groups .pfx-grid > article.pfx-tile:has(>img) {
        border:0; background:var(--mdi-wash); padding:.85rem; align-items:center;
    }
    body.pfv-wawrzyniec .pfx-home .pfx-groups .pfx-grid { gap:.8rem 1rem; }
    body.pfv-wawrzyniec .pfx-group-archive .parafeo-people { gap:1rem 1.75rem; }
    body.pfv-wawrzyniec .pfx-group-archive .parafeo-people > article {
        border-top:2px solid var(--mdi-rule);
    }
}
@media(max-width:799px) {
    body.pfv main.page-main.wrap .page-heading h1, body.pfv main.pfx-archive > h1 {
        font-size:clamp(1.9rem,8.2vw,2.55rem); line-height:1.12; overflow-wrap:anywhere; text-wrap:balance; margin-block:.3em .45em;
    }
    body.pfv main.page-main .page-heading { padding-block:.35rem 1rem; }
}

