/* =========================================================
   Gemeinde Erschwil — Designsystem
   ========================================================= */

/* ---------- Tokens ---------- */
:root {
  /* Farben: Jura-Grün als Leitfarbe, Wappen-Gold als Akzent */
  --green-900: #12291f;
  --green-800: #1b3d2c;
  --green-700: #235039;
  --green-600: #2f6b4c;
  --green-500: #3f8a63;
  --green-100: #e6f1ea;
  --green-50:  #f2f8f4;

  --gold-600: #b98a00;
  --gold-500: #e0aa0f;
  --gold-400: #f5c53d;
  --gold-100: #fdf3d6;

  --ink-900: #14181a;
  --ink-700: #333c40;
  --ink-500: #5b686d;
  --ink-400: #7c888d;

  --paper:   #ffffff;
  --paper-2: #f7f9f8;
  --paper-3: #eef2f0;
  --line:    #dfe6e2;

  --red-600: #b3261e;
  --red-50:  #fdecea;

  --surface: var(--paper);
  --surface-2: var(--paper-2);
  --surface-3: var(--paper-3);
  --text: var(--ink-900);
  --text-muted: var(--ink-500);
  --border: var(--line);
  --brand: var(--green-700);
  --brand-strong: var(--green-800);
  --brand-soft: var(--green-50);
  --accent: var(--gold-500);

  /* Typografie */
  --font-sans: "Inter", -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto,
    "Helvetica Neue", Arial, sans-serif;
  --font-serif: "Iowan Old Style", "Palatino Linotype", Palatino, Georgia, serif;

  /* Masse */
  --wrap: 1180px;
  --wrap-narrow: 760px;
  --gutter: clamp(1.15rem, 4vw, 2.5rem);
  --radius: 14px;
  --radius-sm: 9px;
  --radius-lg: 22px;

  --shadow-sm: 0 1px 2px rgba(18, 41, 31, .06), 0 1px 3px rgba(18, 41, 31, .05);
  --shadow-md: 0 4px 10px rgba(18, 41, 31, .06), 0 12px 28px rgba(18, 41, 31, .07);
  --shadow-lg: 0 10px 24px rgba(18, 41, 31, .1), 0 28px 60px rgba(18, 41, 31, .12);

  --header-h: 74px;
}

@media (prefers-color-scheme: dark) {
  :root {
    --surface: #101715;
    --surface-2: #16201c;
    --surface-3: #1d2925;
    --text: #e9efec;
    --text-muted: #a2b2ab;
    --border: #2a3a34;
    --brand: #7dc2a0;
    --brand-strong: #a5d9bd;
    --brand-soft: #16241d;
    --accent: var(--gold-400);
    --red-50: #2b1614;
    --red-600: #ff8f85;
    --shadow-sm: 0 1px 3px rgba(0, 0, 0, .4);
    --shadow-md: 0 6px 18px rgba(0, 0, 0, .45);
    --shadow-lg: 0 18px 50px rgba(0, 0, 0, .55);
  }
}

/* ---------- Reset ---------- */
*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; }
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after {
    animation-duration: .01ms !important; animation-iteration-count: 1 !important;
    transition-duration: .01ms !important;
  }
}
body {
  margin: 0;
  font-family: var(--font-sans);
  font-size: clamp(1rem, .97rem + .16vw, 1.075rem);
  line-height: 1.65;
  color: var(--text);
  background: var(--surface);
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
  overflow-wrap: break-word;
}
img, svg { max-width: 100%; height: auto; display: block; }
a { color: var(--brand); text-underline-offset: .18em; }
a:hover { color: var(--brand-strong); }
:focus-visible {
  outline: 3px solid var(--accent);
  outline-offset: 2px;
  border-radius: 4px;
}

h1, h2, h3, h4 {
  line-height: 1.18;
  font-weight: 660;
  letter-spacing: -.017em;
  color: var(--text);
  margin: 0 0 .5em;
  text-wrap: balance;
}
h1 { font-size: clamp(2rem, 1.4rem + 2.6vw, 3.05rem); }
h2 { font-size: clamp(1.42rem, 1.2rem + 1.1vw, 1.95rem); }
h3 { font-size: clamp(1.15rem, 1.06rem + .45vw, 1.35rem); }
h4 { font-size: 1.05rem; }
p  { margin: 0 0 1.1em; }
ul, ol { margin: 0 0 1.2em; padding-left: 1.35em; }
li { margin-bottom: .4em; }
hr { border: 0; border-top: 1px solid var(--border); margin: 2.5rem 0; }

.wrap { width: 100%; max-width: var(--wrap); margin-inline: auto; padding-inline: var(--gutter); }
.skip-link {
  position: absolute; left: -9999px; top: 0; z-index: 200;
  background: var(--brand-strong); color: #fff; padding: .8rem 1.2rem;
  border-radius: 0 0 var(--radius-sm) 0; font-weight: 600;
}
.skip-link:focus { left: 0; }

/* =========================================================
   Header + Navigation
   ========================================================= */
.site-header {
  position: sticky; top: 0; z-index: 100;
  background: color-mix(in srgb, var(--surface) 88%, transparent);
  backdrop-filter: saturate(180%) blur(14px);
  -webkit-backdrop-filter: saturate(180%) blur(14px);
  border-bottom: 1px solid var(--border);
}
.header-inner {
  display: flex; align-items: center; gap: 1rem;
  min-height: var(--header-h);
}
.brand {
  display: flex; align-items: center; gap: .7rem;
  text-decoration: none; color: var(--text);
  margin-right: auto; padding: .35rem 0;
}
.brand img { width: 34px; height: auto; flex: none; }
.brand-text { display: flex; flex-direction: column; line-height: 1.1; }
.brand-name {
  font-weight: 700; font-size: 1.06rem; letter-spacing: -.02em; white-space: nowrap;
}
.brand-sub {
  font-size: .72rem; letter-spacing: .1em; text-transform: uppercase;
  color: var(--text-muted); font-weight: 600; white-space: nowrap;
}
@media (max-width: 380px) {
  .brand-sub { letter-spacing: .06em; font-size: .68rem; }
}

.nav-toggle {
  display: none; align-items: center; gap: .5rem;
  background: var(--surface-2); color: var(--text);
  border: 1px solid var(--border); border-radius: 999px;
  padding: .5rem .95rem; font: inherit; font-size: .9rem; font-weight: 600;
  cursor: pointer;
}
.nav-toggle:hover { background: var(--surface-3); }
.burger { width: 17px; height: 12px; position: relative; flex: none; }
.burger span {
  position: absolute; left: 0; right: 0; height: 2px; border-radius: 2px;
  background: currentColor; transition: transform .25s ease, opacity .2s ease;
}
.burger span:nth-child(1) { top: 0; }
.burger span:nth-child(2) { top: 5px; }
.burger span:nth-child(3) { top: 10px; }
[aria-expanded="true"] .burger span:nth-child(1) { transform: translateY(5px) rotate(45deg); }
[aria-expanded="true"] .burger span:nth-child(2) { opacity: 0; }
[aria-expanded="true"] .burger span:nth-child(3) { transform: translateY(-5px) rotate(-45deg); }

.main-nav { display: flex; align-items: center; gap: .55rem; }
.main-nav ul { list-style: none; margin: 0; padding: 0; display: flex; gap: .1rem; }
.main-nav a {
  display: block; padding: .55rem .7rem; border-radius: 999px;
  text-decoration: none; color: var(--text-muted);
  font-size: .9rem; font-weight: 560; white-space: nowrap;
  transition: background .18s ease, color .18s ease;
}
.main-nav a:hover { background: var(--surface-2); color: var(--text); }
.main-nav a[aria-current="page"],
.main-nav .is-active > a {
  background: var(--brand-soft); color: var(--brand-strong);
}
/* Online-Schalter: kein Themenbereich, sondern eine Aktion. Deshalb hinter
   einem Trenner und als Outline-Button — der gefuellte Zustand bleibt der
   aktiven Seite vorbehalten, damit er nicht dauernd angewaehlt aussieht. */
/* Selektoren bewusst mit .main-nav davor: sonst gewinnt `.main-nav a` oben. */
.nav-sep { flex: none; width: 1px; height: 26px; background: var(--border); }
.main-nav .nav-service {
  display: inline-flex; align-items: center; gap: .45rem; flex: none;
  padding: .5rem 1rem; border-radius: 999px;
  border: 1.5px solid color-mix(in srgb, var(--brand) 42%, transparent);
  background: transparent; color: var(--brand); text-decoration: none;
  font-size: .9rem; font-weight: 640; white-space: nowrap;
  transition: background .18s ease, color .18s ease, border-color .18s ease;
}
.main-nav .nav-service svg {
  width: 16px; height: 16px; stroke-width: 1.9; flex: none;
}
.main-nav .nav-service:hover,
.main-nav .nav-service[aria-current="page"] {
  background: var(--brand); border-color: var(--brand); color: #fff;
}
@media (prefers-color-scheme: dark) {
  .main-nav .nav-service:hover,
  .main-nav .nav-service[aria-current="page"] { color: var(--green-900); }
}

/* Mobile-Navigation
   Hinweis: .site-header hat backdrop-filter und ist damit der Containing Block
   auch fuer position:fixed. Das Panel wird deshalb absolut unter dem Header
   verankert (top:100%) statt fix am Viewport. */
@media (max-width: 1150px) {
  .nav-toggle { display: inline-flex; }
  .main-nav {
    position: absolute; top: 100%; left: 0; right: 0;
    background: var(--surface);
    border-bottom: 1px solid var(--border);
    box-shadow: var(--shadow-lg);
    padding: 1rem var(--gutter) 1.8rem;
    max-height: calc(100svh - var(--header-h));
    overflow-y: auto;
    display: none;
  }
  .main-nav.is-open { display: block; animation: navIn .22s ease both; }
  @keyframes navIn { from { opacity: 0; transform: translateY(-8px); } }
  .main-nav { flex-direction: column; align-items: stretch; gap: 0; }
  .main-nav ul { flex-direction: column; gap: .15rem; }
  .main-nav a {
    padding: .85rem 1rem; font-size: 1.08rem; border-radius: var(--radius-sm);
  }
  .nav-sep { width: auto; height: 1px; margin: .9rem 0; }
  .main-nav .nav-service {
    display: flex; width: 100%;
    justify-content: center; padding: .9rem 1rem; font-size: 1.02rem;
  }
  body.nav-open { overflow: hidden; }
}

/* =========================================================
   Hero
   ========================================================= */
.hero {
  position: relative;
  min-height: min(66svh, 560px);
  display: grid; align-items: end;
  color: #fff;
  isolation: isolate;
  overflow: hidden;
}
.hero::before {
  content: ""; position: absolute; inset: 0; z-index: -2;
  background: var(--green-900) url("../img/erschwil-panorama.jpg") center 62% / cover no-repeat;
}
/* Kleinere Variante fuer schmale Viewports spart Bandbreite */
@media (max-width: 780px) {
  .hero::before { background-image: url("../img/erschwil-panorama-1200.jpg"); }
}
.hero::after {
  content: ""; position: absolute; inset: 0; z-index: -1;
  background: linear-gradient(
    to top,
    rgba(10, 26, 19, .88) 0%,
    rgba(10, 26, 19, .55) 38%,
    rgba(10, 26, 19, .18) 70%,
    rgba(10, 26, 19, .3) 100%
  );
}
/* .hero-inner ist ein Grid-Item: die auto-Margins von .wrap wuerden den Text
   sonst mittig setzen. Deshalb Breite = Inhaltsraster, Textmass am Kind. */
.hero-inner { padding-block: clamp(2.5rem, 7vw, 4.5rem); }
.hero-inner > * { max-width: 46rem; }
.hero h1 { color: #fff; margin-bottom: .35em; text-shadow: 0 2px 24px rgba(0, 0, 0, .35); }
.hero p {
  font-size: clamp(1.05rem, 1rem + .5vw, 1.3rem);
  color: rgba(255, 255, 255, .93); margin-bottom: 0;
  text-shadow: 0 1px 14px rgba(0, 0, 0, .4);
}
.eyebrow {
  display: inline-flex; align-items: flex-start; gap: .55rem;
  font-size: .76rem; font-weight: 680; letter-spacing: .13em; text-transform: uppercase;
  color: var(--gold-400); margin-bottom: 1rem;
}
/* Strich an der ersten Zeile verankern, damit er bei Umbruch nicht mittig haengt */
.eyebrow::before {
  content: ""; width: 26px; height: 2px; margin-top: .6em; flex: none;
  background: var(--gold-400); border-radius: 2px;
}
.hero-facts {
  display: flex; flex-wrap: wrap; gap: .55rem;
  margin-top: 1.6rem;
}
.hero-facts span {
  background: rgba(255, 255, 255, .13);
  border: 1px solid rgba(255, 255, 255, .22);
  backdrop-filter: blur(6px);
  padding: .4rem .85rem; border-radius: 999px;
  font-size: .875rem; font-weight: 560;
}

/* =========================================================
   Seitenkopf (Unterseiten)
   ========================================================= */
.page-head {
  background: var(--surface-2);
  border-bottom: 1px solid var(--border);
  padding-block: clamp(1.6rem, 4vw, 2.9rem);
}
.page-head h1 { margin-bottom: .25em; }
.page-head .lead {
  font-size: clamp(1.05rem, 1rem + .4vw, 1.24rem);
  color: var(--text-muted); max-width: 46rem; margin-bottom: 0;
}
.breadcrumb {
  list-style: none; display: flex; flex-wrap: wrap; gap: .45rem;
  padding: 0; margin: 0 0 1rem; font-size: .87rem; color: var(--text-muted);
}
.breadcrumb a { color: var(--text-muted); text-decoration: none; }
.breadcrumb a:hover { color: var(--brand); text-decoration: underline; }
.breadcrumb li + li::before { content: "›"; margin-right: .45rem; color: var(--text-muted); }
.breadcrumb [aria-current] { color: var(--text); font-weight: 560; }

/* =========================================================
   Layout: Inhalt + Bereichsnavigation
   ========================================================= */
.layout {
  display: grid; gap: clamp(2rem, 4vw, 3.5rem);
  padding-block: clamp(2.2rem, 5vw, 4rem);
  align-items: start;
}
@media (min-width: 900px) {
  .layout { grid-template-columns: minmax(0, 1fr) 268px; }
  .layout > .sidebar { position: sticky; top: calc(var(--header-h) + 1.5rem); }
}
.prose { max-width: 68ch; }
.prose > :first-child { margin-top: 0; }
.prose h2 { margin-top: 2.4em; }
.prose h3 { margin-top: 2em; }
.prose h2:first-child, .prose h3:first-child { margin-top: 0; }
.prose .lead {
  font-size: 1.16em; color: var(--text-muted); line-height: 1.6;
}
.prose blockquote {
  margin: 2rem 0; padding: .2rem 0 .2rem 1.4rem;
  border-left: 3px solid var(--accent);
  color: var(--text-muted); font-style: italic;
}
.source {
  font-size: .87rem; color: var(--text-muted);
  border-top: 1px solid var(--border); padding-top: 1rem; margin-top: 2.5rem;
}

/* Bereichsnavigation */
.sidebar { min-width: 0; }
.side-nav {
  border: 1px solid var(--border); border-radius: var(--radius);
  background: var(--surface-2); overflow: hidden;
}
.side-nav h2 {
  font-size: .74rem; letter-spacing: .12em; text-transform: uppercase;
  color: var(--text-muted); margin: 0;
  padding: 1rem 1.15rem .6rem;
}
.side-nav ul { list-style: none; margin: 0; padding: 0 .5rem .6rem; }
.side-nav li { margin: 0; }
.side-nav a {
  display: block; padding: .55rem .65rem; border-radius: var(--radius-sm);
  text-decoration: none; color: var(--text-muted); font-size: .945rem;
  border-left: 3px solid transparent;
}
.side-nav a:hover { background: var(--surface-3); color: var(--text); }
.side-nav a[aria-current="page"] {
  background: var(--brand-soft); color: var(--brand-strong);
  font-weight: 620; border-left-color: var(--accent);
}

/* =========================================================
   Karten / Kacheln
   ========================================================= */
.section { padding-block: clamp(2.5rem, 6vw, 4.5rem); }
.section-alt { background: var(--surface-2); border-block: 1px solid var(--border); }
.section-head { max-width: 44rem; margin-bottom: clamp(1.6rem, 3vw, 2.4rem); }
.section-head p { color: var(--text-muted); margin-bottom: 0; }

.grid { display: grid; gap: clamp(1rem, 2vw, 1.5rem); }
.grid-2 { grid-template-columns: repeat(auto-fit, minmax(min(100%, 20rem), 1fr)); }
.grid-3 { grid-template-columns: repeat(auto-fit, minmax(min(100%, 16.5rem), 1fr)); }

.card {
  display: flex; flex-direction: column;
  background: var(--surface); border: 1px solid var(--border);
  border-radius: var(--radius); padding: 1.45rem;
  box-shadow: var(--shadow-sm);
  transition: transform .2s ease, box-shadow .2s ease, border-color .2s ease;
}
.card h3 { margin-bottom: .4rem; font-size: 1.16rem; }
.card p { color: var(--text-muted); font-size: .96rem; margin-bottom: 0; }
a.card { text-decoration: none; color: inherit; }
a.card:hover {
  transform: translateY(-3px);
  box-shadow: var(--shadow-md);
  border-color: color-mix(in srgb, var(--brand) 40%, var(--border));
}
a.card h3 { color: var(--brand-strong); }
a.card::after {
  content: "Mehr erfahren →";
  /* margin-top:auto haelt den Link am Kartenfuss, auch bei kurzem Text */
  margin-top: auto; padding-top: 1.1rem;
  font-size: .875rem; font-weight: 620; color: var(--brand);
}
.card-icon {
  width: 42px; height: 42px; border-radius: 11px; margin-bottom: .95rem;
  display: grid; place-items: center;
  background: var(--brand-soft); color: var(--brand);
  flex: none;
}
.card-icon svg { width: 21px; height: 21px; stroke-width: 1.7; }

/* Kompaktes Raster fuer kurze Begriffe (z. B. Feiertage) */
.chip-grid {
  list-style: none; padding: 0; margin: 1.5rem 0;
  display: grid; gap: .5rem;
  grid-template-columns: repeat(auto-fill, minmax(min(100%, 12rem), 1fr));
}
/* Kein Flex: lange Begriffe wie "Gemeindeversammlung" muessen umbrechen
   koennen, statt aus dem Chip zu laufen. Punkt daher absolut gesetzt. */
.chip-grid li {
  margin: 0; position: relative;
  padding: .7rem .9rem .7rem 1.9rem;
  font-size: .96rem; font-weight: 560; overflow-wrap: anywhere;
  background: var(--surface-2); border: 1px solid var(--border);
  border-radius: var(--radius-sm);
}
.chip-grid li::before {
  content: ""; position: absolute; left: .9rem; top: 1.28rem;
  width: 7px; height: 7px; border-radius: 50%; background: var(--accent);
}
/* Variante fuer noch nicht umgesetzte Eintraege */
.chip-grid.is-muted li {
  color: var(--text-muted); background: transparent;
  border-style: dashed;
}
.chip-grid.is-muted li::before { background: var(--border); }

/* Zahlen-Kacheln */
.stats { display: grid; gap: 1px; background: var(--border);
  border: 1px solid var(--border); border-radius: var(--radius); overflow: hidden;
  grid-template-columns: repeat(auto-fit, minmax(min(100%, 11rem), 1fr));
}
.stat { background: var(--surface); padding: 1.35rem 1.25rem; }
.stat dt {
  font-size: .8rem; letter-spacing: .06em; text-transform: uppercase;
  color: var(--text-muted); font-weight: 620; margin-bottom: .3rem;
}
.stat dd {
  margin: 0; font-size: clamp(1.5rem, 1.2rem + 1vw, 2rem);
  font-weight: 700; letter-spacing: -.03em; color: var(--brand-strong);
  font-variant-numeric: tabular-nums;
}
.stat small { display: block; font-size: .8rem; font-weight: 500; color: var(--text-muted); letter-spacing: 0; }

/* =========================================================
   Hinweise / Alerts
   ========================================================= */
.notice {
  display: flex; gap: .95rem; align-items: flex-start;
  border: 1px solid var(--border); border-left: 4px solid var(--brand);
  background: var(--surface-2);
  border-radius: var(--radius-sm); padding: 1.1rem 1.25rem;
  margin: 1.8rem 0;
}
.notice svg { width: 21px; height: 21px; flex: none; margin-top: .2rem; color: var(--brand); stroke-width: 1.8; }
.notice h3 { font-size: 1.02rem; margin-bottom: .25rem; }
.notice p:last-child { margin-bottom: 0; }
.notice > div { min-width: 0; }
.notice-alert {
  border-left-color: var(--red-600);
  background: var(--red-50);
  border-color: color-mix(in srgb, var(--red-600) 25%, var(--border));
}
.notice-alert svg { color: var(--red-600); }
.notice-alert h3 { color: var(--red-600); }
/* Hinweis auf nicht ausgearbeitete Demo-Bereiche */
.notice-draft {
  border-left-color: var(--gold-500);
  background: var(--gold-100);
  border-color: color-mix(in srgb, var(--gold-500) 30%, var(--border));
}
.notice-draft svg { color: var(--gold-600); }
.notice-draft h3 { color: var(--gold-600); }
.notice-draft a { color: var(--gold-600); }
@media (prefers-color-scheme: dark) {
  .notice-draft { background: #2b2308; }
  .notice-draft svg, .notice-draft h3, .notice-draft a { color: var(--gold-400); }
}

/* =========================================================
   Aktuell — Meldungen
   ========================================================= */
.news-list { display: grid; gap: 1.1rem; list-style: none; padding: 0; margin: 0; }
.news-item {
  background: var(--surface); border: 1px solid var(--border);
  border-radius: var(--radius); padding: 1.5rem clamp(1.25rem, 3vw, 1.8rem);
  box-shadow: var(--shadow-sm); margin: 0;
}
.news-item.is-urgent {
  border-color: color-mix(in srgb, var(--red-600) 35%, var(--border));
  background: var(--red-50);
}
.news-meta {
  display: flex; flex-wrap: wrap; align-items: center; gap: .6rem;
  margin-bottom: .7rem;
}
.tag {
  display: inline-block; font-size: .73rem; font-weight: 680;
  letter-spacing: .07em; text-transform: uppercase;
  padding: .28rem .65rem; border-radius: 999px;
  background: var(--brand-soft); color: var(--brand-strong);
}
.tag-urgent { background: var(--red-600); color: #fff; }
@media (prefers-color-scheme: dark) { .tag-urgent { color: #2b1614; } }
.tag-info { background: var(--gold-100); color: var(--gold-600); }
@media (prefers-color-scheme: dark) {
  .tag-info { background: #33290d; color: var(--gold-400); }
}
.news-date { font-size: .86rem; color: var(--text-muted); font-variant-numeric: tabular-nums; }
.news-item h2, .news-item h3 { font-size: 1.28rem; margin-bottom: .5rem; }
.news-item > :last-child { margin-bottom: 0; }

/* =========================================================
   Online-Schalter
   ========================================================= */
.service-layout { display: grid; gap: clamp(2rem, 4vw, 3.5rem); align-items: start; }
@media (min-width: 900px) {
  .service-layout { grid-template-columns: minmax(0, 1fr) 300px; }
  .service-layout > .sidebar { position: sticky; top: calc(var(--header-h) + 1.5rem); }
}
.service-group { margin-top: clamp(2.2rem, 4vw, 3rem); }
.service-group:first-child { margin-top: 0; }
.service-group h2 {
  display: flex; align-items: center; gap: .8rem;
  font-size: clamp(1.25rem, 1.1rem + .6vw, 1.5rem); margin-bottom: .45rem;
}
.service-group > p { color: var(--text-muted); margin-bottom: 1rem; }
.service-group .card-icon { margin-bottom: 0; width: 38px; height: 38px; }
.service-group .card-icon svg { width: 19px; height: 19px; }
.service-group .link-list { margin-top: 0; }

/* =========================================================
   Links, Buttons, Downloads
   ========================================================= */
.btn {
  display: inline-flex; align-items: center; gap: .5rem;
  background: var(--brand); color: #fff; text-decoration: none;
  padding: .72rem 1.3rem; border-radius: 999px;
  font-weight: 620; font-size: .96rem;
  box-shadow: var(--shadow-sm);
  transition: background .18s ease, transform .18s ease;
}
.btn:hover { background: var(--brand-strong); color: #fff; transform: translateY(-1px); }
.btn svg { width: 17px; height: 17px; stroke-width: 2; }
.btn-ghost {
  background: transparent; color: var(--brand);
  border: 1.5px solid color-mix(in srgb, var(--brand) 45%, transparent);
  box-shadow: none;
}
.btn-ghost:hover { background: var(--brand-soft); color: var(--brand-strong); }
@media (prefers-color-scheme: dark) {
  .btn { color: var(--green-900); }
  .btn:hover { color: var(--green-900); }
  .btn-ghost { color: var(--brand); }
  .btn-ghost:hover { color: var(--brand-strong); }
}

/* Download- und Linklisten */
.link-list { list-style: none; padding: 0; margin: 1.5rem 0; display: grid; gap: .55rem; }
.link-list li { margin: 0; }
.link-list a {
  display: flex; align-items: center; gap: .85rem;
  padding: .9rem 1.1rem;
  background: var(--surface-2); border: 1px solid var(--border);
  border-radius: var(--radius-sm); text-decoration: none; color: var(--text);
  font-weight: 560; transition: background .18s ease, border-color .18s ease, transform .18s ease;
}
.link-list a:hover {
  background: var(--brand-soft); border-color: color-mix(in srgb, var(--brand) 40%, var(--border));
  transform: translateX(2px);
}
.link-list a > span { flex: 1 1 auto; min-width: 0; }
.link-list .file-type {
  flex: none; font-size: .7rem; font-weight: 700; letter-spacing: .06em;
  padding: .22rem .5rem; border-radius: 5px;
  background: var(--surface-3); color: var(--text-muted);
}
.link-list .arrow { flex: none; color: var(--brand); font-weight: 700; }
.link-list small { display: block; font-weight: 450; font-size: .84rem; color: var(--text-muted); }

/* =========================================================
   Tabellen (responsiv)
   ========================================================= */
.table-wrap { overflow-x: auto; margin: 1.6rem 0; -webkit-overflow-scrolling: touch; }
table {
  width: 100%; border-collapse: collapse; font-size: .965rem;
  border: 1px solid var(--border); border-radius: var(--radius); overflow: hidden;
}
caption {
  text-align: left; font-weight: 660; font-size: 1.05rem;
  padding-bottom: .7rem; color: var(--text);
}
th, td { padding: .78rem 1rem; text-align: left; border-bottom: 1px solid var(--border); }
thead th {
  background: var(--surface-3); font-size: .78rem; letter-spacing: .07em;
  text-transform: uppercase; color: var(--text-muted); font-weight: 680;
}
tbody tr:last-child td { border-bottom: 0; }
tbody tr:nth-child(even) { background: var(--surface-2); }
td.num, th.num { text-align: right; font-variant-numeric: tabular-nums; white-space: nowrap; }

/* Auf kleinen Screens: Zeilen als Karten stapeln */
@media (max-width: 620px) {
  .table-stack table, .table-stack thead, .table-stack tbody,
  .table-stack tr, .table-stack th, .table-stack td { display: block; }
  .table-stack thead { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); }
  .table-stack table { border: 0; }
  .table-stack tr {
    border: 1px solid var(--border); border-radius: var(--radius-sm);
    margin-bottom: .6rem; background: var(--surface-2) !important; padding: .3rem 0;
  }
  .table-stack td { border-bottom: 0; padding: .35rem 1rem; }
  .table-stack td:first-child { padding-top: .7rem; }
  .table-stack td:last-child { padding-bottom: .7rem; }
  .table-stack td.num {
    text-align: left; font-weight: 700; font-size: 1.08rem; color: var(--brand-strong);
  }
  .table-stack td[data-label]::before {
    content: attr(data-label); display: block;
    font-size: .74rem; letter-spacing: .06em; text-transform: uppercase;
    color: var(--text-muted); font-weight: 660; margin-bottom: .1rem;
  }
}

/* =========================================================
   Definitionslisten (Öffnungszeiten, Kontakte)
   ========================================================= */
/* Container-Query statt Viewport: das Grid steckt auch in schmalen Spalten
   (Sidebar), wo die Viewport-Breite nichts ueber den Platz aussagt. */
.info-grid {
  container-type: inline-size;
  display: grid; gap: 0; margin: 1.4rem 0;
  border: 1px solid var(--border); border-radius: var(--radius); overflow: hidden;
}
.info-grid > div {
  display: grid; grid-template-columns: minmax(8rem, 13rem) 1fr; gap: 1rem;
  padding: .8rem 1.1rem; border-bottom: 1px solid var(--border);
}
.info-grid > div:last-child { border-bottom: 0; }
.info-grid > div:nth-child(odd) { background: var(--surface-2); }
.info-grid dt { font-weight: 620; color: var(--text); }
.info-grid dd { margin: 0; color: var(--text-muted); }
@container (max-width: 400px) {
  .info-grid > div { grid-template-columns: 1fr; gap: .1rem; }
}

/* Kontaktkarte */
.contact-card {
  background: var(--surface-2); border: 1px solid var(--border);
  border-radius: var(--radius); padding: 1.5rem;
}
.contact-card h3 { margin-bottom: .8rem; }
.contact-card p { margin-bottom: .6rem; font-size: .96rem; }
.contact-card a { font-weight: 560; }

/* =========================================================
   Footer
   ========================================================= */
.site-footer {
  background: var(--green-900); color: #cfe0d6;
  margin-top: clamp(3rem, 7vw, 5rem);
  padding-block: clamp(2.5rem, 5vw, 3.8rem) 0;
}
.site-footer a { color: #fff; text-decoration: none; }
.site-footer a:hover { color: var(--gold-400); text-decoration: underline; }
.footer-grid {
  display: grid; gap: clamp(1.8rem, 4vw, 3rem);
  grid-template-columns: repeat(auto-fit, minmax(min(100%, 14rem), 1fr));
  padding-bottom: 2.5rem;
}
.site-footer h2 {
  font-size: .76rem; letter-spacing: .13em; text-transform: uppercase;
  color: var(--gold-400); margin-bottom: 1rem;
}
.site-footer p { font-size: .95rem; margin-bottom: .5rem; color: #cfe0d6; }
.site-footer ul { list-style: none; padding: 0; margin: 0; }
.site-footer li { margin-bottom: .5rem; font-size: .95rem; }
.footer-brand { display: flex; align-items: center; gap: .8rem; margin-bottom: 1rem; }
.footer-brand img { width: 38px; }
.footer-brand strong { color: #fff; font-size: 1.1rem; letter-spacing: -.02em; }
.footer-hours { font-variant-numeric: tabular-nums; }
.footer-hours span { color: #fff; }
.footer-bottom {
  border-top: 1px solid rgba(255, 255, 255, .13);
  padding-block: 1.3rem;
  display: flex; flex-wrap: wrap; gap: .6rem 1.6rem;
  align-items: center; justify-content: space-between;
  font-size: .875rem;
}
.footer-bottom nav { display: flex; flex-wrap: wrap; gap: .4rem 1.4rem; }

/* Demo-Banner */
.demo-banner {
  background: var(--gold-400); color: #3b2c00;
  font-size: .86rem; font-weight: 600; text-align: center;
  padding: .5rem var(--gutter); line-height: 1.4;
}
.demo-banner a { color: #3b2c00; }

/* Utilities */
.visually-hidden {
  position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px;
  overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; border: 0;
}
.mt-0 { margin-top: 0; }
.mb-0 { margin-bottom: 0; }
.center { text-align: center; }
