/* Chester Sharing Exchange: styles shared by every page. */
  :root {
    --band: #5f8f47;          /* top green band */
    --green: #3f5a34;         /* headings, buttons */
    --green-dark: #2f4527;
    --sage: #dde3d3;          /* category boxes */
    --tan: #e4dccb;           /* wide box */
    --cream: #f4f1ea;         /* page background */
    --card: #ffffff;
    --ink: #2e3328;
    --muted: #5f6657;
    --line: #d6d0c2;
    --accent: #b5652b;        /* event dots, highlights */
    --radius: 10px;
  }
  * { box-sizing: border-box; }
  html { scroll-behavior: smooth; }
  body {
    margin: 0; background: var(--cream); color: var(--ink);
    font-family: "Source Sans 3", system-ui, sans-serif; font-size: 18px; line-height: 1.55;
  }
  h1, h2, h3 { font-family: "Lora", Georgia, serif; color: var(--green); line-height: 1.2; margin: 0 0 .5em; }
  a { color: var(--green); }
  img { max-width: 100%; display: block; }
  .wrap { max-width: 1100px; margin: 0 auto; padding: 0 16px; }
  section { padding: 56px 0; scroll-margin-top: 70px; }
  section + section { border-top: 1px solid var(--line); }
  .lead { font-size: 1.15rem; color: var(--muted); max-width: 46rem; }
  .center { text-align: center; }
  .center .lead { margin-left: auto; margin-right: auto; }

  /* ---------- Header ---------- */
  .band { height: 72px; background: var(--band); display: flex; align-items: center; }
  .band .wrap { display: flex; justify-content: space-between; align-items: center; width: 100%; gap: 12px; }
  .social { display: flex; gap: 10px; }
  .social a { display: grid; place-items: center; width: 38px; height: 38px; border-radius: 50%; background: rgba(255,255,255,.18); color: #fff; }
  .social a:hover { background: rgba(255,255,255,.32); }
  .social svg { width: 20px; height: 20px; fill: currentColor; }
  .search { position: relative; }
  .search input {
    width: 230px; padding: 8px 12px 8px 36px; border-radius: 999px; border: none;
    font: inherit; font-size: 16px; background: rgba(255,255,255,.92);
  }
  .search svg { position: absolute; left: 11px; top: 50%; transform: translateY(-50%); width: 17px; height: 17px; fill: var(--muted); }
  .search-results {
    position: absolute; right: 0; top: calc(100% + 6px); width: 320px; max-width: 86vw; z-index: 20;
    background: var(--card); border: 1px solid var(--line); border-radius: var(--radius); box-shadow: 0 8px 24px rgba(0,0,0,.12);
    padding: 6px; display: none;
  }
  .search-results.open { display: block; }
  .search-results a { display: block; padding: 8px 10px; border-radius: 6px; text-decoration: none; color: var(--ink); font-size: 16px; }
  .search-results a:hover { background: var(--sage); }
  .search-results small { color: var(--muted); display: block; }

  .masthead { text-align: center; padding: 28px 0 10px; }
  .masthead h1 { font-size: clamp(1.7rem, 5vw, 2.8rem); letter-spacing: .06em; margin: 0; }
  .masthead .tagline { color: var(--muted); margin: 4px 0 0; font-size: 1.05rem; }

  nav.main { position: sticky; top: 0; z-index: 10; background: var(--cream); border-bottom: 1px solid var(--line); }
  nav.main ul { list-style: none; margin: 0; padding: 10px 0; display: flex; justify-content: center; flex-wrap: wrap; gap: 4px 26px; }
  nav.main a { text-decoration: none; color: var(--ink); font-weight: 600; font-size: 17px; padding: 4px 0; border-bottom: 2px solid transparent; }
  nav.main a:hover { border-color: var(--band); }

  /* ---------- Photo strip ---------- */
  .photos { display: grid; grid-template-columns: repeat(4, 1fr); gap: 14px; padding-top: 26px; }
  .photos figure { margin: 0; }
  .photos img { width: 100%; aspect-ratio: 4/3; object-fit: cover; border-radius: var(--radius); }
  .photos figcaption { text-align: center; font-weight: 600; margin-top: 8px; color: var(--green); }

  /* ---------- Mission / categories ---------- */
  .cats { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; margin-top: 28px; }
  .cat { background: var(--sage); border-radius: var(--radius); padding: 18px 20px; }
  .cat h3 { font-family: "Source Sans 3", sans-serif; text-transform: uppercase; letter-spacing: .04em; font-size: 1.05rem; color: var(--green-dark); margin: 0 0 2px; }
  .cat p { margin: 0; color: var(--muted); }
  .cat.wide { grid-column: 1 / -1; background: var(--tan); }

  /* ---------- Events + calendar ---------- */
  .events-grid { display: grid; grid-template-columns: 1fr 1.25fr; gap: 28px; align-items: start; }
  .event-list { display: flex; flex-direction: column; gap: 12px; }
  .event {
    display: flex; gap: 14px; background: var(--card); border: 1px solid var(--line); border-radius: var(--radius); padding: 14px;
  }
  .event .date { flex: none; width: 58px; text-align: center; background: var(--sage); border-radius: 8px; padding: 6px 0; color: var(--green-dark); }
  .event .date b { display: block; font-size: 1.5rem; line-height: 1; font-family: "Lora", serif; }
  .event .date span { font-size: .8rem; text-transform: uppercase; font-weight: 700; }
  .event h3 { font-size: 1.08rem; margin: 0 0 2px; }
  .event p { margin: 0; font-size: 16px; color: var(--muted); }
  .tag { display: inline-block; font-size: 13px; font-weight: 700; padding: 1px 8px; border-radius: 999px; background: var(--tan); color: var(--green-dark); margin-top: 4px; }

  .calendar { background: var(--card); border: 1px solid var(--line); border-radius: var(--radius); padding: 16px; }
  .cal-head { display: flex; justify-content: space-between; align-items: center; margin-bottom: 10px; }
  .cal-head h3 { margin: 0; font-size: 1.25rem; }
  .cal-head button { background: none; border: 1px solid var(--line); border-radius: 8px; width: 36px; height: 36px; cursor: pointer; font-size: 18px; color: var(--green); }
  .cal-grid { display: grid; grid-template-columns: repeat(7, minmax(0, 1fr)); gap: 4px; }
  .cal-grid .dow { text-align: center; font-size: 13px; font-weight: 700; color: var(--muted); padding: 4px 0; }
  .cal-grid .day {
    min-height: 64px; border-radius: 6px; background: var(--cream); padding: 4px 5px; font-size: 14px; cursor: default; position: relative;
  }
  .cal-grid .day.empty { background: transparent; }
  .cal-grid .day.today { outline: 2px solid var(--band); }
  .cal-grid .day.has { cursor: pointer; background: #eef2e7; }
  .cal-grid .day .ev { display: block; margin-top: 3px; font-size: 12px; line-height: 1.25; background: var(--green); color: #fff; border-radius: 4px; padding: 1px 4px; overflow: hidden; white-space: nowrap; text-overflow: ellipsis; }
  .cal-detail { margin-top: 12px; font-size: 16px; color: var(--muted); min-height: 1.5em; }

  /* ---------- Forms ---------- */
  .two-col { display: grid; grid-template-columns: 1fr 1fr; gap: 28px; }
  .panel { background: var(--card); border: 1px solid var(--line); border-radius: var(--radius); padding: 24px; }
  form .row { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }
  label { display: block; font-weight: 600; font-size: 16px; margin: 12px 0 4px; }
  input, textarea, select {
    width: 100%; font: inherit; font-size: 16px; padding: 10px 12px; border: 1px solid var(--line); border-radius: 8px; background: #fff; color: var(--ink);
  }
  textarea { min-height: 90px; resize: vertical; }
  input:focus, textarea:focus, select:focus { outline: 2px solid var(--band); border-color: transparent; }
  .checks { display: flex; flex-wrap: wrap; gap: 6px 18px; margin-top: 8px; }
  .checks label { display: flex; gap: 6px; align-items: center; font-weight: 400; margin: 0; }
  .checks input { width: auto; }
  .btn {
    display: inline-block; margin-top: 16px; background: var(--green); color: #fff; border: none; border-radius: 999px;
    padding: 11px 24px; font: inherit; font-weight: 700; cursor: pointer; text-decoration: none;
  }
  .btn:hover { background: var(--green-dark); }
  .btn.ghost { background: transparent; color: var(--green); border: 2px solid var(--green); }
  .note { font-size: 15px; color: var(--muted); margin-top: 10px; }
  .ok { margin-top: 12px; padding: 10px 14px; background: var(--sage); border-radius: 8px; display: none; }
  .ok.show { display: block; }

  /* ---------- Share photos ---------- */
  .drop {
    border: 2px dashed var(--line); border-radius: var(--radius); padding: 28px; text-align: center; background: var(--card); cursor: pointer;
  }
  .drop:hover, .drop.over { border-color: var(--band); background: #f8faf4; }
  .gallery { display: grid; grid-template-columns: repeat(auto-fill, minmax(150px, 1fr)); gap: 10px; margin-top: 16px; }
  .gallery img, .gallery video { width: 100%; aspect-ratio: 1; object-fit: cover; border-radius: 8px; }

  /* ---------- Donate ---------- */
  .amounts { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 12px; }
  .amounts button {
    font: inherit; font-weight: 700; padding: 9px 18px; border-radius: 999px; border: 2px solid var(--green); background: #fff; color: var(--green); cursor: pointer;
  }
  .amounts button.on { background: var(--green); color: #fff; }

  /* ---------- Town Talk ---------- */
  .post-list { display: flex; flex-direction: column; gap: 12px; }
  .post { background: var(--card); border: 1px solid var(--line); border-radius: var(--radius); padding: 14px 16px; }
  .post .meta { font-size: 15px; color: var(--muted); }
  .post p { margin: 6px 0 8px; }
  .post .actions button { font: inherit; font-size: 15px; background: none; border: none; color: var(--green); font-weight: 700; cursor: pointer; padding: 0; margin-right: 16px; }
  .reply { margin-top: 10px; padding: 10px 12px; border-left: 3px solid var(--sage); background: var(--cream); border-radius: 0 8px 8px 0; font-size: 16px; }
  .reply.context { border-left-color: var(--accent); }
  .reply .label { font-size: 13px; font-weight: 700; text-transform: uppercase; color: var(--accent); letter-spacing: .03em; }
  .reply-form { margin-top: 10px; display: none; }
  .reply-form.open { display: block; }
  .reply-form textarea { min-height: 70px; }
  .pledge { padding-left: 20px; margin: 0; font-size: 16px; }
  .pledge li { margin-bottom: 8px; }
  .log { font-size: 15px; display: flex; flex-direction: column; gap: 8px; color: var(--muted); }
  .log div { background: var(--cream); padding: 8px 10px; border-radius: 6px; }

  .ok.err { background: #f6dcd3; }
  .removed { color: var(--muted); font-style: italic; }
  .held { color: #6b4a12; background: #f6ecd2; border-radius: 6px; padding: 6px 10px; font-size: 16px; }
  .gallery figure { margin: 0; }
  .gallery figcaption { font-size: 14px; color: var(--muted); margin-top: 4px; line-height: 1.35; }
  .gallery .ph { width: 100%; aspect-ratio: 1; border-radius: 8px; background: var(--sage); display: grid; place-items: center; text-align: center; padding: 10px; font-size: 14px; color: var(--muted); }
  .gallery .ph.busy { background: #eef2e7; }
  button.del { font: inherit; font-size: 14px; background: none; border: none; color: var(--muted); text-decoration: underline; cursor: pointer; padding: 0; }
  button.del:hover { color: #a3412a; }
  .notice { background: #fff8e6; border-bottom: 2px solid #d9b44a; padding: 14px 16px; }
  .notice .wrap { display: flex; gap: 14px; align-items: flex-start; justify-content: space-between; flex-wrap: wrap; }
  .notice h3 { margin: 0 0 4px; font-size: 1.1rem; }
  .notice pre { margin: 0; white-space: pre-wrap; font: inherit; font-size: 16px; }
  .testbar { background: #f6e7b8; color: #5a4a12; text-align: center; font-size: 15px; font-weight: 600; padding: 6px 16px; }

  /* ---------- Residency badges ---------- */
  .badge {
    display: inline-flex; align-items: center; gap: 4px; font-size: 13px; font-weight: 700; line-height: 1;
    padding: 3px 8px 3px 5px; border-radius: 999px; vertical-align: middle; white-space: nowrap;
  }
  .badge svg { width: 14px; height: 14px; fill: currentColor; flex: none; }
  .badge.full    { background: #3f5a34; color: #fff; }
  .badge.part    { background: #dbe7cf; color: #2f4527; box-shadow: inset 0 0 0 1.5px #3f5a34; }
  .badge.local   { background: #e9dcc6; color: #6b4520; }
  .badge.friend  { background: #ece6f3; color: #5a3f7a; }
  .badge.unverified { background: transparent !important; color: var(--muted) !important; box-shadow: inset 0 0 0 1.5px var(--line) !important; }
  .badge .tick { width: 12px; height: 12px; }
  .legend { display: grid; gap: 8px; font-size: 15px; margin: 10px 0 6px; }
  .legend div { display: flex; gap: 10px; align-items: center; }
  .legend .badge { min-width: 128px; }
  .res-options { display: grid; gap: 8px; margin-top: 6px; }
  .res-options label { display: flex; gap: 10px; align-items: center; font-weight: 400; margin: 0; padding: 9px 12px; border: 1px solid var(--line); border-radius: 8px; cursor: pointer; background: #fff; }
  .res-options label:has(input:checked) { border-color: var(--green); background: #f3f6ee; }
  .res-options input { width: auto; }
  .step { display: none; }
  .step.on { display: block; }
  .code-input { font-size: 24px; letter-spacing: .4em; text-align: center; max-width: 220px; }
  .signed-in { display: flex; gap: 8px; align-items: center; flex-wrap: wrap; font-size: 15px; color: var(--muted); margin-bottom: 4px; }

  footer { background: var(--green-dark); color: #e9ede3; padding: 36px 0; margin-top: 0; }
  footer .wrap { display: flex; justify-content: space-between; flex-wrap: wrap; gap: 16px; align-items: center; }
  footer a { color: #fff; }
  footer .social a { background: rgba(255,255,255,.14); }

  /* ---------- Phones ---------- */
  @media (max-width: 860px) {
    .events-grid, .two-col { grid-template-columns: 1fr; }
    .photos { grid-template-columns: 1fr 1fr; }
  }
  @media (max-width: 560px) {
    body { font-size: 17px; }
    section { padding: 40px 0; }
    .search input { width: 150px; }
    .cats, form .row { grid-template-columns: 1fr; }
    nav.main ul { gap: 2px 16px; }
    nav.main a { font-size: 15px; }
    .cal-grid .day { min-height: 44px; font-size: 13px; }
    .cal-grid .day .ev { font-size: 0; height: 7px; width: 7px; padding: 0; border-radius: 50%; background: var(--accent); }
  }

/* ---------- shared across pages ---------- */
.whoami { color: #fff; font-size: 15px; font-weight: 600; white-space: nowrap; }
.whoami a { color: #fff; }
.masthead h1 a { color: inherit; text-decoration: none; }
nav.main a[aria-current="page"] { border-color: var(--green); color: var(--green); }
a.event { color: inherit; text-decoration: none; }
a.event:hover, a.post.preview:hover { border-color: var(--band); }
a.post.preview { display: block; color: inherit; text-decoration: none; }
a.post.preview p { margin: 6px 0; }
@media (max-width: 560px) {
  .whoami { font-size: 13px; }
}
@media (max-width: 420px) {
  .social a { width: 32px; height: 32px; }
}

/* ---------- footer links ---------- */
.footlinks { display: flex; flex-wrap: wrap; gap: 6px 20px; }
.footlinks a { color: #fff; font-weight: 600; }

/* ---------- green band: [Menu (phones)] [search] ......... [Sign in] ---------- */
.band .wrap { gap: 12px; }
.whoami { margin-left: auto; }
footer .social { margin-left: auto; }
.menu-toggle { display: none; }

/* ---------- phones and narrow windows: the band stays at the top, and Menu opens a panel under it ---------- */
@media (max-width: 760px) {
  .band { position: sticky; top: 0; z-index: 30; height: 56px; }
  .menu-toggle {
    display: inline-flex; align-items: center; gap: 6px; flex: none; font: inherit; font-weight: 700; font-size: 16px;
    background: rgba(255,255,255,.95); color: var(--green); border: none; border-radius: 999px; padding: 6px 14px; cursor: pointer;
  }
  .menu-toggle span { font-size: 19px; line-height: 1; }
  .whoami { flex: none; }
  nav.main { display: none; position: fixed; left: 0; right: 0; z-index: 29; max-height: calc(100vh - 56px); overflow-y: auto;
    background: var(--cream); border-bottom: 1px solid var(--line); box-shadow: 0 10px 24px rgba(0,0,0,.15); padding: 6px 16px 14px; }
  nav.main.open { display: block; }
  nav.main ul { flex-direction: column; align-items: stretch; gap: 0; padding: 0; }
  nav.main li a { display: block; padding: 12px 6px; font-size: 18px; border-bottom: 1px solid var(--line); }
  nav.main li a[aria-current="page"] { background: var(--sage); border-radius: 6px; border-bottom-color: var(--line); }
  .masthead { padding: 18px 0 8px; }
  .masthead h1 { font-size: 1.5rem; letter-spacing: .03em; }
  .masthead .tagline { font-size: .95rem; }
}

/* ---------- long text pages (privacy) ---------- */
.prose { margin-top: 16px; }
.prose h3 { margin-bottom: 8px; }

/* ---------- event page ---------- */
.event-view h2 { margin-bottom: 6px; }
.event-facts { display: grid; grid-template-columns: auto 1fr; gap: 6px 14px; margin: 14px 0; font-size: 17px; }
.event-facts dt { color: var(--muted); font-weight: 600; }
.event-facts dd { margin: 0; }
.event-details { margin: 14px 0; }
.event-actions { display: flex; flex-wrap: wrap; gap: 10px; align-items: center; margin-top: 8px; }
.event-actions .btn { margin-top: 0; }
#calDetail a { font-weight: 700; }

/* ---------- a form you can see but not use yet (signed out) ---------- */
.form-off label { color: var(--muted); }
.form-off input, .form-off select, .form-off textarea { background: #ebe8e1; color: var(--muted); border-color: var(--line); cursor: not-allowed; }
.form-off input::placeholder, .form-off textarea::placeholder { color: #a8a294; }
.form-off .btn { background: #b9b5aa; cursor: not-allowed; }
#hostGate p + p .btn { margin-top: 0; }
#hostGate:not(:empty) { margin-bottom: 6px; }

/* ---------- search on the Calendar and Town Talk pages ---------- */
.page-search { display: flex; gap: 8px; margin-bottom: 12px; }
.page-search input { flex: 1; min-width: 0; padding-left: 38px;
  background: #fff url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'%3E%3Cpath fill='%235f6657' d='M10 3a7 7 0 0 1 5.6 11.2l5.1 5.1-1.4 1.4-5.1-5.1A7 7 0 1 1 10 3zm0 2a5 5 0 1 0 0 10 5 5 0 0 0 0-10z'/%3E%3C/svg%3E") no-repeat 12px center / 18px; }
.page-search select { width: auto; flex: none; }

/* ---------- YouTube videos: a thumbnail with a play button until clicked ---------- */
.yt { position: relative; display: block; margin: 10px 0 4px; max-width: 560px; aspect-ratio: 16 / 9; border-radius: 10px; overflow: hidden; background: #111; cursor: pointer; }
.yt img { width: 100%; height: 100%; object-fit: cover; opacity: .92; }
.yt:hover img, .yt:focus img { opacity: 1; }
.yt-play { position: absolute; left: 50%; top: 50%; transform: translate(-50%, -50%); width: 64px; height: 46px; border-radius: 12px;
  background: rgba(200, 30, 30, .92); color: #fff; display: grid; place-items: center; font-size: 22px; }
.yt-title { position: absolute; left: 0; right: 0; bottom: 0; padding: 18px 12px 8px; font-size: 14px; font-weight: 600; color: #fff;
  background: linear-gradient(transparent, rgba(0,0,0,.75)); }
.yt.playing { cursor: default; }
.yt iframe { width: 100%; height: 100%; border: 0; display: block; }
.event .counts { font-size: 13px; color: var(--muted); margin-top: 2px; }

/* ---------- Town Talk: the forum is the main column; who's who and moderation sit underneath ---------- */
.talk-wrap { max-width: 860px; }
.talk-about { margin-top: 36px; display: grid; gap: 16px; }
.talk-about .panel h3 { margin-top: 0; }
details.expander summary { cursor: pointer; list-style: none; display: flex; align-items: center; justify-content: space-between; gap: 12px; }
details.expander summary::-webkit-details-marker { display: none; }
details.expander summary h3 { margin: 0; }
details.expander summary::after { content: "Show"; font-weight: 700; font-size: 15px; color: var(--green); border: 2px solid var(--green); border-radius: 999px; padding: 2px 12px; }
details.expander[open] summary::after { content: "Hide"; }
details.expander[open] summary { margin-bottom: 10px; }

/* ---------- replying: the post you're answering and the reply box take center stage ---------- */
.post.replying { border-color: var(--green); box-shadow: 0 0 0 3px rgba(95, 143, 71, .25), 0 10px 28px rgba(0, 0, 0, .10); }
.post.replying .reply-form.open { background: #f3f6ee; border: 2px solid var(--band); border-radius: 10px; padding: 12px 14px; margin-top: 12px; }
.replying-to { font-size: 16px; margin-bottom: 8px; color: var(--green-dark); }
.post.replying .reply-form textarea { min-height: 130px; font-size: 17px; background: #fff; }
.reply-form .btn { margin-top: 8px; }

/* ---------- Moderation Log page ---------- */
.log-page { gap: 10px; }
.log-page .log-entry { background: var(--card); border: 1px solid var(--line); border-radius: var(--radius); padding: 12px 14px; color: var(--ink); font-size: 16px; display: grid; gap: 2px; }
.log-when { font-weight: 700; color: var(--green-dark); }
/* A post opened from a link (talk/#post-12) is outlined so it's easy to spot. */
.post:target, .post.targeted { border-color: var(--green); box-shadow: 0 0 0 3px rgba(95, 143, 71, .25); scroll-margin-top: 80px; }
.log-page .log-entry div { background: none; padding: 0; border-radius: 0; }

/* ---------- Community Album ---------- */
.album-event { margin-top: 28px; }
.album-head { display: flex; flex-wrap: wrap; align-items: baseline; gap: 4px 14px; margin-bottom: 10px; border-bottom: 1px solid var(--line); padding-bottom: 6px; }
.album-head h3 { margin: 0; }
.album-head h3 a { color: var(--green); text-decoration: none; }
.album-head h3 a:hover { text-decoration: underline; }

/* ---------- signed-in account card (signup/) ---------- */
.acct { display: flex; align-items: center; gap: 14px; margin: 4px 0 16px; }
.acct-avatar { flex: none; width: 56px; height: 56px; border-radius: 50%; background: var(--green); color: #fff;
  display: grid; place-items: center; font-family: "Lora", Georgia, serif; font-size: 26px; font-weight: 700; }
.acct-name { font-size: 1.2rem; font-weight: 700; margin-bottom: 4px; }
.acct-note { margin: 0 0 14px; }
.acct-links { display: grid; border: 1px solid var(--line); border-radius: var(--radius); overflow: hidden; }
.acct-links a { display: grid; grid-template-columns: 1fr auto; align-items: center; column-gap: 12px; padding: 12px 16px;
  text-decoration: none; color: var(--ink); border-top: 1px solid var(--line); }
.acct-links a:first-child { border-top: none; }
.acct-links a::after { content: "\203A"; grid-row: 1 / span 2; grid-column: 2; font-size: 26px; line-height: 1; color: var(--muted); }
.acct-links a span { font-weight: 700; color: var(--green); }
.acct-links a small { color: var(--muted); font-size: 14px; }
.acct-links a:hover { background: #f3f6ee; }
.acct-signout { text-align: right; margin: 14px 0 0; }
button.linkish { font: inherit; font-size: 15px; background: none; border: none; padding: 0; color: var(--muted); text-decoration: underline; cursor: pointer; }
button.linkish:hover { color: var(--ink); }

/* ---------- members' text: links and videos in place ---------- */
.body-text { margin: 6px 0 8px; overflow-wrap: anywhere; }
.reply .body-text { margin: 2px 0 0; }
.body-text a, .event-details a { color: var(--green); text-decoration: underline; }
.body-text .yt, .event-details .yt { margin: 10px 0; }

/* ---------- linked videos and pictures under a post: one row, scroll sideways when there's more than one ---------- */
.media-strip { margin: 10px 0 4px; }
.media-strip .media-cell { max-width: 560px; }
.media-strip.many { display: flex; gap: 10px; overflow-x: auto; scroll-snap-type: x mandatory; padding-bottom: 8px; -webkit-overflow-scrolling: touch; }
.media-strip.many .media-cell { flex: 0 0 min(85%, 440px); scroll-snap-align: start; }
.media-strip .yt { margin: 0; max-width: none; }
.media-img { display: block; border-radius: 10px; overflow: hidden; background: var(--sage); aspect-ratio: 16 / 9; }
.media-img img { width: 100%; height: 100%; object-fit: cover; display: block; }
.media-strip:not(.many) .media-img { aspect-ratio: auto; max-height: 520px; }
.media-strip:not(.many) .media-img img { height: auto; max-height: 520px; object-fit: contain; }

/* ---------- Town Talk: shorter threads ---------- */
.more-replies { display: block; margin: 10px 0 0; font: inherit; font-size: 15px; font-weight: 700; color: var(--green); background: none; border: none; padding: 4px 0; cursor: pointer; }
.more-replies:hover { text-decoration: underline; }
.more-posts { display: block; margin: 16px auto 0; }
.post .meta .topic { font-weight: 600; color: var(--green-dark); }
.more-replies span { font-weight: 400; color: var(--muted); }
.month-head { margin: 14px 0 2px; font-size: 1.05rem; color: var(--green-dark); border-bottom: 1px solid var(--line); padding-bottom: 4px; }
.event-list > .month-head:first-child { margin-top: 0; }

/* ---------- the site's mark beside the title ---------- */
.masthead h1 a { display: inline-flex; align-items: center; justify-content: center; gap: 14px; }
.brand-mark { width: 1.15em; height: 1.15em; flex: none; border-radius: 22%; }
@media (max-width: 760px) { .masthead h1 a { gap: 10px; } }

/* ---------- Town Talk: finding your way around (filters, pages, what's new) ---------- */
.talk-tools { margin-top: 20px; scroll-margin-top: 80px; }
.talk-tools .page-search { margin-bottom: 8px; }
.talk-filters { display: flex; flex-wrap: wrap; gap: 8px; margin-bottom: 8px; }
.talk-filters select { width: auto; flex: 1 1 150px; margin: 0; }
.talk-status { font-size: 15px; color: var(--muted); margin-bottom: 4px; }
.linkish { background: none; border: 0; padding: 0; font: inherit; color: var(--green-dark); text-decoration: underline; cursor: pointer; }
.pager { display: flex; flex-wrap: wrap; align-items: center; justify-content: center; gap: 4px; margin: 10px 0; }
.pager:empty { display: none; }
.pager button { min-width: 38px; padding: 6px 10px; border: 1px solid var(--line); border-radius: 8px; background: #fff; color: var(--ink); font: inherit; font-size: 15px; cursor: pointer; }
.pager button:hover:not(:disabled) { border-color: var(--green); }
.pager button.on { background: var(--green-dark); border-color: var(--green-dark); color: #fff; font-weight: 600; cursor: default; }
.pager button:disabled { opacity: .45; cursor: default; }
.pager .gap { padding: 0 4px; color: var(--muted); }
.post-list > .month-head:first-child { margin-top: 0; }
.new-tag { display: inline-block; margin-left: 4px; padding: 0 7px; border-radius: 999px; background: #e7f0dc; color: var(--green-dark); font-size: 12px; font-weight: 700; letter-spacing: .02em; vertical-align: 1px; }
.post.has-new { border-left: 4px solid var(--green); }
.thread-sum { margin: 8px 0 2px; font-size: 14px; color: var(--muted); }
@media (max-width: 560px) { .pager button { min-width: 34px; padding: 6px 8px; } }
.notice-actions { display: flex; flex-wrap: wrap; align-items: center; gap: 8px 18px; }
.notice-actions a { font-weight: 600; }
.post-list.loading { opacity: .5; transition: opacity .15s; }
.date-range { display: flex; flex-wrap: wrap; align-items: end; gap: 8px 12px; margin: 0 0 8px; }
.date-range label { display: flex; flex-direction: column; font-size: 14px; color: var(--muted); margin: 0; }
.date-range input { width: auto; margin: 2px 0 0; }
.date-range .btn { margin: 0; }
/* Facebook and Instagram in the band: on the left on wide screens, beside Menu on phones. */
.band-social { flex: none; }
@media (max-width: 760px) { .band-social { gap: 6px; } .band-social a { width: 32px; height: 32px; } .band-social svg { width: 17px; height: 17px; } }
[hidden] { display: none !important; }
