/* ---------------------------------------------------------------------------
   Kundenprojekte — ein Stylesheet, keine Abhaengigkeiten.

   Zwei Punkte, die aus Erfahrung drinstehen muessen:
   - min-width: 0 auf jede Rasterspalte, sonst drueckt eine breite Tabelle
     das Raster auseinander und die Seite laeuft auf dem Handy seitlich ueber.
   - Breite Elemente bekommen einen eigenen overflow-x-Bereich.
   --------------------------------------------------------------------------- */

:root {
  --papier:      #ffffff;
  --grund:       #f6f7f8;
  --text:        #1b2026;
  --text-leise:  #5b656f;
  --linie:       #e2e6ea;
  --akzent:      #1F4E79;
  --akzent-hell: #eaf1f8;
  --gruen:       #2F6F4E;
  --gruen-hell:  #e8f2ec;
  --gelb-hell:   #fdf3e2;
  --gelb-dunkel: #8A4B08;
  --radius:      12px;
  --schatten:    0 1px 2px rgba(20,30,40,.06), 0 8px 24px rgba(20,30,40,.06);
}

* { box-sizing: border-box; }

html { -webkit-text-size-adjust: 100%; }

body {
  margin: 0;
  background: var(--grund);
  color: var(--text);
  font: 17px/1.65 -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto,
        "Helvetica Neue", Arial, sans-serif;
}

h1, h2, h3 { line-height: 1.22; letter-spacing: -.015em; }
h1 { font-size: clamp(1.8rem, 4.5vw, 2.6rem); margin: 0 0 .5rem; }
h2 { font-size: 1.35rem; margin: 2.4rem 0 .8rem; }
h3 { font-size: 1.05rem; margin: 0 0 .6rem; }

a { color: var(--akzent); }

.bahn { max-width: 1120px; margin: 0 auto; padding: 0 1.25rem; }
.klein { font-size: .875rem; color: var(--text-leise); }
.versteckt {
  position: absolute; width: 1px; height: 1px; overflow: hidden;
  clip: rect(0 0 0 0); white-space: nowrap;
}
.rechts { text-align: right; }
.leer   { color: var(--text-leise); }

.sprungmarke {
  position: absolute; left: -9999px; background: var(--text); color: #fff;
  padding: .6rem 1rem; z-index: 10;
}
.sprungmarke:focus { left: 1rem; top: 1rem; }

/* --- Kopf ---------------------------------------------------------------- */
.kopf { background: var(--papier); border-bottom: 1px solid var(--linie); }
.kopf-innen {
  display: flex; align-items: center; justify-content: space-between;
  gap: 1rem; flex-wrap: wrap; padding-block: .9rem;
}
.marke { display: flex; align-items: center; gap: .7rem; text-decoration: none; color: inherit; }
.marke strong { display: block; font-size: 1.02rem; }
.marke small  { display: block; color: var(--text-leise); font-size: .82rem; }
.marke-zeichen {
  width: 30px; height: 30px; border-radius: 8px; flex: none;
  background: linear-gradient(135deg, var(--akzent), var(--gruen));
}
.kopf-nav { display: flex; align-items: center; gap: 1.1rem; flex-wrap: wrap; }
.kopf-nav a { text-decoration: none; color: var(--text-leise); font-size: .95rem; }
.kopf-nav a:hover, .kopf-nav a.ist-aktiv { color: var(--text); }

.knopf {
  display: inline-block; background: var(--akzent); color: #fff;
  padding: .62rem 1.1rem; border-radius: 999px; text-decoration: none;
  font-size: .93rem; font-weight: 600; border: 0;
}
.knopf:hover { background: #17395a; }
.knopf-klein { padding: .42rem .95rem; font-size: .88rem; }

/* --- Held ---------------------------------------------------------------- */
.held { background: var(--papier); border-bottom: 1px solid var(--linie); padding: 2.6rem 0 2rem; }
.fuehrung { font-size: 1.06rem; color: var(--text-leise); max-width: 62ch; margin: 0 0 1.4rem; }

/* --- Kennzahlen ---------------------------------------------------------- */
.kennzahlen-band {
  display: grid; grid-template-columns: repeat(auto-fit, minmax(150px, 1fr));
  gap: .75rem; margin: 1.4rem 0 0;
}
.kennzahlen-band > div {
  min-width: 0; background: var(--grund); border: 1px solid var(--linie);
  border-radius: var(--radius); padding: .85rem 1rem;
}
.held .kennzahlen-band > div { background: var(--akzent-hell); border-color: #d6e3ef; }
.kennzahlen-band dt { font-size: .8rem; color: var(--text-leise); margin: 0 0 .2rem; }
.kennzahlen-band dd {
  margin: 0; font-size: 1.7rem; font-weight: 700; letter-spacing: -.02em;
  font-variant-numeric: tabular-nums;
}
.kennzahlen-band dd small { font-size: .95rem; font-weight: 500; color: var(--text-leise); }

/* --- Filter -------------------------------------------------------------- */
.filterleiste {
  display: flex; flex-wrap: wrap; gap: .7rem; align-items: center;
  margin: 2rem 0 1.2rem;
}
.suchfeld input, .regionwahl select {
  border: 1px solid var(--linie); border-radius: 999px; padding: .55rem 1rem;
  font: inherit; font-size: .93rem; background: var(--papier); color: var(--text);
  min-width: 15rem;
}
.regionwahl select { min-width: 11rem; }
.filterknoepfe { display: flex; flex-wrap: wrap; gap: .45rem; }
.filter {
  --farbe: var(--text-leise);
  border: 1px solid var(--linie); background: var(--papier); color: var(--text-leise);
  border-radius: 999px; padding: .5rem .9rem; font: inherit; font-size: .88rem;
  cursor: pointer;
}
.filter:hover { border-color: var(--farbe); color: var(--text); }
.filter.ist-aktiv { background: var(--farbe); border-color: var(--farbe); color: #fff; }
.filter.ist-aktiv[data-filter="alle"] { background: var(--text); border-color: var(--text); }
.filter .anzahl { opacity: .65; font-variant-numeric: tabular-nums; }
.treffer { color: var(--text-leise); font-size: .9rem; margin: 0 0 1rem; }

/* --- Kacheln ------------------------------------------------------------- */
.raster {
  display: grid; grid-template-columns: repeat(auto-fill, minmax(258px, 1fr));
  gap: 1rem; padding-bottom: 3rem;
}
.kachel {
  min-width: 0; display: flex; flex-direction: column;
  background: var(--papier); border: 1px solid var(--linie);
  border-radius: var(--radius); padding: 1.1rem; text-decoration: none;
  color: inherit; transition: box-shadow .15s, transform .15s, border-color .15s;
}
/* Muss hier stehen: `display: flex` oben schlaegt die Browserregel
   `[hidden] { display: none }`. Ohne diese Zeile blendet der Filter die
   Kacheln zwar aus — sie bleiben aber sichtbar, und in „Handwerk" steht
   dann ein Gastrobetrieb. */
.kachel[hidden] { display: none; }
.kachel:hover { box-shadow: var(--schatten); transform: translateY(-2px); border-color: #cfd6dd; }
.kachel.ist-hervorgehoben { border-color: var(--akzent); box-shadow: var(--schatten); }
.kachel h2 { font-size: 1.12rem; margin: .55rem 0 .1rem; }
.kachel-ort { margin: 0 0 .8rem; font-size: .88rem; color: var(--text-leise); }
.kachel-ergebnis { margin: 0 0 .6rem; font-size: 1rem; }
.kachel-ergebnis strong { font-variant-numeric: tabular-nums; }
.kachel-fakten {
  list-style: none; margin: 0 0 1rem; padding: 0;
  font-size: .85rem; color: var(--text-leise);
}
.kachel-fakten li { padding-left: 1.05rem; position: relative; }
.kachel-fakten li::before {
  content: "✓"; position: absolute; left: 0; color: var(--gruen); font-size: .8rem;
}
.kachel-mehr { margin-top: auto; font-size: .88rem; font-weight: 600; color: var(--akzent); }

.kachel-marke {
  --farbe: var(--text-leise);
  display: inline-block; font-size: .74rem; font-weight: 600; letter-spacing: .03em;
  text-transform: uppercase; color: var(--farbe);
  background: color-mix(in srgb, var(--farbe) 10%, transparent);
  border-radius: 999px; padding: .22rem .6rem;
}

/* --- Kundenseite --------------------------------------------------------- */
.kundenseite { padding-bottom: 3.5rem; }
.brotkrumen { font-size: .85rem; color: var(--text-leise); margin: 1.4rem 0 1.2rem; }
.brotkrumen span { margin: 0 .35rem; }
.kunden-kopf { margin-bottom: 1.2rem; }
.kunden-kopf h1 { margin-top: .55rem; }
.anonymhinweis {
  background: var(--gelb-hell); border: 1px solid #f0dfc0; color: var(--gelb-dunkel);
  border-radius: var(--radius); padding: .7rem .95rem; font-size: .9rem; max-width: 62ch;
}

.spalten {
  display: grid; grid-template-columns: minmax(0, 1fr) 300px;
  gap: 2rem; align-items: start; margin-top: 2rem;
}
.inhalt { min-width: 0; }          /* ohne das sprengt die Tabelle das Raster */
.randspalte { min-width: 0; display: grid; gap: 1rem; position: sticky; top: 1rem; }
.inhalt p { max-width: 68ch; }

.kasten {
  background: var(--papier); border: 1px solid var(--linie);
  border-radius: var(--radius); padding: 1.1rem;
}
.kasten-ruf { background: var(--akzent-hell); border-color: #d6e3ef; }
.kasten-ruf .knopf { margin-top: .5rem; }
.paare { margin: 0; display: grid; grid-template-columns: auto 1fr; gap: .3rem .9rem; font-size: .9rem; }
.paare dt { color: var(--text-leise); }
.paare dd { margin: 0; text-align: right; }

.zitat {
  margin: 1.8rem 0; padding: 1.1rem 1.3rem; background: var(--gruen-hell);
  border-left: 4px solid var(--gruen); border-radius: 0 var(--radius) var(--radius) 0;
}
.zitat blockquote { margin: 0; font-size: 1.05rem; }
.zitat blockquote::before { content: "„"; }
.zitat blockquote::after  { content: "“"; }
.zitat figcaption { margin-top: .5rem; font-size: .86rem; color: var(--text-leise); }

/* Beleg aus dem Postfach — die Bitte, die Anzeige abzuschalten. Bewusst
   anders als das Zitat: das ist kein Lob, sondern ein Nachweis. */
.beleg {
  margin: 1.8rem 0; padding: .9rem 1.2rem; background: var(--papier);
  border: 1px solid var(--linie); border-left: 4px solid var(--gruen);
  border-radius: 0 var(--radius) var(--radius) 0;
}
.beleg-offen { border-left-color: var(--gelb-dunkel); }
.beleg figcaption {
  font-size: .78rem; font-weight: 600; letter-spacing: .02em;
  text-transform: uppercase; color: var(--gruen); margin-bottom: .4rem;
}
.beleg-offen figcaption { color: var(--gelb-dunkel); }
.beleg blockquote { margin: 0; font-size: .98rem; }
.beleg blockquote::before { content: "„"; }
.beleg blockquote::after  { content: "“"; }
.beleg .quelle { margin: .45rem 0 0; }

/* Breite Tabellen scrollen in sich selbst, nie die Seite. */
.tabellenbereich { overflow-x: auto; border: 1px solid var(--linie); border-radius: var(--radius); background: var(--papier); }
.stellentabelle { width: 100%; border-collapse: collapse; font-size: .93rem; }
.stellentabelle th, .stellentabelle td {
  padding: .65rem .85rem; text-align: left; border-bottom: 1px solid var(--linie);
  white-space: nowrap;
}
.stellentabelle th { font-size: .78rem; text-transform: uppercase; letter-spacing: .03em; color: var(--text-leise); }
.stellentabelle tbody tr:last-child td { border-bottom: 0; }
.stellentabelle td:first-child { white-space: normal; min-width: 11rem; }
/* Der Zeitraum darf umbrechen — sonst muss die Tabelle unnoetig scrollen. */
.stellentabelle td:nth-child(4) { white-space: normal; }

.marke { display: inline-block; font-size: .78rem; font-weight: 600; border-radius: 999px; padding: .18rem .6rem; }
.marke-besetzt { background: var(--gruen-hell); color: var(--gruen); }
.marke-laeuft  { background: var(--gelb-hell);  color: var(--gelb-dunkel); }

.quelle { font-size: .82rem; color: var(--text-leise); margin-top: .7rem; }
.zurueck { margin-top: 2.5rem; }
.hinweis {
  background: var(--gelb-hell); border: 1px solid #f0dfc0; border-radius: var(--radius);
  padding: 1rem 1.2rem;
}

/* --- Fuss ---------------------------------------------------------------- */
.fuss { background: var(--papier); border-top: 1px solid var(--linie); margin-top: 2rem; }
.fuss-innen {
  display: grid; grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
  gap: 1.5rem; padding-block: 2rem;
}
.fuss-innen > div { min-width: 0; }
.fuss-nav { display: flex; flex-wrap: wrap; gap: .9rem; margin-top: .6rem; font-size: .9rem; }

/* --- Schmale Bildschirme -------------------------------------------------- */
@media (max-width: 860px) {
  .spalten { grid-template-columns: minmax(0, 1fr); }
  .randspalte { position: static; }
}
@media (max-width: 520px) {
  body { font-size: 16px; }
  .suchfeld input { min-width: 100%; }
  .kennzahlen-band dd { font-size: 1.45rem; }
}

@media print {
  .kopf-nav, .filterleiste, .kasten-ruf, .zurueck, .sprungmarke { display: none; }
  body { background: #fff; }
}
