:root {
    --ink: #262532;
    --muted: #656071;
    --brand: #554f7f;
    --brand-dark: #312b55;
    --brand-soft: #f2f0f8;
    --accent: #2f7f90;
    --accent-soft: #e9f5f6;
    --paper: #ffffff;
    --soft: #fbfafc;
    --line: #ded9e8;
    --shadow: 0 16px 35px rgba(49, 43, 85, .12);
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; scroll-padding-top: 6rem; }
button, input, select, textarea { font: inherit; }
button, summary, select { cursor: pointer; }
input, select, textarea { max-width: 100%; min-width: 0; }
a, button, summary { touch-action: manipulation; }
:focus-visible { outline: 3px solid var(--accent); outline-offset: 3px; }
.navigation > summary { display: none; }
.navigation:not([open]) > :not(summary) { display: block; }
.navigation__heading { display: none; }
.navigation a[aria-current="page"] { color: var(--brand-dark); font-weight: 750; text-decoration: underline; text-underline-offset: .25em; }
body {
    margin: 0;
    color: var(--ink);
    background: var(--paper);
    font-family: "Segoe UI", Roboto, Arial, sans-serif;
    line-height: 1.55;
}
a { color: inherit; }
img { display: block; max-width: 100%; }
.analytics-choice { padding: 1rem max(1rem, calc((100% - 1160px) / 2)); border-bottom: 1px solid var(--line); background: #fff; }
.analytics-choice[hidden] { display: none; }
.analytics-choice h2 { font-size: 1.15rem; margin: 0 0 .5rem; }
.analytics-choice p { margin: .5rem 0; }
.analytics-choice__actions { display: flex; flex-wrap: wrap; gap: .75rem; }
.analytics-settings { font: inherit; color: inherit; border: 0; background: transparent; text-decoration: underline; padding: .75rem; min-height: 44px; cursor: pointer; }
.skip-link {
    position: absolute;
    left: 1rem;
    top: 1rem;
    transform: translateY(-150%);
    background: var(--brand-dark);
    color: #fff;
    padding: .6rem .8rem;
    z-index: 20;
}
.skip-link:focus { transform: translateY(0); }

.site-header {
    position: sticky;
    top: 0;
    z-index: 10;
    border-bottom: 1px solid rgba(85, 79, 127, .18);
    background: #fff;
    box-shadow: 0 8px 18px rgba(49, 43, 85, .06);
}
.site-header__brand {
    display: flex;
    justify-content: center;
    padding: .9rem 1rem .5rem;
}
.brand {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: .8rem;
    color: var(--brand);
    font-weight: 800;
    text-align: center;
    text-decoration: none;
}
.brand img {
    width: 74px;
    height: 74px;
    object-fit: contain;
}
.brand span {
    max-width: 22rem;
    color: var(--brand-dark);
    font-size: 1.12rem;
    line-height: 1.12;
}
.site-nav,
.event-nav,
.site-footer nav {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: .25rem .8rem;
    padding: .45rem 1rem;
    color: var(--muted);
    font-size: .95rem;
}
.event-nav {
    border-top: 1px solid rgba(85, 79, 127, .12);
    background: var(--brand-soft);
    font-size: .9rem;
}
.site-nav a,
.event-nav a,
.site-footer nav a {
    border-radius: 8px;
    padding: .35rem .45rem;
    text-decoration: none;
}
.site-nav a:hover,
.event-nav a:hover,
.site-footer nav a:hover,
.text-link:hover { color: var(--brand-dark); }
.login-link {
    border: 1px solid var(--brand);
    color: var(--brand);
    font-weight: 800;
}

.navigation .site-nav { position: relative; max-width: 1160px; margin: 0 auto; align-items: start; gap: .25rem; padding: .4rem .75rem; }
.site-nav > a, .nav-group > summary { display: block; padding: .8rem .85rem; min-height: 48px; color: var(--brand-dark); font-size: .95rem; }
.nav-group > summary { display: list-item; list-style-position: inside; border-radius: 4px; }
.nav-group > summary:hover, .nav-group[open] > summary { background: var(--accent-soft); }
.nav-group--current > summary { font-weight: 750; text-decoration: underline; text-underline-offset: .3em; }
.nav-panel { position: absolute; top: 100%; left: 50%; transform: translateX(-50%); width: min(480px, calc(100vw - 2rem)); max-height: 65vh; max-height: min(65dvh, calc(100dvh - 180px)); overflow-y: auto; overscroll-behavior: contain; background: white; padding: 1rem; border: 1px solid var(--line); border-top: 3px solid var(--accent); box-shadow: var(--shadow); z-index: 12; }
.nav-list { list-style: none; margin: 0; padding: 0; display: block; }
.nav-list > li { min-width: 0; }
.nav-list a, .nav-subgroup > summary { display: block; padding: .75rem; min-height: 48px; overflow-wrap: anywhere; border-radius: 0; border-bottom: 1px solid var(--line); }
.nav-subgroup > summary { display: list-item; list-style-position: inside; color: var(--brand-dark); font-weight: 650; background: var(--brand-soft); }
.nav-subgroup .nav-list { display: block; margin-left: .65rem; border-left: 2px solid var(--line); padding-left: .35rem; }
.nav-list a:hover { background: var(--accent-soft); }

.hero,
.page-hero {
    background: linear-gradient(135deg, #ffffff 0%, var(--brand-soft) 54%, var(--accent-soft) 100%);
    border-bottom: 1px solid var(--line);
}
.hero__inner,
.section__inner,
.page-hero__inner,
.site-footer__inner {
    width: min(1100px, calc(100% - 2rem));
    margin: 0 auto;
}
.hero__inner,
.page-hero__inner {
    display: grid;
    grid-template-columns: minmax(0, 1fr) minmax(280px, .72fr);
    gap: clamp(1.5rem, 5vw, 3.5rem);
    align-items: center;
    padding: clamp(2.5rem, 6vw, 4.75rem) 0;
}
.hero__copy,
.page-hero__inner > div { min-width: 0; }
.hero__media,
.page-hero__image,
.image-panel {
    margin: 0;
    overflow: hidden;
    border: 1px solid rgba(85, 79, 127, .2);
    border-radius: 8px;
    background: #fff;
    box-shadow: var(--shadow);
}
.hero__media, .page-hero__image, .image-panel { aspect-ratio: auto; align-self: start; }
.page-hero__image--poster { aspect-ratio: auto; border: 0; border-radius: 0; box-shadow: none; }
.page-hero__image--poster img { height: auto; object-fit: contain; }
.meeting-rule { margin: 0; color: var(--muted); }
.content-sections { grid-template-columns: repeat(auto-fit, minmax(min(100%, 320px), 1fr)); column-gap: 3rem; }
.content-section { min-width: 0; border-top: 1px solid var(--line); padding-top: 1.25rem; }
.content-section h2 { font-size: 1.4rem; }
.content-section p { color: var(--muted); }
.content-list { padding-left: 1.25rem; }
.content-list li { padding: .2rem 0; }
.hero__media img,
.page-hero__image img,
.image-panel img {
    width: 100%;
    height: auto;
    object-fit: contain;
}
.eyebrow {
    margin: 0 0 .65rem;
    color: var(--brand);
    font-size: .78rem;
    font-weight: 800;
    letter-spacing: 0;
    text-transform: uppercase;
}
h1, h2, h3, p { overflow-wrap: anywhere; }
h1 {
    max-width: 780px;
    margin: 0;
    color: var(--brand-dark);
    font-size: 3rem;
    line-height: 1.05;
    letter-spacing: 0;
}
h2 {
    margin: 0;
    color: var(--brand-dark);
    font-size: 2rem;
    line-height: 1.15;
}
h3 { color: var(--brand-dark); }
.lede,
.section-copy {
    max-width: 720px;
    color: var(--muted);
    font-size: 1.08rem;
}
.lede { margin: 1.15rem 0 0; }
.section-copy { margin: .8rem auto 0; }
.hero__actions {
    display: flex;
    flex-wrap: wrap;
    gap: .8rem;
    margin-top: 1.4rem;
}
.hero__actions--center { justify-content: center; }
.button {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-height: 2.45rem;
    border-radius: 8px;
    padding: .7rem 1rem;
    font-weight: 800;
    text-decoration: none;
}
.button--primary { background: var(--brand); color: #fff; }
.button--secondary { border: 1px solid rgba(85, 79, 127, .32); background: #fff; color: var(--brand-dark); }
.text-link { color: var(--brand); font-weight: 800; text-decoration: none; }

.section { padding: clamp(2.4rem, 6vw, 4.2rem) 0; }
.section--welcome,
.section--members { background: var(--soft); }
.section--meetings { background: #fff; }
.section--events { background: linear-gradient(180deg, #fff 0%, var(--brand-soft) 100%); }
.section__inner { display: grid; gap: 1.45rem; }
.centered-section { text-align: center; }
.section-heading {
    display: flex;
    align-items: end;
    justify-content: space-between;
    gap: 1rem;
}
.admin-note {
    border: 1px solid rgba(47, 127, 144, .25);
    border-radius: 999px;
    background: var(--accent-soft);
    color: #246b78;
    padding: .35rem .7rem;
    font-size: .82rem;
    font-weight: 800;
}
.old-home-grid,
.meeting-panel,
.feature-grid,
.detail-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(min(100%, 260px), 1fr));
    gap: 1rem;
}
.feature-grid--wide { grid-template-columns: repeat(auto-fit, minmax(min(100%, 230px), 1fr)); }
.home-panel,
.meeting-card,
.detail-card {
    min-width: 0;
    border: 1px solid rgba(85, 79, 127, .16);
    border-radius: 8px;
    background: #fff;
    padding: 1.15rem;
    box-shadow: 0 10px 24px rgba(49, 43, 85, .07);
}
.home-panel p:last-child,
.meeting-card p:last-child,
.detail-card p:last-child { margin-bottom: 0; }
.meeting-card--active {
    border-color: var(--accent);
    box-shadow: 0 14px 30px rgba(47, 127, 144, .16);
}
.meeting-card--cancelled { background: var(--brand-soft); }
.meeting-card__status {
    margin: 0 0 .3rem;
    color: var(--accent);
    font-size: .75rem;
    font-weight: 800;
    letter-spacing: 0;
    text-transform: uppercase;
}
.meeting-card h3,
.detail-card h2,
.detail-card h3 { margin: 0 0 .55rem; }
.detail-card p,
.home-panel p,
.meeting-card p { color: var(--muted); }
.feature-card {
    position: relative;
    display: grid;
    grid-template-rows: 240px auto;
    overflow: hidden;
    border: 1px solid rgba(85, 79, 127, .16);
    border-radius: 8px;
    color: var(--brand-dark);
    background: #fff;
    isolation: isolate;
    text-decoration: none;
    box-shadow: var(--shadow);
}
.feature-card img {
    width: 100%;
    height: 100%;
    object-fit: contain;
}
.feature-card::after {
    content: none;
}
.feature-card span {
    padding: 1rem;
    font-size: 1.05rem;
    font-weight: 850;
}

.site-footer {
    border-top: 1px solid var(--line);
    background: #fbfbfd;
    color: var(--muted);
    padding: 2rem 0 1rem;
}
.site-footer__inner {
    display: grid;
    grid-template-columns: minmax(0, 1fr) minmax(260px, .95fr);
    gap: 2rem;
}
.brand--footer { justify-content: flex-start; }
.brand--footer img { width: 44px; height: 44px; }
.copyright {
    width: min(1100px, calc(100% - 2rem));
    margin: 1.5rem auto 0;
    font-size: .9rem;
}

@media (max-width: 820px) {
    .site-header { position: relative; }
    .site-header__brand { justify-content: flex-start; padding: .75rem 1rem; }
    .site-header .brand { flex-direction: row; text-align: left; gap: .65rem; }
    .site-header .brand img { width: 52px; height: 52px; flex: 0 0 52px; }
    .site-header .brand span { font-size: 1rem; max-width: 18rem; }
    .navigation { padding: 0 .75rem .75rem; }
    .navigation > summary { display: flex; align-items: center; justify-content: center; gap: .65rem; padding: .75rem 1rem; background: var(--brand-dark); color: #fff; border-radius: 4px; font-size: 1.05rem; font-weight: 750; min-height: 50px; list-style: none; }
    .navigation > summary::-webkit-details-marker { display: none; }
    .navigation > summary:hover { background: var(--brand); }
    .navigation > summary img { flex: 0 0 24px; filter: invert(1); }
    .navigation .navigation__close-icon, .navigation .navigation__close-label { display: none; }
    .navigation[open] .navigation__close-icon, .navigation[open] .navigation__close-label { display: block; }
    .navigation[open] .navigation__open-icon, .navigation[open] .navigation__open-label { display: none; }
    .navigation:not([open]) > :not(summary) { display: none; }
    .navigation__body { max-height: 70vh; max-height: 70dvh; overflow-y: auto; overscroll-behavior: contain; scrollbar-gutter: stable; border-bottom: 2px solid var(--accent); }
    .navigation__heading { display: block; margin: 0; padding: 1rem .75rem .4rem; color: var(--muted); font-size: .8rem; font-weight: 750; text-transform: uppercase; }
    .navigation__heading--events { background: var(--accent-soft); color: var(--accent); }
    .navigation .site-nav, .navigation .event-nav { display: grid; grid-template-columns: minmax(0, 1fr); gap: 0; padding: .25rem .5rem .75rem; overflow: visible; text-align: left; }
    .nav-group > summary { border-bottom: 1px solid var(--line); border-radius: 0; padding: .9rem .5rem; font-weight: 650; }
    .nav-panel { position: static; transform: none; width: 100%; max-height: none; overflow: visible; border: 0; border-left: 2px solid var(--accent); box-shadow: none; padding: .25rem 0 .5rem .5rem; }
    .nav-list { display: block; }
    .nav-subgroup > summary { padding: .8rem .5rem; }
    .navigation .event-nav { background: var(--accent-soft); border-top: 0; font-size: .95rem; }
    .navigation a { white-space: normal; overflow-wrap: break-word; min-height: 48px; padding: .75rem .5rem; line-height: 1.4; border-radius: 0; border-bottom: 1px solid var(--line); color: var(--brand-dark); }
    .navigation a[aria-current="page"] { border-left: 3px solid var(--accent); background: var(--brand-soft); }
    .navigation a:hover { background: var(--accent-soft); }
    .hero__inner,
    .page-hero__inner,
    .site-footer__inner { grid-template-columns: 1fr; }
    .section-heading { align-items: flex-start; flex-direction: column; }
    .brand { flex-direction: column; gap: .35rem; }
    .brand img { width: 64px; height: 64px; }
    .page-hero__image { aspect-ratio: auto; }
    .page-hero__image--poster { aspect-ratio: auto; }
}
@media (max-width: 520px) {
    h1 { font-size: 2.2rem; }
    h2 { font-size: 1.6rem; }
    .button { width: 100%; }
    .feature-card { grid-template-rows: 260px auto; }
}
.member-list { display: grid; grid-template-columns: repeat(auto-fit,minmax(min(100%,300px),1fr)); gap: 1rem; }
.page-hero__inner--text { grid-template-columns: minmax(0, 1fr); padding: 2.5rem 0; }
.page-hero__inner--text h1 { max-width: 1000px; font-size: 2.5rem; line-height: 1.15; }
.legacy-content { display: block; max-width: 960px; }
.legacy-content h2 { font-size: 1.5rem; line-height: 1.3; margin: 1.5rem 0 .75rem; }
.legacy-content p, .legacy-content li { overflow-wrap: anywhere; }
.legacy-content a { color: var(--brand); text-decoration: underline; text-underline-offset: .2em; overflow-wrap: anywhere; }
.legacy-content figure { margin: 1.5rem auto; width: 100%; max-width: 720px; }
.legacy-content figure img { width: 100%; height: auto; max-height: none; object-fit: contain; }
.legacy-content figcaption { margin-top: .6rem; color: var(--muted); font-size: .9rem; }
.legacy-section { margin-bottom: 2rem; }
.legacy-entry { display: flow-root; border-top: 1px solid var(--line); padding: 1.25rem 0; }
.legacy-entry figure { float: right; width: 32%; max-width: 260px; margin: .5rem 0 1rem 1.5rem; }
.legacy-entry h2:first-child { margin-top: 0; }
.legacy-content hr { border: 0; border-top: 1px solid var(--line); margin: 2rem 0; }
@media (max-width: 600px) {
    .page-hero__inner--text h1 { font-size: 1.85rem; }
    .legacy-entry figure { float: none; width: 100%; margin: 1rem auto; max-width: 360px; }
}
.member-list article { padding: 1.25rem 0; border-top: 1px solid var(--line); min-width: 0; }
.member-list__heading { display: flex; align-items: center; justify-content: space-between; gap: 1rem; }
.member-list__heading h3 { margin: 0; min-width: 0; overflow-wrap: anywhere; }
.member-list__image { width: 80px; height: 80px; flex: 0 0 80px; object-fit: contain; background: #fff; }
.image-preview-trigger { display: inline-flex; align-items: center; justify-content: center; max-width: 100%; padding: 0; border: 0; background: transparent; cursor: zoom-in; }
.member-list__heading > .image-preview-trigger { flex: 0 0 80px; }
.hero__media > .image-preview-trigger, .page-hero__image > .image-preview-trigger, .image-panel > .image-preview-trigger, .legacy-content figure > .image-preview-trigger { display: block; width: 100%; line-height: 0; }
.image-preview-trigger:focus-visible img { outline: 3px solid var(--accent); outline-offset: 3px; }
.image-preview-open { overflow: hidden; }
.image-preview { width: 100vw; height: 100vh; height: 100dvh; max-width: none; max-height: none; margin: 0; padding: 3.5rem 1rem 1rem; border: 0; background: rgba(15,15,20,.94); cursor: zoom-out; box-sizing: border-box; }
.image-preview[open] { display: flex; align-items: center; justify-content: center; }
.image-preview > img { max-width: 100%; max-height: 100%; width: auto; height: auto; object-fit: contain; }
.image-preview__close { position: absolute; top: .5rem; right: .5rem; width: 44px; height: 44px; padding: 10px; border: 0; border-radius: 4px; background: #fff; cursor: pointer; }
.image-preview__close img { width: 24px; height: 24px; }
.member-details { margin-top: .65rem; }
.member-details > summary { color: var(--brand); padding: .65rem 0; min-height: 44px; font-weight: 750; width: fit-content; }
.member-details__content { overflow-wrap: anywhere; }
.member-details__content p:first-child { margin-top: 0; }
.member-details__links { list-style: none; padding: 0; margin: 1rem 0 0; display: flex; flex-wrap: wrap; gap: .5rem 1rem; }
.member-details__links a { display: inline-block; min-height: 44px; padding: .65rem 0; color: var(--brand); text-decoration: underline; text-underline-offset: .2em; }
.member-modal-open { overflow: hidden; }
.member-dialog { width: min(640px, calc(100% - 2rem)); max-height: 85vh; max-height: 85dvh; padding: 0; border: 1px solid var(--line); border-radius: 8px; color: var(--ink); background: white; overflow: hidden; }
.member-dialog[open] { display: flex; flex-direction: column; }
.member-dialog::backdrop { background: rgba(20, 20, 30, .55); }
.member-dialog__header { display: grid; grid-template-columns: minmax(0, 1fr) 44px; align-items: center; gap: 1rem; padding: 1rem; border-bottom: 1px solid var(--line); flex-shrink: 0; }
.member-dialog__header h2 { margin: 0; font-size: 1.25rem; line-height: 1.35; overflow-wrap: anywhere; }
.member-dialog__header form { margin: 0; }
.member-dialog__close { display: grid; place-items: center; width: 44px; height: 44px; border: 0; border-radius: 4px; background: var(--accent-soft); }
.member-dialog__close:hover { background: var(--brand-soft); }
.member-dialog__body { padding: 1.25rem; min-height: 0; overflow-y: auto; overscroll-behavior: contain; }
.status { color: #246b78; font-size: .875rem; }
.account-form { display: grid; gap: 1rem; max-width: 42rem; }
.account-form label { display: grid; gap: .35rem; }
.account-form input, .account-form select, .account-form textarea { width: 100%; padding: .7rem; border: 1px solid var(--line); border-radius: 4px; background: white; color: var(--ink); }
.account-form textarea { min-height: 9rem; resize: vertical; }
.account-form button { justify-self: start; border: 0; }
.admin-nav { display: flex; flex-wrap: wrap; gap: .5rem 1.25rem; border-bottom: 1px solid var(--line); padding: 0 0 1rem; }
.record-list { display: grid; gap: 1rem; }
.record { border-top: 1px solid var(--line); padding: 1rem 0; min-width: 0; }
.message-body { white-space: pre-wrap; overflow-wrap: anywhere; }
.notice { border-left: 4px solid var(--accent); padding: .75rem 1rem; background: var(--accent-soft); }
@media (min-width: 1600px) {
    .hero__inner, .section__inner, .page-hero__inner, .site-footer__inner { width: min(1320px, calc(100% - 4rem)); }
}
