/* ==============================================================
   site.css — KoC Council 12021
   Three-color system: navy (dominant) · gold (highlights) · green (parish accent)
   ============================================================== */

/* --- Design tokens --- */
:root {
    --navy:        #1e3a5f;
    --navy-dk:     #0f2240;
    --gold:        #b8923d;
    --gold-dk:     #8a6d2c;
    --gold-light:  #f5e9cb;
    --green:       #2f5d3a;
    --green-dk:    #1f3e26;
    --green-light: #d6e8da;
    --cream:       #faf6ec;
    --paper:       #ffffff;
    --ink:         #1a1a1a;
    --muted:       #5d5d5d;
    --rule:        #e6dfd0;
    --red:         #9e2a2b;
    --red-dk:      #7a1f20;

    --font-display: 'Cormorant Garamond', Georgia, 'Times New Roman', serif;
    --font-body:    'Source Sans 3', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;

    --container-w: 1100px;
    --container-narrow-w: 680px;
    --radius:      10px;
    --radius-sm:   6px;
    --shadow:      0 2px 10px rgba(0, 0, 0, 0.08);
}

/* --- Reset --- */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
img, svg { display: block; max-width: 100%; }

/* --- Base --- */
html { scroll-behavior: smooth; }
body {
    font-family: var(--font-body);
    font-size: 17px;
    line-height: 1.6;
    background: var(--cream);
    color: var(--ink);
    min-height: 100vh;
    display: flex;
    flex-direction: column;
}
main { flex: 1; }

a { color: var(--navy); text-decoration: none; }
a:hover { color: var(--navy-dk); text-decoration: underline; }

/* --- Typography --- */
h1, h2, h3, h4 {
    font-family: var(--font-display);
    font-weight: 600;
    line-height: 1.2;
    color: var(--navy);
}
h1 { font-size: 2.2rem; margin-bottom: 0.75rem; }
h2 { font-size: 1.6rem; margin-bottom: 0.6rem; }
h3 { font-size: 1.2rem; margin-bottom: 0.5rem; }
h4 { font-size: 1rem; margin-bottom: 0.4rem; font-family: var(--font-body); font-weight: 600; }

/* In-body subhead used inside long-form sections (e.g. about page). */
.section-subhead {
    font-size: 1.05rem;
    margin-top: 1.75rem;
    margin-bottom: 0.5rem;
    color: var(--navy);
}

p { margin-bottom: 0.85rem; }
p:last-child { margin-bottom: 0; }

ul, ol { padding-left: 1.4rem; }
li { margin-bottom: 0.35rem; }

.eyebrow {
    display: block;
    font-family: var(--font-body);
    font-size: 0.72rem;
    font-weight: 700;
    letter-spacing: 0.13em;
    text-transform: uppercase;
    color: var(--green);
    margin-bottom: 0.5rem;
}
.eyebrow-gold { color: var(--gold); }

/* --- Layout --- */
.container {
    max-width: var(--container-w);
    margin: 0 auto;
    padding: 0 1.5rem;
}
.container--narrow {
    max-width: var(--container-narrow-w);
    margin: 0 auto;
    padding: 0 1.5rem;
}
.container--mid {
    max-width: 860px;
    margin: 0 auto;
    padding: 0 1.5rem;
}

/* Two-column split layout. Collapses to 1fr on narrow screens. */
.split-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 3rem;
    align-items: start;
}
.split-grid--lg { gap: 3.5rem; }
.split-grid--sm { gap: 1.5rem; }

.section { padding: 3.5rem 0; }
.section--sm { padding: 2rem 0; }
.section--cream { background: var(--cream); }
.section--paper { background: var(--paper); }
.section--navy  { background: var(--navy); color: #fff; }
.section--navy h1,
.section--navy h2,
.section--navy h3 { color: #fff; }

/* Home sign-up call-to-action band — a navy field holding a gold-edged panel,
   so an active sign-up stands out from the light sections around it. */
.signup-cta-band { background: var(--navy); padding: 2.5rem 1.25rem; }
.signup-cta {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    justify-content: space-between;
    gap: 1.5rem;
    padding: 1.6rem 1.9rem;
    background: var(--navy-dk);
    border: 1px solid rgba(184, 146, 61, 0.45);
    border-left: 5px solid var(--gold);
    border-radius: var(--radius-sm);
    box-shadow: 0 6px 18px rgba(0, 0, 0, 0.28);
}
.signup-cta-text { min-width: 0; }
.signup-cta-eyebrow {
    display: inline-block;
    color: var(--gold);
    font-weight: 700;
    font-size: 0.8rem;
    letter-spacing: 0.09em;
    text-transform: uppercase;
}
.signup-cta h2 { color: #fff; margin: 0.4rem 0 0; }
.signup-cta p { color: rgba(255, 255, 255, 0.82); margin: 0.4rem 0 0; }
.signup-cta .btn { flex-shrink: 0; }

/* Sign-up sheet detail page: numbered "how it works" + emphasized form card. */
.signup-form-card { border-top: 3px solid var(--gold); }
/* Officer-typed description: keep line breaks; wrap long pasted URLs instead of
   overflowing the column. */
.sheet-desc { font-size: 1.05rem; white-space: pre-line; overflow-wrap: anywhere; }
.sheet-desc a { word-break: break-all; }
/* Post-sign-up order read-back: label/value rows, stacked on narrow screens. */
.order-summary { margin: 0; display: grid; grid-template-columns: auto 1fr; gap: 0.5rem 1.25rem; }
.order-summary dt { color: var(--muted); font-size: 0.9rem; }
.order-summary dd { margin: 0; overflow-wrap: anywhere; }
@media (max-width: 480px) {
    .order-summary { grid-template-columns: 1fr; gap: 0.15rem; }
    .order-summary dd { margin-bottom: 0.6rem; }
}

/* --- Navigation --- */
nav.site-nav {
    background: var(--navy);
    position: relative;
    z-index: 100;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.25);
}
.nav-inner {
    max-width: var(--container-w);
    margin: 0 auto;
    padding: 0 1.5rem;
    display: flex;
    align-items: center;
    min-height: 64px;
    gap: 1.5rem;
    flex-wrap: wrap;
}
.brand {
    display: flex;
    align-items: center;
    gap: 0.55rem;
    color: #fff;
    text-decoration: none;
    font-family: var(--font-display);
    font-size: 1.2rem;
    font-weight: 600;
    letter-spacing: 0.025em;
    flex-shrink: 0;
    padding: 0.85rem 0;
}
.brand:hover { color: var(--gold-light); text-decoration: none; }
.brand svg { opacity: 0.85; flex-shrink: 0; }
.brand-emblem { height: 36px; width: auto; flex-shrink: 0; }
.footer-emblem { height: 28px; width: auto; flex-shrink: 0; }

.nav-links {
    display: flex;
    align-items: center;
    flex-wrap: wrap;
    gap: 0;
    margin-left: auto;
    padding: 0.5rem 0;
}
.nav-links a {
    color: rgba(255, 255, 255, 0.8);
    text-decoration: none;
    font-size: 0.9rem;
    padding: 0.35rem 0.7rem;
    border-radius: 4px;
    transition: color 0.15s, background 0.15s;
    white-space: nowrap;
}
.nav-links a:hover {
    color: #fff;
    background: rgba(255, 255, 255, 0.1);
    text-decoration: none;
}
.nav-links a.active {
    color: var(--gold-light);
    font-weight: 600;
}
/* Logout is a POST form in the nav; make its button render like a nav link. */
.nav-logout-form { display: inline; margin: 0; }
.nav-link-btn {
    background: none;
    border: none;
    cursor: pointer;
    font-family: inherit;
    color: rgba(255, 255, 255, 0.8);
    font-size: 0.9rem;
    padding: 0.35rem 0.7rem;
    border-radius: 4px;
    transition: color 0.15s, background 0.15s;
    white-space: nowrap;
}
.nav-link-btn:hover {
    color: #fff;
    background: rgba(255, 255, 255, 0.1);
}

/* Account nav items (login, or when signed in: Members / Admin / Log out) tint
   gold so they read as sign-in / account controls, set apart from the content
   pages. A divider marks where the account group begins. */
.nav-links a.nav-auth,
.nav-link-btn.nav-auth {
    color: var(--gold);
}
.nav-links a.nav-auth:hover,
.nav-link-btn.nav-auth:hover {
    color: var(--gold-light);
    background: rgba(255, 255, 255, 0.1);
}
.nav-auth-first {
    margin-left: 0.3rem;
    border-left: 1px solid rgba(255, 255, 255, 0.22);
}

/* Keyboard focus outlines (hover-only styling above leaves keyboard users adrift) */
.nav-links a:focus-visible,
.nav-link-btn:focus-visible,
.nav-toggle:focus-visible {
    outline: 2px solid var(--gold-light);
    outline-offset: 2px;
}

/* Skip link — off-screen until it receives keyboard focus */
.skip-link {
    position: absolute;
    left: 0.5rem;
    top: -3rem;
    z-index: 200;
    background: var(--gold-light);
    color: var(--navy-dk);
    padding: 0.5rem 0.9rem;
    border-radius: var(--radius-sm);
    font-weight: 600;
}
.skip-link:focus { top: 0.5rem; text-decoration: none; }

/* Hamburger toggle — hidden until the mobile breakpoint below reveals it */
.nav-toggle {
    display: none;
    align-items: center;
    justify-content: center;
    width: 44px;
    height: 44px;
    margin-left: auto;
    background: none;
    border: none;
    border-radius: var(--radius-sm);
    color: #fff;
    cursor: pointer;
}
.nav-toggle:hover { background: rgba(255, 255, 255, 0.1); }

/* Small screens: collapse the wrapping link row into a toggled stack.
   820px (not the 720px body breakpoint) because the 11-item admin nav
   wraps into multiple rows well before 720. */
@media (max-width: 820px) {
    .nav-toggle { display: inline-flex; }

    /* Open menu is a compact panel anchored under the hamburger (right side),
       floating over page content rather than pushing it down. The parent <nav>
       is position:relative z-index:100, so this overlays whatever is below. */
    .nav-links {
        display: none;
        position: absolute;
        top: 100%;
        right: 0;
        left: auto;
        width: min(72vw, 300px);
        flex-direction: column;
        align-items: stretch;
        gap: 0;
        margin-left: 0;
        padding: 0.4rem 1rem 0.8rem;
        flex-wrap: nowrap;
        background: var(--navy);
        box-shadow: 0 8px 14px rgba(0, 0, 0, 0.3);
        border-bottom-left-radius: var(--radius-sm);
    }
    .site-nav.nav-open .nav-links { display: flex; }

    .nav-links a,
    .nav-link-btn {
        display: block;
        width: 100%;
        padding: 0.85rem 0.6rem;
        font-size: 1rem;
    }
    .nav-links a.active { background: rgba(255, 255, 255, 0.08); }
    .nav-logout-form { display: block; width: 100%; }
    .nav-link-btn { text-align: left; }
    /* Stacked panel: the account divider runs across the top, not the side. */
    .nav-auth-first {
        margin-left: 0;
        padding-left: 0.6rem;
        border-left: none;
        margin-top: 0.3rem;
        padding-top: 0.9rem;
        border-top: 1px solid rgba(255, 255, 255, 0.16);
    }
}

/* --- Hero --- */
.hero {
    background:
        linear-gradient(160deg, rgba(14, 28, 48, 0.82) 0%, rgba(14, 28, 48, 0.68) 100%),
        url('/static/img/hero.jpg') center 40% / cover no-repeat;
    background-color: var(--navy-dk);
    min-height: 460px;
    display: flex;
    align-items: center;
    padding: 5rem 0;
}
.hero-inner {
    max-width: var(--container-w);
    margin: 0 auto;
    padding: 0 1.5rem;
    max-width: 760px;
}
.hero-eyebrow {
    font-family: var(--font-body);
    font-size: 0.72rem;
    font-weight: 700;
    letter-spacing: 0.18em;
    text-transform: uppercase;
    color: var(--gold);
    margin-bottom: 1rem;
    display: block;
}
.hero h1 {
    font-family: var(--font-display);
    font-size: 3.5rem;
    font-weight: 700;
    color: #fff;
    margin-bottom: 0.75rem;
    line-height: 1.05;
}
.hero-tagline {
    font-family: var(--font-display);
    font-size: 1.3rem;
    color: rgba(255, 255, 255, 0.8);
    margin-bottom: 2.25rem;
    font-style: italic;
}
.hero-actions {
    display: flex;
    gap: 1rem;
    flex-wrap: wrap;
}

/* --- Cards --- */
.card {
    background: var(--paper);
    border-radius: var(--radius);
    padding: 2rem;
    box-shadow: var(--shadow);
    margin-bottom: 1.5rem;
}
.card--flat {
    box-shadow: none;
    border: 1px solid var(--rule);
}
.card h2:first-child,
.card h1:first-child { margin-top: 0; }

/* --- Page header band --- */
.page-header {
    background: var(--cream);
    border-bottom: 1px solid var(--rule);
    padding: 2.5rem 0 2rem;
}
.page-header h1 { margin-bottom: 0.35rem; }
.page-header .lead {
    color: var(--muted);
    font-size: 1.05rem;
    margin: 0;
}

/* --- Rule/divider --- */
.rule {
    border: none;
    border-top: 1px solid var(--rule);
    margin: 2rem 0;
}

/* --- Buttons --- */
.btn {
    display: inline-flex;
    align-items: center;
    gap: 0.4rem;
    background: var(--navy);
    color: #fff;
    border: 2px solid transparent;
    border-radius: var(--radius-sm);
    padding: 0.65rem 1.4rem;
    font-size: 0.95rem;
    font-family: var(--font-body);
    font-weight: 600;
    cursor: pointer;
    text-decoration: none;
    text-align: center;
    line-height: 1.3;
    transition: background 0.15s, color 0.15s, border-color 0.15s;
}
.btn:hover { background: var(--navy-dk); color: #fff; text-decoration: none; }

.btn-gold {
    background: var(--gold);
    color: #fff;
    border-color: var(--gold);
}
.btn-gold:hover { background: var(--gold-dk); border-color: var(--gold-dk); color: #fff; }

.btn-green {
    background: var(--green);
    color: #fff;
    border-color: var(--green);
}
.btn-green:hover { background: var(--green-dk); color: #fff; text-decoration: none; }

.btn-outline {
    background: transparent;
    color: var(--navy);
    border-color: var(--navy);
}
.btn-outline:hover { background: var(--navy); color: #fff; }

.btn-outline-light {
    background: transparent;
    color: #fff;
    border-color: rgba(255, 255, 255, 0.55);
}
.btn-outline-light:hover { background: rgba(255, 255, 255, 0.15); color: #fff; }

.btn-secondary { background: #6b7280; border-color: #6b7280; color: #fff; }
.btn-secondary:hover { background: #4b5563; color: #fff; }

.btn-danger { background: var(--red); border-color: var(--red); color: #fff; }
.btn-danger:hover { background: var(--red-dk); color: #fff; }

.btn-sm  { padding: 0.32rem 0.85rem; font-size: 0.82rem; }
.btn-lg  { padding: 0.85rem 2rem; font-size: 1.05rem; }

/* --- Flash messages --- */
.flash-wrap {
    max-width: var(--container-w);
    margin: 0 auto;
    padding: 0 1.5rem;
}
.flash {
    padding: 0.85rem 1.1rem;
    border-radius: var(--radius-sm);
    margin-top: 1rem;
    font-size: 0.95rem;
    line-height: 1.4;
}
.flash-default { background: #d1fae5; border: 1px solid #6ee7b7; color: #065f46; }
.flash-info    { background: #dbeafe; border: 1px solid #93c5fd; color: #1e40af; }
.flash-error   { background: #fee2e2; border: 1px solid #fca5a5; color: #991b1b; }

/* --- Forms --- */
label {
    display: block;
    font-weight: 600;
    font-size: 0.88rem;
    margin-bottom: 0.35rem;
    color: var(--ink);
}
input[type="text"],
input[type="email"],
input[type="tel"],
input[type="password"],
input[type="date"],
input[type="datetime-local"],
input[type="number"],
textarea,
select {
    width: 100%;
    padding: 0.7rem 0.9rem;
    border: 1.5px solid #d1cbbf;
    border-radius: var(--radius-sm);
    font-size: 1rem;
    font-family: var(--font-body);
    background: #fff;
    color: var(--ink);
    margin-bottom: 1rem;
    transition: border-color 0.15s, box-shadow 0.15s;
}
input:focus, textarea:focus, select:focus {
    outline: none;
    border-color: var(--navy);
    box-shadow: 0 0 0 3px rgba(30, 58, 95, 0.14);
}
textarea { resize: vertical; min-height: 110px; }
.hint { font-size: 0.82rem; color: var(--muted); margin-top: -0.65rem; margin-bottom: 1rem; }
.form-row { display: grid; grid-template-columns: 1fr 1fr; gap: 0 1.25rem; }
.checkbox-row {
    display: flex;
    align-items: center;
    gap: 0.65rem;
    margin-bottom: 1.1rem;
}
.checkbox-row input[type="checkbox"] { width: 1rem; height: 1rem; cursor: pointer; margin: 0; }
.checkbox-row label { margin: 0; font-weight: 400; font-size: 0.95rem; }

/* Group of sibling submit-button forms (e.g. blast "Send" actions) that should
   sit side by side on wide screens and wrap onto their own full-width lines on
   mobile without an inline margin hanging the wrapped button off-center. */
.btn-row { display: flex; flex-wrap: wrap; gap: 0.65rem; }
.btn-row form { margin: 0; }

/* A checkbox styled + labeled as a button (e.g. blast "Remove attachment").
   No JS: the checkbox itself is visually hidden but stays in the tab order
   and still submits its value normally; :checked on it re-styles the
   adjacent <label> (which is what's actually visible/clickable) and swaps
   which of its two child spans is shown. Removal only takes effect when the
   surrounding form is saved, same as the checkbox this replaced. */
.btn-toggle-input { position: absolute; opacity: 0; width: 1px; height: 1px; overflow: hidden; }
.btn-toggle-input:focus-visible + .btn-toggle { outline: 2px solid var(--navy); outline-offset: 2px; }
.btn-toggle-on { display: none; }
.btn-toggle-input:checked + .btn-toggle { background: var(--red); border-color: var(--red); color: #fff; }
.btn-toggle-input:checked + .btn-toggle .btn-toggle-off { display: none; }
.btn-toggle-input:checked + .btn-toggle .btn-toggle-on { display: inline; }

/* Announcement composer: one submit button, three labels, CSS :has() picks
   the one matching whichever publish_mode radio is checked -- avoids adding
   a JS handler just to swap button text (see ui.js's data-toggle-target for
   the show/hide half of this, which handles the date-field panel). */
.publish-submit .btn-label-schedule,
.publish-submit .btn-label-draft { display: none; }
form:has(#pub_schedule:checked) .publish-submit .btn-label-now { display: none; }
form:has(#pub_schedule:checked) .publish-submit .btn-label-schedule { display: inline; }
form:has(#pub_draft:checked) .publish-submit .btn-label-now { display: none; }
form:has(#pub_draft:checked) .publish-submit .btn-label-draft { display: inline; }

/* --- Tables --- */
table { width: 100%; border-collapse: collapse; }
th {
    text-align: left;
    padding: 0.6rem 0.85rem;
    font-size: 0.75rem;
    font-weight: 700;
    color: var(--muted);
    text-transform: uppercase;
    letter-spacing: 0.05em;
    border-bottom: 2px solid var(--rule);
}
td { padding: 0.75rem 0.85rem; border-bottom: 1px solid var(--rule); }
tr:last-child td { border-bottom: none; }
td.actions { white-space: nowrap; vertical-align: middle; }
.actions form { display: inline-block; }
.actions > * + * { margin-left: 0.35rem; }

details.card > summary {
    cursor: pointer;
    list-style: none;
    font-family: var(--font-display);
    font-size: 1.6rem;
    font-weight: 600;
    color: var(--navy);
    display: flex;
    align-items: center;
    user-select: none;
}
details.card > summary::-webkit-details-marker { display: none; }
details.card > summary::marker { content: ''; }
details.card > summary::after {
    content: '▶';
    font-size: 0.65rem;
    color: var(--muted);
    margin-left: auto;
    display: inline-block;
    transition: transform 0.2s;
}
details.card[open] > summary::after { transform: rotate(90deg); }
details.card[open] > summary { margin-bottom: 1rem; }

/* --- Tags / badges --- */
.tag {
    display: inline-block;
    background: #eae7e1;
    color: var(--ink);
    border-radius: 4px;
    padding: 0.15rem 0.5rem;
    font-size: 0.75rem;
    font-weight: 700;
    line-height: 1.5;
}
.tag-gold    { background: var(--gold-light); color: #7a5000; }
.tag-green   { background: var(--green-light); color: var(--green-dk); }
.tag-red     { background: #fce8e8; color: var(--red); }
.tag-members { background: var(--green-light); color: var(--green-dk); }
.tag-public  { background: var(--gold-light); color: #7a5000; }

/* --- Empty state --- */
.empty-state {
    text-align: center;
    padding: 3rem 1rem;
    color: var(--muted);
}
.empty-state p { margin-bottom: 0.5rem; }

/* --- Utility --- */
.muted { color: var(--muted); font-size: 0.9rem; }
.text-center { text-align: center; }
.mt-1 { margin-top: 0.5rem; }
.mt-2 { margin-top: 1rem; }
.mt-3 { margin-top: 1.5rem; }
.mb-0 { margin-bottom: 0 !important; }

/* --- News / announcements --- */
.news-item {
    padding: 1.5rem 0;
    border-bottom: 1px solid var(--rule);
}
.news-item:last-child { border-bottom: none; }
.news-title { margin: 0 0 0.2rem; }
.news-meta {
    color: var(--muted);
    font-size: 0.85rem;
    text-transform: uppercase;
    letter-spacing: 0.04em;
    margin-bottom: 0.75rem;
}

/* Rendered Markdown body */
.prose { color: var(--ink, inherit); }
.prose > :first-child { margin-top: 0; }
.prose > :last-child { margin-bottom: 0; }
.prose p { margin: 0 0 0.85rem; }
.prose ul, .prose ol { margin: 0 0 0.85rem 1.25rem; }
.prose li { margin-bottom: 0.3rem; }
.prose h1, .prose h2, .prose h3, .prose h4 { margin: 1.2rem 0 0.5rem; }
.prose blockquote {
    margin: 0 0 0.85rem;
    padding: 0.4rem 0 0.4rem 1rem;
    border-left: 3px solid var(--gold);
    color: var(--muted);
}
.prose code {
    background: var(--gold-light);
    padding: 0.1rem 0.35rem;
    border-radius: 3px;
    font-size: 0.9em;
}
.prose hr { border: none; border-top: 1px solid var(--rule); margin: 1.25rem 0; }

/* Markdown cheatsheet under editor */
.md-cheatsheet {
    margin: 0.4rem 0 1rem;
    font-size: 0.82rem;
    color: var(--muted);
    line-height: 1.9;
}
.md-cheatsheet code {
    background: var(--gold-light);
    color: #7a5000;
    padding: 0.05rem 0.3rem;
    border-radius: 3px;
    margin: 0 0.1rem;
}

/* --- Event list --- */
.event-list { list-style: none; padding: 0; }
.event-item {
    display: flex;
    gap: 1.25rem;
    padding: 1.5rem 0;
    border-bottom: 1px solid var(--rule);
    align-items: flex-start;
}
.event-item:last-child { border-bottom: none; }

.event-date-chip {
    flex-shrink: 0;
    width: 58px;
    text-align: center;
    background: var(--paper);
    border: 1px solid var(--rule);
    border-radius: var(--radius-sm);
    padding: 0.4rem 0 0.5rem;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.07);
}
.chip-month {
    display: block;
    font-size: 0.67rem;
    font-weight: 700;
    letter-spacing: 0.1em;
    text-transform: uppercase;
    color: var(--green);
    line-height: 1.4;
}
.chip-day {
    display: block;
    font-family: var(--font-display);
    font-size: 1.75rem;
    font-weight: 700;
    color: var(--navy);
    line-height: 1;
}

.event-body { flex: 1; min-width: 0; }
.event-title {
    font-family: var(--font-display);
    font-size: 1.1rem;
    font-weight: 600;
    color: var(--navy);
    margin-bottom: 0.25rem;
    line-height: 1.25;
}
.event-meta {
    font-size: 0.88rem;
    color: var(--muted);
    display: flex;
    gap: 0.75rem;
    flex-wrap: wrap;
    align-items: center;
    margin-bottom: 0.35rem;
}
.event-desc { font-size: 0.95rem; color: var(--ink); margin-top: 0.4rem; }

/* --- Officer grid --- */
.officer-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(210px, 1fr));
    gap: 1.25rem;
    margin-top: 1.5rem;
}
.officer-card {
    background: var(--paper);
    border: 1px solid var(--rule);
    border-radius: var(--radius);
    padding: 1.5rem 1.25rem;
    text-align: center;
    transition: box-shadow 0.15s;
}
.officer-card:hover { box-shadow: var(--shadow); }
.officer-avatar {
    height: 72px;
    display: flex;
    align-items: center;
    justify-content: center;
    margin: 0 auto 0.9rem;
}
.officer-avatar img {
    max-height: 100%;
    max-width: 100%;
    object-fit: contain;
}
.officer-role {
    font-size: 0.7rem;
    font-weight: 700;
    letter-spacing: 0.1em;
    text-transform: uppercase;
    color: var(--gold);
    margin-bottom: 0.3rem;
}
.officer-name {
    font-family: var(--font-display);
    font-size: 1.1rem;
    font-weight: 600;
    color: var(--navy);
    margin-bottom: 0.35rem;
}
.officer-email { font-size: 0.83rem; }

/* --- Contact info list --- */
.contact-list { list-style: none; padding: 0; }
.contact-list li {
    display: flex;
    gap: 1.25rem;
    padding: 0.9rem 0;
    border-bottom: 1px solid var(--rule);
    align-items: flex-start;
}
.contact-list li:last-child { border-bottom: none; }
.contact-label {
    font-size: 0.8rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    color: var(--muted);
    min-width: 110px;
    flex-shrink: 0;
    padding-top: 0.15rem;
}

/* --- Document list --- */
.doc-filters {
    display: flex;
    gap: 0.5rem;
    flex-wrap: wrap;
    margin-bottom: 1.75rem;
}
.doc-filter {
    padding: 0.3rem 0.9rem;
    border-radius: 20px;
    font-size: 0.82rem;
    font-weight: 600;
    border: 1.5px solid var(--rule);
    background: transparent;
    color: var(--muted);
    text-decoration: none;
    transition: all 0.15s;
}
.doc-filter:hover { border-color: var(--navy); color: var(--navy); text-decoration: none; }
.doc-filter.active {
    background: var(--green);
    border-color: var(--green);
    color: #fff;
}

.browse-controls {
    display: flex;
    flex-wrap: wrap;
    gap: 0.6rem;
    align-items: center;
    margin: 0.75rem 0 1.25rem;
}
.browse-controls input[type="search"] {
    flex: 1 1 180px;
    min-width: 0;
}
.browse-sort {
    display: inline-flex;
    align-items: center;
    gap: 0.4rem;
    flex-shrink: 0;
}
.browse-sort select {
    width: auto;
    margin-bottom: 0;
}

.doc-year {
    font-family: var(--font-display);
    font-size: 0.95rem;
    font-weight: 700;
    color: var(--muted);
    letter-spacing: 0.04em;
    text-transform: uppercase;
    margin: 1.1rem 0 0.4rem;
    padding-bottom: 0.3rem;
    border-bottom: 1px solid var(--rule);
    list-style: none;
}

.doc-member-prompt {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    padding: 0.875rem 1.25rem;
    background: var(--cream);
    border: 1px solid var(--rule);
    border-left: 3px solid var(--gold);
    border-radius: var(--radius);
    margin-bottom: 1.75rem;
    font-size: 0.9rem;
}
.doc-prompt-icon { color: var(--gold); flex-shrink: 0; display: flex; align-items: center; }
.doc-list { list-style: none; padding: 0; margin: 0; }
.doc-item {
    display: flex;
    align-items: center;
    gap: 1rem;
    padding: 1rem 0;
    border-bottom: 1px solid var(--rule);
}
.doc-item:last-child { border-bottom: none; }
.doc-icon-wrap { flex-shrink: 0; }
.doc-icon {
    display: inline-block;
    background: var(--navy);
    color: #fff;
    font-size: 0.58rem;
    font-weight: 700;
    letter-spacing: 0.06em;
    padding: 0.3rem 0.45rem;
    border-radius: 3px;
}
.doc-body { flex: 1; min-width: 0; }
.doc-title {
    font-weight: 600;
    color: var(--navy);
    margin-bottom: 0.3rem;
    line-height: 1.4;
}
.doc-title a { color: var(--navy); text-decoration: none; }
.doc-title a:hover { color: var(--gold-dk); }
.doc-meta {
    display: flex;
    align-items: center;
    gap: 0.6rem;
    font-size: 0.82rem;
    flex-wrap: wrap;
}

/* --- Member Exchange --- */
.exchange-search {
    display: flex;
    gap: 0.5rem;
    align-items: center;
    margin-bottom: 1.75rem;
}
.exchange-search input[type="text"] { margin-bottom: 0; flex: 1; }
.exchange-search .btn { white-space: nowrap; }
.exchange-list {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
    gap: 1.25rem;
}
.exchange-card { display: flex; flex-direction: column; }
.exchange-card-head {
    display: flex;
    gap: 0.4rem;
    flex-wrap: wrap;
    margin-bottom: 0.6rem;
}
.exchange-title {
    margin: 0 0 0.4rem;
    font-size: 1.25rem;
    color: var(--navy);
}
.exchange-desc {
    color: var(--ink);
    font-size: 0.92rem;
    margin: 0 0 0.9rem;
    white-space: pre-line;
}
.exchange-card-foot {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 0.75rem;
    margin-top: auto;
    padding-top: 0.5rem;
    border-top: 1px solid var(--rule);
}
.exchange-phone { white-space: nowrap; }
.exchange-join {
    text-align: center;
    margin-top: 2rem;
    padding-top: 1.5rem;
    border-top: 1px solid var(--rule);
}
.exchange-join p { margin-bottom: 0.85rem; color: var(--muted); }

/* --- Member welcome panel --- */
.member-welcome {
    background: var(--paper);
    border-left: 4px solid var(--gold);
    border-radius: 0 var(--radius) var(--radius) 0;
    padding: 1.5rem 2rem;
    margin-bottom: 2rem;
    display: flex;
    align-items: center;
    gap: 1.25rem;
    box-shadow: var(--shadow);
}
.member-welcome-cross {
    color: var(--gold);
    flex-shrink: 0;
}
.member-welcome h1 { font-size: 1.8rem; margin-bottom: 0.2rem; }
.member-welcome p { color: var(--muted); margin: 0; font-size: 0.92rem; }

/* --- Login card --- */
.login-card {
    max-width: 440px;
    margin: 3rem auto;
    background: var(--paper);
    border-radius: var(--radius);
    padding: 2.5rem 2rem;
    box-shadow: var(--shadow);
    text-align: center;
}
.login-emblem {
    margin: 0 auto 1.25rem;
    color: var(--navy);
    opacity: 0.85;
}
.login-card h1 { font-size: 2rem; margin-bottom: 0.5rem; }
.login-lead {
    color: var(--muted);
    margin-bottom: 1.75rem;
    font-size: 0.97rem;
}
.login-card form { text-align: left; }
.login-fine {
    color: var(--muted);
    font-size: 0.83rem;
    margin-top: 1.25rem;
    line-height: 1.5;
}

/* --- Principles list (home about section) --- */
.principles-list { list-style: none; padding: 0; margin-top: 0.5rem; }
.principles-list li {
    display: flex;
    align-items: baseline;
    gap: 0.75rem;
    padding: 0.55rem 0;
    border-bottom: 1px solid var(--rule);
    font-family: var(--font-display);
    font-size: 1.05rem;
}
.principles-list li:last-child { border-bottom: none; }
.principle-mark { color: var(--gold); font-size: 1rem; flex-shrink: 0; }

/* --- Home feature tiles --- */
.features-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 1.5rem;
}
.feature-tile {
    background: var(--paper);
    border-radius: var(--radius);
    padding: 1.75rem 1.5rem;
    box-shadow: var(--shadow);
}
.feature-tile h3 { margin-bottom: 0.65rem; }
.feature-tile--dark { background: var(--navy); color: #fff; }
.feature-tile--dark h3 { color: #fff; }
.feature-tile--dark p { color: rgba(255, 255, 255, 0.8); }
.feature-tile--dark .eyebrow { color: var(--gold); }

/* --- Parish callout (about) --- */
.parish-callout {
    border-left: 3px solid var(--green);
    padding-left: 1.25rem;
    margin: 1.5rem 0;
}
.parish-callout .eyebrow { margin-bottom: 0.3rem; }

/* --- CTA band --- */
.cta-band {
    background: var(--navy);
    padding: 3.5rem 0;
    text-align: center;
}
.cta-band h2 { color: #fff; margin-bottom: 0.65rem; }
.cta-band p { color: rgba(255, 255, 255, 0.78); margin-bottom: 1.5rem; }

/* --- Footer --- */
footer.site-footer {
    background: var(--green);
    color: rgba(255, 255, 255, 0.85);
    border-top: 3px solid var(--gold);
}
.footer-main {
    max-width: var(--container-w);
    margin: 0 auto;
    padding: 2.75rem 1.5rem 2rem;
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 3rem;
}
.footer-brand {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    font-family: var(--font-display);
    font-size: 1.1rem;
    font-weight: 600;
    color: #fff;
    margin-bottom: 0.85rem;
}
.footer-brand svg { opacity: 0.85; }
.footer-blurb { font-size: 0.9rem; line-height: 1.65; color: rgba(255, 255, 255, 0.72); }
.footer-blurb p { margin-bottom: 0.4rem; }
.footer-blurb strong { color: #fff; }

.footer-links h4 {
    font-family: var(--font-body);
    font-size: 0.72rem;
    font-weight: 700;
    letter-spacing: 0.13em;
    text-transform: uppercase;
    color: var(--gold);
    margin-bottom: 0.85rem;
}
.footer-links ul { list-style: none; padding: 0; }
.footer-links li { margin-bottom: 0.45rem; }
.footer-links a { color: rgba(255, 255, 255, 0.78); font-size: 0.92rem; }
.footer-links a:hover { color: #fff; text-decoration: none; }

.footer-bottom {
    border-top: 1px solid rgba(255, 255, 255, 0.15);
    padding: 1rem 1.5rem;
    max-width: var(--container-w);
    margin: 0 auto;
    display: flex;
    align-items: center;
    gap: 0.65rem;
    font-size: 0.8rem;
    color: rgba(255, 255, 255, 0.72);
}

/* --- Mobile --- */
@media (max-width: 720px) {
    body { font-size: 16px; }

    h1 { font-size: 1.75rem; }
    h2 { font-size: 1.35rem; }

    .hero h1 { font-size: 2.4rem; }
    .hero { min-height: 320px; padding: 3rem 0; }

    .section { padding: 2.5rem 0; }

    .form-row { grid-template-columns: 1fr; }

    .features-grid { grid-template-columns: 1fr; }
    .footer-main   { grid-template-columns: 1fr; gap: 2rem; }
    .officer-grid  { grid-template-columns: 1fr 1fr; }
    .split-grid    { grid-template-columns: 1fr; gap: 1.75rem; }

    .event-item { flex-direction: column; gap: 0.75rem; }
    .event-date-chip {
        display: flex;
        align-items: center;
        gap: 0.5rem;
        width: auto;
        padding: 0.25rem 0.75rem;
        border-radius: 20px;
    }
    .chip-day { font-size: 1.2rem; }

    .login-card { margin: 1.5rem auto; }
    .member-welcome { flex-direction: column; gap: 0.75rem; }
    .contact-list li { flex-direction: column; gap: 0.2rem; }
    .contact-label { min-width: auto; }

    /* Admin tables collapse to stacked cards (one row = one card) */
    .admin-table thead { display: none; }
    .admin-table, .admin-table tbody, .admin-table tr, .admin-table td {
        display: block;
        width: 100%;
    }
    .admin-table tr {
        border: 1px solid var(--rule);
        border-radius: var(--radius-sm);
        background: var(--paper);
        padding: 0.85rem 1rem;
        margin-bottom: 0.85rem;
    }
    .admin-table tr:last-child td { border-bottom: none; }
    .admin-table td {
        border: none;
        padding: 0.28rem 0;
        display: flex;
        gap: 0.75rem;
        align-items: baseline;
    }
    .admin-table td::before {
        content: attr(data-label);
        flex: 0 0 5.25rem;
        font-size: 0.7rem;
        font-weight: 700;
        text-transform: uppercase;
        letter-spacing: 0.04em;
        color: var(--muted);
    }
    /* First cell renders as the card heading, no label */
    .admin-table td.cell-title {
        display: block;
        font-family: var(--font-display);
        font-size: 1.3rem;
        font-weight: 600;
        color: var(--navy);
        padding-bottom: 0.45rem;
        margin-bottom: 0.5rem;
        border-bottom: 1px solid var(--rule);
    }
    .admin-table td.cell-title::before { content: none; }
    .admin-table td.cell-title strong { font-weight: 600; }
    /* Action buttons wrap onto their own line instead of clipping */
    .admin-table td.actions {
        white-space: normal;
        flex-wrap: wrap;
        gap: 0.5rem;
        margin-top: 0.5rem;
        padding-top: 0.65rem;
        border-top: 1px solid var(--rule);
    }
    .admin-table td.actions::before { content: none; }
    .admin-table td.actions > * + * { margin-left: 0; }
    .admin-table td.actions form { margin: 0; }
}

@media (max-width: 480px) {
    .officer-grid { grid-template-columns: 1fr; }
    .hero h1 { font-size: 2rem; }
    .hero-actions { flex-direction: column; align-items: flex-start; }
    .nav-inner { min-height: auto; padding-top: 0.5rem; padding-bottom: 0.5rem; }
}
