/* ==================================================================
   European Whistler Scientific Workshop — stylesheet
   ------------------------------------------------------------------
   The look is a single long-scrolling page: full-height hero,
   alternating light / dark sections, a sticky side navigation, and a
   compact footer. Three colour themes are defined as token sets on
   html[data-theme]. Switch with ?theme=brianza | villa | connectome.
   ================================================================== */

/* ---------- 1. Theme tokens ------------------------------------- */
:root {
  /* Theme A — "Brianza": deep green and white (default) */
  --font-display: "Open Sans", system-ui, sans-serif;
  --font-body: "Roboto Slab", Georgia, serif;
  --font-nav: "Oswald", "Open Sans", sans-serif;

  --light-bg: #ffffff;
  --light-fg: #093107;
  --dark-bg: #093107;
  --dark-fg: #bad2a9;
  --accent: #86c440;
  --accent-fg: #143d12;
  --accent-hover: #093107;
  --accent-hover-fg: #ffffff;
  --link-hover: #5aa32e;
  --muted: #6b7a6b;
  --rule: rgba(9, 49, 7, 0.18);

  --hero-fg: #093107;
  --hero-guard: rgba(255, 255, 255, 0.66);
  --hero-shadow: 0 0 7px rgba(255, 255, 255, 0.9);
  --hero-sky-top: #dfe9d4;
  --hero-sky-bottom: #f6f8f2;
  --hero-hills: #9db98b;
  --hero-hills-far: #c3d3b7;
  --hero-ground: #6f9a5c;
  --hero-villa: #f1ead8;
  --hero-villa-shadow: #cfc3a4;
  --hero-roof: #a8664a;
  --hero-tree: #2f5a2c;
  --hero-net: rgba(9, 49, 7, 0.28);
  --hero-disc-opacity: 0.55;

  --nav-bg: #ffffff;
  --nav-fg: #093107;
  --nav-active: #5aa32e;

  --footer-bg: #22343a;
  --footer-fg: #bbc7cc;

  --card-bg: rgba(9, 49, 7, 0.05);
  --card-bg-dark: rgba(255, 255, 255, 0.07);

  /* schedule block colours */
  --t-session: #2f7d32;
  --t-keynote: #1b5e20;
  --t-panel: #4b8b3b;
  --t-poster: #7b9f35;
  --t-break: #b9a15a;
  --t-meal: #b07a3c;
  --t-free: #4c8fb8;
  --t-social: #b5533c;
  --t-registration: #6d6d6d;
  --t-travel: #6d6d6d;

  --radius: 14px;
  --radius-pill: 999px;
  --shadow: 0 10px 30px rgba(0, 0, 0, 0.12);
}

html[data-theme="villa"] {
  /* Theme B — "Villa": cream, terracotta, ochre; baroque warmth */
  --font-display: "Cormorant Garamond", "Times New Roman", serif;
  --font-body: "Source Sans 3", "Helvetica Neue", Arial, sans-serif;
  --font-nav: "Source Sans 3", Arial, sans-serif;

  --light-bg: #f7f1e6;
  --light-fg: #2b2a26;
  --dark-bg: #7a3b22;
  --dark-fg: #f7e9d6;
  --accent: #d9a441;
  --accent-fg: #2b2a26;
  --accent-hover: #7a3b22;
  --accent-hover-fg: #f7e9d6;
  --link-hover: #b5532c;
  --muted: #7d7263;
  --rule: rgba(43, 42, 38, 0.18);

  --hero-fg: #3b2a1e;
  --hero-guard: rgba(247, 241, 230, 0.72);
  --hero-shadow: 0 0 8px rgba(247, 241, 230, 0.9);
  --hero-sky-top: #f2d9b8;
  --hero-sky-bottom: #fbf3e6;
  --hero-hills: #c9a97a;
  --hero-hills-far: #e6cfae;
  --hero-ground: #b7864e;
  --hero-villa: #fbf4e6;
  --hero-villa-shadow: #dcc6a4;
  --hero-roof: #b5532c;
  --hero-tree: #5d6b3a;
  --hero-net: rgba(122, 59, 34, 0.3);
  --hero-disc-opacity: 0.6;

  --nav-bg: #f7f1e6;
  --nav-fg: #2b2a26;
  --nav-active: #b5532c;

  --footer-bg: #2b2a26;
  --footer-fg: #d8cdb8;

  --card-bg: rgba(122, 59, 34, 0.07);
  --card-bg-dark: rgba(255, 255, 255, 0.09);

  --t-session: #b5532c;
  --t-keynote: #7a3b22;
  --t-panel: #c46a3a;
  --t-poster: #d9a441;
  --t-break: #c9b48a;
  --t-meal: #9c7a4a;
  --t-free: #5d6b3a;
  --t-social: #a03c5c;
  --t-registration: #7d7263;
  --t-travel: #7d7263;
}

html[data-theme="connectome"] {
  /* Theme C — "Connectome": night navy, ice text, teal + coral accents */
  --font-display: "Space Grotesk", "Inter", system-ui, sans-serif;
  --font-body: "Inter", system-ui, sans-serif;
  --font-nav: "Space Grotesk", "Inter", sans-serif;

  --light-bg: #0f1e33;
  --light-fg: #e6eef7;
  --dark-bg: #08111f;
  --dark-fg: #c7d6e6;
  --accent: #2ec4b6;
  --accent-fg: #06121f;
  --accent-hover: #ff7a59;
  --accent-hover-fg: #06121f;
  --link-hover: #5fe0d3;
  --muted: #8ea2b8;
  --rule: rgba(230, 238, 247, 0.16);

  --hero-fg: #eaf2fb;
  --hero-guard: rgba(6, 18, 31, 0.55);
  --hero-shadow: 0 2px 18px rgba(0, 0, 0, 0.6);
  --hero-sky-top: #08111f;
  --hero-sky-bottom: #17304f;
  --hero-hills: #12243d;
  --hero-hills-far: #1a3354;
  --hero-ground: #0c1a2c;
  --hero-villa: #dbe7f3;
  --hero-villa-shadow: #9fb4cb;
  --hero-roof: #2ec4b6;
  --hero-tree: #12243d;
  --hero-net: rgba(46, 196, 182, 0.55);
  --hero-disc-opacity: 0.12;

  --nav-bg: #0f1e33;
  --nav-fg: #e6eef7;
  --nav-active: #2ec4b6;

  --footer-bg: #050b14;
  --footer-fg: #8ea2b8;

  --card-bg: rgba(255, 255, 255, 0.06);
  --card-bg-dark: rgba(255, 255, 255, 0.05);

  --t-session: #2ec4b6;
  --t-keynote: #5fe0d3;
  --t-panel: #7fd1ff;
  --t-poster: #b39ddb;
  --t-break: #8ea2b8;
  --t-meal: #ffb86b;
  --t-free: #7fd1ff;
  --t-social: #ff7a59;
  --t-registration: #8ea2b8;
  --t-travel: #8ea2b8;
}

/* ---------- 2. Base ---------------------------------------------- */
*, *::before, *::after { box-sizing: border-box; }
html { scroll-behavior: smooth; -webkit-text-size-adjust: 100%; }
@media (prefers-reduced-motion: reduce) { html { scroll-behavior: auto; } }

body {
  margin: 0;
  font-family: var(--font-body);
  font-size: 1.15rem;
  line-height: 1.6;
  color: var(--light-fg);
  background: var(--light-bg);
  overflow-x: hidden;
}
html[data-theme="villa"] body { font-size: 1.2rem; }
html[data-theme="connectome"] body { font-size: 1.08rem; }

h1, h2, h3, h4, h5, h6 {
  font-family: var(--font-display);
  line-height: 1.15;
  margin: 0 0 0.5em;
  letter-spacing: -0.01em;
}
h2 { font-size: 2.4rem; }
h3 { font-size: 1.6rem; margin-top: 1.6em; }
h4 { font-size: 1.25rem; margin-top: 1.4em; }
html[data-theme="villa"] .section__title { font-size: 2.9rem; font-weight: 600; }
html[data-theme="villa"] h3 { font-size: 1.9rem; font-weight: 600; }
p { margin: 1em 0; }
a { color: inherit; transition: color 0.25s ease; }
a:hover { color: var(--link-hover); }
hr { border: 0; border-top: 1px solid var(--rule); margin: 2em 0; }
img { max-width: 100%; height: auto; }
ul, ol { padding-left: 1.4em; }
li { margin: 0.25em 0; }
small, .small { font-size: 0.85em; }
.muted { color: var(--muted); }
.tbc {
  display: inline-block;
  font-family: var(--font-nav);
  font-size: 0.72em;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  padding: 0.1em 0.5em;
  border: 1px dashed currentColor;
  border-radius: 6px;
  opacity: 0.75;
  vertical-align: middle;
}
kbd {
  display: inline-block;
  font: inherit;
  padding: 0.15em 0.6em;
  border-radius: 8px;
  background: var(--card-bg);
  border: 1px solid var(--rule);
}
.visually-hidden {
  position: absolute !important; width: 1px; height: 1px; overflow: hidden;
  clip: rect(0 0 0 0); white-space: nowrap;
}

/* ---------- 3. Buttons ------------------------------------------- */
.btn {
  display: inline-block;
  font-family: var(--font-nav);
  font-weight: 400;
  font-size: 1rem;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  text-decoration: none;
  color: var(--accent-fg);
  background: var(--accent);
  padding: 0.65em 1.4em;
  border-radius: 8px;
  border: 0;
  cursor: pointer;
  transition: background 0.25s ease, color 0.25s ease, transform 0.15s ease;
}
.btn:hover, .btn:focus-visible { background: var(--accent-hover); color: var(--accent-hover-fg); transform: translateY(-1px); }
.btn--ghost { background: transparent; color: inherit; border: 1.5px solid currentColor; }
.btn--ghost:hover { background: var(--accent); color: var(--accent-fg); border-color: var(--accent); }
.btn--small { font-size: 0.85rem; padding: 0.45em 1em; }
.btn[hidden] { display: none; }
.btn--primary { font-size: 1.08em; padding-left: 1.6em; padding-right: 1.6em; box-shadow: 0 6px 18px rgba(0, 0, 0, 0.18); }
html[data-theme="villa"] .btn { border-radius: 4px; font-weight: 600; letter-spacing: 0.12em; }
html[data-theme="connectome"] .btn { border-radius: var(--radius-pill); font-weight: 500; }

/* ---------- 4. Hero ---------------------------------------------- */
.hero {
  position: relative;
  min-height: 100vh;
  min-height: 100svh;
  display: grid;
  place-items: center;
  text-align: center;
  color: var(--hero-fg);
  overflow: hidden;
  isolation: isolate;
}
.hero__bg {
  position: absolute; inset: 0; z-index: -1;
  background: linear-gradient(180deg, var(--hero-sky-top), var(--hero-sky-bottom));
}
.hero__bg svg, .hero__bg canvas, .hero__bg img {
  position: absolute; inset: 0; width: 100%; height: 100%;
}
.hero__bg img { object-fit: cover; }
.hero__bg svg { display: block; }
.hero__inner {
  position: relative;
  width: min(92vw, 980px);
  padding: 3rem 1rem 6rem;
}
.hero__logo {
  display: block;
  width: clamp(110px, 16vw, 160px);
  height: auto;
  margin: 0 auto 1rem;
  filter: drop-shadow(0 6px 18px rgba(0, 0, 0, 0.15));
}
.hero__guard {
  display: inline-block;
  padding: 1rem 1.8rem 1.2rem;
  background: var(--hero-guard);
  border-radius: 24px;
  backdrop-filter: blur(6px);
  -webkit-backdrop-filter: blur(6px);
}
.hero__kicker {
  font-family: var(--font-nav);
  text-transform: uppercase;
  letter-spacing: 0.22em;
  font-size: 0.85rem;
  margin: 0 0 0.6rem;
  opacity: 0.85;
}
.hero__title {
  font-size: clamp(2.2rem, 5.6vw, 4.4rem);
  letter-spacing: -0.02em;
  margin: 0 0 0.35em;
  text-shadow: var(--hero-shadow);
}
.hero__sub {
  font-family: var(--font-body);
  font-weight: 400;
  font-size: clamp(1.05rem, 2vw, 1.5rem);
  line-height: 1.5;
  margin: 0;
  text-shadow: var(--hero-shadow);
}
.hero__sub strong { font-weight: 700; }
.hero__actions { margin-top: 1.6rem; display: flex; flex-wrap: wrap; gap: 0.7rem; justify-content: center; align-items: center; }
/* header buttons share one size: every column as wide as the widest button; stacked on phones */
.hero__actions { display: inline-grid; grid-auto-flow: column; grid-auto-columns: 1fr; }
.hero__actions .btn { text-align: center; font-size: 1.05rem; padding: 0.7em 1.4em; white-space: nowrap; box-shadow: 0 6px 18px rgba(0, 0, 0, 0.18); }
@media (max-width: 720px) { .hero__actions { grid-auto-flow: row; } }
.hero__arrow {
  position: absolute; left: 0; right: 0; bottom: 1.2rem;
  text-align: center; font-size: 3rem; line-height: 1;
  opacity: 0.6; text-decoration: none; transition: opacity 0.3s, transform 0.3s;
  color: var(--hero-fg);
}
.hero__arrow:hover { opacity: 1; transform: translateY(4px); color: var(--hero-fg); }
html[data-theme="villa"] .hero__title { font-weight: 600; letter-spacing: 0; }
html[data-theme="villa"] .hero__guard { border-radius: 6px; border: 1px solid rgba(122, 59, 34, 0.25); }
html[data-theme="connectome"] .hero__guard { border-radius: 18px; border: 1px solid rgba(255, 255, 255, 0.12); }
html[data-theme="connectome"] .hero__title { font-weight: 700; letter-spacing: -0.03em; }
html[data-theme="connectome"] .hero__bg .net { display: none; }
.hero__disc { opacity: var(--hero-disc-opacity, 0.5); }

/* deadlines in the header */
.hero__dates { list-style: none; margin: 1.1rem 0 0; padding: 0; display: flex; flex-wrap: wrap; gap: 0.6rem; justify-content: center; }
.hero__dates li {
  margin: 0; padding: 0.45rem 0.9rem; border-radius: 10px; text-align: center;
  background: color-mix(in srgb, currentColor 7%, transparent);
  border: 1px solid color-mix(in srgb, currentColor 30%, transparent);
}
.hero__dates-label { display: block; font-family: var(--font-nav); font-size: 0.7rem; letter-spacing: 0.14em; text-transform: uppercase; opacity: 0.85; }
.hero__dates-date { display: block; font-family: var(--font-display); font-size: 1.15rem; font-weight: 700; line-height: 1.25; }

/* ---------- 5. Side navigation ----------------------------------- */
.sidenav {
  position: fixed; top: 40px; left: 0; z-index: 50;
  display: flex; flex-direction: column;
  padding: 1em 1.5em 1em 1.2em;
  background: var(--nav-bg); color: var(--nav-fg);
  border-radius: 0 22px 18px 0;
  font-family: var(--font-nav);
  text-transform: uppercase;
  letter-spacing: 0.06em;
  font-size: 0.9rem;
  line-height: 1.5;
  box-shadow: var(--shadow);
  opacity: 0; pointer-events: none; transform: translateX(-12px);
  transition: opacity 0.3s ease, transform 0.3s ease;
}
.sidenav.is-visible { opacity: 1; pointer-events: auto; transform: none; }
.sidenav a { display: block; text-decoration: none; opacity: 0.7; padding: 0.05em 0; transition: opacity 0.2s, color 0.2s; }
.sidenav a:hover, .sidenav a.is-active { opacity: 1; color: var(--nav-active); }
.sidenav__brand { display: none; }

@media (max-width: 1130px) {
  .sidenav {
    top: 0; left: 0; right: 0; width: 100%;
    flex-direction: row; flex-wrap: wrap; justify-content: center; gap: 0 0.9rem;
    padding: 0.35rem 0.6rem; border-radius: 0; font-size: 0.8rem;
    transform: translateY(-8px);
  }
  .sidenav.is-visible { transform: none; }
  .sidenav a { padding: 0.15em 0; }
  .section { scroll-margin-top: 48px; }
}

/* ---------- 6. Sections ----------------------------------------- */
.section {
  position: relative;
  background: var(--light-bg);
  color: var(--light-fg);
}
.section--dark {
  background: var(--dark-bg);
  color: var(--dark-fg);
}
.section--dark .tbc { opacity: 0.9; }
.section__inner {
  width: min(88vw, 760px);
  margin: 0 auto;
  padding: 4.5rem 0 4rem;
}
.section__inner--wide { width: min(92vw, 1080px); }
.section__title { margin-bottom: 1rem; }
.section__title small { display: block; font-family: var(--font-nav); font-size: 0.8rem; letter-spacing: 0.2em; text-transform: uppercase; opacity: 0.7; margin-bottom: 0.4em; }
/* the little notch between sections, as in the reference site */
.section::after {
  content: ""; position: absolute; bottom: -38px; left: 6%; z-index: 2;
  width: 0; height: 0;
  border-left: 56px solid transparent; border-right: 56px solid transparent;
  border-top: 46px solid var(--light-bg);
}
.section--dark::after { left: auto; right: 6%; border-top-color: var(--dark-bg); }
.section:last-of-type::after { display: none; }
html[data-theme="connectome"] .section::after { display: none; }
html[data-theme="connectome"] .section { border-top: 1px solid var(--rule); }
html[data-theme="villa"] .section::after { border-left-width: 28px; border-right-width: 28px; border-top-width: 24px; bottom: -22px; }

.lead { font-size: 1.2em; line-height: 1.55; }
.section--dark a.btn { color: var(--accent-fg); }
.section--dark .btn--ghost { color: inherit; }

/* topics grid */
.topics { list-style: none; padding: 0; margin: 1.2rem 0; display: grid; grid-template-columns: repeat(auto-fit, minmax(220px, 1fr)); gap: 0.6rem; }
.topics li { margin: 0; padding: 0.75rem 1rem; border-left: 4px solid var(--accent); background: var(--card-bg); border-radius: 0 10px 10px 0; }
.section--dark .topics li { background: var(--card-bg-dark); }
.facilities { columns: 2 16rem; column-gap: 2rem; padding-left: 1.2em; }
.facilities li { break-inside: avoid; margin-bottom: 0.25rem; }
.villa-map { margin: 1rem 0 0; }
.villa-map img { display: block; width: 100%; height: auto; border-radius: var(--radius); border: 1px solid var(--rule); background: #fff; }
.villa-map figcaption { margin-top: 0.4rem; }

/* key dates timeline */
.timeline { list-style: none; padding: 0; margin: 1.5rem 0; position: relative; }
.timeline::before { content: ""; position: absolute; left: 9px; top: 6px; bottom: 6px; width: 2px; background: var(--rule); }
.timeline li { position: relative; padding-left: 2.2rem; margin: 0 0 0.9rem; }
.timeline li::before { content: ""; position: absolute; left: 3px; top: 0.55em; width: 14px; height: 14px; border-radius: 50%; background: var(--accent); border: 3px solid var(--light-bg); }
.section--dark .timeline li::before { border-color: var(--dark-bg); }
.timeline__label { display: block; font-family: var(--font-nav); font-size: 0.78rem; letter-spacing: 0.16em; text-transform: uppercase; opacity: 0.75; }
.timeline__date { font-family: var(--font-display); font-size: 1.25rem; }
.timeline li.is-fixed .timeline__date { font-weight: 700; }

/* venue photographs */
.band { margin: 1.5rem calc(50% - 50vw); width: 100vw; }
.band img { display: block; width: 100%; height: clamp(240px, 45vh, 520px); object-fit: cover; }
.gallery__item { margin: 0; }
.gallery__item img { width: 100%; aspect-ratio: 4 / 3; object-fit: cover; border-radius: var(--radius); box-shadow: var(--shadow); display: block; }
.gallery__item figcaption { font-size: 0.8em; opacity: 0.8; margin-top: 0.35rem; }
.gallery__open { display: block; width: 100%; padding: 0; border: 0; background: none; cursor: zoom-in; border-radius: var(--radius); }
.gallery__open:focus-visible { outline: 3px solid var(--accent); outline-offset: 3px; }
.gallery__open img { transition: transform 0.25s, box-shadow 0.25s; }
.gallery__open:hover img { transform: translateY(-2px); }

/* image viewer */
.lightbox { width: 100vw; height: 100vh; max-width: 100vw; max-height: 100vh; margin: 0; padding: 0; border: 0; background: transparent; color: #f4f4f0; overflow: hidden; }
.lightbox[open] { display: grid; place-items: center; animation: lightbox-in 0.2s ease-out; }
.lightbox::backdrop { background: rgba(8, 10, 8, 0.97); backdrop-filter: blur(4px); }
.lightbox__fig { margin: 0; width: 100%; height: 100%; display: flex; flex-direction: column; align-items: center; justify-content: center; padding: 3.5rem 4.5rem; box-sizing: border-box; }
.lightbox__fig img { display: block; max-width: min(100%, 1400px); max-height: calc(100vh - 9rem); width: auto; height: auto; object-fit: contain; border-radius: var(--radius); box-shadow: 0 12px 40px rgba(0, 0, 0, 0.5); }
.lightbox__fig figcaption { display: flex; gap: 1.2rem; justify-content: space-between; width: min(100%, 1000px); margin-top: 0.8rem; font-size: 0.95rem; }
.lightbox__count { opacity: 0.7; font-variant-numeric: tabular-nums; white-space: nowrap; }
.lightbox__btn { position: absolute; display: grid; place-items: center; width: 3rem; height: 3rem; padding: 0; border: 0; border-radius: 50%; background: rgba(255, 255, 255, 0.12); color: #fff; font-size: 2rem; line-height: 1; cursor: pointer; transition: background 0.2s; }
.lightbox__btn:hover, .lightbox__btn:focus-visible { background: rgba(255, 255, 255, 0.28); outline: none; }
.lightbox__prev { left: 1rem; top: 50%; transform: translateY(-50%); }
.lightbox__next { right: 1rem; top: 50%; transform: translateY(-50%); }
.lightbox__close { right: 1rem; top: 1rem; font-size: 1.8rem; }
html:has(.lightbox[open]) { overflow: hidden; }
@keyframes lightbox-in { from { opacity: 0; } to { opacity: 1; } }
@media (max-width: 640px) {
  .lightbox__fig { padding: 3.5rem 0.75rem 4.5rem; }
  .lightbox__prev, .lightbox__next { top: auto; bottom: 1rem; transform: none; }
  .lightbox__prev { left: calc(50% - 3.5rem); }
  .lightbox__next { right: calc(50% - 3.5rem); }
}
@media (prefers-reduced-motion: reduce) { .lightbox[open] { animation: none; } .gallery__open img { transition: none; } }
body.has-hero-photo .hero__guard { background: var(--hero-guard); }
body.has-hero-photo .hero__bg::after { content: ""; position: absolute; inset: 0; background: linear-gradient(180deg, rgba(0,0,0,0.05), rgba(0,0,0,0.25)); }

/* registration fees */
.fees { width: 100%; border-collapse: collapse; margin: 1.2rem 0 0.4rem; }
.fees th, .fees td { padding: 0.6rem 1rem 0.6rem 0; text-align: left; vertical-align: top; border-bottom: 1px solid color-mix(in srgb, currentColor 25%, transparent); }
.fees thead th { font-family: var(--font-nav); font-size: 0.75rem; letter-spacing: 0.12em; text-transform: uppercase; font-weight: 500; opacity: 0.8; }
.fees tbody th { font-weight: 500; }
.fees .fees__price { text-align: right; white-space: nowrap; padding-right: 0; }
.fees tbody .fees__price { font-size: 1.15rem; font-weight: 500; }
.fees__note { opacity: 0.85; margin-top: 0.8rem; }

/* registration (HelloAsso widget) */
.register { margin-top: 1.5rem; }
.register__embed { margin: 1.2rem 0 0.6rem; border-radius: var(--radius); overflow: hidden; background: #ffffff; box-shadow: var(--shadow); }
.register__embed iframe { display: block; width: 100%; height: 750px; border: 0; }
.register__help { margin: 0; padding: 0.6rem 1rem 0.8rem; color: #3a463a; background: #f4f6f3; }
.register__help a { color: inherit; text-decoration: underline; }
.register__note { opacity: 0.85; }
/* The HelloAsso tip warning: fixed light colors so it reads the same in every theme and section */
.register__tip { margin: 1.2rem 0; padding: 0.9rem 1.1rem; border-left: 5px solid #c62828; border-radius: var(--radius); background: #fff3f1; color: #3a1a17; }
.register__tip p { margin: 0; }
.register__tip p + p { margin-top: 0.4rem; font-size: 0.92em; }
.register__tip-lead { color: #b3261e; font-weight: 700; }

/* venue / travel */
.gallery { display: grid; grid-template-columns: repeat(auto-fit, minmax(180px, 1fr)); gap: 0.8rem; margin: 1.5rem 0; }
.gallery:has(.gallery__item) { grid-template-columns: repeat(2, 1fr); }
@media (min-width: 720px) { .gallery:has(.gallery__item) { grid-template-columns: repeat(3, 1fr); } }
.gallery__ph {
  aspect-ratio: 4 / 3; border-radius: var(--radius);
  background: var(--card-bg); display: grid; place-items: center; text-align: center;
  padding: 1rem; font-family: var(--font-nav); font-size: 0.8rem; letter-spacing: 0.1em; text-transform: uppercase; opacity: 0.8;
  border: 1px dashed var(--rule);
}
.map { width: 100%; aspect-ratio: 16 / 9; border: 0; border-radius: var(--radius); box-shadow: var(--shadow); margin: 1rem 0 1.5rem; }
.route { display: grid; grid-template-columns: auto 1fr; gap: 0.3rem 1rem; margin: 1rem 0; }
.route dt { font-family: var(--font-nav); text-transform: uppercase; letter-spacing: 0.1em; font-size: 0.8rem; opacity: 0.8; padding-top: 0.3em; }
.route dd { margin: 0 0 0.6rem; }

/* people */
.people { list-style: none; padding: 0; margin: 1rem 0; display: grid; grid-template-columns: repeat(auto-fill, minmax(230px, 1fr)); gap: 0.6rem 1.2rem; }
.people li { margin: 0; padding: 0.55rem 0; border-bottom: 1px solid var(--rule); }
.people__name { display: block; font-weight: 700; }
.people__aff { display: block; font-size: 0.88em; opacity: 0.8; }
.logos { display: flex; flex-wrap: wrap; gap: 1.2rem 2rem; align-items: center; margin: 1.2rem 0; }
.logos .gallery__ph { aspect-ratio: 3 / 1.4; min-width: 180px; }
.logos__item { display: block; border-radius: var(--radius); overflow: hidden; box-shadow: var(--shadow); transition: transform 0.2s; }
.logos__item:hover { transform: translateY(-2px); }
.logos__item img { display: block; width: 280px; max-width: 100%; height: auto; }

/* sister meetings */
.sister { list-style: none; padding: 0; margin: 1rem 0; display: grid; gap: 0.8rem; }
.sister li { margin: 0; padding: 0.8rem 1rem; border-radius: var(--radius); background: var(--card-bg-dark); }
.sister a { display: block; font-weight: 500; }
.sister span { display: block; font-size: 0.9rem; opacity: 0.8; margin-top: 0.2rem; }

/* FAQ */
.faq details { border-bottom: 1px solid var(--rule); padding: 0.7rem 0; }
.faq summary { cursor: pointer; font-family: var(--font-display); font-size: 1.15rem; font-weight: 600; list-style: none; position: relative; padding-right: 2rem; }
.faq summary::-webkit-details-marker { display: none; }
.faq summary::after { content: "+"; position: absolute; right: 0.2rem; top: 0; font-weight: 400; opacity: 0.6; transition: transform 0.25s; }
.faq details[open] summary::after { transform: rotate(45deg); }
.faq details p { margin: 0.6rem 0 0.2rem; }

/* contact */
.contact { list-style: none; padding: 0; margin: 1rem 0; }
.contact li { display: flex; align-items: center; gap: 0.7rem; margin: 0.6rem 0; }
.contact svg { width: 1.3em; height: 1.3em; flex: none; }

/* ---------- 7. Footer ------------------------------------------- */
.footer {
  background: var(--footer-bg); color: var(--footer-fg);
  text-align: center; padding: 1.6rem 1rem; font-size: 0.85rem; line-height: 1.6;
  font-family: var(--font-display);
}
.footer a { color: inherit; }
.footer__icons { display: flex; justify-content: center; gap: 1.8rem; margin-bottom: 0.6rem; }
.footer__icons a { display: inline-flex; opacity: 0.85; }
.footer__icons svg { width: 1.5rem; height: 1.5rem; }
.footer__icons a:hover { opacity: 1; color: var(--accent); }

/* ---------- 8. Schedule ----------------------------------------- */
.sched { --sched-line: var(--rule); margin: 1rem 0 0; }
.sched__banner {
  display: flex; gap: 0.8rem; align-items: flex-start;
  padding: 0.9rem 1.1rem; border-radius: var(--radius);
  background: var(--card-bg); border: 1px dashed var(--rule);
  font-size: 0.95em; margin: 0 0 1.2rem;
}
.section--dark .sched__banner { background: var(--card-bg-dark); }
.sched__banner svg { flex: none; width: 1.4em; height: 1.4em; margin-top: 0.15em; }

.sched__tabs {
  display: flex; gap: 0.4rem; flex-wrap: wrap;
  position: sticky; top: 0; z-index: 5;
  padding: 0.6rem 0; margin: 0 0 0.8rem;
  background: inherit;
}
@media (max-width: 1130px) { .sched__tabs { top: 44px; } }
.sched__tab {
  font-family: var(--font-nav); font-size: 0.95rem; letter-spacing: 0.04em;
  padding: 0.5em 1em; border-radius: 10px; border: 1.5px solid var(--rule);
  background: transparent; color: inherit; cursor: pointer;
  display: flex; flex-direction: column; align-items: flex-start; line-height: 1.2;
  transition: background 0.2s, color 0.2s, border-color 0.2s;
}
.sched__tab small { font-size: 0.7em; opacity: 0.75; letter-spacing: 0.12em; text-transform: uppercase; }
.sched__tab:hover { border-color: var(--accent); }
.sched__tab.is-active { background: var(--accent); color: var(--accent-fg); border-color: var(--accent); }
.sched__tab .count { font-size: 0.7em; opacity: 0.8; }
.sched__tab.is-today::after { content: "today"; font-size: 0.6em; letter-spacing: 0.15em; text-transform: uppercase; margin-top: 2px; opacity: 0.9; }

.sched__toolbar {
  display: flex; flex-wrap: wrap; gap: 0.5rem 0.8rem; align-items: center;
  margin: 0 0 1.2rem; font-size: 0.9rem;
}
.sched__filters { display: flex; flex-wrap: wrap; gap: 0.35rem; }
.chip {
  font-family: var(--font-nav); font-size: 0.78rem; letter-spacing: 0.06em; text-transform: uppercase;
  padding: 0.3em 0.75em; border-radius: var(--radius-pill); border: 1px solid var(--rule);
  background: transparent; color: inherit; cursor: pointer; opacity: 0.7; transition: all 0.2s;
}
.chip:hover { opacity: 1; }
.chip.is-on { opacity: 1; border-color: currentColor; background: var(--card-bg); }
.section--dark .chip.is-on { background: var(--card-bg-dark); }
.chip__dot { display: inline-block; width: 0.6em; height: 0.6em; border-radius: 50%; margin-right: 0.4em; background: var(--chip-color, currentColor); }
.sched__search {
  font: inherit; font-size: 0.9rem; padding: 0.4em 0.8em; min-width: 12rem; flex: 1 1 12rem;
  border-radius: 10px; border: 1px solid var(--rule); background: transparent; color: inherit;
}
.sched__search::placeholder { color: inherit; opacity: 0.55; }
.sched__tools { display: flex; gap: 0.4rem; flex-wrap: wrap; margin-left: auto; }
.sched__tz { font-size: 0.8rem; opacity: 0.8; }
.sched__tz label { cursor: pointer; display: inline-flex; align-items: center; gap: 0.35em; }

.sched__day { animation: sched-in 0.35s ease; }
@keyframes sched-in { from { opacity: 0; transform: translateY(6px); } to { opacity: 1; transform: none; } }
.sched__dayhead { display: flex; align-items: baseline; gap: 0.8rem; flex-wrap: wrap; margin: 0.4rem 0 1rem; }
.sched__dayhead h3 { margin: 0; }
.sched__dayhead .muted { font-size: 0.9em; }

.sched__list { list-style: none; padding: 0; margin: 0; }
.sched__item {
  display: grid; grid-template-columns: 5.6rem 1fr; gap: 0 1rem;
  padding: 0.85rem 0; border-top: 1px solid var(--sched-line);
  position: relative;
}
.sched__item:last-child { border-bottom: 1px solid var(--sched-line); }
.sched__item[hidden] { display: none; }
.sched__time { font-family: var(--font-nav); font-size: 0.92rem; line-height: 1.35; padding-top: 0.15rem; opacity: 0.9; white-space: nowrap; }
.sched__time .end { display: block; font-size: 0.8em; opacity: 0.65; }
.sched__body { min-width: 0; }
.sched__type {
  display: inline-block; font-family: var(--font-nav); font-size: 0.66rem; letter-spacing: 0.16em; text-transform: uppercase;
  color: #fff; background: var(--type-color, var(--muted)); padding: 0.18em 0.6em; border-radius: 6px; margin-bottom: 0.3rem;
}
html[data-theme="connectome"] .sched__type { color: var(--accent-fg); }
.sched__title { font-family: var(--font-display); font-size: 1.18rem; font-weight: 700; margin: 0; line-height: 1.25; }
html[data-theme="villa"] .sched__title { font-size: 1.45rem; }
.sched__theme { margin: 0.15rem 0 0; font-style: italic; opacity: 0.9; }
.sched__meta { font-size: 0.86em; opacity: 0.8; margin: 0.2rem 0 0; }
.sched__note { font-size: 0.92em; margin: 0.35rem 0 0; opacity: 0.9; }
.sched__item::before {
  content: ""; position: absolute; left: -1rem; top: 0.9rem; bottom: 0.9rem; width: 4px; border-radius: 4px;
  background: var(--type-color, var(--muted)); opacity: 0.9;
}
.sched__item--minor { padding: 0.45rem 0; }
.sched__item--minor .sched__title { font-size: 1rem; font-weight: 600; }
.sched__item--minor::before { opacity: 0.45; }
.sched__item.is-now { background: var(--card-bg); box-shadow: inset 0 0 0 1px var(--accent); border-radius: 10px; }
.sched__now { position: absolute; right: 0.5rem; top: 0.6rem; font-family: var(--font-nav); font-size: 0.65rem; letter-spacing: 0.18em; text-transform: uppercase; color: var(--accent); }
.sched__now::before { content: ""; display: inline-block; width: 0.5em; height: 0.5em; border-radius: 50%; background: var(--accent); margin-right: 0.4em; animation: pulse 1.4s infinite; }
@keyframes pulse { 0%, 100% { opacity: 1; } 50% { opacity: 0.3; } }

.talks { list-style: none; padding: 0; margin: 0.6rem 0 0; }
.talk { display: grid; grid-template-columns: 3.4rem 1fr; gap: 0 0.7rem; padding: 0.35rem 0; font-size: 0.95em; }
.talk__time { font-family: var(--font-nav); font-size: 0.85em; opacity: 0.7; padding-top: 0.1em; }
.talk__title { font-weight: 600; margin: 0; }
.talk__who { display: block; font-size: 0.9em; opacity: 0.85; }
.talk.is-tba .talk__title { font-weight: 400; opacity: 0.6; }
.talk.is-tba .talk__title::before { content: ""; display: inline-block; width: 0.6em; height: 0.6em; border: 1.5px dashed currentColor; border-radius: 3px; margin-right: 0.5em; vertical-align: 0.05em; opacity: 0.7; }
.talk details { margin-top: 0.2rem; }
.talk summary { cursor: pointer; font-size: 0.85em; opacity: 0.8; }
.talk__abstract { font-size: 0.92em; margin: 0.3rem 0 0.2rem; }
.talk mark, .sched__title mark, .sched__theme mark { background: var(--accent); color: var(--accent-fg); padding: 0 0.15em; border-radius: 3px; }

.sched__empty { padding: 2rem 1rem; text-align: center; opacity: 0.7; border: 1px dashed var(--rule); border-radius: var(--radius); }
.sched__foot { margin-top: 1.2rem; font-size: 0.85em; opacity: 0.8; display: flex; flex-wrap: wrap; gap: 0.4rem 1.2rem; }

@media (max-width: 560px) {
  .sched__item { grid-template-columns: 4.4rem 1fr; }
  .sched__item::before { left: -0.6rem; }
  .talk { grid-template-columns: 1fr; }
  .talk__time { font-size: 0.75em; }
  .sched__tools { margin-left: 0; }
}

/* compact embed on the home page: show the whole programme collapsed to sessions */
.sched--compact .sched__toolbar { display: none; }
.sched--compact .talk details { display: none; }

/* schedule page shell */
.page { background: var(--light-bg); color: var(--light-fg); min-height: 100vh; }
.page__head {
  background: var(--dark-bg); color: var(--dark-fg);
  padding: 1.6rem 0 1.4rem;
}
.page__head .section__inner { padding: 0; display: flex; align-items: center; gap: 1rem; flex-wrap: wrap; }
.page__head h1 { font-size: 1.7rem; margin: 0; }
.page__head .muted { opacity: 0.8; font-size: 0.95rem; }
.page__head img, .page__head svg.brand { width: 54px; height: 54px; flex: none; }
.page__back { margin-left: auto; font-family: var(--font-nav); text-transform: uppercase; letter-spacing: 0.1em; font-size: 0.8rem; text-decoration: none; opacity: 0.85; }
.page__back:hover { opacity: 1; }
.page .section__inner { padding-top: 2rem; }

/* ---------- 9. Theme switcher (design review) -------------------- */
.theme-switch {
  position: fixed; right: 14px; bottom: 14px; z-index: 60;
  display: flex; gap: 0.3rem; align-items: center;
  padding: 0.35rem 0.5rem; border-radius: var(--radius-pill);
  background: rgba(20, 20, 20, 0.82); color: #fff; backdrop-filter: blur(6px);
  font-family: var(--font-nav); font-size: 0.72rem; letter-spacing: 0.1em; text-transform: uppercase;
  box-shadow: var(--shadow);
}
.theme-switch span { padding: 0 0.4rem; opacity: 0.7; }
.theme-switch button {
  font: inherit; color: inherit; background: transparent; border: 1px solid rgba(255, 255, 255, 0.3);
  border-radius: var(--radius-pill); padding: 0.3em 0.7em; cursor: pointer;
}
.theme-switch button.is-on { background: #fff; color: #111; border-color: #fff; }
.theme-switch button:hover { border-color: #fff; }
@media print { .theme-switch, .sidenav, .hero__arrow { display: none !important; } }

/* ---------- 10. Print (schedule) --------------------------------- */
@media print {
  body { background: #fff; color: #000; font-size: 11pt; }
  .page__head { background: #fff; color: #000; border-bottom: 2px solid #000; }
  .sched__toolbar, .sched__tabs, .page__back { display: none !important; }
  .sched__day { display: block !important; break-inside: avoid; }
  .sched__day + .sched__day { page-break-before: always; }
  .sched__item::before { background: #000 !important; }
  .sched__type { border: 1px solid #000; color: #000 !important; background: #fff !important; }
  .talk details { display: block; }
  .talk summary { display: none; }
  a { text-decoration: none; }
}
