/* Shared by the "document" pages (About, Quellen, Impressum - templates/about.html, sources.html,
   impressum.html); page chrome (body background, h1, .back): page.css. Colours: theme.css. */
main { max-width: 820px; margin: 0 auto; padding: 32px 16px 48px; }
section.glass { padding: 16px 20px; margin-top: 18px; }
h2 { font-size: 18px; font-weight: 600; margin: 0 0 8px; }
h3 { font-size: 13px; font-weight: 600; margin: 14px 0 4px; color: var(--accent); opacity: .85;
     text-transform: uppercase; letter-spacing: .8px; }
ul { margin: 4px 0; padding-left: 20px; }
li { margin: 3px 0; }
.muted { font-size: 13px; }
.todo { color: var(--muted); font-style: italic; }
table { width: 100%; border-collapse: collapse; font-size: 14px; }
th, td { text-align: left; padding: 6px 8px 6px 0; vertical-align: top; border-bottom: 1px solid var(--glass-border); }
th { color: var(--muted); font-weight: 500; font-size: 12px; white-space: nowrap; }
td.n { text-align: right; font-variant-numeric: tabular-nums; white-space: nowrap; }
.wrap { overflow-x: auto; }
td .desc, li .desc { color: var(--muted); font-size: 13px; line-height: 1.45; margin-top: 3px; max-width: 46ch; }
.prose p { margin: 0 0 12px; max-width: 68ch; }
#motivation p:first-of-type { font-size: 17px; font-style: italic; }
ul.species-list { list-style: none; padding-left: 0; margin: 10px 0; }
ul.species-list li { display: flex; align-items: baseline; gap: 10px; padding: 5px 0;
                      border-bottom: 1px solid var(--glass-border); }
ul.species-list li:last-child { border-bottom: none; }
ul.species-list .dot { width: 9px; height: 9px; border-radius: 50%; flex: 0 0 auto; }
ul.species-list .name { font-weight: 600; flex: 0 0 auto; white-space: nowrap; }
ul.species-list .desc { color: var(--muted); font-size: 13px; flex: 1 1 auto; min-width: 0; }
ul.species-list a.stammblatt { font-size: 13px; white-space: nowrap; flex: 0 0 auto; }
ul.species-list .head { display: flex; align-items: baseline; gap: 10px; flex: 0 0 auto; }

/* Boxen "Interessante Links", "Baumarten", "Quellen" (about.html): aufklappbar, starten zugeklappt.
   Look/Marker wie .legend-box auf der Karte (map.css), damit es sich wie ein Stück derselben Website anfühlt. */
details.acc summary { cursor: pointer; font-size: 18px; font-weight: 600; margin: 0; list-style: none; }
details.acc summary::-webkit-details-marker { display: none; }
details.acc summary::before { content: "▸"; display: inline-block; width: 18px; color: var(--muted); transition: transform .15s; }
details.acc[open] summary::before { transform: rotate(90deg); }
details.acc[open] summary { margin-bottom: 8px; }
details.acc summary:hover, details.acc summary:focus-visible { color: var(--accent); outline: none; }

/* "Wie zugeordnet wurde" (sources.html, #quellen): kräftiges Weiß statt des sonst gedämpften Tabellentons */
.match-kinds, .match-kinds th, .match-kinds td { color: #fff !important; }

/* Kennzahlen-Block (sources.html, top_summary_html() in main.py): erstes Element in der Sidebar
   (#quellen-side) - kleine Kacheln statt eines langen Fließtext-Satzes. grid-auto-fit reflowt von selbst je
   nach verfügbarer Breite (in der schmalen Sidebar meist einspaltig, im gestapelten Mobile-Layout mehrspaltig). */
.stat-strip { display: grid; grid-template-columns: repeat(auto-fit, minmax(130px, 1fr)); gap: 12px 22px; margin: 0 0 4px; }
.stat-strip .stat { min-width: 0; }
.stat-strip .n { display: block; font-size: 20px; font-weight: 650; color: var(--ink); font-variant-numeric: tabular-nums; }
.stat-strip .l { display: block; font-size: 12px; color: var(--muted); }
.stat-strip .sub { display: block; font-size: 11px; color: var(--muted); margin-top: 2px; }
.stat-strip a { display: block; text-decoration: none; }
.stat-strip a .n { border-bottom: 1px dotted var(--muted); }
.stat-strip a:hover .n { border-bottom-style: solid; color: var(--accent); }
p.stand { color: var(--muted); font-size: 12px; margin: 4px 0 0; }

/* Quellen-Seite: Baumdaten (links) + Sidebar (rechts) - Desktop nebeneinander, Mobile untereinander (Sidebar
   kommt in der Reihenfolge danach, siehe sources.html). Sidebar im Karten-Stil der Anpassen-Seite (admin.css
   .card.glass: eigene kleine Box je Thema statt einer großen) statt einer einzigen durchgehenden Box. */
main.wide { max-width: 1080px; }
.quellen-layout { display: grid; grid-template-columns: 1fr 280px; gap: 20px; align-items: start; }
#quellen-side { display: flex; flex-direction: column; gap: 16px; }
#quellen-side .side-card { padding: 18px 20px; margin: 0; }
#quellen-side .side-card h3:first-child { margin-top: 0; }

@media (max-width: 600px) {
  .quellen-layout { grid-template-columns: 1fr; }

  /* Baumarten: Headline (Punkt+Name), Beschreibung und Link untereinander statt in einer engen Zeile */
  ul.species-list li { flex-direction: column; align-items: flex-start; gap: 4px; }
  ul.species-list .name { white-space: normal; }
  ul.species-list .desc { max-width: none; }

  /* Baumdaten-Tabelle (#quellen, aus main.py's quellen_processing_html()): aus der (auf schmalen Screens
     gequetschten) Tabelle wird eine Kartenliste - jede Quelle ein Block, Nachweis/letzter Abruf mit Label
     (via data-label). Betrifft nicht .match-kinds ("Wie zugeordnet wurde", kein <thead>). */
  #quellen .wrap { overflow-x: visible; }
  #quellen table, #quellen thead, #quellen tbody, #quellen tr, #quellen th, #quellen td { display: block; }
  #quellen thead { display: none; }
  #quellen tbody tr { border: 1px solid var(--glass-border); border-radius: 10px; padding: 8px 12px; margin: 10px 0; }
  #quellen td { border-bottom: none; padding: 3px 0; white-space: normal; }
  #quellen td[data-label]::before { content: attr(data-label) ": "; color: var(--muted); font-size: 12px; }
}