:root {
  --bg: #f4f4f6; --fg: #1c1c1e; --card: #fff; --border: #dcdce0;
  --accent: #4c86a8; --rabatt: #b3006b; --error: #b3423a; --ok: #3a7d44; --meta: #6b6b70;
}
* { box-sizing: border-box; }
body {
  margin: 0; background: var(--bg); color: var(--fg);
  font: 15px/1.5 system-ui, -apple-system, "Segoe UI", sans-serif;
}
main { max-width: 1240px; margin: 0 auto; padding: 1.5rem 1rem 3rem; }
a { color: var(--accent); }

/* ------------------------------------------------------------- Kopfleisten */
.topbar {
  display: flex; justify-content: space-between; align-items: center; gap: 1rem;
  background: var(--card); border-bottom: 1px solid var(--border);
  padding: .6rem 1rem; flex-wrap: wrap;
}
.topbar .brand { font-weight: 700; color: var(--fg); text-decoration: none; }
.topbar .brand span { color: var(--rabatt); }
.topbar nav { display: flex; gap: 1rem; align-items: center; flex-wrap: wrap; }
.topbar nav a { text-decoration: none; }
.topbar nav a.aktiv { color: var(--fg); font-weight: 600; border-bottom: 2px solid var(--rabatt); }

.ausgabe-leiste {
  display: flex; gap: .8rem; align-items: center; flex-wrap: wrap;
  background: #fff; border-bottom: 1px solid var(--border);
  padding: .5rem 1rem; font-size: .88rem;
}
.ausgabe-leiste .spacer { flex: 1; }
.ausgabe-leiste a { text-decoration: none; }
.chip {
  background: var(--rabatt); color: #fff; border-radius: 999px;
  padding: .05rem .5rem; font-size: .75rem; font-weight: 600;
}

h1 { font-size: 1.45rem; margin: 0 0 1rem; }
h2 { font-size: 1.02rem; margin: 0 0 .6rem; }
.meta { color: var(--meta); font-size: .85rem; }

/* ------------------------------------------------------------------ Karten */
.card {
  background: var(--card); border: 1px solid var(--border);
  border-radius: 10px; padding: 1rem 1.2rem; margin-bottom: 1.2rem;
}
.tabellenkarte { padding: .3rem .6rem; overflow-x: auto; }
.zweispaltig { display: grid; grid-template-columns: 1fr 1fr; gap: 1.2rem; }
@media (max-width: 820px) { .zweispaltig { grid-template-columns: 1fr; } }

.zahlenband {
  list-style: none; margin: 0 0 1.2rem; padding: 0;
  display: grid; grid-template-columns: repeat(auto-fit, minmax(150px, 1fr)); gap: .8rem;
}
.zahlenband li {
  background: var(--card); border: 1px solid var(--border); border-radius: 10px;
  padding: .7rem .9rem; display: flex; flex-direction: column;
}
.zahlenband strong { font-size: 1.35rem; line-height: 1.2; }
.zahlenband span { color: var(--meta); font-size: .8rem; }

/* ---------------------------------------------------------------- Tabellen */
table.liste { width: 100%; border-collapse: collapse; font-size: .9rem; }
table.liste th {
  text-align: left; font-size: .75rem; text-transform: uppercase;
  letter-spacing: .04em; color: var(--meta); font-weight: 600;
  padding: .5rem .5rem; border-bottom: 1px solid var(--border); white-space: nowrap;
}
table.liste td { padding: .42rem .5rem; border-bottom: 1px solid #eee; vertical-align: top; }
table.liste tr:last-child td { border-bottom: none; }
table.liste tbody tr:hover { background: #fafafb; }
table.liste .num { text-align: right; white-space: nowrap; }
table.liste td .meta { display: block; font-size: .78rem; }
table.liste td.meta { font-size: .8rem; }
.preis { font-weight: 600; }
.schmal td { padding: .3rem .4rem; }

.rabatt {
  display: inline-block; background: var(--rabatt); color: #fff;
  border-radius: 5px; padding: .05rem .35rem; font-size: .78rem;
  font-weight: 600; white-space: nowrap;
}
.rabatt.hell { background: #f0dfe9; color: var(--rabatt); }
.rabatt.klein { font-size: .68rem; margin-left: .3rem; }

.art {
  display: inline-block; border-radius: 5px; padding: .05rem .35rem;
  font-size: .75rem; background: #eceef1; color: #445;
}
.art-einzelangebot { background: #dcebf3; color: #1d5975; }
.art-seitentext { background: #f2ecdc; color: #7a5c17; }

.balken { width: 45%; }
.balken span {
  display: block; height: 8px; border-radius: 4px;
  background: linear-gradient(90deg, var(--rabatt), #d76fa8); min-width: 2px;
}

/* ----------------------------------------------------------------- Filter */
form.filter { display: flex; gap: .8rem; flex-wrap: wrap; align-items: flex-end; }
form.filter label { display: flex; flex-direction: column; font-size: .78rem; color: var(--meta); gap: .2rem; }
form.filter input, form.filter select {
  padding: .38rem .5rem; border: 1px solid var(--border); border-radius: 6px;
  font: inherit; font-size: .88rem; background: #fff; min-width: 150px; color: var(--fg);
}
form.filter .knoepfe { display: flex; gap: .6rem; align-items: center; }
form.filter button {
  padding: .45rem 1rem; border: none; border-radius: 6px;
  background: var(--rabatt); color: #fff; font: inherit; font-weight: 600; cursor: pointer;
}
.knopf-leer { font-size: .85rem; }
.ergebniszeile { margin: 0 0 .6rem; }
.legende { margin-top: 1rem; line-height: 1.7; }
.legende strong { color: var(--fg); }

/* ------------------------------------------------------------ Seitenbilder */
.seitenband { display: flex; gap: .8rem; overflow-x: auto; padding-bottom: .4rem; }
.seitenbild { flex: 0 0 130px; text-decoration: none; color: inherit; }
.seitenbild img {
  width: 100%; border: 1px solid var(--border); border-radius: 6px; display: block; background: #fff;
}
.seitenbild span { display: block; font-size: .8rem; margin-top: .3rem; }
.seitenbild em { display: block; color: var(--meta); font-style: normal; font-size: .75rem; }
.seitenbild:hover img { border-color: var(--rabatt); }

.seitenansicht { display: grid; grid-template-columns: minmax(280px, 460px) 1fr; gap: 1.2rem; align-items: start; }
@media (max-width: 900px) { .seitenansicht { grid-template-columns: 1fr; } }
.seitenbild-gross img { width: 100%; border-radius: 6px; display: block; }
.seitentext {
  white-space: pre-wrap; font-size: .8rem; color: #333; max-height: 26rem;
  overflow: auto; background: #fafafb; padding: .6rem; border-radius: 6px; margin: .6rem 0 0;
}
details summary { cursor: pointer; font-weight: 600; font-size: .95rem; }
.blaettern { display: flex; gap: 1rem; margin-top: -.6rem; margin-bottom: 1rem; font-size: .9rem; }

.aktionsliste { list-style: none; margin: 0; padding: 0; }
.aktionsliste li { padding: .3rem 0; border-bottom: 1px solid #eee; display: flex; gap: .5rem; align-items: baseline; flex-wrap: wrap; }
.aktionsliste li:last-child { border-bottom: none; }

.tiefstpreise { list-style: none; margin: 0; padding: 0; display: grid;
  grid-template-columns: repeat(auto-fill, minmax(190px, 1fr)); gap: .3rem .9rem; font-size: .88rem; }
.tiefstpreise li { display: flex; justify-content: space-between; border-bottom: 1px solid #eee; padding: .2rem 0; }

.ablauf { margin: 0; padding-left: 1.2rem; }
.ablauf li { margin-bottom: .4rem; }
.statusliste { list-style: none; margin: 0; padding: 0; font-size: .9rem; }
.statusliste li { padding: .2rem 0; }
.statusliste .fehler { color: var(--error); }

footer {
  max-width: 1240px; margin: 0 auto; padding: 0 1rem 2rem;
  color: var(--meta); font-size: .82rem;
}
