/* ==========================================================================
   Wettesinger Kalender – Stylesheet (Bold & Clean, mobile-first)
   Breakpoints: 576 / 768 / 992 / 1200 px
   Keine externen Schriften oder Bibliotheken (DSGVO, Performance).
   ========================================================================== */

/* ---------- Design-Tokens ---------- */
:root {
  --c-primary: #14532d;        /* Tiefes Grün – Hauptfarbe */
  --c-primary-600: #166534;
  --c-primary-700: #0f3d21;
  --c-primary-50: #f0fdf4;
  --c-accent: #f59e0b;         /* Honig-Gelb – einziger Akzent */
  --c-accent-700: #b45309;
  --c-bg: #faf9f5;
  --c-surface: #ffffff;
  --c-text: #1c1917;           /* Kontrast auf Weiß ≈ 17:1 */
  --c-muted: #57534e;          /* Kontrast auf Weiß ≈ 7.6:1 */
  --c-border: #e7e5e4;
  --c-border-strong: #d6d3d1;
  --c-success: #166534;
  --c-error: #b91c1c;
  --c-warning: #92400e;

  --space-1: .25rem; --space-2: .5rem; --space-3: .75rem; --space-4: 1rem;
  --space-5: 1.25rem; --space-6: 1.5rem; --space-8: 2rem; --space-10: 2.5rem;
  --space-12: 3rem; --space-16: 4rem;

  --radius-sm: .375rem; --radius-md: .625rem; --radius-lg: .875rem; --radius-xl: 1.25rem; --radius-full: 999px;
  --shadow-sm: 0 1px 2px rgba(28,25,23,.06), 0 1px 3px rgba(28,25,23,.06);
  --shadow-md: 0 4px 10px rgba(28,25,23,.08), 0 2px 4px rgba(28,25,23,.05);
  --shadow-lg: 0 14px 28px rgba(28,25,23,.12), 0 6px 10px rgba(28,25,23,.06);

  --font: system-ui, -apple-system, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
  --t-fast: 150ms ease; --t-base: 250ms ease;
  --header-h: 64px;
}

/* ---------- Reset / Basis ---------- */
*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; scroll-padding-top: calc(var(--header-h) + 16px); }
body {
  margin: 0; font-family: var(--font); font-size: 1rem; line-height: 1.6;
  color: var(--c-text); background: var(--c-bg);
  min-height: 100vh; min-height: 100dvh; display: flex; flex-direction: column;
  padding-left: env(safe-area-inset-left); padding-right: env(safe-area-inset-right);
}
main { flex: 1 0 auto; }
main:focus { outline: none; }
img, svg { max-width: 100%; }
a { color: var(--c-primary-600); text-underline-offset: 3px; }
a:hover { color: var(--c-primary-700); }
h1, h2, h3 { line-height: 1.2; letter-spacing: -.01em; margin: 0 0 var(--space-3); text-wrap: balance; }
h1 { font-size: clamp(1.75rem, 1.2rem + 2.6vw, 2.5rem); font-weight: 800; }
h2 { font-size: clamp(1.3rem, 1.1rem + 1vw, 1.75rem); font-weight: 750; }
h3 { font-size: 1.125rem; font-weight: 700; }
p { margin: 0 0 var(--space-4); }
code { background: #f1f0eb; padding: .1em .35em; border-radius: var(--radius-sm); font-size: .9em; }
:focus-visible { outline: 3px solid var(--c-accent); outline-offset: 2px; border-radius: var(--radius-sm); }
[hidden] { display: none !important; }

.container { width: 100%; max-width: 1180px; margin-inline: auto; padding-inline: var(--space-4); }
.container.narrow, .narrow { max-width: 820px; }
.page { padding-block: var(--space-8) var(--space-12); }
.block { margin-block: var(--space-10); }
.center { text-align: center; }
.muted { color: var(--c-muted); }
.nowrap { white-space: nowrap; }
.visually-hidden { position: absolute !important; width: 1px; height: 1px; padding: 0; margin: -1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; border: 0; }
.skip-link { position: absolute; left: var(--space-4); top: -100px; background: var(--c-accent); color: #1c1917; padding: var(--space-3) var(--space-4); border-radius: var(--radius-md); font-weight: 700; z-index: 1000; }
.skip-link:focus { top: var(--space-3); }
.ic { width: 1.15em; height: 1.15em; flex: none; fill: none; stroke: currentColor; stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round; vertical-align: -.2em; }
.lead-dark { font-size: 1.125rem; color: var(--c-muted); max-width: 60ch; }
.crumb { margin-bottom: var(--space-4); }
.hint { font-size: .875rem; color: var(--c-muted); margin: var(--space-1) 0 0; }

/* ---------- Header / Navigation ---------- */
.site-header { position: sticky; top: 0; z-index: 200; background: rgba(255,255,255,.96); border-bottom: 1px solid var(--c-border); backdrop-filter: saturate(1.4) blur(8px); padding-top: env(safe-area-inset-top); }
.header-row { display: flex; align-items: center; justify-content: space-between; min-height: var(--header-h); gap: var(--space-4); }
.brand { display: inline-flex; align-items: center; gap: var(--space-3); text-decoration: none; color: var(--c-text); }
.brand-mark { display: grid; place-items: center; width: 2.5rem; height: 2.5rem; border-radius: .7rem; background: var(--c-primary); color: #fff; font-weight: 900; font-size: 1.35rem; position: relative; }
.brand-mark::after { content: ""; position: absolute; top: -.2rem; right: -.2rem; width: .75rem; height: .75rem; border-radius: 50%; background: var(--c-accent); border: 2px solid #fff; }
.brand-text { display: flex; flex-direction: column; line-height: 1.15; }
.brand-text strong { font-size: 1.125rem; font-weight: 800; letter-spacing: -.01em; }
.brand-text small { font-size: .75rem; color: var(--c-muted); font-weight: 500; }

.nav-toggle { display: none; width: 2.75rem; height: 2.75rem; align-items: center; justify-content: center; border: 1px solid var(--c-border-strong); background: #fff; border-radius: var(--radius-md); cursor: pointer; color: var(--c-text); }
.nav-toggle .ic { width: 1.5rem; height: 1.5rem; }
.nav-toggle .ic-close { display: none; }
.nav-toggle[aria-expanded="true"] .ic-open { display: none; }
.nav-toggle[aria-expanded="true"] .ic-close { display: inline; }
.js .nav-toggle { display: inline-flex; }

.main-nav ul { display: flex; gap: var(--space-1); list-style: none; margin: 0; padding: 0; flex-wrap: wrap; }
.main-nav a { display: block; padding: .6rem .9rem; border-radius: var(--radius-full); color: var(--c-text); text-decoration: none; font-weight: 600; transition: background var(--t-fast), color var(--t-fast); }
.main-nav a:hover { background: var(--c-primary-50); color: var(--c-primary); }
.main-nav a[aria-current="page"] { background: var(--c-primary); color: #fff; }

@media (max-width: 767.98px) {
  .header-row { flex-wrap: wrap; padding-block: var(--space-2); }
  .main-nav { width: 100%; }
  .js .main-nav { display: none; padding-bottom: var(--space-3); }
  .js .main-nav.is-open { display: block; }
  .main-nav ul { flex-direction: column; }
  .main-nav a { padding: .85rem 1rem; border-radius: var(--radius-md); }
}
@media (min-width: 768px) {
  .nav-toggle, .js .nav-toggle { display: none; }
  .js .main-nav { display: block; }
}

/* ---------- Buttons ---------- */
.btn { display: inline-flex; align-items: center; justify-content: center; gap: .5rem; min-height: 2.75rem; padding: .6rem 1.15rem; border: 2px solid transparent; border-radius: var(--radius-full); font: inherit; font-weight: 700; line-height: 1.2; text-decoration: none; cursor: pointer; transition: transform var(--t-base), box-shadow var(--t-base), background var(--t-fast), border-color var(--t-fast), color var(--t-fast); -webkit-tap-highlight-color: transparent; }
.btn:hover { transform: translateY(-1px); box-shadow: var(--shadow-md); }
.btn:active { transform: translateY(0); }
.btn[disabled], .btn[aria-disabled="true"] { opacity: .55; cursor: not-allowed; transform: none; box-shadow: none; }
.btn-primary { background: var(--c-primary); color: #fff; }
.btn-primary:hover { background: var(--c-primary-700); color: #fff; }
.btn-accent { background: var(--c-accent); color: #1c1917; }
.btn-accent:hover { background: #fbbf24; color: #1c1917; }
.btn-ghost { background: transparent; color: #fff; border-color: rgba(255,255,255,.55); }
.btn-ghost:hover { background: rgba(255,255,255,.12); color: #fff; border-color: #fff; }
.btn-ghost-dark { background: #fff; color: var(--c-text); border-color: var(--c-border-strong); }
.btn-ghost-dark:hover { border-color: var(--c-primary); color: var(--c-primary); }
.btn-success { background: var(--c-success); color: #fff; }
.btn-success:hover { background: #14532d; color: #fff; }
.btn-danger { background: var(--c-error); color: #fff; }
.btn-danger:hover { background: #991b1b; color: #fff; }
.btn-danger-outline { background: #fff; color: var(--c-error); border-color: #fca5a5; }
.btn-danger-outline:hover { background: #fef2f2; color: #991b1b; border-color: var(--c-error); }
.btn-sm { min-height: 2.25rem; padding: .35rem .8rem; font-size: .875rem; }
.btn-lg { min-height: 3.25rem; padding: .8rem 1.6rem; font-size: 1.0625rem; }
.btn-block { width: 100%; }

/* ---------- Hero ---------- */
.hero { color: #fff; background:
  url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='56' height='100' viewBox='0 0 56 100'%3E%3Cpath d='M28 66L0 50V16L28 0l28 16v34L28 66zm0 34L0 84V50m56 34L28 100V66' fill='none' stroke='%23ffffff' stroke-opacity='.07' stroke-width='2'/%3E%3C/svg%3E"),
  radial-gradient(900px 380px at 88% -10%, rgba(245,158,11,.28), transparent 62%),
  linear-gradient(165deg, var(--c-primary) 0%, var(--c-primary-700) 100%); }
.hero-grid { display: grid; gap: var(--space-6); padding-block: var(--space-10) var(--space-8); align-items: center; }
.eyebrow { text-transform: uppercase; letter-spacing: .12em; font-size: .78rem; font-weight: 800; color: var(--c-accent); margin: 0 0 var(--space-2); }
.hero h1 { font-size: clamp(2rem, 1.2rem + 4.2vw, 3.5rem); font-weight: 900; letter-spacing: -.025em; margin-bottom: var(--space-3); }
.hero h1 span { color: var(--c-accent); }
.lead { font-size: 1.125rem; color: rgba(255,255,255,.88); max-width: 46ch; }
.hero-cta { display: flex; flex-wrap: wrap; gap: var(--space-3); margin-top: var(--space-5); }
.hero-cta .btn { flex: 1 1 14rem; }
.next-card { background: #fff; color: var(--c-text); border-radius: var(--radius-xl); padding: var(--space-5); border-left: 6px solid var(--org, var(--c-accent)); box-shadow: var(--shadow-lg); }
.next-card .eyebrow { color: var(--c-accent-700); }
.next-card h2 { margin-bottom: var(--space-1); font-size: 1.5rem; font-weight: 800; }
.next-card h2 a { color: inherit; text-decoration: none; }
.next-card h2 a:hover { text-decoration: underline; }
.next-when { font-weight: 700; color: var(--c-primary); margin-bottom: var(--space-3); }
@media (min-width: 992px) {
  .hero-grid { grid-template-columns: 1.15fr .85fr; gap: var(--space-12); padding-block: var(--space-16) var(--space-12); }
  .hero-cta .btn { flex: 0 0 auto; }
}

/* ---------- Layout Terminübersicht ---------- */
.layout > * { min-width: 0; }
.layout { display: grid; gap: var(--space-6); padding-block: var(--space-6) var(--space-10); align-items: start; }
@media (min-width: 992px) { .layout { grid-template-columns: 290px minmax(0, 1fr); gap: var(--space-8); padding-top: var(--space-10); } }

/* Filter */
.filters { background: var(--c-surface); border: 1px solid var(--c-border); border-radius: var(--radius-lg); box-shadow: var(--shadow-sm); }
.filters-toggle { display: none; width: 100%; align-items: center; gap: var(--space-3); padding: var(--space-4); border: 0; background: transparent; font: inherit; font-weight: 700; cursor: pointer; text-align: left; color: var(--c-text); min-height: 3rem; border-radius: var(--radius-lg); }
.filters-toggle .dot { width: .6rem; height: .6rem; background: var(--c-accent); border-radius: 50%; margin-left: auto; }
.filters-body { padding: var(--space-4); }
.js .filters-toggle { display: flex; }
.js .filters-body { display: none; border-top: 1px solid var(--c-border); }
.js .filters.is-open .filters-body { display: block; }
@media (min-width: 992px) {
  .filters { position: sticky; top: calc(var(--header-h) + 16px); max-height: calc(100dvh - var(--header-h) - 32px); overflow: auto; }
  .js .filters-toggle { display: none; }
  .js .filters-body { display: block; border-top: 0; }
}
.label, .filters h2.label { display: block; font-size: .78rem; font-weight: 800; text-transform: uppercase; letter-spacing: .08em; color: var(--c-muted); margin: var(--space-4) 0 var(--space-2); }
.filters-body > form .label:first-child { margin-top: 0; }
.search-field { position: relative; }
.search-field .ic { position: absolute; left: .8rem; top: 50%; transform: translateY(-50%); color: var(--c-muted); pointer-events: none; }
.search-field input[type="search"] { padding-left: 2.6rem; }
.filter-form select, .filter-form button { margin-bottom: var(--space-1); }
.filter-form .btn { margin-top: var(--space-3); }
.chips { display: flex; flex-wrap: wrap; gap: var(--space-2); list-style: none; margin: 0 0 var(--space-3); padding: 0; }
.chip { display: inline-flex; align-items: center; gap: .45rem; min-height: 2.5rem; padding: .35rem .8rem; border: 1px solid var(--c-border-strong); border-radius: var(--radius-full); background: #fff; color: var(--c-text); text-decoration: none; font-size: .9rem; font-weight: 600; transition: background var(--t-fast), border-color var(--t-fast); }
.chip i { width: .65rem; height: .65rem; border-radius: 50%; background: var(--org, var(--c-muted)); flex: none; }
.chip:hover { border-color: var(--c-primary); color: var(--c-text); }
.chip.is-active { background: var(--c-primary); border-color: var(--c-primary); color: #fff; }
.chip.is-active i { box-shadow: 0 0 0 2px #fff; }
.link-reset { font-weight: 600; }

/* Liste */
.list-head { display: flex; flex-wrap: wrap; align-items: baseline; justify-content: space-between; gap: var(--space-2); margin-bottom: var(--space-3); }
.list-head h2 { margin: 0; }
.count { color: var(--c-muted); font-weight: 600; margin: 0; }
.month-nav { display: flex; gap: var(--space-2); overflow-x: auto; padding-bottom: var(--space-2); margin-bottom: var(--space-4); scroll-snap-type: x proximity; -webkit-overflow-scrolling: touch; }
.month-nav a { flex: none; scroll-snap-align: start; padding: .35rem .85rem; border-radius: var(--radius-full); background: #fff; border: 1px solid var(--c-border-strong); color: var(--c-text); text-decoration: none; font-weight: 700; font-size: .9rem; min-height: 2.25rem; display: inline-flex; align-items: center; }
.month-nav a:hover { background: var(--c-primary-50); border-color: var(--c-primary); }
.month { margin-bottom: var(--space-8); }
.month-title { display: flex; align-items: baseline; gap: var(--space-2); font-size: 1.5rem; font-weight: 900; letter-spacing: -.02em; padding-bottom: var(--space-2); border-bottom: 3px solid var(--c-accent); margin-bottom: var(--space-4); }
.month-title span { font-weight: 600; color: var(--c-muted); font-size: 1rem; }
.events { display: flex; flex-direction: column; gap: var(--space-3); }
.empty { background: #fff; border: 1px dashed var(--c-border-strong); border-radius: var(--radius-lg); padding: var(--space-8) var(--space-4); text-align: center; }

/* Termin-Karte */
.event { display: grid; grid-template-columns: auto minmax(0, 1fr); gap: var(--space-3) var(--space-4); align-items: start; background: var(--c-surface); border: 1px solid var(--c-border); border-left: 5px solid var(--org, var(--c-primary)); border-radius: var(--radius-lg); padding: var(--space-4); box-shadow: var(--shadow-sm); transition: transform var(--t-base), box-shadow var(--t-base); }
.event:hover { transform: translateY(-2px); box-shadow: var(--shadow-md); }
.event:target { outline: 3px solid var(--c-accent); outline-offset: 2px; }
.event-date { display: flex; flex-direction: column; align-items: center; justify-content: center; min-width: 4rem; padding: .55rem .5rem; border-radius: var(--radius-md); background: var(--c-primary); color: #fff; text-align: center; line-height: 1.1; }
.event-date .dow { font-size: .72rem; font-weight: 800; text-transform: uppercase; letter-spacing: .08em; color: var(--c-accent); }
.event-date .day { font-size: 1.75rem; font-weight: 900; letter-spacing: -.02em; margin-block: .1rem; }
.event-date.is-range .day { font-size: 1.25rem; }
.event-date .mon { font-size: .8rem; font-weight: 700; text-transform: uppercase; }
.event-title { font-size: 1.125rem; font-weight: 750; margin: 0 0 var(--space-2); overflow-wrap: anywhere; }
.event-title a { color: var(--c-text); text-decoration: none; }
.event-title a:hover { color: var(--c-primary-600); text-decoration: underline; }
.meta { display: flex; flex-wrap: wrap; align-items: center; gap: .35rem var(--space-4); list-style: none; margin: 0; padding: 0; font-size: .9375rem; color: var(--c-muted); }
.meta li { display: inline-flex; align-items: center; gap: .4rem; }
.meta .rel { font-weight: 700; color: var(--c-accent-700); }
.badge { display: inline-flex; align-items: center; gap: .4rem; padding: .15rem .65rem; border-radius: var(--radius-full); background: #f3f4f6; background: color-mix(in srgb, var(--org, #166534) 13%, #fff); color: var(--c-text); font-size: .8125rem; font-weight: 700; border: 1px solid #e5e7eb; border-color: color-mix(in srgb, var(--org, #166534) 35%, #fff); }
.badge::before { content: ""; width: .5rem; height: .5rem; border-radius: 50%; background: var(--org, var(--c-primary)); }
.event-desc { margin: var(--space-3) 0 0; color: var(--c-text); font-size: .9375rem; max-width: 70ch; overflow-wrap: anywhere; }
.event-actions { grid-column: 1 / -1; display: flex; flex-wrap: wrap; gap: var(--space-2); padding-top: var(--space-3); border-top: 1px solid var(--c-border); }
.icon-btn { display: inline-flex; align-items: center; gap: .45rem; min-height: 2.5rem; padding: .35rem .9rem; border: 1px solid var(--c-border-strong); border-radius: var(--radius-full); color: var(--c-text); text-decoration: none; font-size: .875rem; font-weight: 700; background: #fff; transition: background var(--t-fast), border-color var(--t-fast); }
.icon-btn:hover { background: var(--c-primary-50); border-color: var(--c-primary); color: var(--c-primary); }
@media (min-width: 768px) {
  .event { grid-template-columns: auto minmax(0, 1fr) auto; padding: var(--space-5); }
  .event-actions { grid-column: auto; flex-direction: column; border-top: 0; padding-top: 0; align-items: stretch; }
  .event-date { min-width: 4.75rem; }
}
.facts { display: grid; grid-template-columns: max-content 1fr; gap: var(--space-2) var(--space-6); margin: var(--space-6) 0; }
.facts dt { font-weight: 800; color: var(--c-muted); }
.facts dd { margin: 0; }

/* ---------- Abo-Bereich ---------- */
.abo { background: var(--c-primary-50); border-block: 1px solid #bbf7d0; padding-block: var(--space-10); }
.abo-grid { display: grid; gap: var(--space-6); }
.abo-actions { display: flex; flex-direction: column; gap: var(--space-3); align-items: stretch; }
.copy-row { display: flex; flex-direction: column; gap: var(--space-2); }
@media (min-width: 768px) { .abo-grid { grid-template-columns: 1fr 1fr; gap: var(--space-10); } .copy-row { flex-direction: row; } .copy-row input { flex: 1; } }

/* ---------- Formulare ---------- */
.form fieldset { border: 1px solid var(--c-border); border-radius: var(--radius-lg); padding: var(--space-4) var(--space-4) var(--space-2); margin: 0 0 var(--space-6); background: var(--c-surface); min-width: 0; }
.form legend { font-weight: 800; padding-inline: var(--space-2); font-size: 1.0625rem; }
.field { margin-bottom: var(--space-4); min-width: 0; }
.field label { display: block; font-weight: 700; margin-bottom: var(--space-1); font-size: .9375rem; }
input[type="text"], input[type="email"], input[type="password"], input[type="date"], input[type="time"], input[type="number"], input[type="search"], input[type="tel"], input[type="url"], select, textarea {
  width: 100%; min-height: 2.9rem; padding: .6rem .8rem; font: inherit; font-size: 1rem; /* 16px verhindert iOS-Zoom */
  color: var(--c-text); background: #fff; border: 1.5px solid var(--c-border-strong); border-radius: var(--radius-md); transition: border-color var(--t-fast), box-shadow var(--t-fast); appearance: none; -webkit-appearance: none;
}
select { background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='8' viewBox='0 0 12 8'%3E%3Cpath d='M1 1l5 5 5-5' fill='none' stroke='%2357534e' stroke-width='2' stroke-linecap='round'/%3E%3C/svg%3E"); background-repeat: no-repeat; background-position: right .9rem center; padding-right: 2.4rem; }
textarea { min-height: 7rem; resize: vertical; }
input[type="color"] { width: 4rem; height: 2.9rem; padding: .2rem; border: 1.5px solid var(--c-border-strong); border-radius: var(--radius-md); background: #fff; cursor: pointer; }
input:focus, select:focus, textarea:focus { outline: none; border-color: var(--c-primary); box-shadow: 0 0 0 4px rgba(20,83,45,.18); }
input[aria-invalid="true"], select[aria-invalid="true"], textarea[aria-invalid="true"] { border-color: var(--c-error); background: #fef2f2; }
.field-error { color: var(--c-error); font-size: .875rem; font-weight: 700; margin: var(--space-1) 0 0; }
.field-error::before { content: "⚠ "; }
.req { color: var(--c-error); }
.grid-2, .grid-4 { display: grid; gap: 0 var(--space-4); grid-template-columns: 1fr; }
@media (min-width: 576px) { .grid-2 { grid-template-columns: 1fr 1fr; } .grid-4 { grid-template-columns: 1fr 1fr; } }
@media (min-width: 992px) { .grid-4 { grid-template-columns: repeat(4, 1fr); } }
.field.check { display: flex; flex-wrap: wrap; gap: var(--space-3); align-items: flex-start; }
.field.check input[type="checkbox"], .check-inline input { width: 1.4rem; height: 1.4rem; margin-top: .15rem; flex: none; accent-color: var(--c-primary); }
.field.check label { flex: 1 1 14rem; font-weight: 500; margin: 0; }
.field.check .field-error { flex-basis: 100%; }
.check-inline { display: inline-flex; gap: .5rem; align-items: center; font-weight: 600; font-size: .9rem; }
.narrow-field { max-width: 22rem; }
.narrow-form { max-width: 30rem; }
.hp { position: absolute !important; left: -9999px; width: 1px; height: 1px; overflow: hidden; }
.form-actions { display: flex; flex-wrap: wrap; gap: var(--space-3); margin-top: var(--space-4); }
.form-actions .btn { flex: 1 1 auto; }
@media (min-width: 576px) { .form-actions .btn { flex: 0 0 auto; } }
.pw-row { display: flex; gap: var(--space-2); }
.pw-row input { flex: 1; }
.inline-form { display: flex; gap: var(--space-3); flex-wrap: wrap; align-items: center; }
.inline-form select { width: auto; min-width: 7rem; }
form.inline { display: inline; margin: 0; }

/* Hinweisboxen */
.alert { display: flex; gap: var(--space-3); align-items: flex-start; padding: var(--space-3) var(--space-4); border-radius: var(--radius-md); margin: 0 0 var(--space-4); border: 1px solid; font-weight: 600; }
.alert .ic { margin-top: .2rem; }
.alert-success { background: #f0fdf4; border-color: #86efac; color: #14532d; }
.alert-error { background: #fef2f2; border-color: #fca5a5; color: #991b1b; }
.alert-warning { background: #fffbeb; border-color: #fcd34d; color: #78350f; }
.alert-info { background: #eff6ff; border-color: #93c5fd; color: #1e3a8a; }

/* ---------- Kontakte / Tabellen ---------- */
.cards-grid { display: grid; gap: var(--space-4); grid-template-columns: repeat(auto-fill, minmax(min(100%, 17rem), 1fr)); }
.contact { background: #fff; border: 1px solid var(--c-border); border-top: 5px solid var(--org, var(--c-primary)); border-radius: var(--radius-lg); padding: var(--space-4); box-shadow: var(--shadow-sm); }
.contact h3 { margin-bottom: var(--space-1); }
.contact p { margin-bottom: var(--space-2); }
.contact a { display: inline-flex; align-items: center; gap: .4rem; font-weight: 700; }
.table-wrap { overflow-x: auto; background: #fff; border: 1px solid var(--c-border); border-radius: var(--radius-lg); }
.table-wrap:focus-visible { outline-offset: 0; }
.table { width: 100%; border-collapse: collapse; font-size: .9375rem; }
.table th, .table td { text-align: left; padding: .7rem .9rem; border-bottom: 1px solid var(--c-border); vertical-align: top; }
.table thead th { background: #f5f5f0; font-size: .78rem; text-transform: uppercase; letter-spacing: .06em; color: var(--c-muted); white-space: nowrap; }
.table tbody tr:last-child > * { border-bottom: 0; }
.table tbody tr:hover { background: #fafaf7; }
.table .actions { white-space: normal; }
.table .actions > * { margin: 0 .25rem .25rem 0; }
.row-bad { background: #fef2f2; }
@media (max-width: 767.98px) {
  .table.responsive thead { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); }
  .table.responsive, .table.responsive tbody, .table.responsive tr, .table.responsive td { display: block; width: 100%; }
  .table.responsive tr { padding: var(--space-3); border-bottom: 1px solid var(--c-border); }
  .table.responsive td, .table.responsive th[scope="row"] { border: 0; padding: .25rem 0; display: flex; gap: var(--space-3); justify-content: space-between; }
  .table.responsive td::before { content: attr(data-label); flex: 0 0 6.5rem; font-weight: 800; font-size: .78rem; text-transform: uppercase; letter-spacing: .05em; color: var(--c-muted); padding-top: .15rem; }
  .table.responsive td > * { max-width: 100%; }
  .table.responsive td.actions { flex-wrap: wrap; justify-content: flex-start; padding-top: var(--space-2); }
  .table.responsive td.actions::before { display: none; }
  .table.responsive td[colspan] { display: block; }
  .table.responsive td[colspan]::before { display: none; }
  .table.responsive input { min-width: 0; }
}

/* ---------- Footer ---------- */
.site-footer { background: #1c1917; color: #d6d3d1; padding: var(--space-8) 0 calc(var(--space-8) + env(safe-area-inset-bottom)); margin-top: auto; }
.footer-grid { display: grid; gap: var(--space-6); }
.site-footer a { color: #fff; }
.site-footer strong { color: #fff; font-size: 1.1rem; }
.site-footer ul { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: .35rem; }
.site-footer li a { display: inline-block; padding: .2rem 0; min-height: 1.75rem; }
@media (min-width: 768px) { .footer-grid { grid-template-columns: 2fr 1fr 1fr; } }

/* ---------- Installer / Setup ---------- */
.checks { list-style: none; padding: 0; margin: 0 0 var(--space-6); }
.checks li { padding: .35rem 0; font-weight: 600; }
.checks .ok { color: var(--c-success); } .checks .bad { color: var(--c-error); } .checks .warn { color: var(--c-warning); }
.setup-code { font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace; font-size: clamp(1.5rem, 6vw, 2.25rem); font-weight: 800; letter-spacing: .15em; background: #fff; border: 2px dashed var(--c-primary); border-radius: var(--radius-lg); padding: var(--space-4); text-align: center; user-select: all; word-break: break-all; }
pre.code { background: #1c1917; color: #f5f5f4; padding: var(--space-4); border-radius: var(--radius-md); overflow-x: auto; font-size: .875rem; line-height: 1.5; white-space: pre-wrap; word-break: break-word; }
.prose h2 { margin-top: var(--space-8); font-size: 1.25rem; }
.prose p { max-width: 70ch; }

/* ---------- Login ---------- */
.login-page { background: linear-gradient(165deg, var(--c-primary) 0%, var(--c-primary-700) 100%); justify-content: center; align-items: center; padding: var(--space-4); }
.login-card { flex: 0 0 auto; width: 100%; max-width: 26rem; background: #fff; border-radius: var(--radius-xl); padding: var(--space-6); box-shadow: var(--shadow-lg); }
.login-brand { margin-bottom: var(--space-4); }

/* ---------- Admin ---------- */
body.admin { display: block; background: #f4f3ee; }
.admin-shell { min-height: 100vh; min-height: 100dvh; }
.admin-top { position: sticky; top: 0; z-index: 300; display: flex; align-items: center; gap: var(--space-3); padding: var(--space-2) var(--space-4); padding-top: calc(var(--space-2) + env(safe-area-inset-top)); background: #fff; border-bottom: 1px solid var(--c-border); }
.admin-side { background: var(--c-primary-700); color: #fff; padding: var(--space-4); }
.admin-side nav ul { list-style: none; margin: 0 0 var(--space-4); padding: 0; display: flex; flex-direction: column; gap: .15rem; }
.admin-side nav a { display: flex; align-items: center; gap: .7rem; padding: .7rem .85rem; border-radius: var(--radius-md); color: #e7f5ec; text-decoration: none; font-weight: 600; min-height: 2.75rem; }
.admin-side nav a:hover { background: rgba(255,255,255,.1); color: #fff; }
.admin-side nav a[aria-current="page"] { background: var(--c-accent); color: #1c1917; }
.pill { margin-left: auto; background: var(--c-accent); color: #1c1917; border-radius: var(--radius-full); padding: 0 .55rem; font-size: .8rem; font-weight: 800; min-width: 1.5rem; text-align: center; }
[aria-current="page"] .pill { background: #1c1917; color: #fff; }
.side-foot { border-top: 1px solid rgba(255,255,255,.2); padding-top: var(--space-4); display: flex; flex-direction: column; gap: var(--space-2); }
.side-foot .muted { color: #bbf7d0; margin: 0; }
.side-foot .btn-ghost-dark, .side-foot .btn-ghost { width: 100%; }
.side-foot .btn { background: transparent; color: #fff; border-color: rgba(255,255,255,.45); }
.side-foot .btn:hover { background: rgba(255,255,255,.12); color: #fff; }
.admin-main { padding: var(--space-5) var(--space-4) var(--space-12); max-width: 1200px; }
.js .admin-side { display: none; position: fixed; inset: 0 auto 0 0; width: min(18rem, 86vw); z-index: 400; overflow-y: auto; box-shadow: var(--shadow-lg); padding-top: calc(var(--space-4) + env(safe-area-inset-top)); }
.js .admin-side.is-open { display: block; }
.js .admin-toggle { display: inline-flex; }
@media (min-width: 992px) {
  .admin-shell { display: grid; grid-template-columns: 16.5rem minmax(0, 1fr); grid-template-rows: auto 1fr; }
  .admin-top { display: none; }
  .admin-side, .js .admin-side { display: flex; flex-direction: column; justify-content: space-between; position: sticky; top: 0; height: 100vh; height: 100dvh; width: auto; grid-row: 1 / 3; box-shadow: none; overflow-y: auto; }
  .admin-main { padding: var(--space-8) var(--space-8) var(--space-16); grid-column: 2; width: 100%; }
}
.admin-main h1 { margin-bottom: var(--space-5); }
.stats { display: grid; gap: var(--space-3); grid-template-columns: repeat(2, 1fr); margin-bottom: var(--space-6); }
@media (min-width: 768px) { .stats { grid-template-columns: repeat(4, 1fr); gap: var(--space-4); } }
.stat { display: flex; flex-direction: column; background: #fff; border: 1px solid var(--c-border); border-radius: var(--radius-lg); padding: var(--space-4); text-decoration: none; color: var(--c-text); box-shadow: var(--shadow-sm); transition: transform var(--t-base), box-shadow var(--t-base); }
.stat:hover { transform: translateY(-2px); box-shadow: var(--shadow-md); color: var(--c-text); }
.stat .num { font-size: 2.25rem; font-weight: 900; line-height: 1; letter-spacing: -.03em; color: var(--c-primary); }
.stat .lbl { font-size: .875rem; font-weight: 700; color: var(--c-muted); margin-top: .35rem; }
.stat-alert { border-color: var(--c-accent); background: #fffbeb; }
.stat-alert .num { color: var(--c-accent-700); }
.quick { display: flex; flex-wrap: wrap; gap: var(--space-3); margin-bottom: var(--space-4); }
.toolbar { display: grid; gap: var(--space-3); grid-template-columns: 1fr 1fr; align-items: end; background: #fff; border: 1px solid var(--c-border); border-radius: var(--radius-lg); padding: var(--space-4); margin-bottom: var(--space-4); }
.toolbar .field { margin: 0; }
.toolbar .field:first-child { grid-column: 1 / -1; }
.toolbar .field-btn .btn { width: 100%; }
@media (min-width: 992px) { .toolbar { grid-template-columns: 2fr 1fr 1fr 1fr auto auto; } .toolbar .field:first-child { grid-column: auto; } }
.status { display: inline-block; padding: .15rem .6rem; border-radius: var(--radius-full); font-size: .78rem; font-weight: 800; white-space: nowrap; border: 1px solid; }
.status-published { background: #f0fdf4; color: #14532d; border-color: #86efac; }
.status-pending { background: #fffbeb; color: #78350f; border-color: #fcd34d; }
.status-rejected { background: #fef2f2; color: #991b1b; border-color: #fca5a5; }
.swatch { display: inline-block; width: .9rem; height: .9rem; border-radius: 50%; background: var(--org); margin-right: .5rem; vertical-align: -.1rem; }
.pagination { display: flex; align-items: center; justify-content: center; gap: var(--space-4); margin-top: var(--space-5); flex-wrap: wrap; }
.confirm-box, .submitter-box { background: #fff; border: 1px solid var(--c-border); border-left: 5px solid var(--c-accent); border-radius: var(--radius-lg); padding: var(--space-5); margin-bottom: var(--space-5); max-width: 44rem; }
.confirm-box { border-left-color: var(--c-error); }
.submitter-box h2 { font-size: 1.05rem; }

/* ---------- Druck / Jahresübersicht ---------- */
.print-only { display: none; }
.print-head { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: var(--space-3); margin-bottom: var(--space-5); }
.print-head h1 { margin: 0; }
.print-month { break-inside: avoid; margin-bottom: var(--space-5); }
.print-month h2 { border-bottom: 3px solid var(--c-accent); padding-bottom: .2rem; }
.print-table td { padding: .4rem .6rem; }
@media print {
  @page { size: A4; margin: 14mm; }
  body { background: #fff; font-size: 10.5pt; display: block; }
  .site-header, .site-footer, .skip-link, .no-print, .filters, .event-actions, .hero-cta, .abo, .month-nav, .nav-toggle { display: none !important; }
  .print-only { display: block; }
  .hero { background: none; color: #000; }
  .hero-grid { padding: 0 0 8pt; display: block; }
  .next-card { display: none; }
  .event { box-shadow: none; break-inside: avoid; border-color: #999; }
  .event:hover { transform: none; }
  .table-wrap { border: 0; }
  a { color: #000; text-decoration: none; }
}

/* ---------- Bewegung reduzieren ---------- */
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { transition-duration: .01ms !important; animation-duration: .01ms !important; scroll-behavior: auto !important; }
  .btn:hover, .event:hover, .stat:hover { transform: none; }
}
