* { box-sizing: border-box; margin: 0; padding: 0; }
body {
  font-family: Georgia, 'Times New Roman', serif;
  font-size: 17px;
  line-height: 1.8;
  color: #1a1a1a;
  background: #f9f7f4;
}
nav.hauptnav {
  background: #1a1a2e;
  position: sticky;
  top: 0;
  z-index: 100;
  box-shadow: 0 2px 8px rgba(0,0,0,0.3);
}
nav.hauptnav ul {
  list-style: none;
  display: flex;
  flex-wrap: wrap;
  max-width: 1100px;
  margin: 0 auto;
}
nav.hauptnav ul li a {
  display: block;
  color: #ccc;
  text-decoration: none;
  padding: 14px 16px;
  font-family: Arial, sans-serif;
  font-size: 14px;
}
nav.hauptnav ul li a:hover,
nav.hauptnav ul li a.aktiv { background: #e63946; color: #fff; }

.breadcrumb {
  background: #eee;
  padding: 10px 20px;
  font-family: Arial, sans-serif;
  font-size: 13px;
  color: #666;
}
.breadcrumb a { color: #0f3460; text-decoration: none; }
.breadcrumb a:hover { text-decoration: underline; }

.container { max-width: 900px; margin: 0 auto; padding: 30px 20px 60px; }

/* ---- CHRONIK FEED ---- */
.chronik-header { margin-bottom: 24px; }
.chronik-header h1 { font-size: 1.9em; color: #0d1b2a; margin-bottom: 8px; }
.chronik-header p { color: #555; font-size: 0.95em; max-width: 720px; }

.chronik-controls {
  display: flex; flex-wrap: wrap; gap: 10px; align-items: center;
  margin: 20px 0 28px; font-family: Arial, sans-serif;
}
.chip {
  font-size: 13px; padding: 6px 14px; border-radius: 20px;
  border: 1px solid #ccc; background: #fff; color: #333; cursor: pointer;
  user-select: none;
}
.chip.active { background: #0f3460; color: #fff; border-color: #0f3460; }
.chip[data-fall="Fall 2"].active { background: #27ae60; border-color: #27ae60; }
.chip[data-fall="Fall 3"].active { background: #e63946; border-color: #e63946; }
.sort-toggle {
  margin-left: auto; font-size: 13px; color: #0f3460; background: none;
  border: 1px solid #0f3460; border-radius: 20px; padding: 6px 14px; cursor: pointer;
}
.chronik-count { font-family: Arial, sans-serif; font-size: 13px; color: #888; margin-bottom: 16px; }

.zeitleiste { position: relative; padding-left: 24px; border-left: 3px solid #ddd; }
.ereignis-karte {
  position: relative; margin-bottom: 22px; background: #fff;
  border: 1px solid #e5e2da; border-radius: 6px; padding: 16px 20px;
}
.ereignis-karte::before {
  content: ""; position: absolute; left: -31px; top: 22px;
  width: 12px; height: 12px; border-radius: 50%; background: #0f3460;
}
.ereignis-karte[data-fall="Fall 2"]::before { background: #27ae60; }
.ereignis-karte[data-fall="Fall 3"]::before { background: #e63946; }

.ereignis-meta { font-family: Arial, sans-serif; font-size: 12px; color: #888; margin-bottom: 4px; }
.ereignis-titel { font-size: 1.05em; font-weight: bold; color: #0d1b2a; margin-bottom: 6px; }
.ereignis-txt { font-size: 0.95em; color: #333; margin-bottom: 10px; }
.ereignis-link {
  font-family: Arial, sans-serif; font-size: 13px; color: #0f3460;
  text-decoration: none; font-weight: bold;
}
.ereignis-link:hover { text-decoration: underline; }

.badge {
  display: inline-block; font-family: Arial, sans-serif; font-size: 11px;
  font-weight: bold; padding: 3px 10px; border-radius: 12px; margin-right: 6px;
  text-transform: uppercase; letter-spacing: 0.03em;
}
.badge-fall1 { background: #dce7f5; color: #0f3460; }
.badge-fall2 { background: #dcf1e1; color: #1e7a3a; }
.badge-fall3 { background: #fbdcdf; color: #a52834; }
.badge-fall5 { background: #2a1a1a; color: #ff6b6b; }
.badge-review { background: #fff3cd; color: #8a6d00; }
.badge-canonical { background: #dcf1e1; color: #1e7a3a; }

/* ---- DOKUMENT-SEITE (Prokladka) ---- */
.dok-meta { margin-bottom: 10px; }
.dok-datum {
  font-family: 'Courier New', monospace; font-size: 14px; color: #666;
  margin-bottom: 6px; display: block;
}
.dok-titel { font-size: 1.7em; color: #0d1b2a; margin-bottom: 20px; line-height: 1.3; }
.dok-body p { margin-bottom: 16px; }
.dok-kommentar {
  background: #fdf6e9; border-left: 4px solid #f39c12; padding: 16px 20px;
  margin: 24px 0; font-size: 0.95em;
}
.dok-kommentar h2 { font-family: Arial, sans-serif; font-size: 13px; text-transform: uppercase;
  color: #8a6d00; margin-bottom: 8px; letter-spacing: 0.03em; }
.dok-quellen {
  background: #eef3f8; border-left: 4px solid #0f3460; padding: 16px 20px;
  margin: 24px 0; font-size: 0.9em; font-family: Arial, sans-serif; color: #333;
}
.dok-quellen h2 { font-size: 12px; text-transform: uppercase; color: #0f3460; margin-bottom: 8px; letter-spacing: 0.03em;}

.dok-zusammenhang {
  background: #f3eefb; border-left: 4px solid #7c4dff; padding: 16px 20px;
  margin: 24px 0; font-size: 0.9em; font-family: Arial, sans-serif;
}
.dok-zusammenhang h2 { font-size: 12px; text-transform: uppercase; color: #5a2ea6; margin-bottom: 8px; letter-spacing: 0.03em; }
.dok-ziel {
  background: #eafaf1; border-left: 4px solid #16a34a; padding: 16px 20px;
  margin: 24px 0; font-size: 0.9em; font-family: Arial, sans-serif; color: #14532d;
}
.dok-ziel h2 { font-size: 12px; text-transform: uppercase; color: #166534; margin-bottom: 8px; letter-spacing: 0.03em; }
.dok-nav {
  display: flex; justify-content: space-between; font-family: Arial, sans-serif;
  font-size: 13px; margin-top: 40px; padding-top: 20px; border-top: 1px solid #ddd;
}
.dok-nav a { color: #0f3460; text-decoration: none; }
.dok-nav a:hover { text-decoration: underline; }

/* ---- DOK-TABS (mehrere Dokumente pro Ereignis) ---- */
.dok-tabs { margin: 20px 0; }
.dok-tab-nav {
  display: flex; flex-wrap: wrap; gap: 4px; border-bottom: 2px solid #ddd; margin-bottom: 16px;
}
.dok-tab-btn {
  font-family: Arial, sans-serif; font-size: 13px; font-weight: bold; color: #555;
  background: #f2f2f2; border: none; border-radius: 4px 4px 0 0; padding: 10px 16px;
  cursor: pointer;
}
.dok-tab-btn.active { background: #0f3460; color: #fff; }
.dok-tab-content { display: none; }
.dok-tab-content.active { display: block; }

/* ---- DOK-HERKUNFT (Footer: Originaldokument + Versandbestätigung) ---- */
.dok-herkunft {
  margin-top: 30px; padding: 16px 18px; background: #f7f7f2; border-left: 3px solid #0f3460;
  font-family: Arial, sans-serif; font-size: 13px; color: #333;
}
.dok-herkunft h2 { font-size: 12px; text-transform: uppercase; color: #0f3460; margin-bottom: 8px; letter-spacing: 0.03em; }
.dok-herkunft a { color: #0f3460; }

/* ---- GLOSSAR TOOLTIP ---- */
.glossar {
  border-bottom: 1px dotted #0f3460; cursor: help; position: relative;
}
.glossar-popup {
  display: none; position: absolute; bottom: 100%; left: 0; z-index: 50;
  width: 280px; background: #0d1b2a; color: #eee; font-family: Arial, sans-serif;
  font-size: 12.5px; line-height: 1.5; padding: 12px 14px; border-radius: 6px;
  margin-bottom: 8px; box-shadow: 0 4px 14px rgba(0,0,0,0.25);
}
.glossar-popup.open { display: block; }

@media (max-width: 640px) {
  .zeitleiste { padding-left: 16px; }
  .ereignis-karte::before { left: -23px; }
  .sort-toggle { margin-left: 0; }
}
