/* Layout: a warm, photographic welcome. The home page opens on volunteers at an alpine event at sunset, with the search right in the picture;
   opportunities follow as cards, then how it works and the alert sign-up. Other pages share the header, palette and cards. */
/* Palette: alpine green (c1, "Allez"), lake blue (c2, actions and "Hopp"), sunshine (acc). Light theme on warm paper; dark theme and the
   home-page photo band use the evening navy of the hero. Font: Hanken Grotesk. */
:root {
  --c1: #23926F;        /* logo, illustration, fills */
  --c1-text: #1A7558;   /* green for words on light backgrounds: 5.3:1 on --bg */
  --c2: #1D5DA4;        /* primary actions, links: 6.3:1 */
  --on-c2: #FFFFFF;
  --acc: #FFC83D;       /* sunshine accents, search button */
  --on-acc: #14222E;
  --c1-soft: #E1F2EA;
  --c2-soft: #E6EEF8;
  --acc-soft: #FFF2D2;
  --c3: #A8396A;        /* music: 6.1:1 on white */
  --c3-soft: #FBE7F0;

  --bg: #FAF7F2;        /* warm paper */
  --surface: #FFFFFF;
  --ink: #14222E;
  --muted: #56616C;
  --line: #E8E1D5;
  --focus: #1D5DA4;
  --shadow: 0 1px 2px rgba(20, 34, 46, .05), 0 12px 32px -20px rgba(20, 34, 46, .28);
  --shadow-hover: 0 2px 4px rgba(20, 34, 46, .06), 0 22px 44px -22px rgba(20, 34, 46, .38);

  --st-open: #1E7A4A;
  --st-partial: #955700;
  --st-soon: #1F6A88;
  --st-closed: #56616C;
  --st-done: #75818D;

  /* the evening palette of the home-page photo band (from the design hand-off) */
  --night: #0C1B27;
  --night-panel: #0B1F2D;
  --night-line: #244153;
  --night-text: #F6F8FA;
  --night-muted: #CCDAE4;
  --mint: #53D3AD;
  --sky: #78BAFF;
  --sun: #FFD04B;

  --f-display: "Hanken Grotesk", "Helvetica Neue", Helvetica, Arial, sans-serif;
  --f-body: "Hanken Grotesk", "Helvetica Neue", Helvetica, Arial, sans-serif;
  --display-track: -.03em;

  --radius: 20px;
  --wrap: 1120px;
  --content-max: 1320px;
  --gutter: 20px;
}
@media (min-width: 768px) { :root { --gutter: 32px; } }
@media (min-width: 900px) { :root { --gutter: 44px; } }
@media (min-width: 1200px) { :root { --gutter: 48px; } }
@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) {
    --c1: #53D3AD; --c1-text: #53D3AD; --c2: #78BAFF; --on-c2: #0C1B27; --acc: #FFD04B; --on-acc: #0C1B27;
    --c1-soft: #12322C; --c2-soft: #132B43; --acc-soft: #33291A; --c3: #F09AC0; --c3-soft: #3A2133;
    --bg: #0C1B27; --surface: #11263A; --ink: #F6F8FA; --muted: #B4C3CF; --line: #244153; --focus: #78BAFF;
    --shadow: 0 1px 2px rgba(0, 0, 0, .2), 0 14px 32px -22px rgba(0, 0, 0, .7);
    --shadow-hover: 0 2px 4px rgba(0, 0, 0, .25), 0 24px 44px -22px rgba(0, 0, 0, .8);
    --st-open: #66CC94; --st-partial: #F2B457; --st-soon: #7CC6E0; --st-closed: #B4C3CF; --st-done: #8E9BA8;
    color-scheme: dark;
  }
}
:root[data-theme="dark"] {
  --c1: #53D3AD; --c1-text: #53D3AD; --c2: #78BAFF; --on-c2: #0C1B27; --acc: #FFD04B; --on-acc: #0C1B27;
  --c1-soft: #12322C; --c2-soft: #132B43; --acc-soft: #33291A; --c3: #F09AC0; --c3-soft: #3A2133;
  --bg: #0C1B27; --surface: #11263A; --ink: #F6F8FA; --muted: #B4C3CF; --line: #244153; --focus: #78BAFF;
  --shadow: 0 1px 2px rgba(0, 0, 0, .2), 0 14px 32px -22px rgba(0, 0, 0, .7);
  --shadow-hover: 0 2px 4px rgba(0, 0, 0, .25), 0 24px 44px -22px rgba(0, 0, 0, .8);
  --st-open: #66CC94; --st-partial: #F2B457; --st-soon: #7CC6E0; --st-closed: #B4C3CF; --st-done: #8E9BA8;
  color-scheme: dark;
}
/* The photo band is always an evening scene, whatever the theme: its controls use the night palette. */
.stage, .top.on-photo {
  --c1: var(--mint); --c1-text: var(--mint); --c2: var(--sky); --on-c2: var(--night); --acc: var(--sun); --on-acc: var(--night);
  --bg: var(--night); --surface: var(--night-panel); --ink: var(--night-text); --muted: var(--night-muted); --line: var(--night-line); --focus: var(--sky);
  color-scheme: dark;
}

* { box-sizing: border-box; }
[hidden] { display: none !important; }
html { scroll-behavior: smooth; }
@media (prefers-reduced-motion: reduce) { html { scroll-behavior: auto; } *, *::before, *::after { transition: none !important; } }
body {
  margin: 0; background: var(--bg); color: var(--ink);
  font: 400 17px/1.6 var(--f-body);
  padding-inline: 20px;
  -webkit-font-smoothing: antialiased;
}
body.home { padding-inline: 0; }
.wrap { max-width: var(--wrap); margin-inline: auto; }
.container { width: min(100% - 2 * var(--gutter), var(--content-max)); margin-inline: auto; }
.home .wrap.container { max-width: none; }
h1, h2, h3 { font-family: var(--f-display); margin: 0; line-height: 1.05; text-wrap: balance; letter-spacing: var(--display-track, -.02em); }
p { margin: 0; }
a { color: var(--c2); }
:focus-visible { outline: 2px solid var(--focus); outline-offset: 3px; border-radius: 8px; }
svg { display: block; }

.eyebrow { font-weight: 700; font-size: 13px; letter-spacing: .1em; text-transform: uppercase; color: var(--c1-text); }

/* ---------- Header (all pages) ---------- */
.top { display: flex; align-items: center; gap: 16px; padding-block: 20px; }
.brand { display: inline-flex; align-items: center; gap: 10px; text-decoration: none; flex: none; }
.brand svg { width: 40px; height: 40px; }
.wordmark { font-family: var(--f-display); font-weight: 800; font-size: 24px; letter-spacing: var(--display-track, -.02em); line-height: 1; }
.f-c1 { fill: var(--c1); } .s-c1 { stroke: var(--c1); }
.f-c2 { fill: var(--c2); } .s-c2 { stroke: var(--c2); }
.f-acc { fill: var(--acc); } .s-acc { stroke: var(--acc); }
.wordmark .a { color: var(--c1); }
.wordmark .h { color: var(--c2); }
.nav { display: flex; align-items: center; gap: 4px; margin-left: clamp(12px, 3vw, 44px); }
.nav a { position: relative; display: inline-flex; align-items: center; min-height: 40px; padding: 0 12px; border-radius: 10px;
  font: 600 15px/1 var(--f-body); color: var(--ink); text-decoration: none; opacity: .86; }
.nav a:hover { opacity: 1; background: color-mix(in srgb, var(--ink) 7%, transparent); }
.nav a.is-current { opacity: 1; }
.nav a.is-current::after { content: ""; position: absolute; left: 12px; right: 12px; bottom: 3px; height: 2px; border-radius: 2px; background: var(--c1); }
.top-actions { display: flex; align-items: center; gap: 10px; margin-left: auto; }
.theme-switch { display: inline-flex; gap: 2px; background: var(--surface); border: 1px solid var(--line); border-radius: 999px; padding: 3px; }
.theme-switch button { width: 32px; height: 30px; display: grid; place-items: center; border: 0; border-radius: 999px; background: transparent; color: var(--muted); cursor: pointer; }
.theme-switch button svg { width: 17px; height: 17px; }
.theme-switch button[aria-pressed="true"] { background: var(--c2-soft); color: var(--c2); }
.theme-switch button:hover { color: var(--ink); }
.lang-select { position: relative; display: inline-flex; align-items: center; color: var(--ink); }
.lang-select select {
  appearance: none; -webkit-appearance: none; cursor: pointer;
  font: 600 15px/1 var(--f-body); color: var(--ink); background: var(--surface);
  border: 1px solid var(--line); border-radius: 999px; padding: 11px 36px 11px 38px;
}
.lang-select select:hover { border-color: var(--c2); }
.lang-select svg { position: absolute; width: 18px; height: 18px; pointer-events: none; color: var(--muted); }
.lang-select svg:first-child { left: 13px; }
.lang-select svg.chev { right: 13px; width: 15px; height: 15px; }
.nav-toggle { display: none; width: 44px; height: 44px; place-items: center; border: 1px solid var(--line); border-radius: 12px; background: var(--surface); color: var(--ink); cursor: pointer; }
.nav-toggle svg { width: 22px; height: 22px; }
.nav-toggle path { transition: transform .2s ease, opacity .2s ease; transform-origin: 12px 12px; }
.nav-toggle[aria-expanded="true"] .l1 { transform: translateY(5px) rotate(45deg); }
.nav-toggle[aria-expanded="true"] .l2 { opacity: 0; }
.nav-toggle[aria-expanded="true"] .l3 { transform: translateY(-5px) rotate(-45deg); }

/* Header over the home-page photo */
.top.on-photo { position: absolute; top: 0; left: 0; right: 0; z-index: 5; padding-block: 18px; color: var(--ink); }
.top.on-photo .nav a { color: #fff; opacity: .92; text-shadow: 0 1px 8px rgba(0, 0, 0, .35); }
.top.on-photo .nav a:hover { background: rgba(255, 255, 255, .12); opacity: 1; }
.top.on-photo .theme-switch { background: rgba(11, 31, 45, .62); border-color: rgba(255, 255, 255, .16); -webkit-backdrop-filter: blur(10px); backdrop-filter: blur(10px); }
.top.on-photo .theme-switch button { color: var(--night-muted); }
.top.on-photo .theme-switch button[aria-pressed="true"] { background: var(--sky); color: var(--night); }
.top.on-photo .lang-select select { background: transparent; border-color: transparent; color: #fff; text-shadow: 0 1px 8px rgba(0, 0, 0, .35); }
.top.on-photo .lang-select select:hover { border-color: rgba(255, 255, 255, .35); }
.top.on-photo .lang-select svg { color: #fff; }
.top.on-photo .lang-select select option { color: var(--night-text); background: var(--night-panel); }
.top.on-photo .nav-toggle { background: rgba(11, 31, 45, .62); border-color: rgba(255, 255, 255, .18); color: #fff; -webkit-backdrop-filter: blur(10px); backdrop-filter: blur(10px); }

@media (max-width: 899px) {
  .top { display: grid; grid-template-columns: minmax(0, 1fr) auto auto; gap: 10px; padding-block: 14px; }
  .brand { grid-row: 1; grid-column: 1; }
  .brand svg { width: 36px; height: 36px; }
  .wordmark { font-size: 22px; }
  .top-actions { display: contents; }
  .lang-select { grid-row: 1; grid-column: 2; }
  .lang-select select { padding: 11px 30px 11px 34px; font-size: 14.5px; }
  .lang-select svg:first-child { left: 11px; }
  .lang-select svg.chev { right: 10px; }
  .nav-toggle { display: grid; grid-row: 1; grid-column: 3; }
  .nav { display: none; grid-row: 2; grid-column: 1 / -1; margin: 4px 0 0; flex-direction: column; align-items: stretch; gap: 0; }
  .nav a { min-height: 48px; font-size: 16.5px; border-radius: 0; border-top: 1px solid var(--line); padding-inline: 4px; }
  .nav a:hover { background: transparent; }
  .nav a.is-current::after { left: 4px; right: auto; width: 22px; bottom: 7px; }
  .theme-switch { display: none; grid-row: 3; grid-column: 1 / -1; justify-self: start; margin-bottom: 4px; }
  /* open menu: the header becomes a sheet reaching the screen edges */
  .top { --menu-bg: var(--bg); }
  .top.menu-open { position: relative; z-index: 20; background: var(--menu-bg);
    box-shadow: 0 0 0 var(--gutter) var(--menu-bg), 0 40px 40px -10px rgba(12, 27, 39, .35); }
  .top.on-photo.menu-open { position: absolute; --menu-bg: var(--night-panel); }
  .top.menu-open .nav { display: flex; }
  .top.menu-open .theme-switch { display: inline-flex; }
  .top.on-photo .nav a { text-shadow: none; }
}
@media (max-width: 479px) {
  .lang-select svg:first-child { display: none; }
  .lang-select select { padding-left: 12px; }
}

/* ---------- Buttons ---------- */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 10px;
  font: 700 16px/1.2 var(--f-body); text-decoration: none; cursor: pointer;
  padding: 14px 22px; border-radius: 999px; border: 1.5px solid transparent;
  transition: transform .18s ease, box-shadow .18s ease, background-color .18s ease, border-color .18s ease;
}
.btn svg { width: 18px; height: 18px; flex: none; }
.btn-primary { background: var(--c2); color: var(--on-c2); box-shadow: 0 10px 22px -12px color-mix(in srgb, var(--c2) 70%, transparent); }
.btn-primary:hover { transform: translateY(-1px); box-shadow: 0 14px 26px -12px color-mix(in srgb, var(--c2) 80%, transparent); }
.btn-soft { background: var(--c1-soft); color: var(--ink); }
.btn-soft:hover { transform: translateY(-1px); }

/* ---------- Home: photo band with the search ---------- */
.stage { position: relative; isolation: isolate; overflow: hidden; background: var(--night); color: var(--ink);
  border-radius: 0 0 32px 32px; padding: 100px 0 28px; }
/* The photo spans the full width (so the sun on the right and both volunteers stay in frame) and fades into the evening navy
   behind the search panel; on narrower screens it keeps covering most of the band and crops from the left. */
.stage-photo { position: absolute; top: 0; left: 0; right: 0; height: max(calc(100vw * 809 / 1942), 76%); z-index: -2; display: block; }
.stage-photo img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; object-position: 85% top; }
.stage-photo::after { content: ""; position: absolute; inset: auto 0 0; height: 34%; background: linear-gradient(0deg, var(--night), rgba(12, 27, 39, 0)); }
/* Warm ink shade behind the words (the illustration is detailed: snow patches, trees), clearing by mid-width so the
   scene stays vivid on the right; a light shade at the top for the header and a navy fade at the bottom for the panel. */
.stage::before { content: ""; position: absolute; inset: 0; z-index: -1; pointer-events: none;
  background:
    radial-gradient(ellipse 46% 62% at 20% 42%, rgba(20, 22, 30, .42), rgba(20, 22, 30, 0) 70%),
    linear-gradient(90deg, rgba(20, 22, 30, .82) 0%, rgba(22, 26, 36, .7) 30%, rgba(26, 30, 40, .32) 48%, rgba(26, 30, 40, 0) 60%),
    linear-gradient(180deg, rgba(20, 22, 30, .42) 0, rgba(20, 22, 30, 0) 100px),
    linear-gradient(0deg, rgba(12, 27, 39, .8) 0, rgba(12, 27, 39, .18) 30%, rgba(12, 27, 39, 0) 46%); }
.hero-copy { display: grid; gap: 14px; justify-items: start; }
.lede { max-width: 600px; }
.hero-copy .eyebrow { color: var(--mint); font-size: 12px; letter-spacing: .11em; text-shadow: 0 1px 10px rgba(0, 0, 0, .3); }
.hero-copy h1 { font-size: clamp(40px, 4.4vw, 64px); font-weight: 800; line-height: .98; letter-spacing: -.033em; color: #fff;
  text-shadow: 0 2px 24px rgba(0, 0, 0, .25); margin-top: -2px; }
.hero-copy h1 .line2 { display: block; color: var(--mint); }
.lede { font-size: 16px; line-height: 1.45; color: #E4ECF2; max-width: 27em; text-wrap: pretty; text-shadow: 0 1px 12px rgba(0, 0, 0, .35); }
.ctas { display: flex; flex-wrap: wrap; gap: 12px; margin-top: 6px; }
.stage .btn { font-size: 15px; padding: 12px 22px; min-height: 46px; }
.stage .btn-primary { background: var(--sky); color: var(--night); box-shadow: 0 12px 28px -14px rgba(120, 186, 255, .8); }
.btn-ghost-dark { background: rgba(11, 31, 45, .7); color: #fff; border-color: rgba(255, 255, 255, .2); -webkit-backdrop-filter: blur(8px); backdrop-filter: blur(8px); }
.btn-ghost-dark:hover { border-color: rgba(255, 255, 255, .45); transform: translateY(-1px); }
.trust { display: flex; align-items: flex-start; gap: 8px; font-size: 13.5px; line-height: 1.4; color: #DCE6EE; margin-top: 2px; text-shadow: 0 1px 10px rgba(0, 0, 0, .4); }
.trust svg { width: 17px; height: 17px; color: var(--mint); flex: none; margin-top: 0; }

/* Search panel */
.search { display: grid; gap: 14px; margin-top: 24px; padding: 16px 16px 14px;
  background: rgba(11, 31, 45, .93); border: 1px solid var(--night-line); border-radius: 18px;
  box-shadow: 0 24px 60px -28px rgba(0, 0, 0, .7); -webkit-backdrop-filter: blur(12px); backdrop-filter: blur(12px); }
.search-row { display: grid; grid-template-columns: minmax(0, 1.75fr) minmax(0, 1fr) minmax(0, 1fr) minmax(0, .8fr) auto; gap: 12px; align-items: end; }
.sf { display: grid; gap: 6px; min-width: 0; }
.sf label { font-size: 12.5px; font-weight: 600; letter-spacing: .01em; color: var(--muted); }
.sf input, .sf select { width: 100%; min-width: 0; font: 500 15px/1.2 var(--f-body); color: var(--ink); background: rgba(255, 255, 255, .04); border: 1px solid var(--line);
  border-radius: 12px; padding: 0 12px; height: 46px; box-sizing: border-box; color-scheme: dark; }
.sf input::placeholder { color: color-mix(in srgb, var(--muted) 80%, transparent); }
.sf input:hover, .sf select:hover { border-color: color-mix(in srgb, var(--c2) 70%, var(--line)); }
.sf input:focus, .sf select:focus { border-color: var(--c2); outline: none; box-shadow: 0 0 0 3px color-mix(in srgb, var(--c2) 30%, transparent); }
.sf-box { position: relative; }
.sf-box > svg { position: absolute; left: 12px; top: 50%; width: 18px; height: 18px; transform: translateY(-50%); color: var(--muted); pointer-events: none; }
.sf .sf-box input, .sf .sf-selbox select { padding-left: 38px; }
.sf-selbox select { appearance: none; -webkit-appearance: none; cursor: pointer; padding-right: 30px;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23CCDAE4' stroke-width='2.4' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='m6 9 6 6 6-6'/%3E%3C/svg%3E");
  background-repeat: no-repeat; background-position: right 10px center; background-size: 15px; }
.sf-selbox select option, .canton-pick select option { background: var(--night-panel); color: var(--night-text); }
.sf select:disabled { opacity: .5; cursor: not-allowed; }
.sf-datebox .dtext { padding-left: 12px !important; padding-right: 40px; font-variant-numeric: tabular-nums; }
.sf-datebox .cal { position: absolute; right: 4px; top: 50%; transform: translateY(-50%); width: 36px; height: 38px; display: grid; place-items: center;
  border: 0; border-radius: 9px; background: transparent; color: var(--muted); cursor: pointer; }
.sf-datebox .cal:hover { color: var(--ink); background: rgba(255, 255, 255, .08); }
.sf-datebox .cal svg { width: 18px; height: 18px; }
.sf-datebox .native { position: absolute; left: 0; bottom: 0; width: 100%; height: 1px; opacity: 0; pointer-events: none; border: 0; padding: 0; }
.sf .sf-box input::-webkit-calendar-picker-indicator { display: none !important; }   /* hide the datalist arrow: suggestions appear while typing */
.btn-search { display: inline-flex; align-items: center; justify-content: center; gap: 8px; height: 48px; padding: 0 16px 0 18px; border: 0; border-radius: 999px;
  background: var(--sun); color: var(--night); font: 700 15px/1 var(--f-body); white-space: nowrap; cursor: pointer;
  box-shadow: 0 12px 26px -14px rgba(255, 208, 75, .7); transition: transform .18s ease, filter .18s ease; }
.btn-search:hover { transform: translateY(-1px); filter: brightness(1.04); }
.btn-search svg { width: 18px; height: 18px; flex: none; }
.btn-search .arr { width: 16px; height: 16px; margin-left: 2px; }
.search-row2 { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 12px 16px; }
.chips { display: flex; flex-wrap: wrap; gap: 8px; }
.chip { display: inline-flex; align-items: center; gap: 8px; min-height: 40px; font: 600 14.5px/1 var(--f-body); padding: 4px 16px 4px 5px; border-radius: 999px;
  border: 1px solid var(--line); background: rgba(255, 255, 255, .03); color: var(--ink); cursor: pointer; transition: background-color .15s ease, border-color .15s ease; }
.chip#chip-all { padding-inline: 20px; }
.chip .ic { width: 30px; height: 30px; border-radius: 50%; display: grid; place-items: center; }
.chip .ic svg { width: 16px; height: 16px; }
.chip.sport .ic { background: rgba(83, 211, 173, .16); color: var(--mint); }
.chip.music .ic { background: rgba(240, 154, 192, .16); color: #F09AC0; }
.chip.culture .ic { background: rgba(120, 186, 255, .16); color: var(--sky); }
.chip.community .ic { background: rgba(255, 176, 102, .16); color: #FFB066; }
.chip:hover { border-color: color-mix(in srgb, var(--c2) 70%, var(--line)); }
.chip[aria-pressed="true"] { background: var(--night-text); border-color: var(--night-text); color: var(--night); }
.chip.sport[aria-pressed="true"] .ic { background: #D5F4EA; color: #17775A; }
.chip.music[aria-pressed="true"] .ic { background: #FBE2EE; color: #A8396A; }
.chip.culture[aria-pressed="true"] .ic { background: #DCEBFC; color: #1D5DA4; }
.chip.community[aria-pressed="true"] .ic { background: #FFE9D4; color: #A2520A; }
.filter-right { display: flex; flex-wrap: wrap; align-items: center; gap: 10px 18px; margin-left: auto; }
.toggle { display: inline-flex; align-items: center; gap: 10px; font-weight: 600; font-size: 15px; cursor: pointer; }
.toggle input { width: 19px; height: 19px; accent-color: var(--c2); margin: 0; }
.search .toggle { font-size: 14.5px; color: var(--ink); }
.canton-pick select { font: 600 14.5px/1 var(--f-body); color: var(--ink); background-color: var(--surface); border: 1px solid var(--line); border-radius: 999px; padding: 0 34px 0 14px; height: 40px; cursor: pointer; width: auto;
  appearance: none; -webkit-appearance: none;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23CCDAE4' stroke-width='2.4' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='m6 9 6 6 6-6'/%3E%3C/svg%3E");
  background-repeat: no-repeat; background-position: right 12px center; background-size: 14px; }
.canton-pick select:hover { border-color: color-mix(in srgb, var(--c2) 70%, var(--line)); }
.sf-reset { font: 600 14px/1 var(--f-body); color: var(--muted); background: transparent; border: 0; min-height: 40px; padding: 0 4px; cursor: pointer; text-decoration: underline; text-underline-offset: 3px; }
.sf-reset:hover { color: var(--ink); }
.sr { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }

@media (min-width: 1200px) {
  .stage { padding-top: 132px; padding-bottom: 36px; }
  .hero-copy { gap: 16px; }
  .hero-copy .eyebrow { font-size: 13px; }
  .lede { font-size: 18px; }
  .trust { font-size: 14.5px; }
  .search { padding: 18px 20px 16px; }
}
@media (max-width: 1199px) {
  .search-row { grid-template-columns: minmax(170px, 1.4fr) minmax(146px, 1fr) minmax(146px, 1fr) minmax(92px, .7fr) auto; gap: 10px; }
  .btn-search .arr { display: none; }
  .sf-km .sf-box > svg { display: none; }
  .sf .sf-selbox select { padding-left: 12px; }
  .sf input, .sf select { font-size: 14.5px; }
  .sf-datebox .dtext { font-size: 14px; }
  .sf-datebox .dtext { padding-left: 10px !important; padding-right: 34px; }
  .sf-datebox .cal { width: 30px; right: 3px; }
}
@media (max-width: 959px) {
  .search-row { grid-template-columns: repeat(4, minmax(0, 1fr)); }
  .sf-place { grid-column: span 2; }
  .btn-search { grid-column: span 3; justify-self: end; }
}
@media (max-width: 899px) {
  .stage { padding: 0 0 20px; border-radius: 0 0 24px 24px; }
  .stage::before { display: none; }
  .stage-photo { position: relative; inset: auto; z-index: 0; height: clamp(270px, 44vw, 380px); }
  .stage-photo img { object-position: 72% center; }
  .stage-photo::after { content: ""; position: absolute; inset: 0;
    height: auto; background: linear-gradient(180deg, rgba(12, 27, 39, .78) 0, rgba(12, 27, 39, .35) 70px, rgba(12, 27, 39, 0) 120px), linear-gradient(0deg, var(--night) 0, rgba(12, 27, 39, 0) 70px); }
  .stage-inner { margin-top: -6px; position: relative; }
  .hero-copy { gap: 14px; }
  .hero-copy h1 { font-size: clamp(36px, 6vw, 48px); line-height: 1.04; }
  .lede { font-size: 16px; line-height: 1.5; }
  .search { margin-top: 22px; background: var(--night-panel); }
  .chip, .canton-pick select, .sf-reset { min-height: 44px; }
  .canton-pick select { height: 44px; }
}
@media (max-width: 599px) {
  .ctas { display: grid; width: 100%; }
  .ctas .btn { width: 100%; min-height: 48px; }
  .search { padding: 14px; }
  .search-row { grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: 12px 10px; }
  .sf-place, .sf-km, .btn-search { grid-column: 1 / -1; }
  .btn-search { justify-self: stretch; height: 50px; }
  .search-row2 { display: grid; }
  .filter-right { display: grid; justify-items: start; gap: 10px; margin-left: 0; }
}
@media (max-width: 380px) { .sf-date { grid-column: 1 / -1; } }

/* ---------- Sections ---------- */
section { padding-block: 72px; }
.section-head { display: grid; gap: 10px; margin-bottom: 30px; max-width: 44em; }
.section-head h2 { font-size: clamp(30px, 4vw, 46px); font-weight: 800; }
.section-head p { color: var(--muted); }
.home #missions { padding-top: 40px; }
.results-head { display: flex; align-items: flex-end; justify-content: space-between; gap: 14px 24px; flex-wrap: wrap; max-width: none; }
.results-head > div { display: grid; gap: 10px; max-width: 44em; }
.results-head h2:focus { outline: none; }
.results-head h2:focus-visible { outline: 2px solid var(--focus); }
.count { font-size: 14.5px; font-weight: 600; color: var(--muted); font-variant-numeric: tabular-nums; }
.results-head .count:not(:empty) { background: var(--surface); border: 1px solid var(--line); border-radius: 999px; padding: 8px 14px; }

/* ---------- Opportunities ---------- */
.jump { position: fixed; left: 50%; bottom: calc(18px + env(safe-area-inset-bottom)); transform: translateX(-50%); z-index: 40;
  font: 700 15.5px/1 var(--f-body); color: var(--on-c2, #fff); background: var(--c2); border: 0; border-radius: 999px; padding: 15px 22px;
  box-shadow: 0 14px 30px -12px rgba(15, 26, 38, .55); cursor: pointer; white-space: nowrap; }
.jump[hidden] { display: none; }
.search-note { margin: -10px 0 18px; font-size: 14.5px; color: var(--st-partial); }
.later { margin: 18px 0 0; font-size: 15px; color: var(--muted); }
.later-btn { font: 700 15px/1 var(--f-body); color: var(--c2); background: none; border: 0; padding: 4px 2px; cursor: pointer; text-decoration: underline; text-underline-offset: 3px; }
.facts .dist { color: var(--muted); font-weight: 500; }

.cards { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 18px; }
@media (max-width: 980px) { .cards { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
@media (max-width: 640px) { .cards { grid-template-columns: minmax(0, 1fr); } }
.card {
  background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius);
  padding: 20px; display: grid; gap: 14px; grid-template-rows: auto auto auto 1fr auto; min-width: 0; overflow: hidden;
  box-shadow: var(--shadow); transition: transform .2s ease, box-shadow .2s ease, border-color .2s ease;
}
.card:hover { transform: translateY(-3px); box-shadow: var(--shadow-hover); }
.card.is-past { background: transparent; }
/* Picture at the top of each card: organizer photo (cover), logo or poster (contain), or a category tile */
.card-media { position: relative; margin: -20px -20px 0; aspect-ratio: 16 / 9; overflow: hidden; display: grid; place-items: center; }
.card-media.sport { background: var(--c1-soft); color: var(--c1-text); }
.card-media.music { background: var(--c3-soft); color: var(--c3); }
.card-media.culture { background: var(--c2-soft); color: var(--c2); }
.card-media.community { background: var(--acc-soft); color: var(--st-partial); }
.card-media img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; object-position: center 35%; }
.card-media.contain img { object-fit: contain; padding: 22px 28px; }
.card-media.left img { object-position: 5% 50%; }   /* wide banners whose right end carries text (image_fit cover_left) */
.card-media.contain.has-img { background: #F3F5F7; }   /* logos and posters stay legible in dark mode too */
.card-media.contain.dark.has-img { background: #14202B; }   /* light-coloured logos (yellow, white) */
.card-media .tile { width: 64px; height: 64px; opacity: .55; }
.card-media.has-img .tile { display: none; }
.card-media .credit { position: absolute; right: 8px; bottom: 8px; max-width: calc(100% - 16px); font-size: 11.5px; line-height: 1.3; padding: 3px 8px; border-radius: 999px;
  background: rgba(15, 26, 38, .62); color: #fff; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.card-media.contain .credit { background: rgba(15, 26, 38, .45); }
.card-top { display: flex; align-items: center; justify-content: space-between; gap: 10px; flex-wrap: wrap; }
.cat { display: inline-flex; align-items: center; gap: 8px; font-weight: 700; font-size: 14px; }
.cat .ic { width: 34px; height: 34px; border-radius: 12px; display: grid; place-items: center; }
.cat .ic svg { width: 19px; height: 19px; }
.cat.sport .ic { background: var(--c1-soft); color: var(--c1-text); }
.cat.music .ic { background: var(--c3-soft); color: var(--c3); }
.cat.culture .ic { background: var(--c2-soft); color: var(--c2); }
.cat.community .ic { background: var(--acc-soft); color: var(--st-partial); }
.card h3 { font-size: 22px; font-weight: 700; line-height: 1.15; }
.facts { list-style: none; margin: 0; padding: 0; display: grid; gap: 8px; font-size: 15.5px; align-content: start; }
.facts li { display: grid; grid-template-columns: 18px minmax(0, 1fr); gap: 10px; align-items: start; }
.facts svg { width: 18px; height: 18px; margin-top: 3px; color: var(--muted); }
.facts .sub { color: var(--muted); }
.status {
  --c: var(--st-done);
  display: inline-flex; align-items: center; gap: 8px; font-weight: 700; font-size: 14.5px; color: var(--c);
  background: color-mix(in srgb, var(--c) 11%, transparent); border-radius: 12px; padding: 9px 12px; width: fit-content;
}
.status svg { width: 17px; height: 17px; flex: none; }
.status.open { --c: var(--st-open); }
.status.partially_full { --c: var(--st-partial); }
.status.not_open { --c: var(--st-soon); }
.status.closed { --c: var(--st-closed); }
.status.finished { --c: var(--st-done); }
.status.unknown { --c: var(--st-closed); }
.card-foot { display: grid; gap: 10px; border-top: 1px dashed var(--line); padding-top: 14px; }
.verified { font-size: 13.5px; color: var(--muted); display: inline-flex; align-items: center; gap: 6px; }
.verified svg { width: 15px; height: 15px; color: var(--st-open); }
.act {
  font: 700 15px/1.25 var(--f-body); text-align: center; text-decoration: none; cursor: pointer;
  padding: 12px 14px; border-radius: 14px; border: 1.5px solid var(--line); background: transparent; color: var(--ink);
}
.act:hover { border-color: var(--c2); color: var(--c2); }
.act.main { background: var(--c2); border-color: var(--c2); color: var(--on-c2); }
.act.main:hover { color: var(--on-c2); filter: brightness(1.06); }
.demo-note { font-size: 13.5px; color: var(--muted); background: var(--acc-soft); border-radius: 10px; padding: 8px 10px; }
.empty { padding: 26px; border: 1.5px dashed var(--line); border-radius: var(--radius); color: var(--muted); }
.sample-note { margin-top: 16px; font-size: 14px; color: var(--muted); }

/* ---------- Steps ---------- */
.steps-band { background: linear-gradient(135deg, var(--acc-soft), color-mix(in srgb, var(--c1-soft) 70%, var(--acc-soft))); border-radius: 32px; padding: 44px clamp(20px, 4vw, 48px); }
.steps { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 28px; }
.step { display: grid; gap: 10px; align-content: start; }
.step-num {
  width: 52px; height: 52px; border-radius: 50%; display: grid; place-items: center;
  font: 800 24px/1 var(--f-display); background: var(--surface); color: var(--c2);
  box-shadow: inset 0 0 0 2px var(--c2);
}
.step:nth-child(2) .step-num { color: var(--c1-text); box-shadow: inset 0 0 0 2px var(--c1); }
.step:nth-child(3) .step-num { background: var(--acc); color: var(--on-acc); box-shadow: none; }
.step h3 { font-size: 22px; font-weight: 700; }
.step p { color: var(--muted); }
@media (max-width: 760px) { .steps { grid-template-columns: minmax(0, 1fr); } }

/* ---------- Why ---------- */
.why { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 18px; }
.why-item { display: grid; gap: 10px; align-content: start; }
.why-item { background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); padding: 22px; box-shadow: var(--shadow); }
.why-item .ic { width: 48px; height: 48px; border-radius: 16px; display: grid; place-items: center; }
.why-item .ic svg { width: 24px; height: 24px; }
.why-item:nth-child(1) .ic { background: var(--c1-soft); color: var(--c1-text); }
.why-item:nth-child(2) .ic { background: var(--c2-soft); color: var(--c2); }
.why-item:nth-child(3) .ic { background: var(--acc-soft); color: var(--st-partial); }
.why-item:nth-child(4) .ic { background: color-mix(in srgb, var(--st-open) 12%, transparent); color: var(--st-open); }
.why-item h3 { font-size: 20px; font-weight: 700; }
.why-item p { color: var(--muted); font-size: 16px; }
@media (max-width: 900px) { .why { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 28px 18px; } }
@media (max-width: 480px) { .why { grid-template-columns: minmax(0, 1fr); } }

/* ---------- Alerts ---------- */
.alerts { background: var(--surface); border: 1px solid var(--line); border-radius: 32px; box-shadow: var(--shadow); padding: clamp(24px, 4vw, 48px); display: grid; grid-template-columns: minmax(0, .9fr) minmax(0, 1.1fr); gap: 40px; position: relative; overflow: hidden; }
.alerts::before { content: ""; position: absolute; width: 280px; height: 280px; border-radius: 50%; background: var(--c1-soft); top: -120px; left: -100px; }
.alerts > * { position: relative; }
.alerts-copy { display: grid; gap: 14px; align-content: start; }
.alerts-copy h2 { font-size: clamp(32px, 4.4vw, 52px); font-weight: 800; }
.alerts-copy p { color: var(--muted); }
form { display: grid; gap: 18px; }
.field { display: grid; gap: 8px; }
.field > label, legend { font-weight: 700; font-size: 15px; }
input[type="email"], input[type="text"], input[type="url"], textarea, select {
  font: 400 16px/1.2 var(--f-body); color: var(--ink); background: var(--bg);
  border: 1.5px solid var(--line); border-radius: 14px; padding: 14px 16px; width: 100%;
}
input[type="email"]:focus, input[type="text"]:focus, input[type="url"]:focus, textarea:focus, select:focus { border-color: var(--c2); outline: none; box-shadow: 0 0 0 4px color-mix(in srgb, var(--c2) 22%, transparent); }
fieldset { border: 0; padding: 0; margin: 0; }
legend { padding: 0; margin-bottom: 10px; }
.pills { display: flex; flex-wrap: wrap; gap: 8px; }
.pick { position: relative; }
.pick input { position: absolute; inset: 0; opacity: 0; margin: 0; cursor: pointer; }
.pick span { display: inline-block; padding: 11px 16px; border-radius: 999px; border: 1.5px solid var(--line); background: var(--bg); font-weight: 600; font-size: 15px; }
.pick input:checked + span { background: var(--c2-soft); border-color: var(--c2); color: var(--ink); }
.pick input:checked + span::before { content: "✓ "; color: var(--c2); }
.pick input:focus-visible + span { outline: 3px solid var(--focus); outline-offset: 2px; }
.form-foot { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 14px; }
.fine { font-size: 14px; color: var(--muted); max-width: 26em; }
.form-msg { border-radius: 14px; padding: 14px 16px; font-size: 15px; background: color-mix(in srgb, var(--st-open) 11%, transparent); }
.form-msg.err { background: var(--c1-soft); }
textarea { min-height: 96px; resize: vertical; line-height: 1.45; }
.row2 { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 18px; }
@media (max-width: 560px) { .row2 { grid-template-columns: minmax(0, 1fr); } }
.suggest::before { background: var(--c2-soft); left: auto; right: -110px; top: auto; bottom: -130px; }
.suggest-link { font-weight: 700; color: var(--c2); }
#proposer { margin-top: 32px; }
.hp { position: absolute; left: -9999px; width: 1px; height: 1px; overflow: hidden; }

@media (max-width: 860px) {
  .alerts { grid-template-columns: minmax(0, 1fr); gap: 28px; }
}

footer { padding-block: 32px 44px; display: flex; flex-wrap: wrap; justify-content: space-between; gap: 12px 24px; font-size: 14.5px; color: var(--muted); border-top: 1px solid var(--line); margin-top: 32px; }

/* ---------- Secondary pages ---------- */
.back { display: inline-flex; align-items: center; gap: 6px; font-weight: 700; color: var(--c2); text-decoration: none; margin: 8px 0 20px; }
.back:hover { text-decoration: underline; }
.page-main { padding-block: 0 24px; }
#proposer.page-main { margin-top: 0; }
footer a { color: inherit; font-weight: 600; }

/* ---------- About page ---------- */
.about-card { background: var(--surface); border: 1px solid var(--line); border-radius: 32px; padding: clamp(24px, 5vw, 56px); max-width: 760px; position: relative; overflow: hidden; }
.about-card::before { content: ""; position: absolute; width: 260px; height: 260px; border-radius: 50%; background: var(--c1-soft); top: -130px; right: -110px; }
.about-card > * { position: relative; }
.about-head { display: grid; gap: 10px; margin-bottom: 18px; }
.about-card h1 { font-size: clamp(34px, 5vw, 52px); font-weight: 800; line-height: 1.05; }
.about-card h2 { font-size: clamp(22px, 2.6vw, 28px); font-weight: 800; margin: 34px 0 10px; }
.about-card p { color: var(--muted); font-size: 17px; line-height: 1.6; margin: 0 0 14px; max-width: 62ch; }
.about-card .about-lede { color: var(--ink); font-size: 19px; }
.about-card .about-thanks { color: var(--ink); font-weight: 600; margin-top: 30px; }
.about-card .btn { margin-top: 6px; }
.about-sign { border-top: 1px dashed var(--line); margin-top: 30px; padding-top: 18px; }
.about-sign p { font-size: 15px; margin-bottom: 6px; }
.foot-links a { color: inherit; font-weight: 600; }

/* ---------- Privacy and terms page ---------- */
.legal section { margin: 0; padding: 0; }
.legal ul { margin: 0 0 14px; padding-left: 20px; display: grid; gap: 8px; color: var(--muted); font-size: 16.5px; line-height: 1.55; max-width: 64ch; }
.legal strong { color: var(--ink); }
.legal a, .about-sign a { color: var(--c2); font-weight: 600; }
.fine-link { color: inherit; font-weight: 600; white-space: nowrap; }

/* ---------- Event pages (/evenements/<event>/) and directory (plan B5) ---------- */
.ev section { padding-block: 0; }
.ev .ev-block { padding: 26px 28px; }
.crumbs { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; font-size: 14.5px; color: var(--muted); margin: 6px 0 20px; }
.crumbs a { color: var(--c2); font-weight: 600; text-decoration: none; }
.crumbs a:hover { text-decoration: underline; }
.crumbs [aria-current] { color: var(--ink); font-weight: 600; overflow-wrap: anywhere; }
.ev-hero { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1.05fr); gap: 32px; align-items: center;
  background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); padding: 18px; }
.ev-media.card-media { margin: 0; border-radius: calc(var(--radius) - 8px); aspect-ratio: 4 / 3; }
.ev-media .tile { width: 84px; height: 84px; }
.ev-head { display: grid; gap: 14px; justify-items: start; padding: 8px 8px 8px 0; min-width: 0; }
.ev-head h1 { font-size: clamp(30px, 4.2vw, 48px); font-weight: 800; overflow-wrap: anywhere; }
.ev-where, .ev-when { display: flex; align-items: center; gap: 10px; margin: 0; font-size: 17px; font-weight: 600; }
.ev-where svg, .ev-when svg { width: 20px; height: 20px; color: var(--muted); flex: none; }
.ev-actions { display: flex; flex-wrap: wrap; gap: 10px; margin-top: 4px; }
.btn-ghost { background: transparent; color: var(--ink); border-color: var(--line); padding: 13px 18px; font-size: 15px; }
.btn-ghost:hover { border-color: var(--c2); }
.btn-ghost svg { width: 18px; height: 18px; }
.ev-verified { display: flex; align-items: center; gap: 8px; margin: 0; font-size: 14px; color: var(--muted); }
.ev-verified svg { width: 16px; height: 16px; color: var(--st-open); }
.ev-grid { display: grid; grid-template-columns: minmax(0, 1.65fr) minmax(0, 1fr); gap: 22px; margin-top: 22px; align-items: start; }
.ev-main, .ev-side { display: grid; gap: 22px; min-width: 0; }
.ev-side { position: sticky; top: 16px; }
.ev-block { background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); padding: 26px 28px; display: grid; gap: 16px; }
.ev-block h2 { font-size: 26px; font-weight: 800; }
.ev-block h3 { font-size: 18px; font-weight: 800; margin-top: 6px; }
.ev-block p { margin: 0; }
.ev-lead { font-size: 17.5px; line-height: 1.55; }
.ev-volunteer { border-top: 6px solid var(--c1); }
.ev-facts { list-style: none; margin: 0; padding: 0; display: grid; gap: 12px; }
.ev-facts li { display: grid; grid-template-columns: 20px minmax(0, 1fr); gap: 12px; align-items: start; line-height: 1.5; }
.ev-facts svg { width: 20px; height: 20px; margin-top: 2px; color: var(--muted); }
.ev-facts b { font-weight: 700; }
.ev-quote { margin: 4px 0 0; padding: 18px 20px 16px 54px; position: relative; background: var(--bg); border-radius: 16px; border: 1px solid var(--line); }
.ev-quote > svg { position: absolute; left: 18px; top: 18px; width: 24px; height: 24px; color: var(--c2); opacity: .7; }
.ev-quote blockquote { margin: 0; font-size: 17px; font-style: italic; line-height: 1.5; }
.ev-quote figcaption { margin-top: 8px; font-size: 14px; color: var(--muted); }
.ev-quote a, .ev-dl a, .ev-links a, .ev-similar p a { color: var(--c2); font-weight: 600; text-decoration: none; overflow-wrap: anywhere; }
.ev-quote a:hover, .ev-dl a:hover, .ev-links a:hover, .ev-similar p a:hover { text-decoration: underline; }
.ev-steps { margin: 0; padding-left: 22px; display: grid; gap: 8px; line-height: 1.5; }
.ev-steps li::marker { font-weight: 800; color: var(--c2); }
.ev-src-note, .ev-extra-note, .ev-map-note { font-size: 13.5px; color: var(--muted); }
.ev-dl { display: grid; grid-template-columns: max-content minmax(0, 1fr); gap: 10px 18px; margin: 0; }
.ev-dl dt { font-weight: 700; color: var(--muted); font-size: 14.5px; padding-top: 2px; }
.ev-dl dd { margin: 0; line-height: 1.45; }
.ev-dl .sub { display: block; color: var(--muted); font-size: 14px; }
.ev-links { list-style: none; margin: 0; padding: 0; display: grid; gap: 12px; }
.ev-links li { display: grid; grid-template-columns: 20px minmax(0, 1fr); gap: 12px; align-items: start; }
.ev-links svg { width: 20px; height: 20px; color: var(--muted); margin-top: 1px; }
.ev-map { border-radius: 16px; overflow: hidden; border: 1px solid var(--line); background: var(--bg); min-height: 170px; display: grid; place-items: center; text-align: center; padding: 14px; gap: 8px; }
.ev-map:has(iframe) { padding: 0; }
.ev-map iframe { width: 100%; height: 260px; border: 0; display: block; }
.ev-map-btn { display: inline-flex; align-items: center; gap: 8px; font: 700 15px/1 var(--f-body); color: var(--ink); background: var(--surface);
  border: 1.5px solid var(--line); border-radius: 999px; padding: 12px 18px; cursor: pointer; }
.ev-map-btn:hover { border-color: var(--c2); }
.ev-map-btn svg { width: 18px; height: 18px; }
.ev-map-link { font-size: 14px; }
.ev-past { margin: 0; padding-left: 20px; display: grid; gap: 6px; }
.ev-similar { margin-top: 22px; }
.ev-sims { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 14px; }
.ev-sim { display: grid; gap: 8px; align-content: start; padding: 16px; border: 1px solid var(--line); border-radius: 18px; text-decoration: none; color: var(--ink); background: var(--bg); }
.ev-sim:hover { border-color: var(--c2); }
.ev-sim b { font-size: 17px; line-height: 1.25; }
.ev-sim .sub { color: var(--muted); font-size: 14px; }
.ev-sim .cat .ic { width: 28px; height: 28px; border-radius: 10px; }
.ev-sim .cat .ic svg { width: 16px; height: 16px; }
/* directory */
.idx-head { display: grid; gap: 12px; margin-bottom: 26px; }
.idx-head h1 { font-size: clamp(34px, 5vw, 56px); font-weight: 800; }
.idx-jump { display: flex; flex-wrap: wrap; gap: 10px; margin-top: 4px; }
.idx-jump a { font-weight: 700; text-decoration: none; color: var(--ink); background: var(--surface); border: 1.5px solid var(--line); border-radius: 999px; padding: 9px 14px; }
.idx-jump a span { color: var(--muted); font-weight: 600; margin-left: 4px; }
.idx-canton { margin-bottom: 30px; scroll-margin-top: 16px; }
.idx-canton h2 { font-size: 28px; font-weight: 800; margin-bottom: 14px; }
.idx-list { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px; }
.idx-list a { display: grid; grid-template-columns: 34px minmax(0, 1fr); grid-template-rows: auto auto; column-gap: 12px; row-gap: 2px; align-items: center;
  text-decoration: none; color: var(--ink); background: var(--surface); border: 1px solid var(--line); border-radius: 16px; padding: 12px 14px; }
.idx-list a:hover { border-color: var(--c2); }
.idx-list .cat { grid-row: 1 / 3; }
.idx-list .nm { font-weight: 700; line-height: 1.25; }
.idx-list .sub { color: var(--muted); font-size: 14px; }
.card h3 a { color: inherit; text-decoration: none; }
.card h3 a:hover { text-decoration: underline; text-decoration-color: var(--acc); text-decoration-thickness: 3px; text-underline-offset: 4px; }
/* Whole card opens the event page: the title link is stretched over the card. */
.card.linked { position: relative; cursor: pointer; }
.card.linked .card-link::after { content: ""; position: absolute; inset: 0; border-radius: inherit; z-index: 1; }
.card.linked:hover { border-color: var(--c2); }
.card.linked:hover .card-link { text-decoration: underline; text-decoration-color: var(--acc); text-decoration-thickness: 3px; text-underline-offset: 4px; }
.card.linked:focus-within { outline: 3px solid var(--focus); outline-offset: 3px; }
.card.linked .card-link:focus { outline: none; }
.card.linked .act { pointer-events: none; }
@media (max-width: 900px) {
  .ev-hero { grid-template-columns: minmax(0, 1fr); gap: 18px; padding: 12px; }
  .ev-head { padding: 4px 8px 10px; }
  .ev-grid { grid-template-columns: minmax(0, 1fr); }
  .ev-side { position: static; }
  .ev-sims { grid-template-columns: minmax(0, 1fr); }
  .idx-list { grid-template-columns: minmax(0, 1fr); }
}
@media (max-width: 520px) {
  .ev .ev-block { padding: 20px 18px; }
  .ev-dl { grid-template-columns: minmax(0, 1fr); gap: 2px; }
  .ev-dl dd { margin-bottom: 10px; }
  .ev-actions .btn { width: 100%; }
}

/* ---------- 404 ---------- */
.nf { display: grid; place-items: center; min-height: 52vh; padding-block: 24px 48px; }
.nf-card { max-width: 620px; text-align: center; display: grid; gap: 16px; justify-items: center; }
.nf-code { margin: 0; font: 800 clamp(84px, 16vw, 150px)/.9 var(--f-display); letter-spacing: -.04em;
  background: linear-gradient(90deg, var(--c1), var(--c2)); -webkit-background-clip: text; background-clip: text; color: transparent; }
.nf-card h1 { font-size: clamp(28px, 4.4vw, 42px); font-weight: 800; }
.nf-text { margin: 0; font-size: 18px; color: var(--muted); }
.nf-maybe { margin: 0; font-size: 17px; }
.nf-maybe a { color: var(--c2); font-weight: 700; }
.nf-actions { display: flex; flex-wrap: wrap; gap: 12px; justify-content: center; margin-top: 6px; }
.ev-report { font-size: 14.5px; }
.ev-report a { color: var(--c2); font-weight: 600; text-decoration: none; }
.ev-report a:hover { text-decoration: underline; }
