/* ============================================================================
   Hazelton Township Fire Department — Public theme.
   Faithful-but-modernized fire-service design. The accent color is themeable:
   the layout injects --accent from the admin "theme.accent" setting; everything
   derives from it. Barlow (civic/infrastructure lettering) carries the type.
   ========================================================================== */

:root {
    --accent: #a4161a;                 /* overridden inline from settings */
    --accent-deep: #6d1013;            /* static fallbacks … */
    --accent-ink: #911418;             /* accent for text/links on light */
    --accent-deep: color-mix(in srgb, var(--accent) 70%, #000);  /* … derived when supported */
    --accent-ink:  color-mix(in srgb, var(--accent) 88%, #000);
    --gold: #c8992b;
    --amber: #b45309;
    --amber-bg: #fbeecb;

    --ink: #241c19;
    --muted: #68605d;
    --paper: #f6f2ef;
    --surface: #faf7f4;
    --surface-2: #efe9e4;
    --line: #e5ddd7;
    --util-bg: #181110;
    --footer-bg: #181110;
    --on-dark: #f4ece8;
    --on-dark-mut: #c9b8b0;

    --shadow: 0 1px 2px rgba(28,22,20,.06), 0 8px 24px -12px rgba(28,22,20,.18);
    --disp: "Barlow Condensed", "Oswald", system-ui, sans-serif;
    --semi: "Barlow Semi Condensed", "Barlow", system-ui, sans-serif;
    --body: "Barlow", system-ui, -apple-system, "Segoe UI", sans-serif;
    color-scheme: light dark;
}
@media (prefers-color-scheme: dark) {
    :root {
        --accent-ink: #ff6b70;
        --ink: #f3ece8; --muted: #a99e98; --paper: #141010; --surface: #1e1816;
        --surface-2: #251d1a; --line: #342a26; --util-bg: #0d0908; --footer-bg: #0d0908;
        --amber: #f0a13a; --amber-bg: #3a2a12;
    }
}
:root[data-theme="dark"] {
    --accent-ink: #ff6b70;
    --accent-ink: color-mix(in srgb, var(--accent) 62%, #fff);
    --ink: #f3ece8; --muted: #a99e98; --paper: #141010; --surface: #1e1816;
    --surface-2: #251d1a; --line: #342a26; --util-bg: #0d0908; --footer-bg: #0d0908;
    --amber: #f0a13a; --amber-bg: #3a2a12;
}
:root[data-theme="light"] {
    --accent-ink: #911418;
    --ink: #241c19; --muted: #68605d; --paper: #f6f2ef; --surface: #faf7f4;
    --surface-2: #efe9e4; --line: #e5ddd7; --util-bg: #181110; --footer-bg: #181110;
    --amber: #b45309; --amber-bg: #fbeecb;
}

* { box-sizing: border-box; }
body {
    margin: 0; background: var(--paper); color: var(--ink);
    font: 16px/1.6 var(--body); -webkit-font-smoothing: antialiased;
}
a { color: inherit; }
img { max-width: 100%; display: block; }
h1, h2, h3, h4 { font-family: var(--disp); font-weight: 700; line-height: 1.05; text-wrap: balance; margin: 0; }
.container { max-width: 1280px; margin: 0 auto; padding: 0 22px; }
.eyebrow { font-family: var(--semi); text-transform: uppercase; letter-spacing: .14em; font-size: .72rem; font-weight: 600; }

.skip { position: absolute; left: -999px; top: 0; background: var(--accent); color: #fff; padding: 10px 16px; z-index: 100; }
.skip:focus { left: 12px; top: 12px; }
a:focus-visible, button:focus-visible, summary:focus-visible { outline: 3px solid var(--gold); outline-offset: 2px; border-radius: 2px; }

/* ---- utility bar ---- */
.util { background: var(--util-bg); color: var(--on-dark-mut); font-family: var(--semi); font-size: .82rem; }
.util .container { display: flex; align-items: center; justify-content: space-between; gap: 16px; min-height: 40px; flex-wrap: wrap; }
.util a { color: var(--on-dark-mut); padding: 6px 2px; letter-spacing: .03em; text-decoration: none; }
.util a:hover { color: #fff; }
.util-left, .util-right { display: flex; gap: 16px; align-items: center; }
.util .sep { opacity: .35; }
.util strong { color: #fff; }
.util-tel { color: #fff; }

/* ---- masthead ---- */
.mast { background: var(--surface); border-bottom: 3px solid var(--accent); }
.mast .container { display: flex; align-items: center; justify-content: space-between; gap: 24px; padding: 16px 20px; }
.brand { display: flex; align-items: center; gap: 16px; min-width: 0; text-decoration: none; color: var(--ink); }
.brand .crest { width: 60px; height: 70px; flex: none; }
.brand .dept { font-family: var(--disp); font-weight: 700; font-size: 1.7rem; line-height: .98; }
.brand .sub { font-family: var(--semi); text-transform: uppercase; letter-spacing: .18em; font-size: .66rem; color: var(--muted); margin-top: 4px; }
.call { display: flex; gap: 20px; align-items: center; }
.call .blk { text-align: right; line-height: 1.1; }
.call .lbl { font-family: var(--semi); text-transform: uppercase; letter-spacing: .12em; font-size: .6rem; color: var(--muted); }
.call .num { font-family: var(--disp); font-weight: 700; font-size: 1.3rem; color: var(--ink); text-decoration: none; }
.call .emg .num { color: var(--accent-ink); }
.call .divider { width: 1px; height: 36px; background: var(--line); }
@media (max-width: 760px) { .call { display: none; } }

/* ---- primary nav ---- */
nav.primary { background: var(--accent-deep); position: sticky; top: 0; z-index: 40; }
nav.primary .container { display: flex; align-items: stretch; gap: 2px; padding: 0 8px; }
.nav-toggle { display: none; }
.nav-list { display: flex; list-style: none; margin: 0; padding: 0; flex: 1; }
.nav-list > li { position: relative; }
.nav-list > li > a, .nav-list > li > .navbtn {
    color: #fdeef0; font-family: var(--disp); font-weight: 600; font-size: 1rem; letter-spacing: .04em;
    text-transform: uppercase; padding: 14px 16px; display: flex; align-items: center; gap: 6px;
    text-decoration: none; background: none; border: 0; cursor: pointer; font-family: var(--disp);
}
.nav-list > li > a:hover, .nav-list > li > .navbtn:hover,
.nav-list > li.is-current > a { background: rgba(0,0,0,.22); color: #fff; }
.nav-list > li.is-current > a { box-shadow: inset 0 -3px 0 var(--gold); }
.caret { font-size: .7rem; opacity: .7; }
.submenu { list-style: none; margin: 0; padding: 6px 0; position: absolute; left: 0; top: 100%; min-width: 210px;
    background: var(--surface); border: 1px solid var(--line); border-radius: 0 0 8px 8px; box-shadow: var(--shadow);
    display: none; z-index: 50; }
.nav-list > li:hover > .submenu, .nav-list > li:focus-within > .submenu { display: block; }
.submenu a { display: block; padding: 9px 16px; color: var(--ink); text-decoration: none; font-size: .95rem; }
.submenu a:hover { background: var(--surface-2); color: var(--accent-ink); }
.nav-util { display: none; }

@media (max-width: 860px) {
    .nav-toggle { display: inline-flex; align-items: center; gap: 8px; background: none; border: 0; color: #fff;
        font-family: var(--disp); text-transform: uppercase; font-size: 1rem; padding: 13px 12px; cursor: pointer; }
    .nav-list { display: none; flex-direction: column; width: 100%; }
    nav.primary.open .nav-list { display: flex; }
    .nav-list > li > a, .nav-list > li > .navbtn { width: 100%; }
    .submenu { position: static; display: block; border: 0; box-shadow: none; background: rgba(0,0,0,.18); border-radius: 0; }
    .submenu a { color: #fdeef0; }
    .submenu a:hover { color: #fff; }
    nav.primary .container { flex-direction: column; padding: 0; }
    .nav-util { display: block; }
}

/* ---- hero ---- */
.hero { position: relative; color: var(--on-dark); overflow: hidden;
    background: linear-gradient(90deg, rgba(20,12,11,.94), rgba(40,15,16,.7)), linear-gradient(135deg, #241a18, #2a0f11); }
.hero::before { content: ""; position: absolute; inset: 0; opacity: .10;
    background: repeating-linear-gradient(-45deg, var(--gold) 0 22px, transparent 22px 44px);
    -webkit-mask: linear-gradient(90deg, transparent, #000 60%); mask: linear-gradient(90deg, transparent, #000 60%); }
.hero .container { position: relative; display: grid; grid-template-columns: 1.55fr .95fr; gap: 36px; align-items: center; padding: 44px 20px 52px; }
.hero .eyebrow { color: var(--gold); }
.hero h1 { font-size: clamp(2.1rem, 4.4vw, 3.3rem); margin: 12px 0 14px; color: #fff; }
.hero p { color: var(--on-dark-mut); max-width: 52ch; font-size: 1.05rem; margin: 0 0 22px; }
.hero-cta { display: flex; gap: 12px; flex-wrap: wrap; }
.status-card { background: rgba(0,0,0,.28); border: 1px solid rgba(255,255,255,.14); border-radius: 6px; padding: 18px; }
.status-card .row { display: flex; align-items: center; justify-content: space-between; padding: 10px 0; border-bottom: 1px solid rgba(255,255,255,.1); }
.status-card .row:last-child { border-bottom: 0; }
.status-card .k { font-family: var(--semi); text-transform: uppercase; letter-spacing: .08em; font-size: .72rem; color: var(--on-dark-mut); }
.status-card .v { font-family: var(--disp); font-weight: 700; font-size: 1.1rem; color: #fff; }
.dot { display: inline-block; width: 9px; height: 9px; border-radius: 50%; margin-right: 7px; background: #37c26b; box-shadow: 0 0 0 3px rgba(55,194,107,.22); }
@media (max-width: 820px) { .hero .container { grid-template-columns: 1fr; gap: 24px; } .status-card { max-width: 420px; } }

/* ---- buttons ---- */
.btn { font-family: var(--disp); font-weight: 600; text-transform: uppercase; letter-spacing: .05em; font-size: 1rem;
    padding: 12px 22px; border-radius: 2px; border: 2px solid transparent; cursor: pointer; display: inline-flex;
    align-items: center; gap: 8px; text-decoration: none; transition: transform .12s ease, background .12s ease; }
@media (prefers-reduced-motion: reduce) { .btn { transition: none; } }
.btn-primary { background: var(--accent); color: #fff; }
.btn-primary:hover { background: color-mix(in srgb, var(--accent) 88%, #fff); transform: translateY(-1px); }
.btn-ghost-light { border-color: rgba(255,255,255,.4); color: #fff; }
.btn-ghost-light:hover { border-color: #fff; background: rgba(255,255,255,.08); }
.btn-ghost { border-color: var(--accent); color: var(--accent-ink); }
.btn-ghost:hover { background: var(--accent); color: #fff; }

/* ---- main + two-column ---- */
main.container { padding-top: 40px; padding-bottom: 20px; }
.home-grid { display: grid; grid-template-columns: 1fr 340px; gap: 38px; }
.home-grid.no-news { grid-template-columns: 1fr; } /* news hidden (no content = hide component) */
@media (max-width: 920px) { .home-grid { grid-template-columns: 1fr; } }

.sec-head { display: flex; align-items: baseline; justify-content: space-between; gap: 14px; border-bottom: 2px solid var(--ink); padding-bottom: 8px; margin-bottom: 22px; }
.sec-head h2 { font-size: 1.5rem; text-transform: uppercase; letter-spacing: .02em; }
.sec-head .more { font-family: var(--semi); text-transform: uppercase; letter-spacing: .08em; font-size: .74rem; color: var(--accent-ink); font-weight: 600; text-decoration: none; }
.sec-head .more:hover { text-decoration: underline; }

/* content card (interior pages) */
.card { background: var(--surface); border: 1px solid var(--line); border-radius: 10px; padding: 32px; box-shadow: var(--shadow); }
.card .eyebrow { color: var(--accent-ink); }
.card h1 { font-size: clamp(1.6rem, 4vw, 2.2rem); margin-bottom: 12px; }
.lede { color: var(--muted); max-width: 62ch; }
.prose { max-width: 68ch; }
.prose p { margin: 0 0 1em; }

/* empty state */
.empty { background: var(--surface); border: 1px dashed var(--line); border-radius: 10px; padding: 36px; text-align: center; color: var(--muted); }

/* ---- sidebar widgets ---- */
aside.sidebar { display: flex; flex-direction: column; gap: 26px; }
.widget { background: var(--surface); border: 1px solid var(--line); border-radius: 8px; overflow: hidden; box-shadow: var(--shadow); }
.widget > h2 { background: var(--ink); color: var(--paper); font-size: 1.1rem; text-transform: uppercase; letter-spacing: .06em; padding: 12px 16px; display: flex; align-items: center; gap: 9px; }
:root[data-theme="dark"] .widget > h2 { background: #000; }
@media (prefers-color-scheme: dark) { .widget > h2 { background: #000; } }
.widget .pad { padding: 16px; }
.alert-box { border: 1px solid var(--amber); background: var(--amber-bg); border-left: 5px solid var(--amber); border-radius: 6px; padding: 14px 16px; }
.alert-box .h { display: flex; align-items: center; gap: 8px; font-family: var(--disp); font-weight: 700; text-transform: uppercase; letter-spacing: .04em; color: var(--amber); font-size: 1rem; }
.alert-box p { margin: 6px 0 0; font-size: .9rem; color: var(--ink); }

/* ---- forms (shared with auth/account) ---- */
.form-group { margin-bottom: 16px; display: flex; flex-direction: column; gap: 6px; }
.form-row { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; }
@media (max-width: 520px) { .form-row { grid-template-columns: 1fr; } }
label { font-weight: 600; font-size: .9rem; font-family: var(--body); }
input[type=text], input[type=email], input[type=password], input[type=tel], input[type=number], textarea, select {
    width: 100%; padding: 10px 12px; border: 1px solid var(--line); border-radius: 6px; background: var(--paper); color: var(--ink); font: inherit; font-family: var(--body); }
input:focus-visible, textarea:focus-visible, select:focus-visible { outline: 3px solid color-mix(in srgb, var(--accent) 35%, transparent); outline-offset: 1px; border-color: var(--accent); }
.hint { font-size: .8rem; color: var(--muted); }
.muted { color: var(--muted); } .small { font-size: .85rem; }
.auth-card { max-width: 480px; margin: 0 auto; }
.auth-links { margin-top: 18px; font-size: .9rem; color: var(--muted); }
.auth-links a { color: var(--accent-ink); }
.facts { display: grid; grid-template-columns: repeat(auto-fit, minmax(150px, 1fr)); gap: 14px; margin: 24px 0 0; }
.facts div { background: var(--paper); border: 1px solid var(--line); border-radius: 8px; padding: 12px 14px; }
.facts dt { font-size: .68rem; text-transform: uppercase; letter-spacing: .08em; color: var(--muted); }
.facts dd { margin: 4px 0 0; font-weight: 700; }
.actions { display: flex; gap: 12px; flex-wrap: wrap; margin-top: 12px; }
.future-note { margin-top: 20px; font-size: .85rem; }
.prose h2 { font-size: 1.3rem; margin: 1.4em 0 .4em; }
.button { display: inline-block; background: var(--accent); color: #fff; text-decoration: none; padding: 10px 20px; border-radius: 4px; font-weight: 600; border: 0; cursor: pointer; font: inherit; }
.button:hover { background: var(--accent-deep); }
.button-ghost { background: transparent; color: var(--accent-ink); border: 2px solid var(--accent); }
.button-ghost:hover { background: var(--accent); color: #fff; }

/* ---- alerts ---- */
.alert { border-radius: 8px; padding: 12px 16px; margin-bottom: 20px; border: 1px solid; font-size: .95rem; }
.alert ul { margin: 8px 0 0; padding-left: 20px; }
.alert-success { background: #e9f6ec; border-color: #3f9b57; color: #1c5730; }
.alert-error { background: #fbeaea; border-color: var(--accent); color: #7a1418; }
.alert-info { background: #eaf1fb; border-color: #3b6fb0; color: #1e3f66; }
@media (prefers-color-scheme: dark) { .alert-success { background:#16281b;color:#a9e2b8 } .alert-error { background:#2a1414;color:#f0b3b3 } .alert-info { background:#141f2e;color:#a9c6ef } }

/* ---- footer ---- */
.site-footer { margin-top: 44px; background: var(--footer-bg); color: var(--on-dark-mut); border-top: 4px solid var(--accent); }
.site-footer .cols { display: grid; grid-template-columns: 1.5fr 1fr 1fr; gap: 32px; padding: 40px 20px; }
.site-footer h3 { font-family: var(--disp); color: #fff; text-transform: uppercase; letter-spacing: .05em; font-size: 1.1rem; margin-bottom: 14px; }
.site-footer address { font-style: normal; line-height: 1.7; font-size: .92rem; }
.site-footer address strong { color: #fff; }
.site-footer .em { color: var(--accent-ink); }
.site-footer .maintain { display: flex; gap: 16px; align-items: flex-start; }
.site-footer .maintain .crest { width: 50px; height: 58px; flex: none; }
.flinks { display: flex; flex-direction: column; gap: 9px; font-family: var(--semi); font-size: .92rem; }
.flinks a { color: var(--on-dark-mut); text-decoration: none; }
.flinks a:hover { color: #fff; }
.colophon { border-top: 1px solid rgba(255,255,255,.1); font-size: .78rem; font-family: var(--semi); }
.colophon .container { display: flex; justify-content: space-between; gap: 14px; padding: 16px 20px; flex-wrap: wrap; }
@media (max-width: 760px) { .site-footer .cols { grid-template-columns: 1fr; gap: 26px; } }

/* ---- cookie banner ---- */
.cookie-banner { position: fixed; left: 0; right: 0; bottom: 0; z-index: 60; background: var(--util-bg); color: var(--on-dark); border-top: 3px solid var(--accent); box-shadow: 0 -6px 24px rgba(0,0,0,.25); }
.cookie-inner { display: flex; align-items: center; justify-content: space-between; gap: 18px; padding: 14px 20px; flex-wrap: wrap; }
.cookie-msg { margin: 0; font-size: .9rem; max-width: 70ch; }
.cookie-msg a { color: color-mix(in srgb, var(--accent) 55%, #fff); }
.cookie-actions { display: flex; gap: 10px; }
.cookie-actions form, .inline-form { margin: 0; display: inline; }
.button-sm { padding: 8px 16px; font-size: .85rem; }
.linklike { background: none; border: 0; padding: 0; color: var(--accent-ink); font: inherit; cursor: pointer; }
.linklike:hover { text-decoration: underline; }

/* ---- news cards (app_widget: news.latest, news archive) ---- */
.feed { display: flex; flex-direction: column; gap: 22px; }
.story { display: grid; grid-template-columns: 190px 1fr; gap: 20px; background: var(--surface); border: 1px solid var(--line); border-radius: 8px; overflow: hidden; box-shadow: var(--shadow); }
.story .thumb { aspect-ratio: 4/3; background: var(--surface-2); }
.story .thumb img { width: 100%; height: 100%; object-fit: cover; }
.thumb-crest { background: linear-gradient(135deg, var(--accent), var(--accent-deep)); position: relative; }
.thumb-crest::after { content: ""; position: absolute; inset: 0; opacity: .16; background: repeating-linear-gradient(-45deg, var(--gold) 0 14px, transparent 14px 28px); }
.story .body { padding: 16px 18px 18px 0; }
.story .meta { font-family: var(--semi); text-transform: uppercase; letter-spacing: .07em; font-size: .68rem; color: var(--muted); display: flex; gap: 8px; align-items: center; margin-bottom: 6px; flex-wrap: wrap; }
.story .tag { background: var(--accent); color: #fff; padding: 2px 8px; border-radius: 2px; font-weight: 600; }
.story h3 { font-size: 1.3rem; margin-bottom: 8px; line-height: 1.02; }
.story h3 a { color: var(--ink); text-decoration: none; }
.story h3 a:hover { color: var(--accent-ink); }
.story p { margin: 0 0 12px; color: var(--muted); font-size: .96rem; }
.story .rd { font-family: var(--semi); font-weight: 600; text-transform: uppercase; letter-spacing: .06em; font-size: .76rem; color: var(--accent-ink); text-decoration: none; }
.story .rd:hover { text-decoration: underline; }
@media (max-width: 560px) { .story { grid-template-columns: 1fr; } .story .thumb { aspect-ratio: 16/7; } .story .body { padding: 0 18px 18px; } }

/* ---- event date chips (app_widget: events.upcoming, events list) ---- */
.ev { display: flex; gap: 14px; padding: 12px 0; border-bottom: 1px solid var(--line); }
.ev:first-child { padding-top: 0; } .ev:last-child { border-bottom: 0; padding-bottom: 0; }
.ev .date { flex: none; width: 52px; text-align: center; background: var(--accent); color: #fff; border-radius: 5px; padding: 6px 0; line-height: 1; }
.ev .date .m { font-family: var(--semi); font-size: .62rem; text-transform: uppercase; letter-spacing: .1em; }
.ev .date .d { font-family: var(--disp); font-weight: 700; font-size: 1.5rem; }
.ev .info .t { font-family: var(--disp); font-weight: 600; font-size: 1.1rem; line-height: 1.05; }
.ev .info .t a { color: var(--ink); text-decoration: none; }
.ev .info .t a:hover { color: var(--accent-ink); }
.ev .info .w { font-size: .85rem; color: var(--muted); }

/* ---- incident statistics (app_widget: incident_stats.summary) ---- */
.stats-widget .toprow { display: flex; gap: 10px; margin-bottom: 16px; }
.stats-widget .stat { flex: 1; text-align: center; background: var(--surface-2); border-radius: 6px; padding: 10px 6px; }
.stats-widget .stat .n { font-family: var(--disp); font-weight: 700; font-size: 1.6rem; font-variant-numeric: tabular-nums; line-height: 1; }
.stats-widget .stat.fire .n { color: var(--accent-ink); }
.stats-widget .stat .l { font-family: var(--semi); text-transform: uppercase; letter-spacing: .08em; font-size: .6rem; color: var(--muted); margin-top: 4px; }
.stats-widget .chart .cap { display: flex; justify-content: space-between; align-items: baseline; margin-bottom: 8px; }
.stats-widget .chart .ttl { font-family: var(--semi); font-weight: 600; text-transform: uppercase; letter-spacing: .07em; font-size: .7rem; color: var(--muted); }
.stats-widget .chart .yr { font-family: var(--disp); font-weight: 700; color: var(--ink); }
.stats-widget .bars { display: flex; align-items: flex-end; gap: 5px; height: 120px; border-bottom: 1px solid var(--line); }
.stats-widget .bar { flex: 1; display: flex; flex-direction: column; justify-content: flex-end; align-items: center; gap: 4px; position: relative; }
.stats-widget .bar span { width: 100%; background: linear-gradient(180deg, var(--accent), var(--accent-deep)); border-radius: 3px 3px 0 0; }
.stats-widget .bar.now span { background: linear-gradient(180deg, var(--gold), #a97c17); }
.stats-widget .bar em { font-family: var(--semi); font-style: normal; font-size: .58rem; color: var(--muted); }
.stats-widget .bar b { position: absolute; top: -15px; font-family: var(--disp); font-size: .68rem; font-variant-numeric: tabular-nums; color: var(--ink); opacity: 0; transition: opacity .12s; }
.stats-widget .bar:hover b, .stats-widget .bar.now b { opacity: 1; }
.stats-widget .priors { margin-top: 16px; width: 100%; border-collapse: collapse; font-variant-numeric: tabular-nums; }
.stats-widget .priors caption { font-family: var(--semi); text-transform: uppercase; letter-spacing: .08em; font-size: .64rem; color: var(--muted); text-align: left; margin-bottom: 6px; }
.stats-widget .priors th, .stats-widget .priors td { text-align: right; padding: 5px 8px; font-size: .88rem; border-bottom: 1px solid var(--line); }
.stats-widget .priors th:first-child, .stats-widget .priors td:first-child { text-align: left; font-family: var(--disp); font-weight: 600; }
.stats-widget .priors thead th { font-family: var(--semi); font-weight: 600; font-size: .62rem; text-transform: uppercase; letter-spacing: .07em; color: var(--muted); }
.stats-widget .priors tbody tr:last-child td { border-bottom: 0; }
@media (prefers-reduced-motion: reduce) { .stats-widget .bar b { transition: none; } }

/* ---- roster grid (apparatus + personnel) ---- */
.roster-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(230px, 1fr)); gap: 18px; }
.roster-card { background: var(--surface); border: 1px solid var(--line); border-radius: 8px; overflow: hidden; box-shadow: var(--shadow); display: flex; flex-direction: column; }
.roster-card .rc-img { aspect-ratio: 16/10; background: var(--surface-2); }
.roster-card .rc-img.person { aspect-ratio: 1/1; }
.roster-card .rc-img img { width: 100%; height: 100%; object-fit: cover; }
.roster-card .rc-body { padding: 14px 16px; }
.roster-card h3 { font-size: 1.15rem; margin: 0 0 2px; }
.roster-card h3 a { color: var(--ink); text-decoration: none; }
.roster-card h3 a:hover { color: var(--accent-ink); }
.roster-card .rc-sub { font-family: var(--semi); text-transform: uppercase; letter-spacing: .06em; font-size: .7rem; color: var(--accent-ink); }
.roster-card .rc-meta { color: var(--muted); font-size: .85rem; margin-top: 4px; }
.roster-section { margin-bottom: 34px; }
.badge-retired { background: var(--surface-2); color: var(--muted); }
.spec-list { list-style: none; margin: 16px 0 0; padding: 0; display: grid; grid-template-columns: repeat(auto-fit, minmax(140px,1fr)); gap: 10px; }
.spec-list li { background: var(--paper); border: 1px solid var(--line); border-radius: 6px; padding: 8px 12px; }
.spec-list .k { font-size: .66rem; text-transform: uppercase; letter-spacing: .08em; color: var(--muted); }
.spec-list .v { font-weight: 700; }

/* ---- contact form widget ---- */
.contact-form { margin-top: 24px; border-top: 1px solid var(--line); padding-top: 20px; }
.hp-field { position: absolute; left: -9999px; width: 1px; height: 1px; overflow: hidden; }

/* ---- burn status banner (app_widget: burn_permits.status) ---- */
.burn-banner { display: flex; align-items: center; gap: 12px; padding: 14px 18px; border-radius: 8px;
    text-decoration: none; border-left: 6px solid; box-shadow: var(--shadow); }
.burn-banner-dot { width: 12px; height: 12px; border-radius: 50%; flex: none; }
.burn-banner-label { font-family: var(--disp); font-weight: 700; text-transform: uppercase; letter-spacing: .03em; font-size: 1.1rem; }
.burn-banner-sub { font-size: .85rem; opacity: .9; }
.burn-banner-until { font-size: .8rem; opacity: .8; }
.burn-open { background: #e9f6ec; border-color: #2e7d32; color: #1c5730; }
.burn-open .burn-banner-dot { background: #2e7d32; }
.burn-restricted { background: var(--amber-bg); border-color: var(--amber); color: #7a4a09; }
.burn-restricted .burn-banner-dot { background: var(--amber); }
.burn-ban { background: #fbeaea; border-color: var(--accent); color: #7a1418; }
.burn-ban .burn-banner-dot { background: var(--accent); }
@media (prefers-color-scheme: dark) {
    .burn-open { background: #16281b; color: #a9e2b8; } .burn-restricted { background: #3a2a12; color: #f0c98a; } .burn-ban { background: #2a1414; color: #f0b3b3; }
}

/* ---- printable permit ---- */
.permit-doc .permit-head { display: flex; align-items: center; gap: 16px; }
.permit-doc .permit-head .crest { width: 54px; height: 62px; }
.permit-doc .permit-no { margin-left: auto; text-align: right; font-size: .8rem; color: var(--muted); }
.permit-doc .permit-no strong { font-family: var(--disp); font-size: 1.2rem; color: var(--ink); }
@media print {
    .util, .mast, nav.primary, .site-footer, .cookie-banner, .no-print, .skip { display: none !important; }
    body { background: #fff; }
    main.container { padding: 0; }
    .card, .permit-doc { border: 0; box-shadow: none; }
}

/* FAQ accordion */
.faq-item { border-bottom: 1px solid var(--line); padding: 4px 0; }
.faq-item:last-child { border-bottom: 0; }
.faq-item > summary { cursor: pointer; font-weight: 600; padding: 10px 4px; list-style: none; display: flex; justify-content: space-between; align-items: center; gap: 12px; }
.faq-item > summary::-webkit-details-marker { display: none; }
.faq-item > summary::after { content: "+"; color: var(--accent); font-size: 1.25rem; line-height: 1; flex: none; }
.faq-item[open] > summary::after { content: "\2013"; }
.faq-item > summary:hover { color: var(--accent); }
.faq-answer { padding: 2px 4px 14px; color: var(--muted, #444); }

/* Documents list */
.doc-list { list-style: none; margin: 0; padding: 0; }
.doc-list > li { border-bottom: 1px solid var(--line); }
.doc-list > li:last-child { border-bottom: 0; }
.doc-list > li > a { display: flex; align-items: center; gap: 14px; padding: 12px 4px; color: inherit; text-decoration: none; }
.doc-list > li > a:hover { color: var(--accent); }
.doc-ext { flex: none; width: 52px; height: 40px; display: flex; align-items: center; justify-content: center; font-size: .7rem; font-weight: 700; color: #fff; background: var(--accent); border-radius: 4px; letter-spacing: .02em; }
.doc-body { display: flex; flex-direction: column; gap: 2px; flex: 1 1 auto; min-width: 0; }
.doc-body strong { color: var(--ink, inherit); }
.doc-size { flex: none; }

/* Galleries — public cards */
.gallery-cards { display: grid; grid-template-columns: repeat(auto-fill, minmax(240px, 1fr)); gap: 18px; }
.gallery-card { display: flex; flex-direction: column; border: 1px solid var(--line); border-radius: 8px; overflow: hidden; color: inherit; text-decoration: none; background: var(--card, #fff); transition: box-shadow .15s, transform .15s; }
.gallery-card:hover { box-shadow: 0 6px 20px rgba(0,0,0,.12); transform: translateY(-2px); }
.gallery-card-img { position: relative; display: block; aspect-ratio: 4 / 3; background: var(--line); }
.gallery-card-img img { width: 100%; height: 100%; object-fit: cover; display: block; }
.gallery-card-count { position: absolute; right: 8px; bottom: 8px; background: rgba(0,0,0,.65); color: #fff; font-size: .72rem; padding: 2px 8px; border-radius: 999px; }
.gallery-card-body { display: flex; flex-direction: column; gap: 3px; padding: 12px 14px; }

/* Galleries — photo grid */
.photo-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(160px, 1fr)); gap: 10px; }
.photo-thumb { display: block; aspect-ratio: 1 / 1; border-radius: 6px; overflow: hidden; background: var(--line); }
.photo-thumb img { width: 100%; height: 100%; object-fit: cover; display: block; transition: transform .2s; }
.photo-thumb:hover img { transform: scale(1.05); }

/* Galleries — CSS-only lightbox */
.lightbox { display: none; position: fixed; inset: 0; z-index: 1000; background: rgba(0,0,0,.9); padding: 24px; }
.lightbox:target { display: flex; align-items: center; justify-content: center; }
.lightbox-inner { display: flex; flex-direction: column; align-items: center; gap: 10px; max-width: 100%; max-height: 100%; }
.lightbox-inner img { max-width: 95vw; max-height: 85vh; object-fit: contain; border-radius: 4px; }
.lightbox-caption { color: #fff; font-size: .9rem; text-align: center; }
.lightbox-close { position: absolute; top: 16px; right: 24px; color: #fff; font-size: 2.4rem; line-height: 1; text-decoration: none; }

/* Galleries — admin photo manager */
.gallery-admin-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(200px, 1fr)); gap: 14px; margin-bottom: 16px; }
.gallery-admin-grid .cover-none { grid-column: 1 / -1; }
.gallery-admin-card { border: 1px solid var(--line); border-radius: 8px; padding: 8px; display: flex; flex-direction: column; gap: 6px; }
.gallery-admin-card img { width: 100%; aspect-ratio: 4 / 3; object-fit: cover; border-radius: 4px; display: block; }
.gallery-admin-meta { display: flex; align-items: center; justify-content: space-between; gap: 8px; flex-wrap: wrap; font-size: .82rem; }

/* Uploaded logo/patch (replaces the SVG crest when set) */
.crest-logo { object-fit: contain; display: block; }

/* ---- Homepage: resident dashboard (Phase 1) ---- */
/* Lead hero (single column) + optional background photo */
.hero--lead .container { grid-template-columns: 1fr; }
.hero--lead .hero-lead { max-width: 760px; }
.hero--photo { background-size: cover; background-position: center; }

/* "Can I burn today?" block */
.burn-home { margin: 0 0 30px; }
.burn-home-q { font-size: 1.45rem; margin: 0 0 12px; }

/* Quick Actions grid */
.quick-actions { display: grid; grid-template-columns: repeat(4, 1fr); gap: 16px; margin: 0 0 40px; }
.qa-tile { display: flex; flex-direction: column; align-items: center; text-align: center; gap: 7px;
    padding: 22px 14px; border: 1px solid var(--line); border-radius: 12px; background: var(--surface);
    color: var(--ink); text-decoration: none; box-shadow: var(--shadow);
    transition: transform .15s ease, box-shadow .15s ease, border-color .15s ease; }
.qa-tile:hover { transform: translateY(-3px); border-color: color-mix(in srgb, var(--accent) 40%, var(--line));
    box-shadow: inset 0 3px 0 var(--accent), 0 12px 26px -12px rgba(28,22,20,.32); }
.qa-icon { color: #4a3d39; line-height: 0; }
.qa-icon svg { width: 30px; height: 30px; }
.qa-tile:hover .qa-icon { color: var(--accent); }
.qa-label { font-family: var(--semi); font-weight: 700; font-size: 1.06rem; color: var(--ink); letter-spacing: .01em; }
.qa-sub { color: var(--muted); font-size: .84rem; }
@media (prefers-color-scheme: dark) { .qa-icon { color: #cbb9b2; } }
:root[data-theme="dark"] .qa-icon { color: #cbb9b2; }
@media (max-width: 720px) { .quick-actions { grid-template-columns: repeat(2, 1fr); } }

/* "Your Fire Department" stat strip */
.stat-strip { margin: 0 0 40px; border: 1px solid var(--line); border-radius: 14px;
    background: color-mix(in srgb, var(--accent) 5%, var(--surface)); padding: 20px 12px; }
.stat-strip-title { text-align: center; font-family: var(--semi); text-transform: uppercase; letter-spacing: .1em;
    font-size: .82rem; color: var(--muted); margin: 0 0 16px; }
.stat-strip-grid { display: flex; flex-wrap: wrap; }
.stat-tile { flex: 1 1 150px; text-align: center; padding: 4px 14px; border-right: 1px solid var(--line); }
.stat-tile:last-child { border-right: 0; }
.stat-num { display: block; font-family: var(--disp); font-weight: 700; font-size: 3rem; line-height: 1; color: var(--accent); }
.stat-label { display: block; margin-top: 6px; font-family: var(--semi); text-transform: uppercase; letter-spacing: .06em; font-size: .74rem; color: var(--muted); }
@media (max-width: 620px) { .stat-tile { flex-basis: 45%; border-right: 0; margin-bottom: 12px; } }

/* ---- About page (Phase 3) ---- */
.anniv-band { display: flex; flex-direction: column; align-items: center; gap: 2px; text-align: center;
    padding: 22px 18px; margin: 0 0 26px; border-radius: 10px; color: #fff;
    background: linear-gradient(135deg, var(--accent), color-mix(in srgb, var(--accent) 60%, #000)); }
.anniv-years { font-family: var(--disp); font-weight: 700; font-size: 2.4rem; line-height: 1; letter-spacing: .02em; }
.anniv-text { font-family: var(--semi); text-transform: uppercase; letter-spacing: .08em; font-size: .84rem; opacity: .92; }

.about-cards { display: grid; grid-template-columns: repeat(auto-fit, minmax(260px, 1fr)); gap: 16px; margin: 0 0 26px; }
.about-card { display: flex; align-items: center; gap: 14px; padding: 18px 20px; border: 1px solid var(--line);
    border-radius: 10px; background: var(--card, #fff); color: inherit; text-decoration: none; transition: transform .15s, box-shadow .15s, border-color .15s; }
.about-card:hover { transform: translateY(-3px); box-shadow: 0 8px 22px rgba(0,0,0,.12); border-color: var(--accent); }
.about-card-icon { font-size: 2rem; line-height: 1; flex: none; }
.about-card strong { display: block; }
.about-card .small { display: block; }

.timeline { list-style: none; margin: 6px 0 0; padding: 0; }
.timeline li { display: flex; gap: 16px; padding: 0 0 18px 4px; position: relative; }
.timeline li::before { content: ""; position: absolute; left: 54px; top: 6px; bottom: -6px; width: 2px; background: var(--line); }
.timeline li:last-child { padding-bottom: 0; }
.timeline li:last-child::before { display: none; }
.tl-year { flex: none; width: 52px; text-align: right; font-family: var(--disp); font-weight: 700; color: var(--accent); position: relative; z-index: 1; }
.tl-year::after { content: ""; position: absolute; right: -9px; top: 6px; width: 12px; height: 12px; border-radius: 50%; background: var(--accent); border: 2px solid var(--card, #fff); }
.tl-event { padding-left: 16px; }

.join-cta { text-align: center; padding: 30px 22px; margin: 26px 0 0; border-radius: 10px;
    background: color-mix(in srgb, var(--accent) 6%, var(--card, #fff)); border: 1px solid var(--line); }
.join-cta h2 { margin: 0 0 8px; }
.join-cta p { max-width: 52ch; margin: 0 auto 16px; color: var(--muted, #556); }

/* Homepage seasonal safety card (FirePrevention 'seasonal' widget) */
.safety-home { margin: 0 0 34px; }
.safety-home-title { font-size: 1.45rem; margin: 0 0 12px; }
.safety-card { display: flex; align-items: center; gap: 16px; padding: 18px 20px; border: 1px solid var(--line);
    border-radius: 10px; background: color-mix(in srgb, var(--accent) 5%, var(--card, #fff));
    color: inherit; text-decoration: none; transition: transform .15s, box-shadow .15s, border-color .15s; }
.safety-card:hover { transform: translateY(-2px); box-shadow: 0 8px 22px rgba(0,0,0,.12); border-color: var(--accent); }
.safety-icon { font-size: 2rem; line-height: 1; flex: none; }
.safety-body { display: flex; flex-direction: column; gap: 2px; flex: 1 1 auto; min-width: 0; }
.safety-eyebrow { font-family: var(--semi); text-transform: uppercase; letter-spacing: .06em; font-size: .72rem; color: var(--accent); }
.safety-cta { flex: none; font-family: var(--semi); color: var(--accent); white-space: nowrap; }
@media (max-width: 560px) { .safety-cta { display: none; } }

/* ---- Recruitment page (Phase 7) ---- */
.recruit-hero { text-align: center; padding: 34px 22px; margin: 0 0 26px; border-radius: 10px; color: #fff;
    background: linear-gradient(135deg, var(--accent), color-mix(in srgb, var(--accent) 60%, #000)); }
.recruit-hero .eyebrow { color: var(--gold, #f0c040); }
.recruit-hero h1 { color: #fff; margin: 8px 0 12px; }
.recruit-hero .lede { color: rgba(255,255,255,.92); max-width: 60ch; margin: 0 auto 18px; }
.recruit-cols { display: grid; grid-template-columns: repeat(auto-fit, minmax(280px, 1fr)); gap: 16px; margin: 0 0 22px; }
.recruit-steps { list-style: none; margin: 6px 0 0; padding: 0; }
.recruit-steps li { display: flex; gap: 14px; align-items: flex-start; padding: 0 0 14px; }
.recruit-steps li:last-child { padding-bottom: 0; }
.step-n { flex: none; width: 30px; height: 30px; border-radius: 50%; display: flex; align-items: center; justify-content: center;
    background: var(--accent); color: #fff; font-family: var(--disp); font-weight: 700; }
.recruit-form { margin-top: 6px; text-align: left; }
.recruit-hero--photo { background-size: cover; background-position: center; padding: 60px 22px; }
.admin-slot-note { margin: 14px 0 0; font-size: .82rem; color: rgba(255,255,255,.85);
    background: rgba(0,0,0,.28); border: 1px dashed rgba(255,255,255,.4); border-radius: 6px; padding: 8px 12px; display: inline-block; }

/* "Answer the Call" photo feature */
.recruit-feature { display: grid; grid-template-columns: 1fr 1fr; gap: 0; margin: 0 0 22px; border: 1px solid var(--line);
    border-radius: 12px; overflow: hidden; background: var(--surface); box-shadow: var(--shadow); }
.recruit-feature-media { min-height: 260px; }
.recruit-feature-media img { width: 100%; height: 100%; object-fit: cover; display: block; }
.recruit-feature-body { padding: 30px 34px; display: flex; flex-direction: column; align-items: flex-start; gap: 12px; justify-content: center; }
.recruit-feature-body h2 { margin: 0; }
.recruit-feature-body p { margin: 0; color: var(--muted); }
@media (max-width: 720px) { .recruit-feature { grid-template-columns: 1fr; } .recruit-feature-media { min-height: 200px; } }

/* Empty photo slot placeholder */
.photo-placeholder { width: 100%; height: 100%; min-height: 200px; display: flex; flex-direction: column; align-items: center;
    justify-content: center; gap: 10px; text-align: center; padding: 20px; color: color-mix(in srgb, var(--accent) 55%, var(--muted));
    background: repeating-linear-gradient(-45deg, color-mix(in srgb, var(--accent) 7%, var(--surface)) 0 12px, var(--surface) 12px 24px);
    border: 2px dashed color-mix(in srgb, var(--accent) 30%, var(--line)); }
.photo-placeholder span { font-size: .84rem; max-width: 22ch; color: var(--muted); }

/* Apparatus primary role ("what it does", led with over specs) */
.rc-role { font-family: var(--semi); font-weight: 600; color: var(--accent); font-size: .9rem; margin: 2px 0 2px; }
.apparatus-role { display: flex; flex-direction: column; gap: 2px; padding: 12px 14px; margin: 6px 0 18px;
    border-left: 3px solid var(--accent); background: color-mix(in srgb, var(--accent) 6%, transparent); border-radius: 4px; }
.apparatus-role .k { font-family: var(--semi); text-transform: uppercase; letter-spacing: .06em; font-size: .72rem; color: var(--accent); }
.apparatus-role .v { font-size: 1.1rem; font-weight: 600; }

/* ---- Site-wide alert banner (admin-controlled) ---- */
.site-alert { color: #fff; font-family: var(--semi); }
.site-alert-inner { display: flex; align-items: center; justify-content: space-between; gap: 14px; padding: 11px 20px; }
.site-alert-msg { flex: 1 1 auto; }
.site-alert-msg a { color: #fff; text-decoration: underline; font-weight: 700; white-space: nowrap; }
.site-alert-close { flex: none; background: transparent; border: 0; color: #fff; font-size: 1.5rem; line-height: 1; cursor: pointer; opacity: .8; padding: 0 4px; }
.site-alert-close:hover { opacity: 1; }
.site-alert-info    { background: #1f5f9e; }
.site-alert-warning { background: #9a6a10; }
.site-alert-danger  { background: var(--accent); }

/* Galleries: featured-video badge on cards */
.gallery-card-video { position: absolute; left: 8px; bottom: 8px; width: 26px; height: 26px; display: flex;
    align-items: center; justify-content: center; background: var(--accent); color: #fff; border-radius: 50%; font-size: .7rem; }

/* ---- Homepage refinements (hero photo + lower sections) ---- */
/* Right-side hero photograph with a diagonal edge echoing the stripe pattern */
.hero .container { z-index: 2; }
.hero-media { position: absolute; top: 0; right: 0; bottom: 0; width: 60%; z-index: 1;
    background-size: cover; background-position: center; }
.hero--photo .hero-media { clip-path: polygon(22% 0, 100% 0, 100% 100%, 0 100%); }
.hero-media::after { content: ""; position: absolute; inset: 0;
    background: linear-gradient(100deg, #241a18 0%, rgba(36,26,24,.92) 26%, rgba(36,26,24,.25) 62%, rgba(36,26,24,0) 100%); }
.hero--photo .hero-lead { max-width: 600px; }
@media (max-width: 820px) { .hero-media { display: none; } }

/* Latest from HTFD — three columns */
.home-latest { margin: 4px 0 42px; }
.latest-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 22px; align-items: start; }
.latest-h { font-family: var(--semi); text-transform: uppercase; letter-spacing: .07em; font-size: .76rem; color: var(--accent-ink); margin: 0 0 12px; }
.latest-more { margin: 10px 0 0; }
.latest-more a { font-family: var(--semi); font-weight: 600; }
@media (max-width: 820px) { .latest-grid { grid-template-columns: 1fr; } }

/* "Serving since" heritage feature */
.home-feature { display: grid; grid-template-columns: 1fr 1.25fr; margin: 0 0 42px; border: 1px solid var(--line);
    border-radius: 14px; overflow: hidden; background: var(--surface); box-shadow: var(--shadow); }
.feature-media { position: relative; min-height: 230px; display: flex; align-items: center; justify-content: center;
    background: linear-gradient(135deg, var(--accent), color-mix(in srgb, var(--accent) 52%, #000)); }
.feature-crest { width: 92px; height: 108px; }
.feature-badge { position: absolute; bottom: 16px; font-family: var(--disp); font-weight: 700; font-size: 1.15rem; letter-spacing: .05em; color: var(--gold); }
.feature-body { padding: 30px 34px; display: flex; flex-direction: column; align-items: flex-start; gap: 14px; justify-content: center; }
.feature-body h2 { margin: 0; }
.feature-body p { color: var(--muted); margin: 0; max-width: 54ch; }
@media (max-width: 720px) { .home-feature { grid-template-columns: 1fr; } .feature-media { min-height: 150px; } }

/* "Answer the Call" recruitment band */
.home-recruit { display: flex; align-items: center; justify-content: space-between; gap: 22px; flex-wrap: wrap;
    margin: 0 0 8px; padding: 28px 32px; border-radius: 14px; color: #fff;
    background: linear-gradient(135deg, color-mix(in srgb, var(--accent) 90%, #000), color-mix(in srgb, var(--accent) 52%, #000)); }
.home-recruit-text h2 { color: #fff; margin: 0 0 6px; }
.home-recruit-text p { color: rgba(255,255,255,.92); margin: 0; }
.home-recruit .btn-primary { background: #fff; color: var(--accent); flex: none; }
.home-recruit .btn-primary:hover { background: var(--gold); color: #241a18; }
@media (max-width: 620px) { .home-recruit { flex-direction: column; align-items: flex-start; } }

/* Personnel admin: photo thumbnail + drag-to-reorder */
.pers-thumb { width: 42px; height: 42px; object-fit: cover; border-radius: 6px; display: block; background: var(--surface-2); }
.pers-thumb-empty { border: 1px dashed var(--line); }
.personnel-table tr.dragging { opacity: .45; }
.personnel-table td.drag-cell { cursor: grab; color: var(--muted); font-size: 1.15rem; width: 26px; text-align: center; user-select: none; }
.personnel-table tr[draggable="true"] { cursor: default; }
.reorder-status { color: var(--accent-ink); font-weight: 600; }

/* Homepage heritage feature: photo variant (About photo replaces the crest block) */
.feature-media--photo { background-size: cover; background-position: center; }
.feature-media--photo .feature-badge { text-shadow: 0 1px 4px rgba(0,0,0,.7); }
