/* ─────────────────────── Public site components ───────────────────────
 * Loaded after base.css by the public wrapper only. Everything here consumes
 * the semantic tokens in base.css (so a village palette re-themes it) and is
 * scoped under .public-site so admin chrome is untouched.
 *
 * The public language: a dark header band, serif headings, square corners,
 * hairline rules, generous measure. Structure comes from rules and space,
 * not from boxes and shadows.
 */

.public-site { --measure: 68ch; --rule: 1px solid var(--color-border-default); }
.public-site main p, .public-site main li, .public-site main dd { overflow-wrap: anywhere; }

/* ── Header ── */
.public-site .village-brand { max-width: 46%; }
.public-site .village-brand__name { display: block; }
.public-site .village-brand small { opacity: .92; }
.public-header nav a[aria-current] { font-weight: 600; }

/* ── Page head: eyebrow / title / lede ── */
.public-site .eyebrow {
    color: var(--color-text-link); text-transform: uppercase; letter-spacing: .13em;
    font-size: .72rem; font-weight: 600; margin: 0;
}
.page-head { margin: 0 0 2.5rem; padding-bottom: 1.75rem; border-bottom: var(--rule); }
.page-head .eyebrow a { color: inherit; text-decoration: none; }
.page-head .eyebrow a:hover { text-decoration: underline; }
.public-site .page-head h1 { font-size: clamp(2rem, 3.4vw, 2.9rem); line-height: 1.12; margin: .5rem 0 0; max-width: 24ch; }
.page-head__lede { font-size: 1.15rem; line-height: 1.6; max-width: 60ch; margin: 1rem 0 0; }
.page-head__meta { display: flex; flex-wrap: wrap; gap: .4rem 1.5rem; margin: 1.1rem 0 0; font-size: .9rem; color: var(--color-text-secondary); }
.page-head__meta > * { margin: 0; }

/* ── Two-column page: reading column + aside ── */
.page-grid { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 20rem); gap: 3rem 3.5rem; align-items: start; }
.page-grid > * { min-width: 0; }
.page-grid > section + section, .page-grid > aside, .page-grid > div + aside { margin-top: 0; }
.aside-card { background: var(--color-surface-alt); border: var(--rule); border-top: 3px solid var(--color-surface-strong); padding: 1.4rem 1.5rem; }
.aside-card + .aside-card { margin-top: 1.5rem; }
.public-site .aside-card h2 { font-size: 1.15rem; margin: 0 0 .9rem; }
.public-site .aside-card h2::after { display: none; }
.aside-card p { font-size: .95rem; margin: 0 0 .6rem; }
.aside-card p:last-child { margin-bottom: 0; }
.aside-card dl { display: block; margin: 0; font-size: .95rem; }
.aside-card dt { margin-top: .9rem; align-self: auto; }
.aside-card dt:first-child { margin-top: 0; }
.aside-card dd { margin: .15rem 0 0; }

/* Section headings inside a page: top rule, no short underline bar. */
.public-site .section-title { font-size: 1.55rem; margin: 0 0 1.25rem; padding-top: .8rem; border-top: 3px solid var(--color-surface-strong); }
.public-site .section-title::after { display: none; }
.page-section { margin-top: 3rem; }
.page-section:first-child { margin-top: 0; }
.page-section > p { max-width: var(--measure); }

/* ── Rich text (core.RichText output) ── */
.rich-text { max-width: var(--measure); font-size: 1.04rem; line-height: 1.7; }
.rich-text > :first-child { margin-top: 0; }
.rich-text p { margin: 0 0 1.05rem; font-size: inherit; }
.public-site .rich-text h2 { font-size: 1.55rem; margin: 2.5rem 0 1rem; padding-top: .8rem; border-top: 3px solid var(--color-surface-strong); scroll-margin-top: 1rem; }
.public-site .rich-text h2::after { display: none; }
.public-site .rich-text h3 { font-family: var(--font-heading); font-size: 1.2rem; margin: 2rem 0 .7rem; scroll-margin-top: 1rem; }
.public-site .rich-text h4 { font-size: 1rem; font-weight: 600; color: var(--color-heading); margin: 1.5rem 0 .5rem; }
.public-site .rich-text h3::before { display: none; }
.rich-text ul, .rich-text ol { margin: 0 0 1.1rem; padding-left: 1.4rem; }
.rich-text li { margin: 0 0 .45rem; padding-left: .2rem; }
.rich-text li::marker { color: var(--color-text-link); }
.rich-text blockquote { margin: 0 0 1.1rem; padding: .2rem 0 .2rem 1.2rem; border-left: 3px solid var(--color-border-strong); }
.rich-text blockquote p:last-child { margin-bottom: 0; }
.rich-text hr { border: 0; border-top: var(--rule); margin: 2rem 0; }
.rich-text strong { color: var(--color-heading); }
.rich-table { overflow-x: auto; margin: 0 0 1.4rem; max-width: none; }
.rich-text .rich-table table { width: 100%; border-collapse: collapse; font-size: .95rem; border: 0; box-shadow: none; border-radius: 0; background: transparent; }
.rich-text .rich-table thead { background: transparent; }
.rich-text .rich-table th { text-align: left; font-size: .75rem; letter-spacing: .08em; text-transform: uppercase; color: var(--color-heading); padding: .6rem .9rem .6rem 0; border-bottom: 2px solid var(--color-surface-strong); background: transparent; }
.rich-text .rich-table td { padding: .7rem .9rem .7rem 0; border-bottom: var(--rule); vertical-align: top; line-height: 1.5; }
.rich-text .rich-table td:last-child, .rich-text .rich-table th:last-child { padding-right: 0; }
.rich-text .rich-table tbody tr:hover { background: transparent; }
.rich-figure { margin: 0 0 1.5rem; }
.rich-figure img { display: block; max-width: 100%; height: auto; background: var(--color-surface-alt); }
.rich-figure figcaption { font-size: .86rem; color: var(--color-text-secondary); margin-top: .5rem; line-height: 1.5; }
.rich-gallery { display: grid; grid-template-columns: repeat(auto-fill, minmax(min(100%, 17rem), 1fr)); gap: 1.5rem; margin: 0 0 1.5rem; align-items: start; }
.rich-gallery .rich-figure { margin: 0; }
.rich-gallery .rich-figure img { width: 100%; }
.content-page .rich-text:has(.rich-gallery) { max-width: none; }
.content-page .rich-text:has(.rich-gallery) > :not(.rich-gallery):not(.rich-table) { max-width: var(--measure); }

/* On-page contents */
.page-contents { border: var(--rule); border-left: 3px solid var(--color-border-strong); padding: 1rem 1.25rem; margin: 0 0 2rem; max-width: var(--measure); }
.public-site .page-contents h2 { font-family: var(--font-body); font-size: .75rem; letter-spacing: .1em; text-transform: uppercase; margin: 0 0 .6rem; }
.public-site .page-contents h2::after { display: none; }
.page-contents ul { list-style: none; margin: 0; padding: 0; display: flex; flex-wrap: wrap; gap: .35rem 1.5rem; font-size: .95rem; }

/* ── Document rows (library, department resources, minutes) ── */
.doc-list { list-style: none; margin: 0; padding: 0; border-top: var(--rule); }
.doc-row { display: grid; grid-template-columns: 3.6rem minmax(0, 1fr) auto; gap: .2rem 1rem; align-items: start; padding: .95rem 0; border-bottom: var(--rule); }
.doc-row__tag {
    font-size: .66rem; font-weight: 600; letter-spacing: .08em; text-transform: uppercase; text-align: center;
    color: var(--color-heading); border: 1px solid var(--color-border-strong); padding: .28rem .2rem; margin-top: .15rem; line-height: 1.2;
}
.doc-row__title { font-family: var(--font-heading); font-size: 1.08rem; font-weight: 600; line-height: 1.35; color: var(--color-heading); text-decoration-color: transparent; }
.doc-row__title:hover { color: var(--color-text-link); text-decoration-color: currentColor; }
.doc-row__body p { margin: .3rem 0 0; font-size: .92rem; line-height: 1.5; color: var(--color-text-primary); }
.doc-row__meta { font-size: .82rem; color: var(--color-text-secondary); text-align: right; white-space: nowrap; line-height: 1.5; padding-top: .2rem; }
.doc-group { margin-top: 2.75rem; }
.doc-group:first-of-type { margin-top: 2rem; }
.doc-search { margin: 0 0 1.5rem; padding: 0; max-width: 34rem; background: transparent; border: 0; box-shadow: none; }
.doc-search label { display: block; font-size: .8rem; font-weight: 600; letter-spacing: .06em; text-transform: uppercase; color: var(--color-heading); margin: 0 0 .4rem; }
.doc-search__row { display: flex; gap: .6rem; align-items: center; flex-wrap: wrap; }
.doc-search__row input { flex: 1 1 14rem; min-width: 0; margin: 0; }
.doc-search__row button { margin: 0; }
.doc-jump { display: flex; flex-wrap: wrap; gap: .5rem; margin: 0 0 .5rem; }
.doc-jump a { display: inline-flex; gap: .5rem; align-items: baseline; padding: .4rem .8rem; border: var(--rule); font-size: .88rem; text-decoration: none; }
.doc-jump a:hover { border-color: var(--color-border-strong); }
.doc-jump span { color: var(--color-text-secondary); font-size: .8rem; }

/* ── Simple link lists with a trailing detail (meetings, records) ── */
.link-list { list-style: none; margin: 0; padding: 0; border-top: var(--rule); }
.link-list > li { display: flex; flex-wrap: wrap; justify-content: space-between; align-items: baseline; gap: .2rem 1.5rem; padding: .8rem 0; border-bottom: var(--rule); }
.link-list__title { font-family: var(--font-heading); font-size: 1.05rem; font-weight: 600; color: var(--color-heading); text-decoration-color: transparent; }
.link-list__title:hover { color: var(--color-text-link); text-decoration-color: currentColor; }
.link-list__detail { font-size: .86rem; color: var(--color-text-secondary); }
.year-group { margin-top: 2.25rem; }
.public-site .year-group > h3 { font-family: var(--font-heading); font-size: 1.25rem; margin: 0 0 .6rem; }
.public-site .year-group > h3::before { display: none; }

/* ── People ── */
.person-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(min(100%, 21rem), 1fr)); gap: 0 2.5rem; border-top: var(--rule); }
.person-card { display: grid; grid-template-columns: 5.5rem minmax(0, 1fr); gap: 1.1rem; padding: 1.4rem 0; border-bottom: var(--rule); align-items: start; }
.person-card--plain { grid-template-columns: minmax(0, 1fr); }
.person-card__photo { width: 5.5rem; height: 6.6rem; object-fit: cover; object-position: center 22%; display: block; background: var(--color-surface-alt); }
.public-site .person-card__name { font-family: var(--font-heading); font-size: 1.2rem; font-weight: 600; line-height: 1.3; margin: 0; text-transform: none; letter-spacing: -.01em; }
.public-site .person-card__name::before { display: none; }
.person-card__name a { color: var(--color-heading); text-decoration-color: transparent; }
.person-card__name a:hover { color: var(--color-text-link); text-decoration-color: currentColor; }
.person-card__role { font-size: .8rem; font-weight: 600; letter-spacing: .06em; text-transform: uppercase; color: var(--color-text-link); margin: .3rem 0 0; }
.person-card__meta { font-size: .9rem; color: var(--color-text-secondary); margin: .35rem 0 0; line-height: 1.5; }
.person-card__contact { list-style: none; margin: .55rem 0 0; padding: 0; font-size: .92rem; line-height: 1.6; }
.person-card__bio { font-size: .92rem; line-height: 1.55; margin: .6rem 0 0; }
.public-site .officials-office { margin-top: 3rem; }
.public-site .officials-office:first-of-type { margin-top: 0; }

/* ── Cards that link to a section (departments, services, listings) ── */
.link-cards { display: grid; grid-template-columns: repeat(auto-fit, minmax(min(100%, 16rem), 1fr)); gap: 1.25rem; }
.link-card { display: block; border: var(--rule); border-top: 3px solid var(--color-surface-strong); padding: 1.25rem 1.4rem 1.35rem; background: var(--color-surface); color: var(--color-text-primary); text-decoration: none; font-weight: 400; }
.link-card:hover { border-color: var(--color-border-strong); border-top-color: var(--color-border-strong); color: var(--color-text-primary); }
.link-card__kicker { display: block; font-size: .7rem; font-weight: 600; letter-spacing: .1em; text-transform: uppercase; color: var(--color-text-link); margin-bottom: .45rem; }
.link-card__title { display: block; font-family: var(--font-heading); font-size: 1.2rem; font-weight: 600; line-height: 1.3; color: var(--color-heading); }
.link-card:hover .link-card__title { text-decoration: underline; text-underline-offset: .18em; }
.link-card__text { display: block; font-size: .93rem; line-height: 1.55; margin-top: .5rem; }

/* ── Facts (definition rows) ── */
.facts { display: grid; grid-template-columns: max-content minmax(0, 1fr); gap: .7rem 1.75rem; margin: 0 0 1.5rem; font-size: 1rem; }
.facts dt { align-self: baseline; padding-top: .2rem; }
.facts dd { margin: 0; }

/* ── Meeting detail ── */
.minutes-source { border: var(--rule); border-left: 3px solid var(--color-border-strong); padding: 1rem 1.25rem; margin: 0 0 2rem; max-width: var(--measure); font-size: .95rem; }
.minutes-source p { margin: 0; font-size: inherit; }
.minutes-source .doc-list { border-top: 0; margin-top: .25rem; }
.minutes-source .doc-row:last-child { border-bottom: 0; padding-bottom: .2rem; }
.public-site .meeting-agenda { list-style: none; margin: 0 0 1.5rem; padding: 0; counter-reset: agenda; border-top: var(--rule); max-width: var(--measure); }
.public-site .meeting-agenda > li { counter-increment: agenda; display: grid; grid-template-columns: 2.4rem minmax(0, 1fr); padding: 1rem 0; border-bottom: var(--rule); }
.public-site .meeting-agenda > li::before { content: counter(agenda, decimal-leading-zero); font-family: var(--font-heading); font-size: 1rem; color: var(--color-text-link); padding-top: .1rem; }
.public-site .meeting-agenda > li > * { grid-column: 2; }
.public-site .meeting-agenda h3 { font-family: var(--font-heading); font-size: 1.1rem; margin: 0 0 .3rem; }
.public-site .meeting-agenda h3::before { display: none; }
.status-tag { display: inline-block; font-size: .7rem; font-weight: 600; letter-spacing: .08em; text-transform: uppercase; border: 1px solid currentColor; padding: .15rem .5rem; color: var(--color-text-secondary); }
.status-tag--cancelled { color: var(--color-feedback-error); }

/* ── Home ── */
.home-hero__actions { display: flex; flex-wrap: wrap; gap: .75rem 1.5rem; margin-top: 1.5rem; align-items: center; }
.home-hero__actions a { font-size: .95rem; font-weight: 600; }
.home-hero__actions .button-link { display: inline-block; background: var(--color-surface-strong); color: var(--color-text-on-dark); padding: .7rem 1.2rem; text-decoration: none; }
.home-hero__actions .button-link:hover { background: var(--color-surface-brand); color: var(--color-text-on-primary); }
.home-hero--with-image { grid-template-columns: minmax(0, 5fr) minmax(0, 6fr); }
.home-section .link-cards { gap: 1.25rem; }
.public-site .home-section .schedule-list { list-style: none; margin: .25rem 0 0; padding: 0; font-size: .92rem; }
.schedule-list li { padding: .55rem 0; line-height: 1.5; }
.schedule-list li + li { border-top: var(--rule); }
.schedule-list strong { display: block; }

/* ── Contact ── */
.contact-info address { font-style: normal; line-height: 1.6; }

/* ── Footer ── */
.public-site > footer { padding: 3.25rem 0 0; }
.footer-grid { display: grid; grid-template-columns: minmax(0, 1.5fr) repeat(3, minmax(0, 1fr)); gap: 2.5rem 3rem; align-items: start; text-align: left; }
.footer-grid h2 { font-family: var(--font-body); font-size: .74rem; font-weight: 600; letter-spacing: .12em; text-transform: uppercase; color: var(--color-heading); margin: 0 0 1rem; }
.footer-grid h2::after { display: none; }
.footer-grid .footer-name { font-family: var(--font-heading); font-size: 1.4rem; letter-spacing: -.01em; text-transform: none; margin-bottom: .9rem; }
.footer-grid ul { list-style: none; margin: 0; padding: 0; }
.footer-grid li { margin: 0 0 .6rem; font-size: .9rem; line-height: 1.45; }
.footer-grid p, .footer-grid address { font-size: .9rem; line-height: 1.6; margin: 0 0 .8rem; font-style: normal; max-width: 34ch; }
.footer-grid a { color: var(--color-text-link); text-decoration: none; font-weight: 500; }
.footer-grid a:hover { text-decoration: underline; }
.footer-label { display: block; font-size: .7rem; font-weight: 600; letter-spacing: .1em; text-transform: uppercase; color: var(--color-text-secondary); margin-bottom: .15rem; }
.footer-bottom { display: flex; flex-wrap: wrap; justify-content: space-between; gap: .5rem 2rem; margin-top: 2.75rem; padding: 1.25rem 0 1.75rem; border-top: var(--rule); font-size: .82rem; color: var(--color-text-secondary); }
.footer-bottom a { color: var(--color-text-secondary); font-weight: 500; }

/* ── Responsive ── */
@media (max-width: 959px) {
    .page-grid { grid-template-columns: minmax(0, 1fr); gap: 2.5rem; }
    .footer-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
    .home-hero--with-image { grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); }
}
@media (max-width: 600px) {
    .page-head { margin-bottom: 1.75rem; padding-bottom: 1.25rem; }
    .doc-row { grid-template-columns: 3.2rem minmax(0, 1fr); }
    .doc-row__meta { grid-column: 2; text-align: left; white-space: normal; padding-top: 0; }
    .doc-row__meta br { display: none; }
    .facts { grid-template-columns: minmax(0, 1fr); gap: .1rem; }
    .facts dd { margin-bottom: .9rem; }
    .footer-grid { grid-template-columns: minmax(0, 1fr); gap: 2rem; }
    .person-card { grid-template-columns: 4.5rem minmax(0, 1fr); }
    .person-card__photo { width: 4.5rem; height: 5.4rem; }
    .home-hero--with-image { grid-template-columns: minmax(0, 1fr); }
    .rich-text .rich-table td, .rich-text .rich-table th { padding-right: .6rem; }
}
@media print {
    .public-header nav, .public-menu, .public-site > footer, .doc-search, .skip-to-content { display: none !important; }
    .public-site > .public-header { background: none; color: #000; border-bottom: 1px solid #000; }
    .public-header .village-brand { color: #000; }
}

/* ── Staff / roster lists (asides) ── */
.staff-list { list-style: none; margin: 0; padding: 0; }
.staff-list__item { display: flex; flex-direction: column; gap: .1rem; padding: .7rem 0; border-top: var(--rule); font-size: .93rem; line-height: 1.45; }
.staff-list__item:first-child { border-top: 0; padding-top: 0; }
.staff-list__item:last-child { padding-bottom: 0; }
.staff-list__name { font-family: var(--font-heading); font-size: 1.02rem; font-weight: 600; color: var(--color-heading); }
a.staff-list__name { text-decoration-color: transparent; }
a.staff-list__name:hover { color: var(--color-text-link); text-decoration-color: currentColor; }
.staff-list__title { font-size: .78rem; font-weight: 600; letter-spacing: .05em; text-transform: uppercase; color: var(--color-text-link); }

/* ── Forms on public pages ── */
.public-site main form.contact-form, .public-site main form.meeting-search { background: transparent; border: 0; box-shadow: none; padding: 0; max-width: 40rem; }
.public-site main form.meeting-search { max-width: none; margin-block: 0 2rem; padding: 1.25rem 1.4rem; border: var(--rule); background: var(--color-surface-alt); }
.contact-form > label { display: block; font-weight: 600; font-size: .9rem; margin: 1.1rem 0 .35rem; color: var(--color-heading); }
.contact-form > label:first-child { margin-top: 0; }
.contact-form input, .contact-form select, .contact-form textarea { width: 100%; }
.contact-form button { margin-top: 1.4rem; }
.meeting-search__label { font-size: .8rem; font-weight: 600; letter-spacing: .05em; text-transform: uppercase; color: var(--color-heading); }
.meeting-search__field { font-size: .8rem; font-weight: 600; color: var(--color-heading); }
.meeting-search__clear { align-self: center; font-size: .9rem; }
.meeting-search__hint { margin: 0 0 1.5rem; }
.minutes-text { margin-top: 0; }
.public-site .minutes-text h2 { font-size: 1.3rem; border-top: 0; padding-top: 0; margin-top: 2rem; }
.department-news article { padding: 1rem 0; border-bottom: var(--rule); }
.public-site .department-news h3 { font-family: var(--font-heading); font-size: 1.1rem; margin: 0 0 .25rem; }
.public-site .department-news h3::before { display: none; }
