/* =====================================================================
   bger-update — Editorial Theme
   Farbpalette der Rechtsgebiete bewusst beibehalten:
     Strafrecht       → grün
     Öffentl. Recht   → blau
     Zivilrecht       → gelb
     Sozialrecht      → rot
   ===================================================================== */

:root {
  --ink:    #1a1a1a;
  --ink-2:  #333333;
  --paper:  #faf7f2;
  --paper-2:#f3ede2;
  --rule:   #d9d3c7;
  --hair:   #ece6d8;
  --muted:  #6b6357;
  --accent: #8b1a1a;       /* dunkles Bordeaux, sparsam */

  --straf: #00b87a;
  --oeff:  #2f8fd6;
  --ziv:   #d4b800;
  --soz:   #d6394d;

  --straf-soft: rgba(0, 184, 122, 0.16);
  --oeff-soft:  rgba(47, 143, 214, 0.14);
  --ziv-soft:   rgba(212, 184, 0, 0.22);
  --soz-soft:   rgba(214, 57, 77, 0.14);
}

* { box-sizing: border-box; }

body {
  font-family: 'Inter', sans-serif;
  background: var(--paper);
  color: var(--ink);
  font-size: 15px;
  line-height: 1.55;
}

a { color: var(--ink); text-decoration: none; }
a:hover { text-decoration: underline; }

/* ---------- Container override für Editorial-Breite ---------- */
.container-fluid {
  max-width: 1240px;
  margin: 0 auto;
  padding: 28px 36px 80px;
}

/* =====================================================================
   Masthead (Block "titel")
   ===================================================================== */
.titel {
  font-family: 'Fraunces', 'Outfit', serif;
  background: transparent;
  border: none;
  border-top: 4px double var(--ink);
  border-bottom: 1px solid var(--ink);
  border-radius: 0;
  box-shadow: none;
  padding: 18px 0 14px;
  margin-bottom: 0;
}

.titel h3 {
  font-family: 'Fraunces', 'Outfit', serif;
  font-weight: 800;
  font-size: 30px;
  letter-spacing: -0.02em;
  margin: 0 0 6px;
  color: var(--ink);
  line-height: 1.15;
}

.titel h3 a {
  color: inherit;
  text-decoration: none;
}

.titel h3 a:hover {
  text-decoration: none;
}

.update-info {
  font-family: 'Inter', sans-serif;
  font-size: 12.5px;
  color: var(--muted);
  margin: 0;
  line-height: 1.55;
}

/* Lede-Block */
.lede {
  display: grid;
  grid-template-columns: 2fr 1fr;
  gap: 36px;
  padding: 22px 0 24px;
  border-bottom: 1px solid var(--rule);
}
.lede h2 {
  font-family: 'Fraunces', serif;
  font-size: 24px; font-weight: 600;
  margin: 0;
  letter-spacing: -0.01em;
  line-height: 1.2;
}
.lede p { margin: 8px 0 0; color: var(--muted); font-size: 14px; }

.statbox {
  display: grid; grid-template-columns: repeat(2, 1fr);
  gap: 14px 24px;
  border-left: 1px solid var(--rule);
  padding-left: 24px;
}
.statbox .num {
  font-family: 'Fraunces', serif;
  font-size: 28px; font-weight: 800; line-height: 1;
}
.statbox .lbl {
  font-size: 10.5px; text-transform: uppercase;
  letter-spacing: 0.12em; color: var(--muted); margin-top: 4px;
}

/* =====================================================================
   Disclaimer / Hinweis
   ===================================================================== */
.alert {
  background: var(--paper-2);
  border: 1px solid var(--rule);
  border-radius: 0;
  font-size: 12.5px;
  margin: 14px 0 0;
  padding: 10px 14px;
  color: var(--muted);
}
.alert a, .alert .alert-link { color: var(--ink); border-bottom: 1px solid var(--rule); }

/* =====================================================================
   Menu (legacy includes/menu.html)
   ===================================================================== */
.menu {
  font-size: 13px;
  margin: 18px 0 24px;
  color: var(--muted);
}
.menu p { margin-bottom: 6px; }
.menu-link {
  border: 1px solid var(--ink);
  border-radius: 0;
  padding: 2px 8px;
  font-family: 'Inter', sans-serif;
  font-size: 12px;
  color: var(--ink);
  text-decoration: none;
}
.menu-link:hover { background: var(--ink); color: var(--paper); text-decoration: none; }

/* =====================================================================
   Editorial: Rechtsgebiet-Sektionen mit Karten
   ===================================================================== */
.ed-sections { margin-top: 28px; display: flex; flex-direction: column; gap: 36px; }

/* Anzeige-Steuerung (Reihenfolge / sichtbare Kategorien / Karten vs. Tabelle) */
.ed-controls {
  margin-top: 22px;
  border: 1px solid var(--rule);
  background: var(--paper, #faf6ee);
  font-size: 13px;
}
.ed-controls > details > summary {
  cursor: pointer;
  padding: 8px 12px;
  font-weight: 600;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  font-size: 12px;
  color: var(--muted);
  list-style: none;
}
.ed-controls > details > summary::-webkit-details-marker { display: none; }
.ed-controls > details > summary::before { content: "▸ "; display: inline-block; transition: transform 0.15s; }
.ed-controls > details[open] > summary::before { content: "▾ "; }
.ed-controls-body { padding: 10px 14px 14px; border-top: 1px solid var(--rule); }
.ed-controls-hint { color: var(--muted); margin: 0 0 10px; font-size: 12px; }
.ed-controls-list { list-style: none; padding: 0; margin: 0; display: flex; flex-direction: column; gap: 6px; }
.ed-controls-list li {
  display: flex; align-items: center; gap: 10px;
  padding: 6px 8px; border: 1px solid var(--rule); background: #fff;
}
.ed-controls-list li.is-hidden { opacity: 0.55; }
.ed-controls-list button {
  border: 1px solid var(--rule); background: #fff; padding: 2px 8px;
  font: inherit; cursor: pointer;
}
.ed-controls-list button:hover { background: var(--ink); color: #fff; }
.ed-ctrl-vis { display: flex; align-items: center; gap: 8px; flex: 1; cursor: pointer; }
.ed-ctrl-vis .dot { width: 10px; height: 10px; border-radius: 50%; display: inline-block; }
.ed-ctrl-vis .dot-straf { background: var(--straf); }
.ed-ctrl-vis .dot-oeff  { background: var(--oeff); }
.ed-ctrl-vis .dot-ziv   { background: var(--ziv); }
.ed-ctrl-vis .dot-soz   { background: var(--soz); }
.ed-ctrl-view-group { display: inline-flex; }
.ed-ctrl-view-group .ed-ctrl-view { border-right: none; }
.ed-ctrl-view-group .ed-ctrl-view:last-child { border-right: 1px solid var(--rule); }
.ed-ctrl-view[aria-pressed="true"] { background: var(--ink); color: #fff; }
.ed-ctrl-reset { margin-top: 10px; border: 1px solid var(--rule); background: #fff; padding: 4px 10px; cursor: pointer; font: inherit; }
.ed-ctrl-reset:hover { background: var(--ink); color: #fff; }

/* Sektion: Karten- vs. Tabellen-Ansicht */
.ed-section[data-view="cards"] .ed-view-table { display: none; }
.ed-section[data-view="table"] .ed-view-cards { display: none; }
.ed-section[data-view="table"] .ed-view-table { display: block; overflow-x: auto; }
.ed-section[data-view="table"] .ed-view-table table { font-size: 12px; }
.ed-section.is-hidden { display: none; }

/* Einzelrichter-Entscheide: standardmässig ausgegraut */
.ed-case[data-einzelrichter="true"] { opacity: 0.5; filter: grayscale(0.5); }
.ed-case[data-einzelrichter="true"] .num a { box-shadow: none; }
.ed-section[data-view="table"] tr[data-einzelrichter="true"] { opacity: 0.5; }

/* Vollständig ausgeblendet, wenn der Toggle gesetzt ist */
#ed-sections.hide-einzelrichter .ed-case[data-einzelrichter="true"],
#ed-sections.hide-einzelrichter tr[data-einzelrichter="true"] { display: none; }

.ed-ctrl-toplevel { display: flex; align-items: center; gap: 8px; margin-bottom: 10px; cursor: pointer; }

.ed-section-h {
  display: flex; align-items: baseline; gap: 14px;
  border-bottom: 1px solid var(--ink);
  padding-bottom: 6px; margin-bottom: 0;
}
.ed-section-h .dot {
  width: 11px; height: 11px; border-radius: 50%; flex: 0 0 auto;
}
.ed-section-h h3 {
  font-family: 'Fraunces', serif; font-weight: 800;
  font-size: 17px; text-transform: uppercase;
  letter-spacing: 0.1em; margin: 0; color: var(--ink);
}
.ed-section-h .count {
  color: var(--muted); font-size: 11.5px; margin-left: auto;
  font-variant: small-caps; letter-spacing: 0.1em;
}

.ed-section.straf .dot { background: var(--straf); }
.ed-section.oeff  .dot { background: var(--oeff); }
.ed-section.ziv   .dot { background: var(--ziv); }
.ed-section.soz   .dot { background: var(--soz); }

.ed-cases {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 0;
}

.ed-case {
  position: relative;
  padding: 16px 22px 18px;
  border-bottom: 1px solid var(--rule);
  border-right: 1px solid var(--rule);
}
.ed-case:nth-child(2n) { border-right: none; }
.ed-case:nth-last-child(-n+1) { border-bottom: none; }
.ed-cases .ed-case:nth-last-child(2):nth-child(odd),
.ed-cases .ed-case:last-child { border-bottom: none; }

.ed-case .row1 {
  display: flex; gap: 10px; align-items: baseline; flex-wrap: wrap;
}
.ed-case .num {
  font-family: 'Fraunces', serif; font-weight: 800;
  font-size: 17px; letter-spacing: -0.01em;
}
.ed-case .num a {
  color: var(--ink); text-decoration: none;
  border-bottom: 1px solid currentColor;
}
.ed-case.straf .num a { box-shadow: inset 0 -8px 0 var(--straf-soft); }
.ed-case.oeff  .num a { box-shadow: inset 0 -8px 0 var(--oeff-soft); }
.ed-case.ziv   .num a { box-shadow: inset 0 -9px 0 var(--ziv-soft); }
.ed-case.soz   .num a { box-shadow: inset 0 -8px 0 var(--soz-soft); }

.ed-case .lang {
  font-size: 10px; text-transform: uppercase;
  color: var(--muted); letter-spacing: 0.1em;
  border: 1px solid var(--rule); padding: 1px 6px;
}
.ed-case .pub {
  margin-left: auto;
  font-size: 10px; color: var(--accent); font-weight: 700;
  letter-spacing: 0.12em; text-transform: uppercase;
  border: 1px solid var(--accent); padding: 1px 6px;
}
.ed-case .bes5 {
  font-size: 10px; font-weight: 700;
  letter-spacing: 0.12em; text-transform: uppercase;
  border: 1px solid var(--ink); padding: 1px 6px; color: var(--ink);
}

.ed-case h4 {
  font-family: 'Fraunces', serif; font-weight: 600;
  font-size: 16.5px; margin: 8px 0 8px;
  line-height: 1.3; color: var(--ink);
}

.ed-case .meta {
  font-size: 12px; color: var(--muted);
  display: flex; gap: 14px 18px; flex-wrap: wrap;
}
.ed-case .meta b { color: var(--ink); font-weight: 600; }
.ed-case .meta .verdict-G { color: #066b46; font-weight: 700; }

.ed-case .summary-link {
  display: inline-block; margin-top: 10px; font-size: 12px;
  color: var(--accent); text-decoration: none;
  border-bottom: 1px solid currentColor;
  font-variant: small-caps; letter-spacing: 0.06em;
}
.ed-case .summary-link:hover { text-decoration: none; color: var(--ink); }

/* =====================================================================
   Legacy table (Wochensicht, ältere Veröffentlichungen, Publikationen)
   ===================================================================== */
table {
  font-size: 0.78rem !important;
  background: #fff;
  border: 1px solid var(--rule);
  border-collapse: collapse;
  width: 100%;
}
table th {
  text-align: left; padding: 8px 10px;
  background: var(--paper-2);
  font-family: 'Inter', sans-serif; font-weight: 600;
  border-bottom: 1px solid var(--rule);
  color: var(--ink-2);
}
table td { padding: 8px 10px; vertical-align: top; border-bottom: 1px solid var(--hair); }
tr:nth-child(even) { background-color: #fbf8f1; }
tr:hover { background-color: #f0e6d3; }

/* Rechtsgebiets-Farben in Tabelle (legacy) */
.straf-1b { background: rgba(0, 184, 122, 0.45); }
.straf-6b { background: rgba(0, 184, 122, 0.45); }
.oeff-1   { background: rgba(120, 190, 245, 0.50); }
.oeff-2   { background: rgba(75, 172, 246, 0.50); }
.ziv-4    { background: rgba(235, 246, 75, 0.30); }
.ziv-5    { background: rgba(235, 246, 75, 0.40); }
.soz-8    { background: rgba(246, 75, 89, 0.25); }
.soz-9    { background: rgba(246, 54, 69, 0.30); }

.hervorhebung   { background: blanchedalmond; }
.luzern-bezug   { background: rgba(92, 92, 190, 0.2); }
.classic-straf-1b { background: lightblue; }
.classic-straf-6b { background: rgb(0, 220, 130); }
.grayout {
  opacity: 0.6;
  filter: alpha(opacity = 60);
}

/* =====================================================================
   Zusammenfassungsseite — Editorial Article
   ===================================================================== */
.zus-kicker {
  font-size: 11.5px; text-transform: uppercase;
  letter-spacing: 0.18em; color: var(--accent); font-weight: 700;
  margin-top: 6px;
}
.zus-title {
  font-family: 'Fraunces', serif; font-weight: 800;
  font-size: 38px; line-height: 1.12; letter-spacing: -0.02em;
  margin: 8px 0 14px; max-width: 880px; color: var(--ink);
}
.zus-byline {
  font-size: 13px; color: var(--muted);
  border-bottom: 1px solid var(--rule);
  padding-bottom: 14px; margin-bottom: 0;
  display: flex; gap: 14px 22px; flex-wrap: wrap;
}
.zus-byline span b { color: var(--ink); font-weight: 600; }
.zus-byline .pub-tag {
  display: inline-block; padding: 2px 8px;
  font-size: 10.5px; letter-spacing: 0.14em;
  text-transform: uppercase; font-weight: 700;
  color: var(--accent); border: 1px solid var(--accent);
}

.zus-area-marker {
  display: inline-block; width: 9px; height: 9px;
  border-radius: 50%; margin-right: 8px; vertical-align: middle;
}
.zus-area-marker.straf { background: var(--straf); }
.zus-area-marker.oeff  { background: var(--oeff); }
.zus-area-marker.ziv   { background: var(--ziv); }
.zus-area-marker.soz   { background: var(--soz); }

.zus-grid {
  display: grid;
  grid-template-columns: 220px minmax(0, 1fr) 220px;
  gap: 36px;
  align-items: start;
  margin-top: 28px;
}

.zus-rail {
  font-size: 12.5px; color: var(--muted);
  position: sticky; top: 16px;
}
.zus-rail h5 {
  font-family: 'Fraunces', serif; font-size: 11px;
  text-transform: uppercase; letter-spacing: 0.14em;
  color: var(--ink); margin: 0 0 10px;
  border-bottom: 1px solid var(--ink); padding-bottom: 6px;
}
.zus-rail ul { list-style: none; padding: 0; margin: 0 0 24px; }
.zus-rail li {
  padding: 5px 0;
  border-bottom: 1px dotted var(--rule);
}
.zus-rail li a { color: var(--muted); text-decoration: none; display: block; }
.zus-rail li a:hover { color: var(--ink); text-decoration: none; }
.zus-rail .stat {
  display: flex; justify-content: space-between;
  padding: 5px 0; border-bottom: 1px dotted var(--rule);
  font-size: 12.5px;
}
.zus-rail .stat span { color: var(--muted); }
.zus-rail .stat b { color: var(--ink); font-weight: 600; }
.zus-rail .actions a {
  display: block; padding: 8px 10px;
  border: 1px solid var(--ink);
  text-align: center; text-decoration: none;
  color: var(--ink); font-size: 12px;
  text-transform: uppercase; letter-spacing: 0.08em;
  margin-bottom: 6px;
}
.zus-rail .actions a.primary {
  background: var(--ink); color: var(--paper);
}
.zus-rail .actions a:hover { text-decoration: none; }

/* =====================================================================
   Markdown-Content / Artikel-Body
   ===================================================================== */
.markdown-content {
  font-family: 'Fraunces', 'Inter', serif;
  font-size: 18px;
  line-height: 1.7;
  color: var(--ink);
  max-width: 720px;
  margin: 0;
  padding: 0;
  background: transparent;
  border-radius: 0;
  box-shadow: none;
}

.markdown-content p { margin: 0 0 1.05em; }

/* H1 in der Markdown-Ausgabe wird ausgeblendet — der Titel steht schon im Artikel-Header.
   Der Metadaten-Absatz unmittelbar danach (Rechtsgebiet/Instanzen/Besetzung/Ausgang)
   bleibt sichtbar, wird aber als Block-Stempel dargestellt. */
.markdown-content > h1 { display: none; }
.markdown-content > h1 + p {
  font-family: 'Inter', sans-serif;
  font-size: 13.5px;
  line-height: 1.7;
  color: var(--ink-2);
  background: var(--paper-2);
  border-left: 3px solid var(--rule);
  padding: 12px 16px;
  margin: 0 0 1.6em;
}
.markdown-content > h1 + p strong { color: var(--ink); }

.markdown-content h1,
.markdown-content h2,
.markdown-content h3,
.markdown-content h4 {
  font-family: 'Fraunces', serif;
  color: var(--ink);
  font-weight: 700; line-height: 1.2;
}

.markdown-content h1 {
  font-size: 1.7rem;
  margin: 1.4em 0 0.6em;
  letter-spacing: -0.015em;
  border-bottom: 2px solid var(--rule);
  padding-bottom: 0.4em;
}
.markdown-content h2 {
  font-size: 1.35rem;
  margin: 2em 0 0.5em;
  letter-spacing: -0.01em;
}
.markdown-content h3 {
  font-size: 1.1rem;
  margin: 1.6em 0 0.4em;
  color: var(--ink-2);
  font-weight: 700;
}
.markdown-content h4 {
  font-size: 1rem;
  margin: 1.4em 0 0.3em;
  color: var(--ink-2);
}

.markdown-content ul,
.markdown-content ol { margin: 0 0 1.2em 1.2em; padding-left: 0.5em; }
.markdown-content li { margin-bottom: 0.5em; }

.markdown-content blockquote {
  border-left: 3px solid var(--accent);
  background: transparent;
  padding: 0.2em 0 0.2em 22px;
  margin: 1.4em 0;
  font-style: italic;
  color: var(--ink);
  border-radius: 0;
}
.markdown-content blockquote::before { content: none; }

.markdown-content code {
  background-color: var(--paper-2);
  color: var(--accent);
  padding: 0.15rem 0.45rem;
  border-radius: 3px;
  font-size: 0.9em;
  font-weight: 500;
}
.markdown-content pre {
  background: var(--ink);
  color: var(--paper);
  padding: 1.2rem 1.4rem;
  border-radius: 4px;
  margin: 1.6rem 0;
  overflow-x: auto;
  font-size: 0.95rem;
}
.markdown-content pre code { background: transparent; color: inherit; padding: 0; }

.markdown-content table {
  width: 100%;
  border: 1px solid var(--rule);
  border-collapse: collapse;
  margin: 1.6rem 0;
  font-size: 0.95rem;
  font-family: 'Inter', sans-serif;
  background: #fff;
}
.markdown-content th {
  background: var(--paper-2);
  padding: 10px 12px;
  border-bottom: 1px solid var(--rule);
  text-align: left;
  font-weight: 700;
  color: var(--ink-2);
}
.markdown-content td {
  padding: 10px 12px;
  border-bottom: 1px solid var(--hair);
  vertical-align: top;
}
.markdown-content tr:last-child td { border-bottom: none; }

.markdown-content hr {
  border: 0;
  border-top: 1px solid var(--rule);
  margin: 2.5rem 0;
}

.markdown-content a {
  color: var(--accent);
  text-decoration: none;
  border-bottom: 1px solid rgba(139, 26, 26, 0.3);
}
.markdown-content a:hover {
  border-bottom-color: var(--accent);
  color: var(--ink);
  text-decoration: none;
}

/* =====================================================================
   Executive Summary — Editorial-Variante
   ===================================================================== */
.executive-summary,
.markdown-content blockquote.executive-summary {
  background: #fffbf2 !important;
  border: 1px solid #e6d9b8 !important;
  border-left: 5px solid var(--accent) !important;
  border-radius: 0 !important;
  padding: 22px 26px !important;
  margin: 0 0 28px !important;
  box-shadow: none !important;
  font-style: normal !important;
  color: var(--ink) !important;
  font-family: 'Inter', sans-serif !important;
  font-size: 14.5px !important;
  line-height: 1.6 !important;
}
.executive-summary::before,
.markdown-content blockquote.executive-summary::before {
  content: none !important;
}
.executive-summary h1,
.executive-summary h2,
.executive-summary h3,
.executive-summary h4,
.markdown-content blockquote.executive-summary h4 {
  font-family: 'Fraunces', serif !important;
  margin: 0 0 12px !important;
  color: var(--accent) !important;
  font-size: 18px !important;
  font-weight: 800 !important;
  text-transform: none !important;
  letter-spacing: -0.005em !important;
  border: none !important;
  padding: 0 !important;
  display: flex !important;
  align-items: center !important;
  gap: 8px !important;
}
.executive-summary h4::before,
.markdown-content blockquote.executive-summary h4::before {
  content: '⚖️';
  font-size: 1.05em;
}
.executive-summary p,
.executive-summary li,
.markdown-content blockquote.executive-summary p,
.markdown-content blockquote.executive-summary li {
  color: var(--ink);
  font-size: 14.5px;
  margin-bottom: 0.5em;
}
.executive-summary ul,
.markdown-content blockquote.executive-summary ul {
  margin: 6px 0 0 1.1em;
  padding: 0;
}
.executive-summary strong,
.markdown-content blockquote.executive-summary strong { color: var(--accent); }
/* Drop cap soll innerhalb der Executive Summary nicht greifen */
.markdown-content blockquote.executive-summary p::first-letter {
  font-size: inherit;
  font-weight: inherit;
  float: none;
  padding: 0;
  color: inherit;
}
/* Defensiv: wenn der Agent versehentlich ein verschachteltes Blockquote (`> >`) oder
   eine Leerzeile innerhalb der Executive Summary produziert, soll das nicht als zweite
   abgehobene Box mit rotem Akzent-Border erscheinen (Fehlerbild "Bedeutung eingerückt"). */
.markdown-content blockquote.executive-summary blockquote {
  border: none !important;
  background: transparent !important;
  padding: 0 !important;
  margin: 0 !important;
  font-style: normal !important;
  color: inherit !important;
}
.markdown-content blockquote.executive-summary blockquote::before {
  content: none !important;
}
.markdown-content blockquote.executive-summary blockquote p,
.markdown-content blockquote.executive-summary blockquote li {
  font-style: normal !important;
  color: var(--ink) !important;
  font-size: 14.5px !important;
}
.markdown-content blockquote.executive-summary ul ul {
  margin: 4px 0 4px 1.1em !important;
}

/* =====================================================================
   Responsive
   ===================================================================== */
@media (max-width: 1024px) {
  .zus-grid { grid-template-columns: 1fr; }
  .zus-rail { position: static; }
  .lede { grid-template-columns: 1fr; }
  .statbox { border-left: none; padding-left: 0; border-top: 1px solid var(--rule); padding-top: 16px; }
}
@media (max-width: 720px) {
  .container-fluid { padding: 18px 18px 60px; }
  .titel h3 { font-size: 24px; }
  .ed-cases { grid-template-columns: 1fr; }
  .ed-case { border-right: none !important; }
  .markdown-content { font-size: 17px; }
  .zus-title { font-size: 28px; }
}
