/* Vergas — Common Good CMS theme (City of Vergas, MN).
   Matches the pitch templates in docs/vergas_redesign: deep lake-blue masthead with
   the loon seal, mobile-friendly nav, photo hero with a bottom welcome panel,
   quick-action buttons, news + event cards, sticky TOC sidebar, navy footer.
   Palette (from vergascommunityclub.com): deep lake blue #0b4466, bright sky blue
   #1584c6 (decorative only — fails AA on white), AA-safe link blue #0e6da8,
   sun gold #f2b632, light blue-gray #f3f5f8; the official orange Vergas script wordmark
   (assets/wordmark.png) carries its own color and the accent stays gold around it.
   Staff-editable via theme.json / site options: --color-primary, --color-secondary,
   --color-accent, --color-link, --color-text, --font-heading, --font-body, --text-size */

*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
:root {
    --navy: var(--color-primary);
    --navy-deep: color-mix(in srgb, var(--color-primary) 72%, #000);
    --bright: #1584c6;          /* decorative accent only */
    --blue-text: var(--color-link);
    --gold: var(--color-accent);
    --bg: #f3f5f8;
    --card: #ffffff;
    --line: #d7dee5;
    --slate: var(--color-text);
    --slate-mid: #4c5b68;
    --focus: #b45309;
    --sans: "Segoe UI", system-ui, -apple-system, Arial, sans-serif;
}
html { font-size: var(--text-size, 16px); scroll-behavior: smooth; }
body { font-family: var(--font-body); color: var(--slate); background: var(--bg); line-height: 1.6; }
.sans { font-family: var(--sans); }
img, svg { max-width: 100%; }
img { height: auto; }
a { color: var(--blue-text); }
a:hover { color: var(--navy); }
:focus-visible { outline: 3px solid var(--focus); outline-offset: 2px; border-radius: 2px; }
.visually-hidden {
    position: absolute; width: 1px; height: 1px;
    margin: -1px; padding: 0; overflow: hidden;
    clip: rect(0 0 0 0); white-space: nowrap; border: 0;
}
.wrap { max-width: 1160px; margin: 0 auto; padding: 0 1.25rem; }

/* Skip link */
.skip-link {
    position: absolute; left: 1rem; top: -3.5rem;
    background: var(--navy); color: #fff;
    padding: 0.6rem 1.2rem; z-index: 100;
    font-family: var(--sans);
    text-decoration: none; border-radius: 0 0 6px 6px;
    transition: top 0.15s ease;
}
.skip-link:focus { top: 0; color: #fff; }

/* ---------- Utility bar ---------- */
.utility-bar { background: var(--navy-deep); color: #cfe0ee; font-family: var(--sans); font-size: 0.85rem; }
.utility-bar .wrap {
    display: flex; justify-content: space-between; align-items: center;
    padding-top: 0.35rem; padding-bottom: 0.35rem; gap: 1rem;
}
.utility-bar a { color: #cfe0ee; text-decoration: none; }
.utility-bar a:hover { color: #fff; text-decoration: underline; }
.utility-hours { display: none; }
@media (min-width: 600px) { .utility-hours { display: inline; } }

/* ---------- Header ---------- */
header.site-header { background: var(--navy); color: #fff; position: relative; }
.header-row { display: flex; align-items: center; justify-content: space-between; gap: 1rem; padding: 0.9rem 0; }
.wordmark { display: flex; align-items: center; gap: 0.7rem; text-decoration: none; color: #fff; }
.wordmark:hover { color: #fff; }
.wordmark .seal {
    width: 48px; height: 48px; flex: none;
    background: #fff; border-radius: 50%; overflow: hidden;
    display: flex; align-items: center; justify-content: center;
    border: 2px solid var(--gold);
}
.wordmark .logo { width: 100%; height: 100%; object-fit: cover; }
.wordmark-text { display: flex; flex-direction: column; align-items: flex-start; }
.wordmark-text .city { font-family: var(--font-heading); font-size: 1.35rem; font-weight: 700; line-height: 1.15; letter-spacing: 0.01em; }
.wordmark-text .state { font-family: var(--sans); font-size: 0.72rem; text-transform: uppercase; letter-spacing: 0.22em; color: #a8c6dd; }
/* Official orange "Vergas" script wordmark (assets/wordmark.png) */
.city-eyebrow { font-size: 0.6rem; font-weight: 600; text-transform: uppercase; letter-spacing: 0.3em; color: #a8c6dd; margin-bottom: 2px; }
.wordmark-script { display: block; height: 40px; width: auto; margin-bottom: 3px; }

.header-tools { display: flex; align-items: center; gap: 0.75rem; }

.search-form { display: none; }
@media (min-width: 900px) { .search-form { display: flex; } }
.search-form input[type="search"] {
    font-family: var(--sans); font-size: 0.9rem; padding: 0.45rem 0.7rem;
    border: 1px solid #2c608a; border-right: 0;
    border-radius: 4px 0 0 4px; width: 180px;
    background: #fff; color: var(--slate);
}
.search-form button {
    font-family: var(--sans);
    background: var(--gold); color: var(--navy-deep); border: 1px solid var(--gold);
    border-radius: 0 4px 4px 0; padding: 0.45rem 0.8rem;
    cursor: pointer; font-size: 0.9rem; font-weight: 600;
}
.search-form button:hover { filter: brightness(0.93); }

.menu-toggle {
    display: none;
    background: transparent; color: #fff;
    border: 1px solid #35678f;
    border-radius: 6px; padding: 0.5rem 0.7rem;
    font-family: var(--sans); font-size: 0.9rem; cursor: pointer;
    align-items: center; gap: 0.45rem;
}
.menu-toggle:hover { background: var(--navy-deep); }
.menu-toggle .bars { display: inline-block; width: 20px; }
.menu-toggle .bars span { display: block; height: 2px; background: #fff; margin: 4px 0; border-radius: 1px; }

/* ---------- Nav ---------- */
nav.primary-nav { background: var(--color-secondary); border-top: 1px solid color-mix(in srgb, var(--color-secondary) 78%, #fff); }
nav.primary-nav ul { list-style: none; display: flex; flex-wrap: wrap; }
nav.primary-nav a {
    font-family: var(--sans);
    display: block; color: #fff; text-decoration: none;
    padding: 0.8rem 1.15rem; font-size: 0.95rem; font-weight: 600;
}
nav.primary-nav a:hover,
nav.primary-nav a[aria-current="page"] {
    background: var(--navy-deep); color: #fff;
    box-shadow: inset 0 -3px 0 var(--gold);
}
.nav-search-mobile { display: none; }

@media (max-width: 767.98px) {
    .menu-toggle { display: inline-flex; }
    nav.primary-nav { display: none; }
    nav.primary-nav.open { display: block; }
    nav.primary-nav ul { flex-direction: column; }
    nav.primary-nav a { border-bottom: 1px solid color-mix(in srgb, var(--color-secondary) 78%, #fff); padding: 0.9rem 1.25rem; }
    .nav-search-mobile { display: flex; padding: 0.9rem 1.25rem; gap: 0; }
    .nav-search-mobile input[type="search"] {
        flex: 1; font-family: var(--sans); font-size: 1rem; padding: 0.55rem 0.7rem;
        border: 1px solid #2c608a; border-right: 0; border-radius: 4px 0 0 4px;
    }
    .nav-search-mobile button {
        font-family: var(--sans);
        background: var(--gold); color: var(--navy-deep); border: 1px solid var(--gold);
        border-radius: 0 4px 4px 0; padding: 0.55rem 0.9rem; cursor: pointer;
        font-size: 1rem; font-weight: 600;
    }
}

/* ---------- Notice bar ---------- */
.notice-bar {
    background: #fdf3d9; border-bottom: 1px solid #eeddae; color: #5c430a;
    font-family: var(--sans); font-size: 0.92rem;
}
.notice-bar .wrap { display: flex; align-items: center; gap: 0.6rem; padding-top: 0.55rem; padding-bottom: 0.55rem; }
.notice-bar strong { color: #4c370a; }
.notice-bar a { color: #4c370a; }

/* ---------- Hero ---------- */
.hero { position: relative; color: #fff; background: var(--navy-deep); }
.hero .hero-photo { display: block; width: 100%; height: 360px; object-fit: cover; object-position: center 62%; }
@media (min-width: 768px) { .hero .hero-photo { height: 470px; } }
.hero-overlay {
    position: absolute; inset: 0;
    display: flex; align-items: flex-end;
    background: linear-gradient(180deg, rgba(8, 47, 71, 0) 40%, rgba(8, 47, 71, 0.55) 100%);
}
.hero-inner { width: 100%; padding-bottom: 2.25rem; }
.hero-panel {
    background: color-mix(in srgb, var(--navy-deep) 84%, transparent);
    border-left: 5px solid var(--gold);
    padding: 1.25rem 1.5rem; max-width: 580px;
    border-radius: 0 6px 6px 0;
}
.hero-panel h1 { font-family: var(--font-heading); font-size: clamp(1.5rem, 4vw, 2.3rem); line-height: 1.2; font-weight: 700; margin-bottom: 0.4rem; }
.hero-panel p { font-family: var(--sans); font-size: 0.98rem; color: #d5e6f2; }
.hero-plain { background: linear-gradient(160deg, var(--bright) 0%, var(--navy) 80%); }
.hero-plain .hero-inner { padding-top: 3.5rem; padding-bottom: 3.5rem; }
.cta {
    display: inline-block; margin-top: 1rem; font-family: var(--sans);
    background: var(--gold); color: var(--navy-deep); font-weight: 700;
    text-decoration: none; padding: 0.6rem 1.2rem; border-radius: 6px;
}
.cta:hover { filter: brightness(0.93); color: var(--navy-deep); }

/* ---------- Quick actions (callouts region) ---------- */
.quick-actions { background: var(--card); border-bottom: 1px solid var(--line); }
.qa-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 0.75rem; padding: 1.4rem 0; }
@media (min-width: 768px) { .qa-grid { grid-template-columns: repeat(auto-fit, minmax(9.5rem, 1fr)); gap: 1rem; } }
.qa-grid .qa-card {
    display: flex; flex-direction: column; align-items: center; gap: 0.55rem;
    text-decoration: none; text-align: center;
    background: #f8fafc; border: 1px solid var(--line); border-radius: 8px;
    padding: 1.1rem 0.6rem 0.95rem;
    color: var(--navy);
    font-family: var(--sans); font-weight: 600; font-size: 0.92rem; line-height: 1.3;
    transition: border-color 0.12s ease, transform 0.12s ease, box-shadow 0.12s ease;
}
.qa-grid .qa-card:hover {
    border-color: var(--bright); color: var(--navy);
    transform: translateY(-2px);
    box-shadow: 0 3px 10px rgba(11, 68, 102, 0.12);
}
.qa-icon {
    width: 52px; height: 52px; border-radius: 50%;
    background: var(--navy); color: #fff;
    display: flex; align-items: center; justify-content: center;
}
.qa-icon svg { width: 24px; height: 24px; }
.qa-grid .qa-card:hover .qa-icon { background: var(--bright); }
@media (max-width: 767.98px) { .qa-grid .qa-card:last-child { grid-column: 1 / -1; } }
/* legacy authored callouts (plain headings + paragraphs) still get a card */
.qa-grid > *:not(.qa-card) { background: #f8fafc; border: 1px solid var(--line); border-radius: 8px; padding: 1rem 1.1rem; font-family: var(--sans); font-size: 0.9rem; }
.qa-grid > *:not(.qa-card) h2, .qa-grid > *:not(.qa-card) h3 { font-size: 0.95rem; color: var(--navy); margin-bottom: 0.3rem; }

/* ---------- Content layout ---------- */
.page-grid { display: grid; grid-template-columns: 1fr; gap: 2.5rem; padding-top: 2rem; padding-bottom: 3rem; align-items: start; }
.has-sidebar .page-grid { grid-template-columns: minmax(0, 1fr) 260px; }
.content-panel { background: var(--card); border: 1px solid var(--line); border-radius: 10px; padding: 2rem 2.4rem 2.4rem; min-width: 0; }
/* the home page lays its cards straight on the page background */
.is-home .page-grid { padding-top: 2.5rem; padding-bottom: 3rem; }
.is-home .content-panel { background: transparent; border: 0; border-radius: 0; padding: 0; }

/* ---------- Home: news / events columns ---------- */
.home-cols { display: grid; gap: 2.5rem; align-items: start; }
@media (min-width: 768px) { .home-cols { grid-template-columns: 1.15fr 1fr; gap: 3rem; } }

.section-head {
    display: flex; align-items: baseline; justify-content: space-between; gap: 1rem;
    border-bottom: 3px solid var(--navy); padding-bottom: 0.5rem; margin: 0 0 1.25rem;
}
.section-head h2 { font-family: var(--font-heading); font-size: 1.45rem; color: var(--navy); border: 0; margin: 0; padding: 0; }
.section-head .more, .section-head .view-all {
    font-family: var(--sans); font-size: 0.88rem; font-weight: 600; white-space: nowrap; text-decoration: none;
}
.section-head .more:hover, .section-head .view-all:hover { text-decoration: underline; }

.news-card { background: var(--card); border: 1px solid var(--line); border-radius: 8px; padding: 1.15rem 1.3rem; margin-bottom: 1rem; }
.news-date, .news-card .date {
    font-family: var(--sans); font-size: 0.8rem; font-weight: 700; letter-spacing: 0.08em;
    text-transform: uppercase; color: var(--blue-text);
    display: block; margin-bottom: 0.25rem;
}
.news-card h3 { font-family: var(--font-heading); font-size: 1.12rem; line-height: 1.35; margin: 0 0 0.35rem; }
.news-card h3 a { color: var(--navy); text-decoration: none; }
.news-card h3 a:hover { text-decoration: underline; color: var(--blue-text); }
.news-card p { font-family: var(--sans); font-size: 0.92rem; color: var(--slate-mid); margin: 0; }
.news-card p.news-date { color: var(--blue-text); }

/* Upcoming-events embed ([[calendar]]): one card per event, navy date block */
.cal-embed { margin: 1rem 0; }
.cal-embed ul { list-style: none; margin: 0 !important; }
.cal-embed li {
    display: flex; gap: 1rem; align-items: center;
    background: var(--card); border: 1px solid var(--line); border-radius: 8px;
    padding: 0.85rem 1.15rem; margin-bottom: 0.9rem;
}
.cal-embed .ce-date {
    flex: none; width: 62px; text-align: center;
    background: var(--navy); color: #fff; border-radius: 6px;
    padding: 0.5rem 0.25rem 0.55rem;
    font-family: var(--sans);
}
.cal-embed .ce-mon { display: block; font-size: 0.7rem; font-weight: 700; text-transform: uppercase; letter-spacing: 0.12em; color: var(--gold); }
.cal-embed .ce-day { display: block; font-size: 1.5rem; font-weight: 700; line-height: 1.1; }
.cal-embed a { font-family: var(--font-heading); font-weight: 700; font-size: 1.05rem; line-height: 1.3; color: var(--navy); text-decoration: none; }
.cal-embed a:hover { text-decoration: underline; color: var(--blue-text); }
.cal-embed .ce-time { font-family: var(--sans); font-size: 0.88rem; color: var(--slate-mid); }
.cal-embed .ce-empty { color: var(--slate-mid); }
.cal-embed .ce-more { margin: 0.2rem 0 0; font-family: var(--sans); font-size: 0.88rem; }
.cal-embed .ce-more a { font-family: var(--sans); font-size: 0.88rem; font-weight: 600; color: var(--blue-text); }
.ce-more { font-family: var(--sans); font-size: 0.88rem; }

/* ---------- Explore Vergas (photo cards) ---------- */
.explore { margin-top: 2.5rem; }
.explore .section-head { margin-bottom: 1.5rem; }
.explore-grid { display: grid; gap: 1.25rem; }
@media (min-width: 768px) { .explore-grid { grid-template-columns: repeat(3, 1fr); gap: 1.5rem; } }
.explore-card {
    background: var(--card); border: 1px solid var(--line); border-radius: 10px;
    overflow: hidden; display: flex; flex-direction: column;
    text-decoration: none; color: inherit;
    transition: transform 0.12s ease, box-shadow 0.12s ease;
}
.explore-card:hover { transform: translateY(-3px); box-shadow: 0 6px 18px rgba(11, 68, 102, 0.15); }
.explore-card img { width: 100%; height: 210px; object-fit: cover; display: block; }
.explore-card h3 { font-family: var(--font-heading); font-size: 1.15rem; color: var(--navy); margin: 1.1rem 1.25rem 0.3rem; }
.explore-card p { font-family: var(--sans); font-size: 0.9rem; color: var(--slate-mid); margin: 0 1.25rem 0.5rem; flex: 1; }
.explore-card .learn { font-family: var(--sans); font-size: 0.88rem; font-weight: 600; color: var(--blue-text); margin: 0 1.25rem 1.15rem; }
.explore-card:hover h3 { text-decoration: underline; }

/* ---------- Interior page header / breadcrumb ---------- */
.page-header { background: var(--card); border-bottom: 1px solid var(--line); padding: 1.5rem 0 1.4rem; }
.breadcrumb { font-family: var(--sans); font-size: 0.85rem; margin-bottom: 0.6rem; }
.breadcrumb ol { list-style: none; display: flex; flex-wrap: wrap; gap: 0.35rem; }
.breadcrumb li + li::before { content: "›"; margin-right: 0.35rem; color: var(--slate-mid); }
.breadcrumb a { color: var(--blue-text); text-decoration: none; }
.breadcrumb a:hover { text-decoration: underline; }
.breadcrumb [aria-current="page"] { color: var(--slate-mid); }
.page-header h1 { font-family: var(--font-heading); font-size: clamp(1.6rem, 3.5vw, 2.1rem); color: var(--navy); line-height: 1.2; }
.page-header .lede { font-family: var(--sans); font-size: 0.97rem; color: var(--slate-mid); margin-top: 0.5rem; max-width: 62rem; }

/* ---------- Main content typography ---------- */
main h1 { font-family: var(--font-heading); color: var(--navy); font-size: 1.9rem; margin-bottom: 1rem; }
/* These generated bodies embed their own h1, but the page-header band already
   shows the title — hide the duplicate. */
.meetings-index > h1, .committee-page > h1, .agenda-public > h1, .search-page > h1 { display: none; }
main h2 { font-family: var(--font-heading); color: var(--navy); font-size: 1.35rem; margin: 1.8rem 0 0.8rem; padding-bottom: 0.45rem; border-bottom: 3px solid var(--navy); scroll-margin-top: 1rem; }
main h2:first-child, main h1:first-child { margin-top: 0; }
main h3 { font-family: var(--font-heading); color: var(--navy); font-size: 1.1rem; margin: 1.4rem 0 0.4rem; scroll-margin-top: 1rem; }
main p { margin-bottom: 0.85rem; }
main ul, main ol { margin: 0 0 0.9rem 1.6rem; }
main blockquote { border-left: 4px solid var(--gold); padding: 0.3rem 1rem; color: var(--slate-mid); margin-bottom: 0.9rem; }

/* Tables: navy header row, zebra body (rates, fees, meetings) */
main table {
    border-collapse: collapse; margin-bottom: 1rem; width: 100%;
    background: var(--card); font-family: var(--sans); font-size: 0.92rem;
}
main th { background: var(--navy); color: #fff; font-size: 0.8rem; font-weight: 700; text-transform: uppercase; letter-spacing: 0.07em; border: 0; padding: 0.7rem 1rem; text-align: left; }
main td { border: 0; border-top: 1px solid var(--line); padding: 0.7rem 1rem; text-align: left; vertical-align: top; }
main tbody tr:nth-child(even) { background: #f8fafc; }

.list-children { list-style: none; margin-left: 0 !important; }
.list-children li { padding: 0.4rem 0; border-bottom: 1px solid var(--line); }
.list-children a { font-weight: 600; text-decoration: none; }

/* ---------- Sidebar ("On this page" TOC) ---------- */
.sidebar {
    background: var(--card); border: 1px solid var(--line); border-radius: 8px;
    padding: 1rem 1.1rem 1.2rem; font-family: var(--sans);
    position: sticky; top: 1rem;
}
.sidebar h2, .sidebar h3 { font-family: var(--sans); font-size: 0.85rem; color: var(--navy); text-transform: uppercase; letter-spacing: 0.07em; margin: 0 0 0.6rem; border: 0; padding: 0; }
.sidebar ul, .sidebar ol { list-style: none; margin: 0; }
.sidebar li { margin-bottom: 0.15rem; }
.sidebar a {
    display: block; text-decoration: none; color: var(--blue-text);
    font-size: 0.88rem; padding: 0.28rem 0.5rem; border-radius: 5px; line-height: 1.35;
}
.sidebar a:hover { background: #eef4f9; color: var(--navy); }
.sidebar .toc-group { padding: 0.55rem 0.5rem 0.1rem; font-size: 0.72rem; letter-spacing: 0.1em; text-transform: uppercase; color: var(--slate-mid); }

/* ---------- Footer ---------- */
footer.site-footer { background: var(--navy); color: #c3d7e6; font-family: var(--sans); }
.footer-cols { display: grid; gap: 2rem; padding-top: 2.5rem; padding-bottom: 2rem; }
@media (min-width: 768px) { .footer-cols { grid-template-columns: repeat(3, 1fr); gap: 3rem; } }
.footer-col h2 {
    font-family: var(--sans); font-size: 1rem; color: #fff; text-transform: uppercase;
    letter-spacing: 0.1em; margin-bottom: 0.9rem;
    border-bottom: 2px solid var(--gold); display: inline-block; padding-bottom: 0.3rem;
}
.footer-col ul { list-style: none; }
.footer-col li { margin-bottom: 0.5rem; font-size: 0.92rem; }
.site-footer a { color: #c3d7e6; text-decoration: none; }
.site-footer a:hover { color: #fff; text-decoration: underline; }
.footer-text { font-style: normal; font-size: 0.92rem; line-height: 1.7; }
.footer-text p { margin-bottom: 0.6rem; }
.social-row { display: flex; gap: 0.7rem; margin-top: 1rem; }
.social-row a {
    width: 38px; height: 38px; border-radius: 50%;
    background: var(--color-secondary); display: flex; align-items: center; justify-content: center;
}
.social-row a:hover { background: var(--bright); }
.footer-base { border-top: 1px solid color-mix(in srgb, var(--color-secondary) 72%, #fff); padding: 1.1rem 0 1.3rem; font-size: 0.85rem; color: #a4bfd4; }
.footer-base .wrap { display: flex; flex-wrap: wrap; gap: 0.5rem 1.5rem; justify-content: space-between; }
.footer-base p { margin: 0; }

/* ---------- Block builder blocks ---------- */
.block-heading { /* spacing inherited from main h2/h3 rules */ }
.block-cols-2 { column-count: 2; column-gap: 2rem; }
.block-cols-2 h2, .block-cols-2 h3, .block-cols-2 img { break-inside: avoid; }
.block-imgtext { display: grid; grid-template-columns: minmax(0, 18rem) minmax(0, 1fr); gap: 1.5rem; align-items: start; margin-bottom: 1rem; }
.block-imgtext.side-right { grid-template-columns: minmax(0, 1fr) minmax(0, 18rem); }
.block-imgtext.side-right img { order: 2; }
.block-imgtext img { width: 100%; height: auto; border-radius: 8px; }
.block-cards { display: grid; grid-template-columns: repeat(auto-fit, minmax(14rem, 1fr)); gap: 1.1rem; margin: 1.3rem 0 1.8rem; }
.block-cards .bcard { border: 1px solid var(--line); border-radius: 10px; padding: 1.2rem 1.3rem 1.3rem; background: var(--card); font-family: var(--sans); }
.block-cards .bcard h3 { margin-top: 0; }
.block-cards .bcard p { font-size: 0.9rem; color: var(--slate-mid); }
.block-cards .bcard a { font-weight: 600; text-decoration: none; }
.block-cta { margin: 1.4rem 0; }
.cta-btn {
    display: inline-block; font-family: var(--sans);
    background: var(--gold); color: var(--navy-deep); font-weight: 700;
    text-decoration: none; padding: 0.6rem 1.3rem; border-radius: 6px;
}
.cta-btn:hover { filter: brightness(0.93); color: var(--navy-deep); }
@media (max-width: 700px) {
    .block-imgtext, .block-imgtext.side-right { grid-template-columns: 1fr; }
    .block-imgtext.side-right img { order: 0; }
    .block-cols-2 { column-count: 1; }
}

/* ---------- Calendar month grid + event pages ---------- */
.cal-month-head { display: flex; align-items: center; justify-content: space-between; gap: 1rem; margin-bottom: 1rem; }
.cal-month-head h2 { margin: 0; border: 0; padding: 0; }
.cal-nav { font-family: var(--sans); font-weight: 600; text-decoration: none; white-space: nowrap; }
.cal-nav.off { min-width: 5rem; }
.cal-grid { width: 100%; table-layout: fixed; border-collapse: collapse; }
.cal-grid th { background: var(--navy); color: #fff; border: 1px solid var(--navy); padding: 0.3rem; font-size: 0.72rem; text-transform: uppercase; letter-spacing: 0.06em; text-align: center; }
.cal-grid td { border: 1px solid var(--line) !important; border-top: 1px solid var(--line) !important; vertical-align: top; height: 5.5rem; padding: 0.25rem 0.35rem; font-size: 0.8rem; background: #fff; }
.cal-grid td.out { background: #f2f6f9; color: rgba(0, 0, 0, 0.35); }
.cal-grid td.today { box-shadow: inset 0 0 0 2px var(--gold); }
.cal-grid .d { font-weight: 700; display: block; margin-bottom: 0.15rem; font-family: var(--sans); }
.cal-grid ul { list-style: none; margin: 0 !important; padding: 0; }
.cal-grid li { margin-bottom: 0.2rem; line-height: 1.25; }
.cal-grid li .t { color: var(--blue-text); font-weight: 700; font-size: 0.72rem; font-family: var(--sans); }
.cal-grid a { text-decoration: none; }
.cal-feeds { margin-top: 0.8rem; font-family: var(--sans); font-size: 0.85rem; }

.event-when { font-family: var(--sans); font-weight: 700; color: var(--navy); font-size: 1.05rem; margin-bottom: 0.2rem; }
.event-loc { color: inherit; margin-bottom: 0.2rem; }
.event-cat { display: inline-block; font-family: var(--sans); font-size: 0.8rem; font-weight: 700; background: #e3eef7; color: var(--navy); border: 1px solid #b9d2e4; border-radius: 999px; padding: 0.18rem 0.6rem; margin-bottom: 0.8rem; }
.event-body { margin-top: 0.6rem; }
.event-back { margin-top: 1.6rem; font-family: var(--sans); }
@media (max-width: 700px) { .cal-grid td { height: auto; } }

/* ---------- Meetings & agendas ---------- */
.meetings-index .committee-card { border: 1px solid var(--line); border-radius: 8px; background: var(--card); padding: 1rem 1.2rem; margin-bottom: 1rem; }
.meetings-index .committee-card h2 { border: 0; padding: 0; margin: 0 0 0.3rem; font-size: 1.2rem; }
.meetings-index .committee-card h2 a { text-decoration: none; color: var(--navy); }
.meetings-index .committee-card h2 a:hover { text-decoration: underline; color: var(--blue-text); }
.meetings-index .committee-card .meta { color: var(--slate-mid); font-family: var(--sans); font-size: 0.88rem; margin: 0; }
.agenda-list { list-style: none; margin-left: 0 !important; }
.agenda-list li { padding: 0.55rem 0; border-bottom: 1px solid var(--line); }
.agenda-list li.none { color: var(--slate-mid); border-bottom: 0; }
.agenda-list a { font-weight: 700; text-decoration: none; }
.agenda-list .when { color: var(--slate-mid); font-family: var(--sans); font-size: 0.88rem; margin-left: 0.4rem; }
.agenda-public .when { font-weight: 700; color: var(--navy); font-family: var(--sans); }
.agenda-pdfs a {
    display: inline-flex; align-items: center; gap: 0.35rem; font-family: var(--sans);
    border: 1px solid #b7c5d1; border-radius: 6px; background: var(--card);
    color: var(--navy); font-weight: 600; font-size: 0.9rem; text-decoration: none;
    padding: 0.4rem 0.9rem; margin: 0.15rem 0.15rem 0.15rem 0;
}
.agenda-pdfs a:hover { border-color: var(--bright); color: var(--blue-text); }
.agenda-public .notice { border: 1px solid var(--line); border-left: 4px solid var(--gold); border-radius: 0 6px 6px 0; background: #fdf3d9; padding: 0.8rem 1.1rem; margin: 1rem 0; }
.agenda-outline .lbl { white-space: nowrap; font-weight: 700; color: var(--navy); width: 1%; }
.agenda-outline .item-desc { font-size: 0.9rem; color: var(--slate-mid); margin-top: 0.2rem; }
.agenda-list .agenda-rec { font-family: var(--sans); font-size: 0.82rem; font-weight: 700; margin-left: 0.5rem; text-decoration: none; white-space: nowrap; }
.agenda-list .agenda-rec:hover { text-decoration: underline; }

/* ---------- Search + form embeds ---------- */
.search-page h1 { margin-bottom: 1rem; }
.search-page { --pagefind-ui-primary: var(--navy); --pagefind-ui-text: var(--slate); --pagefind-ui-border: var(--line); --pagefind-ui-font: var(--sans); }
.cg-form-wrap, .cg-subscribe-wrap { margin: 1rem 0; font-family: var(--sans); }
.cg-field label { display: block; font-weight: 600; margin: 0.6rem 0 0.2rem; }
.cg-form input[type=text], .cg-form input[type=email], .cg-form input[type=tel],
.cg-form textarea, .cg-form select { width: 100%; max-width: 34rem; padding: 0.5rem 0.6rem; border: 1px solid #aebbc6; border-radius: 6px; font: inherit; }
.cg-check label { font-weight: normal; }
.cg-req { color: #b00020; }
.cg-submit { padding: 0.55rem 1.3rem; cursor: pointer; background: var(--navy); color: #fff; border: 1px solid var(--navy); border-radius: 6px; font: inherit; font-weight: 600; }
.cg-submit:hover { background: var(--navy-deep); }
.cg-msg.cg-ok { color: #16691f; font-weight: 600; }
.cg-msg.cg-err { color: #a11212; font-weight: 600; }
.cg-sub-row { display: flex; gap: 0.5rem; max-width: 34rem; }
.cg-sub-row input { flex: 1; }

/* ---------- Blog: [[recentBlogs]] embed, /blog/ index, post pages ---------- */
.news-thumb { width: 100%; height: 150px; object-fit: cover; border-radius: 6px; display: block; margin-bottom: 0.6rem; }
.recent-blogs .ce-more, .blog-index .ce-more { margin-top: 0.6rem; }
.rb-empty { color: var(--slate-mid); }
.blog-index .news-card { margin-bottom: 1rem; }
.blog-desc { color: var(--slate-mid); margin-bottom: 1.2rem; }
.blog-post .news-date { margin-bottom: 0.8rem; }
.post-image { width: 100%; max-height: 340px; object-fit: cover; border-radius: 10px; margin: 0 0 1.2rem; display: block; }

/* ---------- Business directory token ([[busdir]]) ---------- */
.busdir { margin: 1rem 0; }
.busdir .bd-item { padding: 0.9rem 0; border-bottom: 1px solid var(--line); }
.busdir .bd-item:last-child { border-bottom: 0; }
.busdir .bd-name { margin: 0 0 0.25rem; }
.busdir .bd-item p { margin: 0.15rem 0; }
.busdir .bd-directions { font-family: var(--sans); font-size: 0.85em; margin-left: 0.5rem; }
.busdir .bd-desc { color: var(--slate-mid); font-size: 0.92em; }
.busdir .bd-empty { color: var(--slate-mid); }

/* ---------- City code + ordinances ---------- */
.code-intro { margin-bottom: 0.6rem; }
.code-meta {
    font-family: var(--sans); font-size: 0.82rem; color: var(--slate-mid);
    display: flex; flex-wrap: wrap; gap: 0.4rem 1.4rem;
    border-bottom: 1px solid var(--line); padding-bottom: 1rem; margin-bottom: 1.6rem;
}
.code-section { margin-bottom: 1.8rem; }
.code-section h2 { border: 0; padding: 0; font-size: 1.3rem; margin: 1.8rem 0 0.6rem; }
.code-section p { max-width: 70ch; }
.code-section ol { list-style: none; counter-reset: cg-alpha; margin: 0 0 0.9rem 2.2rem; padding: 0; max-width: 68ch; }
.code-section ol > li { counter-increment: cg-alpha; position: relative; margin-bottom: 0.5rem; }
.code-section ol > li::before { content: "(" counter(cg-alpha, upper-alpha) ")"; font-weight: 700; color: var(--slate-mid); font-size: 0.9em; position: absolute; left: -2.2rem; }
.code-note { font-family: var(--sans); font-size: 0.8rem; font-style: italic; color: var(--slate-mid); }
.code-chapters { list-style: none; margin: 0 0 1.4rem !important; }
.code-chapters li { padding: 0.4rem 0; border-bottom: 1px solid var(--line); }
.code-chapters a { font-weight: 600; text-decoration: none; }
.ord-list td.ord-no { white-space: nowrap; font-weight: 700; }
.ord-repealed { display: inline-block; font-family: var(--sans); font-size: 0.72rem; font-weight: 700; text-transform: uppercase; color: #a11212; border: 1px solid #dca5a1; border-radius: 999px; padding: 0 0.5rem; margin-left: 0.4rem; }
.ord-doc { font-family: var(--font-heading); max-width: 46rem; margin: 0 auto; }
.ord-doc .doc-head { text-align: center; margin-bottom: 1.2rem; }
.ord-doc .muni { font-family: var(--sans); font-size: 0.78rem; letter-spacing: 0.16em; text-transform: uppercase; color: var(--slate-mid); margin: 0; }
.ord-doc .doc-title { font-size: 1.35rem; font-weight: 700; color: var(--navy); margin: 0.3rem 0 0.1rem; }
.ord-doc .sub { font-style: italic; color: var(--slate-mid); margin: 0; }
.ord-doc .code-meta { justify-content: center; }
.ord-body h2 { border: 0; padding: 0; font-size: 1.05rem; margin: 1.2rem 0 0.4rem; }
.img-caption { font-family: var(--sans); font-size: 0.8rem; color: var(--slate-mid); margin-top: -0.4rem; }

/* City code — subchapter group headings + nested (A)(1)(a)1. lists (Word import) */
.code-subhead { text-align: center; font-family: var(--sans); font-size: 0.92rem; letter-spacing: 0.14em; text-transform: uppercase; color: var(--navy); margin: 2.4rem 0 0.2rem; border: 0; padding: 0; }
.code-section ol ol { counter-reset: cg-num; margin: 0.35rem 0 0.35rem 2.2rem; }
.code-section ol ol > li { counter-increment: cg-num; }
.code-section ol ol > li::before { content: "(" counter(cg-num) ")"; }
.code-section ol ol ol { counter-reset: cg-lalpha; }
.code-section ol ol ol > li { counter-increment: cg-lalpha; }
.code-section ol ol ol > li::before { content: "(" counter(cg-lalpha, lower-alpha) ")"; }
.code-section ol ol ol ol { counter-reset: cg-num2; }
.code-section ol ol ol ol > li { counter-increment: cg-num2; }
.code-section ol ol ol ol > li::before { content: counter(cg-num2) "."; }
/* Marker-style classes from the Word importer beat depth-based lettering */
.code-section ol.ol-A { counter-reset: cg-alpha; }
.code-section ol.ol-A > li { counter-increment: cg-alpha; }
.code-section ol.ol-A > li::before { content: "(" counter(cg-alpha, upper-alpha) ")"; }
.code-section ol.ol-1 { counter-reset: cg-num; }
.code-section ol.ol-1 > li { counter-increment: cg-num; }
.code-section ol.ol-1 > li::before { content: "(" counter(cg-num) ")"; }
.code-section ol.ol-a { counter-reset: cg-lalpha; }
.code-section ol.ol-a > li { counter-increment: cg-lalpha; }
.code-section ol.ol-a > li::before { content: "(" counter(cg-lalpha, lower-alpha) ")"; }
.code-section ol.ol-i1 { counter-reset: cg-num2; }
.code-section ol.ol-i1 > li { counter-increment: cg-num2; }
.code-section ol.ol-i1 > li::before { content: counter(cg-num2) "."; }

/* ---------- Responsive ---------- */
@media (max-width: 860px) {
    .has-sidebar .page-grid { grid-template-columns: 1fr; }
    .sidebar { position: static; }
    .content-panel { padding: 1.2rem 1.1rem 1.4rem; }
    .hero-plain .hero-inner { padding-top: 2.5rem; padding-bottom: 2.5rem; }
}

/* ---------- Slideshow block ---------- */
.slideshow-block { margin: 0 0 1.4rem; }
.slideshow-single img { width: 100%; border-radius: 10px; display: block; }
.slideshow { position: relative; border-radius: 10px; overflow: hidden; border: 1px solid var(--line); background: var(--navy-deep); }
.slideshow .slide-img { display: block; width: 100%; height: 470px; object-fit: cover; }
.slide-caption {
    position: absolute; left: 0; right: 0; bottom: 0; margin: 0;
    background: linear-gradient(180deg, rgba(8, 47, 71, 0) 0%, rgba(8, 47, 71, 0.78) 60%);
    color: #fff; padding: 2.2rem 5.5rem 1rem 1.4rem;
    font-family: var(--sans); font-size: 0.95rem;
}
.slide-arrow {
    position: absolute; top: 50%; transform: translateY(-50%);
    width: 44px; height: 44px; border-radius: 50%;
    background: rgba(255, 255, 255, 0.92); border: 1px solid #b7c5d1; color: var(--navy);
    display: flex; align-items: center; justify-content: center; cursor: pointer; font-size: 1.3rem; line-height: 1;
}
.slide-arrow:hover { background: #fff; border-color: var(--bright); color: var(--blue-text); }
.slide-arrow.prev { left: 0.9rem; }
.slide-arrow.next { right: 0.9rem; }
.slide-dots { position: absolute; right: 1.2rem; bottom: 1.1rem; display: flex; gap: 0.4rem; }
.slide-dots span { width: 9px; height: 9px; border-radius: 50%; background: rgba(255, 255, 255, 0.5); }
.slide-dots span.on { background: var(--gold); }
.thumb-strip { display: grid; grid-template-columns: repeat(auto-fit, minmax(110px, 1fr)); gap: 0.7rem; margin-top: 0.8rem; }
.thumb-strip button { border: 2px solid transparent; border-radius: 8px; overflow: hidden; padding: 0; background: none; cursor: pointer; position: relative; }
.thumb-strip img { display: block; width: 100%; height: 84px; object-fit: cover; }
.thumb-strip button.active { border-color: var(--bright); }
.thumb-strip button.active::after { content: ""; position: absolute; inset: 0; box-shadow: inset 0 0 0 2px #fff; border-radius: 6px; }
.thumb-strip button:hover { border-color: var(--gold); }
@media (max-width: 700px) {
    .slideshow .slide-img { height: 300px; }
    .slide-caption { padding: 1.6rem 1rem 0.8rem; }
}
