@font-face {
  font-family: "Manrope";
  src: url("/static/fonts/manrope.woff2") format("woff2");
  font-weight: 200 800;
  font-display: swap;
}
@font-face {
  font-family: "Bricolage";
  src: url("/static/fonts/bricolage.woff2") format("woff2");
  font-weight: 200 800;
  font-display: swap;
}

:root {
  --paper: #f7f3ec;
  --paper-2: #efe9de;
  --ink: #211f1b;
  --ink-2: #4b463d;
  --ink-3: #7c7466;
  --rule: #ddd4c5;
  --rule-strong: #c4b7a2;
  --accent: #a56a12;
  --accent-soft: #f0e2c8;
  --green: #3f6b4f;
  --red: #8c3b2e;
  --blue: #40587a;
  --radius: 5px;
  --mono: "Manrope", ui-sans-serif, system-ui, sans-serif;
}

* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body {
  margin: 0;
  background: var(--paper);
  color: var(--ink);
  font: 15px/1.55 "Manrope", ui-sans-serif, system-ui, sans-serif;
  font-feature-settings: "kern";
}
a { color: inherit; text-decoration: none; }
a:hover { color: var(--accent); }
h1, h2, h3 { font-family: "Bricolage", "Manrope", sans-serif; font-weight: 600; letter-spacing: -0.015em; margin: 0; }
h1 { font-size: clamp(30px, 4vw, 46px); line-height: 1.04; }
h2 { font-size: 21px; line-height: 1.2; }
h3 { font-size: 16px; }
p { margin: 0 0 0.8em; }
code, .mono { font-family: var(--mono); font-variant-numeric: tabular-nums; }
.wrap { width: min(1180px, calc(100% - 40px)); margin: 0 auto; }

/* ---------- Header ---------- */
.top { border-bottom: 1px solid var(--rule-strong); background: var(--paper); }
.top-inner { display: flex; align-items: center; gap: 28px; min-height: 74px; }
.brand { display: flex; align-items: center; gap: 12px; flex: none; }
.brand-mark {
  display: grid; place-items: center; width: 38px; height: 38px; border-radius: 4px;
  background: var(--ink); color: #d8a648; font-family: "Bricolage", sans-serif;
  font-size: 14px; letter-spacing: 0.06em;
}
.brand-text { display: flex; flex-direction: column; line-height: 1.15; }
.brand-text strong { font-family: "Bricolage", sans-serif; font-size: 17px; font-weight: 600; }
.brand-text small { color: var(--ink-3); font-size: 11.5px; letter-spacing: 0.02em; }
.nav { display: flex; gap: 4px; margin-left: 8px; }
.nav a {
  padding: 8px 10px; font-size: 14px; color: var(--ink-2); border-bottom: 2px solid transparent;
  transition: color .15s, border-color .15s;
}
.nav a:hover { color: var(--ink); }
.nav a.on { color: var(--ink); border-bottom-color: var(--accent); }
.quick { margin-left: auto; display: flex; border: 1px solid var(--rule-strong); border-radius: 3px; overflow: hidden; background: #fffdf8; }
.quick input { border: 0; background: transparent; padding: 8px 10px; font: inherit; font-size: 13.5px; width: 180px; outline: none; }
.quick button { border: 0; background: var(--ink); color: #f7f3ec; padding: 0 12px; cursor: pointer; font-size: 16px; }
.quick button:hover { background: var(--accent); }

/* ---------- Typografie / Basis ---------- */
.kicker { font-size: 11.5px; letter-spacing: 0.14em; text-transform: uppercase; color: var(--accent); font-weight: 700; margin-bottom: 10px; }
.lede { color: var(--ink-2); font-size: 16px; max-width: 62ch; }
.sub { color: var(--ink-3); font-size: 13px; }
.rule { border: 0; border-top: 1px solid var(--rule); margin: 18px 0; }
.pill { display: inline-block; padding: 1px 6px; border: 1px solid var(--rule-strong); border-radius: 99px; font-size: 11px; color: var(--ink-3); white-space: nowrap; }
.pill.veg { border-color: #b9cfb9; color: var(--green); background: #f0f6ee; }
.pill.vegan { border-color: #a9c8a9; color: #2f5b3a; background: #e9f3e6; }
.pill.fish { border-color: #b6c6d8; color: var(--blue); background: #eef3f8; }
.pill.meat { border-color: #dcc0b6; color: var(--red); background: #f9efea; }
.pill.notice { border-color: var(--rule); color: var(--ink-3); background: var(--paper-2); }
.price { font-variant-numeric: tabular-nums; white-space: nowrap; }
.price.incl { color: var(--ink-3); font-size: 12px; }

/* ---------- Seitenkopf ---------- */
.page-head { padding: 34px 0 22px; border-bottom: 1px solid var(--rule); margin-bottom: 22px; }
.page-head .row { display: flex; align-items: flex-end; justify-content: space-between; gap: 24px; flex-wrap: wrap; }
.page-head .lede { margin-top: 10px; }
.head-stat { text-align: right; }
.head-stat .big { font-family: "Bricolage", sans-serif; font-size: 32px; font-weight: 600; line-height: 1; font-variant-numeric: tabular-nums; }
.head-stat .cap { font-size: 11.5px; color: var(--ink-3); text-transform: uppercase; letter-spacing: .09em; margin-top: 4px; }

/* ---------- KPI-Leiste ---------- */
.kpis { display: grid; grid-template-columns: repeat(4, 1fr); border: 1px solid var(--rule-strong); background: #fffdf8; margin-bottom: 26px; }
@media (min-width: 1001px) {
  .kpi:nth-child(4n) { border-right: 0; }
  .kpi:nth-child(n+5) { border-top: 1px solid var(--rule); }
}
.kpi { padding: 14px 16px; border-right: 1px solid var(--rule); }
.kpi:last-child { border-right: 0; }
.kpi .n { font-family: "Bricolage", sans-serif; font-size: 25px; font-weight: 600; line-height: 1.05; font-variant-numeric: tabular-nums; }
.kpi .l { font-size: 11.5px; color: var(--ink-3); margin-top: 3px; }
.kpi .s { font-size: 11px; color: var(--ink-3); margin-top: 2px; }

/* ---------- Raster ---------- */
.grid { display: grid; gap: 26px; }
.g-2 { grid-template-columns: 1.55fr 1fr; }
.g-2e { grid-template-columns: 1fr 1fr; }
.g-3 { grid-template-columns: repeat(3, 1fr); }
.panel { border-top: 2px solid var(--ink); padding-top: 14px; min-width: 0; }
.grid > * { min-width: 0; }
.panel-head { display: flex; align-items: baseline; justify-content: space-between; gap: 6px 12px; margin-bottom: 12px; flex-wrap: wrap; }
.panel-head h2 { font-size: 18px; }
.panel-head .hint { color: var(--ink-3); font-size: 12px; }

/* ---------- Diagramme ---------- */
.chart { width: 100%; height: auto; display: block; overflow: visible; }
.chart .grid { stroke: var(--rule); stroke-width: 1; }
.chart .tick { fill: var(--ink-3); font-size: 10px; font-family: var(--mono); }
.chart .label { fill: var(--ink-2); font-size: 12px; }
.chart .value { fill: var(--ink); font-size: 11.5px; font-weight: 700; font-family: var(--mono); }
.chart .bar { fill: var(--accent); opacity: .88; }
.chart .bar:hover { opacity: 1; }
.chart .line { fill: none; stroke: var(--ink); stroke-width: 2; }
.chart .dot { fill: var(--paper); stroke: var(--ink); stroke-width: 2; }
.chart-bars .bar { fill: #6f5a33; }

/* ---------- Listen / Tabellen ---------- */
.list { border-top: 1px solid var(--rule-strong); }
.rowitem { display: flex; gap: 18px; padding: 13px 2px; border-bottom: 1px solid var(--rule); align-items: flex-start; }
.rowitem:hover { background: #fffdf8; }
.dateblock { flex: none; width: 66px; }
.dateblock .d { font-family: "Bricolage", sans-serif; font-size: 22px; font-weight: 600; line-height: 1; font-variant-numeric: tabular-nums; }
.dateblock .m { font-size: 11px; color: var(--ink-3); text-transform: uppercase; letter-spacing: .07em; margin-top: 3px; }
.rowitem .body { flex: 1; min-width: 0; }
.rowitem .title { font-weight: 700; font-size: 14.5px; overflow: hidden; }
.rowitem .title a { display: block; max-width: 100%; overflow: hidden; text-overflow: ellipsis; }
.rowitem .title a:hover { color: var(--accent); }
.rowitem .desc { color: var(--ink-2); font-size: 13.5px; margin-top: 3px; }
.rowitem .meta { flex: none; text-align: right; font-size: 12px; color: var(--ink-3); min-width: 92px; }
.rowitem .meta .pr { color: var(--ink); font-weight: 700; font-size: 13px; }

table.tbl { width: 100%; border-collapse: collapse; font-size: 13.5px; }
table.tbl th { text-align: left; font-size: 11px; text-transform: uppercase; letter-spacing: .08em; color: var(--ink-3); font-weight: 700; padding: 8px 10px; border-bottom: 1px solid var(--rule-strong); white-space: nowrap; }
table.tbl td { padding: 9px 10px; border-bottom: 1px solid var(--rule); vertical-align: top; }
table.tbl tr:hover td { background: #fffdf8; }
table.tbl td.num, table.tbl th.num { text-align: right; font-variant-numeric: tabular-nums; white-space: nowrap; }
table.tbl .dishname { font-weight: 600; }
table.tbl .dishdesc { color: var(--ink-3); font-size: 12.5px; }

/* ---------- Formulare ---------- */
.filters { display: flex; flex-wrap: wrap; gap: 10px 14px; align-items: flex-end; padding: 14px 16px; background: var(--paper-2); border: 1px solid var(--rule); margin-bottom: 18px; }
.field { display: flex; flex-direction: column; gap: 4px; }
.field label { font-size: 10.5px; text-transform: uppercase; letter-spacing: .08em; color: var(--ink-3); font-weight: 700; }
.field input, .field select {
  font: inherit; font-size: 13px; padding: 6px 8px; border: 1px solid var(--rule-strong);
  background: #fffdf8; border-radius: 3px; color: var(--ink); min-width: 0;
}
.field input[type=search] { min-width: 200px; }
.field input[type=date] { width: 138px; }
.field input[type=number] { width: 92px; }
.btn { font: inherit; font-size: 13px; font-weight: 700; padding: 7px 13px; border: 1px solid var(--ink); background: var(--ink); color: #f7f3ec; border-radius: 3px; cursor: pointer; }
.btn:hover { background: var(--accent); border-color: var(--accent); }
.btn.ghost { background: transparent; color: var(--ink); border-color: var(--rule-strong); }
.btn.ghost:hover { border-color: var(--ink); color: var(--ink); background: #fffdf8; }
.check { display: flex; align-items: center; gap: 6px; font-size: 13px; padding-bottom: 7px; }
.active-filters { display: flex; flex-wrap: wrap; gap: 8px; margin: -6px 0 14px; }
.chip { font-size: 12px; border: 1px solid var(--rule-strong); background: #fffdf8; border-radius: 99px; padding: 2px 9px; color: var(--ink-2); }
.chip b { font-weight: 700; }
.resultline { display: flex; justify-content: space-between; align-items: baseline; gap: 12px; margin-bottom: 8px; color: var(--ink-3); font-size: 12.5px; }

/* ---------- Pagination ---------- */
.pager { display: flex; align-items: center; gap: 6px; padding: 18px 0 4px; flex-wrap: wrap; }
.pager a, .pager span {
  min-width: 32px; text-align: center; padding: 6px 9px; border: 1px solid var(--rule-strong);
  border-radius: 3px; font-size: 13px; color: var(--ink-2); background: #fffdf8;
}
.pager a:hover { border-color: var(--ink); color: var(--ink); }
.pager .cur { background: var(--ink); border-color: var(--ink); color: #f7f3ec; font-weight: 700; }
.pager .off { color: var(--ink-3); border-color: var(--rule); background: transparent; }
.pager .spacer { flex: 1; border: 0; background: none; }

/* ---------- Plan-Detail ---------- */
.detail-grid { display: grid; grid-template-columns: 1fr 300px; gap: 34px; align-items: start; }
.cat-block { margin-bottom: 22px; }
.cat-block h3 { font-size: 12px; text-transform: uppercase; letter-spacing: .1em; color: var(--accent); padding-bottom: 5px; border-bottom: 1px solid var(--rule); margin-bottom: 8px; }
.dish { display: flex; justify-content: space-between; gap: 16px; padding: 7px 0; border-bottom: 1px dotted var(--rule); }
.dish:last-child { border-bottom: 0; }
.dish .n { font-weight: 600; }
.dish .d { color: var(--ink-3); font-size: 12.5px; }
.dish .p { flex: none; font-variant-numeric: tabular-nums; font-weight: 700; font-size: 13px; }
.side { border-left: 1px solid var(--rule); padding-left: 22px; }
.side h3 { font-size: 12px; text-transform: uppercase; letter-spacing: .09em; color: var(--ink-3); margin-bottom: 8px; }
.side dl { margin: 0 0 18px; display: grid; grid-template-columns: 1fr auto; gap: 4px 10px; font-size: 13px; }
.side dt { color: var(--ink-3); }
.side dd { margin: 0; text-align: right; font-variant-numeric: tabular-nums; }
.side .versions a { display: flex; justify-content: space-between; padding: 5px 0; border-bottom: 1px dotted var(--rule); font-size: 12.5px; }
.side .versions a.cur { font-weight: 700; color: var(--accent); }
details.raw { margin-top: 26px; max-width: calc(100% - 334px); border: 1px solid var(--rule); background: #fffdf8; padding: 10px 14px; }
details.raw summary { cursor: pointer; font-size: 13px; font-weight: 700; color: var(--ink-2); }
details.raw pre { white-space: pre-wrap; font: 12.5px/1.5 var(--mono); color: var(--ink-2); margin: 12px 0 2px; }
.prevnext { display: flex; justify-content: space-between; gap: 12px; margin-top: 24px; padding-top: 14px; border-top: 1px solid var(--rule); font-size: 13px; }
.prevnext a { color: var(--ink-2); }
.prevnext a:hover { color: var(--accent); }

/* ---------- Kalender ---------- */
.cal-head { display: flex; align-items: flex-end; justify-content: space-between; gap: 18px; flex-wrap: wrap; margin-bottom: 16px; }
.cal-nav { display: flex; align-items: center; gap: 8px; }
.cal-nav a { padding: 6px 10px; border: 1px solid var(--rule-strong); border-radius: 3px; background: #fffdf8; font-size: 13px; }
.cal-nav a:hover { border-color: var(--ink); }
.cal { width: 100%; border-collapse: collapse; table-layout: fixed; }
.cal th { font-size: 10.5px; text-transform: uppercase; letter-spacing: .08em; color: var(--ink-3); text-align: left; padding: 6px 8px; border-bottom: 1px solid var(--rule-strong); }
.cal td { border: 1px solid var(--rule); vertical-align: top; height: 108px; padding: 6px 8px; }
.cal td.out { background: #f2ede4; color: var(--ink-3); }
.cal td.has { background: #fffdf8; }
.cal td.today { outline: 2px solid var(--accent); outline-offset: -2px; }
.cal .daynum { font-family: "Bricolage", sans-serif; font-size: 17px; font-weight: 600; line-height: 1; font-variant-numeric: tabular-nums; }
.cal .daynum a:hover { color: var(--accent); }
.cal .soup { font-size: 11px; color: var(--ink-3); margin-top: 4px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.cal .main { font-size: 11.5px; line-height: 1.3; margin-top: 2px; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
.cal .cprice { font-size: 10.5px; color: var(--ink-3); margin-top: 3px; font-variant-numeric: tabular-nums; }
.cal .none { font-size: 10.5px; color: var(--ink-3); font-style: italic; margin-top: 4px; }
.wd-short { display: none; }
.mobile-agenda { display: none; }
.yearbar { display: grid; grid-template-columns: repeat(12, 1fr); gap: 4px; margin: 12px 0 24px; }
.yearbar a { display: block; padding: 7px 6px; border: 1px solid var(--rule); background: #fffdf8; font-size: 11px; color: var(--ink-2); }
.yearbar a.on { border-color: var(--accent); background: var(--accent-soft); font-weight: 700; }
.yearbar .c { display: block; font-family: "Bricolage", sans-serif; font-size: 15px; font-variant-numeric: tabular-nums; }

/* ---------- Heatmap ---------- */
.heat { width: 100%; border-collapse: separate; border-spacing: 3px; font-size: 10px; }
.heat th { color: var(--ink-3); font-weight: 600; text-align: center; font-size: 9.5px; }
.heat td { text-align: center; padding: 5px 2px; border-radius: 2px; font-variant-numeric: tabular-nums; color: var(--ink-2); }
.heat td a { display: block; }
.heat .y { text-align: right; color: var(--ink-3); padding-right: 6px; font-size: 10.5px; }

/* ---------- Über ---------- */
.prose { max-width: 74ch; }
.prose h2 { margin: 30px 0 10px; }
.prose h2:first-child { margin-top: 0; }
.prose ul { padding-left: 20px; }
.prose li { margin-bottom: 6px; }
.era { display: grid; grid-template-columns: 130px 1fr; gap: 14px; padding: 10px 0; border-bottom: 1px solid var(--rule); font-size: 13.5px; }
.era .when { color: var(--ink-3); font-variant-numeric: tabular-nums; }
.notebox { border-left: 3px solid var(--accent); background: var(--accent-soft); padding: 12px 16px; font-size: 13.5px; color: var(--ink-2); margin: 16px 0; }

/* ---------- Footer ---------- */
.foot { border-top: 1px solid var(--rule-strong); margin-top: 48px; padding: 20px 0 28px; color: var(--ink-3); font-size: 12.5px; }
.foot-inner { display: flex; justify-content: space-between; gap: 18px; flex-wrap: wrap; }
.foot p { margin: 0; }
.foot code { background: var(--paper-2); padding: 1px 4px; border-radius: 2px; }
.foot a { text-decoration: underline; text-underline-offset: 2px; }

/* ---------- Responsiv ---------- */
@media (max-width: 1000px) {
  .kpis { grid-template-columns: repeat(3, 1fr); }
  .kpi:nth-child(3n) { border-right: 0; }
  .kpi:nth-child(-n+3) { border-bottom: 1px solid var(--rule); }
  .g-2, .g-2e, .g-3 { grid-template-columns: 1fr; }
  .detail-grid { grid-template-columns: 1fr; }
  details.raw { max-width: 100%; }
  .side { border-left: 0; border-top: 1px solid var(--rule); padding-left: 0; padding-top: 18px; }
  .quick { display: none; }
}
@media (max-width: 760px) {
  .wrap { width: calc(100% - 24px); }
  .top-inner { flex-wrap: wrap; min-height: 0; padding: 10px 0; gap: 10px; }
  .nav { order: 3; width: 100%; overflow-x: auto; margin-left: 0; gap: 0; }
  .nav a { padding: 7px 7px; white-space: nowrap; font-size: 12.5px; }
  .brand-text small { display: none; }
  .kpis { grid-template-columns: repeat(2, 1fr); }
  .yearbar { grid-template-columns: repeat(6, 1fr); }
  .kpi { border-right: 1px solid var(--rule) !important; border-bottom: 1px solid var(--rule); }
  .kpi:nth-child(2n) { border-right: 0 !important; }
  .kpi:nth-last-child(-n+2) { border-bottom: 0; }
  .rowitem { gap: 12px; }
  .dateblock { width: 52px; }
  .rowitem .meta { min-width: 72px; }
  .cal th { text-align: center; padding: 4px 2px; font-size: 9.5px; letter-spacing: .02em; }
  .cal td { height: 46px; padding: 4px 2px; }
  .cal .daynum { font-size: 15px; text-align: center; }
  .cal .cell-detail, .cal .none { display: none; }
  .wd-long { display: none; }
  .wd-short { display: inline; }
  .mobile-agenda { display: block; margin-top: 16px; }
  .cal-nav { flex-wrap: wrap; gap: 6px; }
  .mobile-agenda h3 { font-size: 14px; margin: 0 0 6px; }
  .agenda-item { display: block; padding: 10px 0; border-top: 1px solid var(--rule); }
  .agenda-date { display: block; font-size: 11px; color: var(--ink-3); text-transform: uppercase; letter-spacing: .04em; }
  .agenda-main { display: block; font-size: 13.5px; line-height: 1.35; margin-top: 2px; }
  .agenda-meta { display: block; font-size: 11px; color: var(--ink-3); margin-top: 2px; }
  table.tbl thead { display: none; }
  table.tbl tr { display: grid; grid-template-columns: 1fr auto; padding: 9px 0; border-bottom: 1px solid var(--rule); gap: 0 8px; }
  table.tbl td { border: 0; padding: 2px 0; }
  table.tbl td.num { text-align: right; }
  table.tbl td::before { content: attr(data-label); display: block; font-size: 9.5px; text-transform: uppercase; letter-spacing: .07em; color: var(--ink-3); }
  .filters .field { flex: 1 1 130px; }
  .field input[type=search] { min-width: 0; width: 100%; }
}
@media print {
  .top, .foot, .filters, .pager, .quick { display: none; }
  body { background: #fff; font-size: 11px; }
  .panel { border-top-color: #000; }
  a { text-decoration: none; color: #000; }
}

@media (max-width: 760px) {
  #series-chart { height: 330px !important; }
  #dist-chart { height: 540px !important; }
}
