/* =========================================================================
   styles.css - gemeinsames Design-System (ab v31)
   Redaktioneller Stil, inspiriert von Financial Times & The Economist:
   ruhige Typografie, eine zurückhaltende Akzentfarbe (tiefes Grün statt Rot),
   Haarlinien, "Kicker"-Labels in Versalien, großzügiger Weißraum.
   Alle Seiten binden NUR diese Datei ein (plus ggf. eine winzige
   seiten-spezifische <style>-Ergänzung). Dark/Light über data-theme.
   ========================================================================= */

/* ---- Design-Tokens ------------------------------------------------------- */
:root {
  /* Dark (verfeinert, leicht warm) */
  --bg: #0f1116;
  --bg-soft: #14171d;
  --card: #171a21;
  --card-2: #1c2028;
  --card-border: #2b313c;
  --hairline: #262c36;
  --text: #ecebe6;
  --text-strong: #ffffff;
  --muted: #99a0ab;
  --faint: #6b7280;
  --accent: #eceae4;          /* neutral: allgemeine UI in Schwarz/Weiß */
  --accent-soft: rgba(236,234,228,0.10);
  --up: #3ea87a;              /* Datenlogik: positiv */
  --down: #e0685c;           /* Datenlogik: negativ */
  --flat: #99a0ab;
  --shadow: 0 6px 24px rgba(0,0,0,0.35);
  --serif: "Playfair Display", "Times New Roman", Georgia, serif;
  --sans: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
}
html[data-theme="light"] {
  /* Light: weißer Seitenhintergrund, aber cremefarbene Kästen (mehr Kontrast) */
  --bg: #ffffff;
  --bg-soft: #f4f1ea;
  --card: #fbf7ef;
  --card-2: #f4eee1;
  --card-border: #e8e1d3;
  --hairline: #eee8db;
  --text: #14161b;
  --text-strong: #000000;
  --muted: #57606a;
  --faint: #8b929b;
  --accent: #14161b;          /* neutral: allgemeine UI in Schwarz/Weiß */
  --accent-soft: rgba(20,22,27,0.08);
  --up: #17864f;              /* nur für Bewertungen/Daten */
  --down: #c0392b;
  --flat: #57606a;
  --shadow: 0 4px 16px rgba(0,0,0,0.08);
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font-family: var(--sans);
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}
a { color: inherit; }

/* ---- Wertpapier-Ticker --------------------------------------------------- */
.ticker-bar {
  border-bottom: 1px solid var(--hairline);
  background: var(--bg-soft);
  overflow: hidden;
  white-space: nowrap;
  position: relative;
}
.ticker-track {
  display: inline-flex;
  align-items: center;
  animation: ticker-scroll 40s linear infinite;
  padding: 7px 0;
}
.ticker-bar:hover .ticker-track { animation-play-state: paused; }
.ticker-item {
  display: inline-flex;
  align-items: baseline;
  gap: 6px;
  padding: 0 22px;
  font-size: 0.8rem;
  border-right: 1px solid var(--hairline);
}
.ticker-item .t-label { color: var(--muted); }
.ticker-item .t-price { font-weight: 700; }
.ticker-item .t-change.kw-up { color: var(--up); }
.ticker-item .t-change.kw-down { color: var(--down); }
@keyframes ticker-scroll { from { transform: translateX(0); } to { transform: translateX(-50%); } }

/* ---- Masthead / Logo ----------------------------------------------------- */
.top-bar {
  padding: 8px 24px 10px;
  max-width: 1200px;
  margin: 0 auto;
}
.brand { display: inline-flex; flex-direction: column; align-items: flex-start; }
.brand-line {
  font-family: var(--serif);
  font-weight: 800;
  font-size: 3.7rem;
  line-height: 1;
  white-space: nowrap;
  color: var(--text-strong);
  letter-spacing: -0.01em;
  text-decoration: none;
  display: inline-block;
}
.brand-line .word { display: inline-block; }
.brand-line .keep { display: inline; }
.brand-line .rest, .brand-line .space {
  display: inline-block;
  overflow: hidden;
  white-space: nowrap;
  vertical-align: bottom;
  max-width: 600px;
  opacity: 1;
  transition: max-width 0.9s cubic-bezier(.65,0,.35,1), opacity 0.5s ease 0.1s;
}
.brand-line .space { max-width: 34px; }
.brand-line.collapsed .rest, .brand-line.collapsed .space { max-width: 0; opacity: 0; }

/* ---- Navigation ---------------------------------------------------------- */
.subnav { border-top: 1px solid var(--hairline); border-bottom: 1px solid var(--hairline); }
.subnav-inner {
  max-width: 1200px;
  margin: 0 auto;
  padding: 9px 24px;
  display: flex;
  gap: 24px;
  overflow-x: auto;
  align-items: center;
}
.subnav a {
  color: var(--muted);
  font-size: 0.74rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  text-decoration: none;
  white-space: nowrap;
  padding-bottom: 2px;
  border-bottom: 2px solid transparent;
}
.subnav a:hover { color: var(--text); }
.subnav a.active { color: var(--text); border-bottom-color: var(--accent); }

.auth-area {
  margin-left: auto;
  display: flex;
  gap: 14px;
  align-items: center;
  white-space: nowrap;
}
.auth-area .auth-user { color: var(--text); font-size: 0.76rem; font-weight: 700; text-decoration: none; }
.auth-area .auth-user:hover { text-decoration: underline; }
.auth-area #logout-link { color: var(--muted); font-size: 0.74rem; text-decoration: none; }
.auth-area #logout-link:hover { color: var(--text); }
.auth-area a.auth-btn {
  background: var(--accent);
  color: #fff;
  padding: 6px 16px;
  border-radius: 4px;
  font-weight: 700;
  font-size: 0.76rem;
  text-decoration: none;
}
.auth-area a.auth-btn:hover { opacity: 0.9; color: #fff; }
.theme-btn {
  background: none;
  border: 1px solid var(--card-border);
  color: var(--muted);
  border-radius: 999px;
  padding: 4px 10px;
  font-size: 0.85rem;
  line-height: 1;
  cursor: pointer;
}
.theme-btn:hover { color: var(--text); border-color: var(--muted); }
#nav-search-input {
  background: var(--card);
  border: 1px solid var(--card-border);
  border-radius: 4px;
  color: var(--text);
  font-size: 0.78rem;
  padding: 6px 12px;
  outline: none;
  width: 168px;
  font-family: inherit;
}
#nav-search-input:focus { border-color: var(--accent); }
#nav-search-input::placeholder { color: var(--faint); }

/* ---- Layout-Varianten ---------------------------------------------------- */
.layout { max-width: 1200px; margin: 0 auto; padding: 40px 24px 72px; }
.layout--split {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 340px;
  gap: 32px;
  align-items: start;
}
.layout--narrow { max-width: 760px; }
.layout--article { max-width: 1120px; }
@media (max-width: 880px) {
  .layout--split { grid-template-columns: 1fr; }
  #sidebar-panel { grid-row: auto !important; }
}
#sidebar-panel { grid-row: span 2; }

/* ---- Kicker (Versal-Label mit kurzem Strich, FT/Economist-Manier) -------- */
.kicker {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  color: var(--accent);
  font-size: 0.72rem;
  font-weight: 800;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  margin: 0 0 10px;
}
.kicker::before {
  content: "";
  width: 26px;
  height: 2px;
  background: var(--accent);
  display: inline-block;
}

/* ---- Panels / Karten ----------------------------------------------------- */
.panel {
  background: var(--card);
  border: 1px solid var(--card-border);
  border-radius: 8px;
  padding: 22px;
}
.panel h2 {
  margin: 0 0 4px;
  font-size: 1.15rem;
  font-family: var(--serif);
  font-weight: 700;
}
.panel .panel-subtitle { margin: 0 0 16px; font-size: 0.8rem; color: var(--muted); line-height: 1.5; }

/* ---- Startseite: Top-Analysen der Woche ---------------------------------- */
.tw-row {
  display: flex; gap: 16px; padding: 16px 0;
  border-bottom: 1px solid var(--hairline); align-items: flex-start;
}
.tw-row:first-child { padding-top: 4px; }
.tw-row:last-of-type { border-bottom: none; }
.tw-rank {
  font-family: var(--serif); font-weight: 800; font-size: 1.5rem;
  color: var(--accent); min-width: 30px; line-height: 1.1;
}
.tw-title {
  display: block; font-family: var(--serif); font-weight: 700;
  font-size: 1.12rem; line-height: 1.32; color: var(--text);
  text-decoration: none; overflow-wrap: anywhere;
}
.tw-title:hover { text-decoration: underline; }
.tw-meta { color: var(--muted); font-size: 0.76rem; margin-top: 4px; }
.tw-meta .tw-author { color: var(--text); font-weight: 600; text-decoration: none; }
.tw-meta .tw-author:hover { text-decoration: underline; }
.tw-meta .tw-score { color: var(--up); font-weight: 700; }
.tw-more { display: inline-block; margin-top: 16px; font-size: 0.8rem; font-weight: 700; color: var(--accent); text-decoration: none; }
.tw-more:hover { text-decoration: underline; }

/* ---- Trending-Sidebar (GDELT) ------------------------------------------- */
.kw-updated { font-size: 0.74rem; color: var(--muted); margin-bottom: 12px; display: block; }
.kw-caveat { font-size: 0.72rem; color: var(--muted); margin: 12px 0 0; line-height: 1.45; }
table.kw-table { width: 100%; border-collapse: collapse; font-size: 0.85rem; }
table.kw-table th {
  text-align: left; font-weight: 700; color: var(--muted);
  font-size: 0.68rem; text-transform: uppercase; letter-spacing: 0.04em;
  padding: 6px 6px; border-bottom: 1px solid var(--hairline);
}
table.kw-table td { padding: 10px 6px; border-bottom: 1px solid var(--hairline); vertical-align: middle; }
table.kw-table tr:last-child td { border-bottom: none; }
.kw-rank { color: var(--muted); width: 18px; }
.kw-name { font-weight: 700; }
.kw-link { color: inherit; text-decoration: none; display: inline-block; }
.kw-link:hover { opacity: 0.85; }
.kw-link:hover .kw-name-text { text-decoration: underline; }
.kw-up { color: var(--up); font-weight: 700; }
.kw-down { color: var(--down); font-weight: 700; }
.kw-flat { color: var(--flat); font-weight: 600; }
.kw-loading { color: var(--muted); text-align: center; padding: 16px 0; font-size: 0.85rem; }
.kw-spark { display: block; }

/* ---- Themenseite: Graph-Hover-Tooltip ------------------------------------ */
.back-link { display: inline-block; font-size: 0.78rem; color: var(--muted); text-decoration: none; margin-bottom: 12px; }
.back-link:hover { color: var(--text); }
.chart-wrap { position: relative; }
.chart-wrap svg { cursor: crosshair; }
.chart-tooltip {
  position: absolute; display: none; pointer-events: none;
  background: var(--card-2); border: 1px solid var(--card-border);
  border-radius: 6px; padding: 4px 8px; font-size: 0.7rem; line-height: 1.4;
  color: var(--text); white-space: nowrap; box-shadow: var(--shadow);
  z-index: 3; transform: translate(-50%, -100%);
}
.chart-tooltip .tt-date { font-weight: 700; }
.chart-tooltip .tt-value { color: var(--muted); }

/* ---- Themenseite: GDELT-Artikelliste ------------------------------------ */
.articles-panel { margin-top: 24px; }
.article-row { padding: 12px 0; border-bottom: 1px solid var(--hairline); }
.article-row:last-child { border-bottom: none; }
.article-title { color: var(--text); font-weight: 600; font-size: 0.92rem; text-decoration: none; }
.article-title:hover { text-decoration: underline; }
.article-meta { font-size: 0.74rem; color: var(--muted); margin-top: 3px; }
.tier-badge {
  display: inline-block; font-size: 0.58rem; font-weight: 700;
  text-transform: uppercase; letter-spacing: 0.03em; padding: 1px 6px;
  border-radius: 3px; margin-left: 7px; vertical-align: middle;
}
.tier-badge.tier-3 { background: #3a2f12; color: #f3c969; }
.tier-badge.tier-2 { background: #132a3a; color: #7ec8f3; }
html[data-theme="light"] .tier-badge.tier-3 { background: #f6ecc9; color: #8a6d14; }
html[data-theme="light"] .tier-badge.tier-2 { background: #d8ecfa; color: #1c6a99; }

/* ---- Articles-Übersicht: Toolbar + Karten -------------------------------- */
.toolbar {
  display: flex; align-items: flex-end; justify-content: space-between;
  gap: 24px; flex-wrap: wrap; margin-bottom: 20px;
  padding-bottom: 18px; border-bottom: 2px solid var(--text);
}
h1.page-title { font-family: var(--serif); font-weight: 800; font-size: 2.1rem; margin: 0; line-height: 1.1; }
.page-sub { color: var(--muted); font-size: 0.86rem; line-height: 1.5; margin: 8px 0 0; max-width: 600px; }
.toolbar-right { display: flex; align-items: center; gap: 12px; margin-left: auto; flex-wrap: wrap; }

.search-note { margin: 0 0 20px; font-size: 0.85rem; color: var(--muted); }
.search-note strong { color: var(--text); }
.search-note a { color: var(--accent); }

.filter-dd { position: relative; }
.filter-btn {
  border: 1px solid var(--card-border); border-radius: 4px; padding: 10px 16px;
  font-size: 0.7rem; font-weight: 700; letter-spacing: 0.06em;
  text-transform: uppercase; color: var(--muted); background: var(--card);
  cursor: pointer; display: inline-flex; align-items: center; gap: 8px; white-space: nowrap;
}
.filter-btn:hover { color: var(--text); border-color: var(--muted); }
.filter-btn .caret { font-size: 0.6rem; }
.filter-menu {
  position: absolute; right: 0; top: calc(100% + 6px);
  background: var(--card); border: 1px solid var(--card-border);
  border-radius: 8px; padding: 6px; min-width: 210px; z-index: 20;
  display: none; box-shadow: var(--shadow);
}
.filter-menu.open { display: block; }
.filter-menu button {
  display: block; width: 100%; text-align: left; background: none; border: none;
  color: var(--muted); font-size: 0.74rem; font-weight: 600; letter-spacing: 0.03em;
  text-transform: uppercase; padding: 8px 10px; border-radius: 5px; cursor: pointer;
}
.filter-menu button:hover { background: var(--bg-soft); color: var(--text); }
.filter-menu button.active { color: var(--text); font-weight: 800; }

a.submit-btn {
  background: var(--accent); color: #fff; padding: 12px 24px; border-radius: 4px;
  font-weight: 700; font-size: 0.86rem; letter-spacing: 0.02em;
  text-decoration: none; white-space: nowrap;
}
a.submit-btn:hover { opacity: 0.9; color: #fff; }

.a-card {
  background: var(--card); border: 1px solid var(--card-border); border-radius: 8px;
  padding: 24px 28px; margin-bottom: 16px;
  transition: transform 0.15s ease, border-color 0.15s ease, box-shadow 0.15s ease;
}
.a-card:hover { transform: translateY(-2px); border-color: var(--accent); box-shadow: var(--shadow); }
.card-top { display: flex; align-items: center; gap: 12px; flex-wrap: wrap; }
.badge-outline {
  display: inline-block; border: 1px solid var(--accent); color: var(--accent);
  font-size: 0.62rem; font-weight: 800; letter-spacing: 0.1em; text-transform: uppercase;
  padding: 3px 9px; border-radius: 3px;
}
.badge-outline.neg { border-color: var(--down); color: var(--down); }
.card-cat { color: var(--muted); font-size: 0.76rem; letter-spacing: 0.03em; text-transform: uppercase; font-weight: 600; }
.card-title {
  display: block; font-family: var(--serif); font-weight: 700; font-size: 1.5rem;
  line-height: 1.28; color: var(--text); text-decoration: none; margin: 12px 0 8px;
  overflow-wrap: anywhere;
}
.card-title:hover { color: var(--accent); }
.card-meta { color: var(--muted); font-size: 0.78rem; letter-spacing: 0.02em; margin-bottom: 10px; }
.card-meta .a-author { color: var(--text); font-weight: 600; text-decoration: none; }
.card-meta .a-author:hover { text-decoration: underline; }
.card-meta .score-up { color: var(--up); font-weight: 700; }
.card-meta .score-down { color: var(--down); font-weight: 700; }
.card-abstract {
  color: var(--muted); font-size: 0.9rem; line-height: 1.6; margin: 0; max-width: 940px;
  display: -webkit-box; -webkit-line-clamp: 3; -webkit-box-orient: vertical;
  overflow: hidden; overflow-wrap: anywhere;
}
.list-msg { color: var(--muted); text-align: center; padding: 30px 0; font-size: 0.86rem; }
.list-msg a { color: var(--accent); }

/* ---- Einzelartikel ------------------------------------------------------- */
.a-topic-tag {
  display: inline-block; font-size: 0.68rem; font-weight: 800; text-transform: uppercase;
  letter-spacing: 0.1em; color: var(--accent); border: 1px solid var(--accent);
  border-radius: 3px; padding: 3px 9px; margin-bottom: 14px;
}
.a-topic-tag.neg { color: var(--down); border-color: var(--down); }
h1.a-title { font-family: var(--serif); font-weight: 800; font-size: 2.3rem; line-height: 1.18; margin: 0 0 10px; overflow-wrap: anywhere; }
.a-meta { color: var(--muted); font-size: 0.85rem; margin-bottom: 16px; }
.a-meta .a-author { color: var(--text); font-weight: 600; text-decoration: none; }
.a-meta .a-author:hover { text-decoration: underline; }

.a-actions { margin-bottom: 24px; display: flex; gap: 10px; flex-wrap: wrap; align-items: center; }
.vote-box {
  display: inline-flex; align-items: center; gap: 2px;
  border: 1px solid var(--card-border); border-radius: 999px; background: var(--card); padding: 3px 6px;
}
.vote-box button { background: none; border: none; color: var(--muted); font-size: 0.95rem; line-height: 1; padding: 5px 8px; cursor: pointer; border-radius: 999px; }
.vote-box button:hover { color: var(--text); }
.vote-box button.active-up { color: var(--up); }
.vote-box button.active-down { color: var(--down); }
.vote-box button:disabled { opacity: 0.5; cursor: default; }
.vote-box .vote-score { min-width: 28px; text-align: center; font-size: 0.9rem; font-weight: 700; }
.vote-hint { font-size: 0.74rem; color: var(--muted); }
.vote-hint a { color: var(--accent); }
a.pdf-btn { display: inline-block; background: var(--accent); color: #fff; padding: 7px 16px; border-radius: 4px; font-weight: 700; font-size: 0.8rem; text-decoration: none; }
a.pdf-btn:hover { opacity: 0.9; color: #fff; }
button.delete-btn { background: none; border: 1px solid var(--down); color: var(--down); padding: 7px 16px; border-radius: 4px; font-weight: 700; font-size: 0.8rem; cursor: pointer; }
button.delete-btn:hover { background: var(--down); color: #fff; }
button.delete-btn:disabled { opacity: 0.5; cursor: default; }

.a-grid { display: grid; grid-template-columns: minmax(0, 1fr) 320px; gap: 28px; align-items: start; }
@media (max-width: 880px) { .a-grid { grid-template-columns: 1fr; } }
.a-body {
  font-size: 1.02rem; line-height: 1.8; white-space: pre-wrap; overflow-wrap: anywhere;
}
/* Editorial: Initial-Buchstabe (Drop Cap) im ersten Absatz */
.a-body.dropcap::first-letter {
  font-family: var(--serif); font-weight: 800; font-size: 3.3rem;
  line-height: 0.8; float: left; margin: 6px 10px 0 0; color: var(--accent);
}
.a-side { display: grid; gap: 20px; }
.side-panel h2 { font-family: var(--serif); font-size: 1.05rem; font-weight: 700; margin: 0 0 12px; }
.side-panel h3 { font-size: 0.68rem; font-weight: 800; text-transform: uppercase; letter-spacing: 0.06em; color: var(--muted); margin: 16px 0 5px; }
.side-panel h3:first-of-type { margin-top: 0; }
.side-panel p { font-size: 0.88rem; line-height: 1.6; margin: 0; white-space: pre-wrap; overflow-wrap: anywhere; }
.overview-panel { border-left: 3px solid var(--accent); }
.info-list { margin: 0; }
.info-list dt { font-size: 0.68rem; font-weight: 800; text-transform: uppercase; letter-spacing: 0.06em; color: var(--muted); margin: 14px 0 2px; }
.info-list dt:first-child { margin-top: 0; }
.info-list dd { margin: 0; font-size: 0.88rem; overflow-wrap: anywhere; white-space: pre-wrap; }
.info-list dd a { color: var(--accent); }
.page-msg { color: var(--muted); text-align: center; padding: 44px 0; font-size: 0.9rem; }
.page-msg a { color: var(--accent); }

/* ---- Formulare (Submit / Profil / Auth) ---------------------------------- */
form label {
  display: block; font-size: 0.74rem; font-weight: 800; color: var(--muted);
  text-transform: uppercase; letter-spacing: 0.04em; margin: 18px 0 6px;
}
form label:first-child { margin-top: 0; }
form input, form textarea, form select {
  width: 100%; background: var(--card-2); border: 1px solid var(--card-border);
  border-radius: 5px; color: var(--text); font-size: 0.92rem; padding: 10px 12px;
  outline: none; font-family: inherit;
}
form input::placeholder, form textarea::placeholder { color: var(--faint); }
form input:focus, form textarea:focus, form select:focus { border-color: var(--accent); }
form textarea { resize: vertical; }
form input[type="file"] { padding: 8px 12px; cursor: pointer; }
form input[type="file"]::file-selector-button {
  background: var(--accent); color: #fff; border: none; border-radius: 5px;
  padding: 6px 12px; font-weight: 700; font-size: 0.8rem; margin-right: 12px; cursor: pointer;
}
.field-hint { font-size: 0.73rem; color: var(--muted); margin-top: 5px; display: flex; justify-content: space-between; gap: 10px; }
.two-col { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; }
@media (max-width: 560px) { .two-col { grid-template-columns: 1fr; } }
button.submit {
  width: 100%; margin-top: 26px; background: var(--accent); color: #fff; border: none;
  border-radius: 5px; font-size: 0.9rem; font-weight: 700; padding: 12px 0; cursor: pointer;
}
button.submit:hover { opacity: 0.9; }
button.submit:disabled { opacity: 0.5; cursor: default; }
.form-msg { margin: 16px 0 0; font-size: 0.84rem; line-height: 1.45; display: none; }
.form-msg.error { display: block; color: var(--down); }
.form-msg.success { display: block; color: var(--up); }
.form-msg.info { display: block; color: var(--muted); }

/* ---- Auth-Seite ---------------------------------------------------------- */
.auth-layout { max-width: 420px; margin: 48px auto 80px; padding: 0 24px; }
.auth-tabs { display: flex; margin-bottom: 20px; border-bottom: 1px solid var(--hairline); }
.auth-tabs button {
  flex: 1; background: none; border: none; color: var(--muted);
  font-size: 0.85rem; font-weight: 700; padding: 10px 0; cursor: pointer;
  border-bottom: 2px solid transparent;
}
.auth-tabs button.active { color: var(--text); border-bottom-color: var(--accent); }
.auth-msg { margin: 16px 0 0; font-size: 0.84rem; line-height: 1.45; display: none; }
.auth-msg.error { display: block; color: var(--down); }
.auth-msg.success { display: block; color: var(--up); }
.auth-msg.info { display: block; color: var(--muted); }

/* ---- Profil -------------------------------------------------------------- */
.p-meta { color: var(--muted); font-size: 0.84rem; margin: 0 0 24px; }
.bio-text { font-size: 0.94rem; line-height: 1.7; white-space: pre-wrap; overflow-wrap: anywhere; margin: 0; }
.bio-empty { color: var(--muted); font-style: italic; }
button.save { margin-top: 14px; background: var(--accent); color: #fff; border: none; border-radius: 5px; font-size: 0.85rem; font-weight: 700; padding: 10px 22px; cursor: pointer; }
button.save:hover { opacity: 0.9; }
button.save:disabled { opacity: 0.5; cursor: default; }
.appearance-row { display: flex; align-items: center; justify-content: space-between; gap: 16px; }
.appearance-row p { margin: 0; font-size: 0.86rem; color: var(--muted); }
button.theme-big { background: var(--accent); color: #fff; border: none; border-radius: 5px; font-size: 0.85rem; font-weight: 700; padding: 10px 18px; cursor: pointer; white-space: nowrap; }
button.theme-big:hover { opacity: 0.9; }
.a-row { padding: 14px 0; border-bottom: 1px solid var(--hairline); }
.a-row:last-child { border-bottom: none; }
.a-row .a-title { color: var(--text); font-family: var(--serif); font-weight: 700; font-size: 1.05rem; text-decoration: none; overflow-wrap: anywhere; }
.a-row .a-title:hover { text-decoration: underline; }
.a-row .a-meta { color: var(--muted); font-size: 0.76rem; margin: 3px 0 0; }

.panel + .panel { margin-top: 20px; }
h1 { font-family: var(--serif); }

/* ---- About-Seite --------------------------------------------------------- */
.about-hero { max-width: 820px; margin: 0 auto 8px; }
.about-hero h1 { font-family: var(--serif); font-weight: 800; font-size: 2.6rem; line-height: 1.12; margin: 6px 0 14px; }
.about-lead { font-size: 1.15rem; line-height: 1.6; color: var(--text); font-family: var(--serif); }
.about-wrap { max-width: 820px; margin: 0 auto; }
.about-section { padding: 30px 0; border-top: 1px solid var(--hairline); }
.about-section h2 { font-family: var(--serif); font-weight: 700; font-size: 1.4rem; margin: 0 0 12px; }
.about-section p { font-size: 0.98rem; line-height: 1.75; color: var(--text); margin: 0 0 14px; }
.about-section p:last-child { margin-bottom: 0; }
.about-section ul { margin: 0; padding-left: 20px; }
.about-section li { font-size: 0.98rem; line-height: 1.7; margin-bottom: 8px; }
.about-disclaimer {
  background: var(--card); border: 1px solid var(--card-border);
  border-left: 3px solid var(--down); border-radius: 6px; padding: 18px 20px; margin-top: 8px;
}
.about-disclaimer p { font-size: 0.88rem; color: var(--muted); margin: 0; line-height: 1.6; }
.value-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(220px, 1fr)); gap: 18px; margin-top: 6px; }
.value-card { background: var(--card); border: 1px solid var(--card-border); border-radius: 8px; padding: 18px 20px; }
.value-card h3 { font-family: var(--serif); font-size: 1.05rem; margin: 0 0 6px; }
.value-card p { font-size: 0.86rem; color: var(--muted); line-height: 1.55; margin: 0; }

/* ---- Footer -------------------------------------------------------------- */
.site-footer { border-top: 1px solid var(--hairline); margin-top: 40px; }
.site-footer-inner {
  max-width: 1200px; margin: 0 auto; padding: 26px 24px 40px;
  display: flex; flex-wrap: wrap; gap: 16px 28px; align-items: baseline;
}
.site-footer .foot-brand { font-family: var(--serif); font-weight: 800; font-size: 1.1rem; color: var(--text); text-decoration: none; }
.site-footer a.foot-link { color: var(--muted); font-size: 0.78rem; text-decoration: none; }
.site-footer a.foot-link:hover { color: var(--text); }
.site-footer .foot-disc { color: var(--faint); font-size: 0.72rem; margin-left: auto; max-width: 460px; line-height: 1.5; }

/* ---- Skeleton-Loader ----------------------------------------------------- */
.skeleton { position: relative; overflow: hidden; background: var(--card-2); border-radius: 5px; }
.skeleton::after {
  content: ""; position: absolute; inset: 0;
  background: linear-gradient(90deg, transparent, var(--card-border), transparent);
  transform: translateX(-100%); animation: shimmer 1.3s infinite;
}
@keyframes shimmer { 100% { transform: translateX(100%); } }
.sk-card { background: var(--card); border: 1px solid var(--card-border); border-radius: 8px; padding: 24px 28px; margin-bottom: 16px; }
.sk-line { height: 12px; margin-bottom: 10px; }
.sk-line.w40 { width: 40%; } .sk-line.w70 { width: 70%; } .sk-line.w90 { width: 90%; }
.sk-title { height: 22px; width: 60%; margin: 12px 0; }

/* ---- v31.1 Korrekturen --------------------------------------------------- */
/* Primär-Buttons: Text invertiert zur Hintergrundfarbe (schwarzer Button in
   Light, weißer Button in Dark) - da --accent jetzt neutral ist. */
.auth-area a.auth-btn, a.submit-btn, a.pdf-btn,
button.submit, button.save, button.theme-big,
form input[type="file"]::file-selector-button { color: var(--bg); }
.auth-area a.auth-btn:hover, a.submit-btn:hover, a.pdf-btn:hover { color: var(--bg); }

/* Header: Sign in / Username / Sign out exakt auf Höhe des Theme-Buttons */
.auth-area { align-items: center; }
.auth-area a, .auth-area .auth-user, .auth-area #logout-link {
  display: inline-flex; align-items: center; line-height: 1;
}

/* Startseite: beide Boxen oben bündig (Höhe darf unten unterschiedlich sein) */
.layout--equal { align-items: start; }

/* Karten-Titel-Hover: Unterstreichen statt Farbwechsel (Akzent ist neutral) */
.card-title:hover { color: inherit; text-decoration: underline; }

/* Inline-Links neutral einfärben, aber als Link erkennbar (unterstrichen) */
.list-msg a, .search-note a, .vote-hint a, .info-list dd a, .page-msg a { text-decoration: underline; }
