:root {
  color-scheme: dark;
  --bg: #0a0e13;
  --bg-2: #101720;
  --bg-3: #16202c;
  --bg-4: #1c2836;
  --line: #24313f;
  --line-soft: #1b2634;
  --fg: #e6edf3;
  --fg-2: #9fb0c0;
  --fg-3: #6b7f92;
  --accent: #4cc38a;
  --accent-2: #7ee2b0;
  --accent-dim: #1f5f45;
  --warn: #e5a53f;
  --danger: #e8635a;
  --live: #ff6b4a;
  --info: #5aa9e6;
  --radius: 12px;
  --mono: ui-monospace, "SF Mono", "Cascadia Mono", Consolas, monospace;

  /* Schmale Grotesk wie auf amtlichen Aushängen und Straßenschildern.
     Bahnschrift liegt auf Windows, DIN Alternate auf macOS. */
  --display: "Bahnschrift", "DIN Alternate", "Oswald", "Arial Narrow", "Segoe UI", sans-serif;
  --seal: #c8362b;      /* Stempelrot — nur für Sperrvermerke und Siegel */
  --seal-dim: #5c211c;
}

/* Tastaturbedienung muss sichtbar sein, überall. */
:where(a, button, input, select, summary, [tabindex]):focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: 2px;
  border-radius: 4px;
}

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation-duration: .001ms !important; transition-duration: .001ms !important; }
}

* { box-sizing: border-box; }
html, body { margin: 0; padding: 0; }

body {
  background: var(--bg);
  color: var(--fg);
  font: 15px/1.55 -apple-system, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
  -webkit-font-smoothing: antialiased;
}

a { color: var(--info); }
b { font-weight: 600; }

.wrap { max-width: 1560px; margin: 0 auto; padding: 0 20px 80px; }
.hidden { display: none !important; }
.empty { padding: 60px 20px; text-align: center; color: var(--fg-3); }

/* ---------- Kopfbereich ---------- */

header.top {
  border-bottom: 1px solid var(--line);
  background: linear-gradient(180deg, #101823, var(--bg));
  padding: 18px 0 0;
}

.brand { display: flex; align-items: center; gap: 16px; flex-wrap: wrap; }
.brandtext { display: flex; flex-direction: column; gap: 1px; min-width: 0; }
.brand h1 {
  font-family: var(--display); font-weight: 600;
  font-size: 19px; margin: 0; letter-spacing: 0.01em; text-transform: uppercase;
}
.brand .sub { color: var(--fg-2); font-size: 12.5px; }

/* Wortmarke: der Strich steht oben und ist das Marktniveau, der Name steht
   darunter — below the mark. Das Zeichen ist damit dasselbe wie der Name.
   Kein Wappen, kein Siegel — die stehen echten Behörden zu. */
.mark {
  font-family: var(--display); font-weight: 700; font-size: 21px;
  letter-spacing: 0.16em; text-transform: uppercase;
  color: var(--fg); text-decoration: none; white-space: nowrap;
  padding-top: 5px; border-top: 2px solid var(--seal);
  transition: color .15s, border-color .15s;
}
.mark:hover { border-top-color: var(--accent); }
.mark.small { font-size: 14px; border-top-width: 1px; padding-top: 3px; }

/* Sprache: der Ort entscheidet, die Wahl schlägt den Ort. */
.langswitch { display: inline-flex; border: 1px solid var(--line); border-radius: 8px; overflow: hidden; margin: 0 4px; }
.langswitch button {
  background: var(--bg-2); border: 0; color: var(--fg-3);
  font-family: var(--display); font-size: 13px; font-weight: 600; letter-spacing: 0.08em;
  padding: 7px 11px; cursor: pointer;
}
.langswitch button:hover { color: var(--fg); }
.langswitch button[aria-pressed="true"] { background: var(--bg-4); color: var(--fg); }

.brand .mark { font-size: 16px; letter-spacing: 0.14em; }

.account {
  margin-left: auto; display: flex; align-items: center; gap: 8px;
  font-size: 12px; color: var(--fg-2);
}
.acct-market, .acct-plan, .acct-mail {
  border: 1px solid var(--line); background: var(--bg-3);
  border-radius: 999px; padding: 4px 10px; white-space: nowrap;
}
.acct-market { font-family: var(--display); letter-spacing: 0.08em; text-transform: uppercase; }
.acct-plan.warn { border-color: #5c4820; color: var(--warn); background: #241f10; }
.acct-mail { max-width: 220px; overflow: hidden; text-overflow: ellipsis; color: var(--fg-3); }
.acct-out {
  background: none; border: 1px solid var(--line); color: var(--fg-2);
  border-radius: 999px; padding: 4px 11px; font: inherit; font-size: 12px; cursor: pointer;
}
.acct-out:hover { color: var(--fg); border-color: var(--fg-3); }
.acct-pay {
  background: #10221a; border: 1px solid var(--accent-dim); color: var(--accent);
  border-radius: 999px; padding: 4px 12px; font: inherit; font-size: 12px; font-weight: 600; cursor: pointer;
}
.acct-pay:hover { border-color: var(--accent); }
.acct-pay:disabled { opacity: .6; cursor: default; }

@media (max-width: 760px) {
  .account { margin-left: 0; width: 100%; flex-wrap: wrap; }
  .acct-mail { display: none; }
}

.provenance {
  margin-top: 14px;
  display: flex; flex-wrap: wrap; gap: 8px 18px;
  font-size: 12.5px; color: var(--fg-2);
}
.provenance b { color: var(--fg); }
.provenance .dot { color: var(--accent); }
.provenance code { font-family: var(--mono); font-size: 11.5px; }

.tabs { display: flex; gap: 4px; margin-top: 18px; }
.tabs button {
  background: none; border: 0; border-bottom: 2px solid transparent;
  color: var(--fg-2); padding: 10px 14px; font-size: 14px; cursor: pointer; font-family: inherit;
}
.tabs button:hover { color: var(--fg); }
.tabs button[aria-selected="true"] { color: var(--fg); border-bottom-color: var(--accent); }

/* ---------- Werkzeugleiste ---------- */

.toolbar {
  position: sticky; top: 0; z-index: 30;
  margin: 18px 0 16px;
  background: color-mix(in srgb, var(--bg-2) 94%, transparent);
  backdrop-filter: blur(8px);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 14px 16px 12px;
}

.filters {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(150px, 1fr));
  gap: 11px 12px;
}
.field { display: flex; flex-direction: column; gap: 5px; min-width: 0; }
.field.grow { grid-column: span 2; }
.field label {
  font-size: 11px; text-transform: uppercase; letter-spacing: 0.06em; color: var(--fg-3);
  display: flex; align-items: baseline; gap: 6px; white-space: nowrap;
  overflow: hidden; text-overflow: ellipsis;
}
.field label b { color: var(--accent); font-variant-numeric: tabular-nums; }
.field label .hint { text-transform: none; letter-spacing: 0; font-size: 10.5px; opacity: .7; }
.field label kbd {
  font-family: var(--mono); border: 1px solid var(--line); border-radius: 4px;
  padding: 0 4px; background: var(--bg-3);
}
.field input, .field select {
  background: var(--bg-3); border: 1px solid var(--line); color: var(--fg);
  border-radius: 8px; padding: 8px 10px; font: inherit; font-size: 14px; min-width: 0;
}
.field input:focus, .field select:focus { outline: 2px solid var(--accent-dim); border-color: var(--accent); }

.field input[type="range"] {
  padding: 0; height: 32px; background: none; border: 0; accent-color: var(--accent); cursor: pointer;
}

.chips { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; margin-top: 12px; }
.chip {
  display: inline-flex; align-items: center; gap: 7px;
  font-size: 12.5px; color: var(--fg-2); cursor: pointer;
  background: var(--bg-3); border: 1px solid var(--line); border-radius: 999px; padding: 5px 11px 5px 9px;
}
.chip:hover { color: var(--fg); border-color: var(--fg-3); }
.chip input { accent-color: var(--accent); margin: 0; }
.chip:has(input:checked) { border-color: var(--accent-dim); color: var(--accent); background: #10221a; }
.chip b { color: var(--fg); font-variant-numeric: tabular-nums; }
.chip-spacer { flex: 1; }

.viewtoggle { display: inline-flex; border: 1px solid var(--line); border-radius: 8px; overflow: hidden; }
.viewtoggle button {
  background: var(--bg-3); border: 0; color: var(--fg-3);
  font: inherit; font-size: 12.5px; padding: 6px 11px; cursor: pointer;
}
.viewtoggle button.on { background: var(--bg-4); color: var(--fg); }

.btn-reset {
  background: var(--bg-3); border: 1px solid var(--line); color: var(--fg-2);
  border-radius: 8px; padding: 6px 12px; font: inherit; font-size: 12.5px; cursor: pointer;
}
.btn-reset:hover { color: var(--fg); border-color: var(--fg-3); }

/* ---------- Überblick: Kacheln + Verteilung ---------- */

.stats { display: flex; flex-direction: column; gap: 12px; margin-bottom: 16px; }
.statsrow { display: flex; flex-wrap: wrap; gap: 14px; align-items: stretch; }

.classbar { display: flex; flex-wrap: wrap; gap: 7px; }
.cchip {
  display: inline-flex; align-items: baseline; gap: 7px;
  background: var(--bg-2); border: 1px solid var(--line); border-radius: 999px;
  padding: 6px 13px; cursor: pointer; font: inherit; font-size: 12.5px; color: var(--fg-2);
}
.cchip:hover { border-color: var(--fg-3); color: var(--fg); }
.cchip b { font-size: 14px; color: var(--fg); font-variant-numeric: tabular-nums; }
.cchip i { font-style: normal; font-size: 11px; color: var(--fg-3); }
.cchip.on { border-color: var(--accent-dim); background: #10221a; color: var(--accent); }
.cchip.on b { color: var(--accent); }

.classnote {
  font-size: 12.5px; color: var(--fg-2); line-height: 1.6;
  border-left: 3px solid var(--warn); background: #1a1610;
  padding: 10px 14px; border-radius: 0 8px 8px 0;
}
.classnote b { color: var(--fg); }

.tiles { display: flex; gap: 10px; flex-wrap: wrap; }
.tile {
  background: var(--bg-2); border: 1px solid var(--line); border-radius: 10px;
  padding: 9px 14px; min-width: 116px; cursor: pointer; font: inherit;
  display: flex; flex-direction: column; gap: 1px; text-align: left; color: var(--fg-2);
}
.tile:hover { border-color: var(--fg-3); }
.tile b {
  font-family: var(--display); font-size: 23px; font-weight: 600;
  color: var(--fg); font-variant-numeric: tabular-nums; letter-spacing: 0.01em;
}
.tile span { font-size: 11.5px; }
.tile.on { border-color: var(--accent-dim); background: #10221a; }
.tile.on b { color: var(--accent); }

.hist {
  flex: 1; min-width: 280px;
  display: flex; align-items: flex-end; gap: 3px;
  background: var(--bg-2); border: 1px solid var(--line); border-radius: 10px; padding: 8px 12px 6px;
}
.hbar {
  flex: 1; background: none; border: 0; padding: 0; cursor: pointer; font: inherit;
  display: flex; flex-direction: column; align-items: stretch; gap: 3px; height: 56px;
  justify-content: flex-end;
}
.hbar i { display: block; background: var(--bg-4); border-radius: 3px 3px 0 0; transition: background .15s; }
.hbar.on i { background: var(--accent-dim); }
.hbar:hover i { background: var(--accent); }
.hbar span { font-size: 9.5px; color: var(--fg-3); font-variant-numeric: tabular-nums; }
.hbar.on span { color: var(--accent); }
.histcap { font-size: 10px; color: var(--fg-3); align-self: flex-end; padding-bottom: 12px; white-space: nowrap; }

.resultbar {
  display: flex; align-items: baseline; justify-content: space-between;
  gap: 16px; flex-wrap: wrap; margin-bottom: 14px;
}
.resultbar .count { font-size: 13.5px; color: var(--fg-2); }
.resultbar .count b { color: var(--fg); }

.morewrap { display: flex; justify-content: center; margin-top: 22px; }
.btn-more {
  background: var(--bg-2); border: 1px solid var(--line); color: var(--fg-2);
  border-radius: 999px; padding: 10px 22px; font: inherit; font-size: 13.5px; cursor: pointer;
}
.btn-more:hover { color: var(--fg); border-color: var(--accent-dim); }

/* ---------- Karten ---------- */

.grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(400px, 1fr)); gap: 16px; }

.card {
  background: var(--bg-2);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 14px 16px 16px;
  display: flex; flex-direction: column; gap: 11px;
  position: relative; overflow: hidden;
  transition: border-color .15s, box-shadow .15s, transform .15s;
}
.card:hover {
  border-color: #31465c;
  box-shadow: 0 10px 30px rgba(0, 0, 0, .35);
  transform: translateY(-1px);
}
.card.is-live { border-color: #5a3226; }
.card.is-live::before {
  content: ''; position: absolute; inset: 0 auto 0 0; width: 3px; background: var(--live);
}

.cardtop { display: flex; align-items: center; justify-content: space-between; gap: 10px; }

.status {
  display: inline-flex; align-items: center; gap: 6px;
  font-family: var(--display); font-size: 12px; font-weight: 600;
  letter-spacing: 0.05em; text-transform: uppercase;
  padding: 3px 10px; border-radius: 999px; border: 1px solid var(--line); color: var(--fg-3); background: var(--bg-3);
}
.status.live { color: #ffb09a; border-color: #6b3226; background: #24120d; }
.status.live i {
  width: 6px; height: 6px; border-radius: 50%; background: var(--live);
  box-shadow: 0 0 0 0 rgba(255, 107, 74, .7); animation: pulse 1.9s infinite;
}
@keyframes pulse {
  70% { box-shadow: 0 0 0 7px rgba(255, 107, 74, 0); }
  100% { box-shadow: 0 0 0 0 rgba(255, 107, 74, 0); }
}
.status.soon { color: #f0d178; border-color: #6b5a2a; background: #241f10; }
.status.later { color: var(--fg-2); }
.status.past { color: var(--fg-3); }

.star {
  background: none; border: 0; color: var(--fg-3); font-size: 18px; line-height: 1;
  cursor: pointer; padding: 2px 4px; border-radius: 6px;
}
.star:hover { color: var(--warn); background: var(--bg-3); }
.star.on { color: var(--warn); }

.badges { display: flex; flex-wrap: wrap; gap: 6px; }
.tag {
  font-size: 11px; padding: 3px 8px; border-radius: 999px;
  border: 1px solid var(--line); color: var(--fg-2); background: var(--bg-3); white-space: nowrap;
}
.tag.icra { border-color: #6b3f2a; color: #f0a878; background: #241610; }
.tag.ihale { border-color: #2a4a6b; color: #86bdf0; background: #101a24; }
.tag.seg { border-color: #2f4536; color: #96d3b0; background: #101a14; }
.tag.warn { border-color: #6b5a2a; color: #f0d178; background: #241f10; }
.tag.conf-belastbar { border-color: var(--accent-dim); color: var(--accent-2); }
.tag.conf-grob { color: var(--fg-3); }

.card h3 { margin: 0; font-size: 14.5px; line-height: 1.45; font-weight: 600; color: var(--fg); }
.card .where { font-size: 12.5px; color: var(--fg-2); }

.priceblock {
  display: flex; align-items: center; justify-content: space-between; gap: 14px; flex-wrap: wrap;
  border-top: 1px solid var(--line-soft); border-bottom: 1px solid var(--line-soft); padding: 11px 0;
}
.pricecol { min-width: 0; }
.price-main {
  font-family: var(--display); font-size: 30px; font-weight: 600;
  letter-spacing: 0.01em; line-height: 1.05; font-variant-numeric: tabular-nums;
}
.price-note { font-size: 11.5px; color: var(--fg-3); margin-top: 3px; }

.discount {
  display: inline-flex; flex-direction: column; align-items: flex-end;
  padding: 5px 11px; border-radius: 9px; line-height: 1.1;
  font-family: var(--display); font-weight: 600; font-size: 22px; letter-spacing: 0.01em;
  font-variant-numeric: tabular-nums; white-space: nowrap;
}
.discount.best { background: #0f2b1e; color: var(--accent-2); border: 1px solid var(--accent-dim); }
.discount.good { background: #10251c; color: var(--accent); border: 1px solid var(--accent-dim); }
.discount.mid { background: #241f10; color: var(--warn); border: 1px solid #5c4820; }
.discount.none {
  background: var(--bg-3); color: var(--fg-3); border: 1px solid var(--line);
  font-weight: 500; font-size: 12px; flex-direction: row; align-items: center;
}
.discount small { font-weight: 400; font-size: 10px; opacity: 0.8; letter-spacing: 0.02em; }
/* Die kleinere der beiden Zahlen — die, auf die es beim Bezahlen ankommt. */
.discount .netto {
  font-style: normal; font-size: 11px; font-weight: 500;
  color: var(--fg-2); margin-top: 3px; letter-spacing: 0.02em;
}

/* Drei Balken: was aufgerufen wird, was am Ende abgeht, was der Markt verlangt. */
.bars { display: flex; flex-direction: column; gap: 5px; }
.barrow { display: grid; grid-template-columns: 66px 1fr 92px; align-items: center; gap: 9px; }
.barlabel { font-size: 11px; color: var(--fg-3); }
.bartrack { height: 9px; background: var(--bg-3); border-radius: 999px; overflow: hidden; }
.bartrack i { display: block; height: 100%; border-radius: 999px; }
.bartrack i.bid { background: linear-gradient(90deg, var(--accent-dim), var(--accent)); }
/* Warnfarbe, weil dieser Balken den Abstand zum Markt frisst. */
.bartrack i.allin { background: linear-gradient(90deg, var(--accent-dim), var(--warn)); }
.bartrack i.mkt { background: #3a4c5e; }
.barval { font-size: 11.5px; color: var(--fg-2); text-align: right; font-variant-numeric: tabular-nums; }
.empty-bars {
  font-size: 11.5px; color: var(--fg-3); background: var(--bg-3);
  border: 1px dashed var(--line); border-radius: 8px; padding: 7px 10px;
}

/* Warum dieses Objekt nicht so weit oben steht, wie seine Prozentzahl vermuten lässt. */
.rankline {
  font-size: 11.5px; color: var(--fg-3); line-height: 1.5;
  border-left: 2px solid #5c4820; padding-left: 9px;
}
.rankline b { color: var(--warn); font-variant-numeric: tabular-nums; }
.rankline span { display: block; font-variant-numeric: tabular-nums; }

.quick { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 4px 16px; font-size: 12.5px; }
.quick div { display: flex; justify-content: space-between; gap: 8px; border-bottom: 1px dashed var(--line-soft); padding-bottom: 3px; }
.quick span:first-child { color: var(--fg-3); white-space: nowrap; }
.quick span:last-child { text-align: right; font-variant-numeric: tabular-nums; }

.actions { display: flex; flex-wrap: wrap; gap: 6px; margin-top: auto; padding-top: 3px; }
.actions a, .actions button {
  font-size: 12px; padding: 6px 10px; border-radius: 8px;
  border: 1px solid var(--line); background: var(--bg-3); color: var(--fg-2);
  text-decoration: none; cursor: pointer; font-family: inherit;
}
.actions a:hover, .actions button:hover { color: var(--fg); border-color: var(--fg-3); }
.actions a.primary { border-color: var(--accent-dim); color: var(--accent); }
.actions .ghost { border-style: dashed; }

/* ---------- Kompaktliste ---------- */

.listview { display: flex; flex-direction: column; gap: 2px; }
.lhead, .lrow {
  display: grid;
  grid-template-columns: 152px minmax(150px, 1.4fr) minmax(110px, .9fr) 92px 128px 96px 132px;
  gap: 12px; align-items: center;
}
.lhead {
  font-size: 10.5px; text-transform: uppercase; letter-spacing: 0.06em; color: var(--fg-3);
  padding: 0 12px 7px; position: sticky; top: 0; background: var(--bg);
}
.lrow {
  background: var(--bg-2); border: 1px solid var(--line-soft); border-radius: 9px;
  padding: 9px 12px; font-size: 13px; position: relative;
}
.lrow:hover { border-color: #31465c; }
.lrow.is-live { border-left: 3px solid var(--live); padding-left: 10px; }
.lwhere { display: flex; flex-direction: column; line-height: 1.35; min-width: 0; }
.lwhere b { font-size: 13px; }
.lwhere span { font-size: 11.5px; color: var(--fg-3); }
.lclass, .larea { font-size: 12px; color: var(--fg-2); }
.larea { text-align: right; font-variant-numeric: tabular-nums; }
.lprice { display: flex; flex-direction: column; text-align: right; font-variant-numeric: tabular-nums; }
.lprice small { font-size: 11px; color: var(--fg-3); }
.ldisc { text-align: right; }
.ldisc .discount { font-size: 15px; padding: 3px 8px; }
.ldisc .discount.none { font-size: 10.5px; }
.lact { display: flex; gap: 4px; justify-content: flex-end; }
.lact button {
  font-size: 11.5px; padding: 5px 8px; border-radius: 7px;
  border: 1px solid var(--line); background: var(--bg-3); color: var(--fg-2); cursor: pointer; font-family: inherit;
}
.lact button:hover { color: var(--fg); border-color: var(--fg-3); }
.lact .star { border: 0; background: none; }

/* ---------- Marktinserate mit echten Fotos ---------- */

.mgrid { display: grid; grid-template-columns: repeat(auto-fill, minmax(280px, 1fr)); gap: 16px; }
.mcard {
  background: var(--bg-2); border: 1px solid var(--line);
  border-radius: var(--radius); overflow: hidden; display: flex; flex-direction: column;
}
.mcard img, .mcard .nophoto { width: 100%; aspect-ratio: 4 / 3; object-fit: cover; background: var(--bg-3); display: block; }
.mcard .body { padding: 13px; display: flex; flex-direction: column; gap: 8px; flex: 1; }
.mcard h4 { margin: 0; font-size: 13.5px; line-height: 1.4; font-weight: 600; }
.mcard .meta { font-size: 12.5px; color: var(--fg-2); }
.mcard .meta.dim { color: var(--fg-3); }
.mcard .price { font-size: 18px; font-weight: 650; }
.mcard a.open { margin-top: auto; font-size: 12.5px; }

/* ---------- Detailansicht ---------- */

dialog {
  background: var(--bg-2); color: var(--fg); border: 1px solid var(--line);
  border-radius: var(--radius); max-width: 940px; width: calc(100vw - 40px);
  max-height: 88vh; padding: 0;
}
dialog::backdrop { background: rgba(2, 6, 12, 0.78); backdrop-filter: blur(2px); }
.dlg-head {
  position: sticky; top: 0; z-index: 2; background: var(--bg-2); border-bottom: 1px solid var(--line);
  padding: 16px 20px; display: flex; justify-content: space-between; gap: 16px; align-items: flex-start;
}
.dlg-head h3 { margin: 0; font-size: 16px; }
.dlg-body { padding: 18px 20px 26px; overflow: auto; }
.dlg-body h4 { margin: 24px 0 8px; font-size: 12px; text-transform: uppercase; letter-spacing: 0.07em; color: var(--fg-3); }
.dlg-body h4:first-child { margin-top: 0; }
.hintline { color: var(--fg-3); font-size: 12.5px; margin: 0 0 10px; }
.zoning { color: var(--fg-2); font-size: 13.5px; }

.kit { display: flex; flex-wrap: wrap; gap: 7px; }
.kitchip {
  display: inline-flex; flex-direction: column; gap: 1px; text-align: left;
  background: var(--bg-3); border: 1px solid var(--line); border-radius: 9px;
  padding: 6px 11px; cursor: pointer; font: inherit; color: var(--fg);
}
.kitchip:hover { border-color: var(--accent-dim); background: #10221a; }
.kitchip span { font-size: 10px; text-transform: uppercase; letter-spacing: 0.06em; color: var(--fg-3); }
.kitchip b { font-size: 13.5px; font-family: var(--mono); }

.kitrow { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 12px; }
.primarybtn {
  display: inline-block; font: inherit; font-size: 12.5px; padding: 8px 13px;
  border: 1px solid var(--accent-dim); border-radius: 8px;
  background: #10221a; color: var(--accent); text-decoration: none; cursor: pointer;
}
.primarybtn:hover { border-color: var(--accent); }

.facts { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 6px 14px; font-size: 13px; }
.facts.wide { grid-template-columns: repeat(auto-fill, minmax(300px, 1fr)); }
.facts div { display: flex; justify-content: space-between; gap: 10px; border-bottom: 1px dashed var(--line-soft); padding-bottom: 4px; }
.facts span:first-child { color: var(--fg-3); }
.facts span:last-child { text-align: right; font-variant-numeric: tabular-nums; }
.facts small { color: var(--fg-3); }

.rawtext {
  white-space: pre-wrap; font-family: var(--mono); font-size: 12.5px; line-height: 1.6;
  background: var(--bg); border: 1px solid var(--line); border-radius: 8px;
  padding: 14px; max-height: 420px; overflow: auto; color: var(--fg-2);
}
.rawtext.short { max-height: none; border-color: var(--accent-dim); color: var(--fg); }
.close-x { background: none; border: 0; color: var(--fg-3); font-size: 22px; cursor: pointer; line-height: 1; }
.close-x:hover { color: var(--fg); }

.note { border-left: 3px solid var(--warn); background: #1a1610; padding: 12px 16px; border-radius: 0 8px 8px 0; margin: 14px 0; color: var(--fg-2); }
.note.ok { border-left-color: var(--accent); background: #0f1d16; }
.note b { color: var(--fg); }

/* ---------- Quellenseite ---------- */

.prose { max-width: 860px; }
.prose h2 { font-size: 18px; margin: 28px 0 10px; }
.prose h2:first-child { margin-top: 4px; }
.prose p, .prose li { color: var(--fg-2); font-size: 14.5px; }
.prose b { color: var(--fg); }
.prose code { font-family: var(--mono); font-size: 12.5px; background: var(--bg-3); padding: 2px 5px; border-radius: 5px; color: var(--fg); }

/* ---------- Rückmeldung beim Kopieren ---------- */

.toast {
  position: fixed; left: 50%; bottom: 26px; transform: translateX(-50%);
  z-index: 100; background: #10221a; color: var(--accent);
  border: 1px solid var(--accent-dim); border-radius: 999px;
  padding: 9px 18px; font-size: 13px; box-shadow: 0 8px 28px rgba(0, 0, 0, .5);
}

/* ---------- Schmale Fenster ---------- */

@media (max-width: 1180px) {
  .lhead, .lrow { grid-template-columns: 140px 1.4fr 1fr 108px 88px; }
  .lclass, .larea { display: none; }
}
@media (max-width: 760px) {
  .grid, .mgrid { grid-template-columns: 1fr; }
  .quick, .facts { grid-template-columns: 1fr; }
  .field.grow { grid-column: span 2; }
  .toolbar { position: static; }
  .lhead { display: none; }
  .lrow { grid-template-columns: 1fr auto; gap: 6px 10px; }
  .lstat, .lwhere, .lprice, .ldisc, .lact { grid-column: auto; }
  .hist { min-width: 0; }
}

/* ===========================================================================
   Startseite und Anmeldung
   ---------------------------------------------------------------------------
   Eigene Formensprache: der Aushang selbst. Schmale Grotesk wie auf amtlichen
   Bekanntmachungen, Monospace für alles Registerartige, und ein einziges
   auffälliges Element — die geschwärzte Preisspalte im Aushang oben. Sie ist
   zugleich das Werbeversprechen und die Bezahlschranke.
   ======================================================================== */

body.site {
  background:
    repeating-linear-gradient(180deg, transparent 0 39px, rgba(255, 255, 255, .012) 39px 40px),
    var(--bg);
}

.shell { max-width: 1180px; margin: 0 auto; padding: 0 24px; }

.eyebrow {
  font-family: var(--mono); font-size: 11px; letter-spacing: 0.22em;
  text-transform: uppercase; color: var(--seal); margin: 0 0 14px;
}

.display {
  font-family: var(--display); font-weight: 600;
  font-size: clamp(38px, 5.4vw, 62px); line-height: 1.02; letter-spacing: -0.005em;
  margin: 0 0 22px; color: var(--fg);
}
.display.sec { font-size: clamp(28px, 3.4vw, 40px); margin-bottom: 30px; }

.lede { color: var(--fg-2); font-size: 16px; line-height: 1.62; max-width: 54ch; margin: 0 0 14px; }
.lede.rule { border-left: 2px solid var(--seal-dim); padding-left: 14px; color: var(--fg-3); font-size: 15px; }

/* ---------- Kopfleiste ---------- */

.sitebar {
  position: sticky; top: 0; z-index: 40;
  background: color-mix(in srgb, var(--bg) 88%, transparent);
  backdrop-filter: blur(10px);
  border-bottom: 1px solid var(--line-soft);
}
.sitebar .shell { display: flex; align-items: center; gap: 20px; height: 68px; }
.sitenav { margin-left: auto; display: flex; align-items: center; gap: 6px; flex-wrap: wrap; }
.sitenav a {
  color: var(--fg-2); text-decoration: none; font-size: 13.5px;
  padding: 8px 12px; border-radius: 8px;
}
.sitenav a:hover { color: var(--fg); background: var(--bg-2); }
.sitenav .ghostlink { border: 1px solid var(--line); }
.sitenav .solidlink { border: 1px solid var(--accent-dim); background: #10221a; color: var(--accent); }
.sitenav .solidlink:hover { border-color: var(--accent); background: #12281f; }

/* Unterhalb dieser Breite steht die Wortmarke nicht mehr neben der
   Navigation, ohne dass die Navigation selbst umbricht. Dann lieber
   zwei saubere Zeilen. */
@media (max-width: 860px) {
  .sitebar .shell { height: auto; padding-top: 12px; padding-bottom: 12px; flex-wrap: wrap; }
  .sitenav { width: 100%; margin-left: 0; }
}

/* ---------- Schaltflächen ---------- */

.btn {
  display: inline-block; text-decoration: none; cursor: pointer;
  font: inherit; font-size: 14px;
  border: 1px solid var(--line); background: var(--bg-3); color: var(--fg);
  border-radius: 9px; padding: 12px 20px;
  transition: border-color .15s, background .15s, color .15s;
}
.btn:hover { border-color: var(--fg-3); }
.btn.primary { border-color: var(--accent-dim); background: #10221a; color: var(--accent); font-weight: 600; }
.btn.primary:hover { border-color: var(--accent); background: #12291f; }
.btn.wide { display: block; width: 100%; text-align: center; }
.btn.disabled { color: var(--fg-3); background: none; border-style: dashed; cursor: not-allowed; }

/* ---------- Aushang oben ---------- */

.hero {
  display: grid; grid-template-columns: 1.05fr 0.95fr; gap: 56px;
  align-items: start; padding: 72px 24px 60px;
}
.cta { display: flex; gap: 10px; flex-wrap: wrap; margin-top: 26px; }
.ctanote { color: var(--fg-3); font-size: 12.5px; margin: 12px 0 0; }

.board {
  border: 1px solid var(--line); border-radius: var(--radius);
  background: linear-gradient(180deg, var(--bg-2), #0c1219);
  overflow: hidden; position: relative;
  box-shadow: 0 24px 60px rgba(0, 0, 0, .45);
}
.boardhead {
  display: flex; align-items: baseline; justify-content: space-between; gap: 12px;
  padding: 14px 16px; border-bottom: 1px solid var(--line);
  background: var(--bg-3);
}
.boardtitle {
  font-family: var(--display); text-transform: uppercase; letter-spacing: 0.08em;
  font-size: 14px; font-weight: 600;
}
.boardstand { font-family: var(--mono); font-size: 11px; color: var(--fg-3); }

.boardrows { display: flex; flex-direction: column; }
.brow {
  display: grid; grid-template-columns: minmax(0, 1fr) auto 62px 96px 58px;
  gap: 12px; align-items: center;
  padding: 11px 16px; border-bottom: 1px solid var(--line-soft);
  animation: rowin .45s cubic-bezier(.2, .7, .3, 1) backwards;
  animation-delay: calc(var(--i) * 55ms);
}
@keyframes rowin { from { opacity: 0; transform: translateY(6px); } }
.brow:last-child { border-bottom: 0; }
.brow.live { box-shadow: inset 3px 0 0 var(--live); }
.bwhere { display: flex; flex-direction: column; min-width: 0; }
.bwhere b { font-size: 13.5px; }
.bwhere i { font-style: normal; font-size: 11.5px; color: var(--fg-3); }
.bfrist { font-family: var(--mono); font-size: 11.5px; color: var(--fg-2); white-space: nowrap; }
.brow.live .bfrist { color: #ffb09a; }

/* Andrang. Nur gesetzt, wo er sich vom Umfeld abhebt — sonst bleibt die Zelle
   leer und hält nur die Spalte. Warm heißt: da sehen viele hin. */
.bheat {
  font-family: var(--mono); font-size: 10.5px; text-align: right;
  white-space: nowrap; color: transparent;
}
.bheat.hot { color: var(--live); }
.bheat.cold { color: var(--fg-3); }

/* Die Bezahlschranke, sichtbar gemacht: das Startgebot ist geschwärzt. */
.bprice {
  height: 13px; border-radius: 3px;
  background: repeating-linear-gradient(115deg, #05080c 0 7px, #10161d 7px 12px);
  border: 1px solid #0a0f14;
}
/* Was den Rang gedrückt hat, steht unter dem Ort — nicht in einer Fußnote.
   Gelb, weil es eine Einschränkung ist; grau, wenn es keine gibt. */
.bcav {
  font-style: normal; font-size: 10.5px; line-height: 1.35;
  color: var(--warn); margin-top: 2px;
  overflow: hidden; text-overflow: ellipsis; white-space: nowrap;
}
.bcav.clean { color: var(--fg-3); }

.bdisc {
  font-family: var(--display); font-size: 17px; font-weight: 600;
  color: var(--accent); text-align: right; font-variant-numeric: tabular-nums;
}
.bdisc small {
  display: block; font-family: inherit; font-size: 9.5px; font-weight: 500;
  letter-spacing: 0.06em; text-transform: uppercase; color: var(--fg-3);
}
.bdisc small.conf-belastbar { color: var(--accent-2); }
.bdisc small.conf-dünn { color: var(--warn); }
.boardempty { padding: 26px 16px; color: var(--fg-3); font-size: 13px; }

.boardfoot {
  display: flex; align-items: center; gap: 12px;
  padding: 13px 16px; border-top: 1px solid var(--line);
  font-size: 11.5px; color: var(--fg-3); background: #0a1016;
}
/* Siegel, aber ein eigenes: kein Behördenwappen, nur ein Sperrvermerk. */
.seal {
  font-family: var(--display); text-transform: uppercase; letter-spacing: 0.1em;
  font-size: 11px; font-weight: 700; color: var(--seal);
  border: 2px solid var(--seal-dim); border-radius: 4px; padding: 3px 8px;
  transform: rotate(-3deg); white-space: nowrap;
}

/* ---------- Eckzahlen ---------- */

/* Der Nebenkostensatz unter der Verteilung — er verschiebt jeden Balken
   darüber nach links und steht deshalb dort, nicht in einer Fußnote. */
.costnote {
  border-left: 2px solid var(--warn); padding-left: 14px;
  color: var(--fg-2); font-size: 14px; margin-top: -6px;
}

/* Gegenstück zur Kostennotiz: die drückt den Abschlag, diese erklärt ihn.
   Deshalb Infofarbe statt Warnfarbe. */
.agenote {
  border-left: 2px solid var(--info); padding-left: 14px;
  color: var(--fg-2); font-size: 14px; margin-top: 14px;
}

.figures {
  display: grid; grid-template-columns: repeat(6, 1fr);
  border-top: 1px solid var(--line); border-bottom: 1px solid var(--line);
  margin-bottom: 8px;
}
/* Die zurückgehaltenen Abschläge — die einzige Eckzahl, die gegen uns spricht.
   Sie steht deshalb in Warnfarbe und nicht klein gedruckt am Rand. */
.fig.held b { color: var(--warn); }
.fig { padding: 22px 20px; border-left: 1px solid var(--line-soft); }
.fig:first-child { border-left: 0; padding-left: 0; }
.fig b {
  display: block; font-family: var(--display); font-size: 30px; font-weight: 600;
  font-variant-numeric: tabular-nums; letter-spacing: 0.01em;
}
.fig span { font-size: 12.5px; color: var(--fg-3); line-height: 1.45; display: block; margin-top: 4px; }

/* Der Gegenblock auf der Objektkarte: warum der Abschlag kleiner ist, als er
   aussieht. Er steht bewusst unter den Balken und nicht hinter einem Aufklapper. */
.against {
  border-top: 1px dashed var(--line); padding-top: 10px;
  font-size: 12px; color: var(--fg-2);
}
.against > b {
  display: block; font-family: var(--display); text-transform: uppercase;
  letter-spacing: 0.08em; font-size: 11px; color: var(--warn); margin-bottom: 6px;
}
.against.clean > b { color: var(--fg-3); }
.against ul { margin: 0; padding: 0; list-style: none; display: grid; gap: 7px; }
.against li { line-height: 1.45; }
.against li i {
  display: block; font-style: normal; font-weight: 600; color: var(--fg);
}

/* ---------- Musterkarte: das Bauteil aus dem Dashboard ---------- */

.sample {
  padding: 84px 24px 0;
  display: grid; grid-template-columns: 1fr 440px; gap: 56px; align-items: start;
}
.sampletext .lede { font-size: 15px; }
.samplecard { position: sticky; top: 96px; }
.samplecard .card { gap: 12px; }

/* Verdeckte Felder — dieselbe Schwärzung wie im Aushang oben. */
.redact {
  display: inline-block; height: 13px; border-radius: 3px; vertical-align: middle;
  background: repeating-linear-gradient(115deg, #05080c 0 7px, #10161d 7px 12px);
  border: 1px solid #0a0f14;
}
.redact.tall { height: 27px; border-radius: 5px; }

.card.locked .star { cursor: default; color: var(--fg-3); }
.lockedbtn {
  font-size: 12px; padding: 6px 10px; border-radius: 8px;
  border: 1px dashed var(--line); background: none; color: var(--fg-3); cursor: default;
  white-space: nowrap;
}

/* ---------- Datenlage: Verteilung und Bezirke ---------- */

.proof { padding: 76px 24px 0; }
.proof .lede { margin-bottom: 34px; }

.chart {
  margin: 0; border: 1px solid var(--line); border-radius: var(--radius);
  background: var(--bg-2); padding: 26px 26px 18px;
}
.chartbars {
  display: grid; grid-auto-flow: column; grid-auto-columns: 1fr;
  gap: 8px; align-items: end; height: 230px;
}
.cbar {
  display: grid; grid-template-rows: auto 1fr auto; align-items: end;
  height: 100%; gap: 7px; text-align: center;
}
.cbar b {
  font-family: var(--display); font-size: 15px; font-weight: 600;
  color: var(--fg-3); font-variant-numeric: tabular-nums;
}
.cbar i {
  display: block; align-self: end; height: var(--h); min-height: 2px;
  background: linear-gradient(180deg, #2f7a58, #1b4634);
  border-radius: 4px 4px 0 0; border-top: 1px solid var(--accent);
  transform-origin: bottom;
  animation: grow .7s cubic-bezier(.2, .8, .3, 1) backwards;
  animation-delay: calc(var(--i) * 45ms);
}
@keyframes grow { from { transform: scaleY(0); } }
.cbar span {
  font-family: var(--mono); font-size: 11px; color: var(--fg-3);
  border-top: 1px solid var(--line); padding-top: 7px;
}
.cbar.over i { background: linear-gradient(180deg, #7a3a33, #3d1e1a); border-top-color: var(--seal); }
.cbar.over span { color: var(--seal); }
.cbar.median i { background: linear-gradient(180deg, var(--accent), #1f5f45); }
.cbar.median b { color: var(--accent); }
.cbar.median span { color: var(--accent); border-top-color: var(--accent-dim); }

.chart figcaption {
  display: flex; justify-content: space-between; align-items: center; gap: 16px;
  flex-wrap: wrap; margin-top: 14px; font-size: 12px; color: var(--fg-3);
}
.medianflag {
  font-family: var(--display); font-size: 13px; letter-spacing: 0.06em; color: var(--accent);
  border: 1px solid var(--accent-dim); border-radius: 999px; padding: 3px 12px; background: #10221a;
}

.countyblock { margin-top: 44px; display: grid; grid-template-columns: 340px 1fr; gap: 36px; align-items: start; }
.countyside { display: grid; gap: 20px; }

/* Bezirkskarte. Kein Kachelbild, keine Bibliothek — nur die Punkte, um die es
   geht. Die Ägäisküste ist ein Nord-Süd-Streifen, das Bild deshalb hochkant. */
.mapfig { margin: 0; }
.mapfig svg {
  display: block; width: 100%; height: auto; max-height: 460px;
  background:
    linear-gradient(180deg, #0d141c, #0a1016);
  border: 1px solid var(--line); border-radius: var(--radius);
}
.mapdot circle { animation: dotin .5s cubic-bezier(.2, .7, .3, 1) backwards; animation-delay: calc(var(--i) * 22ms); }
@keyframes dotin { from { opacity: 0; transform: scale(.4); transform-origin: center; } }
.mapdot text {
  font-family: var(--display); font-size: 9.5px; letter-spacing: 0.04em;
  fill: var(--fg-2); paint-order: stroke; stroke: #0a1016; stroke-width: 2.5px;
}
.mapfig figcaption { margin-top: 9px; font-size: 11px; color: var(--fg-3); line-height: 1.5; }
.countyhead h4 { margin: 0 0 8px; font-size: 17px; }
.countyhead p { margin: 0; font-size: 13px; color: var(--fg-3); line-height: 1.55; }

.counties { list-style: none; margin: 0; padding: 0; }
.counties li {
  display: grid; grid-template-columns: 160px 1fr 108px 72px; gap: 16px; align-items: center;
  padding: 11px 0; border-bottom: 1px solid var(--line-soft);
}
.counties li:first-child { border-top: 1px solid var(--line-soft); }
.cname { display: flex; flex-direction: column; min-width: 0; }
.cname b { font-size: 14px; }
.cname i { font-style: normal; font-size: 11px; color: var(--fg-3); }
.ctrack { height: 7px; background: var(--bg-3); border-radius: 999px; overflow: hidden; }
.ctrack i { display: block; height: 100%; background: linear-gradient(90deg, var(--accent-dim), var(--accent)); border-radius: 999px; }
.ccount { font-size: 13px; color: var(--fg-2); text-align: right; font-variant-numeric: tabular-nums; }
.ccount small { color: var(--fg-3); font-size: 11px; }
.cmed {
  font-family: var(--display); font-size: 17px; color: var(--accent);
  text-align: right; font-variant-numeric: tabular-nums;
}

/* ---------- Rechenweg ---------- */

.how, .access, .sources { padding: 76px 24px 0; }
.steps { display: grid; grid-template-columns: repeat(3, 1fr); gap: 1px; background: var(--line-soft); border: 1px solid var(--line-soft); border-radius: var(--radius); overflow: hidden; }
.step { background: var(--bg-2); padding: 26px 24px 28px; }
.stepno {
  font-family: var(--mono); font-size: 10.5px; letter-spacing: 0.18em;
  text-transform: uppercase; color: var(--fg-3);
  display: inline-block; border-bottom: 1px solid var(--seal-dim); padding-bottom: 5px; margin-bottom: 16px;
}
.step h4 { margin: 0 0 10px; font-size: 16px; font-weight: 600; }
.step p { margin: 0; color: var(--fg-2); font-size: 14px; line-height: 1.62; }

.honest {
  margin-top: 22px; border-left: 3px solid var(--warn); background: #1a1610;
  padding: 16px 20px; border-radius: 0 8px 8px 0; color: var(--fg-2); font-size: 14px; line-height: 1.62;
}
.honest b { display: block; color: var(--fg); margin-bottom: 4px; }

/* ---------- Fragen ---------- */

.faq { padding: 84px 24px 0; }
.faq .lede { margin-bottom: 34px; }

.qlist { border-top: 1px solid var(--line); max-width: 940px; }
.qlist details { border-bottom: 1px solid var(--line); }
.qlist summary {
  cursor: pointer; list-style: none;
  display: flex; align-items: baseline; gap: 14px;
  padding: 20px 0; font-size: 17px; color: var(--fg);
  font-family: var(--display); font-weight: 600; letter-spacing: 0.005em;
}
.qlist summary::-webkit-details-marker { display: none; }
.qlist summary::before {
  content: '+'; color: var(--seal); font-size: 20px; line-height: 1;
  width: 14px; flex: none;
}
.qlist details[open] summary::before { content: '−'; }
.qlist summary:hover { color: var(--accent-2); }
.qlist details p {
  margin: 0 0 16px 28px; max-width: 72ch;
  color: var(--fg-2); font-size: 14.5px; line-height: 1.68;
}
.qlist details > p:first-of-type { margin-top: -4px; }

.qsrc {
  display: flex; flex-wrap: wrap; gap: 6px 14px; align-items: baseline;
  font-family: var(--mono); font-size: 11.5px; padding-bottom: 6px;
}
.qsrc b {
  color: var(--fg-3); text-transform: uppercase; letter-spacing: 0.12em; font-size: 10px; font-weight: 400;
}
.qsrc a { color: var(--info); text-decoration: none; border-bottom: 1px solid #1e3f5c; }
.qsrc a:hover { border-bottom-color: var(--info); }

/* Eine offen gebliebene Frage sieht anders aus als eine beantwortete. */
.open-question summary::before { content: '?'; color: var(--warn); font-size: 17px; }
.open-question[open] summary::before { content: '?'; }
.open-question .qsrc a { color: var(--warn); border-bottom-color: #5c4820; }

/* ---------- Zugang ---------- */

.plans { display: grid; grid-template-columns: repeat(2, 1fr); gap: 18px; }
.plan {
  border: 1px solid var(--line); border-radius: var(--radius);
  background: var(--bg-2); padding: 26px 24px 24px;
  display: flex; flex-direction: column; gap: 16px;
}
.plan.open { border-color: var(--accent-dim); background: linear-gradient(180deg, #101d18, var(--bg-2)); }
.plan.soon { border-style: dashed; background: none; }
.planhead { display: flex; gap: 14px; align-items: center; }
.flag {
  font-family: var(--display); font-weight: 700; font-size: 15px; letter-spacing: 0.06em;
  border: 1px solid var(--line); border-radius: 7px; padding: 9px 11px; background: var(--bg-3); color: var(--fg-2);
}
.plan.open .flag { border-color: var(--accent-dim); color: var(--accent); background: #10221a; }
.plan h4 { margin: 0; font-size: 17px; }
.planwhere { margin: 2px 0 0; font-size: 12.5px; color: var(--fg-3); }

.price { margin: 0; display: flex; align-items: baseline; gap: 8px; }
.price b { font-family: var(--display); font-size: 38px; font-weight: 600; letter-spacing: 0.01em; }
.price span { color: var(--fg-3); font-size: 13px; }
.price.muted b { font-size: 22px; color: var(--fg-3); }
.pricealt { margin: -6px 0 0; font-size: 13px; color: var(--fg-2); }
.pricealt b { font-family: var(--display); font-size: 15px; color: var(--fg); letter-spacing: 0.01em; }

.planlist { margin: 0; padding: 0; list-style: none; display: flex; flex-direction: column; gap: 9px; }
.planlist li {
  font-size: 13.5px; color: var(--fg-2); line-height: 1.5;
  padding-left: 20px; position: relative;
}
.planlist li::before { content: '—'; position: absolute; left: 0; color: var(--fg-3); }
.plan .btn { margin-top: auto; }
.planfoot { margin: 0; font-size: 11.5px; color: var(--fg-3); }

/* ---------- Quellen ---------- */

.srclist { margin: 0; display: grid; grid-template-columns: repeat(2, 1fr); gap: 1px; background: var(--line-soft); }
.srclist > div { background: var(--bg); padding: 20px 22px 22px; }
.srclist dt { font-family: var(--mono); font-size: 13px; color: var(--fg); margin-bottom: 6px; }
.srclist dd { margin: 0; font-size: 13.5px; color: var(--fg-2); line-height: 1.6; }

.sitefoot { margin-top: 80px; border-top: 1px solid var(--line); padding: 26px 0 40px; }
.sitefoot .shell, .sitefoot .wrap {
  display: flex; align-items: center; gap: 18px; flex-wrap: wrap;
  font-size: 12.5px; color: var(--fg-3); padding-bottom: 0;
}
.footlinks { margin-left: auto; display: flex; flex-wrap: wrap; gap: 4px 16px; }
.footlinks a { color: var(--fg-2); text-decoration: none; }
.footlinks a:hover { color: var(--fg); text-decoration: underline; }

/* ---------- Rechtstexte ---------- */

.legalshell { padding-top: 64px; padding-bottom: 40px; max-width: 860px; }
.legal h1.display { margin-bottom: 30px; }
.legal section { margin-top: 56px; scroll-margin-top: 88px; }
.legal h2 {
  font-family: var(--display); font-size: 27px; font-weight: 600; margin: 0 0 6px;
  padding-bottom: 12px; border-bottom: 2px solid var(--seal); letter-spacing: 0.01em;
}
.legal h3 { font-size: 16px; margin: 30px 0 8px; color: var(--fg); }
.legal p, .legal dd { color: var(--fg-2); font-size: 14.5px; line-height: 1.7; }
.legal p { margin: 0 0 14px; }
.legal code { font-family: var(--mono); font-size: 13px; background: var(--bg-3); padding: 1px 5px; border-radius: 4px; color: var(--fg); }

.basis { font-size: 12.5px !important; color: var(--fg-3) !important; margin-top: 10px !important; }
.small { font-size: 12px; }

/* Platzhalter müssen weh tun, solange sie drinstehen. */
.ph {
  color: #ffb0aa; background: #1d1210; border: 1px dashed var(--seal);
  border-radius: 4px; padding: 1px 7px; font-family: var(--mono); font-size: 12.5px;
}

.draftnote {
  border: 1px solid var(--seal-dim); background: #170f0e; border-radius: var(--radius);
  padding: 18px 22px; margin: 0 0 26px !important; color: var(--fg-2) !important;
}
.draftnote b { display: block; color: #ffb0aa; margin-bottom: 6px; }
.draftnote.bottom { margin-top: 56px !important; }

.trnote {
  border-left: 2px solid var(--line); padding-left: 14px;
  font-size: 13px !important; color: var(--fg-3) !important;
}

.sidenote {
  border-left: 3px solid var(--warn); background: #1a1610;
  padding: 12px 16px; border-radius: 0 8px 8px 0;
  font-size: 13px !important; color: var(--fg-2) !important;
}

.legalfacts { margin: 0; }
.legalfacts > div {
  display: grid; grid-template-columns: 290px 1fr; gap: 18px;
  padding: 11px 0; border-bottom: 1px solid var(--line-soft);
}
.legalfacts dt { font-size: 13px; color: var(--fg-3); }
.legalfacts dd { margin: 0; font-size: 14px; }

.formblock {
  margin: 0; border: 1px dashed var(--line); border-radius: var(--radius);
  padding: 20px 24px 8px; background: var(--bg-2);
}
.formblock p { font-size: 14px; }

/* ---------- Kündigungsformular ---------- */

.legal form { max-width: 560px; }
.legal form label {
  display: block; font-size: 11px; text-transform: uppercase; letter-spacing: 0.08em;
  color: var(--fg-3); margin: 18px 0 6px;
}
.legal form label .hint { text-transform: none; letter-spacing: 0; opacity: .8; }
.legal form input[type="text"], .legal form input[type="email"], .legal form textarea {
  width: 100%; background: var(--bg-3); border: 1px solid var(--line); color: var(--fg);
  border-radius: 8px; padding: 11px 12px; font: inherit; font-size: 15px; resize: vertical;
}
.legal form input:focus, .legal form textarea:focus { outline: 2px solid var(--accent-dim); border-color: var(--accent); }
.legal form .radio { margin-top: 10px !important; }
.legal form .btn { margin-top: 26px; }
.legal .kitrow { margin-top: 18px; }
.legal pre.rawtext { max-width: 700px; }

.visually-hidden {
  position: absolute; width: 1px; height: 1px; overflow: hidden;
  clip: rect(0 0 0 0); clip-path: inset(50%); white-space: nowrap;
}

/* Die Kündigungsschaltfläche muss auffallen, nicht versteckt sein. */
.footlinks a.cancel { color: var(--fg); border-bottom: 1px solid var(--seal); }
.footlinks a.cancel:hover { color: #ffb0aa; text-decoration: none; }

@media (max-width: 760px) {
  .legalfacts > div { grid-template-columns: 1fr; gap: 4px; }
  .legal h2 { font-size: 22px; }
  .footlinks { margin-left: 0; }
}

/* ---------- Anmeldung ---------- */

.authshell {
  display: grid; grid-template-columns: 1fr 420px; gap: 60px;
  align-items: start; padding-top: 72px; padding-bottom: 90px;
}
.authside .display { font-size: clamp(32px, 4vw, 48px); }
.authlist { margin: 22px 0 0; padding: 0; list-style: none; display: flex; flex-direction: column; gap: 10px; }
.authlist li {
  font-size: 13.5px; color: var(--fg-2); padding-left: 20px; position: relative;
}
.authlist li::before { content: '—'; position: absolute; left: 0; color: var(--seal); }

.card-auth {
  border: 1px solid var(--line); border-radius: var(--radius);
  background: var(--bg-2); padding: 8px 26px 26px;
  box-shadow: 0 24px 60px rgba(0, 0, 0, .45);
}
.authtabs { display: flex; gap: 4px; margin: 0 -26px 22px; padding: 0 18px; border-bottom: 1px solid var(--line); }
.authtabs button {
  background: none; border: 0; border-bottom: 2px solid transparent;
  color: var(--fg-3); font: inherit; font-size: 13.5px; padding: 14px 10px; cursor: pointer;
}
.authtabs button:hover { color: var(--fg); }
.authtabs button[aria-selected="true"] { color: var(--fg); border-bottom-color: var(--accent); }

.card-auth label {
  display: block; font-size: 11px; text-transform: uppercase; letter-spacing: 0.08em;
  color: var(--fg-3); margin: 16px 0 6px;
}
.card-auth label .hint { text-transform: none; letter-spacing: 0; opacity: .8; }
.card-auth input[type="email"], .card-auth input[type="password"] {
  width: 100%; background: var(--bg-3); border: 1px solid var(--line); color: var(--fg);
  border-radius: 8px; padding: 11px 12px; font: inherit; font-size: 15px;
}
.card-auth input:focus { outline: 2px solid var(--accent-dim); border-color: var(--accent); }
.card-auth .btn { margin-top: 22px; }

.markets { border: 0; margin: 20px 0 0; padding: 0; }
.markets legend {
  font-size: 11px; text-transform: uppercase; letter-spacing: 0.08em; color: var(--fg-3); padding: 0;
}
.radio {
  display: flex !important; align-items: center; gap: 10px; margin: 10px 0 0 !important;
  text-transform: none !important; letter-spacing: 0 !important; font-size: 13.5px !important; color: var(--fg) !important;
  border: 1px solid var(--line); border-radius: 9px; padding: 11px 13px; cursor: pointer; background: var(--bg-3);
}
.radio i { font-style: normal; color: var(--fg-3); font-size: 12px; }
.radio:has(input:checked) { border-color: var(--accent-dim); background: #10221a; }
.radio.disabled { opacity: .5; cursor: not-allowed; }
.radio input { accent-color: var(--accent); }

.authnote {
  margin: 0 0 4px; font-size: 13px; color: var(--warn);
  border-left: 3px solid var(--warn); background: #1a1610; padding: 11px 14px; border-radius: 0 8px 8px 0;
}
.formerr {
  margin: 14px 0 0; font-size: 13px; color: #ffb0aa;
  border: 1px solid #5c2622; background: #1d1210; border-radius: 8px; padding: 10px 13px;
}

/* ---------- Schmale Fenster ---------- */

@media (max-width: 980px) {
  .hero, .authshell { grid-template-columns: 1fr; gap: 40px; }
  .steps, .plans, .srclist { grid-template-columns: 1fr; }
  .sample { grid-template-columns: 1fr; gap: 34px; padding-top: 56px; }
  .samplecard { position: static; max-width: 460px; }
  .countyblock { grid-template-columns: 1fr; gap: 20px; }
  .countyside { grid-template-columns: 1fr; }
  .mapfig svg { max-height: 380px; }
  .counties li { grid-template-columns: 1fr 96px 62px; }
  .ctrack { display: none; }
  .proof { padding-top: 56px; }
  .chartbars { height: 180px; }
  .cbar b { font-size: 12px; }
  .figures { grid-template-columns: repeat(2, 1fr); }
  .fig { border-left: 0; border-top: 1px solid var(--line-soft); padding-left: 0; }
  .fig:first-child, .fig:nth-child(2) { border-top: 0; }
  .how, .access, .sources, .faq { padding-top: 56px; }
  .hero { padding-top: 48px; }
}
@media (max-width: 560px) {
  .figures { grid-template-columns: 1fr; }
  .fig:nth-child(2) { border-top: 1px solid var(--line-soft); }
  .bcav { white-space: normal; }
  .brow { grid-template-columns: minmax(0, 1fr) 74px 48px; }
  .bfrist, .bheat { display: none; }
  .chart { padding: 18px 14px 12px; }
  .chartbars { gap: 4px; }
  .cbar b { display: none; }
}

/* ================================================================
   Deutschland-Dashboard (app-de.html)
   Die deutschen Bekanntmachungen bringen etwas mit, das es in den
   türkischen Aushängen nicht gibt: echte Fotos des Objekts und PDFs
   des Gerichts. Beides braucht eigenen Platz.
   ================================================================ */

.shots { display: grid; grid-template-columns: repeat(4, 1fr); gap: 4px; }
.shots a {
  display: block; aspect-ratio: 4 / 3; overflow: hidden;
  border-radius: 7px; border: 1px solid var(--line-soft); background: var(--bg-3);
}
.shots img { width: 100%; height: 100%; object-fit: cover; display: block; }
.shots a:hover { border-color: var(--fg-3); }
.dlg-body .shots { grid-template-columns: repeat(4, 1fr); margin: 10px 0 4px; }
.dlg-body .shots a { aspect-ratio: 3 / 2; }

/* Belastbarkeit: "amtlich" ist die stärkste Stufe — der Bodenrichtwert
   ist beschlossen, nicht geschätzt. "dünn" warnt vor kleiner Stichprobe. */
.tag.conf-amtlich { border-color: var(--accent-dim); color: var(--accent-2); font-weight: 600; }
.tag.conf-belastbar { border-color: var(--accent-dim); color: var(--accent-2); }
.tag.conf-mittel { color: var(--fg-2); }
.tag.conf-dünn { color: var(--warn); border-color: #5c4820; }

@media (max-width: 560px) {
  .shots { grid-template-columns: repeat(2, 1fr); }
}

/* „neu"/„geändert" muss ins Auge fallen, ohne wie eine Warnung auszusehen —
   es ist eine Neuigkeit, kein Mangel. */
.tag.neu {
  border-color: var(--accent-dim); color: var(--accent-2);
  background: #0f2b1e; font-weight: 600;
}

/* Hinweis, dass der Beobachter etwas nachgetragen hat. Bewusst kein
   automatisches Nachladen — die Liste unter den Fingern auszutauschen wäre
   ärgerlicher als ein Knopf. */
.freshnote {
  display: flex; align-items: center; justify-content: space-between; gap: 12px;
  margin-bottom: 12px; padding: 10px 14px; border-radius: 10px;
  background: #0f2b1e; border: 1px solid var(--accent-dim); color: var(--accent-2);
  font-size: 13px;
}
.freshnote button {
  font-size: 12.5px; padding: 6px 12px; border-radius: 8px; cursor: pointer;
  font-family: inherit; font-weight: 600;
  border: 1px solid var(--accent-dim); background: var(--accent-2); color: #08150e;
}
.freshnote button:hover { filter: brightness(1.1); }
