:root {
  --orange: #de6f00;
  --orange-dunkel: #a95400;
  --text: #2b2d31;
  --text-leise: #5d6068;
  --flaeche: #ffffff;
  --flaeche-2: #f6f4f1;
  --linie: #e4e0da;
  --radius: 10px;
  --schrift: system-ui, -apple-system, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
}

*, *::before, *::after { box-sizing: border-box; }
/* Versteckte Elemente bleiben versteckt, auch wenn eine Regel unten eine Darstellungsart setzt */
[hidden] { display: none !important; }
html { scroll-behavior: smooth; -webkit-text-size-adjust: 100%; }
body { margin: 0; font-family: var(--schrift); font-size: 1.0625rem; line-height: 1.6; color: var(--text); background: var(--flaeche); }
img { max-width: 100%; height: auto; }
a { color: var(--orange-dunkel); text-underline-offset: 2px; }
a:hover { color: var(--orange); }
h1, h2, h3 { line-height: 1.2; margin: 0 0 .6em; }
h1 { font-size: clamp(1.8rem, 4vw, 2.4rem); }
h2 { font-size: clamp(1.5rem, 3vw, 2rem); }
h3 { font-size: 1.2rem; }
:focus-visible { outline: 3px solid var(--orange); outline-offset: 2px; }

.wrap { width: 100%; max-width: 1140px; margin: 0 auto; padding: 0 16px; }
.schmal { max-width: 760px; }
.visually-hidden { position: absolute !important; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
.skip { position: absolute; left: -999px; top: 0; background: #fff; padding: 8px 12px; z-index: 10; }
.skip:focus { left: 8px; top: 8px; }
.klein { font-size: .9rem; }
.mitte { text-align: center; }
.hinweis { color: var(--text-leise); font-style: italic; }

/* Kopf */
.kopf { background: var(--orange); color: #fff; }
.kopf-inner { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 12px 24px; padding-top: 18px; padding-bottom: 18px; }
.logo img { display: block; width: 260px; height: auto; }
.kopf nav { display: flex; flex-wrap: wrap; gap: 4px 20px; }
.kopf nav a { color: #fff; text-decoration: none; font-weight: 600; }
.kopf nav a:hover { text-decoration: underline; color: #fff; }

.held { background: var(--orange); color: #fff; padding: 24px 0 56px; }
.lead { font-size: clamp(1.25rem, 2.6vw, 1.7rem); line-height: 1.45; max-width: 820px; margin: 0; }

.abschnitt { padding: 56px 0; }
.band { background: var(--flaeche-2); }

/* Buttons */
.btn { display: inline-block; background: var(--orange-dunkel); color: #fff; border: 2px solid var(--orange-dunkel); border-radius: 999px; padding: 10px 22px; font: inherit; font-weight: 600; text-decoration: none; cursor: pointer; }
.btn:hover { background: var(--orange); border-color: var(--orange); color: #fff; }
.btn.rand { background: transparent; color: var(--orange-dunkel); }
.btn.rand:hover { background: var(--orange-dunkel); color: #fff; }

/* Termine */
.termine { display: grid; gap: 16px; }
.termin { display: flex; gap: 18px; background: var(--flaeche); border: 1px solid var(--linie); border-radius: var(--radius); padding: 18px; }
.kalender { flex: 0 0 76px; display: flex; flex-direction: column; align-items: center; border: 2px solid var(--orange); border-radius: var(--radius); overflow: hidden; align-self: flex-start; text-align: center; }
.kalender .tag { background: var(--orange); color: #fff; width: 100%; font-size: 1.6rem; font-weight: 700; line-height: 1.5; }
.kalender .monat { font-weight: 700; color: var(--orange-dunkel); }
.kalender .jahr { font-size: .8rem; color: var(--text-leise); padding-bottom: 4px; }
.termin-text { min-width: 0; flex: 1; }
.termin-text h3 { margin-bottom: .2em; }
.termin-text .meta { color: var(--text-leise); margin-top: 0; overflow-wrap: anywhere; }
.termine.klein .termin { padding: 12px 14px; }
.termine.klein .kalender { flex-basis: 60px; }
.termine.klein .kalender .tag { font-size: 1.2rem; }
.vergangene { margin-top: 28px; }
.vergangene summary { cursor: pointer; font-weight: 600; color: var(--orange-dunkel); margin-bottom: 12px; }

/* Newsletter */
.zwei { display: grid; gap: 32px; grid-template-columns: 1fr; }
@media (min-width: 800px) { .zwei { grid-template-columns: 1fr 1fr; align-items: start; } }
.nl-form { background: var(--orange); color: #fff; border-radius: var(--radius); padding: 22px; display: grid; gap: 12px; }
.nl-form label { display: grid; gap: 4px; font-weight: 600; font-size: .95rem; }
.nl-form input { font: inherit; padding: 10px 12px; border: 0; border-radius: 6px; width: 100%; }
.nl-form .zeile { display: grid; gap: 12px; grid-template-columns: 1fr 1fr; }
.nl-form .klein { margin: 0; opacity: .9; }
.btn.hell { background: #fff; color: var(--orange-dunkel); border-color: #fff; justify-self: start; }
.btn.hell:hover { background: var(--text); border-color: var(--text); color: #fff; }
.honig { position: absolute; left: -5000px; }

/* Netzwerk */
.filter { display: grid; gap: 12px; margin: 20px 0 24px; }
.suche input { font: inherit; width: 100%; max-width: 420px; padding: 10px 14px; border: 1px solid var(--linie); border-radius: 999px; }
.chips { display: flex; flex-wrap: wrap; gap: 8px; }
.chip { font: inherit; font-size: .9rem; padding: 6px 14px; border: 1px solid var(--linie); border-radius: 999px; background: #fff; color: var(--text); cursor: pointer; }
.chip:hover { border-color: var(--orange); }
.chip.aktiv { background: var(--orange-dunkel); border-color: var(--orange-dunkel); color: #fff; }
.raster { list-style: none; margin: 0 0 32px; padding: 0; display: grid; gap: 14px; grid-template-columns: repeat(auto-fill, minmax(160px, 1fr)); }
.karte { display: flex; flex-direction: column; height: 100%; border: 1px solid var(--linie); border-radius: var(--radius); background: #fff; text-decoration: none; color: var(--text); transition: box-shadow .15s, border-color .15s; }
.karte:hover { border-color: var(--orange); box-shadow: 0 4px 14px rgb(0 0 0 / .08); color: var(--text); }
.karte-logo { display: flex; align-items: center; justify-content: center; height: 110px; padding: 14px; }
.karte-logo img { max-height: 80px; width: auto; object-fit: contain; }
.logo-ersatz { font-weight: 700; color: var(--orange-dunkel); text-align: center; }
.karte-name { border-top: 1px solid var(--linie); padding: 8px 12px; font-size: .88rem; line-height: 1.35; flex: 1; }

/* Eintrag */
.eintrag, main > .wrap.schmal { padding-top: 32px; padding-bottom: 56px; }
.zurueck { margin-top: 0; }
.eintrag-logo { display: block; max-height: 140px; width: auto; margin: 16px 0 24px; }
.kats { list-style: none; padding: 0; margin: 0 0 20px; display: flex; flex-wrap: wrap; gap: 6px; }
.kats li { background: var(--flaeche-2); border-radius: 999px; padding: 2px 12px; font-size: .85rem; }
.text { overflow-wrap: anywhere; }
.korrektur { margin-top: 40px; padding-top: 16px; border-top: 1px solid var(--linie); color: var(--text-leise); font-size: .95rem; }
.quelle { font-style: italic; color: var(--text-leise); }

.fuss { border-top: 1px solid var(--linie); padding: 24px 0; text-align: center; color: var(--text-leise); font-size: .92rem; }

@media (max-width: 520px) {
  .logo img { width: 210px; }
  .termin { flex-direction: column; gap: 12px; }
  .kalender { flex-direction: row; flex-basis: auto; gap: 8px; padding-right: 10px; }
  .kalender .tag { width: auto; padding: 0 10px; }
  .kalender .jahr { padding: 0; }
  .nl-form .zeile { grid-template-columns: 1fr; }
  .raster { grid-template-columns: repeat(2, 1fr); }
}
@media (prefers-reduced-motion: reduce) { html { scroll-behavior: auto; } }

/* Textseiten (z. B. Datenschutz) */
.text-seite h2 { font-size: 1.35rem; margin-top: 1.8em; }
.text-seite h2:target { scroll-margin-top: 16px; }

/* Anmeldung */
.plaetze { font-weight: 600; color: var(--orange-dunkel); margin-bottom: 8px; }
/* gleiches Aussehen wie das Newsletter-Formular */
.anmeldung { display: grid; gap: 12px; background: var(--orange); color: #fff; border-radius: var(--radius); padding: 22px; margin: 8px 0; }
.anmeldung .felder { display: grid; gap: 12px; grid-template-columns: repeat(auto-fit, minmax(180px, 1fr)); }
.anmeldung label { display: grid; gap: 4px; font-size: .95rem; font-weight: 600; }
.anmeldung input { font: inherit; padding: 10px 12px; border: 0; border-radius: 6px; width: 100%; background: #fff; color: var(--text); }
.anmeldung .btn { justify-self: start; }
.anmeldung .leise { font-weight: 400; color: #fff; opacity: .9; }
.anmeldung .hinweis-weiss { margin: 0; opacity: .9; }
.anmeldung a { color: #fff; }
.anmeldung input[type=checkbox] { accent-color: var(--orange-dunkel); }
.meldung { margin: 0; padding: 10px 12px; border-radius: 6px; }
.meldung.ok { background: #e6f4ea; color: #1e5631; }
.meldung.fehler { background: #fdecea; color: #8a1c13; }

.band-box { margin: 24px 0; }
.band-box .nl-form { max-width: 520px; }
.nl-form a { color: #fff; }
.nl-form a:hover { color: #fff; text-decoration-thickness: 2px; }
.anmeldung .check { display: flex; gap: 8px; align-items: flex-start; font-weight: 400; font-size: .92rem; }
.anmeldung .check input { width: auto; margin-top: 3px; }
.archiv { list-style: none; padding: 0; }
.archiv li { padding: 10px 0; border-bottom: 1px solid var(--linie); }
.meta-zeile { color: var(--text-leise); text-transform: uppercase; letter-spacing: .05em; font-size: .85rem; margin-bottom: 4px; }

/* Links im Termin wie die Datumszeile; beim Darüberfahren wie bisher */
.termin-text .meta a,
.termin-text > .klein a { color: var(--text-leise); text-decoration: none; }
.termin-text .meta a:hover,
.termin-text > .klein a:hover { color: var(--orange); text-decoration: underline; }

/* Terminkarten ohne Rahmen; der nächste Termin zweispaltig: links Infos, rechts Anmeldung */
.termin { border: 0; border-radius: 0; padding: 0; background: none; }
.termine.klein { gap: 0; }
.termine.klein .termin { padding: 14px 0; border-bottom: 1px solid var(--linie); }
.termin.gross { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: 40px; align-items: start; }
.termin-info { display: flex; gap: 18px; min-width: 0; }
.termin-anmeldung { min-width: 0; }
.termin-anmeldung .plaetze { margin-top: 0; }
.termin-anmeldung .anmeldung { margin-top: 0; }
.termin-anmeldung .anmeldung .felder { grid-template-columns: 1fr; }
@media (max-width: 860px) {
  .termin.gross { grid-template-columns: 1fr; gap: 20px; }
}
@media (max-width: 520px) {
  .termin-info { flex-direction: column; gap: 12px; }
  .termin-anmeldung .anmeldung { padding: 18px; }
}

/* Header: grösseres Logo; auf der Startseite gross mit Stadtkarte von Olten und Umgebung */
.logo img { width: 360px; }
.kopf-inner { padding-top: 24px; padding-bottom: 24px; }
.held { background: none; padding: 56px 0 120px; }
.lead { max-width: 640px; }
body.start .kopf {
  background:
    linear-gradient(90deg, var(--orange) 0%, rgba(222,111,0,.92) 34%, rgba(222,111,0,.45) 58%, rgba(222,111,0,0) 80%),
    url("/img/karte-olten.svg") left calc(50vw - 560px) top 48% / 1900px auto no-repeat,
    var(--orange);
}
@media (min-width: 1900px) { body.start .kopf { background-size: auto, cover, auto; } }
@media (max-width: 760px) {
  .logo img { width: 270px; }
  .held { padding: 28px 0 72px; }
  body.start .kopf {
    background:
      linear-gradient(180deg, var(--orange) 0%, rgba(222,111,0,.8) 45%, rgba(222,111,0,.35) 100%),
      url("/img/karte-olten.svg") 55% 60% / 1300px auto no-repeat,
      var(--orange);
  }
}

.held { padding: 72px 0 160px; }
@media (max-width: 760px) { .held { padding: 36px 0 96px; } }
.untertitel { font-size: 1.2rem; font-weight: 600; color: var(--orange-dunkel); margin-top: -.3em; }

/* Über uns: volle Breite, Text auf breiten Bildschirmen zweispaltig (besser lesbar) */
@media (min-width: 900px) { .spalten { columns: 2; column-gap: 48px; } .spalten p { margin-top: 0; break-inside: avoid; } }
