/* ============================================================
   SIGNIFIKATION – Über die App (/ueber.html)
   Ergänzt static.css um die seitenspezifischen Bausteine:
   Inhaltsverzeichnis, Korpora-Tabelle, Pipeline, Chart, Fußnoten.

   WICHTIG: Diese Regeln standen bis 2026-07-27 als <style>-Block in
   ueber.html und wurden dort seit der CSP-Verschaerfung (3a8429c,
   styleSrc 'self') vom Browser verworfen – die Seite lief in Produktion
   praktisch ohne diese Stile. Nichts hiervon zurueck ins HTML inlinen.
   ============================================================ */

/* ── Korpora-Tabelle ──────────────────────────────────────── */
.korpora-tabelle { width: 100%; border-collapse: collapse; font-size: 0.85rem; margin: 16px 0 12px; }
.korpora-tabelle th { font-family: 'DM Sans', system-ui, sans-serif; font-size: 9px; font-weight: 600; letter-spacing: 0.2em; text-transform: uppercase; color: #8a7f6e; border-bottom: 1.5px solid #d4c9b0; padding: 4px 8px 6px; text-align: left; }
.korpora-tabelle td { padding: 6px 8px; border-bottom: 0.5px solid #e8e2d8; color: #1a1a18; vertical-align: top; }
.korpora-tabelle tr:last-child td { border-bottom: none; }
.korpora-tabelle td:nth-child(3) { white-space: nowrap; }
@media (max-width: 600px) {
  .korpora-tabelle th:nth-child(2),
  .korpora-tabelle td:nth-child(2),
  .korpora-tabelle th:nth-child(4),
  .korpora-tabelle td:nth-child(4) { display: none; }
}
.korpora-tabelle a { color: #9b1c1c; }
.lizenz-tag { display: inline-block; font-size: 0.75em; font-family: 'DM Sans', system-ui, sans-serif; font-weight: 600; letter-spacing: 0.05em; color: #5a5248; background: #f0ede8; padding: 1px 5px; border-radius: 3px; }
/* Erlaeutert die eine Tabellenzeile, die zwei Korpora zusammenfasst (DTA). */
.korpus-hinweis { font-size: 0.8em; font-style: italic; color: #776c5e; white-space: nowrap; }

/* Hinweiszeilen ueber/unter der Tabelle (vorher inline style="") */
.tabellen-hinweis { font-size: 0.82rem; color: #8a7f6e; margin-bottom: 4px; }
.tabellen-fussnote { font-size: 0.78rem; color: #8a7f6e; margin-top: 6px; }
.korpora-tabelle .num { text-align: right; }

/* ── Steckbrief (Kopfapparat unter „Das Projekt") ─────────── */
.steckbrief {
  display: grid;
  grid-template-columns: 116px 1fr;
  gap: 7px 18px;
  margin: 4px 0 18px;
  padding: 14px 0;
  border-top: 0.5px solid #e8e2d8;
  border-bottom: 0.5px solid #e8e2d8;
}
.steckbrief dt {
  font-family: 'DM Sans', system-ui, sans-serif;
  font-size: 9px;
  font-weight: 600;
  letter-spacing: 0.2em;
  text-transform: uppercase;
  color: #8a7f6e;
  padding-top: 4px;
}
.steckbrief dd { font-size: 0.9rem; color: #1a1a18; margin: 0; }
@media (max-width: 600px) {
  .steckbrief { grid-template-columns: 1fr; gap: 0; }
  .steckbrief dt { padding-top: 10px; }
  .steckbrief dt:first-child { padding-top: 0; }
  .steckbrief dd { margin-top: 2px; }
}

/* ── Extraktionspipeline (natives <details>) ──────────────── */
.pipeline { display: flex; flex-direction: column; gap: 4px; margin-bottom: 16px; counter-reset: pipeline-counter; }
.pipeline-step { counter-increment: pipeline-counter; border: 0.5px solid #e8e2d8; border-radius: 4px; background: #faf9f7; }
.pipeline-step summary {
  list-style: none;
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 9px 12px;
  cursor: pointer;
  font-size: 0.93rem;
  color: #1a1a18;
  user-select: none;
}
.pipeline-step summary::-webkit-details-marker { display: none; }
.pipeline-step summary::before {
  content: counter(pipeline-counter);
  flex-shrink: 0;
  font-family: 'DM Sans', system-ui, sans-serif;
  font-size: 9px;
  font-weight: 700;
  color: #9b1c1c;
  background: #f0ede8;
  width: 16px;
  height: 16px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  line-height: 16px;
  text-align: center;
}
.pipeline-step summary::after {
  content: '▸';
  margin-left: auto;
  font-size: 0.7rem;
  color: #8a7f6e;
  transition: transform 0.15s;
}
.pipeline-step[open] summary::after { transform: rotate(90deg); }
.pipeline-step[open] { background: #f7f5f0; }
.pipeline-step[open] summary { border-bottom: 0.5px solid #e8e2d8; }
.pipeline-step-body { padding: 10px 12px 10px 38px; font-size: 0.9rem; color: #1a1a18; line-height: 1.6; }

/* ── Formel ───────────────────────────────────────────────── */
.formula-block { font-family: 'Courier New', Courier, monospace; font-size: 0.88rem; background: #f0ede8; padding: 10px 14px; border-radius: 4px; border-left: 3px solid #d4c9b0; color: #1a1a18; margin: 12px 0; }

/* ── Korpus-Verteilung (Balken + Legende) ─────────────────── */
.korpus-chart-wrap { margin: 16px 0 20px; }
.korpus-bar { display: flex; height: 18px; border-radius: 3px; overflow: hidden; gap: 2px; }
.korpus-seg { height: 100%; transition: opacity 0.15s; }
.korpus-seg:hover { opacity: 0.75; }
.korpus-legend { display: grid; grid-template-columns: 1fr 1fr; gap: 7px 20px; margin: 12px 0 8px; }
.korpus-legend-item { display: flex; align-items: baseline; gap: 7px; font-size: 0.82rem; }
.korpus-dot { display: inline-block; width: 9px; height: 9px; border-radius: 2px; flex-shrink: 0; position: relative; top: 1px; }
.korpus-legend-label { flex: 1; color: #1a1a18; font-family: 'Gentium Plus', serif; }
.korpus-legend-val { font-family: 'DM Sans', system-ui, sans-serif; font-size: 0.75em; color: #8a7f6e; white-space: nowrap; }
.korpus-total { font-family: 'DM Sans', system-ui, sans-serif; font-size: 0.75rem; color: #8a7f6e; text-align: right; margin: 4px 0 0; }
@media (max-width: 600px) {
  .korpus-legend { grid-template-columns: 1fr; }
}

/* ── Seiten-Layout mit Inhaltsverzeichnis ─────────────────── */
.page-layout {
  display: flex;
  align-items: flex-start;
  justify-content: center;
  gap: 48px;
}
.page-toc {
  display: none;
  width: 148px;
  flex-shrink: 0;
  position: sticky;
  top: 32px;
  align-self: flex-start;
  padding-top: 24px;
}
@media (min-width: 940px) { .page-toc { display: block; } }
.toc-heading {
  font-family: 'DM Sans', system-ui, sans-serif;
  font-size: 9px;
  font-weight: 600;
  letter-spacing: 0.25em;
  text-transform: uppercase;
  color: #8a7f6e;
  margin-bottom: 14px;
}
.toc-list {
  list-style: none;
  padding: 0;
  margin: 0;
  display: flex;
  flex-direction: column;
  gap: 0;
}
.toc-list li { padding-left: 0; }
.toc-list li::before { display: none; }
.toc-item a {
  font-family: 'DM Sans', system-ui, sans-serif;
  text-decoration: none;
  display: block;
  line-height: 1.3;
  color: #8a7f6e;
  transition: color 0.15s;
}
.toc-item a:hover { color: #9b1c1c; }
.toc-section a {
  font-size: 9px;
  font-weight: 700;
  letter-spacing: 0.2em;
  text-transform: uppercase;
  color: #5a5248;
  margin-top: 16px;
  padding-bottom: 5px;
  border-bottom: 0.5px solid #e8e2d8;
}
.toc-section:first-child a { margin-top: 0; }
.toc-sub a {
  font-size: 0.78rem;
  padding: 3px 0 3px 8px;
  border-left: 2px solid transparent;
}
.toc-sub a:hover { border-left-color: #c9a84c; }

/* Wrapper innerhalb des Flex-Layouts ohne auto-margins */
.page-layout > .wrapper {
  margin: 0;
  flex: 1 1 auto;
  min-width: 0;
}

/* Abstand vor einem neuen Kapitel-Label (ersetzt <br>-Spacer) */
.section-label.section-break { margin-top: 44px; }

/* ── Fußnoten-Links ───────────────────────────────────────── */
.footnote-ref {
  color: #9b1c1c;
  text-decoration: none;
  font-size: 0.8em;
  vertical-align: super;
  line-height: 0;
}
.footnote-ref:hover { text-decoration: underline; }
.fn-back {
  font-size: 0.78em;
  color: #8a7f6e;
  text-decoration: none;
  margin-left: 5px;
}
.fn-back:hover { color: #9b1c1c; }
.footnotes ol li { margin-bottom: 8px; }

/* ── Dark Mode ────────────────────────────────────────────── */
@media (prefers-color-scheme: dark) {
  .steckbrief { border-top-color: #3a3028; border-bottom-color: #3a3028; }
  .steckbrief dt { color: #8a8070; }
  .steckbrief dd { color: #f0ebe4; }

  .korpora-tabelle th { color: #8a8070; border-bottom-color: #4a3f30; }
  .korpora-tabelle td { color: #f0ebe4; border-bottom-color: #3a3028; }
  .korpora-tabelle a { color: #e05555; }
  .lizenz-tag { color: #c0b8b0; background: #2a2420; }
  .korpus-hinweis { color: #9a9080; }
  .tabellen-hinweis, .tabellen-fussnote { color: #8a8070; }

  .pipeline-step { border-color: #3a3028; background: #221c17; }
  .pipeline-step summary { color: #f0ebe4; }
  .pipeline-step summary::before { color: #e05555; background: #2a2420; }
  .pipeline-step summary::after { color: #8a8070; }
  .pipeline-step[open] { background: #2a2420; }
  .pipeline-step[open] summary { border-bottom-color: #3a3028; }
  .pipeline-step-body { color: #f0ebe4; }
  .pipeline-step-body a { color: #e05555; }

  .formula-block { background: #2a2420; border-left-color: #4a3f30; color: #f0ebe4; }

  .korpus-legend-label { color: #f0ebe4; }
  .korpus-legend-val, .korpus-total { color: #8a8070; }

  .toc-heading { color: #8a8070; }
  .toc-item a { color: #8a8070; }
  .toc-item a:hover { color: #e05555; }
  .toc-section a { color: #c0b8b0; border-bottom-color: #3a3028; }
  .toc-sub a:hover { border-left-color: #c9a84c; }

  .footnote-ref { color: #e05555; }
  .fn-back { color: #8a8070; }
  .fn-back:hover { color: #e05555; }
}
