/* Town websites by The Domain Dojo (functions/src/sites/render.ts), starting with the Pine Hollow sample.
   After changing anything in this folder, bump ASSET_VERSION in render.ts (test/town-site.test.ts checks),
   so browsers drop their cached copy (it's cached for 5 minutes otherwise). */
:root {
  color-scheme: light;
  --bg: #fbfaf7;
  --fg: #1c2420;
  --muted: #4f5b55;
  --line: #dcdfd8;
  --card: #fff;
  --green: #1f4d3a;
  --green-2: #2c6a50;
  --link: #1d5c43;
  --link-hover: #123b2b;
  --gold: #c8962e;
  --soft: #eef4ef;
  --notice: #fff7e6;
  --notice-line: #e7c77d;
  --town-sub: #d6e6dc;
  --footer-bg: #17221d;
  --footer-fg: #cfd8d2;
  --footer-line: #2c3a33;
  --footer-legal: #a9b6ae;
  --heading-font: inherit;
}
/* The looks a town picks (sites.theme; sites/samples.ts). Names keep the original "green" for the
   main color. Contrast checked: white on --green and --green-2, --link and --muted on --bg, and
   --town-sub on both bars all pass 4.5:1; in Lake and Prairie --gold on --green-2 passes 3:1 (in Pine the
   current page is also bold). test/town-site.test.ts checks. */
[data-theme="lake"] {
  --bg: #f8fafc;
  --fg: #17212b;
  --muted: #4b5866;
  --line: #d6dde5;
  --green: #173a5e;
  --green-2: #1f4f7d;
  --link: #1b4f82;
  --link-hover: #0f3050;
  --gold: #8fd0f0;
  --soft: #e8f1f8;
  --town-sub: #cfe1f1;
  --footer-bg: #101b27;
  --footer-fg: #ccd6e0;
  --footer-line: #26364a;
  --footer-legal: #a1b0bf;
}
[data-theme="prairie"] {
  --bg: #fcfaf6;
  --fg: #241c17;
  --muted: #5b5048;
  --line: #e3dccf;
  --green: #6b1d18;
  --green-2: #862a21;
  --link: #8a2b22;
  --link-hover: #5a1712;
  --gold: #e7bd63;
  --soft: #f6eee2;
  --town-sub: #f2dcd2;
  --footer-bg: #2a1613;
  --footer-fg: #e2d3cc;
  --footer-line: #452823;
  --footer-legal: #c0aaa2;
  --heading-font: Georgia, "Times New Roman", serif;
}
* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body { margin: 0; background: var(--bg); color: var(--fg); overflow-wrap: break-word; font: 18px/1.6 system-ui, -apple-system, "Segoe UI", Roboto, sans-serif; }
a { color: var(--link); text-underline-offset: 3px; }
a:hover { color: var(--link-hover); }
/* Focus: dark ring on light areas, white ring on the dark bars (3:1 or better against either, WCAG 1.4.11). */
:focus-visible { outline: 3px solid #10151a; outline-offset: 2px; }
.sample-bar :focus-visible, .masthead :focus-visible, nav.site :focus-visible, footer.site :focus-visible { outline-color: #fff; }
/* Read by screen readers, not shown. */
.vh { position: absolute !important; width: 1px; height: 1px; padding: 0; margin: -1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; border: 0; }
h1, h2, h3, .town-name { font-family: var(--heading-font); }
h1, h2, h3 { line-height: 1.25; letter-spacing: -.01em; }
h1 { font-size: 2.1rem; margin: 0 0 .4em; }
h2 { font-size: 1.45rem; margin: 1.6em 0 .5em; }
h3 { font-size: 1.12rem; margin: 1.2em 0 .3em; }
.wrap { max-width: 1080px; margin: 0 auto; padding: 0 20px; }
.skip { position: absolute; left: -9999px; top: 0; background: #fff; color: var(--fg); padding: 10px 16px; z-index: 50; }
.skip:focus { left: 12px; top: 12px; }

/* Sample notice from The Domain Dojo */
.sample-bar { background: #10151a; color: #e9ecef; font-size: 15px; line-height: 1.45; }
.sample-bar .wrap { display: flex; flex-wrap: wrap; gap: 6px 18px; align-items: center; justify-content: space-between; padding-top: 9px; padding-bottom: 9px; }
.sample-bar a { color: #fff; font-weight: 600; }
.sample-bar strong { color: #ffd88a; }
.sample-bar p { margin: 0; }
.sample-bar.demo { background: #3b2a06; }
.alert-bar { background: var(--notice); border-bottom: 2px solid var(--notice-line); }
.alert-bar p { margin: 0; padding: 12px 0; }
.chip { display: inline-block; font-size: 13px; font-weight: 700; text-transform: uppercase; letter-spacing: .04em; background: #f6e3e1; color: #8a1c12; border-radius: 4px; padding: 1px 6px; vertical-align: 2px; }
.doc-text { white-space: pre-wrap; margin: 0 0 1em; }
.years { display: flex; flex-wrap: wrap; gap: 8px; margin: 0 0 14px; }
.years a, .years span { padding: 4px 12px; border: 1px solid var(--line); border-radius: 999px; text-decoration: none; background: var(--card); }
.years span { background: var(--green); color: #fff; border-color: var(--green); font-weight: 600; }

/* Town header */
.masthead { background: var(--green); color: #fff; }
.masthead .wrap { display: flex; align-items: center; gap: 16px; padding-top: 18px; padding-bottom: 18px; }
.seal { width: 64px; height: 64px; flex: none; }
.town-name { margin: 0; font-size: 1.6rem; font-weight: 700; line-height: 1.15; }
.town-name a { color: #fff; text-decoration: none; }
.town-sub { margin: 2px 0 0; color: var(--town-sub); font-size: 15px; }
nav.site { background: var(--green-2); }
nav.site ul { list-style: none; margin: 0 auto; padding: 0 12px; max-width: 1080px; display: flex; flex-wrap: wrap; }
nav.site a { display: block; color: #fff; text-decoration: none; padding: 11px 12px; font-size: 16px; font-weight: 500; border-bottom: 3px solid transparent; }
nav.site a:hover { background: rgba(255, 255, 255, .1); color: #fff; }
nav.site a[aria-current="page"] { border-bottom-color: var(--gold); font-weight: 700; }
.sample-bar .short { display: none; }
/* Phones: one "Menu" row instead of a wrapped link list */
nav.site .menu { display: none; }
nav.site .menu summary { display: flex; align-items: center; gap: 10px; padding: 12px 16px; color: #fff; font-weight: 600; cursor: pointer; list-style: none; }
nav.site .menu summary::-webkit-details-marker { display: none; }
nav.site .menu summary::before { content: ""; width: 18px; height: 12px; border-top: 2px solid #fff; border-bottom: 2px solid #fff; background: linear-gradient(#fff, #fff) center / 100% 2px no-repeat; }
nav.site .menu .here { margin-left: auto; font-weight: 400; color: var(--town-sub); font-size: 15px; }
nav.site .menu ul { display: block; padding: 0 0 8px; border-top: 1px solid rgba(255, 255, 255, .15); }
nav.site .menu a { padding: 12px 16px; border-bottom: 0; border-left: 4px solid transparent; }
nav.site .menu a[aria-current="page"] { border-left-color: var(--gold); }

main { padding: 28px 0 56px; }
main > .hero:first-child { margin-top: -28px; }
.lead { font-size: 1.12rem; color: var(--muted); margin-top: 0; max-width: 46em; }
.crumb { font-size: 15px; color: var(--muted); margin: 0 0 8px; }
.updated { font-size: 15px; color: var(--muted); }

/* Home */
.hero { background: linear-gradient(180deg, var(--soft), var(--bg)); border-bottom: 1px solid var(--line); }
.hero .wrap { padding-top: 34px; padding-bottom: 30px; }
.hero h1 { font-size: 2.3rem; }
.quick { list-style: none; padding: 0; margin: 22px 0 0; display: grid; grid-template-columns: repeat(auto-fit, minmax(min(100%, 10em), 1fr)); gap: 12px; }
.quick a { display: flex; align-items: center; gap: 10px; min-height: 64px; padding: 12px 16px; background: var(--card); border: 1px solid var(--line); border-radius: 10px; text-decoration: none; color: var(--fg); font-weight: 600; box-shadow: 0 1px 2px rgba(0, 0, 0, .04); }
.quick a:hover { border-color: var(--green-2); color: var(--link-hover); }
.quick svg { width: 26px; height: 26px; flex: none; color: var(--green-2); }

.cols { display: grid; grid-template-columns: 2fr 1fr; gap: 28px; }
.box { background: var(--card); border: 1px solid var(--line); border-radius: 12px; padding: 20px 22px; margin: 0 0 22px; }
.box > h2:first-child, .box > h3:first-child { margin-top: 0; }
.box.alert { background: var(--notice); border-color: var(--notice-line); }
.notices { list-style: none; margin: 0; padding: 0; }
.notices li { padding: 14px 0; border-top: 1px solid var(--line); }
.notices li:first-child { border-top: 0; padding-top: 0; }
.notices .date { display: block; font-size: 15px; color: var(--muted); }
.notices .title { font-weight: 600; }
.notices p { margin: 4px 0 0; }
dl.hours { display: grid; grid-template-columns: fit-content(50%) minmax(0, 1fr); gap: 4px 14px; margin: 0; }
dl.hours dt { font-weight: 600; }
dl.hours dd { margin: 0; }

/* People */
.people { display: grid; grid-template-columns: repeat(auto-fill, minmax(min(100%, 14em), 1fr)); gap: 16px; margin: 0; padding: 0; list-style: none; }
.people li { background: var(--card); border: 1px solid var(--line); border-radius: 12px; padding: 16px 18px; }
.people .role { display: block; font-size: 15px; color: var(--muted); }
.people .name { display: block; font-weight: 700; font-size: 1.05rem; }
.people .term { display: block; font-size: 15px; color: var(--muted); }

/* Tables */
.table-wrap { overflow-x: auto; }
.table-wrap:focus-visible { outline-offset: 4px; }
.cols > * { min-width: 0; }
table { width: 100%; border-collapse: collapse; background: var(--card); border: 1px solid var(--line); border-radius: 12px; font-size: 17px; }
caption { text-align: left; font-weight: 600; padding: 0 0 8px; }
th, td { text-align: left; padding: 11px 14px; border-bottom: 1px solid var(--line); vertical-align: top; }
thead th { background: var(--soft); font-size: 15px; text-transform: uppercase; letter-spacing: .04em; color: var(--muted); }
tbody tr:last-child td, tbody tr:last-child th { border-bottom: 0; }
tbody th { font-weight: 600; }

/* Agenda document */
.doc { background: var(--card); border: 1px solid var(--line); border-radius: 12px; padding: 28px 30px; max-width: 760px; }
.doc header { text-align: center; border-bottom: 1px solid var(--line); padding-bottom: 14px; margin-bottom: 18px; }
.doc header p { margin: 2px 0; }
.doc ol { padding-left: 1.4em; }
.doc ol li { margin: 0 0 .6em; }
.doc ol ol { list-style: lower-alpha; margin-top: .4em; }
.btn { display: inline-block; background: var(--green); color: #fff; text-decoration: none; font-weight: 600; padding: 10px 18px; border-radius: 8px; }
.btn:hover { background: var(--link-hover); color: #fff; }
.fine { font-size: 15px; color: var(--muted); }

/* Footer */
footer.site { background: var(--footer-bg); color: var(--footer-fg); font-size: 16px; }
footer.site .wrap { display: grid; grid-template-columns: repeat(auto-fit, minmax(min(100%, 13em), 1fr)); gap: 20px 32px; padding-top: 30px; padding-bottom: 30px; }
footer.site h2 { color: #fff; font-size: 1rem; margin: 0 0 6px; }
footer.site p { margin: 0 0 4px; }
footer.site a { color: #fff; }
footer.site .legal { grid-column: 1 / -1; border-top: 1px solid var(--footer-line); padding-top: 14px; font-size: 14px; color: var(--footer-legal); }

@media (max-width: 760px) {
  body { font-size: 17px; }
  .wrap { padding: 0 16px; }
  .cols { grid-template-columns: 1fr; gap: 0; }
  h1, .hero h1 { font-size: 1.75rem; }
  .masthead .wrap { padding-top: 14px; padding-bottom: 14px; }
  .seal { width: 52px; height: 52px; }
  .town-name { font-size: 1.3rem; }
  nav.site ul.wide { display: none; }
  nav.site .menu { display: block; }
  .sample-bar { font-size: 14px; }
  .sample-bar .long { display: none; }
  .sample-bar .short { display: inline; }
  .sample-bar .wrap { padding-top: 7px; padding-bottom: 7px; }
  .doc { padding: 20px 18px; }
  th, td { padding: 9px 10px; }
}
@media print {
  .sample-bar, nav.site, .skip, footer.site { display: none; }
  .masthead { background: none; color: #000; }
  .town-name a { color: #000; }
}
