/* Our Lady of the Valley Parish — base stylesheet.
   Tailwind utilities are available via CDN; this file carries the
   parish palette and the components that aren't well-expressed in utilities. */

:root {
    /* Palette — Marian blue + warm cream + burgundy accent + gold rule. */
    --parish-navy: #1e3a5f;        /* Marian blue, deep */
    --parish-blue: #2b5aa0;        /* link / hover */
    --parish-blue-soft: #e8eef8;   /* nav underline / tinted sections */
    --parish-cream: #faf7ef;       /* page background */
    --parish-cream-warm: #f5efe0;  /* card tint */
    --parish-ink: #1a1a1a;
    --parish-muted: #5f6b7a;
    --parish-muted-2: #8a95a3;
    --parish-rule: #e2ddd0;        /* warm hairline */
    --parish-gold: #b58b2a;        /* liturgical gold */
    --parish-burgundy: #8b2f3f;    /* accent for CTAs */
    --parish-white: #ffffff;
    --parish-shadow: 0 10px 25px -15px rgba(30, 58, 95, 0.4);
}

* { box-sizing: border-box; }

html { scroll-behavior: smooth; }

body.parish-body {
    background: var(--parish-cream);
    color: var(--parish-ink);
    font-family: 'Inter', system-ui, -apple-system, Segoe UI, sans-serif;
    margin: 0;
    line-height: 1.55;
}

h1, h2, h3, h4 {
    font-family: 'Cormorant Garamond', Georgia, 'Times New Roman', serif;
    color: var(--parish-navy);
    letter-spacing: 0.01em;
}

a { color: var(--parish-blue); text-decoration: none; }
a:hover { color: var(--parish-navy); }

/* ---------- Top strip ---------- */
.parish-strip {
    background: var(--parish-navy);
    color: #e8eef8;
    font-size: 0.8rem;
    letter-spacing: 0.08em;
    text-transform: uppercase;
}
.parish-strip-inner {
    max-width: 1200px;
    margin: 0 auto;
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 0.5rem 1rem;
}
.parish-strip-links { display: flex; gap: 1rem; }
.parish-strip-link {
    color: #e8eef8;
    opacity: 0.9;
    font-weight: 500;
}
.parish-strip-link:hover { opacity: 1; color: var(--parish-white); }
.parish-strip-link-btn {
    background: none;
    border: 0;
    padding: 0;
    cursor: pointer;
    font: inherit;
    text-transform: inherit;
    letter-spacing: inherit;
}

/* ---------- Primary nav ---------- */
.parish-nav {
    background: var(--parish-white);
    border-bottom: 1px solid var(--parish-rule);
    position: sticky;
    top: 0;
    z-index: 40;
}
.parish-nav-inner {
    max-width: 1200px;
    margin: 0 auto;
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 0.9rem 1.25rem;
    gap: 2rem;
}
.parish-brand {
    display: flex;
    align-items: center;
    gap: 0.65rem;
    text-decoration: none;
    flex-shrink: 0;
}
.parish-brand-mark {
    width: 2.25rem; height: 2.25rem;
    border-radius: 999px;
    background: var(--parish-navy);
    color: var(--parish-white);
    display: inline-flex; align-items: center; justify-content: center;
    font-size: 0.9rem;
}
.parish-brand-text { display: flex; flex-direction: column; line-height: 1.1; }
.parish-brand-title {
    font-family: 'Cormorant Garamond', serif;
    font-weight: 600;
    font-size: 1.25rem;
    color: var(--parish-navy);
    letter-spacing: 0.005em;
}
.parish-brand-sub {
    font-size: 0.68rem;
    color: var(--parish-muted-2);
    letter-spacing: 0.14em;
    text-transform: uppercase;
    margin-top: 0.1rem;
}

/* Nav links — airy serif-adjacent sans, no button chrome. Hover and active
   both use a thin gold underline so the state is subtle and consistent. */
.parish-nav-links {
    display: flex;
    gap: 0.15rem;
    align-items: center;
}
.parish-nav-item { position: relative; }
.parish-nav-chevron {
    font-size: 0.6rem;
    margin-left: 0.25rem;
    opacity: 0.6;
    transition: transform 0.2s ease;
}
.parish-nav-item:hover .parish-nav-chevron { transform: rotate(180deg); opacity: 1; }
.parish-nav-dropdown {
    position: absolute;
    top: 100%;
    left: 50%;
    transform: translateX(-50%) translateY(-6px);
    min-width: 230px;
    background: var(--parish-white);
    border: 1px solid var(--parish-rule);
    border-radius: 0.5rem;
    padding: 0.5rem 0;
    box-shadow: 0 20px 40px -20px rgba(30, 58, 95, 0.35);
    opacity: 0;
    visibility: hidden;
    pointer-events: none;
    transition: opacity 0.15s ease, transform 0.2s ease, visibility 0.15s;
    z-index: 50;
}
.parish-nav-item:hover .parish-nav-dropdown,
.parish-nav-item:focus-within .parish-nav-dropdown {
    opacity: 1;
    visibility: visible;
    pointer-events: auto;
    transform: translateX(-50%) translateY(0);
}
.parish-nav-dropdown-link {
    display: block;
    padding: 0.5rem 1rem;
    font-size: 0.85rem;
    color: var(--parish-ink);
    text-decoration: none;
    letter-spacing: 0.01em;
    transition: color 0.15s ease, background 0.15s ease;
    white-space: nowrap;
}
.parish-nav-dropdown-link:hover {
    background: var(--parish-blue-soft);
    color: var(--parish-navy);
}

.parish-nav-link {
    position: relative;
    display: inline-flex;
    align-items: center;
    color: var(--parish-ink);
    padding: 0.4rem 0.75rem;
    font-weight: 500;
    font-size: 0.88rem;
    letter-spacing: 0.03em;
    white-space: nowrap;
    text-decoration: none;
    transition: color 0.15s ease;
}
.parish-nav-link::after {
    content: "";
    position: absolute;
    left: 0.75rem; right: 0.75rem;
    bottom: 0.05rem;
    height: 1px;
    background: var(--parish-gold);
    transform: scaleX(0);
    transform-origin: center;
    transition: transform 0.2s ease;
}
.parish-nav-link:hover,
.parish-nav-link.is-active { color: var(--parish-navy); }
.parish-nav-link:hover::after,
.parish-nav-link.is-active::after { transform: scaleX(1); }

.parish-nav-menu-btn {
    display: none;
    background: transparent;
    border: 1px solid var(--parish-rule);
    border-radius: 0.4rem;
    padding: 0.5rem 0.7rem;
    color: var(--parish-navy);
    cursor: pointer;
    font-size: 1rem;
    transition: background 0.15s ease;
}
.parish-nav-menu-btn:hover { background: var(--parish-cream-warm); }

.parish-nav-mobile {
    display: none;
    flex-direction: column;
    gap: 0;
    padding: 0.5rem 0.75rem 1rem;
    background: var(--parish-white);
    border-top: 1px solid var(--parish-rule);
}
.parish-nav-mobile[hidden] { display: none !important; }
/* The header is sticky, so a menu taller than the screen can't be reached
   by scrolling the page. Cap it to the space below the header bar and let
   it scroll on its own. --mobile-menu-top is set by main.js on open. */
.parish-nav-mobile.is-open {
    display: flex;
    max-height: calc(100vh - var(--mobile-menu-top, 64px));
    max-height: calc(100dvh - var(--mobile-menu-top, 64px));
    overflow-y: auto;
    overscroll-behavior: contain;
    -webkit-overflow-scrolling: touch;
}
body.parish-menu-open { overflow: hidden; }
.parish-nav-mobile-link {
    padding: 0.75rem 1rem;
    color: var(--parish-ink);
    font-weight: 500;
    border-bottom: 1px solid var(--parish-rule);
    text-decoration: none;
}
.parish-nav-mobile-link:last-child { border-bottom: 0; }
.parish-nav-mobile-link:hover { color: var(--parish-navy); background: var(--parish-cream-warm); }
.parish-nav-mobile-link-muted { color: var(--parish-muted); font-size: 0.9rem; }
.parish-nav-mobile-link-child {
    padding-left: 2rem;
    font-size: 0.9rem;
    color: var(--parish-muted);
    font-weight: 400;
}

/* Hide the subtitle below desktop; collapse nav to hamburger below a
   width where the full label row still breathes. */
@media (max-width: 1080px) {
    .parish-brand-sub { display: none; }
}
@media (max-width: 900px) {
    .parish-nav-links { display: none; }
    .parish-nav-menu-btn { display: inline-flex; align-items: center; justify-content: center; }
}

/* ---------- Buttons ---------- */
.parish-btn {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.75rem 1.5rem;
    border-radius: 999px;
    font-weight: 600;
    font-size: 0.95rem;
    border: 1px solid transparent;
    cursor: pointer;
    transition: all 0.2s ease;
    text-decoration: none;
}
.parish-btn-primary {
    background: var(--parish-navy);
    color: var(--parish-white);
}
.parish-btn-primary:hover {
    background: var(--parish-blue);
    color: var(--parish-white);
    box-shadow: var(--parish-shadow);
}
.parish-btn-ghost {
    background: transparent;
    color: var(--parish-navy);
    border-color: var(--parish-navy);
}
.parish-btn-ghost:hover { background: var(--parish-blue-soft); }
.parish-btn-wide { width: 100%; justify-content: center; }

/* ---------- Hero ---------- */
.parish-hero {
    background: linear-gradient(140deg, var(--parish-navy) 0%, #2a4e82 55%, #3666a3 100%);
    color: var(--parish-white);
    padding: 5rem 1rem 6rem;
    position: relative;
    overflow: hidden;
}
.parish-hero::after {
    content: "";
    position: absolute; inset: auto 0 0 0;
    height: 4px;
    background: linear-gradient(90deg, transparent, var(--parish-gold), transparent);
}
.parish-hero-inner {
    max-width: 900px;
    margin: 0 auto;
    text-align: center;
}
.parish-eyebrow {
    text-transform: uppercase;
    letter-spacing: 0.18em;
    font-size: 0.8rem;
    color: var(--parish-gold);
    font-weight: 600;
    margin-bottom: 0.5rem;
}
.parish-hero-title {
    font-size: clamp(2.25rem, 5vw, 3.75rem);
    line-height: 1.1;
    margin: 0 0 1rem;
    color: var(--parish-white);
    font-weight: 600;
}
.parish-hero-lede {
    font-size: 1.15rem;
    max-width: 42rem;
    margin: 0 auto 2rem;
    color: #d8e2f1;
}
.parish-hero-actions {
    display: flex;
    gap: 1rem;
    justify-content: center;
    flex-wrap: wrap;
}
.parish-hero-actions .parish-btn-primary {
    background: var(--parish-white);
    color: var(--parish-navy);
}
.parish-hero-actions .parish-btn-primary:hover {
    background: var(--parish-cream);
    color: var(--parish-navy);
}
.parish-hero-actions .parish-btn-ghost {
    color: var(--parish-white);
    border-color: rgba(255,255,255,0.4);
}
.parish-hero-actions .parish-btn-ghost:hover {
    background: rgba(255,255,255,0.1);
    color: var(--parish-white);
}

/* ---------- Sections ---------- */
.parish-section { padding: 4rem 1rem; }
.parish-section-tinted { background: var(--parish-cream-warm); }
.parish-container { max-width: 1120px; margin: 0 auto; }
.parish-section-head { text-align: center; margin-bottom: 2.5rem; }
.parish-section-title {
    font-size: clamp(1.75rem, 3.5vw, 2.5rem);
    margin: 0;
    color: var(--parish-navy);
}
.parish-two-col {
    display: grid;
    gap: 2.5rem;
    grid-template-columns: 1fr 1fr;
    align-items: start;
}
@media (max-width: 820px) {
    .parish-two-col { grid-template-columns: 1fr; }
}

.parish-prose {
    color: #2a3340;
    font-size: 1rem;
    line-height: 1.7;
    margin: 0 0 1rem;
}
.parish-prose p { margin: 0 0 1rem; }

/* ---------- Cards ---------- */
.parish-card {
    background: var(--parish-white);
    border: 1px solid var(--parish-rule);
    border-radius: 0.75rem;
    padding: 1.75rem;
    box-shadow: 0 4px 14px -10px rgba(30,58,95,0.2);
}
.parish-card-title {
    font-size: 1.5rem;
    margin: 0 0 1rem;
    color: var(--parish-navy);
}
.parish-card-accent {
    background: var(--parish-cream-warm);
    border-color: var(--parish-gold);
    border-left-width: 4px;
}
.parish-card-soft {
    background: var(--parish-blue-soft);
    border-color: var(--parish-blue-soft);
}
.parish-card-note {
    margin-top: 1rem;
    font-size: 0.9rem;
    color: var(--parish-muted);
    font-style: italic;
}

/* ---------- Mass times list ---------- */
.parish-mass-grid {
    display: grid;
    gap: 1.5rem;
    grid-template-columns: repeat(3, 1fr);
}
@media (max-width: 980px) { .parish-mass-grid { grid-template-columns: 1fr; } }
.parish-mass-list { list-style: none; padding: 0; margin: 0; }
.parish-mass-list li {
    display: flex;
    justify-content: space-between;
    align-items: baseline;
    gap: 1rem;
    padding: 0.75rem 0;
    border-bottom: 1px dashed var(--parish-rule);
}
.parish-mass-list li:last-child { border-bottom: 0; }
.parish-mass-list span { color: var(--parish-muted); font-size: 0.9rem; }
.parish-mass-list strong { color: var(--parish-navy); font-weight: 600; }

/* ---------- Forms ---------- */
.parish-form { display: flex; flex-direction: column; gap: 1rem; max-width: 540px; }
.parish-form-row { display: grid; gap: 1rem; grid-template-columns: 1fr 1fr; }
@media (max-width: 540px) { .parish-form-row { grid-template-columns: 1fr; } }
.parish-field { display: flex; flex-direction: column; gap: 0.4rem; }
.parish-field label {
    font-weight: 500;
    font-size: 0.85rem;
    color: var(--parish-navy);
}
.parish-field-optional { color: var(--parish-muted-2); font-weight: 400; }
.parish-field input, .parish-field textarea, .parish-field select {
    padding: 0.6rem 0.75rem;
    border: 1px solid var(--parish-rule);
    border-radius: 0.5rem;
    font: inherit;
    color: var(--parish-ink);
    background: var(--parish-white);
}
.parish-field input:focus, .parish-field textarea:focus, .parish-field select:focus {
    outline: 2px solid var(--parish-blue);
    outline-offset: 1px;
    border-color: var(--parish-blue);
}
.parish-honeypot {
    position: absolute;
    left: -9999px;
    width: 1px; height: 1px;
    overflow: hidden;
}
.parish-form-error {
    background: #fdeaec;
    border: 1px solid #f4b5bc;
    color: var(--parish-burgundy);
    padding: 0.75rem 1rem;
    border-radius: 0.5rem;
    font-size: 0.9rem;
    margin: 0;
}
.parish-form-success {
    background: #e8f3ec;
    border: 1px solid #b7dcc4;
    color: #205c37;
    padding: 0.75rem 1rem;
    border-radius: 0.5rem;
    font-size: 0.9rem;
    margin: 0;
}
.parish-contact-details {
    margin: 1.5rem 0;
    color: var(--parish-muted);
}
.parish-contact-details p { margin: 0.4rem 0; }
.parish-contact-details i { color: var(--parish-blue); margin-right: 0.4rem; }

/* ---------- Admin login ---------- */
.parish-login-section { min-height: 60vh; display: grid; place-items: center; padding: 3rem 1rem; }
.parish-login-card {
    background: var(--parish-white);
    border: 1px solid var(--parish-rule);
    border-radius: 1rem;
    padding: 2.5rem;
    max-width: 420px;
    width: 100%;
    box-shadow: 0 20px 60px -30px rgba(30,58,95,0.4);
}
.parish-login-head { text-align: center; margin-bottom: 1.5rem; }
.parish-login-head h1 { font-size: 1.75rem; margin: 1rem 0 0.25rem; }
.parish-login-head p { color: var(--parish-muted); font-size: 0.9rem; margin: 0; }
.parish-login-mark { margin: 0 auto; }

/* ---------- Admin shell ---------- */
.parish-admin-shell {
    display: grid;
    grid-template-columns: 240px 1fr;
    min-height: calc(100vh - 160px);
}
@media (max-width: 820px) {
    .parish-admin-shell { grid-template-columns: 1fr; }
}
.parish-admin-sidebar {
    background: var(--parish-navy);
    color: #d8e2f1;
    padding: 1.5rem 1rem;
    display: flex;
    flex-direction: column;
}
.parish-admin-sidebar-head { padding: 0 0.5rem 1rem; border-bottom: 1px solid rgba(255,255,255,0.1); }
.parish-admin-sidebar-eyebrow {
    text-transform: uppercase;
    font-size: 0.7rem;
    letter-spacing: 0.15em;
    color: var(--parish-gold);
    margin: 0;
}
.parish-admin-sidebar-user { margin: 0.25rem 0 0; color: var(--parish-white); font-weight: 600; }
.parish-admin-sidebar-nav { display: flex; flex-direction: column; gap: 0.25rem; margin: 1rem 0; flex: 1; }
.parish-admin-sidebar-section {
    text-transform: uppercase;
    font-size: 0.7rem;
    letter-spacing: 0.12em;
    color: var(--parish-muted-2);
    padding: 1rem 0.75rem 0.5rem;
}
.parish-admin-sidebar-link {
    display: flex;
    align-items: center;
    gap: 0.6rem;
    padding: 0.6rem 0.75rem;
    border-radius: 0.4rem;
    color: #d8e2f1;
    font-size: 0.95rem;
    cursor: pointer;
    background: transparent;
    border: 0;
    text-align: left;
    width: 100%;
    font: inherit;
}
.parish-admin-sidebar-link:hover { background: rgba(255,255,255,0.08); color: var(--parish-white); }
.parish-admin-sidebar-link.is-active { background: rgba(255,255,255,0.14); color: var(--parish-white); }
.parish-admin-sidebar-link.is-disabled {
    opacity: 0.4;
    cursor: not-allowed;
}
.parish-admin-sidebar-link.is-disabled:hover { background: transparent; color: #d8e2f1; }
.parish-admin-sidebar-link-btn { font: inherit; }
.parish-admin-sidebar-foot {
    border-top: 1px solid rgba(255,255,255,0.1);
    padding-top: 0.5rem;
    display: flex;
    flex-direction: column;
    gap: 0.25rem;
}
.parish-admin-badge {
    margin-left: auto;
    background: var(--parish-burgundy);
    color: var(--parish-white);
    font-size: 0.7rem;
    padding: 0.1rem 0.45rem;
    border-radius: 999px;
    font-weight: 700;
}

.parish-admin-main { padding: 2rem; background: var(--parish-cream); }
.parish-admin-head { margin-bottom: 2rem; }
.parish-admin-head h1 { margin: 0; }
.parish-admin-subtitle { color: var(--parish-muted); margin: 0.25rem 0 1rem; }
.parish-admin-tabs { display: flex; gap: 0.25rem; }
.parish-admin-tab {
    padding: 0.4rem 0.9rem;
    border-radius: 999px;
    color: var(--parish-muted);
    font-size: 0.9rem;
    background: transparent;
    font-weight: 500;
}
.parish-admin-tab:hover { background: var(--parish-blue-soft); color: var(--parish-navy); }
.parish-admin-tab.is-active { background: var(--parish-navy); color: var(--parish-white); }

.parish-admin-stats {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 1rem;
    margin-bottom: 2rem;
}
@media (max-width: 820px) { .parish-admin-stats { grid-template-columns: 1fr; } }
.parish-admin-stat {
    background: var(--parish-white);
    border: 1px solid var(--parish-rule);
    border-radius: 0.75rem;
    padding: 1.25rem 1.5rem;
}
.parish-admin-stat-label {
    display: block;
    font-size: 0.8rem;
    text-transform: uppercase;
    letter-spacing: 0.1em;
    color: var(--parish-muted);
}
.parish-admin-stat-value {
    display: block;
    font-size: 2.25rem;
    font-weight: 600;
    color: var(--parish-navy);
    margin-top: 0.25rem;
    font-family: 'Cormorant Garamond', serif;
}

.parish-admin-panel {
    background: var(--parish-white);
    border: 1px solid var(--parish-rule);
    border-radius: 0.75rem;
    padding: 1.5rem;
}
.parish-admin-panel-head {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 1rem;
}
.parish-admin-panel-head h2 { margin: 0; font-size: 1.4rem; }
.parish-admin-link {
    color: var(--parish-blue);
    background: none;
    border: 0;
    padding: 0;
    cursor: pointer;
    font: inherit;
    font-weight: 500;
}
.parish-admin-link:hover { color: var(--parish-navy); text-decoration: underline; }
.parish-admin-link-danger { color: var(--parish-burgundy); }
.parish-admin-link-danger:hover { color: var(--parish-burgundy); }

.parish-admin-message-list { list-style: none; padding: 0; margin: 0; display: flex; flex-direction: column; gap: 1rem; }
.parish-admin-message {
    border: 1px solid var(--parish-rule);
    border-radius: 0.5rem;
    padding: 1rem 1.25rem;
    background: var(--parish-cream);
}
.parish-admin-message.is-unread {
    background: var(--parish-white);
    border-left: 3px solid var(--parish-burgundy);
}
.parish-admin-message-head {
    display: flex;
    gap: 0.75rem;
    align-items: baseline;
    flex-wrap: wrap;
    margin-bottom: 0.25rem;
}
.parish-admin-message-subject {
    background: var(--parish-blue-soft);
    color: var(--parish-navy);
    font-size: 0.75rem;
    padding: 0.1rem 0.5rem;
    border-radius: 999px;
}
.parish-admin-message-time { color: var(--parish-muted); font-size: 0.85rem; margin-left: auto; }
.parish-admin-message-contact { font-size: 0.9rem; color: var(--parish-muted); margin-bottom: 0.5rem; }
.parish-admin-message-body {
    white-space: pre-wrap;
    color: var(--parish-ink);
    margin: 0.5rem 0;
    line-height: 1.6;
}
.parish-admin-message-actions {
    display: flex;
    gap: 1rem;
    margin-top: 0.75rem;
    padding-top: 0.75rem;
    border-top: 1px dashed var(--parish-rule);
}
.parish-admin-empty { color: var(--parish-muted); text-align: center; padding: 2rem; margin: 0; }

/* ---------- Footer ---------- */
.parish-footer {
    background: var(--parish-navy);
    color: #d8e2f1;
    padding: 3.5rem 1rem 2rem;
    margin-top: 2rem;
}
.parish-footer-inner { max-width: 1200px; margin: 0 auto; }
.parish-footer-grid {
    display: grid;
    gap: 2rem;
    grid-template-columns: 2fr 1fr 1fr 1fr;
}
@media (max-width: 820px) { .parish-footer-grid { grid-template-columns: 1fr 1fr; } }
@media (max-width: 540px) { .parish-footer-grid { grid-template-columns: 1fr; } }
.parish-footer-title {
    font-family: 'Cormorant Garamond', serif;
    color: var(--parish-white);
    font-size: 1.5rem;
    margin: 0 0 0.75rem;
}
.parish-footer-subtitle {
    text-transform: uppercase;
    font-size: 0.8rem;
    letter-spacing: 0.1em;
    color: var(--parish-gold);
    margin: 0 0 0.75rem;
}
.parish-footer-text { color: #d8e2f1; margin: 0; line-height: 1.6; }
.parish-footer-address p, .parish-footer-list li {
    margin: 0.25rem 0;
    font-style: normal;
}
.parish-footer-list { list-style: none; padding: 0; }
.parish-footer a { color: #d8e2f1; }
.parish-footer a:hover { color: var(--parish-white); }
.parish-footer-bottom {
    margin-top: 2.5rem;
    padding-top: 1.5rem;
    border-top: 1px solid rgba(255,255,255,0.1);
    text-align: center;
    font-size: 0.85rem;
    color: var(--parish-muted-2);
}

/* ---------- Catholic Courier list ---------- */
.parish-courier-list { list-style: none; padding: 0; margin: 0 0 1.5rem; }
.parish-courier-list li {
    padding: 1rem 0;
    border-bottom: 1px dashed var(--parish-rule);
}
.parish-courier-list li:last-child { border-bottom: 0; }
.parish-courier-list a { display: flex; flex-direction: column; gap: 0.25rem; color: var(--parish-navy); }
.parish-courier-list a:hover strong { text-decoration: underline; }
.parish-courier-list strong { font-weight: 600; }
.parish-courier-meta { font-size: 0.85rem; color: var(--parish-muted); }

/* ---------- CMS page body (block-rendered) ---------- */
.parish-cms-body > * + * { margin-top: 1.5rem; }
.parish-cms-body p { line-height: 1.7; color: var(--parish-ink); margin: 0 0 1rem; }
.parish-cms-body ul, .parish-cms-body ol { padding-left: 1.5rem; line-height: 1.7; }

/* Block-level classes emitted by RenderBlocks */
.parish-block-heading { margin: 2rem 0 0.75rem; color: var(--parish-navy); }
.parish-block-heading-2 { font-size: 1.75rem; }
.parish-block-heading-3 { font-size: 1.4rem; }
.parish-block-heading-4 { font-size: 1.15rem; }
.parish-block-rich { line-height: 1.7; color: var(--parish-ink); }
.parish-block-rich p { margin: 0 0 1rem; }
.parish-block-rich a { text-decoration: underline; }
/* Shared by the public page and the admin Text editor, so what staff see is
   what visitors get. Tailwind's reset strips these otherwise. */
.parish-block-rich h2, .parish-block-rich h3, .parish-block-rich h4 { color: var(--parish-navy); margin: 1.5rem 0 0.6rem; }
.parish-block-rich h2 { font-size: 1.75rem; }
.parish-block-rich h3 { font-size: 1.4rem; }
.parish-block-rich h4 { font-size: 1.15rem; }
.parish-block-rich ul, .parish-block-rich ol { margin: 0 0 1rem; padding-left: 1.5rem; }
.parish-block-rich ul { list-style: disc; }
.parish-block-rich ol { list-style: decimal; }
.parish-block-rich li { margin-bottom: 0.25rem; }
.parish-block-rich blockquote {
    border-left: 3px solid var(--parish-gold);
    margin: 0 0 1rem; padding: 0.25rem 0 0.25rem 1rem; font-style: italic;
}
.parish-block-rich img { display: inline-block; vertical-align: middle; max-width: 100%; height: auto; border-radius: 0.5rem; }
.parish-block-divider {
    border: 0;
    border-top: 1px solid var(--parish-rule);
    margin: 2.5rem auto;
    max-width: 200px;
}
.parish-block-image { margin: 2rem 0; }
.parish-block-image img { max-width: 100%; height: auto; border-radius: 0.5rem; display: block; }
.parish-block-image-small img { max-width: 320px; }
.parish-block-image-medium img { max-width: 640px; margin: 0 auto; }
.parish-block-image-wide img { max-width: 100%; }
.parish-block-image figcaption {
    font-size: 0.85rem;
    color: var(--parish-muted);
    text-align: center;
    margin-top: 0.5rem;
    font-style: italic;
}
.parish-block-image-row {
    display: grid;
    gap: 0.75rem;
    grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
    margin: 2rem 0;
}
.parish-block-image-row img { width: 100%; height: 100%; object-fit: cover; border-radius: 0.5rem; }
.parish-block-pdf a {
    display: inline-flex; gap: 0.5rem; align-items: center;
    color: var(--parish-burgundy);
    font-weight: 500;
}
.parish-block-video {
    position: relative; padding-bottom: 56.25%; height: 0; overflow: hidden;
    margin: 2rem 0; border-radius: 0.5rem;
}
.parish-block-video iframe {
    position: absolute; top: 0; left: 0;
    width: 100%; height: 100%; border: 0;
}
.parish-block-cta { margin: 2rem 0; }
/* child_pages block renders a grid of rich ministry cards: icon, title,
   short description pulled from the child page, and a Learn more arrow. */
.parish-block-child-pages-intro {
    color: var(--parish-muted);
    font-size: 1.05rem;
    max-width: 48rem;
    margin: 0.5rem 0 1.5rem;
    line-height: 1.6;
}
.parish-block-child-cards {
    display: grid;
    gap: 1rem;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    margin: 1.5rem 0;
}
.parish-child-card {
    display: grid;
    grid-template-columns: auto 1fr;
    gap: 1rem;
    background: var(--parish-white);
    border: 1px solid var(--parish-rule);
    border-radius: 0.75rem;
    padding: 1.25rem;
    color: inherit;
    text-decoration: none;
    transition: border-color 0.2s ease, transform 0.2s ease, box-shadow 0.2s ease;
}
.parish-child-card:hover {
    border-color: var(--parish-blue);
    transform: translateY(-2px);
    box-shadow: 0 10px 20px -12px rgba(30, 58, 95, 0.3);
    color: var(--parish-navy);
}
.parish-child-card-icon {
    width: 3rem; height: 3rem;
    border-radius: 999px;
    background: var(--parish-blue-soft);
    color: var(--parish-navy);
    display: inline-flex;
    align-items: center;
    justify-content: center;
    font-size: 1.15rem;
    flex-shrink: 0;
    transition: background 0.2s ease, color 0.2s ease;
}
.parish-child-card:hover .parish-child-card-icon {
    background: var(--parish-navy);
    color: var(--parish-gold);
}
.parish-child-card-body { display: flex; flex-direction: column; min-width: 0; }
.parish-child-card-title {
    margin: 0 0 0.4rem;
    font-size: 1.2rem;
    font-family: 'Cormorant Garamond', Georgia, serif;
    font-weight: 600;
    color: var(--parish-navy);
    line-height: 1.2;
    letter-spacing: 0.005em;
}
.parish-child-card-desc {
    margin: 0 0 0.75rem;
    font-size: 0.9rem;
    color: var(--parish-muted);
    line-height: 1.55;
}
.parish-child-card-cta {
    font-size: 0.82rem;
    color: var(--parish-blue);
    font-weight: 500;
    letter-spacing: 0.02em;
    display: inline-flex;
    align-items: center;
    gap: 0.4rem;
    margin-top: auto;
    transition: gap 0.2s ease, color 0.2s ease;
}
.parish-child-card:hover .parish-child-card-cta {
    gap: 0.6rem;
    color: var(--parish-navy);
}
.parish-block-event-list, .parish-block-bulletin-list { list-style: none; padding: 0; margin: 1.5rem 0; }
.parish-block-event-list li, .parish-block-bulletin-list li {
    padding: 0.75rem 0; border-bottom: 1px dashed var(--parish-rule);
}
.parish-block-event-list a, .parish-block-bulletin-list a {
    display: flex; justify-content: space-between; align-items: baseline;
    gap: 1rem; color: var(--parish-navy);
}
.parish-block-event-list time, .parish-block-bulletin-list time {
    color: var(--parish-muted); font-size: 0.9rem;
}
.parish-block-staff-grid {
    display: grid; gap: 1.5rem;
    grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
    margin: 1.5rem 0;
}
.parish-staff-card {
    background: var(--parish-white);
    border: 1px solid var(--parish-rule);
    border-radius: 0.75rem;
    padding: 1.5rem;
    text-align: center;
}
.parish-staff-photo {
    width: 120px; height: 120px; border-radius: 999px; object-fit: cover;
    margin: 0 auto 1rem;
}
.parish-staff-card h3 { margin: 0 0 0.25rem; font-size: 1.2rem; }
.parish-staff-role { color: var(--parish-muted); font-size: 0.9rem; margin: 0 0 0.5rem; }

/* ---------- Parish calendar ---------- */
.parish-calendar-month {
    margin: 2.5rem 0;
}
.parish-calendar-month-title {
    font-family: 'Cormorant Garamond', serif;
    font-size: 1.75rem;
    color: var(--parish-navy);
    letter-spacing: 0.01em;
    border-bottom: 1px solid var(--parish-rule);
    padding-bottom: 0.5rem;
    margin: 0 0 1.5rem;
}
.parish-calendar-list { list-style: none; padding: 0; margin: 0; display: flex; flex-direction: column; gap: 1rem; }
.parish-calendar-event {
    display: grid;
    grid-template-columns: 72px 1fr auto;
    gap: 1.25rem;
    align-items: start;
    background: var(--parish-white);
    border: 1px solid var(--parish-rule);
    border-radius: 0.75rem;
    padding: 1rem 1.25rem;
}
@media (max-width: 640px) {
    .parish-calendar-event { grid-template-columns: 56px 1fr; }
    .parish-calendar-flyer { grid-column: 1 / -1; margin-top: 0.5rem; }
}
.parish-calendar-date {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    background: var(--parish-navy);
    color: var(--parish-white);
    border-radius: 0.5rem;
    padding: 0.5rem 0;
    font-family: 'Cormorant Garamond', serif;
    line-height: 1;
}
.parish-calendar-day { font-size: 1.75rem; font-weight: 600; }
.parish-calendar-dow {
    font-size: 0.65rem;
    text-transform: uppercase;
    letter-spacing: 0.15em;
    color: var(--parish-gold);
    margin-top: 0.2rem;
    font-family: 'Inter', sans-serif;
}
.parish-calendar-body { min-width: 0; }
.parish-calendar-event-title {
    margin: 0 0 0.3rem;
    font-family: 'Cormorant Garamond', serif;
    font-size: 1.2rem;
    color: var(--parish-navy);
    display: flex;
    align-items: center;
    gap: 0.5rem;
    flex-wrap: wrap;
}
.parish-calendar-event-title a { color: var(--parish-navy); text-decoration: none; }
.parish-calendar-event-title a:hover { color: var(--parish-blue); }
.parish-calendar-badge {
    background: var(--parish-gold);
    color: var(--parish-navy);
    font-size: 0.7rem;
    font-weight: 600;
    padding: 0.1rem 0.5rem;
    border-radius: 999px;
    text-transform: uppercase;
    letter-spacing: 0.08em;
    font-family: 'Inter', sans-serif;
}
.parish-calendar-meta {
    margin: 0 0 0.4rem;
    color: var(--parish-muted);
    font-size: 0.88rem;
}
.parish-calendar-desc {
    margin: 0;
    color: var(--parish-ink);
    font-size: 0.92rem;
    line-height: 1.55;
}
.parish-calendar-flyer {
    width: 90px;
    display: block;
    border-radius: 0.4rem;
    overflow: hidden;
    border: 1px solid var(--parish-rule);
}
.parish-calendar-flyer img { width: 100%; display: block; }
.parish-calendar-empty {
    background: var(--parish-cream-warm);
    border: 1px solid var(--parish-rule);
    border-radius: 0.75rem;
    padding: 2rem;
    text-align: center;
}

/* ---------- Home: Our Two Churches section ---------- */
.parish-churches { padding: 4rem 1rem; background: var(--parish-white); }
.parish-churches-grid {
    display: grid;
    gap: 1.5rem;
    grid-template-columns: 1fr 1fr;
    margin-top: 2rem;
}
@media (max-width: 820px) { .parish-churches-grid { grid-template-columns: 1fr; } }
.parish-church-card {
    display: flex;
    flex-direction: column;
    border-radius: 0.75rem;
    overflow: hidden;
    border: 1px solid var(--parish-rule);
    background: var(--parish-white);
    transition: all 0.2s ease;
}
.parish-church-card:hover {
    border-color: var(--parish-blue);
    box-shadow: 0 20px 40px -20px rgba(30, 58, 95, 0.3);
    transform: translateY(-2px);
}
.parish-church-photo {
    aspect-ratio: 16 / 10;
    background: linear-gradient(135deg, var(--parish-blue-soft), var(--parish-cream-warm));
    display: flex;
    align-items: center;
    justify-content: center;
    overflow: hidden;
    position: relative;
}
.parish-church-photo img { width: 100%; height: 100%; object-fit: cover; }
.parish-church-photo-placeholder {
    color: var(--parish-navy);
    font-size: 4rem;
    opacity: 0.3;
}
.parish-church-glass { width: 100%; height: 100%; display: block; }

/* ---------- Upcoming Events (home page) ---------- */
.parish-upcoming-list { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 0.75rem; }
.parish-upcoming-item { margin: 0; }
.parish-upcoming-link {
    display: grid;
    grid-template-columns: 4.5rem 1fr auto;
    gap: 1.25rem;
    align-items: center;
    padding: 1rem 1.25rem;
    background: #fff;
    border: 1px solid #e8e4d8;
    border-radius: 0.5rem;
    color: inherit;
    text-decoration: none;
    transition: border-color 0.15s, box-shadow 0.15s, transform 0.15s;
}
.parish-upcoming-link:hover {
    border-color: var(--parish-gold);
    box-shadow: 0 6px 20px -8px rgba(30,58,95,0.2);
    transform: translateY(-1px);
    color: inherit;
}
.parish-upcoming-date {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    background: var(--parish-navy);
    color: #faf6ef;
    border-radius: 0.4rem;
    padding: 0.5rem;
    aspect-ratio: 1 / 1;
    text-align: center;
}
.parish-upcoming-day {
    font-family: 'Cormorant Garamond', serif;
    font-size: 1.75rem;
    font-weight: 600;
    line-height: 1;
    color: var(--parish-gold);
}
.parish-upcoming-month {
    font-size: 0.7rem;
    letter-spacing: 0.15em;
    text-transform: uppercase;
    margin-top: 0.15rem;
    opacity: 0.9;
}
.parish-upcoming-title {
    font-family: 'Cormorant Garamond', serif;
    font-size: 1.35rem;
    color: var(--parish-navy);
    margin: 0 0 0.25rem;
}
.parish-upcoming-badge {
    display: inline-block;
    font-family: 'Inter', sans-serif;
    font-size: 0.65rem;
    letter-spacing: 0.1em;
    text-transform: uppercase;
    background: var(--parish-gold);
    color: #fff;
    padding: 0.15rem 0.45rem;
    border-radius: 0.25rem;
    vertical-align: middle;
    margin-left: 0.35rem;
}
.parish-upcoming-meta {
    margin: 0;
    color: #555;
    font-size: 0.9rem;
}
.parish-upcoming-meta i { color: var(--parish-gold); margin-right: 0.35rem; }
.parish-upcoming-sep { margin: 0 0.5rem; opacity: 0.5; }
.parish-upcoming-arrow { color: var(--parish-blue); font-size: 1.1rem; }
.parish-upcoming-footer { margin-top: 1.5rem; text-align: center; }
@media (max-width: 640px) {
    .parish-upcoming-link { grid-template-columns: 3.5rem 1fr; }
    .parish-upcoming-arrow { display: none; }
}

/* ---------- Event detail page ---------- */
.parish-event-title {
    font-family: 'Cormorant Garamond', serif;
    font-size: 2.5rem;
    color: var(--parish-navy);
    margin: 0.5rem 0 1.25rem;
    line-height: 1.15;
}
.parish-event-meta {
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
    background: var(--parish-cream-warm);
    border-left: 4px solid var(--parish-gold);
    padding: 1rem 1.25rem;
    border-radius: 0 0.35rem 0.35rem 0;
    margin-bottom: 1.75rem;
}
.parish-event-meta-row { display: flex; align-items: center; gap: 0.75rem; color: var(--parish-navy); }
.parish-event-meta-row i { color: var(--parish-gold); width: 1.1rem; }
.parish-event-flyer { margin: 0 0 1.75rem; }
.parish-event-flyer img { max-width: 100%; height: auto; border-radius: 0.5rem; display: block; }
.parish-event-body { font-size: 1.05rem; line-height: 1.65; }
.parish-event-actions { margin-top: 2.5rem; }

/* ---------- Homily page ---------- */
.parish-homily-title {
    font-family: 'Cormorant Garamond', serif;
    font-size: 2.5rem;
    color: var(--parish-navy);
    margin: 0.5rem 0 0.75rem;
    line-height: 1.15;
}
.parish-homily-meta {
    color: #555;
    font-size: 0.95rem;
    margin: 0 0 1.75rem;
}
.parish-homily-meta i { color: var(--parish-gold); margin-right: 0.5rem; }
.parish-homily-sep { margin: 0 0.5rem; opacity: 0.5; }
.parish-homily-media {
    display: flex;
    gap: 0.75rem;
    flex-wrap: wrap;
    margin-bottom: 1.75rem;
}
.parish-homily-body { font-size: 1.05rem; line-height: 1.7; }
.parish-homily-archive {
    margin-top: 3rem;
    padding-top: 2rem;
    border-top: 1px solid #e5e0d2;
}
.parish-homily-archive-title {
    font-family: 'Cormorant Garamond', serif;
    font-size: 1.5rem;
    color: var(--parish-navy);
    margin: 0 0 1rem;
}
.parish-homily-archive-list {
    list-style: none;
    margin: 0;
    padding: 0;
}
.parish-homily-archive-list li {
    padding: 0.65rem 0;
    border-bottom: 1px dotted #e5e0d2;
    color: #333;
}
.parish-homily-archive-list time { color: var(--parish-gold); font-weight: 600; }
.parish-homily-archive-sep { margin: 0 0.5rem; opacity: 0.4; }
.parish-homily-archive-author { color: #777; margin-left: 0.5rem; font-style: italic; }
.parish-homily-empty {
    background: var(--parish-cream-warm);
    border-left: 4px solid var(--parish-gold);
    padding: 2rem 1.5rem;
    border-radius: 0 0.35rem 0.35rem 0;
    margin: 1.5rem 0;
    text-align: center;
}
.parish-homily-empty i {
    font-size: 2.5rem;
    color: var(--parish-gold);
    opacity: 0.7;
    display: block;
    margin-bottom: 1rem;
}
.parish-homily-empty p { margin: 0.5rem 0; color: var(--parish-navy); }

/* ---------- Asset Library (/admin/assets) ---------- */
.parish-asset-toolbar {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 1rem;
    margin-bottom: 1rem;
    flex-wrap: wrap;
}
.parish-asset-filter { display: flex; gap: 0.25rem; flex-wrap: wrap; }
.parish-asset-filter-btn {
    background: transparent;
    border: 1px solid #e5e0d2;
    color: var(--parish-navy);
    padding: 0.35rem 0.9rem;
    border-radius: 999px;
    cursor: pointer;
    font-size: 0.85rem;
    transition: background 0.15s, color 0.15s, border-color 0.15s;
}
.parish-asset-filter-btn:hover { border-color: var(--parish-gold); }
.parish-asset-filter-btn.is-active {
    background: var(--parish-navy);
    color: #faf6ef;
    border-color: var(--parish-navy);
}
.parish-asset-search input {
    padding: 0.5rem 0.75rem;
    border: 1px solid #e5e0d2;
    border-radius: 0.35rem;
    min-width: 14rem;
    font-size: 0.9rem;
}
.parish-asset-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(180px, 1fr));
    gap: 1rem;
    margin-top: 1rem;
}
.parish-asset-tile {
    background: #fff;
    border: 1px solid #e5e0d2;
    border-radius: 0.5rem;
    overflow: hidden;
    display: flex;
    flex-direction: column;
    transition: border-color 0.15s, box-shadow 0.15s;
}
.parish-asset-tile:hover {
    border-color: var(--parish-gold);
    box-shadow: 0 6px 18px -8px rgba(30, 58, 95, 0.25);
}
.parish-asset-tile-preview {
    aspect-ratio: 1 / 1;
    background: var(--parish-cream-warm);
    display: flex;
    align-items: center;
    justify-content: center;
    overflow: hidden;
}
.parish-asset-tile-preview img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}
.parish-asset-tile-icon {
    font-size: 2.75rem;
    color: var(--parish-navy);
    opacity: 0.6;
}
.parish-asset-tile-meta {
    padding: 0.6rem 0.8rem 0.4rem;
    flex: 1;
}
.parish-asset-tile-name {
    font-size: 0.85rem;
    color: var(--parish-navy);
    margin: 0;
    font-weight: 600;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}
.parish-asset-tile-sub {
    font-size: 0.75rem;
    color: #777;
    margin: 0.2rem 0 0;
    text-transform: uppercase;
    letter-spacing: 0.05em;
}
.parish-asset-tile-actions {
    display: flex;
    flex-wrap: wrap;
    gap: 0.4rem;
    padding: 0.5rem 0.8rem 0.75rem;
    font-size: 0.8rem;
}
.parish-asset-tile-actions .parish-admin-link { font-size: 0.78rem; }
.parish-asset-toast {
    position: fixed;
    bottom: 2rem;
    left: 50%;
    transform: translateX(-50%);
    background: var(--parish-navy);
    color: #faf6ef;
    padding: 0.75rem 1.25rem;
    border-radius: 0.4rem;
    box-shadow: 0 8px 24px rgba(15, 30, 48, 0.3);
    display: flex;
    align-items: center;
    gap: 0.5rem;
    font-size: 0.9rem;
    z-index: 1000;
}
.parish-asset-toast i { color: var(--parish-gold); }
.parish-church-tagline {
    font-family: 'Cormorant Garamond', serif;
    font-style: italic;
    color: var(--parish-gold, #d4af37);
    font-size: 1rem;
    margin: -0.25rem 0 0.5rem;
    letter-spacing: 0.02em;
}
.parish-church-text { padding: 1.5rem; }
.parish-church-name {
    font-family: 'Cormorant Garamond', serif;
    font-size: 1.5rem;
    color: var(--parish-navy);
    margin: 0 0 0.5rem;
}
.parish-church-address {
    color: var(--parish-muted);
    font-size: 0.95rem;
    font-style: normal;
    margin: 0 0 0.75rem;
    line-height: 1.5;
}
.parish-church-card a.parish-church-directions {
    color: var(--parish-blue);
    font-size: 0.9rem;
    font-weight: 500;
    text-decoration: none;
}
.parish-church-card a.parish-church-directions:hover { color: var(--parish-navy); }

/* ---------- Admin tables (Mass times, confessions, pages) ---------- */
.parish-admin-table {
    width: 100%;
    border-collapse: collapse;
    font-size: 0.95rem;
}
.parish-admin-table thead th {
    text-align: left;
    text-transform: uppercase;
    font-size: 0.7rem;
    letter-spacing: 0.1em;
    color: var(--parish-muted);
    padding: 0.5rem 0.75rem;
    border-bottom: 1px solid var(--parish-rule);
}
.parish-admin-table tbody td {
    padding: 0.5rem 0.75rem;
    border-bottom: 1px solid var(--parish-rule);
    vertical-align: middle;
}
.parish-admin-table tbody tr.parish-admin-row-ok {
    background: #e8f3ec;
    transition: background 0.4s ease;
}
.parish-admin-table input,
.parish-admin-table select {
    padding: 0.35rem 0.5rem;
    border: 1px solid var(--parish-rule);
    border-radius: 0.35rem;
    font: inherit;
    background: var(--parish-white);
    width: 100%;
    max-width: 220px;
}
.parish-admin-drag-handle {
    width: 1.5rem;
    color: var(--parish-muted-2);
    cursor: grab;
    user-select: none;
}
.parish-admin-table-add {
    margin-top: 1rem;
}
.parish-admin-row-actions {
    display: flex;
    gap: 0.75rem;
    justify-content: flex-end;
    white-space: nowrap;
}
.parish-admin-badge-ok {
    background: #d8ebdd;
    color: #205c37;
    font-size: 0.72rem;
    padding: 0.1rem 0.5rem;
    border-radius: 999px;
    text-transform: uppercase;
    letter-spacing: 0.08em;
    font-weight: 600;
}
.parish-admin-badge-draft {
    background: var(--parish-cream-warm);
    color: var(--parish-muted);
    font-size: 0.72rem;
    padding: 0.1rem 0.5rem;
    border-radius: 999px;
    text-transform: uppercase;
    letter-spacing: 0.08em;
    font-weight: 600;
}
.parish-admin-head-action { margin-top: 0.5rem; }

/* ---------- Admin modal ---------- */
.parish-admin-modal {
    position: fixed; inset: 0;
    display: flex; align-items: center; justify-content: center;
    padding: 1.5rem; z-index: 70;
}
.parish-admin-modal[hidden] { display: none; }
.parish-admin-modal-backdrop {
    position: absolute; inset: 0;
    background: rgba(30, 58, 95, 0.5);
}
.parish-admin-modal-panel {
    position: relative;
    background: var(--parish-white);
    border-radius: 0.75rem;
    padding: 1.75rem;
    width: 100%; max-width: 520px;
    max-height: 90vh; overflow-y: auto;
    box-shadow: 0 20px 60px -20px rgba(30, 58, 95, 0.4);
}
.parish-admin-modal-wide { max-width: 720px; }
.parish-admin-modal-head {
    display: flex; justify-content: space-between; align-items: center;
    margin-bottom: 1rem;
}
.parish-admin-modal-head h2 { margin: 0; font-size: 1.4rem; }
.parish-admin-modal-close {
    background: none; border: 0; cursor: pointer;
    color: var(--parish-muted); font-size: 1.1rem;
    padding: 0.25rem 0.5rem;
}
.parish-admin-modal-close:hover { color: var(--parish-navy); }
.parish-admin-modal-actions {
    display: flex; justify-content: flex-end; gap: 0.75rem;
    margin-top: 1rem;
}

/* ---------- Block editor ---------- */
.parish-admin-main-editor { max-width: none; }
.parish-editor-head {
    display: flex; justify-content: space-between; align-items: flex-start;
    gap: 1rem; flex-wrap: wrap;
}
.parish-editor-head-actions { display: flex; gap: 0.75rem; }
.parish-editor-head h1 {
    outline: none;
    border-bottom: 2px dashed transparent;
    transition: border-color 0.2s;
}
.parish-editor-head h1:focus { border-bottom-color: var(--parish-gold); }
.parish-editor-inline-input {
    background: transparent;
    border: 0;
    border-bottom: 1px dashed var(--parish-rule);
    padding: 0.1rem 0.25rem;
    font: inherit;
    color: var(--parish-muted);
    max-width: 200px;
}
.parish-editor-inline-input:focus { outline: none; border-bottom-color: var(--parish-gold); }
.parish-editor-status {
    padding: 0.5rem 0.9rem;
    border-radius: 0.5rem;
    font-size: 0.9rem;
    background: var(--parish-cream-warm);
    color: var(--parish-muted);
    margin: 0 0 1rem;
}
.parish-editor-status-ok { background: #e8f3ec; color: #205c37; }
.parish-editor-status-error { background: #fdeaec; color: var(--parish-burgundy); }

.parish-editor-blocks {
    display: flex; flex-direction: column; gap: 1rem;
    min-height: 120px;
}
.parish-editor-block {
    background: var(--parish-white);
    border: 1px solid var(--parish-rule);
    border-radius: 0.75rem;
    overflow: hidden;
}
.parish-editor-block-ghost {
    opacity: 0.4;
    background: var(--parish-cream-warm);
}
.parish-editor-block-head {
    display: flex; align-items: center; gap: 0.75rem;
    padding: 0.6rem 1rem;
    background: var(--parish-cream);
    border-bottom: 1px solid var(--parish-rule);
}
.parish-editor-block-handle {
    cursor: grab;
    color: var(--parish-muted-2);
}
.parish-editor-block-handle:active { cursor: grabbing; }
.parish-editor-block-type {
    flex: 1;
    font-size: 0.9rem;
    font-weight: 600;
    color: var(--parish-navy);
}
.parish-editor-block-type i { margin-right: 0.4rem; color: var(--parish-gold); }
.parish-editor-block-remove {
    background: none; border: 0; cursor: pointer;
    color: var(--parish-muted); font-size: 0.9rem;
    padding: 0.25rem 0.5rem;
}
.parish-editor-block-remove:hover { color: var(--parish-burgundy); }
.parish-editor-block-body { padding: 1rem; }
.parish-editor-add {
    margin: 1.5rem 0;
    text-align: center;
}
.parish-block-fields {
    display: flex; gap: 1rem; flex-wrap: wrap; align-items: flex-end;
}
.parish-block-fields > label {
    display: flex; flex-direction: column; gap: 0.3rem;
    font-size: 0.8rem; color: var(--parish-muted);
    font-weight: 500;
}
.parish-block-fields input,
.parish-block-fields select,
.parish-block-fields textarea {
    padding: 0.45rem 0.6rem;
    border: 1px solid var(--parish-rule);
    border-radius: 0.4rem;
    font: inherit;
    color: var(--parish-ink);
    background: var(--parish-white);
    min-width: 200px;
}
.parish-block-fields textarea { min-width: 100%; min-height: 100px; font-family: inherit; }
.parish-block-fields > label.parish-block-fields-full { flex: 1 1 100%; }
.parish-block-fields-full textarea {
    width: 100%; min-height: 220px; max-height: 70vh;
    resize: vertical; line-height: 1.5; font-size: 0.9rem;
}
.parish-block-fields-grow { flex: 1 1 240px; }
.parish-block-fields-stack {
    display: flex; flex-direction: column; gap: 0.5rem; flex: 1;
}
.parish-block-fields-stack > label { display: flex; flex-direction: column; gap: 0.3rem; }
.parish-block-fields-stack input, .parish-block-fields-stack select { width: 100%; }
.parish-block-fields-stack > button { align-self: flex-start; }
/* Rich text editor for Text blocks */
.parish-rte {
    border: 1px solid var(--parish-rule);
    border-radius: 0.5rem;
    background: var(--parish-white);
    overflow: hidden;
}
.parish-rte:focus-within { border-color: var(--parish-gold); box-shadow: 0 0 0 3px rgba(184, 146, 47, 0.15); }
.parish-rte-toolbar {
    position: sticky; top: 0; z-index: 2;
    display: flex; flex-wrap: wrap; align-items: center; gap: 0.15rem;
    padding: 0.4rem 0.5rem;
    background: var(--parish-cream);
    border-bottom: 1px solid var(--parish-rule);
}
.parish-rte-btn {
    background: none; border: 1px solid transparent; border-radius: 0.35rem;
    min-width: 2rem; height: 2rem; padding: 0 0.45rem;
    color: var(--parish-navy); cursor: pointer; font: inherit; font-size: 0.85rem;
}
.parish-rte-btn:hover:not(:disabled) { background: var(--parish-white); border-color: var(--parish-rule); }
.parish-rte-btn.is-active, .parish-rte-btn.is-active:hover:not(:disabled) { background: var(--parish-navy); color: var(--parish-white); }
.parish-rte-btn:disabled, .parish-rte-style:disabled { opacity: 0.35; cursor: default; }
.parish-rte-source-toggle { margin-left: auto; font-weight: 600; }
.parish-rte-source-toggle[aria-pressed="true"] { background: var(--parish-navy); color: var(--parish-white); }
.parish-rte-sep { width: 1px; height: 1.25rem; background: var(--parish-rule); margin: 0 0.3rem; }
.parish-block-fields .parish-rte-style, .parish-rte-style {
    min-width: 0; height: 2rem; padding: 0 0.4rem;
    border: 1px solid var(--parish-rule); border-radius: 0.35rem;
    background: var(--parish-white); color: var(--parish-ink); font: inherit; font-size: 0.85rem;
}
.parish-rte-area {
    min-height: 200px; max-height: 70vh; overflow-y: auto;
    padding: 1rem 1.25rem;
    outline: none;
}
.parish-rte-area:empty::before { content: attr(data-placeholder); color: var(--parish-muted-2); }
.parish-rte-source {
    display: block; width: 100%; min-height: 200px; max-height: 70vh;
    border: 0; padding: 1rem; resize: vertical;
    font-family: ui-monospace, Consolas, monospace; font-size: 0.85rem; line-height: 1.5;
    color: var(--parish-ink); background: var(--parish-white);
}
.parish-rte-source:focus { outline: none; }
.parish-rte-source[hidden], .parish-rte-area[hidden] { display: none; }

.parish-block-asset-preview {
    width: 150px; height: 100px;
    background: var(--parish-cream-warm);
    border: 1px dashed var(--parish-rule);
    border-radius: 0.4rem;
    display: flex; align-items: center; justify-content: center;
    overflow: hidden;
    flex-shrink: 0;
}
.parish-block-asset-preview img { max-width: 100%; max-height: 100%; object-fit: cover; }
.parish-block-asset-empty, .parish-block-asset-filename {
    font-size: 0.8rem;
    color: var(--parish-muted);
    text-align: center;
    padding: 0.5rem;
}

/* ---------- Block palette ---------- */
.parish-palette-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(140px, 1fr));
    gap: 0.75rem;
}
.parish-palette-item {
    background: var(--parish-white);
    border: 1px solid var(--parish-rule);
    border-radius: 0.5rem;
    padding: 1rem 0.75rem;
    display: flex; flex-direction: column; align-items: center; gap: 0.5rem;
    cursor: pointer;
    font: inherit;
    color: var(--parish-navy);
    transition: all 0.15s ease;
}
.parish-palette-item:hover {
    border-color: var(--parish-blue);
    background: var(--parish-blue-soft);
}
.parish-palette-item i {
    font-size: 1.5rem;
    color: var(--parish-gold);
}

/* ---------- Asset picker ---------- */
.parish-asset-picker-upload {
    display: flex; align-items: center; gap: 1rem;
    padding: 1rem 0;
    border-bottom: 1px solid var(--parish-rule);
    margin-bottom: 1rem;
}
.parish-asset-picker-tools {
    display: flex; flex-wrap: wrap; align-items: center; gap: 0.6rem;
    margin-bottom: 1rem;
}
.parish-asset-picker-search {
    flex: 1 1 220px;
    display: flex; align-items: center; gap: 0.5rem;
    padding: 0 0.7rem;
    border: 1px solid var(--parish-rule); border-radius: 0.4rem;
    background: var(--parish-white); color: var(--parish-muted);
}
.parish-asset-picker-search:focus-within { border-color: var(--parish-gold); }
.parish-asset-picker-search input {
    flex: 1; min-width: 0; border: 0; outline: none; background: transparent;
    padding: 0.5rem 0; font: inherit; color: var(--parish-ink);
}
.parish-asset-picker-tools select {
    padding: 0.5rem 0.6rem;
    border: 1px solid var(--parish-rule); border-radius: 0.4rem;
    background: var(--parish-white); font: inherit; color: var(--parish-ink);
}
.parish-asset-picker-tools select[hidden] { display: none; }
.parish-asset-picker-count { font-size: 0.85rem; color: var(--parish-muted); margin-left: auto; }
.parish-asset-group {
    grid-column: 1 / -1;
    margin: 0.5rem 0 0; padding-bottom: 0.25rem;
    font-size: 0.85rem; font-weight: 600; letter-spacing: 0.02em;
    color: var(--parish-navy);
    border-bottom: 1px solid var(--parish-rule);
}
.parish-asset-group:first-child { margin-top: 0; }
.parish-asset-card-date { font-size: 0.7rem; color: var(--parish-muted-2); }
.parish-asset-card.is-current { border-color: var(--parish-gold); box-shadow: 0 0 0 2px rgba(181, 139, 42, 0.35); }
.parish-block-asset-name {
    margin: 0; font-size: 0.8rem; color: var(--parish-muted);
    white-space: nowrap; overflow: hidden; text-overflow: ellipsis; max-width: 100%;
}
.parish-asset-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(140px, 1fr));
    gap: 0.75rem;
    max-height: min(50vh, 520px);
    overflow-y: auto;
    align-content: start;
}
.parish-asset-card {
    background: var(--parish-cream);
    border: 1px solid var(--parish-rule);
    border-radius: 0.4rem;
    padding: 0.5rem;
    cursor: pointer;
    display: flex; flex-direction: column; gap: 0.5rem;
    font: inherit;
    text-align: center;
    transition: all 0.15s ease;
}
.parish-asset-card:hover {
    border-color: var(--parish-blue);
    background: var(--parish-blue-soft);
}
.parish-asset-card img {
    width: 100%; height: 100px; object-fit: cover; border-radius: 0.3rem;
}
.parish-asset-card-filetype {
    font-size: 2.5rem;
    color: var(--parish-burgundy);
    height: 100px;
    display: flex; align-items: center; justify-content: center;
}
.parish-asset-card-name {
    font-size: 0.75rem;
    color: var(--parish-muted);
    word-break: break-word;
    max-height: 2.4em;
    overflow: hidden;
}

/* ---------- Form fieldsets (parish registration) ---------- */
.parish-fieldset {
    border: 1px solid var(--parish-rule);
    border-radius: 0.5rem;
    padding: 1.25rem;
    margin: 0 0 1.5rem;
    background: var(--parish-white);
}
.parish-fieldset legend {
    padding: 0 0.5rem;
    font-weight: 600;
    color: var(--parish-navy);
    font-size: 0.95rem;
}
.parish-fieldset-inline {
    display: flex;
    gap: 1rem;
    flex-wrap: wrap;
    border: 0;
    padding: 0.25rem 0;
    margin-top: 0.5rem;
}
.parish-fieldset-inline legend {
    padding: 0;
    font-size: 0.8rem;
    color: var(--parish-muted);
    font-weight: 500;
    width: 100%;
    margin-bottom: 0.5rem;
}
.parish-fieldset-inline label {
    display: inline-flex;
    gap: 0.4rem;
    align-items: center;
    font-size: 0.9rem;
    color: var(--parish-ink);
}

/* ---------- Admin registration cards ---------- */
.parish-admin-reg-grid {
    display: grid;
    gap: 1rem;
    grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
    margin: 1rem 0 0.5rem;
    padding: 1rem 0;
    border-top: 1px dashed var(--parish-rule);
}
.parish-admin-reg-grid h4 {
    margin: 0 0 0.25rem;
    font-size: 0.75rem;
    text-transform: uppercase;
    letter-spacing: 0.08em;
    color: var(--parish-muted);
}
.parish-admin-reg-grid p {
    margin: 0;
    font-size: 0.9rem;
    line-height: 1.5;
    color: var(--parish-ink);
}
.parish-admin-reg-notes {
    margin-top: 0.75rem;
    padding-top: 0.75rem;
    border-top: 1px dashed var(--parish-rule);
}
.parish-admin-reg-notes h4 {
    margin: 0 0 0.25rem;
    font-size: 0.75rem;
    text-transform: uppercase;
    letter-spacing: 0.08em;
    color: var(--parish-muted);
}
.parish-admin-reg-notes p {
    margin: 0;
    font-size: 0.9rem;
    color: var(--parish-ink);
}

/* ---------- Toast ---------- */
.parish-toast-region {
    position: fixed;
    right: 1.5rem;
    bottom: 1.5rem;
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
    z-index: 100;
}
.parish-toast {
    background: var(--parish-navy);
    color: var(--parish-white);
    padding: 0.6rem 1rem;
    border-radius: 0.4rem;
    box-shadow: 0 10px 20px -10px rgba(0, 0, 0, 0.3);
    font-size: 0.9rem;
    transition: opacity 0.3s;
}
.parish-toast-ok { background: #205c37; }
.parish-toast-error { background: var(--parish-burgundy); }
.parish-toast-leaving { opacity: 0; }

/* ---------- Staff workflow additions ---------- */
.parish-field-hint { font-size: 0.8rem; color: var(--parish-muted, #6b7280); margin: 0.3rem 0 0; }
.parish-admin-row-muted td { opacity: 0.55; }
.parish-file-choice { display: flex; align-items: center; gap: 0.75rem; flex-wrap: wrap; }
.parish-file-choice-name { font-size: 0.9rem; color: var(--parish-navy); word-break: break-all; }
.parish-file-choice-thumb { width: 56px; height: 56px; object-fit: cover; border-radius: 0.35rem; border: 1px solid #e5e0d2; }
.parish-form-more { margin: 0.5rem 0 1rem; }
.parish-form-more > summary { cursor: pointer; color: var(--parish-blue); font-size: 0.9rem; margin-bottom: 0.75rem; }
.parish-editor-settings {
    background: #fff; border: 1px solid #e5e0d2; border-radius: 0.5rem;
    padding: 0.75rem 1rem; margin: 0 0 1.25rem;
}
.parish-editor-settings > summary { cursor: pointer; font-weight: 600; color: var(--parish-navy); }
.parish-editor-settings[open] > summary { margin-bottom: 0.75rem; }
.parish-editor-settings select, .parish-editor-settings textarea { width: 100%; }
.parish-slug-input { display: flex; align-items: center; border: 1px solid #d6d1c4; border-radius: 0.35rem; overflow: hidden; background: #fff; }
.parish-slug-input span { padding: 0.55rem 0.25rem 0.55rem 0.65rem; color: var(--parish-muted, #6b7280); font-family: ui-monospace, monospace; font-size: 0.85rem; white-space: nowrap; }
.parish-slug-input input { border: 0 !important; flex: 1; min-width: 0; }
.parish-editor-head-actions { flex-wrap: wrap; align-items: center; }
.parish-draft-banner {
    background: #fff7e0; border: 1px solid var(--parish-gold); color: var(--parish-navy);
    padding: 0.75rem 1rem; border-radius: 0.4rem; margin: 0 0 1.5rem; font-weight: 500;
}
.parish-draft-banner i { color: var(--parish-gold); margin-right: 0.4rem; }
