/* ════════════════════════════════════════════════════════
   judic.css — Zentrales Stylesheet für alle Seiten
   Eingebunden in: index.html · impressum.html · viewer.html
   ════════════════════════════════════════════════════════ */

@import url('https://fonts.googleapis.com/css2?family=Open+Sans:ital,wght@0,300;0,400;0,500;0,600;0,700;1,400&display=swap');

/* ══ VARIABLEN ══════════════════════════════════════════ */
:root {
  --red:     #8B0000;
  --red-lt:  #f9f0f0;
  --red-mid: #c0392b;
  --gold:    #b8860b;
  --ink:     #1a1a1a;
  --muted:   #555;
  --light:   #666;
  --lighter: #999;
  --border:  #ddd;
  --bg:      #fffefb;
  --surface: #ffffff;
  /* Einheitliche leichte Vergrösserung der Typografie (Viewer, Index, statische Seiten) */
  --fs-scale: 1.068;
  --serif:   'Libre Baskerville', Georgia, serif;
  --sans:    'Open Sans', system-ui, sans-serif;
}



/* ══ RESET ══════════════════════════════════════════════ */
* { box-sizing: border-box; margin: 0; padding: 0; }
html { scroll-behavior: smooth; }

/* ══ BASIS-BODY ═════════════════════════════════════════ */
body {
  font-family: var(--sans);
  background: var(--bg);
  color: var(--ink);
  min-height: 100vh;
}

/* Zentriertes Seiten-Layout */
body.page-centered {
  display: flex;
  flex-direction: column;
  align-items: center;
  padding-bottom: 60px;
}

/* ══ TOPBAR ═════════════════════════════════════════════ */
#topbar a,
#topbar a:hover { text-decoration: none; }

#topbar {
  background: var(--red);
  color: #fff;
  display: flex;
  align-items: center;
  padding: 0 32px;
  height: 52px;
  width: 100%;
  position: fixed;
  top: 0;
  z-index: 100;
}

#topbar .logo {
  display: flex;
  align-items: center;
  gap: 12px;
  font-family: var(--sans);
  font-weight: 500;
  font-size: calc(14px * var(--fs-scale));
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

#topbar .logo img {
  max-width: 25px;
  height: auto;
  display: block;
}

#topbar-inner {
  display: flex;
  align-items: center;
  gap: 16px;
  width: 100%;
  max-width: 1400px;
  margin: 0 auto;
  padding: 0 20px;
}

/* ══ LOGO ═══════════════════════════════════════════════ */
.logo-img { max-width: 25px; height: auto; display: block; }

.logo-text {
  font-family: var(--sans);
  font-weight: 500;
  font-size: calc(14px * var(--fs-scale));
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: #fff;
  line-height: 1;
}

/* ══ FOOTER ═════════════════════════════════════════════ */
footer {
  width: 100%;
  border-top: 1px solid var(--border);
  background: var(--surface);
  position: fixed;
  bottom: 0;
  left: 0;
  z-index: 99;
}

.footer-inner {
  max-width: 1400px;
  margin: 0 auto;
  padding: 20px 32px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  font-family: var(--sans);
  font-size: calc(12px * var(--fs-scale));
  color: var(--light);
}

.footer-left {
  display: flex;
  align-items: center;
  gap: 8px;
}

.footer-left img {
  width: 16px;
  height: 16px;
  opacity: 0.5;
}

footer a {
  color: var(--light);
  text-decoration: none;
  transition: color 0.15s;
}

footer a:hover { color: var(--red); }

.footer-right { display: flex; gap: 16px; align-items: center; }

/* ══ TOPBAR NAV LINKS ═══════════════════════════════════ */
.topbar-links {
  display: flex;
  align-items: center;
  gap: 20px;
  margin-left: 24px;
}

.topbar-links a {
  font-family: var(--sans);
  font-size: calc(12px * var(--fs-scale));
  color: rgba(255,255,255,0.75);
  text-decoration: none;
  transition: color 0.15s;
}

.topbar-links a:hover { color: #fff; }

/* ══ LANGUAGE SWITCHER ══════════════════════════════════ */
.lang-switcher {
  display: flex;
  align-items: center;
  gap: 2px;
  margin-left: auto;
}

.lang-btn {
  background: none;
  border: none;
  color: rgba(255,255,255,0.55);
  font-family: var(--sans);
  font-size: calc(11px * var(--fs-scale));
  font-weight: 600;
  letter-spacing: 0.06em;
  cursor: pointer;
  padding: 3px 7px;
  border-radius: 3px;
  transition: color 0.15s, background 0.15s;
}

.lang-btn:hover { color: #fff; background: rgba(255,255,255,0.1); }
.lang-btn.active { color: #fff; background: rgba(255,255,255,0.18); }

/* ══ HERO ═══════════════════════════════════════════════ */
.hero {
  margin-top: 15vh;
  width: 100%;
  max-width: 700px;
  padding: 0 24px;
  text-align: center;
  display: flex;
  flex-direction: column;
  align-items: center;
}

.hero-title {
  font-family: var(--serif);
  font-size: calc(48px * var(--fs-scale));
  font-weight: 700;
  color: var(--ink);
  margin-bottom: 12px;
  letter-spacing: -0.02em;
  display: inline-block;
  position: relative;
  padding-right: 0;
}

.hero-beta-badge {
  display: inline-flex;
  align-items: center;
  padding: 3px 9px;
  border-radius: 999px;
  background: linear-gradient(135deg, #e15d47, #b22222);
  color: #fff;
  font-family: var(--sans);
  font-size: calc(12px * var(--fs-scale));
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  line-height: 1;
  position: absolute;
  top: -14px;
  right: -52px;
  transform: none;
  z-index: 1;
  box-shadow: 0 4px 12px rgba(139, 0, 0, 0.25);
}

.hero-subtitle {
  font-family: var(--sans);
  font-size: calc(30px * var(--fs-scale));
  line-height: 1.2;
  min-height: 1.2em;
  color: var(--muted);
  margin-top: 0;
  margin-bottom: 40px;
  font-weight: 300;
}

.tw-cursor {
  display: inline-block;
  margin-left: 1px;
  animation: tw-blink 1s step-end infinite;
}
@keyframes tw-blink { 50% { opacity: 0; } }

/* ══ SEARCH ═════════════════════════════════════════════ */
.search-container {
  width: 100%;
  position: relative;
  box-shadow: 0 8px 24px rgba(0,0,0,0.06);
  border-radius: 8px;
}

.search-input {
  width: 100%;
  padding: 20px 24px;
  padding-right: 60px;
  font-family: var(--sans);
  font-size: calc(18px * var(--fs-scale));
  border: 1px solid var(--border);
  border-radius: 8px;
  background: var(--surface);
  color: var(--ink);
  outline: none;
  transition: border-color 0.2s, box-shadow 0.2s;
}

.search-input:focus {
  border-color: var(--red);
  box-shadow: 0 0 0 3px var(--red-lt);
}

.search-button {
  position: absolute;
  right: 12px;
  top: 50%;
  transform: translateY(-50%);
  background: var(--red);
  color: white;
  border: none;
  border-radius: 6px;
  width: 40px;
  height: 40px;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: background 0.2s;
}

.search-button:hover { background: var(--red-mid); }

.search-hint {
  font-family: var(--sans);
  font-size: calc(13px * var(--fs-scale));
  color: var(--light);
  margin-top: 16px;
}

/* ══ NEUHEITEN (index.html) ═════════════════════════════ */
.neuheiten-section {
  margin-top: 64px;
  width: 100%;
  max-width: 700px;
  padding: 0 24px;
}

.neuheiten-header {
  display: flex;
  align-items: baseline;
  gap: 12px;
  margin-bottom: 20px;
}

.neuheiten-title {
  font-family: var(--sans);
  font-size: calc(16px * var(--fs-scale));
  font-weight: 700;
  letter-spacing: 0.05em;
  text-transform: uppercase;
  color: var(--red);
}

.neuheiten-subtitle {
  font-family: var(--sans);
  font-size: calc(12px * var(--fs-scale));
  color: var(--light);
}

.neuheiten-table {
  width: 100%;
  border-collapse: separate;
  border-spacing: 0;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 10px;
  overflow: hidden;
  box-shadow: 0 2px 8px rgba(0,0,0,0.03);
}

.neuheiten-table thead th {
  font-family: var(--sans);
  font-size: calc(10px * var(--fs-scale));
  font-weight: 600;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--light);
  padding: 12px 16px;
  text-align: left;
  background: #eeecea;
  border-bottom: 1px solid var(--border);
  position: static;
}

.neuheiten-table thead th .th-main,
.neuheiten-sticky-head-table th .th-main {
  display: block;
}

.neuheiten-table thead th .th-sub,
.neuheiten-sticky-head-table th .th-sub {
  display: block;
  margin-top: 3px;
  font-size: 0.9em;
  font-weight: 500;
  letter-spacing: 0.06em;
  color: var(--lighter);
  text-transform: none;
}

.neuheiten-table thead th .th-sub-empty,
.neuheiten-sticky-head-table th .th-sub-empty {
  visibility: hidden;
}

.neuheiten-table tbody tr {
  border-bottom: 1px solid var(--border);
  transition: background 0.12s;
  cursor: pointer;
}

.neuheiten-table tbody tr:last-child { border-bottom: none; }
.neuheiten-table tbody tr:hover { background: var(--red-lt); }
.neuheiten-table td { padding: 14px 16px; vertical-align: top; }

.td-pub  {
  font-family: var(--sans);
  font-size: calc(11px * var(--fs-scale));
  color: var(--light);
  white-space: normal;
}
.pub-date-wrap {
  display: inline-flex;
  align-items: center;
  gap: 6px;
}
.pub-meta-row {
  margin-top: 6px;
  display: flex;
  gap: 6px;
  align-items: center;
  flex-wrap: wrap;
}
.pub-dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: #2ca24f;
  box-shadow: 0 0 0 2px rgba(44, 162, 79, 0.18);
  flex-shrink: 0;
}
.td-ref  { font-family: var(--sans); font-size: calc(13px * var(--fs-scale)); font-weight: 500; white-space: nowrap; }
.td-ref a { color: var(--red); text-decoration: none; }
.td-ref a:hover { text-decoration: underline; }
.ref-urteilsdatum {
  font-family: var(--sans);
  font-size: calc(11px * var(--fs-scale));
  color: var(--light);
  margin-top: 2px;
  font-weight: 400;
}
.ref-hint {
  margin-top: 6px;
  font-size: calc(11px * var(--fs-scale));
  color: #8b6b2d;
  font-family: var(--sans);
  font-weight: 500;
}
.mini-pill {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border-radius: 999px;
  border: 1px solid var(--border);
  background: #f5f4f3;
  color: var(--muted);
  font-family: var(--sans);
  font-size: calc(10px * var(--fs-scale));
  line-height: 1;
  font-weight: 700;
  letter-spacing: 0.04em;
  padding: 3px 8px;
  min-height: 19px;
}
.mini-pill-lang { min-width: 36px; }
.mini-pill-lang-de { background: #eef5ff; border-color: #cbdcf5; color: #2b4f86; }
.mini-pill-lang-fr { background: #f5f0ff; border-color: #ddd0f5; color: #5a3d8a; }
.mini-pill-lang-it { background: #edf8ee; border-color: #cde7d0; color: #2f6b3c; }
.mini-pill-richter { background: #fdf3ef; border-color: #f0d4c7; color: #8d3f21; }
.mini-pill-neutral { background: #f6f6f6; color: #8a8a8a; }
.mini-pill-richter { white-space: nowrap; }
.td-date { font-family: var(--sans); font-size: calc(12px * var(--fs-scale)); color: var(--muted); white-space: nowrap; }
.td-sach { font-family: var(--sans); font-size: calc(12px * var(--fs-scale)); }
.td-sach .sach-name   { color: var(--muted); font-weight: 500; }
.td-sach .themen-text { margin-top: 4px; font-size: calc(11.5px * var(--fs-scale)); color: var(--light); line-height: 1.45; }
.row-bge-planned {
  background: #fff8e9;
}
.row-bge-planned:hover {
  background: #fff2d7;
}

.skeleton-row td { padding: 16px; }
.skeleton {
  height: 13px;
  border-radius: 4px;
  background: linear-gradient(90deg, #ebebeb 25%, #f5f5f5 50%, #ebebeb 75%);
  background-size: 200% 100%;
  animation: shimmer 1.4s infinite;
}
@keyframes shimmer {
  0%   { background-position: 200% 0; }
  100% { background-position: -200% 0; }
}

/* ══ ABOUT / IMPRESSUM ══════════════════════════════════ */
.about-section {
  margin-top: 80px;
  margin-bottom: 60px;
  width: 100%;
  max-width: 800px;
  padding: 48px;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 12px;
  box-shadow: 0 4px 12px rgba(0,0,0,0.02);
}

.about-title {
  font-family: var(--sans);
  font-size: calc(12px * var(--fs-scale));
  font-weight: 700;
  letter-spacing: 0.15em;
  text-transform: uppercase;
  color: var(--red);
  margin-bottom: 24px;
  text-align: center;
}

.about-content { font-size: calc(16px * var(--fs-scale)); line-height: 1.8; color: var(--ink); }
.about-content p  { margin-bottom: 24px; }
.about-content a  { color: var(--red); }

.about-content h3 {
  font-family: var(--sans);
  font-size: calc(18px * var(--fs-scale));
  font-weight: 500;
  margin-top: 32px;
  margin-bottom: 12px;
  color: var(--ink);
}

.about-content h4 {
  font-family: var(--sans);
  font-size: calc(15px * var(--fs-scale));
  font-weight: 600;
  margin-top: 20px;
  margin-bottom: 8px;
  color: var(--ink);
}

.about-content ul { padding-left: 20px; margin-bottom: 20px; }
.about-content ul li { font-size: calc(15px * var(--fs-scale)); color: var(--muted); margin-bottom: 6px; }

.feature-list { list-style: none; margin-bottom: 24px; }
.feature-list li {
  position: relative;
  padding-left: 24px;
  margin-bottom: 12px;
  font-size: calc(15px * var(--fs-scale));
  color: var(--muted);
}
.feature-list li::before {
  content: "•";
  color: var(--red);
  position: absolute;
  left: 0;
  font-size: calc(18px * var(--fs-scale));
  line-height: 1;
  top: 2px;
}

/* ══ VIEWER: 3-Spalten-Layout ═══════════════════════════ */
#layout {
  display: grid;
  grid-template-columns: 300px 1fr 260px;
  min-height: calc(100vh - 52px);
  max-width: 1400px;
  margin: 0 auto;
  box-shadow: 0 0 0 1px var(--border);
}

/* ── Linke Sidebar ── */
#sidebar {
  background: var(--surface);
  border-right: 1px solid var(--border);
  padding: 28px 24px;
  position: sticky;
  top: 52px;
  height: calc(100vh - 52px);
  overflow-y: auto;
}

.meta-block { margin-bottom: 24px; }
.meta-label {
  font-family: var(--sans);
  font-size: calc(10px * var(--fs-scale));
  font-weight: 500;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--light);
  margin-bottom: 5px;
}
.meta-value {
  font-family: var(--sans);
  font-size: calc(12.5px * var(--fs-scale));
  color: var(--ink);
  line-height: 1.5;
}
.meta-value a { color: var(--red); text-decoration: none; }
.meta-value a:hover { text-decoration: underline; }

.divider { border: none; border-top: 1px solid var(--border); margin: 20px 0; }

.richter-item { font-family: var(--sans); font-size: calc(12.5px * var(--fs-scale)); color: var(--muted); line-height: 1.8; }
.richter-item.gs { color: var(--light); }

/* Nav */
nav { margin-top: 8px; }
.nav-item {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 9px 12px;
  border-radius: 6px;
  cursor: pointer;
  font-family: var(--sans);
  font-size: calc(13px * var(--fs-scale));
  color: var(--muted);
  transition: background 0.15s, color 0.15s;
  border: none;
  background: none;
  width: 100%;
  text-align: left;
  text-decoration: none;
}
.nav-item:hover { background: var(--bg); color: var(--ink); }
.nav-item.active { background: var(--red-lt); color: var(--red); font-weight: 500; }
.nav-dot { width: 6px; height: 6px; border-radius: 50%; background: currentColor; opacity: 0.5; flex-shrink: 0; }
.nav-item.active .nav-dot { opacity: 1; }
.nav-item.nav-hidden { display: none; }

/* ── Hauptinhalt ── */
#main {
  padding: 80px 48px 80px;
  min-width: 0;
  display: flex;
  flex-direction: column;
  align-items: center;
}

#main > * {
  width: 100%;
  max-width: 600px;
}

.urteil-titel {
  font-family: var(--serif);
  font-size: calc(20px * var(--fs-scale));
  font-weight: 700;
  color: var(--ink);
  margin-bottom: 48px;
  line-height: 1.3;
}

.section-block { margin-bottom: 64px; scroll-margin-top: 68px; }
.section-block.section-empty { display: none; }

.section-head {
  font-family: var(--sans);
  font-size: calc(10px * var(--fs-scale));
  font-weight: 500;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--light);
  margin-bottom: 28px;
  padding-bottom: 10px;
  border-bottom: 1px solid var(--border);
}

.abschnitt { margin-bottom: 28px; }
.abschnitt[id^="E-"] { scroll-margin-top: 80px; }
.abschnitt.anchor-flash { animation: anchorFlash 1.5s ease-out; }
@keyframes anchorFlash {
  0%   { background-color: rgba(139, 0, 0, 0.10); }
  100% { background-color: transparent; }
}
.abschnitt-id {
  font-family: var(--sans);
  font-size: calc(11px * var(--fs-scale));
  font-weight: 500;
  color: var(--red);
  letter-spacing: 0.06em;
  margin-bottom: 8px;
}
.abschnitt-text { font-size: calc(15px * var(--fs-scale)); line-height: 1.85; color: var(--ink); margin: 0 0 0.9em; }
.abschnitt-text:last-child { margin-bottom: 0; }
.abschnitt[data-depth="2"] { padding-left: 20px; }
.abschnitt[data-depth="3"] { padding-left: 40px; }

/* BGE-Regeste */
.regeste-main {
  margin-bottom: 48px;
  padding: 20px 24px;
  background: var(--bg);
  border-left: 3px solid var(--border);
  border-radius: 0 6px 6px 0;
}
.regeste-main-titel {
  font-family: var(--sans);
  font-size: calc(10px * var(--fs-scale));
  font-weight: 500;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--light);
  margin-bottom: 10px;
}
.regeste-main-text { font-family: var(--sans); font-size: calc(13px * var(--fs-scale)); line-height: 1.65; color: var(--muted); }
.regeste-main + .regeste-main { margin-top: -36px; }

/* BGE-Kopf */
.bge-kopf { margin-bottom: 40px; padding-bottom: 28px; border-bottom: 1px solid var(--border); }
.bge-kopf-auszug { font-family: var(--sans); font-size: calc(13px * var(--fs-scale)); color: var(--muted); line-height: 1.55; margin-bottom: 20px; }

/* Seitenmarker */
.page-marker {
  text-align: center;
  font-family: var(--sans);
  font-size: calc(11px * var(--fs-scale));
  color: var(--light);
  letter-spacing: 0.06em;
  margin: 24px 0;
  padding: 6px 0;
  border-top: 1px dashed var(--border);
  border-bottom: 1px dashed var(--border);
}
.page-markers-hidden .page-marker { display: none; }

/* Toggle */
.toggle-row {
  display: flex;
  align-items: center;
  gap: 8px;
  font-family: var(--sans);
  font-size: calc(12px * var(--fs-scale));
  color: var(--muted);
  cursor: pointer;
  user-select: none;
}
.toggle-row input[type=checkbox] { accent-color: var(--red); cursor: pointer; }

/* Regeste-Block (Sidebar) */
.regeste-block { font-family: var(--sans); font-size: calc(12px * var(--fs-scale)); color: var(--muted); line-height: 1.6; margin-top: 4px; }
.regeste-block details summary { cursor: pointer; color: var(--light); font-size: calc(11px * var(--fs-scale)); letter-spacing: 0.04em; list-style: none; margin-bottom: 4px; }
.regeste-block details summary::before { content: '\25B6 '; font-size: calc(9px * var(--fs-scale)); }
.regeste-block details[open] summary::before { content: '\25BC '; }

/* Inline Links */
.lnk-bge, .lnk-bger, .lnk-law { text-decoration: underline; text-decoration-style: dotted; text-underline-offset: 3px; text-decoration-thickness: 1px; transition: color 0.12s, text-decoration-color 0.12s, text-decoration-style 0.12s; }
.lnk-bge  { color: inherit; text-decoration-color: #c9a0a0; }
.lnk-bge:hover  { color: var(--red); text-decoration-color: var(--red); text-decoration-style: solid; }
.lnk-bger { color: inherit; font-style: italic; text-decoration-color: #c9a0a0; }
.lnk-bger:hover { color: var(--red); text-decoration-color: var(--red); text-decoration-style: solid; }
.lnk-law  { color: inherit; text-decoration-color: #8090c8; }
.lnk-law:hover  { color: #2a3a8a; text-decoration-color: #2a3a8a; text-decoration-style: solid; }
.lnk-erw  { color: inherit; text-decoration-color: #a0b480; }
.lnk-erw:hover  { color: #4a5a30; text-decoration-color: #4a5a30; text-decoration-style: solid; }

/* Dispositiv */
.disp-punkt { display: flex; margin-bottom: 20px; }
.disp-nr    { font-family: var(--sans); font-weight: 500; font-size: calc(13px * var(--fs-scale)); color: var(--red); min-width: 20px; margin-top: 4px; }
.disp-text  { font-size: calc(15px * var(--fs-scale)); line-height: 1.75; }

/* ── Rechtes Panel: Referenzen ── */
#refpanel {
  background: var(--surface);
  border-left: 1px solid var(--border);
  padding: 28px 20px;
  position: sticky;
  top: 52px;
  height: calc(100vh - 52px);
  overflow-y: auto;
}

.ref-panel-head {
  font-family: var(--sans);
  font-size: calc(10px * var(--fs-scale));
  font-weight: 500;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--light);
  margin-bottom: 20px;
  padding-bottom: 10px;
  border-bottom: 1px solid var(--border);
}

.ref-section { margin-bottom: 12px; }
.ref-section[open] { margin-bottom: 20px; }
.ref-section-title {
  font-family: var(--sans);
  font-size: calc(10px * var(--fs-scale));
  font-weight: 500;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--light);
  margin-bottom: 10px;
  cursor: pointer;
  list-style: none;
  display: flex;
  align-items: center;
  gap: 5px;
  user-select: none;
}
.ref-section-title::-webkit-details-marker { display: none; }
.ref-section-title::before {
  content: '▶';
  font-size: calc(7px * var(--fs-scale));
  transition: transform 0.15s;
  display: inline-block;
}
.ref-section[open] > .ref-section-title::before {
  transform: rotate(90deg);
}

.ref-chips::after { content: ''; display: table; clear: both; }
.ref-chip {
  float: left;
  font-family: var(--sans);
  font-size: calc(11.5px * var(--fs-scale));
  padding: 4px 10px;
  border-radius: 20px;
  border: 1px solid var(--border);
  color: var(--muted);
  text-decoration: none;
  transition: border-color 0.15s, color 0.15s;
  margin: 0 5px 6px 0;
  white-space: nowrap;
}
.ref-chip:hover      { border-color: var(--red); color: var(--red); }
.ref-chip.bge        { background: var(--bg); }
.ref-chip.law        { background: #f0f4ff; border-color: #c5d0f0; color: #3a4a9a; }
.ref-chip.law:hover  { background: #e0e8ff; border-color: #3a4a9a; color: #2a3a8a; }
.ref-chip.bger-urt   { font-style: italic; }
.ref-chip.erw        { background: #f5f7f0; border-color: #c8d4b0; color: #4a5a30; font-variant-numeric: tabular-nums; }
.ref-chip.erw:hover  { background: #eaf0d8; border-color: #4a5a30; color: #3a4820; }
.ref-chip-wrap { display: inline-flex; align-items: center; gap: 2px; }
.ref-chip-ext {
  font-size: 10px;
  color: var(--light);
  text-decoration: none;
  padding: 2px 3px;
  border-radius: 2px;
}
.ref-chip-ext:hover { color: var(--red); }
.ref-more-btn {
  margin-top: 12px;
  margin-bottom: 8px;
  font-family: var(--sans);
  font-size: 13px;
  color: var(--light);
  background: none;
  border: 1px solid var(--border);
  border-radius: 4px;
  padding: 6px 14px;
  cursor: pointer;
  transition: border-color .15s, color .15s;
}
.ref-more-btn:hover { border-color: var(--red); color: var(--red); }
.ref-chip.cited-by   { background: #eef6fb; border-color: #9dc8e0; color: #1a5f80; }
.ref-chip.cited-by:hover { background: #d8edf8; border-color: #1a5f80; color: #0e3f5c; }

#ref-cited-by {
  margin-bottom: 16px;
  border-top: 1px solid var(--border);
  padding-top: 10px;
}
#ref-cited-by summary {
  font-family: var(--sans);
  font-size: calc(12px * var(--fs-scale));
  font-weight: 600;
  letter-spacing: .04em;
  text-transform: uppercase;
  color: var(--light);
  cursor: pointer;
  user-select: none;
  list-style: none;
  display: flex;
  align-items: center;
  gap: 4px;
  padding: 4px 0;
}
#ref-cited-by summary::-webkit-details-marker { display: none; }
#ref-cited-by summary::before {
  content: '▶';
  font-size: 9px;
  transition: transform .15s;
  display: inline-block;
}
#ref-cited-by[open] > summary::before { transform: rotate(90deg); }
#ref-cited-by-list { padding-top: 6px; }

/* ── Translation buttons ── */
.tr-btn {
  font-family: var(--sans);
  font-size: calc(10px * var(--fs-scale));
  font-weight: 500;
  letter-spacing: 0.05em;
  color: var(--muted);
  background: transparent;
  border: 1px solid var(--border);
  border-radius: 10px;
  padding: 1px 7px;
  cursor: pointer;
  transition: background 0.12s, color 0.12s, border-color 0.12s;
  line-height: 1.4;
}
.tr-btn:hover  { border-color: var(--red); color: var(--red); }
.tr-btn.active { background: #f5f7f0; border-color: #a0b480; color: #4a5a30; }
.tr-btn.loading { opacity: 0.6; cursor: wait; }
.tr-btn[disabled] { cursor: wait; }

/* ── Dropzone ── */
#dropzone {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  min-height: calc(100vh - 52px);
  grid-column: 1 / -1;
  gap: 16px;
}
#dropzone.hidden { display: none; }

.drop-box {
  border: 2px dashed var(--border);
  border-radius: 12px;
  padding: 48px 64px;
  text-align: center;
  cursor: pointer;
  transition: border-color 0.2s, background 0.2s;
  background: var(--surface);
}
.drop-box:hover, .drop-box.drag-over { border-color: var(--red); background: var(--red-lt); }
.drop-icon  { font-size: calc(36px * var(--fs-scale)); margin-bottom: 12px; color: var(--border); }
.drop-title { font-family: var(--sans); font-size: calc(16px * var(--fs-scale)); color: var(--ink); margin-bottom: 6px; }
.drop-sub   { font-family: var(--sans); font-size: calc(13px * var(--fs-scale)); color: var(--light); }
#file-input { display: none; }

/* ── Erledigung-Filter-Sektion ── */
#fp-erl-body {
  padding: 4px 0 8px;
}
.fp-section-hdr {
  padding: 8px 16px 4px;
  font-size: calc(11px * var(--fs-scale));
  font-weight: 600;
  letter-spacing: .04em;
  text-transform: uppercase;
  color: var(--light);
}
.fp-erl-item {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 6px 16px;
  font-size: calc(13px * var(--fs-scale));
  font-family: var(--sans);
  cursor: pointer;
  user-select: none;
  transition: background .12s;
}
.fp-erl-item:hover { background: var(--hover, rgba(0,0,0,.04)); }
.fp-erl-item.active { color: var(--accent); font-weight: 500; }
.fp-erl-dot {
  width: 8px; height: 8px;
  border-radius: 50%;
  border: 1.5px solid currentColor;
  flex-shrink: 0;
  transition: background .12s;
}
.fp-erl-item.active .fp-erl-dot { background: currentColor; }

.klammer { color: var(--lighter); }

/* ══ FILTER + NEUHEITEN (index.html) ═══════════════════ */
.fn-wrapper {
  margin-top: 56px;
  width: 100%;
  max-width: 1080px;
  padding: 0 24px;
  display: flex;
  gap: 28px;
  align-items: flex-start;
}

.fp {
  width: 264px;
  flex-shrink: 0;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 10px;
  overflow: hidden;
  position: sticky;
  top: 68px;
  max-height: calc(100vh - 88px);
  overflow-y: auto;
  scrollbar-width: thin;
  scrollbar-color: var(--border) transparent;
}

.fp-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  padding: 13px 16px;
  background: var(--bg);
  border-bottom: 1px solid var(--border);
  position: sticky;
  top: 0;
  z-index: 1;
}

.fp-title {
  font-family: var(--sans);
  font-size: calc(10px * var(--fs-scale));
  font-weight: 700;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--ink);
}

.fp-badge {
  background: var(--red);
  color: #fff;
  font-family: var(--sans);
  font-size: calc(10px * var(--fs-scale));
  font-weight: 600;
  padding: 2px 8px;
  border-radius: 20px;
  white-space: nowrap;
  flex-shrink: 0;
}
.fp-badge.fp-hidden { display: none; }

.fp-reset {
  font-family: var(--sans);
  font-size: calc(10px * var(--fs-scale));
  color: var(--light);
  background: none;
  border: none;
  cursor: pointer;
  padding: 0;
  text-decoration: underline;
  text-underline-offset: 2px;
  white-space: nowrap;
}
.fp-reset:hover { color: var(--red); }

.fp-group { border-bottom: 1px solid var(--border); }
.fp-group:last-child { border-bottom: none; }
#fp-body { border-bottom: 1px solid var(--border); }

.fp-group-head {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 10px 16px;
  cursor: pointer;
  user-select: none;
  transition: background 0.12s;
}
.fp-group-head:hover { background: var(--bg); }

.fp-group-name {
  font-family: var(--sans);
  font-size: calc(12.5px * var(--fs-scale));
  font-weight: 500;
  color: var(--ink);
  flex: 1;
  line-height: 1.3;
}

.fp-group-count {
  font-family: var(--sans);
  font-size: calc(10px * var(--fs-scale));
  color: var(--red);
  font-weight: 600;
  background: var(--red-lt);
  padding: 1px 6px;
  border-radius: 10px;
  display: none;
}
.fp-group-count.visible { display: inline-block; }

.fp-select-all {
  font-family: var(--sans);
  font-size: calc(10px * var(--fs-scale));
  color: var(--red);
  background: none;
  border: none;
  cursor: pointer;
  padding: 0;
  white-space: nowrap;
  opacity: 0;
  transition: opacity 0.15s;
}
.fp-group-head:hover .fp-select-all { opacity: 1; }

.fp-clear-section {
  background: none;
  border: 0;
  padding: 0;
  margin: 0 6px 0 0;
  cursor: pointer;
  width: 16px;
  height: 16px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  opacity: 0.85;
  transition: opacity 0.15s;
}
.fp-clear-section:hover { opacity: 1; }
.fp-clear-section img { width: 14px; height: 14px; display: block; }
.fp-clear-section.fp-hidden { display: none; }


.fp-arrow {
  font-size: calc(9px * var(--fs-scale));
  color: var(--light);
  transition: transform 0.2s;
  flex-shrink: 0;
}
.fp-group.open .fp-arrow { transform: rotate(90deg); }

.fp-items {
  display: none;
  padding: 2px 0 8px;
}
.fp-group.open .fp-items { display: block; }

.fp-item {
  display: flex;
  align-items: flex-start;
  gap: 9px;
  padding: 5px 16px 5px 20px;
  cursor: pointer;
  transition: background 0.1s;
}
.fp-item:hover { background: var(--bg); }

.fp-item input[type="checkbox"] {
  accent-color: var(--red);
  cursor: pointer;
  width: 13px;
  height: 13px;
  flex-shrink: 0;
  margin-top: 1px;
}

.fp-item label {
  font-family: var(--sans);
  font-size: calc(11.5px * var(--fs-scale));
  color: var(--muted);
  cursor: pointer;
  line-height: 1.4;
}

.fn-neuheiten { flex: 1; min-width: 0; }
.neuheiten-table-wrap {
  width: 100%;
  overflow-x: auto;
  border-radius: 10px;
  box-shadow: 0 2px 8px rgba(0,0,0,0.03);
}
.neuheiten-sticky-head {
  position: fixed;
  left: 0;
  top: 52px;
  z-index: 95;
  display: none;
  pointer-events: none;
}
.neuheiten-sticky-head.visible { display: block; }
.neuheiten-sticky-head-inner {
  overflow: hidden;
  border: 1px solid var(--border);
  border-radius: 10px 10px 0 0;
  border-bottom: none;
  background: #eeecea;
}
.neuheiten-sticky-head-table {
  border-collapse: separate;
  border-spacing: 0;
  background: #eeecea;
}
.neuheiten-sticky-head-table th {
  font-family: var(--sans);
  font-size: calc(10px * var(--fs-scale));
  font-weight: 600;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--light);
  padding: 12px 16px;
  text-align: left;
  background: #eeecea;
  border-bottom: 1px solid var(--border);
  white-space: nowrap;
}
.table-scroll-hint {
  display: none;
  font-family: var(--sans);
  font-size: calc(11px * var(--fs-scale));
  color: var(--light);
  margin: 0 0 8px;
}

.fn-header-row {
  width: 100%;
  max-width: 1080px;
  padding: 0 24px;
  margin-top: 56px;
  margin-bottom: 16px;
  display: flex;
  align-items: baseline;
  gap: 12px;
  flex-wrap: wrap;
}

.fn-display-toggle {
  margin-left: auto;
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-family: var(--sans);
  font-size: calc(12px * var(--fs-scale));
  color: var(--light);
}

.fn-display-sep {
  opacity: 0.5;
  user-select: none;
}

.fn-display-btn {
  border: 0;
  background: transparent;
  color: var(--light);
  font: inherit;
  padding: 0;
  cursor: pointer;
  opacity: 0.72;
}

.fn-display-btn:hover { opacity: 1; }
.fn-display-btn.active {
  color: var(--muted);
  opacity: 1;
  font-weight: 600;
}

.fn-no-results {
  display: none;
  text-align: center;
  padding: 48px 32px;
  font-family: var(--sans);
  font-size: calc(13px * var(--fs-scale));
  color: var(--light);
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 10px;
  line-height: 1.7;
}
.fn-no-results strong { color: var(--muted); display: block; margin-bottom: 6px; }

.fp-date-body, .fp-count-body { padding: 10px 16px 14px; }

.fp-date-row {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-bottom: 8px;
}
.fp-date-row:last-child { margin-bottom: 0; }

.fp-date-row label {
  font-family: var(--sans);
  font-size: calc(12px * var(--fs-scale));
  color: var(--light);
  width: 28px;
  flex-shrink: 0;
}

.fp-date-row input[type="date"] {
  flex: 1;
  font-family: var(--sans);
  font-size: calc(12px * var(--fs-scale));
  border: 1px solid var(--border);
  border-radius: 6px;
  padding: 4px 8px;
  background: var(--bg);
  color: var(--ink);
  cursor: pointer;
}

.fp-count-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
}

.fp-count-row label {
  font-family: var(--sans);
  font-size: calc(12px * var(--fs-scale));
  color: var(--light);
}

.fp-count-row select {
  font-family: var(--sans);
  font-size: calc(12px * var(--fs-scale));
  border: 1px solid var(--border);
  border-radius: 6px;
  padding: 4px 8px;
  background: var(--bg);
  color: var(--ink);
  cursor: pointer;
}

@media (max-width: 800px) {
  #topbar {
    height: 48px;
    padding: 0 12px;
  }
  #topbar-inner {
    gap: 10px;
    padding: 0;
  }
  .logo-text {
    font-size: calc(13px * var(--fs-scale));
    letter-spacing: 0.06em;
  }
  .lang-btn {
    font-size: calc(10px * var(--fs-scale));
    padding: 2px 6px;
  }
  .neuheiten-sticky-head {
    top: 48px;
  }
  .neuheiten-sticky-head-table th {
    font-size: calc(9px * var(--fs-scale));
    letter-spacing: 0.06em;
    padding: 8px 8px;
  }

  .hero {
    margin-top: 88px;
    padding: 0 16px;
  }
  .hero-title {
    font-size: calc(34px * var(--fs-scale));
    margin-bottom: 10px;
    max-width: 100%;
  }
  .hero-beta-badge {
    position: static;
    top: auto;
    right: auto;
    transform: none;
    z-index: auto;
    font-size: calc(10px * var(--fs-scale));
    padding: 2px 7px;
    vertical-align: middle;
    margin-left: 6px;
  }
  .hero-subtitle {
    font-size: calc(24px * var(--fs-scale));
    margin-bottom: 28px;
  }
  .search-input {
    font-size: calc(16px * var(--fs-scale));
    padding: 16px 18px;
    padding-right: 56px;
  }

  .fn-wrapper {
    flex-direction: column;
    margin-top: 36px;
    padding: 0 14px;
    gap: 16px;
  }
  .fp {
    width: 100%;
    position: static;
    max-height: none;
  }
  .fn-neuheiten { width: 100%; }
  .neuheiten-table-wrap {
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
  }
  .neuheiten-table {
    min-width: 620px;
  }
  .table-scroll-hint {
    display: block;
  }
  .neuheiten-table thead th,
  .neuheiten-table td {
    padding: 8px 8px;
    font-size: calc(11px * var(--fs-scale));
  }
  .neuheiten-table thead th {
    font-size: calc(9px * var(--fs-scale));
    letter-spacing: 0.06em;
  }
  .td-ref {
    font-size: calc(12px * var(--fs-scale));
    white-space: normal;
  }
  .td-sach .themen-text {
    font-size: calc(10.5px * var(--fs-scale));
    line-height: 1.35;
  }
  .td-date,
  .td-pub {
    white-space: nowrap;
    font-size: calc(10.5px * var(--fs-scale));
  }
  .mini-pill {
    font-size: calc(9px * var(--fs-scale));
    padding: 2px 6px;
    min-height: 17px;
  }
  .about-section {
    margin-top: 72px;
    padding: 28px 20px;
    border-radius: 10px;
  }
}

@media (max-width: 1100px) {
  #layout {
    grid-template-columns: 1fr;
    min-height: auto;
    max-width: 100%;
    box-shadow: none;
    margin-top: 52px;
    padding: 12px;
    gap: 12px;
  }

  #main,
  #sidebar,
  #refpanel {
    position: static;
    top: auto;
    height: auto;
    overflow: visible;
    border: 1px solid var(--border);
    border-radius: 10px;
    background: var(--surface);
  }

  #main {
    order: 1;
    padding: 32px 22px 36px;
    align-items: stretch;
  }
  #main > * {
    max-width: none;
  }

  #sidebar {
    order: 2;
    border-right: 1px solid var(--border);
    padding: 18px 16px;
  }

  #refpanel {
    order: 3;
    border-left: 1px solid var(--border);
    padding: 18px 16px;
    margin-bottom: 72px;
  }

  nav {
    display: flex;
    gap: 8px;
    overflow-x: auto;
    padding-bottom: 4px;
    scrollbar-width: thin;
  }
  .nav-item {
    width: auto;
    flex: 0 0 auto;
    white-space: nowrap;
    border: 1px solid var(--border);
  }

  .urteil-titel {
    margin-bottom: 30px;
  }
  .section-block {
    margin-bottom: 44px;
  }
}

@media (max-width: 700px) {
  #layout {
    margin-top: 48px;
    padding: 8px;
    gap: 8px;
  }

  #main {
    padding: 20px 14px 28px;
  }
  .urteil-titel {
    font-size: calc(19px * var(--fs-scale));
    margin-bottom: 22px;
  }
  .section-head {
    font-size: calc(9px * var(--fs-scale));
    letter-spacing: 0.12em;
    margin-bottom: 16px;
    padding-bottom: 8px;
  }

  .abschnitt {
    margin-bottom: 20px;
  }
  .abschnitt-text,
  .disp-text {
    font-size: calc(14px * var(--fs-scale));
    line-height: 1.7;
  }
  .abschnitt[data-depth="2"] {
    padding-left: 12px;
  }
  .abschnitt[data-depth="3"] {
    padding-left: 24px;
  }

  .meta-block {
    margin-bottom: 16px;
  }
  .meta-value,
  .richter-item {
    font-size: calc(12px * var(--fs-scale));
  }

  .ref-chip {
    font-size: calc(11px * var(--fs-scale));
    padding: 4px 8px;
  }

  footer {
    position: static;
  }
  .footer-inner {
    padding: 14px 16px;
    flex-wrap: wrap;
    gap: 8px 14px;
    justify-content: center;
    text-align: center;
  }
  .footer-right {
    flex-wrap: wrap;
    justify-content: center;
  }
  body.page-centered {
    padding-bottom: 18px;
  }
}

/* ══ ABOUT / API PAGE (about.html) ══════════════════════ */
.api-endpoint { margin-bottom: 36px; }

.api-method {
  display: inline-block;
  font-family: monospace;
  font-size: calc(12px * var(--fs-scale));
  font-weight: 700;
  background: var(--red);
  color: #fff;
  padding: 2px 8px;
  border-radius: 4px;
  margin-right: 8px;
  vertical-align: middle;
  letter-spacing: 0.04em;
}
.api-method.get  { background: #2e7d32; }
.api-method.post { background: #1565c0; }

.api-path {
  font-family: monospace;
  font-size: calc(15px * var(--fs-scale));
  font-weight: 600;
  color: var(--ink);
  vertical-align: middle;
}

.api-desc {
  margin-top: 8px;
  font-size: calc(14px * var(--fs-scale));
  color: var(--muted);
  line-height: 1.7;
}

.api-params { margin-top: 10px; font-size: calc(13px * var(--fs-scale)); color: var(--muted); }

.api-params table {
  width: 100%;
  border-collapse: collapse;
  margin-top: 8px;
}

.api-params th {
  font-family: var(--sans);
  font-size: calc(11px * var(--fs-scale));
  font-weight: 600;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--light);
  text-align: left;
  padding: 6px 10px;
  background: #f5f4f1;
  border: 1px solid var(--border);
}

.api-params td {
  font-size: calc(13px * var(--fs-scale));
  padding: 7px 10px;
  border: 1px solid var(--border);
  vertical-align: top;
  line-height: 1.5;
}

.api-params td:first-child {
  font-family: monospace;
  font-size: calc(12px * var(--fs-scale));
  color: var(--red);
  white-space: nowrap;
}

pre.api-example {
  background: #f5f4f1;
  border: 1px solid var(--border);
  border-radius: 6px;
  padding: 14px 16px;
  font-family: monospace;
  font-size: calc(12.5px * var(--fs-scale));
  line-height: 1.6;
  color: var(--ink);
  overflow-x: auto;
  margin-top: 10px;
  white-space: pre;
}

.api-example-label {
  font-size: calc(11px * var(--fs-scale));
  font-weight: 600;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--light);
  margin-top: 12px;
  margin-bottom: 4px;
}

.api-divider { border: none; border-top: 1px solid var(--border); margin: 32px 0; }

.api-note {
  background: #f9f0f0;
  border-left: 3px solid var(--red);
  padding: 10px 14px;
  font-size: calc(13px * var(--fs-scale));
  color: var(--muted);
  border-radius: 0 6px 6px 0;
  margin-top: 10px;
  line-height: 1.6;
}

/* ══ LOADING OVERLAY ════════════════════════════════════ */
#loading-overlay {
  display: flex;
  align-items: center;
  justify-content: center;
  min-height: 60vh;
}
#loading-overlay.hidden { display: none; }
.loading-box {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 18px;
  color: var(--muted);
  font-family: var(--sans);
  font-size: 14px;
}
.loading-spinner {
  width: 36px;
  height: 36px;
  border: 3px solid var(--border);
  border-top-color: var(--red);
  border-radius: 50%;
  animation: spin 0.8s linear infinite;
}
@keyframes spin { to { transform: rotate(360deg); } }

/* ══ DRUCKLAYOUT ════════════════════════════════════════ */
@media print {

  /* Alles ausblenden ausser main */
  #topbar, #sidebar, #refpanel, footer, #loading-overlay { display: none !important; }

  /* Layout zurücksetzen: main nimmt die ganze Seite */
  #layout {
    display: block !important;
    max-width: 100%;
    box-shadow: none;
  }

  #main {
    display: block !important;
    max-width: 600px !important;
    width: 600px !important;
    margin: 0 auto !important;
    padding: 0 !important;
    font-family: var(--serif);
  }

  #main > * {
    max-width: 600px !important;
    width: 600px !important;
  }

  /* Zwischentitel Sachverhalt / Erwägungen / Dispositiv */
  .section-head {
    display: block !important;
    font-family: var(--serif);
    font-size: calc(11pt * var(--fs-scale));
    font-weight: 700;
    color: #000;
    letter-spacing: 0;
    text-transform: none;
    border-bottom: 0.5pt solid #000;
    padding-bottom: 4pt;
    margin-bottom: 12pt;
    margin-top: 24pt;
  }

  /* Seitenränder */
  @page {
    margin: 2.5cm 2.8cm 2.5cm 2.8cm;
    orphans: 3;
    widows: 3;
  }

  /* Haupttitel */
  .urteil-titel {
    font-family: var(--serif);
    font-size: calc(16pt * var(--fs-scale));
    font-weight: 700;
    color: #000;
    margin-bottom: 6pt;
    border-bottom: 1pt solid #000;
    padding-bottom: 6pt;
  }

  /* Abschnitte */
  .section-block {
    margin-bottom: 18pt;
  }

  /* Abschnitts-ID (Nummerierung) */
  .abschnitt-id {
    font-family: var(--serif);
    font-size: calc(9pt * var(--fs-scale));
    font-weight: 700;
    color: #000;
    letter-spacing: 0;
    margin-bottom: 3pt;
    page-break-after: avoid;
    break-after: avoid;
  }

  /* Fliesstext */
  .abschnitt-text {
    font-family: var(--serif);
    font-size: calc(10.5pt * var(--fs-scale));
    line-height: 1.65;
    color: #000;
    text-align: justify;
    hyphens: auto;
    margin: 0 0 7pt;
  }
  .abschnitt-text:last-child { margin-bottom: 0; }

  .abschnitt {
    margin-bottom: 10pt;
  }

  /* Klammer-Text im Druck nicht grau */
  .klammer { color: #000; }

  /* Dispositiv */
  .disp-punkt {
    margin-bottom: 8pt;
    page-break-inside: avoid;
  }
  .disp-nr {
    font-family: var(--serif);
    font-size: calc(10.5pt * var(--fs-scale));
    font-weight: 700;
    color: #000;
    min-width: 18pt;
  }
  .disp-text {
    font-family: var(--serif);
    font-size: calc(10.5pt * var(--fs-scale));
    line-height: 1.65;
    color: #000;
  }

  /* Seitenmarker ausblenden */
  .page-marker { display: none; }

  /* Regeste */
  .regeste-main {
    border-left: 2pt solid #999;
    padding: 6pt 10pt;
    margin-bottom: 14pt;
    background: none;
  }
  .regeste-main-titel {
    font-size: calc(8pt * var(--fs-scale));
    font-weight: 700;
    letter-spacing: 0.08em;
    text-transform: uppercase;
    color: #555;
    margin-bottom: 4pt;
  }
  .regeste-main-text {
    font-family: var(--serif);
    font-size: calc(9.5pt * var(--fs-scale));
    line-height: 1.55;
    color: #222;
  }

  /* Links schlicht */
  a { color: #000; text-decoration: none; }
  .lnk-bge, .lnk-bger, .lnk-law, .lnk-erw {
    color: #000;
    text-decoration: none;
    border-bottom: none;
  }

  /* Keine Animationen */
  * { animation: none !important; transition: none !important; }
}
/* ════════════════════════════════════════════════════════
   GESETZ PHASE 2 — MCP-Anreicherung
   ════════════════════════════════════════════════════════ */
.gesetz-section {
  margin-bottom: 28px;
  border-bottom: 1px solid var(--border);
  padding-bottom: 24px;
}
.gesetz-section:last-child { border-bottom: none; }
.gesetz-details-section {
  margin-bottom: 16px;
  border: 1px solid var(--border);
  border-radius: 6px;
}
.gesetz-details-summary {
  font-size: 13px;
  font-weight: 600;
  padding: 12px 16px;
  cursor: pointer;
  user-select: none;
  list-style: none;
  display: flex;
  align-items: center;
  gap: 8px;
}
.gesetz-details-summary::-webkit-details-marker { display: none; }
.gesetz-details-summary::before {
  content: '▶';
  font-size: 9px;
  transition: transform .15s;
  display: inline-block;
}
.gesetz-details-section[open] > .gesetz-details-summary::before { transform: rotate(90deg); }
.gesetz-details-section .gesetz-section-body { padding: 0 16px 16px; }
.gesetz-source-badge {
  font-size: 11px;
  font-weight: 400;
  color: var(--light);
  background: var(--bg);
  border: 1px solid var(--border);
  border-radius: 10px;
  padding: 1px 7px;
  margin-left: 4px;
}
.gesetz-skeleton {
  color: var(--light);
  font-family: var(--sans);
  font-size: 13px;
  padding: 12px 0;
}
.gesetz-unavail {
  color: var(--light);
  font-family: var(--sans);
  font-size: 13px;
  font-style: italic;
}
.gesetz-law-title {
  font-family: var(--sans);
  font-size: 13px;
  color: var(--light);
  margin-bottom: 8px;
}
.gesetz-art-heading {
  font-family: var(--serif);
  font-weight: 700;
  font-size: 15px;
  margin: 12px 0 6px;
}
.gesetz-art-text {
  font-family: var(--serif);
  font-size: calc(15px * var(--fs-scale));
  line-height: 1.85;
  color: var(--ink);
}
.gesetz-mat-block { margin-bottom: 20px; }
.gesetz-mat-block h4 {
  font-family: var(--sans);
  font-size: 12px;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: .04em;
  color: var(--light);
  margin-bottom: 6px;
}
.gesetz-mat-text {
  font-family: var(--sans);
  font-size: 13px;
  line-height: 1.7;
  color: var(--ink);
  max-height: 400px;
  overflow-y: auto;
}
.gesetz-mat-source {
  font-size: 11px;
  color: var(--light);
  margin-top: 8px;
  font-family: var(--sans);
}
.gesetz-mat-date {
  font-weight: 400;
  font-size: 11px;
  color: var(--light);
  margin-left: 4px;
}
.gesetz-mat-author {
  display: block;
  font-family: var(--sans);
  font-size: 11px;
  font-weight: 600;
  color: var(--light);
  margin-bottom: 4px;
}

/* ── Kommentar (OnlineKommentar.ch) ─────────────────────────────────────── */
.gesetz-k-ref {
  font-family: var(--sans);
}
.gesetz-k-cite-main {
  font-size: 13px;
  color: var(--ink);
  margin-bottom: 6px;
  font-style: italic;
}
.gesetz-hist-table {
  width: 100%;
  border-collapse: collapse;
  font-family: var(--sans);
  font-size: 13px;
}
.gesetz-hist-table th {
  text-align: left;
  padding: 6px 12px;
  background: var(--bg);
  border-bottom: 1px solid var(--border);
  font-weight: 600;
  font-size: 11px;
  text-transform: uppercase;
  letter-spacing: .04em;
  color: var(--light);
}
.gesetz-hist-table td { padding: 6px 12px; border-bottom: 1px solid #f0f0f0; }
.gesetz-hist-date { color: var(--light); white-space: nowrap; width: 120px; }

/* ── Gesetz Wortlaut — strukturierte Darstellung ─────────────────────────── */
.gesetz-abs {
  position: relative;
  padding-left: 1.6em;
  margin-bottom: 0.9em;
  font-family: var(--serif);
  font-size: calc(15px * var(--fs-scale));
  line-height: 1.85;
  color: var(--ink);
}
.gesetz-absnum {
  position: absolute;
  left: 0;
  top: 0.18em;
  font-size: 0.65em;
  font-family: var(--sans);
  color: var(--light);
  line-height: 1;
}
.gesetz-litlist {
  margin: 0.5em 0 0;
  padding-left: 2em;
  list-style: none;
}
.gesetz-lititem {
  display: grid;
  grid-template-columns: 1.6em 1fr;
  gap: 0 0.25em;
  margin-bottom: 0.45em;
  align-items: baseline;
}
.gesetz-lit-letter {
  font-size: 1em;
  color: var(--ink);
}
.gesetz-lit-body {
  display: block;
}
.gesetz-litlist-sub {
  margin-top: 0.4em;
  padding-left: 1.6em;
}
.gesetz-subitem {
  grid-template-columns: 1.8em 1fr;
  margin-bottom: 0.35em;
}
.gesetz-annotation {
  display: block;
  font-size: 11px;
  color: var(--light);
  font-family: var(--sans);
  font-style: italic;
  line-height: 1.4;
  margin-bottom: 3px;
}

/* Gesetz Wortlaut — Fussnoten */
.gesetz-fn-ref {
  font-size: 0.65em;
  line-height: 0;
  vertical-align: super;
  font-family: var(--sans);
  color: var(--light);
}
.gesetz-fn-list {
  margin-top: 20px;
  padding: 12px 0 0;
  border-top: 1px solid var(--border);
  list-style: none;
  padding-left: 0;
}
.gesetz-fn-item {
  font-size: 11px;
  font-family: var(--sans);
  color: var(--light);
  line-height: 1.5;
  margin-bottom: 4px;
  display: grid;
  grid-template-columns: 1.4em 1fr;
  gap: 0 0.2em;
}
.gesetz-fn-item > sup {
  padding-top: 1px;
  font-size: 0.8em;
}

/* ── Gesetz Leitentscheide ───────────────────────────────────────────────── */
.gesetz-lc-group { display: flex; flex-direction: column; gap: 8px; }
.gesetz-lc-card {
  display: block;
  padding: 12px 14px;
  border: 1px solid var(--border);
  border-radius: 6px;
  background: var(--bg);
  text-decoration: none;
  color: inherit;
  transition: border-color .15s, background .15s;
}
a.gesetz-lc-card:hover { border-color: var(--red); background: #fdf8f8; }
.gesetz-lc-citation {
  font-family: var(--sans);
  font-weight: 600;
  font-size: 13px;
  color: var(--red);
}
a.gesetz-lc-card .gesetz-lc-citation { color: var(--red); }
.gesetz-lc-meta {
  font-family: var(--sans);
  font-size: 11px;
  color: var(--light);
  margin-top: 2px;
}
.gesetz-lc-regeste {
  font-family: var(--serif);
  font-size: 13px;
  color: var(--ink);
  margin-top: 6px;
  line-height: 1.6;
  display: -webkit-box;
  -webkit-line-clamp: 3;
  -webkit-box-orient: vertical;
  overflow: hidden;
}
.gesetz-lc-sep {
  font-family: var(--sans);
  font-size: 11px;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: .06em;
  color: var(--light);
  margin: 16px 0 6px;
}
.gesetz-lc-row {
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  gap: 8px;
  padding: 7px 12px;
  border: 1px solid var(--border);
  border-radius: 5px;
  background: var(--bg);
  text-decoration: none;
  color: inherit;
  transition: border-color .15s;
}
.gesetz-lc-row:hover { border-color: var(--red); }
.gesetz-lc-docket {
  font-family: var(--sans);
  font-size: 13px;
  font-weight: 600;
  color: var(--red);
  white-space: nowrap;
}
.gesetz-lc-row-meta {
  font-family: var(--sans);
  font-size: 11px;
  color: var(--light);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
