/* planto.de – gemeinsames Layout der neuen Seiten */
:root {
  color-scheme: light;
  --page: #f9f9f7;
  --surface: #ffffff;
  --ink: #141413;
  --ink-2: #52514e;
  --muted: #7d7c76;
  --border: #e1e0d9;
  --axis: #c3c2b7;
  --accent: #2f6f4f;
  --accent-ink: #ffffff;
  --accent-soft: #e6efe9;
  --link: #24613f;
  --hl: #fff4c2;
  --shadow: 0 1px 2px rgba(0,0,0,.04), 0 2px 8px rgba(0,0,0,.04);
  /* Zeigerwerte (Vorgabe): L gelb, T rot, K braun, F blau, R violett, N grün, S grau */
  --ell-l: #e0aa00; --ell-t: #d63c33; --ell-k: #9a5418; --ell-f: #2a78d6;
  --ell-r: #7b3fc0; --ell-n: #348a2c; --ell-s: #8e8d87;
}
@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) {
    color-scheme: dark;
    --page: #0f0f0e; --surface: #1a1a19; --ink: #f0efec; --ink-2: #c3c2b7; --muted: #8f8e88;
    --border: #2c2c2a; --axis: #3d3d3a; --accent: #5fb487; --accent-ink: #0b0b0b; --accent-soft: #1d2a22;
    --link: #7cc79f; --hl: #4a4220; --shadow: none;
    --ell-l: #e8b700; --ell-t: #e86056; --ell-k: #b56c2c; --ell-f: #3987e5;
    --ell-r: #b07ad6; --ell-n: #4fae45; --ell-s: #8a8983;
  }
}
:root[data-theme="dark"] {
  color-scheme: dark;
  --page: #0f0f0e; --surface: #1a1a19; --ink: #f0efec; --ink-2: #c3c2b7; --muted: #8f8e88;
  --border: #2c2c2a; --axis: #3d3d3a; --accent: #5fb487; --accent-ink: #0b0b0b; --accent-soft: #1d2a22;
  --link: #7cc79f; --hl: #4a4220; --shadow: none;
  --ell-l: #e8b700; --ell-t: #e86056; --ell-k: #b56c2c; --ell-f: #3987e5;
  --ell-r: #b07ad6; --ell-n: #4fae45; --ell-s: #8a8983;
}

* { box-sizing: border-box; }
html, body { margin: 0; }
body {
  background: var(--page); color: var(--ink);
  font: 16px/1.55 system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
  -webkit-text-size-adjust: 100%;
  min-height: 100vh; display: flex; flex-direction: column;
}
main { flex: 1; width: 100%; }
a { color: var(--link); text-underline-offset: 2px; }
a:hover { text-decoration-thickness: 2px; }
:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; }
.wrap { max-width: 1120px; margin: 0 auto; padding: 0 24px; }
h1, h2, h3 { line-height: 1.25; text-wrap: balance; }
h1 { font-size: 30px; margin: 28px 0 8px; font-weight: 650; letter-spacing: -.01em; }
h2 { font-size: 20px; margin: 36px 0 12px; font-weight: 620; }
h3 { font-size: 16px; margin: 0 0 6px; font-weight: 620; }
p { margin: 0 0 12px; }
i.sp, .sp i { font-style: italic; }
.lead { font-size: 18px; color: var(--ink-2); max-width: 68ch; }
.muted { color: var(--muted); }
.small { font-size: 14px; }
.num { font-variant-numeric: tabular-nums; }

/* Kopf und Fuß */
.site-head { background: var(--surface); border-bottom: 1px solid var(--border); }
.site-head-in { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 8px 24px; min-height: 60px; }
.logo { font-weight: 750; font-size: 21px; color: var(--accent); text-decoration: none; letter-spacing: .01em; }
.logo span { color: var(--muted); font-weight: 500; }
.site-nav { display: flex; flex-wrap: wrap; gap: 4px; }
.site-nav a { color: var(--ink-2); text-decoration: none; padding: 7px 12px; border-radius: 8px; font-size: 15px; }
.site-nav a:hover { background: var(--accent-soft); color: var(--ink); }
.site-nav a[aria-current="page"] { background: var(--accent); color: var(--accent-ink); }
.site-foot { margin-top: 56px; border-top: 1px solid var(--border); color: var(--muted); font-size: 14px; padding: 20px 0 28px; }
.site-foot p { margin: 0 0 4px; }
.site-foot a { color: var(--ink-2); }

/* Bausteine */
.card { background: var(--surface); border: 1px solid var(--border); border-radius: 12px; padding: 18px 20px; box-shadow: var(--shadow); min-width: 0; }
.cards { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 16px; }
a.card { color: inherit; text-decoration: none; display: flex; flex-direction: column; transition: border-color .15s, transform .15s; }
a.card:hover { border-color: var(--accent); transform: translateY(-2px); }
a.card h3 { color: var(--link); font-size: 18px; }
a.card p { color: var(--ink-2); margin: 0; }
a.card .go { margin-top: auto; padding-top: 12px; color: var(--link); font-weight: 560; font-size: 15px; }
.kpis { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 12px; margin: 20px 0 8px; }
.kpi { background: var(--surface); border: 1px solid var(--border); border-radius: 12px; padding: 12px 16px; }
.kpi b { display: block; font-size: 26px; font-weight: 650; font-variant-numeric: tabular-nums; }
.kpi span { color: var(--ink-2); font-size: 14px; }
.btn {
  display: inline-flex; align-items: center; gap: 6px; font: inherit; font-size: 15px; font-weight: 560;
  background: var(--accent); color: var(--accent-ink); border: 1px solid var(--accent); border-radius: 8px;
  padding: 8px 16px; cursor: pointer; text-decoration: none; min-height: 40px;
}
.btn.ghost { background: transparent; color: var(--link); border-color: var(--axis); }
.btn:disabled { opacity: .5; cursor: default; }
.btn.small { font-size: 14px; padding: 4px 10px; min-height: 32px; }
input[type=text], input[type=search], input[type=number], select {
  font: inherit; color: var(--ink); background: var(--surface); border: 1px solid var(--axis);
  border-radius: 8px; padding: 7px 10px; min-height: 40px; max-width: 100%;
}
input[type=number] { width: 84px; font-variant-numeric: tabular-nums; }
.tag { display: inline-block; font-size: 12px; line-height: 1; padding: 4px 7px; border-radius: 999px; background: var(--accent-soft); color: var(--ink-2); white-space: nowrap; }
.crumbs { display: flex; flex-wrap: wrap; gap: 2px 6px; font-size: 14px; color: var(--muted); margin-top: 24px; }
.crumbs a { color: var(--ink-2); }
.crumbs span + span::before { content: "›"; margin-right: 6px; color: var(--axis); }

/* Startseite */
.hero { display: grid; grid-template-columns: minmax(0, 1.1fr) minmax(0, 1fr); gap: 32px; align-items: center; margin-top: 28px; }
.hero h1 { font-size: 36px; margin-top: 0; }
.hero figure { margin: 0; }
.hero img { width: 100%; height: auto; display: block; border-radius: 12px; }
.hero figcaption { font-size: 13px; color: var(--muted); margin-top: 6px; }
.timeline { list-style: none; margin: 0; padding: 0; border-left: 2px solid var(--border); }
.timeline li { position: relative; padding: 0 0 18px 22px; }
.timeline li::before { content: ""; position: absolute; left: -7px; top: 6px; width: 12px; height: 12px; border-radius: 50%; background: var(--surface); border: 2px solid var(--accent); }
.timeline time { display: block; font-weight: 620; font-variant-numeric: tabular-nums; color: var(--accent); font-size: 15px; }
.timeline p { margin: 0; color: var(--ink-2); }
.two { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: 32px; }
.cv dt { font-weight: 620; margin-top: 12px; }
.cv dd { margin: 2px 0 0; color: var(--ink-2); }

/* Artensuche */
.search { display: flex; flex-wrap: wrap; gap: 10px 16px; align-items: center; margin: 16px 0 8px; }
.search input[type=search] { flex: 1 1 320px; font-size: 17px; }
.search label { display: inline-flex; align-items: center; gap: 6px; color: var(--ink-2); font-size: 15px; }
.results { list-style: none; margin: 0; padding: 0; border-top: 1px solid var(--border); }
.results li { border-bottom: 1px solid var(--border); }
.results a { display: flex; flex-wrap: wrap; align-items: baseline; gap: 4px 12px; padding: 10px 4px; text-decoration: none; color: var(--ink); }
.results a:hover { background: var(--accent-soft); }
.results .name { font-style: italic; font-weight: 560; color: var(--link); }
.results .tri { color: var(--ink-2); }
.results .meta { margin-left: auto; display: flex; gap: 6px; flex-wrap: wrap; }
mark { background: var(--hl); color: inherit; border-radius: 2px; }

/* Artseite */
.art-head h1 { margin-bottom: 2px; font-style: italic; }
.art-head h1 small { font-style: normal; font-weight: 400; color: var(--muted); font-size: 18px; }
.art-head .tri { font-size: 19px; color: var(--ink-2); margin: 0 0 8px; }
.ell-grid { display: grid; grid-template-columns: repeat(7, minmax(0, 1fr)); gap: 10px; }
.ell-tile { background: var(--surface); border: 1px solid var(--border); border-top: 5px solid var(--c); border-radius: 10px; padding: 10px 12px; min-width: 0; }
.ell-tile .lt { font-size: 13px; color: var(--muted); display: flex; justify-content: space-between; gap: 6px; }
.ell-tile .lt b { color: var(--ink); }
.ell-tile .v { font-size: 26px; font-weight: 650; font-variant-numeric: tabular-nums; line-height: 1.2; }
.ell-tile .v small { font-size: 14px; color: var(--muted); font-weight: 400; margin-left: 2px; }
.ell-tile .scale { display: flex; gap: 2px; margin: 6px 0; }
.ell-tile .scale i { flex: 1; height: 6px; border-radius: 2px; background: var(--border); }
.ell-tile .scale i.on { background: var(--c); }
.ell-tile p { font-size: 13px; color: var(--ink-2); margin: 0; line-height: 1.35; }
.facts { display: grid; grid-template-columns: max-content 1fr; gap: 6px 18px; margin: 0; }
.facts dt { color: var(--muted); }
.facts dd { margin: 0; }
table.data { width: 100%; border-collapse: collapse; font-size: 15px; }
.data th { text-align: left; color: var(--muted); font-weight: 500; font-size: 14px; padding: 6px 8px; border-bottom: 1px solid var(--axis); white-space: nowrap; }
.data td { padding: 7px 8px; border-bottom: 1px solid var(--border); vertical-align: top; }
.data .r { text-align: right; font-variant-numeric: tabular-nums; white-space: nowrap; }
.table-wrap { overflow-x: auto; }
.bar { display: inline-block; height: 8px; border-radius: 2px; background: var(--accent); vertical-align: middle; margin-right: 6px; }
.photos { display: grid; grid-template-columns: repeat(auto-fill, minmax(220px, 1fr)); gap: 16px; }
.photos figure { margin: 0; background: var(--surface); border: 1px solid var(--border); border-radius: 10px; overflow: hidden; }
.photos img { width: 100%; height: 190px; object-fit: cover; display: block; background: var(--border); }
.photos figcaption { padding: 8px 12px 10px; font-size: 14px; color: var(--ink-2); }
.photos figcaption b { color: var(--ink); font-weight: 560; }
.lit { padding-left: 20px; }
.lit li { margin-bottom: 8px; color: var(--ink-2); }
.children { columns: 3 220px; padding-left: 20px; margin: 0; }
.children li { break-inside: avoid; margin-bottom: 4px; }

/* Recherche */
.panel { margin-top: 16px; }
.panel h2 { margin: 0 0 4px; font-size: 18px; }
.panel > p.muted { margin-bottom: 12px; font-size: 15px; }
.crit { list-style: none; margin: 0 0 12px; padding: 0; }
.crit li { display: flex; flex-wrap: wrap; align-items: center; gap: 8px 12px; padding: 10px 0; border-top: 1px solid var(--border); }
.crit .label { flex: 1 1 220px; font-weight: 560; min-width: 0; }
.crit .label i { font-weight: 560; }
.crit .rm { background: none; border: 0; color: var(--muted); font-size: 22px; cursor: pointer; padding: 0 6px; min-height: 36px; line-height: 1; }
.crit .rm:hover { color: var(--ell-t); }
.crit .logic { display: inline-flex; border: 1px solid var(--axis); border-radius: 8px; overflow: hidden; }
.crit .logic button { font: inherit; font-size: 13px; border: 0; background: transparent; color: var(--ink-2); padding: 6px 9px; cursor: pointer; }
.crit .logic button[aria-pressed="true"] { background: var(--accent); color: var(--accent-ink); }
.adder { display: flex; flex-wrap: wrap; gap: 8px; align-items: center; position: relative; }
.adder input { flex: 1 1 260px; }
.suggest { position: absolute; z-index: 5; top: 100%; left: 0; right: 0; max-width: 520px; background: var(--surface); border: 1px solid var(--axis); border-radius: 8px; margin-top: 4px; padding: 4px 0; list-style: none; box-shadow: 0 6px 20px rgba(0,0,0,.12); max-height: 320px; overflow: auto; }
.suggest li { padding: 7px 12px; cursor: pointer; display: flex; justify-content: space-between; gap: 10px; }
.suggest li[aria-selected="true"], .suggest li:hover { background: var(--accent-soft); }
.suggest li small { color: var(--muted); white-space: nowrap; }
.actions { display: flex; flex-wrap: wrap; gap: 10px; align-items: center; margin-top: 20px; }
.status { color: var(--ink-2); }
.status.err { color: var(--ell-t); }
table.veg { border-collapse: collapse; font-size: 13px; font-variant-numeric: tabular-nums; }
.veg th, .veg td { padding: 3px 6px; border-bottom: 1px solid var(--border); white-space: nowrap; }
.veg thead th { position: sticky; top: 0; background: var(--surface); font-weight: 500; color: var(--muted); }
.veg th.rot { height: 110px; vertical-align: bottom; padding-bottom: 6px; }
.veg th.rot span { writing-mode: vertical-rl; transform: rotate(180deg); display: inline-block; }
.veg td.sp, .veg th.sp { position: sticky; left: 0; background: var(--surface); text-align: left; z-index: 1; }
.veg thead th.sp { z-index: 2; }
.veg td.sp i { font-style: italic; }
.veg td.c { text-align: center; min-width: 26px; }
.veg td.c.has { background: color-mix(in srgb, var(--accent) 16%, transparent); }
.veg td.e { text-align: center; color: var(--ink-2); }
.veg tr.layer td { background: var(--accent-soft); font-weight: 620; color: var(--ink); }
.veg .hdr td { color: var(--ink-2); }
.veg-wrap { overflow: auto; max-height: 75vh; border: 1px solid var(--border); border-radius: 10px; background: var(--surface); }

/* Responsiv */
@media (max-width: 900px) {
  .cards { grid-template-columns: minmax(0, 1fr); }
  .hero, .two { grid-template-columns: minmax(0, 1fr); }
  .ell-grid { grid-template-columns: repeat(4, minmax(0, 1fr)); }
}
@media (max-width: 640px) {
  .wrap { padding: 0 16px; }
  h1, .hero h1 { font-size: 26px; }
  .kpis { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .kpi b { font-size: 22px; }
  .site-head-in { padding-top: 8px; padding-bottom: 8px; }
  .site-nav a { padding: 6px 9px; font-size: 14px; }
  .ell-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .results .meta { margin-left: 0; width: 100%; }
}

/* Platzhalter, die noch ergänzt werden müssen */
.todo { background: var(--hl); padding: 2px 6px; border-radius: 4px; }
details { margin-top: 16px; }
details summary { cursor: pointer; color: var(--link); font-weight: 560; }
details[open] summary { margin-bottom: 8px; }

/* Textseiten (Impressum, Datenschutz) */
.prose { max-width: 72ch; }
.prose h2 { font-size: 18px; margin: 28px 0 8px; }
