/* Anleitung / Guide von weltland: gemeinsamer Stil fuer DE und EN.
   Farben und Schrift wie index.html (weltsein-Tokens). */
:root {
  --green: #4A7A3F; --green-light: #5A8F4E;
  --bg: #FAF9F7; --bg-2: #F0EEE9; --text: #3D4A3F; --muted: #7A8B7E; --border: #D8D4CC;
  --radius: 22px;
  --font: -apple-system, BlinkMacSystemFont, "SF Pro Display", "SF Pro Text", "Helvetica Neue", system-ui, sans-serif;
  --mono: ui-monospace, "SF Mono", Menlo, monospace;
}
@media (prefers-color-scheme: dark) {
  :root { --green: #8FA37A; --green-light: #A0B48C; --bg: #1A1B17; --bg-2: #242421; --text: #C8D4CA; --border: #3A3A36; }
}
* { box-sizing: border-box; margin: 0; padding: 0; }
html { scroll-behavior: smooth; scroll-padding-top: 84px; }
body { font-family: var(--font); background: var(--bg); color: var(--text); line-height: 1.6; -webkit-font-smoothing: antialiased; }
a { color: var(--green); text-underline-offset: 3px; }
img { display: block; max-width: 100%; }

/* Navigation (wie die Website) */
nav.top { position: sticky; top: 0; z-index: 50; background: color-mix(in srgb, var(--bg) 85%, transparent);
  backdrop-filter: blur(18px) saturate(1.4); -webkit-backdrop-filter: blur(18px) saturate(1.4); box-shadow: 0 1px 0 var(--border); }
nav.top .in { width: min(1280px, 100% - 40px); margin-inline: auto; display: flex; align-items: center; gap: 22px; height: 64px; }
.brand { display: flex; align-items: center; gap: 10px; font-weight: 700; font-size: 1.1rem; text-decoration: none; color: var(--text); letter-spacing: -.02em; }
.brand img { width: 28px; height: 28px; border-radius: 7px; }
.brand span { color: var(--muted); font-weight: 500; }
nav.top .links { margin-left: auto; display: flex; gap: 20px; font-size: .92rem; }
nav.top .links a { color: var(--muted); text-decoration: none; }
nav.top .links a:hover { color: var(--text); }
.lang { display: inline-flex; padding: 3px; border-radius: 999px; background: var(--bg-2); box-shadow: inset 0 0 0 1px var(--border);
  font-size: .78rem; font-weight: 600; letter-spacing: .04em; }
.lang a { text-decoration: none; padding: 5px 10px; border-radius: 999px; color: var(--muted); }
.lang a:hover { color: var(--text); }
.lang a[aria-current] { background: var(--green); color: #fff; }
@media (prefers-color-scheme: dark) { .lang a[aria-current] { color: #1A1B17; } }
.btn { display: inline-flex; align-items: center; gap: 8px; text-decoration: none; background: var(--green); color: #fff;
  font-weight: 600; font-size: .88rem; padding: 8px 16px; border-radius: 999px; }
.btn:hover { background: var(--green-light); }
@media (prefers-color-scheme: dark) { .btn { color: #1A1B17; } }
@media (max-width: 760px) { nav.top .links { display: none; } .lang { margin-left: auto; } nav.top .in { gap: 10px; } .brand span { display: none; } nav.top .btn { display: none; } }

/* Kopf */
header.hero { width: min(1280px, 100% - 40px); margin: 0 auto; padding: 64px 0 36px; }
.eyebrow { font-size: .8rem; font-weight: 600; letter-spacing: .14em; text-transform: uppercase; color: var(--green); margin-bottom: 12px; }
header.hero h1 { font-size: clamp(2.4rem, 5.5vw, 4rem); letter-spacing: -.03em; line-height: 1.05; margin-bottom: 16px; }
header.hero p { font-size: clamp(1.05rem, 1.5vw, 1.25rem); color: var(--muted); max-width: 60ch; }
.search { margin-top: 28px; position: relative; max-width: 560px; }
.search input { width: 100%; font: inherit; font-size: 1rem; padding: 14px 18px 14px 46px; border-radius: 999px; border: 0;
  background: var(--bg-2); color: var(--text); box-shadow: inset 0 0 0 1px var(--border); outline: none; }
.search input:focus { box-shadow: inset 0 0 0 2px var(--green); }
.search svg { position: absolute; left: 17px; top: 25px; translate: 0 -50%; width: 18px; height: 18px; stroke: var(--muted); fill: none; stroke-width: 2; }
.search .count { margin-top: 8px; font-size: .85rem; color: var(--muted); min-height: 1.3em; padding-left: 18px; }

/* Layout: Inhaltsverzeichnis links, Text rechts */
.layout { width: min(1280px, 100% - 40px); margin: 0 auto; display: grid; grid-template-columns: 260px 1fr; gap: 56px; padding-bottom: 80px; }
@media (max-width: 960px) { .layout { grid-template-columns: 1fr; gap: 0; } }
aside.toc { position: sticky; top: 84px; align-self: start; max-height: calc(100vh - 100px); overflow: auto; font-size: .9rem; padding-right: 6px; }
aside.toc summary { display: none; }
aside.toc ol { list-style: none; }
aside.toc > details > ol > li { margin-bottom: 4px; }
aside.toc a { display: block; text-decoration: none; color: var(--muted); padding: 4px 10px; border-radius: 8px; line-height: 1.35; }
aside.toc a:hover { color: var(--text); background: var(--bg-2); }
aside.toc a.on { color: var(--green); background: color-mix(in srgb, var(--green) 12%, transparent); font-weight: 600; }
aside.toc ol ol { margin: 2px 0 6px 10px; border-left: 1px solid var(--border); }
aside.toc ol ol a { font-size: .84rem; padding: 3px 10px; }
@media (max-width: 960px) {
  aside.toc { position: static; max-height: none; margin-bottom: 28px; }
  aside.toc details { background: var(--bg-2); border-radius: 16px; padding: 6px 10px; }
  aside.toc summary { display: block; cursor: pointer; font-weight: 600; padding: 10px 6px; color: var(--text); }
}

/* Text */
main.doc { min-width: 0; max-width: 820px; }
main.doc section { padding: 26px 0 40px; border-top: 1px solid var(--border); }
main.doc section:first-child { border-top: 0; padding-top: 0; }
main.doc h2 { font-size: clamp(1.7rem, 3vw, 2.3rem); letter-spacing: -.025em; line-height: 1.15; margin-bottom: 14px; }
main.doc h3 { font-size: 1.25rem; letter-spacing: -.015em; margin: 30px 0 10px; }
main.doc h4 { font-size: 1.02rem; margin: 22px 0 8px; }
main.doc p { margin: 0 0 14px; }
main.doc p.lead { font-size: 1.12rem; color: var(--muted); }
main.doc ul, main.doc ol { margin: 0 0 16px 1.3em; }
main.doc li { margin-bottom: 6px; }
main.doc li::marker { color: var(--green); }
main.doc strong { font-weight: 650; }
.ui { font-weight: 600; background: var(--bg-2); padding: 1px 7px; border-radius: 6px; box-shadow: inset 0 0 0 1px var(--border); white-space: nowrap; font-size: .94em; }
code { font-family: var(--mono); font-size: .88em; background: var(--bg-2); padding: 1px 6px; border-radius: 5px; }
kbd { font-family: var(--font); font-size: .85em; padding: 1px 6px; border-radius: 5px; box-shadow: inset 0 -1px 0 var(--border), inset 0 0 0 1px var(--border); }
.path { color: var(--muted); }
.path b { color: var(--text); font-weight: 600; }

.table-wrap { overflow-x: auto; margin: 6px 0 20px; border-radius: 14px; box-shadow: inset 0 0 0 1px var(--border); }
table { border-collapse: collapse; width: 100%; font-size: .92rem; }
th, td { text-align: left; padding: 10px 14px; vertical-align: top; border-bottom: 1px solid var(--border); }
th { background: var(--bg-2); font-weight: 600; font-size: .84rem; letter-spacing: .02em; }
tr:last-child td { border-bottom: 0; }
td:first-child { font-weight: 600; white-space: nowrap; }
table.wrapfirst td:first-child { white-space: normal; }

.note, .tip, .warn { border-radius: 14px; padding: 14px 18px 14px 50px; margin: 6px 0 20px; position: relative; font-size: .95rem; }
.note { background: var(--bg-2); }
.tip { background: color-mix(in srgb, var(--green) 11%, transparent); }
.warn { background: color-mix(in srgb, #CC8800 13%, transparent); }
.note::before, .tip::before, .warn::before { position: absolute; left: 18px; top: 13px; font-weight: 700; width: 20px; text-align: center; }
.note::before { content: "i"; color: var(--muted); font-family: Georgia, serif; font-style: italic; font-size: 1.1rem; }
.tip::before { content: ""; width: 8px; height: 8px; border-radius: 50%; background: var(--green); top: 20px; left: 24px; }
.warn::before { content: "!"; color: #CC8800; }
.note p:last-child, .tip p:last-child, .warn p:last-child { margin-bottom: 0; }

.steps { counter-reset: s; list-style: none; margin-left: 0 !important; }
.steps > li { counter-increment: s; position: relative; padding-left: 44px; margin-bottom: 14px; }
.steps > li::before { content: counter(s); position: absolute; left: 0; top: -1px; width: 28px; height: 28px; border-radius: 50%;
  background: var(--green); color: #fff; font-weight: 700; font-size: .85rem; display: grid; place-items: center; }
@media (prefers-color-scheme: dark) { .steps > li::before { color: #1A1B17; } }

figure { margin: 10px 0 24px; }
figure.shots { display: flex; gap: 18px; flex-wrap: wrap; }
figure.shots img { width: min(220px, 46%); border-radius: 18px; box-shadow: 0 20px 40px -24px rgba(30, 40, 25, .5); }
figcaption { flex-basis: 100%; font-size: .85rem; color: var(--muted); margin-top: 4px; }

dl.glossary { display: grid; grid-template-columns: minmax(150px, 220px) 1fr; gap: 0; margin: 4px 0 24px;
  border-radius: 14px; box-shadow: inset 0 0 0 1px var(--border); overflow: hidden; }
dl.glossary dt, dl.glossary dd { padding: 10px 14px; border-bottom: 1px solid var(--border); }
dl.glossary dt { font-weight: 650; background: var(--bg-2); }
dl.glossary dt:nth-last-of-type(1), dl.glossary dd:last-child { border-bottom: 0; }
@media (max-width: 600px) { dl.glossary { grid-template-columns: 1fr; } dl.glossary dt { border-bottom: 0; } }

.hidden-by-search { display: none !important; }
mark { background: color-mix(in srgb, #F3C969 60%, transparent); color: inherit; border-radius: 3px; padding: 0 1px; }

footer { border-top: 1px solid var(--border); padding: 30px 0 50px; font-size: .85rem; color: var(--muted); }
footer .in { width: min(1280px, 100% - 40px); margin: 0 auto; display: flex; gap: 20px; flex-wrap: wrap; align-items: center; }
footer .in .links { margin-left: auto; display: flex; gap: 18px; }
footer a { color: var(--muted); }
.totop { position: fixed; right: 20px; bottom: 20px; width: 44px; height: 44px; border-radius: 50%; background: var(--green); color: #fff;
  display: grid; place-items: center; text-decoration: none; font-size: 1.2rem; box-shadow: 0 8px 24px -8px rgba(0,0,0,.4);
  opacity: 0; pointer-events: none; transition: opacity .3s; }
.totop.show { opacity: 1; pointer-events: auto; }
@media (prefers-color-scheme: dark) { .totop { color: #1A1B17; } }
@media print { nav.top, aside.toc, .search, .totop { display: none !important; } .layout { display: block; } }

/* ---------- Tabelle aller Datenquellen ---------- */
.src-wrap { overflow-x: auto; border-radius: 18px; box-shadow: inset 0 0 0 1px var(--border); background: var(--bg); }
table.src { border-collapse: collapse; width: 100%; font-size: .92rem; text-align: left; }
table.src th, table.src td { padding: 10px 16px; border-bottom: 1px solid var(--border); vertical-align: top; }
table.src th { background: var(--bg-2); font-size: .78rem; font-weight: 600; letter-spacing: .06em; text-transform: uppercase; color: var(--muted); }
table.src td:first-child { font-weight: 600; white-space: nowrap; }
table.src td:nth-child(2), table.src td:nth-child(3), table.src td:nth-child(4) { color: var(--green); font-weight: 600; white-space: nowrap; }
table.src td:last-child { color: var(--muted); font-size: .85rem; }
table.src tr.grp td { background: color-mix(in srgb, var(--green) 9%, transparent); color: var(--green); font-size: .78rem; font-weight: 700; letter-spacing: .1em; text-transform: uppercase; }
table.src tr:last-child td { border-bottom: 0; }
table.src .no { color: var(--border); font-weight: 400; }

/* ---------- Burgermenue (Handy) ---------- */
.burger { display: none; width: 40px; height: 40px; border: 0; border-radius: 12px; background: var(--bg-2); cursor: pointer;
  align-items: center; justify-content: center; flex-direction: column; gap: 5px; box-shadow: inset 0 0 0 1px var(--border); }
.burger span { display: block; width: 18px; height: 2px; border-radius: 2px; background: var(--text); transition: transform .25s, opacity .2s; }
nav.top.open .burger span:nth-child(1) { transform: translateY(7px) rotate(45deg); }
nav.top.open .burger span:nth-child(2) { opacity: 0; }
nav.top.open .burger span:nth-child(3) { transform: translateY(-7px) rotate(-45deg); }
@media (max-width: 760px) {
  .burger { display: inline-flex; }
  nav.top.open .links { display: flex !important; position: absolute; top: 64px; left: 0; right: 0; flex-direction: column; gap: 0;
    background: var(--bg);
    box-shadow: 0 12px 30px -12px rgba(0,0,0,.25), 0 1px 0 var(--border); padding: 8px 20px 16px; margin: 0; }
  nav.top.open .links a { padding: 13px 4px; border-bottom: 1px solid var(--border); font-size: 1rem; color: var(--text); }
  nav.top.open .links a:last-child { border-bottom: 0; }
}
