/* ---------------- TOP NAVBAR (193:78) ---------------- */

.mc-navbar {
    position: relative;
    z-index: 50;
    width: 100%;
    height: calc(80px * var(--s));
    background: var(--mc-purple-700);
    display: flex;
    align-items: center;
    justify-content: flex-start;
    gap: 40px;
    padding: 0 40px 0 30px;
    box-sizing: border-box;
}

.mc-navbar-brand {
    display: flex;
    align-items: center;
    gap: calc(13px * var(--s));
    color: var(--mc-paper);
    text-decoration: none;
}

.mc-navbar-crest {
    width: calc(57px * var(--s));
    height: calc(74px * var(--s));
    object-fit: contain;
    filter: drop-shadow(0 0 calc(18px * var(--s)) rgba(0, 0, 0, 0.25));
}

.mc-navbar-wordmark {
    font-family: var(--mc-font-display);
    font-style: italic;
    font-weight: 400;
    font-size: calc(34px * var(--s));
    line-height: 1;
    color: var(--mc-paper);
    text-shadow: 0 0 calc(17px * var(--s)) rgba(0, 0, 0, 0.35);
    white-space: nowrap;
}

.mc-navbar-links {
    display: flex;
    align-items: center;
    gap: 56px;
    white-space: nowrap;
    margin-left: auto;
}

.mc-navbar-link {
    font-family: var(--mc-font-display);
    font-style: italic;
    font-weight: 400;
    font-size: calc(24px * var(--s));
    line-height: 1;
    letter-spacing: 0.04em;
    color: var(--mc-paper);
    text-decoration: none;
    transition: opacity 180ms ease;
    white-space: nowrap;
}

.mc-navbar-link:hover,
.mc-navbar-link:focus-visible {
    color: var(--mc-paper);
    opacity: 0.75;
}

.mc-navbar-trigger {
    background: transparent;
    border: 0;
    padding: 0;
    cursor: pointer;
    display: inline-flex;
    align-items: center;
    gap: calc(6px * var(--s));
    font-family: var(--mc-font-display);
    /* font-style: italic; */
    font-weight: 400;
    letter-spacing: 0.04em;
}


.mc-navbar-item {
    position: relative;
    display: flex;
    align-items: center;
}


.mc-navbar-links .mc-navbar-item:last-child .mc-navbar-dropdown {
    left: auto;
    right: 0;
    transform: translateX(0) translateY(-8px) scale(0.96);
}

.mc-navbar-links .mc-navbar-item:last-child .mc-navbar-dropdown-open {
    transform: translateX(0) translateY(0) scale(1);
}

.mc-navbar-links .mc-navbar-item:last-child .mc-navbar-dropdown::after {
    left: auto;
    right: 24px;
    transform: rotate(45deg);
}

.mc-navbar-dropdown {
    position: absolute;
    top: calc(100% + 14px);
    left: 50%;
    transform: translateX(-50%) translateY(-8px) scale(0.96);
    transform-origin: top center;
    min-width: 260px;
    max-width: 360px;
    background: rgba(255, 255, 255, 0.97);
    color: var(--mc-purple-700);
    border-radius: 14px;
    box-shadow:
        0 1px 0 rgba(255, 255, 255, 0.7) inset,
        0 18px 48px -10px rgba(20, 12, 38, 0.32),
        0 4px 12px rgba(20, 12, 38, 0.12);
    backdrop-filter: blur(12px) saturate(140%);
    -webkit-backdrop-filter: blur(12px) saturate(140%);
    padding: 10px;
    opacity: 0;
    visibility: hidden;
    pointer-events: none;
    transition:
        opacity 220ms cubic-bezier(0.2, 0.8, 0.2, 1),
        transform 260ms cubic-bezier(0.2, 0.8, 0.2, 1),
        visibility 260ms;
    z-index: 60;
    border: 1px solid rgba(74, 52, 112, 0.08);
}

.mc-navbar-dropdown-open {
    opacity: 1;
    visibility: visible;
    pointer-events: auto;
    transform: translateX(-50%) translateY(0) scale(1);
}

.mc-navbar-dropdown::after {
    content: '';
    position: absolute;
    top: -7px;
    left: 50%;
    transform: translateX(-50%) rotate(45deg);
    width: 12px;
    height: 12px;
    background: rgba(255, 255, 255, 0.97);
    border-top: 1px solid rgba(74, 52, 112, 0.08);
    border-left: 1px solid rgba(74, 52, 112, 0.08);
}

.mc-navbar-dropdown::before {
    content: '';
    position: absolute;
    inset: -16px -8px 100% -8px;
    background: transparent;
}

.mc-navbar-dropdown-link {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 10px 16px 10px 28px;
    font-family: var(--mc-font-body);
    font-size: 0.96rem;
    font-weight: 500;
    color: var(--mc-purple-700);
    text-decoration: none;
    border-radius: 8px;
    transition:
        background 160ms ease,
        color 160ms ease;
    white-space: nowrap;
    position: relative;
}

.mc-navbar-dropdown-link::before {
    content: '\203A';
    position: absolute;
    left: 14px;
    top: 50%;
    transform: translate(-6px, -50%);
    color: var(--mc-purple-500);
    font-size: 1.1em;
    line-height: 1;
    opacity: 0;
    transition: opacity 160ms ease, transform 200ms cubic-bezier(0.2, 0.8, 0.2, 1);
}

.mc-navbar-dropdown-link:hover,
.mc-navbar-dropdown-link:focus-visible {
    background: linear-gradient(
        to right,
        rgba(74, 52, 112, 0.10),
        rgba(160, 124, 180, 0.04)
    );
    color: var(--mc-purple-700);
}

.mc-navbar-dropdown-link:hover::before,
.mc-navbar-dropdown-link:focus-visible::before {
    opacity: 1;
    transform: translate(0, -50%);
}

/* ----- Nested submenu ----- */
.mc-navbar-submenu {
    position: relative;
    cursor: default;
}

.mc-navbar-submenu .mc-navbar-submenu-label {
    display: flex;
    align-items: center;
    width: 100%;
    gap: 10px;
}

.mc-navbar-submenu-panel {
    position: absolute;
    top: -4px;
    right: 100%;
    margin-right: 8px;
    min-width: 220px;
    background: var(--mc-paper);
    border: 1px solid rgba(74, 52, 112, 0.18);
    border-radius: 14px;
    box-shadow:
        0 20px 50px -16px rgba(74, 52, 112, 0.32),
        0 4px 12px rgba(20, 12, 38, 0.08);
    padding: 6px;
    display: flex;
    flex-direction: column;
    gap: 2px;
    opacity: 0;
    transform: translateX(6px);
    pointer-events: none;
    transition: opacity 180ms ease, transform 180ms cubic-bezier(0.2, 0.8, 0.2, 1);
    z-index: 1;
}

.mc-navbar-submenu::before {
    content: '';
    position: absolute;
    top: -4px;
    bottom: -4px;
    right: 100%;
    width: 16px;
    background: transparent;
    pointer-events: none;
}

.mc-navbar-submenu:hover::before,
.mc-navbar-submenu:focus-within::before {
    pointer-events: auto;
}

.mc-navbar-submenu:hover .mc-navbar-submenu-panel,
.mc-navbar-submenu:focus-within .mc-navbar-submenu-panel {
    opacity: 1;
    transform: translateX(0);
    pointer-events: auto;
}

.mc-navbar-submenu-panel:hover {
    opacity: 1;
    transform: translateX(0);
    pointer-events: auto;
}


/* ---------- Main navbar caret ---------- */

.mc-navbar-caret {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 0.8em;
    height: 0.8em;
}

.mc-navbar-caret::before {
    content: "";
    width: 0;
    height: 0;
    border-left: .28em solid transparent;
    border-right: .28em solid transparent;
    border-top: .34em solid currentColor;
    transition: transform .22s cubic-bezier(0.2, 0.8, 0.2, 1);
}

.mc-navbar-item:hover .mc-navbar-caret::before,
.mc-navbar-caret-open::before {
    transform: rotate(180deg);
}

/* ---------- Nested submenu caret ---------- */

.mc-navbar-submenu-caret {
    display: inline-flex;
    width: .75em;
    height: .75em;
    align-items: center;
    justify-content: center;
}

.mc-navbar-submenu-caret::before {
    content: "";
    width: .4em;
    height: .4em;
    border-top: 2px solid var(--mc-purple-500);
    border-left: 2px solid var(--mc-purple-500);
    transform: rotate(-135deg);
    transition: transform .2s cubic-bezier(0.2, 0.8, 0.2, 1);
}

.mc-navbar-submenu:hover .mc-navbar-submenu-caret::before,
.mc-navbar-submenu:focus-within .mc-navbar-submenu-caret::before {
    transform: rotate(-45deg);
}

/* ---------- Mobile drawer caret ---------- */

.mc-mobile-drawer-caret {
    display: inline-flex;
    width: 1em;
    height: 1em;
    align-items: center;
    justify-content: center;
}

.mc-mobile-drawer-caret::before {
    content: "";
    width: 0;
    height: 0;
    border-left: .3em solid transparent;
    border-right: .3em solid transparent;
    border-top: .38em solid rgba(255,255,255,.75);
    transition: transform .22s cubic-bezier(.2,.8,.2,1);
}

.mc-mobile-drawer-caret-open::before {
    transform: rotate(180deg);
}

/* ---------- Drawer close button ---------- */

.mc-mobile-drawer-close {
    position: relative;
    align-self: flex-end;
    width: 40px;
    height: 40px;
    background: transparent;
    border: 0;
    cursor: pointer;
    padding: 0;
    margin-bottom: 24px;
}

.mc-mobile-drawer-close::before,
.mc-mobile-drawer-close::after {
    content: "";
    position: absolute;
    left: 50%;
    top: 50%;
    width: 24px;
    height: 2px;
    background: var(--mc-paper);
    border-radius: 2px;
}

.mc-mobile-drawer-close::before {
    transform: translate(-50%, -50%) rotate(45deg);
}

.mc-mobile-drawer-close::after {
    transform: translate(-50%, -50%) rotate(-45deg);
}

/* ----- Mobile drawer ----- */
.mc-mobile-drawer-subsection {
    font-family: var(--mc-font-body);
    font-weight: 700;
    font-size: 0.74rem;
    letter-spacing: 0.14em;
    text-transform: uppercase;
    color: var(--mc-purple-500);
    padding: 14px 16px 6px;
    margin-top: 4px;
}

.mc-mobile-drawer-sublink-nested {
    padding-left: 32px !important;
}

.mc-navbar-brand:hover,
.mc-mobile-drawer-link:hover,
.mc-mobile-drawer-link:focus-visible {
    color: var(--mc-paper);
}

/* ---------------- MOBILE HAMBURGER + DRAWER ---------------- */

.mc-navbar-hamburger {
    display: none;
    background: transparent;
    border: 0;
    cursor: pointer;
    padding: 8px;
    flex-direction: column;
    gap: 5px;
    width: 40px;
    height: 40px;
    justify-content: center;
    align-items: center;
    margin-left: auto;
}

.mc-hamburger-line {
    display: block;
    width: 24px;
    height: 2px;
    background: var(--mc-paper);
    border-radius: 2px;
}

.mc-mobile-scrim {
    position: fixed;
    inset: 0;
    background: rgba(0, 0, 0, 0.45);
    opacity: 0;
    visibility: hidden;
    transition: opacity 220ms ease, visibility 220ms ease;
    z-index: 90;
}

.mc-mobile-scrim-open {
    opacity: 1;
    visibility: visible;
}

/* The off-canvas drawer parks beyond the right edge via translateX(100%);
 * Chromium still counts it toward the document's horizontal scroll range,
 * so clip the viewport's x-axis (body overflow propagates to the viewport,
 * so this doesn't create an inner scroll container). */
body {
    overflow-x: hidden;
}

.mc-mobile-drawer {
    position: fixed;
    top: 0;
    right: 0;
    width: min(82vw, 320px);
    height: 100vh;
    background: var(--mc-purple-700);
    color: var(--mc-paper);
    display: flex;
    flex-direction: column;
    padding: 28px 24px;
    overflow-y: auto;
    transform: translateX(100%);
    transition: transform 280ms cubic-bezier(0.4, 0, 0.2, 1);
    z-index: 100;
    box-shadow: -8px 0 24px rgba(0, 0, 0, 0.25);
}

.mc-mobile-drawer-open {
    transform: translateX(0);
}

.mc-mobile-drawer-links {
    display: flex;
    flex-direction: column;
    gap: 4px;
}

.mc-mobile-drawer-link {
    display: flex;
    align-items: center;
    justify-content: space-between;
    width: 100%;
    padding: 10px 4px;
    font-family: var(--mc-font-display);
    font-style: italic;
    font-size: 1.2rem;
    color: var(--mc-paper);
    text-decoration: none;
    border: 0;
    border-bottom: 1px solid rgba(255, 255, 255, 0.15);
    background: transparent;
    box-shadow: none;
    cursor: pointer;
    text-align: left;
    transition: padding-left 180ms ease, background 180ms ease;
    box-sizing: border-box;
}

.mc-mobile-drawer-link:hover,
.mc-mobile-drawer-link:focus,
.mc-mobile-drawer-link:focus-visible {
    padding-left: 12px;
    background: rgba(255, 255, 255, 0.06);
    color: var(--mc-paper);
}

.mc-mobile-drawer-trigger {
    font-family: var(--mc-font-display);
    font-style: italic;
}

.mc-mobile-drawer-sublinks {
    display: grid;
    grid-template-rows: 0fr;
    opacity: 0;
    transition:
        grid-template-rows 320ms cubic-bezier(0.2, 0.8, 0.2, 1),
        opacity 240ms ease,
        border-color 320ms ease;
    border-bottom: 1px solid rgba(255, 255, 255, 0);
}

.mc-mobile-drawer-sublinks-inner {
    min-height: 0;
    overflow: hidden;
    display: flex;
    flex-direction: column;
    padding: 0 0 0 18px;
}

.mc-mobile-drawer-sublinks-open {
    grid-template-rows: 1fr;
    opacity: 1;
    border-bottom-color: rgba(255, 255, 255, 0.15);
}

.mc-mobile-drawer-sublinks-open .mc-mobile-drawer-sublinks-inner {
    padding: 4px 0 12px 18px;
}

.mc-mobile-drawer-sublink {
    display: block;
    padding: 10px 4px;
    font-family: var(--mc-font-body);
    font-size: 1rem;
    color: rgba(255, 255, 255, 0.85);
    text-decoration: none;
    transition: padding-left 180ms ease, color 180ms ease, transform 200ms ease;
    transform: translateX(-6px);
    opacity: 0;
}

.mc-mobile-drawer-sublinks-open .mc-mobile-drawer-sublink {
    transform: translateX(0);
    opacity: 1;
    transition:
        padding-left 180ms ease,
        color 180ms ease,
        transform 280ms cubic-bezier(0.2, 0.8, 0.2, 1),
        opacity 280ms ease;
}

.mc-mobile-drawer-sublinks-open .mc-mobile-drawer-sublink:nth-child(1)  { transition-delay: 40ms; }
.mc-mobile-drawer-sublinks-open .mc-mobile-drawer-sublink:nth-child(2)  { transition-delay: 80ms; }
.mc-mobile-drawer-sublinks-open .mc-mobile-drawer-sublink:nth-child(3)  { transition-delay: 120ms; }
.mc-mobile-drawer-sublinks-open .mc-mobile-drawer-sublink:nth-child(4)  { transition-delay: 160ms; }
.mc-mobile-drawer-sublinks-open .mc-mobile-drawer-sublink:nth-child(5)  { transition-delay: 180ms; }
.mc-mobile-drawer-sublinks-open .mc-mobile-drawer-sublink:nth-child(6)  { transition-delay: 200ms; }
.mc-mobile-drawer-sublinks-open .mc-mobile-drawer-sublink:nth-child(7)  { transition-delay: 220ms; }
.mc-mobile-drawer-sublinks-open .mc-mobile-drawer-sublink:nth-child(8)  { transition-delay: 240ms; }
.mc-mobile-drawer-sublinks-open .mc-mobile-drawer-sublink:nth-child(9)  { transition-delay: 260ms; }
.mc-mobile-drawer-sublinks-open .mc-mobile-drawer-sublink:nth-child(10) { transition-delay: 280ms; }
.mc-mobile-drawer-sublinks-open .mc-mobile-drawer-sublink:nth-child(11) { transition-delay: 300ms; }

.mc-mobile-drawer-sublink:hover,
.mc-mobile-drawer-sublink:focus-visible {
    padding-left: 10px;
    color: var(--mc-paper);
}

.mc-mobile-drawer-section {
    display: flex;
    flex-direction: column;
}

@media (max-width: 1100px) {
    .mc-navbar {
        height: 64px;
        padding: 0 20px;
        gap: 20px;
    }
    .mc-navbar-crest {
        width: 36px;
        height: 46px;
    }
    .mc-navbar-wordmark {
        font-size: 1.25rem;
    }
    .mc-navbar-links {
        gap: 36px;
    }
    .mc-navbar-link {
        font-size: 1rem;
    }
}

@media (max-width: 900px) {
    .mc-navbar {
        padding: 0 16px;
    }
    .mc-navbar-wordmark {
        font-size: 1.05rem;
    }
    .mc-navbar-links {
        display: none;
    }
    .mc-navbar-hamburger {
        display: flex;
    }
}



/* 1767x378 purple block, wordmark + contact + faded yurt silhouette */

.mc-footer {
    position: relative;
    width: 100%;
    height: calc(378px * var(--s));
    background: var(--mc-purple-700);
    overflow: hidden;
    isolation: isolate;
}

.mc-footer-silhouette {
    position: absolute;
    top: calc(82px * var(--s));
    left: calc(311px * var(--s));
    width: calc(1143px * var(--s));
    height: calc(336px * var(--s));
    opacity: 0.2;
    pointer-events: none;
    z-index: 0;
}

.mc-footer-wordmark {
    position: absolute;
    top: calc(93px * var(--s));
    left: calc(94px * var(--s));
    width: calc(465px * var(--s));
    color: var(--mc-paper-warm);
    font-family: var(--mc-font-display);
    font-style: italic;
    font-weight: 400;
    font-size: calc(122.382px * var(--s));
    line-height: 0.6822;
    display: flex;
    flex-direction: column;
    gap: 0;
    z-index: 2;
}

.mc-footer-wordmark span {
    display: block;
}

.mc-footer-contact {
    position: absolute;
    top: calc(94px * var(--s));
    left: calc(1291px * var(--s));
    width: calc(393px * var(--s));
    font-family: var(--mc-font-body);
    font-style: normal;
    font-weight: 400;
    font-size: calc(20px * var(--s));
    line-height: 2.81;
    color: var(--mc-paper);
    z-index: 2;
}

.mc-footer-contact p {
    margin: 0;
    color: var(--mc-paper);
}

.mc-footer-contact a {
    color: var(--mc-paper);
    text-decoration: none;
}

.mc-footer-contact a:hover,
.mc-footer-contact a:focus-visible {
    color: var(--mc-paper);
    text-decoration: underline;
}

.mc-footer-row {
    display: flex;
    align-items: center;
    gap: calc(20px * var(--s));
}

.mc-footer-icon {
    display: inline-flex;
    width: calc(24px * var(--s));
    height: calc(24px * var(--s));
    align-items: center;
    justify-content: center;
    font-size: calc(20px * var(--s));
}

@media (max-width: 1024px) {
    .mc-footer {
        height: auto;
        padding: 36px 24px;
    }
    .mc-footer-silhouette {
        opacity: 0.08;
        top: auto;
        bottom: 0;
        left: 50%;
        transform: translateX(-50%);
        width: 90%;
        height: auto;
    }
    .mc-footer-wordmark {
        /* z-index only applies to positioned elements - static would drop
           this behind the absolutely-positioned background layers (e.g. the
           O-Week tree panorama), so keep it positioned via `relative`, and
           reset the desktop rule's top/left offsets (inert under `static`,
           but relative would otherwise apply them as real offsets). */
        position: relative;
        top: auto;
        left: auto;
        width: auto;
        font-size: clamp(2.5rem, 10vw, 4.5rem);
        line-height: 0.85;
        margin-bottom: 24px;
    }
    .mc-footer-contact {
        position: relative;
        top: auto;
        left: auto;
        width: 100%;
        line-height: 1.7;
        font-size: 0.95rem;
    }
    .mc-footer-icon {
        width: 22px;
        height: 22px;
        font-size: 18px;
    }
}

@media (max-width: 640px) {
    .mc-footer {
        padding: 28px 18px;
    }
    .mc-footer-wordmark {
        font-size: clamp(2.25rem, 13vw, 3.4rem);
        margin-bottom: 18px;
    }
    .mc-footer-contact {
        font-size: 0.9rem;
        line-height: 1.7;
    }
}

/* ============================================================
 * Person chip - compact alternative to the contact card for
 * pages where people only have a name + email (committee
 * rosters etc.).
 *
 * Visual spec:
 *   - Wrapping, centered flex row of pill chips.
 *   - Chip = initial circle + name (italic display) + email.
 *   - Chips with an email are mailto links.
 *   - `accent` variant fills the initial circle in purple-700
 *     (used for committee heads).
 *
 * Portrait layout (see PersonChip.js): when anyone in the group has
 * a photo the whole group switches to 4:5 portrait tiles - the picture
 * fills the tile edge to edge and the name/role sits in a tag across
 * the bottom. People with no photo on file get a matching tile with
 * their initial, so a half-photographed roster still grids up.
 * ============================================================ */

.pc-row {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: clamp(10px, 1.5vw, 16px);
    width: 100%;
    max-width: 1100px;
    margin: 0 auto;
    padding: 0 clamp(16px, 4vw, 48px) clamp(28px, 4vw, 44px);
    box-sizing: border-box;
}

.pc-chip {
    display: flex;
    align-items: center;
    gap: 12px;
    background: var(--mc-paper, #ffffff);
    border: 1.5px solid var(--mc-purple-700, #4a3470);
    border-radius: 999px;
    padding: 8px 24px 8px 10px;
    text-decoration: none;
    box-shadow: 0 8px 24px -16px rgba(74, 52, 112, 0.30);
    transition: transform 220ms cubic-bezier(0.2, 0.8, 0.2, 1),
                box-shadow 220ms ease;
    max-width: 100%;
    min-width: 0;
}

a.pc-chip:hover,
a.pc-chip:focus-visible {
    transform: translateY(-2px);
    box-shadow: 0 16px 32px -18px rgba(74, 52, 112, 0.45);
}

.pc-initial {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 44px;
    height: 44px;
    border-radius: 50%;
    flex-shrink: 0;
    font-family: var(--mc-font-display, 'Playfair Display', serif);
    font-style: italic;
    font-size: 1.3rem;
    line-height: 1;
    color: var(--mc-purple-500, #8b6fc7);
    -webkit-text-fill-color: var(--mc-purple-500, #8b6fc7);
    background: linear-gradient(160deg, rgba(139, 111, 199, 0.28), rgba(139, 111, 199, 0.10));
}

.pc-chip-accent .pc-initial {
    color: #ffffff;
    -webkit-text-fill-color: #ffffff;
    background: var(--mc-purple-700, #4a3470);
}

.pc-text {
    display: flex;
    flex-direction: column;
    min-width: 0;
}

.pc-position {
    font-family: var(--mc-font-body, 'DM Sans', sans-serif);
    font-weight: 700;
    font-size: 0.64rem;
    letter-spacing: 0.10em;
    text-transform: uppercase;
    line-height: 1.3;
    color: var(--mc-purple-500, #8b6fc7);
    -webkit-text-fill-color: var(--mc-purple-500, #8b6fc7);
}

.pc-name {
    font-family: var(--mc-font-display, 'Playfair Display', serif);
    font-style: italic;
    font-size: 1.05rem;
    line-height: 1.25;
    color: var(--mc-purple-700, #4a3470);
    -webkit-text-fill-color: var(--mc-purple-700, #4a3470);
    overflow-wrap: anywhere;
}

.pc-email {
    font-family: var(--mc-font-body, 'DM Sans', sans-serif);
    font-weight: 500;
    font-size: 0.82rem;
    line-height: 1.35;
    color: var(--mc-purple-500, #8b6fc7);
    -webkit-text-fill-color: var(--mc-purple-500, #8b6fc7);
    overflow-wrap: anywhere;
    transition: color 160ms ease;
}

a.pc-chip:hover .pc-email,
a.pc-chip:focus-visible .pc-email {
    color: var(--mc-purple-700, #4a3470);
    -webkit-text-fill-color: var(--mc-purple-700, #4a3470);
}

/* ---------- Portrait tiles ---------- */

.pc-row-portrait {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(150px, 1fr));
    gap: clamp(12px, 1.6vw, 20px);
    justify-items: center;
    width: 100%;
    max-width: 1100px;
    margin: 0 auto;
    padding: 0 clamp(12px, 3vw, 40px) clamp(28px, 4vw, 44px);
    box-sizing: border-box;
}

.pc-portrait {
    position: relative;
    display: block;
    width: 100%;
    appearance: none;
    -webkit-appearance: none;
    padding: 0;
    font: inherit;
    color: inherit;
    cursor: pointer;
    text-align: left;
    max-width: 260px;
    /* Taller than wide. Square tiles go stubby the moment two sit side by
     * side in one card, and a standing shot has nothing to put in the
     * corners anyway. */
    aspect-ratio: 4 / 5;
    border-radius: 16px;
    overflow: hidden;
    border: 1.5px solid var(--mc-purple-700, #4a3470);
    background: linear-gradient(160deg, rgba(139, 111, 199, 0.28), rgba(139, 111, 199, 0.10));
    text-decoration: none;
    box-shadow: 0 10px 26px -18px rgba(74, 52, 112, 0.45);
    transition: transform 220ms cubic-bezier(0.2, 0.8, 0.2, 1),
                box-shadow 220ms ease;
}

.pc-portrait:hover,
.pc-portrait:focus-visible {
    transform: translateY(-3px);
    box-shadow: 0 20px 36px -20px rgba(74, 52, 112, 0.55);
}

.pc-portrait-accent {
    border-width: 2.5px;
}

/* The picture IS the tile. These are standing shots taken under the live
 * oaks, so the top of the frame is mostly canopy - the crop window sits
 * low enough to trade that away for the face. */
.pc-portrait-photo {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    object-fit: cover;
    object-position: center 62%;
    display: block;
}

/* No photo on file: the initial takes the picture's place at the same
 * scale, rather than shrinking to a chip-sized circle inside a mostly
 * empty tile. */
.pc-portrait-blank {
    display: flex;
    align-items: center;
    justify-content: center;
    font-family: var(--mc-font-display, 'Playfair Display', serif);
    font-style: italic;
    font-size: 3.4rem;
    line-height: 1;
    color: var(--mc-purple-500, #8b6fc7);
    -webkit-text-fill-color: var(--mc-purple-500, #8b6fc7);
    /* the tag still needs to be readable, so leave room under the letter */
    padding-bottom: 20%;
    box-sizing: border-box;
}

/* Tie the letter to the tile's own width so it stays proportionally big
 * at every tile size - the chart's tiles are half the width of a full
 * page row's, and a fixed rem would look lost in one and cramped in the
 * other. Falls back to the rem size above where cqw is unsupported. */
@supports (container-type: inline-size) {
    .pc-portrait {
        container-type: inline-size;
    }

    .pc-portrait-blank {
        font-size: 46cqw;
    }
}

/* Name tag across the bottom. The scrim fades upward so it never cuts a
 * hard line across the photo. */
.pc-portrait-text {
    position: absolute;
    left: 0;
    right: 0;
    bottom: 0;
    display: flex;
    flex-direction: column;
    align-items: center;
    text-align: center;
    gap: 1px;
    padding: 26px 10px 10px;
    background: linear-gradient(to top,
        rgba(48, 32, 76, 0.94) 0%,
        rgba(48, 32, 76, 0.82) 45%,
        rgba(48, 32, 76, 0.00) 100%);
}

.pc-portrait-text .pc-position {
    color: rgba(255, 255, 255, 0.78);
    -webkit-text-fill-color: rgba(255, 255, 255, 0.78);
}

.pc-portrait-text .pc-name,
.pc-portrait-text .pc-email {
    color: #ffffff;
    -webkit-text-fill-color: #ffffff;
}

.pc-portrait-text .pc-email {
    font-size: 0.76rem;
    color: rgba(255, 255, 255, 0.85);
    -webkit-text-fill-color: rgba(255, 255, 255, 0.85);
}

/* Expand affordance: a corner badge that only comes up on hover, so it
 * stays out of the way of the picture until you go looking for it. On
 * touch there is no hover state, so show it always. */
.pc-portrait-more {
    position: absolute;
    top: 8px;
    right: 8px;
    display: flex;
    align-items: center;
    justify-content: center;
    width: 26px;
    height: 26px;
    border-radius: 50%;
    background: rgba(28, 20, 48, 0.55);
    color: #ffffff;
    -webkit-text-fill-color: #ffffff;
    font-size: 0.9rem;
    opacity: 0;
    transform: scale(0.85);
    transition: opacity 180ms ease, transform 180ms ease;
}

.pc-portrait:hover .pc-portrait-more,
.pc-portrait:focus-visible .pc-portrait-more {
    opacity: 1;
    transform: scale(1);
}

@media (hover: none) {
    .pc-portrait-more {
        opacity: 0.85;
        transform: none;
    }
}

@media (prefers-reduced-motion: reduce) {
    .pc-portrait { transition: none; }
    .pc-portrait:hover,
    .pc-portrait:focus-visible { transform: none; }
    .pc-portrait-more { transition: none; }
}


/* ---------- Expanded tile ---------- */

.pc-modal-scrim {
    position: fixed;
    inset: 0;
    /* above the McMinistry role modal (z-index 200), which on mobile can
     * be the thing the tile was tapped inside of */
    z-index: 300;
    background: rgba(28, 20, 48, 0.62);
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 20px;
    animation: pc-scrim-fade 200ms ease;
}

.pc-modal {
    position: relative;
    width: min(360px, 100%);
    max-height: 90vh;
    overflow-y: auto;
    background: var(--mc-paper, #ffffff);
    border: 1.5px solid var(--mc-purple-700, #4a3470);
    border-radius: 20px;
    box-shadow: 0 40px 80px -30px rgba(28, 20, 48, 0.65);
    animation: pc-modal-zoom 240ms cubic-bezier(0.2, 0.8, 0.2, 1);
}

.pc-modal-scrim-closing {
    animation: pc-scrim-fade-out 200ms ease forwards;
    pointer-events: none; /* ignore clicks while closing */
}

.pc-modal-scrim-closing .pc-modal {
    animation: pc-modal-zoom-out 200ms cubic-bezier(0.4, 0, 1, 1) forwards;
}

@keyframes pc-scrim-fade {
    from { opacity: 0; }
    to   { opacity: 1; }
}

@keyframes pc-scrim-fade-out {
    from { opacity: 1; }
    to   { opacity: 0; }
}

@keyframes pc-modal-zoom {
    from { opacity: 0; transform: scale(0.92) translateY(12px); }
    to   { opacity: 1; transform: none; }
}

@keyframes pc-modal-zoom-out {
    from { opacity: 1; transform: none; }
    to   { opacity: 0; transform: scale(0.94) translateY(8px); }
}

/* The picture keeps the tile's 4:5 crop, so opening one is a zoom rather
 * than a recomposition. */
.pc-modal-figure {
    position: relative;
    width: 100%;
    aspect-ratio: 4 / 5;
    border-radius: 18px 18px 0 0;
    overflow: hidden;
    background: linear-gradient(160deg, rgba(139, 111, 199, 0.28), rgba(139, 111, 199, 0.10));
}

.pc-modal-photo {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    object-fit: cover;
    object-position: center 62%;
    display: block;
}

/* The blank variant shares .pc-modal-photo, whose `display: block` is
 * declared later in this file and would otherwise beat the flex
 * centering on .pc-portrait-blank - leaving the letter stuck in the top
 * left, spilling out of the frame. Restate it at higher specificity.
 * There is no tag overlapping the letter here, so no reserved space. */
.pc-modal-figure .pc-portrait-blank {
    display: flex;
    align-items: center;
    justify-content: center;
    padding-bottom: 0;
    font-size: 8rem;
}

@supports (container-type: inline-size) {
    .pc-modal-figure {
        container-type: inline-size;
    }

    .pc-modal-figure .pc-portrait-blank {
        font-size: 46cqw;
    }
}

.pc-modal-body {
    display: flex;
    flex-direction: column;
    align-items: center;
    text-align: center;
    gap: 6px;
    padding: 16px 18px 20px;
}

.pc-modal-position {
    margin: 0;
    font-family: var(--mc-font-body, 'DM Sans', sans-serif);
    font-weight: 700;
    font-size: 0.68rem;
    letter-spacing: 0.12em;
    text-transform: uppercase;
    color: var(--mc-purple-500, #8b6fc7);
    -webkit-text-fill-color: var(--mc-purple-500, #8b6fc7);
}

.pc-modal-name {
    margin: 0;
    font-family: var(--mc-font-display, 'Playfair Display', serif);
    font-style: italic;
    font-weight: 400;
    font-size: 1.5rem;
    line-height: 1.2;
    color: var(--mc-purple-700, #4a3470);
    -webkit-text-fill-color: var(--mc-purple-700, #4a3470);
    overflow-wrap: anywhere;
}

.pc-modal-email {
    display: inline-flex;
    align-items: center;
    gap: 7px;
    margin-top: 4px;
    padding: 7px 16px;
    border: 1.5px solid var(--mc-purple-700, #4a3470);
    border-radius: 999px;
    font-family: var(--mc-font-body, 'DM Sans', sans-serif);
    font-weight: 500;
    font-size: 0.85rem;
    text-decoration: none;
    color: var(--mc-purple-700, #4a3470);
    -webkit-text-fill-color: var(--mc-purple-700, #4a3470);
    overflow-wrap: anywhere;
    transition: background 160ms ease, color 160ms ease;
}

.pc-modal-email:hover,
.pc-modal-email:focus-visible {
    background: var(--mc-purple-700, #4a3470);
    color: #ffffff;
    -webkit-text-fill-color: #ffffff;
}

.pc-modal-close {
    position: absolute;
    top: 12px;
    right: 12px;
    z-index: 1;
    appearance: none;
    border: none;
    background: rgba(28, 20, 48, 0.55);
    color: #ffffff;
    -webkit-text-fill-color: #ffffff;
    width: 34px;
    height: 34px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.05rem;
    cursor: pointer;
    transition: background 160ms ease;
}

.pc-modal-close:hover,
.pc-modal-close:focus-visible {
    background: var(--mc-purple-700, #4a3470);
}

@media (prefers-reduced-motion: reduce) {
    .pc-modal-scrim,
    .pc-modal,
    .pc-modal-scrim-closing,
    .pc-modal-scrim-closing .pc-modal {
        animation: none;
    }
}

