*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }

:root {
  --braun: #8b7355;
  --hell: #f5f0e8;
  --rand: #d4c9b0;
  --text: #3a2e1e;
  --grau: #6b5d4e;
}

body { font-family: Georgia, serif; color: var(--text); background: #faf8f4; line-height: 1.6; }

/* Navigation */
.site-header { background: var(--braun); padding: 0.75rem 1.5rem; }
.site-nav { max-width: 1100px; margin: 0 auto; }
.site-title { color: #fff; text-decoration: none; font-size: 1.25rem; font-weight: bold; }

.site-main { max-width: 1100px; margin: 2rem auto; padding: 0 1.5rem; }
.site-footer { text-align: center; padding: 2rem; color: var(--grau); font-size: 0.875rem; border-top: 1px solid var(--rand); margin-top: 3rem; }

/* Startseite: Filter + Liste (two-column layout) */
.archiv-layout { display: flex; gap: 2rem; align-items: flex-start; }
.filter-leiste { width: 220px; flex-shrink: 0; background: var(--hell); border: 1px solid var(--rand); padding: 1rem; border-radius: 4px; }
.filter-leiste h2 { font-size: 0.875rem; text-transform: uppercase; letter-spacing: 0.05em; color: var(--grau); margin-bottom: 1rem; }
.filter-gruppe { margin-bottom: 1.25rem; }
.filter-gruppe label { display: block; font-size: 0.875rem; margin-bottom: 0.25rem; color: var(--grau); }
.filter-gruppe input[type="text"],
.filter-gruppe input[type="number"] { width: 100%; border: 1px solid var(--rand); padding: 0.4rem 0.5rem; font-size: 0.875rem; background: #fff; border-radius: 3px; }
.filter-gruppe .jahr-range { display: flex; gap: 0.5rem; align-items: center; font-size: 0.875rem; }
.filter-gruppe input[type="checkbox"] { margin-right: 0.4rem; }
.filter-gruppe .checkbox-label { display: flex; align-items: center; font-size: 0.875rem; margin-bottom: 0.2rem; cursor: pointer; }

/* Document list */
.dokument-liste { flex: 1; }
.dokument-karte { border: 1px solid var(--rand); background: var(--hell); padding: 1rem 1.25rem; margin-bottom: 0.75rem; border-radius: 4px; text-decoration: none; color: inherit; display: block; transition: border-color 0.15s; }
.dokument-karte:hover { border-color: var(--braun); }
.dokument-karte-header { display: flex; justify-content: space-between; align-items: baseline; margin-bottom: 0.25rem; }
.dokument-karte h3 { font-size: 1rem; color: var(--text); }
.dokument-karte .jahr { font-size: 0.875rem; color: var(--grau); }
.badge { display: inline-block; font-size: 0.75rem; background: var(--braun); color: #fff; padding: 0.1rem 0.5rem; border-radius: 3px; margin-bottom: 0.35rem; }
.badge.bild { background: #5d7355; }
.badge.video { background: #55456b; }
.dokument-karte p { font-size: 0.875rem; color: var(--grau); }

/* Autocomplete dropdown */
.autocomplete-wrap { position: relative; }
.autocomplete-list { position: absolute; top: 100%; left: 0; right: 0; background: #fff; border: 1px solid var(--rand); border-top: none; z-index: 10; list-style: none; max-height: 160px; overflow-y: auto; }
.autocomplete-list li { padding: 0.4rem 0.5rem; font-size: 0.875rem; cursor: pointer; }
.autocomplete-list li:hover, .autocomplete-list li.aktiv { background: var(--hell); }

/* Detail page */
.breadcrumb { font-size: 0.875rem; color: var(--grau); margin-bottom: 1.5rem; }
.breadcrumb a { color: #5c4a2a; text-decoration: none; }
.breadcrumb a:hover { text-decoration: underline; }
.detail-header { margin-bottom: 1.5rem; }
.detail-header h1 { font-size: 1.75rem; margin-bottom: 0.25rem; }
.detail-meta { font-size: 0.875rem; color: var(--grau); }
.detail-thumbnail { margin-bottom: 1.5rem; }
.detail-thumbnail img { max-width: 300px; border: 1px solid var(--rand); box-shadow: 2px 2px 8px rgba(0,0,0,0.1); }
.download-button { display: inline-block; background: var(--braun); color: #fff; padding: 0.6rem 1.25rem; text-decoration: none; border-radius: 3px; font-size: 0.9rem; margin-bottom: 1.5rem; }
.download-button:hover { background: #6b5840; }

/* Focus styles for keyboard navigation */
.dokument-karte:focus-visible { outline: 2px solid var(--braun); outline-offset: 2px; border-color: var(--braun); }
.download-button:focus-visible { outline: 2px solid #fff; outline-offset: 2px; }
.skip-link { position: absolute; left: -9999px; top: auto; width: 1px; height: 1px; overflow: hidden; }
.skip-link:focus { position: static; width: auto; height: auto; padding: 0.5rem 1rem; background: var(--braun); color: #fff; text-decoration: none; font-size: 0.875rem; }
.zusammenfassung { background: var(--hell); border-left: 4px solid var(--braun); padding: 1rem 1.25rem; margin-bottom: 1.5rem; border-radius: 0 4px 4px 0; }
.zusammenfassung p { font-size: 1rem; }
.transkription { margin-bottom: 2rem; line-height: 1.8; }
.transkription h2 { font-size: 1rem; text-transform: uppercase; letter-spacing: 0.05em; color: var(--grau); margin-bottom: 0.75rem; border-bottom: 1px solid var(--rand); padding-bottom: 0.4rem; }
.transkription p { margin-bottom: 0.6rem; }
.metadaten { display: flex; gap: 2rem; flex-wrap: wrap; font-size: 1rem; margin-bottom: 2rem; padding-top: 1.5rem; border-top: 1px solid var(--rand); }
.metadaten-gruppe h3 { font-size: 1rem; color: var(--text); margin-bottom: 0.4rem; }
.metadaten-gruppe ul { list-style: none; }
.metadaten-gruppe li { color: var(--text); margin-bottom: 0.2rem; }
.bemerkungen { background: var(--hell); border: 1px solid var(--rand); border-radius: 4px; padding: 1rem 1.25rem; margin-bottom: 1.5rem; }
.bemerkungen h2 { font-size: 0.75rem; text-transform: uppercase; letter-spacing: 0.05em; color: var(--grau); margin-bottom: 0.5rem; }
.bemerkungen p { font-size: 0.9rem; color: var(--text); }

/* Empty state */
.keine-ergebnisse { color: var(--grau); padding: 2rem; text-align: center; font-style: italic; }

/* Responsive */
@media (max-width: 700px) {
  .archiv-layout { flex-direction: column; }
  .filter-leiste { width: 100%; }
}
