/* Empire Life – Die Leonida Statutes (öffentlich + Bearbeiten-Modus) */
:root {
  color-scheme: dark;
  --bg: #07070a;
  --surface: #0f0f16;
  --surface-up: #14141d;
  --text: #f6f6fa;
  --text-2: #c9c9d4;
  --muted: #9b9baa;
  --line: #292934;
  --line-soft: rgba(255,255,255,.075);
  --pink: #f2057d;
  --violet: #8d16f5;
  --blue: #1488ff;
  --gradient: linear-gradient(118deg,var(--pink),var(--violet) 53%,var(--blue));
  --gold: #d6b25e;
  --gold-dunkel: #a8801f;
  --gold-tinte: #85640f; /* Gold als Schrift auf dem Papier – kontraststark genug */
  --navy: #0c2d5e;
  /* Papier der Gesetzestexte */
  --papier: #fbf9f3;
  --papier-2: #f3efe4;
  --tinte: #1c2230;
  --tinte-2: #414a5c;
  --tinte-3: #687184;
  --papier-linie: #ddd5c3;
  --papier-linie-2: #ebe5d7;
  --serif: "Iowan Old Style", "Palatino Linotype", "Book Antiqua", Palatino, Charter, Georgia, "Times New Roman", serif;
  --max: 1320px;
  font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
}
* { box-sizing: border-box; }
html { scroll-behavior: smooth; scroll-padding-top: 96px; }
body { margin: 0; min-width: 320px; overflow-x: hidden; color: var(--text); background: var(--bg); line-height: 1.6; -webkit-font-smoothing: antialiased; }
body::before { content: ""; position: fixed; inset: 0; z-index: -4; opacity: .13; pointer-events: none; background-image: radial-gradient(rgba(255,255,255,.32) .55px,transparent .55px); background-size: 5px 5px; }
a { color: inherit; text-decoration: none; }
button, input, select, textarea { font: inherit; color: inherit; }
[hidden] { display: none !important; }
:focus-visible { outline: 3px solid #7cb2ff; outline-offset: 3px; }
::selection { color: #fff; background: rgba(242,5,125,.72); }
.shell { width: min(var(--max), calc(100% - 32px)); margin-inline: auto; }
.skip-link { position: fixed; z-index: 200; top: 12px; left: 12px; padding: 11px 15px; transform: translateY(-160%); border-radius: 8px; color: #050507; background: #fff; font-weight: 850; }
.skip-link:focus { transform: none; }
.lx-unsichtbar { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
.lx-leise { color: var(--muted); }

/* ------------------------------ Kopfzeile ------------------------------ */
.site-header { position: fixed; z-index: 80; inset: 0 0 auto; height: 76px; border-bottom: 1px solid var(--line-soft); background: rgba(7,7,10,.86); backdrop-filter: blur(18px); }
.header-inner { height: 100%; display: flex; align-items: center; gap: 40px; }
.brand { display: inline-flex; align-items: center; gap: 12px; white-space: nowrap; font-size: .93rem; font-weight: 900; letter-spacing: -.03em; }
.brand b { color: #aaaab7; }
.brand-mark { width: 29px; display: grid; gap: 3px; transform: skewX(-17deg); }
.brand-mark i { display: block; height: 6px; border-radius: 2px; background: var(--gradient); }
.brand-mark i:nth-child(2) { width: 82%; margin-left: 9%; }
.brand-mark i:nth-child(3) { width: 64%; margin-left: 18%; }
.desktop-nav { display: flex; align-items: center; gap: 28px; margin-inline: auto; }
.desktop-nav a { position: relative; padding: 27px 0 24px; color: #aaaab6; font-size: .78rem; font-weight: 700; white-space: nowrap; }
.desktop-nav a:hover, .desktop-nav a[aria-current="page"] { color: #fff; }
.desktop-nav a[aria-current="page"]::after { content: ""; position: absolute; left: 0; right: 0; bottom: -1px; height: 2px; background: var(--gradient); }
.header-actions { display: flex; align-items: center; gap: 10px; margin-left: auto; }
.desktop-nav + .header-actions { margin-left: 0; }
.portal-switcher { position: relative; }
.portal-switcher summary { min-height: 44px; padding: 0 14px; display: inline-flex; align-items: center; gap: 9px; list-style: none; border: 1px solid var(--line); border-radius: 8px; color: #e7e6ed; background: rgba(255,255,255,.035); font-size: .76rem; font-weight: 820; cursor: pointer; user-select: none; }
.portal-switcher summary::-webkit-details-marker { display: none; }
.portal-switcher summary::after { content: "⌄"; color: #92909f; }
.portal-switcher[open] summary { border-color: #575767; background: rgba(255,255,255,.075); }
.portal-switcher-menu { position: absolute; top: calc(100% + 10px); right: 0; width: 236px; padding: 8px; display: grid; gap: 3px; border: 1px solid var(--line); border-radius: 12px; background: rgba(13,13,19,.99); box-shadow: 0 24px 70px rgba(0,0,0,.48); }
.portal-switcher-menu a { min-height: 43px; padding: 0 12px; display: flex; align-items: center; justify-content: space-between; border-radius: 8px; color: #d8d7df; font-size: .76rem; font-weight: 760; }
.portal-switcher-menu a::after { content: "→"; color: #777584; }
.portal-switcher-menu a:hover { color: #fff; background: rgba(255,255,255,.065); }
.portal-switcher-menu a[aria-current="page"] { color: #fff; background: linear-gradient(118deg,rgba(242,5,125,.18),rgba(20,136,255,.14)); }
.eyebrow { margin: 0 0 14px; color: var(--gold); font-size: .76rem; font-weight: 850; letter-spacing: .2em; text-transform: uppercase; }

/* ------------------------------ Kopfbereich ------------------------------ */
main { padding-top: 76px; }
.lx-held { padding: 52px 0 40px; border-bottom: 1px solid var(--line-soft); background:
  radial-gradient(760px 320px at 12% 0%, rgba(214,178,94,.13), transparent 70%),
  radial-gradient(900px 360px at 88% 10%, rgba(20,136,255,.12), transparent 70%); }
.lx-held-innen { display: grid; grid-template-columns: 168px minmax(0, 1fr); gap: 36px; align-items: center; }
.lx-held h1 { margin: 0; overflow-wrap: break-word; hyphens: auto; font-family: var(--serif); font-size: clamp(2.2rem, 5.4vw, 4rem); line-height: 1; letter-spacing: -.01em; font-weight: 700; }
.lx-held-text { max-width: 680px; margin: 16px 0 8px; color: var(--text-2); font-size: 1.02rem; }
.lx-stand { margin: 0; color: var(--muted); font-size: .84rem; font-weight: 700; }
.lx-suche { margin-top: 22px; max-width: 640px; }
.lx-suche .lx-eingabe { width: 100%; min-height: 50px; padding: 12px 16px; font-size: 1rem; }
.lx-held-buch { padding: 34px 0 30px; }
.lx-held-zeile { display: grid; grid-template-columns: 96px minmax(0, 1fr); gap: 24px; align-items: center; margin-top: 16px; }
.lx-held-buch h1 { font-size: clamp(1.9rem, 4.4vw, 3.1rem); }
.lx-pfad { display: flex; flex-wrap: wrap; gap: 8px; color: var(--muted); font-size: .8rem; font-weight: 700; }
.lx-pfad a { color: var(--gold); }
.lx-pfad a:hover { text-decoration: underline; }

/* Siegel (eigene Zeichnung) */
.lx-siegel { width: 100%; height: auto; display: block; filter: drop-shadow(0 18px 40px rgba(0,0,0,.45)); }
.lx-siegel-grund { fill: #0d1830; }
.lx-siegel-linie { stroke: var(--gold); }
.lx-siegel-schrift { fill: var(--gold); font-family: var(--serif); font-weight: 700; letter-spacing: .14em; }
.lx-siegel-stern { fill: var(--gold); }
.lx-siegel-himmel { fill: #12305e; }
.lx-siegel-sonne circle { fill: var(--gold); }
.lx-siegel-sonne path { stroke: var(--gold); }
.lx-siegel-meer { fill: #0b2347; }
.lx-siegel-welle { stroke: #6fa7d8; }
.lx-siegel-palme { fill: #0a1426; stroke: var(--gold); stroke-width: 1.2; }

/* ------------------------------ Eingaben & Knöpfe ------------------------------ */
.lx-eingabe { min-height: 44px; padding: 9px 12px; border: 1px solid var(--line); border-radius: 10px; background: #0b0b11; font-size: .9rem; }
.lx-eingabe:focus { outline: 2px solid #7cb2ff; border-color: transparent; }
.lx-haken { display: inline-flex; gap: 8px; align-items: center; font-size: .86rem; cursor: pointer; }
.lx-haken input { width: 18px; height: 18px; accent-color: var(--navy); }
.lx-knopf { min-height: 36px; padding: 0 13px; display: inline-flex; align-items: center; gap: 6px; border: 1px solid var(--line); border-radius: 8px; background: rgba(255,255,255,.035); font-size: .78rem; font-weight: 800; cursor: pointer; white-space: nowrap; }
.lx-knopf:hover { border-color: #5b5b6b; background: rgba(255,255,255,.07); }
.lx-knopf:disabled { opacity: .5; cursor: not-allowed; }
.lx-knopf-leise { color: var(--muted); }
.lx-knopf-hell { border-color: var(--gold); color: var(--gold); }
.lx-knopf-haupt { border-color: transparent; color: #fff; background: var(--gradient); }
.lx-knopf-haupt:hover { border-color: transparent; filter: brightness(1.08); }
.lx-knopf-gefahr { border-color: rgba(242,80,80,.5); color: #ffb4b4; }

/* ------------------------------ Aufbau ------------------------------ */
.lx-raster { display: grid; grid-template-columns: minmax(0, 1fr) 380px; gap: 28px; align-items: start; padding: 30px 0 90px; }
.lx-buch { display: grid; grid-template-columns: 250px minmax(0, 1fr) 320px; gap: 26px; align-items: start; padding: 28px 0 90px; }
.lx-seite { min-width: 0; display: grid; gap: 18px; position: sticky; top: 96px; }
.lx-raster > *, .lx-buch > * { min-width: 0; }
.lx-karte { padding: 18px 20px; border: 1px solid var(--line-soft); border-radius: 14px; background: var(--surface); }
.lx-karte h2 { margin: 0 0 12px; font-size: 1rem; letter-spacing: -.01em; }
.lx-karte .lx-leise { margin: 10px 0 0; font-size: .8rem; }
#lxRedaktionKarte p { margin: 8px 0; font-size: .84rem; color: var(--text-2); }
#lxRedaktionKarte .lx-knopf { margin-top: 6px; }

/* ------------------------------ Papier ------------------------------ */
.lx-papier { position: relative; padding: 40px 48px 48px; border-radius: 6px; color: var(--tinte); background: var(--papier); box-shadow: 0 1px 0 rgba(255,255,255,.4) inset, 0 30px 70px rgba(0,0,0,.45); font-family: var(--serif); font-size: 1.04rem; line-height: 1.62; }
.lx-papier::before { content: ""; position: absolute; inset: 10px; border: 1px solid var(--papier-linie-2); border-radius: 3px; pointer-events: none; }
.lx-papier a { color: var(--navy); }
.lx-papier .lx-leise { color: var(--tinte-3); }
.lx-papier-kopf, .lx-dokument-kopf { text-align: center; margin-bottom: 26px; padding-bottom: 18px; border-bottom: 3px double var(--papier-linie); }
.lx-papier-staat, .lx-dokument-staat { margin: 0 0 4px; color: var(--gold-tinte); font-size: .78rem; font-weight: 700; letter-spacing: .24em; }
.lx-papier-kopf h2 { margin: 0; color: var(--navy); font-size: 1.7rem; font-weight: 700; letter-spacing: .02em; }
.lx-dokument-titel { margin: 6px 0 2px; color: var(--tinte-2); font-size: .9rem; font-weight: 700; letter-spacing: .3em; text-transform: uppercase; }
.lx-dokument-kopf h2 { margin: 0; overflow-wrap: break-word; hyphens: auto; color: var(--navy); font-size: 1.85rem; line-height: 1.15; font-weight: 700; letter-spacing: .06em; text-transform: uppercase; }
.lx-dokument-kuerzel { margin: 4px 0 0; color: var(--tinte-2); }
.lx-praeambel { margin: 0 0 28px; padding: 18px 22px; border-left: 3px solid var(--gold-dunkel); background: var(--papier-2); }
.lx-praeambel h3 { margin: 0 0 6px; color: var(--navy); font-size: 1.05rem; letter-spacing: .12em; text-transform: uppercase; }
.lx-leer { padding: 40px 16px; border: 1px dashed var(--papier-linie); border-radius: 10px; text-align: center; }
.lx-leer p { margin: 6px 0; }

/* Übersicht: Titel */
.lx-titelliste { list-style: none; margin: 0; padding: 0; display: grid; gap: 4px; }
.lx-titel-eintrag { padding: 18px 0 20px; border-bottom: 1px solid var(--papier-linie-2); }
.lx-titel-eintrag:last-child { border-bottom: 0; }
.lx-titel { display: grid; gap: 2px; padding: 4px 8px; margin: 0 -8px; border-radius: 6px; }
.lx-titel:hover { background: var(--papier-2); }
.lx-titel-nr { color: var(--gold-tinte); font-size: .78rem; font-weight: 700; letter-spacing: .24em; text-transform: uppercase; }
.lx-titel-name { overflow-wrap: break-word; hyphens: auto; color: var(--navy); font-size: 1.5rem; font-weight: 700; line-height: 1.2; }
.lx-kuerzel { display: inline-block; margin-left: 6px; padding: 0 7px; border: 1px solid var(--papier-linie); border-radius: 4px; color: var(--tinte-2); font-size: .82rem; font-weight: 700; vertical-align: 4px; }
.lx-titel-text { color: var(--tinte-2); }
.lx-titel-zahlen { margin-top: 2px; color: var(--tinte-3); font-family: Inter, system-ui, sans-serif; font-size: .78rem; font-weight: 700; }
.lx-kapitelliste { list-style: none; margin: 10px 0 0; padding: 0; columns: 2 260px; column-gap: 26px; font-size: .95rem; }
.lx-kapitelliste li { break-inside: avoid; padding: 2px 0; }
.lx-kapitelliste a { color: var(--tinte); }
.lx-kapitelliste a:hover { color: var(--navy); text-decoration: underline; }
.lx-kapitelliste b { display: inline-block; min-width: 2.6em; color: var(--navy); font-variant-numeric: tabular-nums; }

/* Kapitel und Abschnitte */
.lx-kapitel { margin-top: 34px; }
.lx-kapitel:first-of-type { margin-top: 8px; }
.lx-kapitel-kopf { margin-bottom: 18px; padding: 12px 0 14px; text-align: center; border-top: 1px solid var(--papier-linie); border-bottom: 1px solid var(--papier-linie); }
.lx-kapitel-nr { margin: 0; color: var(--gold-tinte); font-size: .82rem; font-weight: 700; letter-spacing: .28em; text-transform: uppercase; }
.lx-kapitel-kopf h2 { margin: 2px 0 0; overflow-wrap: break-word; hyphens: auto; color: var(--navy); font-size: 1.28rem; font-weight: 700; letter-spacing: .08em; text-transform: uppercase; }
.lx-kapitel-text { margin: 6px auto 0; max-width: 560px; color: var(--tinte-2); font-size: .95rem; font-style: italic; }
.lx-abschnitt { position: relative; padding: 16px 0 18px; border-bottom: 1px solid var(--papier-linie-2); scroll-margin-top: 96px; transition: background-color .4s ease; }
.lx-abschnitt:last-child { border-bottom: 0; }
.lx-abschnitt.lx-markiert { margin: 0 -16px; padding-inline: 16px; border-radius: 6px; background: #fff3cf; }
.lx-abschnitt-kopf { margin: 0 0 6px; font-size: 1.06rem; line-height: 1.4; font-weight: 700; }
.lx-nr { margin-right: 4px; color: var(--navy); font-variant-numeric: tabular-nums; white-space: nowrap; border-bottom: 1px solid rgba(12,45,94,.35); }
.lx-papier .lx-nr:hover { text-decoration: underline; }
.lx-strich { font-weight: 400; }
.lx-text p { margin: 6px 0 0; }
.lx-text p:first-child { margin-top: 0; }
.lx-text ul { margin: 6px 0 0; padding-left: 26px; }
.lx-s1 { padding-left: 2.1em; text-indent: -2.1em; }
.lx-s2 { padding-left: 4.1em; text-indent: -2em; }
.lx-s3 { padding-left: 6em; text-indent: -1.9em; }
.lx-s4 { padding-left: 7.6em; text-indent: -1.6em; }
.lx-verweis { border-bottom: 1px dotted currentColor; }
.lx-bestimmung .lx-abschnitt-kopf .lx-ueberschrift { font-weight: 700; }
.lx-aufgehoben .lx-ueberschrift { text-decoration: line-through; text-decoration-thickness: 1px; color: var(--tinte-3); }
.lx-vermerk { margin: 4px 0 0; color: #8a2a1d; font-style: italic; }
.lx-frueher { margin-top: 6px; color: var(--tinte-3); font-size: .95rem; }
.lx-frueher summary { cursor: pointer; font-family: Inter, system-ui, sans-serif; font-size: .78rem; font-weight: 700; }

/* Strafrahmen auf dem Papier */
.lx-strafe { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 12px; font-family: Inter, system-ui, sans-serif; font-size: .8rem; }
.lx-wert { display: inline-grid; padding: 4px 10px; border: 1px solid var(--papier-linie); border-radius: 6px; background: #fff; font-weight: 800; font-variant-numeric: tabular-nums; line-height: 1.3; }
.lx-wert small { color: var(--tinte-3); font-size: .76rem; font-weight: 800; letter-spacing: .1em; text-transform: uppercase; }
.lx-folge { align-content: center; color: #7a2f12; border-color: #ecc6b4; background: #fff6f1; }
.lx-klasse { display: inline-flex; align-items: center; gap: 6px; padding: 4px 10px; border: 1px solid; border-radius: 6px; font-family: Inter, system-ui, sans-serif; font-size: .78rem; font-weight: 800; line-height: 1.3; white-space: nowrap; }
.lx-klasse b { font-size: .76rem; letter-spacing: .06em; }
.lx-klasse-infraktion { color: #4d5563; border-color: #c9ced7; background: #eef0f3; }
.lx-klasse-vergehen2 { color: #1f4f99; border-color: #bccfee; background: #ecf2fb; }
.lx-klasse-vergehen1 { color: #173f80; border-color: #a9c1ea; background: #e1eaf8; }
.lx-klasse-verbrechen3 { color: #7e5200; border-color: #ead39b; background: #fbf1da; }
.lx-klasse-verbrechen2 { color: #9a3f0a; border-color: #efc2a3; background: #fce8da; }
.lx-klasse-verbrechen1 { color: #9b1419; border-color: #eeb2b4; background: #fbe1e1; }
.lx-klasse-kapital { color: #fff; border-color: #6d0f2c; background: #6d0f2c; }
.lx-zusatz { margin: 10px 0 0; color: var(--tinte-2); font-size: .95rem; }
.lx-zusatz p { margin: 4px 0 0; }
.lx-zusatz b + p, .lx-hinweis-text, .lx-hinweis-text p:first-child { display: inline; margin: 0; }
.lx-hinweis { padding: 8px 12px; border-radius: 6px; background: var(--papier-2); }
.lx-abschnitt-fuss { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 6px 14px; margin-top: 10px; }
.lx-historie { margin: 0; color: var(--tinte-3); font-size: .84rem; }
.lx-aktionen { display: flex; flex-wrap: wrap; gap: 6px; margin-left: auto; font-family: Inter, system-ui, sans-serif; }
.lx-papier .lx-knopf { min-height: 32px; border-color: var(--papier-linie); color: var(--tinte); background: #fff; font-size: .76rem; }
.lx-papier .lx-knopf:hover { border-color: #b8ad95; background: var(--papier-2); }
.lx-papier .lx-knopf-leise { color: var(--tinte-3); }
.lx-papier .lx-knopf[aria-pressed="true"] { border-color: var(--navy); color: #fff; background: var(--navy); }
.lx-papier .lx-knopf-haupt { border-color: var(--navy); color: #fff; background: var(--navy); }
.lx-papier .lx-knopf-gefahr { border-color: #e2a3a3; color: #9b1419; }

/* Werkzeuge im Gesetzbuch */
.lx-werkzeuge { display: flex; flex-wrap: wrap; gap: 8px; align-items: center; margin: -8px 0 26px; padding: 12px; border-radius: 8px; background: var(--papier-2); font-family: Inter, system-ui, sans-serif; }
.lx-werkzeuge .lx-eingabe { border-color: var(--papier-linie); color: var(--tinte); background: #fff; }
.lx-werkzeuge #lxFilter { flex: 1 1 240px; }
.lx-werkzeuge .lx-haken { color: var(--tinte-2); }
.lx-trefferzahl { flex-basis: 100%; min-height: 1.2em; margin: 0; color: var(--tinte-3); font-size: .8rem; }
.lx-trefferzahl:empty { display: none; }

/* Inhaltsverzeichnis */
.lx-inhalt { position: sticky; top: 96px; max-height: calc(100vh - 116px); overflow: auto; font-size: .84rem; scrollbar-width: thin; }
.lx-inhalt-box { border: 1px solid var(--line-soft); border-radius: 12px; background: var(--surface); }
.lx-inhalt-box summary { min-height: 46px; padding: 0 16px; display: flex; align-items: center; font-weight: 850; cursor: pointer; list-style: none; }
.lx-inhalt-box summary::-webkit-details-marker { display: none; }
.lx-inhalt-box summary::after { content: "⌄"; margin-left: auto; color: var(--muted); }
.lx-inhalt-liste { list-style: none; margin: 0; padding: 0 8px 10px; }
.lx-inhalt-liste ol { list-style: none; margin: 0 0 6px; padding: 0 0 0 12px; border-left: 1px solid var(--line); margin-left: 12px; }
.lx-inhalt-liste a { display: block; padding: 4px 8px; border-radius: 6px; color: var(--text-2); }
.lx-inhalt-liste a:hover { color: #fff; background: rgba(255,255,255,.05); }
.lx-inhalt-liste a span { color: var(--gold); font-variant-numeric: tabular-nums; font-weight: 800; }
.lx-inhalt-kapitel { font-weight: 800; color: var(--text) !important; }
.lx-inhalt-liste ol a { font-size: .8rem; }
.lx-inhalt-liste a.lx-aktiv { color: #fff; background: rgba(214,178,94,.14); }
.lx-inhalt-aufgehoben a { opacity: .55; text-decoration: line-through; }
.lx-andere { margin-top: 14px; padding: 14px 16px; border: 1px solid var(--line-soft); border-radius: 12px; background: var(--surface); }
.lx-andere p { margin: 0 0 6px; color: var(--muted); font-size: .76rem; font-weight: 850; letter-spacing: .14em; text-transform: uppercase; }
.lx-andere ul { list-style: none; margin: 0; padding: 0; display: grid; gap: 4px; }
.lx-andere a { color: var(--text-2); }
.lx-andere a:hover { color: #fff; }
.lx-andere span { color: var(--gold); font-weight: 800; }

/* Strafrahmen-Tabelle */
.lx-tabelle { width: 100%; border-collapse: collapse; font-size: .8rem; }
.lx-tabelle th, .lx-tabelle td { padding: 8px 4px; border-bottom: 1px solid var(--line-soft); text-align: left; vertical-align: top; font-variant-numeric: tabular-nums; }
.lx-tabelle thead th { color: var(--muted); font-size: .76rem; font-weight: 850; letter-spacing: .06em; text-transform: uppercase; }
.lx-tabelle tbody th { font-weight: 600; }
.lx-tabelle tbody th small { display: block; margin-top: 3px; color: var(--muted); font-size: .76rem; }
.lx-tabelle td { font-weight: 750; white-space: nowrap; }
.lx-tabelle td small { white-space: normal; }
.lx-tabelle td small { display: block; margin-top: 2px; color: var(--muted); font-size: .76rem; font-weight: 650; }
.lx-tabelle .lx-klasse { font-size: .76rem; padding: 2px 8px; }

/* Letzte Änderungen */
.lx-fassungen { list-style: none; margin: 0; padding: 0; display: grid; gap: 14px; font-size: .84rem; }
.lx-fassung-kopf { margin: 0 0 4px; color: var(--text); font-weight: 800; }
.lx-fassungen ul { list-style: none; margin: 0; padding: 0; display: grid; gap: 3px; color: var(--text-2); }
.lx-fassungen a { color: var(--gold); font-weight: 750; }
.lx-art { display: inline-block; padding: 0 6px; border-radius: 4px; font-size: .76rem; font-weight: 800; background: rgba(255,255,255,.06); color: var(--muted); }
.lx-art-neu, .lx-art-wieder { color: #9be3b6; background: rgba(46,160,90,.16); }
.lx-art-geaendert { color: #f4d38a; background: rgba(214,178,94,.14); }
.lx-art-aufgehoben, .lx-art-entfernt { color: #ffb4b4; background: rgba(242,80,80,.14); }

/* Suchtreffer auf der Übersicht */
.lx-treffer { margin-bottom: 22px; padding: 20px 22px; border: 1px solid var(--line-soft); border-radius: 14px; background: var(--surface); }
.lx-treffer h2 { margin: 0 0 10px; font-size: 1rem; }
.lx-treffer ol { list-style: none; margin: 0; padding: 0; display: grid; gap: 4px; }
.lx-treffer li a { display: grid; gap: 2px; padding: 10px 12px; border-radius: 10px; }
.lx-treffer li a:hover { background: rgba(255,255,255,.05); }
.lx-treffer-kopf { font-weight: 800; }
.lx-treffer-kopf > span:first-child { color: var(--gold); font-variant-numeric: tabular-nums; }
.lx-treffer-text { color: var(--muted); font-size: .86rem; }
.lx-treffer mark { color: inherit; background: rgba(214,178,94,.3); border-radius: 2px; }

/* ------------------------------ Strafrechner ------------------------------ */
.lx-rechner-innen { border: 1px solid rgba(214,178,94,.35); border-radius: 16px; background: #100f15; box-shadow: 0 24px 60px rgba(0,0,0,.35); overflow: hidden; }
.lx-rechner-kopf { width: 100%; min-height: 54px; padding: 0 18px; display: flex; align-items: center; justify-content: space-between; border: 0; background: linear-gradient(118deg, rgba(214,178,94,.16), rgba(20,136,255,.08)); font-size: .95rem; font-weight: 900; cursor: default; }
.lx-rechner-anzahl { margin-left: auto; color: var(--text-2); font-size: .76rem; font-weight: 800; }
.lx-rechner-koerper { padding: 14px 18px 18px; max-height: calc(100vh - 200px); overflow: auto; }
.lx-rechner-koerper > p { margin: 0; font-size: .84rem; }
.lx-rechner-liste { margin: 0; padding: 0; list-style: none; display: grid; gap: 8px; }
.lx-rechner-liste li { display: grid; gap: 6px; padding-bottom: 8px; border-bottom: 1px solid var(--line-soft); font-size: .84rem; }
.lx-rechner-liste strong { color: var(--gold); }
.lx-rl-steuer { display: flex; align-items: center; gap: 6px; }
.lx-rl-anzahl { min-width: 32px; text-align: center; font-weight: 800; font-variant-numeric: tabular-nums; }
.lx-mini { width: 32px; height: 32px; border: 1px solid var(--line); border-radius: 8px; background: rgba(255,255,255,.035); font-weight: 900; cursor: pointer; }
.lx-mini:disabled { opacity: .4; cursor: not-allowed; }
.lx-mini:last-child { margin-left: auto; }
.lx-summe { display: grid; gap: 10px; margin: 14px 0 0; }
.lx-summe dt { color: var(--muted); font-size: .76rem; font-weight: 850; letter-spacing: .1em; text-transform: uppercase; }
.lx-summe dd { margin: 0; font-size: 1.08rem; font-weight: 900; font-variant-numeric: tabular-nums; }
.lx-summe small { display: block; color: var(--muted); font-size: .76rem; font-weight: 600; }
.lx-rechner-knoepfe { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 16px; }

.lx-toast { position: fixed; z-index: 140; left: 50%; bottom: 24px; transform: translateX(-50%); max-width: min(560px, calc(100% - 32px)); padding: 12px 16px; border: 1px solid var(--line); border-radius: 12px; background: #15151f; box-shadow: 0 18px 50px rgba(0,0,0,.5); font-size: .88rem; }
.lx-toast-kritisch { border-color: rgba(242,80,80,.6); }
.footer { border-top: 1px solid var(--line-soft); }
.footer-inner { display: flex; flex-wrap: wrap; justify-content: space-between; gap: 10px 24px; padding: 28px 0 34px; color: var(--muted); font-size: .8rem; }
.footer-inner a:hover { color: #fff; }

/* ======================== Bearbeiten-Modus (Redaktion) ======================== */
.lx-leiste { position: sticky; top: 76px; z-index: 70; border-bottom: 1px solid rgba(214,178,94,.35); background: rgba(16,14,10,.94); backdrop-filter: blur(14px); }
.lx-leiste-innen { min-height: 56px; display: flex; flex-wrap: wrap; align-items: center; gap: 10px 14px; padding: 8px 0; }
.lx-leiste-titel { display: inline-flex; align-items: center; gap: 8px; color: var(--gold); font-size: .76rem; font-weight: 900; letter-spacing: .14em; text-transform: uppercase; }
.lx-leiste-titel::before { content: ""; width: 8px; height: 8px; border-radius: 50%; background: var(--gold); box-shadow: 0 0 0 4px rgba(214,178,94,.18); }
.lx-schalter { display: inline-flex; align-items: center; gap: 10px; min-height: 40px; padding: 0 14px 0 6px; border: 1px solid var(--line); border-radius: 999px; background: rgba(255,255,255,.04); font-size: .8rem; font-weight: 850; cursor: pointer; }
.lx-schalter i { position: relative; width: 38px; height: 22px; border-radius: 999px; background: #3a3a46; transition: background .2s ease; }
.lx-schalter i::after { content: ""; position: absolute; top: 3px; left: 3px; width: 16px; height: 16px; border-radius: 50%; background: #fff; transition: transform .2s ease; }
.lx-schalter[aria-pressed="true"] { border-color: rgba(214,178,94,.6); }
.lx-schalter[aria-pressed="true"] i { background: var(--gold-dunkel); }
.lx-schalter[aria-pressed="true"] i::after { transform: translateX(16px); }
.lx-leiste-info { color: var(--text-2); font-size: .82rem; }
.lx-leiste-info b { color: var(--gold); }
.lx-leiste-knoepfe { display: flex; flex-wrap: wrap; gap: 8px; margin-left: auto; }

body.lx-bearbeiten .lx-seite .lx-rechner, body.lx-bearbeiten .lx-werkzeuge { display: none !important; }
.lx-marke { display: inline-flex; align-items: center; min-height: 22px; padding: 0 8px; border: 1px solid; border-radius: 999px; font-family: Inter, system-ui, sans-serif; font-size: .76rem; font-weight: 850; letter-spacing: .04em; vertical-align: 3px; white-space: nowrap; }
.lx-marke-neu { color: #17663a; border-color: #a9dcbc; background: #e3f5ea; }
.lx-marke-geaendert { color: #7e5200; border-color: #ead39b; background: #fbf1da; }
.lx-marke-entfernen { color: #9b1419; border-color: #eeb2b4; background: #fbe1e1; }
.lx-marke-aufgehoben { color: #4d5563; border-color: #c9ced7; background: #eef0f3; }
.lx-marke-leise { color: var(--tinte-3); border-color: var(--papier-linie); background: #fff; }
.lx-r-zustand-neu { box-shadow: inset 4px 0 0 #2e9a5a; }
.lx-r-zustand-geaendert { box-shadow: inset 4px 0 0 #c99619; }
.lx-r-zustand-entfernen { box-shadow: inset 4px 0 0 #c4383e; }
.lx-r-zustand-entfernen > :not(.lx-abschnitt-fuss):not(.lx-abschnitt-kopf):not(.lx-r-kopfzeile) { opacity: .5; }
.lx-r-abschnitt { padding-left: 16px !important; margin-left: -16px; padding-right: 4px; }
.lx-r-kopfzeile { display: flex; flex-wrap: wrap; align-items: center; gap: 6px; margin: 0 0 6px; }
.lx-kapitel-kopf .lx-r-kopfzeile, .lx-dokument-kopf .lx-r-kopfzeile { justify-content: center; }
.lx-r-kapitel-knoepfe, .lx-r-buch-knoepfe { display: flex; flex-wrap: wrap; justify-content: center; gap: 6px; margin-top: 10px; font-family: Inter, system-ui, sans-serif; }
.lx-r-neu-abschnitt { display: flex; justify-content: center; padding: 14px 0 4px; font-family: Inter, system-ui, sans-serif; }
.lx-r-hinweis { margin: 0 0 18px; padding: 12px 14px; border: 1px solid var(--papier-linie); border-radius: 8px; background: var(--papier-2); color: var(--tinte-2); font-family: Inter, system-ui, sans-serif; font-size: .84rem; }
.lx-r-hinweis b { color: var(--tinte); }
.lx-r-uebersicht-liste { list-style: none; margin: 0; padding: 0; display: grid; gap: 10px; }
.lx-r-buch { display: grid; grid-template-columns: minmax(0, 1fr) auto; gap: 8px 14px; align-items: center; padding: 14px 16px; border: 1px solid var(--papier-linie); border-radius: 10px; background: #fff; }
.lx-r-buch h3 { margin: 0; color: var(--navy); font-size: 1.15rem; }
.lx-r-buch p { margin: 2px 0 0; color: var(--tinte-2); font-size: .9rem; }
.lx-r-buch-zahlen { font-family: Inter, system-ui, sans-serif; color: var(--tinte-3); font-size: .76rem; font-weight: 700; }
.lx-r-reihe { display: flex; flex-wrap: wrap; gap: 6px; justify-content: flex-end; font-family: Inter, system-ui, sans-serif; }
.lx-r-abschnitt-knoepfe { display: flex; flex-wrap: wrap; gap: 6px; margin-left: auto; font-family: Inter, system-ui, sans-serif; }
.lx-r-leer-kapitel { margin: 6px 0 0; color: var(--tinte-3); font-style: italic; text-align: center; }

/* Dialoge */
.lx-dialog { width: min(640px, calc(100% - 24px)); max-height: calc(100vh - 32px); padding: 0; border: 1px solid var(--line); border-radius: 16px; color: var(--text); background: #111118; box-shadow: 0 40px 120px rgba(0,0,0,.7); }
.lx-dialog-breit { width: min(1120px, calc(100% - 24px)); }
.lx-dialog::backdrop { background: rgba(3,3,6,.72); backdrop-filter: blur(3px); }
.lx-dialog-form { display: flex; flex-direction: column; max-height: calc(100vh - 34px); }
.lx-dialog-kopf { display: flex; align-items: center; gap: 12px; padding: 16px 20px; border-bottom: 1px solid var(--line-soft); }
.lx-dialog-kopf h2 { margin: 0; font-size: 1.05rem; }
.lx-x { width: 36px; height: 36px; margin-left: auto; border: 1px solid var(--line); border-radius: 8px; background: transparent; font-size: 1.2rem; cursor: pointer; }
.lx-dialog-inhalt { padding: 18px 20px; overflow: auto; }
.lx-dialog-fuss { display: flex; flex-wrap: wrap; justify-content: flex-end; gap: 8px; padding: 14px 20px; border-top: 1px solid var(--line-soft); }
.lx-dialog-fuss .lx-links { margin-right: auto; }
.lx-frage { margin: 0; color: var(--text-2); }
.lx-form { display: grid; gap: 14px; }
.lx-feld { display: grid; gap: 6px; }
.lx-feld > span { color: var(--text-2); font-size: .76rem; font-weight: 800; }
.lx-feld small { color: var(--muted); font-size: .76rem; }
.lx-feld .lx-eingabe, .lx-feld textarea, .lx-feld select { width: 100%; }
.lx-feld textarea { min-height: 120px; padding: 10px 12px; border: 1px solid var(--line); border-radius: 10px; background: #0b0b11; resize: vertical; line-height: 1.5; }
.lx-feld textarea.lx-gesetzestext { min-height: 260px; font-family: var(--serif); font-size: .98rem; }
.lx-feld textarea:focus { outline: 2px solid #7cb2ff; border-color: transparent; }
.lx-zwei, .lx-paar { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }
.lx-drei { display: grid; grid-template-columns: repeat(3, 1fr); gap: 12px; }
.lx-nummer-feld { display: flex; align-items: stretch; }
.lx-nummer-feld b { display: inline-flex; align-items: center; padding: 0 10px; border: 1px solid var(--line); border-right: 0; border-radius: 10px 0 0 10px; background: #18181f; color: var(--gold); font-variant-numeric: tabular-nums; }
.lx-nummer-feld .lx-eingabe { border-radius: 0 10px 10px 0; }
.lx-folgen-wahl { display: flex; flex-wrap: wrap; gap: 8px 16px; }
.lx-editor { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: 20px; align-items: start; }
.lx-vorschau { position: sticky; top: 0; }
.lx-vorschau > p { margin: 0 0 8px; color: var(--muted); font-size: .76rem; font-weight: 850; letter-spacing: .12em; text-transform: uppercase; }
.lx-vorschau .lx-papier { padding: 20px 22px; font-size: .98rem; box-shadow: none; }
.lx-vorschau .lx-papier::before { display: none; }
.lx-hilfe { margin: 0; padding: 10px 12px; border-radius: 10px; background: #16161e; color: var(--muted); font-size: .76rem; line-height: 1.55; }
.lx-hilfe code { color: var(--gold); }
.lx-fehler { margin: 0; padding: 10px 12px; border: 1px solid rgba(242,80,80,.5); border-radius: 10px; color: #ffcaca; background: rgba(242,80,80,.08); font-size: .84rem; }

/* Freigabe */
.lx-frei-liste { list-style: none; margin: 0; padding: 0; display: grid; gap: 8px; }
.lx-frei-eintrag { border: 1px solid var(--line); border-radius: 10px; background: #15151d; }
.lx-frei-zeile { display: flex; align-items: center; gap: 10px; padding: 10px 12px; }
.lx-frei-zeile input { width: 18px; height: 18px; accent-color: var(--gold-dunkel); flex: none; }
.lx-frei-zeile label { flex: 1; min-width: 0; cursor: pointer; font-size: .88rem; }
.lx-frei-zeile label b { color: var(--gold); }
.lx-frei-eintrag details { padding: 0 12px 10px 40px; }
.lx-frei-eintrag summary { color: var(--muted); font-size: .76rem; font-weight: 800; cursor: pointer; }
.lx-diff { display: grid; gap: 8px; margin-top: 8px; font-size: .82rem; }
.lx-diff-feld { display: grid; grid-template-columns: 120px minmax(0, 1fr); gap: 10px; }
.lx-diff-feld > span { color: var(--muted); font-weight: 800; }
.lx-diff-alt { color: #ffb4b4; text-decoration: line-through; text-decoration-color: rgba(255,180,180,.5); }
.lx-diff-neu { color: #b4f0c8; }
.lx-diff-text { margin: 0; white-space: pre-wrap; font-family: var(--serif); font-size: .9rem; line-height: 1.5; }
.lx-diff-text del { color: #ffb4b4; background: rgba(242,80,80,.12); text-decoration: line-through; }
.lx-diff-text ins { color: #b4f0c8; background: rgba(46,160,90,.14); text-decoration: none; }
.lx-gruppe-titel { margin: 14px 0 6px; color: var(--muted); font-size: .76rem; font-weight: 850; letter-spacing: .12em; text-transform: uppercase; }
.lx-gruppe-titel:first-child { margin-top: 0; }
.lx-verlauf { list-style: none; margin: 0; padding: 0; display: grid; gap: 10px; font-size: .84rem; }
.lx-verlauf li { padding: 10px 12px; border: 1px solid var(--line); border-radius: 10px; background: #15151d; }
.lx-verlauf-kopf { display: flex; flex-wrap: wrap; gap: 6px 10px; color: var(--muted); font-size: .76rem; }
.lx-verlauf-kopf b { color: var(--text); }
.lx-rahmen-tabelle { width: 100%; border-collapse: collapse; font-size: .82rem; }
.lx-rahmen-tabelle th, .lx-rahmen-tabelle td { padding: 6px 4px; border-bottom: 1px solid var(--line-soft); text-align: left; }
.lx-rahmen-tabelle input { width: 100%; min-height: 36px; padding: 4px 8px; border: 1px solid var(--line); border-radius: 8px; background: #0b0b11; font-variant-numeric: tabular-nums; }
.lx-vorlage-wahl { display: grid; gap: 8px; }
.lx-vorlage-wahl label { display: grid; grid-template-columns: 22px minmax(0, 1fr); gap: 10px; padding: 12px; border: 1px solid var(--line); border-radius: 10px; background: #15151d; cursor: pointer; }
.lx-vorlage-wahl input { width: 18px; height: 18px; margin-top: 2px; accent-color: var(--gold-dunkel); }
.lx-vorlage-wahl b { color: var(--text); }
.lx-vorlage-wahl small { display: block; color: var(--muted); }
.lx-vorlage-wahl .lx-gesperrt { opacity: .55; cursor: not-allowed; }

/* ------------------------------ Breiten ------------------------------ */
@media (max-width: 1240px) {
  .lx-buch { grid-template-columns: minmax(0, 1fr) 300px; }
  .lx-inhalt { grid-column: 1 / -1; position: static; max-height: none; overflow: visible; }
  .lx-inhalt-box:not([open]) { }
  .lx-inhalt-liste { columns: 2 280px; column-gap: 18px; }
  .lx-inhalt-liste > li { break-inside: avoid; }
  .lx-andere { display: none; }
}
@media (max-width: 1080px) {
  .lx-raster { grid-template-columns: minmax(0, 1fr); }
  .lx-raster .lx-seite { position: static; grid-template-columns: repeat(auto-fit, minmax(300px, 1fr)); }
}
@media (max-width: 980px) {
  .lx-buch { grid-template-columns: minmax(0, 1fr); padding-bottom: 120px; }
  .lx-seite { position: static; }
  .lx-rechner { position: fixed; z-index: 90; left: 0; right: 0; bottom: 0; }
  .lx-rechner-innen { border-radius: 16px 16px 0 0; border-bottom: 0; }
  .lx-rechner-kopf { cursor: pointer; }
  .lx-rechner-kopf::after { content: ""; width: 8px; height: 8px; margin: 3px 4px 0 14px; border-left: 2px solid var(--muted); border-top: 2px solid var(--muted); transform: rotate(45deg); transition: transform .2s ease; }
  .lx-rechner-offen .lx-rechner-kopf::after { margin-top: -5px; transform: rotate(225deg); }
  .lx-rechner:not(.lx-rechner-offen) .lx-rechner-koerper { display: none; }
  .lx-rechner-koerper { max-height: 60vh; }
  .lx-toast { top: 88px; bottom: auto; }
  .lx-editor { grid-template-columns: minmax(0, 1fr); }
  .lx-vorschau { position: static; }
}
@media (max-width: 760px) {
  .desktop-nav { display: none; }
  .header-inner { gap: 16px; }
  .desktop-nav + .header-actions { margin-left: auto; }
  .lx-held { padding: 34px 0 30px; }
  .lx-held-innen { grid-template-columns: 1fr; gap: 18px; }
  .lx-held-innen > .lx-siegel { width: 112px; }
  .lx-held-zeile { grid-template-columns: 1fr; gap: 12px; }
  .lx-held-zeile > .lx-siegel { width: 64px; }
  .lx-held h1, .lx-held-buch h1 { font-size: clamp(1.7rem, 8vw, 2.4rem); }
  .lx-papier { padding: 26px 18px 30px; font-size: 1rem; }
  .lx-papier::before { inset: 6px; }
  .lx-dokument-kopf h2 { font-size: 1.15rem; letter-spacing: .02em; }
  .lx-kapitel-kopf h2 { font-size: 1.08rem; letter-spacing: .04em; }
  .lx-titel-name { font-size: 1.25rem; }
  .lx-s1 { padding-left: 1.7em; text-indent: -1.7em; }
  .lx-s2 { padding-left: 3em; text-indent: -1.6em; }
  .lx-s3 { padding-left: 4.2em; text-indent: -1.5em; }
  .lx-s4 { padding-left: 5.2em; text-indent: -1.3em; }
  .lx-abschnitt.lx-markiert { margin: 0 -10px; padding-inline: 10px; }
  .lx-aktionen { margin-left: 0; }
  .lx-zwei { grid-template-columns: 1fr; }
  .lx-drei { gap: 8px; }
  .lx-leiste { position: static; }
  .lx-diff-feld { grid-template-columns: 1fr; gap: 2px; }
  .lx-r-buch { grid-template-columns: 1fr; }
  .lx-r-reihe { justify-content: flex-start; }
  .lx-leiste-knoepfe { margin-left: 0; }
  .lx-inhalt-liste { columns: 1; }
  .lx-tabelle td { white-space: normal; }
}
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  .lx-abschnitt { transition: none; }
}

/* ------------------------------ Druck ------------------------------ */
@media print {
  body { background: #fff; color: #000; }
  body::before, .site-header, .footer, .lx-inhalt, .lx-seite, .lx-werkzeuge, .lx-aktionen, .lx-leiste, .lx-toast, .skip-link, .lx-suche { display: none !important; }
  main { padding-top: 0; }
  .lx-held { padding: 0 0 12px; border: 0; background: none; color: #000; }
  .lx-held .lx-siegel { display: none; }
  .lx-held-innen, .lx-held-zeile { display: block; }
  .lx-held-text, .lx-stand, .eyebrow, .lx-pfad { color: #333; }
  .lx-buch, .lx-raster { display: block; padding: 0; }
  .lx-papier { padding: 0; box-shadow: none; background: #fff; }
  .lx-papier::before { display: none; }
  .lx-abschnitt { break-inside: avoid; }
  .lx-kapitel-kopf { break-after: avoid; }
  a { text-decoration: none; }
}
