:root {
  --bg: #f6f3ec; --surface: #fffdf8; --surface-2: #efeadf; --ink: #1f2a24; --muted: #5f6b63;
  --line: #ddd5c6; --accent: #2f6b4f; --accent-ink: #ffffff; --accent-soft: #dcebe2;
  --warm: #b8662e; --shadow: 0 1px 2px rgba(31,42,36,.06), 0 4px 16px rgba(31,42,36,.06);
  --radius: 14px;
  --a-socials: #b8662e; --a-workshops: #7a5ea8; --a-winter: #3f7fb0; --a-canoe: #1f8a8a;
  --a-kayak: #c2457a; --a-backpacking: #2f6b4f; --a-cleanups: #6f8a2b; --a-cycling: #a3463f;
  --a-gear: #8a7a2b; --a-other: #6b6b6b;
}
@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) {
    --bg: #141a17; --surface: #1c2420; --surface-2: #232d28; --ink: #e8ece9; --muted: #9aa69f;
    --line: #2f3a34; --accent: #6fbf93; --accent-ink: #0f1512; --accent-soft: #24382d;
    --warm: #e09a63; --shadow: 0 1px 2px rgba(0,0,0,.3), 0 4px 16px rgba(0,0,0,.25);
  }
}
:root[data-theme="dark"] {
  --bg: #141a17; --surface: #1c2420; --surface-2: #232d28; --ink: #e8ece9; --muted: #9aa69f;
  --line: #2f3a34; --accent: #6fbf93; --accent-ink: #0f1512; --accent-soft: #24382d;
  --warm: #e09a63; --shadow: 0 1px 2px rgba(0,0,0,.3), 0 4px 16px rgba(0,0,0,.25);
}
* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body { margin: 0; background: var(--bg); color: var(--ink); font: 15px/1.55 Inter, system-ui, -apple-system, sans-serif; }
a { color: inherit; }
img { display: block; max-width: 100%; }
h1, h2, h3 { font-family: Fraunces, Georgia, serif; font-weight: 650; line-height: 1.15; margin: 0; letter-spacing: -.01em; }
.wrap { max-width: 1120px; margin: 0 auto; padding: 0 16px; }

/* Header */
header.top { position: sticky; top: 0; z-index: 50; background: color-mix(in srgb, var(--bg) 88%, transparent); backdrop-filter: blur(10px); border-bottom: 1px solid var(--line); }
header.top .wrap { display: flex; align-items: center; gap: 20px; height: 60px; }
.brand { display: flex; align-items: center; gap: 10px; text-decoration: none; font-family: Fraunces, serif; font-weight: 650; font-size: 18px; white-space: nowrap; }
.brand svg { color: var(--accent); flex: none; }
nav.tabs { display: flex; gap: 4px; margin-left: auto; overflow-x: auto; scrollbar-width: none; }
nav.tabs a { text-decoration: none; padding: 7px 12px; border-radius: 999px; color: var(--muted); font-weight: 500; white-space: nowrap; }
nav.tabs a:hover { color: var(--ink); background: var(--surface-2); }
nav.tabs a.on { color: var(--accent-ink); background: var(--accent); }
@media (max-width: 640px) {
  header.top .wrap { flex-wrap: wrap; height: auto; padding-top: 10px; padding-bottom: 8px; gap: 6px; }
  nav.tabs { margin-left: 0; width: 100%; }
  .brand span.long { display: none; }
}

main { padding: 28px 0 80px; min-height: 70vh; }
.crumbs { color: var(--muted); font-size: 13px; margin-bottom: 10px; }
.crumbs a { color: var(--muted); }
.page-head { margin-bottom: 22px; }
.page-head h1 { font-size: clamp(28px, 4vw, 40px); }
.page-head p { color: var(--muted); margin: 8px 0 0; }

/* Home */
.hero { padding: 26px 0 8px; }
.hero h1 { font-size: clamp(32px, 5vw, 52px); max-width: 15ch; }
.hero p { color: var(--muted); font-size: 17px; max-width: 56ch; margin: 12px 0 0; }
.stats { display: flex; flex-wrap: wrap; gap: 28px; margin: 22px 0 30px; }
.stats div b { display: block; font-family: Fraunces, serif; font-size: 28px; font-weight: 650; }
.stats div span { color: var(--muted); font-size: 13px; }
.doors { display: grid; grid-template-columns: repeat(5, 1fr); gap: 14px; }
@media (max-width: 1000px) { .doors { grid-template-columns: repeat(3, 1fr); } }
@media (max-width: 700px) { .doors { grid-template-columns: repeat(2, 1fr); } }
@media (max-width: 480px) { .doors { grid-template-columns: 1fr; } }
.door { position: relative; display: flex; flex-direction: column; justify-content: flex-end; min-height: 190px; padding: 18px; border-radius: var(--radius); overflow: hidden; text-decoration: none; color: #fff; background: #2f4a3c center/cover; box-shadow: var(--shadow); transition: transform .15s; }
.door:hover { transform: translateY(-2px); }
.door::before { content: ""; position: absolute; inset: 0; background: linear-gradient(180deg, rgba(0,0,0,.05) 20%, rgba(0,0,0,.72)); }
.door > * { position: relative; }
.door small { opacity: .85; font-size: 12px; text-transform: uppercase; letter-spacing: .08em; }
.door h2 { font-size: 24px; margin-top: 2px; }
.door p { margin: 4px 0 0; font-size: 13px; opacity: .9; }
.section-title { display: flex; align-items: baseline; justify-content: space-between; margin: 40px 0 14px; }
.section-title h2 { font-size: 22px; }
.section-title a { color: var(--accent); font-weight: 500; text-decoration: none; font-size: 14px; }

/* Event list */
.elist { display: flex; flex-direction: column; gap: 10px; }
.erow { display: flex; gap: 16px; align-items: center; padding: 12px; background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); text-decoration: none; transition: border-color .15s, box-shadow .15s; }
.erow:hover { border-color: var(--accent); box-shadow: var(--shadow); }
.datebox { flex: none; width: 58px; text-align: center; border-radius: 10px; background: var(--surface-2); padding: 6px 0; }
.datebox .m { font-size: 11px; text-transform: uppercase; letter-spacing: .08em; color: var(--warm); font-weight: 600; }
.datebox .d { font-family: Fraunces, serif; font-size: 22px; font-weight: 650; line-height: 1.1; }
.datebox .y { font-size: 11px; color: var(--muted); }
.erow .body { flex: 1; min-width: 0; }
.erow h3 { font-family: Inter, sans-serif; font-weight: 600; font-size: 16px; letter-spacing: 0; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.erow .meta { color: var(--muted); font-size: 13px; margin-top: 3px; display: flex; flex-wrap: wrap; gap: 4px 12px; }
.erow .chips { margin-top: 6px; }
.erow .thumb { flex: none; width: 96px; height: 68px; border-radius: 9px; object-fit: cover; background: var(--surface-2); }
@media (max-width: 560px) { .erow .thumb { display: none; } .erow h3 { white-space: normal; } }
.chip { display: inline-flex; align-items: center; gap: 6px; font-size: 12px; font-weight: 500; padding: 2px 9px 2px 7px; border-radius: 999px; background: var(--surface-2); color: var(--ink); text-decoration: none; margin: 0 4px 4px 0; }
.chip i { width: 8px; height: 8px; border-radius: 50%; background: var(--c, var(--accent)); }
a.chip:hover { outline: 1px solid var(--c, var(--accent)); }
.year-sep { font-family: Fraunces, serif; font-size: 20px; font-weight: 650; margin: 18px 0 2px; color: var(--muted); }
.empty { color: var(--muted); padding: 30px; text-align: center; border: 1px dashed var(--line); border-radius: var(--radius); }

/* Years */
.years { display: grid; grid-template-columns: repeat(auto-fill, minmax(170px, 1fr)); gap: 12px; }
.ycard { padding: 16px; background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); text-decoration: none; }
.ycard:hover { border-color: var(--accent); }
.ycard.none { opacity: .45; pointer-events: none; }
.ycard b { font-family: Fraunces, serif; font-size: 30px; font-weight: 650; display: block; }
.ycard span { color: var(--muted); font-size: 13px; }
.months { display: grid; grid-template-columns: repeat(12, 1fr); gap: 2px; margin-top: 10px; align-items: end; height: 26px; }
.months i { background: var(--accent); border-radius: 2px; min-height: 2px; opacity: .85; }
.months i.z { background: var(--line); }

/* People */
.toolbar { display: flex; gap: 10px; flex-wrap: wrap; margin-bottom: 16px; }
.toolbar input { flex: 1; min-width: 200px; padding: 10px 14px; border-radius: 999px; border: 1px solid var(--line); background: var(--surface); color: var(--ink); font: inherit; }
.seg { display: inline-flex; background: var(--surface-2); border-radius: 999px; padding: 3px; }
.seg button { border: 0; background: none; font: inherit; color: var(--muted); padding: 6px 12px; border-radius: 999px; cursor: pointer; }
.seg button.on { background: var(--surface); color: var(--ink); box-shadow: var(--shadow); }
.people { display: grid; grid-template-columns: repeat(auto-fill, minmax(150px, 1fr)); gap: 10px; }
.pcard { display: flex; align-items: center; gap: 10px; padding: 10px; background: var(--surface); border: 1px solid var(--line); border-radius: 12px; text-decoration: none; min-width: 0; }
.pcard:hover { border-color: var(--accent); }
.pcard .n { font-weight: 500; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.pcard .c { color: var(--muted); font-size: 12px; }
.av { flex: none; width: 40px; height: 40px; border-radius: 50%; object-fit: cover; background: var(--accent-soft); color: var(--accent); display: grid; place-items: center; font-weight: 600; font-size: 14px; }
.av.lg { width: 96px; height: 96px; font-size: 34px; }
.person-head { display: flex; gap: 20px; align-items: center; margin-bottom: 24px; }
.person-head .stats { margin: 10px 0 0; gap: 22px; }
.person-head .stats b { font-size: 22px; }

/* Organizers */
.orgs { display: grid; grid-template-columns: repeat(auto-fill, minmax(260px, 1fr)); gap: 14px; }
.ocard { display: block; text-decoration: none; background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); overflow: hidden; }
.ocard:hover { border-color: var(--accent); box-shadow: var(--shadow); }
.ocard .img { height: 100px; background: var(--accent-soft) center/cover; }
.ocard .t { display: flex; gap: 12px; align-items: center; padding: 0 14px; margin-top: -22px; }
.ocard .t .av { width: 52px; height: 52px; border: 3px solid var(--surface); font-size: 17px; }
.ocard .t > div { padding-top: 22px; }
.ocard h3 { font-size: 17px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.ocard p { margin: 2px 0 0; color: var(--muted); font-size: 13px; }
.ocard .tags { padding: 10px 14px 12px; min-height: 20px; }
.org-facts { display: grid; grid-template-columns: repeat(auto-fit, minmax(240px, 1fr)); gap: 14px; margin-bottom: 18px; }
.org-facts .card + .card { margin-top: 0; }

/* Activities */
.acts { display: grid; grid-template-columns: repeat(auto-fill, minmax(250px, 1fr)); gap: 14px; }
.acard { display: block; text-decoration: none; background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); overflow: hidden; }
.acard:hover { border-color: var(--c); }
.acard .img { height: 120px; background: var(--c) center/cover; position: relative; }
.acard .img::after { content: ""; position: absolute; inset: auto 0 0 0; height: 4px; background: var(--c); }
.acard .t { padding: 12px 14px; }
.acard h3 { font-size: 18px; }
.acard p { margin: 4px 0 0; color: var(--muted); font-size: 13px; }

/* Places */
#map, .minimap { height: 380px; border-radius: var(--radius); border: 1px solid var(--line); margin-bottom: 18px; z-index: 0; }
.minimap { height: 220px; }
.places { display: grid; grid-template-columns: repeat(auto-fill, minmax(240px, 1fr)); gap: 10px; }
.plcard { display: flex; justify-content: space-between; align-items: center; padding: 12px 14px; background: var(--surface); border: 1px solid var(--line); border-radius: 12px; text-decoration: none; }
.plcard:hover { border-color: var(--accent); }
.plcard span { color: var(--muted); font-size: 13px; white-space: nowrap; }
.leaflet-container { font: inherit; background: var(--surface-2); }

/* Event page */
.ehero { position: relative; border-radius: 18px; overflow: hidden; min-height: 300px; display: flex; align-items: flex-end; background: var(--accent) center/cover; margin-bottom: 24px; }
.ehero::before { content: ""; position: absolute; inset: 0; background: linear-gradient(180deg, rgba(0,0,0,0) 30%, rgba(0,0,0,.75)); }
.ehero.plain { min-height: 0; background: var(--surface-2); }
.ehero.plain::before { display: none; }
.ehero .in { position: relative; padding: 24px; color: #fff; }
.ehero.plain .in { color: var(--ink); }
.ehero h1 { font-size: clamp(26px, 4vw, 42px); }
.ehero .when { margin-top: 8px; opacity: .92; }
.ehero .chip { background: rgba(255,255,255,.18); color: inherit; backdrop-filter: blur(4px); }
.ehero.plain .chip { background: var(--surface); }
.egrid { display: grid; grid-template-columns: minmax(0, 1fr) 320px; gap: 28px; align-items: start; }
@media (max-width: 860px) { .egrid { grid-template-columns: 1fr; } }
.card { background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); padding: 18px; }
.card + .card { margin-top: 14px; }
.card h3 { font-family: Inter, sans-serif; font-size: 12px; text-transform: uppercase; letter-spacing: .08em; color: var(--muted); font-weight: 600; margin-bottom: 10px; }
.facts { display: grid; gap: 12px; }
.facts div small { display: block; color: var(--muted); font-size: 12px; }
.desc { font-size: 15.5px; overflow-wrap: anywhere; }
.desc h1, .desc h2, .desc h3 { font-size: 19px; margin: 1.3em 0 .4em; }
.desc a { color: var(--accent); }
.desc img { border-radius: 10px; }
.who { display: grid; grid-template-columns: repeat(auto-fill, minmax(56px, 1fr)); gap: 10px 6px; }
.who a { text-decoration: none; text-align: center; font-size: 11px; color: var(--muted); min-width: 0; position: relative; }
.who a .av { margin: 0 auto 4px; width: 44px; height: 44px; }
.who a span { display: block; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.who a em { position: absolute; top: -2px; right: 2px; font-style: normal; font-size: 10px; font-weight: 600; background: var(--warm); color: #fff; border-radius: 999px; padding: 0 5px; }
.gallery { display: grid; grid-template-columns: repeat(auto-fill, minmax(150px, 1fr)); gap: 8px; }
.gallery button { padding: 0; border: 0; background: var(--surface-2); border-radius: 10px; overflow: hidden; cursor: zoom-in; aspect-ratio: 4 / 3; }
.gallery img { width: 100%; height: 100%; object-fit: cover; transition: transform .25s; }
.gallery button:hover img { transform: scale(1.04); }
.pager { display: flex; justify-content: space-between; gap: 12px; margin-top: 30px; }
.pager a { flex: 1; max-width: 48%; padding: 12px 14px; border: 1px solid var(--line); border-radius: 12px; text-decoration: none; background: var(--surface); }
.pager a:hover { border-color: var(--accent); }
.pager a small { display: block; color: var(--muted); font-size: 12px; }
.pager a.next { text-align: right; margin-left: auto; }
.btn { display: inline-block; padding: 8px 14px; border-radius: 999px; background: var(--accent-soft); color: var(--accent); text-decoration: none; font-weight: 500; font-size: 14px; }

/* Lightbox */
.lb { position: fixed; inset: 0; z-index: 100; background: rgba(8,10,9,.94); display: none; flex-direction: column; color: #eee; }
.lb.open { display: flex; }
.lb .stage { flex: 1; display: flex; align-items: center; justify-content: center; min-height: 0; padding: 16px 60px 0; }
.lb .stage img { max-width: 100%; max-height: 100%; object-fit: contain; border-radius: 6px; }
.lb .bar { padding: 12px 16px 18px; text-align: center; font-size: 14px; }
.lb .bar a { color: #fff; }
.lb button { position: absolute; background: rgba(255,255,255,.1); border: 0; color: #fff; width: 44px; height: 44px; border-radius: 50%; font-size: 22px; cursor: pointer; }
.lb button:hover { background: rgba(255,255,255,.22); }
.lb .x { top: 14px; right: 14px; }
.lb .pv { left: 10px; top: 50%; }
.lb .nx { right: 10px; top: 50%; }
@media (max-width: 560px) { .lb .stage { padding: 56px 8px 0; } .lb .pv, .lb .nx { top: auto; bottom: 14px; } }
footer { color: var(--muted); font-size: 13px; padding: 30px 0; border-top: 1px solid var(--line); }

/* ---- additions for the static site ---- */
.av.anon { background: var(--surface-2); color: var(--muted); }
.header-search { display: flex; align-items: center; }
.header-search a { display: grid; place-items: center; width: 36px; height: 36px; border-radius: 50%; color: var(--muted); }
.header-search a:hover { background: var(--surface-2); color: var(--ink); }
.searchbox { width: 100%; padding: 12px 16px; border-radius: 999px; border: 1px solid var(--line); background: var(--surface); color: var(--ink); font: inherit; font-size: 16px; margin-bottom: 16px; }
.hidden { display: none !important; }
.note { color: var(--muted); font-size: 13px; }
.who .more { display: grid; place-items: center; font-size: 12px; color: var(--muted); text-align: center; }
.facts a { color: var(--accent); }
.gallery a { display: block; border-radius: 10px; overflow: hidden; aspect-ratio: 4 / 3; background: var(--surface-2); cursor: zoom-in; }
.gallery a img { width: 100%; height: 100%; object-fit: cover; transition: transform .25s; }
.gallery a:hover img { transform: scale(1.04); }

@media (max-width: 640px) {
  header.top .wrap { position: relative; }
  .header-search { position: absolute; top: 8px; right: 16px; }
}
.desc img { display: block; max-width: 100%; height: auto; margin: 10px 0; }
